:root {
  --ink: #0d0d0d;
  --ink2: #3a3a3a;
  --mute: #8b8b8b;
  --faint: #bdbdbd;
  --line: #ececec;
  --soft: #f6f6f5;
  --bg: #ffffff;
  --green: #00b862;
  --green-d: #00924d;
  --green-bg: #e9f8f0;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: inherit; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── шапка ── */
header.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); z-index: 5; }
header.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.brand img { width: 22px; height: 22px; }
nav.pages { display: flex; gap: 4px; }
nav.pages a { text-decoration: none; color: var(--mute); padding: 6px 10px; border-radius: 6px; font-size: 14px; }
nav.pages a:hover { color: var(--ink); }
nav.pages a.on { color: var(--ink); background: var(--soft); }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ca { font: 12px var(--mono); color: var(--ink2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; cursor: pointer; background: none; }
.ca:hover { border-color: var(--faint); }
.btn { display: inline-block; text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 6px; background: var(--ink); color: #fff; border: 0; cursor: pointer; }
.btn.green { background: var(--green); }
.btn.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--faint); }

/* ── главная: котёл ── */
.live { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; border-bottom: 1px solid var(--line); }
.pot { padding: 44px 40px 40px 0; border-right: 1px solid var(--line); }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.pot-num { font: 600 76px/1 var(--mono); letter-spacing: -.04em; margin: 14px 0 6px; }
.pot-num small { font-size: 26px; color: var(--mute); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.pot-usd { font: 18px var(--mono); color: var(--ink2); }
.pot-state { margin-top: 22px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.fill { height: 4px; background: var(--soft); border-radius: 2px; margin-top: 14px; overflow: hidden; max-width: 420px; }
.fill i { display: block; height: 100%; background: var(--green); width: 0; transition: width .6s; }

.roll { padding: 44px 0 40px 40px; display: flex; flex-direction: column; }
.count { font: 600 56px/1 var(--mono); letter-spacing: -.03em; margin: 14px 0 10px; }
.odds { font-size: 15px; color: var(--ink2); }
.odds b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.phase { margin-top: 18px; align-self: flex-start; font-size: 13px; padding: 6px 10px; border-radius: 6px; background: var(--green-bg); color: var(--green-d); font-weight: 500; }
.phase.normal { background: var(--soft); color: var(--ink2); }
.lastroll { margin-top: auto; padding-top: 22px; font: 13px var(--mono); color: var(--mute); }
.lastroll b { color: var(--ink); font-weight: 500; }

/* ── лента бросков ── */
.tape-wrap { padding: 34px 0 10px; }
.tape-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.tape-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.tape-head .legend { font-size: 13px; color: var(--mute); display: flex; gap: 16px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 12px; vertical-align: -1px; margin-right: 6px; border-radius: 1px; background: var(--faint); }
.legend i.g { background: var(--green); }
.legend i.o { background: none; border: 1.5px solid var(--green); }
.tape { position: relative; height: 210px; border-bottom: 1px solid var(--ink); }
.tape svg { display: block; width: 100%; height: 100%; }
.tape .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font: 12px/1.45 var(--mono); padding: 7px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -100%); display: none; z-index: 2; }
.tape-axis { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--mute); padding-top: 8px; }
.tape-note { font-size: 13px; color: var(--mute); margin: 10px 0 0; }

/* ── цифры ── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 34px; }
.stat { padding: 20px 20px 20px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat:nth-child(5) { border-left: 0; padding-left: 0; }
.stats .stat:nth-child(n+5) { border-top: 1px solid var(--line); }
.stat .v { font: 600 22px var(--mono); letter-spacing: -.02em; margin-top: 6px; }
.stat .s { font-size: 13px; color: var(--mute); margin-top: 2px; }

/* ── блоки ── */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0 64px; }
h2.sec { font-size: 17px; font-weight: 600; margin: 0 0 16px; letter-spacing: -.01em; display: flex; justify-content: space-between; align-items: baseline; }
h2.sec a { font-size: 13px; font-weight: 400; color: var(--mute); text-decoration: none; }
h2.sec a:hover { color: var(--ink); }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.lc { display: grid; grid-template-columns: 56px 1fr; gap: 18px; }
.lc .stick { position: relative; height: 120px; }
.lc .stick::before { content: ''; position: absolute; left: 27px; top: 0; bottom: 0; width: 2px; background: var(--green-d); }
.lc .stick::after { content: ''; position: absolute; left: 14px; top: 22px; bottom: 18px; width: 28px; border-radius: 3px; background: var(--green); }
.lc .big { font: 600 30px var(--mono); letter-spacing: -.03em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin-top: 12px; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv a { color: var(--ink); }
.empty { color: var(--mute); font-size: 14px; padding: 24px 0; }

/* ── таблицы ── */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 500; font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.t td.n, .t th.n { text-align: right; }
.t td.m { font-family: var(--mono); font-size: 13px; }
.t tr.hit td { background: var(--green-bg); }
.t a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.t a:hover { border-color: var(--ink); }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--soft); color: var(--ink2); }
.pill.g { background: var(--green-bg); color: var(--green-d); }
.pill.o { background: none; border: 1px solid var(--green); color: var(--green-d); }
.scroll { overflow-x: auto; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 16px 0; font-size: 13px; color: var(--mute); }
.pager button { font: inherit; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px; cursor: pointer; color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: default; }
.bar { display: inline-block; height: 6px; background: var(--green); border-radius: 3px; vertical-align: middle; margin-right: 8px; }

