/* Shot-clock wizard, practice handset and the scenario test. */
.wiz-q { margin: 12px 0; }
.wiz-label { font-weight: 700; margin-bottom: 8px; }
.wiz-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.wiz-opts .btn { text-align: left; }
.wiz-check { display: flex; gap: 8px; align-items: center; font-size: .92rem; margin: 6px 0 4px; cursor: pointer; }
.wiz-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.wiz-range { display: flex; gap: 12px; align-items: center; }
.wiz-range input { flex: 1; accent-color: var(--accent); }
.wiz-val { font: 800 1.4rem var(--mono); min-width: 2ch; }
.wiz-result { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 14px 0; padding: 14px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); }
.wiz-result strong { font-size: 1.1rem; }
.wiz-result p { margin: 4px 0 0; }
.mini-clock { min-width: 74px; height: 58px; padding: 0 10px; border-radius: 10px; background: #0b0d10; color: #ff4d3a; font: 800 2rem/58px var(--mono); text-align: center; text-shadow: 0 0 10px rgba(255, 77, 58, .6); box-shadow: inset 0 0 0 2px #22262c; }
.mini-clock .icon { vertical-align: -.12em; }
.mini-clock.run { color: #69db7c; text-shadow: 0 0 10px rgba(105, 219, 124, .6); }
.hs-wrap { display: grid; justify-items: center; gap: 10px; margin: 12px 0; padding: 18px; border-radius: var(--radius); background: linear-gradient(180deg, #23272e, #15181c); }
.hs-display { width: 150px; height: 110px; border-radius: 12px; background: #050607; color: #ff3b30; font: 800 4.6rem/110px var(--mono); text-align: center; text-shadow: 0 0 18px rgba(255, 59, 48, .7); box-shadow: inset 0 0 0 3px #2d3239; }
.hs-display.run { color: #ff6b5f; }
.hs-state { color: #adb5bd; font-size: .85rem; }
.hs-pad { display: grid; grid-template-columns: repeat(4, 64px); gap: 10px; padding: 12px; border-radius: 12px; background: #e9ecef; }
.hs-key { height: 54px; border-radius: 10px; border: 0; font: 800 .95rem var(--font); cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); touch-action: none; }
.hs-key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.hs-key.red { background: #e03131; color: #fff; }
.hs-key.red.held { outline: 3px solid #ffd43b; outline-offset: 2px; }
.hs-key.green { background: #82c91e; color: #12210a; }
.hs-key.blue { background: #339af0; color: #071a2d; }
.hs-key.teal { background: #20c997; color: #052b20; }
@media (max-width: 420px) { .hs-pad { grid-template-columns: repeat(2, 72px); } }
.opp-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; flex-wrap: wrap; }
.opp-q { font-size: 1.08rem; font-weight: 600; margin: 8px 0 14px; }
.btn.wrong { border-color: var(--bad); color: var(--bad); }
.rules-table td:last-child { font-weight: 650; }

/* Scenario test (sc-test.js): court animation with the shot clock beside it, question and explanation. */
.sc-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin: 12px 0 16px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-story { font-size: 1.06rem; font-weight: 600; margin: 0 0 12px; }
.sc-stage { display: grid; grid-template-columns: minmax(0, 620px) 160px; justify-content: center; gap: 18px; align-items: center; }
.sc-pic { min-width: 0; }
.sc-halves { display: grid; grid-template-columns: 1fr 1fr; font-size: .78rem; line-height: 1.3; margin-bottom: 4px; }
.sc-halves > span { display: flex; flex-direction: column; align-items: center; }
.sc-halves .blue { color: var(--team-a); } .sc-halves .red { color: var(--team-b); }
.sc-svg { display: block; width: 100%; height: auto; }
.sc-floor { fill: #e8c48e; }
.sc-line { fill: none; stroke: #fff; stroke-width: 1.4; }
.sc-board { stroke: #4b5563; stroke-width: 2.5; }
.sc-ring { fill: none; stroke: #e8590c; stroke-width: 1.6; }
.sc-table { fill: #4b5563; }
.sc-dot { transition: transform .7s ease-in-out; }
.sc-dot circle { stroke: #fff; stroke-width: 1.4; }
.sc-dot.blue circle { fill: #2b62e3; } .sc-dot.red circle { fill: #e03a3a; }
.sc-dot.ball circle { fill: #ff8a1f; stroke: #7a2e05; stroke-width: 1; }
.sc-mark { fill: none; stroke-width: 2; opacity: 0; transition: opacity .25s; }
.sc-mark.on { opacity: 1; animation: sc-pulse 1s ease-out infinite; }
.sc-mark.whistle { stroke: #f59f00; } .sc-mark.shot { stroke: #e8590c; } .sc-mark.play { stroke: #12b886; }
.sc-instant .sc-dot { transition: none; }
@keyframes sc-pulse { from { stroke-width: 3; } to { stroke-width: .8; } }
.sc-table-label { margin: 2px 0 0; text-align: center; font-size: .72rem; color: var(--muted); }
.sc-side { display: grid; justify-items: center; gap: 8px; text-align: center; }
.sc-clock { display: grid; justify-items: center; gap: 2px; padding: 8px 12px 10px; border-radius: 12px; background: #0b0d10; color: #adb5bd; font-size: .72rem; box-shadow: inset 0 0 0 2px #22262c; }
.sc-clock-val { min-width: 2.2ch; color: #ff4d3a; font: 800 2.4rem/1.1 var(--mono); text-shadow: 0 0 10px rgba(255, 77, 58, .6); }
.sc-clock.ask .sc-clock-val { color: #ffd43b; text-shadow: 0 0 10px rgba(255, 212, 59, .5); }
.sc-clock.shown .sc-clock-val { color: #69db7c; text-shadow: 0 0 10px rgba(105, 219, 124, .6); }
.sc-cap { min-height: 2.6em; margin: 0; font-weight: 650; font-size: .9rem; }
.sc-q { font-weight: 700; margin: 16px 0 8px; }
.sc-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.sc-opt { justify-content: flex-start; text-align: left; }
.btn.sc-opt[disabled] { opacity: 1; cursor: default; }
.btn.sc-opt[disabled]:not(.right):not(.wrong) { opacity: .5; }
.sc-opt.right { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.sc-opt.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.sc-feedback { display: grid; gap: 10px; margin-top: 14px; }
.sc-feedback .callout p { margin: 0; }
.sc-row { padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); }
.sc-row h4 { margin: 0 0 2px; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.sc-row p { margin: 0; }
.sc-nav { margin-top: 14px; }
.sc-summary { display: grid; gap: 12px; }
.sc-summary h4 { margin: 0 0 6px; }
.sc-missed { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.sc-missed li span { display: block; }
@media (max-width: 640px) {
  .sc-stage { grid-template-columns: minmax(0, 1fr); }
  .sc-side { grid-template-columns: auto 1fr auto; align-items: center; text-align: left; justify-items: start; }
  .sc-clock-val { font-size: 1.9rem; }
}

/* Flowchart (sc-flow.js): question boxes, yes/no arrows, outcome circles. Colour says who has the ball once a branch
   is settled: blue = the same team still has it, red = the other team, amber = nobody yet. The helper's route lights up. */
.flow-scroll { overflow-x: auto; margin: 6px 0 8px; }
.flow-svg { display: block; width: 100%; max-width: 820px; height: auto; margin: 0 auto; }
@media (max-width: 640px) { .flow-svg { min-width: 560px; } }
.flow-svg { --same: var(--team-a); --other: var(--team-b); --none: var(--warn); }
.flow-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 4px; font-size: .9rem; font-weight: 650; }
.flow-key-item { display: inline-flex; align-items: center; gap: 6px; }
.flow-key-item i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid; }
.flow-key-item.same i { border-color: var(--team-a); background: color-mix(in srgb, var(--team-a) 22%, transparent); }
.flow-key-item.other i { border-color: var(--team-b); background: color-mix(in srgb, var(--team-b) 22%, transparent); }
.flow-key-item.none i { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 22%, transparent); }
.flow-node rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.flow-node[data-team="same"] rect { stroke: var(--same); stroke-width: 2.5; fill: color-mix(in srgb, var(--same) 8%, var(--surface)); }
.flow-node[data-team="other"] rect { stroke: var(--other); stroke-width: 2.5; fill: color-mix(in srgb, var(--other) 8%, var(--surface)); }
.flow-node text, .flow-leaf text { fill: var(--ink); font-family: var(--font); font-weight: 650; }
.flow-leaf circle { stroke-width: 3; }
.flow-leaf[data-team="same"] circle { stroke: var(--same); fill: color-mix(in srgb, var(--same) 16%, var(--surface)); }
.flow-leaf[data-team="other"] circle { stroke: var(--other); fill: color-mix(in srgb, var(--other) 16%, var(--surface)); }
.flow-leaf[data-team="none"] circle { stroke: var(--none); fill: color-mix(in srgb, var(--none) 16%, var(--surface)); }
.flow-leaf[data-team="same"] .flow-tag { fill: var(--same); } .flow-leaf[data-team="other"] .flow-tag { fill: var(--other); } .flow-leaf[data-team="none"] .flow-tag { fill: var(--none); }
.flow-leaf .flow-num { font-family: var(--mono); font-weight: 800; }
.flow-ico { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.flow-ico.fill { fill: var(--ink); }
.flow-edge path { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.flow-edge[data-team="same"] path { stroke: var(--same); stroke-width: 2.4; }
.flow-edge[data-team="other"] path { stroke: var(--other); stroke-width: 2.4; }
.flow-edge[data-team="none"] path { stroke: var(--none); stroke-width: 2.4; }
.flow-head.open { fill: var(--muted); } .flow-head.same { fill: var(--same); } .flow-head.other { fill: var(--other); } .flow-head.none { fill: var(--none); } .flow-head.on { fill: var(--accent); }
.flow-label { fill: var(--ink-2); font-family: var(--font); font-weight: 750; }
.flow-node, .flow-leaf, .flow-edge { transition: opacity .2s; }
.flow-svg.active .flow-node:not(.on), .flow-svg.active .flow-leaf:not(.on), .flow-svg.active .flow-edge:not(.on) { opacity: .25; }
.flow-node.on rect { stroke-width: 4; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent)); }
.flow-node.on[data-team="open"] rect { stroke: var(--accent); fill: var(--accent-soft); }
.flow-leaf.on circle { stroke-width: 5; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 55%, transparent)); }
.flow-edge.on path { stroke-width: 3.6; }
.flow-edge.on[data-team="open"] path { stroke: var(--accent); marker-end: url(#flow-arrow-on); }
.flow-legend { color: var(--ink-2); }
.flow-off-title { margin: 12px 0 4px; font-size: .95rem; }
.flow-off { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: .92rem; color: var(--ink-2); }
.flow-off li.on { color: var(--ink); font-weight: 650; background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; margin-left: -6px; }
