:root {
  --font-sans: 'Google Sans', 'Roboto Flex', 'Inter', 'Roboto', 'Segoe UI', sans-serif;
  --bg: #f4dc72;
  --bg-soft: #f8eeb5;
  --ink: #2c3e50;
  --muted: #34495e;
  --panel: #fffdf5;
  --line: #d8c878;
  --primary: #111111;
  --secondary: #d7d9df;

  /* TeachSmarts Design Constitution tokens. Colour aliases PostWatch's own
     brand values (--primary-color is the one token category apps may vary,
     per the Constitution's Section 3a); the rest are copied verbatim from
     Docinator as shared semantics, or are the fixed structural scale from
     Section 3b. Currently applied to the modal system (.app-dialog and the
     Upgrade modal); not yet migrated across the rest of the app. */
  --primary-color: var(--primary);
  --primary-hover: #000000;
  --secondary-color: #95a5a6;
  --secondary-hover: #7f8c8d;
  --success-color: #34A853;
  --success-hover: #2e8a4a;
  --danger-color: #e74c3c;
  --danger-hover: #c0392b;
  --text-dark: var(--ink);
  --text-light: var(--muted);
  --text-muted: #8b929a;
  --input-bg: #ecf0f1;
  --border-soft: #d5deec;

  --radius-input: 8px;
  --radius-button: 8px;
  --radius-card: 16px;
  --radius-modal: 18px;
  --radius-pill: 999px;

  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --control-height: 44px;
  --width-landing-max: 1320px;
  --font-size-control: 1em;

  --shadow-card: 0 12px 36px rgba(0, 0, 0, .08);
  --shadow-card-soft: 0 4px 20px rgba(0, 0, 0, .06);
  --shadow-hover-lift: 0 6px 14px rgba(0, 0, 0, .08);
  --shadow-modal: 0 28px 80px rgba(15, 23, 42, .28);

  --font-size-section: 1.5rem;
  --font-size-card-title: 1.125rem;
  --font-size-body: 1rem;
  --font-size-helper: 0.875rem;

  --transition-fast: 0.2s ease;
  --transition-lift: 0.15s ease;

  --z-modal: 9999;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { min-height: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-soft), var(--bg)); background-color: var(--bg); background-repeat: no-repeat; background-attachment: fixed;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg);
}
a { color: inherit; text-decoration: none; }
.site-header {
  position: relative;
  z-index: 10;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  width: 100%;
  background: transparent;
}
.brand { font-size: 1.5rem; font-weight: 700; color: #000; letter-spacing: 1px; }
nav { display: flex; gap: 0.75rem; align-items: center; }
main { width: min(1280px, 95vw); margin: 0 auto; padding: 0; }
.landing-footer {
  width: min(1280px, 95vw);
  margin: 0 auto;
  padding: 0.25rem 1rem 1.5rem;
  color: #8b929a;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}
.landing-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.landing-footer a:hover,
.landing-footer a:focus-visible {
  color: #111111;
}
.legal-page-header {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e1e5ed;
}
.legal-page-header h1 {
  margin: 0;
  font-size: 2rem;
}
.top-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top-nav .teacher-login-button {
  background: var(--primary);
  color: #ffffff;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: #111;
  font-weight: 700;
}
.nav-link:hover {
  background: #ffffff;
}
.app-container {
  width: 100%;
  max-width: 960px;
  margin: 30px auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.08);
  box-sizing: border-box;
  overflow: visible;
  max-height: none;
}
.landing-main {
  max-width: 1280px;
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0 auto;
  padding: 0;
}
.join-main {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: -104px 0 0;
  padding: 0;
}
.join-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  padding: 104px 24px; /* equal top and bottom, so the content sits at the true vertical centre under the header */
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.56) 0 10%, transparent 32%),
    radial-gradient(circle at 78% 30%, rgba(17, 17, 17, 0.13) 0 18%, transparent 39%),
    linear-gradient(135deg, #f8eeb5 0%, #f4dc72 54%, #e8c94b 100%);
}
.join-brand-lockup {
  display: grid;
  justify-items: center;
  gap: 14px;
}
.join-logo {
  width: min(150px, 34vw);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}
.join-brand-lockup h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.95;
  text-align: center;
}
.join-card {
  width: min(420px, calc(100vw - 40px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}
.join-card input {
  height: 64px;
  border: 2px solid #c7c7c7;
  background: #ffffff;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  text-transform: uppercase;
}
.join-card button {
  height: 64px;
  border-radius: 6px;
  font-size: 1.25rem;
}
.completed-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  justify-items: center;
  text-align: center;
  gap: 22px;
}
.completed-lockup {
  width: min(620px, calc(100vw - 40px));
  margin-left: auto;
  margin-right: auto;
  gap: 10px;
}
.completed-lockup h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
}
.completed-card {
  width: min(620px, calc(100vw - 40px));
  justify-self: center;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}
