/* The schools hero scroll (js/schools-tour.js; captain, 2026-11-25, storyboard signed off 2026-11-24 11:43 PM PT):
   twelve beats on one pinned stage that the scroll drives, like the home tour, drawn flat in theme tokens. A browser
   with no IntersectionObserver gets .is-flat: the beats one after another. Its height is there from the first paint. */
.sc-head { padding-block: 48px 8px; display: flex; flex-direction: column; gap: 10px; }
.sc-head > p { max-width: 40em; font-size: 18px; line-height: 1.5; color: var(--text-soft); margin: 0; }
.sc-who { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sc-who a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.sc-who a:hover { border-color: var(--accent); }
.sc-who a:focus-visible, .sc a:focus-visible, .sc button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

#sc-track { --n: 12; position: relative; height: calc(100svh + (var(--n) - 1) * 72svh); }
#sc-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; touch-action: pan-y pinch-zoom; }
.sc-beat { position: absolute; inset: 0; width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.sc-beat:first-of-type { opacity: 1; visibility: visible; }
.sc-cap h2 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; text-wrap: balance; }
.sc-cap p { margin: 12px 0 0; max-width: 30em; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.45; color: var(--text-soft); text-wrap: pretty; }
.sc-cap .sc-brow { margin: 0 0 8px; font-weight: 700; font-size: 15px; color: var(--accent); }
.sc-cap .sc-small { font-size: 14px; color: var(--text-muted); }
.sc-go { margin-top: 18px; }

/* The pictures: flat, in the theme's colours. Sizes are in em, so one font size scales a whole picture. */
.sc-art { font-size: 15px; display: flex; flex-direction: column; gap: .8em; width: min(100%, 30em); justify-self: center; user-select: none; -webkit-user-select: none; }
.sc-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: .8em .9em; display: flex; flex-direction: column; gap: .55em; font-size: .9em; color: var(--text); }
.sc-bar { display: flex; justify-content: space-between; gap: .6em; font-family: var(--font-mono); font-size: .78em; color: var(--text-muted); }
.sc-row { display: flex; justify-content: space-between; align-items: center; gap: .6em; flex-wrap: wrap; }
.sc-row.sc-left { justify-content: flex-start; }
.sc-card.sc-row { flex-direction: row; }
.sc-soft { color: var(--text-muted); font-size: .85em; }
.sc-ok { color: var(--teal); }
.sc-btn { background: var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: var(--r-xs); padding: .3em .7em; font-size: .85em; white-space: nowrap; }
.sc-btn.bad { background: var(--danger); color: var(--bg); }
.sc-pill { font-family: var(--font-mono); font-size: .75em; border-radius: 999px; padding: .2em .65em; background: var(--surface-3); color: var(--text-soft); white-space: nowrap; }
.sc-pill.ok { color: var(--teal); } .sc-pill.warn { color: var(--gold); } .sc-pill.bad { color: var(--danger); }
.sc-pill.off { text-decoration: line-through; color: var(--text-muted); }
.sc-case { display: grid; grid-template-columns: repeat(10, 1fr); gap: .3em; padding: .6em; border-radius: var(--r-md); background: var(--surface-2); border: 2px solid var(--line-strong); }
.sc-case .c { aspect-ratio: 1 / 1.35; border-radius: .2em; background: var(--surface-3); border-bottom: .18em solid var(--teal); }
.sc-case .c.lit { background: color-mix(in srgb, var(--accent) 28%, var(--surface-3)); border-bottom-color: var(--accent); }
.sc-case .c.spare { border-bottom-color: var(--gold); }
.sc-case .c.miss { background: none; border: .1em dashed var(--danger); border-bottom: .18em solid var(--danger); }
.sc-legend { display: flex; flex-wrap: wrap; gap: .9em; font-family: var(--font-mono); font-size: .72em; color: var(--text-muted); }
.sc-legend i { display: inline-block; width: .8em; height: .8em; border-radius: .2em; margin-right: .35em; vertical-align: -.05em; background: var(--teal); }
.sc-legend i.bad { background: var(--danger); } .sc-legend i.warn { background: var(--gold); }
.sc-cart { height: 4.5em; border: 2px solid var(--line-strong); border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text-muted); font-family: var(--font-mono); font-size: .8em; }
.sc-bag { position: relative; width: 42%; height: 3.6em; border: 2px solid var(--accent); border-radius: .6em; margin-top: .5em; }
.sc-bag i { position: absolute; top: -.6em; left: 30%; width: 40%; height: .5em; border: 2px solid var(--accent); border-bottom: 0; border-radius: .3em .3em 0 0; }
.sc-bag b { position: absolute; bottom: -.5em; right: .4em; width: .6em; height: .6em; border-radius: 50%; background: var(--accent); }
.sc-move { justify-content: center; }
.sc-arrow { color: var(--accent); font-weight: 700; }
.sc-tog { width: 2.4em; height: 1.35em; border-radius: 999px; background: var(--surface-3); position: relative; }
.sc-tog::after { content: ""; position: absolute; top: .18em; left: .18em; width: 1em; height: 1em; border-radius: 50%; background: var(--text-muted); }
.sc-tog.on { background: var(--accent); }
.sc-tog.on::after { left: auto; right: .18em; background: var(--accent-ink); }
.sc-lcd { background: var(--lcd); border-radius: var(--r-sm); overflow: hidden; }
.sc-shot { display: block; width: 100%; height: auto; aspect-ratio: 134 / 70; fill: none; stroke: var(--lcd-ink); }
.sc-app { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: var(--r-sm); background: var(--lcd); }
.sc-code { margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6em .7em; font-family: var(--font-mono); font-size: .85em; color: var(--text-soft); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.sc-code .k { color: var(--accent); } .sc-code .s { color: var(--teal); }
.sc-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
.sc-kpi div { background: var(--surface-2); border-radius: var(--r-xs); padding: .45em .6em; }
.sc-kpi b { display: block; font-family: var(--font-mono); font-size: 1.1em; font-variant-numeric: tabular-nums; }
.sc-kpi span { color: var(--text-muted); font-size: .72em; }
.sc-bars { display: flex; align-items: flex-end; gap: .3em; height: 3.6em; }
.sc-bars i { flex: 1; background: var(--accent); border-radius: .15em .15em 0 0; }
.sc-bars.down i { background: var(--gold); }
.sc-hid { color: var(--text-muted); font-family: var(--font-mono); font-size: .72em; border: 1px dashed var(--line-strong); border-radius: var(--r-xs); padding: .3em .5em; }
.sc-flow { display: flex; align-items: center; justify-content: space-between; gap: .3em; font-family: var(--font-mono); font-size: .8em; color: var(--text-soft); }
.sc-flow span { flex: 1; text-align: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-xs); padding: .35em .4em; }
.sc-flow em { color: var(--accent); font-style: normal; }
.sc-no { display: flex; flex-wrap: wrap; gap: .5em; }
.sc-no span { font-family: var(--font-mono); font-size: .8em; border: 1px solid var(--danger); color: var(--text-soft); border-radius: 999px; padding: .2em .7em; text-decoration: line-through; text-decoration-color: var(--danger); }
.sc-msg { align-self: flex-end; background: var(--surface-3); border-radius: .8em; padding: .45em .7em; }
.sc-msg.sc-link { color: var(--link); font-family: var(--font-mono); font-size: .85em; }

