/* ==========================================================================
   OwnVouch — Topograph design system (web)
   Ported 1:1 from the Flutter app: lib/theme/app_theme.dart (tokens) and
   lib/widgets/topo.dart (components). Warm sand paper, contour-line
   texture, terracotta accent, Zilla Slab + Azeret Mono.

   House rules, same as the app:
   - Ink surfaces are reserved for ceremonies. Don't reach for ink to make
     an ordinary section look important — it dilutes the signal.
   - No literal colours or font names in section rules. Use the role
     tokens below.
   - Cards are radius 20, controls are radius 12. Nothing in between.
   ========================================================================== */

/* ---------- fonts: self-hosted, see assets/fonts/README.md ----------
   latin-ext is declared before latin so the latin face wins where the
   ranges overlap; a page only downloads latin-ext if it renders one of
   those characters (e.g. ₹ or an accented name typed into the form). */
@font-face {
  font-family: 'Zilla Slab'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/zilla-slab-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Zilla Slab'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/zilla-slab-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Zilla Slab'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/zilla-slab-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Zilla Slab'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/zilla-slab-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Zilla Slab'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/zilla-slab-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Zilla Slab'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/zilla-slab-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Azeret Mono is variable; trimmed to the 400–600 weights the site uses. */
@font-face {
  font-family: 'Azeret Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/azeret-mono-400-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Azeret Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/azeret-mono-400-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Unbounded only ever sets the word "OwnVouch", so it carries just those glyphs. */
@font-face {
  font-family: 'Unbounded'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/unbounded-600-wordmark.woff2') format('woff2');
  unicode-range: U+4F, U+56, U+63, U+68, U+6E-6F, U+75, U+77;
}
/* Metric-matched local fallbacks so text doesn't reflow when the web fonts
   swap in. Values computed per weight with fontTools: size-adjust from
   letter-frequency-weighted advance widths (mono: the fixed advance),
   ascent/descent from each web font's hhea, divided by size-adjust. */
@font-face {
  font-family: 'Zilla Slab Fallback'; font-weight: 400;
  src: local('Georgia');
  size-adjust: 98.08%; ascent-override: 96.25%; descent-override: 26.10%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Zilla Slab Fallback'; font-weight: 600;
  src: local('Georgia Bold'), local('Georgia-Bold');
  size-adjust: 85.15%; ascent-override: 110.86%; descent-override: 30.06%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Zilla Slab Fallback Times'; font-weight: 400;
  src: local('Times New Roman'), local('TimesNewRomanPSMT');
  size-adjust: 107.73%; ascent-override: 87.63%; descent-override: 23.76%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Zilla Slab Fallback Times'; font-weight: 600;
  src: local('Times New Roman Bold'), local('TimesNewRomanPS-BoldMT');
  size-adjust: 102.36%; ascent-override: 92.22%; descent-override: 25.01%; line-gap-override: 0%;
}
/* Sized so "OwnVouch" in Arial Bold is exactly as wide as in Unbounded 600,
   which keeps the header from rewrapping on narrow screens during the swap. */
@font-face {
  font-family: 'Unbounded Fallback'; font-weight: 600;
  src: local('Arial Bold'), local('Arial-BoldMT');
  size-adjust: 131.40%; ascent-override: 75.72%; descent-override: 18.65%; line-gap-override: 0%;
}
/* Monospace advances don't change with weight, so one face covers 400-600. */
@font-face {
  font-family: 'Azeret Mono Fallback'; font-weight: 400 600;
  src: local('Menlo'), local('Menlo-Regular');
  size-adjust: 107.96%; ascent-override: 86.79%; descent-override: 21.30%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Azeret Mono Fallback Courier'; font-weight: 400 600;
  src: local('Courier New'), local('CourierNewPSMT');
  size-adjust: 108.32%; ascent-override: 86.51%; descent-override: 21.23%; line-gap-override: 0%;
}

:root {
  /* ---- palette: AppColors (app_theme.dart) ---- */
  /* surfaces */
  --sand: #EFE6D6;          /* app background */
  --paper: #F8F2E6;         /* cards / inputs */
  --parchment: #E6DAC5;     /* pressed / secondary fill */
  --line: #DDD2C0;          /* hairlines */

  /* ink */
  --ink: #2B2520;
  --ink-deep: #1E1A16;
  --ink-raised: #3A322B;    /* cards on ink */
  --muted: #7A6E62;         /* secondary text on sand */
  --muted-on-ink: #B8AA98;  /* secondary text on ink */

  /* WCAG-AA adjustments, web only (see README).
     The raw app values fail AA on light surfaces at body sizes:
       --muted #7A6E62 on sand = 4.01:1   -> --muted-aa #71655A = 4.57:1
       paper on --terracotta   = 3.47:1   -> --terracotta-aa    = 4.52:1
     Same gap exists in app_theme.dart; fix there to resync. */
  --muted-aa: #71655A;
  --terracotta-aa: #A95937;

  /* accent + semantics */
  --terracotta: #C8663D;
  --terracotta-light: #E58B62;
  --moss: #3D7A5A;
  --moss-on-ink: #8FD0A8;
  --ochre: #B07A2A;
  --rust: #9E3B2E;
  --rust-on-ink: #E07A6A;

  /* brand kit (ownvouch-logo/README.md) — fixed, never themed */
  --brand-copper: #C8663D;
  --brand-copper-light: #E0854F;

  /* ---- geometry: AppTheme.radiusCard / radiusControl ---- */
  --radius-card: 20px;
  --radius-control: 12px;
  --control-height: 52px;

  /* ---- role tokens (light = AppTheme.light()) ---- */
  --bg: var(--sand);
  --surface: var(--paper);
  --surface-2: var(--parchment);
  --border: var(--line);
  --text: var(--ink);
  --text-muted: var(--muted-aa);       /* AA-adjusted; palette value is --muted */
  --accent: var(--terracotta);         /* borders, links, large display text */
  --accent-fill: var(--terracotta-aa); /* filled surfaces carrying small text */
  --accent-ink: var(--paper);          /* ColorScheme.onPrimary */
  --wordmark-copper: var(--brand-copper);

  /* AppStatusColors.light */
  --status-good: var(--moss);
  --status-progress: var(--ochre);
  --status-bad: var(--rust);
  --status-neutral: var(--muted-aa);   /* AA-adjusted, as --text-muted */

  /* TopoBackground: ink @ 6% */
  --contour: rgba(43, 37, 32, 0.06);
  /* PaperCard: ink @ 10%, offset (0,1), no blur */
  --card-shadow: 0 1px 0 rgba(43, 37, 32, 0.10);
  --card-border: transparent;

  /* ceremony surface — stays distinct from the page in BOTH modes */
  --ceremony-bg: var(--ink);
  --ceremony-border: transparent;

  /* placeholder pill (legal pages) */
  --ph-bg: rgba(176, 122, 42, 0.16);
  --ph-border: var(--ochre);
  --ph-text: #8A5A1F;

  color-scheme: light;
}

/* ---- role tokens (dark = AppTheme.dark(), the ink/ceremony theme) ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink-deep);
    --surface: rgba(239, 230, 214, 0.06);  /* PaperCard on ink */
    --surface-2: var(--ink-raised);
    --border: rgba(239, 230, 214, 0.15);   /* lineColor on dark */
    --text: var(--sand);
    --text-muted: var(--muted-on-ink);
    --accent: var(--terracotta-light);
    --accent-fill: var(--terracotta-light);  /* 6.65:1 on --accent-ink */
    --accent-ink: #241A14;
    --wordmark-copper: var(--brand-copper-light);

    --status-good: var(--moss-on-ink);
    --status-progress: var(--terracotta-light);
    --status-bad: var(--rust-on-ink);
    --status-neutral: var(--muted-on-ink);

    --contour: rgba(239, 230, 214, 0.06);
    --card-shadow: none;
    --card-border: transparent;

    --ceremony-bg: var(--ink-raised);
    --ceremony-border: rgba(229, 139, 98, 0.35);

    --ph-bg: rgba(229, 139, 98, 0.14);
    --ph-border: var(--terracotta-light);
    --ph-text: #F0C9A8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink-deep);
  --surface: rgba(239, 230, 214, 0.06);
  --surface-2: var(--ink-raised);
  --border: rgba(239, 230, 214, 0.15);
  --text: var(--sand);
  --text-muted: var(--muted-on-ink);
  --accent: var(--terracotta-light);
  --accent-fill: var(--terracotta-light);  /* 6.65:1 on --accent-ink */
  --accent-ink: #241A14;
  --wordmark-copper: var(--brand-copper-light);

  --status-good: var(--moss-on-ink);
  --status-progress: var(--terracotta-light);
  --status-bad: var(--rust-on-ink);
  --status-neutral: var(--muted-on-ink);

  --contour: rgba(239, 230, 214, 0.06);
  --card-shadow: none;
  --card-border: transparent;

  --ceremony-bg: var(--ink-raised);
  --ceremony-border: rgba(229, 139, 98, 0.35);

  --ph-bg: rgba(229, 139, 98, 0.14);
  --ph-border: var(--terracotta-light);
  --ph-text: #F0C9A8;
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* AppTheme fontFamily: Zilla Slab */
  font-family: 'Zilla Slab', 'Zilla Slab Fallback', 'Zilla Slab Fallback Times', serif;
  font-size: 15px;           /* bodyMedium */
  line-height: 1.4;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- TopoBackground ----------
   _ContourPainter: concentric ovals, width = height * 1.35, radius step 19,
   focal Alignment(0.6, -0.6) -> 80% 20%, 1px stroke at 6% ink.
   Horizontal step 19 * 1.35 = 25.65px; the ellipse ratio makes the vertical
   step fall back out at 19px, same as the app.                             */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-radial-gradient(
    ellipse 135px 100px at 80% 20%,
    transparent 0, transparent 24.65px,
    var(--contour) 24.65px, var(--contour) 25.65px
  );
}

/* ---------- type primitives ---------- */
/* AppTheme.mono — Azeret Mono, serials / labels / timers / hashes */
.mono {
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace;
  font-size: 13px;
  letter-spacing: 0.6px;
}

/* Brand wordmark: Unbounded 600, -0.04em, "Own" ink + "Vouch" copper.
   Matches wordmark-horizontal-*.svg exactly. Set as live text rather than
   the SVG because an <img> SVG can't reach the page's webfont. */
.wordmark {
  font-family: 'Unbounded', 'Unbounded Fallback', sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.wordmark span { color: var(--wordmark-copper); }

/* AppTheme.eyebrow — 10px tracked uppercase mono */
.eyebrow {
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace;
  font-size: 10px;
  letter-spacing: 1.2px;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

/* SerialText — mono with the last group in the accent */
.serial { font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; letter-spacing: 0.6px; }
.serial .tail { color: var(--accent); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; background: var(--ink);
  color: var(--paper); padding: 10px 16px; border-radius: var(--radius-control);
  z-index: 100; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- PaperCard ----------
   Surface + radius 20 + a 1px hairline shadow. On ink it becomes a
   translucent raised panel with no shadow — exactly like the widget.      */
.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 18px;
}

/* ---------- StatusChip ----------
   tone @ 12% fill, tone @ 40% hairline, 7px dot, eyebrow label in tone.   */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace;
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent);
  white-space: nowrap;
}
.chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--tone); flex-shrink: 0;
}
.chip-good     { --tone: var(--status-good); }
.chip-progress { --tone: var(--status-progress); }
.chip-bad      { --tone: var(--status-bad); }
.chip-neutral  { --tone: var(--status-neutral); }

