/*
  Playful Geometric shared skin.
  This final CSS layer adapts the reference design system to Rostra's current
  static app without changing the render or data contract.
*/

:root {
  --pg-paper: #fffdf5;
  --pg-paper-dot: rgba(30, 41, 59, 0.075);
  --pg-card: #ffffff;
  --pg-card-soft: #f8fafc;
  --pg-ink: #1e293b;
  --pg-on-candy: #1e293b;
  --pg-ink-soft: #475569;
  --pg-muted: #64748b;
  --pg-border: #1e293b;
  --pg-border-soft: #e2e8f0;
  --pg-violet: #8b5cf6;
  --pg-violet-deep: #6d45dc;
  --pg-pink: #f472b6;
  --pg-yellow: #fbbf24;
  --pg-green: #34d399;
  --pg-blue: #38bdf8;
  --pg-red: #fb7185;
  --pg-navy: #1e293b;
  --pg-navy-2: #111827;
  --pg-shadow-color: #1e293b;
  --pg-shadow-sm: 3px 3px 0 var(--pg-shadow-color);
  --pg-shadow-md: 5px 5px 0 var(--pg-shadow-color);
  --pg-shadow-lg: 8px 8px 0 var(--pg-shadow-color);
  --pg-shadow-soft: 6px 6px 0 #dbe5f0;
  --pg-radius-card: 8px;
  --pg-radius-soft: 16px;
  --pg-radius-pill: 999px;
  --pg-border-width: 2px;
  --pg-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --bg: var(--pg-paper);
  --bg-grid: var(--pg-paper-dot);
  --surface: var(--pg-card);
  --surface-2: var(--pg-card-soft);
  --surface-3: #eef4fb;
  --surface-raised: var(--pg-card);
  --ink: var(--pg-ink);
  --ink-soft: var(--pg-ink-soft);
  --ink-muted: var(--pg-muted);
  --ink-subtle: #94a3b8;
  --line: var(--pg-border);
  --line-strong: var(--pg-border);
  --nav: var(--pg-navy);
  --nav-2: var(--pg-navy-2);
  --nav-3: #26364d;
  --nav-ink: #fffdf5;
  --nav-muted: #cbd5e1;
  --accent: var(--pg-violet);
  --accent-strong: var(--pg-violet-deep);
  --accent-soft: #ede9fe;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --coral: #db2777;
  --coral-soft: #fce7f3;
  --red: #e11d48;
  --green: #059669;
  --green-soft: #dcfce7;
  --cyan: #0891b2;
  --magenta: #9333ea;
  --monitor: #111827;
  --monitor-2: #1e293b;
  --monitor-ink: #fffdf5;
  --focus-ring: var(--pg-violet);
  --shadow-xs: var(--pg-shadow-sm);
  --shadow-sm: var(--pg-shadow-md);
  --shadow-md: var(--pg-shadow-lg);
  --control-shadow: var(--pg-shadow-sm);
  --control-shadow-active: 1px 1px 0 var(--pg-shadow-color);
  --hardware-shadow: var(--pg-shadow-sm);
  --module-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.42));
  --module-shadow: var(--pg-shadow-soft);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: var(--pg-paper);
  --surface: var(--pg-card);
  --surface-2: var(--pg-card-soft);
  --surface-3: #eef4fb;
  --surface-raised: var(--pg-card);
  --ink: var(--pg-ink);
  --ink-soft: var(--pg-ink-soft);
  --ink-muted: var(--pg-muted);
  --line: var(--pg-border);
  --line-strong: var(--pg-border);
  --nav: var(--pg-navy);
  --nav-2: var(--pg-navy-2);
  --nav-ink: #fffdf5;
  --nav-muted: #cbd5e1;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --pg-paper: #070b12;
  --pg-paper-dot: rgba(100, 116, 139, 0.1);
  --pg-card: #0f1724;
  --pg-card-soft: #0b111c;
  --pg-ink: #d5deea;
  --pg-ink-soft: #aebbc9;
  --pg-muted: #78879b;
  --pg-border: #303b4c;
  --pg-border-soft: #1e2938;
  --pg-violet: #7c4dff;
  --pg-pink: #c95799;
  --pg-yellow: #c99522;
  --pg-green: #219b72;
  --pg-blue: #2c8eb8;
  --pg-shadow-color: #02040a;
  --pg-shadow-soft: 6px 6px 0 #02040a;
  --bg: var(--pg-paper);
  --surface: var(--pg-card);
  --surface-2: var(--pg-card-soft);
  --surface-3: #162234;
  --surface-raised: #121b2a;
  --ink: var(--pg-ink);
  --ink-soft: var(--pg-ink-soft);
  --ink-muted: var(--pg-muted);
  --line: var(--pg-border);
  --line-strong: #526175;
  --nav: #060a11;
  --nav-2: #020617;
  --nav-ink: #cfd8e5;
  --nav-muted: #728198;
  --monitor-ink: #d5deea;
  --module-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  --module-shadow: var(--pg-shadow-soft);
}

body,
:root[data-theme="light"] body,
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle, var(--pg-paper-dot) 1px, transparent 1.5px),
    var(--bg);
  background-size: 18px 18px, auto;
  color: var(--ink);
}

body::before,
:root[data-theme="light"] body::before,
:root[data-theme="dark"] body::before {
  background: none;
}

.studio-bar,
.console-chrome {
  border-bottom: var(--pg-border-width) solid var(--pg-border);
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.13), transparent 38%, rgba(52, 211, 153, 0.12)),
    var(--nav);
  color: var(--nav-ink);
  box-shadow: 0 4px 0 var(--pg-shadow-color);
}

.studio-label,
.brand-name,
.activity-title h1,
.section-heading h2,
.library-title-block h1,
.class-home .activity-title h1,
.class-dashboard-title h1 {
  color: var(--ink);
  font-weight: 850;
}

.studio-bar .studio-label,
.studio-bar .studio-mode,
.studio-bar .context-chip,
.studio-bar .save-status {
  color: var(--nav-ink);
}

.tally-light {
  width: 11px;
  height: 11px;
  border: 2px solid var(--pg-border);
  background: var(--pg-green);
  box-shadow: none;
}

.studio-mode,
.top-context,
.save-status,
.theme-toggle-switch,
.save-state-button,
.cloud-account-summary,
.studio-bar .home-button,
.studio-bar .icon-button,
.top-icon-actions .icon-button {
  border: var(--pg-border-width) solid color-mix(in srgb, var(--nav-ink) 42%, var(--pg-border));
  border-radius: var(--pg-radius-card);
  background: rgba(255, 253, 245, 0.09);
  color: var(--nav-ink);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 72%, transparent);
}

.top-context {
  flex: 0 1 auto;
  width: auto;
  max-width: min(46vw, 440px);
  min-height: 34px;
  gap: 0;
  padding: 2px;
  overflow: hidden;
}

.context-chip {
  min-height: 28px;
  gap: 6px;
  padding: 0 8px;
  color: var(--nav-muted);
  font-size: 0.68rem;
  line-height: 1;
}

.context-chip strong {
  max-width: min(13vw, 16ch);
  font-size: 0.78rem;
  line-height: 1;
}

.context-date strong {
  max-width: 7ch;
}

:root[data-theme="light"] .top-context {
  border-color: #64748b;
  background: #fffaf0;
  color: var(--pg-ink-soft);
  box-shadow: 2px 2px 0 rgba(30, 41, 59, 0.28);
}

:root[data-theme="light"] .context-chip {
  color: #64748b;
}

:root[data-theme="light"] .context-chip + .context-chip {
  border-left-color: #94a3b8;
}

:root[data-theme="light"] .top-context strong,
:root[data-theme="light"] .context-chip strong {
  color: #1e293b;
}

:root[data-theme="dark"] .studio-mode,
:root[data-theme="dark"] .top-context,
:root[data-theme="dark"] .save-status,
:root[data-theme="dark"] .theme-toggle-switch,
:root[data-theme="dark"] .save-state-button,
:root[data-theme="dark"] .cloud-account-summary,
:root[data-theme="dark"] .studio-bar .home-button,
:root[data-theme="dark"] .studio-bar .icon-button,
:root[data-theme="dark"] .top-icon-actions .icon-button {
  border-color: #3b485b;
  background: rgba(8, 13, 22, 0.92);
}

.top-context strong,
.context-chip strong {
  color: var(--nav-ink);
}

:root[data-theme="light"] .top-context strong,
:root[data-theme="light"] .context-chip strong {
  color: #1e293b;
}

.save-state-button {
  border-radius: var(--pg-radius-pill);
  font-weight: 800;
}

.theme-switch-track {
  border: 2px solid var(--pg-border);
  background: var(--pg-yellow);
}

.theme-switch-knob {
  border: 2px solid var(--pg-border);
  background: var(--pg-card);
}

.left-rail {
  border-right: var(--pg-border-width) solid var(--pg-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.24)),
    var(--surface);
  box-shadow: 4px 0 0 var(--pg-shadow-color);
}

:root[data-theme="dark"] .left-rail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--surface);
}

.brand-mark {
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: var(--pg-yellow);
  color: var(--pg-on-candy);
  box-shadow: var(--pg-shadow-sm);
  transform: rotate(-4deg);
}

.brand-subtitle {
  color: var(--ink-muted);
  font-weight: 750;
}

.nav-button {
  --nav-accent: var(--pg-blue);
  border: var(--pg-border-width) solid transparent;
  border-radius: var(--pg-radius-card);
  color: var(--ink-soft);
  font-weight: 800;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms var(--pg-bounce), box-shadow 180ms var(--pg-bounce);
}

.nav-button-wins {
  --nav-accent: var(--pg-yellow);
}

.nav-button-discussion {
  --nav-accent: var(--pg-green);
}

.nav-button-think-fast {
  --nav-accent: var(--pg-violet);
}

.nav-button-never-met {
  --nav-accent: var(--pg-pink);
}

.nav-button-report {
  --nav-accent: var(--pg-blue);
}

.nav-icon {
  border: var(--pg-border-width) solid var(--pg-border);
  background: color-mix(in srgb, var(--nav-accent) 72%, white);
  color: var(--pg-on-candy);
  box-shadow: 2px 2px 0 var(--pg-shadow-color);
}

.nav-button:hover {
  border-color: var(--pg-border);
  background: color-mix(in srgb, var(--nav-accent) 18%, var(--surface));
  color: var(--ink);
  transform: translate(-1px, -1px);
}

.nav-button.active {
  border-color: var(--pg-border);
  background: color-mix(in srgb, var(--nav-accent) 28%, var(--surface));
  color: var(--ink);
  box-shadow: var(--pg-shadow-sm);
}

.nav-button.active .nav-icon {
  border-color: var(--pg-border);
  background: var(--nav-accent);
  color: var(--pg-on-candy);
}

.top-bar,
.setup-strip,
.main-panel,
.side-panel,
.log-panel,
.library-toolbar,
.cloud-auth-panel,
.cloud-beta-panel,
.preflight-panel,
.report-panel,
.roster-import-panel,
.settings-card,
.settings-stat-card,
.class-file-row,
.session-file-row,
.class-stat-card,
.new-session-card,
.speaker-card,
.timer-card,
.presence-card,
.filler-card,
.tf-program-monitor,
.tf-instrument,
.speaker-tracking-card,
.article-card,
.project-card,
.session-card,
.progress-card,
.report-activity-card,
.report-export-grid fieldset,
.app-modal {
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: var(--module-gradient), var(--surface);
  box-shadow: var(--module-shadow);
}

.screen-active .main-panel,
.screen-active .side-panel,
.screen-active .log-panel {
  background: var(--module-gradient), var(--surface);
}

