@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #1F5BFF;
  --blue-soft: #EAF0FF;
  --ink: #0E1525;
  --text: #1F2940;
  --muted: #5C6882;
  --line: #E2E7F0;
  --panel: #F5F7FB;
  --white: #FFFFFF;
  --up: #067A52;
  --up-soft: #E4F5EE;
  --down: #C8322B;
  --down-soft: #FCEBEA;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
}
h1, h2, h3, p, dl, dd, ol, ul, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
a { color: var(--blue); text-underline-offset: 2px; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 10px; font-weight: 700; z-index: 5; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 700; vertical-align: middle; }

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

.bar { border-bottom: 1px solid var(--line); background: var(--white); }
.bar__in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand__name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.brand--light { color: var(--white); }
.bar__nav { display: flex; gap: 22px; margin-left: 12px; font-size: 15px; font-weight: 500; }
.bar__nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.bar__nav a:hover { color: var(--ink); }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E0A100; }

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

.intro { padding: 40px 0 28px; }
.intro__in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: start; }
h1 { font-size: clamp(30px, 3.5vw, 42px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; color: var(--ink); }
.intro__lead { margin-top: 14px; max-width: 40em; font-size: 18px; line-height: 1.5; }
.straight { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.straight li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink); background: var(--panel); }
.straight li:last-child { border-color: transparent; background: none; padding-left: 4px; }

/* the pot, with what flows in above it and what flows out below */
.flow__node { padding: 11px 16px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.flow__node strong { display: block; font-size: 16px; color: var(--ink); }
.flow__node span { display: block; font-size: 14px; line-height: 1.4; color: var(--muted); }
.flow__arrow { position: relative; margin-left: 30px; padding: 9px 0 15px 20px; font-size: 14px; font-weight: 500; color: var(--blue); }
.flow__arrow::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 9px; width: 2px; background: var(--blue); }
.flow__arrow::after { content: ""; position: absolute; left: -5px; bottom: 3px; border: 6px solid transparent; border-bottom: 0; border-top: 7px solid var(--blue); }
.potcard { border: 1.5px solid var(--blue); border-radius: 16px; padding: 14px 20px 14px; background: var(--white); }
.potcard__label { font-size: 15px; font-weight: 500; color: var(--muted); }
.potcard__amount { display: block; margin-top: 2px; font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.potcard__dial { display: block; margin-top: 6px; }
.potcard__note { margin-top: 6px; font-size: 14px; color: var(--muted); }
html:not(.js) .potcard__dial { display: none; }

.range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 26px; margin: 0; background: transparent; cursor: pointer; --fill: 50%; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--blue) var(--fill), var(--line) var(--fill)); }
.range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--line); }
.range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--blue); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--white); border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(14, 21, 37, 0.25); }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 3px solid var(--blue); box-shadow: 0 1px 4px rgba(14, 21, 37, 0.25); }

/* ------------------------------------------------------------------ markets */

.market { padding: 8px 0 72px; }
.market__in { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 28px; align-items: start; }

