@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Azeret Mono";
  src: url("assets/fonts/azeret-mono-var.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --ground: #07141c;
  --ground-2: #0a1d28;
  --panel: #0c2230;
  --panel-2: #10303f;
  --line: rgba(231, 244, 241, 0.13);
  --line-2: rgba(231, 244, 241, 0.3);
  --ink: #eef5f2;
  --muted: #93aab0;
  --go: #58e0c4;
  --go-dim: rgba(88, 224, 196, 0.12);
  --warn: #f2b64d;
  --warn-dim: rgba(242, 182, 77, 0.12);
  --dead: #ff6f5e;
  --dead-dim: rgba(255, 111, 94, 0.12);
  --blue: #8fb0ff;
  --paper: #efe5d1;
  --paper-2: #e4d7bf;
  --paper-ink: #10242c;
  --paper-muted: #4b5a58;
  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", monospace;
  --max: 1380px;
  --gutter: clamp(18px, 4.2vw, 56px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--ground);
  background-image:
    radial-gradient(rgba(231, 244, 241, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 82% -12%, rgba(88, 224, 196, 0.12), transparent 44%);
  background-size: 24px 24px, auto;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--go); color: var(--ground); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) var(--ground); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--ground); }

a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--go);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--go);
  color: var(--ground);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}

.bar-in {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand-a {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 108;
}

.brand-b {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.bar-tool {
  margin: 0;
  color: var(--muted);
}

.bar-tool span { color: var(--line-2); }

.bar-live {
  margin: 0 0 0 auto;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.bar-live b {
  color: var(--go);
  font-weight: 500;
  font-size: 1rem;
}

.reset {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 40px;
}

.reset:hover { border-color: var(--go); color: var(--go); }

/* ---------- intro ---------- */

.intro {
  border-bottom: 1px solid var(--line);
  padding: clamp(2.4rem, 5.5vw, 4.8rem) 0 clamp(2rem, 4vw, 3.4rem);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.78fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.intro h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-variation-settings: "wdth" 112;
  text-wrap: balance;
}

.intro-copy p {
  max-width: 46ch;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.intro-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin: 1.6rem 0 0;
  padding: 0.8rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.intro-specs li { display: flex; gap: 0.45rem; align-items: baseline; }
.intro-specs .mono { color: var(--muted); }
.intro-specs b { color: var(--ink); font-weight: 500; }

/* ---------- trip pass ---------- */

.trip-pass {
  position: relative;
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--paper);
  color: var(--paper-ink);
  transform: rotate(-1.2deg);
  border: 1px solid rgba(255, 255, 255, 0.24);
  max-width: 430px;
  justify-self: end;
}

.trip-pass::before,
.trip-pass::after {
  content: "";
  position: absolute;
  top: 58%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ground);
  transform: translateY(-50%);
}
.trip-pass::before { left: -10px; }
.trip-pass::after { right: -10px; }

.pass-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed rgba(16, 36, 44, 0.32);
  color: var(--paper-muted);
}

.pass-route {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.9rem 0 0.75rem;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pass-arrow { color: #b9432f; font-weight: 600; }

.pass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1rem;
  margin: 0;
  padding: 0.8rem 0;
  border-top: 1px dashed rgba(16, 36, 44, 0.32);
}

.pass-grid dt {
  margin: 0 0 0.15rem;
  color: var(--paper-muted);
  font-size: 0.58rem;
}

.pass-grid dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
}

.pass-stub {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(16, 36, 44, 0.32);
  padding-right: 4.5rem;
}

.pass-stub .mono { color: var(--paper-muted); font-size: 0.58rem; }
.pass-stub b { font-size: 0.9rem; line-height: 1.35; max-width: 30ch; }

.pass-stamp {
  position: absolute;
  right: 1rem;
  bottom: 0.9rem;
  padding: 0.35rem 0.5rem;
  border: 2px solid #b9432f;
  color: #b9432f;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  transform: rotate(9deg);
  opacity: 0.8;
}

/* ---------- bench ---------- */

.bench {
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.build {
  padding: clamp(1.2rem, 2.4vw, 2.2rem) clamp(1.2rem, 2.4vw, 2rem) clamp(1.2rem, 2.4vw, 2rem) 0;
  border-right: 1px solid var(--line);
}

.stage {
  display: flex;
  flex-direction: column;
  align-self: start;
  padding: clamp(1.2rem, 2.4vw, 2.2rem) 0 clamp(1.2rem, 2.4vw, 2rem) clamp(1.2rem, 2.4vw, 2rem);
  min-width: 0;
}

.panel-head,
.stage-head,
.field-head,
.limit-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.panel-head h2,
.sec-head h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.1vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 106;
}

.panel-head .mono { color: var(--muted); text-align: right; }

.presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 1rem;
}

