@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-page:        #f8fafc;  /* Clean light gray-blue background */
  --bg-card:        #ffffff;  /* Pure white cards */
  --bg-card-hover:  #f1f5f9;  /* Light slate on hover */
  --bg-header:      #0d4159;  /* FSE Dark Blue */
  --bg-header-rgb:  13, 65, 89;
  
  --text-primary:    #1e293b;  /* Slate 800 */
  --text-muted:      #64748b;  /* Slate 500 */
  
  --accent:         #176e61;  /* FSE brand teal */
  --accent-hover:   #12584d;  /* Darker teal */
  --accent-light:   rgba(23, 110, 97, 0.08);
  
  --accent-gold:    #f0a500;  /* Gold for enriched events */
  --accent-gold-lt: #fbb520;
  
  --ics-chip:       #4a7fa3;  /* Blue for ICS events */
  --border:         #e2e8f0;  /* Slate 200 */
  --danger:         #e05252;
  --success:        #52c07a;
  
  --radius:         6px;
  --radius-lg:      10px;
  --shadow:         0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg:      0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --font-body:      'Aptos', 'Inter', system-ui, -apple-system, sans-serif;
  --font-headings:  'Montserrat', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base Styles ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bg-header);
}

p {
  margin-bottom: 1rem;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--bg-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Override ghost button styles inside the header for white-on-dark look */
.site-header .btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}
.site-header .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { 
  transform: scale(0.97); 
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { 
  background: var(--accent-hover); 
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { 
  background: var(--bg-card-hover); 
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover { 
  background: #c54141; 
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { 
  background: var(--accent-light); 
}

.btn-sm { 
  padding: 0.3rem 0.75rem; 
  font-size: 0.78rem; 
}

.btn-icon {
  padding: 0.3rem 0.45rem;
  font-size: 0.9rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-icon:hover { 
  color: var(--text-primary); 
  background: var(--bg-card-hover); 
}

/* ── Calendar Page ── */
.calendar-page {
  max-width: 980px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.calendar-page .page-intro {
  text-align: center;
  margin-bottom: 2rem;
}
.calendar-page .page-intro h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.calendar-page .page-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

.calendar-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.calendar-nav-row h2 {
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 220px;
  text-align: center;
}

.calendar-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calendar-day-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: rgba(var(--bg-header-rgb), 0.04);
  border-bottom: 1px solid var(--border);
}

.cal-hdr {
  text-align: center;
  padding: 0.75rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
}

.cal-day {
  background: var(--bg-card);
  padding: 0.6rem;
  min-height: 95px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background-color 0.15s;
}

.cal-day.other-month { 
  background: #f8fafc;
  opacity: 0.45; 
}
.cal-day.today { 
  background: var(--accent-light); 
}

.cal-day.has-events { 
  cursor: pointer; 
}
.cal-day.has-events:hover { 
  background: var(--bg-card-hover); 
}

.day-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.today .day-num {
  background: var(--accent);
  color: #ffffff;
  border-radius: 50%;
  font-weight: 700;
}

.event-chip {
  display: block;
  background: var(--accent-gold);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color 0.12s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.event-chip:hover { 
  background: var(--accent-gold-lt); 
}
.event-chip.more {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-gold);
  border: 1px dashed rgba(255, 255, 255, 0.4);
}
.event-chip.ics {
  background: var(--ics-chip);
  color: #ffffff;
}
.event-chip.ics:hover { 
  background: #5b8fb5; 
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.2s ease;
  position: relative;
  border: 1px solid var(--border);
}
.modal-overlay.open .modal { 
  transform: translateY(0); 
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.12s, background-color 0.12s;
}
.modal-close:hover { 
  color: var(--text-primary); 
  background: var(--bg-card-hover); 
}

.modal h2 { 
  font-size: 1.25rem; 
  margin-bottom: 0.4rem; 
  color: var(--bg-header);
}
.modal .modal-date { 
  color: var(--accent); 
  font-size: 0.85rem; 
  font-weight: 700; 
  margin-bottom: 1rem; 
}
.modal .modal-desc { 
  color: var(--text-muted); 
  font-size: 0.9rem; 
  line-height: 1.6; 
  margin-bottom: 1.5rem; 
}

.modal.modal-wide { 
  max-width: 640px; 
}

/* ── Form Controls ── */
.form-group { 
  margin-bottom: 1.25rem; 
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-control {
  width: 100%;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { 
  outline: none; 
  border-color: var(--accent); 
  box-shadow: 0 0 0 3px rgba(23, 110, 97, 0.12);
}
.form-control::placeholder { 
  color: #94a3b8; 
}
.form-control option { 
  background: #ffffff; 
  color: var(--text-primary);
}

textarea.form-control { 
  resize: vertical; 
  min-height: 95px; 
}

.form-row { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 1rem; 
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ── Login Page ── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 2rem;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.login-card h1 { 
  font-size: 1.35rem; 
  margin-bottom: 0.3rem; 
  color: var(--bg-header);
}
.login-card .subtitle { 
  color: var(--text-muted); 
  font-size: 0.85rem; 
  margin-bottom: 1.75rem; 
  font-weight: 300;
}

.error-banner {
  background: rgba(224, 82, 82, 0.08);
  border: 1px solid var(--danger);
  color: #c54141;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

/* ── Dashboard Layout ── */
.dashboard-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}

.sidebar {
  background: #f1f5f9;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.sidebar-btn:hover { 
  background: rgba(15, 23, 42, 0.04); 
  color: var(--text-primary); 
}
.sidebar-btn.active { 
  background: var(--accent-light); 
  color: var(--accent); 
}

.sidebar-icon { 
  font-size: 1.05rem; 
  width: 1.2rem; 
  text-align: center; 
}

.sidebar-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}

.content-area { 
  padding: 2.25rem; 
  overflow-y: auto; 
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.section-header h2 { 
  font-size: 1.25rem; 
  font-weight: 700; 
  color: var(--bg-header);
}

/* ── Item List & Cards ── */
.item-list { 
  display: flex; 
  flex-direction: column; 
  gap: 0.75rem; 
}

.item-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.item-card:hover { 
  border-color: var(--text-muted); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.item-info { 
  flex: 1; 
  min-width: 0; 
}
.item-info .item-title { 
  font-size: 0.95rem; 
  font-weight: 700; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}
.item-info .item-sub { 
  font-size: 0.78rem; 
  color: var(--text-muted); 
  margin-top: 0.15rem; 
}

.item-actions { 
  display: flex; 
  gap: 0.5rem; 
  flex-shrink: 0; 
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-admin { 
  background: rgba(13, 65, 89, 0.1); 
  color: var(--bg-header); 
}
.badge-host  { 
  background: var(--accent-light); 
  color: var(--accent); 
}

/* ── Quiz Editor ── */
.editor-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  margin-bottom: 1.5rem;
  width: max-content;
  padding: 0.3rem 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  transition: color 0.13s;
}
.editor-back:hover { 
  color: var(--bg-header); 
}

.editor-meta {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.rounds-section h3 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.round-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.round-header {
  display: flex;
  align-items: center;
  padding: 0.95rem 1.25rem;
  gap: 0.75rem;
  cursor: pointer;
  background: rgba(var(--bg-header-rgb), 0.03);
  transition: background-color 0.13s;
}
.round-header:hover { 
  background: rgba(var(--bg-header-rgb), 0.06); 
}

.round-header .round-name { 
  flex: 1; 
  font-weight: 700; 
  font-size: 0.9rem; 
  color: var(--bg-header);
}
.round-header .round-q-count { 
  font-size: 0.75rem; 
  color: var(--text-muted); 
}
.round-chevron { 
  color: var(--text-muted); 
  font-size: 0.75rem; 
  transition: transform 0.2s ease; 
}
.round-card.open .round-chevron { 
  transform: rotate(180deg); 
}

.round-body { 
  display: none; 
  padding: 1.1rem 1.25rem; 
  border-top: 1px solid var(--border); 
}
.round-card.open .round-body { 
  display: block; 
}

.round-body .host-notes-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.round-body .host-notes-row label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.questions-list { 
  display: flex; 
  flex-direction: column; 
  gap: 0.5rem; 
  margin-bottom: 1rem; 
}

.q-item {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1px solid #f1f5f9;
}
.q-num { 
  font-size: 0.8rem; 
  font-weight: 700; 
  color: var(--accent); 
  min-width: 1.5rem; 
  padding-top: 0.05rem; 
}
.q-body { 
  flex: 1; 
  min-width: 0; 
}
.q-body .q-text { 
  font-size: 0.9rem; 
  margin-bottom: 0.25rem; 
  font-weight: 400;
}
.q-body .q-ans { 
  font-size: 0.8rem; 
  color: var(--accent); 
  font-weight: 600;
}
.q-body .q-media-tag { 
  font-size: 0.7rem; 
  color: var(--accent-gold); 
  font-weight: 700;
  margin-top: 0.2rem; 
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.q-actions { 
  display: flex; 
  gap: 0.4rem; 
  flex-shrink: 0; 
}

.add-question-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--accent-light);
  border: 1px dashed rgba(23, 110, 97, 0.4);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background-color 0.15s, border-color 0.15s;
}
.add-question-btn:hover { 
  background: rgba(23, 110, 97, 0.14); 
  border-color: var(--accent);
}

/* ── Media Tabs & Upload ── */
.media-type-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.media-tab {
  flex: 1;
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-body);
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.15s ease;
}
.media-tab.active { 
  background: var(--accent-light); 
  color: var(--accent); 
  border-color: rgba(23, 110, 97, 0.4); 
}

/* Emoji picker (question modal) */
.emoji-group { margin-bottom: 0.85rem; }
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));
  gap: 0.15rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  max-height: 11rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card, rgba(0, 0, 0, 0.15));
}
.emoji-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 6px;
  transition: background 0.12s ease;
}
.emoji-btn:hover { background: var(--accent-light, rgba(91, 163, 204, 0.25)); }

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-page);
  transition: border-color 0.15s, background-color 0.15s;
}
.upload-area:hover { 
  border-color: var(--accent); 
  background: var(--accent-light); 
}
.upload-area .upload-label { 
  font-size: 0.8rem; 
  color: var(--text-muted); 
  margin-top: 0.4rem; 
}
.upload-area .upload-icon { 
  font-size: 1.6rem; 
  color: var(--text-muted);
}

.upload-preview { 
  margin-top: 0.85rem; 
}
.upload-preview img { 
  max-width: 100%; 
  max-height: 170px; 
  border-radius: var(--radius); 
  object-fit: contain; 
  border: 1px solid var(--border);
}
.upload-preview .preview-name { 
  font-size: 0.75rem; 
  color: var(--text-muted); 
  margin-top: 0.4rem; 
}

.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 999px;
  height: 6px;
  margin-top: 0.85rem;
  overflow: hidden;
  display: none;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.1s;
  width: 0%;
}