.class-file-row,
.session-file-row,
.presence-row,
.roster-row,
.queue-row,
.log-row,
.grid-row,
.next-three-row {
  border-width: var(--pg-border-width);
  border-color: color-mix(in srgb, var(--pg-border) 88%, var(--pg-border-soft));
  background: var(--surface);
}

.activity-kicker,
.console-chip,
.count-pill,
.status-pill,
.shortcut,
.display-status-chip {
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-pill);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 78%, transparent);
  font-weight: 850;
}

.activity-kicker,
.setup-option-label,
.session-list-title,
.class-stat-card span,
.report-activity-card span,
.report-activity-card small,
.report-export-grid legend {
  color: var(--ink);
  letter-spacing: 0.055em;
}

.activity-kicker,
.console-chip.live {
  background: var(--pg-yellow);
  color: var(--pg-on-candy);
}

.count-pill {
  background: color-mix(in srgb, var(--pg-blue) 32%, var(--surface));
}

.screen-cloud-auth .left-rail,
.screen-cloud-auth .setup-strip,
.screen-cloud-auth .side-panel,
.screen-cloud-auth .log-panel {
  display: none;
}

.screen-cloud-auth #homeButton,
.screen-cloud-auth #saveStatus,
.screen-cloud-auth #openDisplayButton,
.screen-cloud-auth #saveStateButton,
.screen-cloud-auth #cloudAccountMenu {
  display: none;
}

.screen-cloud-auth .workspace {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(26px, 6vh, 76px) clamp(16px, 4vw, 48px);
}

.screen-cloud-auth .content-grid,
.screen-cloud-auth .main-column {
  display: block;
}

.screen-cloud-auth .main-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.cloud-auth-shell {
  display: grid;
  min-height: min(640px, calc(100dvh - var(--studio-bar-height) - 96px));
  place-items: center;
}

.cloud-auth-panel {
  width: min(100%, 560px);
  padding: clamp(22px, 4vw, 34px);
}

.cloud-auth-title {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.cloud-auth-title h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.96;
}

.cloud-auth-title p,
.cloud-auth-form p {
  margin: 0;
}

.cloud-auth-form {
  display: grid;
  gap: 14px;
}

.cloud-auth-field {
  display: grid;
  gap: 7px;
  font-weight: 850;
}

.cloud-auth-field span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.cloud-auth-field input {
  width: 100%;
  min-height: 50px;
  background: color-mix(in srgb, var(--surface-2) 86%, var(--surface));
  font-size: 1rem;
}

.cloud-session-loader {
  min-height: 270px;
  display: grid;
  align-content: center;
}

.cloud-loading-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cloud-loading-dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--pg-border);
  border-radius: 50%;
  background: var(--pg-blue);
  animation: cloud-loading-pulse 900ms ease-in-out infinite;
}

.cloud-loading-dot:nth-child(2) {
  animation-delay: 120ms;
}

.cloud-loading-dot:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes cloud-loading-pulse {
  0%, 100% {
    opacity: 0.42;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.cloud-auth-oauth,
.cloud-auth-actions,
.cloud-auth-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cloud-auth-oauth > button,
.cloud-auth-actions > button,
.cloud-auth-form > button {
  min-height: 46px;
}

.cloud-auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.cloud-auth-divider::before,
.cloud-auth-divider::after {
  content: "";
  height: var(--pg-border-width);
  background: color-mix(in srgb, var(--pg-border) 70%, transparent);
}

.cloud-account-menu {
  position: relative;
  z-index: 75;
}

.cloud-account-menu[hidden] {
  display: none;
}

.cloud-account-summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 3px 10px 3px 5px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.cloud-account-summary::-webkit-details-marker {
  display: none;
}

.cloud-account-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--nav-ink) 40%, var(--pg-border));
  border-radius: 50%;
  background: color-mix(in srgb, var(--pg-blue) 40%, var(--surface));
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.cloud-account-avatar.ready {
  background: color-mix(in srgb, var(--pg-green) 70%, var(--surface));
  color: var(--pg-on-candy);
}

.cloud-account-avatar.pending {
  background: color-mix(in srgb, var(--pg-yellow) 76%, var(--surface));
  color: var(--pg-on-candy);
}

.cloud-account-avatar.offline {
  background: color-mix(in srgb, var(--surface-2) 86%, var(--surface));
  color: var(--ink-muted);
}

.cloud-account-summary-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1;
}

.cloud-account-summary-copy span {
  color: var(--nav-muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cloud-account-summary-copy strong {
  max-width: 15ch;
  overflow: hidden;
  color: var(--nav-ink);
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-account-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  padding: 12px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--pg-shadow-md);
}

.cloud-account-card {
  display: grid;
  gap: 12px;
}

.cloud-account-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.cloud-account-identity strong,
.cloud-account-identity span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-account-identity strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.cloud-account-identity span {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.cloud-account-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cloud-account-menu-actions button {
  min-width: 0;
  min-height: 36px;
  padding-inline: 10px;
  white-space: nowrap;
}

.cloud-account-menu-actions .ghost-button {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .cloud-account-summary {
    padding: 3px;
  }

  .cloud-account-summary-copy {
    display: none;
  }

  .cloud-account-panel {
    right: -58px;
  }
}

.cloud-beta-panel {
  padding: clamp(14px, 2vw, 20px);
}

.cloud-beta-row,
.cloud-beta-account,
.cloud-beta-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cloud-beta-row {
  justify-content: space-between;
}

.cloud-beta-actions button {
  white-space: nowrap;
}

.status-pill.available,
.status-available,
.roster-summary-meter.status-available {
  border-color: var(--pg-border);
  background: color-mix(in srgb, var(--pg-green) 66%, var(--surface));
  color: var(--pg-on-candy);
}

.status-pill.late,
.status-late,
.roster-summary-meter.status-late {
  border-color: var(--pg-border);
  background: color-mix(in srgb, var(--pg-yellow) 78%, var(--surface));
  color: var(--pg-on-candy);
}

.status-pill.left,
.status-left,
.status-pill.absent,
.status-absent,
.status-pill.notSeen,
.status-notSeen,
.roster-summary-meter.status-left,
.roster-summary-meter.status-absent,
.roster-summary-meter.status-notSeen {
  border-color: var(--pg-border);
  background: color-mix(in srgb, var(--pg-pink) 58%, var(--surface));
  color: var(--pg-on-candy);
}

input,
textarea,
select {
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--pg-border);
  background: color-mix(in srgb, var(--pg-yellow) 8%, var(--surface));
}

input:focus,
textarea:focus,
select:focus,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 0;
  border-color: var(--pg-violet);
  box-shadow: 4px 4px 0 var(--pg-violet);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.small-button,
.rating-button,
.filler-button,
.stepper-button,
.participation-toggle,
.presence-disclosure,
.system-button,
input[type="file"]::file-selector-button {
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-pill);
  box-shadow: var(--pg-shadow-sm);
  font-weight: 850;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms var(--pg-bounce), box-shadow 180ms var(--pg-bounce);
}

.primary-button,
.go-live-button,
.command-cluster .primary-button,
.timer-actions .primary-button,
.flow-actions .primary-button {
  background: var(--pg-violet);
  color: #ffffff;
}

.secondary-button,
.system-button,
input[type="file"]::file-selector-button {
  background: var(--surface);
  color: var(--ink);
}

.ghost-button,
.small-button,
.rating-button,
.participation-toggle {
  background: color-mix(in srgb, var(--pg-blue) 12%, var(--surface));
  color: var(--ink);
}

.danger-button {
  background: var(--pg-pink);
  color: var(--pg-on-candy);
}

.stepper-button,
.filler-button {
  background: var(--pg-yellow);
  color: var(--pg-on-candy);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.danger-button:hover:not(:disabled),
.small-button:hover:not(:disabled),
.rating-button:hover:not(:disabled),
.filler-button:hover:not(:disabled),
.stepper-button:hover:not(:disabled),
.participation-toggle:hover:not(:disabled),
.presence-disclosure:hover:not(:disabled),
.system-button:hover:not(:disabled),
input[type="file"]::file-selector-button:hover {
  border-color: var(--pg-border);
  box-shadow: var(--pg-shadow-md);
  transform: translate(-2px, -2px);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.ghost-button:active:not(:disabled),
.danger-button:active:not(:disabled),
.small-button:active:not(:disabled),
.rating-button:active:not(:disabled),
.filler-button:active:not(:disabled),
.stepper-button:active:not(:disabled),
.participation-toggle:active:not(:disabled),
.presence-disclosure:active:not(:disabled),
.system-button:active:not(:disabled),
input[type="file"]::file-selector-button:active {
  box-shadow: var(--control-shadow-active);
  transform: translate(2px, 2px);
}

.home-button,
.icon-button {
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  box-shadow: var(--pg-shadow-sm);
}

.home-button:hover,
.icon-button:hover {
  box-shadow: var(--pg-shadow-md);
  transform: translate(-1px, -1px);
}

.class-settings-console {
  gap: 16px;
  justify-items: center;
}

.class-settings-header {
  padding: 0;
}

.class-settings-back::before {
  content: "<";
  margin-right: 6px;
  font-family: var(--font-mono);
}

.class-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-launch-panel {
  grid-template-columns: minmax(148px, 178px) auto auto;
  gap: 9px;
  padding: 8px;
}

.class-settings-button {
  min-width: 94px;
}

.settings-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.settings-stat-card {
  min-height: 76px;
  padding: 12px 13px;
}

.settings-stat-card strong {
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
}

.settings-card {
  gap: 13px;
  padding: 18px;
}

.class-settings-window {
  gap: 14px;
}

.roster-settings-layout {
  grid-template-columns: 1fr;
}

.class-name-settings-panel {
  padding: 16px 18px;
}

.class-name-control {
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
}

.class-name-control .primary-button {
  min-height: 44px;
}

.roster-settings-panel {
  gap: 16px;
  padding: 18px;
}

.roster-settings-titlebar {
  padding-bottom: 10px;
  border-bottom: var(--pg-border-width) solid color-mix(in srgb, var(--pg-border) 72%, var(--pg-border-soft));
}

.roster-settings-titlebar h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
}

.roster-settings-title-actions {
  align-items: center;
}

.roster-add-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
}

.roster-add-toggle span[aria-hidden="true"] {
  border: var(--pg-border-width) solid var(--pg-border);
  background: var(--pg-green);
  color: var(--pg-on-candy);
  font-family: var(--font-display);
  font-weight: 950;
}

.roster-add-toggle.active {
  background: color-mix(in srgb, var(--pg-green) 42%, var(--surface));
}

.settings-card .section-heading {
  margin-bottom: 2px;
}

.settings-field input,
.settings-card textarea {
  min-height: 44px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--surface));
}

.settings-card textarea {
  min-height: 134px;
  resize: vertical;
}

.settings-file-drop {
  min-height: 136px;
  border: var(--pg-border-width) dashed color-mix(in srgb, var(--pg-border) 82%, var(--pg-blue));
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--pg-blue) 22%, transparent) 0 22px, transparent 23px),
    color-mix(in srgb, var(--pg-blue) 8%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pg-blue) 18%, transparent);
}

.settings-file-drop input[type="file"] {
  align-self: end;
  margin-top: 4px;
}

.settings-roster-notes > div {
  border-width: var(--pg-border-width);
  border-color: color-mix(in srgb, var(--pg-border) 78%, var(--pg-border-soft));
  background: color-mix(in srgb, var(--pg-yellow) 7%, var(--surface));
}

.settings-roster-notes span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-settings-tools {
  border: var(--pg-border-width) solid color-mix(in srgb, var(--pg-border) 78%, var(--pg-border-soft));
  border-radius: var(--pg-radius-card);
  padding: 12px;
  background: color-mix(in srgb, var(--pg-blue) 6%, var(--surface));
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--pg-shadow-color) 58%, transparent);
}

.roster-add-form .secondary-button {
  min-height: 44px;
}

