/* Dossier's one stylesheet.
   ==========================================================================================================
   Nota section. Tokens, components and motion adapted from nota-lp (MIT licence):
   Copyright (c) 2026 Hani Husamuddin. Full licence text in docs/THIRD-PARTY.md. DECISIONS.md, 2026-12-01.
   ========================================================================================================== */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-400-normal.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-500-normal.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-600-normal.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/plus-jakarta-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-latin-400-normal.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: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-latin-400-italic.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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Geist Mono"; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2"); }

/* ---------- tokens: Nota's dark is the default (no data-theme, or data-theme="dark"); light applies when the person
   chose it (data-theme="light", set by /assets/theme.js before paint) or chose "system" and the device is light.
   Every colour lives in these blocks; no rule below holds a raw colour. src/web/contrast.test.ts reads them and
   measures every pair against WCAG 2.2 (text 4.5 : 1, controls and meaningful shapes 3 : 1). Nota's own tertiary
   text (gray-500) and disabled grey are raised to pass on every surface (ink-faint); field edges use line-strong. ---------- */
:root {
  color-scheme: dark;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --fs-xs: 13px; --fs-label: 14px; --fs-sm: 15px; --fs-md: 17px; --fs-lg: 22px; --fs-xl: 32px; --fs-2xl: 40px; --fs-3xl: 48px;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --d-instant: 100ms; --d-fast: 150ms; --d-base: 300ms; --d-slow: 500ms; --d-reveal: 600ms; --d-frame: 900ms;
  --reveal-distance: 16px; --reveal-blur: 6px; --stagger: 60ms;
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  --gutter: 20px; --page: 1152px; --bar: 56px;
  --ground: #09090b;
  --panel: #18181b;
  --raised: #0f0f11;
  --tertiary: #27272a;
  --field: #18181b;
  --tile: rgb(255 255 255 / 0.03);
  --tile-hover: rgb(255 255 255 / 0.05);
  --overlay: rgb(9 9 11 / 0.72);
  --overlay-strong: rgb(9 9 11 / 0.95);
  --ink: #ffffff;
  --ink-muted: #a1a1aa;
  --ink-faint: #84848d;
  --line: rgb(255 255 255 / 0.06);
  --line-default: #27272a;
  --line-glass: rgb(255 255 255 / 0.1);
  --line-glass-hover: rgb(255 255 255 / 0.16);
  --line-strong: #6b6b74;
  --accent: #55795e;
  --accent-hover: #3f6348;
  --accent-press: #2d4a35;
  --on-accent: #ffffff;
  --accent-text: #89a88e;
  --accent-soft: #1a2f20;
  --accent-line: #6b8f71;
  --selected: #0f1f14;
  --fill: #89a88e;
  --track: #27272a;
  --focus: #89a88e;
  --warn-text: #f0d79c;
  --warn-soft: #3a2a0c;
  --warn-mark: #dcab4a;
  --bad-text: #e0857a;
  --bad-soft: #241311;
  --bad-line: #3d1d1a;
  --paper: #f4f4f5;
  --paper-ink: #18181b;
  --paper-muted: #63636c;
  --paper-rule: #d4d4d8;
  --paper-tint: #c8d9ca;
  --paper-accent: #55795e;
  --grad-from: #ffffff;
  --grad-mid: rgb(255 255 255 / 0.8);
  --grad-to: rgb(255 255 255 / 0.55);
  --glow: rgb(107 143 113 / 0.35);
  --spot: rgb(255 255 255 / 0.06);
  --spot-edge: rgb(255 255 255 / 0.22);
  --hero-line: rgb(255 255 255 / 0.08);
  --horizon: rgb(137 168 142 / 0.6);
  --scrim: rgb(9 9 11 / 0.72);
  --selection: #3f6348;
  --shadow-card: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-window: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 24px 64px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(0 0 0 / 0.5);
  --shadow-float: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 12px 32px rgb(0 0 0 / 0.5);
  --shadow-button: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-pop: 0 8px 24px rgb(0 0 0 / 0.32);
  --shadow-paper: 0 12px 32px rgb(0 0 0 / 0.25);
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #fafafa;
  --panel: #ffffff;
  --raised: #ffffff;
  --tertiary: #f4f4f5;
  --field: #ffffff;
  --tile: rgb(0 0 0 / 0.03);
  --tile-hover: rgb(0 0 0 / 0.05);
  --overlay: rgb(250 250 250 / 0.72);
  --overlay-strong: rgb(250 250 250 / 0.95);
  --ink: #09090b;
  --ink-muted: #52525b;
  --ink-faint: #63636c;
  --line: rgb(0 0 0 / 0.06);
  --line-default: #e4e4e7;
  --line-glass: rgb(0 0 0 / 0.1);
  --line-glass-hover: rgb(0 0 0 / 0.16);
  --line-strong: #8a8a93;
  --accent: #55795e;
  --accent-hover: #3f6348;
  --accent-press: #2d4a35;
  --on-accent: #ffffff;
  --accent-text: #3f6348;
  --accent-soft: #e3ede4;
  --accent-line: #55795e;
  --selected: #f1f6f2;
  --fill: #55795e;
  --track: #e4e4e7;
  --focus: #55795e;
  --warn-text: #7a540f;
  --warn-soft: #fbf5e6;
  --warn-mark: #9a6c19;
  --bad-text: #9a3f36;
  --bad-soft: #fbf1ef;
  --bad-line: #f1c9c2;
  --paper: #ffffff;
  --paper-ink: #18181b;
  --paper-muted: #63636c;
  --paper-rule: #e4e4e7;
  --paper-tint: #e3ede4;
  --paper-accent: #55795e;
  --grad-from: #09090b;
  --grad-mid: rgb(9 9 11 / 0.8);
  --grad-to: rgb(9 9 11 / 0.62);
  --glow: rgb(107 143 113 / 0.25);
  --spot: rgb(0 0 0 / 0.035);
  --spot-edge: rgb(0 0 0 / 0.14);
  --hero-line: rgb(0 0 0 / 0.08);
  --horizon: rgb(85 121 94 / 0.5);
  --scrim: rgb(250 250 250 / 0.72);
  --selection: #c8d9ca;
  --shadow-card: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-window: 0 24px 64px rgb(0 0 0 / 0.12), 0 0 0 1px rgb(0 0 0 / 0.06);
  --shadow-float: 0 12px 32px rgb(0 0 0 / 0.12);
  --shadow-button: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 1px 2px rgb(0 0 0 / 0.12);
  --shadow-pop: 0 8px 24px rgb(0 0 0 / 0.12);
  --shadow-paper: 0 12px 32px rgb(0 0 0 / 0.1);
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --ground: #fafafa;
    --panel: #ffffff;
    --raised: #ffffff;
    --tertiary: #f4f4f5;
    --field: #ffffff;
    --tile: rgb(0 0 0 / 0.03);
    --tile-hover: rgb(0 0 0 / 0.05);
    --overlay: rgb(250 250 250 / 0.72);
    --overlay-strong: rgb(250 250 250 / 0.95);
    --ink: #09090b;
    --ink-muted: #52525b;
    --ink-faint: #63636c;
    --line: rgb(0 0 0 / 0.06);
    --line-default: #e4e4e7;
    --line-glass: rgb(0 0 0 / 0.1);
    --line-glass-hover: rgb(0 0 0 / 0.16);
    --line-strong: #8a8a93;
    --accent: #55795e;
    --accent-hover: #3f6348;
    --accent-press: #2d4a35;
    --on-accent: #ffffff;
    --accent-text: #3f6348;
    --accent-soft: #e3ede4;
    --accent-line: #55795e;
    --selected: #f1f6f2;
    --fill: #55795e;
    --track: #e4e4e7;
    --focus: #55795e;
    --warn-text: #7a540f;
    --warn-soft: #fbf5e6;
    --warn-mark: #9a6c19;
    --bad-text: #9a3f36;
    --bad-soft: #fbf1ef;
    --bad-line: #f1c9c2;
    --paper: #ffffff;
    --paper-ink: #18181b;
    --paper-muted: #63636c;
    --paper-rule: #e4e4e7;
    --paper-tint: #e3ede4;
    --paper-accent: #55795e;
    --grad-from: #09090b;
    --grad-mid: rgb(9 9 11 / 0.8);
    --grad-to: rgb(9 9 11 / 0.62);
    --glow: rgb(107 143 113 / 0.25);
    --spot: rgb(0 0 0 / 0.035);
    --spot-edge: rgb(0 0 0 / 0.14);
    --hero-line: rgb(0 0 0 / 0.08);
    --horizon: rgb(85 121 94 / 0.5);
    --scrim: rgb(250 250 250 / 0.72);
    --selection: #c8d9ca;
    --shadow-card: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 1px 2px rgb(0 0 0 / 0.06);
    --shadow-window: 0 24px 64px rgb(0 0 0 / 0.12), 0 0 0 1px rgb(0 0 0 / 0.06);
    --shadow-float: 0 12px 32px rgb(0 0 0 / 0.12);
    --shadow-button: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 1px 2px rgb(0 0 0 / 0.12);
    --shadow-pop: 0 8px 24px rgb(0 0 0 / 0.12);
    --shadow-paper: 0 12px 32px rgb(0 0 0 / 0.1);
  }
}
/* Nota's type scale switches from its Mobile mode to its Desktop mode at 64rem. */
@media (min-width: 48rem) { :root { --gutter: 32px; } }
@media (min-width: 64rem) { :root { --fs-md: 18px; --fs-lg: 24px; --fs-xl: 40px; --fs-2xl: 56px; --fs-3xl: 72px; --bar: 64px; } }