.preset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  min-height: 54px;
}

.preset b { font-size: 0.82rem; font-weight: 700; }
.preset span { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.02em; color: var(--muted); line-height: 1.35; }
.preset:hover { border-color: var(--line-2); }
.preset.is-on { border-color: var(--go); background: var(--go-dim); }
.preset.is-on b { color: var(--go); }

.field { margin-top: 1.2rem; }
.field-head label,
.field-head .mono { color: var(--ink); }
.field-head label { font-weight: 600; font-size: 0.86rem; }
.field-head output {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--go);
}

.hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.dest {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.dest-btn:last-child { grid-column: span 3; }

.dest-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.5rem 0.6rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  min-height: 46px;
}

.dest-btn b { font-size: 0.78rem; font-weight: 700; }
.dest-btn span { font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.05em; color: var(--muted); }
.dest-btn:hover { border-color: var(--line-2); }
.dest-btn.is-on { border-color: var(--go); background: var(--go-dim); }
.dest-btn.is-on b { color: var(--go); }

input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0.35rem 0 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--go) var(--fill, 0%), var(--line) var(--fill, 0%));
}
input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--line);
}
input[type="range"]::-moz-range-progress {
  height: 3px;
  background: var(--go);
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--go);
  border: 2px solid var(--ground);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--go);
  border: 2px solid var(--ground);
}

.habits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.habit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.5rem 0.6rem 0.55rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  min-height: 74px;
}

.habit:hover { background: var(--panel-2); }
.habit.is-on { border-color: var(--go); background: var(--go-dim); }
.habit-top { display: flex; align-items: baseline; gap: 0.35rem; width: 100%; }
.habit-code { font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.1em; color: var(--go); }
.habit-name { font-size: 0.76rem; font-weight: 700; line-height: 1.2; }
.habit-note { color: var(--muted); font-size: 0.64rem; line-height: 1.3; }
.habit-load { margin-top: auto; font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.04em; color: var(--muted); }
.habit.is-on .habit-load { color: var(--go); }

.burn {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 1rem 0 0;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.56rem;
}
.burn b { color: var(--ink); font-weight: 500; }

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 0.55rem;
  border: 1px solid var(--line);
}

.seg button {
  min-height: 40px;
  padding: 0.4rem;
  background: var(--panel);
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: var(--go); color: var(--ground); }

.compat { margin-top: 0.5rem; }
.compat summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  list-style: none;
}
.compat summary::-webkit-details-marker { display: none; }
.compat summary::before { content: "+ "; color: var(--go); }
.compat[open] summary::before { content: "− "; }
.compat p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
.compat b { color: var(--ink); font-weight: 600; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}
.check input { margin-top: 0.25rem; accent-color: var(--go); }

/* ---------- stage ---------- */

