/* Yearbar legal pages (privacy.html, terms.html). Brand tokens from the landing page brief. */
:root {
  --paper: #F2EEFF;
  --surface: #FFFFFF;
  --ink: #23205C;
  --ink-soft: #4A4680;
  --line: #14123A;
  --track: #3A3685;
  --lavender: #7C76D6;
  --sunny: #FFC83D;
  --pink: #FF6F91;
  --link: #3A3685;
  --ledge: #14123A;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #100F26; --surface: #1C1A3D; --ink: #F1EEFB; --ink-soft: #C9C4EE;
    --line: #7C76D6; --track: #3A3685; --link: #FFC83D; --ledge: #07061A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #100F26; --surface: #1C1A3D; --ink: #F1EEFB; --ink-soft: #C9C4EE;
  --line: #7C76D6; --track: #3A3685; --link: #FFC83D; --ledge: #07061A;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 88px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 600 17px/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
  /* Safety net: nothing can push the page wider than the screen (clip keeps the sticky header working) */
  overflow-x: clip;
}
/* No double-tap zoom on taps (pinch zoom still works) */
html, a, button, summary { touch-action: manipulation; }
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--paper);
}
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

/* Top bar */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--paper);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 800 22px/1 "Bricolage Grotesque", "Nunito", sans-serif; letter-spacing: -0.01em;
}
.mark { width: 34px; height: 34px; border-radius: 9px; background: #23205C; border: 2px solid #14123A;
  display: grid; place-items: center; }
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px;
  font-weight: 800; font-size: 15px; text-decoration: none; color: var(--ink);
}
.topbar nav a[aria-current="page"] { background: var(--surface); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--ledge); }

/* Layout */
.page { max-width: 1120px; margin: 0 auto; padding: 40px 20px 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
/* Grid items default to min-width: auto, so the wide table would stretch the page past the screen */
.page > * { min-width: 0; }
@media (min-width: 960px) {
  .page { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); }
}
.toc h2 { font: 800 15px/1.3 "Nunito", sans-serif; margin: 0 0 10px; color: var(--ink-soft); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.toc li { counter-increment: s; }
.toc a {
  display: flex; gap: 10px; padding: 6px 0; font-size: 15px; line-height: 1.35; font-weight: 700;
  color: var(--ink); text-decoration: none;
}
.toc a::before { content: counter(s); font: 500 13px/1.6 "DM Mono", ui-monospace, monospace; color: var(--ink-soft); min-width: 18px; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 959px) {
  .toc { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: 0 4px 0 var(--ledge); }
}

article { max-width: 70ch; min-width: 0; }
h1 {
  font: 800 clamp(36px, 6vw, 56px)/1.04 "Bricolage Grotesque", "Nunito", sans-serif;
  letter-spacing: -0.02em; margin: 0 0 14px;
}
.updated { margin: 0 0 32px; color: var(--ink-soft); font-size: 15px; }
.updated time { font-family: "DM Mono", ui-monospace, monospace; font-weight: 500; }

/* The year bar as the page's one visual: how far through the page you are */
.readbar { height: 6px; background: var(--track); overflow: hidden; }
.readbar span { display: block; height: 100%; width: 0; background: var(--sunny); border-radius: 0 999px 999px 0; }

.summary {
  background: var(--surface); border: 2px solid var(--line); border-radius: 20px;
  box-shadow: 0 5px 0 var(--ledge); padding: 22px 24px; margin: 0 0 44px;
}
.summary h2 { font: 800 22px/1.2 "Bricolage Grotesque", sans-serif; margin: 0 0 10px; }
.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin: 6px 0; }
.summary li::marker { color: var(--pink); }

article section { padding-top: 8px; margin-bottom: 36px; }
article h2 {
  font: 800 26px/1.2 "Bricolage Grotesque", "Nunito", sans-serif; letter-spacing: -0.01em; margin: 0 0 12px;
}
article h3 { font: 800 18px/1.3 "Nunito", sans-serif; margin: 22px 0 6px; }
article p, article li { color: var(--ink); }
article ul { padding-left: 22px; }
article li { margin: 6px 0; }
strong { font-weight: 800; }

.table-wrap { overflow-x: auto; margin: 14px 0 18px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 25%, transparent); }
th { font-weight: 800; background: color-mix(in srgb, var(--lavender) 14%, var(--surface)); }
tr:last-child td { border-bottom: 0; }

.note {
  border-left: 6px solid var(--sunny); background: var(--surface); border-radius: 0 14px 14px 0;
  padding: 12px 16px; margin: 16px 0;
}

footer { border-top: 2px solid color-mix(in srgb, var(--line) 18%, transparent); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 24px 20px 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--ink-soft); }
.footer-inner a { color: var(--ink); font-weight: 800; }

@media print {
  .topbar, .toc, .readbar, footer { display: none; }
  body { background: #fff; color: #000; }
  .page { display: block; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
