/* Unison shell styles — extracted from index.html (visual-parity Task 1).
   Loaded after tokens.css. */
/* Unison U1 shell — Today + check-in (docs/unison/SPEC.md §5 U1).
   Layout deliberately minimal: one column, big type, ≥44px targets.
   Later slices add navigation; U1 is a single caring page. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--font-base); }
body {
  font-family: 'Outfit', sans-serif; background: var(--bg); color: var(--ink);
  min-height: 100vh; line-height: 1.55;
}
body[data-size="lg"] .shell, body[data-size="lg"] .a11y-bar, body[data-size="lg"] #bottombar { zoom: 1.14; }
body[data-size="xl"] .shell, body[data-size="xl"] .a11y-bar, body[data-size="xl"] #bottombar { zoom: 1.3; }
/* pre-auth (no shell): zoom the centered card container */
body:not(.signed-in)[data-size="lg"] .main { zoom: 1.14; }
body:not(.signed-in)[data-size="xl"] .main { zoom: 1.3; }

.a11y-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.a11y-bar .keyless { margin-right: auto; font-size: 13px; color: var(--ink-soft); }
.a11y-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 14px;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.a11y-btn:hover { border-color: var(--teal); background: var(--teal-light); }
.a11y-btn.on { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

main { max-width: 640px; margin: 0 auto; padding: 28px 18px 70px; }
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-dark));
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-weight: 800; font-size: 18px; }
.brand-name span { color: var(--teal); }
.brand-sub { font-size: 12px; color: var(--ink-soft); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 16px; }
h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.4px; }
.sub { font-size: 15px; color: var(--ink-soft); margin-top: 5px; }
h2 { font-size: 18px; font-weight: 700; }

label { display: block; font-size: 14.5px; font-weight: 600; margin: 16px 0 6px; }
input[type="email"], input[type="text"], input[type="password"] {
  width: 100%; min-height: 52px; font-family: inherit; font-size: 17px; color: var(--ink);
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--card);
}
input[type="email"]:focus, input[type="text"]:focus, input[type="password"]:focus { border-color: var(--teal); outline: none; }
.pw-fallback { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 6px; }
.linklike {
  background: none; border: none; color: var(--teal-dark); font-family: inherit; font-size: 14.5px;
  font-weight: 600; text-decoration: underline; cursor: pointer; padding: 10px 0; min-height: var(--tap-min);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap-min); padding: 10px 22px; margin-top: 14px;
  border: none; border-radius: 12px; background: var(--teal-dark); color: #fff;
  font-family: inherit; font-weight: 600; font-size: 16px; cursor: pointer; width: 100%;
}
.btn:hover { background: var(--teal-darker); }
.note { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); }
.callout {
  margin-top: 14px; padding: 13px 15px; background: var(--teal-light); border-radius: 11px;
  font-size: 15px; color: var(--teal-dark); font-weight: 600;
}
.callout.err { background: var(--red-light); color: var(--red); }

.checkin-btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.checkin-btn {
  flex: 1; min-width: 140px; min-height: 72px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--card); font-family: inherit; cursor: pointer; padding: 10px;
  font-size: 16px; font-weight: 700; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.checkin-btn small { font-weight: 500; font-size: 12.5px; color: var(--ink-soft); }
.checkin-btn:hover { border-color: var(--teal); }
.checkin-btn.picked { border-color: var(--teal-dark); background: var(--teal-light); }
.checkin-btn:disabled { opacity: .55; cursor: default; }

