:root {
  --ink: #0a0c0b;
  --ink2: #121614;
  --line: #232a26;
  --paper: #f1eee4;
  --dim: #8d968f;
  --green: #1fe08a;
  --green-d: #0b3d28;
  --red: #ff3d57;
  --red-d: #4a0f1a;
  --gold: #ffd166;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(31, 224, 138, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 61, 87, 0.10), transparent 60%),
    var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 22px; }
main { max-width: 1180px; margin: 0 auto; padding: 0 16px 60px; }
section { margin-top: 72px; }

.top { display: flex; align-items: center; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 18px 16px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; display: flex; gap: 6px; }
.logo .lg { color: var(--green); }
.logo .lo { color: var(--dim); font-weight: 400; }
.logo .lr { color: var(--red); }
.top nav { display: flex; gap: 20px; margin-left: auto; font-family: var(--mono); font-size: 13px; }
.top nav a { text-decoration: none; color: var(--dim); }
.top nav a:hover { color: var(--paper); }

.btn {
  font: 600 14px var(--mono); color: var(--paper); background: var(--ink2); border: 1px solid var(--line);
  padding: 11px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s, border-color .12s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--paper); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.ghost { background: transparent; }
.btn.win { background: var(--gold); color: var(--ink); border-color: var(--gold); }

.ticker { border-block: 1px solid var(--line); overflow: hidden; font: 500 12px var(--mono); color: var(--dim); background: rgba(0, 0, 0, .35); }
.ticker-in { display: inline-flex; gap: 40px; padding: 8px 0; white-space: nowrap; animation: tick 60s linear infinite; }
.ticker-in b { color: var(--paper); font-weight: 500; }
.ticker-in .g { color: var(--green); }
.ticker-in .r { color: var(--red); }
@keyframes tick { to { transform: translateX(-50%); } }

