/* Chic — Poise v6 (DESIGN.md is the source of truth; boards: hot-path /
   onboarding / topic-ask / utility-cluster / overlays, finalized 2026-07-11).
   Tokens + shared chrome are the merged, deduped union of the five finalized
   design files. Verdict tier styling is regulatory-voiced: user's colors, never
   alarm-red, "Chic" appears only on the pass tier (D33). */

:root {
  --milk: #F7F5F1; --surface: #FFFFFF; --line: #E9E4DC; --ink: #201E1A; --stone: #837C71;
  --euc: #4E7561; --euc-soft: #E7EFEA; --camel: #B99A63; --camel-soft: #F4EDDF;
  --rose: #A96D66; --rose-soft: #F3E7E5; --mist: #A8A198; --mist-soft: #ECEAE6;
  --euc-text: #3F604F; --camel-text: #7E6536; --rose-text: #8D5049; --stone-text: #6E675D;
  --scan-bg: #241F19; --vf-bg: #2A2723;
  --scrim: rgba(32, 30, 26, .18);
  --toast-link: #CFE3D8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --milk: #171511; --surface: #1F1C17; --line: #2E2A23; --ink: #F0EBE3; --stone: #9A9184;
    --euc: #7FA98F; --euc-soft: #22352B; --camel: #C7A96F; --camel-soft: #3A3121;
    --rose: #C08A82; --rose-soft: #3A2724; --mist: #857D72; --mist-soft: #26221C;
    --euc-text: #7FA98F; --camel-text: #C7A96F; --rose-text: #C08A82; --stone-text: #9A9184;
    --scan-bg: #12100D; --vf-bg: #12100D;
    --scrim: rgba(0, 0, 0, .45);
    --toast-link: #3F604F;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* guard: attribute must beat author display rules */
html, body { height: 100%; }
body {
  background: var(--milk); color: var(--ink);
  font-family: "Satoshi", system-ui, sans-serif; font-weight: 400;
  font-size: 15px; line-height: 1.6;
}
body.scanning { background: var(--scan-bg); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--euc-text); }
:focus-visible { outline: 2px solid var(--euc); outline-offset: 2px; border-radius: 6px; }

.view {
  max-width: 430px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column; position: relative; background: var(--milk);
}
@media (min-width: 768px) { .view { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
body.scanning .view { background: var(--scan-bg); border-color: transparent; }

.screen { display: flex; flex-direction: column; flex: 1; padding: 14px 22px 22px; min-height: 100dvh; }
@media (prefers-reduced-motion: no-preference) {
  .screen > * { animation: settle .25s ease-out; }
  @keyframes settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---------- shared chrome ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.back { color: var(--stone); font-size: 22px; line-height: 1; padding: 8px 12px 8px 0; min-width: 44px; text-align: left; }
.menu { color: var(--ink); font-size: 19px; letter-spacing: 2px; padding: 8px 0 8px 12px; min-width: 44px; text-align: right; }
.spacer { flex: 1; min-height: 16px; }
.tophdr { display: flex; align-items: center; gap: 2px; min-height: 44px; }
.scrtitle { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 26px; line-height: 1.2; }
.prodline { color: var(--stone); font-size: 12px; margin-top: 2px; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- home ---------- */
.curious { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 27px; margin: 6px 0 14px; }
.curious .k { color: var(--euc); }
.viewfinder {
  position: relative; background: var(--vf-bg); border-radius: 18px;
  height: min(54vh, 460px); overflow: hidden; width: 100%; display: block;
  animation: breathe 4.5s ease-in-out infinite;
}
/* Breathe only when idle/blocked — a live stream must not scale-pulse (D12 amended). */
.viewfinder.live { animation: none; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012); } }
.viewfinder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(247, 245, 241, .9); z-index: 2; }
.c1 { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 7px 0 0 0; }
.c2 { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 7px 0 0; }
.c3 { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 7px; }
.c4 { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 7px 0; }
/* In-viewfinder framing guide — SAME fractions as loop.roiFromCover's GUIDE, so
   what the ticks bracket is exactly what's decoded. Milk ticks; a decode flashes
   them eucalyptus (never rose/red — a hit is good news). */
.guide { position: absolute; left: 15%; top: 33%; width: 70%; height: 34%; z-index: 2; pointer-events: none; }
.guide i { position: absolute; width: 16px; height: 16px; border: 2px solid rgba(247, 245, 241, .7); transition: border-color .24s ease-out; }
.guide i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 5px 0 0 0; }
.guide i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 5px 0 0; }
.guide i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 5px; }
.guide i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 5px 0; }
.guide.hit i { border-color: var(--euc); }
/* Live focus: ticks hold eucalyptus while the framed label is sharp enough to
   read (same metric as the capture gate) — the calm "you've got it" cue. */
