/* =====================================================================
   Lil A · "Estate" theme
   Dark luxury, private-bank grade. Forest-black canvas, warm gold hairlines,
   AAA green used sparingly for "current / eligible" signals.
   Shared by home.html, viewer.html, check.html, archive.html.
   Every color is a token: dark below, the light palette under :root[data-theme="light"].
   Layout, type and motion are the same in both.
   ===================================================================== */

:root {
  /* rgb triples for tinted overlays, used as rgba(var(--x-rgb), alpha) */
  --ink-rgb: 255, 255, 255;     /* neutral hover tints and hairlines */
  --gold-rgb: 232, 195, 138;    /* gold tints, hairlines, glows */
  --bg-rgb: 11, 19, 16;         /* the canvas: header, photo veils, sticky bars */
  --well-rgb: 6, 12, 9;         /* inputs, tables, segmented controls */
  --well2-rgb: 8, 15, 11;       /* ask box and chips over the photo */
  --deep-rgb: 9, 16, 13;        /* composer bar, seal core, fab ring */

  /* Canvas and surfaces (forest-black, layered) */
  --bg-0: #0B1310;
  --bg-1: #0F1C16;
  --s-1: #13221B;
  --s-2: #182A21;
  --s-3: #1F3529;
  --well: rgba(var(--well-rgb), .55);

  /* Gold (from the AAA slide deck) */
  --gold: #E8C38A;
  --gold-2: #F2D9AE;
  --gold-3: #C9A66D;
  --gold-ink: #1A1408;
  --gold-grad: linear-gradient(180deg, #F2D6A8 0%, #E3BA7C 100%);
  --gold-a05: rgba(var(--gold-rgb), .05);
  --gold-a10: rgba(var(--gold-rgb), .10);
  --gold-a16: rgba(var(--gold-rgb), .16);
  --line-gold: rgba(var(--gold-rgb), .18);
  --line-gold-2: rgba(var(--gold-rgb), .34);
  --line: rgba(var(--ink-rgb), .07);
  --line-2: rgba(var(--ink-rgb), .12);

  /* Text: warm ivory, never pure white */
  --ivory: #F5F1E8;
  --text-1: #E9E4D9;
  --text-2: #BCC5BB;
  --text-3: #94A096;
  --text-4: #7A867C;

  /* Brand + semantic */
  --green: #40A629;
  --green-2: #7CCB62;
  --forest: #306B4B;
  --amber: #E6AE5C;
  --crimson: #D98479;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .45);
  --sh-2: 0 1px 3px rgba(0, 0, 0, .4), 0 10px 24px -10px rgba(0, 0, 0, .6);
  --sh-3: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 48px -18px rgba(0, 0, 0, .7);
  --sh-4: 0 6px 14px rgba(0, 0, 0, .35), 0 40px 80px -24px rgba(0, 0, 0, .8);

  /* Component surfaces */
  --card-bg: linear-gradient(180deg, rgba(31, 53, 41, .62) 0%, rgba(19, 34, 27, .78) 100%);
  --glass-bg: linear-gradient(180deg, rgba(22, 39, 30, .80) 0%, rgba(11, 19, 16, .88) 100%);
  --pop-bg: rgba(19, 34, 27, .97);
  --pop-bg-2: rgba(24, 42, 33, .97);
  --panel-bg: linear-gradient(180deg, #13221B 0%, #0F1C16 100%);
  --foot-bg: linear-gradient(180deg, rgba(15, 28, 22, .9), #0A110E);
  --doc-bg: #09100D;
  --fab-bg: linear-gradient(180deg, #22392C 0%, #152820 100%);
  --av-bg: radial-gradient(circle at 50% 30%, #22392C 0%, #12201A 70%);
  --av-gap: #0F1C16;
  --av-shadow: 0 4px 12px -4px rgba(0, 0, 0, .6);
  --bubble-bg: linear-gradient(180deg, #213D2F 0%, #1A3226 100%);
  --bubble-line: rgba(124, 203, 98, .16);
  --gold-fill: #E8C38A;
  --crimson-ink: #F0C0B8;
  --ok: #8FD174;
  --hero-lede: #CFD5CB;
  --hero-img-filter: saturate(.86) brightness(.86);
  --banner-img-filter: saturate(.8) brightness(.78);
  --glow-green: rgba(48, 107, 75, .20);
  --mark-house: #F5F1E8;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: 240ms;

  --hdr-h: 72px;
  --gutter: 32px;
  --wrap: 1200px;
}
@media (max-width: 720px) {
  :root { --hdr-h: 64px; --gutter: 16px; }
}

/* Light: warm paper canvas, white surfaces, deep-gold accents (gold text darkened to stay readable on white) */
:root[data-theme="light"] {
  color-scheme: light;

  --ink-rgb: 22, 38, 30;
  --gold-rgb: 168, 128, 60;
  --bg-rgb: 250, 248, 243;
  --well-rgb: 243, 240, 232;
  --well2-rgb: 255, 255, 255;
  --deep-rgb: 255, 255, 255;

  --bg-0: #FAF8F3;
  --bg-1: #F3F0E8;
  --s-1: #FFFFFF;
  --s-2: #FFFFFF;
  --s-3: #F3F0E8;

  --gold: #80612A;
  --gold-2: #6B4F1F;
  --gold-3: #8A6C38;
  --gold-grad: linear-gradient(180deg, #EDCF9E 0%, #DAB070 100%);
  --line-gold: rgba(var(--gold-rgb), .24);
  --line-gold-2: rgba(var(--gold-rgb), .40);
  --line: rgba(var(--ink-rgb), .09);
  --line-2: rgba(var(--ink-rgb), .15);

  --ivory: #0F1B15;
  --text-1: #1F2C25;
  --text-2: #46534C;
  --text-3: #626F68;
  --text-4: #8B958F;

  --green-2: #2F7A22;
  --amber: #9E640E;
  --crimson: #B04537;

  --sh-1: 0 1px 2px rgba(22, 38, 30, .08);
  --sh-2: 0 1px 3px rgba(22, 38, 30, .06), 0 10px 24px -12px rgba(22, 38, 30, .14);
  --sh-3: 0 2px 6px rgba(22, 38, 30, .06), 0 24px 48px -20px rgba(22, 38, 30, .20);
  --sh-4: 0 6px 14px rgba(22, 38, 30, .08), 0 40px 80px -28px rgba(22, 38, 30, .28);

  --card-bg: #FFFFFF;
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, .88) 0%, rgba(250, 248, 243, .94) 100%);
  --pop-bg: rgba(255, 255, 255, .98);
  --pop-bg-2: rgba(255, 255, 255, .98);
  --panel-bg: linear-gradient(180deg, #FFFFFF 0%, #FBFAF6 100%);
  --foot-bg: linear-gradient(180deg, #F3F0E8, #EDE9DF);
  --doc-bg: #ECE9E1;
  --fab-bg: linear-gradient(180deg, #FFFFFF 0%, #F5F2EA 100%);
  --av-bg: radial-gradient(circle at 50% 30%, #FFFFFF 0%, #F2EDE1 70%);
  --av-gap: #FFFFFF;
  --av-shadow: 0 4px 12px -6px rgba(22, 38, 30, .25);
  --bubble-bg: linear-gradient(180deg, #EAF3E5 0%, #E1EDDB 100%);
  --bubble-line: rgba(64, 166, 41, .22);
  --gold-fill: #DDB677;
  --crimson-ink: #8E2F23;
  --ok: #2F7A22;
  --hero-lede: #3E4B44;
  --hero-img-filter: saturate(.92) brightness(1.04);
  --banner-img-filter: saturate(.85) brightness(1.05);
  --glow-green: rgba(48, 107, 75, .07);
  --mark-house: #4A4A4A;
}

/* Logos: the reversed logo on dark, the standard one on light (the hidden one is lazy and never loads) */
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }

/* Light/dark switch: shows the mode it switches to */
.theme-btn .ic-moon { display: none; }
:root[data-theme="light"] .theme-btn .ic-sun { display: none; }
:root[data-theme="light"] .theme-btn .ic-moon { display: block; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg-0); color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text-1);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "lnum" 1;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -8%, var(--glow-green), transparent 62%),
    radial-gradient(700px 480px at -10% 110%, rgba(var(--gold-rgb), .05), transparent 60%);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: rgba(var(--gold-rgb), .32); color: var(--ivory); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-sm); background: var(--gold-fill); color: var(--gold-ink); font-weight: 700; transition: top var(--t) var(--ease); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(var(--gold-rgb), .22) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(var(--gold-rgb), .18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--gold-rgb), .32); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- type */
.display { font-family: var(--serif); font-weight: 500; color: var(--ivory); letter-spacing: -.01em; line-height: 1.05; font-variant-numeric: lining-nums; }
.serif { font-family: var(--serif); font-variant-numeric: lining-nums; }
.kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); line-height: 1.4;
}
.kicker-quiet { color: var(--text-3); }
.lede { color: var(--text-2); font-size: 18px; line-height: 1.6; max-width: 34em; }
.muted { color: var(--text-3); }
.num, .tnum { font-variant-numeric: tabular-nums lining-nums; }
.gold { color: var(--gold); }

/* ---------------------------------------------------------------- icons */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), filter var(--t) var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: var(--gold-grad); color: var(--gold-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--sh-1), 0 10px 26px -12px rgba(var(--gold-rgb), .55);
}
.btn-gold:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), var(--sh-1), 0 14px 32px -12px rgba(var(--gold-rgb), .7); }
.btn-gold:disabled { filter: saturate(.3) brightness(.7); cursor: not-allowed; box-shadow: none; }
.btn-line { border-color: var(--line-gold-2); color: var(--ivory); background: rgba(var(--ink-rgb), .02); }
.btn-line:hover { border-color: rgba(var(--gold-rgb), .6); background: var(--gold-a10); }
.btn-text { color: var(--text-2); padding: 0 12px; }
.btn-text:hover { color: var(--ivory); background: rgba(var(--ink-rgb), .05); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }

.ibtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; color: var(--text-2);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.ibtn:hover { background: rgba(var(--ink-rgb), .06); color: var(--ivory); }
.ibtn[aria-pressed="true"] { color: var(--gold); background: var(--gold-a10); }
.ibtn-sm { width: 36px; height: 36px; }
.ibtn-sm .ic { width: 18px; height: 18px; }
@media (pointer: coarse) { .ibtn-sm { width: 44px; height: 44px; } }

.link { color: var(--gold); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(var(--gold-rgb), .4); text-underline-offset: 3px; transition: text-decoration-color var(--t) var(--ease); }
.link:hover { text-decoration-color: var(--gold); }

/* ---------------------------------------------------------------- segmented controls (channel + document kind) */
.seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px; border: 1px solid var(--line-gold); background: rgba(var(--well-rgb), .45);
}
.seg a, .seg button {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.seg a:hover { color: var(--ivory); background: rgba(var(--ink-rgb), .05); }
.seg [aria-current] {
  color: var(--gold-2); background: rgba(var(--gold-rgb), .14);
  box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .42);
}
.seg [aria-current]:hover { color: var(--gold-2); background: rgba(var(--gold-rgb), .16); }
@media (pointer: coarse) { .seg a, .seg button { min-height: 40px; } }

/* status dot + pill */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.status-ok { color: var(--green-2); }
.status-ok i { background: var(--green); box-shadow: 0 0 0 3px rgba(64, 166, 41, .18), 0 0 12px rgba(64, 166, 41, .6); }
.status-wait { color: var(--gold); }
.status-wait i { background: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .16); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; white-space: nowrap;
  color: var(--text-2); border: 1px solid var(--line-2); background: rgba(var(--ink-rgb), .03);
}
.badge-latest { color: var(--green-2); border-color: rgba(124, 203, 98, .35); background: rgba(64, 166, 41, .10); }
.badge-gold { color: var(--gold-2); border-color: var(--line-gold-2); background: var(--gold-a10); }

/* ---------------------------------------------------------------- cards */
.card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--line-gold);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--sh-2);
}
.card-hover { transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease), background-color var(--t) var(--ease); }
.card-hover:hover {
  border-color: var(--line-gold-2);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 0 0 1px rgba(var(--gold-rgb), .06), inset 0 0 56px rgba(var(--gold-rgb), .07), var(--sh-3);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-title { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--ivory); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lbl { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; display: flex; justify-content: space-between; gap: 8px; }
.lbl .opt { color: var(--text-3); font-weight: 500; }
.inp {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--well); border: 1px solid var(--line-2); border-radius: var(--r-md);
  color: var(--ivory); font-size: 16px; font-weight: 500; line-height: 1.4;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
  font-variant-numeric: tabular-nums lining-nums;
}
.inp::placeholder { color: var(--text-4); font-weight: 400; }
.inp:hover { border-color: rgba(var(--ink-rgb), .2); }
.inp:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .18); background: rgba(var(--well-rgb), .75); }
.inp[aria-invalid="true"] { border-color: var(--crimson); }
textarea.inp { resize: vertical; min-height: 96px; line-height: 1.55; }
select.inp { appearance: none; -webkit-appearance: none; cursor: pointer; }   /* no arrow, by request */
select.inp:invalid, select.inp.is-empty { color: var(--text-4); font-weight: 400; }
select.inp option, select.inp optgroup { background: var(--s-1); color: var(--ivory); font-weight: 500; }
select.inp optgroup { color: var(--gold); font-weight: 700; }
.affix { position: relative; display: flex; align-items: center; }
.affix .inp { padding-left: 32px; }
.affix-pre, .affix-suf { position: absolute; color: var(--gold-3); font-weight: 600; pointer-events: none; font-size: 16px; }
.affix-pre { left: 14px; }
.affix-suf { right: 14px; }
.affix.has-suf .inp { padding-left: 14px; padding-right: 36px; }
.field-hint { font-size: 13px; color: var(--text-3); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--well);
  color: var(--text-1); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.check-chip:hover { border-color: rgba(var(--ink-rgb), .2); }
.check-chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.check-chip:has(input:checked) { border-color: var(--gold); background: rgba(var(--gold-rgb), .10); color: var(--ivory); }
.check-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .18); }
.form-error {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(217, 132, 121, .10); border: 1px solid rgba(217, 132, 121, .35); color: var(--crimson-ink); font-size: 14px;
}

/* ---------------------------------------------------------------- header */
.hdr {
  position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: rgba(var(--bg-rgb), .84);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
}
.hdr::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(var(--gold-rgb), 0) 0%, rgba(var(--gold-rgb), .32) 18%, rgba(var(--gold-rgb), .32) 82%, rgba(var(--gold-rgb), 0) 100%);
}
.hdr--over { position: absolute; left: 0; right: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hdr--over::after { opacity: .55; }
.hdr-in { height: var(--hdr-h); display: flex; align-items: center; gap: 16px; }
.hdr-logo { display: flex; align-items: center; flex: none; padding: 6px 0; border-radius: 6px; }
.hdr-logo img { height: 36px; width: auto; }
.hdr-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.hdr-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.hdr-nav a:hover { color: var(--ivory); background: rgba(var(--ink-rgb), .05); }
.hdr-nav a[aria-current] { color: var(--gold-2); }
.hdr-nav a[aria-current]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px; background: var(--gold); opacity: .7; }
.hdr-right { display: flex; align-items: center; gap: 8px; flex: none; }
.hdr-menu { display: none; }
@media (max-width: 1080px) {
  .hdr-nav { display: none; }
  .hdr-right { margin-left: auto; }
  .hdr-menu { display: inline-grid; }
}
@media (max-width: 720px) {
  .hdr-logo img { height: 26px; }
  .hdr-in { gap: 8px; }
  .hdr .seg a { padding: 0 11px; font-size: 13px; }
}
@media (max-width: 360px) {
  .hdr-logo img { height: 22px; }
  .hdr .seg a { padding: 0 9px; font-size: 12px; }
}

/* phone navigation sheet */
.navsheet {
  position: fixed; z-index: 70; top: calc(var(--hdr-h) + env(safe-area-inset-top) + 8px);
  right: max(12px, env(safe-area-inset-right)); width: min(320px, calc(100vw - 24px));
  padding: 8px; border-radius: var(--r-lg);
  background: var(--pop-bg); border: 1px solid var(--line-gold-2); box-shadow: var(--sh-4);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; visibility: hidden;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
}
.navsheet.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.navsheet a {
  display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: var(--r-md);
  color: var(--text-1); font-weight: 500; font-size: 15px;
}
.navsheet a .ic { color: var(--gold-3); }
.navsheet a:hover, .navsheet a:focus-visible { background: rgba(var(--ink-rgb), .05); }
.navsheet a[aria-current] { color: var(--gold-2); background: var(--gold-a10); }
.navsheet a[aria-current] .ic { color: var(--gold); }
.navsheet hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }

/* ---------------------------------------------------------------- slim photo banner (checker, archive) */
.banner { position: relative; overflow: hidden; isolation: isolate; }
.banner-media { position: absolute; inset: 0; z-index: -1; }
.banner-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 34%; filter: var(--banner-img-filter); }
.banner-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), .97) 0%, rgba(var(--bg-rgb), .86) 42%, rgba(var(--bg-rgb), .52) 100%),
    linear-gradient(0deg, var(--bg-0) 0%, rgba(var(--bg-rgb), 0) 70%);
}
.banner-in { padding-top: 56px; padding-bottom: 48px; }
.banner h1 { font-size: 52px; margin-top: 12px; }
.banner .lede { margin-top: 14px; font-size: 17px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crumbs a { color: var(--text-2); font-size: 13px; font-weight: 600; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.crumbs a:hover { color: var(--gold-2); }
@media (max-width: 720px) {
  .banner-media::after { background: linear-gradient(90deg, rgba(var(--bg-rgb), .95), rgba(var(--bg-rgb), .78)), linear-gradient(0deg, var(--bg-0) 0%, rgba(var(--bg-rgb), 0) 70%); }
  .banner-in { padding-top: 32px; padding-bottom: 28px; }
  .banner h1 { font-size: 36px; margin-top: 10px; }
  .banner .lede { font-size: 15px; }
}

/* ---------------------------------------------------------------- footer + legal block */
.foot { position: relative; overflow: hidden; margin-top: 96px; border-top: 1px solid var(--line-gold); background: var(--foot-bg); padding-bottom: env(safe-area-inset-bottom); }
.foot-mark { position: absolute; right: -40px; bottom: -70px; width: 360px; color: rgba(var(--gold-rgb), .045); pointer-events: none; }
.foot-in { position: relative; display: grid; grid-template-columns: 1.1fr 1.6fr 1fr; gap: 48px; padding-top: 48px; padding-bottom: 32px; }
.foot-brand img { height: 34px; width: auto; }
.foot-legal { font-size: 14px; line-height: 1.75; color: var(--text-2); }
.foot-legal strong { color: var(--text-1); font-weight: 600; }
.foot-legal a:hover { color: var(--gold-2); }
.foot-legal .sep { color: var(--text-4); margin: 0 6px; }
.foot-eho { display: flex; align-items: flex-start; gap: 12px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.foot-eho svg { width: 36px; height: 36px; flex: none; color: var(--text-2); }
.foot-base { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.foot-base strong { color: var(--gold); font-weight: 600; }
@media (max-width: 900px) {
  .foot { margin-top: 64px; }
  .foot-in { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .foot-mark { width: 240px; bottom: -40px; }
}

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  background: var(--pop-bg-2); border: 1px solid var(--line-gold-2); color: var(--ivory); font-size: 14px; font-weight: 600;
  box-shadow: var(--sh-4); transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.toast .ic { color: var(--green-2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- avatar (the AAA mark in a thin gold ring, echo of the badge) */
.av {
  position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--av-bg);
  border: 1px solid rgba(var(--gold-rgb), .75);
  box-shadow: inset 0 0 0 2px var(--av-gap), inset 0 0 0 3px rgba(var(--gold-rgb), .28), var(--av-shadow);
}
.av svg { width: 46%; height: auto; color: var(--gold); }
.av svg.mark { width: 64%; color: var(--mark-house); }
.av-sm { width: 30px; height: 30px; }
.av-lg { width: 56px; height: 56px; }

/* ---------------------------------------------------------------- shimmer / motion primitives */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.rise { animation: rise 280ms var(--ease) both; }
.shimmer-text {
  background: linear-gradient(90deg, var(--text-3) 0%, var(--text-3) 35%, var(--gold-2) 50%, var(--text-3) 65%, var(--text-3) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 2.6s linear infinite;
}
.skel { border-radius: 6px; background: linear-gradient(90deg, rgba(var(--ink-rgb), .04) 0%, rgba(var(--gold-rgb), .10) 50%, rgba(var(--ink-rgb), .04) 100%); background-size: 200% 100%; animation: shimmer 2.2s linear infinite; }

/* =====================================================================
   Markdown prose (chat answers, verdict detail, notes)
   ===================================================================== */
.md { color: var(--text-1); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.md > * + * { margin-top: 12px; }
.md strong { color: var(--gold-2); font-weight: 700; }
.md em { color: var(--ivory); }
.md a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(var(--gold-rgb), .4); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--gold); }
.md h1, .md h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.25; color: var(--ivory); margin-top: 20px; }
.md h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.3; color: var(--ivory); margin-top: 18px; }
.md h4, .md h5, .md h6 { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 18px; }
.md > :first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 0; list-style: none; }
.md li { position: relative; padding-left: 22px; }
.md li + li { margin-top: 6px; }
.md ul > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); opacity: .85; }
.md ol { counter-reset: li; }
.md ol > li { counter-increment: li; padding-left: 28px; }
.md ol > li::before { content: counter(li) "."; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.md li > ul, .md li > ol { margin-top: 6px; }
.md code { font-family: var(--mono); font-size: .88em; padding: 2px 6px; border-radius: 6px; background: rgba(var(--ink-rgb), .06); color: var(--gold-2); }
.md pre { padding: 14px 16px; border-radius: var(--r-md); background: var(--well); border: 1px solid var(--line); overflow-x: auto; }
.md pre code { padding: 0; background: none; color: var(--text-1); }
.md blockquote { margin: 0; padding: 4px 0 4px 16px; border-left: 2px solid var(--gold-3); color: var(--text-2); font-style: italic; }
.md hr { border: 0; height: 1px; background: var(--line-gold); margin: 18px 0; }

/* Rate tables: a private-bank statement */
.tbl {
  margin-top: 14px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-gold); border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(var(--well-rgb), .5), rgba(var(--well-rgb), .3));
}
.md > .tbl + * { margin-top: 14px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
.tbl th {
  padding: 11px 14px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-3);
  background: rgba(var(--gold-rgb), .05); border-bottom: 1px solid var(--line-gold-2);
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text-1); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color 160ms var(--ease); }
.tbl tbody tr:hover { background: rgba(var(--ink-rgb), .025); }
.tbl .n { text-align: right; white-space: nowrap; }
.tbl td.n { color: var(--ivory); font-weight: 500; }
.tbl td strong { color: var(--gold-2); }
.tbl tr.total td { border-top: 1px solid var(--line-gold-2); color: var(--gold-2); font-weight: 700; background: rgba(var(--gold-rgb), .04); }
.tbl tbody tr.total:last-child td { border-bottom: 3px double var(--line-gold-2); }

/* =====================================================================
   Chat thread (viewer panel + checker follow-ups)
   ===================================================================== */
.thread { display: flex; flex-direction: column; gap: 28px; }
.msg { position: relative; animation: rise 280ms var(--ease) both; }
.msg > .av { position: absolute; left: 0; top: 0; }
.msg-head { display: flex; align-items: center; gap: 10px; min-height: 36px; padding-left: 48px; }
.msg-body > .md { margin-top: 10px; }
.msg-name { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.msg-meta { font-size: 12px; color: var(--text-3); }
.msg-body { min-width: 0; }
.msg-user { display: flex; justify-content: flex-end; animation: rise 240ms var(--ease) both; }
.bubble {
  max-width: min(88%, 560px); padding: 12px 16px; border-radius: 18px 18px 6px 18px;
  background: var(--bubble-bg); border: 1px solid var(--bubble-line);
  color: var(--ivory); font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: var(--sh-1);
}
.msg.is-streaming .md > :last-child:not(ul):not(ol):not(.tbl)::after,
.msg.is-streaming .md > ul:last-child > li:last-child::after,
.msg.is-streaming .md > ol:last-child > li:last-child::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.17em;
  background: var(--gold); border-radius: 1px; animation: caret 1s steps(1) infinite;
}
.thinking { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 30px; font-size: 15px; font-weight: 500; }
.thinking-ring { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(var(--gold-rgb), .2); border-top-color: var(--gold); animation: spin 1.1s linear infinite; flex: none; }
.thinking .elapsed { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.acts { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: 10px; margin-left: -8px; }
.acts .ibtn { color: var(--text-3); }
.acts .ibtn:hover { color: var(--ivory); }
.acts .ibtn[aria-pressed="true"] { color: var(--gold); }
.acts-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 6px; }
.acts-note { font-size: 13px; color: var(--text-3); margin-left: 6px; animation: fade var(--t) var(--ease) both; }
.acts-note.ok { color: var(--green-2); }
.msg-error {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(217, 132, 121, .08); border: 1px solid rgba(217, 132, 121, .28); color: var(--text-1); font-size: 15px;
}
.msg-error .ic { color: var(--crimson); margin-top: 2px; }
.msg-error small { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
.msg-error .btn { margin-top: 10px; }
.datechip { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px 6px 10px; border-radius: 999px; border: 1px solid var(--line-gold); background: var(--gold-a05); font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.datechip.warn { color: var(--gold-2); border-color: var(--line-gold-2); }

/* Suggestion chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-col { flex-direction: column; align-items: stretch; }
.chip {
  display: inline-flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 11px 16px 11px 14px;
  border-radius: 14px; border: 1px solid var(--line-gold); background: rgba(var(--ink-rgb), .025);
  color: var(--text-1); font-size: 14px; font-weight: 500; line-height: 1.45; text-align: left;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.chip .ic { width: 16px; height: 16px; color: var(--gold-3); margin-top: 2px; transition: transform var(--t) var(--ease), color var(--t) var(--ease); }
.chip:hover { border-color: rgba(var(--gold-rgb), .45); background: var(--gold-a10); color: var(--ivory); }
.chip:hover .ic { color: var(--gold); transform: translate(1px, -1px); }
.chip:disabled { opacity: .5; cursor: not-allowed; }

/* Composer */
.composer-box {
  display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px;
  background: var(--well); border: 1px solid var(--line-2); border-radius: 18px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}
.composer-box:hover { border-color: rgba(var(--ink-rgb), .2); }
.composer-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .16); background: rgba(var(--well-rgb), .78); }
.composer-box textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 180px; padding: 11px 0; resize: none; border: 0; background: transparent;
  color: var(--ivory); font-size: 16px; line-height: 1.45;
}
.composer-box textarea::placeholder { color: var(--text-4); }
.composer-box textarea:focus-visible { outline: none; }
.send {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-grad); color: var(--gold-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px -8px rgba(var(--gold-rgb), .6);
  transition: filter var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform 120ms var(--ease);
}
.send .ic { width: 20px; height: 20px; stroke-width: 1.8; }
.send:hover { filter: brightness(1.06); }
.send:active { transform: scale(.96); }
.send:disabled { background: rgba(var(--ink-rgb), .06); color: var(--text-4); box-shadow: none; cursor: not-allowed; filter: none; }
.disclaimer { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--text-3); text-align: center; }