.hist-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 2px;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.hist-item:last-child { border-bottom: none; }
.hist-item .lvl { font-weight: 700; flex: 1; }
.hist-item .d { font-size: 13px; color: var(--ink-soft); }
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dot.full { background: var(--teal); } .dot.steady { background: #b7861f; } .dot.low { background: var(--red); }

.empty { color: var(--ink-soft); font-size: 15px; padding: 10px 0; }

/* ── care board (U2) ── */
.pair-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px;
  border-bottom: 1px solid var(--line); font-size: 15px; flex-wrap: wrap;
}
.pair-row:last-child { border-bottom: none; }
.pair-row .who { flex: 1; min-width: 150px; font-weight: 600; }
.pair-row .who small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--teal-light); color: var(--teal-dark); white-space: nowrap;
}
.chip.due { background: var(--amber-light); color: var(--amber); }
.chip.overdue { background: var(--red-light); color: var(--red); }
.mini-btn {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  min-height: var(--tap-min); padding: 6px 16px; font-family: inherit; font-size: 14px;
  font-weight: 600; color: var(--teal-dark); cursor: pointer;
}
.mini-btn:hover { background: var(--teal-light); border-color: var(--teal); }
.mini-btn.did { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }

/* ── prayer wall (U2) ── */
textarea {
  width: 100%; min-height: 74px; font-family: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--card);
  resize: vertical; margin-top: 12px;
}
textarea:focus { border-color: var(--teal); outline: none; }
.pray-item { padding: 13px 15px; background: var(--bg); border-radius: 11px; font-size: 15px; line-height: 1.55; margin-top: 10px; }
.pray-item .by { font-size: 13px; color: var(--ink-soft); margin-top: 7px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.family-line { text-align: center; margin-top: 34px; font-size: 12px; color: var(--ink-soft); }

/* ── nav tabs (U3) ── */
.tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab {
  flex: 1; min-height: var(--tap-min); padding: 12px 16px; border: 2px solid var(--line);
  border-radius: 14px; background: var(--card); font-family: inherit; font-size: 16px;
  font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.tab:hover { border-color: var(--teal); }
.tab.on { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

/* ── handbook (U3) ── */
.chapter {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  padding: 16px 4px; border: none; border-bottom: 1px solid var(--line);
  background: none; font-family: inherit; cursor: pointer; color: var(--ink);
}
.chapter:last-child { border-bottom: none; }
.chapter .num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--teal-light);
  color: var(--teal-dark); font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.chapter .meta { flex: 1; }
.chapter .ct { font-size: 16.5px; font-weight: 700; }
.chapter .cs { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.readchip {
  flex-shrink: 0; align-self: center; font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: var(--bg); border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.plainbox {
  background: var(--teal-light); border-radius: 12px; padding: 16px 18px; margin-top: 6px;
}
.plainbox .pl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-dark); }
.plainbox .pw { font-size: 16.5px; color: var(--ink); margin-top: 6px; line-height: 1.55; }
.hb-body { margin-top: 20px; font-size: 16px; line-height: 1.7; }
.hb-body h1 { font-size: 22px; margin: 22px 0 8px; }
.hb-body h2 { font-size: 18px; margin: 20px 0 7px; }
.hb-body h3 { font-size: 16px; margin: 16px 0 6px; }
.hb-body p { margin: 10px 0; }
.hb-body ul { margin: 10px 0 10px 20px; }
.hb-body li { margin: 4px 0; }
.hb-amends { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.hb-amends h2 { font-size: 15px; }
.amend { font-size: 14px; color: var(--ink-soft); padding: 7px 0; }
.amend b { color: var(--teal-dark); }

/* ── decisions (U4) ── */
.dec-week { font-size: 14px; color: var(--ink-soft); margin: 2px 0 4px; }
.meter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; margin: 12px 0 4px; }
.meter.ok { background: var(--teal-light); color: var(--teal-dark); }
.meter.warm { background: var(--amber-light); color: var(--amber); }
.meter.hot { background: var(--red-light); color: var(--red); }
.dec-card {
  display: block; width: 100%; text-align: left; padding: 15px 4px; border: none;
  border-bottom: 1px solid var(--line); background: none; font-family: inherit; cursor: pointer; color: var(--ink);
}
.dec-card:last-child { border-bottom: none; }
.dec-card .dt { font-size: 16.5px; font-weight: 700; }
.dec-card .da { font-size: 14px; color: var(--ink-soft); margin: 3px 0; }
.dec-card .drow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.state {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--bg); color: var(--ink-soft); white-space: nowrap;
}
.state.ready { background: var(--teal-light); color: var(--teal-dark); }
.state.talk-requested { background: var(--amber-light); color: var(--amber); }
.state.closed-no-quorum { background: var(--red-light); color: var(--red); }
.askbox { background: var(--teal-light); border-radius: 12px; padding: 16px 18px; margin-top: 12px; }
.askbox .pl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-dark); }
.askbox .pw { font-size: 16.5px; color: var(--ink); margin-top: 6px; line-height: 1.55; }
.dec-meta { font-size: 14px; color: var(--ink-soft); margin-top: 12px; }
.quorum { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 16px 0 4px; }
.voices { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.voice-btn {
  flex: 1; min-width: 130px; min-height: 60px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--card); font-family: inherit; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.voice-btn:hover { border-color: var(--teal); }
.voice-btn.picked { border-color: var(--teal-dark); background: var(--teal-light); color: var(--teal-dark); }
.layer { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.layer .pl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.layer .lv { font-size: 15.5px; margin-top: 5px; line-height: 1.55; }
.layer.locked { background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 8px, var(--card) 8px, var(--card) 16px); }

/* ── health pulse (U5) ── */
.hrow { display: flex; align-items: center; gap: 12px; padding: 9px 2px; flex-wrap: wrap; }
.hlabel { flex: 1; min-width: 150px; font-size: 15px; font-weight: 600; }
.hdots { display: inline-flex; gap: 8px; }
.hdot { width: 34px; height: 34px; min-width: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); cursor: pointer; padding: 0; }
.hdot.v1 { border-color: #d04545; } .hdot.v2 { border-color: #b7861f; } .hdot.v3 { border-color: var(--teal); }
.hdot.v1.on { background: #d04545; } .hdot.v2.on { background: #b7861f; } .hdot.v3.on { background: var(--teal); }
.hdot:hover { transform: scale(1.06); }
.hagg-title { font-size: 14px; font-weight: 700; color: var(--ink-soft); margin: 14px 0 6px; }
.trow { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: none; }
.tdot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.tdot.red { background: #d04545; } .tdot.amber { background: #b7861f; } .tdot.green { background: var(--teal); }
.tarrow { font-weight: 700; color: var(--ink-soft); min-width: 18px; }

/* ── advisory circle (U6, board-side) ── */
.scope-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; font-size: 15px; }
.scope-row input { width: 22px; height: 22px; }
.adv-link { word-break: break-all; font-size: 13.5px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin: 8px 0; }
.adv-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.adv-row:last-child { border-bottom: none; }
.adv-row .an { flex: 1; min-width: 140px; font-weight: 600; }
.adv-row .an small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); }
.adv-badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--teal-light); color: var(--teal-dark); }
.adv-badge.off { background: var(--red-light); color: var(--red); }
.hidden { display: none !important; }