/* ── Slideshow (Scope theme to dark mode) ── */
.slideshow {
  --bg-page:        #07212d;  /* Deep dark slate */
  --bg-card:        #0d4159;  /* Medium FSE dark blue */
  --bg-card-hover:  #144e6a;
  --text-primary:   #ffffff;
  --text-muted:     #9bbacb;
  --border:         rgba(155, 186, 203, 0.18);
  --accent:         #ffffff;  /* Gold, matching the event theme */
  --accent-light:   rgba(255, 255, 255, 0.15);
  --shadow:         0 8px 32px rgba(0, 0, 0, 0.5);

  position: fixed;
  inset: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.slideshow h1, .slideshow h2, .slideshow h3, .slideshow h4 {
  color: #ffffff;
}

.slide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 1rem;
}

.slide-meta-left { 
  display: flex; 
  flex-direction: column; 
  gap: 0.2rem; 
}
.slide-round-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: #ffffff;
}
.slide-quiz-name {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-headings);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.slide-counter-box {
  text-align: right;
}
.slide-q-counter {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-headings);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
}
.slide-total { 
  font-size: 0.75rem; 
  color: var(--text-muted); 
}

/* Ensure Exit button has correct styling on dark screen */
.slideshow .btn-ghost {
  color: #ffffff;
  border-color: rgba(255,255,255,0.25);
}
.slideshow .btn-ghost:hover {
  background: rgba(255,255,255,0.08);
}