/* =====================================================================
   HOME
   ===================================================================== */
.hero { position: relative; isolation: isolate; }
.hero-media { position: absolute; left: 0; right: 0; top: 0; height: 100%; min-height: 720px; z-index: -1; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; filter: var(--hero-img-filter); transform-origin: 60% 40%; animation: settle 1800ms var(--ease) both; }
@keyframes settle { from { transform: scale(1.06); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), .82) 0%, rgba(var(--bg-rgb), .28) 20%, rgba(var(--bg-rgb), .30) 50%, rgba(var(--bg-rgb), .90) 82%, var(--bg-0) 100%),
    linear-gradient(90deg, rgba(var(--bg-rgb), .94) 0%, rgba(var(--bg-rgb), .70) 34%, rgba(var(--bg-rgb), .15) 66%, rgba(var(--bg-rgb), .35) 100%);
}
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: end;
  min-height: 720px; padding-top: calc(var(--hdr-h) + 72px); padding-bottom: 112px;
}
.hero-copy { max-width: 640px; animation: rise 600ms var(--ease) 120ms both; }
.hero-title { font-size: 88px; line-height: .95; margin-top: 18px; letter-spacing: -.015em; }
.hero-title .dot { color: var(--gold); }
.hero .lede { margin-top: 20px; color: var(--hero-lede); }
.ask { margin-top: 32px; max-width: 600px; }
.ask .composer-box {
  padding: 8px 8px 8px 10px; border-radius: 22px; align-items: center;
  background: rgba(var(--well2-rgb), .74); border-color: var(--line-gold-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sh-3);
}
.ask .composer-box:focus-within { background: rgba(var(--well2-rgb), .88); }
.ask textarea { padding: 11px 4px; font-size: 17px; }
.ask .send { width: 48px; height: 48px; }
.hero .chips { margin-top: 16px; max-width: 640px; }
.hero .chip { background: rgba(var(--well2-rgb), .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.docs {
  position: relative; padding: 28px; border-radius: var(--r-xl);
  background: var(--glass-bg);
  border: 1px solid var(--line-gold-2);
  -webkit-backdrop-filter: blur(18px) saturate(120%); backdrop-filter: blur(18px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), var(--sh-4);
  animation: rise 600ms var(--ease) 260ms both;
}
.docs::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(var(--gold-rgb), .09); border-radius: calc(var(--r-xl) - 6px); pointer-events: none; }
.docs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.docs-date { font-size: 52px; line-height: 1; margin-top: 20px; white-space: nowrap; }
.docs-date span { color: var(--text-3); font-size: 30px; margin-left: 4px; }
.docs-sub { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.docs-list { list-style: none; margin-top: 22px; border-top: 1px solid var(--line-gold); }
.docs-list a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 4px;
  transition: background-color var(--t) var(--ease);
}
.docs-list a:hover { background: rgba(var(--gold-rgb), .05); }
.docs-list a:hover .docs-go { color: var(--gold); transform: translateX(2px); }
.docs-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line-gold-2); background: radial-gradient(circle at 50% 30%, rgba(var(--gold-rgb), .12), transparent 70%); }
.docs-name { font-weight: 600; color: var(--ivory); font-size: 15px; line-height: 1.3; }
.docs-name small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.docs-right { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.docs-go { color: var(--text-3); transition: transform var(--t) var(--ease), color var(--t) var(--ease); }
.docs-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--text-3); }
.docs-foot .ic { color: var(--gold-3); width: 16px; height: 16px; }
.docs-note { margin-top: 18px; font-size: 15px; color: var(--text-2); line-height: 1.6; }

.dests { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: -48px; }
.dest { display: flex; flex-direction: column; min-height: 228px; padding: 22px; overflow: hidden; animation: rise 520ms var(--ease) both; }
.dest:nth-child(2) { animation-delay: 60ms; } .dest:nth-child(3) { animation-delay: 120ms; } .dest:nth-child(4) { animation-delay: 180ms; } .dest:nth-child(5) { animation-delay: 240ms; }
.dest-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line-gold-2); background: radial-gradient(circle at 50% 30%, rgba(var(--gold-rgb), .14), transparent 70%); }
.dest-ic .ic { width: 22px; height: 22px; }
.dest h2 { margin-top: 32px; font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.1; color: var(--ivory); }
@media (min-width: 1081px) and (max-width: 1240px) { .dest { padding: 20px; } .dest h2 { font-size: 24px; } }
.dest p { margin-top: 8px; margin-bottom: 18px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.dest-meta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dest-go { position: absolute; top: 24px; right: 22px; color: var(--text-3); transition: color var(--t) var(--ease), transform var(--t) var(--ease); }
.dest:hover .dest-go { color: var(--gold); transform: translate(2px, -2px); }
.dest::after { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), .55), transparent); opacity: 0; transition: opacity var(--t) var(--ease); }
.dest:hover::after { opacity: 1; }

