@charset "utf-8";
/* ==========================================================================
   translate.dog — core design system
   The calm field guide. Warm paper, editorial serif, semantic colour.
   Colour = meaning: sage calm · amber caution/arousal · stop danger only.
   System fonts only. No gradients. No webfonts. No external requests.
   ========================================================================== */

:root {
  /* Warm-light surfaces â€” one committed theme, no dark auto-switch */
  --paper:   #f9f5ec;
  --paper-2: #f2ead9;
  --paper-3: #e9decb;
  --card:    #fffdf7;
  --ink:     #2a251f;
  --muted:   #6d6458;
  --faint:   #9a8f7e;
  --clay:    #ccbfa8;
  --hair:         rgba(42, 37, 31, 0.11);
  --hair-soft:    rgba(42, 37, 31, 0.055);
  --control-edge: rgba(42, 37, 31, 0.28);

  /* Accents â€” colour carries meaning */
  --amber:      #c26b3c;
  --amber-deep: #9a4f26;
  --amber-wash: #f4e3d2;
  --sage:       #607b5b;
  --sage-deep:  #44593f;
  --sage-wash:  #e3ebde;
  --stop:       #b1442f;
  --stop-deep:  #8b3220;
  --stop-wash:  #f5ded5;

  /* Interpretation state hues */
  --st-relaxed: #607b5b;
  --st-playful: #a85a2b;    /* deepened from #c26b3c: band label now 4.96:1 on card (was 3.78) */
  --st-alert: #4f6478;
  --st-conflicted: #8a6a4a;
  --st-fearful: #4d5680;
  --st-warning: #b1442f;
  --st-guarding: #9a4632;
  --st-appeasement: #7a5f88;
  --st-overaroused: #916619; /* deepened from #ac7d2a: band label now 5.01:1 on card (was 3.61) */
  --st-pain: #7c4a62;

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --fs-mega: clamp(2.9rem, 1.85rem + 4.6vw, 5.4rem);
  --fs-h1: clamp(2.1rem, 1.5rem + 2.7vw, 3.5rem);
  --fs-h2: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .7vw, 1.55rem);
  --fs-lead: clamp(1.1rem, 1.02rem + .45vw, 1.3rem);
  --fs-sm: 0.92rem;
  --fs-xs: 0.8rem;

  --gutter: clamp(1.15rem, 0.6rem + 2.4vw, 2.75rem);
  --maxw: 1200px;
  --readw: 66ch;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --sh-1: 0 1px 2px rgba(60, 45, 30, .04), 0 4px 14px rgba(60, 45, 30, .05);
  --sh-2: 0 2px 6px rgba(60, 45, 30, .05), 0 18px 44px rgba(60, 45, 30, .08);
  --sh-3: 0 10px 28px rgba(60, 45, 30, .08), 0 44px 90px rgba(60, 45, 30, .11);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  scroll-padding-bottom: 7rem;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-underline-offset: 3px;
}

img, svg, canvas, audio { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--amber-deep); transition: color .2s var(--ease); }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
::selection { background: var(--amber-wash); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (forced-colors: active) {
  .btn, .card, .signal-card, .facet__box { border: 1px solid ButtonBorder; }
  .meter__seg.is-on, .ladder__rung { forced-color-adjust: none; }
  .facet input:checked + .facet__box { outline: 2px solid Highlight; outline-offset: 1px; }
}

/* ---- Type ---------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber-deep);
}
.lead { font-size: var(--fs-lead); line-height: 1.58; color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.hide { display: none !important; }

/* ---- Layout -------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 820px; }
/* Centred reading measure for prose/article pages, so a 66ch column is composed
   in the middle of the page instead of stranded on the left of a 1200px wrap. */
.wrap--read { max-width: 44rem; }
.section { padding-block: clamp(3.75rem, 2.4rem + 6vw, 7.5rem); }
.section-tight { padding-block: clamp(2.6rem, 1.8rem + 3.4vw, 4.75rem); }
.band { background: var(--paper-2); border-block: 1px solid var(--hair-soft); }
.rule { height: 1px; background: var(--hair); border: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 300;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 97%, transparent);
  backdrop-filter: saturate(1.25) blur(10px);
  -webkit-backdrop-filter: saturate(1.25) blur(10px);
  border-bottom: 1px solid var(--hair-soft);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 70px;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans); font-weight: 600; font-size: 1.14rem;
  letter-spacing: -.018em; color: var(--ink); text-decoration: none;
}
.brand__mark { width: 36px; height: 36px; flex: 0 0 auto; margin-top: -1px; }
.brand__dot { color: var(--amber-deep); }

