:root {
  color-scheme: light;
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eceff3;
  --text: #111820;
  --muted: #68727f;
  --line: #d9dfe7;
  --line-strong: #c3ccd7;
  --primary: #4f6ff2;
  --primary-dark: #3c58d4;
  --green: #17845e;
  --red: #b63b47;
  --amber: #94610e;
  --violet: #7156bd;
  --coral: #e85f58;
  --ink: #0a1017;
  --shadow: 0 18px 46px rgba(16, 24, 35, 0.08);
  --shadow-soft: 0 8px 24px rgba(16, 24, 35, 0.055);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

body.embedded-admin-workspace {
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

body.embedded-admin-workspace .app-shell {
  min-height: 0;
}

body.embedded-admin-workspace > .app-shell > .topbar,
body.embedded-admin-workspace .overview-grid,
body.embedded-admin-workspace #recordsPanel,
body.embedded-admin-workspace #monitorScrim,
body.embedded-admin-workspace #monitorDrawer {
  display: none !important;
}

body.embedded-admin-workspace > .app-shell > .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.embedded-admin-workspace > .app-shell > .container > .workspace {
  gap: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--primary);
}

strong {
  font-weight: 750;
}

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

.auth-shell {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auth-password-row .input {
  min-width: 0;
}

.auth-brand {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.reauth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 18, 30, 0.48);
}

.reauth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 52px rgba(14, 24, 43, 0.24);
}

.reauth-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reauth-brand-logo {
  width: 42px;
  height: 42px;
  padding: 6px;
  flex: 0 0 auto;
  object-fit: contain;
  background: var(--ink);
  border-radius: 7px;
}

.reauth-head strong,
.reauth-head span {
  display: block;
}

.reauth-head strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.reauth-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.reauth-error {
  padding: 10px 12px;
  color: #9f2736;
  background: #fff1f2;
  border: 1px solid #f5c2c7;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 13px clamp(16px, 4vw, 40px);
  color: #f8fbff;
  background: rgba(10, 16, 23, 0.96);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 12px 30px rgba(10, 16, 23, 0.12);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 34px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-title {
  margin: 0;
  color: inherit;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 780;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: #aeb8c5;
  font-size: 13px;
}

.topbar .button.secondary {
  color: #f7f9fc;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.topbar .button.secondary:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
}

.topbar .status-pill {
  border-color: rgba(255, 255, 255, 0.12);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 56px;
}

.workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  overflow: hidden;
}

.panel-header,
.panel-body,
.panel-footer {
  padding: 20px;
  min-width: 0;
}