.assets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asset { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.asset input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.asset__badge { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--white); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.asset__name { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; color: var(--ink); }
.asset__pair { font-size: 13px; color: var(--muted); }
.asset__price { grid-column: 3; grid-row: 1 / span 2; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.asset:hover { border-color: #B9C6E6; }
.asset:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.asset:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
/* more than two prices: smaller tiles, as many to a row as fit */
.assets--many { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }
.assets--many .asset { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; padding: 10px 12px; border-radius: 12px; }
.assets--many .asset__badge { width: auto; min-width: 38px; height: 28px; padding: 0 6px; border-radius: 8px; font-size: 11px; }
.assets--many .asset__name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assets--many .asset__pair { display: none; }
.assets--many .asset__price { grid-column: 2; grid-row: 2; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.assets--many .asset:has(input:checked) .asset__price { color: var(--ink); }

.controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 20px 0 12px; }
.pick legend, .ticket__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.controls__note { margin: 20px 0 10px; font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span, .chipbtn { display: block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 15px; font-weight: 500; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; cursor: pointer; }
.chip:hover span, .chipbtn:hover { border-color: #B9C6E6; }
.chip input:checked + span, .chipbtn.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.ladder { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ladder__head, .rung { display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px; align-items: center; column-gap: 12px; padding: 10px 16px; }
.ladder__head { background: var(--panel); font-size: 13px; font-weight: 500; color: var(--muted); }
.ladder__head span:last-child { text-align: center; }
.rung { position: relative; border-top: 1px solid var(--line); cursor: pointer; }
.rung > input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rung__price { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.rung__move { margin-left: 8px; font-size: 14px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.rung__chance { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.rung--up .rung__move { color: var(--up); }
.rung--down .rung__move { color: var(--down); }
.rung__pays { justify-self: end; width: 150px; padding: 8px 10px; border-radius: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.rung__pays:empty { display: none; }
.rung__pays b { font-weight: 700; }
.rung--up .rung__pays { background: var(--up-soft); color: var(--up); }
.rung--down .rung__pays { background: var(--down-soft); color: var(--down); }
.rung:hover { background: var(--panel); }
.rung:has(> input:checked) { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.rung--up:has(> input:checked) .rung__pays { background: var(--up); color: var(--white); }
.rung--down:has(> input:checked) .rung__pays { background: var(--down); color: var(--white); }
.rung:has(> input:focus-visible) { outline: 3px solid var(--blue); outline-offset: -3px; }
.ladder__now { padding: 9px 16px; border-top: 1px solid var(--line); background: var(--ink); color: var(--white); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ladder--noprice .ladder__now { background: var(--panel); color: var(--muted); font-weight: 500; }
.rung--own { border-top: 1px solid var(--line); background: var(--white); }
.rung--own .rung__price { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.own__box { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font-size: 18px; font-weight: 700; }
.own__box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
#own-price { width: 7.5em; min-width: 0; border: 0; padding: 0; background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; }
#own-price::placeholder { font-weight: 500; font-size: 15px; color: #8D97AD; }
#own-price:focus { outline: none; }
.ladder__note, .source { margin-top: 10px; font-size: 14px; color: var(--muted); }
.source { margin-top: 4px; }

/* ------------------------------------------------------------------ the ticket */

.ticket { position: sticky; top: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--white); box-shadow: 0 10px 30px -18px rgba(14, 21, 37, 0.35); }
.ticket__title { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin: 0 0 10px; }
.ticket__target { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.ticket__target b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ticket__badge { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 4px; margin-right: 4px; border-radius: 15px; color: var(--white); font-size: 9px; font-weight: 700; letter-spacing: 0.02em; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 12px; background: var(--panel); }
.mode__opt { position: relative; cursor: pointer; }
.mode__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mode__opt span { display: block; padding: 7px 6px; border-radius: 9px; text-align: center; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.mode__opt input:checked + span { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(14, 21, 37, 0.14); }
.mode__opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.deadline { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; margin: 14px 0 18px; }
.deadline .ticket__label { margin: 0; }
.deadline__value { text-align: right; font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.deadline .range { grid-column: 1 / -1; margin-top: 4px; }
.deadline__ends { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.amount { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 26px; font-weight: 700; color: var(--ink); }
.amount:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.amount span { color: var(--muted); }
.amount input { flex: 1; min-width: 0; width: 100%; border: 0; padding: 0; background: transparent; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.amount input:focus { outline: none; }
.chips--amount { margin-top: 8px; }
.chips--amount .chipbtn { flex: 1; text-align: center; padding: 6px 4px; font-size: 14px; }

.receipt { margin-top: 16px; font-size: 15px; }
.receipt > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.receipt dt { color: var(--muted); }
.receipt dd { font-weight: 500; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.outcome { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--up-soft); }
.outcome__label { font-size: 14px; font-weight: 500; color: var(--up); }
.outcome__amount { font-size: 38px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; color: var(--up); font-variant-numeric: tabular-nums; }
.outcome__note { font-size: 14px; color: var(--text); }
.outcome__chance { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.outcome__chance:empty { display: none; }
.outcome--no { background: var(--panel); }
.outcome--no .outcome__label { color: var(--muted); }
.outcome--no .outcome__amount { font-size: 22px; letter-spacing: -0.015em; line-height: 1.25; color: var(--ink); margin: 2px 0; }
.ticket__miss { margin-top: 10px; font-size: 14px; color: var(--text); }
.buy { display: block; width: 100%; margin-top: 14px; padding: 14px; border: 0; border-radius: 12px; background: var(--blue); color: var(--white); font-size: 17px; font-weight: 700; cursor: pointer; }
.buy:disabled { background: #C3CCE0; cursor: not-allowed; }
.buy__note { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
.ticket__small { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

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

.band { padding: 68px 0; border-top: 1px solid var(--line); }
.band--panel { background: var(--panel); }
h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; color: var(--ink); margin-bottom: 26px; }

.how { counter-reset: how; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.how li { counter-increment: how; }
.how li::before { content: counter(how); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px; border-radius: 50%; background: var(--blue); color: var(--white); font-weight: 700; }
.how h3 { font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 6px; }

.risks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.risks li { padding: 16px 0; border-top: 1px solid #D5DCEA; }
.risks strong { color: var(--ink); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.factors dt { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.factors dd { margin: 2px 0 20px; max-width: 34em; }

.examples { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.examples caption { text-align: left; font-size: 16px; font-weight: 700; color: var(--ink); padding-bottom: 12px; }
.examples th, .examples td { padding: 10px 0 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.examples th:first-child { padding-left: 0; text-align: left; }
.examples thead th { font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid var(--ink); }
.examples tbody th { font-weight: 500; color: var(--ink); }
.examples td { font-weight: 500; color: var(--ink); }
.examples__top { color: var(--up) !important; font-weight: 700 !important; }
.examples__note { margin-top: 12px; font-size: 14px; color: var(--muted); }

.rules, .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.facts { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.rules > div, .facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid #D5DCEA; }
.rules dt, .facts dt { font-weight: 700; color: var(--ink); }

.empty { max-width: 44em; padding: 22px 24px; border: 1.5px dashed #C9D2E4; border-radius: 14px; color: var(--muted); background: var(--white); }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-size: 24px; font-weight: 500; line-height: 1; color: var(--blue); }
details[open] summary::after { content: "\2212"; }
details p { max-width: 42em; padding-bottom: 18px; }

.foot { background: var(--ink); color: var(--white); padding: 44px 0 52px; }
.foot__in { display: flex; gap: 48px; align-items: flex-start; }
.foot__text { max-width: 44em; font-size: 14px; color: rgba(255, 255, 255, 0.8); }
.foot__text p + p { margin-top: 8px; }

/* ------------------------------------------------------------------ smaller screens */

@media (max-width: 1000px) {
  .market__in { grid-template-columns: minmax(0, 1fr); }
  .ticket { position: static; }
  .bar__nav { display: none; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .intro { padding: 26px 0 20px; }
  .intro__in { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .intro__lead { font-size: 17px; }
  .assets { grid-template-columns: minmax(0, 1fr); }
  .assets--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ladder__head, .rung { grid-template-columns: minmax(0, 1fr) 62px 112px; column-gap: 8px; padding: 10px 12px; }
  .rung__price { font-size: 18px; }
  .rung__move { font-size: 14px; }
  .rung__pays { width: 112px; padding: 8px 4px; font-size: 15px; }
  .rung--own .rung__price { flex-wrap: wrap; gap: 4px 8px; }
  #own-price { width: 6em; }
  .how, .risks, .rules { grid-template-columns: minmax(0, 1fr); }
  .rules > div, .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .band { padding: 52px 0; }
  .foot__in { flex-direction: column; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