.nav { display: flex; align-items: center; gap: .2rem; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: var(--fs-sm);
  padding: .55rem .65rem; border-radius: var(--r-sm);
  min-height: 24px; display: inline-flex; align-items: center;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav__safety { color: var(--stop-deep) !important; font-weight: 600; }
.nav__safety:hover { background: var(--stop-wash) !important; }
/* `.nav a` and `.nav a:hover` outrank `.btn--accent` on specificity, which
   silently stripped the button's colour, its pill radius (var(--r-sm) won, so
   the CTA rendered as an 8px rectangle), and on hover its background:
   `.nav a:hover` [0,2,1] painted it paper-2 over `.btn--accent:hover` [0,2,0],
   leaving white text on cream at 1.2:1. Restore all three where they win. */
.nav a.btn--accent, .nav a.btn--accent:hover { color: #fff; border-radius: 999px; }
.nav a.btn--accent:hover { background: #874518; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--card);
    border-bottom: 1px solid var(--hair); padding: .5rem var(--gutter) 1rem;
    box-shadow: var(--sh-2); transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: .85rem .4rem; border-bottom: 1px solid var(--hair-soft); font-size: 1rem; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--r-sm);
    color: var(--ink); border: 1px solid var(--hair);
  }
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: var(--fs-sm); line-height: 1;
  padding: .85rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; min-height: 44px;
  transition: background .2s var(--ease), color .2s var(--ease),
    border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn--primary { background: var(--ink); color: var(--paper); box-shadow: var(--sh-1); }
.btn--primary:hover { background: #17130e; color: var(--paper); box-shadow: var(--sh-2); transform: translateY(-1px); }
.btn--accent {
  background: var(--amber-deep); color: #fff;
  box-shadow: 0 1px 2px rgba(120,60,20,.18), 0 8px 22px rgba(154,79,38,.22);
}
.btn--accent:hover { background: #874518; color: #fff; box-shadow: 0 2px 4px rgba(120,60,20,.2), 0 12px 28px rgba(154,79,38,.28); transform: translateY(-1px); }
.btn--ghost { border-color: var(--control-edge); color: var(--ink); }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--muted); color: var(--ink); }
.btn--stop { background: var(--stop); color: #fff; }
.btn--stop:hover { background: var(--stop-deep); color: #fff; }
.btn--sm { padding: .55rem .9rem; font-size: var(--fs-xs); min-height: 36px; }
.btn--lg { padding: 1rem 1.6rem; font-size: 1rem; }
.btn--block { width: 100%; }
/* aria-disabled rather than disabled: the button stays focusable so a keyboard
   user can reach it and be told what is still missing, instead of it silently
   vanishing from the tab order. */
.btn[disabled],
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn__arrow { transition: transform .2s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---- Cards --------------------------------------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.note {
  border-left: 3px solid var(--sage); background: var(--sage-wash);
  padding: 1rem 1.2rem; border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--ink); font-size: var(--fs-sm); line-height: 1.6;
}
.note--warn { border-left-color: var(--amber); background: var(--amber-wash); }
.note--stop { border-left-color: var(--stop); background: var(--stop-wash); }

/* ---- Prose --------------------------------------------------------------- */
.prose { max-width: var(--readw); }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 2.6rem; scroll-margin-top: 84px; }
.prose h3 { margin-top: 1.9rem; scroll-margin-top: 84px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .5rem; }
.prose li::marker { color: var(--amber-deep); }
.prose a { text-decoration: underline; text-decoration-color: var(--clay); }

/* ---- Reveal (content present if JS fails) -------------------------------- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--hair); background: var(--paper-2);
  padding-block: clamp(2.4rem, 1.6rem + 3vw, 4rem);
}
.site-footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem;
}
.site-footer h2 {
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: .8rem;
}
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .35rem; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: var(--fs-sm); }
.site-footer a:hover { color: var(--ink); }
/* WCAG 2.2 target size: standalone (non-sentence) links need >=24px */
.site-footer ul a {
  display: inline-flex; align-items: center; min-height: 26px; padding-block: .15rem;
}
.crumbs a { display: inline-block; min-height: 24px; padding-block: .15rem; }
.site-footer__disclaimer {
  max-width: 44ch; font-size: var(--fs-xs); color: var(--muted);
  line-height: 1.55; margin-top: .9rem;
}
.site-footer__imprint {
  margin-top: 2.2rem; padding-top: 1.3rem; border-top: 1px solid var(--hair);
  font-size: var(--fs-xs); color: var(--muted); line-height: 1.6;
  display: grid; gap: .5rem;
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   HERO — the Honest Answer Box
   ========================================================================== */
.hero { padding-block: clamp(1.4rem, 1rem + 1.8vw, 3.25rem) clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(1.5rem, 1rem + 3vw, 4.25rem);
  align-items: center;
}
.hero__title {
  font-size: var(--fs-mega);
  line-height: 0.99;
  letter-spacing: -.026em;
}
.hero__lead {
  margin-top: 1.5rem; max-width: 50ch;
  font-size: var(--fs-lead); line-height: 1.55; color: var(--muted);
}
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }

.hero__safety {
  margin-top: 1.75rem; display: flex; align-items: center; gap: .85rem;
  padding: .85rem 1.05rem; border-radius: var(--r-md); max-width: 30rem;
  border: 1px solid color-mix(in srgb, var(--stop) 32%, transparent);
  background: var(--stop-wash); text-decoration: none; color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.hero__safety:hover { border-color: var(--stop); box-shadow: var(--sh-1); color: var(--ink); }
.hero__safety-ico {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--stop); color: #fff; font-size: 1rem;
}
.hero__safety strong { display: block; font-size: var(--fs-sm); color: var(--stop-deep); }
.hero__safety span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
/* `.hero__safety span` (0,1,1) also matches the icon span and was beating
   `.hero__safety-ico` (0,1,0), so the icon rendered muted on red, not white. */
.hero__safety .hero__safety-ico { color: #fff; }

.hero__art { position: relative; margin: 0; }
.hero__art img {
  width: 100%; height: auto; display: block; border-radius: var(--r-xl);
  box-shadow: 0 2px 4px rgba(60,45,30,.04), 0 30px 60px rgba(60,45,30,.11);
}
.hero__art figcaption {
  position: absolute; left: 1rem; bottom: 1rem;
  font-size: var(--fs-xs); color: var(--ink);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--hair);
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 1.7rem; }
  .hero__art { order: -1; max-width: 26rem; margin-inline: auto; }
}

/* ---- The quick-start box: where muscle memory expects "translate" -------- */
.answerbox {
  max-width: 700px; margin-inline: auto; text-align: center;
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--r-xl); padding: clamp(1.6rem, 1.2rem + 2vw, 2.75rem);
  box-shadow: var(--sh-2);
}
.answerbox__h {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.15rem); line-height: 1.12;
  letter-spacing: -.015em;
}
.answerbox__sub { font-size: var(--fs-sm); color: var(--muted); margin: .65rem auto 0; max-width: 48ch; }
.answerbox__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 1.5rem; }
.answerbox__chip {
  display: inline-flex; align-items: center; min-height: 42px;
  padding: .55rem .95rem; border-radius: 999px;
  border: 1px solid var(--control-edge); background: var(--paper);
  color: var(--ink); text-decoration: none; font-size: .95rem;
  transition: border-color .18s var(--ease), background .18s var(--ease),
    color .18s var(--ease), transform .18s var(--ease);
}
.answerbox__chip:hover {
  border-color: var(--amber); background: var(--amber-wash);
  color: var(--amber-deep); transform: translateY(-1px);
}
.answerbox__cta { margin-top: 1.5rem; }
.answerbox__foot { margin-top: 1.1rem; font-size: var(--fs-xs); color: var(--muted); }

