:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5d6b82;
  --line: #d8dee8;
  --soft-line: #e8edf3;
  --paper: #f3f5f8;
  --panel: #ffffff;
  --nav: #101828;
  --nav-2: #182334;
  --blue: #1d4ed8;
  --blue-dark: #1e40af;
  --blue-soft: #eaf2ff;
  --safe: #12824c;
  --safe-soft: #e8f8ee;
  --warn-soft: #fff4e5;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 18px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.admin-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  color: #f7fbff;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%);
  border-right: 1px solid rgba(15, 23, 42, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  text-transform: uppercase;
}

.crest {
  display: grid;
  place-items: center;
  width: 48px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  font-family: Georgia, serif;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 0.9;
  letter-spacing: 0.03em;
}

.brand span {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.side-label,
.panel-title h2,
.student-section h3,
.admin-section h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side-label {
  margin-bottom: 12px;
  color: #c4d4ee;
}

.grade-select,
.grade-item,
.main-nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #eaf2ff;
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.grade-select {
  justify-content: space-between;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.grade-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.grade-list.collapsed {
  display: none;
}

.grade-item,
.main-nav button {
  padding: 0 16px;
}

.grade-item.active,
.main-nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 3px 0 0 #7dd3fc;
}

.grade-item span,
.main-nav span {
  width: 22px;
  text-align: center;
  color: #dbe8fb;
}

.grade-select .nav-icon,
.grade-item span:first-child,
.main-nav button span:first-child {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  height: 22px;
  color: transparent;
}

.grade-select .nav-icon::before,
.grade-item span:first-child::before,
.main-nav button span:first-child::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  color: #dbe8fb;
  background:
    linear-gradient(currentColor, currentColor) 50% 5px / 8px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 50% 9px / 8px 1.5px no-repeat;
}

.grade-select .nav-icon::before,
.grade-item span:first-child::before {
  border-radius: 999px;
  background: currentColor;
  box-shadow: inset 0 0 0 4px rgba(24, 35, 52, 0.94);
}

.main-nav {
  display: grid;
  gap: 8px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.sidebar-insight {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-insight span {
  color: #c4d4ee;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-insight strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.sidebar-insight p {
  margin: 0;
  color: #d7e2f3;
  font-size: 0.8rem;
  font-weight: 720;
  line-height: 1.35;
}

.admin-user {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #06152b;
  background: #e7edf8;
  font-weight: 900;
}

.admin-user strong,
.admin-user span {
  display: block;
}

.admin-user strong {
  font-size: 0.95rem;
}

.admin-user span {
  color: #bed0e8;
  font-size: 0.74rem;
}

.workspace {
  min-width: 0;
  padding: 30px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.title-row,
.header-actions,
.panel-title,
.preview-title > span,
.answer-title,
.standard-tags {
  display: flex;
  align-items: center;
}

.title-row {
  flex-wrap: wrap;
  gap: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.pill,
.hidden-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 850;
}

.pill.neutral {
  background: #f7f9fc;
}

.pill.safe {
  color: #0b7a38;
  background: var(--safe-soft);
}

.pill.safe::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--safe);
}

.pill.blue {
  color: #0759d9;
  background: var(--blue-soft);
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #cbd5e5;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 850;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

.toolbar-button.primary {
  min-width: 190px;
  border-color: var(--blue);
  color: #fff;
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
}

.student-only-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #b7cdf4;
  border-radius: 8px;
  color: #063f9d;
  background: #edf5ff;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.student-only-banner button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #94b9f5;
  border-radius: 8px;
  color: #073f9b;
  background: #fff;
  font-weight: 850;
}

.student-home {
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.student-home-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.student-home-kicker {
  color: #0759d9;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.student-home-heading h2 {
  margin: 0;
  color: #071a44;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1;
}

.student-centre-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.student-centre-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 176px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #cbd9ef;
  border-radius: 8px;
  color: #061126;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  text-align: left;
  box-shadow: 0 16px 38px rgba(4, 18, 43, 0.08);
}

.student-centre-card:hover,
.student-centre-card:focus-visible {
  border-color: #0759d9;
  box-shadow: 0 18px 42px rgba(7, 89, 217, 0.16);
  outline: none;
}

.practice-centre-card {
  background: linear-gradient(180deg, #ffffff, #f4fbf7);
}

.student-card-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: #fff;
  background: #0759d9;
  font-size: 1.5rem;
  font-weight: 900;
}

.practice-centre-card .student-card-icon {
  background: #10843f;
}

.student-centre-card strong,
.student-centre-card span span {
  position: relative;
  z-index: 1;
  display: block;
}

.student-centre-card strong {
  margin-bottom: 8px;
  color: #071a44;
  font-size: 1.35rem;
  line-height: 1.1;
}

.student-centre-card span span {
  color: #526074;
  font-size: 0.96rem;
  font-weight: 800;
}

.student-card-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 8px;
  color: #0759d9;
  background: #eaf2ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.practice-centre-card .student-card-pill {
  color: #0b7438;
  background: #e8f8ee;
}

.student-practice-home {
  display: grid;
  gap: 20px;
}

.practice-topic-cards {
  display: grid;
  gap: 18px;
}

.practice-topic-group {
  display: grid;
  gap: 12px;
}

.practice-topic-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #071a44;
}

.practice-topic-heading span {
  font-size: 1rem;
  font-weight: 900;
}

.practice-topic-heading strong {
  padding: 6px 10px;
  border-radius: 8px;
  color: #0759d9;
  background: #eaf2ff;
  font-size: 0.78rem;
}

.practice-topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.practice-topic-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  min-height: 132px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #cbd9ef;
  border-radius: 8px;
  color: #061126;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  text-align: left;
  box-shadow: 0 10px 26px rgba(4, 18, 43, 0.06);
}

.practice-topic-card:hover,
.practice-topic-card:focus-visible {
  border-color: #0759d9;
  box-shadow: 0 16px 34px rgba(7, 89, 217, 0.13);
  outline: none;
}

.practice-topic-thumb {
  display: block;
  width: 112px;
  min-height: 108px;
  overflow: hidden;
  border: 1px solid #d5e2f3;
  border-radius: 8px;
  background: #edf6ff;
}

.practice-topic-thumb img {
  width: 100%;
  height: 100%;
  min-height: 108px;
  object-fit: cover;
  transform: scale(1.12);
}

.practice-topic-card strong,
.practice-topic-card span span {
  display: block;
}

.practice-topic-card strong {
  max-width: calc(100% - 86px);
  margin-top: 34px;
  margin-bottom: 6px;
  color: #071a44;
  font-size: 1.05rem;
  line-height: 1.15;
}

.practice-topic-card span span {
  color: #526074;
  font-size: 0.84rem;
  font-weight: 800;
}

.draft-status {
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  color: #334155;
  background: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-soft);
}

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

.overview-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.overview-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #ffffff;
  background: #1d4ed8;
  font-size: 1.2rem;
  font-weight: 900;
}

.overview-icon.practice {
  background: #12824c;
}

.overview-icon.image {
  background: #6d5e12;
}

.overview-icon.review {
  background: #7c3aed;
}