.stage-head { margin-bottom: 1rem; }
.stage-head .mono { color: var(--muted); }
.stage-name {
  margin: 0.15rem 0 0;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stage-price { text-align: right; white-space: nowrap; }
.stage-price b { display: block; font-size: 1.4rem; font-weight: 700; color: var(--go); }
.stage-price .mono { color: var(--muted); font-size: 0.58rem; }

.phone-warning {
  margin: 0 0 0.8rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(242, 182, 77, 0.5);
  background: var(--warn-dim);
  color: var(--warn);
  font-size: 0.76rem;
  line-height: 1.45;
}
.phone-warning.is-dead {
  border-color: rgba(255, 111, 94, 0.55);
  background: var(--dead-dim);
  color: var(--dead);
}

.phone-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
}

.phone {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
  padding: 10px;
  border: 1px solid var(--line-2);
  border-radius: 26px;
  background: #0a1014;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  width: 78px;
  height: 17px;
  transform: translateX(-50%);
  border-radius: 0 0 11px 11px;
  background: #050b0e;
}

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 1.15rem 1rem 1rem;
  border: 1px solid rgba(88, 224, 196, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(rgba(88, 224, 196, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 224, 196, 0.035) 1px, transparent 1px),
    linear-gradient(160deg, #0b2c38, #071820 68%);
  background-size: 18px 18px, 18px 18px, auto;
  overflow: hidden;
}

.screen-top,
.screen-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.screen-top { padding-top: 0.15rem; }
.signal { color: var(--go); letter-spacing: 0.1em; }

.screen-readout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  margin-top: auto;
  padding-top: 1.5rem;
}
.screen-big {
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--go);
  font-variant-numeric: tabular-nums;
}
.screen-readout span:last-child {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tank {
  position: relative;
  height: 11px;
  margin-top: 0.8rem;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.tank-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--go), #a8ffe8);
  transition: width 0.35s ease;
}
.tank-ticks {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 9%, rgba(7, 20, 28, 0.35) 9% 10%);
  pointer-events: none;
}

.screen-status {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--go);
}
.screen-status.is-warn { color: var(--warn); }
.screen-status.is-hot { color: var(--dead); }

.screen-foot {
  margin-top: 1rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(231, 244, 241, 0.12);
}
.screen-plan {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
}

.phone.is-warn .phone-screen { border-color: rgba(242, 182, 77, 0.5); }
.phone.is-hot .phone-screen { border-color: rgba(255, 111, 94, 0.55); }

.stage-side { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.gauge {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.g-label {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.g-track { grid-column: 1; height: 4px; background: var(--line); align-self: center; }
.g-track i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--go);
  transition: width 0.35s ease;
}
.g-track i.is-warn { background: var(--warn); }
.g-track i.is-hot { background: var(--dead); }
.g-val {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(var(--days, 5), minmax(0, 1fr));
  gap: 3px;
  margin-top: 1rem;
}

.day-scrub {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.35rem;
}
.day-scrub label { color: var(--muted); }
.day-scrub output {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}
.day-scrub input { margin: 0; }

.day-cell {
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.55rem;
  font-variant-numeric: tabular-nums;
}
.day-cell.full { background: var(--go-dim); border-color: rgba(88, 224, 196, 0.4); color: var(--go); }
.day-cell.throttled { background: var(--warn-dim); border-color: rgba(242, 182, 77, 0.45); color: var(--warn); }
.day-cell.dead { background: var(--dead-dim); border-color: rgba(255, 111, 94, 0.5); color: var(--dead); }
.day-cell.expired {
  background-image: repeating-linear-gradient(135deg, rgba(231, 244, 241, 0.08) 0 2px, transparent 2px 6px);
  color: var(--muted);
}
.day-cell.is-now { outline: 2px solid var(--ink); outline-offset: 1px; }
.day-strip.is-dense .day-cell { height: 22px; }
.day-strip.is-dense .day-cell span { visibility: hidden; }
.day-empty { margin: 0; padding: 0.6rem; border: 1px dashed var(--line); color: var(--muted); }

.stage-foot { margin-top: 0.9rem; }

.trip-log {
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.log-head .mono { color: var(--muted); }
.log-head .mono:last-child { color: var(--go); }
.log-list { margin: 0; padding: 0; list-style: none; }
.log-list li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  line-height: 1.4;
}
.log-list li:first-child { border-top: 0; }
.log-key { color: var(--muted); font-size: 0.52rem; padding-top: 0.1rem; }
.log-text { color: var(--ink); }
.narration {
  min-height: 3.2em;
  margin: 0 0 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}
.stage-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--go);
  background: var(--go);
  color: var(--ground);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}