/* ---------- ContourRing ----------
   The "hold to seal" motif: concentric rings in the accent, outer rings
   dimmed to 45% like _RingPainter.                                        */
.contour-ring {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  position: relative;
  border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.contour-ring::before, .contour-ring::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.contour-ring::before { inset: 5px; }
.contour-ring::after  { inset: 11px; border-color: var(--accent); }

/* ---------- buttons ----------
   filledButtonTheme / outlinedButtonTheme: radius 12, min height 52,
   textStyle labelLarge = Zilla Slab 15 / w600. Not mono, not uppercase.   */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  letter-spacing: 0; text-decoration: none;
  min-height: var(--control-height); min-width: 64px; padding: 0 24px;
  border-radius: var(--radius-control); border: 1px solid transparent;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-fill) 88%, var(--ink)); }
/* outlinedButtonTheme: 1.5px ink side, ink label */
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- inputs ----------
   inputDecorationTheme: filled surface, padding 16, radius 12, hairline
   border, 1.5px accent on focus.                                          */
.field {
  width: 100%;
  font-family: inherit; font-size: 17px; /* bodyLarge */
  padding: 16px; border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.field::placeholder { color: var(--text-muted); }
.field:focus { outline: none; border: 1.5px solid var(--accent); padding: 15.5px; }

/* ---------- site header ---------- */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 16px 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
/* Inline SVG mark: width/height attributes reserve its box before CSS loads (no CLS).
   The two theme variants are <symbol>s in the per-page .svg-sprite. */
.logo-mark { display: block; flex-shrink: 0; }
.brand .logo-mark { width: 22px; height: 34px; }
.logo-mark-sm { width: 14px; height: 22px; }
.brand .wordmark { font-size: 19px; color: var(--text); }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Swap logo art with theme: ink+copper on sand, reversed on ink */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.site-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--text); font-size: 15px; }
.site-nav a:hover { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 80px; }
.site-footer .top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
  padding: 48px 20px 32px;
}
.site-footer .col h2 { margin: 0 0 14px; }
.site-footer .col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer .col a { text-decoration: none; color: var(--text-muted); font-size: 15px; }
.site-footer .col a:hover { color: var(--accent); }
.site-footer .brand-blurb { max-width: 34ch; color: var(--text-muted); font-size: 14px; margin-top: 12px; line-height: 1.4; }
.site-footer .bottom {
  border-top: 1px solid var(--border); padding: 18px 20px 32px;
  color: var(--text-muted); font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
@media (max-width: 720px) {
  .site-footer .top { grid-template-columns: 1fr 1fr; }
}

/* ---------- legal / doc pages ---------- */
.legal-shell { padding: 8px 0 0; }
.legal-banner {
  margin: 24px 0; padding: 18px; border-radius: var(--radius-card);
  background: var(--ph-bg); border: 1px solid var(--ph-border);
}
.legal-banner .eyebrow { color: var(--ph-text); display: block; margin-bottom: 6px; }
.legal-banner p { margin: 6px 0 0; font-size: 14px; line-height: 1.4; max-width: 74ch; }

.legal-layout { display: grid; grid-template-columns: 220px 1fr; gap: 36px; padding: 12px 0 80px; align-items: start; }
@media (max-width: 820px) { .legal-layout { grid-template-columns: 1fr; } }

.legal-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 820px) {
  .legal-nav { position: static; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
}
.legal-nav a {
  display: block; padding: 10px 12px; border-radius: var(--radius-control); text-decoration: none;
  color: var(--text-muted); font-size: 15px; white-space: nowrap; border: 1px solid transparent;
}
.legal-nav a:hover { background: var(--surface); color: var(--text); }
.legal-nav a[aria-current="page"] { background: var(--surface); color: var(--text); border-color: var(--border); font-weight: 600; }

/* PaperCard */
.doc {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  padding: 36px clamp(20px, 4vw, 52px); margin-bottom: 28px;
}
.doc .eff-date { font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; color: var(--text-muted); font-size: 12px; letter-spacing: 0.6px; margin-bottom: 26px; }
/* headlineSmall 28 / w600 / 1.1 */
.doc h1 { font-size: clamp(26px, 3.6vw, 28px); font-weight: 600; margin-bottom: 4px; line-height: 1.1; }
/* titleMedium 17 / w600 */
.doc h2 { font-size: 17px; font-weight: 600; margin: 34px 0 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.doc h2:first-of-type { border-top: none; padding-top: 0; margin-top: 22px; }
/* bodyMedium 15 / 1.4 — nudged to 1.6 for long-form legal reading */
.doc p { font-size: 15px; line-height: 1.6; max-width: 70ch; margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; max-width: 68ch; }
.doc li { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--accent); }
.doc ol { margin: 0 0 16px; padding-left: 22px; max-width: 68ch; }
.doc ol li { padding-left: 4px; }
.doc h3 { font-size: 15px; font-weight: 600; margin: 20px 0 6px; }
.doc h3 + p { margin-bottom: 12px; }
.doc { min-width: 0; } /* grid item: let .table-wrap scroll instead of widening the page */
.doc .table-wrap { overflow-x: auto; margin: 0 0 18px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14px; line-height: 1.5; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); }
.doc th { font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 10px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }

/* Visible breadcrumb, mirrors the BreadcrumbList JSON-LD */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 12px; letter-spacing: 0.6px; color: var(--text-muted); }
.doc .breadcrumb li { margin: 0; padding: 0; font-size: inherit; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- blog ---------- */
.post-shell { padding-top: 12px; }
.post { max-width: 780px; margin: 12px auto 28px; }
.doc .post-dek { font-size: 17px; line-height: 1.45; color: var(--text-muted); margin: 12px 0 14px; max-width: 60ch; }
.doc .post-meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 26px;
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 12px; letter-spacing: 0.6px; color: var(--text-muted);
}
.doc .quick-answer { border-left: 3px solid var(--accent); margin-bottom: 8px; }
.doc .callout + h2 { margin-top: 30px; }
.doc ol.sources li { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

.post-cta {
  max-width: 780px; margin: 0 auto 36px; padding: 26px clamp(20px, 4vw, 36px);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-card);
  display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
}
.post-cta > div { flex: 1 1 320px; }
.post-cta h2 { font-size: 22px; font-weight: 600; line-height: 1.1; margin: 8px 0 8px; }
.post-cta p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-muted); max-width: 52ch; }

.post-related { max-width: 780px; margin: 0 auto; }
.post-related > h2 { margin: 0 0 14px; }

