:root {
  --xf-red: #D71920;
  --xf-red-dark: #B51218;
  --xf-red-soft: #FFF1F1;
  --xf-red-light: var(--xf-red-soft);
  --xf-bg: #FFF8F7;
  --xf-card: #FFFFFF;
  --xf-text: #161616;
  --xf-muted: #6B7280;
  --xf-border: #F1D7D7;
  --xf-line: #F5E2E2;
  --xf-radius-xl: 28px;
  --xf-radius-lg: 22px;
  --xf-radius-md: 16px;
  --radius-lg: var(--xf-radius-lg);
  --radius-md: var(--xf-radius-md);
  --xf-shadow-card: 0 12px 32px rgba(120, 20, 20, 0.08);
  --xf-shadow-button: 0 8px 20px rgba(215, 25, 32, 0.22);
  --shadow-sm: var(--xf-shadow-card);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.10);
  --xf-success: #16803c;
  --xf-warning: #B51218;
  --xf-danger: #dc2626;
  --shadow: var(--shadow-sm);
  color: var(--xf-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.08), rgba(255, 248, 247, 0) 40%),
    var(--xf-bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--xf-red-light);
  color: var(--xf-red-dark);
}

.app {
  min-height: 100vh;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  position: relative;
}

.brand-header,
.test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.brand-header {
  justify-content: flex-start;
}

.brand-mark,
.brand-compact span {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--xf-red);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(215, 25, 32, 0.26);
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
}

.brand-subtitle,
.eyebrow,
.panel p,
.validation-card span,
.hint {
  color: var(--xf-muted);
}

.hero-card,
.panel,
.question-card,
.result-card,
.report-panel,
.action-panel,
.review-panel,
.dev-panel {
  border: 1px solid var(--xf-border);
  border-radius: 24px;
  background: var(--xf-card);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: stretch;
  padding: 30px;
  margin-bottom: 22px;
}

.hero-copy h1,
.question-head h1,
.result-card h1 {
  margin: 6px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p,
.result-card p {
  max-width: 680px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  font-weight: 800;
  color: var(--xf-red);
}

.validation-card {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--xf-border);
}

.validation-card.ok {
  border-color: var(--xf-border);
  background: #fff;
}

.validation-card.blocked {
  background: var(--xf-red-light);
}

.validation-card a {
  color: var(--xf-red-dark);
  font-weight: 800;
  text-decoration: none;
}

.main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
}

.panel,
.report-panel {
  padding: 24px;
}

.panel h2,
.report-panel h2,
.dev-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.grade-grid,
.paper-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

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

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

.choice,
.option {
  min-height: 52px;
  border: 1px solid #ead9d9;
  border-radius: 16px;
  background: #fff;
  color: var(--xf-text);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.choice:hover,
.option:hover {
  transform: translateY(-1px);
  border-color: rgba(215, 25, 32, 0.55);
}

.choice.selected,
.option.selected {
  border-color: var(--xf-red);
  background: var(--xf-red-light);
  color: var(--xf-red-dark);
}

.action-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  padding: 18px;
}

.review-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 22px 24px;
  border-color: rgba(215, 25, 32, 0.24);
  background: linear-gradient(180deg, #fff, #fffafa);
}

.review-panel h2 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.review-panel p {
  margin: 0;
  color: var(--xf-muted);
  line-height: 1.65;
}

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

.review-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--xf-border);
  border-radius: 14px;
  background: #fff;
  color: var(--xf-red-dark);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.primary,
.secondary,
.ghost {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 900;
}

.primary {
  color: #fff;
  background: var(--xf-red);
}

.primary:hover {
  background: var(--xf-red-dark);
}

.secondary {
  color: var(--xf-red-dark);
  background: var(--xf-red-light);
}

.ghost {
  color: #374151;
  background: #f3f4f6;
}

.small {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
}

.resume-warning {
  display: grid;
  gap: 4px;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--xf-border);
  border-radius: 14px;
  background: #fff;
  color: var(--xf-muted);
  font-size: 14px;
}

.resume-warning strong {
  color: var(--xf-red-dark);
}

.home-runtime-alert {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(215, 25, 32, 0.16);
  border-radius: 16px;
  background: rgba(255, 241, 241, 0.48);
  color: var(--xf-muted);
  line-height: 1.55;
}

.home-runtime-alert strong {
  color: var(--xf-text);
  font-size: 14px;
}

.home-runtime-alert span {
  font-size: 14px;
}

.home-runtime-alert.blocked {
  border-color: rgba(215, 25, 32, 0.24);
  background: rgba(255, 241, 241, 0.72);
}

.home-runtime-alert.blocked strong {
  color: var(--xf-red-dark);
}

.home-runtime-alert.muted {
  border-color: rgba(107, 114, 128, 0.16);
  background: rgba(255, 255, 255, 0.72);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.report-panel {
  margin-top: 22px;
}

.report-panel ul {
  margin: 10px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.watermark {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--xf-red-dark);
  background: var(--xf-red-light);
  border: 1px solid var(--xf-border);
  font-weight: 900;
  text-align: center;
}

.test-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.test-header {
  grid-column: 1 / -1;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.brand-compact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-compact span {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip,
.paper-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #6b7280;
  background: #f3f4f6;
  font-weight: 800;
}

.skill-chip.active {
  color: #fff;
  background: var(--xf-red);
}

.skill-chip.done {
  color: var(--xf-red-dark);
  background: var(--xf-red-light);
}

.paper-pill {
  color: var(--xf-red-dark);
  background: var(--xf-red-light);
}

.top-progress {
  flex-basis: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3e8e8;
}

.top-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--xf-red);
  transition: width 180ms ease;
}

.question-card {
  padding: 28px;
  min-height: 560px;
}

.question-head {
  margin-bottom: 18px;
}

.question-head h1 {
  font-size: clamp(26px, 3.4vw, 38px);
}

.passage {
  max-height: 320px;
  overflow: auto;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--xf-border);
  border-radius: 18px;
  background: #fffafa;
  line-height: 1.8;
  white-space: normal;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.media-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--xf-border);
  border-radius: 18px;
  background: #fffdfd;
}

.media-box audio,
.option audio {
  width: 100%;
}

.audio-player {
  display: grid;
  gap: 6px;
}

.image-preview {
  padding: 0;
  border-radius: 14px;
  background: #fff;
}

.image-preview img,
.option-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
  border-radius: 14px;
}

.option-image-wrap {
  position: relative;
  display: block;
}

.option-preview-chip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(22, 22, 22, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.option-preview-chip:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.35);
  outline-offset: 2px;
}

.media-status {
  color: var(--xf-muted);
  font-size: 13px;
  font-weight: 800;
}

.media-status.error {
  color: var(--xf-danger);
}

.option-image-status {
  display: block;
  margin-top: 6px;
}

.asset-error {
  margin: 0;
  color: var(--xf-danger);
  font-weight: 800;
}

.prompt {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.45;
  font-weight: 900;
}

.options {
  display: grid;
  gap: 12px;
}

.image-options {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  text-align: left;
  font-size: 18px;
}

.option-letter {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid #efc6c8;
  border-radius: 50%;
  color: var(--xf-red);
  background: #fff;
  font-weight: 900;
}

.option.selected .option-letter {
  color: #fff;
  background: var(--xf-red);
  border-color: var(--xf-red);
}

.option:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.22);
  outline-offset: 2px;
}

.option-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.option-select-action {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--xf-red-dark);
  background: var(--xf-red-light);
  font-size: 14px;
  font-weight: 900;
}

.fill-area,
.ordering-area,
.speaking-area {
  display: grid;
  gap: 14px;
}

.text-answer,
.speaking-area input,
.speaking-area textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #ead9d9;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  background: #fff;
}

.text-answer:focus,
.speaking-area input:focus,
.speaking-area textarea:focus {
  border-color: var(--xf-red);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.08);
}

.word-bank,
.ordered,
.record-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.word {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ead9d9;
  font-weight: 800;
}

.selected-word {
  background: var(--xf-red-light);
  border-color: var(--xf-red);
  color: var(--xf-red-dark);
}

.teacher-box {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.student-speaking-note {
  display: grid;
  gap: 10px;
  align-items: start;
  margin-top: 8px;
  padding: 16px;
  border-radius: 18px;
  background: var(--xf-red-light);
  border: 1px solid var(--xf-border);
}

.student-speaking-note strong {
  color: var(--xf-red-dark);
}

.student-speaking-note span {
  color: var(--xf-muted);
  line-height: 1.6;
}

.student-speaking-note span.error {
  color: var(--xf-red-dark);
  font-weight: 800;
}

.student-speaking-note.unsupported {
  background: #fff;
  border-color: rgba(177, 18, 24, 0.18);
}

.student-speaking-note .browser-open-tip {
  display: block;
  color: var(--xf-red-dark);
  font-weight: 700;
}

.speaking-unavailable-action {
  justify-self: start;
  border-color: var(--xf-border);
  background: #fff;
  color: var(--xf-red-dark);
}

.speaking-unavailable-action:hover {
  background: var(--xf-red-soft);
}

.teacher-box h2 {
  margin: 0;
}

.teacher-box label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-weight: 800;
}

.teacher-box textarea {
  min-height: 90px;
  resize: vertical;
}

.reference {
  margin: 0;
  color: #374151;
  font-weight: 800;
}

.question-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.dev-panel {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 16px;
}

.dev-panel dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  font-size: 13px;
}

.dev-panel dt {
  color: var(--xf-muted);
}

.dev-panel dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.dev-panel pre,
.session-json {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
}

.result-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-bottom: 22px;
}

.score-circle {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  color: #fff;
  background: var(--xf-red);
  box-shadow: 0 18px 36px rgba(215, 25, 32, 0.24);
}

.score-circle strong {
  font-size: 26px;
}

.score-circle span {
  font-weight: 900;
}

.bars {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.bar-row {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--xf-border);
  border-radius: 18px;
  background: #fffdfd;
  font-weight: 800;
}

.bar-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.bar-title strong {
  color: var(--xf-red-dark);
}

.bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3e8e8;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--xf-red);
}

.bar-row p {
  margin: 0;
  color: var(--xf-muted);
  font-weight: 600;
  line-height: 1.65;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.score-breakdown > div {
  padding: 22px;
  border: 1px solid var(--xf-border);
  border-radius: 24px;
  background: var(--xf-card);
  box-shadow: var(--shadow);
}

.score-breakdown h2 {
  margin: 0 0 8px;
}

.score-breakdown p {
  margin: 0;
  color: #374151;
  line-height: 1.7;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(22, 22, 22, 0.42);
}

.modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  position: relative;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  font-size: 22px;
}

.modal-body {
  line-height: 1.7;
}

.modal-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.poster-share {
  display: grid;
  gap: 14px;
}

