/* Sidewinder's site: one stylesheet for every page. Dark only, system fonts. */

:root {
  color-scheme: dark;
  --bg: #0d1114;
  --bg-2: #12181d;
  --bg-code: #0a0e11;
  --line: #222b32;
  --line-2: #33404a;
  --text: #e8ebe9;
  --text-2: #c5cdd2;
  --muted: #a1abb2;
  --calm: #52d6a3;
  --link: #7fe3bd;
  --moderate: #e9b949;
  --busy: #ff6b5e;
  --focus: #ffd166;
  --grid: rgb(255 255 255 / 0.028);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 16px;
  --measure: 66ch;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; margin: 2rem 0 0.5rem; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: 0.88em; color: var(--text); }
small { font-size: 0.75em; color: var(--muted); font-weight: 400; }
b { font-weight: 650; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }

.skip { position: absolute; left: var(--gutter); top: -100px; background: var(--focus); color: #111; padding: 8px 12px; z-index: 10; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 650 1.0625rem/1 var(--sans); letter-spacing: 0.01em; }
.mark-glyph { width: 26px; height: 26px; }
.mark-glyph path { fill: none; stroke: var(--calm); stroke-width: 3.2; stroke-linecap: round; }
.mark-glyph circle { fill: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; font: 500 0.8125rem/1 var(--mono); }
.nav a { color: var(--text-2); text-decoration: none; padding: 10px 10px; border-radius: 6px; }
.nav a:hover { color: var(--text); background: var(--bg-2); }
.nav .nav-cta { color: var(--calm); border: 1px solid var(--line-2); }
@media (max-width: 719px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* Title block */
.hero {
  padding: 40px 0 56px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 100%;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .hero { padding: 56px 0 72px; } }
.titleblock {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 28px 0 0; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden;
  background: var(--bg); max-width: 26rem;
}
.titleblock div { padding: 8px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
@media (max-width: 999px) {
  .hero-main .wrap { display: flex; flex-direction: column; }
  .hero-main .titleblock { order: 1; margin-top: 36px; }
}
@media (min-width: 1000px) {
  .hero-main .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; column-gap: 64px; align-items: start; }
  .hero-main h1, .hero-main .lede { grid-column: 1; }
  .hero-main .titleblock { grid-column: 2; grid-row: 1 / span 2; margin: 6px 0 0; max-width: none; }
  .hero-main .keys, .hero-main .cta { grid-column: 1 / -1; }
}
.titleblock dt { font: 500 0.6875rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.titleblock dd { margin: 2px 0 0; font: 500 0.875rem/1.3 var(--mono); color: var(--text); }
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem); max-width: 17ch; letter-spacing: -0.025em; }
.lede { margin: 20px 0 0; font-size: 1.1875rem; line-height: 1.55; color: var(--text-2); max-width: 62ch; }
.keys { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; max-width: 60rem; }
@media (min-width: 760px) { .keys { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.keys li { border-top: 1px solid var(--line-2); padding: 12px 0 16px; }
.keys b { display: block; font: 600 1.875rem/1.1 var(--mono); color: var(--text); letter-spacing: -0.02em; }
.keys span { display: block; margin-top: 6px; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.btn { display: inline-block; background: var(--calm); color: #04231a; font: 650 0.9375rem/1 var(--sans); text-decoration: none; padding: 14px 18px; border-radius: 6px; border: 1px solid var(--calm); }
.btn:hover { background: #7ae6bc; color: #04231a; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

.hero-short { padding-bottom: 48px; }
.crumb { font: 500 0.8125rem/1 var(--mono); color: var(--muted); margin: 0 0 20px; }
.code-404 { margin-top: 24px; max-width: 34rem; }

/* Sections */
.sec { padding: 56px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 8px; }
@media (min-width: 720px) { .sec { padding: 72px 0; } }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); display: flex; align-items: baseline; gap: 14px; }
h2 .n { font: 500 0.875rem/1 var(--mono); color: var(--calm); letter-spacing: 0.04em; }
.sub { color: var(--muted); margin: 10px 0 0; max-width: var(--measure); }
.prose { max-width: var(--measure); margin-top: 24px; }
.prose > :last-child { margin-bottom: 0; }
.note { color: var(--muted); font-size: 0.9375rem; max-width: var(--measure); margin-top: 16px; }
.cols { display: grid; gap: 8px 56px; }
.cols > *, .fig-grid > * { min-width: 0; }
@media (min-width: 960px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cols > div > h3:first-child { margin-top: 2.25rem; }
.aside { color: var(--text-2); }
@media (min-width: 960px) { .aside { border-left: 1px solid var(--line); padding-left: 28px; } }
.ticks { padding: 0; margin: 0; list-style: none; }
.ticks li { position: relative; padding-left: 22px; margin: 0 0 8px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.75em; width: 10px; height: 2px; background: var(--calm); }

/* Spec rows: parameter, value, conditions */
h3.group { font: 500 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 40px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.spec { margin: 0; }
.spec > div { display: grid; gap: 2px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { font: 500 0.8125rem/1.4 var(--mono); color: var(--muted); }
.spec dd { margin: 0; }
.spec .v { font-weight: 600; color: var(--text); }
.spec .c { color: var(--muted); font-size: 0.9375rem; }
.spec .c:empty { display: none; }
@media (min-width: 760px) {
  .spec > div { grid-template-columns: 13rem minmax(0, 17rem) minmax(0, 1fr); align-items: baseline; }
  .spec dt { padding-top: 1px; }
}
.spec-2 { margin-top: 24px; }
.spec-ep { margin-top: 24px; }
.spec-ep dt code { color: var(--text); font-size: 0.875rem; }
.spec-ep dd { color: var(--text-2); }
@media (min-width: 760px) { .spec-ep > div { grid-template-columns: 15rem minmax(0, 1fr); } }

/* Tables */
.table { margin-top: 24px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: baseline; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); }
thead th { font: 500 0.75rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom-color: var(--line-2); }
tbody th { font-weight: 600; color: var(--text); white-space: nowrap; }
tbody th small { display: block; margin-top: 2px; }
td { color: var(--text-2); }
td code { color: var(--calm); }
.th-row th { font: 500 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--calm); padding-top: 22px; }
.num { text-align: right; font-family: var(--mono); color: var(--text); white-space: nowrap; }
thead .num { text-align: right; }
.prices tbody th { white-space: normal; font-weight: 500; color: var(--text-2); }
.revs th { font-family: var(--mono); font-weight: 500; }
.revs td:nth-child(2) { font-family: var(--mono); white-space: nowrap; color: var(--muted); }
@media (max-width: 559px) {
  table { font-size: 0.875rem; }
  tbody th { white-space: normal; }
}

/* Bars */
.bars { margin: 16px 0 20px; }
.bars > div { margin-bottom: 14px; }
.bars dt { font-size: 0.875rem; color: var(--muted); }
.bars dd { margin: 4px 0 0; font: 500 0.875rem/1.3 var(--mono); color: var(--text); }
.bar { display: block; height: 10px; margin-bottom: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 2px; position: relative; }
.bar::before { content: ""; position: absolute; inset: 0 auto 0 0; background: var(--busy); border-radius: 1px; }
.bar-a::before { width: 33.48%; }
.bar-b::before { width: 37.72%; opacity: 0.6; }

/* Code */
.code { margin: 0; padding: 16px 18px; background: var(--bg-code); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; font: 400 0.8125rem/1.55 var(--mono); color: var(--text-2); tab-size: 2; }
.code code { font-size: inherit; color: inherit; }

/* Transit places */
.places h3 { font: 500 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 2.25rem 0 0.5rem; }
.places p { color: var(--text-2); }

/* Ordering */
.order { max-width: var(--measure); margin-top: 24px; }
.order p:last-child { margin: 24px 0 0; }

/* Footer */
.foot { padding: 40px 0 56px; color: var(--muted); font-size: 0.8125rem; line-height: 1.6; }
.foot p { max-width: 80ch; }
.foot-name { color: var(--text-2); font-family: var(--mono); }

/* The figure: Calm against Direct */
.fig { margin: 28px 0 0; }
.fig-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.fig-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .fig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fig-panel { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #0f1418; }
.fig-cap { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 400 0.8125rem/1.4 var(--mono); color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 0; }
.fig-cap b { color: var(--text); font-family: var(--sans); font-size: 0.9375rem; margin-right: 12px; }
.fig-cap span + span::before { content: "·"; margin: 0 8px; color: var(--muted); }
.fig-cap .fig-busy { color: var(--busy); }
.fig-map { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 517; }
.fig-map path, .fig-defs path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.m-park { fill: #142a1f !important; stroke: none; }
.m-water { fill: #0f2130 !important; stroke: none; }
.m-min { stroke: #1d252b; stroke-width: 0.8px; }
.m-mid { stroke: #29333a; stroke-width: 1.1px; }
.m-big { stroke: #36424b; stroke-width: 1.7px; }
.m-mw { stroke: #414f59; stroke-width: 2.4px; }
.r-case { stroke: #0b0f12; stroke-width: 7px; }
.r-quiet { stroke: var(--calm); stroke-width: 3.2px; }
.r-moderate { stroke: var(--moderate); stroke-width: 3.2px; }
.r-busy { stroke: var(--busy); stroke-width: 4px; }
.x-lit { fill: #0f1418; stroke: var(--text); stroke-width: 2.2; }
.x-unlit { fill: var(--text); stroke: #0f1418; stroke-width: 2.2; }
.end { fill: var(--text); stroke: #0b0f12; stroke-width: 3; }
.lbl { font-family: var(--mono); font-size: 21px; fill: var(--muted); paint-order: stroke; stroke: #0f1418; stroke-width: 6px; stroke-linejoin: round; }
.lbl-park { fill: #6fa88a; }
.lbl-end { fill: var(--text); font-family: var(--sans); font-weight: 600; font-size: 23px; }
@media (max-width: 759px) {
  .lbl { font-size: 30px; }
  .lbl-end { font-size: 32px; }
  .lbl-st { display: none; }
}
.fig-legend { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font: 400 0.8125rem/1.4 var(--mono); color: var(--text-2); }
.fig-legend li { display: inline-flex; align-items: center; gap: 8px; }
.k { display: inline-block; width: 20px; height: 4px; border-radius: 2px; }
.k-quiet { background: var(--calm); }
.k-moderate { background: var(--moderate); }
.k-busy { background: var(--busy); height: 5px; }
.k-lit, .k-unlit { width: 11px; height: 11px; border-radius: 50%; }
.k-lit { border: 2px solid var(--text); }
.k-unlit { background: var(--text); }
.fig figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--muted); max-width: 80ch; }

@media print {
  :root { --bg: #fff; --text: #111; --text-2: #222; --muted: #444; --line: #ccc; --line-2: #999; }
  .top .nav, .cta, .skip { display: none; }
}