.overview-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-card strong {
  display: block;
  margin-bottom: 5px;
  color: #0f172a;
  font-size: 1.25rem;
  line-height: 1.1;
}

.overview-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.35;
}

.workbench-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.workbench-tab {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #0f172a;
  background: #ffffff;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.workbench-tab strong,
.workbench-tab span {
  display: block;
}

.workbench-tab strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.workbench-tab span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 740;
}

.workbench-tab.active {
  border-color: #8fb7ff;
  background: #f5f8ff;
  box-shadow: inset 0 0 0 2px rgba(29, 78, 216, 0.08);
}

.library-grid {
  display: block;
}

.workbench-panel[hidden] {
  display: none !important;
}

.workbench-panel.is-active {
  display: block;
}

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

.test-library,
.student-preview,
.answer-panel {
  padding: 18px;
}

.test-library {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 16px 18px;
  align-items: start;
  overflow: visible;
}

.test-library > .panel-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.test-library > .filter-control,
.test-library > .test-list,
.test-library > .add-test {
  grid-column: 1;
}

.panel-title {
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--soft-line);
  color: #071a44;
}

.panel-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panel-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #b9dec8;
  border-radius: 8px;
  color: #0f7139;
  background: #eefaf2;
  font-size: 0.76rem;
  font-weight: 900;
}

.preview-title > span {
  gap: 8px;
  color: #273a56;
  font-size: 0.86rem;
  font-weight: 800;
}

.test-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.practice-library {
  grid-column: 2;
  grid-row: 2 / span 3;
  margin-top: 0;
  padding-top: 0;
  padding-left: 18px;
  border-top: 0;
  border-left: 1px solid var(--soft-line);
}

.practice-library-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.practice-library-title h3 {
  margin: 0;
  color: #071a44;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.practice-library-title span {
  color: #526074;
  font-size: 0.76rem;
  font-weight: 850;
}