/* Ribbon buttons: understated small caps with line icons instead of emoji */
.slide-top-actions .btn,
.jump-head .btn,
.score-inner .btn {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.btn .icon { flex-shrink: 0; opacity: 0.85; }

/* Gold primary button on the dark slideshow (matches the event theme) */
.slideshow .btn-primary {
  background: #ffffff;
  color: #081426;
  font-weight: 700;
}
.slideshow .btn-primary:hover { background: #d9e4f2; }

/* Pulsing live indicator replaces the red-circle emoji */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e05252;
  margin-right: 0.5em;
  vertical-align: 1px;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* Overlay headings match the display face */
.jump-head h2,
.score-inner h2 {
  font-family: var(--font-headings);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.slide-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 5rem;
  overflow: auto;
  gap: 2.25rem;
}

.slide-question {
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  max-width: 900px;
  font-family: var(--font-headings);
}

/* Text column wrapper — spacing between question / notes / answer controls */
.slide-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  min-width: 0;
}

.slide-media {
  max-width: 680px;
  width: 100%;
}

/* When a question has an image or video, split the slide: text left, media right */
.slide-body.has-media {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
}
.slide-body.has-media .slide-text {
  flex: 1 1 0;
  max-width: 720px;
}
.slide-body.has-media .slide-media {
  flex: 0 1 44%;
  max-width: 44%;
}
.slide-body.has-media .slide-media img,
.slide-body.has-media .slide-media video {
  max-height: 68vh;
}
.slide-body.has-media .slide-question {
  font-size: clamp(1.25rem, 2.6vw, 2rem);
}
/* Narrow screens: fall back to the stacked layout */
@media (max-width: 900px) {
  .slide-body.has-media {
    flex-direction: column;
    gap: 2.25rem;
  }
  .slide-body.has-media .slide-media {
    flex: 0 0 auto;
    max-width: 680px;
    width: 100%;
  }
  .slide-body.has-media .slide-media img,
  .slide-body.has-media .slide-media video {
    max-height: 38vh;
  }
}
.slide-media img { 
  width: 100%; 
  border-radius: var(--radius-lg); 
  object-fit: contain; 
  max-height: 48vh; 
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.slide-media audio, .slide-media video {
  width: 100%;
  border-radius: var(--radius);
}

/* ── YouTube-backed media (music/video questions) ── */
.yt-embed-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #000;
}
.yt-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}
.slide-body.has-media .yt-embed-wrap { max-height: 68vh; }
@media (max-width: 900px) {
  .slide-body.has-media .yt-embed-wrap { max-height: 38vh; }
}

/* Opaque bar pinned over YouTube's own title/channel overlay, which it draws
   itself on load, on hover, and whenever paused — none of the embed params
   suppress it. Sits above the iframe at all times regardless of player state. */
.yt-title-shield {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.96) 65%, rgba(0, 0, 0, 0) 100%);
}

/* Music questions: the iframe is present (so the audio plays) but never shown —
   only the small play/pause bar below it is visible, and only to the host.
   Strip the wrap's own box styling so it doesn't render as an empty frame,
   then visually-hide just the iframe (not display:none, which some browsers
   treat as pausing/unloading media) and let the bar sit in normal flow. */
.yt-embed-wrap.yt-audio-only {
  border: none;
  box-shadow: none;
  background: none;
  overflow: visible;
  width: auto;
}
.yt-audio-only .yt-embed {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.yt-audio-bar {
  display: flex;
  justify-content: center;
}
.yt-audio-btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.yt-audio-btn:hover {
  background: var(--bg-card-hover, var(--accent-light));
  border-color: var(--accent);
}

.yt-embed-error {
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
}
.yt-embed-error a {
  color: var(--accent);
  font-weight: 700;
}

/* Unmute prompt for youtube-video slides reuses .media-unlock's full-screen
   click-catcher; no extra positioning needed since that class is fixed/inset:0. */
.yt-unmute {
  font-size: 1.1rem;
}

.slide-answer-reveal {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
}
.slide-answer-reveal:hover { 
  border-color: var(--accent); 
  color: #ffffff; 
  background: var(--accent-light);
}

.slide-answer-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
  text-align: center;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.06);
}

.slide-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  gap: 1rem;
}

.slide-progress { 
  display: flex; 
  gap: 6px; 
  align-items: center; 
  flex-wrap: wrap; 
  justify-content: center; 
}
.prog-dot {
  width: 8px; 
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background-color 0.2s, transform 0.2s;
}
.prog-dot.past { 
  background: var(--text-muted); 
}
.prog-dot.current { 
  background: var(--accent); 
  transform: scale(1.35); 
}