.guide.sharp i { border-color: var(--euc); }
/* Discrete shutter (A4-R): tap = photograph. Eucalyptus emphasis in photo mode. */
.shutter {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 64px; height: 64px; border-radius: 999px; background: var(--milk);
  border: 3px solid rgba(247, 245, 241, .55); box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.shutter.emph { border-color: var(--euc); box-shadow: 0 0 0 3px var(--euc-soft), 0 2px 10px rgba(0, 0, 0, .25); }
.torch {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px;
  border-radius: 999px; background: rgba(32, 30, 26, .45); color: rgba(247, 245, 241, .95); font-size: 18px;
}
.torch.on { background: var(--euc); color: var(--milk); }
.misscta { display: flex; justify-content: center; margin-top: 8px; }
.vf-zoom {
  position: absolute; left: 50px; right: 50px; bottom: 86px; z-index: 2;
  height: 22px; accent-color: var(--euc); opacity: .8;
}
.hint { color: var(--stone); font-size: 12.5px; text-align: center; margin-top: 10px; min-height: 20px; }
.askfield {
  display: flex; align-items: center; width: 100%; border: 1px solid var(--line);
  border-radius: 999px; padding: 13px 18px; margin-top: 14px; background: var(--surface);
}
.askfield input { border: 0; outline: none; background: transparent; width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); }
.askfield input::placeholder { color: var(--mist); }
.credo {
  font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 17px; line-height: 1.5;
  color: var(--stone); text-align: center; margin-top: 18px; opacity: 0; transition: opacity .25s ease-out;
}
.credo.show { opacity: 1; }
.utilrow { display: flex; justify-content: center; gap: 18px; margin-top: 10px; }
.utilrow button { color: var(--stone); font-size: 12px; min-height: 44px; padding: 8px 4px; }
.mockrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.mockrow button {
  font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; color: var(--stone); background: var(--surface);
}

/* S-2 gratitude · S-3 error — cards under the field, no alarm styling */
.gratitude, .errcard {
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  padding: 20px 18px; margin-top: 14px; text-align: center;
}
.gratitude .gh { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 20px; line-height: 1.35; }
.gratitude .gb { color: var(--stone-text); font-size: 12.5px; line-height: 1.6; margin-top: 8px; }
.gratitude .gask { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 16px; color: var(--ink); margin-top: 10px; }
.errcard .eh { font-size: 13.5px; font-weight: 500; }
.errcard .eb { color: var(--stone); font-size: 12.5px; margin-top: 6px; line-height: 1.55; }
.ghostpill {
  display: inline-block; margin-top: 12px; border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 26px; font-size: 12.5px; font-weight: 500; color: var(--ink); min-height: 44px;
}
@media (prefers-reduced-motion: no-preference) {
  .settle-in { animation: settle .25s ease-out; }
}