.practice-list {
  display: flex;
  gap: 14px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 14px;
  scroll-padding-inline: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.practice-subject-group {
  display: grid;
  gap: 8px;
  flex: 0 0 clamp(300px, 32vw, 430px);
  align-content: start;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  scroll-snap-align: start;
}

.practice-subject-group + .practice-subject-group {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid var(--soft-line);
}

.practice-subject-group h4 {
  margin: 0;
  color: #0759d9;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.practice-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 18px;
  align-items: start;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #bdd3fb;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(236, 244, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.practice-workbench h3 {
  margin: 6px 0 8px;
  color: #071a44;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  line-height: 1.15;
}

.practice-workbench p {
  margin: 0;
  color: #526074;
  font-weight: 750;
  line-height: 1.45;
}

.practice-saved-status {
  margin-top: 10px !important;
  color: #0759d9 !important;
}

.practice-score-controls {
  display: grid;
  gap: 10px;
}

.practice-score-controls label {
  display: grid;
  gap: 7px;
  color: #273a56;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.practice-score-controls input,
.practice-score-controls textarea {
  width: 100%;
  border: 1px solid #c8d5ec;
  border-radius: 14px;
  background: #ffffff;
  color: #071a44;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.35;
  padding: 11px 12px;
  resize: vertical;
  text-transform: none;
}

.practice-score-controls input:focus,
.practice-score-controls textarea:focus {
  border-color: #3f46e8;
  box-shadow: 0 0 0 4px rgba(63, 70, 232, 0.12);
  outline: none;
}

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

.practice-actions button {
  min-height: 44px;
  border: 1px solid #bfd1ff;
  border-radius: 14px;
  background: #ffffff;
  color: #3f46e8;
  font-weight: 900;
}

.practice-actions button:first-child {
  border-color: #3f46e8;
  background: #3f46e8;
  color: #ffffff;
}

.filter-control {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  color: #071a44;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e5;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
}

.test-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 80px;
  padding: 14px 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.practice-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdff;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.practice-button.active {
  border-color: var(--blue);
  background: #f3f7ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.practice-button strong,
.practice-button span {
  display: block;
}

.practice-button strong {
  margin-bottom: 4px;
  font-size: 0.94rem;
}

.practice-button span {
  color: #25324a;
  font-size: 0.78rem;
}

.practice-chip {
  max-width: 92px;
  min-width: 70px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #0759d9;
  background: var(--blue-soft);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.15;
}

.test-button.active {
  border-color: var(--blue);
  background: linear-gradient(90deg, #f4f8ff, #ffffff);
  box-shadow: inset 4px 0 0 var(--blue);
}

.test-button strong,
.test-button span {
  display: block;
}

.test-button strong {
  margin-bottom: 5px;
  font-size: 1.02rem;
}

.test-button span {
  color: #25324a;
  font-size: 0.82rem;
}

.count-chip {
  min-width: 80px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #0759d9;
  background: var(--blue-soft);
  text-align: center;
  font-weight: 900;
}

.add-test {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin-top: 0;
  border: 1px solid #cbd5e5;
  border-radius: 8px;
  color: #061126;
  background: #fff;
  font-weight: 850;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

.reading-cards {
  display: grid;
  gap: 18px;
}

.reading-page {
  display: grid;
  gap: 18px;
}

.reading-page--hidden {
  display: none;
}

.page-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px;
  border: 1px solid #b8cbef;
  border-radius: 8px;
  background: #edf5ff;
}

.page-switcher span {
  padding: 0 6px;
  color: #173154;
  font-size: 0.86rem;
  font-weight: 900;
}

.page-switcher button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  border: 1px solid #b8cbef;
  border-radius: 8px;
  color: #0759d9;
  background: #ffffff;
  font-weight: 900;
}

.page-switcher button.active {
  color: #ffffff;
  border-color: #0759d9;
  background: #0759d9;
}

.reading-page + .reading-page {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid var(--soft-line);
}

.reading-page .student-section {
  margin-top: 0;
}

.reading-page .preview-card {
  grid-template-columns: minmax(250px, 34%) minmax(0, 1fr);
}

.reading-page .passage-image {
  min-height: 360px;
  max-height: 420px;
}

.compare-reading-header {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.compare-reading-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.compare-reading-header--inline {
  margin-top: 4px;
}

.preview-card {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.passage-image {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: contain;
  display: block;
  background: #f3f7ff;
}

.passage-column {
  padding: 26px 24px;
}

.passage-column h3 {
  margin: 0 0 14px;
  font-size: 1.18rem;
}

.reading-label {
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #0759d9;
  background: #eaf2ff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.passage-text {
  color: #050b19;
  font-size: 1rem;
  line-height: 1.32;
}

.passage-text p {
  margin: 0 0 18px;
}

.visual-data {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.visual-data h3 {
  margin: 0 0 12px;
  color: #0759d9;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.visual-data table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.visual-data th,
.visual-data td {
  padding: 12px;
  border: 1px solid var(--soft-line);
  text-align: left;
}

.visual-data th {
  background: #f3f7ff;
  color: #0a2a66;
}

.weather-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 999px;
  color: #0759d9;
  background: #eaf2ff;
  font-weight: 900;
}

.visual-data--sign {
  display: grid;
  gap: 10px;
  border: 3px solid #0b63df;
  background: #f8fbff;
  text-align: center;
}

.zoo-sign-text {
  display: grid;
  place-items: center;
  min-height: 84px;
  padding: 18px;
  border: 2px solid #061126;
  border-radius: 8px;
  color: #061126;
  background: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.2;
}

.visual-data--sign p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.visual-data--picture ul {
  margin: 0;
  padding-left: 20px;
  color: #050b19;
  line-height: 1.45;
}

.word-bank {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fbff;
}

.word-bank h3 {
  margin: 0 0 10px;
  color: #0759d9;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.word-bank div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-bank span {
  padding: 6px 10px;
  border: 1px solid #c9d9f3;
  border-radius: 8px;
  color: #173154;
  background: #fff;
  font-weight: 800;
}

.student-section {
  margin-top: 22px;
}

.student-section h3,
.admin-section h3 {
  margin-bottom: 10px;
  color: #0759d9;
}

.student-section--written-questions h3 {
  color: var(--oxford-navy);
}

.student-rows {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.student-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: start;
  width: 100%;
  min-height: 45px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  color: #061126;
  background: #fff;
  font-size: 0.92rem;
  text-align: left;
}

.student-row:last-child {
  border-bottom: 0;
}

.student-row:hover,
.student-row:focus-visible {
  background: #f7fbff;
}

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

.student-question-text {
  font-weight: 760;
}

.writing-answer-label {
  display: block;
  color: var(--oxford-navy);
  font-weight: 800;
  line-height: 1.45;
}

.choice-list {
  display: grid;
  gap: 7px;
}

.choice-option {
  display: grid;
  grid-template-columns: 18px 26px minmax(0, 1fr);
  align-items: start;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  color: #14233a;
  background: #f8fbff;
  line-height: 1.25;
  cursor: pointer;
}

.choice-option:has(input:checked) {
  border-color: #0b63f6;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(11, 99, 246, 0.18);
}

.choice-option:hover,
.choice-option:focus-within {
  border-color: #0b63f6;
  background: #f2f7ff;
}

.choice-option input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #0b63f6;
  cursor: pointer;
}

.choice-option strong {
  color: #0759d9;
}

.writing-answer-label {
  color: #061126;
  font-weight: 760;
}

.writing-answer {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid #cdd9ea;
  border-radius: 8px;
  color: #061126;
  background: #fff;
  font: inherit;
  line-height: 1.35;
  cursor: text;
}

.writing-answer:focus {
  outline: 3px solid rgba(11, 99, 246, 0.18);
  border-color: #0b63f6;
}

.matching-answer {
  display: grid;
  gap: 12px;
}

.matching-instruction {
  margin: 0;
  color: #566781;
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.4;
}

.matching-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(160px, 0.58fr);
  gap: clamp(38px, 7vw, 96px);
  min-height: 220px;
  padding: 16px;
  border: 1px solid #d7e2f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #f9fcff, #ffffff);
  overflow: hidden;
}

.matching-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.matching-lines line {
  stroke: #0b63f6;
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 3px rgba(11, 99, 246, 0.22));
}

.matching-column {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  align-content: start;
}

.matching-node {
  min-height: 54px;
  min-width: 0;
  border: 1px solid #cdd9ea;
  border-radius: 8px;
  padding: 10px 12px;
  color: #0b1c42;
  background: #fff;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 18px rgba(15, 35, 70, 0.06);
}

.matching-node:hover,
.matching-node:focus-visible,
.matching-node.is-active {
  outline: none;
  border-color: #0b63f6;
  background: #edf6ff;
  box-shadow: 0 0 0 3px rgba(11, 99, 246, 0.14);
}

.matching-node.is-matched {
  border-color: #0f9f6e;
  background: #ecfdf5;
}

.matching-node--right {
  display: grid;
  place-items: center;
  min-height: 96px;
  gap: 8px;
  text-align: center;
}

.matching-board--meaning {
  grid-template-columns: minmax(120px, 0.34fr) minmax(220px, 0.66fr);
}

.matching-column--meanings {
  gap: 10px;
}

.matching-node--meaning {
  min-height: 68px;
  place-items: start;
  align-content: center;
  padding: 12px 14px;
  color: #17345f;
  background: #f8fbff;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.matching-picture-scene {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 122px);
  min-height: 64px;
  border-radius: 8px;
  background: linear-gradient(160deg, #eaf2ff, #f8fbff);
  box-shadow: inset 0 0 0 1px rgba(11, 99, 246, 0.1);
}

.matching-picture-scene::before {
  content: "◌";
  font-size: 2rem;
  line-height: 1;
}

.matching-picture-scene--penguin::before { content: "🐧"; }
.matching-picture-scene--fish::before { content: "🐟"; }
.matching-picture-scene--water::before { content: "💧"; }
.matching-picture-scene--snow::before { content: "❄"; }
.matching-picture-scene--air::before { content: "🪽"; }
.matching-picture-scene--footprints::before { content: "👣"; }
.matching-picture-scene--brush::before { content: "🖌"; }
.matching-picture-scene--paint::before { content: "🎨"; }
.matching-picture-scene--paper::before { content: "📄"; }
.matching-picture-scene--person::before { content: "👤"; }
.matching-picture-scene--bear::before { content: "🐻"; }
.matching-picture-scene--honey::before { content: "🍯"; }
.matching-picture-scene--tree::before { content: "🌳"; }
.matching-picture-scene--sun::before { content: "☀"; }
.matching-picture-scene--train::before { content: "🚆"; }
.matching-picture-scene--umbrella::before { content: "☂"; }
.matching-picture-scene--donkey::before { content: "🐴"; }
.matching-picture-scene--shadow::before { content: "◼"; }
.matching-picture-scene--boat::before { content: "🚢"; }

.matching-picture-caption {
  color: #46617f;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-help {
  margin: 0 0 10px;
  color: #566781;
  font-size: 0.94rem;
  font-weight: 760;
}

.fill-blank-answer,
.ordering-answer,
.selection-answer,
.drawing-answer,
.text-match-answer,
.composite-answer {
  display: grid;
  gap: 12px;
}

.instruction-only-answer {
  padding: 14px 16px;
  border: 1px dashed #b9c8dc;
  border-radius: 8px;
  color: #48617f;
  background: #f8fbff;
  font-weight: 850;
  line-height: 1.45;
}

.fill-blank-line {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d7e2f1;
  border-radius: 8px;
  background: #fff;
  color: #0b1c42;
  font-size: 1.02rem;
  font-weight: 760;
  line-height: 1.55;
}

.fill-blank-item {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e0e8f4;
  border-radius: 8px;
  background: #fbfdff;
}

.fill-blank-question {
  color: #0b1c42;
  font-weight: 900;
  line-height: 1.55;
}

.fill-blank-placeholder {
  display: inline-block;
  min-width: 74px;
  border-bottom: 2px solid #8ea3c0;
  color: transparent;
  transform: translateY(-2px);
}

.fill-blank-input-list {
  display: grid;
  gap: 10px;
}

.fill-blank-answer-slot {
  display: grid;
  gap: 6px;
  align-items: start;
  max-width: 620px;
}

.fill-blank-answer-slot > span {
  color: #5b6b83;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fill-blank-input,
.ordering-input {
  border: 1px solid #b9c8dc;
  border-radius: 8px;
  padding: 0 12px;
  color: #0b1c42;
  background: #f8fbff;
  font: inherit;
  font-weight: 900;
}

.fill-blank-input {
  width: 100%;
  min-height: 52px;
  margin: 0;
}

.ordering-input {
  width: min(190px, 100%);
  min-height: 42px;
  margin: 0 6px;
}

.fill-blank-input:focus,
.ordering-input:focus {
  outline: 3px solid rgba(11, 99, 246, 0.16);
  border-color: #0b63f6;
  background: #fff;
}

.activity-word-bank,
.ordering-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-word-bank strong {
  color: #48617f;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.activity-word-bank button,
.ordering-chips button {
  min-height: 36px;
  border: 1px solid #c8d6ea;
  border-radius: 999px;
  padding: 0 13px;
  color: #0b3f91;
  background: #eef6ff;
  font-weight: 900;
  cursor: pointer;
}

.ordering-group,
.selection-group,
.text-match-row,
.ordering-event-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7e2f1;
  border-radius: 8px;
  background: #fff;
}

.text-match-row,
.ordering-event-row {
  grid-template-columns: minmax(120px, 0.42fr) minmax(180px, 1fr);
  align-items: center;
}

.text-match-row > span,
.ordering-event-row > span {
  color: #0b1c42;
  font-weight: 900;
  line-height: 1.35;
}

.text-match-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #b9c8dc;
  border-radius: 8px;
  padding: 0 12px;
  color: #0b1c42;
  background: #f8fbff;
  font: inherit;
  font-weight: 850;
}

.text-match-input:focus {
  outline: 3px solid rgba(11, 99, 246, 0.16);
  border-color: #0b63f6;
  background: #fff;
}

.ordering-input {
  width: 100%;
  margin: 0;
}

.ordering-input--number {
  width: 72px;
  margin: 0;
  text-align: center;
}

.selection-group > span {
  color: #0b1c42;
  font-weight: 850;
  line-height: 1.35;
}

.selection-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid #c8d6ea;
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fbff;
  color: #17345f;
  font-weight: 900;
  cursor: pointer;
}

.selection-chip.is-selected,
.selection-chip:has(input:checked) {
  border-color: #0b63f6;
  background: #eaf2ff;
  color: #0b3f91;
}

.drawing-canvas {
  width: 100%;
  min-height: 220px;
  aspect-ratio: 5 / 2;
  border: 1px solid #c8d6ea;
  border-radius: 8px;
  background:
    radial-gradient(circle at 1px 1px, rgba(11, 99, 246, 0.16) 1px, transparent 0) 0 0 / 18px 18px,
    #fff;
  touch-action: none;
  cursor: crosshair;
}

.drawing-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #566781;
  font-weight: 800;
}

.drawing-tools button {
  min-height: 36px;
  border: 1px solid #c8d6ea;
  border-radius: 8px;
  padding: 0 13px;
  color: #17345f;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.drawing-note {
  width: 100%;
  resize: vertical;
  border: 1px solid #c8d6ea;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.matching-clear-button {
  justify-self: start;
  min-height: 38px;
  border: 1px solid #cbd5e5;
  border-radius: 8px;
  padding: 0 14px;
  color: #17345f;
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.matching-clear-button:hover,
.matching-clear-button:focus-visible {
  border-color: #0b63f6;
  color: #0b63f6;
}

.student-row .arrow {
  justify-self: end;
  align-self: center;
  color: #183154;
  font-size: 1.2rem;
}

.answer-panel {
  position: static;
  max-height: none;
  overflow: visible;
}

.hidden-pill {
  min-height: 32px;
  border: 0;
  color: #8b3c0f;
  background: var(--warn-soft);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.hidden-pill::before {
  content: "▣";
  margin-right: 7px;
}

.admin-section {
  margin-top: 24px;
  max-width: 100%;
  overflow-x: auto;
}

.answer-table,
.rubric-table,
.coverage-table,
.writing-meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
}

.answer-table th,
.answer-table td,
.coverage-table th,
.coverage-table td,
.writing-meta-table th,
.writing-meta-table td,
.rubric-table td,
.rubric-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--soft-line);
  vertical-align: top;
  text-align: left;
  line-height: 1.35;
}

.answer-table th {
  color: #173154;
  background: #f4f8ff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.answer-table tr:last-child td,
.coverage-table tr:last-child td,
.coverage-table tr:last-child th,
.writing-meta-table tr:last-child td,
.writing-meta-table tr:last-child th,
.rubric-table tr:last-child td,
.rubric-table tr:last-child th {
  border-bottom: 0;
}

.answer-table th + th,
.answer-table td + td,
.coverage-table td,
.writing-meta-table td,
.rubric-table td {
  border-left: 1px solid var(--soft-line);
}

.rubric-table th {
  width: 58px;
  border-right: 1px solid var(--soft-line);
  text-align: center;
}

.standard-tags {
  flex-wrap: wrap;
  gap: 10px;
}

.standard-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #b8cbef;
  border-radius: 8px;
  color: #0759d9;
  background: #edf5ff;
  font-weight: 900;
}

.standard-tag.small {
  min-width: 58px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.coverage-table th,
.writing-meta-table th {
  width: 58px;
  color: #0759d9;
  background: #f8fbff;
  font-weight: 900;
}

.coverage-table td:last-child {
  width: 52px;
  text-align: center;
  font-weight: 900;
}

.writing-meta-title {
  margin-bottom: 8px;
  font-weight: 900;
}

.oral-text {
  margin: 0;
  color: #071126;
  line-height: 1.65;
}

.admin-notes {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  outline: none;
}

.safe-note {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #8eb7f7;
  border-radius: 8px;
  color: #0751c1;
  background: #f4f8ff;
  line-height: 1.35;
}

.safe-note strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: #0a5ed7;
}

.validation-status {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #f0c2b6;
  border-radius: 8px;
  color: #8b2f17;
  background: #fff3ef;
  font-weight: 850;
}

.validation-status.is-valid {
  border-color: #b7e3c6;
  color: #0b7438;
  background: #eefaf2;
}

body.student-preview-mode .sidebar,
body.student-preview-mode .test-library,
body.student-preview-mode .answer-panel,
body.student-preview-mode .header-actions,
body.student-preview-mode .overview-grid,
body.student-preview-mode .workbench-tabs,
body.student-preview-mode .draft-status,
body.student-preview-mode .page-header .pill.neutral {
  display: none;
}

body.student-preview-mode .admin-shell,
body.student-preview-mode .library-grid {
  display: block;
}

body.student-preview-mode .workspace {
  max-width: 980px;
  margin: 0 auto;
  padding-top: 24px;
}

body.student-preview-mode.student-home-mode .library-grid,
body.student-preview-mode.student-practice-topic-mode .library-grid {
  display: none;
}

@media (max-width: 1600px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 26px 24px;
  }

  .toolbar-button {
    min-height: 46px;
    padding: 0 15px;
  }
}