.btn:hover { background: #8af3df; border-color: #8af3df; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--go); color: var(--go); }

/* ---------- sections ---------- */

.tape,
.rack,
.picks,
.compare,
.method {
  padding: clamp(2.2rem, 4.5vw, 3.6rem) 0;
  border-bottom: 1px solid var(--line);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: 1.2rem;
}
.sec-head p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tape-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-bottom: 0.8rem;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tape-legend span { display: flex; align-items: center; gap: 0.4rem; }
.swatch { width: 10px; height: 10px; display: inline-block; }
.swatch.full { background: var(--go); }
.swatch.throttled { background: var(--warn); }
.swatch.dead { background: var(--dead); }
.swatch.expired { background: repeating-linear-gradient(135deg, var(--muted) 0 2px, transparent 2px 5px); border: 1px solid var(--line); }

.tape-swipe { display: none; margin: 0 0 0.4rem; color: var(--muted); font-size: 0.54rem; }

.tape-scroll { overflow-x: auto; padding-bottom: 0.3rem; }
.tape-grid { display: grid; gap: 4px; min-width: 760px; }

.tape-ruler,
.tape-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 112px;
  gap: 0.7rem;
  align-items: center;
}

.tape-ruler {
  padding: 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.54rem;
  color: var(--muted);
}
.ruler-cells { display: grid; grid-template-columns: repeat(var(--days, 5), minmax(0, 1fr)); gap: 2px; text-align: center; }
.ruler-day { opacity: 0; font-style: normal; }
.ruler-day.show { opacity: 1; }

.tape-row {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.tape-row:hover { background: var(--panel); border-color: var(--line); }
.tape-row.is-selected { background: var(--go-dim); border-color: rgba(88, 224, 196, 0.45); }

.tape-label { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.tape-provider {
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--go);
}
.tape-label b { font-size: 0.78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape-price { font-family: var(--mono); font-size: 0.56rem; color: var(--muted); }

.tape-cells {
  display: grid;
  grid-template-columns: repeat(var(--days, 5), minmax(0, 1fr));
  gap: 2px;
  height: 18px;
}
.cell { display: block; height: 100%; background: var(--go); }
.cell.throttled { background: var(--warn); }
.cell.dead { background: var(--dead); }
.cell.expired { background: repeating-linear-gradient(135deg, rgba(147, 170, 176, 0.5) 0 2px, transparent 2px 5px); border: 1px solid var(--line); }
.cell.is-now { outline: 2px solid var(--ink); outline-offset: 1px; position: relative; z-index: 1; }

.tape-sum { text-align: right; }
.tape-sum b { display: block; font-family: var(--mono); font-size: 0.9rem; color: var(--go); font-weight: 500; }
.tape-sum span { font-family: var(--mono); font-size: 0.52rem; color: var(--muted); letter-spacing: 0.03em; }
.tape-empty { margin: 0; padding: 1rem; border: 1px dashed var(--line); color: var(--muted); }
.tape-note { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.56rem; }

/* ---------- rack ---------- */

.rack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 0.65rem;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  min-height: 190px;
}
.plan-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.plan-card.is-selected { border-color: var(--go); background: var(--go-dim); }

.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.card-provider { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--go); }
.card-rank { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); }
.card-name { font-size: 0.88rem; font-weight: 700; line-height: 1.25; min-height: 2.5em; }
.card-terms { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.card-terms b { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.card-terms span { font-family: var(--mono); font-size: 0.54rem; color: var(--muted); text-align: right; }

.card-mini { display: grid; grid-template-columns: repeat(var(--days, 5), minmax(0, 1fr)); gap: 2px; height: 7px; }
.mini-cell { display: block; height: 100%; background: var(--go); }
.mini-cell.throttled { background: var(--warn); }
.mini-cell.dead { background: var(--dead); }
.mini-cell.expired { background: repeating-linear-gradient(135deg, rgba(147, 170, 176, 0.5) 0 2px, transparent 2px 5px); }

.card-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: auto; }
.card-chips i {
  padding: 0.15rem 0.32rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.5rem;
  font-style: normal;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}
.card-chips i.card-fit { color: var(--go); border-color: rgba(88, 224, 196, 0.35); }
.card-chips i.is-warn { color: var(--warn); border-color: rgba(242, 182, 77, 0.4); }

.rack-empty {
  grid-column: 1 / -1;
  padding: 1rem;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.rack-empty b { display: block; color: var(--ink); margin-bottom: 0.3rem; }
.rack-empty p { margin: 0; font-size: 0.82rem; }

/* ---------- picks ---------- */

.picks-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.8rem;
}

.ticket {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  background: var(--paper);
  color: var(--paper-ink);
  border: 1px solid rgba(255, 255, 255, 0.24);
  min-height: 310px;
  position: relative;
}
.ticket.is-selected { outline: 2px solid var(--go); outline-offset: 1px; }

.ticket-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  padding: 1rem 0.4rem;
  background: var(--paper-2);
  border-right: 1px dashed rgba(16, 36, 44, 0.34);
}
.ticket-stub .mono { color: var(--paper-muted); font-size: 0.56rem; }
.ticket-stub b { font-size: 1.65rem; line-height: 1; font-weight: 800; letter-spacing: -0.04em; }