.install {
  position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 80;
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 10px 12px 14px;
  border-radius: 20px; background: var(--pop-bg-2); border: 1px solid var(--line-gold-2); box-shadow: var(--sh-4);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: rise 360ms var(--ease) both;
}
.install img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.install-text { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.install-text strong { display: block; font-size: 15px; color: var(--ivory); font-weight: 600; }
.install-text .ic { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; color: var(--gold); }

@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: calc(var(--hdr-h) + 200px); padding-bottom: 96px; }
  .hero-media { height: 620px; min-height: 0; }
  .hero-media::after { background: linear-gradient(180deg, rgba(var(--bg-rgb), .72) 0%, rgba(var(--bg-rgb), .25) 24%, rgba(var(--bg-rgb), .62) 58%, var(--bg-0) 100%), linear-gradient(90deg, rgba(var(--bg-rgb), .7), rgba(var(--bg-rgb), .2)); }
  .docs { max-width: 560px; }
  .dests { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -40px; }
  .dest:nth-child(5):last-child { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 720px) {
  .hero-in { padding-top: calc(var(--hdr-h) + 132px); padding-bottom: 72px; gap: 32px; }
  .hero-media { height: 440px; }
  .hero-media img { object-position: 38% 40%; }
  .hero-media::after { background: linear-gradient(180deg, rgba(var(--bg-rgb), .7) 0%, rgba(var(--bg-rgb), .2) 22%, rgba(var(--bg-rgb), .55) 55%, var(--bg-0) 96%), linear-gradient(90deg, rgba(var(--bg-rgb), .55), rgba(var(--bg-rgb), .1)); }
  .hero-title { font-size: 56px; margin-top: 12px; }
  .hero .lede { font-size: 16px; margin-top: 14px; }
  .ask { margin-top: 24px; }
  .ask textarea { font-size: 16px; }
  .hero .chip:nth-child(n+4) { display: none; }
  .docs { padding: 22px 20px; }
  .docs-date { font-size: 44px; margin-top: 16px; }
  .docs-date span { font-size: 26px; }
  .dests { grid-template-columns: 1fr; gap: 10px; margin-top: -24px; }
  .dest { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ic t" "ic p"; column-gap: 16px; align-items: center; min-height: 0; padding: 16px 48px 16px 16px; }
  .dest-ic { grid-area: ic; width: 44px; height: 44px; }
  .dest h2 { grid-area: t; margin: 0; font-size: 24px; }
  .dest p { grid-area: p; margin: 2px 0 0; font-size: 13px; }
  .dest-go { top: 50%; right: 16px; transform: translateY(-50%); }
  .dest:hover .dest-go { transform: translate(2px, -50%); }
  .dest-meta { display: none; }
}

/* =====================================================================
   VIEWER
   ===================================================================== */
.page-viewer { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.page-viewer .hdr { flex: none; }
.vhdr .hdr-in { max-width: none; gap: 14px; }
.vhdr .hdr-logo img { height: 32px; }
.vmark { display: none; }
.vmark svg { height: 24px; width: auto; color: var(--mark-house); }
.vdate { display: flex; flex-direction: column; justify-content: center; line-height: 1.25; padding-left: 14px; border-left: 1px solid var(--line-2); min-width: 0; }
.vdate small { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.vdate span { font-size: 14px; font-weight: 600; color: var(--ivory); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vhdr .hdr-right { margin-left: auto; gap: 4px; }
.vsub { display: none; }
.hdr-tools { display: flex; align-items: center; gap: 4px; }
.vopen-m { display: none; }
.vmain { flex: 1; min-height: 0; display: flex; }

.doc { position: relative; flex: 1; min-width: 0; background: var(--doc-bg); }
.doc iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--doc-bg); opacity: 0; transition: opacity 400ms var(--ease); }
.doc iframe.ready { opacity: 1; }
.doc-state { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; background: var(--doc-bg); animation: fade var(--t) var(--ease) both; }
.doc-state h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--ivory); line-height: 1.2; margin-top: 10px; }
.doc-state p { color: var(--text-2); max-width: 30em; }
.doc-state .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.loader-seal { position: relative; width: 72px; height: 72px; display: grid; place-items: center; }
.loader-seal .av { width: 56px; height: 56px; }
.loader-seal::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--gold-rgb), .12); border-top-color: var(--gold); animation: spin 1.4s linear infinite; }
.pages { padding: 12px 12px calc(104px + env(safe-area-inset-bottom)); }
.pdf-page { display: block; width: 100%; height: auto; margin: 0 auto 10px; border-radius: 4px; background: #fff; box-shadow: var(--sh-2); }
.pages-progress { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.chat { position: relative; flex: none; width: 440px; overflow: hidden; border-left: 1px solid var(--line-gold); background: var(--panel-bg); transition: width 320ms var(--ease), border-color 320ms var(--ease); }
.chat-inner { width: 440px; height: 100%; display: flex; flex-direction: column; }
.chat-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 20px; border-bottom: 1px solid var(--line); }
.chat-id { flex: 1; min-width: 0; }
.chat-title { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.1; color: var(--ivory); }
.chat-sub { margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 20px 24px; }
.chat-foot { flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(var(--deep-rgb), .55); }
.try { margin-top: 22px; }
.try .kicker { margin-bottom: 10px; color: var(--text-3); }
.vmain.collapsed .chat { width: 0; border-left-color: transparent; }
.vmain.collapsed .chat-inner { visibility: hidden; transition: visibility 0s linear 320ms; }

.fab {
  position: fixed; z-index: 45; right: max(20px, calc(env(safe-area-inset-right) + 16px)); bottom: calc(20px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 7px 22px 7px 7px; border-radius: 999px;
  background: var(--fab-bg); border: 1px solid var(--line-gold-2);
  color: var(--ivory); font-size: 15px; font-weight: 600; letter-spacing: .01em;
  box-shadow: 0 0 0 6px rgba(var(--deep-rgb), .35), var(--sh-4);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.fab .av { width: 40px; height: 40px; }
.fab:hover { border-color: rgba(var(--gold-rgb), .65); }
.fab.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }

@media (max-width: 1240px) {
  .vhdr .hdr-logo { display: none; }
  .vhdr .vmark { display: flex; }
  .vhdr .btn-label { display: none; }
  .vhdr .btn-open { padding: 0 12px; }
}
@media (max-width: 1080px) {
  .chat, .chat-inner { width: 380px; }
  .vhdr .vdate small, .vhdr .vdate .muted { display: none; }
  .chat-head .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chat-head .btn { width: 44px; padding: 0; }
}
@media (max-width: 1000px) {
  .vhdr .seg-kind .ic { display: none; }
  .vhdr .hdr-in { gap: 10px; }
}
@media (max-width: 899px) {
  .page-viewer { height: auto; min-height: 100dvh; overflow: visible; display: block; }
  .vhdr .hdr-in { gap: 8px; }
  .vhdr .seg-kind, .vhdr .hdr-tools, .vhdr > .hdr-in > .vdate { display: none; }
  .vopen-m { display: inline-grid; }
  .vsub {
    position: sticky; top: calc(var(--hdr-h) + env(safe-area-inset-top)); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
    background: rgba(var(--bg-rgb), .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
  }
  .vsub .vdate { display: flex; border: 0; padding: 0; text-align: right; flex: none; }
  .vsub .seg .ic { display: none; }
  .vsub .seg a { padding: 0 13px; }
  .vmain { display: block; }
  .doc { min-height: calc(100dvh - var(--hdr-h) - 61px); }
  .doc-state { position: absolute; min-height: 420px; }
  .chat {
    position: fixed; inset: 0; z-index: 60; width: auto; border: 0;
    transform: translateY(100%); visibility: hidden;
    transition: transform 340ms var(--ease), visibility 0s linear 340ms;
    box-shadow: var(--sh-4);
  }
  .chat.open { transform: none; visibility: visible; transition: transform 340ms var(--ease); }
  .chat-inner { width: auto; padding-top: env(safe-area-inset-top); }
  .chat-head { padding: 10px 8px 10px 16px; }
  .chat-scroll { padding: 20px 16px; }
  .chat-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .vmain.collapsed .chat { width: auto; }
  .vmain.collapsed .chat-inner { visibility: visible; }
}
@media (min-width: 900px) {
  .chat-close-m { display: none; }
}
@media (max-width: 899px) {
  .chat-collapse { display: none; }
}
@media (max-width: 480px) {
  .chat-head .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chat-head .btn { width: 44px; padding: 0; }
}

/* =====================================================================
   LOAN CHECKER
   ===================================================================== */
.check-grid { display: grid; grid-template-columns: 448px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 8px; }
.check-form { padding: 28px; }
.form-sec + .form-sec { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-sec > .kicker { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.form-sec > .kicker::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-gold), transparent); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.fgrid .full { grid-column: 1 / -1; }
.cond { animation: rise 260ms var(--ease) both; }
.form-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.form-actions .row2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-3); }
.form-actions .btn-gold { min-height: 52px; font-size: 15px; }

.result-col { min-width: 0; scroll-margin-top: calc(var(--hdr-h) + 16px); }
.result-col > * + * { margin-top: 16px; }
.result-col > :empty { display: none; }
.result-empty, .waiting { padding: 48px 36px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.result-empty h2, .waiting h2 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.15; color: var(--ivory); margin-top: 24px; }
.result-empty > p, .waiting > p { margin-top: 10px; color: var(--text-2); max-width: 30em; }
.expect { list-style: none; margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; text-align: left; }
.expect li { padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(var(--ink-rgb), .02); font-size: 14px; color: var(--text-2); line-height: 1.5; }
.expect li b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ivory); margin-bottom: 4px; }
.waiting .elapsed { margin-top: 18px; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.waiting .elapsed strong { color: var(--gold); font-weight: 600; }
.skel-rows { width: 100%; max-width: 520px; margin-top: 32px; display: grid; gap: 14px; }
.skel-rows .skel { height: 12px; }
.skel-rows .skel:nth-child(2) { width: 82%; } .skel-rows .skel:nth-child(3) { width: 64%; } .skel-rows .skel:nth-child(4) { width: 74%; }

/* The seal: gold-ringed, tagline engraved around the rim */
.seal { position: relative; width: 136px; height: 136px; flex: none; --sc: var(--gold); --sc-bg: rgba(var(--gold-rgb), .10); }
.seal-rim, .seal-text { position: absolute; inset: 0; width: 100%; height: 100%; }
.seal-rim circle { fill: none; }
.seal-rim .o { stroke: var(--gold); stroke-width: 1; opacity: .9; }
.seal-rim .i { stroke: var(--gold); stroke-width: .75; opacity: .45; }
.seal-rim .c { stroke: var(--sc); stroke-width: 1.5; }
.seal-text text { fill: var(--gold); font-family: var(--sans); font-size: 8px; font-weight: 600; letter-spacing: .25em; }
.seal-core { position: absolute; inset: 31px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, var(--sc-bg), rgba(var(--deep-rgb), .6) 80%); }
.seal-core .ic { width: 38px; height: 38px; color: var(--sc); stroke-width: 1.6; }
.seal-core svg.house { width: 44px; height: auto; color: var(--mark-house); }
.seal.is-turning .seal-text { animation: spin 40s linear infinite; }
.seal.is-turning .seal-rim .c { stroke-dasharray: 60 260; animation: spin 2.8s linear infinite; transform-origin: 50% 50%; transform-box: view-box; }
.seal.is-dim { opacity: .7; }
.seal.is-dim .seal-text text { fill: var(--gold-3); }
.v-yes { --sc: var(--ok); --sc-bg: rgba(64, 166, 41, .20); }
.v-conditional { --sc: var(--amber); --sc-bg: rgba(230, 174, 92, .18); }
.v-no { --sc: var(--crimson); --sc-bg: rgba(217, 132, 121, .18); }
.v-review { --sc: var(--text-2); --sc-bg: rgba(188, 197, 187, .10); }

