/*
 * Slidestory home page, release 26: four things to play with. Each is a card with words on the left and a stage on the right.
 * The stage is a real slide from the app's own renderer, so what moves here is what a deck gets.
 */
.play { background: var(--paper); }
.play .wrap { display: grid; gap: clamp(22px, 3vw, 36px); }
.play-card { display: grid; gap: 16px; padding: clamp(18px, 2.6vw, 28px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.pl-head { display: grid; gap: 4px; max-width: 64ch; }
.pl-head h3 { margin: 0; font: 700 clamp(21px, 2.4vw, 27px)/1.15 var(--display); letter-spacing: -.02em; }
.pl-head p { margin: 0; color: var(--ink-2); font-size: 15.5px; text-wrap: pretty; }
.pl-body { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .pl-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(20px, 3vw, 40px); } }
.pl-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--accent), 0 22px 40px -26px rgba(39, 66, 230, .45); }
.pl-stage svg { display: block; width: 100%; height: 100%; }
.pl-stage:empty { background: var(--sunk); box-shadow: 0 0 0 1px var(--line); }
.pl-note { margin: 0; font-size: 13.5px; color: var(--muted); }

/* 1. type a number */
.pt-left { display: grid; gap: 8px; align-content: start; }
.pt-l { font: 600 13px/1 var(--sans); color: var(--muted); }
.pt-in { width: 100%; resize: none; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink); font: 600 clamp(19px, 2.2vw, 24px)/1.35 var(--display); letter-spacing: -.01em; }
.pt-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
#pl-type[data-typing] .pt-in { caret-color: transparent; }
#pl-type[data-typing] .pt-in { background: linear-gradient(90deg, transparent, transparent); }
#pl-type[data-mode="auto"] .pl-note::after { content: " Or wait: it tries another sentence on its own."; }

/* 2. drop a sheet */
.ps-left, .ps-right { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ps-drop { display: grid; gap: 6px; justify-items: start; padding: 18px 20px; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--paper); transition: border-color .2s, background .2s; }
.ps-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.ps-t { margin: 0; font: 700 18px/1.2 var(--display); letter-spacing: -.01em; }
.ps-s { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.ps-pick { display: inline-block; padding: 9px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 14px/1 var(--sans); cursor: pointer; }
.ps-pick:hover { background: var(--accent); }
#ps-file:focus-visible + .ps-pick { outline: 3px solid var(--accent); outline-offset: 2px; }
.ps-status { margin: 0; font-size: 13.5px; color: var(--muted); min-height: 1.4em; }
.ps-sheet { overflow: auto; max-height: 260px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.ps-tbl { border-collapse: collapse; width: 100%; font: 500 12.5px/1.3 var(--sans); color: #2B3558; }
.ps-tbl th, .ps-tbl td { padding: 6px 10px; border-bottom: 1px solid #E6E9F1; border-right: 1px solid #E6E9F1; text-align: left; white-space: nowrap; }
.ps-tbl th { background: #EEF0F5; color: #0E1530; font-weight: 700; position: sticky; top: 0; }
.ps-tbl td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.ps-count { margin: 0; font: 700 clamp(18px, 2vw, 22px)/1.2 var(--display); letter-spacing: -.015em; min-height: 1.3em; }
.ps-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ps-f { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 13.5px; animation: rise .5s var(--ease) both; }
.ps-f b { font-weight: 700; color: var(--ink); }
.ps-f span { color: var(--ink-2); }
.ps-f[data-best] { border-color: var(--accent); background: var(--accent-soft); }
.ps-stage { margin-top: 4px; }
@media (max-width: 560px) { .ps-f { grid-template-columns: 1fr; gap: 2px; } }

/* 3. spot the wrong number */
.sp-left { display: grid; gap: 10px; align-content: start; min-width: 0; }
.sp-k { margin: 0; font: 600 13px/1 var(--sans); color: var(--muted); }
.sp-src { display: grid; gap: 6px; }
.sp-name { margin: 0; font: 700 16px/1.2 var(--display); }
.sp-src .ps-tbl { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sp-say { margin: 4px 0 0; font-size: 15px; color: var(--ink); min-height: 2.8em; }
.sp-score { margin: 0; font: 700 17px/1.3 var(--display); color: var(--accent); }
.sp-wrap { position: relative; }
.sp-scan { position: absolute; inset: 0; pointer-events: none; border-radius: 12px; overflow: hidden; }
.sp-scan::before { content: ""; position: absolute; top: 0; bottom: 0; left: -12%; width: 12%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 22%, transparent), transparent); opacity: 0; }
.sp-wrap[data-scan] .sp-scan::before { animation: spScan 9s linear forwards; opacity: 1; }
@keyframes spScan { from { left: -12%; } to { left: 100%; } }
.sp-stage text.sp-n { cursor: pointer; }
.sp-stage text.sp-n:hover, .sp-stage text.sp-n:focus-visible { fill: var(--accent); outline: none; text-decoration: underline; }
.sp-stage text.sp-ok { fill: #1E9A59 !important; }
.sp-stage text.sp-bad { fill: #D8453C !important; text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .sp-wrap[data-scan] .sp-scan::before { animation: none; opacity: 0; } }

/* 4. five audiences */
.au-left { display: grid; gap: 12px; align-content: start; }
.au-k { margin: 0; font: 600 15px/1.4 var(--sans); color: var(--ink-2); }
.au-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.au-tab { padding: 9px 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted); font: 600 14px/1 var(--sans); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.au-tab:hover { color: var(--ink); }
.au-tab[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.au-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.au-why { margin: 0; font-size: 15px; color: var(--ink-2); min-height: 1.5em; }
@media (pointer: coarse) { .au-tab, .sh-tab { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .ps-f { animation: none; } }
