:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #627068;
  --paper: #f4f1e9;
  --surface: #fffdf8;
  --line: #d9ddd5;
  --green: #195c45;
  --green-soft: #dcebe3;
  --amber: #98621d;
  --amber-soft: #f7ead1;
  --red: #9c3f32;
  --shadow: 0 24px 70px rgba(23, 33, 28, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 14%, rgba(25, 92, 69, 0.08), transparent 30%),
    var(--paper);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [tabindex="-1"]:focus-visible {
  outline: 3px solid rgba(25, 92, 69, 0.38);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 64px);
  border-bottom: 1px solid rgba(23, 33, 28, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 126px;
  height: auto;
  display: block;
}

.role-switcher {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
}

.role-button {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.role-button.active {
  color: white;
  background: var(--green);
}

.main-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 92px) 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(520px, 1.3fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.context-panel {
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0 20px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.lede {
  max-width: 390px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.context-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.context-footer .number { color: var(--ink); font-size: 24px; font-weight: 800; }
.divider { width: 1px; height: 26px; margin: 0 5px; background: var(--line); }

.check-in-card, .result-card {
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(23, 33, 28, 0.09);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.question-heading, .result-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.question-number, .verdict-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill.neutral { color: var(--muted); background: #edf0ec; }
.status-pill.fallback { color: var(--amber); background: var(--amber-soft); }

.check-in-card h2, .result-card h2 {
  margin-bottom: 34px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.field-label, legend {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.field-label span { color: var(--muted); font-size: 12px; font-weight: 500; }

textarea, input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fffefa;
  transition: border-color 150ms, box-shadow 150ms;
}

textarea { padding: 16px; resize: vertical; line-height: 1.55; }
input[type="text"] { padding: 13px 15px; }
textarea:focus, input[type="text"]:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(25, 92, 69, 0.1); }
textarea:disabled, input:disabled { color: #59645e; background: #f2f0ea; cursor: not-allowed; }

fieldset { margin: 28px 0; padding: 0; border: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefa;
  cursor: pointer;
}
.choice input:checked + span { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.choice input:focus-visible + span { outline: 3px solid rgba(25, 92, 69, 0.25); }
.choice strong { font-size: 13px; }
.choice small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.choice input:disabled + span { opacity: 0.7; cursor: not-allowed; }

.privacy-note { margin: 8px 0 24px; color: var(--muted); font-size: 12px; }
.inline-error { margin-bottom: 14px; color: var(--red); font-size: 13px; font-weight: 700; }

.primary-button, .secondary-button {
  border: 0;
  border-radius: 12px;
  font-weight: 800;
}
.primary-button { width: 100%; padding: 15px 20px; color: white; background: var(--green); }
.primary-button:hover { background: #124b38; }
.primary-button:disabled { opacity: 0.6; cursor: not-allowed; }
.secondary-button { flex: none; padding: 10px 14px; color: var(--green); background: white; border: 1px solid var(--green); }

.pending-card { min-height: 320px; text-align: center; display: grid; place-items: center; align-content: center; }
.pending-card[hidden] { display: none; }
.pending-card h2 { margin: 4px 0 10px; }
.pending-card p:last-child { color: var(--muted); }
.spinner { width: 34px; height: 34px; margin-bottom: 22px; border: 3px solid var(--green-soft); border-top-color: var(--green); border-radius: 50%; animation: spin 0.85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.verdict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 10px 0 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.verdict-block { padding: 22px; background: #f8faf7; }
.verdict-block.understanding { background: #faf6ed; }
.verdict-block strong { display: block; margin-top: 8px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.result-summary { color: #3e4a43; font-size: 16px; line-height: 1.65; }
.skills-section { margin-top: 26px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.skill-chip { padding: 8px 10px; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 700; }
.original-response { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.original-response summary { color: var(--green); cursor: pointer; font-size: 13px; font-weight: 800; }
.original-response blockquote { margin: 16px 0 0; padding-left: 16px; border-left: 3px solid var(--green-soft); color: var(--muted); line-height: 1.6; }
.failure-message { margin-top: 24px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #e8d3ad; border-radius: 13px; background: #fff8e9; }
.failure-message[hidden] { display: none; }
.failure-message p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.teacher-dashboard { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(38px, 6vw, 76px) 0; }
.teacher-heading, .section-heading, .detail-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.teacher-heading h1 { margin: 0; font-size: clamp(42px, 6vw, 68px); }
.teacher-heading .secondary-button { margin-top: 8px; }
.class-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0; }
.class-tab { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 13px; font-weight: 750; text-decoration: none; }
.class-tab.active { color: white; border-color: var(--green); background: var(--green); }
.teacher-intro h2, .response-detail h2 { margin: 0 0 22px; font-family: Georgia, serif; font-size: 32px; font-weight: 500; letter-spacing: -0.03em; }
.class-question { max-width: 820px; margin: -10px 0 22px; color: var(--muted); line-height: 1.55; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card, .synthesis-card, .private-panel, .roster-card, .response-detail { border: 1px solid rgba(23, 33, 28, 0.11); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 35px rgba(23, 33, 28, 0.05); }
.metric-card { min-height: 164px; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; }
.metric-card strong { font-family: Georgia, serif; font-size: 42px; font-weight: 500; line-height: 1; }
.metric-card span { margin-top: 8px; font-size: 15px; font-weight: 750; }
.metric-card small { margin-top: 6px; color: var(--muted); }
.money-shot { margin: 0 0 18px; padding: 18px 20px; border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; color: #31463a; background: var(--green-soft); font-family: Georgia, serif; font-size: 20px; line-height: 1.45; }
.synthesis-card { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 24px; margin-bottom: 18px; background: #edf5f0; }
.synthesis-card h3, .private-panel h3, .roster-card h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.synthesis-card p { margin-bottom: 0; color: #435149; line-height: 1.55; }
.teacher-narrative { padding-left: 24px; border-left: 2px solid #b5d2c2; }
.completed-analysis-status { margin: 4px 0 0; }
.analysis-state-line { margin: 7px 0 0; color: var(--muted); font-weight: 700; }
.analysis-scope-tabs { margin: 20px 0 14px; }
.response-filter-tabs { margin: 12px 0 18px; }
.analysis-summary-card, .question-analysis-card { margin-bottom: 18px; padding: 24px; border: 1px solid rgba(23, 33, 28, .11); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 35px rgba(23,33,28,.05); }
.analysis-summary-card { display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr); gap: 28px; }
.analysis-submission-grid { display: grid; gap: 10px; }
.analysis-submission-grid p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.analysis-submission-grid p:last-child { border-bottom: 0; }
.analysis-submission-grid span { color: var(--muted); white-space: nowrap; }
.analysis-total-coverage { margin: 14px 0 0; color: var(--green); font-weight: 800; }
.analysis-overall-summary { padding-left: 26px; border-left: 2px solid #b5d2c2; }
.analysis-overall-summary h2, .question-analysis-card h2, .roster-card h2 { margin: 0 0 9px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; line-height: 1.22; }
.analysis-overall-summary p { margin: 0; color: #435149; line-height: 1.58; }
.analysis-overall-summary p + p { margin-top: 10px; }
.provisional-label { margin-top: 14px !important; color: var(--green) !important; font-size: 14px; font-weight: 800; }
.interim-summary-card .primary-button { margin-top: 14px; }
.question-analysis-list { display: grid; gap: 18px; }
.question-analysis-card { margin: 0; }
.question-analysis-card header { display: grid; gap: 7px; margin-bottom: 18px; }
.question-format-chip { width: max-content; padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 750; }
.question-metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.question-metric-grid article { display: flex; min-height: 132px; flex-direction: column; justify-content: flex-end; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.question-metric-grid strong { font-family: Georgia, serif; font-size: 35px; font-weight: 500; line-height: 1; }
.question-metric-grid span { margin-top: 7px; font-weight: 750; }
.question-metric-grid small { margin-top: 5px; color: var(--muted); }
.question-narrative > p { margin: 0 0 14px; color: var(--green); font-weight: 700; }
.question-narrative dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin: 0; }
.question-narrative dl div { padding-top: 12px; border-top: 1px solid var(--line); }
.question-narrative dt { margin-bottom: 4px; color: var(--ink); font-size: 13px; font-weight: 800; }
.question-narrative dd { margin: 0; color: var(--muted); line-height: 1.48; }
.private-panel, .roster-card, .response-detail { padding: 24px; margin-bottom: 18px; }
.private-question-button { width: 100%; display: block; margin-top: 9px; padding: 12px; border: 1px solid #ead9bc; border-radius: 10px; color: #6c4c21; text-align: left; background: #fffaf0; font-size: 13px; line-height: 1.45; }
.cached-notice { display: inline-block; margin: 0 0 18px; padding: 10px 12px; border-radius: 10px; color: var(--amber); background: var(--amber-soft); font-size: 13px; font-weight: 700; }
.roster-list { margin-top: 16px; border-top: 1px solid var(--line); }
.roster-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; background: transparent; }
.roster-row strong, .roster-row small { display: block; }
.roster-row small { max-width: 650px; margin-top: 5px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.roster-status { align-self: center; color: var(--green); font-size: 12px; font-weight: 750; text-align: right; }
.detail-columns { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 18px; }
.original-words, .ai-analysis { padding: 20px; border-radius: 13px; background: #f8f7f2; }
.original-words blockquote { margin: 15px 0; padding-left: 16px; border-left: 3px solid var(--green-soft); color: #405047; line-height: 1.65; white-space: pre-wrap; }
.uncertainty-marker, .private-copy { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.detail-verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 18px; }
.detail-verdicts div { padding: 13px; border-radius: 9px; background: #fffefa; }
.detail-verdicts span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.detail-verdicts strong { display: block; margin-top: 6px; font-size: 15px; }
.ai-analysis > p:last-of-type { margin: 0; color: #435149; line-height: 1.6; }
.misconception { margin-top: 18px; padding: 14px; border-radius: 10px; color: #77411f; background: #fff4e3; font-size: 13px; line-height: 1.5; }
.misconception p { margin: 5px 0 0; }
.teacher-controls { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.teacher-controls > div { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; }
.teacher-controls .field-label { margin-top: 15px; }
.teacher-controls textarea { margin-bottom: 10px; }
.teacher-controls .primary-button { width: auto; padding: 11px 15px; }
.control-status { display: inline-block; margin: 0 0 0 12px; color: var(--green); font-size: 13px; font-weight: 750; }

[hidden] { display: none !important; }

@media (max-width: 840px) {
  .main-grid { grid-template-columns: 1fr; gap: 30px; padding-top: 42px; }
  .context-panel { min-height: auto; }
  .context-footer { display: none; }
  h1 { font-size: 50px; }
}

@media (max-width: 600px) {
  .topbar { height: auto; padding: 14px 18px; align-items: flex-start; gap: 12px; }
  .brand img { width: 112px; }
  .role-switcher { flex-direction: column; border-radius: 14px; }
  .role-button { padding: 6px 10px; }
  .main-grid { width: min(100% - 24px, 1180px); padding: 30px 0; }
  .check-in-card, .result-card { padding: 22px 18px; border-radius: 18px; }
  .choice-grid, .verdict-grid, .metric-grid, .detail-columns, .synthesis-card { grid-template-columns: 1fr; }
  .failure-message { align-items: stretch; flex-direction: column; }
  .teacher-dashboard { width: min(100% - 24px, 1180px); padding: 30px 0; }
  .teacher-heading, .section-heading, .detail-heading { flex-direction: column; }
  .roster-row { grid-template-columns: 1fr; gap: 7px; }
  .roster-status { text-align: left; }
}

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

/* Product-flow expansion */
.page-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: clamp(38px, 6vw, 76px) 0; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 30px; }
.page-heading h1 { margin: 0; font-size: clamp(42px, 6vw, 68px); }
.page-heading .secondary-button { text-decoration: none; margin-top: 6px; }
.class-card-grid, .two-column { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.two-column { grid-template-columns: 1fr 1fr; }
.class-card, .panel, .feature-card { padding: 24px; border: 1px solid rgba(23, 33, 28, .11); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 35px rgba(23, 33, 28, .05); }
.class-card h2, .panel h2, .feature-card h2 { font-family: Georgia, serif; font-size: 27px; font-weight: 500; line-height: 1.18; }
.class-card .secondary-button, .panel .secondary-button { display: inline-block; margin-top: 8px; text-decoration: none; }
.feature-card { margin-bottom: 18px; background: #edf5f0; }
.feature-card .primary-button { display: inline-block; width: auto; margin-top: 8px; text-decoration: none; }
.checkin-stack, .result-stack { display: grid; gap: 18px; }
.checkin-stack .check-in-card { box-shadow: 0 12px 35px rgba(23,33,28,.05); }
.page-actions { margin: -12px 0 20px; }
.page-actions .secondary-button { text-decoration: none; }
.plain-list { margin: 0; padding-left: 18px; line-height: 1.8; }
.plain-list a { color: var(--green); font-weight: 700; }
.response-row { display: block; padding: 13px 0; border-top: 1px solid var(--line); }
.response-row summary { cursor: pointer; color: var(--green); }
.response-row blockquote { margin: 12px 0; padding-left: 14px; border-left: 3px solid var(--green-soft); color: var(--muted); white-space: pre-wrap; }
select { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fffefa; }
.check-in-card .field-label input, .check-in-card .field-label textarea, .check-in-card .field-label select { margin-top: 8px; }
@media (max-width: 760px) { .page-shell { width: min(100% - 24px, 1120px); padding: 30px 0; } .class-card-grid, .two-column { grid-template-columns: 1fr; } .page-heading { flex-direction: column; } }

/* Teacher workspace redesign */
.teacher-primary-nav, .class-shell-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.teacher-global-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0; }
.teacher-global-link { padding: 7px 10px; border-radius: 999px; color: var(--green); font-size: 13px; font-weight: 800; text-decoration: none; }
.teacher-global-link:hover { background: var(--green-soft); }
.teacher-global-link.active { color: #fff; background: var(--green); }
.teacher-top-level .page-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.dashboard-identity-summary { margin: 6px 0 0; color: var(--muted); font-weight: 750; }
.teacher-primary-nav { margin: 24px 0 18px; }
.teacher-nav-link, .back-link, .context-back, .small-action { color: var(--green); font-size: 13px; font-weight: 800; text-decoration: none; }
.teacher-nav-link { padding: 9px 12px; border-radius: 999px; }
.teacher-nav-link.active { color: white; background: var(--green); }
.teacher-summary { margin: 0 0 24px; color: var(--muted); font-weight: 700; }
.teacher-work-queue, .current-checkin-card, .compact-list, .private-queue, .table-wrap { overflow: hidden; border: 1px solid rgba(23, 33, 28, .11); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 35px rgba(23, 33, 28, .05); }
.teacher-work-queue { margin-bottom: 18px; }
.teacher-work-queue .section-heading { padding: 20px 22px 7px; }
.ai-class-pulse { margin: 22px 0 18px; padding: 15px 18px; border: 1px solid #cad8ce; border-radius: 16px; background: #f5faf6; }
.ai-class-pulse h2 { margin: 1px 0 5px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.ai-class-pulse p { margin: 0; color: #435149; font-size: 14px; line-height: 1.45; }
.ai-class-pulse .eyebrow { margin-bottom: 5px; }
.ai-class-pulse details { width: max-content; margin-top: 8px; color: var(--green); font-size: 13px; font-weight: 800; }
.ai-class-pulse summary { cursor: pointer; }
.pulse-class-block { display: grid; gap: 3px; width: min(680px, 100%); margin-top: 14px; color: #435149; font-size: 13px; font-weight: 500; line-height: 1.5; }
.pulse-class-block + .pulse-class-block { padding-top: 14px; border-top: 1px solid #d8e3da; }
.pulse-class-block strong { color: var(--ink); }
.teacher-dashboard-three-column { display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(220px, .9fr) minmax(200px, .8fr); gap: 16px; align-items: stretch; }
.teacher-dashboard-center { display: grid; grid-template-rows: repeat(3, minmax(112px, 1fr)); gap: 16px; }
.dashboard-attention { margin: 0; }
.dashboard-attention h2 { margin: 0; padding: 18px 20px 10px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.attention-home-list { margin: 0; padding: 0; list-style: none; }
.attention-home-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 750; }
.attention-home-item:hover { background: #f8faf7; }
.attention-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 13px; font-weight: 900; }
.attention-home-item.is-clear { color: #476454; }
.attention-home-item.is-clear .attention-icon { color: var(--green); background: #e8f2eb; }
.success-badge { color: var(--green); background: var(--green-soft); }
.all-caught-up { padding: 20px 22px; border-top: 1px solid var(--line); }
.all-caught-up h3 { margin: 0 0 4px; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.all-caught-up p { margin: 0; color: var(--muted); }
.teacher-checkins-summary { grid-row: span 2; display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid rgba(23, 33, 28, .11); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 12px 35px rgba(23, 33, 28, .05); text-decoration: none; cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease; }
.teacher-checkins-summary:hover { transform: translateY(-2px); border-color: #b9d0c0; background: #f8faf7; box-shadow: var(--shadow); }
.teacher-checkins-summary:focus-visible, .teacher-home-card:focus-visible, .create-checkin-card:focus-visible, .class-card-link:focus-visible { outline: 3px solid #1e7557; outline-offset: 3px; }
.teacher-checkins-summary h2 { margin: 1px 0 4px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.teacher-checkins-summary strong { display: block; color: var(--green); font-size: 17px; }
.checkins-breakdown { display: grid; gap: 4px; margin: 6px 0 7px; color: #435149; font-size: 13px; line-height: 1.25; }
.teacher-checkins-summary small { display: block; color: var(--amber); font-size: 12px; font-weight: 800; }
.dashboard-icon-panel { width: 46px; height: 46px; flex: 0 0 46px; display: block; border-radius: 10px; background-color: var(--green); mask-position: center; mask-repeat: no-repeat; mask-size: 38px 38px; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: 38px 38px; }
.icon-classes { mask-image: url("/assets/icons/classes.svg"); -webkit-mask-image: url("/assets/icons/classes.svg"); }
.icon-students { mask-image: url("/assets/icons/students.svg"); -webkit-mask-image: url("/assets/icons/students.svg"); }
.icon-check-ins { mask-image: url("/assets/icons/check-ins.svg"); -webkit-mask-image: url("/assets/icons/check-ins.svg"); }
.icon-student-questions { mask-image: url("/assets/icons/student-questions.svg"); -webkit-mask-image: url("/assets/icons/student-questions.svg"); }
.icon-create-checkin { mask-image: url("/assets/icons/create-check-in.svg"); -webkit-mask-image: url("/assets/icons/create-check-in.svg"); }
.teacher-home-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.teacher-home-navigation { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); }
.teacher-home-card { min-height: 132px; display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid rgba(23, 33, 28, .11); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 12px 35px rgba(23, 33, 28, .05); text-decoration: none; transition: transform 150ms ease, box-shadow 150ms ease; }
.teacher-home-navigation .teacher-home-card { min-height: 0; justify-content: flex-start; padding: 16px; text-align: left; }
.teacher-home-navigation .teacher-home-card > div { display: grid; gap: 4px; justify-items: start; }
.teacher-home-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.teacher-home-card h2 { margin: 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.teacher-home-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.create-checkin-card { display: flex; align-items: center; justify-content: flex-start; gap: 13px; min-height: 0; padding: 16px; border: 1px solid #cad8ce; border-radius: 16px; color: var(--green); background: var(--surface); box-shadow: 0 12px 35px rgba(23, 33, 28, .05); font-family: Georgia, serif; font-size: 24px; font-weight: 500; text-decoration: none; transition: transform 150ms ease, box-shadow 150ms ease; }
.create-checkin-card .dashboard-icon-panel { width: 46px; height: 46px; flex-basis: 46px; mask-size: 38px 38px; -webkit-mask-size: 38px 38px; }
.create-checkin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.queue-row, .compact-list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.queue-row:first-of-type { border-top: 0; }
.queue-row:hover, .compact-list-row:hover { background: #f8faf7; }
.teacher-dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.teacher-dashboard-grid.dense { margin: 18px 0; }
.toolbar { margin: 20px 0; }
.classes-view-toggle { display: flex; gap: 8px; margin: 18px 0; }
.view-toggle-button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--green); background: var(--surface); font-weight: 800; }
.view-toggle-button.active { color: #fff; border-color: var(--green); background: var(--green); }
.view-toggle-icon { width: 16px; height: 16px; display: inline-block; background-color: currentColor; mask-position: center; mask-repeat: no-repeat; mask-size: contain; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain; }
.icon-card-view { mask-image: url("/assets/icons/card-view.svg"); -webkit-mask-image: url("/assets/icons/card-view.svg"); }
.icon-list-view { mask-image: url("/assets/icons/list-view.svg"); -webkit-mask-image: url("/assets/icons/list-view.svg"); }
.filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 18px 0; }
.filter-form label { min-width: 140px; flex: 1 1 150px; color: var(--muted); font-size: 12px; font-weight: 750; }
.filter-form input, .filter-form select { margin-top: 5px; }
.filter-form input { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fffefa; }
.filter-form .secondary-button { padding: 12px 14px; }
.top-level-action { display: inline-flex; align-items: center; gap: 8px; width: max-content; margin-top: 6px; padding: 11px 14px; border: 0; border-radius: 11px; color: #fff; background: var(--green); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.top-level-action:hover { background: #124b38; }
.top-level-action:focus-visible, .student-question-row:focus-visible, .question-group-row:focus-visible, .checkin-table-row:focus-visible { outline: 3px solid #1e7557; outline-offset: 3px; }
.action-icon { width: 18px; height: 18px; display: inline-block; background: currentColor; mask-repeat: no-repeat; mask-position: center; mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; }
.icon-create-checkin { mask-image: url("/assets/icons/create-check-in.svg"); -webkit-mask-image: url("/assets/icons/create-check-in.svg"); }
.icon-upload { mask-image: url("/assets/icons/upload.svg"); -webkit-mask-image: url("/assets/icons/upload.svg"); }
.teacher-class-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 70px; }
.class-shell-header { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.back-link, .context-back { display: inline-block; margin-bottom: 20px; }
.class-shell-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.class-shell-title h1 { margin: 0 0 6px; font-size: clamp(38px, 5vw, 58px); }
.class-shell-title p { margin: 0; color: var(--muted); font-weight: 700; }
.class-create-action { width: auto; flex: none; text-decoration: none; }
.class-shell-nav { margin: 24px 0 0; }
.class-shell-nav.class-tabs { margin-bottom: 0; }
.class-tab { display: inline-flex; align-items: center; gap: 7px; }
.notification-badge { min-width: 19px; padding: 2px 6px; border-radius: 999px; color: white; background: var(--red); font-size: 11px; line-height: 1.25; text-align: center; }
.class-tab.active .notification-badge { color: var(--red); background: white; }
.class-shell-content { padding-top: 26px; }
.content-section h2, .tab-content-header h2, .content-title { margin: 0 0 5px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.tab-content-header { margin-bottom: 12px; }
.tab-content-header p { margin: 0; color: var(--muted); }
.current-checkin-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 22px; }
.current-checkin-card h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.current-checkin-card p:last-child { margin-bottom: 0; color: var(--muted); }
.attention-list { margin: 0; padding-left: 20px; color: #435149; line-height: 1.8; }
.private-preview { margin-bottom: 18px; }
.private-preview .section-heading { align-items: center; margin-bottom: 10px; }
.private-preview h3 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.private-preview-row { display: grid; gap: 5px; padding: 14px 0; border-top: 1px solid var(--line); }
.private-preview-row span, .compact-list-row span, .compact-list-row small { color: var(--muted); font-size: 13px; }
.compact-list-row > div { min-width: 0; display: grid; gap: 5px; }
.compact-list-row .row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; }
.checkin-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.checkin-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.row-actions { display: flex; align-items: center; gap: 8px; }
.status-chip { display: inline-flex; align-items: center; width: max-content; padding: 5px 8px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-chip.subtle { color: #59645e; background: #edf0ec; }
.status-chip.needs { color: #7a4b0e; background: var(--amber-soft); }
.student-table { width: 100%; border-collapse: collapse; text-align: left; }
.student-table th, .student-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.student-table th { color: var(--muted); font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.student-table tr:last-child td { border-bottom: 0; }
.student-table a { color: var(--green); font-weight: 800; }
.table-sort-button { border: 0; padding: 0; color: inherit; background: none; font: inherit; font-weight: 800; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.class-card-link { display: block; color: var(--ink); text-decoration: none; cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease; }
.class-card-link:hover { transform: translateY(-2px); border-color: #b9d0c0; background: #f8faf7; box-shadow: var(--shadow); }
.class-card-link h2 { font-size: clamp(21px, 2vw, 26px); line-height: 1.2; }
.class-card-link p { margin: 8px 0 0; }
.student-detail { max-width: 620px; }
.private-question-card { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.private-question-card:last-child { border-bottom: 0; }
.private-question-card h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.private-question-card p { margin-bottom: 10px; color: var(--muted); }
.student-question-list { overflow: hidden; border: 1px solid rgba(23, 33, 28, .11); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 35px rgba(23, 33, 28, .05); }
.student-question-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 15px 18px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.student-question-row:first-child { border-top: 0; }
.student-question-row:hover { background: #f5faf6; }
.student-question-row .row-actions { align-content: start; justify-content: end; flex-wrap: wrap; }
.student-question-text { margin: 0 0 5px; font-family: Georgia, serif; font-size: 18px; line-height: 1.3; }
.student-question-row .muted { margin: 0 0 8px; }
.student-question-row.answered { background: #f6f7f5; }
.answered-label { color: #5b655f; font-size: 12px; font-weight: 800; }
.answered-reply { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.answered-reply p { margin: 7px 0 0; }
.question-section { margin-top: 24px; }
.question-section-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0 0 10px; padding: 0; border: 0; color: var(--ink); background: none; font-family: Georgia, serif; font-size: 24px; font-weight: 500; text-align: left; cursor: pointer; }
.question-section-toggle small { color: var(--muted); font-family: inherit; font-size: 15px; }
.section-caret, .row-disclosure { color: var(--green); font-family: system-ui, sans-serif; font-size: 25px; line-height: 1; }
.empty-row { margin: 0; padding: 16px 18px; }
.question-group-row { position: relative; display: grid; gap: 5px; margin: 0 0 14px; padding: 14px 44px 14px 16px; border: 1px solid #cad8ce; border-radius: 14px; color: var(--ink); background: #f5faf6; text-decoration: none; }
.question-group-row .row-disclosure { position: absolute; right: 17px; top: 50%; transform: translateY(-50%); }
.question-group-row:hover { background: #edf5f0; }
.question-group-row small { color: var(--muted); }
.question-detail { max-width: 760px; }
.question-detail h2 { margin-top: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.question-detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.question-detail-meta div { padding: 10px; border-radius: 10px; background: #f8faf7; }
.question-detail-meta dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.question-detail-meta dd { margin: 4px 0 0; }
.group-question-list { display: grid; gap: 10px; margin: 16px 0; }
.group-question-list article { padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.group-question-list p { margin: 5px 0; font-family: Georgia, serif; font-size: 18px; }
.group-question-list small { display: block; margin-bottom: 8px; color: var(--muted); }
.checkin-group { margin-top: 25px; }
.checkin-group h2 { margin: 0 0 9px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.checkin-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; text-align: left; }
.checkin-table th { padding: 0 13px 4px; color: var(--muted); font-size: 11px; letter-spacing: .03em; text-transform: uppercase; }
.checkin-table td { padding: 12px 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); vertical-align: middle; font-size: 14px; }
.checkin-table td:first-child { border-left: 1px solid var(--line); border-radius: 12px 0 0 12px; }
.checkin-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 12px 12px 0; }
.checkin-table-row { cursor: pointer; }
.checkin-table-row:hover td { background: #f5faf6; }
.checkin-row-link { display: grid; gap: 3px; color: var(--ink); text-decoration: none; }
.checkin-row-link strong { font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.checkin-row-link small { color: var(--muted); }
.checkin-list-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid rgba(23, 33, 28, .11); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 22px rgba(23, 33, 28, .04); }
.checkin-list-row strong { display: block; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.checkin-list-row p { margin: 5px 0 0; color: var(--muted); }
.checkin-row-badges, .checkin-row-metadata { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.checkin-row-metadata { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.assignment-draft { color: #725719; background: #fff0c6; }
.assignment-published { color: var(--green); background: var(--green-soft); }
.assignment-closed { color: #59645e; background: #edf0ec; }
.private-actions { display: flex; flex-wrap: wrap; align-content: start; justify-content: end; gap: 8px; }
button.small-action { border: 0; padding: 0; background: none; }
.reply-form { grid-column: 1 / -1; padding-top: 4px; }
.teacher-reply { grid-column: 1 / -1; margin: 0; padding: 12px; border-radius: 10px; background: #edf5f0; color: #405047; }
.demo-modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20, 31, 25, .45); }
.demo-modal { position: relative; width: min(100%, 480px); padding: 26px; border-radius: 18px; background: var(--surface); box-shadow: 0 24px 70px rgba(0, 0, 0, .24); }
.demo-modal h2 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.demo-modal form { display: grid; gap: 12px; margin-top: 18px; }
.demo-modal .primary-button { width: auto; justify-self: start; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; color: var(--ink); background: none; font-size: 26px; cursor: pointer; }
.demo-form-status { min-height: 1.2em; margin: 0; color: var(--green); font-weight: 700; }
.demo-flash { margin: 0 0 18px; padding: 10px 12px; border-radius: 10px; color: #25563d; background: var(--green-soft); font-weight: 700; }
.class-combobox { position: relative; }.class-combobox input { width: 100%; }.class-suggestions { position: absolute; z-index: 4; top: calc(100% + 4px); right: 0; left: 0; max-height: 180px; overflow: auto; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 24px rgba(23,33,28,.14); }.class-suggestions button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; font: inherit; cursor: pointer; }.class-suggestions button:hover, .class-suggestions button:focus-visible { outline: none; background: var(--green-soft); }.class-suggestions .muted { margin: 6px; }
.author-question { display: grid; gap: 12px; }
.authoring-footer { position: static; display: flex; justify-content: flex-end; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 8px 22px rgba(23,33,28,.08); }
.authoring-footer .primary-button, .authoring-footer .secondary-button { width: auto; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.selected-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 13px; font-weight: 700; }
.selected-chip button { border: 0; color: inherit; background: none; font: inherit; font-size: 18px; cursor: pointer; }
.image-action { cursor: pointer; }
.question-image { display: grid; justify-items: center; margin: 0; }
.question-image-frame { position: relative; width: min(100%, 560px); }
.question-image img, .author-image { display: block; max-width: min(100%, 560px); max-height: 320px; border-radius: 12px; object-fit: contain; }
.question-image-frame img { width: 100%; }
.image-remove-button { position: absolute; top: 8px; right: 8px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(255,255,255,.75); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.92); font-size: 22px; line-height: 1; cursor: pointer; }
.image-remove-button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.authoring-editor { display: grid; gap: 0; padding: 28px; border: 1px solid rgba(23,33,28,.11); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 35px rgba(23,33,28,.05); }
.authoring-editor > * { min-width: 0; }
.authoring-details, .author-class-selector, .author-question { padding: 0 0 20px; margin: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); }
.author-title-label { font-size: 17px; font-weight: 750; }.author-title-label input { width: 100%; margin-top: 8px; }
.author-due-row { display: flex; align-items: flex-start; gap: 22px; margin-top: 18px; }.author-due-row .field-label { width: min(240px, 100%); }.author-due-row input { margin-top: 8px; }
.author-class-selector legend { padding: 0; margin-bottom: 10px; }.class-dropdown-trigger { display:flex; align-items:center; justify-content:space-between; width: min(100%, 460px); padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); text-align:left; font:inherit; cursor:pointer; }.class-dropdown-list { width:min(100%,460px); display:grid; gap:8px; margin-top:8px; padding:12px; border:1px solid var(--line); border-radius:12px; background:white; box-shadow:0 10px 24px rgba(23,33,28,.10); }.class-dropdown-actions { display:flex; flex-wrap:wrap; gap:12px; padding-bottom:8px; border-bottom:1px solid var(--line); }.class-dropdown-actions .small-action { color:var(--green); font-weight:800; text-decoration:underline; }.class-checkbox-row, .author-checkbox { display:flex; align-items:center; gap:9px; color:var(--ink); cursor:pointer; }.class-checkbox-row input, .author-checkbox input { position:static; width:18px; height:18px; margin:0; accent-color:var(--green); opacity:1; }.class-checkbox-row span, .author-checkbox span { display:inline; padding:0; border:0; border-radius:0; background:transparent; cursor:pointer; }.class-checkbox-row input:disabled, .author-checkbox input:disabled { cursor:not-allowed; }.class-checkbox-row:has(input:disabled), .author-checkbox:has(input:disabled) { color:var(--muted); cursor:not-allowed; }
.author-question { display:grid; gap:10px; }.author-question-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }.author-question h2 { margin:0; font-family:Georgia,serif; font-size:23px; font-weight:500; }.author-question-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }.author-question textarea { width:100%; min-height:116px; }.author-question .author-checkbox { margin:0; }.response-format-control { width:min(100%, 300px); }.response-format-control select { margin-top:6px; }.teacher-evaluation-field { width:min(100%, 680px); }.teacher-evaluation-field input, .teacher-evaluation-field textarea { width:100%; margin-top:6px; }.teacher-evaluation-field textarea { min-height:94px; }.teacher-evaluation-field small { display:block; margin-top:5px; color:var(--muted); font-weight:500; }.response-format-note { margin:0; }.authoring-editor > #add-question { justify-self:start; margin:0 0 20px; }.authoring-footer { margin-top:0; border-radius:12px; }
.question-image figcaption { margin: 7px 0; color: var(--muted); font-size: 13px; }
.student-class-card { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.student-class-card .primary-button, .student-class-card .secondary-button { justify-self: start; pointer-events: none; }
.student-private-question { margin-top: 10px; padding: 12px; border-left: 3px solid var(--green); background: var(--green-soft); }
.student-private-question p { margin: 6px 0 0; }
.result-card details[open] summary { margin-bottom: 10px; }

@media (max-width: 980px) {
  .teacher-dashboard-three-column { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .teacher-home-navigation { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; }
}

@media (max-width: 760px) {
  .teacher-class-shell { width: min(100% - 24px, 1120px); padding-top: 22px; }
  .class-shell-title, .current-checkin-card, .private-question-card { align-items: stretch; flex-direction: column; grid-template-columns: 1fr; }
  .class-create-action { width: 100%; text-align: center; }
  .teacher-dashboard-grid, .checkin-card-grid, .teacher-dashboard-three-column { grid-template-columns: 1fr; }
  .teacher-home-cards { grid-template-columns: 1fr; }
  .teacher-top-level .page-heading { grid-template-columns: 1fr; }
  .teacher-global-nav { justify-content: flex-start; }
  .ai-class-pulse { grid-template-columns: 1fr; }
  .teacher-home-navigation { grid-template-columns: 1fr; }
  .compact-list-row { align-items: flex-start; flex-direction: column; }
  .compact-list-row .row-actions, .private-actions { justify-content: start; }
  .student-question-row { grid-template-columns: 1fr; }
  .student-question-row .row-actions { justify-content: start; }
  .question-detail-meta { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .student-table { min-width: 680px; }
  .checkin-table { min-width: 720px; }
  .authoring-footer { position: static; flex-direction: column; }
  .authoring-footer .primary-button, .authoring-footer .secondary-button { width: 100%; }
  .authoring-editor { padding:20px; }.author-due-row { flex-direction:column; gap:12px; }.author-due-row .field-label { width:100%; }.author-question-header { align-items:flex-start; flex-direction:column; }.author-question-actions { justify-content:flex-start; }
  .demo-modal { width: min(100%, 480px); padding: 20px; }.class-suggestions { max-height: 150px; }
  .analysis-summary-card, .question-narrative dl, .question-metric-grid { grid-template-columns: 1fr; }
  .analysis-overall-summary { padding-top: 18px; padding-left: 0; border-top: 2px solid #b5d2c2; border-left: 0; }
  .analysis-submission-grid p { align-items: flex-start; flex-direction: column; gap: 3px; }
  .student-class-card .primary-button, .student-class-card .secondary-button { width: 100%; text-align: center; }
}

@media (max-width: 360px) {
  .teacher-home-card { align-items: flex-start; flex-direction: column; }
  .teacher-home-navigation .teacher-home-card { align-items: center; flex-direction: row; }
}
