/*
 * WRA house design (from wratech/onboarding-checklist). Primary green #005c34. Headings use
 * Sirenia from the Adobe Fonts kit (ADOBE_FONTS_KIT); body text is Hanken Grotesk, bundled.
 *
 * The voice waveform is the signature element: tall on the sign-in panel, the real shape of
 * each recording on the record and person pages and in the Find a name player bar.
 * Everything else stays quiet.
 */
@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/hanken-grotesk-vietnamese-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/hanken-grotesk-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/hanken-grotesk-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --brand: #005c34;
  --brand-strong: #00472a;
  --brand-deep: #003a22;
  --brand-soft: #e3efe7;
  --brand-line: #b5d3c1;
  --brand-text: #005c34;
  --mint: #9fe0bb;
  --brass: #b8892a;

  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-2: #eef2ec;
  --text: #0f2a1e;
  --muted: #56675d;
  --line: #d6e4da;
  --seg: #d6e4da;
  --success: #1a7f4b;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --on-brand: #ffffff;

  --font-display: 'sirenia', 'Sirenia', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk Variable', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --wrap-narrow: 760px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-text); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type: a 1.25 scale, 16 / 20 / 25 / 31 / 39 / 61 */
.display-xl {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.45rem, 7vw, 3.8rem); line-height: 1; letter-spacing: -0.02em;
  margin: 0 0 14px; text-wrap: balance;
}
.display {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.95rem, 4vw, 2.45rem); line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 4px;
}
.title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin: 0; }
.lead { font-size: 1.25rem; line-height: 1.45; margin: 0; max-width: 40ch; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 0.875rem; }

/* Top bar: light, sticky, slightly see-through, with the Reserve A Seat lockup */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.lockup { display: inline-flex; align-items: center; gap: 16px; min-width: 0; }
.lockup-logo { display: block; flex-shrink: 0; width: auto; height: 32px; }
.lockup-divider { flex-shrink: 0; width: 1.5px; height: 34px; background: color-mix(in srgb, var(--brand-text) 35%, transparent); }
.lockup-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lockup-school {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lockup-app { font-size: 0.85rem; opacity: 0.8; white-space: nowrap; }
.topbar .lockup-school { color: var(--brand-text); }
.topbar .lockup-app { color: var(--muted); opacity: 1; }
.signin-brand .lockup-logo { filter: brightness(0) invert(1); height: 40px; }
.signin-brand .lockup-divider { background: rgb(255 255 255 / 0.4); height: 42px; }
.signin-brand .lockup-school { font-size: 1.25rem; }
.signin-brand .lockup { display: flex; }   /* block-level, so a narrow screen ellipsizes the name */

.user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); flex-shrink: 0; }
.link-light {
  white-space: nowrap; background: none; border: 0; padding: 0; font: inherit;
  font-size: 0.875rem; color: var(--muted); cursor: pointer;
}
.link-light:hover { color: var(--text); text-decoration: underline; }

/* Slide-out menu (phones and tablets; see the 860px rules). Hidden pieces on desktop. */
.menu-btn, .drawer-head, .drawer-account, .nav-scrim { display: none; }
.menu-btn, .drawer-close {
  place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--brand-text); cursor: pointer;
}
.menu-btn:hover, .drawer-close:hover { background: var(--brand-soft); }
.menu-btn svg, .drawer-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Search: in the top bar on every page, and big at the top of Find a name */
.search-form { flex: 1; max-width: 460px; position: relative; display: flex; align-items: center; }
.search-form svg {
  position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}
.search {
  font: inherit; width: 100%; padding: 9px 40px 9px 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
.search:focus { border-color: var(--brand-line); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.search-form kbd {
  position: absolute; right: 12px; font: 600 0.75rem var(--font-body); color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--surface);
}

/* The search's drop-down of matching people (suggest.js), under the box on every other page */
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  margin: 0; padding: 6px; list-style: none; max-height: min(560px, 70vh); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgb(15 42 30 / 0.14);
}
.suggest-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px;
  color: inherit; text-decoration: none;
}
.suggest .avatar { width: 34px; height: 34px; font-size: 0.8rem; }
.suggest .person-text { flex: 1; }
.suggest .person-name, .suggest .person-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest [aria-selected=true] .suggest-item { background: var(--brand-soft); }
.suggest [aria-selected=true] .person-name { color: var(--brand-text); }
.suggest-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.suggest-all { justify-content: center; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px;
  font-size: 0.875rem; font-weight: 600; color: var(--brand-text); }
