:root {
  color-scheme: dark;
  --sl-bg: #101210;
  --sl-surface: #181b18;
  --sl-plot-bg: #131613;
  --sl-border: #343d33;
  --sl-grid: #292f28;
  --sl-text: #f3f3eb;
  --sl-muted: #b0baab;
  --sl-green: #c4e5ae;
  --sl-red: #f19590;
  --sl-ink: #142013;
  --sl-font: 'Inter Tight', system-ui, sans-serif;
  --sl-numeric: ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--sl-bg); }
body { margin: 0; min-height: 100vh; color: var(--sl-text); font-family: var(--sl-font); }
body, button, input, textarea { font-size: 1rem; }
h1, h2, h3, p, figure, ol, dl, dd { margin: 0; }
button, input, textarea { font-family: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sl-green); outline-offset: 4px; }

.sl-shell { width: min(calc(100% - clamp(32px, 8vw, 112px)), 1120px); margin-inline: auto; }
.sl-header { border-bottom: 1px solid var(--sl-border); }
.sl-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 65px; }
.sl-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sl-text); text-decoration: none; font-size: 1.25rem; font-weight: 750; letter-spacing: -.04em; }
.sl-brand strong { color: var(--sl-green); }
.sl-main { padding-block: clamp(30px, 5.5vw, 72px) 76px; }
.sl-intro { display: flex; justify-content: space-between; align-items: end; gap: 12px 28px; margin-bottom: clamp(20px, 3vw, 32px); }
.sl-intro h1 { font-size: clamp(2.9rem, 7vw, 5.25rem); font-weight: 750; line-height: .99; letter-spacing: -.059em; }
.sl-intro p { margin-top: 10px; color: var(--sl-muted); font-size: clamp(.96rem, 1.5vw, 1.13rem); line-height: 1.45; }
.sl-edition { flex: none; display: grid; gap: 4px; padding-bottom: 2px; text-align: right; font-size: .87rem; }
.sl-edition span { color: var(--sl-muted); }
.sl-edition time { color: var(--sl-text); font-weight: 600; }