/* ── внутренние страницы ── */
.page-head { padding: 44px 0 26px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 34px; letter-spacing: -.03em; font-weight: 600; }
.page-head p { margin: 8px 0 0; color: var(--ink2); max-width: 600px; }
.heads { display: flex; gap: 32px; }
.heads div { text-align: right; }
.heads b { display: block; font: 600 22px var(--mono); letter-spacing: -.02em; }
.heads span { font-size: 12px; color: var(--mute); }
.body { padding: 28px 0 64px; }
.tools { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.tools input { font: 13px var(--mono); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 340px; max-width: 100%; outline: none; }
.tools input:focus { border-color: var(--faint); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; background: none; border: 0; padding: 7px 12px; cursor: pointer; color: var(--mute); }
.seg button.on { background: var(--soft); color: var(--ink); }

/* график свечей */
.cchart { height: 220px; position: relative; margin: 8px 0 32px; border-bottom: 1px solid var(--ink); }
.cchart svg { width: 100%; height: 100%; display: block; }

/* verify */
.formula { background: var(--soft); border-radius: 10px; padding: 22px 24px; font: 13px/1.9 var(--mono); color: var(--ink2); overflow-x: auto; margin: 0 0 28px; }
.formula b { color: var(--ink); font-weight: 600; }
.ok { color: var(--green-d); font-weight: 600; }
.bad { color: #c62828; font-weight: 600; }
.vbtn { font: 12px var(--sans); background: none; border: 1px solid var(--line); border-radius: 5px; padding: 3px 9px; cursor: pointer; }
.vbtn:hover { border-color: var(--ink); }

/* idea */
.idea { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 56px 0 24px; align-items: start; }
.manifesto p { font-size: 19px; line-height: 1.6; margin: 0 0 20px; color: var(--ink2); }
.manifesto p:first-child { color: var(--ink); font-size: 24px; line-height: 1.4; letter-spacing: -.01em; }
.compare { display: grid; gap: 18px; }
.compare .card h3 { margin: 0 0 4px; font-size: 15px; }
.compare .card p { margin: 0 0 12px; font-size: 14px; color: var(--mute); }
.compare svg { width: 100%; height: 90px; display: block; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 22px 20px 22px 0; font-size: 14px; color: var(--ink2); }
.steps li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.steps li::before { counter-increment: s; content: '0' counter(s); display: block; font: 600 13px var(--mono); color: var(--green-d); margin-bottom: 10px; }
.steps b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.rules { padding: 40px 0; }
.rules table td:first-child { color: var(--mute); width: 46%; white-space: normal; }
.faq { padding: 8px 0 72px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::after { content: '+'; float: right; color: var(--mute); font-family: var(--mono); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 10px 0 0; color: var(--ink2); font-size: 14px; }

footer { border-top: 1px solid var(--line); padding: 22px 0 36px; font-size: 13px; color: var(--mute); }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--mute); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .r { margin-left: auto; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }

@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  header.top .wrap { gap: 12px; height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  nav.pages { order: 3; width: 100%; overflow-x: auto; margin: 0 -10px; }
  .ca { display: none; }
  .live, .two, .idea { grid-template-columns: 1fr; }
  .pot { padding: 32px 0 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .roll { padding: 28px 0; }
  .pot-num { font-size: 52px; }
  .count { font-size: 44px; }
  .stats, .steps { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .tape { height: 160px; }
  .tape-head { flex-direction: column; gap: 6px; }
  .tape-axis span:nth-child(2) { display: none; }
  .heads { gap: 20px; }
  .heads div { text-align: left; }
  .idea { gap: 32px; padding-top: 36px; }
}

/* график монеты */
.chart-wrap { padding: 34px 0 10px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.chart-title { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.chart-title h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.chart-title .legend { font-size: 13px; color: var(--mute); display: flex; gap: 16px; flex-wrap: wrap; }
.legend i.buy { width: 0; height: 0; border-radius: 0; background: none; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--green-d); vertical-align: 0; }
.legend i.burn { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); vertical-align: 0; }
.chart { position: relative; height: 420px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.chart-info { position: absolute; top: 10px; left: 12px; right: 80px; z-index: 3; font-size: 12.5px; line-height: 1.5; color: var(--ink2); pointer-events: none; }
.chart-info a { pointer-events: auto; color: var(--ink2); }
.chart-info b { color: var(--ink); font-weight: 600; }
.chart-info b.g { color: var(--green-d); }
.chart-info .m { font-family: var(--mono); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); font-size: 14px; z-index: 2; background: #fff; }
tr.go { cursor: pointer; }
tr.go:hover td { background: var(--soft); }
@media (max-width: 700px) { .chart { height: 320px; } .chart-info { right: 12px; font-size: 12px; } }
.chart-empty[hidden] { display: none; }
.fires { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.fire { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; font: 11px var(--mono); color: var(--ink2); white-space: nowrap; }
.fire img { width: 18px; height: 18px; }
.legend img.burn { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }

/* живые цифры: докручиваются и вспыхивают при изменении */
#potNum, .stat .v { display: inline-block; font-variant-numeric: tabular-nums; }
.ping-up { animation: ping-up 1.4s ease-out; }
.ping-down { animation: ping-down 1.4s ease-out; }
@keyframes ping-up {
  0% { color: var(--green); text-shadow: 0 0 14px rgba(0, 184, 98, .55); transform: translateY(-3px) scale(1.04); }
  35% { color: var(--green); transform: none; }
  100% { color: inherit; text-shadow: none; }
}
@keyframes ping-down {
  0% { color: var(--mute); transform: translateY(2px); }
  100% { color: inherit; }
}
.pot > .label::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--green); vertical-align: 1px; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 184, 98, .5); } 50% { opacity: .5; box-shadow: 0 0 0 5px rgba(0, 184, 98, 0); } }
.toast.fire { background: var(--green-d); }
@media (prefers-reduced-motion: reduce) { .ping-up, .ping-down, .pot > .label::after { animation: none; } }