.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }
.post-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-card);
  box-shadow: var(--card-shadow); padding: 20px;
}
.post-card a { color: var(--text); text-decoration: none; font-size: 17px; font-weight: 600; line-height: 1.25; }
.post-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card is the link */
.post-card:hover a { color: var(--accent); }
.post-card a:focus-visible { outline: none; }
.post-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.post-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-muted); }

.blog-shell { padding-top: 12px; }
.blog-head { max-width: 62ch; padding: 36px 0 12px; }
.blog-head h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 600; line-height: 1.05; margin: 12px 0 16px; }
.blog-head > p { font-size: 17px; line-height: 1.45; color: var(--text-muted); margin: 0 0 22px; }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-cats a {
  text-decoration: none; color: var(--text); font-size: 14px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.blog-cats a:hover { border-color: var(--accent); color: var(--accent); }
.blog-section { padding: 44px 0 0; scroll-margin-top: 16px; }
.blog-section-head { margin-bottom: 18px; }
.blog-section-head h2 { font-size: 22px; font-weight: 600; line-height: 1.1; margin: 0 0 6px; }
.blog-section-head p { margin: 0; color: var(--text-muted); font-size: 15px; }
.callout { background: var(--surface-2); border-radius: var(--radius-control); padding: 16px; margin: 0 0 16px; border: 1px solid var(--border); }
.callout p { margin: 0; }

.ph {
  display: inline-block; font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 12px;
  background: var(--ph-bg); border: 1px dashed var(--ph-border); color: var(--ph-text);
  padding: 1px 7px; border-radius: 6px; font-weight: 500; letter-spacing: .2px;
}

/* ---------- landing page ---------- */
/* The contour lives on body::before, so the hero just needs room. */
.hero { position: relative; padding: 96px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
/* headlineLarge 34 / w600 / 1.05 — scaled up for the web hero */
.hero h1 { font-size: clamp(38px, 6vw, 58px); font-weight: 600; line-height: 1.05; margin: 18px 0 22px; }
.hero h1 .accent { color: var(--accent); display: block; }
/* bodyLarge 17 / 1.45 */
.hero p.lede { font-size: 17px; line-height: 1.45; max-width: 46ch; color: var(--text-muted); margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--text-muted); }

/* certificate — a PaperCard */
.certificate {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  padding: 26px 28px; max-width: 420px; margin-left: auto;
}
.certificate .cert-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.certificate .wordmark-sm { font-size: 14px; }
.certificate .eyebrow-flush { margin-bottom: 0; }
.certificate .custody-trail-follow { margin-top: 6px; }
.certificate .cert-id {
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 12px; letter-spacing: 0.6px;
  color: var(--text-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 12px 0; margin: 14px 0 18px;
}
.certificate dl { margin: 0; }
/* KeyValueRow */
.certificate .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; gap: 12px; }
.certificate dt {
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 10px;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted);
}
/* titleSmall 15 / w600 */
.certificate dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; text-align: left; }
.certificate .custody { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.certificate .custody-trail {
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 12px; letter-spacing: 0.6px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.certificate .custody-trail .you {
  background: var(--accent-fill); color: var(--accent-ink);
  padding: 2px 8px; border-radius: 6px; font-weight: 600;
}

section.band { padding: 72px 0; }
/* "alt" is paper, not ink — ink stays reserved for the ceremony band */
section.band.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-head { max-width: 56ch; margin-bottom: 44px; }
/* headlineSmall 28 / w600 / 1.1 */
.band-head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 600; line-height: 1.1; margin: 10px 0 14px; }
.band-head p { color: var(--text-muted); font-size: 17px; line-height: 1.45; margin: 0; }

/* ---------- public lookup ----------
   Mirrors lib/screens/lookup/lookup_screen.dart: mono serial field +
   Check, then a verdict PaperCard whose hairline carries the tone.      */
.lookup-form { display: flex; gap: 10px; max-width: 520px; margin: 22px 0 10px; flex-wrap: wrap; }
.lookup-form .field {
  flex: 1; min-width: 200px;
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace;
  font-size: 16px; letter-spacing: 1px; text-transform: uppercase;
}
.lookup-form .field::placeholder { text-transform: none; letter-spacing: 0.6px; }
.lookup-form .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.lookup-form .btn svg { width: 18px; height: 18px; }
.lookup-hint { font-size: 10px; color: var(--text-muted); }

.lookup-result { max-width: 520px; margin-top: 20px; }
.lookup-idle { color: var(--text-muted); font-size: 14px; line-height: 1.4; margin: 0; }

/* busy — progressIndicatorTheme(color: accent) */
.lookup-spinner { display: flex; justify-content: center; padding: 40px 0; }
.lookup-spinner::after {
  content: ""; width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: lookup-spin .8s linear infinite;
}
@keyframes lookup-spin { to { transform: rotate(360deg); } }

/* ErrorBanner — radiusControl, bad @ 8% fill, bad @ 35% hairline */
.error-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 16px; margin: 8px 0; border-radius: var(--radius-control);
  color: var(--status-bad);
  background: color-mix(in srgb, var(--status-bad) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-bad) 35%, transparent);
}
.error-banner svg { width: 20px; height: 20px; flex-shrink: 0; }
.error-banner p { margin: 0; flex: 1; font-size: 15px; line-height: 1.4; }
.error-banner button {
  background: none; border: 0; cursor: pointer; padding: 6px 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; color: inherit;
  border-radius: 8px;
}
.error-banner button:hover { background: color-mix(in srgb, var(--status-bad) 12%, transparent); }

