/* Backstage, student pages. Black line and flat colour, like tape on a stage floor.
   Red, orange and yellow mean one thing only: on stage, wing, corridor. */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
:root {
  --bg: #fff; --ink: #111; --dim: #5c5c5c; --hair: #d4d4d4; --soft: #f1f1f1;
  --blue: #0b57d0; --red: #e0202a; --red-deep: #8f0f16; --orange: #f47b0a; --yellow: #f6c900;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --pad: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0f0f; --ink: #f3f3f3; --dim: #a6a6a6; --hair: #383838; --soft: #1d1d1d; }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--yellow); color: #111; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
time, .line time, em { font-variant-numeric: tabular-nums; }
#app { max-width: 620px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; }
html { overflow-x: clip; }

header { padding: max(14px, env(safe-area-inset-top)) var(--pad) 12px; display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--ink); }
header img { height: 46px; width: auto; flex: none; }
@media (prefers-color-scheme: dark) { header img { filter: invert(1); } }
header h1 { margin: 0; font: 700 28px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
header .off { margin-left: auto; font: 600 15px var(--display); text-transform: uppercase; color: var(--dim); }
main { flex: 1; padding: 0 var(--pad) calc(110px + env(safe-area-inset-bottom)); }
.empty { color: var(--dim); margin: 56px 0; text-align: center; }
.empty.big { margin-top: 40vh; }
h2 { font: 700 20px var(--display); text-transform: uppercase; margin: 30px 0 4px; }

/* urgent announcement */
.alert { display: flex; align-items: flex-start; gap: 12px; width: calc(100% + var(--pad) * 2); margin: 0 calc(var(--pad) * -1); padding: 12px var(--pad) 13px; background: var(--blue); color: #fff; }
.alert svg { flex: none; width: 30px; height: 30px; margin-top: 1px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.alert svg .dot { fill: #fff; stroke: none; }
.alert > span { display: block; min-width: 0; }
.alert b { display: block; font: 700 17px/1.15 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.alert span span { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }

/* concert call: three flat bars */
.call { margin: 0 calc(var(--pad) * -1); }
.call button { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 12px; width: 100%; padding: 10px var(--pad); color: #111; }
.call span { font: 600 16px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.call b { font: 700 32px/1 var(--display); text-wrap: balance; }
.call .stage { background: var(--red); color: #fff; animation: pulse 1.1s ease-in-out infinite; }
.call .next { background: var(--orange); }
.call .wait { background: var(--yellow); }
@keyframes pulse { 50% { background: var(--red-deep); } }
.late { margin: 0 calc(var(--pad) * -1); padding: 9px var(--pad); border-bottom: 2px solid var(--ink); font: 700 20px var(--display); text-transform: uppercase; }

/* timeline */
.line { list-style: none; margin: 0; padding: 14px 0 0; position: relative; --rail: 78px; }
.line::before { content: ""; position: absolute; left: var(--rail); top: 0; bottom: 0; width: 2px; background: var(--ink); }
.line li { position: relative; display: grid; grid-template-columns: 66px 1fr auto; column-gap: 28px; align-items: start; padding: 9px 0 13px; }
.line li::before { content: ""; position: absolute; left: calc(var(--rail) - 7px); top: 13px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.line li.act::before { background: var(--ink); }
.line time { text-align: right; font: 700 21px/1.25 var(--display); white-space: nowrap; }
.line time span { display: block; font: 600 15px/1.2 var(--display); color: var(--dim); }
.line div { min-width: 0; }
.line b { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.line div span { display: block; color: var(--dim); font-size: 15px; }
.line .where { color: var(--dim); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding: 2px 0; }
.line em { font: 700 15px/1 var(--display); font-style: normal; text-transform: uppercase; letter-spacing: .03em; padding: 5px 7px 4px; white-space: nowrap; color: var(--dim); margin-top: 1px; }
.line li.past > * { opacity: .38; }
.line em.on, .line em.stage { background: var(--red); color: #fff; animation: pulse 1.1s ease-in-out infinite; }
.line em.next { background: var(--orange); color: #111; }
.line em.wait { background: var(--yellow); color: #111; }
.line li.now::before, .line li.stage::before { background: var(--red); border-color: var(--red); animation: dot 1.1s ease-in-out infinite; }
.line li.next::before { background: var(--orange); border-color: var(--orange); }
.line li.wait::before { background: var(--yellow); border-color: var(--yellow); }
@keyframes dot { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 30%, transparent); } }

/* map */
.levels { display: flex; gap: 8px; padding: 12px 0; }
.levels button, .zoom button { font-size: 15px; font-weight: 500; line-height: 1; padding: 9px 16px; border: 1.5px solid transparent; border-radius: 99px; }
.levels button.on { font-weight: 600; }
.levels button.on { border-color: var(--ink); }
.mapbox { overflow: auto; border: 2px solid var(--ink); background: #fff; margin-top: 12px; }
h2 + .mapbox { margin-top: 6px; }
main.map h2:first-child { margin-top: 16px; }
[hidden] { display: none !important; }
.levels + .mapbox { margin-top: 0; }
.mapin { position: relative; }
.mapin img { display: block; width: 100%; }
.pin { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; padding: 3px 7px; background: #111; color: #fff; font: 700 14px/1.15 var(--display); text-transform: uppercase; white-space: nowrap; }
.pin span { font-weight: 600; text-transform: none; }
.pin.on { outline: 3px solid #fff; z-index: 2; }
.pin.stage { background: var(--red); animation: pulse 1.1s ease-in-out infinite; }
.pin.next { background: var(--orange); color: #111; }
.pin.wait { background: var(--yellow); color: #111; }
.zoom { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.zoom button { border-color: var(--ink); width: 46px; text-align: center; font-size: 20px; padding: 7px 0 9px; }
.zoom button:disabled { opacity: .3; }
.rooms { list-style: none; margin: 14px 0 0; padding: 0; }
.rooms button { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; width: 100%; padding: 10px 0; border-top: 1px solid var(--hair); }
.rooms li:first-child button { border-top: 0; }
.rooms b { font: 700 19px/1.2 var(--display); text-transform: uppercase; }
.rooms i { font: 600 15px var(--display); font-style: normal; text-transform: uppercase; color: var(--dim); grid-row: 1; grid-column: 2; }
.rooms span { grid-column: 1 / -1; color: var(--dim); font-size: 15px; }
.rooms button.on { background: var(--soft); margin: 0 calc(var(--pad) * -1); padding: 10px var(--pad); width: calc(100% + var(--pad) * 2); }
.rooms button.stage b::before, .rooms button.next b::before, .rooms button.wait b::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 8px; }
.rooms button.stage b::before { background: var(--red); animation: pulse 1.1s ease-in-out infinite; }
.rooms button.next b::before { background: var(--orange); }
.rooms button.wait b::before { background: var(--yellow); }
.rooms button.stage span, .rooms button.next span, .rooms button.wait span { color: var(--ink); font-weight: 600; }

/* news, questions */
article { padding: 14px 0; border-top: 1px solid var(--hair); }
main > article:first-child, h2 + article { border-top: 0; }
article time { display: block; font: 600 15px var(--display); text-transform: uppercase; color: var(--dim); }
article time span { margin-left: 10px; }
article p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 65ch; }
article.urgent p { font-weight: 700; }
article.new time::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--ink); margin-right: 7px; }
article .q { font-weight: 600; }

/* ask: a feed of contained posts, an Ask question button, and a compose sheet */
.asktop { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; width: calc(100% + var(--pad) * 2); margin: 0 calc(var(--pad) * -1); padding: 12px var(--pad); border-bottom: 1px solid var(--hair); }
.asktop span { color: var(--dim); font-size: 19px; }
.asktop b { background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 700; line-height: 1; padding: 10px 16px; border-radius: 99px; }
.thread { margin: 0 calc(var(--pad) * -1); }
.post { padding: 16px var(--pad) 16px; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; }
.thread .post, main > article.post:first-child { border-top: 0; }
.thread > .empty { margin: 56px var(--pad); }
.post .reply { margin: 10px 0 0 2px; padding-left: 14px; border-left: 1px solid var(--ink); }
.post .by { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.post .by b { font-weight: 700; }
.post .by span, .post .by time { display: inline; font: inherit; font-size: 14px; text-transform: none; color: var(--dim); }
.post p { margin: 1px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 60ch; }
.send { background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 700; line-height: 1; padding: 10px 20px; border-radius: 99px; }
.send:disabled { opacity: .3; }
dialog.sheet { width: min(92vw, 480px); margin: 14vh auto auto; border: 0; border-radius: 18px; padding: 12px 16px 16px; background: var(--bg); color: var(--ink); box-shadow: 0 18px 50px rgba(0, 0, 0, .3); animation: pop .2s cubic-bezier(.16, 1, .3, 1); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .45); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.sheet .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet .cancel { font-size: 16px; padding: 8px 0; }
.sheet .who, .sheet textarea { display: block; width: 100%; background: none; border: 0; outline: 0; padding: 0; caret-color: var(--red); }
.sheet .who { font-weight: 700; padding: 8px 0 4px; }
.sheet textarea { font-size: 20px; line-height: 1.35; resize: none; padding-top: 2px; }
.sheet ::placeholder { color: var(--dim); opacity: 1; }

/* bottom menu: four equal buttons, icon over a small label; the selected icon sits in an outlined pill */
nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bg); border-top: 1px solid var(--hair); padding: 7px max(4px, calc((100vw - 620px) / 2)) max(10px, calc(4px + env(safe-area-inset-bottom))); }
nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--dim); font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
nav .ic { display: grid; place-items: center; width: 58px; height: 30px; border: 1.5px solid transparent; border-radius: 99px; }
nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav button.on { color: var(--ink); font-weight: 700; }
nav button.on .ic { background: var(--ink); border-color: var(--ink); color: var(--bg); }
nav i { position: absolute; top: -3px; left: calc(50% + 12px); font-style: normal; font-weight: 700; font-size: 11px; line-height: 1; min-width: 17px; text-align: center; background: var(--red); color: #fff; border-radius: 99px; padding: 3px 5px; }
/* moving between pages: a short fade and slide from the side the page sits on */
main.enter { animation: enter .22s cubic-bezier(.16, 1, .3, 1); }
@keyframes enter { from { opacity: 0; transform: translateX(var(--from, 0)); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 2.2s !important; } main.enter { animation: none; } }
