/* BellBench's quieter Pop Quiz skin. The other classroom tools use their own styles. */
:root {
  --ink: #171331;
  --line: #d5d2dc;
  --shadow: 0 10px 28px rgba(0, 0, 0, .16);
  --tight-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

*, *::before, *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

body { background: #0b0b0d; }
.stage-shell { padding: clamp(12px, 2vw, 24px); }
.stage-shell > main { width: min(100%, 1440px); margin-inline: auto; }

.topbar {
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #f6f5f7;
  backdrop-filter: none;
}
.app-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { min-width: 0; text-decoration: none; }
.brand-mark strong { font-size: clamp(1.4rem, 2vw, 2rem); line-height: 1.05; }
.brand-mark small { margin: 0 0 3px; font-size: .7rem; font-weight: 750; letter-spacing: .06em; }
.brand-burst { display: none; }
.main-nav { align-items: center; }
.main-nav form { display: flex; }

.tool-menu { position: relative; flex: 0 0 auto; z-index: 20; }
.tool-menu-button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.tool-menu-button span { width: 22px; height: 2px; border-radius: 2px; background: var(--ink); }
.tool-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 6px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.tool-menu-list[hidden] { display: none !important; }
.tool-menu-list a {
  display: block;
  padding: 12px;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.tool-menu-list a:hover,
.tool-menu-list a:focus-visible,
.tool-menu-list a[aria-current="page"] { background: #eee9ff; }

.nav-btn, .mode-pill, .ghost-action, .small-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 750;
  text-decoration: none;
  transform: none !important;
}
.nav-btn, .mode-pill, .ghost-action, .small-action {
  border: 2px solid var(--line);
  background: #fff;
}
.nav-btn:hover, .ghost-action:hover, .small-action:hover { border-color: var(--purple); background: #f2effb; }
.primary-action { background: var(--ink); }
.primary-action:hover { background: #312a58; }
.primary-action:disabled { opacity: .45; cursor: not-allowed; }
.danger, .ghost-action.danger, .nav-btn.danger, .primary-action.danger {
  color: #9b2431;
  background: #fff;
  border: 2px solid #e7bdc2;
}
.danger:hover { background: #fff1f2; }

.hero-copy, .session-card, .panel, .join-card, .name-card, .student-quiz {
  border: 2px solid #d5d2dc;
  border-radius: 14px;
  background: #f6f5f7;
  box-shadow: var(--shadow);
}
.hero-grid { min-height: 0; }
.landing-shell { max-width: 980px !important; margin-top: clamp(28px, 8vh, 90px) !important; }
.welcome-page, .dashboard-page { display: grid; gap: 18px; max-width: 1200px !important; margin: 24px auto 48px; }
.welcome-hero h1, .dashboard-intro h1 { margin: 8px 0 12px; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1.05; }
.welcome-hero .lede { max-width: 800px; }
.welcome-hero .form-note { margin: 18px 0 0; }
.welcome-tools, .dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.welcome-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; }
.welcome-footer h2 { margin: 6px 0; }
.welcome-footer p { margin: 0 0 12px; }
.welcome-copyright { margin-top: 32px !important; color: #555063; font-size: .9rem; }
.welcome-contact-form { display: grid; gap: 8px; }
.welcome-contact-form input, .welcome-contact-form textarea { width: 100%; }
.welcome-contact-form textarea { resize: vertical; }
.welcome-contact-form .primary-action { justify-self: start; margin-top: 6px; }
.contact-result { padding: 10px 12px; border: 2px solid #187b4a; border-radius: 10px; background: #e5f4eb; font-weight: 700; }
.contact-result.contact-error { border-color: #9b2431; background: #fce9e9; }
.contact-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.site-legal-footer { color: #eeeaf5; text-align: center; line-height: 1.6; }
.site-legal-footer a { color: inherit; }
.legal-page { width: min(100%, 920px) !important; margin: 24px auto 48px; }
.legal-page .panel { padding: clamp(22px, 4vw, 48px); }
.legal-page h1 { margin: 6px 0 8px; font-size: clamp(2rem, 5vw, 3.2rem); }
.legal-page h2 { margin: 28px 0 8px; font-size: 1.3rem; }
.legal-page p, .legal-page li { max-width: 75ch; line-height: 1.6; }
.legal-page ul { padding-left: 1.3em; }
.legal-page .site-legal-footer { margin-top: 18px; }
@media (max-width: 700px) { .welcome-footer { grid-template-columns: 1fr; } }
.welcome-tool { display: flex; flex-direction: column; gap: 8px; min-height: 190px; color: var(--ink); text-decoration: none; }
.welcome-tool-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.welcome-account-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #b8afd1; border-radius: 999px; color: var(--ink); background: #eee9ff; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.welcome-account-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.welcome-tool h2 { margin: 0; font-size: 1.65rem; }
.welcome-tool p { margin: 0; line-height: 1.45; }
.welcome-link { margin-top: auto; font-weight: 800; }
.welcome-tool:hover, .welcome-tool:focus-visible { border-color: var(--purple); background: #f2effb; }
.dashboard-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dashboard-heading h2 { margin: 0; }
.dashboard-saved-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-saved-row > a { display: grid; gap: 4px; min-width: 0; color: var(--ink); text-decoration: none; }
.dashboard-saved-row form { flex: 0 0 auto; }
@media (max-width: 700px) { .welcome-tools, .dashboard-grid { grid-template-columns: 1fr; } .welcome-page, .dashboard-page { margin-top: 12px; } }
.hero-copy { padding: clamp(24px, 4vw, 48px); color: var(--ink); }
.hero-copy::after { display: none; }
.hero-copy h1, .student-shell h1, .projector-header h1, .reports-layout h1 {
  font-size: clamp(2.1rem, 4.5vw, 4rem);
  line-height: 1.12;
}
.eyebrow { font-weight: 750; letter-spacing: .06em; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; line-height: 1.5; }
.session-card { min-height: 0; gap: 16px; background: #f6f5f7; }
.session-code strong { font-size: clamp(2.3rem, 4vw, 3.5rem); line-height: 1.1; }
.panel { padding: clamp(18px, 2.5vw, 28px); }
.panel h2 { line-height: 1.15; }
.email-stack, .mini-table, .quiz-question-list { max-height: none; overflow: visible; }
.mini-row, .email-card, .report-row-card {
  border: 1px solid #dcd9e2;
  border-radius: 10px;
  background: #fff;
}
.email-card:hover:is(a) { border-color: var(--purple); background: #f2effb; }
.email-card span, .mini-row span { font-weight: 600; }

label { font-weight: 700; }
input, textarea, select, input[type="file"] {
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  font-weight: 550;
}
input:focus, textarea:focus, select:focus, input[type="file"]:focus-within {
  outline: 3px solid #a993ff;
  outline-offset: 1px;
  border-color: var(--purple);
  box-shadow: none;
}
input[type="file"]::file-selector-button { background: var(--ink); box-shadow: none; font-weight: 750; }
.form-note, .privacy-note, .student-state-help { font-weight: 550; line-height: 1.5; }
.privacy-note { border-left: 4px solid var(--purple); background: #eee9ff; }
.inline-link { background: #f2f1f4; border: 1px solid var(--line); }

.session-journey { gap: 8px; }
.session-journey li { min-height: 48px; border: 1px solid var(--line); background: #f6f5f7; }
.session-journey li.is-current { border: 2px solid var(--ink); box-shadow: none; }
.session-journey li.is-current > span,
.session-journey li.is-complete > span { background: var(--ink); }
.session-journey li strong { font-weight: 700; }

.answer-tile, .tile-red, .tile-blue, .tile-yellow, .tile-green {
  color: var(--ink);
  background: #fff;
  border: 2px solid #a9a5b4;
  border-radius: 12px;
  box-shadow: none;
  transform: none !important;
}
.answer-tile:hover:not(:disabled) { background: #f2effb; border-color: var(--purple); filter: none; }
.answer-tile:disabled { opacity: .68; filter: none; box-shadow: none; }
.answer-tile.selected, .answer-tile.selected:disabled {
  background: #eee9ff;
  border-color: var(--purple);
  outline: 2px solid var(--purple);
}
.answer-tile.correct, .answer-tile.correct-choice { border-color: #187b4a; outline: 2px solid #187b4a; }
.answer-tile span { font-weight: 600; opacity: .72; }
.answer-tile .choice-indicator { display: grid; border-color: var(--ink); background: #fff; box-shadow: none; }
.answer-tile.selected .choice-indicator-radio::after { display: block; background: var(--purple); }
.answer-tile.selected .choice-indicator-checkbox::after { display: block; color: var(--purple); }
.name-choice, .name-choice:nth-child(n) {
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: none;
  font-weight: 750;
}
.name-choice:hover { border-color: var(--purple); background: #f2effb; }
.student-status-row { font-weight: 750; }
.student-timer, .timer-chip { background: var(--ink); }
.student-submit-row { border: 1px solid var(--line); background: #f6f5f7; box-shadow: none; backdrop-filter: none; }
.student-submit-row .primary-action:disabled { box-shadow: none; }

.projector-view { background: #171331; box-shadow: var(--shadow); }
.projector-toolbar .primary-action { color: var(--ink); background: #fff; border: 2px solid #fff; }
.projector-toolbar .primary-action:hover { background: #eee9ff; border-color: #eee9ff; }
.projector-answer-grid .answer-tile:disabled { opacity: 1; }
.projector-answer-grid .answer-tile .answer-meta { display: none; }
.projector-stat { background: rgba(255, 255, 255, .08); }
.projector-stat.is-danger { background: #9b2431; }
.projector-stat.is-success { background: #176645; }
.projector-timer-progress-fill { background: #b9a9ff; }
.projector-stat.is-danger .projector-timer-progress-fill { background: #ffb9c0; }
.projector-join-code { color: #fff; }
.display-chip { background: #f6f5f7; font-weight: 750; }
.projector-question-copy p { line-height: 1.16; }
.bar-fill { background: #b9a9ff !important; }
.result-bar.is-correct .bar-fill { background: #57c293 !important; }
.correct-pill { background: #187b4a; font-weight: 750; }

.state-pill { background: var(--ink); font-weight: 750; }
.state-pill.is-waiting, .state-pill.is-connecting { background: #e8d79c; }
.state-pill.is-open { background: #274880; }
.state-pill.is-recorded { background: #187b4a; }
.state-pill.is-closed, .state-pill.is-ended { background: #9b2431; }
.state-pill.is-results { background: var(--ink); }
.connection-status { font-weight: 600; }
.connection-status::before, .connection-status.is-connected::before { box-shadow: none; }

.winner-grid { gap: 12px; }
.winner-card { min-height: 180px; }
.winner-card-face {
  position: absolute;
  border: 2px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
}
.winner-card strong { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.1; }
.leaderboard-row, .rank-gold, .rank-pink, .rank-cyan, .rank-lime {
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: none;
}
.leaderboard-rank { background: #eee9ff; font-weight: 800; }
.leaderboard-copy span { opacity: .72; }
.toast { transform: translateX(-50%); box-shadow: var(--shadow); }
.toast:not(.show) { display: none; }

.flash { border: 2px solid var(--ink); border-radius: 10px; font-weight: 700; }
.flash.error { background: #9b2431; }
.flash.success { background: #e8d79c; }
.answer-tile:focus-visible, .primary-action:focus-visible, .ghost-action:focus-visible,
.nav-btn:focus-visible, .tool-menu-button:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  box-shadow: none;
}

@media (max-width: 720px) {
  .topbar { align-items: flex-start; }
  .app-heading { width: 100%; }
  .main-nav { justify-content: flex-start; width: 100%; }
  .main-nav .nav-btn { flex: 0 1 auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .student-answer-grid { grid-template-columns: 1fr; }
}