/* ---------- scanning (the blink) ---------- */
.screen.scanning { background: var(--scan-bg); align-items: center; justify-content: center; }
.closedeyes { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; }
.progresstxt { color: #C7BFB2; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; margin-top: 26px; }
.progressstage { color: #857D72; font-size: 12.5px; margin-top: 8px; min-height: 20px; opacity: 0; transition: opacity .25s ease-out; }
.progressstage.show { opacity: 1; }

/* ---------- verdict shared ---------- */
.hero { border-radius: 22px; padding: 22px 20px; text-align: center; margin-top: 6px; }
.hero .catch { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 38px; line-height: 1.15; }
.hero .prof { color: var(--stone); font-size: 13.5px; margin-top: 7px; line-height: 1.5; }
.hero .prof b { color: var(--ink); font-weight: 500; }
.hero.pass { background: var(--euc-soft); } .hero.pass .catch { color: var(--euc); }
.hero.call { background: var(--camel-soft); } .hero.call .catch { color: var(--camel); }
.hero.fail { background: var(--rose-soft); } .hero.fail .catch { color: var(--rose); }
.profbtn { padding: 12px 6px; margin: -12px -6px; min-height: 44px; }
.grp {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  color: var(--stone); font-size: 13px; padding: 12px 2px; border-bottom: 1px solid var(--line);
  min-height: 44px; text-align: left;
}
.grp .gv { color: var(--stone); }
.grp[aria-expanded="true"] { color: var(--ink); }
.grpbody { padding: 8px 2px 12px; border-bottom: 1px solid var(--line); display: none; }
.grpbody.open { display: block; }
.fitcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.fitchip { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; color: var(--stone); }
.unkrow { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.unkrow .u { font-size: 13.5px; color: var(--stone); }
.badge {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone-text);
  font-weight: 500; background: var(--mist-soft); border-radius: 999px; padding: 4px 9px;
}
.note { color: var(--mist); font-size: 12.5px; line-height: 1.55; margin-top: 8px; }
.prefnudge {
  border: 1px solid var(--camel); background: var(--camel-soft); border-radius: 14px;
  padding: 12px; font-size: 12px; color: var(--camel-text); margin-top: 12px; text-align: center; width: 100%;
}
.prefnudge b { font-weight: 500; }

/* constellation strip (D32) */
.strip { position: relative; height: 86px; margin-top: 16px; }
.strip svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.node {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 11.5px;
  white-space: nowrap; color: var(--ink); max-width: 60%; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none;
}
.node.hot { background: var(--euc-soft); border-color: var(--euc); color: var(--euc-text); }
@media (prefers-reduced-motion: no-preference) {
  .node { animation: drift 7s ease-in-out infinite; }
  .node:nth-child(3) { animation-delay: -2.4s; }
  .node:nth-child(4) { animation-delay: -4.8s; }
  @keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -3px); } }
}

