/* Layout: burgundy ground, gold type. Serif title, tab pills, rows of patterns by state. Cell colour runs dark wine, brown, antique gold, bright gold, then red as a streak stretches past its normal gap. One deliberate dark look, so the burgundy matches the videos in any viewer theme. */
:root {
  color-scheme: dark;
  --bg: #240d14;
  --surface: #33141d;
  --surface-2: #4a1f2c;
  --fg: #f4e9dc;
  --muted: #d3b7b0;
  --line: #6b3342;
  --accent: #e3bf6a;
  --on-accent: #240d14;
  --red: #c8372f;
  --red-text: #ff8a7d;
  --h0: #33141d; --h0t: #d3b7b0; --h0b: #4a1f2c;
  --h1: #5a3a2a; --h1t: #f4e9dc; --h1b: #7a5a3a;
  --h2: #a87f2e; --h2t: #1d0b10; --h2b: #a87f2e;
  --h3: #e3bf6a; --h3t: #1d0b10; --h3b: #e3bf6a;
  --h4: #c8372f; --h4t: #ffffff; --h4b: #ff8a7d;
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-ui); font-size: 14px; line-height: 1.4; }
main { max-width: 720px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 190px; }

.kick { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 9vw, 46px); line-height: 1.02; letter-spacing: -0.005em; margin: 0 0 8px; text-wrap: balance; }
.sub { color: var(--muted); margin: 0; max-width: 56ch; font-size: 14px; }
.head { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.span-note { color: var(--muted); font-size: 12px; margin: 10px 0 0; max-width: 60ch; }
h2 { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 24px 0 8px; }

.dw { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; display: grid; gap: 10px; }
.dw-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.dw-h b { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.dw-h span { font-size: 12px; color: var(--muted); max-width: 52ch; }
#dw { display: grid; gap: 8px; }
.dw-r { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 28px; }
.dw-s { font-weight: 600; font-size: 14px; }
.dw-track { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.dw-fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--accent); }
.dw-r.over .dw-fill { background: #e5483d; }
.dw-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); opacity: 0.7; }
.dw-t { font-size: 12px; color: var(--muted); font-family: var(--font-num); white-space: nowrap; text-align: right; }
.dw-t b { color: var(--fg); font-weight: 600; }
.dw-r.over .dw-t b { color: var(--red-text); }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tabs button { font: inherit; font-size: 13px; font-weight: 500; min-height: 44px; padding: 0 6px; border: 1px solid var(--line); border-radius: 22px; background: transparent; color: var(--muted); cursor: pointer; min-width: 0; }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.note { color: var(--muted); font-size: 12px; margin: 10px 0 12px; max-width: 62ch; }
.note .lead { color: var(--fg); }
#tip { position: fixed; z-index: 20; width: max-content; max-width: min(280px, calc(100vw - 16px)); padding: 10px 12px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--accent); border-radius: 10px; font-size: 13px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); pointer-events: none; display: grid; gap: 4px; }
#tip b { font-family: var(--font-display); font-weight: 400; font-size: 16px; color: var(--accent); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--muted); }
.legend span.k { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

.hot { display: grid; gap: 8px; }
.hot button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px; text-align: left; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; cursor: pointer; }
.hot button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.hot .st { font-weight: 600; font-size: 14px; color: var(--accent); }
.hot .nm { min-width: 0; font-size: 14px; font-weight: 500; }
.hot .nm small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.hot .val { text-align: right; font-family: var(--font-num); font-size: 12px; font-variant-numeric: tabular-nums; display: grid; gap: 3px; justify-items: end; }
.hot .val b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1; }
.chip { display: inline-block; min-width: 40px; text-align: center; padding: 2px 6px; border-radius: 4px; font-family: var(--font-num); font-size: 12px; font-weight: 600; }

