/* About Many Balls: everything on one long sheet, like a printed explainer. The daytime look: cream paper, ink
   outlines, hard shadows, and the three slot colours for what they mean. It prints (or saves as a PDF) cleanly. */
body { background: var(--stage); color: var(--ink); }
.sheet { max-width: 1060px; margin: 22px auto 40px; padding: 30px 38px 26px; background: var(--panel); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 7px 7px 0 var(--ink); display: grid; gap: 30px; }
.crumb { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-dim); }
.crumb a { color: var(--ink); text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86em; padding: 1px 5px; border-radius: 4px; background: #fff; border: 1.5px solid var(--ink); white-space: nowrap; }
b, strong { color: var(--ink); }
.t-r { color: var(--aqua-text); } .t-b { color: var(--pink-text); } .t-p { color: var(--gold-text); }

/* The top: the logo big, one line, the four facts. */
.ab-hero { display: grid; gap: 14px; }
.ab-brand { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.ab-mark { width: 120px; height: 71px; }
.ab-brand .mb-word { font-size: 64px; }
.ab-hero h1 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; }
.ab-lead { margin: 0; max-width: 820px; font-size: 19px; line-height: 1.5; color: var(--ink-dim); }
.facts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.facts li { display: grid; gap: 2px; padding: 12px 14px; background: #fff; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink); }
.facts b { font-size: 17px; }
.facts span { font-size: 14px; color: var(--ink-dim); }
.ab-print { margin: 0; }
.link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Contents. */
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.toc a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.toc a:hover { background: #fff1c9; }
.toc i, .sec h2 i { font-style: normal; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--gold); border: 2px solid var(--ink); font-weight: 800; font-size: 13px; }

/* Sections. */
.sec { display: grid; gap: 16px; scroll-margin-top: 16px; }
.sec + .sec { padding-top: 26px; border-top: 2px dashed rgba(27, 23, 18, 0.35); }
.sec h2 { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
.sec h2 i { min-width: 36px; height: 36px; font-size: 17px; }
.sec h3 { margin: 0; font-size: 17px; font-weight: 800; }
.sec p { margin: 0; }
.intro { font-size: 17px; line-height: 1.5; color: var(--ink-dim); max-width: 860px; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.note { display: grid; gap: 6px; align-content: start; padding: 14px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; }
.note p { font-size: 15px; line-height: 1.45; color: var(--ink-dim); }
.note.gold { background: #fff1c9; }
.small-print { margin: 0; padding-left: 1.2em; display: grid; gap: 7px; font-size: 15px; line-height: 1.45; color: var(--ink-dim); }
.small-print.solo { padding-left: 0; }
p.small-print { display: block; }

/* 1: the steps of a drop. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.steps .n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--panel); font-weight: 800; font-size: 16px; }
.steps p { font-size: 15px; line-height: 1.45; color: var(--ink-dim); margin-top: 3px; }
.steps em { font-style: normal; font-weight: 700; color: var(--ink); white-space: nowrap; }
.steps.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 2: the wall picture and the three slots. */
.wallpic { margin: 0; }
.wallpic svg { display: block; width: 100%; height: auto; }
.w-bg { fill: #16130f; stroke: var(--ink); stroke-width: 4; }
.w-pegs circle { fill: #f6ecd9; opacity: 0.85; }
.w-balls circle { stroke: #16130f; stroke-width: 2.5; }
.s-r { fill: #3fd6c4; } .s-b { fill: #ff5a8f; } .s-p { fill: #ffc53d; }
.s-ic { stroke: #16130f; } .s-icf { fill: #16130f; }
.slot-card { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 10px; }
.slot-card.r { background: #d6f6f1; } .slot-card.b { background: #ffe3ec; } .slot-card.p { background: #fff1c9; }
.slot-card .dot { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); }
.slot-card.r .dot { background: var(--aqua); } .slot-card.b .dot { background: var(--pink); } .slot-card.p .dot { background: var(--gold); }
.slot-card .dot svg { width: 30px; height: 30px; stroke: var(--ink); fill: none; }
.slot-card .dot svg .f { fill: var(--ink); stroke: none; }
.slot-card h3 { font-size: 18px; }
.slot-card p { font-size: 15px; color: var(--ink-dim); line-height: 1.4; }

/* 3: power play cards. */
.band { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-top: 2px; }
.tag { font-size: 12.5px; font-weight: 800; padding: 2px 9px; border-radius: 4px; border: 2px solid var(--ink); letter-spacing: 0.02em; }
.tag.free { background: var(--gold); }
.tag.bits { background: var(--twitch); color: #fff; border-color: var(--twitch); }
.tag.small { background: var(--aqua); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pcard { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-items: center; padding: 14px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.pcard.free { background: #fff8e2; }
.pcard .pi { grid-row: span 3; width: 46px; height: 46px; padding: 4px; border-radius: 10px; border: 2px solid var(--ink); background: var(--panel); fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; align-self: start; }
.pcard.free .pi { background: var(--gold); }
.pcard h4 { margin: 0; font-size: 18px; font-weight: 800; }
.pcard p { font-size: 14.5px; line-height: 1.4; color: var(--ink-dim); }
.pcard .price { font-size: 13.5px; font-weight: 800; color: var(--ink); }

/* 4 and 8: tables. */
.price-table, .cmd-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; font-size: 15px; }
.price-table th, .price-table td, .cmd-table th, .cmd-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); line-height: 1.45; }
.price-table tr:last-child > *, .cmd-table tr:last-child > * { border-bottom: 0; }
.price-table thead th { background: var(--ink); color: var(--panel); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.price-table tbody th { font-weight: 800; white-space: nowrap; width: 1%; }
.price-table td { color: var(--ink-dim); }
.price-table .n { text-align: right; white-space: nowrap; font-weight: 800; color: var(--ink); width: 1%; }
.price-table thead th.n { color: var(--panel); }
.cmd-table th { width: 42%; font-weight: 600; }
.cmd-table th code { margin: 2px 4px 2px 0; display: inline-block; }
.cmd-table td { color: var(--ink-dim); }

/* 5: the winners' wall. */
.winwall { display: grid; gap: 8px; padding: 16px; background: #16130f; border: 2px solid var(--ink); border-radius: 12px; color: #f6ecd9; }
.ww-head { margin: 0; font-family: var(--font-display); font-size: 20px; color: var(--gold); letter-spacing: 0.04em; }
.ww { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 240, 215, 0.08); border: 1.5px solid rgba(255, 197, 61, 0.45); }
.ww b { color: var(--gold); font-size: 16px; }
.ww span { font-size: 15px; color: #f6ecd9; }

/* 6: the leaderboard. */
.lbmock { display: grid; gap: 8px; padding: 14px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.lb-head { margin: 0; display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 16px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; font-size: 12px; font-weight: 800; }
.seg span { padding: 2px 8px; color: var(--ink-dim); }
.seg span.on { background: var(--ink); color: var(--panel); }
.lbmock ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lbmock li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: baseline; padding: 5px 8px; border-radius: 5px; font-size: 15px; }
.lbmock li span { font-weight: 800; color: var(--ink-dim); text-align: right; }
.lbmock li em { font-style: normal; font-weight: 800; }
.lbmock li.first { background: #fff1c9; }
.lbmock li.first span { color: var(--gold-text); }
.lbmock li.you { outline: 2px dashed var(--ink); outline-offset: -2px; margin-top: 4px; }

/* 7: the two panel pages, small. */
.panels { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.pm { width: 300px; display: grid; gap: 8px; align-content: start; padding: 0 10px 12px; background: var(--stage); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); font-size: 13px; overflow: hidden; }
.pm-head { display: flex; justify-content: space-between; align-items: center; margin: 0 -10px; padding: 8px 10px; background: var(--panel); border-bottom: 2px solid var(--ink); }
.pm-logo { font-family: "Jost", var(--font-ui); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.pm-pill { font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: var(--gold); box-shadow: inset 0 0 0 2px var(--ink); }
.pm-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; box-shadow: 2px 2px 0 var(--ink); }
.pm-tabs span { text-align: center; padding: 6px 0; font-weight: 800; background: #fff; color: var(--ink-dim); }
.pm-tabs span + span { border-left: 2px solid var(--ink); }
.pm-tabs span.on { background: var(--gold); color: var(--ink); }
.pm-box { display: grid; gap: 6px; padding: 9px; background: var(--panel); border: 2px solid var(--ink); border-radius: 6px; }
.pm-box p { color: var(--ink-dim); line-height: 1.35; }
.pm-sub { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink) !important; }
.pm-sub small { font-weight: 600; color: var(--ink-dim); }
.pm-cols { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.pm-cols i { font-style: normal; display: grid; place-items: center; height: 24px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; font-weight: 800; font-size: 12px; }
.pm-cols i.on { background: var(--gold); }
.pm-btn { display: block; text-align: center; padding: 7px; font-weight: 800; background: var(--gold); border: 2px solid var(--ink); border-radius: 5px; box-shadow: 2px 2px 0 var(--ink); }
.pm-row { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; padding: 3px 6px; border-radius: 4px; font-weight: 700; color: var(--ink) !important; }
.pm-row span { color: var(--ink-dim); text-align: right; }
.pm-row em { font-style: normal; font-weight: 800; }
.pm-row.first { background: #fff1c9; }
.pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.pm-grid span { display: grid; justify-items: center; padding: 5px 2px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }
.pm-grid span.fr { background: #fff1c9; }
.pm-grid small { font-size: 10.5px; font-weight: 600; color: var(--ink-dim); }
.pm-grid span.fr small { color: var(--ink); font-weight: 800; }

/* 10: fair play. */
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.checks li { position: relative; padding: 12px 14px 12px 50px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; font-size: 15px; line-height: 1.45; color: var(--ink-dim); }
.checks li::before { content: ""; position: absolute; left: 13px; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: var(--aqua) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cpath d='M-6.1 0l4.2 4.6 6.7-9.9' fill='none' stroke='%231b1712' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; border: 2px solid var(--ink); }

/* 11: questions. */
.faq { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.faq div { padding: 14px 16px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; }
.faq dt { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.faq dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-dim); }

/* The end. */
.ab-foot { display: grid; gap: 14px; justify-items: center; padding-top: 22px; border-top: 2px solid var(--ink); text-align: center; }
.ab-foot p { margin: 0; color: var(--ink-dim); font-size: 15px; }
.ab-foot a { color: var(--ink); }
.ab-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.ab-cta .btn { text-decoration: none; }
html[data-look="day"] .btn { border-color: var(--ink); background: #fff; box-shadow: 3px 3px 0 var(--ink); color: var(--ink); }
html[data-look="day"] .btn.primary { background: var(--gold); }

/* Smaller screens. */
@media (max-width: 900px) {
  .sheet { margin: 12px; padding: 22px 20px; border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .steps.compact, .cards, .cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .sheet { margin: 0; border-left: 0; border-right: 0; border-radius: 0; box-shadow: none; padding: 18px 16px 22px; gap: 24px; }
  .ab-brand .mb-word { font-size: 44px; }
  .ab-mark { width: 84px; height: 50px; }
  .ab-lead { font-size: 17px; }
  .steps, .steps.compact, .cards, .cols2, .cols3, .checks, .faq { grid-template-columns: minmax(0, 1fr); }
  .facts { gap: 8px; }
  .facts li { padding: 10px 11px; }
  .facts b { font-size: 15.5px; }
  .facts span { font-size: 13px; }
  .sec h2 { font-size: 24px; }
  .price-table tbody th { white-space: normal; }
  .cmd-table th { width: auto; }
  .cmd-table tr { display: grid; }
  .cmd-table th { border-bottom: 0; padding-bottom: 0; }
}

/* Print, or Save as PDF: no shadows or buttons, sections kept whole where they fit. */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .sheet { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; gap: 18px; }
  .ab-print, .toc, .ab-cta { display: none; }
  .steps li, .facts li, .pcard, .lbmock, .pm, .tag { box-shadow: none; }
  .steps li, .note, .pcard, .slot-card, .faq div, .checks li, .lbmock, .winwall, .pm, .price-table tr { break-inside: avoid; }
  .sec h2 { break-after: avoid; }
  a { text-decoration: none; }
}

/* Part two of the page: Many Balls on a Twitch stream. A full rule and a small heading above its first section,
   and the same label in the contents, on a line of its own. */
.toc-part { flex-basis: 100%; margin: 6px 0 0; font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.sec.part { margin-top: 18px; padding-top: 30px; border-top: 3px solid var(--ink); }
.part-k { margin: 0 0 -6px; font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.solo-mock { max-width: 420px; }
/* Tier names on the ladder example, in the ladder's own colours. */
.lbmock em.t-bronze { color: #9a5b22; } .lbmock em.t-silver { color: #5f6770; } .lbmock em.t-gold { color: #8a5a00; }
.lbmock em.t-platinum { color: #1f7f78; } .lbmock em.t-diamond { color: #3557b8; } .lbmock em.t-champion { color: #c0185a; }

/* Back to the index, once you're well down the page. */
.totop { position: fixed; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 5; min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--gold); color: var(--ink); font: inherit; font-weight: 800; box-shadow: 0 3px 0 var(--edge); cursor: pointer; }
.totop[hidden] { display: none; }
@media print { .totop { display: none; } }
.ab-live { margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.ab-live a { font-weight: 800; text-underline-offset: 3px; }
/* Rules page: steps that repeat every drop, buying power, tips. */
.steps h3 .each { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--aqua); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: 0.02em; vertical-align: 2px; white-space: nowrap; }
.tag.paid { background: var(--pink); color: #fff; border-color: var(--pink); }
.band { flex-wrap: wrap; }
.band-note { font-size: 14px; font-weight: 600; color: var(--ink-dim); }
.rates { width: 100%; border-collapse: collapse; font-size: 15px; }
.rates th, .rates td { padding: 7px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.12); text-align: left; vertical-align: top; }
.rates th { font-weight: 700; color: var(--ink); padding-right: 12px; }
.rates td { color: var(--ink); white-space: nowrap; text-align: right; }
.rates td small { display: block; color: var(--ink-dim); font-size: 13px; white-space: normal; }
.rates tr:last-child th, .rates tr:last-child td { border-bottom: 0; }
.note.gold { margin-top: 14px; }