.arena { margin-top: 44px; text-align: center; }
.demo-flag { display: inline-block; font: 600 12px var(--mono); background: var(--gold); color: var(--ink); padding: 6px 12px; border-radius: 6px; margin-bottom: 18px; }
.phase { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--mono); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; background: var(--ink2); }
.phase .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.phase .dot.live { background: var(--green); box-shadow: 0 0 0 0 rgba(31, 224, 138, .7); animation: pulse 1.6s infinite; }
.phase .dot.locked { background: var(--gold); }
.phase .clock { color: var(--gold); font-weight: 600; }
@keyframes pulse { to { box-shadow: 0 0 0 12px rgba(31, 224, 138, 0); } }
h1 { font-size: clamp(38px, 7.2vw, 92px); margin: 22px auto 16px; max-width: 14ch; }
h1 em { font-style: normal; -webkit-text-stroke: 1.5px var(--paper); color: transparent; }
.g { color: var(--green); }
.r { color: var(--red); }
.lede { max-width: 62ch; margin: 0 auto 34px; color: #c9cdc6; }

.split { display: grid; grid-template-columns: 1fr minmax(200px, 260px) 1fr; gap: 14px; align-items: stretch; }
.side {
  position: relative; border: 0; border-radius: 22px; cursor: pointer; padding: 34px 18px 26px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--display); overflow: hidden;
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.side.green { background: linear-gradient(160deg, #4dffb0, var(--green) 55%, #0fa863); transform: rotate(-1.2deg); }
.side.red { background: linear-gradient(200deg, #ff8093, var(--red) 55%, #c9142f); transform: rotate(1.2deg); }
.side:hover:not(:disabled) { transform: rotate(0) scale(1.02); box-shadow: 0 20px 60px -20px currentColor; }
.side:disabled { cursor: not-allowed; filter: saturate(.55) brightness(.8); }
.side.mine { outline: 4px solid var(--paper); outline-offset: 4px; }
.side.mine::after { content: "YOUR CALL"; position: absolute; top: 12px; right: 12px; font: 600 11px var(--mono); background: var(--ink); color: var(--paper); padding: 4px 8px; border-radius: 6px; }
.side.won { animation: won 1.2s ease-in-out infinite alternate; }
.side.lost { filter: grayscale(.9) brightness(.5); }
@keyframes won { to { filter: brightness(1.25); transform: scale(1.02); } }
.side .arrow { font-size: 30px; line-height: 1; }
.side .word { font-size: clamp(40px, 7vw, 86px); font-weight: 800; letter-spacing: -0.04em; line-height: .95; }
.side .sub { font: 500 13px var(--mono); opacity: .75; }
.side .weight { margin-top: 14px; font: 600 15px var(--mono); background: rgba(0, 0, 0, .16); padding: 6px 12px; border-radius: 8px; }

.mid { background: var(--ink2); border: 1px solid var(--line); border-radius: 22px; padding: 22px 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; justify-content: center; }
.candle { position: relative; width: 34px; height: 92px; }
.candle .wick { position: absolute; left: 16px; top: 0; bottom: 0; width: 2px; background: var(--dim); }
.candle .body { position: absolute; left: 0; right: 0; top: 30%; height: 40%; border-radius: 4px; background: var(--dim); animation: breathe 2.4s ease-in-out infinite; }
.candle.green .body, .candle.green .wick { background: var(--green); }
.candle.red .body, .candle.red .wick { background: var(--red); }
@keyframes breathe { 50% { top: 18%; height: 58%; } }
.pot { display: flex; flex-direction: column; align-items: center; }
.k { font: 500 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.v { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.u { font: 400 12px var(--mono); color: var(--dim); }
.prices { font: 500 12px var(--mono); color: var(--dim); display: grid; gap: 2px; }
.prices b { color: var(--paper); font-weight: 600; }

.rope { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin-top: 26px; background: var(--line); }
.rope i { display: block; height: 100%; transition: width .6s cubic-bezier(.2, .9, .3, 1.2); }
.rope i:first-child { background: var(--green); width: 50%; }
.rope i:last-child { background: var(--red); width: 50%; }
.rope-legend { display: flex; justify-content: space-between; gap: 12px; font: 500 12px var(--mono); color: var(--dim); margin-top: 8px; }
.rope-legend span:first-child { color: var(--green); }
.rope-legend span:last-child { color: var(--red); }

.launch { border: 1px dashed var(--gold); border-radius: 18px; padding: 24px; background: rgba(255, 209, 102, .05); }
.launch pre { font: 400 13px var(--mono); white-space: pre-wrap; color: #d9d4c3; margin: 14px 0 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
label { display: grid; gap: 6px; font: 500 12px var(--mono); color: var(--dim); }
input { font: 600 18px var(--mono); color: var(--paper); background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 210px; }
input:focus { outline: none; border-color: var(--paper); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.card { background: var(--ink2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card .v { overflow: hidden; text-overflow: ellipsis; }
.fine { font: 400 13px var(--mono); color: var(--dim); max-width: 86ch; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9; width: min(560px, calc(100% - 24px)); box-shadow: 0 16px 50px rgba(0, 0, 0, .6); font: 500 13px var(--mono); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink2); word-break: break-word; }
.toast.ok { border-color: var(--green); }
.toast.err { border-color: var(--red); }

.how ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: s; }
.how li { counter-increment: s; border-top: 3px solid var(--paper); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.how li::before { content: "0" counter(s); font: 600 12px var(--mono); color: var(--dim); }
.how li:nth-child(odd) { border-color: var(--green); }
.how li:nth-child(even) { border-color: var(--red); }
.how li b { font-size: 20px; }
.how li span, .facts span { color: #c9cdc6; font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.facts div { background: var(--ink2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 6px; }

.tape-list { display: grid; gap: 8px; }
.bell { display: grid; grid-template-columns: 110px 90px 1fr 1fr 1fr; gap: 12px; align-items: center; font: 500 13px var(--mono); background: var(--ink2); border: 1px solid var(--line); border-left-width: 6px; border-radius: 12px; padding: 12px 14px; }
.bell.green { border-left-color: var(--green); }
.bell.red { border-left-color: var(--red); }
.bell .res { font: 800 18px var(--display); }
.bell small { display: block; color: var(--dim); font-size: 11px; }
.empty { font: 400 14px var(--mono); color: var(--dim); }

.chain dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font: 400 13px var(--mono); margin: 0; }
.chain dt { color: var(--dim); }
.chain dd { margin: 0; word-break: break-all; }
footer { border-top: 1px solid var(--line); padding: 22px 16px 40px; text-align: center; font: 400 12px var(--mono); color: var(--dim); }

.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal > div { background: var(--ink2); border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(360px, 100%); display: grid; gap: 10px; }
.modal h3 { margin: 0 0 6px; font-size: 22px; }

@media (max-width: 860px) {
  .top nav { display: none; }
  .top .btn { margin-left: auto; }
  .split { grid-template-columns: 1fr 1fr; }
  .mid { grid-column: 1 / -1; order: -1; flex-direction: row; flex-wrap: wrap; }
  .cards, .how ol { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; }
  .bell { grid-template-columns: 1fr 1fr; }
  .chain dl { grid-template-columns: 1fr; }
  input { width: 100%; }
  label { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