/* _Verdict — PaperCard with borderColor: tone @ 60% */
.verdict {
  background: var(--surface); border-radius: var(--radius-card);
  box-shadow: var(--card-shadow); padding: 18px;
  border: 1px solid color-mix(in srgb, var(--tone) 60%, transparent);
}
.verdict-good    { --tone: var(--status-good); }
.verdict-bad     { --tone: var(--status-bad); }
.verdict-neutral { --tone: var(--status-neutral); }
.verdict-head { display: flex; align-items: center; gap: 8px; }
.verdict-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tone); flex-shrink: 0; }
.verdict-title { color: var(--tone); flex: 1; }
.verdict-serial { color: var(--text-muted); white-space: nowrap; }
/* headlineSmall 28 / w600 / 1.1 */
.verdict-model { font-size: 28px; font-weight: 600; line-height: 1.1; margin: 12px 0 0; }
.verdict-category { color: var(--text-muted); font-size: 14px; line-height: 1.4; margin: 2px 0 0; }
.verdict-body { font-size: 15px; line-height: 1.4; margin: 10px 0 0; }

/* Chain-of-custody row — PaperCard with a chevron */
.custody-card {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  padding: 18px; margin-top: 10px;
}
.custody-card:hover { border-color: var(--border); }
.custody-card div { flex: 1; }
.custody-card h4 { font-size: 17px; font-weight: 600; margin: 0; }
.custody-card p { color: var(--text-muted); font-size: 14px; line-height: 1.4; margin: 2px 0 0; }
.custody-card svg { width: 22px; height: 22px; color: var(--text-muted); flex-shrink: 0; }