/* The rail, the cue and the foot, as on the home tour. */
#sc-rail { position: absolute; z-index: 4; right: max(8px, env(safe-area-inset-right, 0px)); top: 50%; height: min(62svh, 520px); width: 44px; transform: translateY(-50%); }
#sc-rail i { position: absolute; left: 20px; width: 4px; top: 0; height: 100%; border-radius: 4px; background: var(--line); }
#sc-rail i.done { background: var(--accent); transform-origin: top; transform: scaleY(0); }
#sc-rail b { position: absolute; left: 13px; top: 0; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); pointer-events: none; }
#sc-rail a { position: absolute; right: 0; width: 44px; height: 44px; margin-top: -22px; text-decoration: none; color: var(--text); font: 500 14px var(--font-ui); }
#sc-rail a::before { content: ""; position: absolute; left: 17px; top: 17px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; background: var(--bg); border: 2.5px solid var(--text-muted); }
#sc-rail a.past::before { border-color: var(--accent); background: var(--accent); }
#sc-rail span { position: absolute; right: 38px; top: 50%; translate: 0 -50%; white-space: nowrap; padding: 4px 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); opacity: 0; transition: opacity .2s; pointer-events: none; }
#sc-rail.busy a[aria-current] span, #sc-rail a:focus-visible span { opacity: 1; }
@media (hover: hover) and (min-width: 1200px) {
  #sc-rail { right: 20px; }
  #sc-rail span { opacity: .55; border-color: transparent; background: none; }
  #sc-rail a[aria-current] span { opacity: 1; font-weight: 800; }
  .sc-beat { padding-right: 150px; width: min(100% - 2 * var(--gutter), var(--content) + 150px); }
}
#sc-cue { position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; display: grid; justify-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border: 0; background: none; font: 800 17px var(--font-ui); color: var(--accent); cursor: pointer; white-space: nowrap; }
#sc-cue svg { animation: sc-bob 1.5s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes sc-bob { to { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { #sc-cue svg { animation: none; } #sc-rail span { transition: none; } }