.suggest-empty { padding: 10px 12px; color: var(--muted); font-size: 0.9rem; }

/* Dev banner: brass, the house colour for "not normal" */
.devbanner { background: #f7ecd2; color: #533d08; border-bottom: 2px solid var(--brass); text-align: center; font-size: 0.875rem; padding: 6px 16px; }

/* Layout: a left-hand pill menu beside the page (the house Settings pattern) */
.layout {
  max-width: var(--wrap); margin: 0 auto; padding: 32px 16px 72px;
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start;
}
.sidenav { position: sticky; top: 96px; display: grid; gap: 2px; }
.sidenav-heading { margin: 16px 0 6px; padding: 0 12px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.sidenav-heading:first-child { margin-top: 0; }
.sidenav a {
  display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none;
  font-weight: 600; padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.sidenav a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidenav a:hover { color: var(--text); background: var(--surface-2); }
.sidenav a.active { color: var(--brand-text); background: var(--brand-soft); }
.main { min-width: 0; }
.plain { max-width: var(--wrap-narrow); margin: 0 auto; padding: 48px 16px 72px; }
.wrap-narrow { max-width: var(--wrap-narrow); }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pad { padding: 24px; }
.empty { text-align: center; padding: 56px 16px; }
.empty .muted { max-width: 46ch; margin: 8px auto 0; }

/* Buttons */
.button, button.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 650; font-size: 0.95rem; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand);
  cursor: pointer; text-decoration: none; transition: background 0.15s, transform 0.05s;
}
.button:hover { background: var(--brand-strong); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.55; cursor: default; }
.button.button-ghost { background: transparent; color: var(--brand-text); border-color: var(--brand-line); }
.button.button-ghost:hover { background: var(--brand-soft); }
.button.button-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.button.button-danger:hover { background: var(--danger-soft); }
.button.button-sm { padding: 6px 13px; font-size: 0.85rem; }
.button-lg { padding: 14px 24px; font-size: 1rem; }
.button svg { width: 18px; height: 18px; flex: none; }

/* Play: a round brand button. While playing, it shows stop. */
.play {
  display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: var(--brand); color: var(--on-brand); cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.play:hover { background: var(--brand-strong); }
.play svg { width: 16px; height: 16px; fill: currentColor; }
.play .i-stop { display: none; }
.play.playing .i-play { display: none; }
.play.playing .i-stop { display: block; }
.play-lg { width: 56px; height: 56px; }
.play-lg svg { width: 20px; height: 20px; }
.play-quiet { background: var(--brand-soft); color: var(--brand-text); }
.play-quiet:hover { background: var(--brand-line); }
@media (prefers-reduced-motion: no-preference) { .play:active { transform: scale(0.92); } }

/* Notices, chips, avatars */
.notice { margin: 0 0 20px; padding: 12px 16px; overflow-wrap: anywhere; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--text); }
.notice-success { color: var(--brand-text); font-weight: 600; }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-warn { background: #f7ecd2; color: #533d08; font-size: 0.9rem; font-weight: 600; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 650;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.chip-neutral { background: var(--surface-2); color: var(--muted); }
.chip-brand { background: var(--brand-soft); color: var(--brand-text); }
.chip-success { background: var(--brand-soft); color: var(--success); }
.chip-brass { background: #f7ecd2; color: #533d08; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-text);
  font-family: var(--font-display); font-weight: 800; font-size: 0.9rem; text-transform: uppercase;
}
.avatar-light { width: 32px; height: 32px; }
/* A synced Veracross picture fills the same circle; initials sit behind it while it loads. */
.avatar-photo { overflow: hidden; background: var(--surface-2); }
.avatar-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }

/* The waveform: the signature. Bars are <i> elements with --h from 0 to 1. */
.wave { display: flex; align-items: center; gap: 3px; height: 56px; min-width: 0; flex: 1; }
.wave i {
  flex: 1 1 0; min-width: 1px; height: calc(8% + var(--h, 0.1) * 92%);
  border-radius: 999px; background: var(--seg); transition: background 0.12s;
}
.wave.has-audio { cursor: pointer; }
.wave.has-audio i { background: var(--brand-line); }
.wave i.lit, .wave.has-audio i.lit { background: var(--brand); }
.wave.live i { background: var(--danger); transition: height 0.06s linear; }
.wave-lg { height: 140px; gap: 6px; }
.clip { display: flex; align-items: center; gap: 16px; }

/* Sign in: split screen, green panel on the left */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.signin-art {
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  padding: 40px clamp(24px, 5vw, 64px); background: var(--brand); color: var(--on-brand);
}
.signin-art .display-xl { font-size: clamp(2.45rem, 6vw, 4.8rem); max-width: 11ch; margin: 0; }
.signin-art .wave { max-width: 560px; flex: none; }
.signin-art .wave i { background: rgb(255 255 255 / 0.18); }
.signin-art .wave i.lit { background: var(--mint); }
.signin-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.signin-form { width: 100%; max-width: 380px; }
.signin-form .lead { font-size: 1.05rem; margin: 8px 0 28px; }
.signin-form .button { width: 100%; }
.fine { margin: 16px 0 0; font-size: 0.875rem; color: var(--muted); }

/* The one orchestrated moment: on the sign-in panel the waveform rises, left to right. */
@media (prefers-reduced-motion: no-preference) {
  .signin-art .wave i {
    animation: bar-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i) * 18ms + 150ms);
  }
}
@keyframes bar-rise { from { transform: scaleY(0.08); opacity: 0.3; } }