/* ==========================================================================
   READ-ALONG â€” a real illustration + a native, no-JS accordion
   ========================================================================== */
.readalong {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); align-items: center;
}
.readalong__fig { margin: 0; }
.readalong__fig img {
  width: 100%; height: auto; display: block; border-radius: var(--r-lg);
  box-shadow: 0 2px 4px rgba(60,45,30,.04), 0 24px 50px rgba(60,45,30,.1);
}
.readalong__fig figcaption {
  font-size: var(--fs-xs); color: var(--muted); margin-top: .75rem; line-height: 1.5;
}
.regionlist { display: grid; gap: .5rem; }
.region {
  border: 1px solid var(--hair); border-radius: var(--r-md);
  background: var(--card); overflow: hidden;
  transition: border-color .2s var(--ease);
}
.region[open] { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.region summary {
  display: flex; align-items: center; gap: .8rem;
  padding: .95rem 1.1rem; cursor: pointer; list-style: none;
  min-height: 44px;
}
.region summary::-webkit-details-marker { display: none; }
.region summary:hover { background: var(--paper); }
.region__num { font-family: var(--mono); font-size: .72rem; color: var(--amber-deep); flex: 0 0 auto; }
.region__name { font-family: var(--serif); font-size: 1.12rem; color: var(--ink); flex: 1; }
.region__chev { color: var(--muted); transition: transform .2s var(--ease); flex: 0 0 auto; }
.region[open] .region__chev { transform: rotate(180deg); }
.region__body { padding: 0 1.1rem 1.05rem; }
.region__body p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; margin: 0; }
.region__body a { display: inline-flex; margin-top: .6rem; font-size: var(--fs-xs); font-weight: 600; color: var(--amber-deep); text-decoration: none; }
.region__body a:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .readalong { grid-template-columns: 1fr; }
  .readalong__fig { max-width: 28rem; margin-inline: auto; }
}
.interp { max-width: 880px; margin-inline: auto; }

/* The observation form reads as one considered instrument, not a loose stack of
   hairline-separated sections floating on the page. The card lifts it off the
   paper and gives a clear surface hierarchy; it hides (display:none via .hide)
   the moment the result replaces it, so the readout keeps its own framing. */
.sheet-panel {
  margin-top: 1.4rem;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-1);
  padding: clamp(1.15rem, .5rem + 2.2vw, 2.1rem) clamp(1.2rem, .5rem + 2.4vw, 2.4rem);
}
.sheet-panel .facetgroup:first-of-type { padding-top: .25rem; }