.plays { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; scroll-margin-top: 12px; }
.plays-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plays-h .t { font-family: var(--font-display); font-size: 20px; flex: 1 1 auto; min-width: 0; }
.plays-meta { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }
.plays-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.plays-tools button, .tool { font: inherit; font-size: 12px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.plays-tools button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.plays-tools .copied { color: var(--muted); font-size: 12px; align-self: center; }
.plays-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 4px; max-height: min(52vh, 430px); overflow: auto; padding-top: 4px; }
.play { border-radius: 8px; padding: 6px 2px; text-align: center; min-width: 0; }
.play b { display: block; font-family: var(--font-num); font-size: 16px; font-weight: 600; line-height: 1.15; }
.play small { display: block; font-family: var(--font-num); font-size: 11px; opacity: 0.9; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; gap: 6px; margin: 18px 0 0; }
.toolbar button { font: inherit; font-size: 12px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.toolbar button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

.sticky { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 8px 6px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(84px, 1.4fr) repeat(var(--cols, 3), minmax(50px, 1fr)); gap: 4px; align-items: center; margin-top: 4px; }
.sticky .row { margin-top: 0; }
.col-h { text-align: center; font: inherit; color: inherit; background: none; border: 1px solid transparent; border-radius: 8px; padding: 2px 0; cursor: pointer; }
.col-h[aria-pressed="true"] { background: var(--surface); border-color: var(--accent); }
.col-h b { display: block; font-size: 14px; font-weight: 600; color: var(--accent); }
.col-h small { display: block; color: var(--muted); font-family: var(--font-num); font-size: 11px; }
.lab { padding: 4px 4px 4px 0; min-width: 0; }
.lab b { display: block; font-weight: 500; font-size: 13px; }
.lab small { display: block; color: var(--muted); font-size: 10px; font-family: var(--font-num); }
.more { margin-top: 10px; }

.cell { min-width: 0; min-height: 48px; font: inherit; border: 1px solid transparent; border-radius: 8px; padding: 4px 2px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.cell .n { font-family: var(--font-num); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cell .r { font-family: var(--font-num); font-size: 10px; opacity: 0.9; font-variant-numeric: tabular-nums; }
.l0 { background: var(--h0); color: var(--h0t); border-color: var(--h0b); }
.l1 { background: var(--h1); color: var(--h1t); border-color: var(--h1b); }
.l2 { background: var(--h2); color: var(--h2t); border-color: var(--h2b); }
.l3 { background: var(--h3); color: var(--h3t); border-color: var(--h3b); }
.l4 { background: var(--h4); color: var(--h4t); border-color: var(--h4b); }
.cell[aria-pressed="true"] { outline: 2px solid var(--fg); outline-offset: 1px; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.foot { color: var(--muted); font-size: 12px; margin-top: 24px; display: grid; gap: 4px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--accent); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.bar-in { max-width: 720px; margin: 0 auto; display: grid; gap: 6px; }
.bar-t { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 18px; }
.bar-t .chip { font-family: var(--font-num); }
.bar-t .tool { margin-left: auto; color: var(--accent); border-color: var(--accent); font-family: var(--font-ui); }
.bar-s { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); }
.bar-s span b { color: var(--fg); font-family: var(--font-num); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .cell, .hot button { transition: border-color .12s, box-shadow .12s; } }

/* ---- added for the hosted product ---- */
[hidden] { display: none !important; }
.locked { margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; display: grid; gap: 12px; justify-items: start; }
.locked h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 0; text-transform: none; color: var(--fg); margin: 0; }
.locked p { margin: 0; color: var(--muted); max-width: 52ch; font-size: 14px; }
.locked .fine { font-size: 12px; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 24px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.cta:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.welcome { background: var(--surface-2); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; font-size: 13px; }
.status { color: var(--muted); padding-block: 24px; }

.picker { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 0 0 14px; }
.picker summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; min-height: 44px; box-sizing: border-box; }
.picker summary::-webkit-details-marker { display: none; }
.picker summary b { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.picker summary span { font-family: var(--font-num); font-size: 13px; color: var(--fg); }
.picker summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.picker .hint { margin: 0; padding: 0 14px 8px; color: var(--muted); font-size: 12px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.pick-chips button { font: inherit; font-family: var(--font-num); font-size: 13px; font-weight: 600; min-width: 46px; min-height: 36px; padding: 0 10px; border-radius: 18px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.pick-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

a.aff { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.bar-s a.aff { font-size: 12px; }

/* one state at a time + Power Plays */
.pp-btn { display: grid; gap: 2px; width: 100%; text-align: left; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 12px 14px; min-height: 52px; margin: 0 0 10px; cursor: pointer; }
.pp-btn span { font-family: var(--font-display); font-size: 20px; color: var(--accent); }
.pp-btn small { color: var(--muted); font-size: 12px; }
.pp-btn[aria-pressed="true"] { background: var(--accent); }
.pp-btn[aria-pressed="true"] span, .pp-btn[aria-pressed="true"] small { color: var(--on-accent); }
.pp-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.power h2 { margin-top: 0; }
.power .lede { color: var(--muted); font-size: 13px; margin: 0 0 12px; max-width: 60ch; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; display: grid; gap: 8px; }
.pcard-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pcard .num { font-family: var(--font-display); font-size: 34px; letter-spacing: 0.12em; line-height: 1; }
.pcard .who { display: grid; gap: 2px; font-size: 13px; }
.pcard .who b { color: var(--accent); }
.pcard .who small { color: var(--muted); font-size: 11px; }
.pcard .sc { margin-left: auto; font-family: var(--font-num); font-size: 12px; text-align: right; }
.pcard ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.pcard li b { color: var(--fg); font-family: var(--font-num); font-weight: 600; }
.pcard .acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.pcard .acts button { font: inherit; font-size: 12px; color: var(--accent); background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 36px; }
.power .fine { color: var(--muted); font-size: 12px; font-style: italic; }
@media (max-width: 420px) { .pcard .sc { margin-left: 0; text-align: left; } }