/* Record page: one box per clip */
.record-page { max-width: var(--wrap-narrow); }
.record-head { margin-bottom: 24px; }
.record-head .display { margin-bottom: 6px; }
.recorder .title { margin-bottom: 4px; }
.rec-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rec-actions .button { min-width: 140px; }
.rec-status { margin: 12px 0 0; }
.rec-alt { margin: 6px 0 0; }
.text-link {
  font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--brand-text); background: none;
  border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.text-link:hover { color: var(--text); }
.text-link.text-danger { color: var(--danger); }
.recorder .clip { margin: 20px 0 16px; padding: 16px; border-radius: var(--radius-sm); background: var(--bg); }
.rec-status { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.rec-status.on { color: var(--danger); }
.button.recording { background: var(--danger); border-color: var(--danger); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) { .button.recording .dot { animation: blink 1s infinite; } }
@keyframes blink { 50% { opacity: 0.3; } }
.recorder-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.upload-label { cursor: pointer; }
.upload-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-label:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }

/* Tables (inside panels) */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.85rem; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; }
/* Tables in a panel scroll inside it rather than pushing the page sideways on a phone. */
.table-scroll { overflow-x: auto; }
.cell-play { width: 64px; }
.person { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.person-name { display: block; font-weight: 650; color: var(--text); }
.person:hover .person-name { color: var(--brand-text); text-decoration: underline; }
.person-email { display: block; font-size: 0.875rem; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; text-decoration: none;
}
.filter:hover { color: var(--text); }
.filter.active { color: var(--brand-text); background: var(--brand-soft); border-color: var(--brand-line); }

/* Commencement */
.seniors { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.senior {
  counter-increment: s; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 18px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); outline: none;
}
.senior:last-child { border-bottom: 0; }
.senior::before {
  content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--brand-line); color: var(--brand-text);
  font-family: var(--font-display); font-weight: 800; font-size: 0.9rem;
}
.senior:focus-visible { background: var(--brand-soft); }
.senior.done::before { background: var(--brand); border-color: var(--brand); color: #fff; }
.senior.done .senior-name { color: var(--muted); }
.senior-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.15; }
.senior-goes-by { color: var(--brand-text); font-weight: 700; }
.senior.done .senior-goes-by { color: inherit; }
.senior-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.practiced { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.practiced input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }

/* Settings */
.setting {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.setting .title { margin: 0 0 4px; }
.setting p { margin: 0 0 10px; }
.setting p:last-child { margin-bottom: 0; }
.setting-wide { grid-template-columns: minmax(0, 1fr); }
.inline-fields { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: 16px; }
.field { display: grid; gap: 4px; }
.field-label { font-size: 0.85rem; font-weight: 650; color: var(--muted); }
.input {
  font: inherit; width: 100%; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
.input:focus { border-color: var(--brand-line); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input-year { width: 110px; }
.input-file { padding: 7px 10px; max-width: 320px; }
.setting .job-status { margin-top: 16px; font-weight: 600; }

/* An on/off switch around a real checkbox */
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex-shrink: 0; margin-top: 2px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--seg); transition: background 0.15s; }
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgb(15 42 30 / 0.25); transition: transform 0.15s;
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }

/* A person's page */
.back { margin: 0 0 16px; }
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 24px; }
.listen-clip { padding: 20px 24px; }
.listen-clip + .listen-clip { border-top: 1px solid var(--line); }
.listen-clip .field-label { display: block; margin-bottom: 10px; }

/* Test sign-in list (local dev only) */
.people { list-style: none; margin: 0; padding: 0; }
.people li + li { border-top: 1px solid var(--line); }
.people button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.people button:hover { background: var(--surface-2); }
.people .chip { margin-left: auto; }

/* Find a name: a list of people; a row opens into its own player */
.results-count { margin: 0 0 12px; }
.toolbar-sub { background: var(--bg); }
.roster { list-style: none; margin: 0; padding: 0; }
.roster-row { border-bottom: 1px solid var(--line); }
.roster-row:last-child { border-bottom: 0; }
.roster-line {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px 16px;
}
.roster-row:not(.open) .roster-line:hover { background: var(--surface-2); }
.roster-row.open { background: var(--bg); }
.person-toggle {
  width: 100%; min-width: 0; padding: 4px 0; border: 0; background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; border-radius: var(--radius-sm);
}
.person-toggle:hover .person-name, .roster-row.open .person-name { color: var(--brand-text); }
.person-text { min-width: 0; }
.roster .person-name, .roster .person-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-none { background: var(--surface-2); color: var(--muted); cursor: default; }
.play-none:hover { background: var(--surface-2); }
.play-none svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.roster-detail { display: grid; gap: 14px; padding: 4px 16px 18px 72px; }
.detail-clip .field-label { display: block; margin-bottom: 8px; }
.detail-clip .clip { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.detail-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.slower {
  font: inherit; font-size: 0.85rem; font-weight: 650; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--brand-text); border: 1px solid var(--brand-line);
}
.slower:hover { background: var(--brand-soft); }
.slower[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); }
.show-more-wrap { display: flex; justify-content: center; padding: 16px; border-top: 1px solid var(--line); }
.show-more[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
  html.js .sidenav { transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
  html.js .nav-scrim { transition: opacity 0.2s; }
}

/* Admin */
.actions-stack { flex-direction: column; align-items: stretch; }
.check { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.check-title { font-size: 1rem; font-weight: 650; margin: 0 0 2px; }
.dev-admin { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-weight: 600; }
.dev-admin input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }

/* Small screens */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 20px; }
  /* Without JavaScript: the menu is a row of pills under the top bar. */
  html:not(.js) .sidenav {
    position: static; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    padding-bottom: 16px; border-bottom: 1px solid var(--line);
  }
  html:not(.js) .sidenav-heading, html:not(.js) .sidenav a svg { display: none; }
  html:not(.js) .sidenav a { padding: 6px 14px; }
  /* With JavaScript: the menu button opens the menu as a panel from the left. */
  html.js .menu-btn { display: grid; }
  html.js .sidenav {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(320px, 88vw);
    display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overscroll-behavior: contain;
    padding: max(14px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
    background: var(--surface); border-right: 1px solid var(--line);
    box-shadow: 8px 0 32px rgb(15 42 30 / 0.14);
    transform: translateX(calc(-100% - 48px));           /* the shadow is off screen too */
  }
  html.js body.nav-open .sidenav { transform: none; }    /* closed = inert (shell.js) */
  html.js .drawer-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 2px 4px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
  }
  html.js .drawer-close { display: grid; }
  .drawer-head .lockup { gap: 7px; min-width: 0; }
  .drawer-head .lockup-logo { height: 20px; }
  .drawer-head .lockup-divider { height: 26px; }
  .drawer-head .lockup-school { font-size: 0.8rem; color: var(--brand-text); }
  .drawer-head .lockup-app { font-size: 0.72rem; color: var(--muted); opacity: 1; }   /* as on desktop */
  .drawer-close { width: 34px; height: 34px; }
  html.js .sidenav a { padding: 12px 14px; font-size: 1.05rem; }
  html.js .sidenav-heading { margin-top: 18px; }
  html.js .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 35; background: rgb(15 42 30 / 0.38);
    opacity: 0; pointer-events: none;
  }
  html.js body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  html.js body.nav-open { overflow: hidden; }
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-art { gap: 32px; }
  .wave-lg { height: 96px; gap: 4px; }
}
@media (max-width: 600px) {
  /* Top bar on phones: row 1 is the menu button and the full lockup, row 2 the search. */
  .search-form kbd { display: none; }
  html.js .user { display: none; }                       /* your account is in the menu */
  html.js .drawer-account {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center;
    margin-top: auto; padding: 16px 4px 0; border-top: 1px solid var(--line);
  }
  .drawer-account .person-email { overflow-wrap: anywhere; }
  .drawer-account form { grid-column: 1 / -1; margin-top: 8px; }
  .drawer-account .button { width: 100%; }
  .topbar-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px 12px; }
  .topbar .brand { flex: 1 1 0; }
  .topbar .lockup { gap: 8px; }
  .topbar .lockup-logo { height: 26px; }
  .topbar .lockup-divider { height: 30px; }
  .topbar .lockup-school { font-size: 0.9rem; }
  .menu-btn { width: 36px; height: 36px; }
  /* "Reserve Your Voice" keeps the desktop look (regular weight, muted), at the desktop size. */
  .search-form { order: 3; flex: 1 1 100%; max-width: none; }
  .search-form svg { left: 12px; }
  .search { padding-left: 36px; padding-right: 12px; }
  .rec-actions .button { flex: 1 1 0; }
  .pad, .setting { padding: 18px; }
  .setting { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .senior { grid-template-columns: auto minmax(0, 1fr) auto; padding: 16px; gap: 12px; }
  .senior .practiced { grid-column: 2 / -1; }
  .senior-name { font-size: 1.25rem; }
  .table .hide-sm { display: none; }
  .table td, .table th { padding-left: 8px; padding-right: 8px; }
  .wave { gap: 2px; }
  .keys-hint { display: none; }
  .clip { gap: 12px; }
  .listen-clip, .recorder .clip { padding: 16px; }
  .hide-sm { display: none; }
  .signin-brand .lockup { gap: 12px; }
  .signin-brand .lockup-logo { height: 32px; }
  .signin-brand .lockup-divider { height: 34px; }
  .signin-brand .lockup-school { font-size: 1.05rem; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .toolbar .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .toolbar .filters::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; }
  .push { margin-left: 0; }
  .roster-line { padding: 10px 12px; gap: 12px; }
  .roster-play, .roster .play-none { width: 44px; height: 44px; }
  .roster-status { display: none; }
  .roster .avatar { width: 34px; height: 34px; font-size: 0.8rem; }
  .roster-detail { padding: 2px 12px 16px; }
  .detail-clip .clip { padding: 10px 12px; }
}
/* The narrowest phones (320-360px): a smaller lockup so "Western Reserve Academy" fits whole. */
@media (max-width: 360px) {
  .topbar-inner { gap: 10px 8px; padding-left: 12px; padding-right: 12px; }
  .topbar .lockup { gap: 8px; }
  .topbar .lockup { gap: 7px; }
  .topbar .lockup-logo { height: 21px; }
  .topbar .lockup-divider { height: 26px; }
  .topbar .lockup-school { font-size: 0.76rem; }
  .topbar .lockup-app { font-size: 0.72rem; }
  .menu-btn { width: 34px; height: 34px; }
  html.js .sidenav { width: min(320px, 94vw); }
  .drawer-head .lockup-school { font-size: 0.72rem; }
  .drawer-head .lockup-app { font-size: 0.68rem; }
}
@media print {
  .topbar, .sidenav, .devbanner, .noprint { display: none !important; }
  .layout { display: block; padding: 0; }
  body, .panel { background: #fff; }
  .senior { break-inside: avoid; }
  .senior.done .senior-name { color: inherit; }
}

/* Small spacing helpers (no inline styles: the CSP blocks them) */
.chips-tight { margin-top: 6px; }
.push { margin-left: auto; }
.keys-hint { margin: -16px 0 20px; }
.spaced { margin-top: 12px; }
.empty-action { margin-top: 20px; }