/* ── Toast notifications ── */
.toast-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-left: 4px solid var(--success);
  box-shadow: var(--shadow-lg);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  animation: tin 0.25s ease, tout 0.3s ease 2.5s forwards;
  max-width: 300px;
}
.toast.err { 
  border-left-color: var(--danger); 
}
@keyframes tin  { from { opacity:0; transform:translateX(18px); } to { opacity:1; transform:translateX(0); } }
@keyframes tout { to   { opacity:0; transform:translateX(18px); } }

/* ── Labels & Utility ── */
.events-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.events-section-label:first-child { 
  margin-top: 0; 
}

.search-bar {
  position: relative;
  margin-bottom: 1.5rem;
  max-width: 380px;
}
.search-bar input { 
  padding-left: 2.2rem; 
}
.search-bar::before {
  content: '🔍';
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0.7;
}

.paste-preview-section {
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-top: 0.85rem;
  border: 1px solid var(--border);
}
.paste-preview-section .preview-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hidden  { display: none !important; }
.spin    { animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
}
.spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-muted);
}
.empty-icon { 
  font-size: 2.5rem; 
  margin-bottom: 0.5rem; 
}
.empty p { 
  font-size: 0.85rem; 
  font-weight: 300;
}

.divider { 
  border: none; 
  border-top: 1px solid var(--border); 
  margin: 1.25rem 0; 
}

/* ── Score Entry Table ── */
.score-entry-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.85rem;
}
.score-entry-table th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.score-entry-table td {
  padding: 0.45rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.score-entry-table tr:last-child td {
  border-bottom: none;
}
.score-entry-table .rank-cell {
  width: 2.5rem;
  text-align: center;
  font-size: 1.1rem;
}
.score-num-input { 
  width: 100px !important; 
}

/* ── Leaderboard Table ── */
.lb-table {
  width: 100%;
  border-collapse: collapse;
}
.lb-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.lb-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.lb-table tr:last-child td { 
  border-bottom: none; 
}
.lb-table .lb-rank { 
  width: 3rem; 
  text-align: center; 
  font-size: 1.15rem; 
  font-weight: 800; 
}
.lb-table .lb-name { 
  font-weight: 700; 
  color: var(--bg-header);
}
.lb-table .lb-score { 
  font-weight: 700; 
  color: var(--accent); 
  text-align: right; 
}
.lb-table td:not(:first-child):not(:nth-child(2)) { 
  text-align: right; 
  color: var(--text-primary); 
  font-weight: 600;
}
.lb-table td:not(:first-child):not(:nth-child(2)).lb-score {
  color: var(--accent);
}

.quiz-result-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.quiz-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  background: rgba(var(--bg-header-rgb), 0.03);
  transition: background-color 0.13s;
  gap: 1rem;
}
.quiz-result-header:hover { 
  background: rgba(var(--bg-header-rgb), 0.06); 
}
.quiz-result-body {
  display: none;
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.quiz-result-card.open .quiz-result-body { 
  display: block; 
}
.quiz-result-chevron { 
  color: var(--text-muted); 
  font-size: 0.75rem; 
  transition: transform 0.2s ease; 
}
.quiz-result-card.open .quiz-result-chevron { 
  transform: rotate(180deg); 
}

.year-select-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.year-select-row label { 
  font-size: 0.8rem; 
  font-weight: 700; 
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted); 
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .dashboard-wrap { 
    grid-template-columns: 1fr; 
  }
  .sidebar { 
    flex-direction: row; 
    padding: 0.6rem; 
    overflow-x: auto; 
    border-right: none; 
    border-bottom: 1px solid var(--border); 
  }
  .sidebar-sep { 
    display: none; 
  }
  .form-row { 
    grid-template-columns: 1fr; 
  }
  .slide-body { 
    padding: 1.5rem; 
  }
  .cal-day {
    min-height: 60px;
  }
}

/* ── Slideshow: round intro slides ── */
.slide-question.round-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
}
.slide-round-notes {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  max-width: 700px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
  white-space: pre-wrap;
}

/* ── Slideshow: header actions + overview trigger ── */
.slide-top-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}
.slide-counter-box {
  cursor: pointer;
  border-radius: var(--radius);
  padding: 0.25rem 0.6rem;
}
.slide-counter-box:hover {
  background: rgba(255, 255, 255, 0.06);
}
.presenting-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

/* ── Slideshow: presenter mode (host-only answer) ── */
.host-answer {
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  color: #ffffff;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 700;
  max-width: 600px;
}
.host-answer .tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 0.5rem;
  font-weight: 800;
}