/* ---------- base ---------- */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); scroll-padding-top: 80px; interpolate-size: allow-keywords; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; font: 500 var(--fs-sm)/1.55 var(--font); color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--selection); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--ink-muted); }
.small { font-size: 13px; line-height: 19px; }
.empty { padding: 24px 0; }
.wordmark { font: 400 24px/1 var(--serif); letter-spacing: -0.02em; color: var(--ink); }

/* ---------- Nota's text styles (one per Figma text style) ---------- */
.t-display-1 { font: 400 var(--fs-3xl)/1.04 var(--serif); letter-spacing: -0.02em; }
.t-display-2 { font: 400 var(--fs-2xl)/1.08 var(--serif); letter-spacing: -0.015em; }
.t-heading-1 { font: 400 var(--fs-xl)/1.12 var(--serif); letter-spacing: -0.01em; }
.t-heading-2 { font: 400 var(--fs-lg)/1.25 var(--serif); letter-spacing: -0.005em; }
.caption { font: 600 var(--fs-xs)/1.5 var(--font); color: var(--ink-faint); }
.eyebrow { font: 600 var(--fs-xs)/1.5 var(--font); color: var(--accent-text); text-transform: uppercase; }
.text-gradient, .grad-a, .grad-b { background-image: linear-gradient(to bottom, var(--grad-from), var(--grad-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-a { display: block; background-image: linear-gradient(to bottom, var(--grad-from), var(--grad-mid)); }
.grad-b { display: block; background-image: linear-gradient(to bottom, var(--grad-mid), var(--grad-to)); }
@media (forced-colors: active) { .text-gradient, .grad-a, .grad-b { background: none; color: CanvasText; } }

/* ---------- Nota's motion: entrances on load, reveals on scroll (motion.js marks data-revealed), never replayed ---------- */
@keyframes enter { from { opacity: 0; transform: translateY(var(--reveal-distance)); filter: blur(var(--reveal-blur)); } }
@keyframes enter-fade { from { opacity: 0; } }
@keyframes enter-stage { from { opacity: 0; transform: perspective(1600px) translateY(48px) rotateX(12deg); } }
@keyframes card-in { from { opacity: 0; translate: 0 12px; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes hero-flatten { from { transform: perspective(1600px) rotateX(8deg) scale(0.96); } }
.enter { animation: enter var(--d-reveal) var(--ease-standard) both; animation-delay: var(--enter-delay, 0ms); }
.enter-stage { animation: enter-stage var(--d-frame) var(--ease-out-cubic) both; animation-delay: var(--enter-delay, 400ms); transform-origin: 50% 0; }
[data-reveal] { transition-property: opacity, transform, filter; transition-duration: var(--d-reveal); transition-timing-function: var(--ease-standard); transition-delay: calc(var(--reveal-index, 0) * var(--stagger)); }
.js [data-reveal]:not([data-revealed]) { opacity: 0; transform: translateY(var(--reveal-distance)); filter: blur(var(--reveal-blur)); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 64rem) {
    .hero-tilt { transform-origin: 50% 0; animation: hero-flatten linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  }
}
html[data-switching] *, html[data-switching] *::before, html[data-switching] *::after { transition: none !important; }

/* ---------- buttons (Nota's Button: primary, secondary, ghost; press scales to 0.97) ---------- */
.btn { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-sm); font: 500 var(--fs-sm)/1 var(--font); white-space: nowrap; cursor: pointer; user-select: none; transition: background-color var(--d-fast) ease-out, border-color var(--d-fast) ease-out, color var(--d-fast) ease-out, box-shadow var(--d-fast) ease-out, scale var(--d-fast) ease-out; }
.btn::after { content: ""; position: absolute; inset: -2px 0; }
.btn:active { scale: 0.97; }
.btn .ic { width: 14px; height: 14px; transition: translate var(--d-fast) ease-out; }
.btn:hover .ic:last-child:not(:first-child) { translate: 2px 0; }
.btn-lg { height: 44px; padding: 0 20px; }
.btn-sm { height: 32px; padding: 0 12px; gap: 6px; font-size: 14px; }
.btn-sm::after { inset: -6px 0; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-button); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-quiet { background: var(--tile); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-quiet:hover { background: var(--tile-hover); }
.btn-ghost { color: var(--ink-muted); }
.btn-ghost:hover { background: var(--tile); color: var(--ink); }
.btn[disabled], .btn.is-busy { opacity: 0.5; cursor: default; scale: 1; }
.round { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); color: var(--ink-muted); transition: background-color var(--d-fast) ease, color var(--d-fast) ease; cursor: pointer; }
.round:hover { background: var(--tile-hover); color: var(--ink); }

/* ---------- the mark (BRAND.md section 2, recoloured in Nota's sage) ---------- */
.mark { flex: none; }
.mk-page { fill: var(--panel); stroke: var(--ink); stroke-width: 2; }
.mk-ink { fill: var(--ink); }
.mk-accent { fill: var(--accent); }
.mk-cut { fill: var(--mark-cut, var(--ground)); }
.mk-one { fill: none; stroke: var(--on-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the theme switch (Nota's segmented toggle) and the language links ---------- */
.theme-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-md); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default); }
.theme-switch button { display: grid; place-items: center; width: 44px; height: 40px; border-radius: var(--r-sm); color: var(--ink-muted); transition: background-color 200ms var(--ease-in-out-cubic), color 200ms var(--ease-in-out-cubic); }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--tertiary); color: var(--ink); }
.theme-switch .ic { width: 16px; height: 16px; }
.lang-links { display: flex; gap: 4px; }
.lang-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink-muted); transition: color var(--d-fast) ease, background-color var(--d-fast) ease; }
.lang-links a:hover { color: var(--ink); background: var(--tile); }
.lang-links a[aria-current="page"] { color: var(--ink); background: var(--tile-hover); box-shadow: inset 0 0 0 1px var(--line-glass); }

/* ==================== the public site ==================== */
.skip { position: absolute; left: -999px; z-index: 60; }
.skip:focus { left: 16px; top: 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--panel); color: var(--ink); }
.nav-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; pointer-events: none; }