.roster-import-compact {
  border-width: var(--pg-border-width);
  border-color: color-mix(in srgb, var(--pg-border) 78%, var(--pg-blue));
  background: color-mix(in srgb, var(--pg-yellow) 8%, var(--surface));
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--pg-shadow-color) 72%, transparent);
}

.roster-import-compact .file-glyph {
  width: 40px;
  height: 40px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: color-mix(in srgb, var(--pg-blue) 28%, var(--surface));
}

.roster-settings-list {
  scrollbar-color: color-mix(in srgb, var(--pg-blue) 45%, var(--pg-border)) transparent;
}

.roster-settings-row {
  align-self: stretch;
  border-width: var(--pg-border-width);
  border-color: color-mix(in srgb, var(--pg-border) 82%, var(--pg-border-soft));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pg-green) 7%, transparent), transparent 46%),
    var(--surface);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 62%, transparent);
}

.roster-settings-row:nth-child(even) {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pg-blue) 8%, transparent), transparent 46%),
    var(--surface);
}

.roster-settings-row.inactive {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pg-pink) 9%, transparent), transparent 46%),
    color-mix(in srgb, var(--surface-2) 82%, var(--surface));
}

.roster-mini-button {
  border-radius: var(--pg-radius-card);
  margin: 0 2px 2px 0;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 58%, transparent);
  font-size: 0.78rem;
  line-height: 1;
}

.roster-settings-row.active .roster-mini-button {
  background: color-mix(in srgb, var(--pg-yellow) 14%, var(--surface));
}

.roster-settings-row.inactive .roster-mini-button {
  background: color-mix(in srgb, var(--pg-green) 22%, var(--surface));
}

.rating-button.active,
.participation-toggle.active,
.small-button.active {
  border-color: var(--pg-border);
  background: var(--pg-green);
  color: var(--pg-on-candy);
}

.timer-card,
.tf-clock-module .timer-card,
.timer-stack .timer-card {
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.14), rgba(255, 255, 255, 0.02)),
    var(--monitor);
  color: var(--monitor-ink);
}

.timer-card .count-pill,
.timer-card .secondary-button,
.timer-card .ghost-button {
  border-color: color-mix(in srgb, var(--monitor-ink) 42%, var(--pg-border));
}

.article-card,
.project-card,
.session-card,
.new-session-card,
.roster-import-card,
.settings-card,
.settings-stat-card,
.class-stat-card,
.progress-card {
  position: relative;
}

.article-card::before,
.project-card::before,
.session-card::before,
.new-session-card::before,
.roster-import-card::before,
.settings-card::before,
.settings-stat-card::before,
.class-stat-card::before,
.progress-card::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-left: var(--pg-border-width) solid var(--pg-border);
  border-bottom: var(--pg-border-width) solid var(--pg-border);
  border-radius: 0 6px 0 8px;
  background: var(--pg-yellow);
  pointer-events: none;
}

.article-card:nth-child(3n + 2)::before,
.project-card:nth-child(3n + 2)::before,
.session-card:nth-child(3n + 2)::before,
.new-session-card:nth-child(3n + 2)::before,
.roster-import-card:nth-child(3n + 2)::before,
.settings-card:nth-child(3n + 2)::before,
.settings-stat-card:nth-child(3n + 2)::before,
.class-stat-card:nth-child(3n + 2)::before,
.progress-card:nth-child(3n + 2)::before {
  background: var(--pg-pink);
}

.article-card:nth-child(3n)::before,
.project-card:nth-child(3n)::before,
.session-card:nth-child(3n)::before,
.new-session-card:nth-child(3n)::before,
.roster-import-card:nth-child(3n)::before,
.settings-card:nth-child(3n)::before,
.settings-stat-card:nth-child(3n)::before,
.class-stat-card:nth-child(3n)::before,
.progress-card:nth-child(3n)::before {
  background: var(--pg-green);
}

.article-card:hover,
.project-card:hover,
.session-card:hover {
  transform: translate(-1px, -1px) rotate(-0.35deg);
}

.app-modal-backdrop {
  background: rgba(30, 41, 59, 0.56);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0) !important;
}

.app-modal {
  position: relative;
  overflow: visible;
}

.app-modal::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-left: var(--pg-border-width) solid var(--pg-border);
  border-bottom: var(--pg-border-width) solid var(--pg-border);
  border-radius: 0 6px 0 8px;
  background: var(--pg-violet);
  pointer-events: none;
}

/* Dense roster/discussion tables need stronger row rhythm than card surfaces. */
.discussion-grid.operator-table .discussion-row,
.side-panel .roster-operator-sheet .roster-row {
  position: relative;
  border-left-width: 4px;
  border-left-color: color-mix(in srgb, var(--pg-blue) 24%, var(--pg-border-soft));
}

.discussion-grid.operator-table .discussion-row:nth-child(odd),
.side-panel .roster-operator-sheet .roster-row:nth-child(odd) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)),
    color-mix(in srgb, var(--pg-blue) 8%, var(--surface));
}

.discussion-grid.operator-table .discussion-row:nth-child(even),
.side-panel .roster-operator-sheet .roster-row:nth-child(even) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.28)),
    color-mix(in srgb, var(--pg-violet) 6%, var(--surface));
}

.discussion-grid.operator-table .discussion-row:hover,
.side-panel .roster-operator-sheet .roster-row:hover {
  border-left-color: var(--pg-violet);
  background: color-mix(in srgb, var(--pg-yellow) 14%, var(--surface));
}

/* Step 1 dark-mode polish: keep the geometric language, but remove the harsh
   white-wireframe feel from dense live-class surfaces. */
:root[data-theme="dark"] .discussion-grid.operator-table {
  gap: 5px;
}

:root[data-theme="dark"] .discussion-grid.operator-table .grid-row,
:root[data-theme="dark"] .side-panel .roster-operator-sheet .roster-row {
  border-width: 1px;
  border-color: #263347;
  border-left-width: 4px;
  border-left-color: #33445d;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    #111a28;
  box-shadow: none;
}

:root[data-theme="dark"] .discussion-grid.operator-table .discussion-row {
  min-height: 42px;
  padding: 5px 8px 5px 12px;
}

:root[data-theme="dark"] .discussion-grid.operator-table .discussion-row:nth-child(odd),
:root[data-theme="dark"] .side-panel .roster-operator-sheet .roster-row:nth-child(odd) {
  border-left-color: #2c8eb8;
  background:
    linear-gradient(90deg, rgba(44, 142, 184, 0.11), transparent 34%),
    #0f1928;
}

:root[data-theme="dark"] .discussion-grid.operator-table .discussion-row:nth-child(even),
:root[data-theme="dark"] .side-panel .roster-operator-sheet .roster-row:nth-child(even) {
  border-left-color: #4d3d91;
  background:
    linear-gradient(90deg, rgba(124, 77, 255, 0.09), transparent 34%),
    #131d2d;
}

:root[data-theme="dark"] .discussion-grid.operator-table .discussion-row.expanded {
  border-left-color: #219b72;
  background:
    linear-gradient(90deg, rgba(33, 155, 114, 0.14), transparent 38%),
    #142233;
}

:root[data-theme="dark"] .discussion-grid.operator-table .discussion-row:hover,
:root[data-theme="dark"] .side-panel .roster-operator-sheet .roster-row:hover {
  border-color: #3f526d;
  border-left-color: #c99522;
  background:
    linear-gradient(90deg, rgba(201, 149, 34, 0.12), transparent 36%),
    #17243a;
}

:root[data-theme="dark"] .discussion-grid.operator-table .table-header,
:root[data-theme="dark"] .roster-operator-sheet .roster-group-heading.table-header {
  position: relative;
  z-index: 2;
  min-height: 26px;
  border-color: #2a374b;
  background: #0b111c;
  color: #7f8ea3;
  box-shadow: none;
}

.screen-active .side-panel .roster-drawer-body {
  gap: 10px;
}

.screen-active .side-panel .roster-list {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  padding-top: 8px;
}

.screen-active .side-panel .roster-status-group {
  display: grid;
  gap: 7px;
}

.screen-active .side-panel .roster-status-group:first-child .roster-group-heading {
  margin-top: 4px;
}

.roster-filter-banner {
  --filter-accent: var(--pg-blue);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-left: 5px solid var(--filter-accent);
  border-radius: var(--pg-radius-card);
  background: color-mix(in srgb, var(--filter-accent) 11%, var(--surface));
  color: var(--ink);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--pg-shadow-color) 70%, transparent);
}

.roster-filter-banner span {
  color: var(--ink-muted);
  font-family: var(--font-label);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.roster-filter-banner strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-filter-banner.status-available,
.roster-summary-meter.status-available {
  --filter-accent: var(--pg-green);
}

.roster-filter-banner.status-late,
.roster-summary-meter.status-late {
  --filter-accent: var(--pg-yellow);
}

.roster-filter-banner.status-left,
.roster-summary-meter.status-left,
.roster-filter-banner.status-absent,
.roster-summary-meter.status-absent {
  --filter-accent: var(--pg-pink);
}

.roster-summary-meter {
  position: relative;
}

.roster-summary-meter.active,
.roster-summary-meter[aria-pressed="true"] {
  border-color: var(--filter-accent, var(--pg-violet));
  background: color-mix(in srgb, var(--filter-accent, var(--pg-violet)) 20%, var(--surface));
  box-shadow:
    inset 0 0 0 2px var(--filter-accent, var(--pg-violet)),
    3px 3px 0 var(--pg-shadow-color);
}

.roster-summary-meter.active::after,
.roster-summary-meter[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-pill);
  background: var(--filter-accent, var(--pg-violet));
  box-shadow: 2px 2px 0 var(--pg-shadow-color);
}

.roster-summary-meter.active::before,
.roster-summary-meter[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 1;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--pg-on-candy);
  border-bottom: 2px solid var(--pg-on-candy);
  transform: rotate(-45deg);
}

:root[data-theme="dark"] .discussion-grid.operator-table .student-name,
:root[data-theme="dark"] .side-panel .roster-row .student-name {
  color: #d7e0ec;
}

:root[data-theme="dark"] .discussion-grid.operator-table .student-id,
:root[data-theme="dark"] .side-panel .roster-row .student-id {
  color: #748397;
}

:root[data-theme="dark"] .discussion-mark-cell .participation-toggle,
:root[data-theme="dark"] .discussion-presence-toggle-cell .presence-current,
:root[data-theme="dark"] .discussion-presence-toggle-cell .presence-disclosure,
:root[data-theme="dark"] .side-panel .roster-status-select select {
  border-width: 1px;
  border-color: #44546a;
  background: #0c1422;
  color: #c7d2e1;
  box-shadow: none;
}

:root[data-theme="dark"] .discussion-mark-cell .participation-toggle.active,
:root[data-theme="dark"] .rating-button.active,
:root[data-theme="dark"] .participation-toggle.active,
:root[data-theme="dark"] .small-button.active {
  border-color: #2f8c6b;
  background: rgba(33, 155, 114, 0.22);
  color: #bce8d9;
}

:root[data-theme="dark"] .screen-active .side-panel .roster-drawer > summary {
  isolation: isolate;
  min-height: 38px;
  margin: -8px -8px 0;
  padding: 8px 10px 8px;
  border-bottom: 1px solid #263347;
  background: #0f1724;
  box-shadow: 0 8px 0 #0f1724;
}

:root[data-theme="dark"] .screen-active .side-panel .roster-drawer > summary::before {
  content: "";
  position: absolute;
  inset: -10px -10px -8px;
  z-index: -1;
  border-radius: 8px 8px 0 0;
  background: #0f1724;
}

:root[data-theme="dark"] .roster-drawer > summary span:first-child {
  color: #d7e0ec;
  font-size: 1rem;
}

:root[data-theme="dark"] .roster-drawer > summary::after {
  border-color: #7f8ea3;
}