.facetgroup { padding: 1.6rem 0; border-top: 1px solid var(--hair); }
.facetgroup:first-of-type { border-top: 0; }
legend.facetgroup__head {
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  width: 100%; padding: 0; float: none;
}
.facetgroup__num { font-family: var(--mono); font-size: var(--fs-xs); color: var(--amber-deep); }
.facetgroup__title { font-family: var(--serif); font-size: 1.24rem; font-weight: 600; }
.facetgroup__mode {
  margin-left: auto; font-family: var(--mono); font-size: .66rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--hair); padding: .12rem .45rem; border-radius: 999px;
}
.facetgroup__req { color: var(--stop); }
.facetgroup__hint { font-size: var(--fs-sm); color: var(--muted); margin: .35rem 0 .9rem; max-width: 60ch; }

.facets { display: flex; flex-wrap: wrap; gap: .55rem; }
.facet { position: relative; }
.facet input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.facet__box {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem .85rem; border-radius: 999px; border: 1px solid var(--control-edge);
  background: var(--card); color: var(--muted); font-size: .93rem; line-height: 1.3;
  cursor: pointer; min-height: 40px;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.facet__box:hover { border-color: var(--muted); background: var(--paper-2); }
.facet__tick {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--control-edge);
  flex: 0 0 auto; display: grid; place-items: center;
}
.facet__tick svg { width: 9px; height: 9px; opacity: 0; color: #fff; }
.facet input:checked + .facet__box {
  border-color: var(--ink); color: var(--ink); background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.facet input:checked + .facet__box .facet__tick { background: var(--amber-deep); border-color: var(--amber-deep); }
.facet input:checked + .facet__box .facet__tick svg { opacity: 1; }
.facet input:focus-visible + .facet__box { outline: 3px solid var(--amber); outline-offset: 2px; }

.actionbar {
  position: sticky; bottom: 0; z-index: 30; margin-top: 1.6rem;
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .8rem 1rem .8rem 1.2rem;
  background: color-mix(in srgb, var(--card) 97%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hair); border-radius: var(--r-lg); box-shadow: var(--sh-2);
}
.actionbar__count { font-size: var(--fs-sm); color: var(--muted); }
.actionbar__count b { font-family: var(--mono); color: var(--ink); }
.actionbar__spacer { flex: 1; }
.actionbar__reset { font-size: var(--fs-sm); color: var(--muted); text-decoration: underline; min-height: 44px; }
.actionbar__reset:hover { color: var(--ink); }
.actionbar__gate {
  width: 100%; font-size: var(--fs-xs); color: var(--stop-deep);
  font-family: var(--mono); order: 99;
}
/* Kept in the tree as the button's description, hidden only visually. */
.actionbar__gate.is-quiet {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- Result: DESCRIBE / INFER / ACT -------------------------------------- */
.result { --accent: var(--amber); }
.result__back {
  display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-sm);
  color: var(--muted); margin-bottom: 1.2rem; min-height: 44px;
}
.result__back:hover { color: var(--ink); }

.zone { margin-bottom: 1.6rem; }
.zone__label {
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem;
}
.zone__label::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.zone--describe .zone__label { color: var(--muted); }
.zone--infer .zone__label { color: var(--amber-deep); }
.zone--act .zone__label { color: var(--sage-deep); }

.observed { display: grid; gap: .3rem; }
.observed__row {
  display: flex; gap: .8rem; font-size: var(--fs-sm);
  padding: .4rem 0; border-bottom: 1px dashed var(--hair-soft);
}
.observed__grp {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); min-width: 9rem; flex: 0 0 auto;
}
.observed__val { color: var(--ink); }

.readout {
  position: relative; border-radius: var(--r-xl); border: 1px solid var(--hair);
  background: var(--card); box-shadow: var(--sh-2);
  padding: clamp(1.3rem, 1rem + 2vw, 2.4rem); overflow: hidden;
}
.readout::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent);
}
.readout__title {
  font-family: var(--serif); font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.7rem);
  line-height: 1.06; margin: .45rem 0 .35rem;
}
.readout__line { font-size: var(--fs-lead); color: var(--muted); max-width: 48ch; }

.meter { margin-top: 1.4rem; }
.meter__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; flex-wrap: wrap; }
.meter__band { font-family: var(--mono); font-size: var(--fs-sm); color: var(--accent); font-weight: 600; }
.meter__def { font-size: var(--fs-xs); color: var(--muted); }
.meter__track {
  display: flex; gap: 3px; height: 12px;
}
.meter__seg {
  flex: 1; border-radius: 3px; background: var(--paper-3);
  border: 1px solid var(--hair-soft);
}
.meter__seg.is-on { background: var(--accent); border-color: var(--accent); }
.meter__note { margin-top: .5rem; font-size: var(--fs-xs); color: var(--muted); }

.alts { display: grid; gap: .6rem; margin-top: 1.2rem; }
.alt {
  padding: .8rem .95rem; border: 1px solid var(--hair);
  border-radius: var(--r-md); background: var(--paper-2);
}
.alt__name { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); }
.alt__why { font-size: var(--fs-sm); color: var(--muted); margin-top: .2rem; }

.painline {
  margin-top: 1.2rem; padding: .85rem 1rem; border-radius: var(--r-md);
  background: var(--paper-2); border: 1px solid var(--hair);
  font-size: var(--fs-sm); color: var(--muted);
}
.painline strong { color: var(--ink); }