.verdict { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 28px; align-items: center; padding: 32px; overflow: hidden; animation: rise 360ms var(--ease) both; }
.verdict::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(520px 300px at 8% 0%, var(--sc-bg), transparent 70%); }
.verdict > * { position: relative; }
.verdict-label { font-family: var(--serif); font-weight: 600; font-size: 52px; line-height: 1; color: var(--sc); margin-top: 8px; }
.verdict-title { margin-top: 10px; font-size: 17px; font-weight: 500; color: var(--ivory); line-height: 1.5; }
.verdict-detail { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); }
.product { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-gold); background: var(--gold-a05); }
.product .ic { color: var(--gold); }
.product small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.product strong { display: block; color: var(--ivory); font-weight: 600; font-size: 16px; line-height: 1.4; }

.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; overflow: hidden; animation: rise 360ms var(--ease) 60ms both; }
.fig { padding: 22px 24px; min-width: 0; }
.fig + .fig { border-left: 1px solid var(--line); }
.fig small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.fig strong { display: block; margin-top: 8px; font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1; color: var(--ivory); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.fig-rate strong { color: var(--gold); }
.fig span { display: block; margin-top: 8px; font-size: 13px; color: var(--text-3); }

.res-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.res-card { padding: 24px; animation: rise 360ms var(--ease) 120ms both; }
.res-card .card-head { margin-bottom: 14px; }
.res-card .card-title { font-size: 24px; }
.ledger { list-style: none; }
.ledger li { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-1); line-height: 1.45; }
.ledger li .lead { flex: 1; min-width: 16px; border-bottom: 1px dotted rgba(var(--gold-rgb), .28); transform: translateY(-4px); }
.ledger li .v { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; color: var(--ivory); white-space: nowrap; }
.ledger li.total { border-top: 1px solid var(--line-gold-2); border-bottom: 3px double var(--line-gold-2); color: var(--gold-2); font-weight: 700; margin-top: -1px; }
.ledger li.total .v { color: var(--gold-2); font-weight: 700; }
.ledger li.total .lead { border-color: transparent; }
.cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-gold); background: var(--gold-a05); font-size: 14px; }
.cap span { color: var(--text-2); }
.cap strong { color: var(--gold-2); font-variant-numeric: tabular-nums; text-align: right; }
.tbl tr.quoted td { background: rgba(var(--gold-rgb), .07); }
.tbl tr.quoted td:first-child { box-shadow: inset 2px 0 0 var(--gold); }
.tbl tr.quoted td.n { color: var(--gold-2); font-weight: 700; }
.res-card .tbl td.n:not(.final) { color: var(--text-2); font-weight: 400; }   /* sheet values next to the final ones */
.res-card .tbl td.final { font-weight: 600; }
.res-card .tbl { margin-top: 0; }
.quoted-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-fill); vertical-align: 1px; }
.res-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; animation: rise 360ms var(--ease) 180ms both; }
.res-foot .acts { margin: 0; }
.res-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mailpanel { padding: 22px 24px; border-color: var(--line-gold-2); animation: rise 280ms var(--ease) both; }
.mailpanel p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.mailpanel p strong { color: var(--ivory); }
.mail-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.followup { padding: 24px; animation: rise 360ms var(--ease) 220ms both; }
.followup .thread:not(:empty) { margin: 20px 0 24px; }
.followup .composer-box { margin-top: 16px; }
.answer-card { padding: 28px; }
.answer-card .msg { animation: none; }
.ai-note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(var(--ink-rgb), .02); font-size: 13px; line-height: 1.6; color: var(--text-3); }
.ai-note .ic { color: var(--gold-3); margin-top: 1px; }
.err-card { padding: 32px; display: flex; gap: 16px; align-items: flex-start; border-color: rgba(217, 132, 121, .35); }
.err-card .ic { color: var(--crimson); width: 24px; height: 24px; margin-top: 4px; }
.err-card h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--ivory); }
.err-card p { margin-top: 6px; color: var(--text-2); }
.err-card .btn { margin-top: 16px; }

@media (max-width: 1080px) {
  .check-grid { grid-template-columns: 1fr; gap: 24px; }
  .check-form { max-width: none; }
  .result-col .result-empty { display: none; }
}
@media (max-width: 720px) {
  .check-form { padding: 20px 18px; }
  .fgrid { gap: 16px 12px; }
  .result-empty, .waiting { padding: 36px 20px; }
  .result-empty h2, .waiting h2 { font-size: 28px; }
  .expect { grid-template-columns: 1fr; }
  .verdict { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 22px 18px; }
  .verdict .seal { width: 96px; height: 96px; }
  .verdict .seal-core { inset: 22px; }
  .verdict .seal-core .ic { width: 28px; height: 28px; }
  .verdict-label { font-size: 38px; }
  .verdict-title { font-size: 15px; }
  .fig { padding: 16px 14px; }
  .fig strong { font-size: 30px; }
  .fig small { font-size: 11px; letter-spacing: .1em; }
  .fig span { font-size: 12px; }
  .res-card, .followup { padding: 20px 16px; }
  .res-foot { padding: 14px 16px; }
  .res-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .fgrid .wide-m { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .figures { grid-template-columns: 1fr 1fr; }
  .fig-rate { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .fig-rate + .fig { border-left: 0; }
}

/* =====================================================================
   ARCHIVE
   ===================================================================== */
.coll-group + .coll-group { margin-top: 48px; }
.coll-group-head { display: flex; align-items: center; gap: 14px; }
.coll-group-head h2 { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.1; color: var(--ivory); }
.coll-group-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-gold), transparent); }
.coll-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.coll { display: flex; flex-direction: column; padding: 28px; overflow: hidden; animation: rise 420ms var(--ease) both; }
.coll-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.coll h3 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; color: var(--ivory); margin-top: 6px; }
.coll-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.coll-link:focus-visible { outline: none; }
.coll-link:focus-visible::after { outline: 2px solid var(--gold); outline-offset: 2px; }
.coll-count { display: flex; align-items: baseline; gap: 10px; margin-top: 28px; }
.coll-count b { font-family: var(--serif); font-weight: 600; font-size: 68px; line-height: .9; color: var(--gold); font-variant-numeric: lining-nums; }
.coll-count span { font-size: 15px; color: var(--text-2); }
.coll-range { margin-top: 10px; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.coll-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.coll-latest { position: relative; z-index: 1; }
.coll-go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); transition: color var(--t) var(--ease); }
.coll:hover .coll-go { color: var(--gold-2); }
.coll-go .ic { transition: transform var(--t) var(--ease); }
.coll:hover .coll-go .ic { transform: translateX(3px); }
.coll-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line-gold-2); background: radial-gradient(circle at 50% 30%, rgba(var(--gold-rgb), .14), transparent 70%); flex: none; }