:root[data-theme="dark"] .screen-active .side-panel .roster-summary-board,
:root[data-theme="dark"] .roster-summary-board {
  isolation: isolate;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
  border: 1px solid #263347;
  border-radius: 8px;
  background: #0a101a;
  box-shadow: 0 4px 0 rgba(2, 4, 10, 0.72);
}

:root[data-theme="dark"] .screen-active .side-panel .roster-summary-board {
  position: relative;
  z-index: 3;
  margin: 0 -8px;
}

:root[data-theme="dark"] .screen-active .side-panel .roster-summary-board::before {
  content: none;
}

:root[data-theme="dark"] .roster-summary-meter {
  --meter-accent: #526175;
  min-height: 48px;
  padding: 8px 10px 8px 12px;
  border: 1px solid #2d3a4e;
  border-left: 4px solid var(--meter-accent);
  border-radius: 7px;
  background: #121b2a;
  color: #d7e0ec;
  box-shadow: none;
}

:root[data-theme="dark"] .roster-summary-meter.status-available {
  --meter-accent: #219b72;
  background: #101e25;
}

:root[data-theme="dark"] .roster-summary-meter.status-late,
:root[data-theme="dark"] .roster-summary-meter.status-discussion {
  --meter-accent: #c99522;
  background: #1e1a10;
}

:root[data-theme="dark"] .roster-summary-meter.status-left,
:root[data-theme="dark"] .roster-summary-meter.status-absent {
  --meter-accent: #c95799;
  background: #211522;
}

:root[data-theme="dark"] .roster-summary-meter.status-notSeen {
  --meter-accent: #526175;
}

:root[data-theme="dark"] .roster-summary-meter span {
  color: color-mix(in srgb, var(--meter-accent) 78%, #aebbc9);
}

:root[data-theme="dark"] .roster-summary-meter strong {
  color: #e0e8f2;
  font-size: 1rem;
}

:root[data-theme="dark"] .roster-summary-meter:hover,
:root[data-theme="dark"] .roster-summary-meter.active,
:root[data-theme="dark"] .roster-summary-meter[aria-pressed="true"] {
  border-color: var(--meter-accent);
  border-left-color: var(--meter-accent);
  background: color-mix(in srgb, var(--meter-accent) 13%, #121b2a);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--meter-accent) 82%, transparent),
    0 0 0 1px color-mix(in srgb, var(--meter-accent) 48%, transparent);
  transform: none;
}

:root[data-theme="dark"] .roster-filter-banner {
  background: color-mix(in srgb, var(--filter-accent) 12%, #0b111c);
}

:root[data-theme="dark"] .dashboard-launch-panel,
:root[data-theme="dark"] .settings-stat-card,
:root[data-theme="dark"] .settings-card {
  border-color: #2c394d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0)),
    #101826;
  box-shadow: 5px 5px 0 #02040a;
}

:root[data-theme="dark"] .settings-stat-card,
:root[data-theme="dark"] .settings-card {
  box-shadow: 4px 4px 0 #02040a;
}

:root[data-theme="dark"] .settings-field input,
:root[data-theme="dark"] .settings-card textarea {
  border-color: #34435a;
  background: #0a111d;
  color: #d9e3ee;
}

:root[data-theme="dark"] .settings-file-drop {
  border-color: #3a4b64;
  background:
    radial-gradient(circle at 92% 12%, rgba(44, 142, 184, 0.17) 0 22px, transparent 23px),
    #0b1320;
  box-shadow: inset 0 0 0 1px rgba(44, 142, 184, 0.12);
}

:root[data-theme="dark"] .settings-roster-notes > div {
  border-color: #2d3a4e;
  background: #0c1422;
}

:root[data-theme="dark"] .settings-roster-notes span,
:root[data-theme="dark"] .settings-stat-card small,
:root[data-theme="dark"] .settings-field span {
  color: #8291a7;
}

:root[data-theme="dark"] .roster-settings-titlebar {
  border-bottom-color: #263347;
}

:root[data-theme="dark"] .roster-settings-titlebar h2 {
  color: #d9e3ee;
}

:root[data-theme="dark"] .roster-settings-tools {
  border-color: #29374b;
  background: #0b1320;
  box-shadow: 3px 3px 0 #02040a;
}

:root[data-theme="dark"] .roster-import-compact {
  border-color: #34445c;
  background: #101826;
  box-shadow: 3px 3px 0 #02040a;
}

:root[data-theme="dark"] .roster-settings-row {
  border-color: #2c394d;
  background:
    linear-gradient(90deg, rgba(33, 155, 114, 0.09), transparent 44%),
    #0e1726;
  box-shadow: none;
}

:root[data-theme="dark"] .roster-settings-row:nth-child(even) {
  background:
    linear-gradient(90deg, rgba(44, 142, 184, 0.08), transparent 44%),
    #111b2b;
}

:root[data-theme="dark"] .roster-settings-row.inactive {
  border-color: #314055;
  background:
    linear-gradient(90deg, rgba(201, 87, 153, 0.1), transparent 44%),
    #121827;
}

:root[data-theme="dark"] .roster-settings-identity strong {
  color: #d9e3ee;
}

:root[data-theme="dark"] .roster-settings-identity span {
  color: #77879d;
}

:root[data-theme="dark"] .roster-settings-row.active .roster-mini-button {
  background: #121b2a;
}

:root[data-theme="dark"] .roster-settings-row.inactive .roster-mini-button {
  background: rgba(33, 155, 114, 0.14);
}

.session-report {
  gap: 10px;
}

.report-overview-grid.class-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.report-overview-grid .class-stat-card {
  min-height: 76px;
  gap: 4px;
  padding: 10px 12px;
}

.report-overview-grid .class-stat-card::before {
  width: 16px;
  height: 16px;
}

.report-overview-grid .class-stat-card span,
.report-overview-grid .class-stat-card small {
  font-size: 0.62rem;
  line-height: 1.12;
}

.report-overview-grid .class-stat-card strong {
  font-size: clamp(1.45rem, 1.8vw, 2rem);
}

.report-panel {
  gap: 9px;
  padding: 10px 12px;
  container-type: inline-size;
}

.report-panel > .section-heading {
  min-height: 0;
  margin-bottom: 0;
}

.report-panel > .section-heading h2 {
  font-size: 1rem;
}

.export-panel .report-preset-row {
  gap: 7px;
}

.export-panel .report-preset-row .secondary-button,
.export-panel .report-export-button {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 0.76rem;
  line-height: 1.05;
}

.export-panel .report-export-button {
  width: auto;
  min-width: 168px;
  justify-self: end;
  align-self: end;
  border-radius: var(--pg-radius-pill);
}

.report-export-grid {
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.08fr) minmax(220px, 0.8fr);
  gap: 8px;
}

.report-export-grid fieldset {
  gap: 5px;
  padding: 8px 10px 9px;
}

.report-export-grid legend {
  font-size: 0.62rem;
}

.check-option,
.select-option {
  gap: 6px;
  font-size: 0.74rem;
  line-height: 1.08;
}

.check-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.export-panel .select-option select {
  min-height: 34px;
}

.export-panel .report-export-grid fieldset:last-child {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.export-panel .report-export-grid fieldset:last-child legend {
  grid-column: 1 / -1;
}

.report-activity-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.report-activity-card {
  gap: 4px;
  min-height: 58px;
  padding: 8px 10px;
}

.report-activity-card span,
.report-activity-card small {
  font-size: 0.6rem;
  line-height: 1.08;
}

.report-activity-card strong {
  font-size: 1rem;
}

.report-student-table .report-edit-row {
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 0 6px 8px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

@container (min-width: 981px) {
  .report-student-table .grid-row {
    grid-template-columns: minmax(142px, 1.08fr) minmax(76px, 0.54fr) minmax(62px, 0.38fr) minmax(58px, 0.36fr) minmax(70px, 0.44fr) minmax(74px, 0.46fr) minmax(74px, 0.46fr) minmax(152px, 0.78fr);
    min-width: 880px;
  }
}

.report-score-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 148px;
}

.report-score-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}

.report-square-action {
  --action-tone: var(--pg-violet);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: color-mix(in srgb, var(--action-tone) 16%, var(--surface));
  color: var(--ink);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 68%, transparent);
  cursor: pointer;
  line-height: 1;
  transition: transform 160ms var(--pg-bounce), box-shadow 160ms ease, background 160ms ease;
}

.report-square-action:hover,
.report-square-action:focus-visible,
.report-square-action.active {
  background: color-mix(in srgb, var(--action-tone) 28%, var(--surface));
  transform: translate(-1px, -1px);
}

.report-square-action:active {
  box-shadow: 1px 1px 0 color-mix(in srgb, var(--pg-shadow-color) 70%, transparent);
  transform: translate(1px, 1px);
}

.report-square-action.copied {
  animation: copy-button-pop 540ms var(--pg-bounce);
  background: color-mix(in srgb, var(--pg-green) 72%, var(--surface));
  color: var(--pg-on-candy);
  transform: scale(1.16);
}

.report-square-action.copied::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--pg-border);
  border-radius: var(--pg-radius-pill);
  background: var(--pg-green);
  box-shadow: 1px 1px 0 var(--pg-shadow-color);
}

.report-square-action.copied::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 1;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--pg-on-candy);
  border-bottom: 2px solid var(--pg-on-candy);
  transform: rotate(-45deg);
}

.report-square-action.copy {
  --action-tone: var(--pg-blue);
}

.report-square-action.stats {
  --action-tone: var(--pg-green);
}

.report-square-action.correction {
  --action-tone: var(--pg-violet);
  background: color-mix(in srgb, var(--pg-violet) 70%, var(--surface));
  color: #ffffff;
}

.report-square-action.correction.active::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--pg-border);
  border-radius: 3px;
  background: var(--pg-yellow);
  box-shadow: 1px 1px 0 var(--pg-shadow-color);
}

.report-square-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-square-action.copy,
.report-square-action.stats {
  color: var(--pg-on-candy);
}

.report-square-action.copy {
  background: color-mix(in srgb, var(--pg-blue) 72%, var(--surface));
}

.report-square-action.stats {
  background: color-mix(in srgb, var(--pg-green) 74%, var(--surface));
}

.copy-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pg-green) 22%, transparent), transparent 54%),
    var(--surface);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--pg-shadow-color);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.96);
  transition: opacity 180ms ease, transform 220ms var(--pg-bounce);
}

.copy-toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes copy-button-pop {
  0% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.22) rotate(-2deg);
  }
  100% {
    transform: scale(1.16);
  }
}

.report-edit-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pg-violet) 10%, transparent), transparent 42%),
    var(--surface-2);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--pg-shadow-color) 72%, transparent);
}

.report-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.report-score-editor-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.report-score-editor-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: var(--pg-border-width) solid color-mix(in srgb, var(--pg-border) 74%, var(--pg-border-soft));
  border-radius: var(--pg-radius-card);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--pg-blue) 4%, transparent), transparent),
    color-mix(in srgb, var(--surface) 84%, var(--surface-2));
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 54%, transparent);
}

.report-score-editor-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-bottom: 2px;
}

.report-score-editor-label strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9rem;
  line-height: 1;
}

.report-score-editor-label span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.66rem;
  font-weight: 760;
  line-height: 1.15;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-session-edit-grid,
.report-presence-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-filler-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.report-edit-field,
.field-control.compact-select {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-edit-field span,
.field-control.compact-select span,
.report-edit-stepper > span {
  color: var(--ink-muted);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.report-edit-field select,
.field-control.compact-select select {
  width: 100%;
  min-height: 34px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 62%, transparent);
}

.report-edit-stepper {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: var(--pg-border-width) solid color-mix(in srgb, var(--pg-border) 74%, var(--pg-border-soft));
  border-radius: var(--pg-radius-card);
  background: var(--surface);
}

.nevermet-control-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.nevermet-control-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: var(--pg-border-width) solid var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: var(--module-gradient), var(--surface);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--pg-shadow-color) 70%, transparent);
}