.lookup-cta { margin-top: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
/* StepDots / eyebrow numbering */
.step .num {
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; font-size: 10px;
  letter-spacing: 1.2px; color: var(--accent); margin-bottom: 10px; display: block;
}
/* titleLarge 22 / w600 / 1.1 */
.step h3 { font-size: 22px; font-weight: 600; line-height: 1.1; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 15px; line-height: 1.4; margin: 0; }

/* ---------- the one ink surface on the page ----------
   A handover is the ceremony. This is the only place ink is allowed, and
   it must stay visibly raised off the page in dark mode too.              */
.ceremony-card {
  background: var(--ceremony-bg); color: var(--sand);
  border: 1px solid var(--ceremony-border);
  border-radius: var(--radius-card); padding: 34px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
/* TopoBackground on ink — sand @ 6% */
.ceremony-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-radial-gradient(
    ellipse 135px 100px at 80% 20%,
    transparent 0, transparent 24.65px,
    rgba(239, 230, 214, 0.06) 24.65px, rgba(239, 230, 214, 0.06) 25.65px
  );
}
.ceremony-card > * { position: relative; }
.ceremony-card .eyebrow { color: var(--muted-on-ink); }
.ceremony-card h3 { color: var(--paper); font-size: 22px; font-weight: 600; line-height: 1.1; margin: 8px 0 4px; }
.ceremony-card p { color: var(--muted-on-ink); margin: 0; font-size: 15px; line-height: 1.4; }
.ceremony-seal { display: flex; align-items: center; gap: 16px; }
/* on ink the chip tones come from AppStatusColors.dark */
.ceremony-card .chip-good { --tone: var(--moss-on-ink); }
.ceremony-card .contour-ring { --accent: var(--terracotta-light); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
/* PaperCard */
.feature {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px;
}
/* titleMedium 17 / w600 */
.feature h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 15px; line-height: 1.4; margin: 0; }

.faq-list { max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  padding: 2px 22px;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 0; margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 17px; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border);
  position: relative;
}
.faq-item summary .plus::before, .faq-item summary .plus::after {
  content: ""; position: absolute; background: var(--accent);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq-item summary .plus::before { width: 10px; height: 1.6px; }
.faq-item summary .plus::after { width: 1.6px; height: 10px; transition: transform .15s ease; }
.faq-item[open] summary .plus::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0); }
.faq-item p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0 0 20px; max-width: 66ch; }
.faq-item a { color: var(--accent); }