.tabs { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: flex; flex-direction: column; gap: 2px; min-width: 172px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(var(--ink-rgb), .02); scroll-snap-align: start;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.tab small { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.tab span { font-weight: 600; color: var(--text-1); font-size: 15px; }
.tab em { font-style: normal; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tab:hover { border-color: var(--line-gold); background: var(--gold-a05); }
.tab[aria-current] { border-color: var(--line-gold-2); background: var(--gold-a10); box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .12); }
.tab[aria-current] span { color: var(--gold-2); }
.tab[aria-current] small { color: var(--gold-3); }

.toolbar {
  position: sticky; top: calc(var(--hdr-h) + env(safe-area-inset-top)); z-index: 20;
  display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 0;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), .96) 70%, rgba(var(--bg-rgb), .85));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.search { position: relative; flex: 1; min-width: 0; }
.search > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gold-3); pointer-events: none; }
.search .inp { padding-left: 44px; padding-right: 48px; }
.search .ibtn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.toolbar select.inp { width: 210px; flex: none; }
.list-meta { margin-top: 4px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; min-height: 20px; }

.alist { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
.mnav { position: sticky; top: calc(var(--hdr-h) + 96px); display: flex; flex-direction: column; gap: 2px; padding-top: 36px; }
.mnav .kicker { margin: 0 0 10px 14px; }
.mnav a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 12px; border-left: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--text-2); transition: color var(--t) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.mnav a span { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mnav a:hover { color: var(--ivory); background: rgba(var(--ink-rgb), .03); }
.mnav a.on { color: var(--gold-2); border-left-color: var(--gold); background: linear-gradient(90deg, var(--gold-a10), transparent); }
@media (min-width: 1081px) { #jump { display: none; } }
@media (max-width: 1080px) { .alist { display: block; } .mnav { display: none; } }
.month { margin-top: 36px; scroll-margin-top: calc(var(--hdr-h) + 90px); animation: fade 300ms var(--ease) both; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-gold); }
.month-head h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; color: var(--ivory); }
.month-head span { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rows { list-style: none; }
.arow {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 90px auto; align-items: center; gap: 20px;
  padding: 12px 12px 12px 4px; border-bottom: 1px solid var(--line); border-radius: 4px;
  transition: background-color 160ms var(--ease);
}
.arow:hover { background: rgba(var(--gold-rgb), .04); }
.arow-day { text-align: center; line-height: 1; }
.arow-day b { display: block; font-family: var(--serif); font-weight: 600; font-size: 34px; color: var(--ivory); font-variant-numeric: lining-nums tabular-nums; }
.arow-day small { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.arow.is-latest .arow-day b { color: var(--gold); }
.arow-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.arow-main strong { font-weight: 600; color: var(--text-1); font-size: 15px; }
.arow-file { flex-basis: 100%; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow-size { font-size: 13px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 56px 24px; text-align: center; }
.empty h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--ivory); margin-top: 16px; }
.empty p { margin-top: 8px; color: var(--text-2); }
.empty .btn { margin-top: 20px; }
.empty .loader-seal { margin: 0 auto; }

@media (max-width: 900px) {
  .coll-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 720px) {
  .coll { padding: 22px 20px; }
  .coll h3 { font-size: 28px; }
  .coll-count { margin-top: 18px; }
  .coll-count b { font-size: 52px; }
  .coll-group-head h2 { font-size: 26px; }
  .coll-foot { flex-wrap: wrap; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .toolbar select.inp { width: 100%; }
  .tab { min-width: 150px; padding: 10px 14px; }
  .arow { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0 12px 0; }
  .arow-day b { font-size: 28px; }
  .arow-size { display: none; }
  .arow .btn-label { display: none; }
  .arow .btn { width: 44px; padding: 0; }
  .month-head h2 { font-size: 26px; }
}

/* =====================================================================
   Rates brief (brief.html) and its strip on the home page
   ===================================================================== */
/* Chart series, validated for colour-blind separation against each mode's card surface (dataviz validator) */
:root { --series-10y: #4C86C4; --series-mtg: #B98535; }
:root[data-theme="light"] { --series-10y: #2A6FB8; --series-mtg: #A27A33; }

.brief-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; }
.brief-nav .datechip { margin-top: 0; }
.brief-nav .btn { height: 36px; }
.brief-nav select.inp { height: 36px; width: auto; min-width: 0; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.call { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.call i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--text-3)); }
.call-unchanged { --c: var(--green); }
.call-under_review { --c: var(--gold); color: var(--gold-2); border-color: var(--line-gold-2); }
.call-changed { --c: var(--crimson); color: var(--crimson); border-color: rgba(217, 132, 121, .4); }
.brief-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--line-gold); background: var(--gold-a05); font-size: 14px; color: var(--text-2); }
.brief-note .ic { color: var(--gold); margin-top: 2px; }

.figures.brief-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px; }
.brief-figs .fig strong { font-size: 40px; }
.brief-figs .fig strong.word { font-size: 26px; line-height: 1.15; white-space: normal; }
.brief-figs .fig-mtg strong { color: var(--gold); }

.brief-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; margin-top: 20px; align-items: start; }
.glance { padding: 26px 28px; animation: rise 360ms var(--ease) 80ms both; }
.glance dl { margin: 14px 0 0; }
.glance-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.glance-row:first-child { border-top: 0; padding-top: 0; }
.glance-row dt { padding-top: 3px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.glance-row dd { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-1); }
.glance-row.lock { margin-top: 6px; padding: 16px 18px; border: 1px solid var(--line-gold-2); border-radius: var(--r-md); background: var(--gold-a05); }
.glance-row.lock dt { color: var(--gold); }
.glance-row.lock dd { color: var(--ivory); font-weight: 500; }
.gloss { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.gloss b { color: var(--text-2); font-weight: 600; }

.chart-card { padding: 24px 24px 18px; animation: rise 360ms var(--ease) 140ms both; }
.chart-card .card-title { font-size: 22px; }
.chart-sub { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i { width: 16px; height: 2px; border-radius: 2px; background: var(--c); }
.chart { position: relative; margin-top: 8px; touch-action: pan-y; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--text-3); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .end text { fill: var(--text-1); font-size: 12px; font-weight: 600; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--s-1); stroke-width: 2; }
.chart .xhair { stroke: var(--line-2); stroke-width: 1; }
.chart-tip { position: absolute; top: 0; z-index: 2; min-width: 150px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-gold); background: var(--pop-bg); box-shadow: var(--sh-2); font-size: 12px; color: var(--text-3); pointer-events: none; }
.chart-tip div { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.chart-tip div i { width: 12px; height: 2px; border-radius: 2px; background: var(--c); flex: none; }
.chart-tip div b { color: var(--ivory); font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-foot { margin-top: 10px; font-size: 12px; color: var(--text-3); }
.chart-table { margin-top: 10px; font-size: 13px; }
.chart-table summary { cursor: pointer; color: var(--text-3); font-weight: 600; }
.chart-table summary:hover { color: var(--gold-2); }
.chart-table .tbl { max-height: 280px; overflow-y: auto; }

.brief-sec { margin-top: 64px; }
.brief-sec > h2 { margin-top: 10px; font-size: 40px; }
.brief-card { margin-top: 16px; padding: 24px; }
.brief-card > p { margin-top: 14px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.brief-card > p.small { font-size: 13px; color: var(--text-3); }
.brief-card .tbl td.drv { color: var(--text-2); min-width: 220px; }
.brief-card .tbl td.ev { color: var(--text-2); }
.vstat { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--c); }
.vstat i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.vstat-holds { --c: var(--green-2); }
.vstat-pending { --c: var(--gold); }
.vstat-counter { --c: var(--crimson); }
.bg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.bg-item { padding: 20px 22px; }
.bg-item p { margin-top: 8px; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch; }
.pair .brief-card { margin-top: 0; }
.other { box-shadow: inset 3px 0 0 var(--crimson), var(--sh-2); }
.brief-card > p.conf-level { margin-top: 10px; font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; color: var(--ivory); }
.brief-card .tbl td:first-child { white-space: nowrap; }
.brief-card .tbl td.view { white-space: normal; width: 34%; min-width: 180px; }

.appx { margin-top: 40px; border-top: 1px solid var(--line-gold); padding-top: 18px; }
.appx summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; min-height: 44px; font-weight: 600; color: var(--text-2); }
.appx summary::-webkit-details-marker { display: none; }
.appx summary .ic { color: var(--gold-3); transition: transform var(--t) var(--ease); }
.appx[open] summary .ic { transform: rotate(180deg); }
.appx summary:hover { color: var(--gold-2); }
.appx .tbl { font-size: 13px; }
.appx .tbl table { font-size: 13px; }
.appx p { margin-top: 14px; font-size: 13px; line-height: 1.7; color: var(--text-3); max-width: 70em; }
.appx p b { color: var(--text-2); }
.brief-legal { margin-top: 28px; font-size: 12px; line-height: 1.6; color: var(--text-3); max-width: 60em; }

/* home: the brief window under the destinations */
.brief-panel { margin-top: 20px; }
.bp { padding: 26px 28px; animation: rise 520ms var(--ease) 260ms both; }
.bp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.bp-head .kicker { display: flex; align-items: center; gap: 8px; }
.bp-head h2 { margin-top: 10px; max-width: 34em; font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.2; color: var(--ivory); }
.bp-head .btn { flex: none; }
.bp-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(var(--well-rgb), .3); }
.bp-fig { padding: 12px 16px; min-width: 0; }
.bp-fig + .bp-fig { border-left: 1px solid var(--line); }
.bp-fig small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.bp-fig strong { display: block; margin-top: 6px; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.1; color: var(--ivory); }
.bp-fig.mtg strong { color: var(--gold); }
.bp-fig strong.word { font-size: 20px; }
.bp-fig span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--text-3); }
.bp-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; margin-top: 22px; }
.bp-item h3 { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.bp-item p { margin-top: 6px; font-size: 15px; line-height: 1.65; color: var(--text-1); }
.bp-item.lock { padding: 14px 16px; border: 1px solid var(--line-gold-2); border-radius: var(--r-md); background: var(--gold-a05); }
.bp-item.lock h3 { color: var(--gold); }
.bp-item.lock p { color: var(--ivory); font-weight: 500; }
.bp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.bp-foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--gold-2); }