.nevermet-control-card .section-heading {
  margin-bottom: 0;
}

.nevermet-pool-list {
  display: grid;
  gap: 7px;
  max-height: 172px;
  overflow: auto;
  padding-right: 2px;
}

.nevermet-pool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: var(--pg-border-width) solid color-mix(in srgb, var(--pg-border) 70%, var(--pg-border-soft));
  border-radius: var(--pg-radius-card);
  background: color-mix(in srgb, var(--surface-2) 78%, var(--surface));
}

.nevermet-pool-row .student-meta {
  min-width: 0;
}

.nevermet-pool-row .student-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nevermet-pool-row .status-pill {
  flex: 0 0 auto;
}

.nevermet-pool-empty {
  min-height: 46px;
  margin: 0;
  padding: 9px 10px;
  border: var(--pg-border-width) dashed color-mix(in srgb, var(--pg-border) 50%, transparent);
  border-radius: var(--pg-radius-card);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  font-weight: 720;
  line-height: 1.25;
}

.nevermet-manual-pair-panel {
  align-content: start;
}

.nevermet-manual-pair-panel .secondary-button {
  width: 100%;
  justify-content: center;
}

.skip-student-button {
  width: 100%;
  justify-content: center;
  min-height: 32px;
  margin-top: 2px;
}

:root[data-theme="dark"] .report-edit-panel,
:root[data-theme="dark"] .nevermet-control-card {
  background:
    linear-gradient(135deg, rgba(124, 77, 255, 0.08), transparent 45%),
    #0f1724;
}

:root[data-theme="dark"] .report-square-action {
  background: color-mix(in srgb, var(--action-tone) 16%, #0b111c);
}

:root[data-theme="dark"] .report-square-action.copy {
  background: color-mix(in srgb, var(--pg-blue) 58%, #0b111c);
}

:root[data-theme="dark"] .report-square-action.stats {
  background: color-mix(in srgb, var(--pg-green) 58%, #0b111c);
}

:root[data-theme="dark"] .report-square-action.correction {
  background: color-mix(in srgb, var(--pg-violet) 62%, #0b111c);
  color: #f7fbff;
}

:root[data-theme="dark"] .report-square-action:hover,
:root[data-theme="dark"] .report-square-action:focus-visible,
:root[data-theme="dark"] .report-square-action.active {
  background: color-mix(in srgb, var(--action-tone) 23%, #0b111c);
}

:root[data-theme="dark"] .report-square-action.copied {
  background: color-mix(in srgb, var(--pg-green) 72%, #0b111c);
}

:root[data-theme="dark"] .copy-toast {
  background:
    linear-gradient(135deg, rgba(33, 155, 114, 0.2), transparent 54%),
    #0f1724;
}

:root[data-theme="dark"] .report-edit-field select,
:root[data-theme="dark"] .field-control.compact-select select,
:root[data-theme="dark"] .report-edit-stepper,
:root[data-theme="dark"] .nevermet-pool-row {
  background: #0b111c;
}

:root[data-theme="dark"] .nevermet-pool-empty {
  background: #0b111c;
}

/* Final geometric reinforcement pass across both themes. */
:root[data-theme="light"] .primary-button,
:root[data-theme="light"] .go-live-button,
:root[data-theme="light"] .command-cluster .primary-button,
:root[data-theme="light"] .timer-actions .primary-button,
:root[data-theme="light"] .flow-actions .primary-button {
  border-color: #0b4f31;
  background: #0f6f43;
  color: #ffffff;
}

:root[data-theme="light"] .nav-button.active {
  border-color: var(--pg-border);
  background: color-mix(in srgb, var(--nav-accent) 28%, var(--surface));
  color: var(--ink);
  box-shadow: var(--pg-shadow-sm);
}

:root[data-theme="light"] .nav-button.active .nav-icon {
  border-color: var(--pg-border);
  background: var(--nav-accent);
  color: var(--pg-on-candy);
}

.screen-active :is(.program-card, .tf-program-monitor, .timer-card, .tf-instrument, .presence-console-card, .operator-queue) {
  border-width: var(--pg-border-width);
  border-color: var(--pg-border);
  border-radius: var(--pg-radius-card);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--pg-shadow-color) 74%, transparent);
}

.screen-active :is(.timer-actions, .flow-actions, .timer-turn-nav) {
  border-width: var(--pg-border-width);
  border-color: color-mix(in srgb, var(--pg-border) 86%, var(--pg-border-soft));
  border-radius: var(--pg-radius-card);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--pg-shadow-color) 64%, transparent);
}

.screen-active :is(.timer-actions > button, .flow-actions > button, .timer-turn-nav .review-nav > button) {
  border-width: var(--pg-border-width);
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 70%, transparent);
}

:root[data-theme="dark"] .screen-active :is(.program-card, .tf-program-monitor, .timer-card, .tf-instrument, .presence-console-card, .operator-queue) {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--active-accent, var(--pg-violet)) 10%, transparent), transparent 45%),
    var(--module-gradient),
    var(--surface);
}

:root[data-theme="dark"] .status-pill.notSeen {
  border-color: color-mix(in srgb, var(--pg-pink) 52%, var(--pg-border));
  background: color-mix(in srgb, var(--pg-pink) 50%, #0b111c);
  color: #f7fbff;
}

@container (max-width: 980px) {
  .report-student-table .report-student-row > .report-score-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
  }

  .report-student-table .report-student-row > .report-score-actions::before {
    margin-right: auto;
  }

  .report-student-table .report-square-action {
    width: 36px;
    height: 36px;
  }

  .report-student-table .report-square-action svg {
    width: 17px;
    height: 17px;
  }
}

/* Session reports should always stay in row-table form; narrow panes scroll sideways. */
.report-student-table {
  overflow-x: auto !important;
  overflow-y: visible;
}

.report-student-table .grid-row {
  grid-template-columns: minmax(150px, 1.16fr) minmax(52px, 0.34fr) minmax(54px, 0.34fr) minmax(54px, 0.34fr) minmax(54px, 0.34fr) minmax(58px, 0.36fr) minmax(58px, 0.36fr) minmax(142px, 0.72fr) !important;
  min-width: 760px !important;
  gap: 5px;
  align-items: center;
  padding: 4px 6px;
}

.presentation-report .presentation-score-table .grid-row {
  grid-template-columns: minmax(220px, 1.25fr) minmax(112px, 0.72fr) minmax(72px, 0.45fr) minmax(82px, 0.5fr) minmax(150px, 0.9fr) minmax(116px, 0.62fr) minmax(126px, 0.68fr) !important;
  min-width: 980px !important;
}

.presentation-report .presentation-participation-table .grid-row {
  grid-template-columns: minmax(220px, 1.35fr) minmax(110px, 0.65fr) minmax(120px, 0.72fr) minmax(120px, 0.72fr) minmax(140px, 0.8fr) minmax(92px, 0.46fr) !important;
  min-width: 900px !important;
}

.report-student-table .table-header {
  display: grid !important;
}

.report-student-table .table-header > [role="columnheader"] {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.58rem;
  letter-spacing: 0.025em;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.report-student-table .report-student-row > [role="cell"],
.report-student-table .table-header > [role="columnheader"] {
  min-height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.report-student-table .report-student-row > [role="cell"]::before,
.report-student-table .report-score-cell::before,
.report-student-table .report-score-actions::before {
  display: none !important;
  content: none !important;
}

.report-student-table .report-student-row > [role="cell"]:first-child,
.report-student-table .report-score-cell {
  grid-column: auto !important;
}

.report-student-table .report-score-cell {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  min-height: auto !important;
  border-color: transparent !important;
}

.report-student-table .report-score-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-height: auto !important;
  padding: 0 !important;
}

.report-student-table .status-pill[data-short-label] {
  min-width: 22px;
  min-height: 16px;
  max-width: 100%;
  padding: 1px 4px;
  font-size: 0.54rem;
  line-height: 1;
}

.report-student-table .status-pill[data-short-label] .status-label {
  display: none;
}

.report-student-table .status-pill[data-short-label]::after {
  content: attr(data-short-label);
}

/* Report mode should use the whole work area; the hidden live roster must not reserve a column. */
.screen-active.screen-report .workspace {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.screen-active.screen-report .content-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: stretch;
}

.screen-active.screen-report .main-column,
.screen-active.screen-report .main-panel,
.screen-active.screen-report .session-report,
.screen-active.screen-report .report-panel,
.screen-active.screen-report .report-student-table {
  width: 100%;
  max-width: none;
}

.screen-active.screen-report .side-panel {
  display: none !important;
}

/* Dense student rows need a stronger scanning rhythm in both report and discussion views. */
.screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row) {
  --scan-row-accent: var(--pg-blue);
  --scan-row-bg: color-mix(in srgb, var(--scan-row-accent) 7%, var(--surface));
  --scan-row-wash: color-mix(in srgb, var(--scan-row-accent) 12%, transparent);
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--pg-border) 82%, var(--scan-row-accent)) !important;
  border-left-width: 5px !important;
  border-left-color: var(--scan-row-accent) !important;
  background:
    linear-gradient(90deg, var(--scan-row-wash), transparent 34%),
    var(--scan-row-bg) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.5),
    0 1px 0 color-mix(in srgb, var(--pg-border) 34%, transparent);
}

.screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):nth-child(4n+2) {
  --scan-row-accent: var(--pg-blue);
}

.screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):nth-child(4n+3) {
  --scan-row-accent: var(--pg-green);
}

.screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):nth-child(4n+4) {
  --scan-row-accent: var(--pg-violet);
}

.screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):nth-child(4n+5) {
  --scan-row-accent: var(--pg-yellow);
}

.screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):hover,
.screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):focus-within {
  --scan-row-bg: color-mix(in srgb, var(--scan-row-accent) 14%, var(--surface));
  --scan-row-wash: color-mix(in srgb, var(--scan-row-accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--scan-row-accent) 70%, var(--pg-border)) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.62),
    0 0 0 1px color-mix(in srgb, var(--scan-row-accent) 24%, transparent);
}

.screen-active .discussion-grid.operator-table .discussion-row.expanded {
  --scan-row-accent: var(--pg-green);
  --scan-row-bg: color-mix(in srgb, var(--pg-green) 13%, var(--surface));
}