.steps { display: grid; gap: .7rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; }
.step__num {
  width: 25px; height: 25px; border-radius: 50%; background: var(--sage);
  color: #fff; font-family: var(--mono); font-size: .78rem;
  display: grid; place-items: center; flex: 0 0 auto;
}
.step__text { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; padding-top: .1rem; }

/* ---- Glass-box receipt --------------------------------------------------- */
.receipt {
  margin-top: 1.6rem; border: 1px solid var(--hair); border-radius: var(--r-lg);
  background: var(--paper-2); overflow: hidden;
}
.receipt__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .95rem 1.15rem; font-family: var(--mono);
  font-size: var(--fs-sm); color: var(--ink); text-align: left; min-height: 48px;
}
.receipt__toggle:hover { background: var(--paper-3); }
.receipt__chev { transition: transform .2s var(--ease); color: var(--muted); }
.receipt__toggle[aria-expanded="true"] .receipt__chev { transform: rotate(180deg); }
.receipt__body { padding: 0 1.15rem 1.2rem; font-family: var(--mono); font-size: .82rem; }
.receipt__sec { margin-top: 1.1rem; }
.receipt__h {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .45rem;
}
.receipt__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .3rem 0; border-bottom: 1px dotted var(--hair-soft); color: var(--ink);
}
.receipt__w { color: var(--amber-deep); flex: 0 0 auto; }
.receipt__note { color: var(--muted); line-height: 1.6; }
.cites { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.cite-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--mono); font-size: .7rem; padding: .3rem .55rem;
  border-radius: 999px; border: 1px solid var(--hair);
  background: var(--card); color: var(--ink); text-decoration: none;
  min-height: 28px;
}
.cite-chip:hover { border-color: var(--amber); color: var(--amber-deep); }
.tier {
  font-family: var(--mono); font-size: .62rem; padding: .1rem .35rem;
  border-radius: 3px; font-weight: 600;
}
.tier--T1 { background: var(--sage-wash); color: var(--sage-deep); }
.tier--T2 { background: var(--amber-wash); color: var(--amber-deep); }
/* muted (#6d6458) on paper-3 was 4.36:1; #5c5343 lifts the quiet tiers to 5.69:1 */
.tier--T3 { background: var(--paper-3); color: #5c5343; }
.tier--T4 { background: var(--paper-3); color: #5c5343; }

/* ---- Safety interlock ----------------------------------------------------
   Severity is visible, not just encoded in the data: a cornered frightened dog
   must not look identical to a mild note. */
.interlock {
  border: 2px solid var(--stop); border-radius: var(--r-lg);
  background: var(--stop-wash); padding: 1.2rem 1.3rem; margin-bottom: 1.6rem;
}
.interlock--stop { border-width: 3px; border-color: var(--stop); background: var(--stop-wash); }
.interlock--care {
  border-width: 2px; border-color: color-mix(in srgb, var(--amber) 60%, transparent);
  background: var(--amber-wash);
}
.interlock--vet {
  border-width: 2px; border-color: color-mix(in srgb, var(--st-pain) 55%, transparent);
  background: color-mix(in srgb, var(--st-pain) 12%, var(--paper));
}
.interlock__lead {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .22rem .5rem; border-radius: 999px;
  flex: 0 0 auto; align-self: center; color: #fff; background: var(--stop);
}
.interlock--care .interlock__lead { background: var(--amber-deep); }
.interlock--vet .interlock__lead { background: var(--st-pain); }

.interlock__title {
  font-family: var(--serif); font-size: 1.2rem; color: var(--stop-deep);
  display: flex; gap: .6rem; align-items: baseline; margin-bottom: .5rem;
  flex-wrap: wrap;
}
.interlock--care .interlock__title { color: var(--amber-deep); }
.interlock--vet .interlock__title { color: var(--st-pain); }
.interlock__body { font-size: var(--fs-sm); color: var(--ink); line-height: 1.6; }
.interlock__body + .interlock__body { margin-top: .7rem; }
.interlock__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ---- Triage -------------------------------------------------------------- */
.triage { display: grid; gap: 1rem; margin: 1.5rem 0; }
.triage__tier {
  border: 1px solid var(--hair); border-left-width: 4px;
  border-radius: var(--r-md); padding: 1.1rem 1.2rem; background: var(--card);
}
.triage__tier--now { border-left-color: var(--stop); }
.triage__tier--week { border-left-color: var(--amber); }
.triage__tier--learn { border-left-color: var(--sage); }
.triage__when {
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: .3rem;
}
.triage__tier--now .triage__when { color: var(--stop); }
.triage__tier--week .triage__when { color: var(--amber-deep); }
.triage__tier--learn .triage__when { color: var(--sage-deep); }
.triage__what { font-family: var(--serif); font-size: 1.1rem; margin-bottom: .4rem; }
.triage__who { font-size: var(--fs-sm); color: var(--muted); }
.triage__links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.triage__links a {
  font-size: var(--fs-xs); padding: .45rem .75rem; border-radius: 999px;
  border: 1px solid var(--hair); text-decoration: none; color: var(--ink);
  background: var(--paper-2); min-height: 32px; display: inline-flex; align-items: center;
}
.triage__links a:hover { border-color: var(--amber); color: var(--amber-deep); }

/* ---- Ladder -------------------------------------------------------------- */
.ladder { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 2px; }
.ladder li {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center;
  padding: .7rem 1rem; background: var(--card); border: 1px solid var(--hair);
}
.ladder li:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.ladder li:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.ladder__rung {
  font-family: var(--mono); font-size: var(--fs-xs); color: #fff;
  width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  flex: 0 0 auto; background: var(--sage);
}
.ladder li:nth-child(n+5) .ladder__rung { background: var(--amber-deep); }
.ladder li:nth-child(n+8) .ladder__rung { background: var(--stop); }
.ladder__label strong { color: var(--ink); display: block; font-size: .96rem; }
.ladder__label span { color: var(--muted); font-size: var(--fs-sm); }

/* ==========================================================================
   SIGNAL DICTIONARY NODES
   ========================================================================== */
.crumbs { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 1rem; }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li::after { content: "/"; margin-left: .35rem; color: var(--clay); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.node-hero { max-width: 66ch; }
.node-hero h1 { font-size: var(--fs-h1); margin: .5rem 0 .9rem; }
.answer-first {
  font-size: var(--fs-lead); line-height: 1.55; color: var(--ink);
  padding: 1.1rem 1.25rem; background: var(--paper-2);
  border-left: 3px solid var(--amber); border-radius: 0 var(--r-md) var(--r-md) 0;
  max-width: 62ch;
}
.node-meta {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem;
  font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted);
}
.node-meta span {
  padding: .28rem .6rem; border: 1px solid var(--hair);
  border-radius: 999px; background: var(--card);
}

/* Illustrated signal plate (original Higgsfield illustration, clearly labelled) */
.node-figure { margin: 1.5rem 0 .5rem; }
.node-figure img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-lg); border: 1px solid var(--hair);
  background: var(--card); box-shadow: var(--sh-1);
}
.node-figure figcaption {
  font-size: var(--fs-xs); color: var(--muted); font-style: italic;
  line-height: 1.5; margin-top: .6rem; max-width: 60ch;
}