.completed-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(244, 220, 114, 0.55) 45%, rgba(255, 255, 255, 0.8) 50%, rgba(244, 220, 114, 0.55) 55%, transparent 100%);
  transform: translateX(-120%);
  opacity: 0;
}
.completed-card-exit {
  animation: completed-slide-out 180ms ease-in forwards;
}
.completed-card-enter {
  animation: completed-slide-in 340ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.completed-card-flash::after {
  animation: completed-flash-swipe 360ms ease-out forwards;
}
.completed-kicker {
  margin: 0;
  color: #34495e;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.completed-fact {
  max-width: 540px;
  margin: 0;
  color: #111111;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.55;
}
.completed-card button {
  min-height: 48px;
  border-radius: 6px;
  font-size: 0.98rem;
}
@keyframes completed-slide-out {
  to {
    opacity: 0;
    transform: translateX(-18px);
  }
}
@keyframes completed-slide-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes completed-flash-swipe {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .completed-card-exit,
  .completed-card-enter,
  .completed-card-flash::after {
    animation: none;
  }
}
.dashboard-main {
  width: min(1280px, 96vw);
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 1.5rem 0;
}
.mode-main {
  width: min(1280px, 96vw);
  margin: 0 auto;
  /* The site header sits above; pull the main area up by its height so the card is centred in the true viewport. */
  min-height: 100vh;
  margin-top: -104px;
  padding: 104px 0 0;
  display: grid;
  place-items: center;
}
.dashboard-shell {
  width: 100%;
  margin-top: 0;
  padding: 24px 28px 32px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.08);
}
.task-main {
  width: min(1380px, 96vw);
  /* No site header on the student page: centre the test in the viewport, with equal padding above and below. */
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.5rem 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-main > .task-shell { width: 100%; }
button { font: inherit; }
.primary, .secondary, .danger, .google-sheets-button { border: 0; border-radius: 0.8rem; padding: 0.75rem 1.3rem; font-weight: 700; cursor: pointer; }
.primary { background: var(--primary); color: #fff; }
.secondary { background: var(--secondary); color: #1a1a1a; }
.danger { background: #b42318; color: #fff; }
.text-link {
  border: 0;
  background: transparent;
  color: #111111;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.google-sheets-button { background: #188038; color: #fff; }
.hidden { display: none !important; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

h1 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 700; color: #1a1a1a; }
p { font-size: 1rem; line-height: 1.45; margin-bottom: 12px; color: var(--muted); }

.hero-logo { width: min(340px, 78%); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,0.17); }
.hero-copy {
  max-width: 620px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.65;
  margin-bottom: 24px;
  padding: 8px 18px;
}

.mode-shell { width: min(980px, 100%); margin: 0 auto; padding: 12px 12px; text-align: center; }
.panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  padding: 28px 32px 30px;
}
.badge { display: inline-block; padding: 0.45rem 1rem; background: #dde1ea; border-radius: 999px; font-weight: 700; margin-bottom: 0.8rem; }
.mode-shell h1 { font-size: 2.2rem; margin: 0 0 1.4rem; text-align: center; }
.student-access-shell {
  display: grid;
  justify-items: center;
}
.student-access-form {
  width: min(420px, 100%);
  margin-left: auto;
  margin-right: auto;
  justify-self: center;
}
.student-access-form label {
  text-align: center;
}
.muted { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.teacher-login-info {
  display: grid;
  gap: 0.45rem;
  width: min(680px, 100%);
  margin: 0 auto 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: #111;
  text-align: center;
}
.teacher-login-info strong,
.teacher-login-info span {
  color: #111;
}
.teacher-email-form {
  display: grid;
  gap: 0.85rem;
  width: min(460px, 100%);
  margin: 1rem auto 0;
}
.teacher-email-form label {
  color: #111111;
  font-size: 1rem;
}
.teacher-email-form input {
  min-height: 58px;
  border: 2px solid #ccd3da;
  background: #ffffff;
  color: #111111;
  font-size: 1.1rem;
}
.teacher-auth-message {
  margin: 0;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  position: relative;
  border: 1px solid #f0b4ae;
  border-left: 6px solid #b42318;
  border-radius: 4px;
  background: #fff1f0;
  color: #7a1a10;
  font-weight: 600;
  text-align: left;
  line-height: 1.4;
}
.teacher-auth-message::before {
  content: "!";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #b42318;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2rem;
  text-align: center;
}
.teacher-auth-message[data-kind="success"] {
  border-color: #a6dcb5;
  border-left-color: #1b7f3b;
  background: #effaf1;
  color: #14522a;
}
.teacher-auth-message[data-kind="success"]::before {
  content: "\2713";
  background: #1b7f3b;
}
.teacher-auth-message.hidden { display: none; }
.teacher-forgot-password {
  justify-self: end;
  min-height: 0;
  padding: 0;
}
.teacher-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.teacher-google-auth {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  width: min(460px, 100%);
  margin: 0 auto;
}
.teacher-google-auth button {
  width: 100%;
}
.step-actions { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.09); }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 242, 153, 0.88);
}

.loading-card {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  width: min(360px, 100%);
  padding: 1.5rem;
  border-radius: 12px;
  background: #ffffff;
  color: #111;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 5px solid #d7d9e2;
  border-top-color: #111111;
  border-radius: 50%;
  animation: postwatch-spin 0.8s linear infinite;
}

@keyframes postwatch-spin {
  to { transform: rotate(360deg); }
}

.card-form { display: grid; gap: 0.75rem; }
.drive-picker {
  width: min(760px, 100%);
  margin: 0.75rem auto 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
.drive-selection-status {
  color: #777;
  font-size: 0.9rem;
}
.drive-selection-status.selected {
  color: #27ae60;
  font-weight: 700;
}
.google-link-label {
  width: min(760px, 100%);
  margin: 0 auto;
}
.google-link-help {
  color: #666;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
}
.load-google-link {
  display: block;
  width: min(260px, 100%);
  margin: 0 auto 0.75rem;
}
.import-form-warning {
  width: min(760px, 100%);
  margin: 0.7rem auto 0.9rem;
  padding: 0.85rem 1rem;
  border: 2px solid #f0a000;
  border-radius: 8px;
  background: #fffdf8;
  color: #111111;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}
.summary-limit-warning {
  width: min(760px, 100%);
  margin: 0.7rem auto 0.9rem;
  padding: 0.85rem 1rem;
  border: 2px solid #b42318;
  border-radius: 8px;
  background: #fff1f0;
  color: #8a1f13;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
}
label { display: grid; gap: 0.35rem; width: 100%; font-weight: 700; font-size: 1.1em; text-align: left; color: var(--muted); }
.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.rich-text-btn {
  min-width: 2.1rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.rich-text-btn:hover {
  background: #f0f0f0;
}
input, textarea, select { width: 100%; border: 1px solid #ccc; border-radius: 6px; padding: 15px; font-size: 1.1rem; box-sizing: border-box; background: #ecf0f1; font-family: var(--font-sans); }
.check { display: flex; align-items: center; gap: 0.5rem; }
.check input { width: auto; }
.result { font-size: 1rem; color: #23314f; text-align: left; }
.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: calc(var(--z-modal) + 1);
  transform: translateX(-50%);
  background: #171717;
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  max-width: min(520px, calc(100vw - 32px));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  text-align: center;
  font-weight: 700;
}

.dialog-error {
  background: #fdecec;
  border: 1px solid #d93025;
  border-left-width: 6px;
  color: #8c1d18;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

@keyframes dialog-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.app-dialog-card.shake { animation: dialog-shake 0.45s ease-in-out; }

@media (prefers-reduced-motion: reduce) {
  .app-dialog-card.shake { animation: none; }
}

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(17, 24, 39, .42);
  backdrop-filter: blur(8px);
}

.app-dialog-card {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-radius: var(--radius-modal);
  background: #ffffff;
  box-shadow: var(--shadow-modal);
}

.app-dialog-card h2 {
  margin: 0;
  text-align: left;
  font-size: 1.35rem;
}

.app-dialog-card p {
  margin: 0;
}

.app-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.app-dialog-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: var(--radius-pill);
  background: #eef3f8;
  color: var(--text-dark);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.app-dialog-close:hover {
  background: #dbe6f2;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.account-page {
  display: grid;
  gap: var(--space-md);
  width: min(640px, 100%);
  margin: var(--space-xl) auto;
  text-align: left;
}
.account-page.hidden { display: none; }
.account-page h1 { margin: 0; }
.account-back-link { font-weight: 700; color: inherit; }
.account-actions { display: flex; justify-content: flex-start; gap: var(--space-sm); }
.account-actions .primary { padding: 0.4rem 0.9rem; font-size: 0.85rem; border-radius: var(--radius-pill); }

#account-current-email {
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid #e1e5ed;
}

.account-section {
  display: grid;
  gap: var(--space-sm);
  padding-top: var(--space-xs);
  border-top: 1px solid #e1e5ed;
}

.account-section .app-dialog-actions .primary {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
}
.account-section .account-actions .primary { padding: 0.4rem 0.9rem; font-size: 0.85rem; border-radius: var(--radius-pill); }

#account-name-form.account-section {
  border-top: 0;
  padding-top: 0;
}

.account-section h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
}

#account-google-note {
  padding-top: var(--space-xs);
}

.account-logout-row {
  justify-content: flex-start;
  padding-top: var(--space-md);
  border-top: 1px solid #e1e5ed;
}

.logout-confirmation-card {
  position: relative;
  width: min(480px, 100%);
  justify-items: center;
  padding-top: var(--space-xl);
  text-align: center;
}

.logout-confirmation-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
}

.app-dialog-card .logout-confirmation-title {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.app-dialog-card .logout-confirmation-copy {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
}

.logout-confirmation-actions {
  justify-content: center;
  width: 100%;
  margin-top: var(--space-md);
}

.logout-confirmation-actions button {
  min-width: 160px;
}

.legal-card {
  width: min(860px, calc(100vw - 32px));
  max-height: min(86vh, 780px);
  overflow: auto;
  text-align: left;
}

.legal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e1e5ed;
}

.legal-card-header h2 {
  font-size: 1.6rem;
}

.legal-eyebrow {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-close {
  flex: 0 0 auto;
}

.legal-updated {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.legal-copy {
  display: grid;
  gap: 1rem;
  color: #273241;
  font-size: 0.98rem;
  line-height: 1.55;
}

.legal-copy section {
  display: grid;
  gap: 0.3rem;
}

.legal-copy h3 {
  margin: 0;
  color: #111111;
  font-size: 1rem;
}

.legal-copy a {
  color: #111111;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dashboard-step {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.plan-status-pill {
  width: fit-content;
  margin: 0 auto 1.1rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid #d7dce6;
  border-radius: 999px;
  background: #f4f6fb;
  color: #2c3e50;
  font-weight: 700;
  text-align: center;
}

/* Upgrade modal: mirrors The Docinator's (see "Upgrade modal" in the TeachSmarts App Design Constitution). */
.upgrade-card {
  position: relative;
  display: block;
  width: min(1280px, 100%);
  padding: 28px;
  text-align: left;
}

.upgrade-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-pill);
  background: #eef3f8;
  color: var(--text-dark);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.upgrade-modal-close:hover {
  background: #dbe6f2;
}

.upgrade-card .upgrade-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: var(--font-size-card-title);
}

.upgrade-card .upgrade-current-plan,
.upgrade-card .upgrade-current-limits {
  color: var(--text-light);
  line-height: 1.6;
  text-align: center;
}

.upgrade-card .upgrade-current-plan {
  margin-bottom: 8px;
}

.upgrade-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

@media (max-width: 960px) {
  .upgrade-plan-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 640px) {
  .upgrade-plan-grid {
    grid-template-columns: 1fr;
  }
}

.upgrade-plan-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, #fafafa, #ffffff);
  text-align: left;
}

.upgrade-plan-card.current-plan {
  border-color: #34a853;
  box-shadow: inset 0 0 0 1px rgba(52, 168, 83, 0.15);
}

.upgrade-plan-card h4 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--text-dark);
}

.upgrade-price {
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #d94f45;
}

.upgrade-price-sub {
  font-size: 0.9rem;
  font-weight: 400;
  color: #667085;
}

.upgrade-feature-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-light);
  font-size: 0.84rem;
  line-height: 1.45;
}

.upgrade-feature-list li + li {
  margin-top: 5px;
}

.upgrade-plan-action {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 18px;
}

.upgrade-fine-print {
  margin: 1.1rem 0 0;
  text-align: right;
  color: var(--text-muted);
  font-size: var(--font-size-helper);
}

.upgrade-admin-tools {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-input);
  background: #f6f8fc;
  text-align: left;
}

.upgrade-admin-tools h3 {
  margin: 0 0 0.4rem;
  color: var(--text-dark);
}

.upgrade-admin-tools p {
  margin-bottom: var(--space-sm);
}

.upgrade-admin-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-sm);
}

.test-user-manager {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-soft);
}

.test-user-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.test-user-list {
  display: grid;
  gap: var(--space-xs);
}

.test-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-input);
  background: #ffffff;
}

.test-user-row span {
  overflow-wrap: anywhere;
}


.dashboard-step .card-form,
#task-form {
  display: block;
  width: 100%;
  max-width: none;
}

.modal-form {
  gap: 0.9rem;
}

.dashboard-step h1 {
  font-size: 1.95rem;
  margin-bottom: 14px;
  text-align: center;
}

.dashboard-step .muted {
  font-size: 0.98rem;
  line-height: 1.5;
  margin-bottom: 12px;
  text-align: center;
}