/* ============================================================
   Visual-parity T2 — mockup shell: sidebar + topbar + screens.
   Ported from unison-church-mockup.html. Layout + shell only;
   screen-internal component skinning follows in later tasks.
   ============================================================ */
/* Full-height app shell (matches the WhiteBoard app): the page itself never
   scrolls — the nav and the main content each scroll inside their own region,
   so the sidebar footer is always visible without scrolling. */
body.signed-in { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.signed-in .a11y-bar { flex-shrink: 0; }
.shell { display: flex; }
body.signed-in .shell { flex: 1; min-height: 0; }
.sidebar {
  width: 236px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.sidebar-header { padding: 18px 16px 14px; border-bottom: 1px solid var(--line); }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0; margin: 0; }
.sidebar-user { font-size: 12px; color: var(--ink-soft); padding: 12px 2px 0; }
.sidebar-user strong { color: var(--ink); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; padding: 10px 8px; }
.nav button {
  display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 12px;
  border: none; background: none; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--ink-soft); text-align: left; width: 100%;
}
.nav button:hover { background: var(--bg); color: var(--ink); }
.nav button.active { background: var(--teal-light); color: var(--teal-dark); font-weight: 600; }
.nav button.active svg { stroke: var(--teal-dark); }
.nav svg { width: 19px; height: 19px; stroke: var(--ink-soft); flex-shrink: 0; }
.nav button:hover svg { stroke: var(--ink); }
.nav .waiting-pill {
  margin-left: auto; font-size: 11.5px; font-weight: 700; background: var(--teal-light);
  color: var(--teal-dark); border-radius: 999px; padding: 2px 9px;
}
.nav button.active .waiting-pill { background: var(--teal); color: #fff; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); line-height: 1.55; flex-shrink: 0; }
.sidebar-foot b { color: var(--teal-dark); }
.sidebar-foot .family-line { margin-top: 8px; font-size: 11px; color: var(--ink-soft); text-align: left; }

.main { flex: 1; min-width: 0; overflow-y: auto; padding: 26px 34px 48px; max-width: 1120px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-title h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; }
.page-title p { font-size: 14.5px; color: var(--ink-soft); margin-top: 3px; max-width: 620px; }

.screen { display: none; }
.screen.active { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2 > * { min-width: 0; }
.mt { margin-top: 16px; }
.readtime { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.voice-note { text-align: center; padding: 22px 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.voice-note b { color: var(--teal-dark); display: block; font-size: 16.5px; margin-bottom: 4px; }
.btn.ghost { background: none; border: 1.5px solid var(--line); color: var(--teal-dark); }
.btn.ghost:hover { border-color: var(--teal); background: var(--teal-light); }

/* pre-auth: no chrome, just the centered card */
body:not(.signed-in) .sidebar,
body:not(.signed-in) .topbar,
body:not(.signed-in) #bottombar { display: none; }
body:not(.signed-in) .main { max-width: 560px; margin: 0 auto; }

/* ---- mobile bottom bar ---- */
#bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
}
#bottombar button {
  border: none; background: none; font-family: inherit; cursor: pointer; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--ink-soft); border-radius: 10px;
}
#bottombar button.active { color: var(--teal-dark); }
#bottombar svg { width: 21px; height: 21px; stroke: currentColor; }

@media (max-width: 940px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 18px 16px 84px; }
  body.signed-in #bottombar { display: grid; }
}