/* Nota's navbar: clear at the top, then the page fill at 72 %, a 16 px blur and a hairline, 250 ms. */
.pub-bar { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid transparent; transition: background-color 250ms ease-out, border-color 250ms ease-out, backdrop-filter 250ms ease-out; }
html:not(.js) .pub-bar, .pub-bar[data-scrolled] { background: var(--overlay); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.pub-bar:has(.prefs[open]) { background: var(--overlay-strong); border-bottom-color: var(--line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(var(--page), 100% - 2 * var(--gutter)); height: var(--bar); margin: 0 auto; }
.bar-lead { display: flex; align-items: center; gap: 32px; min-width: 0; }
.pub-brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border-radius: var(--r-xs); }
.pub-nav { display: none; }
.pub-nav a, .pub-signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--ink-muted); transition: color var(--d-fast) ease; }
.pub-nav a:hover, .pub-signin:hover, .pub-nav a[aria-current="page"] { color: var(--ink); }
.pub-actions { display: flex; align-items: center; gap: 4px; }
.pub-actions > .btn-primary { height: 32px; padding: 0 12px; font-size: 14px; }
.pub-actions > .btn-primary::after { inset: -6px 0; }
.pub-signin { display: none; }
.prefs { position: relative; }
.prefs > summary { list-style: none; }
.prefs > summary::-webkit-details-marker { display: none; }
.prefs-phone, .prefs-close { display: none; }
.prefs[open] .prefs-open { display: none; }
.prefs[open] .prefs-close { display: inline-flex; }
.prefs-menu { position: absolute; right: 0; top: 52px; z-index: 30; display: grid; gap: 8px; min-width: 260px; padding: 14px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-glass), var(--shadow-float); transition: opacity 250ms var(--ease-standard), translate 250ms var(--ease-standard); }
@starting-style { .prefs[open] .prefs-menu { opacity: 0; translate: 0 -8px; } }
.prefs-label { font: 600 12px/1.5 var(--font); color: var(--ink-faint); }
.prefs-menu > .theme-switch, .prefs-menu > .lang-links { justify-self: start; }
.menu-links { display: none; }
@media (min-width: 64rem) {
  .pub-nav { display: flex; align-items: center; }
  .pub-signin { display: inline-flex; }
  .pub-actions { gap: 8px; }
}
@media (max-width: 63.99rem) {
  .prefs-desk { display: none; }
  .prefs-phone { display: inline-flex; }
  .prefs-menu { position: fixed; left: 0; right: 0; top: var(--bar); min-width: 0; padding: 16px var(--gutter) 24px; border-radius: 0; background: var(--overlay-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
  .menu-links { display: grid; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .menu-links a { display: flex; align-items: center; height: 48px; font-size: var(--fs-md); color: var(--ink); transition: opacity 250ms var(--ease-standard), translate 250ms var(--ease-standard); transition-delay: calc(var(--i, 0) * 30ms); }
  .menu-links .menu-signin { color: var(--ink-muted); }
  .pub-actions .prefs { order: 3; margin-right: -10px; }
}
@media (max-width: 26rem) {
  .pub-bar .pub-brand .wordmark { display: none; }
  @starting-style { .prefs[open] .menu-links a { opacity: 0; translate: 0 4px; } }
}

/* Containers: 1152 px with Nota's gutters (20, then 32). */
.page-head, .formats, .steps, .bento, .section-tight, .plans-wrap, .faq-block, .prose, .facts, .sources, .related, .center-cta, .demo-stage, .pub-foot { width: min(var(--page), 100% - 2 * var(--gutter)); margin-inline: auto; }
.pub main { overflow-x: clip; }

/* Section heading */
.sh { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.sh-center { align-items: center; max-width: 760px; margin-inline: auto; text-align: center; }
.sh-title { text-wrap: balance; }
.sh-lead { font: 500 var(--fs-md)/1.55 var(--font); color: var(--ink-muted); text-wrap: pretty; max-width: 640px; }
.page-head { padding: calc(var(--bar) + 56px) 0 48px; }
@media (min-width: 64rem) { .page-head { padding: calc(var(--bar) + 80px) 0 64px; } }
.section-tight { padding-bottom: 32px; }

/* Announcement pill */
.ann-pill { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: var(--r-pill); border: 1px solid var(--line-glass); background: var(--tile); transition: background-color var(--d-fast) ease; }
.ann-pill::after { content: ""; position: absolute; inset: -6px 0; }
.ann-pill:hover { background: var(--tile-hover); }
.ann-tag { padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent-soft); font: 600 var(--fs-xs)/1.5 var(--font); color: var(--accent-text); }
.ann-label { font: 500 var(--fs-label)/1.4 var(--font); color: var(--ink-muted); transition: color var(--d-fast) ease; }
.ann-pill:hover .ann-label { color: var(--ink); }
.ann-pill .ic { width: 14px; height: 14px; color: var(--ink-faint); transition: translate var(--d-fast) ease-out; }
.ann-pill:hover .ic { translate: 2px 0; }

/* Hero */
.hero { position: relative; padding-top: 112px; }
@media (min-width: 64rem) { .hero { padding-top: 144px; } }
.hero-lines { display: none; position: absolute; top: 0; bottom: 0; left: 50%; width: var(--page); translate: -50% 0; pointer-events: none; }
.hero-lines span { position: absolute; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent, var(--hero-line), transparent); }
.hero-lines span:last-child { right: 0; }
@media (min-width: 80rem) { .hero-lines { display: block; } }
.hero-copy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; width: min(var(--page), 100% - 2 * var(--gutter)); margin: 0 auto; text-align: center; }
@media (min-width: 64rem) { .hero-copy { gap: 24px; } }
.hero-copy h1 { max-width: 980px; text-wrap: balance; }
.hero-lead { max-width: 560px; font: 500 var(--fs-md)/1.55 var(--font); color: var(--ink-muted); text-wrap: pretty; }
.hero-cta { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; padding-top: 8px; }
@media (min-width: 40rem) { .hero-cta { flex-direction: row; align-items: center; justify-content: center; width: auto; } }
.hero-figure { position: relative; width: min(var(--page), 100% - 2 * var(--gutter)); margin: 56px auto 0; --sat: clamp(0px, (100vw - 1152px) / 2 - 32px, 144px); }
@media (min-width: 64rem) { .hero-figure { margin-top: 72px; } }
.hero-glow { position: absolute; inset: -96px 12% auto; height: 280px; background: radial-gradient(50% 50% at 50% 70%, var(--glow), transparent 70%); filter: blur(40px); opacity: 0.7; pointer-events: none; }
.hero-tilt { position: relative; }

/* The product window (Nota's app window), drawn from Dossier's own screen */
.win { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line-default); background: var(--ground); box-shadow: var(--shadow-window); font-size: 14px; line-height: 1.4; text-align: start; }
.win-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; padding: 0 20px; border-bottom: 1px solid var(--line-default); background: var(--panel); }
.win-lead, .win-actions, .win-crumb, .win-brand, .win-tabs { display: flex; align-items: center; }
.win-lead { gap: 24px; min-width: 0; }
.win-brand { gap: 6px; }
.win-brand .wordmark { font-size: 21px; }
.win-tabs { gap: 2px; }
.win-tab { position: relative; padding: 6px 12px; color: var(--ink-faint); }
.win-tab[data-active] { color: var(--ink); }
.win-tab[data-active]::after { content: ""; position: absolute; inset: auto 12px -13px; height: 2px; border-radius: 2px; background: var(--accent); }
.win-rule { width: 1px; height: 16px; background: var(--line-default); }
.win-crumb { gap: 8px; color: var(--ink-muted); white-space: nowrap; }
.win-actions { gap: 8px; }
.win-av { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-text); font: 600 12px/1 var(--font); }
.win-body { display: flex; }
.win-side { display: flex; flex-direction: column; gap: 12px; width: 240px; flex: none; padding: 12px; border-right: 1px solid var(--line-default); background: var(--panel); }
.win-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-default); background: var(--tile); color: var(--ink-faint); font-size: 13px; }
.win-search .ic { width: 14px; height: 14px; }
.win-side > .btn { width: 100%; }
.win-list { display: flex; flex-direction: column; gap: 2px; margin-inline: -4px; }
.win-cap { padding: 4px 8px; font: 500 12px/1.5 var(--font); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); }
.win-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; row-gap: 2px; align-items: center; padding: 8px; border-radius: var(--r-sm); font-size: 13px; }
.win-item .kind { grid-row: 1 / 3; width: 32px; height: 32px; }
.win-item .pill { grid-row: 1 / 3; grid-column: 3; }
.win-item-name { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-item-sub { grid-column: 2; font-size: 12px; color: var(--ink-faint); }
.win-item[data-active] { background: var(--accent-soft); }
.win-item[data-active] .win-item-name { color: var(--accent-text); }
.win-item .pill { display: none; }
.win-main { flex: 1; min-width: 0; padding: 24px 32px; }
.win .convo { min-height: 0; padding: 0; background: none; box-shadow: none; }
.win-hero { height: 560px; -webkit-mask-image: linear-gradient(to bottom, var(--ink) 78%, transparent); mask-image: linear-gradient(to bottom, var(--ink) 78%, transparent); }
.win-hero .win-body { height: calc(100% - 56px); }
.win-hero .convo { max-width: 560px; }
.win-hero .compose { margin-top: 20px; color: var(--ink-faint); }
.win-hero .compose > span:first-child { flex: 1; }
.win-demo .win-main { padding: 20px; }
.hero-card { position: absolute; right: calc(-1 * var(--sat)); top: 168px; z-index: 2; display: flex; flex-direction: column; gap: 12px; width: 320px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line-glass); background: var(--raised); box-shadow: var(--shadow-float); animation: card-in 700ms var(--ease-standard) both; animation-delay: 1500ms; }
.hc-head { display: flex; align-items: center; gap: 12px; }
.hc-head .cite { min-width: 28px; height: 28px; margin: 0; font-size: 13px; vertical-align: 0; }
.hc-title { display: block; font: 600 14px/1.4 var(--font); color: var(--ink); }
.hc-meta { display: block; font-size: 12px; color: var(--ink-muted); }
.hc-paper { margin: 0; padding: 14px 16px; font-size: 12px; line-height: 18px; }
.hc-paper h3 { font-size: 15px; }
.hc-paper .quoted { margin-left: -8px; }
.hc-ok { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.hc-ok .ic { width: 14px; height: 14px; color: var(--fill); }
@media (max-width: 63.99rem) {
  .win-hero .win-side, .win-hero .win-tabs, .win-hero .win-rule, .win-hero .win-actions .btn { display: none; }
  .win-hero .convo { max-width: 62%; }
  .hero-card { right: 16px; }
}
@media (max-width: 47.99rem) {
  .win-hero { height: 440px; }
  .win-hero .win-crumb { display: none; }
  .win-hero .win-main { padding: 16px; }
  .win-hero .convo { max-width: none; }
  .hero-card { position: relative; right: auto; top: auto; width: auto; margin: -120px 16px 0; }
  .win-demo .win-side, .win-demo .win-tabs, .win-demo .win-rule, .win-demo .win-actions { display: none; }
  .win-demo .win-main { padding: 14px; }
}
@media (min-width: 48rem) and (max-width: 63.99rem) { .win-demo .win-side { display: none; } }

/* Formats (Nota's audience row): the serif words, a marquee on phones, wrapped under reduced motion */
.formats { padding: 64px 0; text-align: center; }
@media (min-width: 64rem) { .formats { padding: 80px 0 96px; } }
.formats h2 { margin: 0 auto; }
.formats-row, .formats-marquee ul { list-style: none; padding: 0; }
.formats-row { display: none; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin-top: 24px; }
.formats-row li, .formats-marquee li { font: 400 var(--fs-lg)/1.25 var(--serif); color: var(--ink-muted); white-space: nowrap; }
.formats-marquee { margin-top: 20px; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, var(--ink) 15%, var(--ink) 85%, transparent); mask-image: linear-gradient(to right, transparent, var(--ink) 15%, var(--ink) 85%, transparent); }
.formats-marquee ul { display: flex; gap: 40px; width: max-content; margin: 0; animation: marquee 40s linear infinite; }
.formats-marquee:hover ul { animation-play-state: paused; }
.formats-note { max-width: 640px; margin: 24px auto 0; font-size: var(--fs-sm); color: var(--ink-faint); text-wrap: pretty; }
@media (min-width: 64rem) { .formats-row { display: flex; } .formats-marquee { display: none; } }
@media (prefers-reduced-motion: reduce) { .formats-row { display: flex; } .formats-marquee { display: none; } }

