/* Quadruper public pages: / and /test/map/
   (docs/superpowers/specs/2026-10-28-landing-and-test-map-design.md).
   Night Route tokens. Light by default, dark when the device asks for it.
   System fonts only; no web fonts. The test map's panel is dark in both themes. */

:root {
  color-scheme: light;
  --q-page: #f2f1ec; --q-surface: #fbfaf7; --q-surface-2: #e9e7e0;
  --q-line: #dcdad2; --q-line-strong: #c9c6bc;
  --q-ink: #0f1115; --q-ink-2: #3c414b; --q-ink-3: #545a64;
  --q-accent: #ffb020; --q-on-accent: #0f1115; --q-accent-text: #875600; --q-focus: #2a78d6;
  --q-good: #0ca30c; --q-good-text: #006300; --q-crit: #d03b3b; --q-crit-text: #b02a2a;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --q-page: #0f1115; --q-surface: #171a20; --q-surface-2: #1f232b;
    --q-line: #262a32; --q-line-strong: #353a44;
    --q-ink: #f2f1ec; --q-ink-2: #c9ccd2; --q-ink-3: #a3a8b1;
    --q-accent-text: #ffc04d; --q-focus: #3987e5;
    --q-good-text: #45cf45; --q-crit-text: #f07272;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--q-page); color: var(--q-ink); font: 15px/1.5 var(--font-ui); }
h1, h2, h3, p, ol, ul, dl, figure { margin: 0; }
ul, ol { padding: 0; }
code, pre { font-family: var(--font-mono); font-size: 0.92em; }
a { color: var(--q-accent-text); }
:focus-visible { outline: 2px solid var(--q-focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn-p { background: var(--q-accent); color: var(--q-on-accent); }
.btn-s { background: var(--q-surface); border-color: var(--q-line-strong); color: var(--q-ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: var(--q-surface-2); color: var(--q-ink-2); white-space: nowrap;
}
.chip.good { color: var(--q-good-text); }
.chip.bad { color: var(--q-crit-text); }
.chip.warn { background: rgba(255, 176, 32, 0.16); color: var(--q-accent-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--q-ink-3); flex: none; }
.dot.good { background: var(--q-good); }
.dot.bad { background: var(--q-crit); }

/* ---- test map (/test/map/) ---- */
body.tm { height: 100vh; overflow: hidden; }
.tm-map { position: absolute; inset: 0; background: #0b0e12; }
.tm-panel {
  position: absolute; top: 16px; left: 16px; z-index: 5;
  width: 372px; max-height: calc(100vh - 32px); overflow-y: auto;
  border-radius: 16px; background: rgba(15, 18, 24, 0.95); color: #ecebe6;
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 16px 48px rgba(10, 12, 16, 0.35);
  font-size: 13.5px; padding-bottom: 14px;
}
.tm-panel a { color: #ffc04d; }
.tm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.tm-brand img { display: block; height: 20px; width: auto; }
.tm-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #9aa1ad; }
.tm-live i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; }
.tm-tools {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0 12px; padding: 3px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.07);
}
.tm-tools button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px;
  padding: 5px 2px; border: 0; border-radius: 9px; background: transparent; color: #c9ccd2;
  font: 500 12px var(--font-ui); cursor: pointer;
}
.tm-tools button em { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; color: #ffb020; text-transform: uppercase; }
.tm-tools button[aria-selected="true"] { background: #ecebe6; color: #0f1115; }
.tm-tools button[aria-selected="true"] em { color: #875600; }
.tm-pane, .tm-profile { padding: 12px 16px 0; display: grid; gap: 8px; }
.tm-lbl { font-size: 12px; color: #9aa1ad; font-weight: 500; }
.tm-hint { font-size: 12.5px; color: #9aa1ad; }
.tm-point { font-family: var(--font-mono); font-size: 12.5px; }
.tm-add { display: flex; gap: 6px; }
.tm-panel input[type="text"], .tm-panel input[type="search"], .tm-panel input[type="password"], .tm-panel input:not([type]), .tm-panel select {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14); background: #0a0c10; color: #ecebe6; font: 13.5px var(--font-ui);
}
.tm-btn {
  height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05); color: #ecebe6; font: 600 13px var(--font-ui); cursor: pointer; white-space: nowrap;
}
.tm-run {
  height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: #ffb020; color: #0f1115;
  font: 600 14px var(--font-ui); cursor: pointer; flex: 1;
}
.tm-row { display: flex; gap: 8px; }
.tm-stops { list-style: none; display: grid; gap: 4px; }
.tm-stops li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px;
  border-radius: 9px; background: rgba(255, 255, 255, 0.05); font-family: var(--font-mono); font-size: 12.5px;
}
.tm-x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #9aa1ad; font-size: 18px; cursor: pointer; }
.tm-pills { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-pills legend { padding: 0; margin-bottom: 6px; }
.tm-pills label {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14); color: #c9ccd2; cursor: pointer;
}
.tm-pills label:has(input:checked) { background: rgba(255, 176, 32, 0.14); border-color: rgba(255, 176, 32, 0.5); color: #ffc04d; }
.tm-pills label:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.tm-trial {
  margin: 12px 16px 0; padding: 10px 12px; border-radius: 10px; display: grid; gap: 6px;
  background: rgba(255, 255, 255, 0.04); border: 1px dashed rgba(255, 255, 255, 0.14);
}
.tm-trial-row { display: flex; align-items: center; justify-content: space-between; }
.tm-pips { display: flex; gap: 4px; }
.tm-pips i { width: 16px; height: 6px; border-radius: 3px; background: #ffb020; }
.tm-pips i.u { background: rgba(255, 255, 255, 0.14); }
.tm-trial small { font-size: 12px; color: #9aa1ad; }
.tm-result { padding: 12px 16px 0; }
.tm-result:empty { display: none; }
.tm-msg { color: #c9ccd2; }
.tm-msg.tm-bad { color: #ffc04d; }
.tm-meter, .tm-legend, .tm-places { list-style: none; display: grid; gap: 6px; }
.tm-meter li, .tm-legend li { display: flex; align-items: center; gap: 8px; }
.tm-meter li span, .tm-legend li span { color: #c9ccd2; flex: 1; }
.tm-meter li b, .tm-legend li b { font-family: var(--font-mono); font-weight: 500; }
.tm-legend li i { width: 12px; height: 12px; border-radius: 3px; }
.tm-places button {
  width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04); color: #ecebe6; font: 13px var(--font-ui); cursor: pointer;
}
.tm-matrix { border-collapse: collapse; font-size: 12px; width: 100%; }
.tm-matrix caption { text-align: left; color: #9aa1ad; margin-bottom: 6px; }
.tm-matrix th, .tm-matrix td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); text-align: left; }
.tm-matrix td { font-family: var(--font-mono); }
.tm-insp {
  position: absolute; right: 16px; bottom: 44px; z-index: 5; width: 440px; max-height: calc(100vh - 120px); overflow-y: auto;
  border-radius: 14px; background: var(--q-surface); color: var(--q-ink); border: 1px solid var(--q-line);
  box-shadow: 0 12px 40px rgba(10, 12, 16, 0.25); padding-bottom: 12px; font-size: 13px;
}
.tm-insp-h { display: flex; width: 100%; font-family: inherit; border: 0; border-bottom: 1px solid var(--q-line); background: transparent; color: inherit; font-size: inherit; text-align: left; cursor: pointer; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; }
.tm-insp-h .chip { margin-left: auto; }
.tm-insp-h[aria-expanded="false"] { border-bottom: 0; }
.tm-insp:has(.tm-insp-h[aria-expanded="false"]) { padding-bottom: 0; }
.tm-insp-url { padding: 12px 14px 4px; font: 12.5px/1.6 var(--font-mono); overflow-wrap: anywhere; }
.tm-insp-url b { color: var(--q-accent-text); }
.tm-insp dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 6px 14px 10px; font-size: 12.5px; }
.tm-insp dt { color: var(--q-ink-3); }
.tm-insp dd { margin: 0; font-family: var(--font-mono); }
.tm-lane { margin: 0 14px 8px; padding: 9px 11px; border-radius: 9px; background: var(--q-surface-2); font-size: 12.5px; color: var(--q-ink-2); }
#insp-body > .btn { margin: 0 14px; }
.tm-insp pre { margin: 10px 14px 0; padding: 10px; border-radius: 9px; background: var(--q-surface-2); max-height: 260px; overflow: auto; font-size: 12px; }
@media (max-width: 700px) {
  .tm-panel { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; max-height: 50vh; }
  .tm-insp { top: 8px; bottom: auto; left: 8px; right: 8px; width: auto; max-height: 34vh; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---- landing page (/) ---- */
.lp main, .lp-top, .lp-foot-bar { max-width: 1200px; margin: 0 auto; }
.lp-top { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 0 40px; }
.lp-brand img { display: block; height: 24px; width: auto; }
.lp-top nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.lp-top nav a { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; color: var(--q-ink-2); text-decoration: none; font-weight: 500; }
.lp-top nav a:hover { background: var(--q-surface-2); color: var(--q-ink); }
.lp-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; padding: 56px 40px; align-items: center; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--q-ink-2);
  padding: 5px 12px 5px 10px; border: 1px solid var(--q-line); border-radius: 999px; background: var(--q-surface);
}
.lp-hero h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 650; margin-top: 18px; text-wrap: balance; }
.lp-lede { font-size: 17px; line-height: 1.55; color: var(--q-ink-2); margin-top: 16px; max-width: 520px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn-lg { height: 44px; padding: 0 18px; font-size: 15px; border-radius: 10px; }
.lp-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; color: var(--q-ink-3); font-size: 13px; }
.lp-art { position: relative; height: 440px; border-radius: 18px; overflow: hidden; border: 1px solid var(--q-line); background: #12161c; }
.lp-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-resp {
  position: absolute; left: 18px; bottom: 18px; right: 18px; padding: 12px 14px; border-radius: 12px;
  background: rgba(10, 12, 16, 0.92); border: 1px solid rgba(255, 255, 255, 0.08); color: #ecebe6;
  font: 12.5px/1.6 var(--font-mono); overflow-wrap: anywhere;
}
.lp-resp b { color: #ffb020; font-weight: 600; }
.lp-resp i { font-style: normal; color: #9aa1ad; }
.lp-resp .ok { color: #34d399; }
.lp-sec { padding: 56px 40px; border-top: 1px solid var(--q-line); }
.lp-sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.lp-sec-h h2 { font-size: 26px; letter-spacing: -0.02em; font-weight: 620; }
.lp-sec-h p { color: var(--q-ink-2); max-width: 460px; }
.lp-caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lp-cap { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 14px; background: var(--q-surface); border: 1px solid var(--q-line); }
.lp-cap h3 { font-size: 16px; }
.lp-cap p { color: var(--q-ink-2); font-size: 13.5px; flex: 1; }
.lp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--q-line); }
.lp-foot code { color: var(--q-ink-3); }
.lp-foot a { margin-left: auto; color: var(--q-accent-text); font-weight: 600; text-decoration: none; font-size: 13px; }
.lp-qs { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 28px; align-items: start; }
.lp-steps { list-style: none; display: grid; gap: 18px; counter-reset: s; }
.lp-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; counter-increment: s; }
.lp-steps li::before {
  content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 13px; background: var(--q-surface-2); border: 1px solid var(--q-line);
}
.lp-steps b { display: block; margin-bottom: 2px; }
.lp-steps p { color: var(--q-ink-2); font-size: 13.5px; }
.lp-code { border-radius: 14px; overflow: hidden; background: #0a0c10; border: 1px solid #262a32; color: #ecebe6; min-width: 0; }
.lp-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid #262a32; }
.lp-tabs [role="tab"] {
  padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #9aa1ad;
  font: 500 13px var(--font-ui); cursor: pointer;
}
.lp-tabs [role="tab"][aria-selected="true"] { color: #ecebe6; border-color: #ffb020; }
.lp-copy {
  margin-left: auto; margin-bottom: 6px; font: 500 12.5px var(--font-ui); color: #c9ccd2; padding: 6px 10px;
  border-radius: 7px; background: #171a20; border: 1px solid #262a32; cursor: pointer;
}
.lp-code pre { margin: 0; padding: 18px 20px; font: 13px/1.7 var(--font-mono); white-space: pre; overflow: auto; }
.lp-code .k { color: #ffb020; }
.lp-code .s { color: #7dd3a8; }
.lp-code .c { color: #9aa1ad; }
.lp-code-note { padding: 0 20px 16px; font: 12.5px/1.6 var(--font-mono); overflow-wrap: anywhere; }
.lp-sc { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-panel { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 12px; background: var(--q-surface); border: 1px solid var(--q-line); }
.lp-small { font-size: 13px; font-weight: 500; color: var(--q-ink-3); }
.lp-st { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; }
.lp-foot-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 40px; border-top: 1px solid var(--q-line); color: var(--q-ink-3); font-size: 12.5px; }
.lp-foot-bar a { color: var(--q-ink-2); }
@media (max-width: 960px) {
  .lp-hero, .lp-qs, .lp-sc { grid-template-columns: 1fr; }
  .lp-caps { grid-template-columns: repeat(2, 1fr); }
  .lp-art { height: 340px; }
}
@media (max-width: 860px) {
  .lp-top { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .lp-top nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .lp-top > .btn { margin-left: auto; }
}
@media (max-width: 700px) {
  .lp-top, .lp-hero, .lp-sec, .lp-foot-bar { padding-left: 16px; padding-right: 16px; }
  .lp-caps { grid-template-columns: 1fr; }
  .lp-sec-h { flex-direction: column; align-items: flex-start; }
  .lp-hero { padding-top: 32px; padding-bottom: 40px; }
}