:root[data-theme="dark"] .screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row) {
  --scan-row-bg: color-mix(in srgb, var(--scan-row-accent) 10%, #0f1724);
  --scan-row-wash: color-mix(in srgb, var(--scan-row-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--scan-row-accent) 36%, #263347) !important;
  background:
    linear-gradient(90deg, var(--scan-row-wash), transparent 38%),
    var(--scan-row-bg) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.04),
    0 1px 0 rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):hover,
:root[data-theme="dark"] .screen-active :is(.discussion-grid.operator-table .discussion-row, .report-student-table .report-student-row):focus-within {
  --scan-row-bg: color-mix(in srgb, var(--scan-row-accent) 16%, #111b2a);
  --scan-row-wash: color-mix(in srgb, var(--scan-row-accent) 26%, transparent);
  border-color: color-mix(in srgb, var(--scan-row-accent) 60%, #3f526d) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px color-mix(in srgb, var(--scan-row-accent) 28%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .nav-button:hover,
  .article-card:hover,
  .project-card:hover,
  .session-card:hover,
  .primary-button:hover:not(:disabled),
  .secondary-button:hover:not(:disabled),
  .ghost-button:hover:not(:disabled),
  .danger-button:hover:not(:disabled),
  .small-button:hover:not(:disabled),
  .rating-button:hover:not(:disabled),
  .filler-button:hover:not(:disabled),
  .stepper-button:hover:not(:disabled),
  .participation-toggle:hover:not(:disabled),
  .presence-disclosure:hover:not(:disabled),
  .system-button:hover:not(:disabled),
  .home-button:hover,
  .icon-button:hover,
  .report-square-action:hover,
  .report-square-action.copied {
    transform: none;
  }
}

@media (max-width: 980px) {
  .roster-settings-layout {
    grid-template-columns: 1fr;
  }

  .roster-settings-title-actions {
    align-items: stretch;
  }

  .roster-add-toggle {
    min-width: 0;
  }

  .report-edit-grid,
  .report-presence-edit-grid,
  .report-filler-edit-grid,
  .nevermet-control-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --pg-shadow-sm: 2px 2px 0 var(--pg-shadow-color);
    --pg-shadow-md: 3px 3px 0 var(--pg-shadow-color);
    --pg-shadow-lg: 4px 4px 0 var(--pg-shadow-color);
    --pg-shadow-soft: 3px 3px 0 #dbe5f0;
  }

  .screen-launcher .workspace,
  .screen-class-home .workspace {
    padding-inline: 12px;
  }

  .screen-launcher .main-panel,
  .screen-class-home .main-panel,
  .launcher.library-manager,
  .library-toolbar,
  .project-section,
  .file-manager-list,
  .empty-state,
  .archive-drawer {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  .library-toolbar .command-cluster {
    width: 100%;
  }

  .library-toolbar .command-cluster > button {
    flex: 1 1 0;
    min-width: 0;
  }

  .left-rail,
  .studio-bar,
  .top-bar,
  .setup-strip,
  .main-panel,
  .side-panel,
  .log-panel,
  .library-toolbar,
  .cloud-auth-panel,
  .cloud-account-panel,
  .cloud-beta-panel,
  .preflight-panel,
  .report-panel,
  .roster-import-panel,
  .settings-card,
  .settings-stat-card,
  .class-file-row,
  .session-file-row,
  .class-stat-card,
  .new-session-card,
  .speaker-card,
  .timer-card,
  .presence-card,
  .filler-card,
  .tf-program-monitor,
  .tf-instrument,
  .speaker-tracking-card,
  .article-card,
  .project-card,
  .session-card,
  .progress-card,
  .app-modal {
    box-shadow: var(--pg-shadow-sm);
  }
}

.screen-active .session-log:not(.event-timeline) {
  max-height: none;
  overflow: visible;
}

.screen-active .session-log:has(.session-ticker[open]),
.screen-active .session-ticker-expanded {
  max-height: none;
  overflow: visible;
}

.extra-credit-student-option input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
}

.screen-active.screen-report .report-workbench {
  gap: 12px;
}

.screen-active.screen-report .report-workbench-grid {
  grid-template-columns: minmax(380px, 465px) minmax(600px, 1fr);
  gap: 12px;
  align-items: start;
}

.screen-active.screen-report .report-workbench-side {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-items: start;
  position: sticky;
  top: 10px;
  align-self: start;
  max-height: calc(100vh - 132px);
  overflow: auto;
}

.screen-active.screen-report .report-command-bar {
  gap: 10px;
  padding: 12px;
}

.screen-active.screen-report .report-command-main {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.screen-active.screen-report .report-command-title h2 {
  font-size: 1.02rem;
}

.screen-active.screen-report .report-command-title span {
  font-size: 0.72rem;
}

.screen-active.screen-report .report-command-stats {
  gap: 6px;
}

.screen-active.screen-report .report-command-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.screen-active.screen-report .report-command-stat {
  min-width: 68px;
  padding: 6px 8px;
  border-width: var(--pg-border-width);
  border-color: var(--pg-border);
  border-radius: var(--pg-radius-card);
  background: color-mix(in srgb, var(--pg-blue) 8%, var(--surface));
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 54%, transparent);
}

.screen-active.screen-report .report-command-actions {
  gap: 7px;
}

.screen-active.screen-report .report-command-actions button {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.76rem;
}

.screen-active.screen-report .report-export-trigger {
  min-height: 34px;
  min-width: 128px;
  padding: 6px 12px;
  border-width: var(--pg-border-width);
  border-color: var(--pg-border);
  border-radius: var(--pg-radius-pill);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--pg-violet) 20%, transparent), transparent),
    color-mix(in srgb, var(--surface-2) 88%, transparent);
  color: var(--ink);
  font-size: 0.76rem;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    3px 3px 0 var(--pg-shadow-color);
}

.screen-active.screen-report .report-export-trigger svg {
  width: 15px;
  height: 15px;
}

.screen-active.screen-report .report-export-menu[open] .report-export-trigger {
  background: var(--pg-violet);
  color: var(--pg-on-candy);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--pg-shadow-color);
}

.screen-active.screen-report .report-export-popover {
  gap: 10px;
  padding: 12px;
  border-width: var(--pg-border-width);
  border-color: var(--pg-border);
  border-radius: var(--pg-radius-card);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pg-blue) 9%, transparent), transparent 52%),
    var(--module-gradient),
    var(--surface);
  box-shadow: 6px 6px 0 var(--pg-shadow-color);
}

.screen-active.screen-report .report-export-popover-header strong {
  font-size: 1rem;
}

.screen-active.screen-report .report-export-popover-header span {
  font-size: 0.72rem;
}

.screen-active.screen-report .report-export-popover .report-export-grid fieldset:last-child {
  grid-template-columns: 1fr;
}

.screen-active.screen-report .report-export-popover .report-export-button {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.screen-active.screen-report .report-export-options {
  overflow: hidden;
  border-width: var(--pg-border-width);
  border-color: color-mix(in srgb, var(--pg-border) 84%, transparent);
  border-radius: var(--pg-radius-card);
  background: color-mix(in srgb, var(--pg-blue) 5%, var(--surface));
}

.screen-active.screen-report .report-export-options .report-export-summary {
  min-height: 40px;
  padding: 8px 10px;
}

.screen-active.screen-report .report-export-options .report-export-body {
  padding: 10px;
}

.screen-active.screen-report .report-workbench-main .report-student-table .grid-row:not(.report-edit-row) {
  grid-template-columns: minmax(190px, 255px) 58px minmax(60px, 1fr) !important;
  min-width: 360px !important;
  gap: 8px;
  padding: 3px 6px;
}

.screen-active.screen-report .report-workbench-main .report-student-table .table-header > [role="columnheader"]:nth-child(2) {
  text-align: center;
}

.screen-active.screen-report .report-workbench-main .report-student-table .table-header > [role="columnheader"]:nth-child(3) {
  padding-right: 2px !important;
  text-align: right;
}

.screen-active.screen-report .report-workbench-side .extra-credit-report-table .grid-row:not(.report-edit-row) {
  grid-template-columns: minmax(150px, 1fr) minmax(54px, 0.34fr) minmax(54px, 0.34fr) minmax(66px, 0.42fr) minmax(82px, 0.5fr) minmax(126px, 0.76fr) minmax(116px, 0.62fr) !important;
  min-width: 700px !important;
}

.screen-active.screen-report .report-workbench-main .report-student-table .report-edit-row {
  grid-template-columns: minmax(0, 1fr) !important;
  min-width: 0 !important;
}

.screen-active.screen-report .report-student-identity-cell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  min-width: 0;
}

.screen-active.screen-report .report-student-select {
  border-radius: 4px;
  color: inherit;
}

.screen-active.screen-report .report-student-select .student-meta {
  gap: 1px;
}

.screen-active.screen-report .report-inline-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.screen-active.screen-report .report-copy-cell {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.screen-active.screen-report .report-inline-actions .report-square-action {
  width: 24px;
  height: 24px;
}

.screen-active.screen-report .report-inline-actions .report-square-action svg {
  width: 13px;
  height: 13px;
}

.screen-active.screen-report .report-workbench-main .report-student-table .report-score-cell {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-content: end !important;
  gap: 2px;
  min-width: 0 !important;
  text-align: right;
}

.screen-active.screen-report .report-workbench-main .report-student-table .report-score-cell .report-cell-note {
  margin-top: 0;
  color: color-mix(in srgb, var(--ink-muted) 72%, transparent);
}

.screen-active.screen-report .report-workbench-main .report-student-row.selected {
  --scan-row-accent: var(--pg-green);
  --scan-row-bg: color-mix(in srgb, var(--pg-green) 18%, var(--surface));
  --scan-row-wash: color-mix(in srgb, var(--pg-green) 28%, transparent);
  border-color: color-mix(in srgb, var(--pg-green) 74%, var(--pg-border)) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.16),
    0 0 0 2px color-mix(in srgb, var(--pg-green) 20%, transparent);
}

.screen-active.screen-report .report-student-inspector {
  gap: 10px;
  max-height: none;
  overflow: visible;
  border-color: color-mix(in srgb, var(--pg-green) 38%, var(--pg-border));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pg-green) 9%, transparent), transparent 46%),
    var(--module-gradient),
    var(--surface);
}

.screen-active.screen-report .report-inspector-header {
  gap: 10px;
}

.screen-active.screen-report .report-inspector-student {
  gap: 4px;
}

.screen-active.screen-report .report-inspector-name-line {
  gap: 8px;
}

.screen-active.screen-report .report-inspector-status-badge {
  width: 1.45em;
  height: 1.45em;
  border-width: var(--pg-border-width);
  border-color: color-mix(in srgb, var(--pg-green) 76%, var(--pg-border));
  background: var(--pg-green);
  color: var(--pg-on-candy);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    2px 2px 0 color-mix(in srgb, var(--pg-shadow-color) 64%, transparent);
}

.screen-active.screen-report .report-inspector-status-badge.late {
  border-color: color-mix(in srgb, var(--pg-blue) 74%, var(--pg-border));
  background: var(--pg-blue);
}

.screen-active.screen-report .report-inspector-status-badge.left,
.screen-active.screen-report .report-inspector-status-badge.absent,
.screen-active.screen-report .report-inspector-status-badge.notSeen {
  border-color: color-mix(in srgb, var(--pg-yellow) 72%, var(--pg-border));
  background: var(--pg-yellow);
}

.screen-active.screen-report .report-inspector-score {
  min-width: 100px;
}

.screen-active.screen-report .report-inspector-score strong {
  color: var(--ink);
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
}

.screen-active.screen-report .report-inspector-actions {
  grid-template-columns: repeat(2, minmax(170px, 280px));
  justify-content: center;
  gap: 7px;
}

.screen-active.screen-report .report-inspector-actions button {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 0.74rem;
  line-height: 1.08;
}

.screen-active.screen-report .report-breakdown-grid {
  gap: 0;
  border-top: var(--pg-border-width) solid color-mix(in srgb, var(--pg-border) 78%, transparent);
  border-bottom: var(--pg-border-width) solid color-mix(in srgb, var(--pg-border) 78%, transparent);
}

.screen-active.screen-report .report-breakdown-row {
  grid-template-columns: minmax(74px, 0.5fr) minmax(58px, 0.34fr) minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom-color: color-mix(in srgb, var(--pg-border) 58%, transparent);
}

.screen-active.screen-report .report-breakdown-row strong {
  font-size: 0.8rem;
}

.screen-active.screen-report .report-breakdown-row small {
  font-size: 0.7rem;
}

.screen-active.screen-report .report-inspector-corrections .report-edit-panel {
  gap: 9px;
}

.screen-active.screen-report .report-inspector-corrections .report-score-editor-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.screen-active.screen-report .report-inspector-corrections .report-score-editor-group {
  min-height: 126px;
  padding: 12px;
}

.screen-active.screen-report .report-inspector-corrections .report-score-editor-group:nth-child(3) {
  grid-column: 1 / -1;
}