/* How it works (Nota's stacked steps, with the rail that fills) */
.steps { padding: 64px 0 96px; }
@media (min-width: 64rem) { .steps { padding: 96px 0 128px; } }
.steps-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 56px; margin-top: 48px; }
.step-row { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 64rem) { .step-row { display: grid; grid-template-columns: 400px minmax(0, 1fr); align-items: center; gap: 64px; } }
.how-step { display: flex; gap: 20px; }
.how-rail { position: relative; width: 2px; flex: none; overflow: hidden; border-radius: var(--r-pill); background: var(--line-default); }
.how-rail-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--fill); transform-origin: top; transform: scaleY(0); transition: transform 900ms var(--ease-standard) 200ms; }
html:not(.js) .how-rail-fill, .how-step[data-revealed] .how-rail-fill { transform: scaleY(1); }
.how-text { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.how-num { font: 600 var(--fs-xs)/1.5 var(--font); color: var(--accent-text); }
.how-text h3 { color: var(--ink); }
.how-text p { font-size: var(--fs-sm); color: var(--ink-muted); text-wrap: pretty; }
.step-pic { display: grid; place-items: center; min-height: 240px; padding: 24px; }
@media (min-width: 64rem) { .step-pic { min-height: 300px; padding: 40px; } }

/* Spotlight card (Nota's SpotlightCard): glass, a light that follows the pointer, its edge lit near it */
.spot { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--line-glass); background: var(--tile); box-shadow: var(--shadow-card); }
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; transition: opacity var(--d-fast) ease; background: radial-gradient(420px circle at var(--x, 50%) var(--y, 0%), var(--spot), transparent 60%); }
.spot::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; opacity: 0; pointer-events: none; transition: opacity var(--d-fast) ease; background: radial-gradient(260px circle at var(--x, 50%) var(--y, 0%), var(--spot-edge), transparent 70%); -webkit-mask: linear-gradient(var(--ink) 0 0) content-box, linear-gradient(var(--ink) 0 0); -webkit-mask-composite: xor; mask: linear-gradient(var(--ink) 0 0) content-box exclude, linear-gradient(var(--ink) 0 0); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .spot:hover::before, .spot:hover::after { opacity: 1; } }

/* Bento (Nota's features grid): run-in copy top left, the picture below */
.bento { display: grid; gap: 12px; }
@media (min-width: 48rem) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.b-tile { display: flex; flex-direction: column; min-height: 360px; }
@media (min-width: 64rem) { .b-tile { min-height: 420px; } }
@media (min-width: 48rem) { .b-hero, .b-wide { grid-column: span 2; } }
.b-copy { max-width: 520px; padding: 24px 24px 0; font: 500 var(--fs-md)/1.55 var(--font); color: var(--ink-faint); text-wrap: pretty; }
@media (min-width: 64rem) { .b-copy { padding: 32px 32px 0; } }
.b-copy h2, .b-copy p { display: inline; font: inherit; }
.b-copy h2 { font-weight: 600; color: var(--ink); }
.b-pic { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; padding: 24px; }
@media (min-width: 64rem) { .b-pic { padding: 32px; } }
.bento-text .b-tile { min-height: 0; }
.bento-text .b-copy { padding-bottom: 24px; }
@media (min-width: 64rem) { .bento-text .b-copy { padding-bottom: 32px; } }
.guide-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
@media (min-width: 64rem) { .guide-card { padding: 32px; } }
.guide-card h2 { font: 400 var(--fs-lg)/1.25 var(--serif); color: var(--ink); }
.guide-card p { flex: 1; font-size: var(--fs-sm); color: var(--ink-muted); }
.guide-go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--accent-text); }
.guide-go .ic { width: 14px; height: 14px; transition: translate var(--d-fast) ease-out; }
.guide-card:hover .guide-go .ic { translate: 2px 0; }
.center-cta { margin-top: 48px; margin-bottom: 96px; text-align: center; }

