/* Layout: one 1120px column with a highway-sign hero; spec data set in mono like a sign plate. */
:root {
  --paper: #f2f5f8;
  --surface: #ffffff;
  --ink: #0f1b2b;
  --muted: #4b5b6f;
  --line: #d4dce6;
  --sign: #0c5a35;          /* interstate guide-sign green */
  --sign-ink: #ffffff;
  --accent: #1a56db;        /* electric blue for links and actions */
  --accent-ink: #ffffff;
  --volt: #1f9d55;          /* status dot only */
  --shield-red: #c8102e;
  --shield-blue: #003f87;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.6rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.6rem, 6vw, 4.4rem);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b121c;
    --surface: #121c2a;
    --ink: #e6ecf4;
    --muted: #9cadc1;
    --line: #253447;
    --sign: #0e6a3f;
    --accent: #7aa5ff;
    --accent-ink: #0b121c;
    --volt: #3ddc84;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b121c;
  --surface: #121c2a;
  --ink: #e6ecf4;
  --muted: #9cadc1;
  --line: #253447;
  --sign: #0e6a3f;
  --accent: #7aa5ff;
  --accent-ink: #0b121c;
  --volt: #3ddc84;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); font-weight: 600; }
p { margin: 0; }
.prose { max-width: 65ch; display: grid; gap: 1rem; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 60ch; }
.eyebrow {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.45rem;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .mark-bg { fill: var(--sign); }
.brand-mark .mark-bolt { fill: var(--sign-ink); }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.96rem; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav .nav-cta {
  background: var(--accent); color: var(--accent-ink);
  padding: 0.45rem 0.95rem; border-radius: 999px;
}
.nav .nav-cta:hover { color: var(--accent-ink); filter: brightness(1.08); }
.nav-toggle {
  display: none;
  font: inherit; font-weight: 600; font-size: 0.9rem;
  background: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4rem 0.9rem; cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 0.5rem 20px 1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { margin-top: 0.8rem; text-align: center; border-bottom: 0; }
}

/* Sections */
main { display: block; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.75rem; margin-bottom: 2.25rem; max-width: 70ch; }
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); display: grid; gap: 1rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-weight: 600; text-decoration: none;
  padding: 0.75rem 1.25rem; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Highway-sign hero */
.hero { padding-block: clamp(1.75rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 4rem); display: grid; gap: 2rem; }
.sign {
  position: relative;
  background: var(--sign);
  color: var(--sign-ink);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 18px 40px -24px rgba(5, 30, 18, 0.55);
}
.sign-inner {
  border: 3px solid var(--sign-ink);
  border-radius: 12px;
  padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1.2rem, 4vw, 2.8rem);
  display: grid;
  gap: 1.1rem;
}
.sign-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sign-route { display: flex; align-items: center; gap: 0.8rem; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.06em; }
.shield { width: 52px; height: 56px; flex: none; }
.shield .s-red { fill: var(--shield-red); }
.shield .s-blue { fill: var(--shield-blue); }
.shield .s-edge { fill: var(--sign-ink); }
.shield .s-text { fill: var(--sign-ink); font-family: var(--font-display); font-weight: 700; }
.exit-tab {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 3px solid var(--sign-ink); border-radius: 8px;
  padding: 0.15rem 0.8rem;
}
.sign h1 { font-size: var(--step-4); text-transform: none; }
.sign-dest { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 600; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.sign-arrow { width: 34px; height: 34px; flex: none; }
.sign-arrow path { fill: var(--sign-ink); }
.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-data); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 0.3rem 0.8rem;
  justify-self: start;
}
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25); }
@media (prefers-reduced-motion: no-preference) {
  .status .dot { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } }
}
.hero-copy { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
@media (max-width: 760px) { .hero-copy { grid-template-columns: minmax(0, 1fr); } }

/* Spec plate: key figures */
.plate {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.plate > div { padding: 1.2rem 1.3rem; display: grid; gap: 0.2rem; min-width: 0; }
.plate > div + div { border-left: 1px solid var(--line); }
.plate .v { font-family: var(--font-data); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); font-variant-numeric: tabular-nums; line-height: 1.15; }
.plate .k { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 760px) {
  .plate { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate > div:nth-child(3) { border-left: 0; }
  .plate > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Grids of items */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.item { display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.item p { color: var(--muted); }
.item .tag { font-family: var(--font-data); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

/* Hardware spec cards */
.spec-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: grid; gap: 1rem; align-content: start; min-width: 0;
}
.spec-card .maker { font-family: var(--font-data); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.spec-card .big { font-family: var(--font-data); font-size: 1.05rem; }
.spec-card .big strong { font-size: 2rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.spec-card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; color: var(--muted); }

/* Key/value tables */
.kv { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.kv th, .kv td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { font-weight: 500; color: var(--muted); width: 38%; }
.kv td { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--font-data); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare td:last-child { color: var(--ink); font-weight: 500; }
.compare tbody th { font-weight: 600; }

/* Two-column feature (text + figure) */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; min-width: 0; }
.figure figcaption { font-size: 0.85rem; color: var(--muted); padding: 0.6rem 0.3rem 0.1rem; }
.figure svg { display: block; width: 100%; height: auto; }

/* SVG drawing tokens */
.d-ground { fill: var(--paper); }
.d-line { stroke: var(--line); fill: none; }
.d-ink { fill: var(--ink); }
.d-muted { fill: var(--muted); }
.d-tesla { fill: var(--accent); }
.d-espen { fill: var(--sign); }
.d-ada { fill: var(--muted); }
.d-outparcel { fill: var(--surface); stroke: var(--muted); stroke-dasharray: 6 5; }
.d-yard { fill: var(--line); }
.d-road { fill: var(--line); }
.d-label { fill: var(--ink); font-family: var(--font-body); font-size: 13px; }
.d-small { fill: var(--muted); font-family: var(--font-data); font-size: 11px; }
.d-strong { fill: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.d-route { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; fill: none; }
.d-node { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.d-node-hub { fill: var(--sign); stroke: var(--sign); }
.d-tick { stroke: var(--muted); stroke-width: 1; }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.85rem; color: var(--muted); padding: 0.4rem 0.3rem 0; }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .l-tesla { background: var(--accent); }
.legend .l-espen { background: var(--sign); }
.legend .l-ada { background: var(--muted); }
.legend .l-out { border: 1.5px dashed var(--muted); }

/* Adjacency list */
.adj { list-style: none; margin: 0; padding: 0; display: grid; }
.adj li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.adj li:first-child { border-top: 1px solid var(--line); }
.adj .dist { font-family: var(--font-data); font-variant-numeric: tabular-nums; white-space: nowrap; }
.adj small { display: block; color: var(--muted); font-size: 0.88rem; }

/* Timeline (a real sequence of milestones) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.timeline li:first-child { border-top: 1px solid var(--line); }
.timeline .when { font-family: var(--font-data); font-size: 0.88rem; color: var(--muted); padding-top: 0.15rem; }
.timeline .what strong { display: block; font-weight: 600; }
.timeline .what span { color: var(--muted); }
.timeline li.next .when { color: var(--accent); }
@media (max-width: 560px) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; } }

/* Callout band */
.band {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center;
}
@media (max-width: 760px) { .band { grid-template-columns: minmax(0, 1fr); } }

/* Contact tracks */
.track { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 0.8rem; align-content: start; min-width: 0; }
.track p { color: var(--muted); }
.addr { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.addr code { font-family: var(--font-data); font-size: 0.95rem; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 0.35rem 0.6rem; overflow-wrap: anywhere; user-select: all; }
.copy { font: inherit; font-size: 0.85rem; font-weight: 600; background: none; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; cursor: pointer; }
.copy:hover { border-color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.footer-grid nav { display: grid; gap: 0.4rem; align-content: start; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.fine { margin-top: 2rem; font-size: 0.82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* Corridor diagram renders small inside a column, so its text is set larger in viewBox units. */
.corr .d-label { font-size: 24px; }
.corr .d-strong { font-size: 28px; }
.corr .d-small { font-size: 19px; }
.figure svg:not(.corr) .d-label { font-size: 15px; }