/* A tablet held upright, and phones: the words above, the picture below. */
@media (max-width: 899px) {
  .sc-beat { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; align-content: start; gap: 18px; padding: 72px 40px 96px 0; }
  .sc-art { font-size: 13.5px; align-self: start; }
  .sc-go { height: 42px; margin-top: 12px; font-size: 15px; }
  #sc-cue { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  .sc-head { padding-top: 28px; }
  .sc-head > p { font-size: 16px; }
  .sc-who a { padding: 0 12px; font-size: 14px; }
  .sc-beat { padding-top: 64px; padding-right: 30px; }
  .sc-cap h2 { font-size: clamp(26px, 7.6vw, 34px); }
  .sc-cap p { font-size: 15px; margin-top: 8px; }
  .sc-cap .sc-brow { font-size: 13px; margin-bottom: 4px; }
  #sc-rail { right: 0; width: 34px; height: min(54svh, 420px); }
  #sc-rail i { left: 15px; } #sc-rail b { left: 8px; } #sc-rail a { width: 34px; } #sc-rail a::before { left: 12px; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .sc-beat { padding-top: 56px; gap: 12px; }
  .sc-art { font-size: 12px; }
  .sc-cap .sc-small { display: none; }
}
@media (max-width: 899px) and (max-height: 640px) {
  .sc-art { font-size: 10.5px; }
  .sc-cap .sc-brow { display: none; }
  .sc-cap p { font-size: 14px; }
}
/* A phone on its side, or a short window: words and picture side by side again. */
@media (max-height: 520px) and (min-width: 560px) {
  .sc-beat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; align-items: center; padding: 12px 48px 12px 0; gap: 20px; }
  .sc-cap h2 { font-size: 26px; } .sc-cap p { font-size: 14px; } .sc-art { font-size: 10.5px; }
  .sc-cap .sc-brow, .sc-cap .sc-small { display: none; }
  #sc-cue { bottom: 10px; }
}

/* No scroll engine: the beats one after another. */
.sc.is-flat #sc-track { height: auto; }
.sc.is-flat #sc-stage { position: static; height: auto; overflow: visible; padding-block: 16px 40px; }
.sc.is-flat .sc-beat { position: static; opacity: 1 !important; visibility: visible !important; transform: none !important; padding: 40px 0; height: auto; }
.sc.is-flat :is(#sc-cue, #sc-rail) { display: none; }
@media (min-width: 1200px) and (min-height: 700px) { .sc-art { font-size: 16.5px; } }
@media (max-width: 899px) and (max-height: 700px) { #s-workbench .sc-app { display: none; } }

/* One page, five audiences (captain, 2026-11-26): the address names the audience (#teachers, #principals, #districts,
   #it, #parents) and only that audience's slides show; with none, the twelve for everyone. CSS picks the slides from the
   first paint (:target), the script sets data-for too and puts them in the audience's order (js/schools-tour.js ORDERS). */
.sc-anchor { position: absolute; top: 0; left: 0; }
.sc:not([data-for]):not(:has(.sc-anchor:target:not(#all))) [data-for]:not([data-for~="all"]), .sc[data-for="all"] [data-for]:not([data-for~="all"]) { display: none; }
.sc[data-for="teachers"] [data-for]:not([data-for~="teachers"]), .sc:has(#teachers:target) [data-for]:not([data-for~="teachers"]) { display: none; }
.sc[data-for="teachers"] #sc-track, .sc:has(#teachers:target) #sc-track { --n: 10; }
.sc[data-for="principals"] [data-for]:not([data-for~="principals"]), .sc:has(#principals:target) [data-for]:not([data-for~="principals"]) { display: none; }
.sc[data-for="principals"] #sc-track, .sc:has(#principals:target) #sc-track { --n: 7; }
.sc[data-for="districts"] [data-for]:not([data-for~="districts"]), .sc:has(#districts:target) [data-for]:not([data-for~="districts"]) { display: none; }
.sc[data-for="districts"] #sc-track, .sc:has(#districts:target) #sc-track { --n: 9; }
.sc[data-for="it"] [data-for]:not([data-for~="it"]), .sc:has(#it:target) [data-for]:not([data-for~="it"]) { display: none; }
.sc[data-for="it"] #sc-track, .sc:has(#it:target) #sc-track { --n: 5; }
.sc[data-for="parents"] [data-for]:not([data-for~="parents"]), .sc:has(#parents:target) [data-for]:not([data-for~="parents"]) { display: none; }
.sc[data-for="parents"] #sc-track, .sc:has(#parents:target) #sc-track { --n: 7; }
.sc[data-for="parents"] .sc-teach, .sc:has(#parents:target) .sc-teach { display: none; }
.sc-who a[aria-current] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.sc-copied { display: block; margin-top: 8px; font-size: 14px; color: var(--teal); min-height: 1.4em; }
