:root {
  font-family:
    Inter,
    "Noto Sans JP",
    system-ui,
    sans-serif;
  color: #243047;
  background: #f5f7fb;
  font-synthesis: none;
  line-height: 1.65;
  --green:#245adc;
  --line:#e4e9f1;
  --muted:#67758b;
}
.assessment-card { margin-top: 24px; }
.assessment-card select { font: inherit; max-width: 100%; padding: 10px 12px; border: 1px solid #cdd6e4; border-radius: 7px; background: #fff; color: inherit; }
.assessment-card > select { width: 100%; }
.assessment-compare { margin: 14px 0; padding: 12px 14px; background: #edf3ff; border-radius: 8px; font-size: 14px; }
.assessment-fixed { padding: 14px; border: 1px solid var(--line); border-radius: 9px; margin: 12px 0 20px; }
.assessment-fixed summary, .assessment-history-candidates summary, .assessment-job-input summary { cursor: pointer; font-weight: 600; }
.assessment-fixed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 14px; }
.assessment-fixed pre, .assessment-job-input pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; max-height: 260px; overflow: auto; background: #f6f8fc; padding: 12px; border-radius: 7px; }
.assessment-history-candidates { margin: 14px 0 24px; padding: 14px; background: #f6f8fc; border-radius: 8px; }
#assessment-candidates, #assessment-phrase-candidates { list-style: none; padding: 0; }
#assessment-candidates li, #assessment-phrase-candidates li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
#assessment-candidates li span, #assessment-phrase-candidates li span { overflow-wrap: anywhere; }
#assessment-candidates li button, #assessment-phrase-candidates li button { flex-shrink: 0; }
.assessment-candidate-body { min-width: 0; flex: 1; }
.assessment-candidate-context { margin-top: 6px; font-size: .9rem; }
.assessment-candidate-context p { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.assessment-candidate-context mark { background: #fff0ba; color: inherit; }
#assessment-review h3 { margin-top: 28px; }
.assessment-pair, .assessment-error { padding: 18px; margin: 14px 0; border: 1px solid var(--line); border-radius: 9px; background: #fafbfe; }
.assessment-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.assessment-fields select { width: 100%; margin-top: 6px; }
.assessment-fields label { margin: 8px 0; }
.assessment-fields input { min-width: 0; }
.assessment-check { display: flex; align-items: flex-start; gap: 10px; }
.assessment-check input { flex-shrink: 0; width: 18px; height: 18px; margin: 4px 0 0; }
.assessment-final-check { margin-top: 25px; padding: 14px; background: #edf3ff; border-radius: 8px; }
.assessment-lookup { padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); }
.assessment-lookup summary { cursor: pointer; }
.assessment-lookup-search { margin-top: 10px; }
.assessment-lookup-status { font-size: 13px; margin: 10px 0; }
.assessment-lookup-entry { padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; overflow-wrap: anywhere; }
.assessment-results-heading { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.assessment-job { margin-top: 20px; padding: 20px; border: 1px solid #dce4f1; border-radius: 11px; }
.assessment-job-status { font-size: 14px; color: var(--green); }
.assessment-job[data-status="failed"] .assessment-job-status, .assessment-job-error { color: #8c3e2e; }
.assessment-job-input { padding: 12px 0; }
.assessment-job-input li { overflow-wrap: anywhere; }
.assessment-result-note { padding: 12px 14px; background: #fff4db; border-radius: 8px; color: #6c572c; font-size: 14px; }
.assessment-result { min-width: 0; }
@media (max-width: 680px) {
  .assessment-fields, .assessment-fixed-grid { grid-template-columns: 1fr; }
  .assessment-pair, .assessment-error, .assessment-job { padding: 13px; }
  #assessment-candidates li, #assessment-phrase-candidates li { align-items: flex-start; flex-direction: column; }
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
main {
  max-width: 1240px;
  padding: 40px 28px 64px;
  margin: auto;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 650;
  letter-spacing: .01em;
  margin-bottom: 8px;
}
h2 {
  font-size: 19px;
  font-weight: 650;
  margin-bottom: 15px;
}
p {
  margin-bottom: 14px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .19em;
  color: var(--green);
  margin: 0 0 12px;
}
.intro {
  color: var(--muted);
  font-size: 15px;
}
.prototype-label {
  font-size: 12px;
  background: #e6eee8;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.scope-note {
  font-size: 13px;
  color: #716741;
  padding: 10px 14px;
  background: #f4f0e2;
  border: 1px solid #e8e1c9;
  border-radius: 8px;
  margin: 10px 0 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 25px;
  box-shadow: 0 3px 12px #20332f04;
}
.join-panel {
  max-width: 520px;
  margin: 50px auto;
}
.join-panel p {
  font-size: 14px;
  color: var(--muted);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
}
input,
textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #cdd6e4;
  border-radius: 7px;
  width: 100%;
  margin: 6px 0 0;
}
input:focus,
textarea:focus {
  outline: 3px solid #dce7ff;
  border-color: var(--green);
}
button {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid var(--green);
  border-radius: 7px;
  padding: 9px 13px;
  cursor: pointer;
  background: var(--green);
  color: white;
  line-height: 1.5;
}
button:hover {
  filter: brightness(.95);
}
button:focus-visible {
  outline: 3px solid #a5bff9;
  outline-offset: 3px;
}
button:disabled {
  opacity: .45;
  cursor: default;
}
button.secondary {
  background: white;
  color: var(--green);
  border-color: #d6e0f4;
}
button.text-button {
  background: transparent;
  color: #556782;
  border-color: transparent;
  font-weight: 500;
}
#join-button {
  width: 100%;
  margin-top: 24px;
}
.error {
  background: #fff0ee;
  color: #973c31;
  border: 1px solid #e6bcb5;
  padding: 14px;
  border-radius: 8px;
  white-space: pre-wrap;
}
.lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 20px 25px;
}
.field-label {
  color: var(--muted);
  font-size: 11px;
}
.lesson-header h2 {
  margin: 2px 0;
  font-size: 22px;
}
.lesson-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.separator {
  padding: 0 10px;
  color: #c0ccc5;
}
.participant {
  display: flex;
  gap: 10px;
  align-items: center;
}
.participant strong {
  font-size: 14px;
}
.avatar {
  background: #e6f1eb;
  color: var(--green);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.followup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}
.learning-steps {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 24px;
  margin: 23px 0 10px;
  font-size: 13px;
  color: #4a6155;
}
.learning-steps span,
.step-number {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  margin-right: 5px;
  vertical-align: middle;
}
.workflow-status {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 20px;
  min-height: 20px;
}
textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.65;
  display: block;
}
#source-input {
  font-family: Georgia, "Noto Serif", serif;
  font-size: 17px;
  margin-bottom: 14px;
}
#source-editor {
  border: 1px solid #dce4f1;
  border-radius: 8px;
  background: #fbfcfa;
  margin-top: 16px;
  overflow: hidden;
}
#source-editor:focus-within {
  outline: 2px solid #c6e2d3;
}
#source-editor .cm-editor,
#source-editor .cm-content {
  min-height: 285px;
}
#source-editor .cm-scroller {
  max-height: 520px;
}
.color-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}
.color-button {
  flex: 1;
  font-size: 12px;
  white-space: nowrap;
}
.color-button[aria-checked="false"] { background: #fff; }
.color-button[aria-checked="true"] { outline: 2px solid currentColor; outline-offset: 1px; }
.source-color-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.source-color-actions button { flex: 1 1 140px; font-size: 13px; }
.source-draft-mark { border-radius: 2px; box-decoration-break: clone; }
.source-draft-mark-red { background: rgba(216, 63, 80, .32); }
.source-draft-mark-blue { background: rgba(37, 111, 202, .28); }
.source-draft-mark-purple { background: rgba(124, 75, 200, .30); }
#source-selection-hint[data-state="conflict"] { color: #8c3e2e; }
.red {
  color: #9b3942;
  background: #fbedef;
  border-color: #e8bdc4;
}
.blue {
  color: #2a5897;
  background: #eaf1fb;
  border-color: #bdd0eb;
}
.purple {
  color: #70419a;
  background: #f2ecfa;
  border-color: #d3c1e6;
}
.source-mark-red {
  background: #f8d8de;
  border-bottom: 2px solid #bd5c6a;
}
.source-mark-blue {
  background: #dceafa;
  border-bottom: 2px solid #5685bc;
}
.source-mark-purple {
  background: #eaddf7;
  border-bottom: 2px solid #9770bd;
}
.source-selections {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}
.draft-recovery {
  background: #fff7e6;
  border: 1px solid #ead4a4;
  border-radius: 7px;
  padding: 12px;
  margin-top: 15px;
  font-size: 12px;
}
.draft-recovery summary {
  cursor: pointer;
}
.draft-recovery p {
  margin: 10px 0 0;
}
.source-selections li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  font-size: 12px;
  border-top: 1px solid #edf1ed;
  padding: 10px 0;
}
.selection-label {
  display: inline-block;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
}
.selected-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.source-selections button {
  padding: 2px;
  font-size: 11px;
}
.generation-panel {
  background: #f3f8f4;
  border-radius: 8px;
  padding: 15px;
}
#generate {
  width: 100%;
}
.paraphrase-panel {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.paraphrase-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 650;
}
#paraphrase-original {
  background: #f6f8fc;
  color: #52645b;
}
#paraphrase-state[data-state=pending] {
  color: #916c1f;
}
#apply-paraphrase {
  margin-top: 12px;
}
.paraphrase-history-card > .muted {
  margin-top: 12px;
}
.paraphrase-history {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}
.paraphrase-history li {
  padding: 10px 0;
  border-top: 1px solid #edf1ed;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.paraphrase-history .history-label {
  margin: 0 0 6px;
}
.paraphrase-before {
  color: #63746b;
}
.paraphrase-arrow {
  color: #90a297;
  margin: 0 5px;
}
.paraphrase-after {
  color: var(--green);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.section-heading h2 {
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 13px;
}
.toolbar button {
  font-size: 12px;
  padding: 6px 10px;
}
#editor {
  border: 1px solid #dce4f1;
  background: #fdfefd;
  border-radius: 8px;
  overflow: hidden;
  min-height: 255px;
}
#editor:focus-within {
  outline: 2px solid #c6e2d3;
  border-color: var(--green);
}
.cm-editor {
  font-size: 18px;
  min-height: 255px;
}
.cm-scroller {
  font-family:
    Georgia,
    "Noto Serif",
    serif !important;
  line-height: 1.9;
  overflow: auto !important;
}
.cm-content {
  padding: 18px 20px !important;
  min-height: 255px;
}
.cm-line {
  padding: 0 !important;
}
.cm-editor.cm-focused {
  outline: none !important;
}
.cm-cursor {
  border-left-color: var(--green) !important;
}
.cm-selectionBackground {
  background: #d2e5dc !important;
}
.editor-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 13px 0 0;
}
.review-notice {
  color: #795013;
  background: #fff5dc;
  border-left: 3px solid #ca9537;
  padding: 12px;
  font-size: 13px;
  margin: 18px 0 0;
}
.status-card h2 {
  font-size: 16px;
}
.status-list {
  margin: 10px 0 20px;
}
.status-list > div {
  border-bottom: 1px solid #edf1ed;
  padding: 11px 0;
}
.status-list dt {
  font-size: 11px;
  color: var(--muted);
}
.status-list dd {
  font-size: 13px;
  margin: 4px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.status-list dd[data-state=ok] {
  color: var(--green);
}
.status-list dd[data-state=pending] {
  color: #957124;
}
.status-list dd[data-state=error] {
  color: #ad4837;
}
.status-card button {
  width: 100%;
  margin-bottom: 8px;
}
.fine-print {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 0;
}
.snapshots-card {
  margin-top: 20px;
}
.snapshots-card .section-heading {
  align-items: flex-start;
}
.snapshots-card h2 {
  font-size: 17px;
}
.snapshots-card .muted {
  margin: 7px 0 0;
}
.snapshot-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.snapshot-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}
.empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.snapshot-entry {
  padding: 13px;
  background: #f6f9f6;
  border: 1px solid #e2eae2;
  border-radius: 7px;
}
.snapshot-entry summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.snapshot-entry p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.snapshot-entry pre,
.history-list pre {
  font-family: inherit;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 0;
  background: #fff;
  padding: 10px;
  border: 1px solid #e2e9e2;
  border-radius: 5px;
}
.history-card {
  margin-top: 20px;
}
.history-card > summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
#history-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}
.history-card > .muted {
  margin-top: 15px;
}
.history-list {
  padding-left: 23px;
  margin-bottom: 0;
}
.history-list li {
  font-size: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1ed;
  margin-bottom: 16px;
}
.history-list li:last-child {
  border: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.history-list details > summary {
  cursor: pointer;
}
.history-label {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0 0;
}
.review-badge {
  font-size: 10px;
  color: #845a13;
  background: #fff2cf;
  border-radius: 4px;
  padding: 3px 5px;
  margin-left: 8px;
}
.footer-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
}
@media (max-width: 900px) {
  .workspace-grid,
  .followup-grid {
    grid-template-columns: 1fr;
  }
  .status-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }
  .status-card button {
    width: auto;
    margin-right: 8px;
  }
  .snapshots-card .section-heading {
    display: block;
  }
  .snapshot-actions {
    margin-top: 16px;
  }
  #source-editor .cm-editor,
  #source-editor .cm-content {
    min-height: 210px;
  }
}
@media (max-width: 550px) {
  main {
    padding: 25px 15px;
  }
  .page-header {
    display: block;
  }
  .prototype-label {
    display: inline-block;
    margin-bottom: 10px;
  }
  .card {
    padding: 18px;
  }
  .lesson-header {
    align-items: flex-start;
    gap: 16px;
  }
  .participant {
    max-width: 130px;
  }
  .avatar {
    display: none;
  }
  .toolbar .text-button {
    padding-left: 0;
  }
  .cm-content {
    padding: 14px !important;
  }
  .cm-editor {
    font-size: 17px;
  }
  .snapshot-actions button {
    font-size: 12px;
  }
  .learning-steps {
    gap: 10px;
    font-size: 11px;
    flex-wrap: wrap;
  }
  .color-button {
    padding: 8px 5px;
  }
}

