/* ─────────────────────────────────────────────────────────────────────────
   Dugout Radar — v2 "Broadsheet" · Legal pages (privacy + tos)
   Newsprint editorial reading layout for static legal content. Loads
   independently of the main SPA stylesheet — keep the variables and
   primitives self-contained so a fresh broadsheet visit doesn't need
   the SPA to be cached first.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Light scheme (cream newsprint, default) ─────────────────────────────*/
:root,
:root[data-theme="light"] {
  --paper:    #F2EDE3;
  --paper-2:  #E6DFD0;
  --paper-3:  #D7CDB7;
  --ink:      #15110A;
  --ink-2:    #3E382C;
  --ink-3:    #6F6852;
  --hair:     #C9BFA6;
  --hair-2:   #DCD3BC;
  --accent:   #B22222;
  --risk-low: #356B3D;
  --risk-high: #B22222;
  --font-serif: 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-sans:  'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --paper-texture: radial-gradient(circle at 25% 30%, rgba(21, 17, 10, 0.04) 0.5px, transparent 1px),
                   radial-gradient(circle at 70% 60%, rgba(21, 17, 10, 0.03) 0.5px, transparent 1px);
}

/* ── Dark scheme (negative print) ────────────────────────────────────────*/
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:    #0D0C0A;
    --paper-2:  #181612;
    --paper-3:  #25221C;
    --ink:      #F2EDE3;
    --ink-2:    #C7BFAA;
    --ink-3:    #8A8470;
    --hair:     #2A2620;
    --hair-2:   #1C1A15;
    --accent:   #E76A5A;
    --risk-low: #6FBF7D;
    --risk-high: #E76A5A;
    --paper-texture: none;
  }
}

/* ── Resets ──────────────────────────────────────────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; position: relative; overflow-x: hidden; }
body::before {
  content: ""; position: fixed; inset: 0;
  background-image: var(--paper-texture);
  background-size: 8px 8px, 12px 12px;
  mix-blend-mode: multiply;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}
.wrap { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; padding: 0; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
p { margin: 0; }

/* ── Top strap: tiny mono kicker · current date / vol · back link ────── */
.legal-strap {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 500; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-3);
  padding: 14px 16px 6px;
}
.legal-strap-back {
  font-family: var(--font-mono); font-weight: 700; letter-spacing: 1.4px;
  color: var(--ink);
}
.legal-strap-back:hover { color: var(--accent); }
.legal-strap-vol {
  font-style: normal;
}

/* ── Nameplate: section kicker, headline, dek-style updated date ─────── */
.legal-nameplate {
  padding: 8px 16px 18px;
  border-bottom: 2px solid var(--ink);
}
.legal-kicker {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 6px;
}
.legal-title {
  font-family: var(--font-serif); font-weight: 900;
  font-size: 38px; line-height: 0.95; letter-spacing: -0.8px;
  color: var(--ink);
  margin: 0;
}
.legal-updated {
  font-family: var(--font-serif); font-style: italic;
  font-size: 13px; color: var(--ink-3);
  margin-top: 8px;
}

/* ── Section labels (mono caps · hairline rule above) ────────────────── */
.legal-section {
  padding: 22px 16px 0;
}
.legal-section-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 2.2px; text-transform: uppercase; color: var(--ink-3);
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  margin-bottom: 10px;
}
.legal-section:first-of-type .legal-section-label { border-top: 0; padding-top: 0; }

/* ── Body type ──────────────────────────────────────────────────────── */
.legal-section p {
  font-family: var(--font-serif); font-size: 15px; line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section p strong { color: var(--ink); font-weight: 700; }
.legal-section p a {
  color: var(--ink);
  border-bottom: 1px solid var(--hair-2);
  font-weight: 600;
}
.legal-section p a:hover { color: var(--accent); border-bottom-color: currentColor; }

/* ── Fact box (2px ink-bordered, mirrors the History fact-box pattern) ── */
.legal-facts {
  margin: 12px 0 8px;
  border: 2px solid var(--ink);
  background: var(--paper-2);
}
.legal-fact {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair);
}
.legal-fact:last-child { border-bottom: 0; }
.legal-fact-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 1.0px; text-transform: uppercase; color: var(--ink);
  align-self: start;
  line-height: 1.35;
}
.legal-fact-value {
  font-family: var(--font-serif); font-size: 13.5px; line-height: 1.5;
  color: var(--ink-2);
}

/* ── Warning callout (TOS · "all predictions are estimates") ──────────── */
.legal-warn {
  margin: 14px 0 6px;
  border: 2px solid var(--risk-high);
  background: var(--paper);
  padding: 14px 16px;
}
.legal-warn-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 2.0px; text-transform: uppercase;
  color: var(--risk-high);
  margin-bottom: 8px;
}
.legal-warn-body {
  font-family: var(--font-serif); font-size: 15px; line-height: 1.55;
  color: var(--ink);
}
.legal-warn-body strong { font-weight: 800; }

/* ── Plain-terms note (TOS · italic aside under the warn box) ────────── */
.legal-note {
  font-family: var(--font-serif); font-style: italic;
  font-size: 13.5px; line-height: 1.55;
  color: var(--ink-3);
  margin: 10px 0 0;
}

/* ── Contact strip (above the colophon) ──────────────────────────────── */
.legal-contact {
  margin: 26px 16px 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-serif);
  font-size: 14px; line-height: 1.5;
  color: var(--ink-2);
  text-align: center;
}
.legal-contact a {
  color: var(--ink); border-bottom: 1px solid var(--hair-2); font-weight: 700;
}
.legal-contact a:hover { color: var(--accent); border-bottom-color: currentColor; }

/* ── Colophon footer ─────────────────────────────────────────────────── */
.legal-colophon {
  padding: 18px 16px 32px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-3);
  text-align: center;
}

/* ── A11y ───────────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001s !important; }
}