@media (max-width: 1080px) {
  .brief-grid { grid-template-columns: 1fr; }
  .figures.brief-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-figs .fig:nth-child(3) { border-left: 0; }
  .brief-figs .fig:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bp-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-fig:nth-child(3) { border-left: 0; }
  .bp-fig:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .glance { padding: 20px; }
  .glance-row { grid-template-columns: 1fr; gap: 4px; }
  .glance-row.lock { padding: 14px; }
  .brief-figs .fig strong { font-size: 30px; }
  .brief-figs .fig strong.word { font-size: 20px; }
  .brief-sec { margin-top: 48px; }
  .brief-sec > h2 { font-size: 30px; }
  .brief-card { padding: 18px; }
  .bg-grid, .pair { grid-template-columns: 1fr; }
  .bp { padding: 20px; }
  .bp-head { flex-direction: column; gap: 14px; }
  .bp-head h2 { font-size: 22px; }
  .bp-body { grid-template-columns: 1fr; gap: 14px; }
  .bp-fig strong { font-size: 22px; }
}

/* ---------------------------------------------------------------- language: EN / 中文 (Rates Brief) */
/* Chinese text falls through the Latin faces to Noto (loaded per glyph range by Google Fonts) or the system CJK fonts. */
:root[data-lang="zh"] {
  --serif: "Cormorant Garamond", "Cormorant", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "Microsoft YaHei", serif;
  --sans: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
:root[data-lang="zh"] [data-l="en"], :root:not([data-lang="zh"]) [data-l="zh"] { display: none !important; }
.banner-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seg-lang { padding: 2px; }
.seg-lang button { min-height: 32px; padding: 0 12px; cursor: pointer; }
.seg-lang button:hover { color: var(--ivory); background: rgba(var(--ink-rgb), .05); }
.seg-lang button[aria-pressed="true"] { color: var(--gold-2); background: rgba(var(--gold-rgb), .14); box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .42); }
:root[data-lang="zh"] .kicker, :root[data-lang="zh"] .glance-row dt, :root[data-lang="zh"] .fig small { letter-spacing: .06em; }
:root[data-lang="zh"] .display, :root[data-lang="zh"] .card-title { letter-spacing: 0; }
:root[data-lang="zh"] .brief-card > p, :root[data-lang="zh"] .glance-row dd { line-height: 1.8; }

/* ---------------------------------------------------------------- voice messages (web/ui/voice.js) */
/* Typing mode: textarea + microphone (switch to voice) + send. Voice mode: a big "Hold to ask" button + keyboard
   (switch back). While recording, a panel above the composer shows the live transcript; slide up to cancel. */
.composer-box.has-voice { position: relative; }
.mic {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text-2);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform 120ms var(--ease);
}
.mic .ic { width: 21px; height: 21px; }
.mic:hover { color: var(--gold); background: var(--gold-a10); }
.mic:active { transform: scale(.94); }
.ask .mic { width: 48px; height: 48px; }
.hold {
  display: none; flex: 1; min-width: 0; min-height: 44px; align-items: center; justify-content: center; border-radius: 14px;
  background: rgba(var(--ink-rgb), .06); border: 1px solid var(--line-2); color: var(--ivory); font-size: 15px; font-weight: 600; letter-spacing: .01em;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; cursor: pointer;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
}
.hold:hover { border-color: var(--line-gold-2); }
.ask .hold { min-height: 48px; font-size: 16px; }
.composer-box.voice-mode > .hold, .composer-box.is-recording > .hold { display: flex; }
.composer-box.voice-mode > textarea, .composer-box.voice-mode > .send { display: none; }
.composer-box.voice-mode { padding-left: 6px; }
.composer-box.voice-off > .mic, .composer-box.voice-off > .hold { display: none; }
.composer-box.is-pressing, .composer-box.is-recording { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.composer-box.is-recording { padding-left: 6px; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .16); }
.composer-box.is-recording > :not(.hold):not(.rec):not(.av) { display: none !important; }
.composer-box.is-recording > .hold { background: var(--gold-grad); border-color: transparent; color: var(--gold-ink); }
.composer-box.is-recording.cancel { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(217, 132, 121, .2); }
.composer-box.is-recording.cancel > .hold { background: var(--crimson); color: #fff; }
.composer-box.is-recording.sending > .hold { background: rgba(var(--ink-rgb), .08); color: var(--text-2); }

.rec { display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 30; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.composer-box.is-recording > .rec { display: flex; }
.rec-card {
  width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-radius: 18px;
  background: var(--panel-bg); border: 1px solid var(--line-gold-2); box-shadow: var(--sh-3); animation: rise 160ms var(--ease) both;
}
.rec-top { display: flex; align-items: center; gap: 12px; }
.rec-wave { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; height: 34px; }
.rec-wave i { display: block; width: 3px; height: 100%; border-radius: 2px; background: var(--gold); transform: scaleY(.12); transition: transform 110ms linear; }
.rec.sending .rec-wave i { animation: recwait 900ms ease-in-out infinite; }
.rec.sending .rec-wave i:nth-child(2n) { animation-delay: 150ms; }
.rec.sending .rec-wave i:nth-child(3n) { animation-delay: 300ms; }
@keyframes recwait { 0%, 100% { transform: scaleY(.15); } 50% { transform: scaleY(.45); } }
.rec-x { display: none; flex: none; width: 34px; height: 34px; border-radius: 50%; place-items: center; background: var(--crimson); color: #fff; }
.rec-x .ic { width: 18px; height: 18px; stroke-width: 2; }
.rec-time { flex: none; min-width: 34px; text-align: right; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rec-partial { font-size: 16px; line-height: 1.45; color: var(--ivory); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rec-partial:empty { display: none; }
.rec-hint {
  padding: 5px 12px; border-radius: 999px; background: var(--panel-bg); border: 1px solid var(--line-2); box-shadow: var(--sh-1, none);
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.rec.cancel .rec-card { border-color: var(--crimson); }
.rec.cancel .rec-wave i { background: var(--crimson); }
.rec.cancel .rec-x { display: grid; }
.rec.cancel .rec-hint { color: #fff; background: var(--crimson); border-color: var(--crimson); }
.ask .rec-card { max-width: 600px; }

.voice-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; vertical-align: -2px; font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.voice-tag .ic { width: 14px; height: 14px; }
.speak-ctl {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; margin-left: 4px; padding: 0 10px 0 8px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.speak-ctl .ic { width: 14px; height: 14px; }
.speak-ctl:hover { color: var(--ivory); border-color: var(--line-gold-2); }
.speak-ctl.is-playing, .speak-ctl.is-loading { color: var(--gold); border-color: var(--line-gold-2); background: var(--gold-a05); }
.speak-ctl.is-loading .ic { animation: speakpulse 1.1s ease-in-out infinite; }
@keyframes speakpulse { 50% { opacity: .3; } }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .shimmer-text { color: var(--text-2); background: none; }
  .msg.is-streaming .md > :last-child::after { animation: none !important; }
}