/* ============================================================
   Visual-parity T3 — Today + Decisions components (from mockup)
   ============================================================ */
.card h2 { display: flex; align-items: center; gap: 9px; }
.card h2 svg { width: 19px; height: 19px; stroke: var(--teal); flex-shrink: 0; }

/* ---- Today: waiting-on-you + time respect ---- */
.wait-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 1.5px solid var(--line);
  border-radius: 12px; margin-top: 10px; background: var(--card); flex-wrap: wrap;
}
.wait-item .ic {
  width: 40px; height: 40px; border-radius: 11px; background: var(--teal-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wait-item .ic svg { width: 19px; height: 19px; stroke: var(--teal-dark); }
.wait-item .tx { flex: 1; min-width: 160px; }
.wait-item .tx b { font-size: 15.5px; font-weight: 600; display: block; }
.wait-item .tx span { font-size: 13px; color: var(--ink-soft); }
.time-respect {
  margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--ink-soft);
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px;
}
.time-respect b { color: var(--teal-dark); }

/* ---- Decisions: brief anatomy ---- */
.brief-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.brief-head h1, .brief-head h3 { font-size: 20px; font-weight: 700; flex: 1; min-width: 200px; letter-spacing: -0.3px; }
.plain-box { background: var(--teal-light); border-radius: 12px; padding: 14px 16px; margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--ink); }
.plain-box .pl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-dark); margin-bottom: 4px; }
.discern { margin-top: 14px; padding: 12px 15px; border-left: 3px solid var(--teal); background: var(--teal-light); border-radius: 0 10px 10px 0; font-size: 14px; line-height: 1.55; }
.discern .pl { font-weight: 700; color: var(--teal-dark); }
.voices { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.voice-btn {
  flex: 1; min-width: 150px; min-height: 58px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--card); font-family: inherit; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px;
}
.voice-btn small { font-weight: 500; font-size: 12px; color: var(--ink-soft); }
.voice-btn:hover { border-color: var(--teal); }
.voice-btn.picked { border-color: var(--teal-dark); background: var(--teal-light); }
.voice-btn.picked small { color: var(--teal-dark); }
.quorum { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; background: var(--bg); border-radius: 12px; font-size: 13.5px; flex-wrap: wrap; }
.quorum .qbar { flex: 1; min-width: 120px; height: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.quorum .qfill { height: 100%; background: linear-gradient(90deg, var(--teal-bright), var(--teal-dark)); border-radius: 99px; }
.layer { border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; overflow: hidden; }
.layer-head { display: flex; align-items: center; gap: 9px; padding: 10px 15px; background: var(--bg); font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-soft); }
.layer-body { padding: 14px 16px; font-size: 14.5px; line-height: 1.6; }
.layer.board .layer-head { background: var(--teal-light); color: var(--teal-dark); }
.layer.locked .layer-body { color: var(--ink-soft); font-style: italic; background: repeating-linear-gradient(-45deg, #fafaf7, #fafaf7 8px, #f4f3ee 8px, #f4f3ee 16px); }
.chip.amber { background: var(--amber-light); color: var(--amber); }
.chip.ghost { background: var(--bg); color: var(--ink-soft); }

/* ============================================================
   Top-right chrome — search · app-switcher · profile (uniform
   with the platform), + the ⌘K search palette.
   ============================================================ */
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tr-search {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
}
.tr-search:hover { border-color: var(--teal); }
.tr-search svg { width: 16px; height: 16px; stroke: var(--ink-soft); }
.tr-search kbd { font-family: inherit; font-size: 11px; font-weight: 700; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink-soft); }
.tr-icon {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 11px; cursor: pointer;
}
.tr-icon:hover { border-color: var(--teal); background: var(--teal-light); }
.tr-icon svg { width: 19px; height: 19px; stroke: var(--ink-soft); }
.tr-icon:hover svg { stroke: var(--teal-dark); }
.tr-avatar {
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-dark)); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700;
}
.appsw-wrap, .avatar-wrap { position: relative; }
.appsw-menu, .avatar-menu {
  position: absolute; top: 48px; right: 0; z-index: 50; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgba(34,48,42,.16);
  padding: 8px; min-width: 260px;
}
.appsw-tile {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px;
  border: none; background: none; border-radius: 11px; cursor: pointer; font-family: inherit; color: var(--ink); text-decoration: none;
}
.appsw-tile:hover { background: var(--bg); }
.appsw-tile.current { background: var(--teal-light); }
.appsw-tile .aic { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px; }
.appsw-tile .anm { flex: 1; }
.appsw-tile .anm b { font-size: 14.5px; font-weight: 700; }
.appsw-tile .anm b span { font-weight: 700; }
.appsw-tile .anm small { display: block; font-size: 12px; color: var(--ink-soft); }
.appsw-chip { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); background: var(--bg); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.avatar-name { font-weight: 700; font-size: 14.5px; padding: 8px 10px 0; }
.avatar-email { font-size: 12.5px; color: var(--ink-soft); padding: 0 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.avatar-item { display: flex; width: 100%; text-align: left; padding: 10px 10px; border: none; background: none; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); }
.avatar-item:hover { background: var(--bg); }