/* The small pictures, drawn with the app's own parts */
.mini { display: grid; gap: 12px; width: 100%; max-width: 480px; font-size: 14px; line-height: 1.45; text-align: start; }
.mini .a { max-width: none; }
.mini .a p { font-size: 14px; line-height: 22px; }
.mini-rows { padding: 4px 12px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default), var(--shadow-float); }
.mini-rows .row { grid-template-columns: 36px minmax(0, 1fr) auto; min-height: 52px; }
.mini-rows.gap .row { grid-template-columns: 48px minmax(0, 1fr) auto; }
.mini-rows.chk .row { grid-template-columns: 14px minmax(0, 1fr) auto; }
.b-tile:not(.b-hero) .mini-rows.gap .row { grid-template-columns: 40px minmax(0, 1fr); }
.b-tile:not(.b-hero) .mini-rows.gap .row > .btn { grid-column: 2; justify-self: start; }
.mini-share { min-width: 0; overflow: hidden; }
.mini-share .code { min-width: 0; }
@media (max-width: 39.99rem) {
  .mini-rows.gap .row { grid-template-columns: 40px minmax(0, 1fr); }
  .mini-rows.gap .row > .btn { grid-column: 2; justify-self: start; }
  .mini-rows.chk .row { grid-template-columns: 14px minmax(0, 1fr); }
  .mini-rows.chk .row > .pill { grid-column: 2; justify-self: start; }
}
.mini-share, .mini-usage, .mini-settings { padding: 16px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default), var(--shadow-float); }
.mini-share .row { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 0; margin-top: 8px; }
.mini-usage .bars { grid-template-columns: repeat(16, minmax(0, 1fr)); height: 120px; margin: 0; }
.mini-settings { display: grid; gap: 6px; }
.mini-select { display: flex; align-items: center; justify-content: space-between; height: 40px; margin-bottom: 6px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--field); color: var(--ink); }
.mini-select .ic { width: 14px; height: 14px; color: var(--ink-muted); }
.mini-settings .btn { justify-self: start; }

/* Pricing (Nota's plan cards) */
.plans-wrap { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
@media (min-width: 64rem) { .plans-wrap { gap: 24px; } }
.plan { display: flex; flex-direction: column; padding: 24px; border-radius: var(--r-xl); border: 1px solid var(--line-glass); background: var(--tile); box-shadow: var(--shadow-card); }
@media (min-width: 64rem) { .plan { padding: 32px; } }
.plan.featured { border-color: var(--accent-line); }
.plan h2 { color: var(--ink); }
.plan-price { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 24px; }
.plan-price .t-display-2 { color: var(--ink); font-variant-numeric: lining-nums; }
.plan > .btn { width: 100%; }
.plan-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 24px; padding: 24px 0 0; border-top: 1px solid var(--line); }
.plan-list li { display: flex; align-items: flex-start; gap: 12px; font-size: var(--fs-sm); color: var(--ink-muted); }
.plan-list .ic { width: 14px; height: 14px; margin-top: 5px; color: var(--accent-text); }
.plans { display: grid; gap: 16px; }
@media (min-width: 56rem) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .plans { gap: 24px; } }
.plan-wide { gap: 24px; }
.plan-copy { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.plan-copy p { font-size: var(--fs-sm); color: var(--ink-muted); text-wrap: pretty; }
.plan-side { display: flex; flex-direction: column; gap: 16px; }
.plan-side .plan-price { margin: 0; }
@media (min-width: 48rem) { .plan-wide { flex-direction: row; align-items: center; justify-content: space-between; } .plan-side { align-items: flex-end; flex: none; } }
.plans-note { max-width: 760px; margin: 8px auto; text-align: center; font-weight: 500; }
.prices-pending { max-width: 760px; margin: 0 auto 8px; padding: 12px 18px; border: 1px solid var(--accent-line); border-radius: var(--r-lg); background: var(--accent-soft); color: var(--ink); text-align: center; font-weight: 500; }

/* FAQ (Nota's accordion: height from 0 to auto in 300 ms, the chevron turns) */
.faq-block { display: grid; gap: 40px; padding: 96px 0; }
@media (min-width: 64rem) { .faq-block { grid-template-columns: 360px minmax(0, 1fr); gap: 96px; padding: 128px 0; } }
.faq-side { display: flex; flex-direction: column; gap: 16px; }
.faq-note { font-size: var(--fs-sm); color: var(--ink-faint); }
.faq-note a, .sources a, .related a { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent); text-underline-offset: 4px; transition: text-decoration-color var(--d-fast) ease; }
.faq-note a:hover, .sources a:hover, .related a:hover { text-decoration-color: var(--accent-text); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; display: flex; align-items: center; min-height: 64px; padding: 18px 48px 18px 0; list-style: none; cursor: pointer; font: 500 var(--fs-md)/1.45 var(--font); color: var(--ink); border-radius: var(--r-xs); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line-glass); transition: background-color var(--d-fast) ease; }
.faq summary::before { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 1.5px solid var(--ink-muted); border-bottom: 1.5px solid var(--ink-muted); rotate: 45deg; transition: rotate var(--d-base) var(--ease-in-out-cubic), margin-top var(--d-base) var(--ease-in-out-cubic); }
.faq details[open] > summary::after { background: var(--tile-hover); }
.faq details[open] > summary::before { rotate: 225deg; margin-top: -1px; border-color: var(--ink); }
.faq summary:hover::before { border-color: var(--ink); }
.faq details p { max-width: 600px; padding-bottom: 20px; font-size: var(--fs-sm); color: var(--ink-muted); text-wrap: pretty; }
.faq details::details-content { block-size: 0; overflow-y: clip; transition: block-size var(--d-base) var(--ease-in-out-cubic), content-visibility var(--d-base) allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* Final CTA (Nota's closing call: the statement over a sage horizon and glow) */
.final-cta { position: relative; isolation: isolate; overflow: hidden; padding: 96px 0 144px; }
@media (min-width: 64rem) { .final-cta { padding: 160px 0 208px; } }
.pub main > .final-cta:first-child { padding-top: calc(var(--bar) + 96px); }
.cta-glow { position: absolute; bottom: 0; left: 50%; z-index: -1; width: min(900px, 120%); height: 320px; translate: -50% 50%; border-radius: var(--r-pill); background: var(--glow); filter: blur(100px); }
.cta-horizon { position: absolute; bottom: 96px; left: 50%; z-index: -1; width: min(var(--page), 100%); height: 1px; translate: -50% 0; background: linear-gradient(to right, transparent, var(--horizon), transparent); }
@media (min-width: 64rem) { .cta-horizon { bottom: 144px; } }
.cta-in { display: flex; flex-direction: column; align-items: center; gap: 32px; width: min(var(--page), 100% - 2 * var(--gutter)); margin: 0 auto; text-align: center; }
.cta-title { text-wrap: balance; }
.cta-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
.cta-second { display: none; }
@media (min-width: 40rem) { .cta-actions { flex-direction: row; justify-content: center; width: auto; } .cta-second { display: inline-flex; } }
.final-cta .sh-lead { margin-top: -12px; }

/* Prose (privacy, terms), facts, credit, sources, related */
.prose { max-width: 760px; padding-bottom: 96px; }
.prose-item { padding: 24px 0; border-top: 1px solid var(--line); }
.prose-item h2 { color: var(--ink); }
.prose-item p { margin-top: 8px; font-size: var(--fs-sm); color: var(--ink-muted); text-wrap: pretty; }
.facts { max-width: 960px; margin-top: 32px; padding: 24px; border-radius: var(--r-xl); border: 1px solid var(--line-glass); background: var(--tile); box-shadow: var(--shadow-card); }
@media (min-width: 64rem) { .facts { padding: 32px; } }
.facts h2 { margin-bottom: 12px; color: var(--ink); }
.facts dl > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { color: var(--ink-muted); }
.sources, .related { max-width: 760px; padding: 24px 0; border-top: 1px solid var(--line); }
.sources ul, .related ul { list-style: none; padding: 0; display: grid; gap: 4px 24px; margin-top: 12px; }
.related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sources li a, .related li a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--fs-sm); }
.related li .ic { width: 14px; height: 14px; }
.related p { margin-top: 8px; font-size: var(--fs-sm); color: var(--ink-faint); }
.related p a { display: inline-flex; align-items: center; min-height: 44px; }
.published { margin-top: 4px; }