/* your call — guided bar drawing (D34) */
.sechead { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--stone-text); font-weight: 500; margin-top: 18px; }
.item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.item .row1 { display: flex; justify-content: space-between; align-items: center; }
.item .ing { font-size: 14.5px; font-weight: 500; }
.item .cat { color: var(--mist); font-size: 11.5px; letter-spacing: .06em; margin-left: 8px; font-weight: 400; }
.item .why { color: var(--stone); font-size: 13px; line-height: 1.55; margin-top: 4px; }
.item .why a { color: var(--euc-text); text-decoration: none; font-weight: 500; }
.rulechips { display: flex; gap: 6px; justify-content: center; margin-top: 11px; }
.rc { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 12px; font-weight: 500; color: var(--stone); min-height: 36px; }
.rc[aria-checked="true"].v-never { color: var(--rose-text); border-color: var(--rose-soft); background: var(--rose-soft); }
.rc[aria-checked="true"].v-caution { color: var(--camel-text); border-color: var(--camel-soft); background: var(--camel-soft); }
.rc[aria-checked="true"].v-fine { color: var(--euc-text); border-color: var(--euc-soft); background: var(--euc-soft); }
.fulllabel {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 13px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 14px; min-height: 44px;
}
.fulllabel .u { font-size: 13.5px; color: var(--stone); }
.cta {
  display: block; width: 100%; margin-top: 16px; background: var(--euc); color: #fff;
  border-radius: 999px; padding: 14px; font-size: 14px; font-weight: 500; text-align: center; min-height: 48px;
}
@media (prefers-color-scheme: dark) { .cta { color: #12100D; } }
.cta.ink { background: var(--ink); color: var(--milk); }
.cta.toast { box-shadow: 0 6px 20px rgba(32, 30, 26, .18); }
@media (prefers-reduced-motion: no-preference) {
  .cta.toast-in { animation: settleUp .25s ease-out; }
  @keyframes settleUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
.ghost {
  display: block; width: 100%; margin-top: 10px; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 13px; font-size: 13.5px;
  font-weight: 500; text-align: center; min-height: 48px;
}
.regline { color: var(--mist); font-size: 11.5px; text-align: center; margin-top: 14px; line-height: 1.55; }

/* below your bar */
.failrows { margin-top: 14px; }
.failrows .gt { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--stone-text); font-weight: 500; padding-bottom: 4px; }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; border-radius: 999px; padding: 6px 11px; min-height: 44px; }
.state.never { color: var(--rose-text); background: var(--rose-soft); }
.state.caution { color: var(--camel-text); background: var(--camel-soft); }
.frow .why { color: var(--stone); font-size: 12.5px; margin-top: 4px; }

/* sticky scan another (D38) */
.sticky { position: sticky; bottom: 0; margin-top: auto; padding: 18px 0 8px; background: linear-gradient(transparent, var(--milk) 40%); }

/* ---------- onboarding: Two Blinks (D31) ---------- */
.steps { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 26px; }
.steps.intop { margin: 0; }
.stepn { width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 500; }
.stepn.done { background: var(--euc); color: var(--milk); }
.stepn.todo { border: 1px solid var(--line); color: var(--mist); background: var(--surface); }
.stepn.cur { border: 1px solid var(--euc); color: var(--euc-text); background: var(--euc-soft); }
.dotline { width: 56px; border-top: 1px dotted var(--mist); }
.center { text-align: center; }
.catmark { margin-top: 4px; }
.tagline { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 22px; color: var(--ink); margin-top: 14px; text-align: center; }
.tagline .healed { color: var(--euc); }
.motto { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 23px; line-height: 1.45; text-align: center; margin-top: 36px; }
.motto .quiet { color: var(--stone); }
.edu { text-align: center; color: var(--stone); font-size: 14.5px; line-height: 1.65; margin-top: 14px; padding: 0 10px; }
.edu b { color: var(--euc-text); font-weight: 500; }
.hello {
  font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: clamp(32px, 10.5vw, 40px);
  line-height: 1.25; text-align: center; margin-top: 40px; cursor: text; overflow-wrap: anywhere;
}
.namefield { display: inline; outline: none; min-width: 2px; color: var(--ink); }
.caret { display: inline-block; width: 2px; height: .85em; background: var(--euc); vertical-align: -2px; margin-left: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .caret { animation: caretblink 1.1s steps(1) infinite; }
  @keyframes caretblink { 50% { opacity: 0; } }
}
.ghostname { color: var(--mist); }
.skip { display: block; width: 100%; text-align: center; margin-top: 6px; color: var(--stone); font-size: 14px; min-height: 44px; padding: 12px; }
.h2q { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 36px; line-height: 1.25; margin-top: 2px; }
.whorow {
  display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 22px;
  padding: 18px 20px; margin-top: 14px; min-height: 44px; background: var(--surface); cursor: pointer;
}
.whorow[aria-checked="true"] { border-color: var(--euc); background: var(--euc-soft); }
.whorow .t { font-size: 16.5px; font-weight: 500; }
.whorow[aria-checked="true"] .t { color: var(--euc-text); }
.whorow .d { display: block; color: var(--stone); font-size: 13.5px; margin-top: 3px; line-height: 1.5; }
.childfield {
  display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--euc-soft);
  font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 20px; color: var(--ink); cursor: text;
}
.whorow[aria-checked="true"] .childfield { display: block; border-top-color: color-mix(in srgb, var(--euc) 25%, transparent); }
.nudge { background: var(--euc-soft); border-radius: 22px; padding: 22px; margin-top: 26px; text-align: center; }
.nudge .eyes { margin-bottom: 10px; }
.nudge .nl { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 20px; line-height: 1.45; color: var(--ink); }
.nudge .nl .foryou { color: var(--euc-text); }
.nudge .nb { font-size: 13.5px; line-height: 1.6; color: var(--stone); margin-top: 8px; }