.gs-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(34,48,42,.28); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.gs-box { width: 100%; max-width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(34,48,42,.28); overflow: hidden; }
.gs-head { display: flex; align-items: center; gap: 12px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.gs-head svg { width: 19px; height: 19px; stroke: var(--ink-soft); flex-shrink: 0; }
.gs-input, input#gs-input { flex: 1; border: none !important; background: none; font-family: inherit; font-size: 17px; min-height: 52px; color: var(--ink); outline: none; padding: 0; }
.gs-results { max-height: 46vh; overflow-y: auto; padding: 6px; }
.gs-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 11px 12px; border: none; background: none; border-radius: 10px; cursor: pointer; font-family: inherit; color: var(--ink); }
.gs-item:hover, .gs-item.sel { background: var(--teal-light); }
.gs-item .gk { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--teal-dark); min-width: 66px; }
.gs-item .gt { flex: 1; font-size: 14.5px; font-weight: 600; }
.gs-item .gt small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); }
.gs-hint { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }
@media (max-width: 940px) { .tr-search span, .tr-search kbd { display: none; } .topbar-right { gap: 8px; } }

/* Handbook chapter footnote (Beltway §6 — bylaw refs / small print) */
.hb-footnote { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; font-style: italic; color: var(--ink-soft); line-height: 1.55; }

