:root { color-scheme: light dark;
  --paper: #FAFAF7; --card: #FFFFFF; --ink: #1F2933; --ink-muted: #616E7C; --rule: #D9DEE3;
  --accent: #2F6F8F; --attention: #B7791F; --caution: #A23B3B; --settled: #3B7A57; }
@media (prefers-color-scheme: dark) { :root {
  --paper: #15181C; --card: #1D2127; --ink: #E6E8EB; --ink-muted: #9AA3AD; --rule: #2C323A;
  --accent: #6FA8C8; --attention: #D9A441; --caution: #D06A6A; --settled: #6FB08A; } }
body { font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--paper); margin: 2rem auto; max-width: 44rem; padding: 0 1rem; }
h1 { font-size: 1.6rem; font-weight: 600; margin-bottom: .2rem; } h1 small { opacity: .5; font-weight: 400; font-size: .9rem; }
h2 { font-size: 1rem; font-weight: 600; margin: 0 0 .6rem; }
h3 { font-size: 1rem; font-weight: 600; margin: .8rem 0 .3rem; }
p { margin: .5rem 0; }
a, .link { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
code, .mono, dl.kv dd, dl.kv dt, .status, input.mono, textarea.mono, .words li, .line {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: .9em; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem; margin: 1rem 0; }
.panel.caution { border-left: 3px solid var(--caution); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .4rem 0; }
.hint { color: var(--ink-muted); font-size: .85rem; }
.error { color: var(--caution); font-size: .9rem; }
.attention { color: var(--attention); }
.settled { color: var(--settled); }
.status.ok, .status.running, .status.reserved, .status.unlocked { color: var(--settled); }
.status.failed { color: var(--caution); }
.status.in-flight, .status.starting, .status.pending, .status.locked { color: var(--attention); }
button { padding: .35rem .8rem; font: inherit; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
label.field, div.field { display: grid; grid-template-columns: 9rem 1fr auto; gap: .4rem .6rem; align-items: center; margin: .4rem 0; }
input[type=text], input[type=password], textarea { font: inherit; padding: .3rem .5rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); width: 100%; box-sizing: border-box; }
textarea { min-height: 5rem; }
dl.kv { display: grid; grid-template-columns: 11rem 1fr; gap: .2rem .6rem; margin: .6rem 0 0; }
dl.kv dt { color: var(--ink-muted); }
dl.kv dd { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
ol.words { columns: 4; column-gap: 1rem; padding-left: 2rem; margin: .8rem 0; }
ol.words li { font-size: 1.25rem; letter-spacing: .04em; margin: .15rem 0; break-inside: avoid; }
.line { user-select: all; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: .5rem; overflow-wrap: anywhere; }
.card { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; align-items: start; }
.card svg { width: 48px; height: 48px; grid-row: span 4; }
.card .name { font-weight: 600; }
ul.peers { list-style: none; padding: 0; margin: .3rem 0; }
ul.peers li { font-family: ui-monospace, monospace; font-size: .85rem; overflow-wrap: anywhere; margin: .15rem 0; }
footer { color: var(--ink-muted); font-size: .85rem; border-top: 1px solid var(--rule); margin-top: 1.5rem; padding-top: .6rem; }
.fade { transition: opacity 150ms; }
/* the strength bar under the local unlock password (UX doc 4.4): ink-muted only */
.strength { display: inline-flex; gap: 2px; vertical-align: middle; margin-right: .5rem; }
.strength i { display: inline-block; width: 1.1rem; height: .4rem; border: 1px solid var(--ink-muted); border-radius: 2px; box-sizing: border-box; }
.strength i.on { background: var(--ink-muted); }
/* setup wizard, home screen and the joining side (Phase 3 UI) */
ol.rail { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: 0; margin: .2rem 0 1rem; font-size: .85rem; }
ol.rail li { color: var(--ink-muted); counter-increment: rail; }
ol.rail { counter-reset: rail; }
ol.rail li::before { content: counter(rail) ". "; }
ol.rail li.here { color: var(--ink); font-weight: 600; }
ol.rail li.done { color: var(--settled); }
.qr { margin: .8rem 0; }
.qr svg { border: 1px solid var(--rule); border-radius: 6px; background: var(--card); }
.arrangement { border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px; padding: .6rem .8rem; margin: .6rem 0; }
.arrangement .name { font-weight: 600; }
ul.guardians { list-style: none; padding: 0; margin: .4rem 0; }
ul.guardians li { padding: .3rem 0; border-bottom: 1px solid var(--rule); font-size: .9rem; }
ul.guardians li .name { font-weight: 600; }
details summary { cursor: pointer; color: var(--accent); }
/* the dashboards (Phase 4 UI, ADR-040) */
.checkin { margin: .2rem 0 1rem; }
.checkin.attention, .arrangement.attention { border-left: 3px solid var(--attention); }
.checkin.caution, .arrangement.caution { border-left: 3px solid var(--caution); }
.arrangement.settled { border-left-color: var(--settled); }
.arrangement.muted { border-left-color: var(--rule); }
.arrangement.greyed { opacity: .6; }
.checkin.attention, .checkin.caution { padding-left: .8rem; }
p.state { display: flex; align-items: baseline; gap: .4rem; }
svg.dot { flex: none; position: relative; top: 0; }
svg.dot.accent circle { fill: var(--accent); } svg.dot.attention circle { fill: var(--attention); }
svg.dot.caution circle { fill: var(--caution); } svg.dot.settled circle { fill: var(--settled); }
svg.dot.muted circle { fill: var(--ink-muted); }
.link.caution { color: var(--caution); }
button.primary.caution { background: var(--caution); border-color: var(--caution); }
.panel.inner { margin: .6rem 0; }
.guard .card { margin-bottom: .3rem; }
.guard .card svg { grid-row: span 2; }
/* the recipient dashboard (Phase 5 UI, ADR-043) */
svg.dot.ring { color: var(--ink-muted); }
.arrangement.received.attention { border-left-color: var(--attention); }
pre.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: .9em; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: .6rem .8rem; margin: .6rem 0; user-select: all; }
/* Phase 6 (ADR-046/047): the cancel confirmation and the file import */
.panel.inner.caution { border-left: 3px solid var(--caution); }
label.button { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink); cursor: pointer; }