.screen-active.screen-report .report-inspector-corrections .report-session-edit-grid,
.screen-active.screen-report .report-inspector-corrections .report-presence-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-active.screen-report .report-inspector-corrections .report-filler-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screen-active.screen-report .report-inspector-corrections .report-edit-field select {
  min-height: 42px;
}

.screen-active.screen-report .report-inspector-corrections .compact-filler {
  grid-template-columns: 52px minmax(96px, 1fr) 52px;
}

.screen-active.screen-report .report-inspector-corrections .filler-total {
  min-height: 58px;
}

@media (max-width: 1240px) {
  .screen-active.screen-report .report-workbench-grid {
    grid-template-columns: 1fr;
  }

  .screen-active.screen-report .report-workbench-side,
  .screen-active.screen-report .report-student-inspector {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 860px) {
  .screen-active.screen-report .report-command-main,
  .screen-active.screen-report .report-inspector-header {
    grid-template-columns: 1fr;
  }

  .screen-active.screen-report .report-command-stats {
    justify-content: flex-start;
  }

  .screen-active.screen-report .report-command-controls {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .screen-active.screen-report .report-export-menu,
  .screen-active.screen-report .report-export-trigger {
    width: 100%;
  }

  .screen-active.screen-report .report-export-popover {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 10px;
  }

  .screen-active.screen-report .report-session-edit-grid,
  .screen-active.screen-report .report-presence-edit-grid,
  .screen-active.screen-report .report-filler-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen-active.screen-report .report-inspector-corrections .report-score-editor-stack {
    grid-template-columns: 1fr;
  }

  .screen-active.screen-report .report-inspector-corrections .report-score-editor-group:nth-child(3) {
    grid-column: auto;
  }

  .screen-active.screen-report .report-score-editor-label {
    display: grid;
    justify-content: stretch;
  }

  .screen-active.screen-report .report-score-editor-label span {
    text-align: left;
    white-space: normal;
  }

  .screen-active.screen-report .report-command-actions,
  .screen-active.screen-report .report-inspector-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/*
  2026 production-console pass.
  This section intentionally overrides the earlier playful geometric skin while
  keeping every existing class, id, and data hook intact.
*/

:root {
  --console-black: #07090c;
  --console-ink: #f5f7fb;
  --console-ink-soft: #c8d0dc;
  --console-muted: #8c97a8;
  --console-panel: #11151c;
  --console-panel-2: #171c25;
  --console-panel-3: #202632;
  --console-rail: #0b0e13;
  --console-line: #2a3140;
  --console-line-bright: #3c4658;
  --console-green: #38d27d;
  --console-cyan: #35d6ff;
  --console-blue: #5aa8ff;
  --console-amber: #ffbf4d;
  --console-red: #ff5d5d;
  --console-magenta: #d36bff;
  --console-radius: 8px;
  --console-radius-tight: 6px;
  --console-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
  --console-shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.22);
  --console-inset: inset 0 1px rgba(255, 255, 255, 0.09), inset 0 -1px rgba(0, 0, 0, 0.52);
  --console-control-shadow: var(--console-inset), 0 1px 1px rgba(0, 0, 0, 0.34), 0 8px 18px rgba(0, 0, 0, 0.16);
  --active-accent: var(--console-cyan);
}

:root[data-theme="dark"] {
  --bg: var(--console-black);
  --surface: var(--console-panel);
  --surface-2: var(--console-panel-2);
  --surface-3: var(--console-panel-3);
  --surface-raised: #202633;
  --ink: var(--console-ink);
  --ink-soft: var(--console-ink-soft);
  --ink-muted: var(--console-muted);
  --ink-subtle: #6f7b8f;
  --line: var(--console-line);
  --line-strong: var(--console-line-bright);
  --nav: var(--console-rail);
  --nav-2: #10141b;
  --nav-3: #1b2230;
  --nav-ink: var(--console-ink);
  --nav-muted: #929daf;
  --accent: var(--console-green);
  --accent-strong: #78e7a8;
  --blue: var(--console-blue);
  --amber: var(--console-amber);
  --red: var(--console-red);
  --green: var(--console-green);
  --cyan: var(--console-cyan);
  --magenta: var(--console-magenta);
  --monitor: #05070a;
  --monitor-2: #0b1017;
  --monitor-ink: var(--console-ink);
  --module-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  --module-shadow: var(--console-inset), var(--console-shadow-soft);
  --hardware-shadow: var(--console-control-shadow);
  --control-shadow: var(--console-control-shadow);
}

:root[data-theme="light"] {
  --console-black: #eef3f8;
  --console-ink: #111827;
  --console-ink-soft: #334155;
  --console-muted: #647084;
  --console-panel: #ffffff;
  --console-panel-2: #f4f7fb;
  --console-panel-3: #e7edf5;
  --console-rail: #f7fafc;
  --console-line: #d3dbe7;
  --console-line-bright: #aeb9c9;
  --console-shadow: 0 18px 44px rgba(23, 31, 45, 0.14);
  --console-shadow-soft: 0 10px 28px rgba(23, 31, 45, 0.1);
  --console-inset: inset 0 1px rgba(255, 255, 255, 0.82), inset 0 -1px rgba(15, 23, 42, 0.08);
  --console-control-shadow: var(--console-inset), 0 1px 1px rgba(23, 31, 45, 0.08), 0 7px 18px rgba(23, 31, 45, 0.1);
  --bg: #edf2f7;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --surface-3: #e9eff7;
  --surface-raised: #ffffff;
  --ink: #111827;
  --ink-soft: #334155;
  --ink-muted: #667386;
  --line: #d4dce7;
  --line-strong: #aeb9c9;
  --nav: #f8fafc;
  --nav-2: #eef3f8;
  --nav-3: #e4eaf2;
  --nav-ink: #101722;
  --nav-muted: #647084;
  --accent: #147b6c;
  --accent-strong: #0f5d52;
  --blue: #246bd1;
  --amber: #9f6411;
  --red: #c83f3f;
  --green: #168a53;
  --cyan: #0b7fa3;
  --magenta: #8f45c9;
}

body[data-activity="wins"] { --active-accent: var(--console-green); }
body[data-activity="discussion"] { --active-accent: var(--console-blue); }
body[data-activity="thinkFast"] { --active-accent: var(--console-amber); }
body[data-activity="neverMet"] { --active-accent: var(--console-magenta); }
body[data-activity="extraCredit"] { --active-accent: var(--console-cyan); }
body[data-activity="presentations"] { --active-accent: var(--console-cyan); }
body[data-activity="takeaways"] { --active-accent: var(--console-green); }

body,
:root[data-theme="dark"] body,
:root[data-theme="light"] body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 220px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 28px),
    var(--bg);
  color: var(--ink);
}

:root[data-theme="light"] body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent 260px),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.035) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(180deg, rgba(15, 23, 42, 0.025) 0 1px, transparent 1px 30px),
    var(--bg);
}

body::before {
  background:
    linear-gradient(90deg, rgba(56, 210, 125, 0.09), transparent 18%, transparent 76%, rgba(53, 214, 255, 0.075)),
    linear-gradient(180deg, transparent 0 72%, rgba(0, 0, 0, 0.18));
}

:root[data-theme="light"] body::before {
  background:
    linear-gradient(90deg, rgba(20, 123, 108, 0.08), transparent 20%, transparent 78%, rgba(36, 107, 209, 0.065)),
    linear-gradient(180deg, transparent 0 72%, rgba(100, 116, 139, 0.08));
}

body::after {
  content: none;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--console-magenta) 56%, var(--line));
  border-radius: var(--console-radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--console-magenta) 22%, transparent), transparent),
    color-mix(in srgb, var(--surface) 88%, black);
  color: var(--ink);
  padding: 0 16px;
  box-shadow: var(--console-shadow);
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateY(10px) scale(0.98);
  transition: opacity 180ms ease, transform 240ms cubic-bezier(.2, .9, .2, 1);
}

body.rostra-afterhours::after {
  content: "ROSTRA AFTER HOURS";
  opacity: 1;
  transform: translateY(0) scale(1);
}

.screen-cloud-auth #homeButton,
.screen-cloud-auth #saveStatus,
.screen-cloud-auth #openDisplayButton,
.screen-cloud-auth #saveStateButton,
.screen-cloud-auth #cloudAccountMenu {
  display: none !important;
}

.studio-bar,
.console-chrome {
  border-bottom: 1px solid color-mix(in srgb, var(--active-accent) 26%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--active-accent) 16%, transparent), transparent 42%, rgba(255, 255, 255, 0.045)),
    linear-gradient(180deg, color-mix(in srgb, var(--nav-2) 96%, transparent), var(--nav));
  box-shadow: var(--console-inset), 0 12px 34px rgba(0, 0, 0, 0.32);
}

.studio-bar::after {
  height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--active-accent) 84%, white), transparent);
  opacity: 0.74;
}

.timer-running .studio-bar::after {
  animation: rostra-scan 1.9s linear infinite;
}

.tally-light {
  border: 1px solid color-mix(in srgb, var(--active-accent) 54%, #ffffff);
  background: var(--active-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--active-accent) 16%, transparent), 0 0 20px color-mix(in srgb, var(--active-accent) 62%, transparent);
}

.timer-running .tally-light {
  animation: rostra-tally 1.2s ease-in-out infinite;
}

.studio-label,
.brand-name,
.activity-title h1,
.section-heading h2,
.library-title-block h1,
.class-dashboard-title h1 {
  color: var(--ink);
  font-weight: 820;
}

.studio-bar .studio-label,
.studio-bar .studio-mode,
.studio-bar .context-chip,
.studio-bar .save-status {
  color: var(--nav-ink);
}

.studio-mode,
.top-context,
.save-status,
.theme-toggle-switch,
.save-state-button,
.cloud-account-summary,
.studio-bar .home-button,
.studio-bar .icon-button,
.top-icon-actions .icon-button {
  border: 1px solid color-mix(in srgb, var(--active-accent) 24%, rgba(255, 255, 255, 0.16));
  border-radius: var(--console-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)),
    rgba(7, 10, 14, 0.62);
  box-shadow: var(--console-control-shadow);
}

:root[data-theme="light"] .studio-mode,
:root[data-theme="light"] .top-context,
:root[data-theme="light"] .save-status,
:root[data-theme="light"] .theme-toggle-switch,
:root[data-theme="light"] .save-state-button,
:root[data-theme="light"] .cloud-account-summary,
:root[data-theme="light"] .studio-bar .home-button,
:root[data-theme="light"] .studio-bar .icon-button,
:root[data-theme="light"] .top-icon-actions .icon-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42)),
    var(--surface);
}

.left-rail {
  border-right: 1px solid color-mix(in srgb, var(--active-accent) 18%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--nav-2) 78%, transparent), var(--nav)),
    var(--nav);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.045), 10px 0 34px rgba(0, 0, 0, 0.22);
}

.brand-mark {
  border: 1px solid color-mix(in srgb, var(--active-accent) 44%, var(--line));
  border-radius: var(--console-radius-tight);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--active-accent) 34%, #ffffff), color-mix(in srgb, var(--active-accent) 14%, var(--surface-3))),
    var(--surface-3);
  color: #061015;
  box-shadow: var(--console-control-shadow), 0 0 22px color-mix(in srgb, var(--active-accent) 16%, transparent);
  transform: none;
}

:root[data-theme="dark"] .left-rail .brand-name {
  color: var(--nav-ink);
}