/* Footer (Nota's footer) */
.foot-in { display: flex; flex-direction: column; gap: 40px; padding: 48px 0 40px; border-top: 1px solid var(--line); }
@media (min-width: 64rem) { .foot-in { gap: 48px; padding-top: 64px; } }
.foot-top { display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 48rem) { .foot-top { flex-direction: row; justify-content: space-between; } }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.foot-brand p { max-width: 240px; font-size: var(--fs-sm); color: var(--ink-faint); }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
@media (min-width: 64rem) { .foot-cols { grid-template-columns: repeat(4, auto); gap: 64px; } }
.foot-title { font: 600 var(--fs-xs)/1.5 var(--font); color: var(--ink); }
.foot-col ul { list-style: none; padding: 0; margin-top: 4px; }
.foot-col a { display: inline-flex; align-items: center; min-height: 40px; font-size: var(--fs-sm); color: var(--ink-faint); transition: color var(--d-fast) ease; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font: 600 var(--fs-xs)/1.5 var(--font); color: var(--ink-faint); }
.foot-prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.foot-quiet { color: var(--ink-faint); }
@media (max-width: 47.99rem) { .foot-bottom { flex-direction: column; align-items: flex-start; } }

/* ==================== the app (Nota's dashboard style: sidebar, page head, cards, rows, chips) ==================== */
.app-body { background: var(--ground); }
.dev-banner { margin: 0; padding: 8px 16px; text-align: center; font-size: 13px; background: var(--warn-soft); color: var(--warn-text); }
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--panel); border-right: 1px solid var(--line-default); }
.rail .brand { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; margin-bottom: 12px; border-radius: var(--r-sm); }
.rail-caption { padding: 4px 12px; font: 500 12px/1.5 var(--font); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); }
.rail-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font: 500 14px/20px var(--font); color: var(--ink-muted); transition: background-color var(--d-instant) ease, color var(--d-instant) ease; }
.rail-item:hover { background: var(--tile-hover); color: var(--ink); }
.rail-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.rail-item .tip { flex: 1; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-xs); background: var(--warn-soft); color: var(--warn-text); font: 600 12px/20px var(--font); text-align: center; }
.rail hr { width: 100%; border: 0; border-top: 1px solid var(--line-default); margin: 8px 0; }
.rail-foot { margin-top: auto; padding: 12px 4px 4px; display: grid; gap: 10px; }
/* The person, their account and signing out, at the foot of the sidebar */
.rail-me { display: flex; align-items: center; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line-default); }
.rail-account { flex: 1; min-width: 0; padding: 0 8px; }
.rail-account .tip { display: grid; min-width: 0; }
.me-name, .me-ws { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.me-name { color: var(--ink); }
.me-ws { font-size: 12px; line-height: 16px; color: var(--ink-faint); }
.rail-out { margin: 0; }
a.av { text-decoration: none; min-width: 44px; min-height: 44px; }
.sheet { min-width: 0; width: 100%; max-width: 1504px; padding: 32px 32px 64px; }
.phone-top { display: none; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line-default); }
.kicker { margin-bottom: 6px; font: 500 12px/16px var(--font); color: var(--ink-muted); }
.top h1 { max-width: 780px; font: 400 32px/38px var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.controls { display: flex; flex: none; align-items: center; gap: 8px; }
.controls:empty { display: none; }
.flash { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.acct-error { background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad-line); }

/* cards on a 12-column grid */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile { grid-column: span 6; min-width: 0; padding: 20px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default); }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: 1 / -1; }
.tile h2 { font: 500 14px/20px var(--font); color: var(--ink); }
.head { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 4px; }
.head .muted { font-size: 13px; }
.head .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fig { font: 400 40px/44px var(--serif); font-variant-numeric: tabular-nums lining-nums; color: var(--ink); }
.label { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.meter { height: 8px; margin: 12px 0; overflow: hidden; border-radius: var(--r-pill); background: var(--track); box-shadow: inset 0 0 0 1px var(--line-strong); }
.meter > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--fill); }

/* state tags (Nota's chips; BRAND.md section 8: the shape differs in form, the word is always there) */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px 0 6px; border-radius: var(--r-xs); font: 500 12px/16px var(--font); white-space: nowrap; background: var(--panel); color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line-default); }
.pill::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.pill.ok { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.pill.ok::before { background: var(--fill); box-shadow: none; }
.pill.info::before { background: linear-gradient(90deg, transparent 50%, var(--fill) 50%); box-shadow: inset 0 0 0 1.5px var(--fill); }
.pill.warn { background: var(--warn-soft); color: var(--warn-text); box-shadow: none; }
.pill.warn::before { box-shadow: inset 0 0 0 1.5px var(--warn-mark); }
.pill.bad { background: var(--bad-soft); color: var(--bad-text); box-shadow: inset 0 0 0 1px var(--bad-line); }
.pill.bad::before { border-radius: 2px; background: var(--bad-text); box-shadow: none; }
.dot { width: 12px; height: 12px; flex: none; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.dot.ok { background: var(--fill); box-shadow: none; }
.dot.bad { border-radius: 3px; background: var(--bad-text); box-shadow: none; }

/* rows (Nota's table rows) */
.rows { display: grid; margin-top: 4px; }
.row { display: grid; align-items: center; gap: 14px; min-height: 56px; padding: 10px 8px; border-top: 1px solid var(--line-default); border-radius: 0; transition: background-color var(--d-instant) ease; }
.row:first-child { border-top: 0; }
@media (hover: hover) and (pointer: fine) { .rows .row:hover { background: var(--tile); } }
.row .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/20px var(--font); color: var(--ink); }
.t.wrap { white-space: normal; overflow: visible; }
.row .sub { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.row-main { min-width: 0; }
.row-state { display: none; margin-top: 6px; }
.row.two { grid-template-columns: minmax(0, 1fr) auto; }
.row.person { grid-template-columns: 36px minmax(0, 1fr) auto; }
.kind { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--tertiary); color: var(--ink-muted); font: 500 10px/1 var(--mono); letter-spacing: 0.02em; }
.av { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-text); font: 600 12px/1 var(--font); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-sm); font: 500 13px/1 var(--font); color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background-color var(--d-fast) ease, color var(--d-fast) ease; white-space: nowrap; }
.chip::after { content: ""; position: absolute; inset: -6px 0; }
.chip:hover { background: var(--tile-hover); color: var(--ink); }
.chip[aria-current="true"] { background: var(--selected); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.trial-chip { height: 40px; }

/* fields */
select, input:not([type]), input[type="text"], input[type="email"], input[type="password"], textarea { min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--field); color: var(--ink); font-size: 14px; transition: border-color var(--d-fast) ease; }
select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
textarea { width: 100%; resize: vertical; }
input[type="checkbox"] { accent-color: var(--accent); }
.stack { display: grid; gap: 12px; margin-top: 14px; }
.stack label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.form-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Ask: the conversation and the cited page */
.ask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 24px; }
.ask:not(.has-source) { grid-template-columns: minmax(0, 1fr); }
.convo { display: flex; flex-direction: column; min-height: 560px; padding: 24px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default); }
.msgs { flex: 1; display: grid; align-content: start; gap: 20px; }
.q { justify-self: end; max-width: 80%; padding: 10px 14px; border-radius: 12px 12px 4px 12px; background: var(--tertiary); color: var(--ink); font: 500 14px/20px var(--font); }
.a { max-width: 92%; }
.a p { margin: 0 0 10px; font: 400 15px/24px var(--font); color: var(--ink); }
.a strong { font-weight: 600; }
.cite { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin: 0 2px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font: 600 11px/20px var(--font); vertical-align: 2px; transition: box-shadow var(--d-fast) ease; }
.cite[aria-current="true"] { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--fill); }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.src { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 5px; border-radius: var(--r-sm); background: var(--tile); color: var(--ink-muted); font-size: 13px; box-shadow: inset 0 0 0 1px var(--line-default); transition: background-color var(--d-fast) ease, color var(--d-fast) ease; }
.src b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: 11px; }
.src:hover { color: var(--ink); }
.src[aria-current="true"] { background: var(--selected); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.unknown { padding: 14px 16px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--ink); }
.unknown p { margin: 0 0 8px; font-size: 14px; line-height: 21px; }
.unknown p:last-child, .unknown p:last-of-type { margin-bottom: 0; }
.unknown strong { color: var(--warn-text); font-weight: 600; }
.unknown .muted { color: var(--ink); opacity: 1; }
.unknown .btn { margin-top: 10px; }
.partial-note { display: inline-flex; margin: 0 0 8px; padding: 4px 10px; border-radius: var(--r-xs); background: var(--warn-soft); color: var(--warn-text); font: 500 12px/16px var(--font); }
.found-list { display: grid; gap: 8px; margin: 4px 0 12px; }
.found { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line-default); }
.found[aria-current="true"] { background: var(--selected); box-shadow: inset 0 0 0 1px var(--accent-line); }
.found b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: 12px; }
.found > span { display: grid; gap: 2px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; font-size: 12px; color: var(--ink-faint); }
.compose { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding: 4px 4px 4px 16px; border-radius: var(--r-lg); background: var(--field); box-shadow: inset 0 0 0 1px var(--line-strong); }
.compose:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.compose input { flex: 1; min-width: 0; height: 44px; min-height: 0; padding: 0; border: 0; background: none; outline: none; font-size: 15px; }
.compose input:focus-visible { outline: none; }
.send { width: 44px; height: 44px; padding: 0; }
.send .ic { width: 18px; height: 18px; }
.viewer { position: sticky; top: 24px; align-self: start; padding: 20px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default); }
.viewer .head { align-items: flex-start; }
.vt-text { min-width: 0; }
.viewer h2 { font: 400 22px/28px var(--serif); color: var(--ink); }
.paper { position: relative; margin-top: 14px; padding: 28px 26px; border-radius: var(--r-xs); background: var(--paper); color: var(--paper-muted); font: 400 13px/20px var(--font); box-shadow: var(--shadow-paper); }
.paper h3 { margin: 0 0 8px; padding-right: 24px; font: 400 18px/24px var(--serif); color: var(--paper-ink); }
.paper p { margin: 0 0 10px; }
.paper .near { color: var(--paper-muted); }
.paper .quoted { margin-left: -12px; padding: 8px 10px; border-left: 3px solid var(--paper-accent); border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--paper-tint); color: var(--paper-ink); white-space: pre-line; }
.paper .folio { position: absolute; top: 14px; right: 18px; font: 500 11px/1 var(--mono); color: var(--paper-muted); }
.pagebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 12px; color: var(--ink-muted); }