/* ── Slideshow: progress fraction + round dots ── */
.prog-fraction {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}
.prog-dot.round-dot { border-radius: 2px; background: rgba(255, 255, 255, 0.35); }
.prog-dot.round-dot.past { background: rgba(255, 255, 255, 0.6); }
.prog-dot.round-dot.current { background: #ffffff; }

/* ── Slideshow: overview / jump navigation ── */
.jump-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(7, 17, 32, 0.94);
  overflow-y: auto;
  padding: 2.5rem 1.5rem;
}
.jump-overlay.hidden { display: none; }
.jump-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.jump-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.jump-head h2 { font-size: 1.2rem; color: #ffffff; }
.jump-round { margin-bottom: 1rem; }
.jump-round-title {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
  text-align: left;
  font-family: var(--font-headings);
}
.jump-round-title:hover { color: #ffffff; }
.jump-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.jump-q {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.jump-q:hover { background: rgba(255, 255, 255, 0.16); }
.jump-q.current {
  background: var(--ui-accent, #5ba3cc);
  border-color: transparent;
  font-weight: 800;
}

/* ── Slideshow: audience window (projector view) ── */
body.audience #btn-prev,
body.audience #btn-next,
body.audience #answer-toggle,
body.audience #btn-jump,
body.audience #btn-audience,
body.audience #btn-exit,
body.audience #score-close,
body.audience #host-answer { display: none !important; }
body.audience .slide-bottom { justify-content: center; }
body.audience .slide-counter-box { cursor: default; }
body.audience .slide-counter-box:hover { background: none; }

/* ── Slideshow: scoreboard overlay (current standings) ── */
.score-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(7, 17, 32, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}
.score-overlay.hidden { display: none; }
.score-inner {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: center;
}
.score-inner h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: #ffffff;
  font-family: var(--font-headings);
  text-align: center;
}
.score-board { width: 100%; border-collapse: collapse; }
.score-board td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  color: #ffffff;
}
.score-board tr:last-child td { border-bottom: none; }
.score-board .sb-rank { width: 3.4rem; text-align: center; }
.score-board .sb-name { font-weight: 600; }
.score-board .sb-pts { text-align: right; font-weight: 800; color: #ffffff; }
.score-board tr:first-child .sb-name { font-weight: 800; }
.score-empty {
  color: #9bbacb;
  font-size: 1.05rem;
  text-align: center;
  max-width: 420px;
}

.media-unlock {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(7, 17, 32, 0.88);
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 2;
}
.media-unlock span {
  font-size: 0.85rem;
  color: #9bbacb;
  font-weight: 400;
}

/* ── Per-round score entry ── */
.score-entry-table .score-round-input {
  width: 4.6rem;
  text-align: right;
  padding: 0.4rem 0.5rem;
}
.score-entry-table .score-total-input {
  width: 5.2rem;
  text-align: right;
  font-weight: 700;
}
.score-entry-table th.round-col {
  font-size: 0.68rem;
  max-width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

/* Team column stays visible while the round columns scroll horizontally */
.score-editor-table th.team-col,
.score-editor-table td.team-col {
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 2;
  box-shadow: 2px 0 0 var(--border);
}
@media (max-width: 700px) {
  /* Drop the rank column on phones so the team name starts at the edge */
  .score-editor-table th.rank-cell,
  .score-editor-table td.rank-cell { display: none; }
  .score-editor-table .score-name-input { min-width: 7.5rem; }
  .score-editor-table .score-round-input { width: 3.6rem; padding: 0.4rem 0.35rem; }
  .score-editor-table .score-total-input { width: 4.2rem; }
  .score-editor-table th,
  .score-editor-table td { padding-left: 0.3rem; padding-right: 0.3rem; }
}


/* ═══════════════════════════════════════════════════════════════════
   Theme: Nexus — matches the homepage (css/home.css).
   Titanium light ground, deep navy, FSE gold, flat & sharp,
   Plus Jakarta Sans + JetBrains Mono. Overrides the base tokens above.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --titanium:      #F3F5F7;
  --carbon:        #0A1622;
  --volt:          #F0A500;
  --volt-soft:     #FFC94D;
  --volt-ink:      #9A6700;   /* gold dark enough for text on white */
  --steel:         #D6DEE5;
  --graphite:      #0B2638;
  --fse-blue:      #0D4361;
  --muted-2:       #6A7480;
  --hud-h:         60px;
  --ease-silk:     cubic-bezier(0.16, 1, 0.3, 1);

  /* legacy tokens used by the base styles, dashboard.js and inline styles */
  --bg-page:       var(--titanium);
  --bg-card:       #ffffff;
  --bg-card-hover: #F7F9FA;
  --bg-header:     var(--carbon);
  --bg-header-rgb: 10, 22, 34;
  --text-primary:  var(--carbon);
  --text:          var(--carbon);
  --text-muted:    #5B6572;
  --accent:        var(--carbon);
  --accent-hover:  #1B2B3B;
  --accent-light:  rgba(240, 165, 0, 0.14);
  --ui-accent:     var(--volt-ink);
  --accent-gold:   var(--volt);
  --accent-gold-lt: var(--volt-soft);
  --ics-chip:      #4A7FA3;
  --border:        var(--steel);
  --danger:        #D14343;
  --success:       #2E9E5B;
  --radius:        0px;
  --radius-lg:     0px;
  --shadow:        none;
  --shadow-lg:     0 24px 48px -24px rgba(10, 22, 34, 0.28);
  --font-body:     'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-headings: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;
}

body {
  background: var(--titanium);
  color: var(--carbon);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--carbon);
}

a { color: inherit; }

::selection { background: var(--volt); color: var(--carbon); }

/* gold label, as on the homepage */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--carbon);
  background: var(--volt);
  padding: 6px 12px 6px 16px;
  margin-bottom: 20px;
}

/* ── Buttons ── */
.btn {
  border-radius: 0;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding: 10px 16px;
  transition: background-color 0.4s var(--ease-silk), color 0.4s var(--ease-silk), border-color 0.4s var(--ease-silk);
}
.btn:active { transform: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }

.btn-primary { background: var(--volt); color: var(--carbon); border-color: var(--carbon); }
.btn-primary:hover:not(:disabled) { background: var(--carbon); color: var(--volt); }