/* Handbook escalation ladder (Beltway §2) */
.hb-escalation { margin-top: 18px; padding: 14px 16px; background: var(--teal-light); border-radius: 12px; }
.hb-escalation .pl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-dark); margin-bottom: 8px; }
.hb-escalation ol { margin: 0; padding-left: 22px; }
.hb-escalation li { font-size: 15px; line-height: 1.5; margin: 5px 0; }

/* ============================================================
   Visual-parity T3/T4 — Care · Health · Circle · Handbook skins
   ============================================================ */
/* ---- avatars (Care) ---- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--teal-dark); color: #fff;
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); flex-shrink: 0;
}
.avatar.soft { background: var(--teal-bright); }
.pair-row .avatar { margin-right: 2px; }

/* ---- Health dim-cards ---- */
.dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.dim-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.dim-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dim-head h4 { font-size: 13.5px; font-weight: 700; }
.dim-delta { font-size: 12.5px; font-weight: 700; }
.dim-delta.up { color: var(--teal-dark); } .dim-delta.down { color: var(--red); } .dim-delta.flat { color: var(--ink-soft); }
.dim-foot { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.dim-foot .sdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dim-foot .sdot.green { background: var(--teal); } .dim-foot .sdot.amber { background: #b7861f; } .dim-foot .sdot.red { background: #d04545; }

/* ---- Circle advisor cards + timeline ---- */
.adv-card2 { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 12px; }
.adv-card2 .h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adv-card2 h3 { font-size: 15.5px; font-weight: 700; flex: 1; min-width: 120px; }
.adv-card2 .role { font-size: 13px; color: var(--ink-soft); margin: 2px 0 10px; }
.scope-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-item { display: flex; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tl-item:last-child { border-bottom: none; }
.tl-date { min-width: 64px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; padding-top: 2px; }
.tl-item .what b { font-weight: 600; }
.tl-item .what p { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }

/* ---- Handbook two-column (desktop) / swap (mobile) ---- */
.hb-grid.hidden { display: none; }
.hb-reader-ph { text-align: center; color: var(--ink-soft); }
@media (min-width: 900px) {
  .hb-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
  #hb-back { display: none; }
}
@media (max-width: 899px) {
  #screen-handbook:not(.reading) #hb-reader-view { display: none; }
  #screen-handbook.reading #hb-list-view { display: none; }
}

/* Health — detected comment themes (nightly clustering, UD-6 comments-only) */
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.theme-row:last-child { border-bottom: none; }
.theme-row .tsum { font-size: 14.5px; font-weight: 600; }
