/* The static pages' look (trust, self-host): the landing page's night palette
   and type, restated from App.tsx PAGE_CSS because these pages do not load
   the bundle. Page-specific pieces stay in each page's own <style>. */
@font-face {
  font-family: "Newsreader";
  src: url("/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #090D16;
  --canvas: #0E141D;
  --card: #121A26;
  --ink: #E9EEF5;
  --dim: #A8B4C4;
  --faint: #808E9F;
  --faintest: #62707F;
  --hair: rgba(233, 238, 245, 0.08);
  --hair-strong: rgba(233, 238, 245, 0.14);
  --accent: #4E9BEA;
  --accent-ink: #82BAF5;
  --warn: #E8AC4C;
  --positive: #4FC08A;
  --danger: #FF7A68;
  --serif: "Newsreader", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(1rem, 4vw, 2.75rem);
}
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.88em; }

.top { display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--gutter); max-width: 84rem; margin: 0 auto; box-sizing: border-box; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 42px; height: auto; }
.brand span { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.nav { display: flex; gap: 1.4rem; font-size: 0.9rem; }
.nav a { color: var(--faint); }
.foot nav a { color: var(--dim); }
.nav a:hover, .foot nav a:hover { color: var(--ink); text-decoration: none; }
.nav [aria-current] { color: var(--ink); }

/* THE HERO sits on the analyzer's graticule, faded at the edges, so the
   page opens on the same screen the landing page does. */
.hero { position: relative; padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
  max-width: 84rem; margin: 0 auto; box-sizing: border-box; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    repeating-linear-gradient(90deg, rgba(130, 186, 245, 0.07) 0 1px, transparent 1px 10%),
    repeating-linear-gradient(180deg, rgba(130, 186, 245, 0.07) 0 1px, transparent 1px 12.5%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 80%); }
.eyebrow { margin: 0 0 1.1rem; font: 500 11px/1 var(--mono); letter-spacing: 0.12em;
  color: var(--faintest); text-transform: uppercase; }
.eyebrow b { color: var(--accent-ink); font-weight: 600; }
h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 5.4vw, 4rem);
  line-height: 1.02; letter-spacing: -0.012em; max-width: 14ch; }
.lede { margin: 1.25rem 0 0; font-size: 1.1rem; color: var(--dim); max-width: 36rem; }

.section { padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) 0; max-width: 84rem; margin: 0 auto;
  box-sizing: border-box; }
.num { font: 600 11px/1 var(--mono); letter-spacing: 0.1em; color: var(--accent-ink); margin: 0 0 0.9rem; }
h2 { margin: 0 0 0.9rem; font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 3.8vw, 2.7rem); line-height: 1.05; letter-spacing: -0.01em; }
h2 em { font-style: normal; color: var(--accent-ink); }
.intro { margin: 0 0 clamp(1.75rem, 4vw, 2.75rem); color: var(--dim); font-size: 1.05rem; max-width: 40rem; }

.aside-h { margin: 2.5rem 0 0.3rem; font-weight: 600; font-size: 1rem; }
.aside-sub { margin: 0; color: var(--faint); font-size: 0.9rem; }
.steps { list-style: none; counter-reset: s; margin: 2rem 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: s; padding: 1rem 1.1rem; border-radius: 12px; background: var(--canvas);
  box-shadow: inset 0 0 0 1px var(--hair); font-size: 0.9rem; color: var(--dim); }
.steps li::before { content: "0" counter(s); display: block; font: 600 11px/1 var(--mono);
  color: var(--accent-ink); margin-bottom: 0.6rem; letter-spacing: 0.1em; }
.steps b { color: var(--ink); }

/* FACTS: the landing page's three-up, reused for controls. */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--hair); padding-top: clamp(2rem, 4vw, 3rem); }
@media (max-width: 760px) { .facts { grid-template-columns: minmax(0, 1fr); } }
.facts h3 { margin: 0 0 0.55rem; font-size: 0.98rem; font-weight: 600; }
.facts p { margin: 0; color: var(--dim); font-size: 0.93rem; line-height: 1.6; }

