/* Hourglass: a payout ledger. Near-black slate, warm paper text, sand for what is waiting, mint for what was paid. */
:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --panel: #13151a;
  --panel-2: #1a1d24;
  --line: #242832;
  --line-hi: #3a4050;
  --ink: #ece8df;
  --muted: #9b978c;
  --dim: #66645e;
  --sand: #e9b44c;
  --sand-hi: #f7d07c;
  --sand-dim: rgba(233, 180, 76, 0.1);
  --paid: #5fd0a0;
  --paid-dim: rgba(95, 208, 160, 0.12);
  --bad: #e06c6c;
  --sky: #7aa2f7;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 10px;
}
* { box-sizing: border-box; }
html { margin: 0; color: var(--ink); background: var(--bg); }
body { margin: 0; font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1100px 520px at 50% -160px, rgba(233, 180, 76, 0.09), transparent 62%) no-repeat; }
main { flex: 1; width: 100%; }
/* The film behind everything. The page colour lives on html; body goes transparent so the fixed film shows through
   (a block's own background paints above its negative-z-index children). A scrim keeps the ledger readable. */
.film { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg) url("/assets/bg.jpg") center/cover no-repeat; }
.film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.film video.on { opacity: 1; }
.film::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(1100px 520px at 50% -160px, rgba(233, 180, 76, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(11, 12, 15, 0.62), rgba(11, 12, 15, 0.8) 45%, rgba(11, 12, 15, 0.92)); }
.has-film body { background: transparent; }
.has-film .panel { background-color: rgba(19, 21, 26, 0.88); backdrop-filter: blur(6px); }
.has-film .foot { background: rgba(11, 12, 15, 0.7); }
.has-film .hero h1, .has-film .hero p.lede { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75); }
.has-film .hero p.lede { color: #c9c4b8; }
a { color: var(--sand); text-decoration: none; }
a:hover { color: var(--sand-hi); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.paid { color: var(--paid); }
.sand { color: var(--sand); }
h1, h2, h3 { margin: 0; line-height: 1.08; }
h1 { font: 400 clamp(2.5rem, 7vw, 4.6rem) var(--display); letter-spacing: -0.01em; }
h1 em { font-style: italic; color: var(--sand-hi); }
h2 { font: 400 clamp(1.5rem, 3.4vw, 2.1rem) var(--display); }
h3 { font: 600 1rem var(--sans); letter-spacing: -0.005em; }
.kicker { font: 500 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--sand); }

.logo { display: block; flex: none; height: auto; }
.hero-logo { display: block; margin: 0 auto 18px; width: min(340px, 72vw); height: auto; filter: drop-shadow(0 10px 40px rgba(233, 180, 76, 0.22)); }

/* header / footer */
.top { border-bottom: 1px solid var(--line); background: rgba(11, 12, 15, 0.86); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font: 400 1.45rem var(--display); white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--sand-hi); }
.nav { display: flex; gap: 20px; flex: 1; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--ink); text-decoration: none; }
.clockchip { font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.clockchip b { color: var(--sand-hi); font-weight: 600; font-size: 12px; margin-left: 4px; }
.soundbtn { display: inline-flex; align-items: center; gap: 8px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.soundbtn[hidden] { display: none; }
.soundbtn:hover { border-color: var(--sand); color: var(--sand-hi); }
.soundbtn[aria-pressed="true"] { color: var(--sand-hi); border-color: rgba(233, 180, 76, 0.45); }
.soundbtn .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.soundbtn .eq i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; }
.soundbtn[aria-pressed="true"] .eq i { height: 9px; }
@media (prefers-reduced-motion: no-preference) {
  .soundbtn[aria-pressed="true"] .eq i { animation: eq 0.9s ease-in-out infinite alternate; }
  .soundbtn[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -0.35s; }
  .soundbtn[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -0.6s; }
}
@keyframes eq { from { height: 3px; } to { height: 10px; } }
.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot p { max-width: 760px; margin: 10px 0 0; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-hi); background: var(--panel-2); color: var(--ink);
  font: 600 14px var(--sans); padding: 10px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--sand); color: var(--sand-hi); text-decoration: none; }