.nodesec { margin-top: 2.4rem; scroll-margin-top: 84px; }
.nodesec > h2 { font-size: var(--fs-h3); padding-bottom: .6rem; border-bottom: 2px solid var(--ink); margin-bottom: 1rem; }
.meanings { display: grid; gap: .7rem; }
.meaning {
  padding: .85rem 1rem; border: 1px solid var(--hair);
  border-radius: var(--r-md); background: var(--card);
}
.meaning__freq {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber-deep);
}
.meaning__text { margin-top: .25rem; color: var(--ink); font-size: .98rem; }
.notmean { border-left: 3px solid var(--stop); background: var(--stop-wash);
  padding: 1rem 1.15rem; border-radius: 0 var(--r-md) var(--r-md) 0; }
.notmean ul { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.notmean li { font-size: var(--fs-sm); color: var(--ink); }

.cluster { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cluster__col { padding: 1rem 1.1rem; border-radius: var(--r-md); border: 1px solid var(--hair); }
.cluster__col--confirm { background: var(--sage-wash); border-color: color-mix(in srgb, var(--sage) 35%, transparent); }
.cluster__col--conflict { background: var(--amber-wash); border-color: color-mix(in srgb, var(--amber) 32%, transparent); }
.cluster__h { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; }
.cluster__col--confirm .cluster__h { color: var(--sage-deep); }
.cluster__col--conflict .cluster__h { color: var(--amber-deep); }
.cluster ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.cluster li { font-size: var(--fs-sm); color: var(--ink); }
@media (max-width: 620px) { .cluster { grid-template-columns: 1fr; } }

.related { display: flex; flex-wrap: wrap; gap: .5rem; }
.related a {
  font-size: var(--fs-sm); padding: .5rem .85rem; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--card);
  text-decoration: none; color: var(--ink); min-height: 40px;
  display: inline-flex; align-items: center;
}
.related a:hover { border-color: var(--amber); color: var(--amber-deep); }

.safetyflag {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: var(--fs-xs); padding: .4rem .7rem;
  border-radius: 999px;
}
.safetyflag--none { background: var(--sage-wash); color: var(--sage-deep); }
.safetyflag--caution { background: var(--amber-wash); color: var(--amber-deep); }
.safetyflag--stop { background: var(--stop-wash); color: var(--stop-deep); }

/* ---- Hub grids ----------------------------------------------------------- */
/* Section heads: real breathing room between a heading block and its content,
   and a proper lead treatment. Both were unstyled, so headings sat directly on
   top of the image/cards below with zero gap. */
.sec-head { margin-bottom: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
.sec-head__lead { margin-top: .7rem; font-size: var(--fs-lead); line-height: 1.55; color: var(--muted); max-width: 60ch; }

/* Page heros (manifest pages) were unstyled, so the intro paragraph touched the
   h1 and ran the full column width. Give the h1 breathing room and cap measure. */
.page-hero { margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 3rem); }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero > .lead { max-width: 64ch; }

.hubgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(1rem, .7rem + 1vw, 1.6rem); }
.hubcard {
  display: block; padding: clamp(1.5rem, 1.2rem + .9vw, 1.9rem); border: 1px solid var(--hair);
  border-radius: var(--r-lg); background: var(--card); text-decoration: none;
  color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.hubcard:hover { border-color: var(--amber); box-shadow: var(--sh-2); color: var(--ink); }
/* Warm sans eyebrow, unified with .eyebrow (was techy mono) */
.hubcard__eyebrow { font-family: var(--sans); font-size: .72rem; font-weight: 600; color: var(--amber-deep); letter-spacing: .1em; text-transform: uppercase; }
.hubcard__title { font-family: var(--serif); font-size: 1.25rem; margin: .35rem 0 .4rem; }
.hubcard__desc { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.hubcard__count { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); margin-top: .7rem; display: block; }

/* ---- TOC / content grid -------------------------------------------------- */
/* Content track sized to the reading measure and the whole grid centred, so the
   prose does not strand 250px of dead space on the right of a 1fr cell. */
.content-grid { display: grid; grid-template-columns: 210px minmax(0, 66ch); gap: clamp(1.75rem, 1rem + 3vw, 3.75rem); align-items: start; justify-content: center; }
.toc { position: sticky; top: 84px; font-size: var(--fs-sm); }
.toc h2 { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; }
.toc ul { list-style: none; padding: 0; display: grid; gap: .45rem; border-left: 1px solid var(--hair); }
.toc a { display: block; padding: .25rem 0 .25rem 1rem; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; margin-left: -1px; }
.toc a:hover { color: var(--ink); border-left-color: var(--amber); }
@media (max-width: 820px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; border: 1px solid var(--hair); border-radius: var(--r-md); padding: 1rem 1.15rem; background: var(--paper-2); }
}