.btn-ghost { background: transparent; color: var(--carbon); border-color: var(--steel); }
.btn-ghost:hover:not(:disabled) { background: #ffffff; border-color: var(--carbon); }

.btn-outline { background: transparent; color: var(--carbon); border-color: var(--carbon); }
.btn-outline:hover:not(:disabled) { background: var(--volt); }

.btn-danger { background: var(--danger); color: #ffffff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #B03333; }

.btn-sm { padding: 7px 12px; font-size: 10px; }

.btn-icon {
  border-radius: 0;
  border: 1px solid var(--steel);
  background: #ffffff;
  color: var(--text-muted);
}
.btn-icon:hover:not(:disabled) { background: var(--volt); color: var(--carbon); border-color: var(--carbon); }

/* ── App header (login, dashboard, importers) ── */
.site-header {
  background: var(--carbon);
  border-bottom: 1px solid rgba(214, 222, 229, 0.12);
  box-shadow: inset 0 -2px 0 var(--volt);
  padding: 0 clamp(16px, 3vw, 32px);
  min-height: 64px;
}
.site-logo img { height: 26px; }
.site-header .btn-ghost { color: var(--titanium); border-color: rgba(243, 245, 247, 0.3); }
.site-header .btn-ghost:hover:not(:disabled) { background: var(--volt); color: var(--carbon); border-color: var(--volt); }

.badge {
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  padding: 5px 10px;
}
.badge-admin { background: var(--volt); color: var(--carbon); }
.badge-host  { background: rgba(243, 245, 247, 0.12); color: var(--titanium); }

/* ── Forms ── */
.form-group label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}
.form-control {
  border-radius: 0;
  background: #ffffff;
  border: 1px solid var(--steel);
  font-size: 14px;
}
.form-control:focus { border-color: var(--carbon); box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.3); }
.form-footer { border-top-color: var(--steel); }

/* ── Modal ── */
.modal-overlay { background: rgba(10, 22, 34, 0.55); }
.modal {
  border-radius: 0;
  border: none;
  border-top: 4px solid var(--volt);
  box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--carbon); margin-right: 2.5rem; }
.modal-close {
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--steel);
  border-radius: 0;
  font-size: 0.9rem;
  color: var(--carbon);
}
.modal-close:hover { background: var(--volt); color: var(--carbon); }
.modal .modal-date { font-family: var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 500; }
.divider { border-top-color: var(--steel); }

/* ── Login ── */
.login-page {
  min-height: calc(100vh - 64px);
  background-image: linear-gradient(rgba(214, 222, 229, 0.6) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 222, 229, 0.6) 1px, transparent 1px);
  background-size: 80px 80px;
}
.login-card {
  border-radius: 0;
  border: 1px solid var(--steel);
  border-top: 4px solid var(--volt);
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  padding: 2.5rem 2.25rem;
  max-width: 400px;
}
.login-card h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.6rem; color: var(--carbon); }
.login-card .subtitle { color: var(--text-muted); font-weight: 400; }
.error-banner { border-radius: 0; border: none; border-left: 3px solid var(--danger); }

/* ── Dashboard ── */
.dashboard-wrap { grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }

.sidebar {
  background: var(--graphite);
  border-right: none;
  padding: 1.5rem 0.75rem;
  gap: 2px;
}
.sidebar-btn {
  border-radius: 0;
  border-left: 2px solid transparent;
  color: rgba(243, 245, 247, 0.6);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding: 0.8rem 0.9rem;
  text-decoration: none;
}
.sidebar-btn:hover { background: rgba(243, 245, 247, 0.05); color: var(--titanium); }
.sidebar-btn.active { background: rgba(240, 165, 0, 0.1); color: var(--titanium); border-left-color: var(--volt); }
.sidebar-sep { border-top-color: rgba(243, 245, 247, 0.12); }

.content-area { padding: clamp(1.25rem, 3vw, 2.5rem); }

.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; color: var(--carbon); }

.item-card {
  border-radius: 0;
  border: 1px solid var(--steel);
  box-shadow: none;
  transition: border-color 0.4s var(--ease-silk), box-shadow 0.4s var(--ease-silk);
}
.item-card:hover { border-color: var(--carbon); box-shadow: inset 3px 0 0 var(--volt); }
.item-info .item-title { color: var(--carbon); }

.events-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--muted-2);
  border-bottom-color: var(--steel);
}

.editor-back { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; }
.editor-back:hover { color: var(--carbon); }
.editor-meta { border-radius: 0; box-shadow: none; }

