/* Shared by the game page and the content pages. Game-only styles live in src/styles.css. */
:root {
  --bg: #f8f7fc;
  --ink: #1e1b2e;
  --muted: #6a6580;
  --accent: #6741d9;
  --on-accent: #ffffff;
  --guess: #c8c2dc;
  --line: #e5e1f0;
  --right: #2f9e44;
  --near: #d49a00;
  --miss: #918ba5;
  --wrong: #c92a2a;
  color-scheme: light;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13111c;
    --ink: #ece9f5;
    --muted: #9e98b3;
    --accent: #9775fa;
    --on-accent: #12091f;
    --guess: #463f5c;
    --line: #28233a;
    --right: #37b24d;
    --near: #e0a100;
    --miss: #463f5c;
    --wrong: #ff6b6b;
    color-scheme: dark;
  }
}

body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; }
.page { max-width: 680px; margin: 0 auto; padding: 16px; }
a { color: var(--accent); }

.site-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.brand { font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.95rem; }
.site-header nav a { text-decoration: none; }
.site-header nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }

.site-footer { color: var(--muted); font-size: 0.85rem; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.site-footer p { margin: 0; }

.prose h1 { font-size: 1.8rem; margin: 16px 0 8px; line-height: 1.2; }
.prose h2 { font-size: 1.25rem; margin: 28px 0 8px; }
.prose h3 { font-size: 1.05rem; margin: 20px 0 4px; }
.prose li { margin: 4px 0; }
.intro { margin-top: 40px; }
.intro h2 { margin-top: 0; }
.muted { color: var(--muted); }
.button { display: inline-block; margin-top: 8px; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }

table.names { width: 100%; border-collapse: collapse; margin: 8px 0; }
table.names th, table.names td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.names th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.new { font-size: 0.75rem; color: var(--right); border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.spark { width: 120px; height: 28px; display: block; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.5; }

.name-chart { width: 100%; height: auto; display: block; margin: 8px 0; }
.name-chart .axis { stroke: var(--muted); }
.name-chart .grid { stroke: var(--line); }
.name-chart .tick { fill: var(--muted); font-size: 16px; }
.name-chart .line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.facts div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.facts dt { color: var(--muted); font-size: 0.8rem; }
.facts dd { margin: 0; font-weight: 700; }

.pager { display: flex; justify-content: space-between; }
.decades { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.ad-slot { margin: 24px 0; text-align: center; }
.ad-slot .ad-label { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ad-slot ins { display: block; min-height: 250px; }
@media (min-width: 1200px) {
  .ad-rail { position: fixed; top: 96px; width: 160px; }
  .ad-rail.left { left: calc(50% - 340px - 184px); }
  .ad-rail.right { right: calc(50% - 340px - 184px); }
  .ad-rail ins { min-height: 600px; }
}
@media (max-width: 1199px) { .ad-rail { display: none; } }
@media (max-width: 480px) {
  .spark { width: 72px; }
  table.names th, table.names td { padding: 6px 4px; }
}