.dashboard-step label {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.dashboard-step input,
.dashboard-step textarea,
.dashboard-step select {
  padding: 12px 14px;
  font-size: 1.1rem;
}

.dashboard-step .check {
  font-size: 0.98rem;
}

.question-prompt-input,
.summary-prompt-input {
  display: block;
  width: 100%;
  max-width: 760px;
  min-height: 98px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 2px solid #ccd3da;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  font-size: 1.22rem;
  line-height: 1.45;
  resize: vertical;
}

.question-prompt-input {
  height: 110px;
}

.summary-prompt-input {
  min-height: 104px;
  overflow: hidden;
  white-space: pre-wrap;
}

.class-name-label {
  width: min(420px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.class-step-block {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: center;
}

.class-step-field,
.question-entry-label,
.summary-entry-label {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.class-step-field {
  font-size: 1.12rem;
  text-align: center;
}

.class-step-field input {
  min-height: 74px;
  padding: 18px 20px;
  border: 2px solid #ccd3da;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 700;
}

.class-step-field input::placeholder,
.question-prompt-input::placeholder,
.summary-prompt-input::placeholder {
  color: #626c76;
}

.question-entry-label,
.summary-entry-label {
  font-size: 1.08rem;
}

.import-class-name-label {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

#classroom-step > label,
#classroom-step > .classroom-schedule-grid {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

#classroom-step > label textarea {
  min-height: 112px;
}

.marks-control-wrap {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.import-answer-key {
  width: min(760px, 100%);
  margin: 0.5rem auto;
  text-align: left;
}

.import-answer-key h3 {
  margin: 0 0 0.3rem;
}

.import-answer-key-copy {
  color: #666;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 0.75rem;
}

.import-answer-key-list {
  display: grid;
  gap: 0.9rem;
}

.answer-key-question {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e1e5ed;
  border-radius: 8px;
  background: #f8fafc;
}

.answer-key-prompt {
  margin: 0;
  font-weight: 700;
}

.answer-key-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  font-weight: 500;
  text-align: left;
  color: var(--text-dark, #23314f);
}

.answer-key-option input {
  width: auto;
  padding: 0;
}

.answer-key-text-label input {
  margin-top: 0.35rem;
}

.marks-control-label {
  text-align: center;
  margin-bottom: 0;
}

.question-mark-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.question-mark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 12px 18px;
  border: 2px solid #bdc3c7;
  border-radius: 10px;
  background: #ecf0f1;
  color: #34495e;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.question-mark-button:hover {
  border-color: #111;
  background: #e3e7ea;
}

.focus-loss-control.selected .question-mark-button {
  border-color: #b42318;
  background: #fff1ed;
  color: #7a1b12;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.focus-loss-control.selected .question-mark-button:hover {
  border-color: #7a1b12;
  background: #ffe4dc;
}

.question-mark-count {
  font-size: 1.1rem;
  color: #111;
}

.focus-loss-control.selected .question-mark-count {
  color: #7a1b12;
}

.question-mark-reset {
  position: absolute;
  top: -8px;
  right: -10px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.pill-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.pill-button:hover {
  background: #000;
}

.pill-value {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
  color: #111;
}

.dashboard-block {
  display: block;
  gap: 0.9rem;
  width: 100%;
  max-width: none;
  padding: 1.35rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 1rem;
  justify-self: stretch;
  margin: 0 0 1rem;
}

.dashboard-step > .card-form,
.dashboard-step > .card-form > .dashboard-block {
  width: 100%;
  max-width: none;
}

.dashboard-block > * + * {
  margin-top: 0.9rem;
}

.dashboard-block.class-step-block {
  display: grid;
  align-content: center;
  justify-items: center;
}

.dashboard-block h2 {
  text-align: center;
}

.session-actions {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.session-bulk-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #fff;
}

.session-bulk-actions span {
  font-weight: 700;
  color: #111;
}

.session-list {
  display: grid;
  gap: 0.8rem;
}

.session-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.session-card-archived {
  opacity: 0.68;
  background: #f7f7f5;
}

.archived-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b4b00;
  background: #fffdf8;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.session-archive-toggle {
  justify-self: center;
  margin: 0.4rem auto 0;
}

.session-select {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-select input {
  width: 22px;
  height: 22px;
  padding: 0;
}

.session-card h3 {
  margin: 0 0 0.35rem;
  color: #1a1a1a;
}

.session-card p {
  margin: 0;
}

.session-link {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.session-card-actions,
.publish-choice-grid {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.publish-choice-grid {
  margin-top: 1rem;
}

.publish-access-note {
  display: grid;
  gap: 0.35rem;
  width: min(680px, 100%);
  margin: 0.8rem auto 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #111;
  text-align: center;
}

.publish-access-note strong,
.publish-access-note span {
  color: #111;
}

#focus-step {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.focus-settings-copy {
  width: min(620px, 100%);
  margin-left: auto;
  margin-right: auto;
  color: #111111;
  font-size: 1.05rem;
  text-align: center;
}

.focus-info-button {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.focus-info-card {
  width: min(660px, 100%);
}

.focus-info-card p {
  color: #111111;
  font-size: 1.04rem;
  line-height: 1.55;
}

.focus-info-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.25rem;
  color: #111111;
  line-height: 1.5;
}

.block-copy {
  margin-bottom: 0;
}

.question-list {
  display: grid;
  gap: 0.9rem;
}

.question-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.9rem;
}

.question-card-header,
.question-settings,
.date-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.question-card-header h3 {
  text-align: left;
}

.datetime-group {
  display: grid;
  grid-template-columns: 54px auto 54px auto 78px 54px auto 54px 74px;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
}

.datetime-group legend {
  grid-column: 1 / -1;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: var(--muted);
}

.datetime-group input,
.datetime-group select {
  padding: 12px 8px;
  text-align: center;
}

.schedule-field-wrap {
  display: grid;
  gap: 0.8rem;
  align-self: stretch;
}

.schedule-toggle {
  min-height: 48px;
  align-self: end;
}

.datetime-group span {
  font-weight: 700;
  text-align: center;
}

.classroom-schedule-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 180px);
  gap: 1rem min(12vw, 9rem);
  align-items: end;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.classroom-schedule-grid label {
  margin-bottom: 0;
}

.classroom-schedule-grid input[type="date"],
.classroom-schedule-grid input[type="time"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  text-align: left;
}

.confirmation-shell h2 {
  margin-bottom: 0.9rem;
  text-align: center;
}

.confirmation-card {
  display: grid;
  gap: 0.9rem;
  max-width: 640px;
  margin: 1.4rem auto 0;
  padding: 1.25rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 1rem;
  text-align: center;
}

.confirmation-line {
  margin: 0;
  color: #000;
}

.confirmation-link-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.75rem;
  text-align: left;
  align-items: end;
}

.confirmation-link-block label {
  grid-column: 1 / -1;
  color: #000;
}

.confirmation-pin-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #000;
  text-align: left;
}

.confirmation-pin-block span {
  grid-column: 1 / -1;
  font-weight: 700;
  color: #000;
}

.confirmation-pin-block strong {
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: #000;
}

.task-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; align-items: stretch; max-width: 1080px; margin: 0 auto; }
.task-shell-hidden { visibility: hidden; }
.task-sidebar, .workspace, .review-card { background: #fffdf8; border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; }
.task-sidebar button + button {
  margin-top: 0.75rem;
}
.task-sidebar-top,
.workspace-topbar,
.workspace-actions,
.question-nav,
.attempt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.task-question-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.question-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: #fff;
  cursor: pointer;
}
.question-chip.selected {
  background: var(--primary);
  color: #fff;
}
.workspace-kicker {
  margin-bottom: 0.2rem;
  font-weight: 700;
}
.read-summary-button {
  margin-bottom: 0.75rem;
}
#current-question-title {
  max-height: 32vh;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 1.2rem;
  line-height: 1.4;
}
.workspace-marks {
  margin-bottom: 0;
}
.consent-box {
  margin: 1rem 0;
  padding: 1rem;
  background: #fffdf8;
  border: 1px solid #e6bc52;
  border-radius: 0.8rem;
}
.consent-box h2 {
  margin-bottom: 0.65rem;
  font-size: 1.1rem;
}
.consent-box p {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.consent-check {
  margin-top: 0.25rem;
}
.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.disabled-feature {
  filter: grayscale(1);
  opacity: 0.52;
  cursor: not-allowed;
}
.google-sheets-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.task-shell,
.task-shell p,
.task-shell label,
.task-shell .muted,
.task-shell .instructions,
.task-shell .status-row,
.task-shell .eyebrow,
.task-shell h1,
.task-shell h2 {
  color: #000000;
}
.instructions { white-space: pre-wrap; line-height: 1.5; margin: 1rem 0; }
.warning { background: #fffdf8; border: 1px solid #e6bc52; border-radius: 0.65rem; padding: 0.75rem; margin: 1rem 0; color: #000000; }
.workspace { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 0.7rem; }
#response-label,
#response,
.question-nav,
.workspace-actions,
.status-row {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}
#response {
  min-height: 8.1rem;
  max-height: none;
  overflow: hidden;
  line-height: 1.5;
  color: #000000;
  resize: none;
}
.choice-response {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 0;
}
.choice-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #000;
}
.choice-option input {
  width: auto;
  margin-top: 0.2rem;
}
.choice-option span {
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.status-row { display: flex; justify-content: space-between; color: #000000; }

.prestart-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
}

.prestart-modal-card {
  width: min(760px, 100%);
  padding: 32px;
  border-radius: 20px;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 0.9rem;
}

.prestart-modal-card h2 {
  text-align: center;
  margin-bottom: 0.25rem;
}

.prestart-modal-card p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: #000000;
  font-size: 1.18rem;
  line-height: 1.6;
}

#prestart-modal .prestart-modal-card p {
  color: #000000;
  font-size: 1.35rem;
  font-weight: 700;
}

.summary-modal-card {
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
}

.summary-modal-content {
  max-height: min(640px, 62vh);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: #000000;
  font-size: 1.1rem;
  line-height: 1.55;
  text-align: left;
  user-select: none;
}
.summary-modal-content p,
.summary-modal-content ul,
.summary-modal-content ol {
  margin: 0 0 0.9em;
}
/* The generic modal rule centres paragraphs and caps them at 680px; summaries read left-aligned at full width. */
.prestart-modal-card .summary-modal-content p {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
  font-size: inherit;
}
.summary-modal-content ul,
.summary-modal-content ol {
  padding-left: 1.4em;
}
.summary-modal-content p:last-child,
.summary-modal-content ul:last-child,
.summary-modal-content ol:last-child {
  margin-bottom: 0;
}

.modal-check {
  justify-content: center;
}

.breach-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(120, 0, 0, 0.82);
}

.breach-modal-card {
  width: min(760px, 100%);
  padding: 36px 32px;
  border: 4px solid #ffffff;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffb347 0%, #ff8a00 100%);
  color: #1a1a1a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.breach-kicker {
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a0b00;
}

.breach-modal-card h2 {
  margin-bottom: 16px;
  font-size: 2.6rem;
  line-height: 1.05;
  color: #1a1a1a;
}

.breach-modal-card p {
  margin: 0 auto 22px;
  max-width: 620px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: #1a1a1a;
}

.breach-modal-actions {
  display: flex;
  justify-content: center;
}

.breach-modal-actions .primary {
  min-width: 220px;
  background: #ffffff;
  color: #7e0c0c;
}

.submit-confirm-copy {
  text-align: center;
}

.submit-confirm-actions {
  gap: 1rem;
}

.submit-confirm-actions .submit-cancel-button {
  background: #c62828;
  color: #ffffff;
}

.submit-confirm-actions .submit-confirm-button {
  min-width: 220px;
  background: #2e7d32;
  color: #ffffff;
  border: 2px solid #1b5e20;
}

.submitted-modal-card,
.submitted-copy {
  text-align: center;
}

.review-export-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  margin-bottom: 1.75rem;
}

.page-heading {
  text-align: center;
}

.review-export-actions button {
  min-width: 180px;
  padding: 0.95rem 1.6rem;
}

.export-action-item {
  position: relative;
  display: inline-flex;
}