@media (max-width: 1180px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .library-grid {
    display: block;
  }

  .page-header {
    display: grid;
  }

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

  .workbench-tabs,
  .test-library {
    grid-template-columns: 1fr;
  }

  .practice-library {
    grid-column: 1;
    grid-row: auto;
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--soft-line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  html,
  body,
  .admin-shell,
  .sidebar,
  .workspace {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  .admin-shell {
    display: block;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .page-header,
  .draft-status,
  .overview-grid,
  .workbench-tabs,
  .library-grid,
  .panel,
  .overview-card,
  .workbench-tab {
    min-width: 0;
    max-width: 100%;
  }

  .title-row,
  .header-actions,
  .panel-title,
  .student-only-banner,
  .practice-topic-heading,
  .practice-library-title,
  .answer-title,
  .view-heading {
    flex-wrap: wrap;
  }

  h1,
  .title-row,
  .toolbar-button,
  .draft-status,
  .student-only-banner,
  .panel,
  .panel-title,
  .panel-title h2,
  .view-heading h2,
  .overview-card,
  .student-row,
  .choice-option,
  .passage-column,
  .assignment-layout article,
  .workbench-tab strong,
  .workbench-tab span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .sidebar {
    padding: 18px;
    min-width: 0;
  }

  .brand {
    margin-bottom: 18px;
  }

  .main-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    overflow: visible;
  }

  .main-nav button {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
  }

  .sidebar-insight,
  .admin-user {
    display: none;
  }

  .workspace {
    padding: 18px;
    min-width: 0;
  }

  .page-header,
  .preview-card {
    display: block;
  }

  .page-header,
  .draft-status,
  .student-only-banner,
  .view-section,
  .panel,
  .overview-card {
    width: 100%;
    overflow: hidden;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .workbench-tabs {
    grid-template-columns: 1fr;
  }

  .workbench-tab {
    min-height: 64px;
  }

  .overview-card {
    min-height: 104px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    margin-top: 16px;
  }

  .toolbar-button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .toolbar-button.primary {
    min-width: 0;
  }

  .passage-image {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .student-home {
    padding: 20px;
  }

  .student-centre-cards {
    grid-template-columns: 1fr;
  }

  .practice-topic-list {
    grid-template-columns: 1fr;
  }

  .practice-topic-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .practice-topic-thumb {
    width: 96px;
  }

  .student-centre-card {
    min-height: 148px;
  }

  .panel-title {
    display: grid;
    grid-template-columns: 1fr;
  }

  .answer-title,
  .panel-title {
    align-items: flex-start;
  }

  .student-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .student-row .arrow,
  .student-row .preview-lock {
    grid-column: 2;
    justify-self: start;
  }

  .choice-option {
    grid-template-columns: 18px 22px minmax(0, 1fr);
    padding: 8px;
  }

  .passage-column {
    padding: 20px 16px;
  }

  .answer-table,
  .coverage-table,
  .writing-meta-table {
    min-width: 540px;
  }

  .rubric-table {
    min-width: 0;
  }

  .test-list,
  .practice-list {
    max-height: 420px;
  }

  .practice-workbench {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .practice-actions {
    grid-template-columns: 1fr;
  }

  .practice-list {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .practice-subject-group {
    flex-basis: min(82vw, 360px);
  }
}

@media (max-height: 760px) {
  .admin-user {
    display: none;
  }
}

@media print {
  .sidebar,
  .page-header,
  .overview-grid,
  .workbench-tabs,
  .draft-status,
  .test-library,
  .answer-panel,
  .filter-control,
  .word-bank,
  .student-only-banner {
    display: none !important;
  }

  .admin-shell,
  .library-grid {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .student-preview {
    border: 0;
    box-shadow: none;
  }

  .reading-page {
    display: grid;
    break-after: page;
    page-break-after: always;
  }

  .page-switcher {
    display: none;
  }

  .reading-page:last-of-type {
    break-after: auto;
    page-break-after: auto;
  }

  .reading-page + .reading-page {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

/* Safe 7-view redesign: admin-only static Test Centre */
.view-section {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.view-section[hidden] {
  display: none !important;
}

.view-section.is-active {
  animation: viewFadeIn 160ms ease-out;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-nav button[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 3px 0 0 #7dd3fc;
}

.grade-item.is-disabled,
button.is-disabled,
.locked-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.grade-item.is-disabled {
  justify-content: space-between;
}

.grade-item em {
  margin-left: auto;
  color: #b8c7dd;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-count.warning {
  color: #9a5200;
  border-color: #f2c876;
  background: #fff6df;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
}

.dashboard-panel {
  padding: 18px;
}

.readiness-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.readiness-list div {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f8fbff;
}

.readiness-list strong {
  display: block;
  margin-bottom: 8px;
  color: #071a44;
  font-size: 1.75rem;
  line-height: 1;
}

.readiness-list span {
  color: #526074;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.35;
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.quick-actions button,
.locked-actions button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #cbd5e5;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  text-align: left;
  font-weight: 860;
}

.quick-actions button:hover,
.quick-actions button:focus-visible {
  color: #0759d9;
  border-color: #8fb7ff;
  background: #f5f8ff;
  outline: none;
}

.view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.view-heading h2 {
  margin: 0;
  color: #071a44;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.1;
}

.redesign-library-grid {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.redesign-library-grid .test-library {
  display: block;
  padding: 18px;
}

.selected-content-panel,
.practice-library-page,
.locked-workflow,
.reports-panel {
  padding: 18px;
}

.selected-content-panel p,
.locked-workflow p,
.empty-state p {
  margin: 0;
  color: #526074;
  font-weight: 740;
  line-height: 1.5;
}

.practice-library-page .practice-list {
  max-height: none;
}

.practice-subject-group h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.practice-subject-group h4 span {
  color: #64748b;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.practice-button {
  grid-template-columns: minmax(0, 1fr) auto;
}

.practice-button small {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 900;
}

.practice-chip {
  min-width: 68px;
  text-align: center;
}

.practice-chip--saved {
  color: #047857;
  background: #dcfce7;
}

.student-only-banner {
  align-items: center;
  justify-content: flex-start;
  color: #0759d9;
  border-color: #b7cdf4;
  background: #edf5ff;
}

.student-dashboard {
  max-width: 1220px;
  margin: 0 auto 12px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid #d8e3f1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: var(--shadow-soft);
}

.student-dashboard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.student-dashboard__header h2,
.student-dashboard__recent h3 {
  margin: 0;
  color: var(--oxford-navy);
}

.student-dashboard__status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b7cdf4;
  border-radius: 999px;
  color: #0759d9;
  background: #edf5ff;
  font-size: 0.78rem;
  font-weight: 900;
}

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

.student-stat-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
}

.student-stat-card span,
.student-stat-card small {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 900;
}

.student-stat-card strong {
  display: block;
  margin: 6px 0 2px;
  color: var(--oxford-navy);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.1;
}

.student-progress-bar {
  height: 10px;
  margin: 14px 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.student-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0759d9, #10b981);
  transition: width 180ms ease;
}

.student-dashboard__recent {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.student-recent-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.student-recent-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
}

.student-recent-list span {
  min-width: 0;
}

.student-recent-list strong,
.student-recent-list small {
  display: block;
}

.student-recent-list strong {
  color: var(--oxford-navy);
}

.student-recent-list small {
  color: #64748b;
  font-size: 0.78rem;
}

.practice-stepper {
  position: sticky;
  top: 12px;
  z-index: 20;
  max-width: 1220px;
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr) minmax(140px, auto);
  align-items: center;
  gap: 12px;
  margin: 0 auto 12px;
  padding: 12px;
  border: 1px solid #cddcf1;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.practice-stepper--bottom {
  position: static;
  margin-top: 16px;
  margin-bottom: 0;
}

.practice-stepper > div {
  min-width: 0;
  text-align: center;
}

.practice-stepper strong {
  display: block;
  color: var(--oxford-navy);
  font-size: 1rem;
  line-height: 1.25;
}

.stepper-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #cbd5e5;
  border-radius: 8px;
  color: var(--oxford-navy);
  background: #fff;
  font-weight: 900;
}

.stepper-button.primary {
  color: #fff;
  border-color: var(--oxford-blue);
  background: var(--oxford-blue);
}

.stepper-button:disabled {
  cursor: not-allowed;
  color: #94a3b8;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.choice-option--disabled,
.writing-answer[readonly] {
  cursor: not-allowed;
  background: #f8fafc;
}

.choice-option--disabled input {
  cursor: not-allowed;
}

.preview-lock {
  align-self: start;
  padding: 6px 8px;
  border-radius: 8px;
  color: #0759d9;
  background: #eaf2ff;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-lock--local {
  color: #075985;
  background: #e0f2fe;
}

.assignment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: start;
}

.assignment-layout article {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f8fbff;
}

.assignment-layout h3 {
  margin: 0 0 10px;
  color: #071a44;
  font-size: 1.18rem;
  line-height: 1.2;
}

.locked-actions {
  display: grid;
  gap: 10px;
}

.locked-actions button:disabled {
  color: #64748b;
  background: #f8fafc;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 32px;
  border: 1px dashed #b9c7da;
  border-radius: 8px;
  background: #f8fbff;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 10px;
  color: #071a44;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.1;
}

@media (max-width: 1180px) {
  .dashboard-grid,
  .redesign-library-grid,
  .assignment-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .view-heading,
  .dashboard-grid,
  .redesign-library-grid,
  .assignment-layout,
  .readiness-list {
    grid-template-columns: 1fr;
  }

  .view-heading {
    align-items: stretch;
  }

  .view-heading .add-test,
  .view-heading .panel-count {
    width: 100%;
    justify-content: center;
  }

  .preview-lock {
    justify-self: start;
  }

  .matching-board {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 12px;
  }

  .matching-lines {
    display: none;
  }

  .matching-column,
  .matching-node,
  .fill-blank-line,
  .selection-group,
  .ordering-group,
  .text-match-row,
  .ordering-event-row {
    min-width: 0;
  }

  .text-match-row,
  .ordering-event-row {
    grid-template-columns: 1fr;
  }

  .matching-node--right {
    min-height: 78px;
  }

  .fill-blank-answer-slot {
    max-width: none;
  }

  .fill-blank-input {
    width: 100%;
  }

  .drawing-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .drawing-tools button {
    width: 100%;
  }
}

@media print {
  .view-section:not(#studentPreviewView),
  .view-section:not(#studentPreviewView).is-active,
  #dashboardView,
  #testLibraryView,
  #practiceLibraryView,
  #teacherReviewView,
  #assignmentView,
  #reportsView {
    display: none !important;
  }

  #studentPreviewView {
    display: block !important;
  }
}

/* 2026-06-08 ChatGPT-directed command-center redesign. */
:root {
  --oxford-navy: #071a44;
  --oxford-blue: #2457d6;
  --oxford-red: #c8102e;
  --oxford-green: #087a4b;
  --surface: #f6f8fb;
  --surface-2: #edf2f7;
  --card-line: #d7dfeb;
}

body {
  background:
    linear-gradient(180deg, #edf2f7 0, #f8fafc 280px, #f6f8fb 100%);
}

.admin-shell {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  z-index: 50;
  top: 0;
  height: auto;
  display: grid;
  grid-template-columns: minmax(170px, 210px) minmax(140px, 190px) minmax(0, 1fr) minmax(160px, 200px);
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-right: 0;
  border-bottom: 1px solid var(--card-line);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.brand {
  gap: 12px;
  margin: 0;
  color: var(--oxford-navy);
}

.crest {
  width: 42px;
  height: 48px;
  color: #fff;
  border: 0;
  border-radius: 6px;
  background: var(--oxford-navy);
  box-shadow: inset 0 -6px 0 rgba(200, 16, 46, 0.9);
}

.brand strong {
  font-size: 1.35rem;
  letter-spacing: 0;
}

.brand span {
  color: #5b6a82;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.sidebar-block {
  min-width: 0;
}

.side-label {
  margin-bottom: 5px;
  color: #718096;
  font-size: 0.64rem;
}

.grade-select {
  min-height: 38px;
  color: var(--oxford-navy);
  border-color: var(--card-line);
  background: #f8fafc;
}

.grade-list {
  position: absolute;
  top: 74px;
  width: min(280px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.grade-item {
  color: var(--oxford-navy);
}

.main-nav {
  display: flex;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.main-nav button {
  width: auto;
  min-width: max-content;
  min-height: 40px;
  padding: 0 10px;
  color: #334155;
  border: 1px solid transparent;
  border-radius: 8px;
  white-space: nowrap;
}

.main-nav button span:first-child {
  display: none;
}

.main-nav button.active {
  color: #fff;
  border-color: var(--oxford-blue);
  background: var(--oxford-blue);
  box-shadow: none;
}

.main-nav button span:first-child::before {
  color: currentColor;
  opacity: 0.9;
}

.sidebar-insight {
  display: none;
}

.sidebar-insight span,
.sidebar-insight p {
  color: #64748b;
}

.sidebar-insight strong {
  color: var(--oxford-green);
}

.admin-user {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  color: #1e293b;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

.admin-user .avatar {
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--oxford-navy);
}

.admin-user span {
  color: #64748b;
}

.workspace {
  width: min(1780px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 2vw, 30px) 44px;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: auto;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid #cdd8e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.title-row h1 {
  color: var(--oxford-navy);
  font-size: clamp(1.55rem, 2.2vw, 2.35rem);
}

.header-actions {
  flex-wrap: nowrap;
}

.toolbar-button,
.add-test,
.practice-actions button,
.quick-actions button,
.locked-actions button {
  border-radius: 8px;
}

.toolbar-button.primary {
  background: var(--oxford-blue);
}

.draft-status {
  margin-bottom: 18px;
  border-color: #b6d7ff;
  background: #eff6ff;
}

.test-centre-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: clamp(22px, 3vw, 34px);
  color: #fff;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7, 26, 68, 0.98), rgba(36, 87, 214, 0.9)),
    var(--oxford-navy);
  box-shadow: 0 18px 44px rgba(7, 26, 68, 0.16);
}

.test-centre-hero h2 {
  max-width: 960px;
  margin: 8px 0 12px;
  font-size: clamp(1.75rem, 3.2vw, 3.5rem);
  line-height: 1.02;
}

.test-centre-hero p {
  max-width: 820px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(1rem, 1.1vw, 1.16rem);
  font-weight: 720;
  line-height: 1.55;
}

.test-centre-hero .panel-kicker {
  color: #bfdbfe;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

.hero-metrics div {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-metrics strong {
  font-size: clamp(1.75rem, 2.5vw, 3rem);
  line-height: 1;
}

.hero-metrics span {
  color: #dbeafe;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
}

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

.overview-card,
.panel,
.view-heading {
  border-color: var(--card-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.overview-card {
  min-height: 122px;
  padding: 18px;
}

.overview-icon {
  border-radius: 8px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.55fr);
}

.view-section {
  animation: fadeInUp 0.18s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.redesign-library-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.test-list {
  max-height: min(680px, calc(100vh - 230px));
}

.test-button,
.practice-button {
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.test-button:hover,
.practice-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.practice-library-page {
  overflow: hidden;
}

.practice-workbench {
  border-color: #cbd8ec;
  background: #f8fbff;
}

.practice-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(330px, 380px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.practice-subject-group {
  scroll-snap-align: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

.practice-subject-group h4 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 12px;
  padding: 2px 0 10px;
  color: var(--oxford-navy);
  background: #fff;
}

.practice-button {
  margin-bottom: 9px;
}

.student-preview {
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(18px, 2vw, 28px);
}

.student-only-banner {
  max-width: 1220px;
  margin: 0 auto 12px;
  border-radius: 8px;
}

body.student-live-mode {
  background: #f3f7fc;
}

body.student-live-mode .admin-shell {
  display: block;
  min-height: 100vh;
}

body.student-live-mode .sidebar,
body.student-live-mode .page-header,
body.student-live-mode .draft-status {
  display: none;
}

body.student-live-mode .workspace {
  width: 100%;
  max-width: none;
  padding: clamp(14px, 2vw, 28px);
}

.student-live-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #d6e4f5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 35, 70, 0.08);
}

.student-live-topbar strong {
  display: block;
  color: #0a1d45;
  font-size: 1.1rem;
}

.student-live-topbar small {
  display: block;
  margin-top: 4px;
  color: #617089;
  font-weight: 750;
}

body.student-live-mode .student-live-topbar {
  display: flex;
}

body.student-live-mode .student-only-banner {
  display: none;
}

body.student-live-mode #studentPreviewView {
  max-width: 1240px;
  margin: 0 auto;
}

body.student-live-mode .student-dashboard {
  margin-top: 0;
}

body.student-live-mode .student-preview {
  border-color: #d8e3f1;
}

body.student-live-mode .preview-title span:last-child {
  display: none;
}

.student-dashboard__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.student-dashboard__actions span {
  color: #66748a;
  font-size: 0.86rem;
  font-weight: 750;
}

.student-main-action,
.student-secondary-action {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}

.student-main-action {
  color: #fff;
  border: 1px solid #08357f;
  background: linear-gradient(135deg, #0b4db6, #072866);
  box-shadow: 0 10px 24px rgba(7, 40, 102, 0.18);
}

.student-secondary-action {
  color: #17345f;
  border: 1px solid #c8d6ea;
  background: #fff;
}

.preview-title {
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--soft-line);
}

.preview-card {
  grid-template-columns: minmax(260px, 36%) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid #d6e0ed;
  border-radius: 8px;
  background: #fff;
}

.passage-image {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.passage-column h3 {
  font-size: clamp(1.45rem, 2.1vw, 2.25rem);
  line-height: 1.08;
}

.passage-text {
  color: #1f2937;
  font-size: clamp(1.02rem, 1.25vw, 1.2rem);
  line-height: 1.72;
}

.student-section {
  margin-top: 16px;
  padding: clamp(15px, 1.6vw, 22px);
  border-radius: 8px;
  background: #fff;
}

.student-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border-radius: 8px;
}

.student-row > span:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  border-radius: 8px;
  background: var(--oxford-navy);
  font-weight: 900;
}

.student-question-text,
.writing-answer-label {
  display: block;
  margin-bottom: 12px;
  color: var(--oxford-navy);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
}

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

.choice-option--disabled {
  min-height: 48px;
  border-radius: 8px;
  background: #fff;
}

.choice-option strong {
  color: var(--oxford-blue);
}

.word-bank {
  border-radius: 8px;
  background: #f8fbff;
}

.word-bank span {
  border-radius: 8px;
}

.answer-panel {
  overflow: hidden;
}

.answer-table,
.writing-meta-table,
.rubric-table {
  min-width: 760px;
}

.admin-section {
  overflow-x: auto;
}

.answer-title {
  padding: 16px 18px;
  margin: -18px -18px 18px;
  color: #fff;
  background: var(--oxford-navy);
}

.hidden-pill {
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
}

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

.commercial-grid article {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

.commercial-grid span {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.commercial-grid strong {
  color: var(--oxford-navy);
  font-size: 1.55rem;
  line-height: 1.1;
}

.commercial-grid p,
.report-blueprint p,
.report-blueprint li {
  margin: 0;
  color: #526074;
  font-weight: 720;
  line-height: 1.45;
}

.report-blueprint {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cbd8ec;
  border-radius: 8px;
  background: #f8fbff;
}

.report-blueprint h3 {
  margin: 6px 0 10px;
  color: var(--oxford-navy);
  font-size: 1.35rem;
}

.report-blueprint ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.ops-hidden-metrics {
  display: none;
}

.student-product-screen,
.parent-report-screen,
.certificate-screen {
  display: grid;
  gap: 18px;
}

.student-product-hero,
.parent-profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 18px;
  align-items: center;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  box-shadow: var(--soft-shadow);
}

.student-profile-block {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.student-avatar-xl {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 78px;
  height: 78px;
  color: #fff;
  border: 4px solid #dbeafe;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--oxford-navy), var(--oxford-blue));
  font-size: 2rem;
  font-weight: 950;
}

.student-profile-block h2,
.parent-profile-card h2 {
  margin: 0 0 8px;
  color: var(--oxford-navy);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.student-profile-block p,
.parent-profile-card p {
  margin: 0;
  color: #475569;
  font-weight: 720;
}

.student-level-card {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.student-level-card span,
.student-product-stats span,
.parent-stats span,
.overall-score-card span,
.level-achieved-card span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.student-level-card strong {
  color: var(--oxford-navy);
  font-size: 1.8rem;
  line-height: 1;
}

.student-level-card small,
.student-product-stats small,
.parent-stats small,
.overall-score-card small,
.level-achieved-card small {
  color: #64748b;
  font-weight: 750;
}

.student-product-stats,
.parent-stats,
.certificate-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

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

.student-product-stats article,
.parent-stats article,
.overall-score-card,
.level-achieved-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.student-product-stats strong,
.parent-stats strong,
.overall-score-card strong,
.level-achieved-card strong {
  color: var(--oxford-navy);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1;
}

.student-product-stats article:first-child,
.overall-score-card {
  background: #eff6ff;
}

.student-product-stats article:nth-child(2),
.level-achieved-card {
  background: #f0fdf4;
}

.student-progress-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
}

.student-progress-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--oxford-navy);
  font-weight: 900;
}

.student-progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.student-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--oxford-navy), var(--oxford-blue));
}

.student-progress-panel p {
  margin: 0;
  color: #475569;
  font-weight: 720;
}

.student-dashboard-actions,
.certificate-actions,
.admin-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.student-main-action,
.student-secondary-action,
.admin-library-table button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: var(--oxford-navy);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.student-main-action {
  color: #fff;
  border-color: var(--oxford-navy);
  background: linear-gradient(135deg, var(--oxford-navy), var(--oxford-blue));
}

.admin-library-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(220px, 1.4fr);
  gap: 12px;
  margin-bottom: 14px;
}

.admin-library-filters label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-library-filters select,
.admin-library-filters input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
}

.admin-library-table {
  margin-bottom: 18px;
  overflow-x: auto;
}

.admin-library-table table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.admin-library-table th,
.admin-library-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--card-line);
  text-align: left;
  white-space: nowrap;
}

.admin-library-table th {
  color: #64748b;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-library-table td {
  color: #0f172a;
  font-weight: 760;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-chip.ready {
  color: #047857;
  background: #d1fae5;
}

.status-chip.review {
  color: #b45309;
  background: #fef3c7;
}

.status-chip.draft {
  color: #64748b;
  background: #e2e8f0;
}

.parent-insight-grid,
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.strength-card,
.needs-card,
.parent-recommendation,
.skill-performance-card,
.certificate-preview-card {
  padding: 20px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.strength-card {
  background: #f0fdf4;
}

.needs-card {
  background: #fff7ed;
}

.strength-card h3,
.needs-card h3,
.skill-performance-card h3 {
  margin: 0 0 14px;
  color: var(--oxford-navy);
}

.strength-card ul,
.needs-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strength-card li,
.needs-card li {
  color: #334155;
  font-weight: 760;
}

.strength-card li::before {
  content: "✓";
  margin-right: 9px;
  color: #059669;
  font-weight: 950;
}

.needs-card li::before {
  content: "○";
  margin-right: 9px;
  color: #dc2626;
  font-weight: 950;
}

.parent-recommendation p {
  margin: 8px 0 0;
  color: #475569;
  font-weight: 720;
  line-height: 1.5;
}

.skill-performance-card {
  display: grid;
  gap: 12px;
}

.skill-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.5fr) 48px;
  gap: 10px;
  align-items: center;
  color: #334155;
  font-weight: 800;
}

.skill-bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.skill-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--oxford-navy), #2563eb);
}

.certificate-paper {
  display: grid;
  gap: 9px;
  justify-items: center;
  min-height: 330px;
  padding: 28px 22px;
  border: 2px solid #d8b35a;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 179, 90, 0.08), transparent 42%),
    #fffaf0;
  text-align: center;
}

.certificate-paper span,
.certificate-paper small {
  color: var(--oxford-navy);
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-paper h3,
.certificate-paper h4,
.certificate-paper p {
  margin: 0;
}

.certificate-paper h3 {
  color: var(--oxford-navy);
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.certificate-paper strong {
  color: #0f172a;
  font-size: clamp(1.35rem, 2vw, 2.2rem);
}

@media (max-width: 1240px) {
  .sidebar {
    position: static;
    top: auto;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 230px);
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .sidebar-insight {
    display: none;
  }

  .test-centre-hero,
  .dashboard-grid,
  .redesign-library-grid,
  .report-blueprint,
  .student-product-hero,
  .parent-profile-card,
  .parent-insight-grid,
  .certificate-grid {
    grid-template-columns: 1fr;
  }

  .commercial-grid,
  .overview-grid,
  .admin-library-filters,
  .parent-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    top: auto;
    z-index: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 10px;
    box-shadow: none;
  }

  .brand {
    justify-content: flex-start;
    gap: 8px;
  }

  .crest {
    width: 32px;
    height: 36px;
    font-size: 0.72rem;
  }

  .brand strong {
    font-size: 1.05rem;
  }

  .brand span,
  .sidebar-block {
    display: none;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    overflow: visible;
  }

  .main-nav button {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    justify-content: center;
    padding: 0 7px;
    font-size: 0.78rem;
  }

  .admin-user {
    display: none;
  }

  .workspace {
    padding: 14px 10px 28px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-header {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    max-width: 100%;
    overflow: hidden;
  }

  .title-row {
    gap: 6px;
  }

  .title-row h1 {
    font-size: 1.2rem;
  }

  .title-row .pill {
    display: none;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  #printBtn,
  #publishBtn {
    display: none;
  }

  .toolbar-button,
  .toolbar-button.primary {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 9px;
    font-size: 0.86rem;
    line-height: 1.15;
    white-space: normal;
  }

  .title-row,
  .draft-status,
  .student-recent-list li,
  .parent-recommendation,
  .empty-state {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .test-centre-hero {
    padding: 18px;
  }

  .hero-metrics,
  .overview-grid,
  .commercial-grid,
  .student-product-stats,
  .parent-stats,
  .certificate-summary,
  .admin-library-filters,
  .student-dashboard__stats,
  .student-dashboard__recent,
  .choice-list {
    grid-template-columns: 1fr;
  }

  .practice-stepper {
    position: static;
    top: auto;
    z-index: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    box-shadow: none;
  }

  body.student-live-mode .student-live-topbar,
  body.student-live-mode .student-dashboard {
    display: none;
  }

  body.student-live-mode .practice-stepper {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.student-live-mode .practice-stepper > div {
    grid-column: 1 / -1;
    order: -1;
    text-align: left;
  }

  body.student-live-mode .practice-stepper strong {
    font-size: 0.95rem;
  }

  body.student-live-mode .stepper-button {
    min-height: 40px;
    padding: 0 10px;
  }

  .student-profile-block,
  .parent-profile-card {
    align-items: flex-start;
  }

  .student-profile-block {
    flex-direction: column;
  }

  .student-dashboard-actions,
  .student-dashboard__actions,
  .certificate-actions,
  .admin-library-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .student-main-action,
  .student-secondary-action {
    width: 100%;
  }

  .skill-bar-row {
    grid-template-columns: 1fr;
  }

  .student-dashboard__header,
  .student-live-topbar,
  .student-recent-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .practice-stepper > div {
    order: -1;
  }

  .preview-card,
  .reading-page .preview-card {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
  }

  .passage-column {
    min-width: 0;
    padding: 16px;
  }

  .passage-image,
  .reading-page .passage-image {
    min-height: 0;
    max-height: none;
  }

  .student-row {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .student-row-content {
    grid-column: 1;
    min-width: 0;
  }

  .student-row .preview-lock,
  .preview-lock {
    grid-column: 1;
  }

  .fill-blank-line,
  .fill-blank-item {
    padding: 10px;
  }

  .fill-blank-input-list,
  .fill-blank-answer-slot {
    width: 100%;
    min-width: 0;
  }

  .practice-list {
    grid-auto-columns: minmax(280px, 88vw);
  }
}