.rounds-section h3 { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: 0.25em; color: var(--muted-2); }
.round-card { border-radius: 0; box-shadow: none; }
.round-card.open { border-color: var(--carbon); }
.round-header { background: #ffffff; }
.round-header:hover { background: var(--bg-card-hover); }
.round-card.open .round-header { box-shadow: inset 3px 0 0 var(--volt); }
.round-header .round-name { color: var(--carbon); }
.round-header .round-q-count { font-family: var(--font-mono); font-size: 11px; }
.round-body { border-top-color: var(--steel); }
.round-body .host-notes-row label { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.14em; }

.q-item { border-radius: 0; background: var(--titanium); border-color: var(--steel); }
.q-num { font-family: var(--font-mono); color: var(--muted-2); font-weight: 500; }
.q-body .q-ans { color: var(--volt-ink); font-weight: 700; }
.q-body .q-media-tag { font-family: var(--font-mono); font-weight: 500; color: var(--volt-ink); }

.add-question-btn {
  border-radius: 0;
  background: transparent;
  border: 1px dashed var(--muted-2);
  color: var(--carbon);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.add-question-btn:hover { background: var(--volt); border: 1px solid var(--carbon); }

.media-tab { border-radius: 0; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; }
.media-tab.active { background: var(--carbon); color: var(--volt); border-color: var(--carbon); }

.emoji-picker { border-radius: 0; background: #ffffff; }
.emoji-btn { border-radius: 0; }
.emoji-btn:hover { background: var(--accent-light); }

.upload-area { border-radius: 0; border: 1px dashed var(--muted-2); background: #ffffff; }
.upload-area:hover { border-color: var(--carbon); background: rgba(240, 165, 0, 0.08); }
.upload-preview img { border-radius: 0; }

.progress-bar-wrap { border-radius: 0; background: var(--steel); }
.progress-bar-fill { border-radius: 0; background: var(--volt); }

.paste-preview-section { border-radius: 0; background: var(--titanium); }
.paste-preview-section .preview-label { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.18em; }

.toast {
  border-radius: 0;
  border: 1px solid var(--steel);
  border-left: 4px solid var(--success);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
}
.toast.err { border-left-color: var(--danger); }

.loading { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted-2); }
.spinner { border-color: var(--steel); border-top-color: var(--carbon); }
.empty p { font-weight: 400; }

/* ── Tables (scores + leaderboard) ── */
.score-entry-table th,
.lb-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  border-bottom: 1px solid var(--carbon);
}
.score-entry-table td, .lb-table td { border-bottom-color: var(--steel); }
.lb-table .lb-rank { font-family: var(--font-mono); font-weight: 500; }
.lb-table .lb-name { color: var(--carbon); }
.lb-table .lb-score,
.lb-table td:not(:first-child):not(:nth-child(2)).lb-score { color: var(--carbon); font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-table td:not(:first-child):not(:nth-child(2)) { font-variant-numeric: tabular-nums; }
.lb-table tbody tr:first-child td { background: rgba(240, 165, 0, 0.08); }

.quiz-result-card { border-radius: 0; box-shadow: none; }
.quiz-result-card.open { border-color: var(--carbon); }
.quiz-result-header { background: #ffffff; }
.quiz-result-header:hover { background: var(--bg-card-hover); }
.quiz-result-card.open .quiz-result-header { box-shadow: inset 3px 0 0 var(--volt); }
.quiz-result-body { border-top-color: var(--steel); }

.year-select-row label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; }

.score-editor-table th.team-col,
.score-editor-table td.team-col { background: #ffffff; }

@media (max-width: 700px) {
  .dashboard-wrap { grid-template-columns: 1fr; }
  .sidebar { padding: 0.5rem; }
  .sidebar-btn { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; width: auto; }
  .sidebar-btn.active { border-bottom-color: var(--volt); }
}

/* ── Public subpages (leaderboard, committee) ── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 104px clamp(20px, 5vw, 80px) 64px;
  background: var(--titanium);
  border-bottom: 1px solid var(--steel);
  isolation: isolate;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--steel) 1px, transparent 1px), linear-gradient(90deg, var(--steel) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.45;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; }
.page-logo { position: absolute; top: 28px; left: clamp(20px, 4vw, 40px); }
.page-logo img { height: 28px; width: auto; display: block; filter: brightness(0); }
.page-hero h1 {
  font-size: clamp(52px, 10vw, 136px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--carbon);
}
.page-lead {
  margin: 24px 0 0;
  max-width: 540px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}
.page-hero-meta {
  position: absolute;
  top: 34px;
  right: clamp(20px, 4vw, 40px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* photo variant (committee) — dark, like the homepage's next-quiz card */
.page-hero-photo { background: var(--carbon); border-bottom: none; min-height: 62vh; display: flex; align-items: flex-end; }
.page-hero-photo::before { display: none; }
.page-hero-photo .page-hero-inner { width: 100%; }
.page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(10, 22, 34, 0.55), rgba(10, 22, 34, 0.35) 40%, rgba(10, 22, 34, 0.9));
}
.page-hero-photo .page-logo img { filter: none; }
.page-hero-photo h1 { color: var(--titanium); }
.page-hero-photo .page-lead { color: rgba(243, 245, 247, 0.8); }
.page-hero-photo .page-hero-meta { color: rgba(243, 245, 247, 0.7); }

.page-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px clamp(20px, 5vw, 40px) 88px;
}

.page-footer {
  background: var(--carbon);
  color: var(--titanium);
  padding: 56px clamp(20px, 5vw, 80px) calc(var(--hud-h) + 40px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 48px;
}
.page-footer-tag { font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
.page-footer-tag em { font-style: normal; color: var(--volt); }
.page-footer small { max-width: 420px; font-size: 12px; line-height: 1.6; color: rgba(243, 245, 247, 0.55); }

/* committee grid */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1px;
  background: var(--steel);
  border: 1px solid var(--steel);
  counter-reset: member;
}
.member-card {
  background: #ffffff;
  counter-increment: member;
  transition: box-shadow 0.5s var(--ease-silk);
}
.member-card:hover { box-shadow: inset 0 -3px 0 var(--volt); }
.member-photo { aspect-ratio: 1 / 1; overflow: hidden; background: var(--titanium); }
.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.8s var(--ease-silk), transform 1.2s var(--ease-silk);
}
.member-card:hover .member-photo img { filter: none; transform: scale(1.04); }
.member-info { padding: 18px 20px 22px; }
.member-info::before {
  content: counter(member, decimal-leading-zero) ' /';
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.member-info h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.member-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  transition: color 0.5s var(--ease-silk);
}
.member-card:hover .member-title { color: var(--volt-ink); }

/* ── HUD bar (same as the homepage) ── */
.hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--hud-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(243, 245, 247, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--steel);
}
.hud-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; }
.hud-brand img { height: 20px; width: auto; display: block; filter: brightness(0); }
.hud-brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 1px rgba(10, 22, 34, 0.35); }
.hud-links { display: flex; align-items: center; gap: 22px; }
.hud-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--carbon);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: border-color 0.4s var(--ease-silk), background 0.4s var(--ease-silk), color 0.4s var(--ease-silk);
}
.hud-links a:hover, .hud-links a[aria-current="page"] { border-bottom-color: var(--volt); }
.hud-links a.hud-cta { background: var(--carbon); color: var(--titanium); padding: 8px 14px; border-bottom: none; }
.hud-links a.hud-cta:hover { background: var(--volt); color: var(--carbon); }
.hud-links a:focus-visible { outline: 2px solid var(--carbon); outline-offset: 2px; }