.sl-game-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(285px, 1fr); gap: 14px; align-items: stretch; }
.sl-board, .sl-panel, .sl-notice { min-width: 0; background: var(--sl-surface); border: 1px solid var(--sl-border); border-radius: 8px; }
.sl-board { padding: clamp(15px, 2.4vw, 25px); }
.sl-panel { padding: clamp(19px, 3vw, 30px); }
.sl-notice { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 14px; padding: 12px 16px; color: var(--sl-muted); font-size: .92rem; }
.sl-board-header { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-bottom: clamp(12px, 2vw, 18px); }
.sl-board-header h2, .sl-return-label { color: var(--sl-muted); font-size: .88rem; font-weight: 550; }
.sl-balance { margin-top: 3px; font-size: clamp(2.05rem, 4.5vw, 3.7rem); font-weight: 750; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.sl-round { margin-bottom: 1px; color: var(--sl-green); font-size: .88rem; font-weight: 650; }

.sl-chart { height: clamp(260px, 32vw, 360px); padding: 15px 13px 26px 52px; background: var(--sl-plot-bg); border: 1px solid var(--sl-grid); border-radius: 5px; }
.sl-plot, .sl-plot-lines { position: relative; width: 100%; height: 100%; }
.sl-plot-lines { position: absolute; display: block; inset: 0; overflow: visible; }
.sl-guide, .sl-round-guide, .sl-x-tick, .sl-dot, .sl-plot-delta { position: absolute; }
.sl-guide { inset-inline: 0; border-top: 1px solid var(--sl-grid); }
.sl-guide span {
  position: absolute;
  right: calc(100% + 8px);
  transform: translateY(-53%);
  color: var(--sl-muted);
  font: .62rem var(--sl-numeric);
  white-space: nowrap;
}
.sl-guide.sl-baseline { border-color: #66795d; border-top-style: dashed; }
.sl-baseline span { color: var(--sl-green); font-weight: 700; }
.sl-round-guide { inset-block: 0; border-left: 1px solid var(--sl-grid); }
.sl-x-tick { top: calc(100% + 8px); transform: translateX(-50%); color: var(--sl-muted); font: .62rem var(--sl-numeric); white-space: nowrap; }
.sl-gain { color: var(--sl-green); }
.sl-loss { color: var(--sl-red); }
.sl-segment { stroke: currentColor; stroke-width: 2.5px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sl-segment-new { stroke-dasharray: 1; animation: sl-draw .4s ease-out both; }
.sl-dot { width: 7px; height: 7px; border-radius: 50%; transform: translate(-50%, -50%); background: currentColor; }
.sl-dot-start { color: var(--sl-green); }
.sl-plot-delta { padding: 1px 2px; transform: translate(-50%, calc(-100% - 6px)); background: var(--sl-plot-bg); font: 650 .65rem var(--sl-numeric); white-space: nowrap; }
.sl-plot-delta.sl-loss { transform: translate(-50%, 6px); }
.sl-marker-new { animation: sl-mark .14s .25s ease-out both; }
@keyframes sl-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sl-mark { from { opacity: 0; } to { opacity: 1; } }

.sl-panel > h2 { font-size: clamp(1.32rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.18; letter-spacing: -.025em; overflow-wrap: anywhere; }
.sl-scope, .sl-explanation { color: var(--sl-muted); line-height: 1.5; font-size: .93rem; }
.sl-scope { margin-top: 10px; }
.sl-question form { margin-top: clamp(17px, 3vw, 28px); }
.sl-question label, .sl-share { display: block; margin-bottom: 6px; color: var(--sl-muted); font-size: .87rem; font-weight: 600; }
.sl-question input, .sl-share textarea {
  display: block;
  width: 100%;
  min-height: 45px;
  padding: 9px 11px;
  border: 1px solid var(--sl-border);
  border-radius: 5px;
  background: var(--sl-bg);
  color: var(--sl-text);
  font-weight: 550;
}
.sl-question input[aria-invalid='true'] { border-color: var(--sl-red); }
.sl-input-error { margin-top: 7px; color: var(--sl-red); font-size: .84rem; }
.sl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 13px; }
.sl-button, .sl-text-button { min-height: 42px; border-radius: 5px; color: var(--sl-green); cursor: pointer; font-size: .9rem; font-weight: 700; }
.sl-button { padding: 9px 15px; border: 1px solid var(--sl-border); background: transparent; }
.sl-button:hover { border-color: var(--sl-green); }
.sl-text-button { padding: 8px 2px; border: 0; background: transparent; }
.sl-text-button:hover, .sl-source:hover { text-decoration: underline; text-underline-offset: 3px; }
.sl-primary { border-color: var(--sl-green); background: var(--sl-green); color: var(--sl-ink); }
.sl-primary:hover { background: #d6eec7; }

.sl-reveal { margin-top: clamp(15px, 2.5vw, 22px); padding-top: 13px; border-top: 1px solid var(--sl-border); }
.sl-reveal-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sl-reveal-heading h3 { color: var(--sl-muted); font-size: .84rem; font-weight: 650; }
.sl-delta { font: 650 .9rem var(--sl-numeric); white-space: nowrap; }
.sl-canonical { margin-top: 7px; font-size: 1.12rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.sl-explanation { margin-top: 5px; }
.sl-equation { margin-top: 11px; font: 650 .88rem / 1.4 var(--sl-numeric); }
.sl-reveal-actions { justify-content: space-between; }
.sl-reveal-actions > button { margin-inline-start: auto; }
.sl-source { color: var(--sl-green); font-size: .84rem; text-decoration: none; }

.sl-results .sl-return-label { margin-top: 21px; }
.sl-return { margin-top: 2px; font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 750; line-height: 1.06; letter-spacing: -.05em; }
.sl-results .sl-actions { margin-top: 21px; }
.sl-message { color: var(--sl-muted); font-size: .88rem; line-height: 1.4; }
.sl-message:not(:empty) { margin-top: 10px; }
.sl-share { margin-top: 8px; }
.sl-share textarea { margin-top: 5px; resize: vertical; font: .84rem / 1.45 var(--sl-numeric); }
.sl-recap { margin-top: 14px; }
.sl-recap h2 { margin-bottom: 15px; }
.sl-recap ol { list-style: none; padding: 0; }
.sl-recap li { display: grid; grid-template-columns: minmax(88px, .3fr) minmax(0, 1fr); gap: 10px 14px; padding-block: 12px; border-top: 1px solid var(--sl-border); }
.sl-recap-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.sl-recap-round { color: var(--sl-muted); font-size: .81rem; }
.sl-recap-detail { overflow-wrap: anywhere; }
.sl-recap-detail h3 { font-size: .98rem; line-height: 1.35; }
.sl-recap-detail p { margin-top: 4px; color: var(--sl-muted); font-size: .86rem; line-height: 1.4; }
.sl-recap-detail .sl-recap-example { color: var(--sl-green); }
.sl-storage-note { margin-top: 14px; color: var(--sl-muted); font-size: .84rem; }

.sl-dialog { width: min(calc(100% - 36px), 430px); max-height: calc(100% - 32px); padding: 26px; border: 1px solid var(--sl-border); border-radius: 8px; background: var(--sl-surface); color: var(--sl-text); }
.sl-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.sl-dialog h2 { margin-bottom: 12px; font-size: 1.6rem; letter-spacing: -.03em; }
.sl-dialog p { color: var(--sl-muted); font-size: .94rem; line-height: 1.5; }
.sl-rules-payouts { margin-block: 16px; }
.sl-rules-payouts > div { display: flex; justify-content: space-between; gap: 10px; padding-block: 8px; border-top: 1px solid var(--sl-border); }
.sl-rules-payouts dd { font-family: var(--sl-numeric); }
.sl-dialog form { margin-top: 18px; }
.sl-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

@media (max-width: 720px) {
  .sl-header-row { min-height: 54px; }
  .sl-main { padding-block: 24px 42px; }
  .sl-intro { align-items: start; flex-direction: column; gap: 8px; margin-bottom: 15px; }
  .sl-intro h1 { font-size: clamp(2.65rem, 10vw, 4rem); }
  .sl-intro p { margin-top: 6px; }
  .sl-edition { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; font-size: .79rem; text-align: left; }
  .sl-game-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sl-board-header { margin-bottom: 10px; }
  .sl-chart { height: clamp(157px, 42vw, 218px); padding: 11px 10px 23px 42px; }
  .sl-guide span { right: calc(100% + 5px); }
  .sl-guide span, .sl-x-tick { font-size: .59rem; }
  .sl-plot-delta { font-size: .61rem; }
  .sl-panel { padding: 17px; }
  .sl-recap { margin-top: 10px; }
  .sl-recap li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sl-recap-summary { justify-content: space-between; }
  .sl-question input { font-size: max(1rem, 16px); }
  .sl-keyboard-open .sl-main { padding-bottom: max(60px, 28vh); }
  .sl-keyboard-open .sl-board { padding: 10px 14px; }
  .sl-keyboard-open .sl-board-header { margin-bottom: 7px; }
  .sl-keyboard-open .sl-chart { height: clamp(104px, 23vh, 135px); }
  .sl-keyboard-open .sl-question { padding-block: 12px; }
  .sl-keyboard-open .sl-question > h2 { font-size: 1.15rem; }
  .sl-keyboard-open .sl-scope { margin-top: 7px; font-size: .84rem; line-height: 1.4; }
  .sl-keyboard-open .sl-question form { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sl-segment-new, .sl-marker-new { animation: none; }
}