/* ---------- menu drawer (M-C, D56) ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; visibility: hidden; transition: visibility 0s linear .25s; }
.overlay.open { visibility: visible; transition-delay: 0s; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .25s ease-out; border: 0; border-radius: 0; cursor: default; }
.overlay.open .scrim { opacity: 1; }
.drawer {
  position: absolute; top: 0; bottom: 0; left: max(0px, calc(50vw - 215px)); width: min(327px, 78vw);
  background: var(--surface); border-right: 1px solid var(--line); padding: 24px 20px;
  box-shadow: 6px 0 24px rgba(32, 30, 26, .10); transform: translateX(-110%);
  transition: transform .25s ease-out; display: flex; flex-direction: column;
}
.overlay.open .drawer { transform: none; }
.drawer .dh { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 21px; margin-bottom: 10px; }
.mrow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 14px 0;
  border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 500; text-align: left;
}
.mrow:last-of-type { border-bottom: 0; }
.mrow svg { flex: none; color: var(--stone); }
.mrow .meta { margin-left: auto; color: var(--stone); font-size: 11.5px; font-weight: 400; }

/* ---------- preferences (P-B2, D54/D55) ---------- */
.switch { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 8px; min-height: 44px; text-align: left; }
.switch .for { color: var(--stone); font-size: 12.5px; }
.switch .name { font-size: 14px; font-weight: 500; }
.switch .chev { color: var(--stone); font-size: 11px; }
.search {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 14px; margin: 0 0 6px; background: var(--surface); min-height: 44px;
}
.search svg { flex: none; color: var(--mist); }
.search input { border: 0; outline: none; background: transparent; width: 100%; font: inherit; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: var(--mist); }
.group { border-bottom: 1px solid var(--line); padding: 5px 0; }
.ghead { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; padding: 8px 0; text-align: left; }
.ghead .gt { font-size: 14px; font-weight: 500; }
.ghead .gmeta { color: var(--stone); font-size: 12px; font-weight: 400; }
.ghead .chev { color: var(--stone); font-size: 12px; margin-left: 8px; }
.inner { margin-top: 2px; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.prow:last-of-type { border-bottom: 0; }
.ingbtn { font-size: 13.5px; font-weight: 500; padding: 12px 8px 12px 0; min-height: 44px; text-align: left; }
.ingbtn .go { color: var(--mist); font-size: 11px; margin-left: 4px; }
.ingname { font-size: 13.5px; font-weight: 500; padding: 12px 8px 12px 0; }
.chips { display: flex; gap: 6px; }
.chip {
  position: relative; font-size: 11px; letter-spacing: .04em; border: 1px solid var(--line);
  color: var(--stone); border-radius: 999px; padding: 7px 12px; background: transparent;
  min-height: 32px; font-weight: 400;
}
.chip::after { content: ""; position: absolute; left: -3px; right: -3px; top: -6px; bottom: -6px; }
.chip[aria-checked="true"].nv { background: var(--rose-soft); border-color: var(--rose-soft); color: var(--rose-text); font-weight: 500; }
.chip[aria-checked="true"].ca { background: var(--camel-soft); border-color: var(--camel-soft); color: var(--camel-text); font-weight: 500; }
.chip[aria-checked="true"].fi { background: var(--euc-soft); border-color: var(--euc-soft); color: var(--euc-text); font-weight: 500; }
.learn { display: block; padding: 11px 0; font-size: 12.5px; color: var(--euc-text); font-weight: 500; min-height: 44px; text-align: left; }
.emailrow { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.emailrow .txt { color: var(--stone); font-size: 12px; line-height: 1.5; max-width: 200px; }
.emailrow .save { color: var(--ink); font-size: 12.5px; font-weight: 500; white-space: nowrap; min-height: 44px; padding: 8px 0; }
.scanline { margin-top: auto; padding-top: 16px; text-align: center; color: var(--stone); font-size: 12.5px; }
.scanline button { color: var(--ink); font-weight: 500; min-height: 44px; padding: 8px 4px; }
.noresults { color: var(--mist); font-size: 12.5px; padding: 16px 0; text-align: center; }

/* ---------- history (H-B, D57) ---------- */
.filters { display: flex; gap: 6px; margin: 6px 0 4px; flex-wrap: wrap; }
.f { position: relative; font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--stone); min-height: 34px; font-weight: 400; }
.f::after { content: ""; position: absolute; left: -2px; right: -2px; top: -5px; bottom: -5px; }
.f[aria-checked="true"] { border-color: var(--ink); color: var(--ink); font-weight: 500; }
.f.fe { color: var(--euc-text); } .f.fc { color: var(--camel-text); } .f.fr { color: var(--rose-text); }
.f.fe[aria-checked="true"] { border-color: var(--euc-text); }
.f.fc[aria-checked="true"] { border-color: var(--camel-text); }
.f.fr[aria-checked="true"] { border-color: var(--rose-text); }
.daterow { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; color: var(--stone-text); margin: 16px 0 2px; }
.hrow { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; }
.hdot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.hdot.e { background: var(--euc); } .hdot.c { background: var(--camel); } .hdot.r { background: var(--rose); }
.hname { font-size: 13.5px; font-weight: 500; flex: 1; }
.htime { color: var(--stone); font-size: 11.5px; }
.hempty { color: var(--mist); font-size: 12.5px; padding: 20px 0; text-align: center; }

/* ---------- topic fact card (T-B, D58) ---------- */
.factwrap { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 0 6px; }
.kicker { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; color: var(--stone-text); margin-bottom: 12px; }
.fact { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 32px; line-height: 1.3; }
.fact .em { color: var(--euc-text); }
.factsub { color: var(--stone); font-size: 14px; line-height: 1.65; margin-top: 16px; white-space: pre-wrap; text-align: left; }

/* topics ledger (Learn) */
.trow { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 13px 2px; border-bottom: 1px solid var(--line); min-height: 48px; font-size: 14px; text-align: left; font-weight: 500; }
.trow .go { color: var(--mist); font-size: 12px; }

/* ---------- answer page (A-B, D59) ---------- */
.qhead { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 27px; line-height: 1.25; margin-top: 6px; overflow-wrap: anywhere; }
.abody { font-size: 14.5px; line-height: 1.6; color: var(--ink); margin-top: 10px; }
.rule-echo {
  display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); margin-top: 16px; font-size: 13px; color: var(--stone);
  min-height: 48px; gap: 8px;
}
.rule-echo .re-t { padding: 6px 0; }
.rule-echo b { font-weight: 500; }
.rule-echo b.v-nv { color: var(--rose-text); }
.rule-echo b.v-ca { color: var(--camel-text); }
.rule-echo b.v-fi { color: var(--euc-text); }
.tunebtn { display: inline-flex; align-items: center; gap: 5px; color: var(--stone); font-size: 12px; min-height: 44px; min-width: 44px; justify-content: flex-end; padding: 0 2px 0 10px; flex: none; }
.learnrow { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 13px 2px; border-bottom: 1px solid var(--line); min-height: 44px; color: var(--euc-text); font-size: 13.5px; font-weight: 500; text-align: left; }
.askanother { margin-top: auto; }