.btn.go { background: var(--sand); border-color: var(--sand); color: #1b1404; }
.btn.go:hover { background: var(--sand-hi); color: #1b1404; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }
input, textarea, select { width: 100%; background: var(--bg); border: 1px solid var(--line-hi); color: var(--ink); border-radius: var(--r);
  padding: 10px 12px; font: 16px var(--sans); }
input:focus, textarea:focus, select:focus { outline: 1px solid var(--sand); border-color: var(--sand); }
label { display: block; font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; position: relative; }
.panel.lit { border-color: rgba(233, 180, 76, 0.35); background: linear-gradient(180deg, var(--sand-dim), transparent 60%), var(--panel); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat .label { font: 500 10px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.stat .value { font: 500 1.45rem var(--mono); margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .value small { font-size: 0.6em; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat .sub { color: var(--dim); font-size: 13px; margin-top: 2px; }

/* hero */
.hero { padding: 52px 0 24px; text-align: center; }
.hero p.lede { font-size: 1.12rem; color: var(--muted); max-width: 660px; margin: 16px auto 0; }
.hero .kicker { display: block; margin-bottom: 14px; }
.chain { font: 500 12px var(--mono); color: var(--muted); margin: 24px auto 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.chain b { color: var(--ink); font-weight: 500; padding: 6px 12px; border: 1px solid var(--line-hi); border-radius: 999px; background: var(--panel); }
.chain b.main { border-color: var(--sand); color: var(--sand-hi); }
.chain i { color: var(--dim); font-style: normal; }

/* the clock: the next payout */
.clock { display: grid; gap: 4px; justify-items: center; margin: 30px auto 0; }
.clock .t { font: 500 clamp(3rem, 11vw, 5.6rem)/1 var(--mono); letter-spacing: -0.04em; color: var(--sand-hi); font-variant-numeric: tabular-nums; }
.clock .l { font: 500 11px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.pots { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.pot { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid rgba(233, 180, 76, 0.35); background: var(--sand-dim); border-radius: 999px; padding: 5px 12px; font: 500 13px var(--mono); color: var(--sand-hi); }
.pot small { color: var(--muted); font-size: 11px; }
.pot.none { border-color: var(--line); background: none; color: var(--dim); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 500 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-hi); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.r, th.r { text-align: right; }
tr:last-child td { border-bottom: 0; }
tr.me td { background: var(--sand-dim); }
.table-scroll { overflow-x: auto; padding: 6px 10px; }
.rank { font: 500 12px var(--mono); color: var(--dim); width: 36px; }

/* coin rows */
.coin { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.coin:hover { text-decoration: none; color: var(--sand-hi); }
.coin img, .coin .ph { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-2); border: 1px solid var(--line-hi); }
.coin .ph { display: grid; place-items: center; font: 700 11px var(--mono); color: var(--muted); }
.coin .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.coin .sym { color: var(--muted); font: 12px var(--mono); }
.tag { display: inline-block; font: 500 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 9px; border: 1px solid var(--line-hi); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.tag.main { color: var(--sand-hi); border-color: var(--sand); }
.tag.child { color: var(--ink); }
.tag.grad { color: var(--sky); border-color: rgba(122, 162, 247, 0.5); }
.tag.ok { color: var(--paid); border-color: rgba(95, 208, 160, 0.5); }
.tag.wait { color: var(--sand); border-color: rgba(233, 180, 76, 0.4); }

/* split bar */
.splitbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 14px 0 12px; background: var(--panel-2); gap: 2px; }
.splitbar i { display: block; height: 100%; }
.legend { display: grid; gap: 8px; font-size: 14px; }
.legend span { display: flex; gap: 10px; align-items: center; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.progress { height: 5px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--sand); border-radius: 999px; }
.meter { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--paid); border-radius: 999px; }

/* launch */
.mode { padding: 20px; }
.mode h3 { margin-top: 10px; }
.mode p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.drop { border: 1px dashed var(--line-hi); border-radius: var(--r); padding: 18px; display: flex; gap: 14px; align-items: center; cursor: pointer; background: var(--bg); }
.drop.over { border-color: var(--sand); }
.thumb { width: 64px; height: 64px; border-radius: 50%; background: var(--panel-2) center/cover; flex: none; border: 1px solid var(--line-hi); }

/* steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 6px; }
.steps li { font: 13px var(--mono); color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.steps li::before { counter-increment: s; content: counter(s); color: var(--dim); min-width: 18px; }
.steps li.ok { color: var(--paid); }
.steps li.err { color: var(--bad); }

/* misc */
.notice { border-left: 2px solid var(--sand); padding: 10px 14px; background: var(--panel); color: var(--muted); font-size: 14px; border-radius: 0 var(--r) var(--r) 0; }
.empty { color: var(--dim); padding: 24px 0; text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.section { margin-top: 48px; }
.section > .head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--panel-2); border: 1px solid var(--line-hi); border-left: 3px solid var(--paid); padding: 10px 14px; border-radius: var(--r); font-size: 14px; }
.toast.err { border-left-color: var(--bad); }
.wmenu { position: absolute; right: 0; top: 44px; background: var(--panel-2); border: 1px solid var(--line-hi); border-radius: var(--r); padding: 6px; display: grid; min-width: 180px; z-index: 30; }
.wmenu button, .wmenu a { background: none; border: 0; color: var(--ink); text-align: left; padding: 8px 10px; font: 14px var(--sans); cursor: pointer; border-radius: 6px; }
.wmenu button:hover, .wmenu a:hover { background: var(--panel); text-decoration: none; }
.wallet-wrap { position: relative; }

.hide-desk { display: none; }
@media (max-width: 720px) {
  .nav { display: none; }
  .top .wrap { gap: 10px; }
  .hide-sm { display: none !important; }
  .hide-desk { display: block; }
  .hero { padding: 34px 0 20px; }
  td, th { padding: 8px 6px; }
}
.coinhead { display: flex; align-items: center; gap: 18px; margin-top: 14px; min-width: 0; justify-content: center; text-align: left; }
.coinhead .big { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-2); border: 1px solid var(--line-hi);
  display: grid; place-items: center; font: 700 1.2rem var(--mono); color: var(--muted); }
.coinhead h1 { overflow-wrap: anywhere; font-size: clamp(2rem, 5vw, 3.2rem); }
.coinhead .sym { font: 500 1rem var(--mono); color: var(--muted); margin-top: 6px; }

/* the board: a box per coin */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: grid; gap: 12px; padding: 16px; color: var(--ink); align-content: start; transition: border-color 0.2s; }
.card:hover { text-decoration: none; color: var(--ink); border-color: var(--sand); }
.card .coin { min-width: 0; }
.card-cap { display: flex; align-items: baseline; gap: 8px; }
.card-cap .num { font: 500 1.35rem var(--mono); letter-spacing: -0.02em; }
.card-cap .dim { font-size: 12px; }
.card-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.card-facts dt { font: 500 9px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.card-facts dd { margin: 4px 0 0; font-size: 13px; }
.card-buy { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.card.bump { animation: bump 1.6s ease-out; }
@keyframes bump { 0% { border-color: var(--paid); box-shadow: 0 0 0 1px var(--paid), 0 0 28px rgba(95, 208, 160, 0.45); } 100% { border-color: var(--line); box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .card.bump { animation: none; border-color: var(--paid); } }

/* the chart */
.chart { padding: 18px 18px 12px; }
.ch-value { font: 500 clamp(1.7rem, 4.6vw, 2.5rem)/1.1 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.ch-sub { font: 500 13px var(--mono); margin-top: 4px; min-height: 20px; }
.ch-sub .up { color: var(--paid); } .ch-sub .down { color: var(--bad); }
.seg { display: inline-flex; border: 1px solid var(--line-hi); border-radius: 999px; padding: 2px; gap: 2px; background: rgba(11, 12, 15, 0.5); }
.seg button { background: none; border: 0; color: var(--muted); font: 500 11px var(--mono); letter-spacing: 0.06em; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--sand); color: #1b1404; }
.seg button:focus-visible { outline: 2px solid var(--sand); outline-offset: 1px; }
.chartwell { position: relative; height: 340px; margin-top: 12px; border-radius: 8px; overflow: hidden; background: rgba(11, 12, 15, 0.55); border: 1px solid var(--line); }
.chartwell > #chart { position: absolute; inset: 0; }
.ch-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 16px; color: var(--dim); font: 13px var(--mono); background: rgba(11, 12, 15, 0.6); }
.ch-empty[hidden] { display: none; }
@media (max-width: 720px) { .chartwell { height: 280px; } }

/* rules */
.rule-block { margin-top: 40px; display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; }
.rule-block .no { font: 400 2.6rem/1 var(--display); color: var(--sand); }
.rule-block h2 { margin: 4px 0 10px; }
.rule-block p, .rule-block li { color: var(--muted); max-width: 720px; margin: 8px 0; }
.rule-block b { color: var(--ink); font-weight: 600; }
.rule-block ul { padding-left: 20px; margin: 8px 0; }
.rule-block > div { min-width: 0; }
@media (max-width: 560px) { .rule-block { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { .meter i, .progress i { transition: width 0.6s ease; } }