.panel-header {
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.panel-footer {
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar-spread {
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.class-select-panel {
  border-color: #dce8f7;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 72%);
}

.class-select-body {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.class-select-field {
  min-width: min(360px, 100%);
  flex: 1 1 360px;
}

.class-select-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.class-select-body .small {
  margin: 0 0 11px;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(36, 95, 196, 0.14);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(36, 95, 196, 0.18);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.16), 0 8px 16px rgba(36, 95, 196, 0.14);
}

.button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}

.button.secondary:hover {
  background: var(--surface-2);
}

.button.danger {
  background: #fff;
  border-color: #efc8c8;
  color: var(--red);
  box-shadow: none;
}

.button.danger:hover {
  background: #fff4f4;
}

.button.success {
  background: var(--green);
  box-shadow: 0 8px 16px rgba(22, 129, 93, 0.14);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
  pointer-events: none;
}

.button.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.student-center-link {
  box-shadow: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.metric-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ai-generator-form {
  display: grid;
  gap: 18px;
}

.ai-generator-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 24px 0;
}

.ai-generator-tab {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.ai-generator-tab:hover {
  border-color: var(--line-strong);
}

.ai-generator-tab.is-active {
  border-color: #4f70b8;
  background: #f5f8ff;
  box-shadow: inset 0 0 0 1px rgba(79, 112, 184, 0.12);
}

.ai-generator-tab-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: #11233f;
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.ai-generator-tab span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ai-generator-tab small {
  color: var(--muted);
  font-size: 12px;
}

.ai-generator-tab[data-ai-generator-tab="writing"] .ai-generator-tab-mark {
  background: #24598f;
}

.ai-part-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ai-part-fieldset legend {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.ai-part-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-part-option {
  display: flex;
  min-width: 0;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.ai-part-option:hover {
  border-color: var(--line-strong);
}

.ai-part-option.is-selected {
  border-color: #4f70b8;
  background: #f5f8ff;
  box-shadow: inset 0 0 0 1px rgba(79, 112, 184, 0.12);
}

.ai-part-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.ai-part-option span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ai-part-option strong {
  font-size: 14px;
}

.ai-part-option small {
  color: var(--muted);
  font-size: 12px;
}

.ai-generator-settings {
  display: grid;
  grid-template-columns: minmax(0, 780px);
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.writing-task-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.writing-generator-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.writing-task2-settings {
  display: grid;
  gap: 14px;
  padding-top: 0;
  border-top: 0;
}

.ai-topic-setting {
  align-content: start;
}

.part1-topic-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-topic-setting + .ai-topic-setting {
  padding-top: 18px;
  border-top: 1px solid #e7edf5;
}

.writing-generator-settings .writing-task2-settings {
  padding-top: 0;
  border-top: 0;
}

.ai-generator-settings .field > span {
  font-weight: 750;
}

.ai-generator-settings .field > span small {
  color: var(--muted);
  font-weight: 500;
}

.ai-generator-actions {
  padding-top: 2px;
}

.monitor-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.monitor-trigger:hover {
  border-color: var(--line-strong);
  background: #fbfcfe;
}

.monitor-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.14), var(--shadow-soft);
}

.monitor-trigger-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.monitor-trigger.has-unread .monitor-trigger-dot {
  background: var(--red);
}

.monitor-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.monitor-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 28, 48, 0.22);
}

.monitor-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 70;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(440px, calc(100vw - 24px));
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 48px rgba(28, 39, 63, 0.16);
  transform: translateX(calc(100% + 16px));
  transition: transform 0.2s ease;
  pointer-events: none;
}

.monitor-drawer.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.monitor-drawer-header,
.monitor-drawer-tools {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.monitor-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.monitor-drawer-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.monitor-search {
  width: min(260px, 100%);
}

.monitor-drawer .monitor-search {
  width: 100%;
}

.monitor-list {
  display: grid;
  gap: 10px;
  height: 360px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.monitor-drawer .monitor-list {
  height: auto;
  max-height: none;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
}

.monitor-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.monitor-drawer .monitor-item {
  background: #fbfcfe;
  box-shadow: none;
}

.monitor-item p {
  margin: 4px 0 0;
}

.monitor-error {
  color: var(--red);
  word-break: break-word;
}

.monitor-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.monitor-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
}

body.monitor-open {
  overflow: hidden;
}

.file-dropzone {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 168px;
  padding: 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.file-dropzone:hover,
.file-dropzone.is-dragging,
.file-dropzone.has-file {
  border-color: var(--primary);
  background: #f4f8ff;
  box-shadow: inset 0 0 0 1px rgba(36, 95, 196, 0.08);
}

.file-dropzone.is-loading {
  cursor: wait;
  opacity: 0.8;
}

.dropzone-kicker {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e7f4ee;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.file-dropzone strong {
  font-size: 20px;
  line-height: 1.25;
}

.file-dropzone span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  width: fit-content;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.status-pill.published {
  background: #e6f7ef;
  color: var(--green);
}

.status-pill.closed {
  background: #fff2df;
  color: var(--amber);
}

.status-pill.archived {
  background: #edf1f5;
  color: #5d6878;
}

.status-pill.draft {
  background: #edf5ff;
  color: #244365;
}

.notice {
  border: 1px solid #cfe0fa;
  background: #f1f6ff;
  color: #244365;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.6;
}

.notice.warn {
  border-color: #f1d7a8;
  background: #fff7e8;
  color: #674511;
}

.notice.error {
  border-color: #efc8c8;
  background: #fff3f3;
  color: #7b2525;
}

.submit-review-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(7, 18, 35, 0.28);
}

.submit-review-dialog::backdrop {
  background: rgba(7, 18, 35, 0.58);
}

.submit-review-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.submit-review-card h2,
.submit-review-card p {
  margin: 0;
}

.submit-review-summary {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 14px 14px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.submit-review-actions {
  justify-content: flex-end;
}

.permission-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.permission-notice strong,
.permission-notice span,
.permission-notice small {
  display: inline-flex;
  align-items: center;
}

.permission-notice strong {
  color: var(--text);
}

.permission-notice span {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(103, 69, 17, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.permission-notice small {
  color: var(--muted);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.attempt-sync-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d9e1ea;
  border-radius: 6px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.attempt-sync-status.saving,
.attempt-sync-status.reconnecting,
.attempt-sync-status.local_saved {
  border-color: #f3d28b;
  color: #7a4b08;
  background: #fff9e8;
}

.attempt-sync-status.synced {
  border-color: #b9dfcf;
  color: #176246;
  background: #f0faf6;
}

.attempt-sync-status.offline,
.attempt-sync-status.action_required {
  border-color: #efb7b7;
  color: #8a2525;
  background: #fff5f5;
}

.quality-list {
  margin: 0;
  padding-left: 20px;
  color: var(--amber);
  font-size: 13px;
  line-height: 1.55;
}

.section-editor {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.section-editor:first-child {
  border-top: 0;
  padding-top: 0;
}

.question-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.question-meta {
  display: grid;
  grid-template-columns: 90px 170px 90px minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

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

.link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.link-box input {
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-lifecycle-settings {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.assignment-lifecycle-settings .field {
  min-width: 0;
}

.assignment-lifecycle-settings .small {
  align-self: center;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.records-table {
  min-width: 1040px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  background: #f8fafd;
  z-index: 1;
}

tbody tr {
  background: #fff;
}

tbody tr:hover {
  background: #fbfdff;
}

.record-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.submission-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.submission-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.submission-action-review {
  color: #fff;
  background: var(--primary);
}

.submission-action-review:hover {
  color: #fff;
  background: var(--primary-dark);
}

.submission-action-reset {
  color: var(--text);
  border-color: var(--line);
  background: #fff;
}

.submission-action-reset:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.submission-action-delete {
  padding-inline: 7px;
  color: var(--red);
  background: transparent;
}

.submission-action-delete:hover {
  background: #fff1f2;
}

.submission-action:focus-visible {
  outline: 3px solid rgba(79, 111, 242, 0.2);
  outline-offset: 2px;
}

.submission-action:disabled,
.submission-action[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.56;
}

.submission-action-list[aria-busy="true"] a {
  pointer-events: none;
}

.submission-action-state {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #b9dfd0;
  border-radius: 999px;
  color: #136849;
  background: #eef9f4;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.submission-action-state.is-muted {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-2);
}

.speaking-processing-summary {
  min-width: 190px;
  display: grid;
  gap: 7px;
}

.speaking-processing-progress,
.speaking-processing-states {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.speaking-processing-progress {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.speaking-processing-progress strong {
  color: var(--text);
  font-size: 13px;
}

.speaking-processing-states {
  gap: 5px;
}

.speaking-processing-state,
.speaking-processing-exception {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.speaking-processing-state.is-success {
  color: #136849;
  border-color: #b9dfd0;
  background: #eef9f4;
}

.speaking-processing-state.is-progress {
  color: #3657c8;
  border-color: #c9d4ff;
  background: #f0f3ff;
}

.speaking-processing-state.is-warning,
.speaking-processing-exception.is-warning {
  color: #80530a;
  border-color: #f0d7a2;
  background: #fff8e8;
}

.speaking-processing-state.is-error,
.speaking-processing-exception.is-error {
  color: #a12f3d;
  border-color: #efc8ce;
  background: #fff1f3;
}

.speaking-processing-state.is-neutral {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-2);
}

.record-actions .button {
  min-width: 64px;
  justify-content: center;
}

.record-title {
  font-weight: 760;
  line-height: 1.35;
}

.record-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.record-class {
  display: grid;
  gap: 5px;
  min-width: 112px;
}

.record-class strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.record-class small {
  color: var(--muted);
  font-size: 12px;
}

.record-class-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.record-class-chip.confirmed {
  color: #14724f;
  background: #e9f8f1;
  border: 1px solid #bfead8;
}

.record-class-chip.suggested {
  color: #8a5a06;
  background: #fff7df;
  border: 1px solid #f3d891;
}

.record-class-chip.unclassified {
  color: #5a6474;
  background: #f3f6fa;
  border: 1px solid #d9e1eb;
}

.record-counts {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #f0d2d2;
  border-radius: 999px;
  background: #fff7f7;
  white-space: nowrap;
  font-size: 13px;
}

.record-counts strong {
  font-weight: 760;
  color: var(--red);
}

.record-counts span {
  color: var(--muted);
}

.record-counts i {
  color: #e3a4a4;
  font-style: normal;
}

.record-remark {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.record-remark-input {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.record-remark-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
}

.select-column {
  width: 46px;
  text-align: center;
}

.select-column input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.student-layout {
  display: grid;
  gap: 16px;
}

.learn-container {
  width: min(1040px, calc(100% - 32px));
  padding-top: 24px;
  padding-bottom: 48px;
}

.learn-topbar {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  gap: 24px;
  padding-top: 9px;
  padding-bottom: 9px;
  color: var(--ink);
  border-bottom-color: #dfe4eb;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(16, 24, 35, 0.07);
}

.learn-topbar-brand {
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.learn-topbar .brand-subtitle {
  color: #7a8490;
}

.learn-primary-nav {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e0e5ec;
  border-radius: 8px;
  background: #f6f7f9;
}

.learn-primary-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 6px;
  color: #56616f;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.learn-primary-nav a:hover,
.learn-primary-nav a:focus-visible {
  color: #254fc8;
  background: #fff;
  box-shadow: 0 3px 10px rgba(16, 24, 35, 0.08);
}

#learnAccountMenu {
  min-width: 0;
  flex-wrap: nowrap;
  justify-self: end;
}

.learn-refresh-button {
  min-width: 68px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #5b6674;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.learn-refresh-button:hover:not(:disabled),
.learn-refresh-button:focus-visible {
  border-color: #aebcf0;
  background: #fff;
  color: #254fc8;
  box-shadow: 0 5px 14px rgba(37, 79, 200, 0.09);
}

.learn-refresh-button:focus-visible {
  outline: 3px solid rgba(79, 111, 242, 0.2);
  outline-offset: 2px;
}

.learn-refresh-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.learn-refresh-button.complete {
  border-color: #b8ddca;
  background: #f4fbf7;
  color: #16734a;
}

.learn-account-menu {
  position: relative;
  min-width: 0;
}

.learn-account-menu-trigger {
  min-height: 46px;
  max-width: 260px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 5px 9px 5px 6px;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.learn-account-menu-trigger:hover,
.learn-account-menu-trigger[aria-expanded="true"] {
  border-color: #aebcf0;
  background: #f8faff;
}

.learn-account-menu-trigger:focus-visible {
  outline: 3px solid rgba(79, 111, 242, 0.2);
  outline-offset: 2px;
}

.learn-account-menu-trigger > svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #748091;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.learn-account-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #315ed4;
  color: #fff;
  font-size: 14px;
  font-weight: 820;
}

.learn-account-avatar.large {
  width: 42px;
  height: 42px;
  font-size: 17px;
}

.learn-account-trigger-copy {
  min-width: 0;
}

.learn-account-trigger-copy strong,
.learn-account-trigger-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learn-account-trigger-copy strong {
  font-size: 13px;
  line-height: 1.3;
}

.learn-account-trigger-copy small {
  margin-top: 1px;
  color: #76808c;
  font-size: 11px;
  line-height: 1.3;
}

.learn-account-dropdown {
  position: absolute;
  z-index: 90;
  top: calc(100% + 9px);
  right: 0;
  width: min(312px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #d3dae4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(16, 24, 35, 0.18);
}

.learn-account-dropdown:focus {
  outline: none;
}

.learn-account-dropdown-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border-bottom: 1px solid #e3e7ed;
}

.learn-account-dropdown-head div {
  min-width: 0;
}

.learn-account-dropdown-head strong,
.learn-account-dropdown-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learn-account-dropdown-head strong {
  color: var(--ink);
  font-size: 15px;
}

.learn-account-dropdown-head small {
  margin-top: 2px;
  color: #76808c;
  font-size: 12px;
}

.learn-account-scope {
  display: grid;
  gap: 3px;
  max-height: 214px;
  overflow-y: auto;
  padding: 11px 10px;
  border-bottom: 1px solid #e3e7ed;
}

.learn-account-scope > span {
  padding: 0 5px 4px;
  color: #7a8490;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.learn-account-scope button,
.learn-account-menu-actions button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #35404d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 690;
  text-align: left;
}

.learn-account-scope button:hover,
.learn-account-menu-actions button:hover,
.learn-account-scope button:focus-visible,
.learn-account-menu-actions button:focus-visible {
  outline: none;
  background: #f1f4f8;
}

.learn-account-scope button.active {
  color: #2853c7;
  background: #edf2ff;
}

.learn-account-scope button b {
  color: #315ed4;
}

.learn-account-menu-actions {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.learn-account-menu-actions .danger {
  color: #a3333e;
}

.learn-portal-section,
#learnHistoryPanel {
  scroll-margin-top: 94px;
}

.learn-overview-section {
  display: grid;
  gap: 16px;
}

.learn-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 3px;
}

.learn-overview-head span,
.learn-overview-head h2,
.learn-overview-head p {
  display: block;
  margin: 0;
}

.learn-overview-head span {
  color: #315ed4;
  font-size: 12px;
  font-weight: 820;
}

.learn-overview-head h2 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
}

.learn-overview-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.learn-loading-section,
.learn-overview-loading {
  min-height: 100px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.learn-auth-active {
  overflow-x: hidden;
  background: var(--ink);
}

.learn-auth-active > .app-shell > .topbar {
  display: none;
}

.learn-auth-active > .app-shell > .learn-container {
  width: 100%;
  margin: 0;
}

.learn-auth-active #learnNotice {
  position: fixed;
  z-index: 40;
  top: 18px;
  left: 50%;
  width: min(560px, calc(100% - 32px));
  transform: translateX(-50%);
  box-shadow: 0 16px 42px rgba(10, 16, 23, 0.22);
}

.learn-auth-active #learnApp {
  min-height: 100vh;
}

.learn-auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #fff;
}

.learn-auth-visual {
  position: relative;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  color: #fff;
  background: #0a1017 url("/assets/welcome/campus-threshold-1680.webp") center / cover no-repeat;
}

.learn-auth-visual-shade {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 15, 0.57);
}

.learn-auth-brand,
.learn-auth-visual-copy {
  position: absolute;
  z-index: 1;
  left: clamp(30px, 5vw, 76px);
}

.learn-auth-brand {
  top: clamp(28px, 5vw, 66px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.learn-auth-brand img {
  width: 42px;
  height: 50px;
}

.learn-auth-brand strong,
.learn-auth-brand small,
.learn-auth-visual-copy p,
.learn-auth-visual-copy strong {
  display: block;
}

.learn-auth-brand strong {
  font-size: 18px;
  line-height: 1.15;
}

.learn-auth-brand small {
  margin-top: 4px;
  color: #c1cad5;
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.learn-auth-visual-copy {
  right: clamp(30px, 5vw, 76px);
  bottom: clamp(46px, 8vh, 94px);
}

.learn-auth-visual-copy strong {
  max-width: 680px;
  font-size: clamp(31px, 3.5vw, 52px);
  line-height: 1.16;
  text-wrap: balance;
}

.learn-auth-visual-copy p {
  max-width: 580px;
  margin: 18px 0 0;
  color: #d0d7df;
  font-size: 15px;
  line-height: 1.75;
}

.learn-auth-pane {
  position: relative;
  display: grid;
  place-items: center;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 86px clamp(30px, 6vw, 86px) 54px;
  background: #fff;
}

.learn-auth-back {
  position: absolute;
  top: 30px;
  left: clamp(30px, 6vw, 86px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5d6875;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
}

.learn-auth-back svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.learn-auth-back:hover {
  color: var(--primary);
}

.learn-auth-card {
  width: min(480px, 100%);
  display: grid;
  gap: 20px;
}

.learn-auth-heading > span {
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.learn-auth-heading h1 {
  margin: 9px 0 0;
  color: var(--ink);
  font-size: clamp(31px, 3.2vw, 44px);
  line-height: 1.08;
}

.learn-auth-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.learn-auth-form {
  display: grid;
  gap: 15px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.learn-auth-form.highlighted {
  background: transparent;
}

.learn-auth-form[hidden] {
  display: none;
}

.learn-auth-form-copy h2,
.learn-auth-form-copy p {
  margin: 0;
}

.learn-auth-form-copy h2 {
  color: var(--ink);
  font-size: 19px;
}

.learn-auth-form-copy p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.learn-auth-form .field > span {
  color: #303a47;
  font-size: 13px;
  font-weight: 760;
}

.learn-auth-form .input {
  min-height: 46px;
  padding: 0 13px;
  border-color: #cfd6df;
  background: #fff;
}

.learn-auth-field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.learn-optional-profile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.learn-optional-profile > summary {
  padding: 11px 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.learn-optional-profile-fields {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.learn-auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f0f2f5;
}

.learn-auth-switch button {
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.learn-auth-switch button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 24, 35, 0.09);
}

.learn-auth-switch button:focus-visible {
  outline: 3px solid rgba(36, 95, 196, 0.18);
  outline-offset: 1px;
}

.learn-auth-form h3,
.learn-assignment-card h3 {
  margin: 0;
  line-height: 1.25;
}

.learn-auth-form p,
.learn-assignment-card p {
  margin: 4px 0 0;
}

.learn-auth-submit {
  min-height: 46px;
  margin-top: 2px;
}

.learn-auth-help {
  margin: -4px 0 0;
  color: #7a8490;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.learn-return-notice {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f6faff;
  color: var(--text);
}

.learn-return-notice strong,
.learn-return-notice span {
  display: block;
}

.learn-return-notice strong {
  font-size: 14px;
  line-height: 1.3;
}

.learn-return-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.learn-dashboard {
  min-height: 420px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.learn-dashboard > .panel-header {
  padding: 5px 0 16px;
  border: 0;
  background: transparent;
}

.learn-dashboard > .panel-body {
  padding: 0;
}

.learn-class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.learn-class-tabs > button,
.learn-class-tabs > .learn-join-anchor > .learn-join-trigger {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.learn-class-tabs > button.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.learn-class-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.learn-class-actions span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.learn-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  color: #fff;
  border: 1px solid #202a35;
  border-radius: 7px;
  background: #111820;
  box-shadow: 0 16px 36px rgba(10, 16, 23, 0.13);
}

.learn-summary-title span,
.learn-summary-title strong,
.learn-summary-stats span,
.learn-summary-stats b,
.learn-summary-archive span,
.learn-summary-archive b {
  display: block;
}

.learn-summary-title span {
  color: #aeb8c4;
  font-size: 12px;
  font-weight: 760;
}

.learn-summary-title strong {
  margin-top: 4px;
  color: #fff;
  font-size: 16px;
}

.learn-summary-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.learn-summary-stats span {
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
  color: #aeb8c4;
  font-size: 12px;
}

.learn-summary-stats b {
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.learn-summary-stats .todo b {
  color: #ff887f;
}

.learn-summary-stats .progress b {
  color: #91a6ff;
}

.learn-summary-stats .waiting b {
  color: #f2c36a;
}

.learn-summary-stats .ready b {
  color: #66d8a1;
}

.learn-summary-archive {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.learn-summary-archive span {
  min-width: 0;
  color: #aeb8c4;
  font-size: 12px;
}

.learn-summary-archive b {
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.learn-summary-archive .progress b {
  color: #91a6ff;
}

.learn-summary-archive .waiting b {
  color: #f2c36a;
}

.learn-summary-archive .ready b {
  color: #66d8a1;
}

.learn-passport {
  display: grid;
  gap: 12px;
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.learn-passport-head,
.learn-passport-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.learn-passport-head span,
.learn-passport-head strong,
.learn-passport-card span,
.learn-passport-card strong,
.learn-passport-card p {
  display: block;
}

.learn-passport-head span,
.learn-passport-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.learn-passport-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.learn-passport-head p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learn-passport-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.retry-ready-notice {
  display: grid;
  justify-items: start;
  gap: 8px;
  border-color: #9fd6b2;
  background: #f2fbf5;
}

.retry-ready-notice strong,
.retry-ready-notice span {
  display: block;
}

.retry-ready-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learn-passport-card {
  min-width: 0;
  min-height: 138px;
  align-items: stretch;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.learn-passport-card strong {
  margin-top: 6px;
  color: var(--text);
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.learn-passport-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.learn-passport-card.todo {
  border-color: #ead3c7;
  background: #fff8f5;
}

.learn-passport-card.progress {
  border-color: #cfe0fa;
  background: #f7fbff;
}

.learn-passport-card.ready {
  border-color: #cdebdc;
  background: #f7fdf9;
}

.learn-passport-card.waiting {
  border-color: #f2dba8;
  background: #fffaf0;
}

.learn-passport-card.todo span {
  color: #9b3f1c;
}

.learn-passport-card.progress span {
  color: #244365;
}

.learn-passport-card.ready span {
  color: var(--green);
}

.learn-passport-card.waiting span {
  color: var(--amber);
}

.learn-next-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: var(--shadow-soft);
}

.learn-resume-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe0fa;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: var(--shadow-soft);
}

.learn-resume-head,
.learn-resume-card,
.learn-resume-main,
.learn-resume-meta {
  display: flex;
  align-items: center;
}

.learn-resume-head,
.learn-resume-card {
  justify-content: space-between;
  gap: 12px;
}

.learn-resume-head span,
.learn-resume-head strong,
.learn-resume-main strong,
.learn-resume-main span,
.learn-resume-more {
  display: block;
}

.learn-resume-head span {
  color: #244365;
  font-size: 12px;
  font-weight: 780;
}

.learn-resume-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.learn-resume-head p,
.learn-resume-more {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learn-resume-list {
  display: grid;
  gap: 8px;
}

.learn-resume-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid #d7e4f6;
  border-radius: 8px;
  background: #fff;
}

.learn-resume-main {
  min-width: 0;
  gap: 10px;
}

.learn-resume-main div {
  min-width: 0;
}

.learn-resume-main strong {
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.learn-resume-main span:not(.learn-submission-pill),
.learn-resume-meta span {
  color: var(--muted);
  font-size: 13px;
}

.learn-resume-meta {
  flex-shrink: 0;
  gap: 8px;
}

.learn-resume-meta .learn-progress-text {
  border: 1px solid #cfe0fa;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f6ff;
  color: #244365;
  font-weight: 760;
}

.learn-resume-meta .learn-save-text {
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: #516072;
  font-weight: 720;
}

.learn-next-head,
.learn-next-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.learn-next-head span,
.learn-next-head strong,
.learn-next-main strong,
.learn-next-main span,
.learn-next-main em {
  display: block;
}

.learn-next-head span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 780;
}

.learn-next-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.learn-next-head p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learn-next-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.learn-next-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.learn-next-item.progress {
  border-color: #cfe0fa;
  background: #f7fbff;
}

.learn-next-item.ready {
  border-color: #cdebdc;
  background: #f7fdf9;
}

.learn-next-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.learn-next-main strong {
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.learn-next-main span:not(.learn-submission-pill),
.learn-next-main em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.learn-next-main em {
  color: #244365;
  font-weight: 760;
}

.learn-student-tools {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid #d6dfeb;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7f9fc, #fff);
  box-shadow: var(--shadow-soft);
}

.learn-student-tools-head span,
.learn-student-tools-head strong,
.learn-student-tools-head small {
  display: block;
}

.learn-student-tools-head span {
  color: #52709a;
  font-size: 12px;
  font-weight: 800;
}

.learn-student-tools-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.learn-student-tools-head small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.learn-student-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.58fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.learn-join-shortcut {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.learn-join-shortcut .field {
  gap: 5px;
}

.learn-join-shortcut .field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.learn-account-settings {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 86px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.learn-student-tools .learn-account-settings {
  box-shadow: none;
}

.learn-student-tools .learn-account-settings[open] {
  grid-column: 1 / -1;
}

.learn-account-settings.is-targeted {
  border-color: #7190f5;
  box-shadow: 0 0 0 4px rgba(79, 111, 242, 0.14), var(--shadow-soft);
}

.learn-account-settings summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  color: var(--text);
  cursor: pointer;
  font-weight: 760;
}

.learn-account-settings summary:focus-visible {
  border-radius: 7px;
  outline: 3px solid rgba(79, 111, 242, 0.24);
  outline-offset: 2px;
}

.learn-account-settings-copy strong,
.learn-account-settings-copy small {
  display: block;
}

.learn-account-settings-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.learn-account-settings-action {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #49617e;
  font-size: 12px;
  font-weight: 780;
}

.learn-account-settings-action.opened,
.learn-account-settings[open] .learn-account-settings-action.closed {
  display: none;
}

.learn-account-settings[open] .learn-account-settings-action.opened {
  display: inline-flex;
}

.learn-email-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #bfd3ee;
  border-radius: 10px;
  background: linear-gradient(135deg, #edf5ff, #f9fbff);
  box-shadow: var(--shadow-soft);
}

.learn-email-prompt > div:first-child {
  min-width: 0;
}

.learn-email-prompt span,
.learn-email-prompt strong {
  display: block;
}

.learn-email-prompt span {
  color: #52709a;
  font-size: 12px;
  font-weight: 800;
}

.learn-email-prompt strong {
  margin-top: 4px;
  color: #17325c;
  font-size: 17px;
}

.learn-email-prompt p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.learn-email-prompt > div:last-child,
.learn-email-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.learn-email-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 13px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.learn-email-settings > div:first-child span,
.learn-email-settings > div:first-child strong,
.learn-email-settings > div:first-child small {
  display: block;
}

.learn-email-settings > div:first-child span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.learn-email-settings > div:first-child strong {
  margin-top: 3px;
  color: var(--text);
}

.learn-email-settings > div:first-child small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.learn-email-verify-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  gap: 10px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.learn-profile-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 0 13px 13px;
  border-top: 1px solid var(--line);
}

.learn-profile-form .field {
  gap: 5px;
}

@media (max-width: 720px) {
  .learn-student-tools,
  .learn-student-tools-grid {
    grid-template-columns: 1fr;
  }

  .learn-email-prompt,
  .learn-email-settings {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .learn-email-prompt {
    flex-direction: column;
  }

  .learn-email-prompt > div:last-child,
  .learn-email-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .learn-email-prompt > div:last-child .button,
  .learn-email-actions .button {
    flex: 1 1 140px;
    justify-content: center;
  }

  .learn-email-verify-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .learn-account-settings {
    transition: none;
  }
}

.learn-profile-form .field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.learn-header-actions {
  position: relative;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.learn-account-anchor,
.learn-join-anchor {
  position: relative;
  display: inline-flex;
}

.learn-account-trigger {
  position: relative;
}

.learn-account-dot {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f08b32;
  box-shadow: 0 0 0 1px rgba(187, 87, 15, 0.18);
}

.learn-email-nudge {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 70;
  width: min(320px, calc(100vw - 24px));
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 42, 71, 0.18);
  overflow-wrap: anywhere;
  pointer-events: none;
}

.learn-email-nudge::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 30px;
  width: 10px;
  height: 10px;
  border-top: 1px solid #cbd8e8;
  border-left: 1px solid #cbd8e8;
  background: #fff;
  transform: rotate(45deg);
}

.learn-email-nudge strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.learn-email-nudge > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.learn-email-nudge-actions {
  display: flex;
  gap: 8px;
  margin-top: 5px;
}

.learn-email-nudge-actions .button {
  flex: 1 1 0;
  justify-content: center;
  pointer-events: auto;
}

.learn-join-trigger.is-open {
  color: var(--primary);
  border-color: #9db2f7;
  background: #f4f7ff;
}

.learn-layer-scrim {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(12, 18, 30, 0.48);
  cursor: default;
}

.learn-join-scrim {
  display: none;
}

.learn-join-layer {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  width: min(340px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cbd6e4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(17, 34, 58, 0.2);
}

.learn-layer-head,
.learn-account-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.learn-layer-head strong,
.learn-layer-head small,
.learn-account-dialog-head strong,
.learn-account-dialog-head span {
  display: block;
}

.learn-layer-head strong,
.learn-account-dialog-head strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.learn-layer-head small,
.learn-account-dialog-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.learn-layer-close {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.learn-layer-close:hover {
  color: var(--text);
  border-color: #aebdce;
  background: #f7f9fc;
}

.learn-layer-error {
  padding: 9px 11px;
  border: 1px solid #f1bac2;
  border-radius: 8px;
  background: #fff2f3;
  color: #a72d3d;
  font-size: 13px;
  line-height: 1.45;
}

.learn-join-form,
.learn-account-form {
  display: grid;
  gap: 12px;
}

.learn-join-form .field,
.learn-account-form .field,
.learn-email-verify-form .field {
  gap: 6px;
}

.learn-join-form .field span,
.learn-account-form .field span,
.learn-email-verify-form .field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.learn-join-form > .button,
.learn-account-form > .button {
  justify-content: center;
}

.learn-sheet-handle {
  display: none;
}

.learn-account-layer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.learn-account-scrim {
  z-index: 0;
}

.learn-account-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(82vh, 720px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #cbd6e4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(14, 26, 46, 0.28);
}

.learn-account-dialog-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.learn-account-dialog-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
}

.learn-account-tabs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #f7f9fc;
}

.learn-account-tabs button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #4d637f;
  cursor: pointer;
  font-weight: 740;
  text-align: left;
}

.learn-account-tabs button:hover {
  background: #edf2f8;
}

.learn-account-tabs button.active {
  color: #2f55c9;
  border-color: #c8d4fb;
  background: #edf2ff;
}

.learn-account-panel {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
}

.learn-account-panel > section {
  display: grid;
  gap: 16px;
}

.learn-account-panel-head strong,
.learn-account-panel-head span {
  display: block;
}

.learn-account-panel-head strong {
  color: var(--text);
  font-size: 17px;
}

.learn-account-panel-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learn-form-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.learn-email-status {
  display: grid;
  gap: 8px;
  padding: 12px 13px;
  border: 1px solid #d7e0ec;
  border-radius: 9px;
  background: #f8fafc;
}

.learn-email-status span,
.learn-email-status strong {
  display: block;
}

.learn-email-status span {
  color: #57708f;
  font-size: 12px;
  font-weight: 800;
}

.learn-email-status strong {
  margin-top: 3px;
  color: var(--text);
}

.learn-email-status p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.learn-email-verify-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.learn-email-subscription-actions {
  display: flex;
  justify-content: flex-end;
}

body.learn-layer-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .learn-header-actions {
    gap: 6px;
  }

  .learn-email-nudge {
    position: fixed;
    top: 132px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  .learn-email-nudge::before {
    display: none;
  }

  .learn-join-scrim {
    display: block;
  }

  .learn-join-layer {
    position: fixed;
    inset: auto 0 0;
    z-index: 1001;
    width: 100%;
    max-height: min(72dvh, 620px);
    overflow-y: auto;
    padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 48px rgba(14, 26, 46, 0.22);
  }

  .learn-sheet-handle {
    width: 38px;
    height: 4px;
    display: block;
    justify-self: center;
    border-radius: 999px;
    background: #aeb8c5;
  }

  .learn-account-layer {
    align-items: end;
    padding: 0;
  }

  .learn-account-dialog {
    width: 100%;
    max-height: min(84dvh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 48px rgba(14, 26, 46, 0.22);
  }

  .learn-account-dialog > .learn-sheet-handle {
    margin-top: 9px;
  }

  .learn-account-dialog-head {
    padding: 12px 18px 14px;
  }

  .learn-account-dialog-layout {
    grid-template-columns: 1fr;
  }

  .learn-account-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 10px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .learn-account-tabs button {
    padding: 0 7px;
    text-align: center;
  }

  .learn-account-panel {
    padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  }

  .learn-email-verify-form {
    grid-template-columns: 1fr 1fr;
  }

  .learn-email-verify-form .field {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .learn-email-nudge,
  .learn-join-layer,
  .learn-account-dialog {
    animation: learn-layer-enter 160ms ease-out;
  }
}

@keyframes learn-layer-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.learn-workbench {
  display: grid;
  gap: 12px;
}

.learn-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.learn-section-head span,
.learn-section-head strong {
  display: block;
}

.learn-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.learn-section-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.learn-segmented-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
  overflow-x: auto;
}

.learn-segmented-filter button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
  white-space: nowrap;
}

.learn-segmented-filter button.active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

.learn-segmented-filter b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e7edf5;
  color: #314158;
  font-size: 12px;
  line-height: 1;
}

.learn-segmented-filter button.active b {
  color: var(--primary);
  background: #edf5ff;
}

.learn-assignment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.learn-assignment-card {
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.learn-assignment-card h3 {
  margin-top: 12px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.learn-assignment-card p,
.learn-card-meta span,
.learn-empty-state span,
.learn-empty-inline span,
.learn-loading {
  color: var(--muted);
  font-size: 13px;
}

.learn-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.learn-submission-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.learn-submission-pill.todo {
  color: var(--muted);
  background: var(--surface-2);
}

.learn-submission-pill.progress {
  color: #244365;
  background: #edf5ff;
}

.learn-submission-pill.waiting {
  color: var(--amber);
  background: #fff6e5;
}

.learn-submission-pill.ready {
  color: var(--green);
  background: #e6f7ef;
}

.learn-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.learn-card-meta span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

.learn-card-meta .learn-progress-text,
.learn-history-meta .learn-progress-text {
  border: 1px solid #cfe0fa;
  background: #f1f6ff;
  color: #244365;
  font-weight: 760;
}

.learn-card-meta .learn-save-text {
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #516072;
  font-weight: 720;
}

.learn-card-meta strong {
  color: var(--text);
}

.learn-card-history {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.learn-card-history div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.learn-card-history span,
.learn-card-history a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
}

.learn-card-history span {
  color: #516072;
  background: #fff;
  border: 1px solid #e1e8f0;
}

.learn-card-history strong {
  color: var(--text);
}

.learn-card-history .progress {
  color: #244365;
  background: #f1f6ff;
  border-color: #cfe0fa;
}

.learn-card-history .waiting {
  color: #8a5b00;
  background: #fff7e7;
  border-color: #f0dfb9;
}

.learn-card-history .ready {
  color: var(--green);
  background: #eef9f3;
  border-color: #cdeede;
}

.learn-card-history a {
  justify-self: start;
  color: var(--primary);
  background: #eef4ff;
}

.learn-claim-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: var(--shadow-soft);
}

.learn-claim-head,
.learn-claim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.learn-claim-head span,
.learn-claim-head strong,
.learn-claim-row strong,
.learn-claim-row span {
  display: block;
}

.learn-claim-head span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 780;
}

.learn-claim-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
}

.learn-claim-head p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learn-claim-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.learn-claim-list {
  display: grid;
  gap: 8px;
}

.learn-claim-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.learn-claim-row div {
  min-width: 0;
}

.learn-claim-row strong {
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.learn-claim-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.learn-review-archive {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cdebdc;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(247, 253, 249, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: var(--shadow-soft);
}

.learn-review-head,
.learn-review-card,
.learn-review-main,
.learn-review-meta {
  display: flex;
  align-items: center;
}

.learn-review-head,
.learn-review-card {
  justify-content: space-between;
  gap: 12px;
}

.learn-review-head span,
.learn-review-head strong,
.learn-review-main strong,
.learn-review-main span,
.learn-review-meta span {
  display: block;
}

.learn-review-head span {
  color: var(--green);
  font-size: 12px;
  font-weight: 780;
}

.learn-review-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.learn-review-head p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learn-review-list {
  display: grid;
  gap: 8px;
}

.learn-review-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.learn-review-card.latest {
  border-color: #bfe7d3;
  background: #f7fdf9;
}

.learn-review-main {
  min-width: 0;
  gap: 10px;
}

.learn-review-main div {
  min-width: 0;
}

.learn-review-main strong {
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.learn-review-main span:not(.learn-submission-pill),
.learn-review-meta span {
  color: var(--muted);
  font-size: 13px;
}

.learn-review-meta {
  flex-shrink: 0;
  gap: 10px;
}

.learn-review-meta span:first-child {
  color: var(--text);
  font-weight: 750;
}

.learn-review-summary-block {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #d8ebe2;
  border-radius: 10px;
  background: #f7fcfa;
  color: var(--text);
}

.learn-review-summary-block strong,
.learn-review-summary-block p {
  display: block;
  margin: 0;
}

.learn-review-summary-block strong {
  font-size: 13px;
  line-height: 1.45;
}

.learn-review-summary-block p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.learn-review-summary-block div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.learn-review-summary-block div span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e6f5ee;
  color: var(--green);
  font-size: 11px;
  font-weight: 780;
}

.learn-history-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.learn-history-head,
.learn-history-row,
.learn-history-main,
.learn-history-meta {
  display: flex;
  align-items: center;
}

.learn-history-head,
.learn-history-row {
  justify-content: space-between;
  gap: 12px;
}

.learn-history-head span,
.learn-history-head strong,
.learn-history-main strong,
.learn-history-main span,
.learn-history-meta span {
  display: block;
}

.learn-history-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.learn-history-head strong {
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
}

.learn-history-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.learn-history-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.learn-history-search {
  display: grid;
  gap: 6px;
}

.learn-history-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.learn-history-search .input {
  min-height: 38px;
}

.learn-history-actions {
  display: flex;
  justify-content: flex-end;
}

.learn-history-actions .button {
  min-height: 38px;
  white-space: nowrap;
}

.learn-history-focus {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d7e4f6;
  border-radius: 8px;
  background: #f7fbff;
}

.learn-history-focus span {
  color: #516072;
  font-size: 12px;
  font-weight: 760;
}

.learn-history-focus strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.learn-history-list {
  display: grid;
  gap: 8px;
}

.learn-history-row {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.learn-history-main {
  min-width: 0;
  gap: 10px;
}

.learn-history-main div {
  min-width: 0;
}

.learn-history-main strong {
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.learn-history-main span:not(.learn-submission-pill),
.learn-history-meta span,
.learn-history-waiting {
  color: var(--muted);
  font-size: 13px;
}

.learn-history-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.learn-history-timeline span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #e1e8f0;
  border-radius: 999px;
  background: #fff;
  color: #516072;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.learn-history-timeline b {
  color: var(--text);
  font-weight: 820;
}

.learn-history-timeline .progress {
  border-color: #cfe0fa;
  background: #f1f6ff;
  color: #244365;
}

.learn-history-timeline .waiting {
  border-color: #f2dba8;
  background: #fffaf0;
  color: var(--amber);
}

.learn-history-timeline .ready {
  border-color: #bfe7d3;
  background: #effaf5;
  color: var(--green);
}

.learn-history-meta {
  flex-shrink: 0;
  gap: 10px;
}

.learn-attempt-label {
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 4px 8px;
  color: #334155;
  background: #eef2ff;
  font-weight: 780;
}

.learn-history-hint {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  font-weight: 760;
}

.learn-history-hint.progress {
  border-color: #cfe0fa;
  color: #244365;
  background: #f1f6ff;
}

.learn-history-hint.waiting {
  border-color: #f2dba8;
  color: var(--amber);
  background: #fffaf0;
}

.learn-history-hint.ready {
  border-color: #bfe7d3;
  color: var(--green);
  background: #effaf5;
}

.learn-history-waiting {
  font-weight: 700;
}

.learn-empty-state,
.learn-empty-inline,
.learn-loading {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 180px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  text-align: center;
}

.learn-empty-inline {
  min-height: 86px;
}

.linked-student-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.linked-student-hint a {
  color: var(--primary);
  font-weight: 750;
  text-decoration: none;
}

.linked-student-hint a:hover {
  text-decoration: underline;
}

.account-link-hint {
  padding: 8px 10px;
  border: 1px solid #d8e6fb;
  border-radius: 8px;
  background: #f7fbff;
}

.attempt-resume-banner {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #cfe7dc;
  border-radius: 8px;
  background: #f3faf6;
  color: #1f4f3b;
  font-size: 13px;
  line-height: 1.5;
}

.attempt-resume-banner strong {
  font-size: 14px;
}

.attempt-resume-banner span {
  color: #3f6f59;
}

.writing-shell > .attempt-resume-banner,
.speaking-shell > .attempt-resume-banner {
  margin: 12px 16px 0;
}

.submission-status-actions {
  align-items: stretch;
}

.question-block {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.question-fieldset {
  min-inline-size: 0;
  margin-inline: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

.question-fieldset legend {
  width: 100%;
  padding: 0;
}

.structured-question-heading {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.question-block:first-child {
  border-top: 0;
}

.question-block.review-correct,
.question-block.review-wrong {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 12px;
}

.question-block.review-correct {
  background: #effaf4;
  border-color: #c6ecd8;
}

.question-block.review-wrong {
  background: #fff5f5;
  border-color: #efc8c8;
}

.question-title-row,
.field label:has(.answer-feedback) {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.answer-feedback {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.answer-feedback.correct {
  background: #dff6eb;
  color: var(--green);
}

.answer-feedback.wrong {
  background: #ffe8e8;
  color: var(--red);
}

.choice-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.choice-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.choice-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.choice-item.selected {
  border-color: var(--primary);
  background: #edf5ff;
}

.choice-item:has(input:focus-visible) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.16);
}

.passage {
  white-space: pre-wrap;
  line-height: 1.72;
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.result-score {
  font-size: 48px;
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.answer-sheet-result .result-score {
  margin-top: 4px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.result-cell {
  padding: 9px;
  border-radius: 8px;
  text-align: center;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.result-cell.correct {
  color: var(--green);
  background: #effaf4;
}

.result-cell.wrong {
  color: var(--red);
  background: #fff5f5;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.asset-grid.readonly {
  margin: 10px 0;
}

.asset-thumb {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.asset-thumb img,
.asset-grid.readonly img,
.writing-image-list img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.writing-prompt-editor {
  min-height: 120px;
}

.writing-shell {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.speaking-shell {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.writing-header,
.writing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.writing-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.writing-timer {
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cfe7dc;
  background: #eef8f3;
  color: var(--green);
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.writing-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.96fr) minmax(340px, 1.04fr);
}

.speaking-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(340px, 1.1fr);
}

.writing-prompt,
.writing-answer {
  min-width: 0;
  min-height: 0;
}

.writing-prompt {
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #f7f9fc;
}

.writing-prompt-inner {
  display: grid;
  gap: 14px;
  padding: 20px;
  line-height: 1.65;
}

.writing-prompt-inner h3 {
  margin: 0;
  font-size: 18px;
}

.writing-prompt-inner p {
  margin: 0;
}

.writing-answer {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #fff;
}

.speaking-answer {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  background: #fff;
}

.speaking-stage {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.speaking-stage,
.speaking-shell,
.speaking-listen-card,
.speaking-roles,
.speaking-role,
.speaking-wave {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: manipulation;
  user-select: none;
}

body.is-speaking-prompt-playing .speaking-shell,
body.is-speaking-prompt-playing .speaking-shell * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  user-select: none;
}

.speaking-interaction-shield {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(255, 255, 255, 0);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  user-select: none;
}

.speaking-countdown {
  font-size: 48px;
  line-height: 1;
  font-weight: 850;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.speaking-roles {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.speaking-role {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.speaking-role.is-active {
  border-color: #9ccfc0;
  background: #f0faf5;
  box-shadow: 0 0 0 3px rgba(22, 129, 93, 0.08);
}

.speaking-role strong,
.speaking-role span {
  display: block;
}

.speaking-role strong {
  font-size: 14px;
  line-height: 1.2;
}

.speaking-role span {
  color: var(--muted);
  font-size: 12px;
}

.mic-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e8eef7;
}

.speaking-role.is-active .mic-icon {
  background: #d9f2e8;
}

.mic-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 5px;
  width: 10px;
  height: 15px;
  border: 2px solid #607089;
  border-radius: 8px;
}

.mic-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 17px;
  width: 14px;
  height: 8px;
  border-bottom: 2px solid #607089;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
}

.speaking-role.is-active .mic-icon::before,
.speaking-role.is-active .mic-icon::after {
  border-color: var(--green);
}

.speaking-wave {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e3eaf4;
}

.wave-bar {
  flex: 1;
  min-width: 3px;
  height: calc(8px + (28px * var(--level, 0.16)));
  border-radius: 999px;
  background: #c5d0df;
  transition: height 0.08s linear, background 0.2s ease;
}

.speaking-role.is-active .wave-bar {
  background: var(--green);
}

.speaking-role.is-active[data-speaking-role="teacher"] .wave-bar {
  animation: meter 0.95s ease-in-out infinite;
}

.speaking-role.is-active[data-speaking-role="teacher"] .wave-bar:nth-child(2n) {
  animation-delay: 0.13s;
}

.speaking-role.is-active[data-speaking-role="teacher"] .wave-bar:nth-child(3n) {
  animation-delay: 0.26s;
}

.speaking-check-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.speaking-part-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.speaking-start-meta {
  align-items: start;
}

.speaking-start-meta .field {
  align-content: start;
}

.speaking-start-meta .input {
  height: 42px;
}

.speaking-part-preview .result-cell {
  min-width: 180px;
  text-align: left;
}

.speaking-question-meta {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.speaking-voice-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: end;
  padding: 16px;
  border: 1px solid #d6e0ec;
  border-left: 4px solid #245fc4;
  border-radius: 8px;
  background: #f8fafc;
}

.speaking-voice-copy {
  display: grid;
  gap: 4px;
}

.speaking-voice-copy strong {
  font-size: 16px;
}

.speaking-voice-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.speaking-voice-kicker {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.speaking-voice-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.speaking-voice-preview {
  min-width: 94px;
}

.speaking-voice-preview span {
  display: inline-flex;
  align-items: center;
}

.speaking-topic-field {
  min-width: 180px;
}

.speaking-prompt-card {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 16px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.speaking-prompt-card.compact {
  padding: 12px;
  gap: 9px;
  background: #fbfcfe;
}

.speaking-audio-prompt {
  background: #f5f8fb;
}

.speaking-listen-card {
  min-height: 320px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  padding: 24px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fff;
}

.speaking-listen-card h3 {
  font-size: 28px;
  line-height: 1.18;
}

.speaking-listen-card p {
  color: var(--muted);
  font-size: 15px;
}

.speaking-listen-flow {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.speaking-listen-flow span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 750;
}

.speaking-listen-flow span.is-active {
  border-color: #9ccfc0;
  background: #eef8f3;
  color: var(--green);
}

.speaking-topic {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.speaking-topic span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.speaking-topic strong {
  font-size: 18px;
}

.speaking-question-text,
.speaking-cue-line,
.speaking-cue-label,
.speaking-cue-closing,
.speaking-cue-lead {
  margin: 0;
  white-space: normal;
}

.speaking-question-text {
  font-size: 19px;
  font-weight: 650;
}

.speaking-cue-lead {
  font-size: 18px;
  font-weight: 780;
}

.speaking-cue-label {
  color: var(--muted);
  font-weight: 700;
}

.speaking-cue-closing {
  font-weight: 780;
}

.speaking-question-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.speaking-question-list li {
  padding-left: 4px;
}

.cue-list {
  gap: 7px;
}

.speaking-prompt-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9fc;
  border: 1px dashed var(--line-strong);
}

.speaking-review-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.speaking-overview-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(190px, 0.55fr);
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.speaking-overview-metric {
  min-width: 0;
  padding: 11px 14px;
}

.speaking-overview-metric + .speaking-overview-metric {
  border-left: 1px solid #dbe4ef;
}

.speaking-overview-metric > span,
.speaking-metric-copy > span {
  color: #59677a;
  font-size: 12px;
  font-weight: 750;
}

.speaking-overview-metric strong {
  margin: 0;
  color: #172033;
  font-size: 23px;
  line-height: 1.1;
}

.speaking-overview-metric strong small {
  color: #59677a;
  font-size: 13px;
  font-weight: 700;
}

.speaking-overview-metric p {
  margin: 0;
  color: #667386;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.speaking-metric-copy {
  display: flex;
  align-items: baseline;
  gap: 9px;
  white-space: nowrap;
}

.speaking-pace-metric {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.speaking-pace-scale {
  min-width: 0;
}

.speaking-pace-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #dfe6ee;
}

.speaking-pace-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #25805d;
}

.speaking-pace-marker {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #196b4c;
  box-shadow: 0 0 0 1px #196b4c;
  transform: translate(-50%, -50%);
}

.speaking-pace-scale.is-empty {
  opacity: 0.55;
}

.speaking-pace-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  color: #7a8798;
  font-size: 11px;
}

.speaking-em-metric {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 9px;
}

.speaking-em-metric code {
  color: #8d2c35;
  font-family: inherit;
  font-weight: 800;
}

.cefr-profile {
  margin-top: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.cefr-profile summary {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(120px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.cefr-profile summary::-webkit-details-marker {
  display: none;
}

.cefr-profile summary > span:first-child {
  display: grid;
  gap: 3px;
}

.cefr-profile summary small {
  color: #667386;
}

.cefr-summary-bar {
  height: 9px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.cefr-segment {
  min-width: 2px;
}

.cefr-profile-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.cefr-level-row {
  display: grid;
  grid-template-columns: 50px 44px 54px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  font-size: 13px;
}

.cefr-level-row p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cefr-excluded-diagnostics {
  margin-top: 4px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.cefr-excluded-diagnostics > summary {
  display: inline-flex;
  width: auto;
  min-height: 0;
  padding: 0;
  color: #526071;
  font-size: 13px;
  font-weight: 700;
}

.cefr-excluded-diagnostics > div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.cefr-excluded-row {
  display: grid;
  grid-template-columns: minmax(88px, auto) auto 1fr;
  align-items: baseline;
  gap: 8px;
  color: #526071;
  font-size: 13px;
}

.cefr-excluded-row p {
  margin: 0;
  overflow-wrap: anywhere;
}

.student-cefr-profile {
  margin-top: 4px;
  border-color: #cfe0e8;
  background: #fff;
  box-shadow: 0 7px 22px rgba(30, 64, 76, 0.06);
}

.student-cefr-profile summary {
  grid-template-columns: minmax(150px, auto) minmax(210px, 1fr);
  min-height: 66px;
  padding: 13px 15px;
}

.student-cefr-profile summary:hover {
  background: #f7fbfc;
}

.student-cefr-summary-copy {
  display: grid;
  gap: 3px;
}

.student-cefr-label {
  color: #173b46;
  font-weight: 800;
}

.student-cefr-summary-visual {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
}

.student-cefr-toggle-label {
  color: #337080;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.student-cefr-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #4d6f78;
  border-bottom: 2px solid #4d6f78;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.student-cefr-profile[open] .student-cefr-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.student-cefr-profile[open] .student-cefr-toggle-label {
  color: #52636a;
  font-size: 0;
}

.student-cefr-profile[open] .student-cefr-toggle-label::after {
  content: "收起";
  font-size: 12px;
}

.student-cefr-profile .cefr-profile-body {
  padding: 2px 15px 15px;
  border-top: 1px solid #edf2f4;
}

.student-cefr-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 4px;
}

.student-cefr-intro strong {
  color: #173b46;
}

.student-cefr-intro span {
  color: var(--muted);
  font-size: 12px;
}

.student-cefr-profile .cefr-level-row {
  padding: 8px 0;
  border-bottom: 1px solid #edf2f4;
}

.student-cefr-profile .cefr-level-empty {
  opacity: 0.48;
}

.student-cefr-profile .student-cefr-disclaimer {
  margin: 5px 0 0;
}

.cefr-level-badge {
  display: inline-flex;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  font-weight: 750;
}

.cefr-a1 { background: #4f7c68; }
.cefr-a2 { background: #43878a; }
.cefr-b1 { background: #4f6fae; }
.cefr-b2 { background: #6a5aa9; }
.cefr-c1 { background: #9a5d73; }
.cefr-c2 { background: #a85643; }
.cefr-other { background: #7b8491; }

@media (max-width: 720px) {
  .speaking-voice-picker {
    grid-template-columns: 1fr;
  }

  .speaking-voice-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cefr-profile summary {
    grid-template-columns: 1fr;
  }

  .cefr-level-row {
    grid-template-columns: 50px 42px 48px minmax(0, 1fr);
  }

  .student-cefr-profile summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .student-cefr-summary-visual {
    grid-template-columns: minmax(100px, 1fr) auto 16px;
  }

  .student-cefr-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

audio {
  width: 100%;
}

.writing-textarea {
  width: 100%;
  height: 100%;
  min-height: 420px;
  padding: 22px;
  border: 0;
  resize: none;
  outline: none;
  line-height: 1.85;
  color: var(--text);
  background: #fff;
  font-size: 16px;
}

.writing-textarea:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.28);
  outline-offset: -3px;
}

.writing-answer-meta {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.writing-tabs,
.writing-task-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.writing-tabs .button {
  box-shadow: none;
}

.writing-task-preview .result-cell {
  display: grid;
  gap: 4px;
  min-width: 150px;
  text-align: left;
  padding: 12px;
}

.writing-image-list {
  display: grid;
  gap: 10px;
}

.writing-review-panel {
  display: grid;
  gap: 16px;
}

.writing-review-panel > .toolbar:first-child {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.review-question-disclosure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-question-disclosure > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  color: var(--text);
  background: #f8fafc;
  cursor: pointer;
  font-weight: 760;
  list-style: none;
}

.review-question-disclosure > summary::-webkit-details-marker {
  display: none;
}

.review-question-disclosure > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
}

.review-question-disclosure[open] > summary::after {
  content: "−";
}

.review-question-disclosure > summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.review-question-disclosure > .review-task-block {
  padding: 14px;
}

.review-question-disclosure .practice-task-block {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.review-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.review-footer-actions > span {
  color: var(--muted);
  font-size: 13px;
}

.review-save-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.review-save-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  content: "";
}

.review-save-status.saving::before,
.review-save-status.pending::before {
  background: #d28a17;
}

.review-save-status.saved::before,
.review-save-status.committed::before {
  background: #17845e;
}

.review-save-status.local::before,
.review-save-status.offline::before,
.review-save-status.auth::before,
.review-save-status.reauth::before {
  background: #b86a12;
}

.review-save-status.conflict {
  color: #9f1239;
  border-color: #fecdd3;
  background: #fff1f2;
}

.review-save-status.conflict::before {
  background: #be123c;
}

.review-sync-conflict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 13px 14px;
  border: 1px solid #f2c36b;
  border-radius: 8px;
  background: #fff9e9;
  box-shadow: 0 8px 24px rgb(90 60 10 / 8%);
}

.review-sync-conflict > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.review-sync-conflict strong {
  color: #7a4b05;
  font-size: 14px;
}

.review-sync-conflict span {
  color: #795f30;
  font-size: 13px;
  line-height: 1.5;
}

.standalone-review-shell > .panel-footer {
  border-top: 0;
}

.review-editor-grid,
.review-task-block,
.review-edit,
.review-original {
  display: grid;
  gap: 12px;
}

.review-task-columns {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  gap: 16px;
  align-items: start;
}

.review-task-single {
  display: grid;
  gap: 14px;
}

.practice-task-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-task-prompt {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.review-task-prompt p {
  margin: 0;
}

.practice-answer-card,
.practice-review-card {
  align-content: start;
}

.practice-answer-list {
  display: grid;
  gap: 8px;
}

.practice-field-review {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.practice-field-heading {
  align-items: center;
}

.practice-field-title {
  color: var(--muted);
  font-size: 13px;
}

.practice-review-row {
  display: grid;
  gap: 6px;
}

.practice-review-row > strong,
.practice-review-row > label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.practice-review-row p {
  margin: 0;
  white-space: pre-wrap;
}

.objective-option-list {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.practice-confirm-missing {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.practice-result-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 750;
  color: #172033;
  background: #f8fafc;
}

.practice-result-correct {
  border-color: #a7f3d0;
  color: #047857;
  background: #ecfdf5;
}

.practice-result-wrong {
  border-color: #fecaca;
  color: #b42318;
  background: #fff1f2;
}

.practice-result-needs_review {
  border-color: #fde68a;
  color: #92400e;
  background: #fffbeb;
}

.practice-result-review-note p + p {
  margin-top: 8px;
}

.review-original,
.review-edit,
.dimension-editor {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.dimension-editor {
  background: #fff;
  border-left: 3px solid var(--primary);
}

.dimension-editor h4,
.dimension-editor h5 {
  margin: 0 0 10px;
  font-size: 15px;
}

.dimension-editor p {
  margin: 0 0 8px;
  line-height: 1.6;
}

.scoring-summary {
  display: grid;
  gap: 5px;
  border-color: #d9e5f7;
  background: #f5f8fd;
}

.compact-textarea {
  min-height: 56px;
}

.annotation-toolbar {
  justify-content: flex-end;
}

.revision-textarea,
.teacher-marked-answer {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.82;
  overflow-wrap: anywhere;
}

.revision-textarea {
  min-height: 96px;
  resize: vertical;
}

.teacher-marked-answer {
  min-height: 0;
}

.revision-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.teacher-marked-answer p {
  margin: 0 0 12px;
}

.teacher-marked-answer p:last-child {
  margin-bottom: 0;
}

.revision-preview {
  background: #fffdfb;
  border-color: #f0d7c7;
}

.teacher-mark {
  color: var(--red);
  font-weight: 750;
}

.teacher-deleted {
  color: var(--red);
  font-weight: 750;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.paragraph-review-list {
  display: grid;
  gap: 12px;
}

.paragraph-review-item,
.marked-paragraph-group {
  display: grid;
  gap: 10px;
}

.writing-paragraph-result {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.writing-paragraph-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.writing-paragraph-result-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.writing-version-toggle {
  flex: 0 0 auto;
}

.writing-version-panel[data-writing-version="clean"] {
  color: var(--text);
  background: #fff;
}

.paragraph-review-header label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.paragraph-comment-editor {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.teacher-note {
  padding: 12px;
  border: 1px solid #efc8c8;
  border-radius: 8px;
  background: #fff7f7;
  color: #70252d;
}

.teacher-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.teacher-note p {
  margin: 0;
  white-space: pre-wrap;
}

.speaking-dimension-note {
  border-color: var(--line);
  background: #fff;
  color: #172033;
}

.speaking-dimension-note strong {
  color: #111827;
  font-size: 13px;
}

.speaking-dimension-note p {
  color: #263244;
  font-size: 14px;
  line-height: 1.65;
}

.speaking-comment-note {
  padding: 14px 14px 14px 16px;
  border-color: #f2c781;
  border-left: 4px solid #d98218;
  background: #fff8ec;
  color: #57370d;
}

.speaking-comment-note strong {
  color: #8a4f08;
  font-size: 15px;
}

.speaking-comment-note p {
  color: #4d310c;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.75;
}

.writing-reference-note {
  display: grid;
  gap: 12px;
  border-color: #c7d2fe;
  border-left: 4px solid #3858d6;
  background: #f7f8ff;
  color: #172033;
}

.writing-reference-note > strong {
  color: #111827;
  font-size: 14px;
}

.feedback-section {
  display: grid;
  gap: 6px;
}

.feedback-section b {
  color: #273f8f;
  font-size: 13px;
}

.feedback-section p {
  color: #263244;
  font-size: 14px;
  line-height: 1.65;
}

.feedback-section span {
  font-weight: 650;
}

.proofreading-feedback-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.proofreading-feedback-panel > .toolbar > strong {
  color: #102a2a;
  font-size: 15px;
}

.proofreading-feedback-panel-nested {
  margin-top: 4px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #cbd5e1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.proofreading-feedback-group {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #dbe4ea;
}

.proofreading-feedback-heading > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.proofreading-feedback-heading strong {
  color: #17383a;
  font-size: 14px;
}

.proofreading-correction-list {
  display: grid;
  gap: 10px;
}

.proofreading-correction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.proofreading-correction-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.proofreading-correction-row label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.proofreading-arrow {
  align-self: center;
  padding-top: 18px;
  color: #0f766e;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.proofreading-empty {
  margin: 0;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.writing-proofreading-note {
  display: grid;
  gap: 14px;
  border-color: #b8d8d2;
  border-left: 4px solid #0f766e;
  background: #f5fbfa;
  color: #17383a;
}

.writing-proofreading-note > strong {
  color: #102a2a;
  font-size: 14px;
}

.proofreading-result-section {
  display: grid;
  gap: 8px;
}

.proofreading-result-section b {
  color: #0f5f59;
  font-size: 13px;
}

.proofreading-result-section ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proofreading-result-section li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #d8e9e6;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.proofreading-result-section li:last-child {
  border-bottom: 0;
}

.proofreading-original {
  color: #8d2c35;
  font-weight: 650;
  text-decoration: none;
}

.proofreading-result-arrow {
  color: #0f766e;
  font-weight: 800;
  text-align: center;
}

.proofreading-correction {
  color: #14532d;
  font-weight: 700;
}

.speaking-overall-note {
  padding: 18px 18px 18px 20px;
  border-color: #b7d6ff;
  border-left: 5px solid var(--primary);
  background: #eff6ff;
  color: #12365f;
  box-shadow: 0 10px 24px rgba(36, 95, 196, 0.1);
}

.speaking-overall-note strong {
  color: #0f3d74;
  font-size: 18px;
}

.speaking-overall-note p {
  color: #183b63;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.8;
}

.ai-reference-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
}

.ai-reference-task .review-edit {
  background: #fff;
}

.result-link-input {
  width: min(320px, 100%);
}

.hidden {
  display: none !important;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes meter {
  0%,
  100% {
    height: 10px;
  }

  50% {
    height: 34px;
  }
}

@media (max-width: 760px) {
  .proofreading-correction-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .proofreading-correction-row .proofreading-arrow {
    display: none;
  }

  .proofreading-correction-row .button {
    justify-self: start;
  }

  .review-question-disclosure > summary,
  .review-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .review-save-status {
    max-width: 148px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .review-sync-conflict {
    align-items: stretch;
    flex-direction: column;
  }

  .review-sync-conflict .toolbar {
    width: 100%;
  }

  .review-sync-conflict .button {
    flex: 1;
  }

  .review-question-disclosure > summary small {
    margin-left: 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .container {
    width: min(100% - 24px, 1180px);
    margin-top: 16px;
  }

  .panel-header,
  .panel-body,
  .panel-footer {
    padding: 16px;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 92px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .file-dropzone {
    min-height: 142px;
    padding: 18px;
  }

  .ai-part-options,
  .ai-generator-settings,
  .ai-generator-tabs {
    grid-template-columns: 1fr;
  }

  .ai-generator-tabs {
    padding: 14px 16px 0;
  }

  .part1-topic-inputs {
    grid-template-columns: 1fr;
  }

  .ai-topic-setting + .ai-topic-setting {
    padding-top: 16px;
  }

  .ai-part-option {
    min-height: 60px;
  }

  .ai-generator-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-generator-actions .button {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .options-grid {
    grid-template-columns: 1fr;
  }

  .question-meta {
    grid-template-columns: 1fr 1fr;
  }

  .question-meta .wide,
  .question-meta .row-action {
    grid-column: 1 / -1;
  }

  .link-box {
    grid-template-columns: 1fr;
  }

  .assignment-lifecycle-settings {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .records-table {
    min-width: 0;
  }

  .records-table thead {
    display: none;
  }

  .records-table,
  .records-table tbody,
  .records-table tr,
  .records-table td {
    display: block;
    width: 100%;
  }

  .records-table tbody {
    display: grid;
    gap: 12px;
  }

  .records-table tr {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .records-table td {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
  }

  .records-table td:last-child {
    border-bottom: 0;
  }

  .records-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .records-table td[colspan] {
    display: block;
    padding: 16px;
    border-bottom: 0;
  }

  .records-table td[colspan]::before,
  .records-table .select-column::before {
    content: "";
  }

  .records-table .select-column {
    display: block;
    width: 100%;
    text-align: left;
  }

  .records-table .record-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .submission-table {
    min-width: 0;
  }

  .submission-table thead {
    display: none;
  }

  .submission-table,
  .submission-table tbody,
  .submission-table tr,
  .submission-table td {
    display: block;
    width: 100%;
  }

  .submission-table tr {
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
  }

  .submission-table tr:last-child {
    border-bottom: 0;
  }

  .submission-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  .submission-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .submission-table td[colspan] {
    display: block;
    padding: 16px 0;
  }

  .submission-table td[colspan]::before {
    content: "";
  }

  .submission-table .submission-action-list {
    grid-column: 2;
    align-items: center;
    justify-content: flex-start;
  }

  .writing-shell {
    min-height: calc(100vh - 130px);
  }

  .writing-header,
  .writing-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .writing-timer {
    width: 100%;
  }

  .writing-main,
  .speaking-main,
  .review-task-columns,
  .speaking-review-grid,
  .learn-summary,
  .learn-passport-grid,
  .learn-auth-grid {
    grid-template-columns: 1fr;
  }

  .speaking-overview-metrics {
    grid-template-columns: minmax(0, 1.25fr) minmax(112px, 0.75fr);
  }

  .speaking-overview-metric {
    padding: 11px 12px;
  }

  .speaking-pace-metric,
  .speaking-em-metric {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 6px;
  }

  .speaking-overview-metric p {
    font-size: 11px;
    white-space: normal;
  }

  .learn-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learn-summary-archive {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learn-class-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .learn-history-head,
  .learn-passport-head,
  .learn-next-head,
  .learn-next-item,
  .learn-resume-head,
  .learn-resume-card,
  .learn-review-head,
  .learn-review-card,
  .learn-section-head,
  .learn-history-row,
  .learn-claim-head,
  .learn-claim-row,
  .learn-review-meta,
  .learn-resume-meta,
  .learn-history-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .learn-resume-meta {
    gap: 8px;
  }

  .learn-segmented-filter {
    width: 100%;
  }

  .learn-history-toolbar {
    grid-template-columns: 1fr;
  }

  .learn-history-actions {
    justify-content: stretch;
  }

  .learn-history-actions .button {
    width: 100%;
  }

  .learn-history-focus {
    grid-template-columns: 1fr;
  }

  .learn-history-meta {
    gap: 8px;
  }

  .learn-claim-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .writing-prompt {
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .writing-textarea {
    min-height: 360px;
    padding: 18px;
  }

  .speaking-shell {
    min-height: calc(100vh - 130px);
  }

  .speaking-answer {
    min-height: 280px;
    padding: 18px;
  }

  .speaking-countdown {
    font-size: 38px;
  }

  .speaking-roles {
    grid-template-columns: 1fr;
  }

  .speaking-question-meta {
    grid-template-columns: 1fr 1fr;
  }

  .button {
    width: 100%;
  }

  .topbar-actions .button,
  .learn-dashboard > .panel-header .button,
  .monitor-trigger,
  .monitor-drawer .button,
  .writing-version-toggle,
  .learn-class-tabs > button,
  .learn-class-tabs > .learn-join-anchor > .learn-join-trigger,
  .learn-segmented-filter button,
  .learn-history-meta .button {
    width: auto;
  }

  .learn-assignment-grid {
    grid-template-columns: 1fr;
  }

  .learn-next-list {
    grid-template-columns: 1fr;
  }

  .monitor-drawer {
    width: min(100vw, 420px);
  }

  .monitor-drawer-header,
  .monitor-drawer-tools {
    padding: 16px;
  }

  .monitor-drawer-tools {
    grid-template-columns: 1fr;
  }

  .monitor-drawer .monitor-search {
    width: 100%;
  }

  .monitor-drawer .monitor-item {
    display: grid;
  }

  .monitor-drawer .monitor-meta {
    justify-items: start;
  }

  .result-score {
    font-size: 38px;
  }

  .record-actions,
  .question-title-row,
  .field label:has(.answer-feedback) {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .learn-topbar {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .learn-primary-nav {
    justify-self: center;
  }

  .learn-primary-nav a {
    padding-right: 11px;
    padding-left: 11px;
  }

  .learn-account-menu-trigger {
    max-width: 210px;
  }

  .learn-auth-stage {
    grid-template-columns: minmax(0, 0.78fr) minmax(410px, 1.22fr);
  }

  .learn-auth-visual-copy strong {
    font-size: 34px;
  }
}

@media (max-width: 760px) {
  .learn-auth-stage {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .learn-auth-visual {
    height: auto;
    min-height: 188px;
    background-image: linear-gradient(rgba(5, 10, 15, 0.38), rgba(5, 10, 15, 0.76)), url("/assets/welcome/campus-threshold-960.webp");
    background-position: center 42%;
  }

  .learn-auth-visual-shade {
    display: none;
  }

  .learn-auth-brand {
    top: 24px;
    left: 20px;
  }

  .learn-auth-brand img {
    width: 34px;
    height: 40px;
  }

  .learn-auth-brand strong {
    font-size: 16px;
  }

  .learn-auth-brand small {
    font-size: 10px;
  }

  .learn-auth-visual-copy {
    right: 20px;
    bottom: 23px;
    left: 20px;
  }

  .learn-auth-visual-copy strong {
    font-size: 24px;
  }

  .learn-auth-visual-copy p {
    display: none;
  }

  .learn-auth-pane {
    height: auto;
    min-height: calc(100vh - 188px);
    overflow: visible;
    padding: 64px 20px 34px;
  }

  .learn-auth-back {
    top: 22px;
    left: 20px;
  }

  .learn-auth-card {
    gap: 17px;
  }

  .learn-auth-heading h1 {
    font-size: 30px;
  }

  .learn-auth-heading p {
    font-size: 14px;
  }

  .learn-auth-switch button {
    min-height: 44px;
    padding: 0 8px;
    font-size: 13px;
  }

  .learn-auth-field-pair {
    grid-template-columns: 1fr;
  }

  .learn-page:not(.learn-auth-active) .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 8px 14px;
    backdrop-filter: none;
  }

  .learn-page:not(.learn-auth-active) .topbar-actions {
    width: auto;
  }

  .learn-page:not(.learn-auth-active) .app-shell {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .learn-page:not(.learn-auth-active) .learn-container {
    width: min(100% - 24px, 1040px);
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .learn-topbar-brand .brand-logo {
    width: 29px;
    height: 34px;
  }

  .learn-topbar-brand .brand-title {
    font-size: 15px;
  }

  .learn-page:not(.learn-auth-active) .brand-subtitle {
    display: none;
  }

  .learn-primary-nav {
    position: fixed;
    z-index: 900;
    inset: auto 0 0;
    width: 100%;
    height: auto;
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #dbe1e9;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 28px rgba(16, 24, 35, 0.09);
    backdrop-filter: blur(18px);
  }

  .learn-primary-nav a {
    min-height: 46px;
    padding: 0 4px;
    border-radius: 7px;
    font-size: 12px;
  }

  .learn-primary-nav a:active {
    color: #254fc8;
    background: #edf2ff;
  }

  .learn-account-menu-trigger {
    min-height: 44px;
    grid-template-columns: auto auto auto;
    padding-right: 7px;
  }

  .learn-refresh-button {
    min-width: 54px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .learn-account-trigger-copy {
    display: none;
  }

  .learn-account-dropdown {
    position: fixed;
    top: 58px;
    right: 8px;
  }

  .learn-email-nudge {
    top: 66px;
  }

  .learn-overview-head {
    align-items: stretch;
  }

  .learn-overview-head h2 {
    font-size: 24px;
  }

  .learn-overview-head .button {
    align-self: end;
    width: auto;
  }

  .learn-summary {
    padding: 15px;
  }
}
.publication-check-body {
  gap: 16px;
}

.publication-version-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #dbe2ea;
  background: #f8fafc;
}

.publication-version-strip > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #dbe2ea;
}

.publication-version-strip > div:last-child {
  border-right: 0;
}

.publication-check-success {
  color: #137a4a;
}

.publication-check-warn {
  color: #9a5d00;
}

.publication-check-error {
  color: #b42318;
}

.publication-issue-group {
  border: 1px solid #dbe2ea;
  border-left-width: 4px;
  padding: 14px 16px;
  background: #fff;
}

.publication-issue-group.blocker {
  border-left-color: #d92d20;
  background: #fff8f7;
}

.publication-issue-group.warning {
  border-left-color: #d89000;
  background: #fffbeb;
}

.publication-issue-heading,
.publication-check-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.publication-issue-heading span {
  color: #667085;
  font-size: 13px;
}

.publication-issue-group ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.publication-issue-group li span,
.publication-issue-group li small {
  display: block;
}

.publication-issue-group li small {
  margin-top: 3px;
  color: #667085;
}

.publication-ready-notice {
  margin: 0;
}

.publication-check-actions {
  padding-top: 4px;
}

.publication-check-actions p {
  max-width: 760px;
  margin: 0;
}

.task1-bank-source-controls {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #d6e4df;
  border-radius: 12px;
  background: #f7fbf9;
}

.task1-bank-source-controls .compact-field {
  width: min(360px, 100%);
  margin: 0;
}

.task1-bank-source-controls a {
  margin-left: 8px;
  color: var(--primary);
}

@media (max-width: 720px) {
  .publication-version-strip {
    grid-template-columns: 1fr;
  }

  .publication-version-strip > div {
    border-right: 0;
    border-bottom: 1px solid #dbe2ea;
  }

  .publication-version-strip > div:last-child {
    border-bottom: 0;
  }

  .publication-check-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .task1-bank-source-controls .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