.cta-band { text-align: center; padding: 88px 0; }
.cta-band h2 { font-size: clamp(30px, 5vw, 44px); font-weight: 600; line-height: 1.05; margin-bottom: 16px; }
.cta-band > .container > p { color: var(--text-muted); max-width: 48ch; margin: 0 auto 30px; font-size: 17px; line-height: 1.45; }

/* ---------- beta signup form ----------
   Controls follow inputDecorationTheme (radius 12, 16px padding, surface
   fill, 1.5px accent on focus) and the segmented choices follow
   chipTheme: stadium, hairline, mono label, selected fills with ink.    */
.beta-card {
  background: var(--surface); border: 1px solid var(--card-border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  padding: clamp(22px, 4vw, 36px); max-width: 720px; margin: 28px auto 0;
  text-align: left;
}
.beta-form { display: flex; flex-direction: column; gap: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.form-row { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-row.full { grid-column: 1 / -1; }

.form-label { font-size: 14px; font-weight: 600; color: var(--text); }
.form-label .opt { font-weight: 400; color: var(--text-muted); }
.form-hint { font-size: 13px; line-height: 1.4; color: var(--text-muted); margin: 0; }

/* select + textarea share the .field box with inputs */
select.field {
  appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6E62' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
textarea.field { resize: vertical; min-height: 96px; line-height: 1.4; font-size: 15px; }
.field:disabled { opacity: .55; cursor: not-allowed; }
.char-count { font-size: 12px; color: var(--text-muted); text-align: right; font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace; }

/* chipTheme — segmented single-choice */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chip-group legend { padding: 0; }
.chip-group input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-group label {
  display: inline-flex; align-items: center; cursor: pointer;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
  font-family: 'Azeret Mono', 'Azeret Mono Fallback', 'Azeret Mono Fallback Courier', monospace;
  font-size: 12px; letter-spacing: .6px; color: var(--text-muted);
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.chip-group label:hover { border-color: var(--accent); color: var(--text); }
.chip-group input:checked + label {
  background: var(--text); border-color: var(--text); color: var(--bg);
}
.chip-group input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* consent + opt-in */
.check-row { display: flex; align-items: flex-start; gap: 11px; }
.check-row input[type="checkbox"] {
  appearance: none; flex-shrink: 0; margin: 1px 0 0;
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--bg); cursor: pointer;
}
.check-row input[type="checkbox"]:checked {
  background: var(--accent-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F8F2E6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
  border-color: var(--accent-fill);
}
.check-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check-row label { font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; }
.check-row a { color: var(--accent); }
.consent-block { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); padding-top: 20px; }

.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-actions .btn[aria-busy="true"] { opacity: .6; cursor: progress; }

/* per-field validation message */
.field-error { font-size: 13px; color: var(--status-bad); margin: 0; }
.field.invalid, .field[aria-invalid="true"] { border-color: var(--status-bad); }

/* success — replaces the form */
.beta-done { text-align: left; }
.beta-done h3 { font-size: 28px; font-weight: 600; line-height: 1.1; margin: 14px 0 8px; }
.beta-done p { color: var(--text-muted); font-size: 15px; line-height: 1.45; margin: 0 0 8px; max-width: 54ch; }