/* A quiet workspace: writing first, review and supporting records on demand. */
main { max-width: 1240px; padding-top: 26px; }
.page-header { align-items: center; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: 24px; }
.lesson-help { position: relative; font-size: 13px; color: var(--muted); }
.lesson-help summary, .quiet-details summary, .save-details summary, .record-panel summary,
.teacher-panel > summary, .assessment-result-details > summary, .assessment-pair-more > summary { cursor: pointer; }
.lesson-help > div { position: absolute; z-index: 10; right: 0; top: 30px; width: 320px; max-width: calc(100vw - 40px); padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px #20332f15; }
.lesson-help p:last-child { margin-bottom: 0; }
.lesson-header { padding: 0; margin-bottom: 8px; }
.lesson-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 16px; min-width: 0; }
.grade-switch-form { margin: 12px 0 6px; }
.grade-switch-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grade-switch-controls label { margin: 0; font-size: 12px; color: var(--muted); }
.grade-switch-controls select { font: inherit; font-size: 13px; max-width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid #cdd6e4; border-radius: 7px; background: #fff; color: inherit; }
.grade-switch-controls select:focus-visible { outline: 3px solid #a5bff9; outline-offset: 2px; }
.grade-switch-controls button { padding: 7px 10px; font-size: 12px; }
.grade-switch-status, .grade-rubric-hint { color: var(--muted); font-size: 12px; margin: 6px 0 12px; overflow-wrap: anywhere; }
.lesson-header h2 { font-size: 20px; overflow-wrap: anywhere; }
.lesson-header p { font-size: 13px; }
.participant { gap: 8px; color: var(--muted); font-size: 12px; }
.participant strong { font-size: 13px; overflow-wrap: anywhere; }
.save-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 22px; font-size: 12px; }
.collaboration-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-right: auto; color: var(--muted); }
.collaboration-indicator { white-space: nowrap; }
.collaboration-indicator::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #9a7b38; vertical-align: middle; }
.collaboration-indicator[data-state=ok]::before { background: #387d61; }
.collaboration-indicator[data-state=neutral]::before { background: #919b96; }
.collaboration-indicator[data-state=error] { color: #973c31; }
.collaboration-indicator[data-state=error]::before { background: #ad4837; }
.collaboration-indicator[data-sync-active=true]::before { background: #b54444; animation: classroom-sync-pulse 2s ease-in-out infinite; }
@keyframes classroom-sync-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .collaboration-indicator[data-sync-active=true]::before { animation: none; } }
.join-settings { margin-top: 18px; color: var(--muted); }
.join-settings summary { cursor: pointer; font-size: 13px; }
.join-settings form { margin-top: 14px; }
#sync-start-form { display: grid; gap: 12px; }
#sync-start-form[hidden] { display: none; }
.sync-delay-hint { flex-basis: 100%; margin: 0; color: #805b26; font-size: 12px; }
.save-summary { margin: 0; color: var(--muted); }
.save-summary::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #9a7b38; vertical-align: middle; }
.save-summary[data-state=ok]::before { background: #387d61; }
.save-summary[data-state=error] { color: #973c31; }
.save-summary[data-state=error]::before { background: #ad4837; }
.save-details { color: var(--muted); }
.save-details[open] { flex-basis: 100%; order: 3; padding: 15px 18px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.save-details .status-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.save-details .fine-print { max-width: 720px; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.recovery-actions button { padding: 5px 10px; }
.learning-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.learning-tabs button { color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 12px 22px; font-size: 15px; font-weight: 600; }
.learning-tabs button[aria-selected=true] { color: var(--green); border-bottom-color: var(--green); }
.learning-tabs button:hover { background: #edf3ff; }
.workflow-status { font-size: 13px; margin: 0 0 16px; }
.workspace-grid { gap: 24px; }
.workspace-grid .card { padding: 24px; }
.workspace-grid h2 { font-size: 18px; }
.workspace-grid .source-instruction { margin-top: 13px; }
.toolbar { margin: 14px 0 12px; }
.toolbar .text-button { margin-left: auto; }
.toolbar button { font-size: 13px; }
.cm-editor, .cm-content { min-height: 280px; }
#editor { min-height: 280px; }
#source-editor .cm-editor, #source-editor .cm-content { min-height: 280px; }
.generation-panel { background: transparent; padding: 0; margin-top: 18px; }
.generation-panel button { font-size: 14px; }
.quiet-details { margin-top: 16px; color: var(--muted); font-size: 12px; }
.paraphrase-panel { margin-top: 20px; padding-top: 18px; }
.paraphrase-panel h3 { font-size: 15px; margin-bottom: 6px; }
.paraphrase-panel > .muted { margin-bottom: 10px; }
.paraphrase-panel textarea { min-height: 64px; }
.next-action { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 14px; margin: 24px 0 32px; }
.next-action p { margin: 0; font-size: 13px; color: var(--muted); }
.next-action button { padding: 11px 24px; font-size: 14px; }
.learning-records { border-top: 1px solid var(--line); margin-top: 28px; }
.record-panel { padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 13px; }
.record-panel > summary { font-size: 13px; font-weight: 500; color: #556782; }
.record-panel > summary .muted { margin-left: 10px; font-size: 12px; }
.record-panel > .muted { margin-top: 16px; }
.record-panel .snapshot-actions { margin-top: 18px; align-items: center; }
.record-panel .snapshot-actions .fine-print { margin: 0; }
.history-card > summary { font-size: 13px; }
.assessment-card { margin-top: 0; }
.assessment-card > .section-heading { margin-bottom: 12px; }
.teacher-panel { margin: 22px 0; border: 1px solid var(--line); border-radius: 9px; padding: 16px 18px; }
.teacher-panel > summary { font-size: 14px; font-weight: 600; color: var(--green); }
.teacher-panel[open] > summary { margin-bottom: 20px; }
.teacher-panel > select { width: 100%; }
.assessment-results-heading { border: 0; padding-top: 0; margin-top: 22px; }
.assessment-results-heading h3 { font-size: 15px; }
.assessment-job { padding: 0; overflow: hidden; }
.assessment-job-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; cursor: pointer; padding: 18px 20px; background: #f8faff; }
.assessment-job-heading::after { content: '+'; margin-left: auto; color: var(--muted); font-size: 18px; }
.assessment-job[open] > .assessment-job-heading::after { content: '−'; }
.assessment-job-title { font-size: 15px; font-weight: 600; }
.assessment-job-heading .assessment-job-status { font-size: 12px; font-weight: 400; }
.assessment-job-body { padding: 20px; }
.assessment-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.assessment-metric { padding: 18px 20px; background: #edf3ff; border-radius: 9px; color: var(--muted); font-size: 13px; }
.assessment-metric-value { display: block; font-size: 30px; font-weight: 650; color: var(--green); line-height: 1.5; }
.assessment-result-note { padding: 0; margin: 13px 0; color: var(--muted); background: transparent; font-size: 12px; }
.assessment-next-step { margin: 20px 0; padding: 18px 20px; border: 1px solid #dce4f1; background: #fafbfe; border-radius: 9px; }
.assessment-next-step h4 { margin: 0 0 8px; font-size: 14px; }
.assessment-next-step p { font-size: 13px; margin-bottom: 8px; }
.assessment-next-step p:last-child { margin-bottom: 0; }
.assessment-next-phrase { font-size: 20px !important; font-weight: 600; color: var(--green); overflow-wrap: anywhere; }
.assessment-result-details { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; }
.assessment-result { width: 100%; max-width: 100%; overflow-x: auto; }
.assessment-pair-more { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .save-details .status-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  main { padding: 20px 15px 40px; }
  .page-header { display: flex; margin-bottom: 22px; }
  .page-header h1 { font-size: 21px; }
  .lesson-header { gap: 10px; }
  .lesson-header h2 { font-size: 18px; }
  .participant { flex-direction: column; align-items: flex-end; gap: 0; flex-shrink: 0; }
  .lesson-identity { display: block; }
  .lesson-identity .separator { padding: 0 5px; }
  .learning-tabs button { padding: 11px 16px; font-size: 14px; }
  .workspace-grid .card, .assessment-card { padding: 18px; }
  .next-action { justify-content: space-between; gap: 10px; }
  .next-action button { padding: 10px 18px; }
  .teacher-panel { padding: 13px; }
  .assessment-job-heading, .assessment-job-body { padding: 14px; }
  .assessment-metrics { gap: 10px; }
  .assessment-metric { padding: 14px 12px; }
  .assessment-metric-value { font-size: 26px; }
  .assessment-next-step { padding: 14px; }
  .save-details .status-list { grid-template-columns: 1fr; gap: 0; }
}

/* Preserve the legacy paragraph editor: edit a source word in its own place. */
#inline-workspace[hidden], #free-editor-workspace[hidden] { display: none; }
.inline-surface { margin-top: 16px; min-height: 230px; padding: 16px 18px; border: 1px solid #dce4f1; border-radius: 7px; background: #fff; font-family: Century, "Century Schoolbook", "Times New Roman", serif; font-size: 20px; line-height: 2.05; white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-word { display: inline; color: var(--inline-color); cursor: text; border: 0; border-radius: 3px; padding: 1px 0; font: inherit; user-select: text; }
.inline-word:hover, .inline-word:focus-visible { outline: 2px solid #17221d50; outline-offset: 2px; }
.inline-word.edited { color: var(--inline-color); font-weight: 800; border: 2px solid var(--inline-color); border-radius: 5px; padding: 0 4px; background: color-mix(in srgb, var(--inline-color) 10%, white); box-decoration-break: clone; -webkit-box-decoration-break: clone; line-height: 1.24; }
.inline-word.deleted { opacity: .6; text-decoration: line-through; border-style: dashed; }
.inline-word.selected { background: #d6e9ff; outline: 1px solid #577eaf; }
.inline-gap { display: inline-block; position: relative; width: .22em; min-height: 1.1em; vertical-align: -.12em; cursor: text; color: var(--inline-color); }
.inline-gap:hover, .inline-gap:focus-visible { background: #dfece5; outline: 1px dashed currentColor; }
.inline-gap:hover::after, .inline-gap:focus-visible::after { content: '+'; position: absolute; top: -.8em; left: -.2em; line-height: 1; font: 13px system-ui, sans-serif; }
.inline-edit-wrap { display: inline; white-space: normal; }
.inline-input { display: inline-block; max-width: 100%; min-width: 4ch; border: 2px solid var(--inline-color) !important; border-radius: 5px; padding: 2px 5px !important; font: inherit !important; line-height: 1.45 !important; vertical-align: baseline; box-sizing: border-box; }
.inline-edit-wrap .inline-edit-action { display: inline-block; padding: 3px 5px; margin-left: 4px; border: 1px solid #c6d7cd; border-radius: 4px; color: #486256; background: #fff; font: 11px system-ui, sans-serif; vertical-align: middle; line-height: 1.4; }
.inline-selection-toolbar { position: fixed; z-index: 30; display: flex; flex-wrap: wrap; gap: 5px; max-width: calc(100vw - 16px); padding: 7px; background: #fff; border: 1px solid #c9d8ce; border-radius: 7px; box-shadow: 0 3px 14px #17221d20; }
.inline-selection-toolbar[hidden] { display: none; }
.inline-selection-toolbar button { font-size: 12px; padding: 7px 9px; }
.inline-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 15px; }
.inline-counts { display: flex; gap: 15px; color: var(--muted); font-size: 12px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-actions button { font-size: 12px; padding: 7px 9px; }
.inline-reset-question, .inline-conflict { margin-top: 10px; padding: 12px; border: 1px solid #e7cc9b; border-radius: 6px; background: #fff9ee; font-size: 12px; }
.inline-reset-question p, .inline-conflict p { margin: 0 0 8px; overflow-wrap: anywhere; }
.inline-reset-question button, .inline-conflict button { font-size: 12px; padding: 6px 9px; }
#inline-status:empty { display: none; }
#inline-status[data-state=conflict] { color: #8a591c; }
@media (max-width: 550px) {
  .inline-surface { padding: 13px; font-size: 19px; }
  .inline-actions { gap: 5px; }
  .inline-actions button { padding: 7px; }
}

/* RECALL sister layout. The editors stay mounted when changing learning views. */
.app-topbar { height: 82px; padding: 0 40px; display: flex; align-items: center; gap: 28px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: #243047; font-size: 23px; font-weight: 750; letter-spacing: .035em; text-decoration: none; line-height: 1.2; }
.brand small { display: block; margin-top: 10px; font-size: 9px; letter-spacing: .15em; color: #78869d; font-weight: 600; }
.brand-symbol { display: grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; border-radius: 12px; color: #fff; background: var(--green); font: 25px Georgia, serif; }
.breadcrumb { display: flex; align-items: center; gap: 19px; color: var(--muted); font-size: 12px; }
.topbar-label { margin-left: auto; color: #78869d; font-size: 11px; letter-spacing: .04em; }
.app-topbar .lesson-help { flex-shrink: 0; }
.app-topbar .lesson-help > div { top: 36px; }
body:not([data-joined=true]) .breadcrumb { display: none; }
main { max-width: none; padding: 44px 42px 64px; }
body[data-joined=true] main { margin-left: 240px; }
body[data-joined=true] .app-topbar { margin-left: 240px; }
body[data-joined=true] .login-brand { display: none; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; padding: 36px 20px 24px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 12; }
.app-sidebar .brand { margin: 0 8px 58px; }
.nav-caption { color: #78869d; font-size: 10px; font-weight: 650; letter-spacing: .1em; margin: 0 16px 16px; }
.learning-tabs { flex-direction: column; border: 0; gap: 8px; margin: 0; }
.learning-tabs button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; border: 0; border-radius: 11px; text-align: left; padding: 14px 16px; font-size: 14px; font-weight: 550; }
.learning-tabs button[aria-selected=true] { background: #edf3ff; color: var(--green); font-weight: 700; }
.learning-tabs svg { width: 21px; height: 21px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer { margin-top: auto; padding: 22px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 11px; }
.profile-icon { display: grid; place-items: center; flex-shrink: 0; width: 37px; height: 37px; border-radius: 50%; color: var(--green); background: #edf3ff; font-size: 15px; }
.sidebar-footer .participant { display: block; min-width: 0; max-width: none; }
.sidebar-footer strong { display: block; color: #35445d; font-size: 13px; }
.sidebar-footer #actor-role { display: block; margin-top: 3px; font-size: 11px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 3px 6px; margin-top: 12px; }
.account-actions .text-button { padding: 6px 8px; font-size: 11px; }
.page-header { margin-bottom: 28px; align-items: flex-end; }
.page-header .eyebrow { color: #6b83ad; font-size: 10px; letter-spacing: .12em; margin-bottom: 10px; }
.page-header h1 { font-size: 30px; font-weight: 750; letter-spacing: .01em; }
#lesson-date { color: var(--muted); font-size: 12px; }
.lesson-overview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding: 19px 24px; background: #edf3ff; border: 1px solid #dfe9ff; border-radius: 15px; }
.lesson-header { margin: 0; }
.lesson-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lesson-header h2 { margin: 0; font-size: 17px; }
.grade-badge { padding: 3px 10px; border-radius: 6px; color: #42659b; background: #fff; font-size: 12px; }
.grade-switch-form { margin: 0; width: 360px; max-width: 100%; }
/* Reserve space for transient save/grade messages so pointer selection never
   moves the source text underneath an active drag. */
.grade-switch-status { margin: 6px 0 0; min-height: 2.6em; line-height: 1.3; }
.grade-switch-status:empty { display: block; }
.save-bar { padding: 14px 4px; margin-bottom: 16px; font-size: 11px; }
.card, .workspace-grid .card { border-radius: 16px; box-shadow: 0 4px 20px #24304702; }
.workspace-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.workspace-grid .section-heading { margin-bottom: 18px; }
.workspace-grid h2 { font-size: 17px; }
.workspace-grid .card { padding: 24px; }
.workspace-grid .color-actions { margin-top: 0; }
.source-color-actions button { flex: 0 1 auto; }
.generation-panel { padding-top: 4px; }
.inline-surface { margin-top: 0; min-height: 312px; border-color: var(--line); background: #fcfdff; }
#source-editor { border-color: var(--line); }
#source-editor .cm-editor, #source-editor .cm-content { min-height: 300px; }
#source-selection-hint[data-state=idle] { display: none; }
.next-action { margin: 24px 0 0; }
.next-action button { display: flex; gap: 24px; align-items: center; }
.learning-records { margin-top: 0; border: 1px solid var(--line); }
.record-panel:last-child { border-bottom: 0; }
.record-panel > summary { font-size: 15px; }
.workflow-status { padding: 10px 14px; background: #fff7e8; border-radius: 8px; }
.assessment-card > .section-heading { display: none; }
.assessment-pair { padding: 0; background: #fff; overflow: hidden; }
.assessment-pair-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 15px 18px; cursor: pointer; }
.assessment-pair-summary::after { content: '+'; color: var(--muted); margin-left: auto; }
.assessment-pair-details[open] > summary::after { content: '−'; }
.assessment-pair-expression { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.assessment-pair-cefr { padding: 2px 9px; color: var(--green); background: #edf3ff; border-radius: 5px; font-size: 12px; }
.assessment-pair-state { color: var(--muted); font-size: 12px; }
.assessment-pair-details > :not(summary) { margin-left: 18px; margin-right: 18px; }
.assessment-pair-details > :last-child { margin-bottom: 18px; }
.join-panel { max-width: 480px; margin: 16px auto 30px; padding: 30px 38px; text-align: center; }
.join-panel h1 { font-size: 25px; margin-bottom: 12px; }
.join-panel .eyebrow { color: #6c86b4; font-size: 9px; letter-spacing: .12em; }
.join-panel #join-intro { font-size: 13px; margin-bottom: 26px; }
.join-panel label, .join-settings { text-align: left; }
.join-panel select { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #cdd6e4; border-radius: 7px; background: #fff; color: #243047; font: inherit; font-size: 14px; }
.join-panel select:focus-visible { outline: 3px solid #a5bff9; outline-offset: 2px; }
.join-panel #sync-start-form { gap: 0; }
.join-panel #sync-start-form label:first-child { margin-top: 0; }
.join-panel #sync-start-button { margin-top: 26px; padding: 13px; display: flex; align-items: center; justify-content: center; gap: 50px; }
.google-login { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 12px 18px; border: 1px solid #d6dce5; border-radius: 8px; background: #fff; color: #283548; font-size: 14px; font-weight: 600; text-decoration: none; }
.google-login:hover { background: #f6f8fc; border-color: #b8c5d8; }
.google-login[aria-disabled=true] { opacity: .45; cursor: default; }
.google-login:focus-visible { outline: 3px solid #a5bff9; outline-offset: 3px; }
.google-login svg { width: 21px; height: 21px; flex-shrink: 0; }
#account-start-form { display: grid; gap: 18px; }
#account-start-form label { margin-top: 0; }
#account-start-button { width: 100%; padding: 13px; }
.join-panel .account-room-single { padding: 16px; margin: 0; color: #35445d; background: #f4f7fc; border-radius: 9px; overflow-wrap: anywhere; }
.join-panel .account-status { margin: 18px 0; color: #805224; font-size: 13px; }
.join-panel > .account-logout { display: block; margin: 18px auto 0; font-size: 12px; }
.login-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px; color: #8b96a7; }
.login-divider::before, .login-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.login-divider span { font-size: 11px; }
#email-login-form label:first-child { margin-top: 0; }
#email-login-button { width: 100%; margin-top: 21px; padding: 12px; }
.join-panel .email-login-help { margin: 17px 0 0; font-size: 11px; color: #78869d; line-height: 1.8; }
.account-settings-card { max-width: 540px; padding: 30px; }
.account-settings-card h2 { margin: 0 0 10px; font-size: 19px; }
.account-email { margin: 0 0 22px; color: #526c92; font-size: 13px; overflow-wrap: anywhere; }
.account-settings-card .muted { font-size: 13px; }
.password-length { margin: 7px 0 22px; color: #8190a5; font-size: 11px; }
#email-password-save { padding: 11px 18px; }
#email-password-status { margin: 17px 0 0; font-size: 13px; color: #526c92; }
#email-password-status:empty { display: none; }
#email-password-reauth { display: inline-block; margin-top: 22px; color: var(--green); font-size: 12px; }
.join-panel .login-footnote { font-size: 10px; margin: 24px 0 0; color: #78869d; }
.login-illustration { position: relative; width: 180px; height: 120px; margin: 0 auto 24px; background: #edf3ff; border-radius: 50%; }
.login-sheet { position: absolute; top: 13px; left: 43px; width: 92px; height: 97px; padding: 20px 14px; background: #fff; box-shadow: 0 5px 15px #42659b12; border-radius: 7px; transform: rotate(-8deg); }
.login-sheet span { display: block; height: 3px; border-radius: 3px; margin-bottom: 8px; background: #cbdcf7; }
.login-sheet span:nth-child(2) { width: 75%; }
.login-sheet b { display: block; margin-top: 10px; color: var(--green); font: 23px Georgia, serif; }
.login-pencil { position: absolute; top: 40px; right: 37px; width: 9px; height: 75px; background: #5480e8; border-radius: 3px; transform: rotate(29deg); }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); align-items: center; gap: 25px; padding: 37px 42px; border: 1px solid #e0eafb; border-radius: 20px; background: linear-gradient(115deg, #eef4ff 0%, #e9f1fe 100%); overflow: hidden; }
.home-greeting { margin: 0 0 16px; color: #456393; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.home-hero h2 { margin: 0; color: #243d65; font-size: clamp(26px, 2.5vw, 37px); font-weight: 750; line-height: 1.55; letter-spacing: .035em; }
.home-hero-description { margin: 15px 0 25px; color: #657c9e; font-size: 13px; }
#home-start { display: inline-flex; align-items: center; gap: 25px; min-height: 46px; padding: 12px 21px; border-radius: 8px; box-shadow: 0 5px 12px #245adc1c; }
#home-start svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-hero-art { position: relative; justify-self: center; width: 245px; height: 235px; }
.home-art-orbit { position: absolute; inset: 12px 0 0; border-radius: 50%; background: #d9e7ff; }
.home-art-paper { position: absolute; width: 150px; height: 191px; left: 37px; top: 20px; padding: 25px 20px; background: #fff; border: 1px solid #e4ecfa; border-radius: 11px; box-shadow: 0 12px 26px #2b5aad0d; transform: rotate(-9deg); }
.home-art-heading { display: block; margin-bottom: 22px; color: #5474a7; font: italic 16px Georgia, serif; }
.home-art-paper i { display: block; height: 4px; margin: 10px 0; border-radius: 3px; background: #dbe5f4; }
.home-art-paper i:nth-of-type(2) { width: 76%; }
.home-art-paper i:nth-of-type(3) { width: 90%; }
.home-art-highlight { position: absolute; width: 60px; height: 12px; background: #c7dafa80; top: 111px; left: 18px; transform: rotate(-2deg); }
.home-art-paper b { display: block; margin-top: 15px; color: #5579b4; font: 28px Georgia, serif; }
.home-art-pencil { position: absolute; width: 13px; height: 137px; top: 75px; right: 40px; border-radius: 4px 4px 1px 1px; background: linear-gradient(90deg, #4069cf 50%, #6d94ee 50%); transform: rotate(24deg); box-shadow: 3px 5px 10px #3c6bb020; }
.home-art-pencil::after { content: ''; position: absolute; top: 100%; border-left: 6.5px solid transparent; border-right: 6.5px solid transparent; border-top: 17px solid #c5a47c; }
.home-art-spark { position: absolute; top: 5px; right: 5px; color: #6b94de; font-size: 25px; }
.home-summary-heading { margin: 30px 0 14px; }
.home-summary-heading h2, .home-records-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-stat { display: flex; align-items: center; gap: 17px; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.home-stat-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: #edf3ff; color: #537ac0; }
.home-stat-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.home-stat p { margin: 0 0 5px; color: #74839a; font-size: 12px; }
.home-stat strong { display: block; color: #314462; font-size: 28px; line-height: 1.2; font-weight: 650; }
.home-stat strong small { margin-left: 6px; color: #8592a6; font-size: 12px; font-weight: 500; }
.home-records { margin-top: 29px; padding: 23px 26px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.home-records-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#home-all-records { padding: 6px 0 6px 8px; color: var(--green); font-size: 12px; white-space: nowrap; }
#home-recent { list-style: none; padding: 0; margin: 14px 0 0; }
#home-recent:empty { margin: 0; }
#home-recent li { display: flex; gap: 14px; align-items: center; padding: 17px 0; border-top: 1px solid #edf0f5; }
#home-recent li:last-child { padding-bottom: 0; }
.home-record-icon { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 42px; border-radius: 8px; background: #f1f5fc; color: #7a96bd; font: 17px Georgia, serif; }
.home-record-info { flex: 1; min-width: 0; }
.home-record-info strong { display: block; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.home-record-info > span { display: block; margin-top: 5px; color: #8792a4; font-size: 11px; }
.home-record-open { flex-shrink: 0; font-size: 12px; }
.home-records-empty { padding: 26px 12px 18px; text-align: center; }
.home-records-empty > span { display: inline-grid; place-items: center; width: 42px; height: 45px; background: #f4f7fc; color: #91a7c5; border-radius: 8px; font: 20px Georgia, serif; }
.home-records-empty p { margin: 12px 0 0; color: #8190a5; font-size: 12px; }
@media (min-width: 1900px) { body[data-joined=true] main { padding-left: 52px; padding-right: 52px; } }
@media (max-width: 1180px) { .workspace-grid { grid-template-columns: 1fr; } .app-topbar { padding: 0 26px; } main { padding: 30px 26px 48px; } }
@media (max-width: 760px) {
  body[data-joined=true] main, body[data-joined=true] .app-topbar { margin-left: 0; }
  .app-topbar { height: 64px; padding: 0 20px; gap: 14px; }
  .topbar-label { display: none; }
  .app-topbar .lesson-help { margin-left: auto; }
  .brand { font-size: 19px; }
  .brand small { font-size: 8px; margin-top: 5px; }
  .brand-symbol { width: 32px; height: 32px; font-size: 21px; border-radius: 9px; }
  .app-sidebar { position: static; width: auto; padding: 0; margin: -6px 0 26px; background: transparent; border: 0; }
  .app-sidebar .brand, .nav-caption, .sidebar-footer { display: none; }
  .account-actions { align-self: flex-end; margin: 8px 0 0; }
  .learning-tabs { flex-direction: row; gap: 5px; }
  .learning-tabs button { flex: 1; justify-content: center; min-width: 0; min-height: 46px; gap: 5px; font-size: 11px; padding: 9px 6px; background: #fff; }
  .learning-tabs button { flex-direction: column; gap: 4px; min-height: 62px; font-size: 10px; padding: 8px 3px; }
  .learning-tabs svg { width: 17px; height: 17px; }
  main { padding: 24px 16px 40px; }
  .page-header { align-items: flex-start; gap: 10px; margin-bottom: 20px; }
  .page-header .eyebrow { font-size: 8px; letter-spacing: .08em; }
  .page-header h1 { font-size: 25px; }
  #lesson-date { font-size: 10px; margin-top: 24px; white-space: nowrap; }
  .lesson-overview { padding: 16px; border-radius: 12px; }
  .lesson-header h2 { font-size: 16px; }
  .save-bar { gap: 8px 12px; padding: 13px 2px; }
  .collaboration-summary { width: 100%; }
  .workspace-grid .card, .assessment-card { padding: 18px; }
  .workspace-grid h2 { font-size: 16px; }
  .workspace-grid { gap: 18px; }
  .join-panel { margin: 8px auto; padding: 26px 24px; }
  .join-panel h1 { font-size: 22px; }
  .assessment-pair-summary { padding: 13px; }
  .assessment-pair-details > :not(summary) { margin-left: 13px; margin-right: 13px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); padding: 28px 24px; border-radius: 15px; }
  .home-hero h2 { font-size: 28px; }
  .home-greeting { font-size: 12px; }
  .home-hero-description { font-size: 12px; }
  .home-hero-art { display: none; }
  .home-stats { gap: 9px; }
  .home-stat { display: block; padding: 16px 10px; text-align: center; }
  .home-stat-icon { margin: 0 auto 10px; width: 32px; height: 32px; border-radius: 9px; }
  .home-stat-icon svg { width: 19px; height: 19px; }
  .home-stat p { font-size: 10px; }
  .home-stat strong { font-size: 22px; }
  .home-stat strong small { font-size: 10px; margin-left: 3px; }
  .home-records { padding: 20px 17px; }
  .home-records-heading h2, .home-summary-heading h2 { font-size: 15px; }
}