/* Library: the drop zone and the rows */
.drop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 16px; padding: 18px 20px; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); background: var(--tile); transition: border-color var(--d-fast) ease, background-color var(--d-fast) ease; }
.drop.is-over { border-color: var(--focus); background: var(--selected); }
.drop-mark { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); }
.drop-mark:hover { background: var(--accent); color: var(--on-accent); }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kinds span { padding: 0 8px; border-radius: var(--r-xs); background: var(--tertiary); color: var(--ink-muted); font: 500 11px/20px var(--mono); }
.drop-actions { display: grid; gap: 8px; justify-items: end; }
.drop-actions label.small { display: flex; align-items: center; gap: 8px; }
.drop-where { max-width: 280px; text-align: end; }
.file-pick:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.lib .row { grid-template-columns: 36px minmax(0, 1fr) 120px 96px 140px 140px; }
.col-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.col-act > a.round { width: 36px; height: 36px; position: relative; }
.col-act > a.round::after { content: ""; position: absolute; inset: -4px; }
.remove, .move { position: relative; display: inline-block; }
.remove > summary.round, .move > summary.round { width: 36px; height: 36px; }
.remove > summary.round::after, .move > summary.round::after { content: ""; position: absolute; inset: -4px; }
.remove[open] form, .move[open] form { position: absolute; right: 0; top: 42px; z-index: 5; width: 260px; padding: 12px; border-radius: var(--r-md); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-glass), var(--shadow-pop); }
.move form { display: grid; gap: 10px; }
.move form label { display: grid; gap: 6px; color: var(--ink-muted); }
.remove form p { margin: 0 0 8px; color: var(--ink-muted); }
.lib-search { margin-left: auto; }
.lib-search input { width: 220px; min-height: 36px; }
/* A second grid of tiles under a first one keeps the same gap between them */
.grid + .grid, .grid-next { margin-top: 16px; }
/* An answer's actions: copy it, or say it is wrong (it goes to Gaps) */
.a-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.a-actions form { margin: 0; }
.a-actions .btn { gap: 6px; }
/* The conversations: history and a new one */
.history-menu { position: relative; }
.history-menu > summary { list-style: none; gap: 6px; }
.history-menu > summary::-webkit-details-marker { display: none; }
.history-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(360px, 86vw); max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: var(--r-lg); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-glass), var(--shadow-pop); }
.history-item { display: grid; gap: 2px; min-height: 44px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.history-item:hover, .history-item[aria-current="true"] { background: var(--tile-hover); }
.history-item .t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.history-item .sub { font-size: 12px; color: var(--ink-faint); }

/* Gaps, Checks, Share, Usage, Settings */
.gap .row { grid-template-columns: 56px minmax(0, 1fr) auto; }
.times { font: 400 28px/1 var(--serif); font-variant-numeric: tabular-nums lining-nums; text-align: center; color: var(--ink); }
.times small { display: block; margin-top: 2px; font: 500 11px/14px var(--font); color: var(--ink-muted); }
.gap-answer { justify-self: end; }
.gap-answer[open] { grid-column: 1 / -1; justify-self: stretch; display: grid; gap: 8px; }
.gap-answer[open] > summary { justify-self: end; }
.chk .row { grid-template-columns: 14px minmax(0, 1fr) minmax(0, 220px) 80px; }
.add-check { margin-top: 18px; }
.code { min-width: 0; display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ground); box-shadow: inset 0 0 0 1px var(--line-default); }
.code code { flex: 1; overflow-x: auto; white-space: nowrap; font: 12px/20px var(--mono); color: var(--ink-muted); }
.bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: end; gap: 4px; height: 150px; margin-top: 18px; }
.bars i { display: block; min-height: 4px; border-radius: 3px 3px 1px 1px; background: var(--fill); }
.bars i.wk { background: repeating-linear-gradient(135deg, var(--fill) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--fill); }
.two-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.well-fig { padding: 12px 14px; border-radius: var(--r-md); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line-default); }
.small-fig { font-size: 26px; line-height: 30px; }
.acct .tile { grid-column: span 6; }
.acct-form { display: grid; gap: 8px; max-width: 420px; margin-top: 12px; }
.acct-form label { font: 500 13px/1.4 var(--font); color: var(--ink); }
.acct-form .btn { justify-self: start; margin-top: 4px; }
.acct-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acct-inline input, .acct-inline select { width: auto; min-width: 0; flex: 1 1 140px; }
.acct-codes { margin-bottom: 16px; }
.acct-code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.acct-code-list li { padding: 8px 12px; border-radius: var(--r-sm); background: var(--tertiary); color: var(--ink); }
.acct-secret { margin: 8px 0 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--tertiary); color: var(--ink); word-break: break-all; }
.acct-team { display: block; margin-top: 16px; }
.acct-invite { max-width: 520px; }
.acct-collections { display: grid; gap: 4px; margin: 4px 0 0; padding: 10px 14px; border: 1px solid var(--line-default); border-radius: var(--r-md); }
.acct-collections legend { padding: 0 4px; font-size: 13px; color: var(--ink-muted); }
.acct-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; }
.acct-check input { width: 20px; height: 20px; min-height: 0; }
.acct-member { grid-template-columns: minmax(0, 1fr) auto auto; }
.acct-sub { margin: 20px 0 0; font: 500 14px/20px var(--font); }
.tile > p { margin-top: 8px; }
.tile > form { margin-top: 12px; }