.poster-share-copy,
.poster-share-status {
  margin: 0;
  color: var(--xf-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.poster-preview {
  width: min(100%, 360px);
  justify-self: center;
  max-height: min(58vh, 640px);
  object-fit: contain;
  border: 1px solid var(--xf-line);
  border-radius: 20px;
  background: #fff8f7;
  box-shadow: 0 14px 38px rgba(120, 20, 20, 0.12);
}

.poster-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.poster-actions .primary,
.poster-actions .ghost {
  width: 100%;
  min-height: 50px;
}

@media (max-width: 520px) {
  .poster-actions {
    grid-template-columns: 1fr;
  }
}

@media print {
  .action-panel,
  .dev-panel,
  .watermark {
    display: none;
  }

  body {
    background: #fff;
  }

  .shell {
    width: 100%;
  }
}

/* H5 result report V2: mirrors the mini-program report hierarchy. */
.od-result-page {
  width: min(860px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 54px;
  color: #082b5c;
}

.od-result-topbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  margin-bottom: 12px;
}
.od-result-topbar > strong { color: #111827; font-size: 20px; text-align: center; }
.od-result-back {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #172033;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.od-report-cover {
  overflow: hidden;
  border: 1px solid #dbe6f5;
  border-radius: 26px;
  padding: 30px 34px 34px;
  background:
    radial-gradient(circle at 77% 25%, rgba(70, 137, 255, .11), transparent 30%),
    linear-gradient(145deg, #fff 10%, #f7faff 100%);
  box-shadow: 0 20px 58px rgba(20, 55, 102, .08);
}

.od-report-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.od-report-brand { display: flex; align-items: center; gap: 15px; }
.od-report-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: #082b5c;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 800;
}
.od-report-brand strong,
.od-report-brand small { display: block; }
.od-report-brand strong { font-family: Georgia, "Songti SC", serif; font-size: 25px; }
.od-report-brand small { margin-top: 5px; color: #7488a8; font-size: 10px; font-weight: 800; letter-spacing: .18em; }

.od-report-meta {
  min-width: 205px;
  margin: 0;
  padding-left: 25px;
  border-left: 1px solid #d6e4f7;
}
.od-report-meta div + div { margin-top: 13px; }
.od-report-meta dt { color: #8797ad; font-size: 10px; letter-spacing: .12em; }
.od-report-meta dd { margin: 4px 0 0; color: #647893; font-size: 13px; }

.od-report-hero {
  position: relative;
  min-height: 320px;
  margin-top: 24px;
  padding: 46px 0 30px;
}
.od-report-hero h1 { position: relative; z-index: 2; max-width: 58%; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(29px, 4.6vw, 46px); line-height: 1.25; }
.od-report-level { position: relative; z-index: 2; display: flex; align-items: baseline; margin-top: 32px; font-family: Georgia, "Times New Roman", serif; }
.od-report-level span { font-size: clamp(64px, 9vw, 94px); line-height: .95; }
.od-report-level strong { margin-left: 14px; color: #0a67f5; font-size: clamp(80px, 11vw, 112px); line-height: .8; }
.od-report-score { position: relative; z-index: 2; display: flex; align-items: baseline; margin-top: 33px; }
.od-report-score strong { color: #0a67f5; font-family: Georgia, "Times New Roman", serif; font-size: 60px; line-height: 1; }
.od-report-score span { margin-left: 12px; color: #8090a8; font-size: 20px; }
.od-report-excluded { position: relative; z-index: 2; margin: 12px 0 0; color: #7b8ca4; font-size: 13px; }

.od-report-book {
  position: absolute;
  z-index: 1;
  right: -40px;
  top: 55px;
  width: 390px;
  height: 230px;
  opacity: .82;
  transform: rotate(-3deg);
}
.od-report-book::before,
.od-report-book::after {
  content: "";
  position: absolute;
  bottom: 30px;
  width: 50%;
  height: 150px;
  border: 1px solid #87b2f6;
  background: linear-gradient(155deg, rgba(255,255,255,.96), rgba(178,210,255,.46));
  box-shadow: 0 16px 35px rgba(48, 104, 190, .13);
}
.od-report-book::before { left: 0; border-radius: 80% 10px 10px 16px; transform: skewY(11deg); }
.od-report-book::after { right: 0; border-radius: 10px 80% 16px 10px; transform: skewY(-11deg); }
.od-report-book span { position: absolute; z-index: 3; left: 50%; bottom: 13px; width: 2px; height: 165px; background: #74aaf8; transform: translateX(-50%); }
.od-report-book i,
.od-report-book b { position: absolute; z-index: 2; right: -90px; top: -45px; width: 310px; height: 310px; border: 1px solid rgba(55,126,244,.28); border-radius: 50%; }
.od-report-book b { right: -52px; top: -6px; width: 235px; height: 235px; border-style: dashed; }

.od-report-alignment { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; }
.od-report-alignment span { padding: 8px 13px; border-radius: 999px; background: #eaf2ff; color: #1c579d; font-size: 13px; font-weight: 700; }

.od-report-section-title { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin: 38px 0 16px; font-size: 22px; }
.od-report-section-title i { height: 1px; background: linear-gradient(90deg, transparent, #4389f7); }
.od-report-section-title i:last-child { background: linear-gradient(90deg, #4389f7, transparent); }

.od-radar-stage { position: relative; width: min(620px, 100%); height: 410px; margin: 0 auto; }
.od-radar-chart { position: absolute; left: 50%; top: 50%; width: 270px; height: 270px; transform: translate(-50%, -46%); }
.od-radar-ring,
.od-radar-spoke { position: absolute; inset: 0; }
.od-radar-ring { border: 1px solid #b9d5ff; clip-path: polygon(50% 0, 97.5% 34.5%, 79.5% 90.5%, 20.5% 90.5%, 2.5% 34.5%); }
.od-radar-ring.middle { inset: 18%; }
.od-radar-ring.inner { inset: 36%; }
.od-radar-spoke { left: 50%; top: 50%; width: 1px; height: 50%; background: #c9ddfb; transform-origin: 50% 0; }
.od-radar-spoke.spoke-0 { transform: rotate(180deg); }
.od-radar-spoke.spoke-1 { transform: rotate(252deg); }
.od-radar-spoke.spoke-2 { transform: rotate(324deg); }
.od-radar-spoke.spoke-3 { transform: rotate(36deg); }
.od-radar-spoke.spoke-4 { transform: rotate(108deg); }
.od-radar-shape { position: absolute; inset: 0; background: rgba(24, 112, 249, .34); }
.od-radar-dot { position: absolute; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #0a67f5; box-shadow: 0 0 0 1px #0a67f5; transform: translate(-50%, -50%); }
.od-radar-caption { position: absolute; display: flex; align-items: center; gap: 8px; }
.od-radar-caption > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #cfe0fa; border-radius: 50%; background: #f2f7ff; color: #174d93; font-weight: 800; }
.od-radar-caption strong,
.od-radar-caption small { display: block; }
.od-radar-caption strong { font-size: 15px; }
.od-radar-caption small { margin-top: 2px; color: #0a67f5; font-family: Georgia, serif; font-size: 24px; }
.od-radar-caption.caption-listening { left: 50%; top: 6px; transform: translateX(-50%); }
.od-radar-caption.caption-grammar { right: 10px; top: 126px; }
.od-radar-caption.caption-reading { right: 72px; bottom: 12px; }
.od-radar-caption.caption-speaking { left: 72px; bottom: 12px; }
.od-radar-caption.caption-vocabulary { left: 10px; top: 126px; }

.od-report-insights { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #dce8f7; border-radius: 14px; background: rgba(255,255,255,.7); }
.od-report-insights > div { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 18px; }
.od-report-insights > div + div { border-left: 1px solid #dce8f7; }
.od-report-insights > div > span { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #267cf8; color: #fff; font-size: 29px; }
.od-report-insights .priority > span { background: #09abb3; }
.od-report-insights p { min-width: 0; margin: 0; }
.od-report-insights small,
.od-report-insights strong { display: block; }
.od-report-insights small { color: #74839a; }
.od-report-insights strong { margin-top: 4px; color: #0a67f5; font-size: 19px; }
.od-report-insights .priority strong { color: #009da6; }

.od-report-detail-toggle { width: 100%; min-height: 55px; margin-top: 22px; border: 0; border-radius: 13px; background: linear-gradient(110deg, #0b70ff, #075de4); color: #fff; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 12px 24px rgba(10, 103, 245, .18); }

.od-result-detail { margin-top: 20px; padding: 34px; border: 1px solid #dbe6f5; border-radius: 26px; background: #fff; box-shadow: 0 20px 58px rgba(20, 55, 102, .07); scroll-margin-top: 18px; }
.od-result-detail > header p,
.od-learning-path > p { margin: 0; color: #0a67f5; font-size: 11px; font-weight: 850; letter-spacing: .2em; }
.od-result-detail > header h2,
.od-learning-path h2 { margin: 9px 0 12px; font-family: Georgia, "Songti SC", serif; font-size: 34px; }
.od-result-detail > header span { color: #60728c; line-height: 1.7; }
.od-ability-spectrum { margin-top: 28px; }
.od-ability-row { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid #e0e9f5; }
.od-ability-index { color: #b0c9ee; font-family: Georgia, serif; font-size: 28px; }
.od-ability-name { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 9px; }
.od-ability-name strong { font-size: 19px; }
.od-ability-name small { color: #64758d; }
.od-ability-name b { color: #0a67f5; font-family: Georgia, serif; font-size: 22px; }
.od-ability-track { height: 5px; margin-top: 12px; border-radius: 999px; background: #e8eff8; overflow: hidden; }
.od-ability-track i { display: block; height: 100%; border-radius: inherit; background: #0a67f5; }
.od-ability-row p { margin: 10px 0 0; color: #63758d; font-size: 14px; line-height: 1.65; }

.od-learning-path { margin-top: 32px; padding: 27px; border-radius: 17px; background: linear-gradient(145deg, #f4f8ff, #fff); }
.od-learning-path > div { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 25px; }
.od-learning-path article { min-width: 0; padding: 14px 10px; border: 1px solid #d8e5f7; border-radius: 13px; text-align: center; }
.od-learning-path article.active { border-color: #0a67f5; background: #eaf2ff; }
.od-learning-path small,
.od-learning-path strong { display: block; }
.od-learning-path small { color: #7d8da2; }
.od-learning-path strong { margin-top: 5px; color: #164575; overflow-wrap: anywhere; }
.od-learning-path > div > span { color: #0a67f5; font-size: 20px; }
.od-result-actions { display: grid; gap: 11px; margin-top: 26px; }
.od-result-actions button { min-height: 54px; }

@media (max-width: 620px) {
  .od-result-page { width: min(100% - 18px, 520px); padding-top: 8px; }
  .od-result-topbar { min-height: 52px; }
  .od-result-topbar > strong { font-size: 18px; }
  .od-report-cover { padding: 22px 17px 24px; border-radius: 20px; }
  .od-report-brand-row { align-items: flex-start; gap: 10px; }
  .od-report-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
  .od-report-brand { gap: 10px; }
  .od-report-brand strong { font-size: 20px; }
  .od-report-brand small { max-width: 165px; font-size: 7px; letter-spacing: .12em; }
  .od-report-meta { min-width: 126px; padding-left: 12px; }
  .od-report-meta dt { font-size: 7px; }
  .od-report-meta dd { font-size: 9px; }
  .od-report-hero { min-height: 270px; margin-top: 14px; padding-top: 38px; }
  .od-report-hero h1 { max-width: 74%; font-size: 25px; }
  .od-report-level { margin-top: 26px; }
  .od-report-level span { font-size: 54px; }
  .od-report-level strong { font-size: 74px; }
  .od-report-score { margin-top: 28px; }
  .od-report-score strong { font-size: 48px; }
  .od-report-book { right: -112px; top: 63px; width: 310px; height: 190px; opacity: .65; }
  .od-report-book::before,
  .od-report-book::after { height: 120px; }
  .od-report-book span { height: 130px; }
  .od-report-alignment { gap: 7px; }
  .od-report-alignment span { padding: 6px 9px; font-size: 10px; }
  .od-report-section-title { gap: 11px; margin: 30px 0 12px; font-size: 18px; }
  .od-radar-stage { height: 340px; }
  .od-radar-chart { width: 205px; height: 205px; }
  .od-radar-caption { gap: 5px; }
  .od-radar-caption > span { width: 29px; height: 29px; font-size: 12px; }
  .od-radar-caption strong { font-size: 12px; }
  .od-radar-caption small { font-size: 19px; }
  .od-radar-caption.caption-grammar { right: 0; top: 110px; }
  .od-radar-caption.caption-reading { right: 28px; bottom: 10px; }
  .od-radar-caption.caption-speaking { left: 28px; bottom: 10px; }
  .od-radar-caption.caption-vocabulary { left: 0; top: 110px; }
  .od-report-insights > div { gap: 8px; padding: 13px 8px; }
  .od-report-insights > div > span { width: 36px; height: 36px; font-size: 22px; }
  .od-report-insights small { font-size: 11px; }
  .od-report-insights strong { font-size: 14px; }
  .od-result-detail { padding: 25px 17px; border-radius: 20px; }
  .od-result-detail > header h2,
  .od-learning-path h2 { font-size: 27px; }
  .od-ability-row { grid-template-columns: 37px 1fr; gap: 9px; }
  .od-ability-index { font-size: 22px; }
  .od-ability-name { grid-template-columns: auto 1fr; }
  .od-ability-name b { grid-column: 1 / -1; margin-top: 3px; font-size: 19px; }
  .od-learning-path { padding: 20px 12px; }
  .od-learning-path > div { grid-template-columns: 1fr; }
  .od-learning-path > div > span { transform: rotate(90deg); text-align: center; }
}

@media print {
  .od-result-topbar,
  .od-report-detail-toggle,
  .od-result-actions { display: none !important; }
  .od-result-page { width: 100%; padding: 0; }
  .od-result-detail[hidden] { display: block; }
  .od-report-cover,
  .od-result-detail { border: 0; box-shadow: none; break-inside: avoid; }
}

@media (max-width: 900px) {
  .hero-card,
  .main-grid,
  .review-panel,
  .test-shell,
  .result-card,
  .score-breakdown {
    grid-template-columns: 1fr;
  }

  .test-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dev-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1080px);
    padding-top: 16px;
  }

  .brand-header {
    align-items: flex-start;
  }

  .hero-card,
  .panel,
  .question-card,
  .result-card,
  .review-panel,
  .report-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .grade-grid,
  .paper-grid,
  .review-links,
  .image-options {
    grid-template-columns: 1fr;
  }

  .action-panel,
  .question-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary,
  .secondary,
  .ghost {
    width: 100%;
  }

  .bar-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ========================================================================== */
/* Oxford OD independent assessment UI · 2026-08-07                           */
/* Visual-only layer. Assessment assets keep their original src and geometry. */
/* ========================================================================== */

:root {
  --xf-red: #1267e8;
  --xf-red-dark: #102a56;
  --xf-red-soft: #eef5ff;
  --xf-red-light: #eef5ff;
  --xf-bg: #f6f8fb;
  --xf-card: #ffffff;
  --xf-text: #111827;
  --xf-muted: #667085;
  --xf-border: #e4e9f1;
  --xf-line: #edf0f5;
  --xf-radius-xl: 22px;
  --xf-radius-lg: 18px;
  --xf-radius-md: 14px;
  --xf-shadow-card: 0 14px 42px rgba(16, 42, 86, 0.07);
  --xf-shadow-button: 0 12px 28px rgba(18, 103, 232, 0.22);
  --shadow-sm: var(--xf-shadow-card);
  --shadow-md: 0 18px 50px rgba(16, 42, 86, 0.12);
  --xf-success: #087a55;
  --xf-warning: #a15c07;
  --xf-danger: #c7353f;
  --od-navy: #102a56;
  --od-blue: #1267e8;
  --od-blue-strong: #075fe5;
  --od-ice: #eef5ff;
  --od-paper: #fbfcfe;
  --od-serif: Georgia, "Times New Roman", "Songti SC", STSong, serif;
  color: var(--xf-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  background: var(--xf-bg);
}

body {
  color: var(--xf-text);
  background:
    radial-gradient(circle at 8% 0%, rgba(18, 103, 232, 0.035), transparent 28%),
    radial-gradient(circle at 96% 100%, rgba(16, 42, 86, 0.035), transparent 26%),
    var(--xf-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(18, 103, 232, 0.22);
  outline-offset: 2px;
}

.app {
  min-height: 100svh;
}

.shell {
  width: min(880px, calc(100% - 40px));
  padding: 30px 0 56px;
}

.brand-header,
.test-header {
  margin-bottom: 18px;
}

.brand-mark,
.brand-compact-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--od-navy);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.brand-compact-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.od-monogram {
  font-family: var(--od-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

.brand-compact-icon .od-monogram {
  font-size: 13px;
}

.brand-name {
  color: var(--od-navy);
  font-family: var(--od-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 3px;
  color: #7a879b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card,
.panel,
.question-card,
.result-card,
.report-panel,
.action-panel,
.review-panel,
.dev-panel,
.score-breakdown {
  border: 1px solid var(--xf-border);
  border-radius: var(--xf-radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--xf-shadow-card);
}

.primary,
.secondary,
.ghost {
  min-height: 50px;
  border-radius: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--od-blue), #0865f4);
  box-shadow: var(--xf-shadow-button);
}

.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(18, 103, 232, 0.27);
}

.secondary {
  border: 1px solid rgba(18, 103, 232, 0.22);
  color: var(--od-blue);
  background: var(--od-ice);
}

.ghost {
  border: 1px solid var(--xf-border);
  color: #536176;
  background: #fff;
}

.primary:disabled,
.secondary:disabled,
.ghost:disabled {
  box-shadow: none;
  filter: saturate(0.5);
}

/* Home */

body:has(.home-shell) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 248, 251, 0.98)),
    var(--xf-bg);
}

.home-shell {
  width: min(480px, calc(100% - 32px));
  padding-top: 26px;
}

.home-brand-quick {
  margin: 0 0 22px;
}
.assessment-edition-badge { margin-left: auto; padding: 7px 10px; border: 1px solid #bdd4f4; border-radius: 999px; color: #0a67f5; background: #f3f8ff; font-size: 10px; font-weight: 850; letter-spacing: .12em; white-space: nowrap; }
.assessment-version-badge { display: inline-flex; margin-left: 5px; padding: 2px 6px; border: 1px solid #d7e2ef; border-radius: 999px; color: #708197; background: #f8fafc; font-size: 10px; font-weight: 800; vertical-align: middle; }
.assessment-version-badge.bridge { border-color: #b9d3f8; color: #0a67f5; background: #eef5ff; }

.home-brand-quick .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.home-quick-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 350px;
  margin: 0 0 14px;
  padding: 31px 28px 24px;
  overflow: hidden;
  border: 1px solid #e3e9f1;
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.98) 15%, rgba(244, 248, 255, 0.98) 100%);
  box-shadow: 0 18px 55px rgba(16, 42, 86, 0.08);
}

.home-quick-card::before {
  content: "";
  position: absolute;
  inset: auto -42px -52px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 103, 232, 0.08), transparent 68%);
}

.home-quick-card .hero-copy {
  position: relative;
  z-index: 2;
}

.home-quick-card .hero-copy .hero-kicker {
  margin: 0 0 10px;
  color: var(--od-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.home-quick-card .hero-copy h1 {
  max-width: 360px;
  margin: 0;
  color: var(--od-navy);
  font-family: var(--od-serif);
  font-size: clamp(34px, 9vw, 45px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.home-quick-card .hero-copy > p:last-child {
  margin: 13px 0 0;
  color: #687589;
  font-size: 15px;
  font-weight: 500;
}

.oxford-book-visual {
  position: relative;
  align-self: end;
  justify-self: center;
  width: 268px;
  height: 152px;
  margin: 8px 0 -24px;
  filter: drop-shadow(0 22px 20px rgba(16, 42, 86, 0.1));
  transform: perspective(600px) rotateX(58deg);
  transform-origin: center bottom;
}

.book-page {
  position: absolute;
  top: 12px;
  width: 135px;
  height: 132px;
  border: 1px solid #d9e3f2;
  background:
    repeating-linear-gradient(180deg, transparent 0 18px, rgba(63, 110, 172, 0.11) 19px 20px),
    linear-gradient(135deg, #fff 15%, #eaf2fc 100%);
}

.book-page-left {
  left: 1px;
  border-radius: 8px 2px 4px 10px;
  transform: skewY(-7deg);
}

.book-page-right {
  right: 1px;
  border-radius: 2px 8px 10px 4px;
  transform: skewY(7deg);
}

.book-spine {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 50%;
  width: 4px;
  height: 140px;
  border-radius: 99px;
  background: linear-gradient(180deg, #d6e4f7, #91b8ed 56%, #dce8f6);
  transform: translateX(-50%);
}

.home-ready-row {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  padding-top: 13px;
  border-top: 1px solid rgba(16, 42, 86, 0.07);
}

.home-tip,
.home-status-chip {
  min-height: 25px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  color: #667085;
  background: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  font-weight: 700;
  box-shadow: none;
}

.home-tip::before {
  background: var(--od-blue);
}

.home-status-chip.ok {
  color: #087a55;
  background: #eefaf6;
}

.home-status-chip.blocked {
  color: #a0444b;
  background: #fff3f4;
}

.home-runtime-alert {
  position: relative;
  z-index: 3;
  border-color: var(--xf-border);
  background: rgba(255, 255, 255, 0.86);
}

.report-identity-panel,
.home-controls .selector-panel {
  margin: 0 0 12px;
  padding: 20px 18px;
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(16, 42, 86, 0.045);
}

.report-identity-panel h2,
.home-controls .selector-panel h2 {
  margin: 0;
  color: var(--od-navy);
  font-family: var(--od-serif);
  font-size: 18px;
  font-weight: 700;
}

.report-identity-grid label > span {
  color: #4d5a6e;
  font-size: 13px;
  font-weight: 700;
}

.report-identity-grid input,
.text-answer {
  min-height: 52px;
  border: 1px solid #dfe5ed;
  border-radius: 11px;
  color: var(--xf-text);
  background: #fbfcfe;
  box-shadow: inset 0 1px 2px rgba(16, 42, 86, 0.02);
}

.report-identity-grid input:focus,
.text-answer:focus {
  border-color: var(--od-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 103, 232, 0.09);
}

.home-controls {
  display: block;
}

.home-controls .selector-panel > p {
  margin: 6px 0 0;
  color: #7b8799;
  font-size: 12px;
  line-height: 1.55;
}

.home-controls .grade-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 15px;
}

.home-controls .grade-card {
  position: relative;
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 44px 11px 14px;
  border: 1px solid #e5e9f0;
  border-radius: 11px;
  color: #1d2939;
  background: #fff;
  box-shadow: none;
  text-align: left;
}

.home-controls .grade-card:hover {
  border-color: #b9d3f8;
  background: #fafdff;
}

.home-controls .grade-card strong {
  font-size: 14px;
  font-weight: 750;
}

.home-controls .grade-card span {
  color: #8a95a5;
  font-size: 11px;
}

.home-controls .grade-card.selected {
  border-color: var(--od-blue);
  color: var(--od-navy);
  background: var(--od-ice);
}

.home-controls .grade-card.selected::after {
  content: "✓";
  position: absolute;
  right: 15px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--od-blue);
  font-size: 12px;
}

.start-section {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.start-section .primary {
  width: 100%;
  min-height: 58px;
  border-radius: 12px;
  font-size: 16px;
}

.start-section .action-hint {
  color: #8993a2;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

/* Assessment header and question surface */

.test-shell {
  width: min(820px, calc(100% - 40px));
  padding-top: 22px;
}

.test-header {
  padding: 0 2px 18px;
  border-bottom: 1px solid #e9edf3;
  background: transparent;
  box-shadow: none;
}

.test-header-row {
  align-items: center;
}

.brand-compact {
  color: var(--od-navy);
}

.brand-compact-text {
  max-width: 160px;
  overflow: hidden;
  font-family: var(--od-serif);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-chips {
  gap: 5px;
}

.skill-chip {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid #e6ebf2;
  border-radius: 999px;
  color: #8993a2;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.skill-chip.active {
  border-color: rgba(18, 103, 232, 0.16);
  color: var(--od-blue);
  background: var(--od-ice);
}

.skill-chip.done {
  color: #087a55;
  background: #eefaf6;
}

.progress-copy {
  margin: 13px 0 7px;
  color: #6c788a;
  font-size: 11px;
  font-weight: 700;
}

.top-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edf3;
}

.top-progress-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, #0a6bff, #2784ff);
}

.question-card--compact {
  padding: 30px;
  border: 1px solid #e4e9f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(16, 42, 86, 0.06);
}

.question-card--compact .question-head {
  margin-bottom: 21px;
  text-align: left;
}

.question-card--compact .question-head .eyebrow,
.section-eyebrow {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--od-blue);
  background: var(--od-ice);
  font-size: 11px;
  font-weight: 800;
}

.question-card--compact .question-head h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.question-card--compact .question-layout,
.question-card--compact .question-main {
  gap: 18px;
}

.question-card--compact .media-grid {
  gap: 14px;
}

.question-card--compact .media-box {
  padding: 14px;
  border: 1px solid #e8ecf2;
  border-radius: 14px;
  background: #fbfcfe;
  box-shadow: none;
}

.question-card--compact .media-box > strong {
  color: #667085;
  font-size: 11px;
  font-weight: 750;
}

.audio-player {
  min-height: 62px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7faff, #eef5ff);
}

.audio-play-button {
  color: #fff;
  background: var(--od-blue);
  box-shadow: 0 8px 20px rgba(18, 103, 232, 0.2);
}

.audio-meta strong {
  color: var(--od-blue);
}

.question-card--compact .prompt {
  margin: 4px 0 18px;
  color: #101828;
  font-family: var(--od-serif);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}

.question-card--compact .long-prompt,
.question-card--compact .reading-prompt {
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
}

.reading-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
}

.reading-passage,
.passage {
  border: 0;
  border-left: 3px solid #cfe0f8;
  border-radius: 0 12px 12px 0;
  color: #29384f;
  background: #f7faff;
  box-shadow: none;
}

.passage-kicker {
  color: var(--od-blue);
}

.options {
  gap: 10px;
}

.option.option-shell {
  overflow: hidden;
  border: 1px solid #e4e9f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.option.option-shell:hover {
  border-color: #b9d2f7;
  transform: translateY(-1px);
}

.option.option-shell.selected,
.option.option-shell:has(.card-option.selected) {
  border-color: var(--od-blue);
  background: #f7faff;
  box-shadow: 0 0 0 2px rgba(18, 103, 232, 0.07);
}

.question-card--compact .card-option {
  min-height: 58px;
  padding: 12px 15px;
  border: 0;
  border-radius: 0;
  color: #1d2939;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.question-card--compact .card-option.selected {
  color: var(--od-navy);
  background: transparent;
}

.option-letter {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d9e0e9;
  border-radius: 50%;
  color: #556175;
  background: #fff;
  font-family: var(--od-serif);
  font-weight: 700;
}

.card-option.selected .option-letter,
.option-shell.selected .option-letter {
  border-color: var(--od-blue);
  color: #fff;
  background: var(--od-blue);
}

.option-shell.selected .option-body::after {
  content: "✓";
  float: right;
  margin-left: 12px;
  color: var(--od-blue);
  font-size: 20px;
  font-weight: 800;
}

.option-media {
  border-top: 1px solid #edf0f5;
  background: #fbfcfe;
}

/* Original question images: no cropping, no filters, no generated replacement. */
.question-card--compact .image-preview,
.option-image-wrap {
  background: #fff;
}

.question-card--compact .image-preview img,
.question-card--compact .option-image,
.option-image,
.media-box img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  object-position: center;
  filter: none;
  image-rendering: auto;
}

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

.image-options .option.option-shell {
  align-content: start;
}

.image-options .option-image {
  min-height: 132px;
  max-height: 230px;
}

.option-preview-chip {
  color: var(--od-blue);
  background: rgba(255, 255, 255, 0.92);
}

.fill-area,
.ordering-area {
  border-color: #e4e9f0;
  background: #fbfcfe;
}

.word {
  border: 1px solid #dce4ee;
  color: #26364e;
  background: #fff;
  box-shadow: none;
}

.selected-word {
  border-color: #a9c9f7;
  color: var(--od-blue);
  background: var(--od-ice);
}

.question-actions.bottom-action-bar {
  display: grid;
  grid-template-columns: 90px 100px minmax(160px, 1fr);
  gap: 10px;
  margin: 28px -30px -30px;
  padding: 16px 30px;
  border-top: 1px solid #e9edf3;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
}

.question-actions .skip-answer {
  color: #657186;
  background: #f7f8fa;
}

/* Speaking */

.speaking-card .question-head {
  text-align: center;
}

.speaking-card .media-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 520px;
  margin: 0 auto;
}

.speaking-card .image-preview img {
  max-height: 230px;
}

.speaking-card .speaking-prompt {
  max-width: 620px;
  margin: 18px auto 22px;
  padding: 24px;
  border-radius: 14px;
  color: var(--od-navy);
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.45;
  text-align: center;
}

.speaking-area {
  padding: 4px 0 0;
  border: 0;
  background: transparent;
}

.speaking-card .record-controls {
  position: relative;
  display: flex;
  min-height: 206px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 0 34px;
}

.speaking-card #recordBtn {
  position: relative;
  z-index: 2;
  width: 142px;
  height: 142px;
  min-height: 142px;
  padding: 0;
  border: 13px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 40% 32%, #3091ff, #0764ef 68%, #0757ce);
  box-shadow:
    0 0 0 3px #2b82f2,
    0 0 0 16px #edf5ff,
    0 20px 40px rgba(18, 103, 232, 0.24);
  font-size: 15px;
  font-weight: 800;
}

.speaking-card #recordBtn::before {
  content: "●";
  display: block;
  margin-bottom: 5px;
  font-size: 25px;
  line-height: 1;
}

.speaking-card #recordBtn:disabled {
  opacity: 0.55;
  box-shadow: 0 0 0 3px #aeb7c4, 0 0 0 16px #f0f2f5;
}

.speaking-card #stopRecordBtn,
.speaking-card #resetRecordBtn {
  position: absolute;
  bottom: 0;
  width: auto;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
}

.speaking-card #stopRecordBtn {
  left: calc(50% - 92px);
}

.speaking-card #resetRecordBtn {
  right: calc(50% - 92px);
}

.speaking-card #recordStatus {
  position: absolute;
  bottom: -26px;
  left: 50%;
  width: min(420px, 100%);
  color: #667085;
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}

.student-speaking-note {
  margin-top: 34px;
  border: 0;
  border-radius: 12px;
  color: #637086;
  background: #f7f9fc;
}

.student-speaking-note strong {
  color: var(--od-navy);
}

.playback-area {
  border-color: #e2e8f0;
  background: #f8fafc;
}

/* Report */

.result-hero {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid #dce6f4;
  color: var(--xf-text);
  background:
    radial-gradient(circle at 94% 4%, rgba(18, 103, 232, 0.12), transparent 36%),
    linear-gradient(135deg, #ffffff, #f2f7ff);
}

.result-hero::after {
  content: "OD";
  position: absolute;
  right: -12px;
  bottom: -43px;
  color: rgba(16, 42, 86, 0.035);
  font-family: var(--od-serif);
  font-size: 180px;
  font-weight: 700;
  line-height: 1;
}

.score-summary {
  align-self: center;
  padding: 24px 20px;
  border-right: 1px solid #dfe7f2;
}

.score-summary span,
.score-summary small {
  color: #6b778a;
}

.score-summary strong {
  color: var(--od-blue);
  font-family: var(--od-serif);
  font-size: clamp(72px, 11vw, 104px);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.result-summary-copy {
  position: relative;
  z-index: 2;
}

.result-summary-copy .eyebrow {
  color: var(--od-blue);
  background: transparent;
}

.result-summary-copy h1 {
  color: var(--od-navy);
  font-family: var(--od-serif);
  font-size: clamp(27px, 4.5vw, 40px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.alignment-pills span {
  border-color: #d6e4f8;
  color: var(--od-blue);
  background: rgba(255, 255, 255, 0.88);
}

.result-section {
  margin-top: 14px;
}

.result-section > h2,
.learning-plan h2 {
  color: var(--od-navy);
  font-family: var(--od-serif);
}

.ability-badge {
  border-color: #e7ebf1;
  background: #fff;
}

.ability-name b,
.bar-title strong {
  color: #26364e;
}

.bar-fill {
  background: linear-gradient(90deg, #0a65ec, #2f86fa);
}

.learning-plan {
  border-color: #e3e9f1;
  background: #fff;
}

/* Modals, warnings, protection states */

.modal-backdrop {
  background: rgba(15, 29, 50, 0.42);
  backdrop-filter: blur(8px);
}

.modal {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 29, 50, 0.2);
}

.asset-error,
.resume-warning,
.home-runtime-alert.blocked {
  border-color: #f0d4d7;
  color: #9c3740;
  background: #fff7f7;
}

.completed-panel,
.skip-completion-panel {
  text-align: center;
}

@media (max-width: 760px) {
  .shell,
  .test-shell {
    width: min(100% - 24px, 620px);
    padding-top: 16px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  .home-shell {
    width: min(100% - 24px, 480px);
    padding-top: 18px;
  }

  .skill-chips .skill-chip:not(.active):not(.done) {
    display: none;
  }

  .brand-compact-text {
    max-width: 126px;
    font-size: 13px;
  }

  .question-card--compact {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .question-card--compact .question-head h1 {
    font-size: 22px;
  }

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

  .reading-passage {
    max-height: 42svh;
    overflow: auto;
  }

  .question-actions.bottom-action-bar {
    position: sticky;
    z-index: 20;
    bottom: 0;
    grid-template-columns: 68px 82px minmax(0, 1fr);
    margin: 24px -18px -22px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-radius: 0 0 16px 16px;
  }

  .question-actions.bottom-action-bar .primary,
  .question-actions.bottom-action-bar .ghost {
    min-height: 46px;
    min-width: 0;
    padding-inline: 8px;
    font-size: 13px;
  }

  .result-hero {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 24px 20px;
  }

  .score-summary {
    padding: 4px 0 18px;
    border-right: 0;
    border-bottom: 1px solid #dfe7f2;
  }

  .score-summary strong {
    font-size: 76px;
  }

  .result-summary-copy h1 {
    font-size: 27px;
  }
}

@media (max-width: 480px) {
  .home-brand-quick {
    margin-bottom: 14px;
  }

  .home-quick-card {
    min-height: 326px;
    padding: 25px 20px 18px;
  }

  .home-quick-card .hero-copy h1 {
    font-size: 35px;
  }

  .oxford-book-visual {
    width: 236px;
    height: 138px;
    margin-bottom: -19px;
  }

  .book-page {
    width: 119px;
    height: 120px;
  }

  .book-spine {
    height: 126px;
  }

  .home-ready-row {
    flex-wrap: wrap;
  }

  .report-identity-panel,
  .home-controls .selector-panel {
    padding: 18px 16px;
  }

  .test-header {
    padding-bottom: 13px;
  }

  .brand-compact-icon {
    width: 30px;
    height: 30px;
  }

  .question-card--compact .media-box {
    padding: 10px;
  }

  .question-card--compact .prompt {
    font-size: 22px;
  }

  .question-card--compact .long-prompt,
  .question-card--compact .reading-prompt {
    font-size: 17px;
  }

  .image-options {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .image-options .option-image {
    min-height: 104px;
    max-height: 170px;
  }

  .option-letter {
    width: 27px;
    height: 27px;
  }

  .speaking-card .speaking-prompt {
    padding: 19px 13px;
    font-size: 26px;
  }

  .speaking-card #recordBtn {
    width: 126px;
    height: 126px;
    min-height: 126px;
  }

  .bars .bar-row {
    padding: 14px;
  }
}

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

/* XF red-white UI refresh */
body {
  color: var(--xf-text);
  background:
    radial-gradient(circle at top left, rgba(215, 25, 32, 0.08), transparent 36rem),
    linear-gradient(180deg, #fff, var(--xf-bg) 42%, #fff);
}

.shell {
  width: min(1120px, calc(100% - 32px));
}

.home-shell {
  width: min(960px, calc(100% - 32px));
  padding-top: 34px;
}

.home-brand {
  margin-bottom: 18px;
}

.brand-mark,
.brand-compact span {
  background: var(--xf-red);
  box-shadow: var(--shadow-sm);
}

.hero-card,
.panel,
.question-card,
.result-card,
.report-panel,
.action-panel,
.review-panel,
.dev-panel {
  border-radius: var(--radius-lg);
  border-color: var(--xf-border);
  box-shadow: var(--shadow-sm);
}

.home-card {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: center;
  margin-bottom: 18px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.92);
}

.home-card .hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
}

.home-card .hero-copy p {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--xf-muted);
}

.home-card .validation-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-controls {
  grid-template-columns: 1fr;
}

.selector-panel {
  padding: 24px;
}

.selector-panel h2,
.selector-panel p {
  margin-top: 0;
}

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

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

.choice {
  min-height: 64px;
  padding: 14px 16px;
  border: 1.5px solid var(--xf-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--xf-text);
  box-shadow: none;
}

.choice:hover {
  border-color: var(--xf-red);
  background: var(--xf-red-light);
}

.choice.selected {
  border-color: var(--xf-red);
  background: var(--xf-red);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.grade-card {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: start;
  text-align: left;
}

.grade-card strong,
.paper-card strong {
  font-size: 18px;
}

.grade-card span {
  color: var(--xf-muted);
  font-size: 13px;
  font-weight: 700;
}

.grade-card.selected span {
  color: rgba(255, 255, 255, 0.82);
}

.paper-card {
  display: grid;
  place-items: center;
}

.primary,
.secondary,
.ghost {
  min-height: 48px;
  border-radius: var(--radius-md);
  font-weight: 800;
}

.primary {
  box-shadow: 0 10px 24px rgba(215, 25, 32, 0.24);
}

.test-shell {
  width: min(1160px, calc(100% - 32px));
  grid-template-columns: 1fr;
  gap: 16px;
}

.test-shell.has-dev {
  grid-template-columns: minmax(0, 1fr) 320px;
}

@media (min-width: 1121px) {
  .test-shell.has-dev {
    width: min(760px, calc(100% - 424px));
    margin-left: max(16px, calc((100vw - 1160px) / 2));
    margin-right: 0;
  }
}

.test-header {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--xf-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.test-header-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
}

.skill-chip,
.paper-pill {
  min-height: 32px;
  background: #fff;
  border: 1px solid var(--xf-border);
}

.skill-chip.active {
  border-color: var(--xf-red);
  background: var(--xf-red);
}

.skill-chip.done {
  color: var(--xf-red-dark);
  background: var(--xf-red-light);
}

.top-progress {
  height: 10px;
  background: #f6e5e5;
}

.top-progress-fill,
.bar-fill {
  background: var(--xf-red);
}

.question-card {
  display: grid;
  min-height: min(680px, calc(100vh - 170px));
  padding: 28px;
  background: var(--xf-card);
}

.question-head {
  margin-bottom: 18px;
}

.question-head h1 {
  max-width: 860px;
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 36px);
}

.question-layout,
.question-main {
  display: grid;
  gap: 18px;
}

.reading-layout {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.passage {
  margin: 0;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--xf-border);
  line-height: 1.85;
}

.reading-passage {
  max-height: min(520px, calc(100vh - 250px));
  overflow: auto;
}

.media-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.media-box {
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--xf-border);
}

.audio-player {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 64px;
}

.audio-play-button {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--xf-red);
  box-shadow: 0 10px 24px rgba(215, 25, 32, 0.28);
  transition: transform 140ms ease, background 140ms ease;
}

.audio-play-button:hover {
  background: var(--xf-red-dark);
  transform: scale(1.03);
}

.audio-play-button:active {
  transform: scale(0.96);
}

.audio-play-icon {
  margin-left: 3px;
  font-size: 20px;
  line-height: 1;
}

.audio-player.is-playing .audio-play-icon {
  margin-left: 0;
  font-size: 0;
}

.audio-player.is-playing .audio-play-icon::before {
  content: "Ⅱ";
  font-size: 22px;
}

.audio-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.native-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.prompt {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.45;
}

.options {
  gap: 14px;
}

.image-options {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.option.option-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.option.option-shell:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
}

.card-option {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1.5px solid #ead9d9;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--xf-text);
  text-align: left;
  font-size: 17px;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card-option:hover,
.card-option:focus-visible {
  border-color: var(--xf-red);
  background: var(--xf-red-light);
  outline: none;
}

.card-option.selected {
  border-color: var(--xf-red);
  background: var(--xf-red);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.card-option.selected .option-letter {
  color: var(--xf-red);
  background: #fff;
  border-color: #fff;
}

.option-letter {
  width: 34px;
  height: 34px;
  border: 1.5px solid #efc6c8;
  font-size: 15px;
}

.option-media {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--xf-border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.option-media:hover,
.option-media:focus-visible {
  border-color: var(--xf-red);
  background: var(--xf-red-light);
  outline: none;
}

.option-media.selected {
  border-color: var(--xf-red);
  box-shadow: var(--shadow-sm);
}

.option-select-action {
  color: var(--xf-muted);
  background: transparent;
  min-height: auto;
  padding: 0;
  font-size: 13px;
}

.option-audio-player {
  display: grid;
  width: 100%;
}

.image-options .option.option-shell {
  overflow: hidden;
  gap: 0;
  border: 1.5px solid var(--xf-border);
  border-radius: var(--xf-radius-md);
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.image-options .option.option-shell:hover {
  border-color: var(--xf-red);
  background: var(--xf-red-soft);
}

.image-options .option.option-shell.selected {
  border-color: var(--xf-red);
  box-shadow: var(--xf-shadow-card);
}

.image-options .option.option-shell .card-option {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.image-options .option.option-shell .card-option.selected {
  background: var(--xf-red);
  color: #fff;
}

.image-options .option.option-shell .option-media {
  border: 0;
  border-top: 1px solid var(--xf-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.image-options .option.option-shell .option-media:hover,
.image-options .option.option-shell .option-media:focus-visible {
  background: transparent;
}

.text-answer,
.speaking-area input,
.speaking-area textarea {
  min-height: 52px;
  border-radius: var(--radius-md);
  border-color: #ead9d9;
  font-size: 18px;
}

.text-answer:focus,
.speaking-area input:focus,
.speaking-area textarea:focus {
  border-color: var(--xf-red);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.1);
}

.bottom-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  align-self: end;
  justify-content: flex-end;
  margin: 22px -4px -4px;
  padding-top: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 42%);
}

.dev-panel {
  color: #fff;
  background: rgba(17, 24, 39, 0.88);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.dev-panel h2,
.dev-panel dd,
.dev-panel summary {
  color: #fff;
}

.dev-panel dt {
  color: rgba(255, 255, 255, 0.62);
}

.dev-panel pre,
.session-json {
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
}

.dev-panel .ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.result-hero {
  grid-template-columns: 220px minmax(0, 1fr);
  padding: 32px;
}

.score-summary {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 180px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--xf-red);
  box-shadow: var(--shadow-md);
}

.score-summary span,
.score-summary small {
  font-weight: 800;
  opacity: 0.9;
}

.score-summary strong {
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
}

.result-summary-copy h1 {
  margin: 4px 0 14px;
  font-size: clamp(30px, 4vw, 48px);
}

.alignment-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.alignment-pills span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--xf-red-dark);
  background: var(--xf-red-light);
  font-weight: 900;
}

.result-section {
  margin-bottom: 22px;
}

.bars {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.ability-badge {
  padding: 16px;
  border-radius: var(--radius-md);
}

.bar-title {
  display: grid;
  gap: 4px;
}

.bar-title span {
  font-size: 15px;
  color: var(--xf-text);
}

.bar-title strong {
  font-size: 14px;
}

.bar-track {
  height: 10px;
}

.ability-badge p {
  font-size: 13px;
}

.learning-plan > div {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.score-note {
  margin-top: 10px !important;
  color: var(--xf-muted) !important;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .test-shell.has-dev,
  .reading-layout,
  .result-hero {
    grid-template-columns: 1fr;
  }

  .test-header-row {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .home-card,
  .grade-grid,
  .paper-grid,
  .bars {
    grid-template-columns: 1fr;
  }

  .home-card,
  .selector-panel,
  .question-card,
  .result-hero {
    padding: 20px;
  }

  .question-card {
    min-height: calc(100vh - 150px);
  }

  .question-actions.bottom-action-bar {
    flex-direction: column-reverse;
  }

  .question-actions.bottom-action-bar .primary,
  .question-actions.bottom-action-bar .ghost {
    width: 100%;
  }

  .audio-player {
    grid-template-columns: 56px 1fr;
  }
}

/* Prompt-aligned UI polish: student-first red-white assessment surface. */
.shell {
  width: min(960px, calc(100% - 32px));
}

.home-shell,
.test-shell {
  width: min(960px, calc(100% - 32px));
}

.home-card {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  border-radius: var(--xf-radius-xl);
}

.hero-hint {
  display: block;
  margin-top: 14px;
  color: var(--xf-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.validation-card.ok {
  border-color: #B7E4C7;
  background: #F0FDF4;
}

.validation-card.ok strong {
  color: #166534;
}

.validation-card.blocked {
  border-color: var(--xf-border);
  background: var(--xf-red-soft);
}

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

.grade-card strong {
  line-height: 1.35;
}

.primary,
.secondary,
.ghost {
  min-height: 52px;
  border-radius: var(--xf-radius-md);
}

.primary {
  box-shadow: var(--xf-shadow-button);
}

.action-panel {
  justify-content: center;
}

.home-shell .action-panel .primary {
  min-width: 260px;
}

.test-shell,
.test-shell.has-dev {
  grid-template-columns: 1fr;
}

.test-shell.has-dev .question-card {
  justify-self: start;
}

.question-card {
  width: min(760px, 100%);
  justify-self: center;
}

.question-card.reading-card {
  width: 100%;
}

.reading-card .reading-layout {
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
}

.audio-meta strong {
  font-size: 18px;
}

.media-status {
  line-height: 1.45;
}

.initial-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.initial-hint span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--xf-red);
  font-weight: 900;
  text-transform: uppercase;
}

.text-answer::placeholder {
  color: #a7a7a7;
}

.record-controls .secondary,
.record-controls .ghost {
  min-width: 120px;
}

.dev-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 15;
  width: min(360px, calc(100vw - 32px));
  overflow: auto;
  padding: 0;
  border-radius: 20px;
}

.dev-panel > details {
  padding: 16px;
}

.dev-panel > details > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.dev-panel-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.dev-panel details:not([open]) .dev-panel-body {
  display: none;
}

.result-card,
.score-breakdown > div {
  border-radius: var(--xf-radius-xl);
}

.result-summary-copy h1 {
  max-width: 620px;
}

@media (max-width: 1120px) {
  .dev-panel {
    top: auto;
    left: 16px;
    max-height: 52vh;
    width: auto;
  }
}

@media (max-width: 720px) {
  .shell,
  .home-shell,
  .test-shell {
    width: min(100% - 20px, 960px);
  }

  .home-card,
  .grade-grid,
  .paper-grid,
  .reading-card .reading-layout {
    grid-template-columns: 1fr;
  }

  .question-card,
  .question-card.reading-card {
    width: 100%;
  }

  .bottom-action-bar {
    position: static;
    background: transparent;
    margin-left: -10px;
    margin-right: -10px;
    padding: 14px 10px 0;
  }
}

/* UI comfort iteration 2026-07-03: calmer, kid-friendly surfaces without logic changes. */
:root {
  --xf-line: #F7E2E2;
  --xf-shadow-card: 0 14px 38px rgba(120, 20, 20, 0.075);
  --xf-shadow-soft: 0 8px 24px rgba(120, 20, 20, 0.055);
  --xf-shadow-button: 0 8px 20px rgba(215, 25, 32, 0.20);
  --shadow-sm: var(--xf-shadow-card);
}

body {
  background:
    linear-gradient(145deg, rgba(215, 25, 32, 0.055), rgba(255, 248, 247, 0) 36%),
    linear-gradient(0deg, rgba(255, 241, 241, 0.42), rgba(255, 255, 255, 0) 58%),
    var(--xf-bg);
}

button,
.option-media,
.option-preview-chip,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
.option-media:focus-visible,
.option-preview-chip:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.22);
  outline-offset: 3px;
}

button:disabled {
  filter: grayscale(0.1);
}

.brand-mark,
.brand-compact span {
  box-shadow: 0 10px 24px rgba(215, 25, 32, 0.18);
}

.home-card {
  gap: 28px;
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--xf-shadow-card);
}

.hero-copy h1 {
  max-width: 660px;
  line-height: 1.12;
}

.hero-copy p,
.panel p,
.result-card p {
  line-height: 1.75;
}

.hero-hint {
  max-width: 680px;
  padding: 12px 14px;
  border: 1px solid var(--xf-line);
  border-radius: 16px;
  background: rgba(255, 241, 241, 0.62);
  font-size: 15px;
  font-weight: 700;
}

.validation-card.ok {
  border-color: var(--xf-line);
  background: #fffdfd;
}

.validation-card.ok strong {
  color: var(--xf-red-dark);
}

.selector-panel {
  box-shadow: var(--xf-shadow-soft);
}

.grade-grid,
.paper-grid {
  gap: 14px;
}

.grade-card,
.paper-card,
.choice {
  border-color: var(--xf-line);
  box-shadow: 0 1px 0 rgba(120, 20, 20, 0.02);
}

.grade-card {
  min-height: 104px;
  padding: 16px;
}

.paper-card {
  min-height: 72px;
}

.choice:hover,
.grade-card:hover,
.paper-card:hover {
  border-color: rgba(215, 25, 32, 0.55);
  background: #fff8f8;
}

.choice.selected,
.grade-card.selected,
.paper-card.selected {
  border-color: var(--xf-red);
  background: var(--xf-red-soft);
  color: var(--xf-red-dark);
  box-shadow: 0 10px 24px rgba(215, 25, 32, 0.10);
}

.grade-card.selected span {
  color: var(--xf-muted);
}

.action-panel {
  border-color: var(--xf-line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--xf-shadow-soft);
}

.action-hint {
  flex-basis: 100%;
  color: var(--xf-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.primary {
  min-height: 54px;
  box-shadow: var(--xf-shadow-button);
}

.secondary,
.ghost {
  box-shadow: none;
}

.ghost {
  color: #374151;
  background: #f7f7f8;
}

.ghost:hover {
  background: #f1f1f2;
}

.test-header {
  border-color: var(--xf-line);
  border-radius: 24px;
  box-shadow: var(--xf-shadow-soft);
}

.test-header-row {
  gap: 16px;
}

.skill-chips {
  gap: 10px;
}

.skill-chip {
  color: #6b7280;
  background: #fff;
}

.skill-chip.active {
  color: var(--xf-red-dark);
  border-color: var(--xf-red);
  background: var(--xf-red-soft);
  box-shadow: inset 0 0 0 1px rgba(215, 25, 32, 0.12);
}

.skill-chip.done {
  color: var(--xf-red-dark);
  border-color: rgba(215, 25, 32, 0.26);
  background: #fff7f7;
}

.paper-pill {
  color: var(--xf-red-dark);
  background: #fff7f7;
}

.progress-copy {
  margin: -2px 0 0;
  color: var(--xf-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.top-progress {
  height: 7px;
  background: #f5e8e8;
}

.question-card {
  gap: 20px;
  padding: clamp(20px, 3vw, 32px);
  border-color: var(--xf-line);
  box-shadow: var(--xf-shadow-card);
}

.question-head {
  margin-bottom: 10px;
}

.question-head h1,
.prompt {
  line-height: 1.62;
  letter-spacing: 0;
}

.question-main {
  gap: 22px;
}

.reading-layout {
  gap: 22px;
}

.passage,
.reading-passage {
  border: 1px solid var(--xf-line);
  box-shadow: none;
  background: #fffdfd;
  line-height: 1.75;
}

.passage-kicker {
  margin: 0 0 10px;
  color: var(--xf-red-dark);
  font-size: 14px;
  font-weight: 900;
}

.passage-content {
  display: grid;
  gap: 10px;
}

.media-grid {
  gap: 18px;
}

.media-box {
  padding: 16px;
  border: 1px solid var(--xf-line);
  background: #fffafa;
  box-shadow: none;
}

.audio-player {
  min-height: 74px;
}

.audio-play-button {
  width: 60px;
  height: 60px;
  box-shadow: 0 9px 20px rgba(215, 25, 32, 0.18);
}

.audio-meta strong {
  font-size: 17px;
  line-height: 1.35;
}

.media-status {
  font-size: 14px;
  font-weight: 700;
}

.options {
  gap: 13px;
}

.card-option {
  min-height: 58px;
  border-color: var(--xf-line);
  font-weight: 780;
  line-height: 1.55;
}

.card-option:hover,
.card-option:focus-visible {
  border-color: var(--xf-red);
  background: #fff8f8;
}

.card-option.selected {
  border-color: var(--xf-red);
  background: var(--xf-red-soft);
  color: var(--xf-text);
  box-shadow: 0 10px 24px rgba(215, 25, 32, 0.10);
}

.card-option.selected .option-letter {
  color: #fff;
  background: var(--xf-red);
  border-color: var(--xf-red);
}

.option-media {
  border-color: var(--xf-line);
}

.option-media.selected {
  background: #fff8f8;
  box-shadow: 0 8px 20px rgba(215, 25, 32, 0.08);
}

.image-options .option.option-shell {
  border-color: var(--xf-line);
}

.image-options .option.option-shell.selected {
  background: #fff8f8;
  box-shadow: 0 10px 26px rgba(215, 25, 32, 0.10);
}

.image-options .option.option-shell .card-option.selected {
  background: transparent;
  color: var(--xf-text);
}

.image-preview img,
.option-image {
  max-height: 300px;
}

.text-answer,
.speaking-area input,
.speaking-area textarea {
  min-height: 58px;
  padding: 14px 16px;
  border-color: var(--xf-line);
  border-radius: 18px;
  line-height: 1.5;
}

.initial-hint {
  color: #4b5563;
  font-weight: 800;
}

.record-controls {
  align-items: center;
  gap: 12px;
}

.record-controls .secondary,
.record-controls .ghost {
  min-width: 132px;
}

#recordStatus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #4b5563;
  font-weight: 800;
  line-height: 1.5;
}

#recordStatus::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--xf-red);
  box-shadow: 0 0 0 5px rgba(215, 25, 32, 0.10);
}

.playback-area {
  display: grid;
  gap: 8px;
}

.playback-area span {
  color: var(--xf-red-dark);
  font-weight: 900;
}

.playback-area audio {
  width: min(100%, 420px);
}

.student-speaking-note {
  border-color: var(--xf-line);
  background: #fff8f8;
}

.student-speaking-note strong {
  font-size: 16px;
}

.bottom-action-bar {
  border-top: 1px solid transparent;
}

.result-hero {
  gap: 28px;
  border-color: var(--xf-line);
  box-shadow: var(--xf-shadow-card);
}

.score-summary {
  min-height: 170px;
  box-shadow: 0 12px 28px rgba(215, 25, 32, 0.18);
}

.result-summary-copy h1 {
  line-height: 1.18;
}

.result-section {
  border-color: var(--xf-line);
  box-shadow: var(--xf-shadow-soft);
}

.bars {
  grid-template-columns: 1fr;
  gap: 14px;
}

.ability-badge {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(160px, 1fr) minmax(220px, 1.6fr);
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--xf-line);
  border-radius: 18px;
  background: #fff;
}

.ability-name {
  display: grid;
  gap: 2px;
}

.ability-name b {
  font-size: 16px;
}

.ability-name small {
  color: var(--xf-muted);
  font-size: 12px;
  font-weight: 800;
}

.bar-title strong {
  color: var(--xf-red-dark);
}

.ability-badge p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.bar-track {
  height: 9px;
  background: #f3e9e9;
}

.learning-plan {
  gap: 18px;
}

.learning-plan > div {
  border: 1px solid var(--xf-line);
  box-shadow: var(--xf-shadow-soft);
}

@media (max-width: 1024px) {
  .ability-badge {
    grid-template-columns: minmax(128px, 0.58fr) minmax(160px, 1fr);
  }

  .ability-badge p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .shell,
  .home-shell,
  .test-shell {
    width: min(100% - 22px, 960px);
    padding-top: 18px;
  }

  .brand-header,
  .test-header {
    margin-bottom: 14px;
  }

  .home-card,
  .selector-panel,
  .question-card,
  .result-hero,
  .panel {
    padding: 20px;
  }

  .home-card,
  .grade-grid,
  .paper-grid,
  .reading-card .reading-layout,
  .result-hero,
  .learning-plan {
    grid-template-columns: 1fr;
  }

  .grade-card {
    min-height: 92px;
  }

  .test-header {
    padding: 14px;
  }

  .skill-chips {
    width: 100%;
  }

  .skill-chip,
  .paper-pill {
    min-height: 36px;
  }

  .question-card {
    min-height: auto;
  }

  .question-head h1,
  .prompt {
    font-size: clamp(23px, 7vw, 30px);
  }

  .reading-passage {
    max-height: min(46vh, 420px);
  }

  .media-grid,
  .image-options {
    grid-template-columns: 1fr;
  }

  .record-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .record-controls .secondary,
  .record-controls .ghost,
  #recordStatus {
    width: 100%;
    min-width: 0;
  }

  #recordStatus {
    grid-column: 1 / -1;
  }

  .question-actions.bottom-action-bar {
    position: static;
    z-index: 8;
    margin: 24px -8px 0;
    padding: 12px;
    border: 1px solid var(--xf-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(120, 20, 20, 0.10);
  }

  .ability-badge {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .score-summary {
    min-height: 150px;
  }
}

@media (max-width: 420px) {
  .shell,
  .home-shell,
  .test-shell {
    width: min(100% - 16px, 960px);
  }

  .home-card,
  .selector-panel,
  .question-card,
  .result-hero,
  .panel {
    padding: 18px;
  }

  .audio-player {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .audio-play-button {
    width: 58px;
    height: 58px;
  }

  .record-controls {
    grid-template-columns: 1fr;
  }

  .action-panel {
    padding: 14px;
  }

  .action-panel .primary,
  .action-panel .ghost {
    width: 100%;
  }
}

/* Brand image icon. */
.brand-mark,
.brand-compact-icon {
  overflow: hidden;
  padding: 0;
  background: #1589ee;
  border: 1px solid rgba(21, 137, 238, 0.18);
}

.brand-mark img,
.brand-compact-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.brand-compact-icon {
  flex: 0 0 auto;
}

/* Mobile text layout audit: density, line-height, spacing, and wrapping. */
html,
body {
  overflow-x: hidden;
}

img,
video,
audio {
  max-width: 100%;
}

.shell,
.home-card,
.selector-panel,
.question-card,
.result-card,
.report-panel,
.review-panel,
.action-panel,
.card-option,
.option-media,
.ability-badge,
.media-box {
  min-width: 0;
}

.prompt,
.long-prompt,
.passage,
.passage-content,
.option-body,
.audio-meta,
.result-summary-copy,
.ability-badge,
.student-speaking-note,
.score-note {
  overflow-wrap: break-word;
}

.dev-panel,
.session-json,
.dev-panel dd,
.dev-panel pre {
  overflow-wrap: anywhere;
}

.long-prompt {
  line-height: 1.66;
}

.home-card .hero-copy h1 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.12;
}

@media (max-width: 768px) {
  .shell,
  .home-shell,
  .test-shell {
    width: min(100% - 18px, 960px);
    padding-top: 16px;
    padding-bottom: 32px;
  }

  .brand-header {
    gap: 12px;
    margin-bottom: 14px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 21px;
    line-height: 1.2;
  }

  .brand-subtitle {
    line-height: 1.35;
  }

  .home-card,
  .selector-panel,
  .question-card,
  .result-hero,
  .panel,
  .report-panel {
    padding: 20px;
  }

  .home-card {
    gap: 20px;
    margin-bottom: 18px;
  }

  .home-card .hero-copy h1,
  .hero-copy h1 {
    font-size: clamp(25px, 7vw, 30px);
    line-height: 1.2;
    margin-bottom: 14px;
  }

  .home-card .hero-copy p,
  .hero-copy p,
  .selector-panel p,
  .validation-card span,
  .action-hint {
    font-size: 15px;
    line-height: 1.76;
  }

  .hero-hint {
    margin-top: 16px;
    padding: 14px 15px;
    font-size: 14px;
    line-height: 1.78;
  }

  .validation-card {
    gap: 8px;
  }

  .validation-card strong {
    font-size: 15px;
    line-height: 1.6;
  }

  .main-grid,
  .home-controls,
  .learning-plan,
  .score-breakdown {
    gap: 18px;
  }

  .selector-panel h2,
  .result-section h2,
  .learning-plan h2 {
    font-size: 22px;
    line-height: 1.32;
    margin-bottom: 10px;
  }

  .grade-grid,
  .paper-grid {
    gap: 14px;
    margin-top: 18px;
  }

  .grade-card {
    min-height: 104px;
    gap: 9px;
    padding: 18px;
  }

  .grade-card strong,
  .paper-card strong {
    font-size: 17px;
    line-height: 1.34;
  }

  .grade-card span {
    font-size: 13px;
    line-height: 1.64;
  }

  .paper-card {
    min-height: 66px;
  }

  .action-panel {
    gap: 12px;
    margin-top: 18px;
    padding: 16px;
  }

  .home-shell .action-panel .primary,
  .action-panel .primary,
  .action-panel .ghost {
    width: 100%;
    min-width: 0;
  }

  .primary,
  .secondary,
  .ghost {
    min-height: 54px;
    line-height: 1.35;
  }

  .test-header {
    gap: 12px;
    padding: 15px;
    border-radius: 22px;
  }

  .test-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand-compact {
    width: 100%;
    font-size: 16px;
    line-height: 1.35;
  }

  .brand-compact-icon {
    width: 38px;
    height: 38px;
  }

  .skill-chips {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .skill-chip,
  .paper-pill {
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
    font-size: 15px;
    line-height: 1.25;
  }

  .paper-pill {
    width: 100%;
  }

  .progress-copy {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
  }

  .top-progress {
    height: 6px;
  }

  .question-card {
    gap: 22px;
    min-height: auto;
    border-radius: 24px;
  }

  .question-head {
    margin-bottom: 0;
  }

  .question-head h1 {
    font-size: clamp(23px, 6.7vw, 29px);
    line-height: 1.42;
  }

  .eyebrow {
    line-height: 1.45;
  }

  .question-layout,
  .question-main {
    gap: 24px;
  }

  .prompt {
    font-size: clamp(22px, 6.4vw, 28px);
    line-height: 1.58;
  }

  .long-prompt {
    font-size: clamp(19px, 5.5vw, 24px);
    line-height: 1.76;
    font-weight: 820;
  }

  .reading-prompt.long-prompt {
    line-height: 1.82;
  }

  .speaking-prompt {
    font-size: clamp(22px, 6.2vw, 27px);
    line-height: 1.64;
  }

  .media-grid {
    gap: 20px;
  }

  .media-box {
    gap: 12px;
    padding: 16px;
  }

  .audio-player {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 16px;
    min-height: 76px;
  }

  .audio-play-button {
    width: 60px;
    height: 60px;
  }

  .audio-meta {
    gap: 6px;
  }

  .audio-meta strong {
    font-size: 17px;
    line-height: 1.35;
  }

  .media-status {
    font-size: 14px;
    line-height: 1.62;
  }

  .image-preview img {
    max-height: 285px;
  }

  .options {
    gap: 14px;
  }

  .card-option {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    min-height: 58px;
    padding: 15px 16px;
    line-height: 1.58;
  }

  .option-letter {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
  }

  .option-body {
    line-height: 1.58;
  }

  .option-media {
    padding: 14px;
  }

  .image-options {
    gap: 16px;
  }

  .image-options .option-image {
    max-height: 255px;
    object-fit: contain;
  }

  .fill-area,
  .ordering-area,
  .speaking-area {
    gap: 18px;
  }

  .text-answer,
  .speaking-area input,
  .speaking-area textarea {
    min-height: 58px;
    font-size: 17px;
    line-height: 1.5;
  }

  .initial-hint {
    align-items: flex-start;
    line-height: 1.66;
  }

  .passage,
  .reading-passage {
    padding: 18px;
    line-height: 1.84;
  }

  .passage-content {
    line-height: 1.84;
  }

  .reading-card .reading-layout {
    gap: 22px;
  }

  .reading-passage {
    max-height: min(54vh, 480px);
  }

  .record-controls {
    gap: 12px;
  }

  .record-controls .secondary,
  .record-controls .ghost {
    min-height: 54px;
  }

  #recordStatus {
    min-height: 40px;
    line-height: 1.66;
  }

  .student-speaking-note {
    padding: 16px;
    gap: 10px;
  }

  .student-speaking-note span {
    line-height: 1.78;
  }

  .question-actions.bottom-action-bar {
    margin: 22px -6px 0;
    padding: 12px;
    gap: 10px;
  }

  .result-hero {
    gap: 22px;
  }

  .score-summary {
    min-height: 140px;
    border-radius: 24px;
  }

  .score-summary strong {
    font-size: clamp(48px, 14vw, 60px);
  }

  .result-summary-copy h1 {
    font-size: clamp(25px, 6.7vw, 31px);
    line-height: 1.25;
  }

  .alignment-pills {
    gap: 8px;
    margin-bottom: 16px;
  }

  .alignment-pills span {
    min-height: 34px;
    line-height: 1.3;
  }

  .bars {
    gap: 14px;
  }

  .ability-badge {
    padding: 16px;
    gap: 12px;
  }

  .ability-badge p {
    font-size: 14px;
    line-height: 1.74;
  }

  .learning-plan > div {
    padding: 20px;
  }

  .learning-plan p,
  .score-note {
    line-height: 1.78;
  }

  .dev-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 12px;
    left: auto;
    right: auto;
    bottom: auto;
  }
}

@media (max-width: 430px) {
  .shell,
  .home-shell,
  .test-shell {
    width: min(100% - 16px, 960px);
  }

  .home-card,
  .selector-panel,
  .question-card,
  .result-hero,
  .panel,
  .report-panel {
    padding: 18px;
  }

  .home-card .hero-copy h1,
  .hero-copy h1 {
    font-size: clamp(25px, 6.8vw, 28px);
  }

  .question-head h1 {
    font-size: clamp(22px, 6.4vw, 27px);
  }

  .prompt {
    font-size: clamp(21px, 6.1vw, 26px);
  }

  .long-prompt {
    font-size: clamp(18px, 5.25vw, 22px);
  }

  .record-controls {
    grid-template-columns: 1fr;
  }

  .record-controls .secondary,
  .record-controls .ghost,
  #recordStatus {
    width: 100%;
  }

  .image-options .option-image {
    max-height: 235px;
  }
}

/* Mobile one-screen UI pass: tighter phone flow while keeping readable tap targets. */
@media (max-width: 768px) {
  .shell,
  .home-shell,
  .test-shell {
    width: min(100% - 14px, 960px);
    padding-top: 10px;
    padding-bottom: 22px;
  }

  .home-brand {
    margin-bottom: 10px;
  }

  .brand-header {
    gap: 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .home-card {
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    border-radius: 22px;
  }

  .home-card .hero-copy h1,
  .hero-copy h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 6.4vw, 28px);
    line-height: 1.16;
  }

  .home-card .hero-copy p,
  .hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-hint {
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.55;
  }

  .validation-card {
    gap: 6px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .validation-card strong {
    font-size: 13px;
    line-height: 1.45;
  }

  .validation-card span {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .main-grid,
  .home-controls,
  .learning-plan,
  .score-breakdown {
    gap: 12px;
  }

  .selector-panel,
  .result-section,
  .learning-plan > div {
    padding: 16px;
    border-radius: 20px;
  }

  .selector-panel h2,
  .result-section h2,
  .learning-plan h2 {
    margin-bottom: 6px;
    font-size: 19px;
    line-height: 1.25;
  }

  .selector-panel p {
    font-size: 13px;
    line-height: 1.45;
  }

  .grade-grid,
  .paper-grid {
    gap: 9px;
    margin-top: 10px;
  }

  .grade-card {
    min-height: 78px;
    gap: 5px;
    padding: 12px 13px;
    border-radius: 16px;
  }

  .grade-card strong,
  .paper-card strong {
    font-size: 15.5px;
    line-height: 1.25;
  }

  .grade-card span {
    font-size: 12.2px;
    line-height: 1.42;
  }

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

  .paper-card {
    min-height: 50px;
    padding: 8px;
    border-radius: 15px;
  }

  .paper-card strong {
    font-size: 13.5px;
  }

  .action-panel {
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border-radius: 20px;
  }

  .home-shell .action-panel .primary,
  .action-panel .primary,
  .action-panel .ghost {
    width: 100%;
    min-width: 0;
  }

  .primary,
  .secondary,
  .ghost {
    min-height: 50px;
    padding-inline: 14px;
  }

  .action-hint {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .test-shell {
    padding-top: 8px;
  }

  .test-header {
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .test-header-row {
    align-items: center;
    gap: 8px;
  }

  .brand-compact {
    width: auto;
    flex: 1 1 186px;
    font-size: 14px;
    line-height: 1.25;
  }

  .brand-compact-icon {
    width: 32px;
    height: 32px;
  }

  .paper-pill {
    width: auto;
    min-height: 32px;
    padding: 0 9px;
    font-size: 13px;
  }

  .skill-chips {
    width: 100%;
    gap: 6px;
  }

  .skill-chip {
    min-height: 32px;
    padding: 0 5px;
    font-size: 13px;
  }

  .progress-copy {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .top-progress {
    height: 5px;
  }

  .question-card {
    gap: 14px;
    padding: 16px;
    border-radius: 21px;
  }

  .question-head h1 {
    font-size: clamp(20px, 5.8vw, 25px);
    line-height: 1.34;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.35;
  }

  .question-layout,
  .question-main {
    gap: 14px;
  }

  .prompt {
    margin: 0;
    font-size: clamp(19px, 5.6vw, 24px);
    line-height: 1.48;
  }

  .long-prompt {
    font-size: clamp(16px, 4.85vw, 20px);
    font-weight: 780;
    line-height: 1.62;
  }

  .reading-prompt,
  .reading-prompt.long-prompt {
    font-size: clamp(16px, 4.8vw, 20px);
    line-height: 1.6;
  }

  .media-grid {
    gap: 10px;
  }

  .media-box {
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
  }

  .audio-player {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    min-height: 64px;
  }

  .audio-play-button {
    width: 56px;
    height: 56px;
  }

  .audio-meta {
    gap: 4px;
  }

  .audio-meta strong {
    font-size: 15.5px;
    line-height: 1.28;
  }

  .media-status {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .image-preview img {
    max-height: 210px;
  }

  .options {
    gap: 9px;
  }

  .card-option {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    min-height: 52px;
    padding: 12px;
    line-height: 1.45;
  }

  .option-letter {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .option-body {
    line-height: 1.45;
  }

  .option-media {
    padding: 10px;
    border-radius: 16px;
  }

  .question-card.image-choice-card .image-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .image-options .option.option-shell {
    overflow: hidden;
    border-radius: 16px;
  }

  .image-options .option.option-shell .card-option {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 48px;
    padding: 8px 9px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    font-size: 13px;
  }

  .image-options .option.option-shell .option-media {
    min-height: 0;
    padding: 8px;
  }

  .option-image-wrap {
    gap: 6px;
  }

  .image-options .option-image {
    width: 100%;
    max-height: 140px;
    object-fit: contain;
  }

  .option-preview-chip {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .option-image-status {
    font-size: 11.5px;
    line-height: 1.35;
  }

  .fill-area,
  .ordering-area,
  .speaking-area {
    gap: 10px;
  }

  .text-answer,
  .speaking-area input,
  .speaking-area textarea {
    min-height: 54px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .initial-hint {
    font-size: 13px;
    line-height: 1.5;
  }

  .reading-card {
    padding: 14px;
  }

  .reading-card .reading-layout {
    gap: 12px;
  }

  .passage,
  .reading-passage {
    padding: 14px;
    line-height: 1.75;
  }

  .passage-kicker {
    margin-bottom: 6px;
    font-size: 12.5px;
  }

  .passage-content {
    gap: 8px;
    line-height: 1.78;
  }

  .reading-passage {
    max-height: min(34vh, 290px);
  }

  .speaking-card .question-head h1 {
    font-size: clamp(20px, 5.8vw, 24px);
  }

  .speaking-card .media-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .speaking-card .media-box {
    padding: 11px;
  }

  .speaking-card .image-preview img {
    max-height: 190px;
  }

  .speaking-prompt {
    font-size: clamp(19px, 5.6vw, 23px);
    line-height: 1.48;
  }

  .speaking-card .record-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .speaking-card .record-controls .secondary,
  .speaking-card .record-controls .ghost {
    min-height: 48px;
    padding-inline: 8px;
    font-size: 13.5px;
  }

  .speaking-card #recordStatus {
    grid-column: 1 / -1;
    min-height: 30px;
    font-size: 12.5px;
    line-height: 1.45;
  }

  .speaking-card #recordStatus::before {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.09);
  }

  .playback-area {
    gap: 6px;
  }

  .playback-area audio {
    height: 36px;
  }

  .student-speaking-note {
    gap: 6px;
    padding: 11px 12px;
  }

  .student-speaking-note strong {
    font-size: 14px;
    line-height: 1.35;
  }

  .student-speaking-note span {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .question-actions.bottom-action-bar {
    display: grid;
    grid-template-columns: minmax(92px, 0.75fr) minmax(0, 1.25fr);
    gap: 8px;
    margin: 14px -4px 0;
    padding: 10px;
    border-radius: 18px;
  }

  .question-actions.bottom-action-bar .primary,
  .question-actions.bottom-action-bar .ghost {
    width: 100%;
    min-height: 50px;
  }

  .result-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
  }

  .score-summary {
    min-height: 112px;
    padding: 14px;
    border-radius: 20px;
  }

  .score-summary strong {
    font-size: clamp(42px, 13vw, 54px);
  }

  .score-summary span,
  .score-summary small {
    font-size: 12px;
  }

  .result-summary-copy h1 {
    margin-bottom: 10px;
    font-size: clamp(22px, 6vw, 26px);
    line-height: 1.18;
  }

  .alignment-pills {
    gap: 6px;
    margin: 8px 0 10px;
  }

  .alignment-pills span {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .result-summary-copy p,
  .learning-plan p,
  .score-note {
    font-size: 13.5px;
    line-height: 1.58;
  }

  .ability-badge {
    gap: 8px;
    padding: 13px;
  }

  .ability-badge p {
    font-size: 12.8px;
    line-height: 1.55;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .home-controls {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .question-card.image-choice-card .image-options {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .image-options .option-image {
    max-height: 150px;
  }

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

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

  .reading-card .reading-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .reading-passage {
    max-height: min(42vh, 360px);
  }

  .result-hero {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .shell,
  .home-shell,
  .test-shell {
    width: min(100% - 12px, 960px);
  }

  .home-card,
  .selector-panel,
  .question-card,
  .result-hero,
  .panel,
  .report-panel {
    padding: 14px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .home-card .hero-copy h1,
  .hero-copy h1 {
    font-size: clamp(23px, 6.2vw, 26px);
  }

  .grade-card {
    min-height: 72px;
    padding: 11px 12px;
  }

  .paper-card {
    min-height: 48px;
  }

  .test-header {
    padding: 9px 10px;
  }

  .brand-compact {
    font-size: 13.5px;
  }

  .skill-chip {
    font-size: 12.5px;
  }

  .question-card {
    padding: 14px;
  }

  .question-head h1 {
    font-size: clamp(19px, 5.5vw, 23px);
  }

  .prompt {
    font-size: clamp(18px, 5.3vw, 22px);
  }

  .image-preview img {
    max-height: 190px;
  }

  .image-options .option-image {
    max-height: 125px;
  }

  .speaking-card .image-preview img {
    max-height: 170px;
  }

  .speaking-card .record-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 390px) {
  .home-card,
  .selector-panel,
  .question-card,
  .result-hero,
  .panel,
  .report-panel {
    padding: 13px;
  }

  .home-card .hero-copy h1,
  .hero-copy h1 {
    font-size: clamp(22px, 6vw, 25px);
  }

  .hero-hint {
    padding: 9px 10px;
  }

  .grade-card span {
    font-size: 12px;
  }

  .brand-compact-icon {
    width: 30px;
    height: 30px;
  }

  .image-options .option-image {
    max-height: 118px;
  }

  .speaking-card .image-preview img {
    max-height: 160px;
  }
}

/* 2026-08-17 result learning path: compact report + evidence-backed accordion. */
body .actual-grade-picker {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px);
  align-items: center;
  justify-content: end;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4e9f0;
}

body .actual-grade-picker label {
  color: #4e5f73;
  font-size: 14px;
  font-weight: 750;
}

body .actual-grade-picker select {
  width: 100%;
  min-height: 46px;
  padding: 0 38px 0 14px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  color: #0e2a47;
  background: #fff;
  font: inherit;
  font-weight: 750;
}

body .od-result-page {
  width: min(940px, calc(100% - 28px));
  padding-bottom: 64px;
  color: #0e2a47;
}

body .od-report-cover--compact {
  padding: 28px 30px 30px;
  border: 1px solid #dce4ed;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(14, 42, 71, .07);
}

body .od-report-edition {
  padding: 7px 10px;
  border: 1px solid #d6e2f1;
  border-radius: 999px;
  color: #60758d;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
}

body .od-result-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: 34px;
  align-items: center;
  margin-top: 30px;
}

body .od-result-kicker {
  margin: 0 0 10px;
  color: #1769ff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .17em;
}

body .od-result-summary-copy h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(27px, 4vw, 42px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.025em;
}

body .od-result-level-row {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  margin: 24px 0 18px;
}

body .od-report-cover--compact .od-report-level,
body .od-report-cover--compact .od-report-score {
  margin: 0;
}

body .od-report-cover--compact .od-report-level span {
  color: #0e2a47;
  font-size: clamp(48px, 7vw, 72px);
}

body .od-report-cover--compact .od-report-level strong {
  margin-left: 8px;
  color: #1769ff;
  font-size: clamp(58px, 8vw, 84px);
}

body .od-report-cover--compact .od-report-score {
  padding-bottom: 5px;
}

body .od-report-cover--compact .od-report-score strong {
  color: #1769ff;
  font-size: 35px;
}

body .od-report-cover--compact .od-report-score span {
  margin-left: 6px;
  font-size: 14px;
}

body .od-report-cover--compact .od-report-alignment span {
  padding: 7px 10px;
  color: #315779;
  background: #eef4ff;
  font-size: 11px;
}

body .od-result-summary-text {
  margin: 18px 0 0;
  color: #586a7e;
  font-size: 14px;
  line-height: 1.7;
}

body .od-report-cover--compact .od-report-excluded {
  margin: 9px 0 0;
  color: #65778d;
}

body .od-result-signal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

body .od-result-signal-row > span {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  background: #fafbfc;
}

body .od-result-signal-row small,
body .od-result-signal-row strong {
  display: block;
}

body .od-result-signal-row small {
  color: #7a899a;
  font-size: 11px;
}

body .od-result-signal-row strong {
  margin-top: 4px;
  overflow: hidden;
  color: #0e2a47;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .od-result-radar-panel {
  min-width: 0;
  padding: 14px 14px 6px;
  border-left: 1px solid #e1e7ef;
}

body .od-result-radar-panel .od-report-section-title {
  gap: 10px;
  margin: 0 0 4px;
  font-size: 16px;
}

body .od-result-radar-panel .od-radar-stage {
  width: 100%;
  height: 330px;
}

body .od-result-radar-panel .od-radar-chart {
  width: 205px;
  height: 205px;
}

body .od-result-radar-panel .od-radar-caption {
  gap: 5px;
}

body .od-result-radar-panel .od-radar-caption > span {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

body .od-result-radar-panel .od-radar-caption strong {
  font-size: 11px;
}

body .od-result-radar-panel .od-radar-caption small {
  font-size: 18px;
}

body .od-result-radar-panel .caption-grammar { right: 0; top: 106px; }
body .od-result-radar-panel .caption-reading { right: 24px; bottom: 8px; }
body .od-result-radar-panel .caption-speaking { left: 24px; bottom: 8px; }
body .od-result-radar-panel .caption-vocabulary { left: 0; top: 106px; }

body .od-learning-recommendation {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid #dce4ed;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(14, 42, 71, .055);
}

body .od-learning-recommendation[data-recommendation-status="conditional"],
body .od-learning-recommendation[data-recommendation-status="teacher_review"] {
  border-color: #cbd9ea;
}

body .od-learning-toggle {
  width: 100%;
  min-height: 118px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px 26px;
  border: 0;
  color: inherit;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

body .od-learning-toggle:hover {
  background: #fbfcfe;
}

body .od-learning-toggle-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: #0e2a47;
  font-family: Georgia, serif;
  font-size: 31px;
  transform: rotate(-12deg);
}

body .od-learning-toggle-cover {
  position: relative;
  width: 68px;
  height: 76px;
  display: block;
}

body .od-learning-toggle-cover > span {
  position: absolute;
  z-index: calc(10 - var(--cover-index));
  left: calc(8px + var(--cover-index) * 9px);
  top: calc(5px + var(--cover-index) * 2px);
  width: 48px;
  height: 66px;
  overflow: hidden;
  border: 1px solid #d4deea;
  border-radius: 5px;
  background: #f3f6fa;
  box-shadow: 0 7px 15px rgba(14, 42, 71, .13);
}

body .od-learning-toggle-cover.is-complete-set > span {
  left: calc(1px + var(--cover-index) * 7px);
  top: calc(6px + var(--cover-index) * 1px);
  width: 40px;
  height: 58px;
}

body .od-learning-toggle-cover:not(.is-stack) > span {
  left: 10px;
}

body .od-learning-toggle-cover > span > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 5px;
  color: #74859a;
  background: #f3f6fa;
  font-size: 7px;
  line-height: 1.2;
  text-align: center;
}

body .od-learning-toggle-cover img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

body .od-learning-toggle-copy {
  min-width: 0;
}

body .od-learning-toggle-copy small,
body .od-learning-toggle-copy strong,
body .od-learning-toggle-copy em {
  display: block;
}

body .od-learning-toggle-copy small {
  color: #1769ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .08em;
}

body .od-learning-toggle-copy strong {
  margin-top: 5px;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 650;
}

body .od-learning-toggle-copy em {
  margin-top: 7px;
  overflow: hidden;
  color: #6a798b;
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .od-learning-toggle-action {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #1769ff;
  font-size: 13px;
}

body .od-learning-toggle-action b {
  font-weight: 800;
}

body .od-learning-toggle-action i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #d4e0ef;
  border-radius: 50%;
  font-size: 19px;
  font-style: normal;
  transition: transform .2s ease;
}

body .od-learning-toggle[aria-expanded="true"] .od-learning-toggle-action i {
  transform: rotate(180deg);
}

body .od-learning-detail {
  padding: 0 26px 28px;
  border-top: 1px solid #e3e9f0;
  scroll-margin-top: 16px;
}

body .od-learning-detail[hidden] {
  display: none;
}

body .od-learning-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0 16px;
}

body .od-learning-evidence span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #315779;
  background: #eef4ff;
  font-size: 11px;
  font-weight: 750;
}

body .od-learning-review-copy {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 3px solid #1769ff;
  color: #53677d;
  background: #f7f9fc;
  font-size: 13px;
  line-height: 1.6;
}

body .od-path-rows {
  display: grid;
  gap: 10px;
}

body .od-path-row {
  min-height: 126px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 18px;
  padding: 14px 18px 14px 12px;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: #fff;
}

body .od-path-row > i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1769ff;
  background: #eef4ff;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

body .od-product-art {
  position: relative;
  width: 96px;
  height: 98px;
  display: grid;
  place-items: center;
}

body .od-product-art--plan {
  width: 76px;
  height: 76px;
  margin-left: 10px;
  border: 1px solid #d7e2f0;
  border-radius: 24px;
  color: #1769ff;
  background: linear-gradient(145deg, #f4f8ff, #eaf2ff);
}

body .od-product-art--plan span,
body .od-product-art--plan small {
  display: block;
  text-align: center;
}

body .od-product-art--plan span {
  font-size: 25px;
  font-weight: 800;
}

body .od-product-art--plan small {
  margin-top: 3px;
  color: #5e7899;
  font-size: 8px;
  letter-spacing: .12em;
}

body .od-product-cover-frame {
  position: absolute;
  z-index: calc(10 - var(--cover-index));
  left: calc(12px + var(--cover-index) * 17px);
  top: calc(2px + var(--cover-index) * 2px);
  width: 66px;
  height: 92px;
  overflow: hidden;
  border: 1px solid #d3dce8;
  border-radius: 7px;
  background: #eef3f8;
  box-shadow: 0 8px 16px rgba(14,42,71,.12);
}

body .od-product-art--complete-set .od-product-cover-frame {
  left: calc(1px + var(--cover-index) * 11px);
  top: calc(7px + var(--cover-index) * 2px);
  width: 51px;
  height: 74px;
}

body .od-product-art:not(.od-product-art--stack) .od-product-cover-frame {
  left: 15px;
  width: 68px;
}

body .od-product-cover-frame img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

body .od-product-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6px;
  color: #74859a;
  background: #f3f6fa;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
}

body .od-path-row-copy {
  min-width: 0;
}

body .od-path-row-copy > span {
  color: #1769ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}

body .od-path-row-copy h3 {
  margin: 5px 0 0;
  color: #0e2a47;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(19px, 2.7vw, 25px);
  font-weight: 650;
  line-height: 1.25;
}

body .od-path-row-copy p {
  margin: 6px 0 0;
  color: #68798c;
  font-size: 12px;
  line-height: 1.55;
}

body .od-path-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

body .od-path-products small {
  padding: 5px 7px;
  border-radius: 7px;
  color: #52687e;
  background: #f1f4f8;
  font-size: 10px;
}

body .od-path-review-empty {
  padding: 24px;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: #fafbfc;
}

body .od-path-review-empty strong {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 22px;
}

body .od-path-review-empty p,
body .od-learning-method-note {
  color: #68798c;
  font-size: 12px;
  line-height: 1.65;
}

body .od-path-review-empty p {
  margin: 8px 0 0;
}

body .od-learning-method-note {
  margin: 16px 0 0;
}

body .od-result-page > .od-result-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, .44fr);
  margin-top: 18px;
}

body .od-result-page > .od-result-actions .primary,
body .od-result-page > .od-result-actions .secondary {
  min-height: 56px;
  border-radius: 14px;
}

body .od-result-page > .od-result-actions .ghost {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  body .actual-grade-picker {
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 7px;
  }

  body .od-result-page {
    width: min(100% - 16px, 560px);
    padding-top: 6px;
  }

  body .od-report-cover--compact {
    padding: 20px 16px 22px;
    border-radius: 19px;
  }

  body .od-report-cover--compact .od-report-brand strong {
    font-size: 19px;
  }

  body .od-report-cover--compact .od-report-brand small {
    max-width: 180px;
  }

  body .od-result-summary-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 25px;
  }

  body .od-result-summary-copy h1 {
    font-size: clamp(26px, 8vw, 34px);
  }

  body .od-result-level-row {
    gap: 18px;
    margin-top: 20px;
  }

  body .od-report-cover--compact .od-report-level span {
    font-size: 48px;
  }

  body .od-report-cover--compact .od-report-level strong {
    font-size: 62px;
  }

  body .od-report-cover--compact .od-report-score strong {
    font-size: 30px;
  }

  body .od-result-radar-panel {
    padding: 20px 0 0;
    border-top: 1px solid #e1e7ef;
    border-left: 0;
  }

  body .od-result-radar-panel .od-radar-stage {
    width: min(360px, 100%);
    height: 320px;
  }

  body .od-learning-recommendation {
    border-radius: 18px;
  }

  body .od-learning-toggle {
    min-height: 102px;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 19px 15px;
  }

  body .od-learning-toggle-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 26px;
  }

  body .od-learning-toggle-cover {
    width: 56px;
    height: 66px;
  }

  body .od-learning-toggle-cover > span {
    left: calc(3px + var(--cover-index) * 7px);
    top: calc(4px + var(--cover-index) * 2px);
    width: 42px;
    height: 58px;
  }

  body .od-learning-toggle-cover.is-complete-set > span {
    left: calc(1px + var(--cover-index) * 5px);
    top: calc(5px + var(--cover-index) * 1px);
    width: 34px;
    height: 52px;
  }

  body .od-learning-toggle-cover:not(.is-stack) > span {
    left: 7px;
  }

  body .od-learning-toggle-copy strong {
    font-size: 21px;
  }

  body .od-learning-toggle-copy em {
    max-width: 100%;
    font-size: 11px;
  }

  body .od-learning-toggle-action b {
    display: none;
  }

  body .od-learning-detail {
    padding: 0 14px 20px;
  }

  body .od-path-row {
    min-height: 112px;
    grid-template-columns: 82px minmax(0, 1fr) 22px;
    gap: 10px;
    padding: 12px 11px 12px 7px;
    border-radius: 14px;
  }

  body .od-product-art {
    width: 78px;
    height: 88px;
  }

  body .od-product-art--plan {
    width: 58px;
    height: 58px;
    margin-left: 10px;
    border-radius: 19px;
  }

  body .od-product-cover-frame {
    left: calc(5px + var(--cover-index) * 11px);
    width: 57px;
    height: 80px;
  }

  body .od-product-art--complete-set .od-product-cover-frame {
    left: calc(1px + var(--cover-index) * 8px);
    top: calc(8px + var(--cover-index) * 2px);
    width: 44px;
    height: 64px;
  }

  body .od-product-art:not(.od-product-art--stack) .od-product-cover-frame {
    left: 10px;
    width: 58px;
  }

  body .od-path-row-copy h3 {
    font-size: 18px;
  }

  body .od-path-row-copy p {
    font-size: 11px;
  }

  body .od-path-row > i {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  body .od-result-page > .od-result-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  body .od-result-signal-row {
    grid-template-columns: 1fr;
  }

  body .od-learning-toggle-copy em {
    max-width: 190px;
  }

  body .od-path-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  body .od-path-row-copy h3 {
    font-size: 16px;
    line-height: 1.22;
  }

  body .od-path-row > i {
    display: none;
  }

  body .od-product-art {
    transform: scale(.84);
    transform-origin: center;
  }
}

@media print {
  body .od-learning-detail[hidden] {
    display: block;
  }

  body .od-learning-toggle-action,
  body .od-result-topbar,
  body .od-result-page > .od-result-actions {
    display: none !important;
  }

  body .od-report-cover--compact,
  body .od-learning-recommendation {
    border: 1px solid #dce4ed;
    box-shadow: none;
  }
}

/* Home quick-start pass: make the landing screen lighter and faster to begin. */
.home-shell {
  max-width: 920px;
}

.home-brand-quick {
  min-height: 40px;
  margin-bottom: 10px;
}

.home-brand-quick .brand-mark {
  width: 38px;
  height: 38px;
}

.home-brand-quick .brand-name {
  font-size: 18px;
  line-height: 1.16;
}

.home-brand-quick .brand-subtitle {
  color: var(--xf-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.home-quick-card {
  display: grid;
  gap: 12px;
  padding: 22px 24px;
}

.home-quick-card .hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 4.2vw, 46px);
  line-height: 1.1;
}

.home-quick-card .hero-copy p {
  margin: 0;
  color: #4b5563;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.48;
}

.home-ready-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.home-tip,
.home-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1.25;
}

.home-tip {
  padding: 7px 12px;
  color: #4b5563;
  background: #fff7f7;
  border: 1px solid var(--xf-line);
}

.home-tip::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--xf-red);
}

.home-status-chip {
  padding: 7px 11px;
  font-size: 13px;
}

.home-status-chip.ok {
  color: var(--xf-red-dark);
  background: rgba(255, 241, 241, 0.8);
  border: 1px solid rgba(215, 25, 32, 0.14);
}

.home-status-chip.blocked {
  color: var(--xf-red-dark);
  background: #fff7f7;
  border: 1px solid rgba(215, 25, 32, 0.3);
}

.home-dev-status {
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 14px;
}

.home-controls {
  align-items: start;
  gap: 12px;
}

.home-controls .selector-panel {
  padding: 18px;
  border-radius: 22px;
}

.home-controls .selector-panel h2 {
  margin-bottom: 5px;
  font-size: 20px;
  line-height: 1.22;
}

.home-controls .selector-panel p {
  margin: 0;
  color: var(--xf-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.38;
}

.home-controls .grade-grid {
  gap: 10px;
  margin-top: 12px;
}

.home-controls .grade-card {
  position: relative;
  min-height: 72px;
  gap: 4px;
  padding: 13px 42px 13px 15px;
  border-radius: 18px;
}

.home-controls .grade-card strong {
  font-size: 16px;
  line-height: 1.22;
}

.home-controls .grade-card span {
  color: var(--xf-muted);
  font-size: 13px;
  line-height: 1.25;
}

.home-controls .grade-card.selected::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: var(--xf-red);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 1000;
}

.paper-selector-panel {
  align-self: stretch;
}

.paper-selector {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.paper-selector .paper-card {
  min-height: 48px;
  padding: 8px;
  border-radius: 16px;
}

.paper-selector .paper-card strong {
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.start-section {
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 22px;
}

.start-section .primary {
  width: 100%;
  min-height: 56px;
  border-radius: 20px;
  font-size: 17px;
}

.start-section .action-hint {
  font-size: 13px;
  line-height: 1.36;
}

@media (min-width: 769px) {
  .home-controls {
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  }
}

@media (max-width: 768px) {
  .home-shell {
    width: min(100% - 12px, 760px);
    padding-top: 8px;
    padding-bottom: 18px;
  }

  .home-brand-quick {
    min-height: 36px;
    margin-bottom: 7px;
  }

  .home-brand-quick .brand-mark {
    width: 32px;
    height: 32px;
  }

  .home-brand-quick .brand-name {
    font-size: 16px;
  }

  .home-brand-quick .brand-subtitle {
    font-size: 11px;
  }

  .home-quick-card {
    gap: 9px;
    margin-bottom: 10px;
    padding: 14px;
    border-radius: 20px;
  }

  .home-quick-card .hero-copy h1 {
    margin-bottom: 6px;
    font-size: clamp(27px, 7vw, 32px);
    line-height: 1.13;
  }

  .home-quick-card .hero-copy p {
    font-size: 15px;
    line-height: 1.4;
  }

  .home-ready-row {
    gap: 7px;
  }

  .home-tip,
  .home-status-chip {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12.5px;
  }

  .home-controls {
    gap: 10px;
  }

  .home-controls .selector-panel {
    padding: 14px;
    border-radius: 20px;
  }

  .home-controls .selector-panel h2 {
    font-size: 18px;
  }

  .home-controls .selector-panel p {
    font-size: 12.5px;
  }

  .home-controls .grade-grid {
    gap: 8px;
    margin-top: 10px;
  }

  .home-controls .grade-card {
    min-height: 66px;
    padding: 11px 40px 11px 13px;
    border-radius: 16px;
  }

  .home-controls .grade-card strong {
    font-size: 15px;
  }

  .home-controls .grade-card span {
    font-size: 12.5px;
  }

  .home-controls .grade-card.selected::after {
    top: 10px;
    right: 12px;
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .paper-selector {
    gap: 7px;
    margin-top: 10px;
  }

  .paper-selector .paper-card {
    min-height: 48px;
    border-radius: 15px;
  }

  .start-section {
    margin-top: 10px;
    padding: 10px;
    border-radius: 20px;
  }

  .start-section .primary {
    min-height: 54px;
  }
}

@media (max-width: 430px) {
  .home-shell {
    width: min(100% - 10px, 760px);
  }

  .home-quick-card,
  .home-controls .selector-panel {
    padding: 12px;
  }

  .home-quick-card .hero-copy h1 {
    font-size: clamp(26px, 6.7vw, 30px);
  }

  .home-controls .grade-card {
    min-height: 62px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .start-section .action-hint {
    font-size: 12.5px;
  }
}

@media (max-width: 390px) {
  .home-quick-card .hero-copy h1 {
    font-size: clamp(25px, 6.5vw, 28px);
  }

  .home-tip,
  .home-status-chip {
    font-size: 12px;
  }
}

/* Home restraint pass: quieter education-product entry, with red reserved for the primary action. */
.home-shell {
  max-width: 880px;
}

.home-brand-quick {
  color: #202124;
}

.home-brand-quick .brand-mark {
  box-shadow: 0 6px 14px rgba(28, 36, 54, 0.08);
}

.home-brand-quick .brand-name {
  font-weight: 850;
}

.home-brand-quick .brand-subtitle {
  color: #7a828f;
  font-weight: 700;
}

.home-quick-card,
.home-controls .selector-panel,
.start-section {
  border-color: rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.055);
}

.home-quick-card {
  gap: 14px;
}

.home-quick-card .hero-copy h1 {
  color: #151515;
  font-weight: 850;
}

.home-quick-card .hero-copy p {
  color: #5b6472;
  font-weight: 650;
}

.home-ready-row {
  gap: 9px;
}

.home-tip,
.home-status-chip {
  min-height: 30px;
  color: #5b6472;
  background: #f8f7f7;
  border: 1px solid rgba(31, 41, 55, 0.075);
  font-weight: 700;
}

.home-tip::before {
  width: 6px;
  height: 6px;
  background: #9ca3af;
}

.home-status-chip.ok {
  color: #59616d;
  background: #f7f7f5;
  border-color: rgba(31, 41, 55, 0.075);
}

.home-status-chip.blocked {
  color: #8a4b4b;
  background: #fff8f8;
  border-color: rgba(138, 75, 75, 0.16);
}

.home-controls {
  gap: 14px;
}

.home-controls .selector-panel h2 {
  color: #202124;
  font-weight: 850;
}

.home-controls .selector-panel p {
  color: #7a828f;
  font-weight: 650;
}

.home-controls .grade-card,
.paper-selector .paper-card {
  color: #202124;
  border-color: rgba(31, 41, 55, 0.095);
  background: #fff;
  box-shadow: none;
}

.home-controls .grade-card:hover,
.paper-selector .paper-card:hover {
  background: #fffdfd;
  border-color: rgba(31, 41, 55, 0.18);
  transform: translateY(-1px);
}

.home-controls .grade-card.selected,
.paper-selector .paper-card.selected {
  color: #202124;
  background: #fffafa;
  border-color: rgba(215, 25, 32, 0.24);
  box-shadow:
    inset 3px 0 0 rgba(215, 25, 32, 0.62),
    0 6px 16px rgba(31, 41, 55, 0.05);
}

.home-controls .grade-card.selected span {
  color: #6f7783;
}

.home-controls .grade-card.selected::after {
  top: 14px;
  right: 15px;
  width: auto;
  height: auto;
  color: rgba(181, 18, 24, 0.82);
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  line-height: 1;
}

.paper-selector .paper-card.selected {
  box-shadow: inset 0 -2px 0 rgba(215, 25, 32, 0.58);
}

.start-section {
  background: rgba(255, 255, 255, 0.9);
}

.start-section .primary {
  color: #fff;
  background: var(--xf-red);
  box-shadow: 0 10px 24px rgba(215, 25, 32, 0.18);
}

.start-section .primary:hover {
  background: var(--xf-red-dark);
  transform: translateY(-1px);
}

.start-section .action-hint {
  color: #7a828f;
  font-weight: 650;
}

@media (max-width: 768px) {
  .home-quick-card,
  .home-controls .selector-panel,
  .start-section {
    box-shadow: 0 7px 18px rgba(31, 41, 55, 0.045);
  }

  .home-controls .grade-card.selected::after {
    top: 12px;
    right: 13px;
  }
}

@media (max-width: 430px) {
  .home-shell {
    width: min(100% - 14px, 760px);
  }

  .home-ready-row {
    gap: 6px;
  }

  .home-tip,
  .home-status-chip {
    padding-inline: 9px;
    font-weight: 650;
  }
}

/* Home restraint refinement: reduce red surfaces further while preserving clear affordance. */
body:has(.home-shell) {
  background:
    linear-gradient(180deg, rgba(255, 246, 246, 0.42), rgba(255, 255, 255, 0) 46%),
    #fbfaf9;
}

.home-quick-card,
.home-controls .selector-panel,
.start-section {
  border-color: rgba(17, 24, 39, 0.07);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
}

.home-quick-card .hero-copy h1 {
  font-size: clamp(31px, 3.9vw, 43px);
  font-weight: 800;
}

.home-quick-card .hero-copy p {
  color: #626b78;
  font-weight: 620;
}

.home-tip,
.home-status-chip,
.home-status-chip.ok {
  color: #626b78;
  background: #f7f6f4;
  border-color: rgba(17, 24, 39, 0.07);
}

.home-controls .selector-panel h2 {
  font-weight: 800;
}

.home-controls .grade-card,
.paper-selector .paper-card {
  border-color: rgba(17, 24, 39, 0.085);
}

.home-controls .grade-card strong,
.paper-selector .paper-card strong {
  font-weight: 760;
}

.home-controls .grade-card.selected,
.paper-selector .paper-card.selected {
  background: #fff;
  border-color: rgba(17, 24, 39, 0.095);
  box-shadow: inset 2px 0 0 rgba(215, 25, 32, 0.38);
}

.paper-selector .paper-card.selected {
  box-shadow: inset 0 -2px 0 rgba(215, 25, 32, 0.30);
}

.home-controls .grade-card.selected::after {
  color: rgba(181, 18, 24, 0.58);
}

.start-section {
  border-color: rgba(17, 24, 39, 0.065);
}

.start-section .primary {
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(215, 25, 32, 0.16);
}

@media (max-width: 768px) {
  .home-quick-card .hero-copy h1 {
    font-size: clamp(25px, 6.5vw, 30px);
  }

  .home-quick-card,
  .home-controls .selector-panel,
  .start-section {
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.035);
  }
}

@media (max-width: 390px) {
  .home-quick-card .hero-copy h1 {
    font-size: clamp(24px, 6.2vw, 27px);
  }
}

/* Test-page comfort pass: compact assessment surfaces without changing assessment logic. */
.test-shell {
  gap: 12px;
}

.test-header {
  gap: 9px;
  padding: 12px 14px;
  border-color: rgba(17, 24, 39, 0.075);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.045);
}

.test-header-row {
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 10px;
}

.brand-compact {
  gap: 8px;
  color: #202124;
  font-weight: 820;
}

.brand-compact-text {
  color: inherit;
  font: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-compact-icon {
  box-shadow: 0 5px 12px rgba(28, 36, 54, 0.08);
}

.skill-chips {
  flex-wrap: nowrap;
}

.skill-chip,
.paper-pill {
  min-height: 30px;
  padding: 0 10px;
  border-color: rgba(17, 24, 39, 0.08);
  color: #626b78;
  background: #fff;
  font-size: 14px;
  font-weight: 760;
}

.skill-chip.active {
  color: var(--xf-red-dark);
  border-color: rgba(215, 25, 32, 0.26);
  background: #fff8f8;
}

.skill-chip.done {
  color: #6f7783;
  border-color: rgba(17, 24, 39, 0.08);
  background: #f8f7f7;
}

.paper-pill {
  color: #626b78;
  background: #f8f7f7;
}

.progress-copy {
  margin: -2px 0 0;
  color: #7a828f;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.top-progress {
  height: 5px;
  background: #f1eeee;
}

.question-card--compact {
  gap: 16px;
  min-height: 0;
  border-color: rgba(17, 24, 39, 0.075);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.045);
}

.question-card--compact .question-head {
  margin-bottom: 0;
}

.question-card--compact .question-head h1 {
  max-width: 780px;
  line-height: 1.3;
}

.question-card--compact .eyebrow {
  color: var(--xf-red-dark);
  font-size: 13px;
}

.question-card--compact .question-layout,
.question-card--compact .question-main {
  gap: 14px;
}

.question-card--compact .media-grid {
  gap: 12px;
  margin-bottom: 0;
}

.question-card--compact .media-box {
  gap: 8px;
  padding: 12px;
  border-color: rgba(17, 24, 39, 0.075);
  background: #fff;
}

.question-card--compact .audio-player {
  min-height: 60px;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
}

.question-card--compact .audio-meta strong {
  font-size: 15px;
  font-weight: 820;
}

.question-card--compact .media-status {
  font-size: 12.5px;
  line-height: 1.36;
}

.question-card--compact .prompt {
  line-height: 1.42;
}

.question-card--compact .long-prompt,
.reading-card .reading-prompt {
  color: #202124;
  font-weight: 700;
}

.speaking-card .speaking-prompt {
  font-weight: 780;
}

.question-card--compact .options {
  gap: 9px;
}

.question-card--compact .card-option {
  min-height: 52px;
  padding: 12px 14px;
  border-color: rgba(17, 24, 39, 0.09);
  line-height: 1.42;
}

.question-card--compact .card-option.selected {
  border-color: rgba(215, 25, 32, 0.26);
  background: #fff8f8;
  box-shadow: inset 3px 0 0 rgba(215, 25, 32, 0.45);
}

.question-card--compact .option-media {
  padding: 10px;
  border-color: rgba(17, 24, 39, 0.08);
}

.has-audio-options .option.option-shell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background: #fff;
}

.has-audio-options .option.option-shell.selected {
  border-color: rgba(215, 25, 32, 0.28);
  background: #fff8f8;
  box-shadow: inset 3px 0 0 rgba(215, 25, 32, 0.42);
}

.has-audio-options .option.option-shell .card-option {
  grid-template-columns: 1fr;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: none;
}

.has-audio-options .option.option-shell .card-option.selected {
  background: transparent;
  box-shadow: none;
}

.has-audio-options .option.option-shell .option-body {
  display: none;
}

.has-audio-options .option.option-shell .option-letter {
  place-self: center;
}

.has-audio-options .option.option-shell .option-media {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.has-audio-options .option.option-shell .option-media:hover,
.has-audio-options .option.option-shell .option-media:focus-visible {
  background: transparent;
}

.question-card--compact .image-preview img {
  max-height: 220px;
}

.question-card--compact .option-image {
  max-height: 160px;
}

.question-card--compact .text-answer {
  min-height: 54px;
  border-color: rgba(17, 24, 39, 0.09);
}

.ordering-card .word {
  min-height: 48px;
  min-width: 48px;
  border-color: rgba(17, 24, 39, 0.09);
}

.reading-card .reading-layout {
  gap: 14px;
}

.reading-card .reading-passage {
  max-height: min(38vh, 340px);
  border-color: rgba(17, 24, 39, 0.075);
  background: #fff;
}

.reading-card .passage-content {
  line-height: 1.72;
}

.question-type--reading_fill_blank .prompt.long-prompt,
.question-type--reading_fill_blank_initial_given .prompt.long-prompt {
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 640;
  line-height: 1.62;
}

.speaking-card .media-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: stretch;
}

.speaking-card .image-preview img {
  max-height: 190px;
}

.speaking-card .speaking-area {
  gap: 10px;
}

.speaking-card .record-controls {
  gap: 8px;
}

.speaking-card .record-controls .secondary,
.speaking-card .record-controls .ghost {
  min-height: 48px;
  min-width: 108px;
  padding-inline: 10px;
}

.speaking-card #recordStatus {
  min-height: 34px;
  font-size: 12.5px;
}

.speaking-card .student-speaking-note {
  gap: 6px;
  padding: 11px 12px;
  border-color: rgba(17, 24, 39, 0.075);
  background: #fff8f8;
}

.speaking-card .student-speaking-note strong,
.speaking-card .student-speaking-note span {
  font-size: 12.5px;
  line-height: 1.42;
}

.question-actions.bottom-action-bar {
  margin-top: 12px;
  padding-top: 9px;
}

@media (max-width: 768px) {
  .test-shell {
    width: min(100% - 14px, 960px);
    gap: 8px;
    padding-top: 8px;
  }

  .test-header {
    gap: 6px;
    margin-bottom: 0;
    padding: 8px 9px;
    border-radius: 18px;
  }

  .test-header-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
  }

  .brand-compact {
    width: auto;
    flex: initial;
    font-size: 12.5px;
  }

  .brand-compact-icon {
    width: 26px;
    height: 26px;
  }

  .skill-chips {
    width: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .skill-chip,
  .paper-pill {
    min-height: 28px;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1.15;
  }

  .paper-pill {
    width: auto;
    min-width: 40px;
  }

  .progress-copy {
    display: none;
  }

  .top-progress {
    height: 4px;
  }

  .question-card--compact {
    gap: 11px;
    padding: 13px;
    border-radius: 20px;
  }

  .question-card--compact .question-head h1 {
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.24;
  }

  .question-card--compact .eyebrow {
    margin-bottom: 3px;
    font-size: 12px;
  }

  .question-card--compact .question-layout,
  .question-card--compact .question-main {
    gap: 10px;
  }

  .question-card--compact .media-grid {
    gap: 8px;
  }

  .question-card--compact .media-box {
    gap: 6px;
    padding: 10px;
    border-radius: 15px;
  }

  .question-card--compact .audio-player {
    min-height: 56px;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .question-card--compact .audio-play-button {
    width: 52px;
    height: 52px;
    box-shadow: 0 7px 16px rgba(215, 25, 32, 0.16);
  }

  .question-card--compact .audio-meta strong {
    font-size: 14px;
  }

  .question-card--compact .media-status {
    font-size: 11.5px;
    line-height: 1.3;
  }

  .question-card--compact .prompt {
    font-size: clamp(17px, 5vw, 21px);
    line-height: 1.34;
  }

  .question-card--compact .long-prompt {
    font-size: clamp(15px, 4.45vw, 18px);
    line-height: 1.54;
    font-weight: 680;
  }

  .question-type--reading_fill_blank .prompt.long-prompt,
  .question-type--reading_fill_blank_initial_given .prompt.long-prompt {
    font-size: clamp(14px, 4.05vw, 16.5px);
    font-weight: 620;
    line-height: 1.54;
  }

  .question-card--compact .options {
    gap: 8px;
  }

  .question-card--compact .card-option {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    min-height: 50px;
    padding: 10px 11px;
    font-size: 14.5px;
    line-height: 1.35;
  }

  .question-card--compact .option-letter {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .question-card--compact .option-media {
    padding: 8px;
    border-radius: 14px;
  }

  .question-card--compact .image-preview img {
    max-height: 170px;
  }

  .question-card--compact .option-image {
    max-height: 112px;
  }

  .question-type--audio_choice .image-preview img,
  .question-type--grammar_choice .image-preview img {
    max-height: 150px;
  }

  .has-audio-options .option-audio-player {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 50px;
  }

  .has-audio-options .option-audio-player .audio-play-button {
    width: 48px;
    height: 48px;
  }

  .question-card.image-choice-card .image-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .has-audio-options .option.option-shell {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
  }

  .has-audio-options .option.option-shell .card-option {
    min-height: 50px;
  }

  .image-options .option.option-shell .card-option {
    min-height: 48px;
    padding: 7px 8px;
    font-size: 12.5px;
  }

  .image-options .option.option-shell .option-media {
    padding: 7px;
  }

  .option-preview-chip {
    min-height: 24px;
    padding: 2px 7px;
    font-size: 11px;
  }

  .option-image-status {
    display: none;
  }

  .fill-area,
  .ordering-area,
  .speaking-area {
    gap: 9px;
  }

  .question-card--compact .text-answer {
    min-height: 52px;
    padding: 11px 13px;
    font-size: 15.5px;
  }

  .initial-hint {
    font-size: 12px;
    line-height: 1.38;
  }

  .initial-hint span {
    width: 28px;
    height: 28px;
  }

  .word-bank,
  .ordered {
    gap: 7px;
  }

  .ordering-card .word {
    min-height: 48px;
    padding: 0 11px;
    font-size: 13.5px;
  }

  .reading-card {
    padding: 12px;
  }

  .reading-card .reading-passage {
    max-height: min(30vh, 250px);
    padding: 12px;
  }

  .reading-card .passage-content,
  .reading-card .reading-prompt {
    line-height: 1.58;
  }

  .speaking-card .media-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .speaking-card .media-box {
    min-width: 0;
  }

  .speaking-card .image-preview img {
    max-height: 142px;
  }

  .speaking-card .speaking-prompt {
    font-size: clamp(17px, 5vw, 21px);
    line-height: 1.36;
    font-weight: 740;
  }

  .speaking-card .record-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .speaking-card .record-controls .secondary,
  .speaking-card .record-controls .ghost {
    min-width: 0;
    min-height: 48px;
    padding-inline: 6px;
    font-size: 12.5px;
  }

  .speaking-card #recordStatus {
    grid-column: 1 / -1;
    min-height: 28px;
    font-size: 11.8px;
    line-height: 1.32;
  }

  .playback-area audio {
    height: 34px;
  }

  .speaking-card .student-speaking-note {
    padding: 9px 10px;
  }

  .speaking-card .student-speaking-note strong,
  .speaking-card .student-speaking-note span {
    font-size: 11.8px;
    line-height: 1.34;
  }

  .question-actions.bottom-action-bar {
    display: grid;
    grid-template-columns: minmax(84px, 0.65fr) minmax(0, 1.35fr);
    gap: 7px;
    margin: 10px -3px 0;
    padding: 8px;
    border-radius: 16px;
  }

  .question-actions.bottom-action-bar .primary,
  .question-actions.bottom-action-bar .ghost {
    min-height: 48px;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .test-shell {
    width: min(100% - 22px, 960px);
    gap: 12px;
  }

  .test-header-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .brand-compact {
    font-size: 14px;
  }

  .brand-compact-icon {
    width: 32px;
    height: 32px;
  }

  .skill-chip,
  .paper-pill {
    min-height: 32px;
    font-size: 13px;
  }

  .question-card--compact {
    padding: 18px;
  }

  .question-card--compact .question-head h1 {
    font-size: clamp(22px, 3.8vw, 28px);
  }

  .speaking-card .media-grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  }

  .speaking-card .image-preview img {
    max-height: 220px;
  }

  .reading-card .reading-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .reading-card .reading-passage {
    max-height: min(40vh, 360px);
  }
}

@media (max-width: 390px) {
  .test-shell {
    width: min(100% - 10px, 960px);
  }

  .test-header {
    padding: 7px 8px;
  }

  .brand-compact-text {
    display: none;
  }

  .skill-chip,
  .paper-pill {
    font-size: 11.5px;
  }

  .question-card--compact {
    padding: 12px;
  }

  .question-card--compact .question-head h1 {
    font-size: clamp(17px, 5vw, 21px);
  }

  .question-card--compact .prompt {
    font-size: clamp(16px, 4.85vw, 20px);
  }

  .question-card--compact .long-prompt {
    font-size: clamp(14.5px, 4.25vw, 17px);
  }

  .question-card--compact .image-preview img {
    max-height: 158px;
  }

  .question-card--compact .option-image {
    max-height: 102px;
  }

  .speaking-card .image-preview img {
    max-height: 128px;
  }
}

/* One-attempt home state */
.completed-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.completed-panel h2 {
  margin: 4px 0 10px;
  font-size: clamp(24px, 5.2vw, 34px);
  line-height: 1.18;
}

.completed-panel p:not(.eyebrow) {
  color: var(--xf-muted);
  font-size: 15px;
  line-height: 1.7;
}

.completed-panel .inline-actions {
  margin-top: 18px;
}

/* Student skip action: lightweight by design, below the primary submit emphasis. */
.question-actions .skip-answer {
  color: var(--xf-muted);
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--xf-line);
}

.question-actions .skip-answer:hover {
  color: var(--xf-red-dark);
  border-color: var(--xf-border);
  background: var(--xf-red-soft);
}

.skip-completion-panel {
  max-width: 720px;
  margin-inline: auto;
}

.skip-completion-panel h1 {
  margin-bottom: 10px;
}

.skip-completion-panel p {
  max-width: 560px;
  line-height: 1.75;
}

.skip-completion-actions {
  margin-top: 20px;
}

.report-identity-panel {
  display: grid;
  gap: 16px;
}

.report-identity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-identity-head h2,
.report-identity-head p {
  margin: 0;
}

.report-identity-head p {
  color: var(--xf-muted);
  line-height: 1.6;
}

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

.report-identity-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 520px;
}

.report-identity-grid label,
.report-consent {
  display: grid;
  gap: 7px;
  color: var(--xf-text);
  font-weight: 700;
}

.report-identity-grid small {
  color: var(--xf-muted);
  font-weight: 600;
}

.report-identity-grid input {
  min-height: 48px;
  border: 1px solid var(--xf-border);
  border-radius: 16px;
  padding: 0 14px;
  font: inherit;
  background: #fff;
}

.report-consent {
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  color: var(--xf-muted);
  font-weight: 600;
  line-height: 1.6;
}

.report-consent input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--xf-red);
}

@media (max-width: 640px) {
  .report-identity-head {
    display: grid;
  }

  .report-identity-grid {
    grid-template-columns: 1fr;
  }
}

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

.teacher-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 40px;
  display: grid;
  gap: 14px;
}

.teacher-topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.teacher-topbar-title {
  color: #111827;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
}

.teacher-topbar-subtitle {
  margin-top: 2px;
  color: var(--xf-muted);
  font-size: 12px;
  font-weight: 700;
}

.teacher-login-card,
.teacher-filters {
  display: grid;
  align-items: end;
  gap: 12px;
}

.teacher-login-card {
  width: min(560px, 100%);
  margin: 24px auto 0;
  align-items: stretch;
  padding: 28px;
}

.teacher-login-card h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
}

.teacher-login-card .muted {
  margin: 0;
  line-height: 1.7;
}

.teacher-login-card .form-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--xf-red-soft);
  color: var(--xf-red-dark);
  font-weight: 700;
}

.feishu-login-button {
  width: 100%;
  min-height: 54px;
}

.teacher-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr)) repeat(2, minmax(0, 0.8fr)) auto auto;
}

.teacher-login-card input,
.teacher-filters input,
.teacher-filters select,
.teacher-link-builder input,
.teacher-link-builder select,
.teacher-link-builder textarea {
  min-height: 48px;
  border: 1px solid var(--xf-border);
  border-radius: 14px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
}

.teacher-link-builder textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.teacher-workbench-hero,
.teacher-workbench-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.teacher-workbench-toolbar {
  padding: 18px 20px;
}

.teacher-workbench-hero h1,
.teacher-workbench-toolbar h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.teacher-workbench-toolbar .teacher-profile-main strong {
  margin-top: 4px;
  color: var(--xf-text);
  font-size: 14px;
}

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

.teacher-metric-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.teacher-metric-card span {
  color: var(--xf-muted);
  font-weight: 700;
}

.teacher-metric-card strong {
  font-size: clamp(24px, 4vw, 34px);
  color: var(--xf-text);
}

.teacher-link-builder {
  display: grid;
  gap: 14px;
}

.teacher-link-builder h2 {
  margin: 0;
}

.teacher-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.teacher-link-grid label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  min-width: 0;
}

.teacher-bulk-links {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--xf-line);
  padding-top: 14px;
}

.teacher-bulk-links label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.teacher-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.bulk-link-preview {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.bulk-link-preview div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--xf-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.bulk-link-preview strong,
.bulk-link-preview span {
  display: block;
}

.bulk-link-preview span {
  overflow-wrap: anywhere;
  color: var(--xf-muted);
  font-size: 12px;
  margin-top: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--xf-muted);
  font-size: 12px;
  font-weight: 800;
}

.status-badge.follow-followed,
.status-badge.follow-parent_shared {
  background: var(--xf-red-soft);
  color: var(--xf-red-dark);
}

.status-badge.follow-archived {
  background: #f3f4f6;
  color: #4b5563;
}

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

.teacher-tabs button {
  min-height: 44px;
  border: 1px solid var(--xf-border);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--xf-muted);
  font-weight: 800;
  cursor: pointer;
}

.teacher-tabs button.active {
  border-color: rgba(215, 25, 32, 0.25);
  background: var(--xf-red-soft);
  color: var(--xf-red-dark);
}

.teacher-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.teacher-profile-main img,
.teacher-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.teacher-profile-main img {
  object-fit: cover;
}

.teacher-avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--xf-red-soft);
  color: var(--xf-red);
  font-weight: 800;
}

.teacher-profile-main strong,
.teacher-profile-main span {
  display: block;
}

.teacher-profile-main span {
  color: var(--xf-muted);
  font-size: 14px;
  margin-top: 2px;
}

.teacher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 16px;
}

.teacher-list,
.teacher-detail {
  min-width: 0;
}

.teacher-report-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.teacher-report-head h2 {
  margin: 0;
}

.teacher-list-header,
.teacher-report-row {
  display: grid;
  gap: 10px;
}

.teacher-list-header.report-grid,
.teacher-report-row.report-grid {
  grid-template-columns: 1.2fr 0.9fr 1fr 0.8fr auto;
}

.teacher-list-header.student-grid,
.teacher-report-row.student-grid {
  grid-template-columns: 1.2fr 0.9fr 1fr 0.6fr auto;
}

.teacher-list-header {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--xf-line);
  color: var(--xf-muted);
  font-size: 13px;
  font-weight: 700;
}

.teacher-report-row {
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--xf-line);
  font-size: 14px;
}

.teacher-report-row strong,
.teacher-report-row span {
  display: block;
}

.teacher-report-row span,
.teacher-detail .muted {
  color: var(--xf-muted);
}

.teacher-detail-card {
  display: grid;
  gap: 14px;
}

.teacher-detail-card h3,
.teacher-detail-card p {
  margin: 0;
}

.teacher-score strong {
  color: var(--xf-red);
  font-size: 48px;
  line-height: 1;
}

.teacher-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.teacher-meta-list span {
  border-radius: 999px;
  background: rgba(255, 241, 241, 0.72);
  color: var(--xf-muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.teacher-skill-grid {
  display: grid;
  gap: 10px;
}

.teacher-skill {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--xf-line);
}

@media (max-width: 900px) {
  .teacher-login-card,
  .teacher-filters,
  .teacher-link-grid,
  .teacher-metrics,
  .teacher-layout,
  .teacher-list-header,
  .teacher-report-row {
    grid-template-columns: 1fr;
  }

  .teacher-list-header {
    display: none;
  }

  .teacher-profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-workbench-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-workbench-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .question-actions.bottom-action-bar {
    grid-template-columns: minmax(64px, 0.7fr) minmax(76px, 0.85fr) minmax(0, 1.25fr);
  }

  .question-actions.bottom-action-bar .primary,
  .question-actions.bottom-action-bar .ghost {
    min-width: 0;
    padding-inline: 10px;
  }
}

/* Oxford OD final cascade: keep this block last. */
body .shell {
  width: min(880px, calc(100% - 40px));
  padding-top: 30px;
}

body .brand-mark,
body .brand-compact-icon {
  color: #fff;
  background: var(--od-navy);
  box-shadow: none;
}

body .home-shell {
  width: min(480px, calc(100% - 32px));
  padding-top: 26px;
}

body .home-brand-quick {
  margin-bottom: 22px;
}

body .home-quick-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 350px;
  margin-bottom: 14px;
  padding: 31px 28px 24px;
  overflow: hidden;
  border: 1px solid #e3e9f1;
  border-radius: 18px;
  background: linear-gradient(155deg, #fff 15%, #f4f8ff 100%);
  box-shadow: 0 18px 55px rgba(16, 42, 86, 0.08);
}

body .home-quick-card .hero-copy h1 {
  margin: 0;
  color: var(--od-navy);
  font-family: var(--od-serif);
  font-size: clamp(34px, 9vw, 45px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

body .home-quick-card .hero-copy .hero-kicker {
  margin: 0 0 10px;
  color: var(--od-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

body .home-quick-card .hero-copy > p:last-child {
  margin: 13px 0 0;
  color: #687589;
  font-size: 15px;
  font-weight: 500;
}

body .oxford-book-visual {
  display: block;
  align-self: end;
  justify-self: center;
}

body .home-ready-row {
  position: relative;
  z-index: 3;
  margin-top: 3px;
  padding-top: 13px;
  border-top: 1px solid rgba(16, 42, 86, 0.07);
}

body .report-identity-panel,
body .home-controls .selector-panel {
  margin: 0 0 12px;
  padding: 20px 18px;
  border: 1px solid #e4e9f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(16, 42, 86, 0.045);
}

body .home-controls {
  display: block;
}

body .home-controls .grade-grid {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 15px;
}

body .home-controls .grade-card {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 44px 11px 14px;
  border: 1px solid #e5e9f0;
  border-radius: 11px;
  color: #1d2939;
  background: #fff;
  box-shadow: none;
}

body .home-controls .grade-card.selected {
  border-color: var(--od-blue);
  color: var(--od-navy);
  background: var(--od-ice);
}

body .start-section {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body .start-section .primary {
  width: 100%;
  min-height: 58px;
  border-radius: 12px;
}

body .test-shell {
  width: min(820px, calc(100% - 40px));
  padding-top: 22px;
}

body .test-header {
  margin-bottom: 18px;
  padding: 0 2px 18px;
  border: 0;
  border-bottom: 1px solid #e9edf3;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body .question-card--compact {
  padding: 30px;
  border: 1px solid #e4e9f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(16, 42, 86, 0.06);
}

body .question-card--compact .question-head {
  margin-bottom: 21px;
  text-align: left;
}

body .question-card--compact .question-head h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 650;
  line-height: 1.35;
}

body .question-card--compact .question-head .eyebrow {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--od-blue);
  background: var(--od-ice);
  font-size: 11px;
}

body .question-card--compact .prompt {
  color: #101828;
  font-family: var(--od-serif);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}

body .option.option-shell {
  overflow: hidden;
  border: 1px solid #e4e9f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
}

body .option.option-shell.selected,
body .option.option-shell:has(.card-option.selected) {
  border-color: var(--od-blue);
  background: #f7faff;
  box-shadow: 0 0 0 2px rgba(18, 103, 232, 0.07);
}

body .question-card--compact .card-option,
body .question-card--compact .card-option.selected {
  min-height: 58px;
  padding: 12px 15px;
  border: 0;
  border-radius: 0;
  color: #1d2939;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

body .question-card--compact .image-preview img,
body .question-card--compact .option-image,
body .option-image,
body .media-box img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  object-position: center;
  filter: none;
}

body .question-actions.bottom-action-bar {
  grid-template-columns: 90px 100px minmax(160px, 1fr);
  gap: 10px;
  margin: 28px -30px -30px;
  padding: 16px 30px;
  border-top: 1px solid #e9edf3;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, 0.97);
}

body .speaking-card .question-head {
  text-align: center;
}

body .speaking-card .speaking-prompt {
  margin: 18px auto 22px;
  padding: 24px;
  border-radius: 14px;
  color: var(--od-navy);
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  font-size: clamp(25px, 5vw, 34px);
  text-align: center;
}

body .speaking-card .record-controls {
  position: relative;
  display: flex;
  min-height: 206px;
  align-items: center;
  justify-content: center;
  padding-bottom: 34px;
}

body .speaking-card #recordBtn {
  position: relative;
  z-index: 2;
  width: 142px;
  height: 142px;
  min-height: 142px;
  padding: 0;
  border: 13px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 40% 32%, #3091ff, #0764ef 68%, #0757ce);
  box-shadow: 0 0 0 3px #2b82f2, 0 0 0 16px #edf5ff, 0 20px 40px rgba(18, 103, 232, 0.24);
}

body .result-hero {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  padding: 30px;
  border: 1px solid #dce6f4;
  color: var(--xf-text);
  background: radial-gradient(circle at 94% 4%, rgba(18, 103, 232, 0.12), transparent 36%), linear-gradient(135deg, #fff, #f2f7ff);
}

body .score-summary strong {
  color: var(--od-blue);
  font-family: var(--od-serif);
}

body .result-hero .score-summary {
  align-self: center;
  padding: 24px 20px;
  border: 0;
  border-right: 1px solid #dfe7f2;
  border-radius: 0;
  color: #667085;
  background: transparent;
  box-shadow: none;
}

body .result-hero .score-summary span,
body .result-hero .score-summary small {
  color: #667085;
}

body .result-hero .score-summary strong {
  color: var(--od-blue);
}

body .result-summary-copy h1 {
  color: var(--od-navy);
  font-family: var(--od-serif);
}

@media (max-width: 760px) {
  body .shell,
  body .test-shell {
    width: min(100% - 24px, 620px);
    padding-top: 16px;
  }

  body .home-shell {
    width: min(100% - 24px, 480px);
    padding-top: 18px;
  }

  body .question-card--compact {
    padding: 22px 18px;
  }

  body .question-actions.bottom-action-bar {
    position: sticky;
    z-index: 20;
    bottom: 0;
    grid-template-columns: 68px 82px minmax(0, 1fr);
    margin: 24px -18px -22px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-radius: 0 0 16px 16px;
  }

  body .result-hero {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 24px 20px;
  }

  body .result-hero .score-summary {
    padding: 4px 0 18px;
    border-right: 0;
    border-bottom: 1px solid #dfe7f2;
  }
}

/* Oxford report persistence and share poster */

body .poster-modal {
  width: min(620px, 100%);
  padding: 28px;
  border: 1px solid #dce6f4;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(14, 42, 71, 0.2);
}

body .poster-modal > h2 {
  margin: 0 54px 8px 0;
  color: #0e2a47;
  font-family: var(--od-serif);
  font-size: clamp(25px, 4vw, 34px);
}

body .poster-modal .modal-close {
  color: #0e2a47;
  background: #eef4ff;
}

body .poster-share {
  gap: 16px;
}

body .poster-share-copy,
body .poster-share-status {
  color: #667085;
  font-weight: 650;
}

body .poster-preview {
  width: min(100%, 390px);
  max-height: min(62vh, 680px);
  border: 12px solid #eef4ff;
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 18px 46px rgba(14, 42, 71, 0.14);
}

body .poster-actions .ghost {
  border-color: #1769ff;
  color: #1769ff;
  background: #fff;
}

@media (max-width: 520px) {
  body .poster-modal {
    padding: 22px 18px;
  }

  body .poster-preview {
    max-height: 54vh;
    border-width: 8px;
  }
}

/* v0.2.0 locked Oxford Contemporary Digital visual tokens.
   This final layer intentionally replaces historical brand experiments without
   changing the assessment DOM, interaction flow, or scoring behavior. */
:root {
  --od-navy: #0e2a47;
  --od-blue: #1769ff;
  --od-blue-strong: #0f58d8;
  --od-ice: #eef4ff;
  --od-paper: #f8fafc;
  --xf-red: #1769ff;
  --xf-red-dark: #0e2a47;
  --xf-red-soft: #eef4ff;
  --xf-red-light: #eef4ff;
  --xf-bg: #f8fafc;
  --xf-text: #172033;
  --xf-muted: #667085;
  --xf-border: #dde5ef;
  --xf-line: #e8edf3;
  --xf-shadow-button: none;
}

html,
body,
body:has(.home-shell) {
  color: #172033;
  background: #f8fafc;
}

.primary,
body .primary,
.top-progress-fill,
.bar-fill {
  background: #1769ff;
  box-shadow: none;
}

.primary:hover:not(:disabled),
body .primary:hover:not(:disabled) {
  background: #0f58d8;
  box-shadow: none;
}

.home-quick-card,
body .home-quick-card,
.audio-player,
.speaking-card .speaking-prompt,
body .speaking-card .speaking-prompt,
.result-hero,
body .result-hero {
  background: #fff;
}

.home-quick-card::before,
body .home-quick-card::before {
  display: none;
}

.book-page {
  background: #fff;
}

.book-spine {
  background: #b9cbe0;
}

.speaking-card #recordBtn,
body .speaking-card #recordBtn {
  background: #1769ff;
  box-shadow: 0 0 0 3px #1769ff, 0 0 0 14px #eef4ff;
}

.bottom-action-bar {
  background: #fff;
}

.dev-panel {
  background: rgba(14, 42, 71, 0.96);
  backdrop-filter: none;
}

.modal-backdrop {
  backdrop-filter: none;
}

/* Homepage editorial pass
   Image-model layout translated into production CSS while retaining the
   established Oxford navy, cobalt and cool-white palette. Assessment behavior
   is intentionally untouched; this layer is scoped to the student home screen. */
:root {
  --od-home-navy: #0e2a47;
  --od-home-navy-deep: #0f58d8;
  --od-home-paper: #f8fafc;
  --od-home-card: #ffffff;
  --od-home-ink: #172033;
  --od-home-muted: #667085;
  --od-home-line: #dde5ef;
  --od-home-accent: #1769ff;
  --od-home-accent-soft: #b9cbe0;
}

html:has(.home-shell),
body:has(.home-shell) {
  background:
    radial-gradient(circle at 17% 8%, rgba(255, 255, 255, 0.96), transparent 24rem),
    linear-gradient(180deg, #f8fafc 0%, #f3f6fa 100%),
    var(--od-home-paper);
}

body .home-shell {
  width: min(500px, calc(100% - 30px));
  padding-top: 30px;
  padding-bottom: 52px;
}

body .home-brand-quick {
  min-height: 54px;
  margin: 0 2px 24px;
  gap: 13px;
}

body .home-brand-quick .brand-mark {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 48%),
    var(--od-home-navy);
  box-shadow: 0 10px 22px rgba(8, 44, 77, 0.15);
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

body .home-brand-quick .brand-name {
  color: var(--od-home-navy);
  font-family: var(--od-serif), Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

body .home-brand-quick .brand-subtitle {
  margin-top: 4px;
  color: #747b85;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body .home-quick-card {
  position: relative;
  display: grid;
  min-height: 318px;
  gap: 0;
  margin-bottom: 15px;
  padding: 28px 26px 21px;
  overflow: hidden;
  border: 1px solid rgba(14, 42, 71, 0.13);
  border-radius: 22px;
  background:
    linear-gradient(142deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94)),
    var(--od-home-card);
  box-shadow:
    0 18px 44px rgba(14, 42, 71, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body .home-quick-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  display: block;
  width: 470px;
  height: 170px;
  right: -195px;
  bottom: 54px;
  border: 1px solid rgba(23, 105, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  transform: rotate(-9deg);
}

body .home-quick-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 112px;
  height: 4px;
  border-radius: 0 22px 0 99px;
  background: linear-gradient(90deg, transparent, var(--od-home-accent));
  opacity: 0.9;
}

body .home-quick-card .hero-copy {
  position: relative;
  z-index: 2;
}

body .home-quick-card .hero-copy .hero-kicker {
  margin: 0 0 13px;
  color: var(--od-home-navy);
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.27em;
}

body .home-quick-card .hero-copy h1 {
  max-width: 390px;
  margin: 0;
  color: var(--od-home-navy);
  font-family: var(--od-serif), Georgia, "Songti SC", serif;
  font-size: clamp(36px, 9.5vw, 47px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

body .home-quick-card .hero-copy > p:last-child {
  display: inline-flex;
  margin: 14px 0 0;
  align-items: center;
  color: #5e6976;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.035em;
}

body .home-quick-card .hero-copy > p:last-child::before {
  content: "";
  width: 20px;
  height: 1px;
  margin-right: 9px;
  background: var(--od-home-accent);
}

body .oxford-book-visual {
  position: relative;
  z-index: 2;
  display: block;
  align-self: end;
  justify-self: center;
  width: 286px;
  height: 112px;
  margin: 0 0 -10px;
  filter: drop-shadow(0 17px 14px rgba(8, 44, 77, 0.12));
  transform: perspective(620px) rotateX(61deg);
  transform-origin: center bottom;
}

body .oxford-book-visual::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -5px;
  height: 6px;
  border-radius: 50%;
  background: var(--od-home-navy);
  box-shadow: 0 2px 0 rgba(23, 105, 255, 0.35);
}

body .book-page {
  top: 5px;
  width: 144px;
  height: 105px;
  border-color: rgba(78, 102, 126, 0.2);
  background:
    repeating-linear-gradient(180deg, transparent 0 17px, rgba(8, 44, 77, 0.08) 18px 19px),
    linear-gradient(150deg, #ffffff 12%, #edf3fb 100%);
}

body .book-spine {
  top: 4px;
  width: 3px;
  height: 113px;
  background: linear-gradient(180deg, #dbe7f6, var(--od-home-accent-soft) 55%, #edf3fb);
}

body .home-ready-row {
  position: relative;
  z-index: 3;
  display: flex;
  margin-top: 8px;
  padding-top: 14px;
  align-items: center;
  gap: 10px 14px;
  border-top: 1px solid rgba(8, 44, 77, 0.1);
}

body .home-tip,
body .home-status-chip,
body .home-status-chip.ok {
  display: inline-flex;
  min-height: 0;
  padding: 0;
  align-items: center;
  border: 0;
  border-radius: 0;
  color: #65707c;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

body .home-tip::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: var(--od-home-accent);
}

body .home-ready-row .home-status-chip::before {
  content: "✓";
  display: inline-grid;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  place-items: center;
  border: 1px solid rgba(8, 44, 77, 0.24);
  border-radius: 50%;
  color: var(--od-home-navy);
  font-size: 9px;
  line-height: 1;
}

body .home-ready-row .home-status-chip.blocked::before {
  content: "!";
  color: var(--od-home-accent);
  border-color: rgba(23, 105, 255, 0.3);
}

body .report-identity-panel,
body .home-controls .selector-panel {
  position: relative;
  margin: 0 0 15px;
  padding: 22px 21px;
  overflow: hidden;
  border: 1px solid rgba(14, 42, 71, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(14, 42, 71, 0.052);
}

body .report-identity-panel::before,
body .home-controls .selector-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 44px;
  border-radius: 0 0 5px 0;
  background: var(--od-home-accent);
}

body .report-identity-head {
  align-items: center;
}

body .report-identity-panel h2,
body .home-controls .selector-panel h2 {
  display: flex;
  margin: 0;
  align-items: center;
  color: var(--od-home-navy);
  font-family: var(--od-serif), Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

body .report-identity-panel h2::before,
body .home-controls .selector-panel h2::before {
  content: "01";
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  place-items: center;
  border: 1px solid rgba(8, 44, 77, 0.17);
  border-radius: 8px;
  color: var(--od-home-navy);
  background: rgba(8, 44, 77, 0.045);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.04em;
}

body .home-controls .selector-panel h2::before {
  content: "02";
}

body .report-identity-panel .inline-actions {
  margin-top: 0;
}

body .report-identity-panel .home-status-chip.ok {
  color: #6c6f71;
  font-size: 10px;
}

body .report-identity-panel .home-status-chip.ok::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--od-home-accent-soft);
}

body .report-identity-grid {
  margin-top: 2px;
}

body .report-identity-grid label > span {
  color: #425368;
  font-size: 12px;
  font-weight: 750;
}

body .report-identity-grid input {
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(8, 44, 77, 0.16);
  border-radius: 12px;
  color: var(--od-home-ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 2px rgba(8, 44, 77, 0.025);
}

body .report-identity-grid input::placeholder {
  color: #91959a;
}

body .report-identity-grid input:focus {
  border-color: var(--od-home-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.09);
}

body .home-controls .selector-panel > p {
  margin: 7px 0 0 38px;
  color: #737b84;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.55;
}

body .home-controls .grade-grid {
  counter-reset: od-grade;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 17px;
}

body .home-controls .grade-card {
  counter-increment: od-grade;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  min-height: 61px;
  gap: 12px;
  padding: 10px 43px 10px 12px;
  align-items: center;
  border: 1px solid rgba(8, 44, 77, 0.13);
  border-radius: 13px;
  color: var(--od-home-ink);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

body .home-controls .grade-card::before {
  content: counter(od-grade);
  display: grid;
  width: 29px;
  height: 29px;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #6f7982;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

body .home-controls .grade-card strong {
  grid-column: 2;
  grid-row: 1;
  color: inherit;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.3;
}

body .home-controls .grade-card span {
  grid-column: 3;
  grid-row: 1;
  color: #7a828a;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

body .home-controls .grade-card:hover {
  border-color: rgba(8, 44, 77, 0.3);
  background: #fff;
  transform: translateY(-1px);
}

body .home-controls .grade-card.selected {
  color: var(--od-home-navy);
  border-color: var(--od-home-accent);
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px rgba(23, 105, 255, 0.05);
}

body .home-controls .grade-card.selected::before {
  color: #fff;
  background: var(--od-home-accent);
}

body .home-controls .grade-card.selected span {
  color: #5d6874;
}

body .home-controls .grade-card.selected::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 14px;
  display: block;
  width: auto;
  height: auto;
  color: var(--od-home-accent);
  background: transparent;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
  transform: translateY(-50%);
}

body .start-section {
  display: grid;
  gap: 9px;
  margin-top: 0;
  padding: 4px 2px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body .start-section .primary {
  width: 100%;
  min-height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--od-home-accent);
  box-shadow: 0 13px 26px rgba(23, 105, 255, 0.2);
  font-family: var(--od-serif), Georgia, "Songti SC", serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body .start-section .primary:hover:not(:disabled) {
  background: var(--od-home-navy-deep);
  box-shadow: 0 15px 30px rgba(23, 105, 255, 0.24);
  transform: translateY(-1px);
}

body .start-section .primary:disabled {
  color: rgba(255, 255, 255, 0.88);
  background: #91a1af;
  box-shadow: none;
  opacity: 0.72;
}

body .start-section .action-hint {
  color: #777c82;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 520px) {
  body .home-shell {
    width: min(100% - 22px, 500px);
    padding-top: 20px;
    padding-bottom: 38px;
  }

  body .home-brand-quick {
    min-height: 48px;
    margin-bottom: 18px;
  }

  body .home-brand-quick .brand-mark {
    width: 47px;
    height: 47px;
    border-radius: 14px;
    font-size: 23px;
  }

  body .home-brand-quick .brand-name {
    font-size: 18px;
  }

  body .home-brand-quick .brand-subtitle {
    font-size: 9px;
    letter-spacing: 0.11em;
  }

  body .home-quick-card {
    min-height: 300px;
    padding: 25px 21px 19px;
    border-radius: 20px;
  }

  body .home-quick-card .hero-copy h1 {
    font-size: clamp(33px, 9.2vw, 42px);
  }

  body .oxford-book-visual {
    width: 250px;
    height: 98px;
  }

  body .book-page {
    width: 126px;
    height: 92px;
  }

  body .book-spine {
    height: 99px;
  }

  body .home-ready-row {
    gap: 8px 11px;
  }

  body .report-identity-panel,
  body .home-controls .selector-panel {
    padding: 19px 17px;
    border-radius: 18px;
  }

  body .report-identity-panel h2,
  body .home-controls .selector-panel h2 {
    font-size: 18px;
  }

  body .home-controls .selector-panel > p {
    margin-left: 38px;
  }
}

@media (max-width: 370px) {
  body .home-shell {
    width: min(100% - 16px, 500px);
  }

  body .home-ready-row {
    align-items: flex-start;
    flex-direction: column;
  }

  body .report-identity-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body .home-controls .grade-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  body .home-controls .grade-card span {
    display: none;
  }
}

/* Teacher report workspace V2: two-page sidebar and evidence-bound interpretation. */
.teacher-console-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  background: #f5f7fb;
  color: #10233f;
}

.teacher-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 20px;
  border-right: 1px solid #e3e9f2;
  background: #fff;
}

.teacher-sidebar-brand,
.teacher-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teacher-sidebar-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #082b5c;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 800;
}

.teacher-sidebar-brand strong,
.teacher-sidebar-brand span,
.teacher-sidebar-profile strong,
.teacher-sidebar-profile span {
  display: block;
}

.teacher-sidebar-brand strong { font-size: 18px; }
.teacher-sidebar-brand div > span,
.teacher-sidebar-profile div > span { margin-top: 2px; color: #8190a6; font-size: 12px; }

.teacher-sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 42px;
}

.teacher-sidebar-nav button {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  background: transparent;
  color: #66758c;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-align: left;
}

.teacher-sidebar-nav button span { width: 22px; color: #8da0b9; font-size: 20px; text-align: center; }
.teacher-sidebar-nav button.active { background: #eaf2ff; color: #0868f7; }
.teacher-sidebar-nav button.active span { color: #0868f7; }

.teacher-sidebar-profile {
  margin-top: auto;
  padding: 16px 4px 12px;
  border-top: 1px solid #edf1f6;
}

.teacher-sidebar-profile .teacher-avatar-fallback {
  width: 38px;
  height: 38px;
  background: #eaf2ff;
  color: #0868f7;
}

.teacher-sidebar-logout {
  border: 0;
  padding: 7px 4px;
  background: transparent;
  color: #7d8ba0;
  cursor: pointer;
  text-align: left;
}

.teacher-console-main {
  width: min(1500px, 100%);
  min-width: 0;
  padding: 32px clamp(22px, 3vw, 46px) 48px;
}

.teacher-console-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.teacher-console-header h1,
.teacher-console-header p { margin: 0; }
.teacher-console-header h1 { margin-top: 5px; color: #082b5c; font-size: clamp(28px, 3vw, 38px); }
.teacher-console-header > div > p:last-child { margin-top: 7px; color: #74839a; }

.teacher-console-main .teacher-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.teacher-console-main .teacher-metric-card,
.teacher-console-main .teacher-filters,
.teacher-console-main .teacher-list,
.teacher-console-main .teacher-detail {
  border: 1px solid #e2e8f1;
  background: #fff;
  box-shadow: 0 12px 32px rgba(28, 52, 88, 0.045);
}

.teacher-console-main .teacher-metric-card {
  padding: 17px 20px;
  border-radius: 15px;
}

.teacher-console-main .teacher-metric-card strong { color: #0868f7; font-size: 30px; }

.teacher-console-main .teacher-filters {
  grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(120px, 0.8fr)) repeat(3, minmax(135px, 0.9fr)) auto auto;
  margin-top: 18px;
  padding: 13px;
  border-radius: 15px;
}

.teacher-console-main .teacher-filters input,
.teacher-console-main .teacher-filters select,
.teacher-link-dialog input,
.teacher-link-dialog select,
.teacher-link-dialog textarea {
  min-height: 44px;
  border: 1px solid #dfe6ef;
  border-radius: 11px;
  padding: 0 12px;
  background: #fbfcfe;
  color: #243851;
  font: inherit;
}

.teacher-filter-more { position: relative; align-self: center; }
.teacher-filter-more summary { color: #66758c; font-weight: 700; cursor: pointer; }
.teacher-filter-more > div {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 36px;
  min-width: 320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(24, 48, 82, .14);
}
.teacher-filter-more > div button { grid-column: 1 / -1; }

.teacher-console-main .teacher-layout {
  grid-template-columns: minmax(520px, .95fr) minmax(440px, 1.05fr);
  margin-top: 18px;
}

.teacher-console-main .teacher-list,
.teacher-console-main .teacher-detail {
  min-height: 580px;
  padding: 22px;
  border-radius: 17px;
}

.teacher-detail-empty {
  min-height: 500px;
  display: grid;
  place-items: center;
  color: #8a98ab;
}

.teacher-detail-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 12px;
  background: #f0f4f9;
}

.teacher-detail-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #718198;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.teacher-detail-tabs button.active {
  background: #fff;
  color: #0868f7;
  box-shadow: 0 3px 12px rgba(33, 66, 110, .09);
}

.teacher-console-main .teacher-score strong { color: #0868f7; }
.teacher-console-main .alignment-pills span { background: #eaf2ff; color: #0c5fd5; }

.teacher-interpretation-empty {
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.teacher-interpretation-empty h3 { margin: 18px 0 8px; font-size: 24px; }
.teacher-interpretation-empty p { max-width: 430px; margin: 0 0 22px; color: #718198; line-height: 1.75; }
.teacher-interpretation-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #0b70ff, #0752c6);
  color: #fff;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
}

.teacher-interpretation-report { display: grid; gap: 22px; }
.teacher-interpretation-report header h3 { margin: 6px 0 10px; color: #082b5c; font-size: 28px; }
.teacher-interpretation-report header > p:last-child,
.teacher-interpretation-report section > p { margin: 0; color: #52657d; line-height: 1.75; }
.teacher-interpretation-report section h4 { margin: 0 0 11px; color: #163555; font-size: 18px; }
.teacher-interpretation-boundary {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #cfe0fa;
  border-radius: 12px;
  background: #f4f8ff;
}
.teacher-interpretation-boundary strong { color: #0868f7; }
.teacher-interpretation-boundary span { color: #60738c; line-height: 1.6; }
.teacher-evidence-quality {
  display: grid;
  gap: 4px;
  padding: 12px 15px;
  border: 1px solid #f0d89c;
  border-radius: 12px;
  background: #fffaf0;
}
.teacher-evidence-quality strong { color: #9a6b0d; }
.teacher-evidence-quality span { color: #78633b; font-size: 13px; line-height: 1.55; }

.teacher-level-paths,
.teacher-diagnostic-list { display: grid; gap: 10px; margin-top: 12px; }
.teacher-level-paths > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 5px 12px;
  padding: 13px 14px;
  border: 1px solid #e0e8f3;
  border-radius: 12px;
  background: #fbfcfe;
}
.teacher-level-paths strong { color: #173a60; }
.teacher-level-paths span { color: #0868f7; font-size: 13px; font-weight: 800; }
.teacher-level-paths p { grid-column: 2; margin: 0; color: #687b92; font-size: 13px; line-height: 1.55; }

.teacher-diagnostic-skill {
  overflow: hidden;
  border: 1px solid #dde7f2;
  border-radius: 13px;
  background: #fff;
}
.teacher-diagnostic-skill summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(130px, .45fr) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.teacher-diagnostic-skill summary::-webkit-details-marker { display: none; }
.teacher-diagnostic-skill summary::after { content: "+"; justify-self: end; color: #7b8da5; font-size: 20px; }
.teacher-diagnostic-skill[open] summary::after { content: "−"; }
.teacher-diagnostic-skill summary > span { color: #203e61; }
.teacher-diagnostic-skill summary small { color: #708198; line-height: 1.45; }
.teacher-diagnostic-body { display: grid; gap: 10px; padding: 0 16px 16px; }
.teacher-diagnostic-body > p { margin: 0; padding: 12px 14px; border-radius: 10px; color: #435a74; background: #f7f9fc; line-height: 1.7; }
.teacher-diagnostic-pattern { padding: 13px 14px; border-left: 3px solid #0b6ff5; background: #f6f9fe; }
.teacher-diagnostic-pattern > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.teacher-diagnostic-pattern strong { color: #173a60; }
.teacher-diagnostic-pattern span { color: #087f86; font-size: 12px; font-weight: 800; }
.teacher-diagnostic-pattern p { margin: 7px 0; color: #4f637b; line-height: 1.65; }
.teacher-diagnostic-pattern small { color: #8794a5; }
.teacher-vocabulary-note { padding: 15px 16px; border-radius: 12px; background: #f7f9fc; }

.teacher-interpretation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.teacher-interpretation-evidence { padding: 14px; border: 1px solid #dae7f8; border-radius: 12px; background: #f8fbff; }
.teacher-interpretation-evidence strong { color: #0868f7; }
.teacher-interpretation-evidence p { margin: 7px 0; color: #2a405b; line-height: 1.55; }
.teacher-interpretation-evidence span { color: #7a899d; font-size: 12px; }
.teacher-interpretation-grid.priority .teacher-interpretation-evidence { border-color: #cfe9ea; background: #f4fbfb; }
.teacher-interpretation-grid.priority .teacher-interpretation-evidence strong { color: #009da6; }
.teacher-interpretation-neutral { grid-column: 1 / -1; margin: 0; padding: 16px; border: 1px dashed #cbd8ea; border-radius: 14px; color: #60728c; background: #f8fbff; }

.teacher-plan-timeline { display: grid; gap: 10px; }
.teacher-plan-timeline > div { position: relative; padding: 12px 14px 12px 102px; border-left: 2px solid #b9d5ff; background: #f8fbff; }
.teacher-plan-timeline > div > span { position: absolute; left: 14px; top: 13px; color: #0868f7; font-size: 12px; font-weight: 800; }
.teacher-plan-timeline strong { color: #183a5f; }
.teacher-plan-timeline p { margin: 5px 0; color: #52657d; line-height: 1.55; }
.teacher-plan-timeline small { color: #8592a3; }
.teacher-parent-script { padding: 17px; border-radius: 13px; background: #f7f9fc; }
.teacher-parent-script p + p { margin-top: 8px !important; }
.teacher-interpretation-report ul { margin: 0; padding-left: 20px; color: #52657d; line-height: 1.8; }
.teacher-interpretation-limit { padding: 12px 14px; border-radius: 10px; background: #fff8e8; color: #8c6819; font-size: 13px; }

.teacher-link-dialog {
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  border: 0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 30px 90px rgba(11, 38, 75, .24);
}
.teacher-link-dialog::backdrop { background: rgba(14, 30, 52, .42); backdrop-filter: blur(3px); }
.teacher-link-dialog-head { display: flex; justify-content: space-between; gap: 20px; }
.teacher-link-dialog-head h2 { margin: 5px 0 0; color: #082b5c; }
.teacher-link-dialog .teacher-link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0 14px; }
.teacher-link-dialog label { display: grid; gap: 6px; color: #4b6079; font-size: 13px; font-weight: 700; }
.teacher-link-dialog textarea { min-height: 96px; padding: 11px; resize: vertical; }
.teacher-link-preview { overflow-wrap: anywhere; }
.teacher-link-dialog .teacher-bulk-links { margin-top: 18px; }

@media (max-width: 1180px) {
  .teacher-console-main .teacher-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .teacher-console-main .teacher-layout { grid-template-columns: 1fr; }
  .teacher-console-main .teacher-detail { min-height: 0; }
}

@media (max-width: 760px) {
  .teacher-console-shell { grid-template-columns: 1fr; }
  .teacher-sidebar { position: static; height: auto; padding: 16px; }
  .teacher-sidebar-nav { grid-template-columns: 1fr 1fr; margin-top: 16px; }
  .teacher-sidebar-profile,
  .teacher-sidebar-logout { display: none; }
  .teacher-console-main { padding: 22px 14px 38px; }
  .teacher-console-header { align-items: stretch; flex-direction: column; }
  .teacher-console-main .teacher-metrics { grid-template-columns: repeat(3, 1fr); }
  .teacher-console-main .teacher-metric-card { padding: 13px; }
  .teacher-console-main .teacher-metric-card strong { font-size: 24px; }
  .teacher-console-main .teacher-filters { grid-template-columns: 1fr 1fr; }
  .teacher-console-main .teacher-layout { display: grid; }
  .teacher-console-main .teacher-list,
  .teacher-console-main .teacher-detail { padding: 16px; }
  .teacher-interpretation-grid { grid-template-columns: 1fr; }
  .teacher-level-paths > div,
  .teacher-diagnostic-skill summary { grid-template-columns: 1fr; }
  .teacher-level-paths p { grid-column: 1; }
  .teacher-diagnostic-skill summary::after { position: absolute; right: 30px; }
  .teacher-diagnostic-pattern > div { align-items: flex-start; flex-direction: column; }
  .teacher-link-dialog .teacher-link-grid { grid-template-columns: 1fr; }
}

@media print {
  .teacher-sidebar,
  .teacher-console-header,
  .teacher-metrics,
  .teacher-filters,
  .teacher-list,
  .teacher-detail-tabs,
  .teacher-actions-row { display: none !important; }
  .teacher-console-shell,
  .teacher-console-main,
  .teacher-layout { display: block; padding: 0; background: #fff; }
  .teacher-console-main .teacher-detail { display: block; border: 0; box-shadow: none; }
}

/* 2026-08-14 speaking interaction and mobile scale normalization.
   This is the final student-facing layer: one recording control, no overlap. */
body .speaking-card .speaking-area {
  gap: 14px;
}

body .speaking-card .speaking-prompt {
  max-width: 760px;
  margin: 10px auto 14px;
  padding: 16px 20px;
  border: 1px solid #e3eaf3;
  border-radius: 14px;
  font-size: clamp(21px, 3.2vw, 29px);
  line-height: 1.42;
}

body .speaking-card .record-controls {
  position: static;
  display: grid;
  grid-template-columns: 1fr !important;
  width: 100%;
  min-height: 0;
  justify-items: center;
  gap: 14px;
  padding: 10px 0 4px;
}

body .speaking-card #recordBtn {
  position: static;
  grid-column: 1;
  width: 126px;
  height: 126px;
  min-height: 126px;
  padding: 12px;
  border: 10px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #1769ff;
  box-shadow: 0 0 0 3px #1769ff, 0 0 0 12px #eef4ff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

body .speaking-card #recordBtn[data-recording-state="recording"] {
  background: #0e2a47;
  box-shadow: 0 0 0 3px #0e2a47, 0 0 0 12px #eef4ff;
}

body .speaking-card #recordBtn[data-recording-state="starting"] {
  opacity: .76;
}

body .speaking-card #recordStatus {
  position: static;
  grid-column: 1;
  display: block;
  width: 100%;
  min-height: 22px;
  margin: 0;
  padding: 0;
  transform: none;
  color: #667085;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
  text-align: center;
}

body .speaking-card #recordStatus::before {
  display: none;
}

body .speaking-card .playback-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
}

body .speaking-card .playback-area span {
  color: #0e2a47;
  font-size: 16px;
  font-weight: 800;
}

body .speaking-card .playback-area audio {
  width: 100%;
  height: 40px;
}

body .speaking-card .student-speaking-note {
  margin-top: 2px;
  padding: 14px 16px;
  border-radius: 12px;
}

@media (max-width: 760px) {
  body .shell,
  body .test-shell {
    width: min(100% - 16px, 620px);
    padding-top: 10px;
  }

  body .question-card--compact {
    gap: 12px;
    padding: 16px 14px;
    border-radius: 16px;
  }

  body .speaking-card .media-grid {
    gap: 10px;
  }

  body .speaking-card .media-box {
    padding: 10px;
  }

  body .speaking-card .speaking-prompt {
    margin: 6px auto 10px;
    padding: 13px 14px;
    font-size: clamp(19px, 5.4vw, 24px);
    line-height: 1.38;
  }

  body .speaking-card .record-controls {
    gap: 13px;
    padding: 8px 0 2px;
  }

  body .speaking-card #recordBtn {
    width: 116px;
    height: 116px;
    min-height: 116px;
    border-width: 9px;
    box-shadow: 0 0 0 3px #1769ff, 0 0 0 10px #eef4ff;
    font-size: 16px;
  }

  body .speaking-card #recordBtn[data-recording-state="recording"] {
    box-shadow: 0 0 0 3px #0e2a47, 0 0 0 10px #eef4ff;
  }

  body .speaking-card #recordStatus {
    font-size: 13px;
  }

  body .speaking-card .student-speaking-note {
    padding: 12px 13px;
  }

  body .speaking-card .student-speaking-note strong,
  body .speaking-card .student-speaking-note span {
    font-size: 13px;
    line-height: 1.55;
  }

  body .question-actions.bottom-action-bar {
    grid-template-columns: 70px 84px minmax(0, 1fr);
    gap: 8px;
    margin: 18px -14px -16px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-radius: 0 0 16px 16px;
  }

  body .question-actions.bottom-action-bar .primary,
  body .question-actions.bottom-action-bar .ghost {
    min-height: 52px;
    padding: 10px 8px;
    font-size: 15px;
  }
}

@media (max-width: 390px) {
  body .speaking-card #recordBtn {
    width: 110px;
    height: 110px;
    min-height: 110px;
  }

  body .question-actions.bottom-action-bar {
    grid-template-columns: 64px 76px minmax(0, 1fr);
  }
}