.cta { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.4rem; border-radius: 99px;
  color: #f4f8fd; background: linear-gradient(180deg, #1f3654, #152640); font-weight: 600; font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(130, 186, 245, 0.45), 0 0 24px -6px rgba(78, 155, 234, 0.6); }
.cta:hover { text-decoration: none; color: #fff; box-shadow: inset 0 0 0 1px rgba(130, 186, 245, 0.7), 0 0 30px -4px rgba(78, 155, 234, 0.8); }
.fine { margin-top: 1rem !important; font-size: 0.82rem; color: var(--faintest) !important; }

.updated { margin: 0; font-size: 0.85rem; color: var(--faint); }
/* FOOTER (mirrors App.tsx .pb-foot): a faded mark, then three link columns, then the copyright line. */
.foot { margin-top: clamp(4rem, 9vw, 7rem); padding: clamp(3rem, 7vw, 4.5rem) var(--gutter) 2.25rem; border-top: 1px solid var(--hair); }
/* The pages' sections are 84rem including their gutters; this matches their content edge. */
.foot-grid, .foot-legal { max-width: calc(84rem - 2 * var(--gutter)); margin-inline: auto; }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem; }
.foot-mark { width: fit-content; align-self: start; opacity: 0.35; filter: grayscale(1); transition: opacity 0.2s; }
.foot-mark:hover { opacity: 0.6; }
.foot-mark img { display: block; width: 3.5rem; height: auto; }
.foot nav { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.foot nav p { margin: 0 0 0.75rem; color: var(--faintest); font-size: 0.95rem; }
.foot nav a { color: var(--dim); font-size: 0.95rem; }
.foot-legal { margin-top: clamp(3rem, 7vw, 4.5rem); margin-bottom: 0; color: var(--faintest); font-size: 0.85rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; } }

@media (max-width: 820px) { .nav a:not(.keep) { display: none; } }

/* TABLES: hairlines, no boxes, mono headers like the analyzer's. */
.table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair-strong); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; min-width: 40rem; }
th { text-align: left; font: 600 10px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faintest); padding: 0.85rem 1rem; background: var(--canvas); }
td { padding: 0.85rem 1rem; border-top: 1px solid var(--hair); vertical-align: top; color: var(--dim); }
td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
td small { display: block; color: var(--faint); font-weight: 400; font-size: 0.8rem; }

/* LEGAL AND REFERENCE PAGES (privacy, terms, security): a sticky contents list
   beside one readable column. The column stays near 48rem on purpose: long
   policy text set at full width is unreadable. */
.doc { display: grid; grid-template-columns: 15rem minmax(0, 48rem); gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 84rem; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem) var(--gutter) 0; box-sizing: border-box;
  border-top: 1px solid var(--hair); }
.toc { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto;
  padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.toc p { margin: 0 0 1rem; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faintest); }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.toc a { display: block; padding: 0.3rem 0; color: var(--faint); font-size: 0.88rem; line-height: 1.4; }
.toc a:hover { color: var(--ink); text-decoration: none; }
.hero .updated { margin-top: 1.25rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }

.prose { padding-top: clamp(1.5rem, 3vw, 2.5rem); color: var(--dim); font-size: 1rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose .table-wrap { margin: 0 0 1.15rem; }
.prose h2 { margin: 3.25rem 0 1rem; padding-top: 0.25rem; color: var(--ink); font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  line-height: 1.2; scroll-margin-top: 1.5rem; }
.prose h3 { margin: 2rem 0 0.6rem; color: var(--ink); font-family: var(--sans); font-size: 1rem; font-weight: 600; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: rgba(130, 186, 245, 0.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: 0.4rem 0; }
.prose li::marker { color: var(--faintest); }
.prose code { padding: 0.1em 0.35em; border-radius: 5px; background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair); overflow-wrap: anywhere; }
.prose pre { padding: 1rem 1.2rem; border-radius: 12px; background: var(--canvas); overflow-x: auto;
  box-shadow: inset 0 0 0 1px var(--hair-strong); line-height: 1.5; }
.prose pre code { padding: 0; background: none; box-shadow: none; overflow-wrap: normal; }
.prose blockquote { padding: 1rem 1.2rem; border-radius: 12px; background: var(--canvas); color: var(--faint);
  box-shadow: inset 0 0 0 1px var(--hair); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose .tier { margin: 0 0 0.8rem; padding: 1.25rem 1.3rem; border-radius: 14px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--hair-strong); }
.prose .tier h3 { margin: 0 0 0.5rem; font-family: var(--serif); font-weight: 500; font-size: 1.35rem; }
.prose .tier p { margin: 0; font-size: 0.95rem; }
.prose .tier + :not(.tier) { margin-top: 2rem; }
.prose table { min-width: 34rem; }
.prose td { line-height: 1.55; }
.prose td:first-child { white-space: normal; width: 34%; }
.prose td code { overflow-wrap: break-word; }

@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; max-height: none; padding-bottom: 1.5rem; border-bottom: 1px solid var(--hair); }
  .toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
}
@media (max-width: 480px) { .toc ol { grid-template-columns: minmax(0, 1fr); } }
