/* Gridline's palette, from logo A: navy ground, one amber accent, a cool slate scale, a faint grid line.
   Light is the default; [data-theme] on <html> picks one (set before paint by the script in each page's <head>), and
   without a script the system's preference does. Contrast is checked at WCAG AA in test/pages.test.ts. */
:root, :root[data-theme="light"] {
  --navy: #0B1F3A; --amber: #F5A524;
  --bg: #F8FAFC;          /* page ground, slate 50 */
  --card: #FFFFFF;        /* raised panels, tiers, the map frame */
  --soft: #F1F5F9;        /* quiet fills: hovers, placeholder lines */
  --border: #E2E8F0;
  --fg: #0B1F3A;          /* text: navy */
  --muted: #475569;       /* secondary text, slate 600 */
  --primary: #F5A524;     /* calls to action and highlights: amber */
  --primary-ink: #0B1F3A; /* text on amber */
  --primary-soft: color-mix(in srgb, #F5A524 16%, transparent);
  --accent: #9A5B06;      /* amber as text and links: #B7791F is 3.6:1 on white, this passes AA on every ground */
  --grid: color-mix(in srgb, #24466F 9%, transparent);
  --danger: #B91C1C;
  --map-stroke: #FFFFFF;
  --c-announced: #64748B; --c-planning: #7C3AED; --c-approved: #0D9488; --c-under_construction: #D97706; --c-operational: #16A34A; --c-paused: #EA580C;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #07152A; --card: #0B1F3A; --soft: #10284A; --border: #1C3558;
  --fg: #E2E8F0; --muted: #94A3B8;
  --primary: #F5A524; --primary-ink: #0B1F3A; --primary-soft: color-mix(in srgb, #F5A524 18%, transparent);
  --accent: #F5A524;
  --grid: color-mix(in srgb, #24466F 55%, transparent);
  --danger: #F87171;
  --map-stroke: #07152A;
  --c-announced: #94A3B8; --c-planning: #A78BFA; --c-approved: #2DD4BF; --c-under_construction: #F59E0B; --c-operational: #4ADE80; --c-paused: #FB923C;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #07152A; --card: #0B1F3A; --soft: #10284A; --border: #1C3558;
    --fg: #E2E8F0; --muted: #94A3B8;
    --primary-soft: color-mix(in srgb, #F5A524 18%, transparent);
    --accent: #F5A524;
    --grid: color-mix(in srgb, #24466F 55%, transparent);
    --danger: #F87171;
    --map-stroke: #07152A;
    --c-announced: #94A3B8; --c-planning: #A78BFA; --c-approved: #2DD4BF; --c-under_construction: #F59E0B; --c-operational: #4ADE80; --c-paused: #FB923C;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
header { display: flex; align-items: center; justify-content: space-between; height: 64px; }
/* The lockup: the mark (made from brand/gridline-mark.svg) and the name, bold and tight. */
.brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover, nav a[aria-current] { color: var(--fg); }
.button { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); font: 500 14px Geist, system-ui, sans-serif; border: 0; text-decoration: none; cursor: pointer; white-space: nowrap; }
nav .button { color: var(--primary-ink); }
.button:hover { filter: brightness(1.08); }
.button:disabled { opacity: .6; cursor: default; }
.button.quiet { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.button.quiet:hover { background: var(--soft); filter: none; }
/* Light, dark, or the system's: the sun and moon button in the header (theme.js). */
.theme { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.theme:hover { background: var(--soft); color: var(--fg); }
.theme svg { width: 17px; height: 17px; }
.theme .sun, :root[data-theme="dark"] .theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
/* The faint grid behind the top of each page, fading out as it goes down. */
.backdrop { position: absolute; inset: 0 0 auto; height: 720px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center -1px;
  -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
body { position: relative; isolation: isolate; }
p a:not(.button):not(.link), .faq a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.link { font-size: 14px; color: var(--muted); text-decoration: none; }
.link:hover { color: var(--fg); }
.hero { padding: 72px 0 36px; max-width: 760px; }
.actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 18px; font-weight: 600; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 640px; }
section { padding: 88px 0 0; }
h2 { font-size: 28px; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 12px; font-weight: 600; }
.intro { color: var(--muted); margin: 0 0 32px; max-width: 640px; }
h3 { font-size: 16px; margin: 0 0 6px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
.grid p, .two p { margin: 0; color: var(--muted); font-size: 15px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.faq { max-width: 760px; }
.faq details { padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.demo { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding-bottom: 96px; }
.demo p { color: var(--muted); margin: 0; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, textarea { font: 15px Geist, system-ui, sans-serif; color: var(--fg); background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
textarea { min-height: 96px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trap { position: absolute; left: -9999px; }
.note { font-size: 14px; min-height: 20px; }
.note.error { color: var(--danger); }
footer { margin-top: 96px; padding: 24px 0 40px; font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { gap: 16px; font-size: 13px; }
@media (max-width: 760px) {
  nav { gap: 16px; }
  nav .wide { display: none; }
  .hero { padding-top: 40px; }
  section { padding-top: 64px; }
  .grid, .two, .demo, .row { grid-template-columns: 1fr; }
  .grid, .two { gap: 28px; }
  .demo { gap: 24px; }
  .lede { font-size: 17px; }
}