/* ---- Capability charter -------------------------------------------------- */
.charter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.charter__col { padding: 1.2rem; border-radius: var(--r-md); border: 1px solid var(--hair); }
.charter__col--can { background: var(--sage-wash); border-color: color-mix(in srgb, var(--sage) 35%, transparent); }
.charter__col--cannot { background: var(--amber-wash); border-color: color-mix(in srgb, var(--amber) 32%, transparent); }
.charter__col--never { background: var(--stop-wash); border-color: color-mix(in srgb, var(--stop) 30%, transparent); }
.charter__h { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .7rem; }
.charter__col--can .charter__h { color: var(--sage-deep); }
.charter__col--cannot .charter__h { color: var(--amber-deep); }
.charter__col--never .charter__h { color: var(--stop-deep); }
.charter ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.charter li { font-size: var(--fs-sm); color: var(--ink); line-height: 1.5; }
@media (max-width: 780px) { .charter { grid-template-columns: 1fr; } }

/* ---- References ---------------------------------------------------------- */
.reflist { list-style: none; padding: 0; display: grid; gap: 1.1rem; }
.refitem { padding: 1rem 1.15rem; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--card); scroll-margin-top: 84px; }
.refitem__top { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.refitem__cite { font-size: .96rem; color: var(--ink); }
.refitem__cite em { font-style: italic; }
.refitem__id { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); word-break: break-all; }
.refitem__says { font-size: var(--fs-sm); color: var(--muted); margin-top: .5rem; }
.refitem__limit { font-size: var(--fs-xs); color: var(--muted); margin-top: .4rem; font-style: italic; }

/* ---- Profiles / shelf ---------------------------------------------------- */
.shelf-bar {
  display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  width: fit-content; max-width: 100%;
  padding: .5rem .8rem; background: var(--paper-2);
  border: 1px solid var(--hair); border-radius: 999px; margin-bottom: 1.4rem;
}
.shelf-bar__label { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); padding-left: .35rem; }
.shelf-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.shelf-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--control-edge);
  background: var(--card); font-size: var(--fs-sm); color: var(--muted); min-height: 38px;
}
.shelf-chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.shelf-chip--add { border-style: dashed; }

.greet { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); margin-bottom: .3rem; }

/* ---- Modal --------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  padding: 1.2rem; background: rgba(28, 22, 16, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__card {
  width: 100%; max-width: 440px; background: var(--card);
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  box-shadow: var(--sh-3); padding: 1.5rem;
}
.field { margin-top: 1rem; }
.field label { display: block; font-size: var(--fs-sm); color: var(--muted); margin-bottom: .3rem; }
.field input, .field textarea {
  width: 100%; padding: .7rem .9rem; border-radius: var(--r-sm);
  border: 1px solid var(--control-edge); background: var(--paper); color: var(--ink);
}
.field__err { color: var(--stop); font-size: var(--fs-xs); margin-top: .3rem; }
.modal__actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.4rem; flex-wrap: wrap; }

/* ---- Toast --------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%) translateY(18px);
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem;
  border-radius: 999px; font-size: var(--fs-sm); box-shadow: var(--sh-3);
  opacity: 0; pointer-events: none; z-index: 320;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Verify panel -------------------------------------------------------- */
