/* Capture Map: "Night Drive" design tokens (Website_Plans/xbox-capture-map/05_Design_Direction.md) */
:root {
  --bg: #0E1116;
  --panel: #171C24;
  --panel-2: #1E2530;
  --ink: #F2F4F7;
  --muted: #9AA4B2;
  --accent: #FFC93C;
  --water: #123A4A;
  --land: #1E2A2F;
  --line: #2C3644;
  --guess: #FFC93C;
  --font-head: "Archivo Black", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "SF Mono", Menlo, monospace;
  --r: 6px;
  --gap: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font-body);
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #ffe08a; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; font-weight: 700; z-index: 50; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 1.15rem/1 var(--font-head); letter-spacing: .01em; min-height: 44px; }
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r); font-weight: 600; font-size: .95rem; }
.top nav a:hover { background: var(--panel); }
.top nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

main { display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 900; line-height: 1.15; letter-spacing: -.005em; }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.9rem); margin: 0 0 12px; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); display: inline-block; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.section { padding: 44px 0; border-top: 1px solid var(--line); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: var(--r); background: var(--accent); color: #0E1116; font-weight: 800; text-decoration: none; border: 2px solid var(--accent); cursor: pointer; font-size: 1rem; }
.btn:hover { background: #ffd666; color: #0E1116; }
.textlink { font-weight: 700; display: inline-flex; min-height: 44px; align-items: center; }

/* hero + countdown */
.hero { padding: 28px 0 18px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.countdown { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; min-width: 260px; }
.countdown .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.countdown .val { font: 700 1.5rem/1.2 var(--font-mono); color: var(--ink); }
.countdown .sub { font-size: .85rem; color: var(--muted); margin: 2px 0 0; }

/* map */
.map-shell { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--water); height: min(72vh, 680px); min-height: 420px; touch-action: none; }
.map-shell:focus-visible { outline-offset: -3px; }
.map-shell svg.map { display: block; width: 100%; height: 100%; cursor: grab; user-select: none; -webkit-user-select: none; }
.map-shell svg.map.dragging { cursor: grabbing; }
.map-notice { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: center; pointer-events: none; }
.map-notice span { background: rgba(14, 17, 22, .92); border: 1px solid var(--accent); color: var(--ink); padding: 6px 10px; border-radius: var(--r); font-size: .86rem; font-weight: 700; text-align: center; }
.map-ctrls { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-ctrls button { width: 44px; height: 44px; border-radius: var(--r); background: var(--panel); color: var(--ink); border: 1px solid var(--line); font: 700 1.25rem/1 var(--font-body); cursor: pointer; display: grid; place-items: center; }
.map-ctrls button:hover { background: var(--panel-2); }
.map-ctrls svg { width: 20px; height: 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; font-size: .88rem; color: var(--muted); }
.legend b { color: var(--ink); }
.map-help { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.map-loading { display: grid; place-items: center; height: 100%; color: var(--muted); }

/* svg map styling */
.map .water { fill: var(--water); }
.map .land { fill: var(--land); stroke: #3A4A50; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.map .wet { fill: #1B3332; }
.map .hills { fill: #26302A; }
.map .region { fill: none; stroke: #4A5A62; stroke-width: 1; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.map .city { fill: #2A3440; }
.map .road { fill: none; stroke: #8C7A44; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map .road.minor { stroke: #5D5A4A; stroke-width: 1.4; }
.map .bridge { fill: none; stroke: #C9B36A; stroke-width: 2.4; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.map .dot { fill: var(--accent); stroke: #0E1116; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map text { font-family: var(--font-body); fill: var(--ink); paint-order: stroke; stroke: #0E1116; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.map .lbl-region text.name { font-family: var(--font-head); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.map .lbl-place text.name { font-size: 12.5px; font-weight: 700; }
.map text.badge { font-size: 10.5px; fill: var(--guess); font-weight: 700; letter-spacing: .04em; }
.map .lbl .dot { vector-effect: none; }
.map .lbl[hidden] { display: none; }

/* list view */
details.places { margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
details.places summary { cursor: pointer; padding: 12px 14px; font-weight: 700; min-height: 44px; }
details.places ul { margin: 0; padding: 0 14px 14px 30px; columns: 2 260px; }
details.places li { margin: 0 0 6px; break-inside: avoid; }
.conf { font: 700 .72rem/1 var(--font-mono); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); margin-left: 6px; text-transform: uppercase; }
.conf.confirmed { color: #8EE6A0; border-color: #2F5A3A; }
.conf.likely, .conf.guess { color: var(--accent); border-color: #6B5620; }

/* steps strip (numbered, not icon cards) */
.steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: s; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); }
.steps li { counter-increment: s; padding: 16px 18px 16px 64px; position: relative; border-top: 1px solid var(--line); background: var(--panel); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 14px; font: 900 1.6rem/1 var(--font-head); color: var(--accent); }
.steps .when { font: 700 .72rem/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-left: 8px; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { border-top: 0; border-left: 1px solid var(--line); }
  .steps li:first-child { border-left: 0; }
}

/* demo */
.demo-row { display: grid; gap: 22px; align-items: center; }
@media (min-width: 860px) { .demo-row { grid-template-columns: 1.1fr 1fr; } }
.demo-frame { border: 1px solid var(--line); border-radius: var(--r); background: var(--water); overflow: hidden; }
.demo-frame svg { display: block; width: 100%; height: auto; }
.demo-cap { font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* promise + faq + prose */
.promise { display: grid; gap: 12px; }
@media (min-width: 760px) { .promise { grid-template-columns: 1fr 1fr; } }
.promise > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.promise ul { margin: 0; padding-left: 20px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; min-height: 44px; }
.faq details p { color: var(--muted); }
.prose { max-width: 72ch; padding: 32px 0 48px; }
.prose h2 { margin-top: 26px; }
.prose li { margin-bottom: 6px; }

/* maintenance (Phase R) */
.maint { display: none; padding: 56px 0 64px; }
.maint .box { background: var(--panel); border: 1px solid var(--accent); border-radius: var(--r); padding: 26px; max-width: 680px; }
html[data-state="maintenance"] .maint { display: block; }
html[data-state="maintenance"] .pre-only { display: none !important; }
.legal-banner { display: none; background: var(--panel); border-bottom: 1px solid var(--accent); padding: 10px 20px; font-weight: 700; font-size: .92rem; }
html[data-state="maintenance"] .legal-banner { display: block; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 26px 0 36px; color: var(--muted); font-size: .88rem; }
.foot .disc { color: var(--ink); max-width: 80ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.foot nav a { display: inline-flex; min-height: 44px; align-items: center; }

@media (max-width: 640px) {
  .top { padding: 8px 14px; flex-wrap: wrap; }
  .wrap { padding: 0 14px; }
  .top nav a { padding: 10px 8px; font-size: .9rem; }
  .map-shell { height: 68vh; min-height: 380px; }
  .countdown { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