.export-reset {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 0 !important;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border: 0;
  border-radius: 999px;
  background: #b42318;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.email-results-card {
  width: min(820px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
}

.email-results-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.email-results-form,
.email-recipient-list,
.short-feedback-list {
  display: grid;
  gap: 0.85rem;
}

.email-sort-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.email-recipient-row,
.short-feedback-row {
  display: grid;
  gap: 0.35rem;
}

.email-recipient-row {
  grid-template-columns: 24px minmax(180px, 1fr) minmax(220px, 1.4fr);
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.email-recipient-row.deselected {
  opacity: 0.62;
}

.email-recipient-row.deselected input[type="email"] {
  cursor: not-allowed;
}

.email-recipient-check {
  width: 18px;
  height: 18px;
}

.email-recipient-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.email-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.email-status-badge.sent {
  color: #18512f;
  background: #dff3e5;
}

.email-status-badge.unsent {
  color: #6b4b00;
  background: #fffdf8;
}

.short-feedback-list h4 {
  margin: 0.4rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.feedback-entry {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.feedback-entry label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.student-response-preview {
  margin: 0;
  padding: 0.65rem;
  border-left: 3px solid var(--line);
  background: #ffffff;
  white-space: pre-wrap;
  color: #111111;
}

.response-box {
  display: grid;
  gap: 0.75rem;
}

.response-answer {
  display: grid;
  gap: 0.35rem;
}

.answer-lines {
  display: grid;
  gap: 0.35rem;
  white-space: pre-wrap;
}

.answer-line {
  display: block;
}

.email-recipient-row span,
.short-feedback-row span {
  font-weight: 700;
  color: var(--muted);
}

.email-recipient-row input,
.short-feedback-row textarea,
.feedback-entry input,
.feedback-entry textarea {
  width: 100%;
  font-size: 1.1rem;
  line-height: 1.45;
  font-weight: 500;
}

@media (max-width: 980px) {
  .upgrade-admin-buttons,
  .test-user-form,
  .test-user-row {
    grid-template-columns: 1fr;
  }

  .email-recipient-row {
    grid-template-columns: 24px 1fr;
  }

  .email-recipient-row input[type="email"] {
    grid-column: 1 / -1;
  }
  .task-shell, .question-card-header, .question-settings, .date-grid, .session-card, .classroom-schedule-grid { grid-template-columns: 1fr; }
  .classroom-schedule-grid { gap: 0.8rem; }
  .datetime-group { grid-template-columns: 42px auto 42px auto 68px 42px auto 42px 70px; }
  .site-header { padding: 1rem; }
  .top-nav { gap: 0.45rem; }
  .nav-link, .top-nav button { padding: 0.65rem 0.8rem; font-size: 0.92rem; }
  .app-container { margin: 12px; padding: 20px; max-width: 640px; }
  .brand { font-size: 1.4rem; }
  .muted, .hero-copy { font-size: 1rem; }
  .mode-shell h1 { font-size: 2.1rem; }
  .workspace-topbar,
  .workspace-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {

  .logout-confirmation-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .logout-confirmation-actions button {
    width: 100%;
  }
}



/* ===== Landing page: mirrors The Quizzinator (TeachSmarts App Design Constitution §5) ===== */
body.landing-page {
  height: 100%;
  font-family: var(--font-sans);
  color: #2c3e50;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg)); background-color: var(--bg); background-repeat: no-repeat; background-attachment: fixed;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg);
}

body.landing-page .logo-350 { height: 350px; width: 350px; object-fit: contain; }

body.landing-page .u-mt-5 { margin-top: 5px; }

body.landing-page .u-mb-15 { margin-bottom: 15px; }

body.landing-page .u-text-center { text-align: center; }

body.landing-page .text-large { font-size: 1.5rem; }

body.landing-page {
    height: var(--vh-safe);
    min-height: var(--vh-safe);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

body.landing-page .landing-content {
    display: flex;
    flex-direction: row;
    gap: 50px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1320px;
    margin: auto;
    flex: 1 0 auto;
    min-height: 0;
    padding: 40px;
}

body.landing-page .landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 40px;
    width: 100%;
    flex-shrink: 0;
}

body.landing-page .brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    text-transform: none;
    letter-spacing: 1px;
}

body.landing-page .landing-left,
body.landing-page .landing-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.landing-page .landing-footer {
    text-align: center;
    padding: 16px 40px 24px;
    color: #8b929a;
    font-size: 0.75rem;
}

body.landing-page .landing-footer a {
    color: #8b929a;
    text-decoration: none;
    margin: 0 6px;
}

body.landing-page .landing-footer a:hover {
    text-decoration: underline;
}

body.landing-page .landing-left {
  align-items: center;
  padding-right: 40px;
}

body.landing-page .landing-right {
  align-items: flex-start;
  padding-left: 40px;
}

body.landing-page .landing-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

body.landing-page h2.features-header {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #1a1a1a;
  align-self: center;
}

body.landing-page .landing-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #34495e;
}

body.landing-page .primary-cta {
  background: var(--primary-color);
  color: #fff;
  font-size: 1em;
  font-weight: bold;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s;
}

body.landing-page .primary-cta:hover {
  background: var(--primary-hover);
}

body.landing-page .feature-box {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  width: 100%;
  font-size: 1.1rem;
  line-height: 1.4;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.landing-page .feature-box strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: #2c3e50;
}

body.landing-page .feature-box span {
  display: block;
}

body.landing-page .feature-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

body.landing-page .btn.login-btn {
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

body.landing-page .btn.login-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 960px) {
  body.landing-page .landing-content {
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
  }
  body.landing-page .landing-left,
body.landing-page .landing-right {
    padding: 0;
    max-width: 95%;
    margin: 0 auto;
  }
  body.landing-page .landing-right {
    margin-top: 30px;
  }
  body.landing-page .landing-header {
      position: static;
      margin-bottom: 0;
      width: 100%;
      justify-content: space-between;
      gap: 15px;
  }
  body.landing-page .landing-footer {
    padding: 16px 20px 24px;
  }
  body.landing-page .logo-350 {
    width: min(350px, 80vw);
    height: min(350px, 80vw);
  }
}

body.landing-page .landing-header .btn.login-btn {
    flex-shrink: 0;
    margin-left: auto;
  }

:root { --vh-safe: 100svh; }

@media (max-width: 600px) {
  body.landing-page .landing-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  body.landing-page .landing-header .btn.login-btn {
    width: 100%;
    text-align: center;
  }
}

:root { --landing-heading-offset: calc(1.8rem * 1.2 + 15px); }

body.landing-page .landing-content { align-items:flex-start; }

body.landing-page .landing-content > .landing-left { justify-content:flex-start; align-content:start; padding-top:max(0px, calc(var(--landing-heading-offset) - 5px)); }

body.landing-page h2.features-header { font-size:1.8rem; line-height:1.2; margin-bottom:15px; }

@media (max-width:960px) {
  body.landing-page .landing-content { align-items:center; }
  body.landing-page .landing-content > .landing-left { padding-top:0; }
}

/* Margins inside the landing content (the app's own base CSS does not reset them) */
body.landing-page .landing-content h1,
body.landing-page .landing-content h2,
body.landing-page .landing-content p { margin-top: 0; }
body.landing-page .landing-content h1,
body.landing-page .landing-content h2 { margin-left: 0; margin-right: 0; }
body.landing-page .landing-content p { margin-left: 0; margin-right: 0; }
body.landing-page .landing-content h1 { text-align: center; }
body.landing-page .landing-header .brand-name { margin: 0; }
body.landing-page > main { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; max-width: none; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
body.landing-page .landing-header .btn.login-btn { min-height: 0; }
body.landing-page .landing-content a.primary-cta { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
body.landing-page .feature-box { display: block; }

/* ===== Landing typography lock =====
   The Quizzinator landing page is the source of truth for these values (font, size, weight,
   line-height, colour, margins). Scoped high enough to beat each app's own p/h1/h2 rules. */
.landing-header .brand-name{ font-family:'Roboto',sans-serif; font-size:1.5rem; font-weight:700; line-height:normal; letter-spacing:1px; color:#000; }
.landing-content .landing-left h1{ font-family:'Roboto',sans-serif; font-size:2.5rem; font-weight:700; font-style:normal; line-height:normal; letter-spacing:normal; margin:0 0 20px; color:#1a1a1a; }
.landing-content .landing-left p.text-large{ font-family:'Roboto',sans-serif; font-size:1.5rem; font-weight:400; line-height:1.6; margin:0 0 20px; color:#34495e; }
.landing-content .landing-right h2.features-header{ font-family:'Roboto',sans-serif; font-size:1.8rem; font-weight:600; font-style:normal; line-height:1.2; letter-spacing:normal; margin:0 0 15px; color:#1a1a1a; }
.landing-content .feature-box{ font-family:'Roboto',sans-serif; font-size:1.1rem; font-weight:400; line-height:1.4; color:#2c3e50; }
.landing-content .feature-box strong{ font-family:'Roboto',sans-serif; font-size:1.1rem; font-weight:600; line-height:1.4; margin:0 0 4px; color:#2c3e50; }
.landing-content .feature-box span{ font-family:'Roboto',sans-serif; font-size:1.1rem; font-weight:400; line-height:1.4; margin:0; color:#2c3e50; }

/* WYSIWYG editor that replaces the rich-text textareas (see static/js/rich-editor.js) */
textarea[hidden] { display: none !important; }
.rich-editor {
  overflow-wrap: anywhere;
  text-align: left;
  font-weight: 400;
  height: auto;
  min-height: calc(var(--rich-rows, 3) * 1.45em + 36px);
  overflow: auto;
  resize: vertical;
  outline: none;
}
.rich-editor:focus { border-color: #2f5fd0; box-shadow: 0 0 0 2px rgba(47, 95, 208, 0.18); }
.rich-editor.is-empty::before {
  content: attr(data-placeholder);
  color: #626c76;
  pointer-events: none;
  position: absolute;
}
.rich-editor.is-empty:focus::before { content: ''; }
.rich-editor ul, .rich-editor ol { margin: 0.2em 0; padding-left: 1.6em; }
.rich-editor li { margin: 0; }

/* ===== Signed-in wizard typography lock =====
   The Quizzinator's signed-in wizard is the source of truth: Roboto; page title 2.2em bold
   #2c3e50 with 30px below; labels 1.1em bold #34495e with 8px below; inputs 1.1em, 15px padding,
   1px #ccc border, 6px radius, #ecf0f1 fill; buttons bold 1em, 15px 30px padding, 8px radius;
   secondary #95a5a6 with white text; plan status as plain bold #34495e text. */
:root { --font-sans: 'Roboto', sans-serif; }
body:not(.landing-page) .dashboard-step h1 { font-size: 2.2em; line-height: normal; margin: 0 0 30px; color: #2c3e50; text-align: center; }
body:not(.landing-page) .dashboard-step label { font-size: 1.1em; font-weight: 700; margin-bottom: 8px; color: #34495e; }
body:not(.landing-page) .dashboard-step input,
body:not(.landing-page) .dashboard-step textarea,
body:not(.landing-page) .dashboard-step select,
body:not(.landing-page) .dashboard-step .question-prompt-input,
body:not(.landing-page) .dashboard-step .summary-prompt-input {
  font-size: 1.1rem; line-height: normal; padding: 15px; border: 1px solid #ccc; border-radius: 6px;
  background: #ecf0f1; color: #000;
}
body:not(.landing-page) .dashboard-step .check input { padding: 0; }
body:not(.landing-page) .dashboard-step .primary,
body:not(.landing-page) .dashboard-step .secondary,
body:not(.landing-page) .site-header .primary,
body:not(.landing-page) .site-header .secondary { padding: 15px 30px; border-radius: 8px; font-size: 1em; font-weight: 700; min-height: 40px; }
body:not(.landing-page) .dashboard-step .secondary,
body:not(.landing-page) .site-header .secondary { background: #95a5a6; color: #fff; }
body:not(.landing-page) .dashboard-step .secondary:hover:not(:disabled),
body:not(.landing-page) .site-header .secondary:hover:not(:disabled) { background: #7f8c8d; }
body:not(.landing-page) .plan-status-pill { padding: 0 0 15px; border: 0; border-radius: 0; background: none; color: #34495e; font-weight: 700; }

/* Plan-limit counters under the summary and question editors (see refreshLimitFeedback in dashboard.js) */
.limit-counter {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #5b6472;
  text-align: right;
}
.limit-counter.is-over {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: #fff1f0;
  color: #b42318;
  text-align: left;
}
.limit-counter.hidden { display: none; }
::highlight(plan-overflow) {
  color: #d92d20;
  background-color: rgba(217, 45, 32, 0.14);
}

/* Student rules panel on the focus step (focus-loss consequence, minimum length, summary reading) */
.student-rules { display: grid; gap: 0.9rem; width: min(760px, 100%); margin: 1rem auto; text-align: left; }
.student-rules h3 { margin: 0.4rem 0 0; font-size: 1.1rem; text-align: center; }
.penalty-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.7rem; }
.penalty-card {
  display: grid; gap: 0.3rem; padding: 0.85rem 1rem; text-align: center; justify-items: center; align-content: start;
  border: 2px solid #ccd3da; border-radius: 10px; background: #ffffff; color: #111111; cursor: pointer;
  font: inherit;
}
.penalty-card strong { font-size: 1.05rem; }
.penalty-card span { font-size: 0.92rem; font-weight: 400; color: #4a5260; line-height: 1.35; }
.penalty-card:hover { border-color: var(--primary-color); }
.penalty-card.is-selected { border-color: var(--primary-color); background: #f8eeb5; box-shadow: 0 0 0 2px var(--primary-color) inset; }
.student-rule-field { display: grid; gap: 0.35rem; font-weight: 700; }
.student-rule-field input[type="number"], .student-rule-field select { max-width: 460px; }
.student-rule-help { font-size: 0.9rem; font-weight: 400; color: #4a5260; }
.read-summary-time { display: grid; gap: 0.4rem; justify-items: start; }
.read-summary-time.hidden { display: none; }
.summary-timer { margin: 0.8rem 0 0; font-weight: 700; text-align: center; }
.summary-timer.hidden { display: none; }
#min-chars-status.is-short { color: #b42318; font-weight: 700; }

.account-danger-zone { border-top: 1px solid #f0b4ae; }
.account-danger-zone h3 { color: #b42318; }
.account-delete-form { display: grid; gap: var(--space-sm); }
.account-delete-form.hidden, #account-delete-start.hidden { display: none; }
#account-delete-code { max-width: 220px; letter-spacing: 0.3em; font-size: 1.3rem; text-align: center; }
.account-actions .danger { padding: 0.4rem 0.9rem; font-size: 0.85rem; border-radius: var(--radius-pill); }

/* "Share the Form with PostWatch" help for email/password teachers */
.share-form-help {
  display: grid; gap: 0.8rem; width: min(760px, 100%); margin: 1rem auto; padding: 1.1rem 1.3rem;
  border: 1px solid #d3cfbf; border-radius: 10px; background: #ffffff; text-align: left;
}
.share-form-help.hidden { display: none; }
.share-form-help h3 { margin: 0; font-size: 1.15rem; }
.share-form-help p { margin: 0; line-height: 1.5; }
.share-form-warning { padding: 0.7rem 0.9rem; border-left: 4px solid #d99a00; background: #fffdf8; }
.share-form-steps { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.75rem; line-height: 1.5; }
.share-form-address-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.share-form-address {
  padding: 0.5rem 0.7rem; border: 1px solid #c4c4c4; border-radius: 6px; background: #f6f6f6;
  font-size: 0.95rem; word-break: break-all; user-select: all;
}
.share-form-copy, .share-form-recheck { justify-self: start; }
.share-form-note { font-size: 0.92rem; color: #4a5260; }
.answer-key-found {
  display: grid; gap: 0.3rem; width: min(760px, 100%); margin: 1rem auto; padding: 0.9rem 1.1rem;
  border: 1px solid #a6dcb5; border-left: 6px solid #1b7f3b; border-radius: 6px; background: #effaf1; color: #14522a; text-align: left;
}
.answer-key-found.hidden, .import-key-missing.hidden { display: none; }
.import-key-missing { width: min(760px, 100%); margin: 1rem auto 0; text-align: left; font-weight: 700; }
.student-rule-field.is-disabled { opacity: 0.55; }
.student-rule-field.is-disabled input, .student-rule-field.is-disabled select { cursor: not-allowed; background: #e8e8e8; }
.delete-confirmation-card { border-top: 6px solid #b42318; }
.delete-confirmation-card .danger { padding: 0.6rem 1.1rem; }
.auth-action-shell { width: min(560px, 100%); }
.primary-link {
  display: inline-block; padding: 0.75rem 1.3rem; border-radius: 0.8rem; background: #111; color: #fff;
  font-weight: 700; text-decoration: none;
}
.primary-link.hidden { display: none; }
.prestart-modal-card .teacher-auth-message { max-width: none; margin: 0; text-align: left; font-size: 1rem; }

/* Account page: one wide card, sections in a two-column grid with identical padding around every box */
.account-main { width: min(1120px, 100%); margin: 30px auto; padding: 0 20px; box-sizing: border-box; }
.account-page { width: 100%; margin: 0; padding: 32px; gap: 20px; }
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
  align-items: start;
}
.account-grid #account-credentials-section { display: contents; }
.account-page .account-section {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border: 1px solid #e1e5ed;
  border-radius: 12px;
  background: #ffffff;
}
.account-page .account-section h3 { margin: 0; }
.account-page .account-section label { display: grid; gap: 6px; }
.account-page .account-section .account-actions { margin-top: 2px; }
.account-page .account-danger-zone { border-color: #f0b4ae; background: #fffafa; }
.account-page .account-logout-row { padding-top: 0; border-top: 0; }
.account-page #account-google-note { padding: 0; }
@media (max-width: 480px) { .account-page { padding: 20px; } .account-grid { grid-template-columns: 1fr; } }
.account-page #account-name-form.account-section { padding: 20px; border: 1px solid #e1e5ed; }
.account-page #account-current-email { padding-bottom: 0; border-bottom: 0; }
.step-notice { width: min(760px, 100%); margin: 1rem auto 0.4rem; box-sizing: border-box; }
.step-notice.hidden { display: none; }

/* Logout sits at the right; rarely used destructive options are tucked into "More Account Options" */
.account-page .account-logout-row { justify-content: flex-end; }
.account-more { border: 1px solid #e1e5ed; border-radius: 12px; background: #ffffff; }
.account-more > summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; display: flex; align-items: center; justify-content: space-between;
}
.account-more > summary::-webkit-details-marker { display: none; }
.account-more > summary::after { content: "\25BE"; font-size: 1.1rem; transition: transform var(--transition-fast); }
.account-more[open] > summary::after { transform: rotate(180deg); }
.account-more > summary:focus-visible { outline: 2px solid #2f5fd0; outline-offset: 2px; border-radius: 12px; }
.account-more > .account-section { margin: 0 20px 20px; }
/* Increment controls in the PostWatch Options step */
.student-rule-field .question-mark-item { justify-self: center; margin-top: 4px; }
.student-rule-field .marks-control-label { display: block; }
.student-rule-field.is-disabled .question-mark-button { cursor: not-allowed; opacity: 0.6; }
.read-summary-time { margin-top: 0.6rem; }
.student-rule-hint { display: block; margin-bottom: 1.6rem; }
.student-rules { margin-bottom: 1.4rem; }
.account-delete-start { display: grid; gap: 14px; }
.account-delete-start.hidden { display: none; }

.student-rule-field .domain-entry { display: flex; justify-content: center; gap: 0.5rem; margin-top: 4px; }
.student-rule-field .domain-input { flex: 0 1 320px; padding: 0.65rem 0.8rem; border: 2px solid #cfd6dd; border-radius: 0.6rem; font: inherit; font-size: 1.1rem; font-weight: 400; }
.domain-suggestion { text-align: center; min-height: 1.2em; }
.domain-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.domain-list li { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem 0.35rem 0.8rem; background: #f8eeb5; border: 1px solid #f4dc72; border-radius: 999px; font-weight: 400; }
.domain-remove { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 0.3rem; }

body:not(.landing-page) .brand { display: none; }
body:not(.landing-page) .site-header { justify-content: center; }
.card-nav { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; }
.card-nav:not(:has(button:not(.hidden))) { display: none; }
.import-summary-review { display: grid; gap: 0.35rem; width: min(760px, 100%); margin: 1rem auto; font-weight: 700; text-align: left; }
.import-summary-review textarea { width: 100%; font: inherit; font-size: 1.1rem; font-weight: 400; padding: 0.7rem 0.8rem; border: 2px solid #cfd6dd; border-radius: 0.6rem; resize: vertical; }

.completed-main { margin: 0; }
.focus-remaining { font-weight: 700; margin: 0.2rem 0 0.6rem; }
.finish-panel { text-align: center; align-items: center; gap: 1rem; padding: 2.5rem 1rem; }
.finish-panel h2 { font-size: 1.8rem; }
.finish-copy { max-width: 480px; }
.finish-actions { display: flex; justify-content: center; gap: 0.8rem; }

.plan-options { display: grid; gap: 0.6rem; }
.plan-options.hidden { display: none; }
.plan-option { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.7rem 0.9rem; border: 1px solid #e1e5ed; border-radius: 10px; }
.plan-option > div { display: grid; gap: 0.15rem; }
.plan-option.current { background: #f8eeb5; border-color: #f4dc72; }
.plan-option button { padding: 0.4rem 0.9rem; font-size: 0.85rem; border-radius: 999px; white-space: nowrap; }
#account-confirm-ok.danger { background: #b42318; color: #fff; }

/* The summary fills the window on plain white, with large type, so even a short summary is easy to read. */
#summary-modal.prestart-modal { padding: 0; background: #ffffff; align-items: stretch; justify-content: stretch; }
#summary-modal .summary-modal-card {
  width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; box-shadow: none;
  padding: clamp(24px, 5vh, 56px) clamp(20px, 6vw, 96px); overflow-y: auto; align-content: start; grid-template-rows: auto 1fr auto auto;
}
#summary-modal .summary-modal-content {
  width: min(960px, 100%); max-height: none; margin: auto; padding: 0; border: 0; background: #ffffff; overflow: visible;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.6;
}
#summary-modal .summary-timer { margin-top: 0; }
#summary-modal #summary-modal-close { width: min(480px, 100%); margin: 0 auto; }

/* Account page: a wide card centred vertically in the window, yellow background still visible either side. */
.account-main { width: min(1400px, 100%); min-height: 100vh; margin: 0 auto; padding: 30px 40px; display: flex; align-items: center; }
.account-main .account-page { margin: 0; }
.account-grid { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.account-grid #account-credentials-section { display: grid; gap: 20px; }
.plan-compare { display: grid; gap: 0.8rem; text-align: left; width: 100%; }
.plan-compare.hidden { display: none; }
.plan-compare-section { padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid #e1e5ed; }
.plan-compare-section ul { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.plan-compare-section.gain { background: #f0faf2; border-color: #a6dcb5; }
.plan-compare-section.loss { background: #fff4f2; border-color: #f0b4ae; }

/* Placeholder text is a fixed smaller size, so hints look the same in every field. */
input::placeholder,
textarea::placeholder {
  font-size: 0.85rem;
}

/* Send Grades to Classroom modal */
.send-grades-card {
  width: min(1240px, 80vw);
}

.grade-mode-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.grade-mode-chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.grade-mode-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  pointer-events: none;
}

.grade-mode-body {
  display: grid;
  gap: 0.2rem;
  height: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid #cfd6dd;
  border-radius: 10px;
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}

.grade-mode-body strong {
  font-size: 1.1rem;
  color: #2c3e50;
}

.grade-mode-body span {
  font-size: 0.95rem;
  font-weight: 400;
  color: #4b5560;
}

.grade-mode-chip:hover .grade-mode-body {
  border-color: #8aa4bd;
}

.grade-mode-chip input:checked + .grade-mode-body {
  border-color: #2a6fd6;
  background: #e8f0fd;
  box-shadow: inset 0 0 0 1px #2a6fd6;
}

.grade-mode-chip input:focus-visible + .grade-mode-body {
  outline: 3px solid #9bbcf0;
  outline-offset: 2px;
}

.grade-row {
  grid-template-columns: 24px minmax(160px, 1fr) minmax(220px, 1.3fr) minmax(170px, 0.9fr);
}

.grade-row-result {
  display: grid;
  gap: 0.1rem;
  font-size: 1rem;
}

.grade-row-result em {
  font-style: normal;
  font-weight: 800;
}

.grade-row-result .grade-note {
  font-size: 0.85rem;
  font-weight: 500;
}

.grade-row-result.is-returned em {
  color: #18512f;
}

@media (max-width: 900px) {
  .send-grades-card { width: 100%; }
  .grade-row { grid-template-columns: 24px 1fr; }
  .grade-row input[type="email"], .grade-row-result { grid-column: 2; }
}

/* Profile icon (replaces the Account button) */
.profile-link { width: 42px; height: 42px; padding: 0; border-radius: 50%; background: #ecf0f1; border: 2px solid #d8dee4; display: inline-grid; place-items: center; color: #34495e; cursor: pointer; }
.profile-link:hover { background: #fbe9e7; border-color: #d9534f; color: #c9302c; }
.profile-link svg { width: 22px; height: 22px; }
.profile-link.hidden { display: none !important; }
.profile-link.card-corner { position: absolute; top: 16px; right: 16px; z-index: 5; }
.dashboard-shell, .mode-shell.panel { position: relative; }

/* Review page: profile icon top-right inside the card, Upgrade centred inside the card */
.review-main { position: relative; }

/* Email Results progress: spinner, "Sending Email 3/23", and who is being emailed */
.send-progress { width: min(460px, 100%); text-align: center; justify-items: center; padding: 2rem 1.5rem; gap: 0.35rem; }
.send-progress.hidden { display: none; }
.send-progress-spinner { width: 54px; height: 54px; border: 5px solid #e1e5ed; border-top-color: #171717; border-radius: 50%; animation: send-spin 0.9s linear infinite; margin-bottom: 0.5rem; }
@keyframes send-spin { to { transform: rotate(360deg); } }
.send-progress-count { margin: 0; }
.send-progress-name { margin: 0; font-size: 1.15rem; font-weight: 700; }
.send-progress-email { margin: 0; color: #5b6472; word-break: break-all; }
.send-progress-bar { width: 100%; height: 8px; background: #e1e5ed; border-radius: 999px; overflow: hidden; margin-top: 0.75rem; }
.send-progress-bar span { display: block; height: 100%; width: 0; background: #171717; transition: width 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .send-progress-spinner { animation-duration: 3s; } }

/* Reconnect Google prompts */
.google-reconnect { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 1rem; padding: 0.75rem 1rem; background: #fffdf8; border-bottom: 1px solid #e6cf7a; font-weight: 600; text-align: center; }
.google-reconnect button { padding: 10px 18px; border-radius: 8px; }
.dialog-error-action { margin-top: 0.6rem; padding: 10px 18px; border-radius: 8px; }

/* ======================= Instant answers: student view borrowed from Pop Quiz =======================
   Scoped to .task-shell.instant-feedback so every other task looks exactly as before. Pop Quiz's blue
   brand colour, lettered answer tiles, progress bar, Correct / Incorrect bar and full-screen flash. */
.task-shell.instant-feedback {
  --primary-color: #3A6FF0;
  --primary-hover: #2E59C4;
  --pq-secondary: #95a5a6;
  --pq-input-bg: #ecf0f1;
  --pq-text-dark: #2c3e50;
  --pq-text-light: #34495e;
}
.task-shell.instant-feedback .primary { background: var(--primary-color); color: #fff; }
.task-shell.instant-feedback .primary:hover:not(:disabled) { background: var(--primary-hover); }
.task-shell.instant-feedback .primary:disabled { background: #bdc3c7; cursor: not-allowed; }

.attempt-progress { width: 100%; margin: 0 0 var(--space-sm, 10px); }
.attempt-progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-xs, 6px); color: var(--text-light, #34495e); font-weight: 700; }
.dash-bar-track { background: #e6e9ec; border-radius: 999px; height: 14px; overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 999px; background: var(--primary-color, #3A6FF0); transition: width 300ms ease; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text-light, #34495e); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.task-shell.instant-feedback .choice-response { gap: var(--space-sm, 10px); }
.mc-answer-btn.has-text {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--space-md, 16px); text-align: left;
  font-weight: 400; font-size: 1.1rem; line-height: 1.4; padding: var(--space-lg, 24px);
  background: var(--pq-input-bg, #ecf0f1); color: var(--pq-text-light, #34495e);
  border: 2px solid #bdc3c7; border-radius: var(--radius-button, 8px); cursor: pointer;
  transition: all var(--transition-fast, 150ms ease);
}
.mc-answer-btn.has-text:hover { border-color: var(--primary-color); }
.mc-answer-btn.has-text input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mc-answer-btn.has-text .mc-letter {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: color-mix(in srgb, var(--primary-color) 14%, #fff); color: var(--primary-color); font-size: 1.1rem; font-weight: 700;
}
.mc-answer-btn.has-text .mc-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mc-answer-btn.has-text:has(input:checked) { background: var(--primary-color); color: #fff; border-color: var(--primary-hover); }
.mc-answer-btn.has-text:has(input:checked) .mc-letter { background: #fff; }
.mc-answer-btn.has-text:has(input:focus-visible) { outline: 3px solid var(--primary-color); outline-offset: 2px; }
.mc-answer-btn.has-text:has(input:disabled) { cursor: not-allowed; }
.mc-answer-btn.has-text:has(input:disabled:not(:checked)) { opacity: .7; }

.status-box.attempt-result { margin-top: var(--space-md, 16px); padding: var(--space-md, 16px); border-radius: var(--radius-input, 8px); background: #ecf0f1; color: #34495e; text-align: center; font-weight: 700; font-size: 1.4rem; white-space: pre-line; }
.status-box.attempt-result.correct { background: var(--success-color, #34A853); border: 1px solid var(--success-hover, #2e8a4a); color: #fff; box-shadow: 0 4px 14px rgba(52,168,83,.35); }
.status-box.attempt-result.error { background: var(--danger-color, #e74c3c); border: 1px solid var(--danger-hover, #c0392b); color: #fff; box-shadow: 0 4px 14px rgba(231,76,60,.35); }
.explanation-note { background: #eef4ff; border-left: 4px solid var(--primary-color, #3A6FF0); border-radius: var(--radius-input, 8px); padding: var(--space-sm, 10px) var(--space-md, 16px); margin: var(--space-sm, 10px) 0; color: #2c3e50; white-space: pre-line; }
.instant-actions { display: flex; gap: var(--space-sm, 10px); margin-top: var(--space-md, 16px); }
.instant-actions .hidden, .attempt-result.hidden, .explanation-note.hidden { display: none; }

/* Full-screen green (correct) / red (wrong) flash. */
.correct-flash { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px; background: rgba(47,158,68,.75); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.correct-flash.visible { opacity: 1; }
.correct-flash-card { width: min(680px,100%); padding: clamp(24px,5vw,46px); border: 1px solid rgba(255,255,255,.72); border-radius: 28px; background: rgba(255,255,255,.22); box-shadow: 0 24px 80px rgba(0,0,0,.24); color: #fff; text-align: center; backdrop-filter: blur(5px); transform: scale(.96); transition: transform 220ms ease; }
.correct-flash.visible .correct-flash-card { transform: scale(1); }
.correct-flash-kicker { font-size: clamp(1rem,3vw,1.25rem); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .94; }
.correct-flash-title { margin-top: 10px; font-size: clamp(3rem,12vw,6rem); line-height: 1; font-weight: 900; }
.correct-flash.negative { background: rgba(214,69,69,.75); }
@media (max-width: 600px) { .mc-answer-btn.has-text { padding: var(--space-md, 16px); } }

/* ---------------------------------------------------------------- PostWatch additions (tokens from the Design Constitution) */
.session-card-simple { grid-template-columns: minmax(0, 1fr) auto; }
.video-card { display: flex; gap: var(--space-md); align-items: center; padding: var(--space-md); border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: #fff; }
.video-card img { border-radius: var(--radius-input); object-fit: cover; }
.teacher-player-wrap { width: 100%; aspect-ratio: 16 / 9; max-height: 420px; border-radius: var(--radius-card); overflow: hidden; background: #000; }
.teacher-player-wrap iframe { width: 100%; height: 100%; display: block; }
.current-time { font-weight: 700; color: var(--text-light); min-width: 5.5rem; text-align: center; align-self: center; }
.question-list { display: grid; gap: var(--space-md); }
.question-editor { display: grid; gap: var(--space-sm); padding: var(--space-md); border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: #fff; }
.question-editor-head { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.question-editor textarea, .question-editor input[type="text"] { width: 100%; }
.question-editor-head input[type="text"] { width: auto; }
.option-list { display: grid; gap: var(--space-xs); }
.option-row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-sm); align-items: center; }
.button-group { display: flex; flex-wrap: wrap; gap: var(--space-sm); width: 100%; }
.selectable-btn { flex: 1 1 160px; min-height: var(--control-height); padding: var(--space-md); border: 2px solid #bdc3c7; border-radius: var(--radius-button); background: var(--input-bg); color: var(--text-light); font: inherit; font-weight: 600; cursor: pointer; text-align: center; transition: all var(--transition-fast); }
.selectable-btn.checked { background: var(--primary-color); border-color: var(--primary-hover); color: #fff; }
.link-box { text-align: center; padding: var(--space-lg); border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: #fff; word-break: break-all; }
.pin-display { font-size: 2rem; letter-spacing: 6px; color: var(--primary-color); }
.watch-main { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: var(--space-lg) var(--space-md); }
.watch-shell { width: min(960px, 100%); padding: var(--space-lg); }
.watch-join { max-width: 520px; margin: 0 auto; display: grid; gap: var(--space-md); }
.watch-join label { display: grid; gap: var(--space-xs); font-weight: 700; color: var(--text-light); }
.watch-rules { padding-left: 1.2rem; color: var(--text-light); line-height: 1.5; }
.watch-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-card); overflow: hidden; }
.watch-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-shield { position: absolute; inset: 0; z-index: 2; background: transparent; cursor: pointer; }
.watch-paused { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; color: #fff; font-size: 1.5rem; font-weight: 700; background: rgba(0, 0, 0, .25); }
.watch-gate { margin-top: var(--space-md); }
.watch-gate-card { display: grid; gap: var(--space-sm); padding: var(--space-lg); border: 1px solid var(--border-soft); border-top: 6px solid var(--primary-color); border-radius: var(--radius-card); background: #fff; box-shadow: var(--shadow-card-soft); text-align: left; }
.watch-gate-card textarea { width: 100%; min-height: 120px; padding: 15px; border: 1px solid #ccc; border-radius: var(--radius-input); background: var(--input-bg); font: inherit; resize: vertical; }
.gate-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
@media (max-width: 480px) { .gate-options { grid-template-columns: 1fr; } }
/* Lettered answer tiles, as in Pop Quiz */
.mc-answer-btn.has-text { display: flex; align-items: center; justify-content: flex-start; gap: var(--space-md); text-align: left; font-weight: 400; font-size: 1.1rem; line-height: 1.4; padding: var(--space-sm) var(--space-md); min-height: var(--control-height); flex: initial; }
.mc-answer-btn.has-text .mc-letter { flex: 0 0 auto; display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #f8eeb5; color: var(--primary-color); font-size: 1.1rem; font-weight: 700; }
.mc-answer-btn.has-text.checked .mc-letter { background: #fff; }
.mc-answer-btn.has-text .mc-text { flex: 1; min-width: 0; }
.watch-gate-card h2 { font-size: 1.3rem; line-height: 1.35; }
.gate-feedback { padding: var(--space-md); border-radius: var(--radius-input); background: #effaf1; border-left: 6px solid #1b7f3b; color: #14522a; font-weight: 600; }
.gate-feedback[data-kind="wrong"] { background: #fff1f0; border-left-color: #b42318; color: #7a1a10; }
.gate-error { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-input); background: #fff1f0; border-left: 6px solid #b42318; color: #7a1a10; font-weight: 600; }
.watch-controls { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-md); }
.watch-progress { position: relative; flex: 1; height: 10px; border-radius: var(--radius-pill); background: var(--input-bg); }
.watch-bar { height: 100%; width: 0; border-radius: var(--radius-pill); background: var(--primary-color); }
.watch-mark { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: var(--text-dark); transform: translateX(-2px); }
.watch-note { min-height: 1.4em; margin-top: var(--space-sm); text-align: center; }
.watch-credit { margin-top: var(--space-xs); text-align: center; font-size: var(--font-size-helper); }
.watch-done { text-align: center; display: grid; gap: var(--space-md); padding: var(--space-xl) var(--space-md); }
.review-table-wrap { overflow-x: auto; }
.review-table { width: 100%; border-collapse: collapse; }
.review-table th { font-size: var(--font-size-helper); font-weight: 600; text-align: left; color: var(--text-light); padding: var(--space-sm) var(--space-md); border-bottom: 2px solid var(--border-soft); white-space: nowrap; }
.review-table td { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border-soft); color: var(--text-dark); vertical-align: top; }
.review-table tr:hover td { background: var(--input-bg); }
.flag-badge { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); background: #fff1f0; color: #7a1a10; font-size: .8rem; font-weight: 700; }
.ok-badge { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); background: #effaf1; color: #14522a; font-size: .8rem; font-weight: 700; }
@media (max-width: 640px) { .video-card { flex-direction: column; align-items: flex-start; } .watch-shell { padding: var(--space-md); } }

/* Confirmation page (App Design Constitution section 5) */
.confirmation-grid { overflow-y: auto; max-height: 80vh; padding: 0 var(--space-sm); margin: 0 calc(var(--space-sm) * -1); scrollbar-width: none; }
.confirmation-grid::-webkit-scrollbar { display: none; }
.confirm-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: 18px 5px; border-bottom: 1px solid var(--border-soft); }
.confirm-row:last-child { border-bottom: 0; }
.confirm-row p { margin: 0; font-size: 1.1em; color: var(--text-dark); flex: 1; text-align: left; }
.confirm-row strong { color: var(--text-light); }
.edit-btn { background: none; border: none; color: var(--primary-color); font-weight: bold; font-size: 0.9em; text-decoration: underline; padding: 5px; cursor: pointer; min-height: 0; box-shadow: none; }
.edit-btn:hover { background: none; color: var(--primary-hover); }
.focus-lock-screen { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: var(--space-lg); background: rgba(17, 24, 39, .88); color: #fff; text-align: center; }
.focus-lock-screen h2 { margin-bottom: var(--space-sm); }
.focus-lock-screen .primary { margin-top: var(--space-md); }

/* Results page (padding, progress, exports) */
.review-actions { flex-wrap: wrap; gap: var(--space-sm); margin: var(--space-lg) 0; padding: 0 var(--space-sm); }
.review-actions .secondary, .review-actions .primary { margin: var(--space-xs); }
.export-notice { margin: 0 auto var(--space-lg); max-width: 760px; padding: var(--space-md) var(--space-lg); border: 1px solid #a6dcb5; border-left: 6px solid #1b7f3b; border-radius: var(--radius-input); background: #effaf1; color: #14522a; font-weight: 600; text-align: center; }
.export-notice a { color: #14522a; text-decoration: underline; }
.watch-progress-cell { min-width: 150px; }
.progress-track { height: 10px; border-radius: var(--radius-pill); background: var(--input-bg); overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--radius-pill); background: var(--primary-color); }
.progress-fill.complete { background: var(--success-color); }
.progress-label { margin-top: var(--space-xs); font-size: var(--font-size-helper); color: var(--text-light); white-space: nowrap; }
.review-table td { padding-top: var(--space-md); padding-bottom: var(--space-md); }

/* Student rules card and focus warning (styled after PostDeck's student warning) */
.focus-remaining { margin-top: var(--space-sm); text-align: center; font-weight: 700; color: #b42318; }
.focus-warning-modal { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 24px; background: rgba(120, 0, 0, .82); }
.focus-warning-card { width: min(760px, 100%); padding: 36px 32px; border: 4px solid #fff; border-radius: 20px; background: linear-gradient(180deg, #ffb347 0%, #ff8a00 100%); color: #1a1a1a; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); text-align: center; }
.focus-warning-kicker { margin-bottom: 12px; font-size: .95rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4a0b00; }
.focus-warning-card h2 { margin-bottom: 16px; font-size: 2.6rem; line-height: 1.05; color: #1a1a1a; }
.focus-warning-card #focus-warning-message { margin: 0 auto 22px; max-width: 620px; font-size: 1.15rem; line-height: 1.55; color: #1a1a1a; }
.focus-warning-actions { display: flex; justify-content: center; }
.focus-warning-card .btn { display: inline-flex; align-items: center; justify-content: center; min-width: 240px; min-height: var(--control-height); padding: 15px 30px; border: none; border-radius: var(--radius-button); background: #fff; color: #7e0c0c; font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: background-color var(--transition-fast), transform var(--transition-lift); }
.focus-warning-card .btn:hover:not([disabled]) { transform: translateY(-1px); }
.focus-warning-card .btn:focus-visible { outline: 3px solid #4a0b00; outline-offset: 3px; }
.focus-warning-card .btn:hover:not([disabled]) { background: #fff4f2; }
.focus-warning-card .btn[disabled] { background: #e8d9d5; color: #7e0c0c; cursor: not-allowed; box-shadow: none; opacity: .85; }
@media (max-width: 640px) { .focus-warning-card h2 { font-size: 1.9rem; } .focus-warning-card { padding: 24px 18px; } }
/* Full-screen green (correct) / red (incorrect) answer overlay, as in Pop Quiz */
.correct-flash { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; padding: 24px; background: rgba(47, 158, 68, .75); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.correct-flash.visible { opacity: 1; }
.correct-flash-card { width: min(680px, 100%); padding: clamp(24px, 5vw, 46px); border: 1px solid rgba(255, 255, 255, .72); border-radius: 28px; background: rgba(255, 255, 255, .22); box-shadow: 0 24px 80px rgba(0, 0, 0, .24); color: #fff; text-align: center; backdrop-filter: blur(5px); transform: scale(.96); transition: transform 220ms ease; }
.correct-flash.visible .correct-flash-card { transform: scale(1); }
.correct-flash-kicker { font-size: clamp(1rem, 3vw, 1.25rem); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .94; }
.correct-flash-title { margin-top: 10px; font-size: clamp(3rem, 12vw, 6rem); line-height: 1; font-weight: 900; }
.correct-flash.negative { background: rgba(214, 69, 69, .75); }
@media (prefers-reduced-motion: reduce) { .correct-flash, .correct-flash-card { transition: none; } }

/* Increment control (App Design Constitution section 5) */
.increment-control { display: inline-flex; align-items: center; gap: var(--space-sm); }
.increment-btn { width: var(--control-height); height: var(--control-height); min-height: var(--control-height); padding: 0; border: 2px solid #bdc3c7; border-radius: var(--radius-button); background: var(--input-bg); color: var(--text-light); font-size: 1.4rem; font-weight: 700; line-height: 1; cursor: pointer; transition: all var(--transition-fast); }
.increment-btn:hover:not([disabled]) { border-color: var(--primary-color); color: var(--primary-color); }
.increment-btn[disabled] { opacity: .45; cursor: not-allowed; }
.increment-value { min-width: 4.5rem; padding: 10px 18px; border: 2px solid var(--border-soft); border-radius: var(--radius-button); background: #fff; color: var(--text-dark); font-size: 1.3rem; font-weight: 700; text-align: center; }

.toggle-btn { flex: initial; width: 100%; max-width: 420px; justify-self: center; margin: 0 auto var(--space-sm); display: block; }

/* Pre-start rules screen (ported from Pop Quiz's focus-mode screen) */
.watch-intro { text-align: center; }
.prestart-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .78); }
.prestart-modal-card { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; padding: 32px; border-radius: 20px; background: #fff; color: #000; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); display: grid; gap: .9rem; }
.prestart-modal-card h2 { text-align: center; margin: 0; color: var(--text-dark); font-size: 1.8rem; }
.prestart-hero { font-size: 3rem; text-align: center; line-height: 1; }
.prestart-modal-card p { margin: 0 auto; text-align: center; color: var(--text-light); }
.prestart-sub { font-size: 1.05rem; font-weight: 600; }
.prestart-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.prestart-rules li { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1rem .75rem; text-align: center; border-radius: 16px; background: #f8eeb5; border: 2px solid var(--border-soft); font-weight: 700; color: var(--text-dark); }
.prestart-ico { font-size: 2rem; line-height: 1; }
.prestart-modal-card .prestart-consequence { font-size: 1.05rem; font-weight: 700; color: var(--text-dark); }
.prestart-consequence:empty { display: none; }
.prestart-ready { display: flex; justify-content: center; cursor: pointer; }
.prestart-ready input { position: absolute; opacity: 0; pointer-events: none; }
.prestart-ready-pill { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.6rem; border-radius: 999px; font-weight: 800; font-size: 1.15rem; background: #fff; color: var(--text-dark); border: 3px solid var(--border-soft); transition: all .15s ease; }
.prestart-ready-dot { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 3px solid var(--border-soft); transition: all .15s ease; }
.prestart-ready input:focus-visible + .prestart-ready-pill { outline: 3px solid var(--primary-color); outline-offset: 2px; }
.prestart-ready input:checked + .prestart-ready-pill { background: var(--success-color); border-color: var(--success-color); color: #fff; transform: scale(1.05); }
.prestart-ready input:checked + .prestart-ready-pill .prestart-ready-dot { background: #fff; border-color: #fff; }
.prestart-actions { display: flex; justify-content: center; gap: var(--space-md); flex-wrap: wrap; }
.prestart-actions .btn { min-width: 160px; }

.watch-speed { min-height: var(--control-height); padding: 0 var(--space-sm); border: 2px solid #bdc3c7; border-radius: var(--radius-button); background: var(--input-bg); color: var(--text-dark); font: inherit; font-weight: 700; }
.watch-progress.seekable { cursor: pointer; }
.watch-progress.seekable:hover .watch-bar { filter: brightness(1.2); }

/* ---- video tile centred (import step) ---- */
.video-card { justify-content: center; text-align: center; }
.video-card-text { display: grid; gap: 0.25rem; justify-items: center; text-align: center; }
.video-card-text .muted { margin: 0; }
@media (max-width: 640px) { .video-card { align-items: center; } }
.embed-help, .alternatives-list { display: grid; gap: var(--space-sm); justify-items: center; text-align: center; }
.alternative { width: 100%; justify-content: space-between; text-align: left; }
.alternative .video-card-text { justify-items: start; text-align: left; flex: 1; }
.class-new-row { display: flex; gap: var(--space-sm); }
.class-new-row input { flex: 1; }

/* ---- question editor and transcript mode (compact) ---- */
.mode-switch { justify-content: center; width: auto; margin: 0 auto var(--space-md); display: flex; gap: 0; }
.mode-switch .selectable-btn { flex: 0 0 auto; min-height: 38px; padding: 0.4rem 1.2rem; font-size: 0.92rem; }
.mode-switch .selectable-btn:first-child { border-radius: 8px 0 0 8px; }
.mode-switch .selectable-btn:last-child { border-radius: 0 8px 8px 0; margin-left: -2px; }
.question-editor { max-width: 640px; width: 100%; margin: 0 auto; gap: 0.6rem; padding: 0.9rem 1rem; }
.question-editor .question-editor-head { gap: 0.5rem; }
.question-editor .question-editor-head input[type="text"] { width: 4.5rem; padding: 0.3rem 0.5rem; min-height: 36px; text-align: center; }
.question-editor button.secondary, .question-editor button.danger { min-height: 34px; padding: 0.25rem 0.8rem; font-size: 0.85rem; width: auto; }
.question-editor .button-group { width: auto; gap: 0; }
.question-editor .selectable-btn { flex: 0 0 auto; min-height: 34px; padding: 0.25rem 0.9rem; font-size: 0.88rem; border-width: 1px; }
.question-editor .selectable-btn:first-child { border-radius: 8px 0 0 8px; }
.question-editor .selectable-btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.question-editor textarea { min-height: 0; padding: 0.55rem 0.7rem; }
.question-editor .muted { font-size: 0.82rem; margin: 0; text-align: left; }
.question-editor .option-list { gap: 0.4rem; }
.question-editor .option-row { grid-template-columns: auto minmax(0, 360px) auto; justify-content: start; gap: 0.5rem; }
.question-editor .option-row input[type="text"] { padding: 0.35rem 0.6rem; min-height: 36px; }
.question-editor .option-row button { min-width: 30px; width: 30px; min-height: 30px; padding: 0; line-height: 1; border-radius: 50%; }
.question-editor > button.secondary { justify-self: start; }
.transcript-list { max-height: 520px; overflow-y: auto; padding: var(--space-md); border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: #fff; }
.transcript-line { display: flex; gap: 0.75rem; margin: 0; padding: 0.35rem 0; line-height: 1.5; text-align: left; }
.transcript-time { flex: none; width: 3.2rem; color: #6b7280; font-variant-numeric: tabular-nums; font-weight: 600; }
.transcript-list:empty { display: none; }
.transcript-line { cursor: pointer; border-radius: 6px; padding-left: 0.4rem; }
.transcript-line:hover { background: #fffbe0; }
.transcript-line.is-selected { background: #fff3a8; box-shadow: inset 3px 0 0 #111; border-bottom: 2px dashed #111; }
.transcript-marker { margin: 0.2rem 0 0.2rem 3.95rem; padding: 0.1rem 0.7rem; width: fit-content; border-radius: 999px; background: #111; color: #fff; font-size: 0.78rem; font-weight: 700; }
.transcript-add-bar { display: flex; justify-content: center; align-items: center; gap: var(--space-md); margin: var(--space-sm) 0 var(--space-md); }
.transcript-paste textarea { min-height: 0; }
.transcript-paste input[type="file"] { flex: 1; padding: 0.3rem 0.5rem; min-height: 0; background: transparent; border: 0; font-size: 0.85rem; color: #6b7280; }
.transcript-paste input[type="file"]::file-selector-button { margin-right: 0.8rem; padding: 0.4rem 1rem; border: 0; border-radius: 8px; background: #95a5a6; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.transcript-paste input[type="file"]::file-selector-button:hover { background: #7f8c8d; }
.transcript-paste { display: grid; gap: var(--space-sm); max-width: 640px; margin: 0 auto var(--space-md); }
.transcript-paste-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); }
button.compact { min-height: 36px; padding: 0.35rem 1.1rem; font-size: 0.9rem; width: auto; }
.marks-panel { max-width: 640px; margin: 0 auto var(--space-md); padding: var(--space-md); border: 1px solid var(--border-soft); border-radius: var(--radius-card); background: #fff; display: grid; gap: var(--space-sm); }
.marks-panel h2 { font-size: 1.1rem; margin: 0; }
.marks-rows { display: grid; gap: 0.4rem; }
.marks-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); text-align: left; }
.marks-row .increment-btn { width: 32px; height: 32px; min-height: 32px; font-size: 1.1rem; }
/* ---- progress map (results) ---- */
.progress-map-wrap { overflow-x: auto; padding: var(--space-md); }
.pmap-row { display: grid; align-items: stretch; min-width: 720px; border-bottom: 1px solid #ececec; }
.pmap-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; padding-bottom: 0.4rem; align-items: end; text-align: center; }
.pmap-head > :first-child { text-align: right; padding-right: 0.8rem; }
.pmap-qhead { cursor: help; }
.pmap-name { align-self: center; justify-self: end; padding-right: 0.8rem; font-weight: 800; text-align: right; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pmap-chip { align-self: center; margin: 4px; padding: 0.55rem 0.2rem; border-radius: 6px; background: #f1f2f4; text-align: center; font-weight: 800; font-size: 0.85rem; }
.pmap-chip.is-good { background: #c6ef8f; }
.pmap-chip.is-mid { background: #eaf58a; }
.pmap-chip.is-low { background: #f6d9a0; }
.pmap-seg { position: relative; display: flex; align-items: center; min-height: 52px; }
.pmap-seg::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #9aa0a6; }
.pmap-pill { position: relative; z-index: 1; width: calc(100% - 6px); margin: 0 auto; height: 22px; border: 2px solid #8a9096; border-radius: 999px; background: #fff; overflow: hidden; }
.pmap-pill-fill { height: 100%; background: repeating-linear-gradient(135deg, #d9ee9a 0 3px, #c4e07a 3px 6px); }
.pmap-q { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; font-size: 0.65rem; font-weight: 800; color: #fff; background: #f1f2f4; border-radius: 4px 4px 0 0; margin: 2px 0; }
.pmap-q.is-right { background: #7cc255; }
.pmap-q.is-wrong { background: #e0715c; }
.pmap-q.is-answered { background: #9aa6b2; font-size: 0.9rem; }
.pmap-q.is-none { background: repeating-linear-gradient(135deg, #f4f4f4 0 4px, #eaeaea 4px 8px); }
