/* Starter of the day (/for/teachers/starter/): a projector slide that scales with its own width, so it reads from the back
   of a classroom in full screen and still fits a phone. Sizes use container units (cqi) of the stage. */
.stage { container-type: inline-size; margin: var(--space-5) 0; background: var(--paper); border: 1px solid var(--ink); display: flex; flex-direction: column; }
.stage-bar { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 12px clamp(16px, 3cqi, 48px); background: var(--green); color: var(--on-green); }
.stage-brand { font-family: var(--serif); font-weight: 800; font-size: clamp(20px, 2cqi, 34px); letter-spacing: -0.02em; }
.stage-day { font-family: var(--mono); font-size: clamp(12px, 1.1cqi, 18px); letter-spacing: 0.08em; text-transform: uppercase; }
.st-time { margin-left: auto; font-family: var(--mono); font-weight: 500; font-size: clamp(22px, 2.4cqi, 44px); font-variant-numeric: tabular-nums; }
.st-time[hidden] { display: none; }
.stage.timeup .st-time { background: var(--red); color: var(--on-green); padding: 0 10px; }
.stage-body { flex: 1; }

.st { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4cqi, 64px); padding: clamp(20px, 3.4cqi, 56px) clamp(16px, 3cqi, 48px) 0; }
.st + .st { border-top: 3px double var(--ink); margin-top: var(--space-5); }
.st-q { display: flex; flex-direction: column; gap: clamp(10px, 1.4cqi, 22px); }
.st-q .kicker { margin: 0; font-size: clamp(13px, 1.1cqi, 18px); }
.st-n { color: var(--muted); }
.st-setup { margin: 0; font-family: var(--serif); font-size: clamp(18px, 2cqi, 34px); line-height: 1.35; color: var(--muted); }
.st-h { margin: 0; font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 3.5cqi, 62px); line-height: 1.1; letter-spacing: -0.015em; }
.st-tip { margin: auto 0 0; font-family: var(--mono); font-size: clamp(13px, 1.1cqi, 18px); color: var(--muted); }
.st-a { border-top: 2px solid var(--ink); padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.st-a .lab { margin: 0; text-transform: uppercase; letter-spacing: 0.06em; font-size: clamp(12px, 1cqi, 16px); }
.st-cover { display: none; }
.st-fig { margin: 0; font-family: var(--serif); font-weight: 800; font-size: clamp(48px, 8cqi, 140px); line-height: 1; letter-spacing: -0.02em; }
.st-say { margin: 0; font-size: clamp(16px, 1.6cqi, 28px); line-height: 1.45; max-width: 46ch; }
#main .st-src { max-width: none; }  /* beats the site-wide #main p measure */
.st-src { grid-column: 1 / -1; margin: 0; padding: 10px 0 14px; border-top: 1px solid var(--rule); font-size: clamp(12px, 1cqi, 16px); color: var(--muted); }

.st-chart { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--mono); font-size: 13px; }
.st-chart text { fill: var(--muted); }
.st-chart .g { stroke: var(--rule); }
.st-chart .l { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.st-chart .d { fill: var(--red); }
.st-chart .t { stroke: var(--red); stroke-width: 2; stroke-dasharray: 7 5; }
.st-chart .tl { fill: var(--red); }
.st-bars { display: grid; grid-template-columns: max-content minmax(60px, 1fr) max-content; gap: 8px 14px; align-items: center; font-size: clamp(14px, 1.3cqi, 22px); }
.st-bar { display: block; height: clamp(14px, 1.6cqi, 26px); background: var(--track); }
.st-bar span { display: block; height: 100%; background: var(--green); }
.st-v { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }

.stage-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px clamp(16px, 3cqi, 48px) 16px; border-top: 1px solid var(--rule); }
.stage-ctl[hidden] { display: none; }
.stage-ctl button { min-height: 48px; }
.stage-ctl button.alt { background: var(--card); color: var(--ink); border: 1px solid var(--ink); }
.stage-ctl button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.stage-ctl select { min-height: 48px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 0; background: var(--card); color: var(--ink); font: inherit; }
.stage-sp { flex: 1; }

/* With JavaScript: one starter at a time, the answer behind a question mark until revealed */
.js .stage .st { display: none; }
.js .stage .st.on { display: grid; }
.js .stage .st + .st { border-top: 0; margin-top: 0; }
.js .st-ans { display: none; }
.js .st-cover { display: flex; flex: 1; min-height: clamp(160px, 22cqi, 380px); align-items: center; justify-content: center; border: 2px dashed var(--hatch); font-family: var(--serif); font-weight: 800; font-size: clamp(64px, 9cqi, 160px); color: var(--hatch); }
.js .st.shown .st-ans { display: flex; flex-direction: column; gap: 14px; animation: st-in .3s var(--ease-out, ease-out); }
.js .st.shown .st-cover { display: none; }
@keyframes st-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .st.shown .st-ans { animation: none; } }

/* Full screen: the stage fills the projector, and the page around it is hidden by the browser */
.stage:fullscreen { margin: 0; border: 0; width: 100vw; height: 100vh; overflow: auto; }
.stage:fullscreen .stage-body { display: flex; flex-direction: column; }
.stage:fullscreen .st.on { flex: 1; }

.st-list { padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.st-list .lab { display: inline-block; min-width: 9em; text-transform: uppercase; letter-spacing: 0.06em; }

@container (max-width: 700px) {
  .st { grid-template-columns: minmax(0, 1fr); }
  .st-tip { margin-top: 0; }
  .st-bars { grid-template-columns: minmax(0, 1fr) max-content; gap: 4px 12px; }
  .st-bars > span:nth-child(3n+1) { grid-column: 1 / -1; margin-top: 6px; }
}
@container (max-width: 560px) {
  .stage-sp { display: none; }
  .stage-ctl > button, .stage-ctl > select { flex: 1 1 40%; justify-content: center; }
}
@media print {
  .stage { border: 0; }
  .stage-bar, .stage-ctl { display: none; }
  .js .stage .st { display: grid; break-inside: avoid; }
  .js .st-ans { display: flex; flex-direction: column; }
  .js .st-cover { display: none; }
}