@media (max-width: 640px) {
  .hud { justify-content: center; }
  .hud-brand { display: none; }
  .hud-links { gap: 14px; }
  .hud-links a { font-size: 10px; letter-spacing: 0.08em; }
  .hud-links a.hud-cta { display: none; }
  .page-hero { padding-top: 88px; }
  .page-hero-meta { display: none; }
  .committee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-info { padding: 12px 12px 16px; }
  .member-info h3 { font-size: 15px; }
  .member-title { font-size: 9px; letter-spacing: 0.1em; }
}

/* ── Slideshow (quiz.html) — dark navy + gold ── */
.slideshow {
  --bg-page:       var(--carbon);
  --bg-card:       var(--graphite);
  --bg-card-hover: #10324A;
  --text-primary:  var(--titanium);
  --text:          var(--titanium);
  --text-muted:    rgba(243, 245, 247, 0.6);
  --border:        rgba(214, 222, 229, 0.16);
  --accent:        var(--volt);
  --accent-hover:  var(--volt-soft);
  --accent-light:  rgba(240, 165, 0, 0.12);
  --ui-accent:     var(--volt);
  --shadow:        none;
  font-family: var(--font-body);
  background-color: var(--carbon);
  background-image: linear-gradient(rgba(214, 222, 229, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 222, 229, 0.045) 1px, transparent 1px);
  background-size: 80px 80px;
}
.slideshow h1, .slideshow h2, .slideshow h3, .slideshow h4 { color: var(--titanium); }
.slide-top, .slide-bottom { border-color: var(--border); background: rgba(10, 22, 34, 0.7); }
.slide-round-label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--volt); letter-spacing: 0.3em; }
.slide-quiz-name { text-transform: none; font-weight: 800; letter-spacing: -0.01em; font-size: 1.25rem; }
.slide-q-counter { font-family: var(--font-mono); font-weight: 500; text-transform: none; }
.slide-total { font-family: var(--font-mono); }
.slideshow .btn-ghost { color: var(--titanium); border-color: rgba(243, 245, 247, 0.3); }
.slideshow .btn-ghost:hover:not(:disabled) { background: var(--volt); color: var(--carbon); border-color: var(--volt); }
.slideshow .btn-primary { background: var(--volt); color: var(--carbon); border-color: var(--volt); font-weight: 500; }
.slideshow .btn-primary:hover:not(:disabled) { background: var(--titanium); color: var(--carbon); border-color: var(--titanium); }
.slide-top-actions .btn, .jump-head .btn, .score-inner .btn { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; }
.slide-question { font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.slide-question.round-title { font-weight: 800; font-size: clamp(2.6rem, 7vw, 5.5rem); letter-spacing: -0.04em; line-height: 0.95; text-transform: none; }
.slide-round-notes { border-radius: 0; border: none; border-left: 2px solid var(--volt); background: rgba(243, 245, 247, 0.04); text-align: left; }
.slide-answer-reveal { border-radius: 0; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.14em; border: 1px solid rgba(243, 245, 247, 0.3); }
.slide-answer-reveal:hover { border-color: var(--volt); color: var(--volt); background: var(--accent-light); }
.slide-answer-box { border-radius: 0; border: 1px solid var(--volt); background: rgba(240, 165, 0, 0.1); color: var(--volt-soft); box-shadow: none; }
.host-answer { border-radius: 0; border-color: rgba(243, 245, 247, 0.35); }
.host-answer .tag { font-family: var(--font-mono); font-weight: 500; }
.slide-media img, .slide-media video, .yt-embed-wrap { border-radius: 0; border-color: var(--border); box-shadow: none; }
.yt-audio-btn { border-radius: 0; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; background: var(--volt); color: var(--carbon); border-color: var(--volt); }
.yt-audio-btn:hover { background: var(--titanium); border-color: var(--titanium); }
.prog-dot { background: rgba(243, 245, 247, 0.18); }
.prog-dot.past { background: rgba(243, 245, 247, 0.5); }
.prog-dot.current { background: var(--volt); }
.prog-dot.round-dot { border-radius: 0; background: rgba(243, 245, 247, 0.35); }
.prog-dot.round-dot.past { background: rgba(243, 245, 247, 0.6); }
.prog-dot.round-dot.current { background: var(--volt); }
.prog-fraction { font-family: var(--font-mono); font-weight: 500; }
.presenting-badge { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.14em; color: var(--volt); }
.slide-counter-box { border-radius: 0; }
.jump-overlay { background: rgba(10, 22, 34, 0.97); }
.jump-head h2, .score-inner h2 { text-transform: none; font-weight: 800; letter-spacing: -0.03em; }
.jump-round-title { font-weight: 700; letter-spacing: -0.01em; }
.jump-round-title:hover { color: var(--volt); }
.jump-q { border-radius: 0; font-family: var(--font-mono); font-weight: 500; border-color: rgba(243, 245, 247, 0.18); background: rgba(243, 245, 247, 0.05); }
.jump-q.current { background: var(--volt); color: var(--carbon); }
.score-overlay { background: rgba(10, 22, 34, 0.97); }
.score-inner h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.score-board td { border-color: rgba(214, 222, 229, 0.14); }
.score-board .sb-rank { font-family: var(--font-mono); }
.score-board .sb-pts { color: var(--volt); font-variant-numeric: tabular-nums; }
.score-empty { color: rgba(243, 245, 247, 0.6); }
.media-unlock { background: rgba(10, 22, 34, 0.9); }
.media-unlock span { font-family: var(--font-mono); color: rgba(243, 245, 247, 0.6); }
.yt-embed-error { border-radius: 0; }
.yt-embed-error a { color: var(--volt); }
