/* wormio docs: same void/pearl/lilac palette as the game; gold is reserved for money. */
:root {
  --void: #07051A;
  --pearl: #F6F1FF;
  --lilac: #B79CFF;
  --lilac-2: #CDBDFF;
  --violet: #7D3DF5;
  --gold: #FFB547;
  --muted: #B8ADDB;
  --dim: #8A7FB4;
  --edge: rgba(183, 156, 255, 0.16);
  --edge-2: rgba(183, 156, 255, 0.3);
  --panel: rgba(26, 18, 64, 0.55);
  --f-ui: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--void); color: var(--pearl); font: 400 17px/1.6 var(--f-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--lilac-2); text-underline-offset: 3px; }
a:hover { color: var(--pearl); }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.gold { color: var(--gold); }

/* One violet wash where the wormhole light comes from, one gold glint far away. */
.wash { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 0% 0%, rgba(125, 61, 245, 0.22), transparent 70%),
    radial-gradient(40vmax 40vmax at 110% 100%, rgba(255, 154, 60, 0.08), transparent 70%),
    var(--void); }

/* ── Top bar ─────────────────────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(16px, env(safe-area-inset-left)); background: var(--void); border-bottom: 1px solid var(--edge); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pearl); }
.brand img { border-radius: 50%; }
.brand .mark { font: italic 400 30px/1 var(--f-display); letter-spacing: -0.01em; }
.brand .sub { color: var(--dim); font-weight: 600; font-size: 15px; padding-top: 6px; }
.play { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px; border-radius: 999px;
  background: linear-gradient(180deg, #FFC56B, var(--gold) 55%, #FF9A3C); color: #1A0F00; font-weight: 800; text-decoration: none; }
.play:hover { color: #1A0F00; filter: brightness(1.06); }
.play.big { min-height: 52px; padding: 0 32px; font-size: 18px; }

/* ── Layout ──────────────────────────────────────────────── */
.wrap { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 56px; justify-content: center; padding: 40px 24px 80px; }
.toc details { position: sticky; top: 96px; }
.toc summary { list-style: none; color: var(--dim); font-weight: 700; font-size: 14px; margin-bottom: 10px; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--edge); }
.toc li a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 15px; }
.toc li a:hover { color: var(--pearl); }
.toc li a.on { color: var(--pearl); border-left-color: var(--lilac); }

.doc section { padding: 8px 0 40px; }
.doc h1 { font: italic 400 clamp(40px, 6vw, 64px)/1.02 var(--f-display); letter-spacing: -0.015em; margin: 0 0 20px; max-width: 21ch; }
.doc h1 span { display: block; color: var(--lilac-2); }
.doc h1 b { font-weight: 400; color: var(--gold); }
.doc h2 { font: italic 400 38px/1.1 var(--f-display); margin: 0 0 16px; letter-spacing: -0.01em; }
.doc p { margin: 0 0 14px; color: var(--muted); max-width: 66ch; }
.doc p b, .doc li b, .doc dd b { color: var(--pearl); font-weight: 700; }
.lede { font-size: 19px; color: var(--pearl) !important; }

/* Live strip: real numbers from the running server. */
.live { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 24px; padding: 18px 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--edge); }
.live > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lk { color: var(--dim); font-size: 14px; font-weight: 600; }
.lv { font-size: 28px; font-weight: 800; line-height: 1.1; }
.lv span { font-size: 16px; font-weight: 700; }
.lu { color: var(--dim); font-size: 14px; }

.steps { margin: 0; padding: 0 0 0 1.4em; color: var(--muted); max-width: 66ch; }
.steps li { margin: 0 0 12px; padding-left: 6px; }
.steps li::marker { color: var(--lilac); font-weight: 800; }
.steps li b { color: var(--pearl); }

.keys { margin: 0; display: grid; gap: 2px; max-width: 66ch; }
.keys > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--edge); }
.keys > div:last-child { border-bottom: 1px solid var(--edge); }
.keys dt { font-weight: 800; }
.keys dd { margin: 0; color: var(--muted); }

.rules { margin: 0; padding: 0 0 0 1.1em; color: var(--muted); max-width: 66ch; }
.rules li { margin: 0 0 12px; }
.rules li::marker { color: var(--lilac); }

/* The split: one bar, segment widths ARE the percentages. Gold = paid out. */
.split { margin: 20px 0 24px; max-width: 66ch; }
.split .splitbar { display: flex; height: 54px; border-radius: 14px; overflow: hidden; border: 1px solid var(--edge-2); }
.split .seg { display: grid; place-items: center; min-width: 0; color: #1A0F00; font-weight: 900; font-size: 17px; border-right: 2px solid var(--void); }
.split .seg.keep { background: rgba(183, 156, 255, 0.14); color: var(--muted); font-weight: 700; font-size: 14px; border-right: 0; }
.split figcaption { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--dim); font-size: 14px; }
.split figcaption b { color: var(--pearl); }

.paid { display: grid; gap: 10px; max-width: 66ch; }
.paid .empty { color: var(--dim); }
.round { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--edge); }
.round .rh { display: flex; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 14px; margin-bottom: 6px; }
.round .rh b { color: var(--pearl); }
.round .rr { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 4px 0; font-size: 15px; }
.round .rr .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.round .rr .am { color: var(--gold); font-weight: 700; }
.round .rr a { font-size: 14px; }
.round .rr .muted { color: var(--dim); font-size: 14px; }

.addr { margin: 0 0 14px; max-width: 66ch; }
.addr > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--edge); align-items: baseline; }
.addr > div:last-child { border-bottom: 1px solid var(--edge); }
.addr dt { font-weight: 700; }
.addr dd { margin: 0; min-width: 0; }
.addr code { font: 500 14px/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--pearl); word-break: break-all; }
.addr .pending { color: var(--dim); }
.note { font-size: 15px; }

#faq details { border-top: 1px solid var(--edge); max-width: 66ch; }
#faq details:last-of-type { border-bottom: 1px solid var(--edge); }
#faq summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 700; list-style: none; position: relative; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; color: var(--lilac); font-size: 20px; }
#faq details[open] summary::after { content: '–'; }
#faq details p { padding-bottom: 6px; }

.foot { padding-top: 24px; }
.foot p { margin-top: 18px; color: var(--dim); font-size: 14px; }

/* ── Phones ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px 16px 64px; }
  .toc details { position: static; padding: 12px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--edge); }
  .toc summary { cursor: pointer; margin: 0; color: var(--pearl); }
  .toc details[open] summary { margin-bottom: 8px; }
  .doc h2 { font-size: 32px; }
  .keys > div, .addr > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lv { font-size: 24px; }
  .split .seg { font-size: 14px; }
  .split .seg.keep { font-size: 12px; }
  .brand .mark { font-size: 26px; }
}
@media (max-width: 380px) {
  .split .seg:nth-child(5) { font-size: 11px; }
  .brand .sub { display: none; }
}