/* ---------- bottom sheets (D60–D63) ---------- */
.sheetlayer { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheetlayer .scrim { opacity: 1; }
.sheet {
  position: relative; width: 100%; max-width: 430px; max-height: 84dvh; overflow-y: auto;
  background: var(--surface); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line);
  padding: 0 22px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 24px rgba(32, 30, 26, .10);
}
.grab { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; }
.grab span { width: 36px; height: 4px; border-radius: 999px; background: var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .sheetlayer .sheet { animation: sheetup .28s ease-out; }
  .sheetlayer .scrim { animation: scrimin .28s ease-out; }
  @keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes scrimin { from { opacity: 0; } to { opacity: 1; } }
}

/* tune sheet (U-B, D60/D43) */
.tkicker { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; color: var(--stone-text); }
.tname { font-family: "Zodiak", Georgia, serif; font-weight: 300; font-size: 23px; margin: 4px 0 2px; }
.tfact { color: var(--stone); font-size: 12.5px; line-height: 1.55; margin-top: 4px; }
.sheet .chips { display: flex; gap: 6px; justify-content: center; margin: 16px 0 4px; }
.sheet .chip { font-size: 12px; padding: 8px 18px; min-height: 44px; }
.waschip { color: var(--mist); font-size: 11px; text-align: center; margin-bottom: 8px; }
.errline { text-align: center; color: var(--rose-text); font-size: 12.5px; font-weight: 500; margin-top: 10px; }
.sheet .learn { text-align: center; margin: 8px 0 4px; padding: 12px 0; }
.sheet .cta { margin-top: 12px; background: var(--ink); color: var(--milk); font-size: 13.5px; padding: 13px; }