.ticket-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.9rem 1rem 1rem; min-width: 0; }
.ticket-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
.ticket-head .mono { color: var(--paper-muted); font-size: 0.55rem; }
.ticket-on,
.ticket-flag {
  padding: 0.12rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.ticket-on { color: #176b5a; }
.ticket-flag { color: #a23a2b; }

.ticket h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.ticket-why { margin: 0; font-size: 0.84rem; line-height: 1.45; }
.ticket-risk { margin: 0; font-size: 0.76rem; line-height: 1.45; color: var(--paper-muted); }
.ticket-risk b { color: var(--paper-ink); }

.ticket-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(16, 36, 44, 0.3);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.03em;
  color: var(--paper-muted);
}
.ticket-terms b { font-size: 0.95rem; color: var(--paper-ink); font-weight: 700; }

.ticket-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.3rem;
  margin-top: 0.2rem;
  padding: 0.5rem 0.65rem;
  background: var(--paper-ink);
  color: var(--paper);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  min-height: 40px;
}
.ticket-link:hover { background: #1b3944; }

.picks-empty {
  grid-column: 1 / -1;
  padding: 1rem;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.picks-empty b { display: block; color: var(--ink); margin-bottom: 0.3rem; }
.picks-empty p { margin: 0; font-size: 0.82rem; }

/* ---------- table ---------- */

.table-hint { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.56rem; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; min-width: 900px; border-collapse: collapse; }
th {
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  vertical-align: top;
}
td.num { font-family: var(--mono); font-size: 0.68rem; white-space: nowrap; text-align: right; }
tr.is-out { opacity: 0.5; }
.row-bench {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  text-align: left;
}
.row-bench:hover { color: var(--go); }
.row-bench:disabled { color: var(--muted); cursor: not-allowed; }
.sub {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.4;
}
.fit-cell { display: inline-flex; align-items: center; gap: 0.4rem; }
.fit-mini { display: block; width: 58px; height: 4px; background: var(--line); }
.fit-mini i { display: block; height: 100%; background: var(--go); }
.fit-cell b { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--go); }

.chart-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* ---------- method ---------- */

.method details { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.method summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
}
.method summary::-webkit-details-marker { display: none; }
.method summary .mono:first-child { color: var(--ink); }
.method summary .mono:last-child { color: var(--muted); }
.method summary:hover .mono:first-child { color: var(--go); }

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 0.5rem 0 1.5rem;
}
.method h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.method p { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.method ul { margin: 0; padding: 0; list-style: none; }
.weights li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
}
.weights li span:last-child { color: var(--go); }
.method .known-limits li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}
.method .known-limits b { color: var(--ink); }
.method .sources li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); font-size: 0.74rem; }
.method .sources a { color: var(--go); text-decoration: none; }
.method .sources a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fine { font-size: 0.68rem !important; color: var(--muted); }

