/* The pirate token: a yellow event field (your odds and the chests behind them) beside a navy panel with the inputs.
   Base in ../style.css. */
.stage { display: grid; }
.field { position: relative; overflow: hidden; background: var(--yellow); color: var(--ink); padding: 0 var(--pad) 22px; display: flex; flex-direction: column; }
.field > * { position: relative; }
/* One giant pictogram, cropped off the field's edge. Navy, since the field is yellow. */
.giant { position: absolute; top: 62px; right: calc(-1 * clamp(28px, 5vw, 80px)); width: clamp(120px, 22vw, 300px); aspect-ratio: 1; color: var(--ink); }
.giant svg { width: 100%; height: 100%; display: block; }
@media (max-width: 899px) { .giant { top: 36px; right: -22vw; width: 64vw; color: rgba(20, 33, 61, 0.14); } }
.field h1 { font-size: clamp(36px, 9vw, 68px); margin: 22px 0 20px; max-width: min(6.5em, calc(100% - clamp(80px, 16vw, 220px))); }

/* Your odds, big, with what they're the odds of. */
.answer .big { font-size: clamp(64px, 9vw, 120px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.answer .line { margin-top: 12px; max-width: 26em; font-size: clamp(17px, 2vw, 21px); font-weight: 700; line-height: 1.3; }

.status { display: flex; flex-wrap: wrap; gap: 10px clamp(24px, 5vw, 56px); margin-top: 28px; max-width: 640px; padding-top: 10px; border-top: 2px solid var(--ink); }
.num { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

.panel { background: var(--navy); color: #fff; padding: 24px var(--pad) 28px; }
.soft, .ev.soft { color: var(--navy-soft); }
.panel-title { font-size: clamp(28px, 5vw, 38px); letter-spacing: -0.02em; line-height: 1.05; }
.panel .more { display: inline-block; margin-top: 28px; color: #fff; }

.inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin-top: 20px; max-width: 560px; }
.inputs label { display: grid; gap: 6px; align-content: end; }
.inputs .unit { display: flex; align-items: baseline; gap: 6px; border: 2px solid #fff; padding: 8px 10px; font-size: 14px; color: var(--navy-soft); white-space: nowrap; }
.inputs .unit:focus-within { border-color: var(--orange); }
.inputs input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: #fff; font: 800 26px var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; outline: 0; -moz-appearance: textfield; }
.inputs input::-webkit-inner-spin-button, .inputs input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.inputs .unit.over { border-color: var(--orange); }
.limit { margin-top: 10px; max-width: 560px; padding: 8px 10px; background: var(--orange); color: var(--ink); font-size: 15px; font-weight: 700; }
.note { margin-top: 10px; font-size: 14px; max-width: 560px; }


/* The math: strikes in a row, the month's games, and the expected value; the odds on a green field. */
.math { padding-top: clamp(40px, 7vw, 72px); }
.math h2 { font-size: clamp(36px, 6vw, 64px); padding-bottom: 14px; border-bottom: var(--rule) solid var(--ink); }
.math .therefore { margin-top: clamp(20px, 3vw, 32px); font-size: clamp(18px, 2vw, 22px); max-width: 36em; color: var(--ink-soft); }
.math .ladder { list-style: none; margin: clamp(20px, 3vw, 32px) 0 0; padding: 0; max-width: 900px; }
.math .ladder li { display: grid; grid-template-columns: 7em 10em 1fr; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(20, 33, 61, 0.15); }
.math .ladder b { font-size: clamp(17px, 2vw, 22px); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.math .ladder i { display: block; height: 14px; min-width: 2px; background: var(--ink); }
.math .ladder .gap { display: block; text-align: center; color: var(--ink-soft); letter-spacing: 0.3em; border-top: 0; padding: 2px 0; }
.math .ladder .last { border-top: var(--rule) solid var(--ink); }
.math .ladder .last i { background: var(--orange); }
.math .steps-math { margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; max-width: 40em; }
.math .steps-math li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-soft); }
.math .steps-math li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: #fff; font-weight: 800; }
.math .steps-math b { color: var(--ink); }
.math .worked { margin-top: clamp(24px, 4vw, 40px); font-size: clamp(28px, 5.6vw, 72px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.math .worked .hl { background: var(--orange); padding: 0 0.12em; }
.math .odds { margin-top: clamp(32px, 5vw, 56px); background: var(--green); color: #fff; padding: clamp(20px, 4vw, 40px); }
.math .odds h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; }
.math table { width: 100%; border-collapse: collapse; margin: 18px 0 20px; }
.math th, .math td { padding: 12px 0; border-top: 2px solid rgba(255, 255, 255, 0.5); text-align: left; vertical-align: baseline; }
.math th { font-weight: 700; font-size: 17px; padding-right: 16px; }
.math td { text-align: right; font-size: clamp(24px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.math .odds p { max-width: 40em; color: rgba(255, 255, 255, 0.92); }
.math .source { margin-top: 32px; font-size: 15px; color: var(--ink-soft); max-width: 60em; }

.math .ladder .last b { color: var(--ink); }

@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1.55fr) minmax(380px, 1fr); min-height: 100svh; }
  .field { padding-bottom: 36px; }
  .field h1 { margin: 30px 0 0; }
  .answer { margin-top: 28px; }
  .panel { padding-top: 76px; padding-bottom: 36px; display: flex; flex-direction: column; }
  .panel .more { margin-top: auto; padding-top: 28px; align-self: flex-start; }
}
@media (max-width: 899px) {
  .answer .big { font-size: clamp(52px, 15vw, 72px); }
}
@media (max-width: 640px) {
  .inputs input { font-size: 22px; }
  .inputs .unit { font-size: 12px; padding: 8px; }
  .status .num { font-size: 26px; }
  .math .ladder li { grid-template-columns: 5.6em 8.6em 1fr; gap: 8px; }
}

/* Party size: four square buttons, the chosen one filled white. */
.squad { grid-column: 1 / -1; display: grid; gap: 6px; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg button { border: 2px solid #fff; border-radius: 0; background: transparent; color: #fff; padding: 12px 0; font: 800 13px var(--font); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
@media (hover: hover) { .seg button:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); } }
.seg button:active { transform: scale(0.97); }
.seg button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sofar { margin-top: 14px; max-width: 560px; font-size: 15px; }
.sofar b { color: #fff; }
.mode { margin-top: 22px; max-width: 560px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.seg.two button { padding: 14px 0; }
[hidden] { display: none !important; }

/* The explainer: date, contents, and the drop-rate tables. */
.story .updated { margin: -10px 0 18px; color: var(--ink-soft); }
.story .toc { margin: 22px 0 8px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.story .toc ol { margin: 0; }
.story .toc a { color: var(--ink); }
.story h3 { scroll-margin-top: 16px; }
.story .rates { width: 100%; border-collapse: collapse; margin: 20px 0; font-variant-numeric: tabular-nums; }
.story .rates caption { text-align: left; font-size: 15px; color: var(--ink-soft); padding-bottom: 8px; }
.story .rates th, .story .rates td { padding: 9px 0; border-top: 1px solid rgba(20, 33, 61, 0.2); text-align: left; font-size: 17px; }
.story .rates thead th { font: 800 13px var(--font); letter-spacing: 0.08em; text-transform: uppercase; border-top: 0; }
.story .rates td, .story .rates thead th:last-child { text-align: right; font-weight: 800; }
.story .rates tbody th { font-weight: 400; }
.story .rates tr.hl th, .story .rates tr.hl td { background: var(--yellow); font-weight: 800; padding-left: 8px; padding-right: 8px; }

/* The field's two parts (title, then the answer) and the panel's two parts (the inputs, then the promo and math link).
   Desktop keeps field beside panel; on phones they interleave: title, inputs, answer, the rest, so the answer sits right
   under what changes it. */
.field-top, .field-answer { position: relative; }
@media (min-width: 900px) {
  .panel-main { display: flex; flex-direction: column; }
  .panel-end { margin-top: auto; }
}
@media (max-width: 899px) {
  .stage { display: flex; flex-direction: column; }
  .field, .panel { display: contents; }
  .field-top, .field-answer { background: var(--yellow); color: var(--ink); padding: 0 var(--pad); }
  .field-top { order: 1; overflow: hidden; padding-bottom: 6px; }
  .panel-main, .panel-end { background: var(--navy); color: #fff; padding: 24px var(--pad); }
  .panel-main { order: 2; }
  .field-answer { order: 3; padding-top: 22px; padding-bottom: 24px; }
  .field-answer .answer { margin-top: 0; }
  .panel-end { order: 4; padding-top: 4px; }
  .giant { top: 36px; }
}
