/* Kiriban web calculator.
   Look: road-sign green, lane-paint white, warning amber, black odometer drums. */

@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Overpass Mono"; src: url("fonts/overpass-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sign-green: #0F5C3E;
  --deep-green: #0A4630;
  --lane-white: #FBFBF7;
  --amber: #F6B60B;
  --drum: #17191B;
  --tarmac: #2B2F33;
  --concrete: #ECEDE7;
  --ink: #1F2326;
  --ink-soft: #565D63;
  --stop-red: #C8321F;
  --sans: "Overpass", "Segoe UI", system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --road-w: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--concrete);
}
h1, h2, h3, p, ol, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol { list-style: none; }
a { color: inherit; text-underline-offset: 0.18em; }
button, input { font: inherit; color: inherit; }

.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.5rem; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ---------- Hero ---------- */
.hero { background: var(--sign-green); color: var(--lane-white); padding: 1.5rem 0 3.5rem; }
.nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2rem; }
.wordmark { font-weight: 900; font-size: 1.25rem; letter-spacing: 0.01em; text-decoration: none; }
.wordmark span { font-weight: 600; font-size: 0.875rem; color: var(--amber); margin-left: 0.4rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-weight: 600; font-size: 0.9375rem; }
.nav-links a { text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-bottom-color: rgba(251, 251, 247, 0.6); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--amber); }
.hero h1 {
  font-weight: 900;
  font-size: clamp(2.25rem, 6.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 14ch;
  margin-top: 3rem;
  text-wrap: balance;
}
.lede { margin-top: 1.25rem; max-width: 34rem; font-size: 1.1875rem; color: #DCEBE3; }

.dash { margin-top: 2.5rem; display: grid; gap: 2rem; }
.dash label, .dash legend { font-weight: 600; font-size: 0.9375rem; color: #DCEBE3; }
.dash-reading > label { display: block; margin-bottom: 0.5rem; }

/* ---------- Odometer drums ---------- */
.odo {
  --cell: clamp(2.3rem, 10.6vw, 4.6rem);
  display: inline-block;
  position: relative;
  background: #0B0C0D;
  padding: calc(var(--cell) * 0.14);
  border-radius: calc(var(--cell) * 0.2);
  box-shadow: inset 0 0 0 2px #3A3F44, 0 6px 0 rgba(0, 0, 0, 0.22);
}
.drums { display: flex; gap: calc(var(--cell) * 0.07); }
.drum {
  width: var(--cell);
  height: calc(var(--cell) * 1.36);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(var(--cell) * 0.1);
  background: linear-gradient(#08090A 0%, #2B2F33 38%, #33383C 50%, #2B2F33 62%, #08090A 100%);
  font-family: var(--mono);
  font-weight: 700;
  font-size: calc(var(--cell) * 0.86);
  line-height: 1;
  color: #F6F6F0;
  padding-top: calc(var(--cell) * 0.1); /* Overpass Mono sits high in its box */
}
.drum.is-lead { color: #6B7278; }
.drum.is-rolling > span { display: block; animation: roll 260ms cubic-bezier(0.2, 0.9, 0.3, 1.1); }
@keyframes roll { from { transform: translateY(70%); opacity: 0.2; } to { transform: none; opacity: 1; } }

.odo-input input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; background: transparent; color: transparent; caret-color: transparent;
  font-size: 1rem; text-align: right; cursor: text; border-radius: inherit;
}
.odo-input input::selection { background: transparent; }
.odo-input:focus-within { outline: 3px solid var(--amber); outline-offset: 4px; }
.odo-input input:focus-visible { outline: none; }
.odo-input:focus-within .drum:last-child { box-shadow: inset 0 -4px 0 var(--amber); }

.help { margin-top: 0.75rem; font-size: 0.9375rem; color: #C9DDD3; }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; color: var(--lane-white); font-weight: 600; }
.error { margin-top: 0.5rem; font-weight: 600; color: #FFD9A0; }

.dash-habits { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: end; }
.units legend, .weekly > label { display: block; margin-bottom: 0.5rem; }
.units { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.units legend { float: left; width: 100%; }
.units label, .phones label { position: relative; cursor: pointer; }
.units input, .phones input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.units span, .phones span {
  display: inline-block; padding: 0.55rem 1rem; border-radius: 8px;
  border: 2px solid rgba(251, 251, 247, 0.55); font-weight: 600; color: var(--lane-white); font-size: 1rem;
}
.units input:checked + span, .phones input:checked + span { background: var(--lane-white); border-color: var(--lane-white); color: var(--deep-green); }
.units input:focus-visible + span, .phones input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 3px; }

.weekly-field { display: inline-flex; align-items: baseline; gap: 0.5rem; font-weight: 600; }
.weekly input {
  width: 5.5rem; padding: 0.5rem 0.75rem; border-radius: 8px; border: 2px solid rgba(251, 251, 247, 0.55);
  background: var(--deep-green); color: var(--lane-white); font-family: var(--mono); font-weight: 700; font-size: 1.125rem; text-align: right;
}

/* ---------- The road ---------- */
.road { padding: 3.5rem 0 4rem; }
.road h2, .waitlist h2 { font-weight: 900; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.01em; }
.road-empty { margin-top: 1rem; color: var(--ink-soft); max-width: 34rem; }

.stops {
  margin-top: 2rem;
  position: relative;
  padding-left: calc(var(--road-w) + 1.5rem);
}
.stops:empty { display: none; }
/* the tarmac strip with a dashed centre line */
.stops::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--road-w);
  border-radius: 6px;
  background:
    repeating-linear-gradient(var(--lane-white) 0 1.4rem, transparent 1.4rem 2.8rem) center / 4px 100% no-repeat,
    var(--tarmac);
}
.stop { position: relative; padding: 1.5rem 0; display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 2rem; align-items: start; }
.stop + .stop { border-top: 2px solid #D9DBD3; }

/* distance sign, planted on the verge */
.sign {
  position: absolute; left: calc(-1.5rem - var(--road-w) / 2); top: 1.5rem; transform: translateX(-50%);
  min-width: 4.6rem; padding: 0.4rem 0.5rem 0.3rem; text-align: center;
  background: var(--sign-green); color: var(--lane-white);
  border-radius: 8px; box-shadow: inset 0 0 0 2px var(--sign-green), inset 0 0 0 4px var(--lane-white);
  font-weight: 800; font-size: 1rem; line-height: 1.1;
}
.sign small { display: block; font-size: 0.75rem; font-weight: 600; }
.stop.is-next .sign { background: var(--amber); color: var(--drum); box-shadow: inset 0 0 0 2px var(--amber), inset 0 0 0 4px var(--drum); }

.stop .odo { --cell: 1.55rem; box-shadow: inset 0 0 0 1px #3A3F44; }
.stop.is-next .odo { --cell: clamp(2rem, 7vw, 2.9rem); }
.hand { margin-top: 0.75rem; font-weight: 900; font-size: 1.375rem; line-height: 1.15; }
.stop.is-next .hand { font-size: clamp(1.625rem, 4vw, 2.125rem); }
.rule { color: var(--ink-soft); }
.odds { margin-top: 0.25rem; font-weight: 600; }
.also { color: var(--ink-soft); font-size: 0.9375rem; }

.when { text-align: right; min-width: 9.5rem; }
.when strong { display: block; font-weight: 800; font-size: 1.125rem; }
.when span { color: var(--ink-soft); font-size: 0.9375rem; }
.share {
  margin-top: 0.75rem; padding: 0.5rem 0.9rem; border-radius: 8px; cursor: pointer;
  background: transparent; border: 2px solid var(--ink); font-weight: 800; font-size: 0.9375rem;
}
.stop.is-next .share { background: var(--drum); color: var(--lane-white); border-color: var(--drum); }
.share:hover { background: var(--ink); color: var(--lane-white); }

.safety { margin-top: 2rem; padding-left: calc(var(--road-w) + 1.5rem); color: var(--ink-soft); font-size: 0.9375rem; max-width: 46rem; }

/* ---------- Waitlist ---------- */
.waitlist { background: var(--deep-green); color: var(--lane-white); padding: 3.5rem 0 4rem; }
.waitlist p { margin-top: 1rem; max-width: 38rem; color: #DCEBE3; }
.waitlist form { margin-top: 2rem; }
.waitlist-row { display: flex; flex-wrap: wrap; gap: 1.25rem 1.5rem; align-items: end; }
.field label, .phones legend { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.5rem; color: #DCEBE3; }
.field input {
  width: min(22rem, 78vw); padding: 0.7rem 0.9rem; border-radius: 8px; border: 2px solid rgba(251, 251, 247, 0.55);
  background: var(--lane-white); color: var(--ink); font-size: 1.0625rem;
}
.phones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.phones legend { float: left; width: 100%; }
.btn {
  padding: 0.75rem 1.4rem; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--amber); color: var(--drum); font-weight: 900; font-size: 1.0625rem;
}
.btn:hover { background: #FFC933; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.hp { position: absolute; left: -9999px; }
.waitlist .form-note { min-height: 1.5rem; font-weight: 800; color: var(--amber); }
.waitlist .fineprint { margin-top: 0.25rem; font-size: 0.875rem; color: #B9D2C6; }

/* ---------- Sub-pages: compact hero, prose, tools ---------- */
.hero-compact { padding-bottom: 2.5rem; }
.hero-compact h1 { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 20ch; margin-top: 2.25rem; }
.hero-compact .odo { margin-top: 1.5rem; --cell: clamp(2.6rem, 11vw, 4.4rem); }
.colon { align-self: center; font-family: var(--mono); font-weight: 700; font-size: calc(var(--cell) * 0.7); color: #F6F6F0; padding: 0 calc(var(--cell) * 0.02); }
#next-in { display: block; margin-top: 0.5rem; font-weight: 800; color: var(--lane-white); }
.prose strong#next-in { display: inline; margin: 0; color: inherit; }

.prose { padding: 3rem 0 3.5rem; }
.road + .prose { padding-top: 0; }
.prose h2 { font-weight: 900; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.15; letter-spacing: -0.01em; margin-top: 2.75rem; }
.prose .wrap > h2:first-child, .prose #verdict > h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose dl { margin-top: 1rem; max-width: 42rem; }
.prose a { font-weight: 600; }
.facts { padding-left: 1.25rem; list-style: disc; }
.facts li + li { margin-top: 0.5rem; }

.table-scroll { margin-top: 1.5rem; overflow-x: auto; }
.hands { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 1rem; }
.hands th, .hands td { text-align: left; padding: 0.7rem 1rem 0.6rem 0; border-bottom: 2px solid #D9DBD3; vertical-align: top; }
.hands thead th { font-weight: 600; color: var(--ink-soft); font-size: 0.9375rem; border-bottom-color: var(--ink); }
.hands tbody th { font-weight: 800; white-space: nowrap; }
.hands td:nth-child(n+3) { font-family: var(--mono); font-size: 0.9375rem; white-space: nowrap; }

.faq dt { font-weight: 800; margin-top: 1.5rem; }
.faq dd { margin: 0.25rem 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; list-style: none; max-width: none !important; }
.chips a, .chips button {
  display: inline-block; padding: 0.45rem 0.7rem 0.3rem; border-radius: 8px; cursor: pointer;
  background: var(--drum); color: #F6F6F0; border: 0; text-decoration: none;
  font-family: var(--mono); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.04em;
}
.chips a:hover, .chips button:hover { background: var(--sign-green); }

.tool { margin-top: 1.5rem; padding: 1.5rem; max-width: 42rem; background: var(--sign-green); color: var(--lane-white); border-radius: 12px; }
.tool-row + .tool-row { margin-top: 1.25rem; }
.tool label, .tool legend { font-weight: 600; }
.tool output { font-family: var(--mono); font-weight: 700; font-size: 1.25rem; color: var(--amber); }
.tool input[type="range"] { display: block; width: 100%; margin-top: 0.75rem; accent-color: var(--amber); }
.tool .tool-answer { margin-top: 1.5rem; font-weight: 800; font-size: 1.25rem; line-height: 1.3; }
.tool .tool-note { margin-top: 0.75rem; font-size: 0.875rem; color: #C9DDD3; }

.checker { margin-top: 2rem; }
.checker label { display: block; font-weight: 600; font-size: 0.9375rem; color: #DCEBE3; margin-bottom: 0.5rem; }
.checker input {
  width: min(22rem, 100%); padding: 0.6rem 1rem 0.4rem; border-radius: 12px; border: 0;
  background: #0B0C0D; color: #F6F6F0; box-shadow: inset 0 0 0 2px #3A3F44;
  font-family: var(--mono); font-weight: 700; font-size: clamp(1.75rem, 6vw, 2.5rem); letter-spacing: 0.06em;
}
.checker input::placeholder { color: #6B7278; }
#verdict .odo { --cell: clamp(2rem, 8vw, 3.2rem); }
#verdict h2 { margin-top: 1rem; font-size: clamp(1.75rem, 4vw, 2.5rem); }
#verdict .odds { font-weight: 800; }

.datelist { padding: 0; list-style: none; max-width: 46rem !important; }
.datelist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 2rem; padding: 1rem 0; border-top: 2px solid #D9DBD3; }
.datelist li.is-next { border-top: 0; margin-bottom: 0.5rem; padding: 1.25rem; border-radius: 12px; background: var(--amber); }
.datelist li.is-next + li { border-top: 0; }
.date-main strong { display: block; font-family: var(--mono); font-weight: 700; font-size: 1.375rem; letter-spacing: 0.03em; }
.nb { white-space: nowrap; }
.date-side { text-align: right; }
.date-side span { display: block; }
.date-in { font-weight: 800; }
.date-style, .date-main span { color: var(--ink-soft); font-size: 0.9375rem; }
.datelist li.is-next .date-style, .datelist li.is-next .date-main span { color: var(--ink); }

/* ---------- Footer and text pages ---------- */
.foot { background: var(--drum); color: #B8BDC2; padding: 1.5rem 0; font-size: 0.9375rem; }
.foot p { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.foot .foot-name { color: var(--lane-white); font-weight: 600; margin-bottom: 0.5rem; }
.foot a { color: var(--lane-white); }

.page { padding: 3rem 0 4rem; }
.page .wrap { max-width: 42rem; }
.page h1 { font-weight: 900; font-size: 2.25rem; line-height: 1.1; }
.page h2 { font-weight: 800; font-size: 1.25rem; margin-top: 2rem; }
.page p, .page ul { margin-top: 0.75rem; }
.page ul { padding-left: 1.25rem; }
.page .back { font-weight: 800; }

/* ---------- Small screens ---------- */
@media (max-width: 40rem) {
  :root { --road-w: 22px; }
  .datelist li { flex-direction: column; }
  .date-side { text-align: left; }
  .hero h1 { margin-top: 2rem; }
  .stops { padding-left: calc(var(--road-w) + 1rem); }
  .stops::before { background: repeating-linear-gradient(var(--lane-white) 0 1rem, transparent 1rem 2rem) center / 2px 100% no-repeat, var(--tarmac); }
  .stop { grid-template-columns: 1fr; padding-top: 4.25rem; }
  .sign { left: 0; top: 1.25rem; transform: none; }
  .when { text-align: left; }
  .when strong { display: inline; }
  .safety { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .drum.is-rolling > span { animation: none; }
}