/* ---------- footer ---------- */

.foot { padding: 1.5rem 0 2rem; }
.affiliate-disclaimer {
  margin: 0 0 1.2rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.affiliate-disclaimer strong { color: var(--ink); }
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
}
.foot-mark { margin: 0; font-weight: 800; letter-spacing: -0.03em; }
.foot-in .mono { margin: 0; color: var(--muted); }
.foot-in .mono:last-child { margin-left: auto; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .intro-grid { grid-template-columns: 1fr; }
  .trip-pass { justify-self: start; max-width: 520px; }
  .bench { grid-template-columns: 1fr; }
  .build { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .stage { padding-left: 0; }
  .method-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .habits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-in { flex-wrap: wrap; gap: 0.6rem 1rem; padding: 0.55rem 0; }
  .bar-tool { order: 3; width: 100%; }
  .bar-live { margin-left: auto; }
  .intro { padding-top: 2rem; }
  .intro h1 { max-width: 12ch; }
  .intro-specs { gap: 0.5rem 1rem; }
  .sec-head { grid-template-columns: 1fr; gap: 0.6rem; }
  .phone-wrap { grid-template-columns: 1fr; }
  .stage-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
  .gauge { border-top: 1px solid var(--line); border-bottom: 0; }
  .ticket { grid-template-columns: 58px minmax(0, 1fr); }
  .method-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .tape-grid { min-width: 680px; }
  .tape-swipe { display: block; }
}

@media (max-width: 560px) {
  .bar-tool { display: none; }
  .reset { min-height: 36px; padding: 0.4rem 0.55rem; }
  .intro h1 { font-size: clamp(2.45rem, 11vw, 3.4rem); }
  .trip-pass { transform: none; }
  .dest { grid-template-columns: 1fr 1fr; }
  .dest-btn:last-child { grid-column: span 2; }
  .habits { grid-template-columns: 1fr; }
  .stage-side { grid-template-columns: 1fr; }
  .phone { max-width: 100%; }
  .phone-screen { min-height: 280px; }
  .day-cell { height: 26px; font-size: 0.5rem; }
  .tape-ruler, .tape-row { grid-template-columns: 140px minmax(0, 1fr) 94px; gap: 0.4rem; }
  .picks-list { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; min-height: 0; }
  .ticket-stub {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-right: 0;
    border-bottom: 1px dashed rgba(16, 36, 44, 0.34);
  }
  .ticket-stub b { font-size: 1.2rem; }
  .foot-in .mono:last-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
/* Related decisions, last-checked line and touch targets (added 2026-11-06) */
.related-tools { padding-top: 1.6rem; }
.related-title { margin: 0 0 0.5rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; }
.related-tools ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.related-tools a { color: inherit; opacity: 0.9; }
.related-tools a:hover { opacity: 1; text-decoration: underline; }
.last-checked { margin: 0.55rem 0 0; font-size: 0.72rem; letter-spacing: 0.02em; opacity: 0.7; }

/* The quotable answer under the h1. */
.lede-answer { max-width: 62ch; margin: 0 0 0.9rem; font-size: 1.06em; line-height: 1.6; }