/* the phone tab bar and top bar */
.tabbar { display: none; }

@media (max-width: 1080px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .ask { grid-template-columns: minmax(0, 1fr); }
  .viewer { position: static; }
  .s3, .s4, .s5 { grid-column: span 6; } .s7, .s8 { grid-column: 1 / -1; }
  .lib .row { grid-template-columns: 36px minmax(0, 1fr) 96px 140px; }
  .lib .row > .col-coll { display: none; }
  .lib .row > .col-act { grid-column: 2 / -1; justify-content: flex-start; }
  .lib-search { margin-left: 0; width: 100%; }
  .lib-search input { width: 100%; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .sheet { padding: 12px 16px 104px; }
  .phone-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font: 500 15px/1.4 var(--font); }
  .phone-top .brand { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); }
  .phone-top .theme-phone { margin-left: auto; }
  .phone-top .theme-phone button { width: 40px; }
  .phone-top .av { margin-left: auto; }
  .phone-top .theme-phone + .av { margin-left: 0; }
  .top { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; padding-bottom: 16px; }
  .top h1 { font-size: 26px; line-height: 32px; }
  .controls { flex-wrap: wrap; }
  .controls .btn { white-space: normal; }
  .tile, .s3, .s4, .s5, .s6, .s7, .s8 { grid-column: 1 / -1; }
  .tile { padding: 16px; }
  .convo { min-height: 0; padding: 16px; }
  .q { max-width: 92%; }
  .a { max-width: none; }
  .has-source .viewer { position: fixed; z-index: 30; left: 8px; right: 8px; bottom: 8px; max-height: 78vh; overflow-y: auto; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-glass), 0 0 0 100vmax var(--scrim); }
  .drop { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .drop-actions { justify-items: center; }
  .lib .row { grid-template-columns: 36px minmax(0, 1fr); }
  .lib .row > .col-size, .lib .row > .col-state { display: none; }
  .row-state { display: block; }
  .lib .head { flex-wrap: wrap; }
  .lib .head .end { width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; padding: 6px 0; }
  .chk .row { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .chk .row > .col-why { display: none; }
  .gap .row { grid-template-columns: 48px minmax(0, 1fr); }
  .gap-answer { grid-column: 1 / -1; justify-self: start; }
  .acct .tile { grid-column: 1 / -1; }
  .acct-member { grid-template-columns: minmax(0, 1fr); }
  .dev-banner { font-size: 12px; }
  .tabbar { position: fixed; z-index: 20; left: 50%; bottom: 12px; display: flex; gap: 2px; max-width: calc(100vw - 16px); padding: 4px; translate: -50% 0; border-radius: var(--r-xl); background: var(--overlay-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line-glass), var(--shadow-float); }
  .tabbar a { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); color: var(--ink-muted); }
  .tabbar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
  .tabbar .badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
}
@media (max-width: 380px) { .tabbar a { width: 40px; } }

/* ==================== sign-in pages (one card per page) ==================== */
body.auth { position: relative; display: flex; flex-direction: column; min-height: 100vh; overflow-x: clip; }
body.auth::before { content: ""; position: absolute; top: -160px; left: 50%; z-index: -1; width: min(720px, 100%); height: 320px; translate: -50% 0; border-radius: var(--r-pill); background: var(--glow); filter: blur(100px); opacity: 0.6; pointer-events: none; }
.auth-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 460px; margin: 0 auto; padding: 20px 16px 0; }
.auth-brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border-radius: var(--r-xs); }
.auth-brand span { font: 400 24px/1 var(--serif); letter-spacing: -0.02em; }
.auth-lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink-muted); }
.auth-lang:hover { color: var(--ink); background: var(--tile); }
.auth-main { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 24px 16px 48px; }
.auth-card { padding: 32px 28px; border-radius: var(--r-xl); border: 1px solid var(--line-glass); background: var(--panel); box-shadow: var(--shadow-card); animation: enter var(--d-reveal) var(--ease-standard) both; }
.auth-card h1 { font: 400 32px/36px var(--serif); letter-spacing: -0.01em; text-align: center; text-wrap: balance; }
.auth-lead { margin-top: 12px; text-align: center; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.auth-form { display: grid; gap: 14px; margin-top: 24px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label { font: 500 13px/1.4 var(--font); color: var(--ink); }
.auth-field input { width: 100%; }
.auth-field input[aria-invalid="true"] { border-color: var(--bad-text); border-width: 2px; }
.auth-hint { font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.auth-problem { font: 500 12px/18px var(--font); color: var(--bad-text); }
.auth-problem::before { content: "! "; }
.auth-alert, .auth-notice { margin-top: 16px; padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; line-height: 21px; color: var(--ink); }
.auth-alert { background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad-line); }
.auth-notice { background: var(--accent-soft); }
.auth-submit { width: 100%; height: 44px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--ink-muted); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line-default); }
.auth-or + .auth-form { margin-top: 12px; }
.auth-links { display: grid; gap: 2px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-default); text-align: center; font-size: 14px; color: var(--ink-muted); }
.auth-links a, .auth-back a, .auth-hint a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; color: var(--accent-text); }
.auth-hint a { min-height: 0; text-decoration: underline; text-underline-offset: 3px; }
.auth-back { margin-top: 16px; text-align: center; font-size: 14px; }
.auth-back a { color: var(--ink-muted); }
.auth-details { margin-top: 20px; }
.auth-details summary { display: flex; align-items: center; min-height: 44px; font-weight: 500; }

/* ==================== the website bubble ==================== */
.bubble-body { background: var(--ground); min-height: 100vh; }
.bubble-panel { display: flex; flex-direction: column; min-height: 100vh; padding: 16px; }
.bubble-panel .msgs { flex: 1; gap: 14px; margin-bottom: 12px; overflow-y: auto; }
.bubble-hello { margin: 0; padding: 12px 14px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default); font-size: 14px; line-height: 21px; }
.bubble-panel .q { font-size: 14px; }
.bubble-panel .a p { font-size: 14px; line-height: 22px; }
.bubble-sources { display: grid; gap: 6px; margin-top: 6px; }
.bubble-sources details { padding: 8px 10px; border-radius: var(--r-md); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-default); font-size: 13px; }
.bubble-sources summary { display: flex; align-items: center; min-height: 32px; }
.bubble-sources summary b { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: 11px; }
.bubble-sources p { margin: 8px 0 0; color: var(--ink-muted); }
.bubble-panel .compose { margin-top: auto; }
.bubble-by { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--ink-faint); }
.bubble-by a { display: inline-flex; align-items: center; min-height: 32px; }

/* ==================== reduced motion: gentler, not zero (Nota's rule) ==================== */
@media (prefers-reduced-motion: reduce) {
  .enter, .enter-stage, .hero-card, .auth-card { animation-name: enter-fade; animation-duration: 200ms; }
  [data-reveal] { transition-property: opacity; transition-duration: 200ms; transition-delay: 0ms; }
  .js [data-reveal]:not([data-revealed]) { transform: none; filter: none; }
  .how-rail-fill { transition: none; transform: scaleY(1); }
  .btn:active { scale: 1; }
  .btn:hover .ic:last-child:not(:first-child), .ann-pill:hover .ic, .guide-card:hover .guide-go .ic { translate: none; }
  .faq details::details-content { transition: none; }
  .faq summary::before { transition: none; }
  .prefs-menu, .menu-links a { transition: none; }
}
