/*
 * Shared styles for the static public pages (contact, terms). Same tokens as
 * the homepage and /docs: Inter, deep navy, electric blue, cool greys.
 * One cached file instead of a copy of the CSS inside every page.
 */
:root {
  --bg: #ffffff; --subtle: #f6f8fb; --surface: #ffffff; --text: #0f1729; --dim: #4d586b; --faint: #7b8597;
  --border: #e4e8ef; --accent: #2563eb; --accent-ink: #1d4ed8; --accent-soft: #eef3ff; --navy: #0b1220;
  --amber: #a15c07; --amber-soft: #fdf3e2; --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b14; --subtle: #0c1220; --surface: #0c1220; --text: #e8edf6; --dim: #a1acbf; --faint: #6d7a91;
    --border: #1d273b; --accent: #5b8cff; --accent-ink: #8cb0ff; --accent-soft: #14213d; --amber: #e3a948; --amber-soft: #2a2010;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070b14; --subtle: #0c1220; --surface: #0c1220; --text: #e8edf6; --dim: #a1acbf; --faint: #6d7a91;
  --border: #1d273b; --accent: #5b8cff; --accent-ink: #8cb0ff; --accent-soft: #14213d; --amber: #e3a948; --amber-soft: #2a2010;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { letter-spacing: -0.02em; color: var(--text); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .row { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.brand:hover { color: var(--text); }
.mark { width: 32px; height: 32px; border-radius: 8px; background: var(--navy); display: grid; place-items: center; flex: none; }
:root[data-theme="dark"] .mark { background: #fff; }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a { color: var(--dim); font-size: 14px; font-weight: 500; text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--subtle); }
.actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 8px; font: 600 14px Inter, system-ui, sans-serif; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-outline { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-outline:hover { background: var(--subtle); color: var(--text); }
.btn-ghost { background: none; color: var(--dim); }
.btn-ghost:hover { background: var(--subtle); color: var(--text); }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu .panel { position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; display: grid; gap: 4px; }
.menu .panel a:not(.btn) { padding: 10px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.menu .panel a:not(.btn):hover { background: var(--subtle); }
.menu .panel .btn { justify-content: center; margin-top: 6px; height: 44px; }
@media (max-width: 900px) {
  .nav, .actions .hide-sm { display: none; }
  .menu { display: block; }
}

/* ── Page hero ───────────────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--border); background: linear-gradient(var(--subtle), var(--bg)); }
.hero .container { padding-top: 64px; padding-bottom: 48px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; margin: 12px 0 14px; font-weight: 700; max-width: 820px; }
.hero p.lede { font-size: 18px; color: var(--dim); max-width: 680px; margin: 0; }
.hero .meta { margin-top: 16px; font-size: 14px; color: var(--faint); }

/* ── Contact ─────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 48px 0 24px; }
@media (max-width: 760px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px; }
.card .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.card .icon.navy { background: var(--navy); color: #fff; }
.card h2 { font-size: 20px; margin: 16px 0 6px; }
.card p { color: var(--dim); margin: 0 0 16px; font-size: 15px; }
.card ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.card li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--dim); }
.card li b { color: var(--text); font-weight: 600; }
.card .links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.notice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--border)); background: var(--amber-soft); border-radius: var(--radius); padding: 16px 18px; font-size: 15px; margin: 8px 0 56px; }
.notice svg { flex: none; color: var(--amber); margin-top: 2px; }

/* ── Legal ───────────────────────────────────────────────────────────── */
.legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 72px; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
.toc h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li a { display: flex; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--dim); text-decoration: none; font-size: 14px; line-height: 1.4; border-left: 2px solid transparent; }
.toc li a:hover { background: var(--subtle); color: var(--text); }
.toc li a[aria-current="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.toc .n { color: var(--faint); font-variant-numeric: tabular-nums; min-width: 18px; }
.toc-mobile { display: none; border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 28px; background: var(--surface); }
.toc-mobile summary { padding: 14px 16px; font-weight: 600; cursor: pointer; }
.toc-mobile ol { margin: 0; padding: 0 16px 14px 36px; }
.toc-mobile li { padding: 4px 0; }
.doc { max-width: 760px; }
.doc .intro { font-size: 17px; color: var(--dim); margin: 0 0 32px; }
.doc section { padding: 28px 0; border-top: 1px solid var(--border); }
.doc section:first-of-type { border-top: 0; padding-top: 0; }
.doc h2 { font-size: 22px; margin: 0 0 12px; display: flex; gap: 12px; align-items: baseline; }
.doc h2 .num { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 700; min-width: 26px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .anchor { opacity: 0; margin-left: 6px; font-size: 15px; text-decoration: none; color: var(--faint); }
.doc h2:hover .anchor, .doc .anchor:focus { opacity: 1; }
.doc .callout { border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--border)); background: var(--amber-soft); border-radius: 10px; padding: 12px 14px; font-size: 14.5px; margin-top: 14px; }
.doc .template-note { border: 1px solid var(--border); background: var(--subtle); border-radius: 10px; padding: 14px 16px; font-size: 14.5px; color: var(--dim); margin-top: 28px; }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; box-shadow: 0 6px 20px -8px rgba(15, 23, 42, .3); opacity: 0; pointer-events: none; transition: opacity .2s; text-decoration: none; }
.to-top.show { opacity: 1; pointer-events: auto; }
@media (max-width: 960px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .toc { display: none; }
  .toc-mobile { display: block; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--subtle); }
.site-footer .grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; padding: 56px 0 40px; }
.site-footer h2 { font-size: 13px; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer ul a { color: var(--dim); text-decoration: none; font-size: 14px; }
.site-footer ul a:hover { color: var(--text); }
.site-footer .about p { color: var(--dim); font-size: 14px; max-width: 280px; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding: 20px 0; font-size: 13px; color: var(--faint); }
.site-footer .bottom a { color: var(--faint); text-decoration: none; margin-left: 18px; }
.site-footer .bottom a:hover { color: var(--text); }
@media (max-width: 900px) { .site-footer .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .about { grid-column: 1 / -1; } }