/* profile sheet (R-B, D61/D45) */
.whocard { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 18px; padding: 13px 15px; margin-top: 10px; min-height: 44px; }
.whocard.on { border-color: var(--euc); background: var(--euc-soft); }
.whocard .t2 { font-size: 14px; font-weight: 500; display: flex; justify-content: space-between; }
.whocard.on .t2 { color: var(--euc-text); }
.whocard .d2 { color: var(--stone); font-size: 12px; margin-top: 2px; font-weight: 400; }
.whocard.add .t2 { color: var(--stone); }

/* full-label sheet (F-A, D63) */
.lblmeta { color: var(--stone); font-size: 12px; margin: 2px 0 12px; }
.cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.lchip { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; color: var(--ink); }
.lchip.nv { background: var(--rose-soft); border-color: var(--rose-soft); color: var(--rose-text); font-weight: 500; }
.lchip.ca { background: var(--camel-soft); border-color: var(--camel-soft); color: var(--camel-text); font-weight: 500; }
.lchip.fi { background: var(--euc-soft); border-color: var(--euc-soft); color: var(--euc-text); font-weight: 500; }
.lchip.uk { background: var(--mist-soft); border-color: var(--mist-soft); color: var(--stone-text); }
.noread { color: var(--mist); font-size: 11.5px; margin-top: 10px; }

/* ---------- email code (E-A, D62/X-2) ---------- */
.emailecho { color: var(--stone); font-size: 13px; margin-top: 10px; }
.emailecho b { color: var(--ink); font-weight: 500; }
.emailintro { color: var(--stone); font-size: 13.5px; line-height: 1.6; margin-top: 10px; }
.emailfield {
  display: flex; align-items: center; width: 100%; border: 1px solid var(--line);
  border-radius: 999px; padding: 13px 18px; margin-top: 16px; background: var(--surface);
}
.emailfield input { border: 0; outline: none; background: transparent; width: 100%; font: inherit; font-size: 14px; color: var(--ink); }
.emailfield input::placeholder { color: var(--mist); }
.codewrap { position: relative; margin: 26px 0 6px; }
.codeinput { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; }
.codeboxes { display: flex; gap: 8px; justify-content: center; }
.cb {
  width: 40px; height: 48px; border: 1px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 500; background: var(--surface);
}
.cb.fill { border-color: var(--ink); }
.cb.err { border-color: var(--rose); }
.codewrap:focus-within .cb.next { border-color: var(--stone); }
.resend { text-align: center; color: var(--stone); font-size: 12.5px; margin-top: 12px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.resend b { color: var(--ink); font-weight: 500; }
.resendbtn { color: var(--ink); font-size: 12.5px; font-weight: 500; padding: 12px 16px; min-height: 44px; }
.codeerr { text-align: center; color: var(--rose-text); font-size: 12.5px; font-weight: 500; margin-top: 12px; line-height: 1.5; }
.safe { text-align: center; color: var(--euc-text); font-size: 13px; font-weight: 500; margin-top: 14px; }
.devcode { text-align: center; color: var(--stone); font-size: 12px; margin-top: 10px; }
.smallact { display: block; margin: 18px auto 0; color: var(--stone); font-size: 12px; min-height: 44px; padding: 12px; }

/* toast (X-3, D46) */
.toast {
  position: sticky; bottom: 16px; margin-top: auto; background: var(--ink); color: var(--milk);
  border-radius: 16px; padding: 13px 16px; font-size: 12.5px; line-height: 1.5;
  box-shadow: 0 6px 20px rgba(32, 30, 26, .25);
}
.toast .undo { color: var(--toast-link); font-weight: 500; white-space: nowrap; padding: 13px 8px; margin: -13px -8px; }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: settleUp .25s ease-out; }
}

/* ---------- a11y: reduced motion (D42/D44) ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .viewfinder, .node { animation: none; }
  .screen > *, .cta.toast-in, .toast, .settle-in, .sheetlayer .sheet, .sheetlayer .scrim { animation: none; }
  .credo, .progressstage, .overlay, .scrim, .drawer, .guide i { transition: none; }
}