.nav-button {
  --nav-accent: var(--active-accent);
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--console-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    color-mix(in srgb, var(--surface-2) 62%, transparent);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  color: var(--ink-soft);
  font-weight: 780;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.nav-button::before {
  background: color-mix(in srgb, var(--nav-accent) 46%, var(--line-strong));
}

.nav-icon {
  border: 1px solid color-mix(in srgb, var(--nav-accent) 34%, var(--line));
  border-radius: var(--console-radius-tight);
  background: color-mix(in srgb, var(--nav-accent) 18%, var(--surface-3));
  box-shadow: var(--console-inset);
  color: var(--ink);
}

.nav-button:hover,
.nav-button.active {
  border-color: color-mix(in srgb, var(--nav-accent) 48%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--nav-accent) 15%, transparent), transparent),
    var(--surface-raised);
  box-shadow: var(--console-control-shadow);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-button.active .nav-icon {
  background: var(--nav-accent);
  color: #061015;
}

.top-bar,
.setup-strip,
.main-panel,
.side-panel,
.log-panel,
.library-toolbar,
.cloud-auth-panel,
.cloud-beta-panel,
.preflight-panel,
.report-panel,
.roster-import-panel,
.settings-card,
.settings-stat-card,
.class-file-row,
.session-file-row,
.class-stat-card,
.new-session-card,
.speaker-card,
.timer-card,
.presence-card,
.filler-card,
.tf-program-monitor,
.tf-instrument,
.speaker-tracking-card,
.article-card,
.project-card,
.session-card,
.progress-card,
.report-activity-card,
.report-export-grid fieldset,
.app-modal,
.presentation-rubric-panel,
.presentation-notes-panel,
.presentation-score-preview-card,
.nevermet-control-card {
  border: 1px solid color-mix(in srgb, var(--active-accent) 12%, var(--line));
  border-radius: var(--console-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    var(--surface);
  box-shadow: var(--console-inset), var(--console-shadow-soft);
}

.screen-active .main-panel {
  background: transparent;
  box-shadow: none;
}

.class-file-row::before,
.session-file-row::before,
.article-card::before,
.project-card::before,
.session-card::before,
.new-session-card::before,
.roster-import-card::before,
.settings-card::before,
.settings-stat-card::before,
.class-stat-card::before,
.progress-card::before {
  width: 3px;
  height: auto;
  inset: 10px auto 10px 10px;
  border: 0;
  border-radius: var(--console-radius-tight);
  background: var(--active-accent);
  opacity: 0.86;
  box-shadow: 0 0 18px color-mix(in srgb, var(--active-accent) 38%, transparent);
}

.class-file-row,
.session-file-row,
.presence-row,
.roster-row,
.queue-row,
.log-row,
.grid-row,
.next-three-row {
  border-width: 1px;
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.project-card:hover,
.session-card:hover,
.article-card:hover,
.class-file-row:hover,
.session-file-row:hover,
.roster-row:hover,
.queue-row:hover {
  border-color: color-mix(in srgb, var(--active-accent) 42%, var(--line));
  box-shadow: var(--console-inset), var(--console-shadow);
  transform: translateY(-1px);
}

.activity-kicker,
.console-chip,
.count-pill,
.status-pill,
.shortcut,
.display-status-chip {
  border: 1px solid color-mix(in srgb, var(--active-accent) 18%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02)),
    color-mix(in srgb, var(--surface-2) 82%, transparent);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.075);
  color: var(--ink-soft);
  font-weight: 820;
}

.activity-kicker,
.console-chip.live,
.on-mic-chip {
  border-color: color-mix(in srgb, var(--active-accent) 54%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--active-accent) 22%, rgba(255, 255, 255, 0.06)), color-mix(in srgb, var(--active-accent) 9%, transparent)),
    var(--surface-2);
  color: color-mix(in srgb, var(--active-accent) 72%, var(--ink));
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.small-button,
.rating-button,
.filler-button,
.stepper-button,
.participation-toggle,
.presence-disclosure,
.system-button,
input[type="file"]::file-selector-button {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--active-accent) 16%, var(--line));
  border-radius: var(--console-radius);
  box-shadow: var(--console-control-shadow);
  font-weight: 790;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.primary-button,
.go-live-button,
.command-cluster .primary-button,
.timer-actions .primary-button,
.flow-actions .primary-button {
  border-color: color-mix(in srgb, var(--active-accent) 72%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--active-accent) 96%, white), color-mix(in srgb, var(--active-accent) 72%, black)),
    var(--active-accent);
  color: #061015;
}

.secondary-button,
.system-button,
input[type="file"]::file-selector-button {
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  color: var(--ink);
}

.ghost-button,
.small-button,
.rating-button,
.participation-toggle {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--ink-soft);
}

.danger-button {
  border-color: color-mix(in srgb, var(--console-red) 68%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--console-red) 90%, white), color-mix(in srgb, var(--console-red) 72%, black)),
    var(--console-red);
  color: #1b0608;
}

.stepper-button,
.filler-button {
  border-color: color-mix(in srgb, var(--console-amber) 72%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--console-amber) 92%, white), color-mix(in srgb, var(--console-amber) 70%, black)),
    var(--console-amber);
  color: #171007;
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.danger-button:hover:not(:disabled),
.small-button:hover:not(:disabled),
.rating-button:hover:not(:disabled),
.filler-button:hover:not(:disabled),
.stepper-button:hover:not(:disabled),
.participation-toggle:hover:not(:disabled),
.presence-disclosure:hover:not(:disabled),
.system-button:hover:not(:disabled),
input[type="file"]::file-selector-button:hover {
  border-color: color-mix(in srgb, var(--active-accent) 54%, var(--line));
  box-shadow: var(--console-inset), 0 12px 28px color-mix(in srgb, var(--active-accent) 12%, rgba(0, 0, 0, 0.24));
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.ghost-button:active:not(:disabled),
.danger-button:active:not(:disabled),
.small-button:active:not(:disabled),
.rating-button:active:not(:disabled),
.filler-button:active:not(:disabled),
.stepper-button:active:not(:disabled),
.participation-toggle:active:not(:disabled),
.presence-disclosure:active:not(:disabled),
.system-button:active:not(:disabled),
input[type="file"]::file-selector-button:active {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.34);
  transform: translateY(1px);
}

.timer-card,
.tf-clock-module .timer-card,
.timer-stack .timer-card,
.presentation-stopwatch-card {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--active-accent) 32%, var(--line));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--active-accent) 11%, transparent), transparent 42%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px),
    var(--monitor);
  color: var(--monitor-ink);
  box-shadow: var(--console-inset), 0 26px 64px rgba(0, 0, 0, 0.36), 0 0 0 1px color-mix(in srgb, var(--active-accent) 8%, transparent);
}

.timer-card::after,
.tf-program-monitor::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0 38%, rgba(255, 255, 255, 0.09) 48%, transparent 58%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-80%);
}

.timer-running .timer-card::after,
.timer-running .tf-program-monitor::after {
  animation: rostra-sweep 2.8s ease-in-out infinite;
}

.timer-readout,
.tf-clock-module .timer-readout {
  color: color-mix(in srgb, var(--active-accent) 64%, var(--monitor-ink));
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px color-mix(in srgb, var(--active-accent) 22%, transparent);
}

.timer-readout.warning {
  color: var(--console-amber);
}

.timer-readout.done {
  color: var(--console-red);
}

.speaker-card,
.tf-program-monitor {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--active-accent) 14%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.speaker-card::after,
.tf-program-monitor::before {
  border-color: color-mix(in srgb, var(--active-accent) 62%, transparent);
}

.speaker-name,
.tf-speaker-name {
  color: var(--ink);
  font-weight: 880;
  text-wrap: balance;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.filler-total {
  border-color: color-mix(in srgb, var(--console-amber) 42%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--console-amber) 12%, transparent), transparent),
    color-mix(in srgb, var(--surface-2) 82%, transparent);
  box-shadow: var(--console-inset);
}

.rating-button.active,
.participation-toggle.active,
.small-button.active {
  border-color: color-mix(in srgb, var(--active-accent) 68%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--active-accent) 86%, white), color-mix(in srgb, var(--active-accent) 64%, black)),
    var(--active-accent);
  color: #061015;
}

.side-panel .roster-drawer {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 94%, transparent)),
    var(--surface);
}

.screen-active .side-panel .roster-drawer > summary {
  border-color: color-mix(in srgb, var(--active-accent) 24%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--active-accent) 10%, transparent), transparent),
    var(--surface-2);
}

.roster-summary-meter {
  border-width: 1px;
  border-radius: var(--console-radius);
  box-shadow: var(--console-control-shadow);
}

.roster-summary-meter.active,
.roster-summary-meter[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--active-accent) 72%, var(--line));
  box-shadow: var(--console-inset), 0 0 0 2px color-mix(in srgb, var(--active-accent) 16%, transparent);
}

.roster-summary-meter.active::before,
.roster-summary-meter[aria-pressed="true"]::before,
.roster-summary-meter.active::after,
.roster-summary-meter[aria-pressed="true"]::after {
  display: none;
}

.roster-row.current-speaker,
.queue-row.current {
  border-color: color-mix(in srgb, var(--active-accent) 68%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--active-accent) 16%, transparent), transparent),
    var(--surface-2);
  box-shadow: var(--console-inset), 0 0 0 2px color-mix(in srgb, var(--active-accent) 12%, transparent);
}

select,
input,
textarea {
  border-radius: var(--console-radius-tight);
  border-color: color-mix(in srgb, var(--active-accent) 10%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--surface-2);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055), inset 0 2px 10px rgba(0, 0, 0, 0.13);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--active-accent) 72%, transparent);
  outline-offset: 3px;
}

.session-ticker {
  border-color: color-mix(in srgb, var(--active-accent) 14%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--active-accent) 7%, transparent), transparent),
    var(--surface);
}

.session-ticker summary {
  min-height: 50px;
}

.copy-toast {
  border-color: color-mix(in srgb, var(--active-accent) 42%, var(--line));
  border-radius: var(--console-radius);
  background: var(--surface-raised);
  box-shadow: var(--console-shadow);
}

.rostra-icon {
  width: 1.15em;
  height: 1.15em;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.nav-icon,
.file-glyph,
.kicker-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1;
}

.nav-icon {
  width: 28px;
  height: 28px;
}

.nav-icon .rostra-icon {
  width: 18px;
  height: 18px;
}

.file-glyph {
  width: 100%;
  height: 100%;
  font-family: inherit;
}

.file-glyph .rostra-icon {
  width: 25px;
  height: 25px;
}

.roster-import-compact .file-glyph {
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--active-accent) 34%, var(--line));
  border-radius: var(--console-radius-tight);
  background: color-mix(in srgb, var(--active-accent) 11%, var(--surface-2));
  color: color-mix(in srgb, var(--active-accent) 72%, var(--ink));
  box-shadow: var(--console-inset);
}

.roster-import-compact .file-glyph .rostra-icon {
  width: 21px;
  height: 21px;
}

.activity-kicker.progress-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kicker-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.kicker-icon .rostra-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

@keyframes rostra-scan {
  0% { opacity: 0.28; transform: translateX(-24%); }
  45% { opacity: 0.9; }
  100% { opacity: 0.28; transform: translateX(24%); }
}

@keyframes rostra-tally {
  0%, 100% { filter: brightness(0.9); transform: scale(1); }
  50% { filter: brightness(1.26); transform: scale(1.08); }
}

@keyframes rostra-sweep {
  0% { opacity: 0; transform: translateX(-90%); }
  24% { opacity: 0.68; }
  58%, 100% { opacity: 0; transform: translateX(90%); }
}

@media (prefers-reduced-motion: reduce) {
  .timer-running .studio-bar::after,
  .timer-running .tally-light,
  .timer-running .timer-card::after,
  .timer-running .tf-program-monitor::after,
  .cloud-loading-dot {
    animation: none;
  }

  body::after,
  .nav-button,
  .project-card,
  .session-card,
  .article-card,
  .class-file-row,
  .session-file-row,
  .roster-row,
  .queue-row,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button,
  .small-button,
  .rating-button,
  .filler-button,
  .stepper-button,
  .participation-toggle,
  .presence-disclosure,
  .system-button {
    transition: none;
  }
}
