/* Styles for the static pages in public/ (privacy, terms, disclaimer,
   cookies, sources). They live outside the Vite bundle, so this file copies
   the tokens they use from src/styles/tokens.css, for both themes. Keep the
   values in step with that file: tests/21-legal-pages.spec.js fails when a
   value here differs from tokens.css. Not hashed, so tools/deploy/tax.htaccess
   serves it with no-cache. */

:root {
  color-scheme: dark;
  --midnight-950: #070c1b;
  --midnight-900: #0b1327;
  --midnight-800: #111a32;
  --midnight-700: #18233f;
  --ink-paper: #f5f1e8;
  --ink-100: #eef1f8;
  --ink-200: #c6cddc;
  --ink-400: #8f98ad;
  --gold-300: #ecd689;
  --gold-500: #d4af37;
  --gold-tint-strong: rgba(212, 175, 55, 0.18);
  --blue-400: #60a5fa;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --bg-input: rgba(7, 12, 27, 0.6);
  --bg-ambient: linear-gradient(180deg, var(--midnight-900) 0%, var(--midnight-950) 100%);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-headline: clamp(1.5rem, 3vw, 2rem);
  --text-title: 1.3125rem;
  --text-body: 1.0625rem;
  --text-caption: 0.9375rem;
  --text-micro: 0.8125rem;
  --tracking-caps: 0.09em;
  --leading-tight: 1.25;
  --leading-body: 1.6;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --radius-sm: 6px;
  --radius-md: 8px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --midnight-950: #d9e3de;
  --midnight-900: #e6eeea;
  --midnight-800: #ffffff;
  --midnight-700: #eff4f1;
  --ink-paper: #13203f;
  --ink-100: #121c30;
  --ink-200: #33405a;
  --ink-400: #55617a;
  --gold-300: #614900;
  --gold-500: #7a5c00;
  --gold-tint-strong: rgba(212, 175, 55, 0.26);
  --blue-400: #1e46c2;
  --border-subtle: rgba(19, 32, 63, 0.11);
  --border-strong: rgba(19, 32, 63, 0.22);
  --bg-input: rgba(255, 255, 255, 0.92);
  --bg-ambient: linear-gradient(180deg, #e6eeea 0%, #dde7e2 100%);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--midnight-900);
  background-image: var(--bg-ambient);
  background-attachment: fixed;
  color: var(--ink-200);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

.page-head, main, .site-footer-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-xl);
}
main { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

.eyebrow {
  display: block; margin-bottom: var(--space-2xs);
  font-size: var(--text-caption); font-weight: 600; color: var(--gold-500);
}
h1, h2 {
  font-family: var(--font-display); font-weight: 700; color: var(--ink-paper);
  line-height: var(--leading-tight); letter-spacing: -0.02em;
}
h1 { font-size: var(--text-headline); margin: 0 0 var(--space-md); }
h2 { font-size: var(--text-title); margin: var(--space-xl) 0 var(--space-xs); }
p, ul, table { margin: 0 0 var(--space-md); }
ul { padding-left: var(--space-lg); }
li + li { margin-top: var(--space-2xs); }
strong { color: var(--ink-100); }
.lede { font-size: 1.0625rem; color: var(--ink-100); }

a { color: var(--blue-400); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-300); }
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--midnight-900), 0 0 0 4px var(--gold-500);
  border-radius: var(--radius-sm);
}
.back { font-size: var(--text-caption); text-decoration: none; }

/* Storage table: scrolls inside itself on narrow screens. */
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-md); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-caption); }
th, td { text-align: left; vertical-align: top; padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: 1px solid var(--border-subtle); }
th { color: var(--ink-100); font-weight: 600; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.85em; color: var(--ink-100); overflow-wrap: anywhere; }

/* Theme switch: same look as the app's (.theme-toggle in components.css). */
.theme-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}
.theme-toggle[hidden] { display: none; }
.theme-option {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  min-height: 32px; min-width: 32px;
  padding: var(--space-2xs) var(--space-xs);
  border: none; border-radius: calc(var(--radius-md) - 2px);
  background: transparent; color: var(--ink-400);
  font: 500 var(--text-micro) var(--font-body);
  cursor: pointer;
}
.theme-option:hover { color: var(--ink-100); }
.theme-option[aria-pressed="true"] { background: var(--gold-tint-strong); color: var(--gold-300); }
@media (max-width: 480px) {
  .theme-option-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.site-footer {
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-caption);
  color: var(--ink-400);
}
.site-footer-inner { padding-top: var(--space-lg); padding-bottom: var(--space-2xl); }
.site-footer p { margin: 0 0 var(--space-sm); }
.site-footer-links { list-style: none; padding: 0; margin: 0 0 var(--space-sm); display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); }
.site-footer-links li + li { margin-top: 0; }
.site-footer a { color: var(--ink-200); }
.site-footer a:hover { color: var(--gold-300); }
.site-footer a[aria-current="page"] { color: var(--gold-500); text-decoration: none; }