.verify {
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  background: var(--paper-2); padding: 1.3rem 1.4rem;
}
.verify ol { padding-left: 1.2rem; display: grid; gap: .6rem; margin-top: .8rem; }
.verify li { font-size: var(--fs-sm); color: var(--muted); }
.verify code {
  font-family: var(--mono); font-size: .82rem; background: var(--card);
  padding: .12rem .35rem; border-radius: 3px; border: 1px solid var(--hair);
  color: var(--ink); word-break: break-word;
}

/* ---- 404 ----------------------------------------------------------------- */
.notfound { text-align: center; max-width: 46ch; margin: clamp(3rem, 2rem + 5vw, 6rem) auto; }
.notfound h1 { font-size: var(--fs-mega); line-height: 1; }

/* ---- Content-visibility for long pages ----------------------------------- */
.cv { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ==========================================================================
   Utilities
   These exist so that no element needs an inline style attribute, which lets
   the Content-Security-Policy stay strict (no 'unsafe-inline' anywhere).
   ========================================================================== */
.mt-1 { margin-top: .6rem; }
.mt-2 { margin-top: .8rem; }
.mt-3 { margin-top: 1.1rem; }
.mt-4 { margin-top: 1.4rem; }
.mt-5 { margin-top: 1.6rem; }
.mt-6 { margin-top: 2.1rem; }
.mt-7 { margin-top: 2.5rem; }
.mb-3 { margin-bottom: 1rem; }
.ml-2 { margin-left: .5rem; }
.hub-note { margin: .5rem 0 1.2rem; }
.lead-block { margin: 1rem auto 1.8rem; }

.txt-sm { font-size: var(--fs-sm); }
.txt-lg { font-size: 1.3rem; }
.txt-brand { font-size: 1.05rem; }
.h2-lg { font-size: var(--fs-h2); }

.measure-52 { max-width: 52ch; }
.measure-66 { max-width: 66ch; }
.measure-none { max-width: none; }
.center-block { text-align: center; max-width: 42ch; margin-inline: auto; }
.center-flex { justify-content: center; }

.static-card { cursor: default; }
.static-card:hover { border-color: var(--hair); box-shadow: var(--sh-1); transform: none; }
.stop-ico { font-size: 1.3rem; color: var(--stop); }
.tier-name { font-size: var(--fs-xs); }
.addr { font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.9; }
.mark-sm { width: 26px; height: 26px; }

/* ---- Tables (node "what changes the reading") ---------------------------- */
.tablewrap { overflow-x: auto; margin: 1rem 0; }
.prose table, .content table {
  border-collapse: collapse; width: 100%; font-size: var(--fs-sm);
  min-width: 30rem;
}
.prose th, .prose td, .content th, .content td {
  text-align: left; vertical-align: top; padding: .7rem .8rem;
  border-bottom: 1px solid var(--hair);
}
.prose th, .content th {
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink);
}

/* Closed states must leave the accessibility tree, not just fade out. */
.modal { visibility: hidden; }
.modal.is-open { visibility: visible; }
@media (max-width: 860px) {
  .nav { visibility: hidden; }
  .nav[data-open="true"] { visibility: visible; }
}

/* ---- Printable body-language chart --------------------------------------- */
.chart__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
/* No dead button: the print control only appears once JS can service it. */
html:not(.js) [data-print] { display: none; }
.chart-table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); min-width: 34rem; }
.chart-table th, .chart-table td {
  text-align: left; vertical-align: top; padding: .55rem .7rem;
  border-bottom: 1px solid var(--hair);
}
.chart-table thead th {
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink);
}
.chart-table th[scope="rowgroup"] {
  background: var(--paper-2); white-space: nowrap; border-right: 1px solid var(--hair);
  font-family: var(--serif); font-size: .98rem; color: var(--ink);
}
.chart-table td a { color: var(--amber-deep); text-decoration: underline; text-decoration-color: var(--clay); }
.chart__flag {
  font-family: var(--mono); font-size: .62rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; padding: .12rem .4rem; border-radius: 4px; white-space: nowrap;
}
.chart__flag--stop { background: var(--stop-wash); color: var(--stop-deep); }
.chart__flag--care { background: var(--amber-wash); color: var(--amber-deep); }
.chart__flag--vet  { background: color-mix(in srgb, var(--st-pain) 14%, var(--paper)); color: var(--st-pain); }

/* ---- Print: drop the chrome, ink on white -------------------------------- */
@media print {
  .site-header, .site-footer, .skip-link, .chart__actions, [data-print], #toast,
  .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  .section, .section-tight { padding-block: .4rem; }
  .cv { content-visibility: visible; }
  .note, .card, .triage__tier, .chart-table, .readout, .receipt { box-shadow: none; }
  .tablewrap { overflow: visible; }
  .chart-table { min-width: 0; font-size: 9.5pt; }
  .chart-table td a, a { text-decoration: underline; }
  .chart__flag { border: 1px solid #999; }
  @page { margin: 1.1cm; }
}