:root {
  color-scheme: light;
  --bg: #edf4f1;
  --panel: #fcfdfc;
  --ink: #17221f;
  --muted: #5f6d68;
  --line: #d4e0dc;
  --teal: #176b61;
  --blue: #2563eb;
  --gold: #b7791f;
  --danger: #b42318;
  --shadow: 0 14px 38px rgba(23, 34, 31, 0.08);
  --schulte-paper: #f5f2ea;
  --schulte-surface: #fffefb;
  --schulte-ink: #252525;
  --schulte-line: #b8b3aa;
  --schulte-red: #a33a32;
  --schulte-teal: #176b61;
}

/* Phase 65: trusted login, intake profiles, structured observation, and live all-staff ranking. */
.remember-login-control {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
}

.remember-login-control input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.training-hub-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.training-hub-heading h3,
.training-hub-heading p {
  margin: 0;
}

.training-hub-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 9px;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background: #e8f6f2;
  color: #115e55;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  touch-action: manipulation;
}

.training-hub-back span {
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.training-hub-back strong {
  font: inherit;
}

.training-hub-back:hover,
.training-hub-back:focus-visible {
  border-color: #0f4f49;
  background: #d7efe9;
  outline: 3px solid rgba(23, 107, 97, 0.18);
  outline-offset: 2px;
}

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

.training-hub-card {
  display: grid;
  min-height: 132px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 7px solid #0f766e;
  border-radius: 8px;
  background: #f5fbf9;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.training-hub-card:nth-child(2) {
  border-left-color: #1d4ed8;
  background: #f5f8ff;
}

.training-hub-card:nth-child(3) {
  border-left-color: #a16207;
  background: #fffaf0;
}

.training-hub-card:nth-child(4) {
  border-left-color: #be123c;
  background: #fff7f8;
}

.training-hub-card strong {
  font-size: 25px;
}

.training-hub-card span {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.55;
}

.training-hub-card em {
  align-self: end;
  margin-top: 14px;
  color: #46534f;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.training-submodule-grid .training-module-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.intake-entry-panel {
  border-top: 6px solid #2563eb;
}

.intake-entry-panel.needs-attention {
  border-top-color: #c2410c;
  background: #fffdf9;
}

.intake-entry-copy > span {
  color: #c2410c;
  font-size: 13px;
  font-weight: 800;
}

.intake-entry-copy h3 {
  margin: 5px 0;
  font-size: 25px;
}

.intake-entry-copy p {
  margin: 0;
  color: var(--muted);
}

.intake-entry-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.intake-entry-actions button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  align-items: center;
}

.intake-questionnaire-form {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.questionnaire-intro {
  display: grid;
  gap: 7px;
  padding: 22px 0;
}

.questionnaire-intro h3,
.questionnaire-intro p {
  margin: 0;
}

.questionnaire-intro span {
  color: #1d4ed8;
  font-weight: 800;
}

.questionnaire-section,
.assistant-assessment-section,
.assistant-assessment-open {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.questionnaire-section h4,
.assistant-assessment-section h4,
.assistant-assessment-open h4 {
  margin: 0 0 16px;
  font-size: 20px;
}

.questionnaire-question,
.assistant-assessment-question {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.questionnaire-question legend,
.assistant-assessment-question legend {
  width: 100%;
  margin-bottom: 9px;
  font-weight: 750;
  line-height: 1.5;
}

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

.questionnaire-options label,
.assistant-assessment-options label {
  display: grid;
  grid-template-columns: auto 28px minmax(0, 1fr);
  gap: 8px;
  min-height: 50px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
}

.questionnaire-options label.selected,
.assistant-assessment-options label.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.questionnaire-options input,
.assistant-assessment-options input {
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
}

.questionnaire-options strong,
.assistant-assessment-options strong {
  color: #1d4ed8;
}

.questionnaire-text,
.assistant-assessment-open label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.questionnaire-text textarea,
.assistant-assessment-open textarea {
  width: 100%;
  resize: vertical;
}

.questionnaire-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  background: rgba(252, 253, 252, 0.96);
}

.questionnaire-submit-bar span {
  color: var(--muted);
  font-size: 13px;
}

.assistant-assessment-form {
  margin-top: 18px;
}

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

.assistant-assessment-submit {
  min-height: 50px;
}

.scope-health-strip,
.import-relationship-warnings {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 5px solid #15803d;
  background: #f0fdf4;
}

.scope-health-strip.warn,
.import-relationship-warnings {
  border-left-color: #c2410c;
  background: #fff7ed;
}

.scope-health-strip span,
.import-relationship-warnings span {
  color: #485752;
}

.import-relationship-warnings {
  align-items: flex-start;
  flex-direction: column;
}

.competition-role {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.competition-role.teacher {
  background: #fee2e2;
  color: #991b1b;
}

.competition-role.assistant {
  background: #fef3c7;
  color: #92400e;
}

.manager-intake-section {
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.manager-intake-columns details {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fbfa;
}

.manager-intake-columns summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  cursor: pointer;
}

.manager-intake-columns summary span {
  color: var(--muted);
  font-size: 13px;
}

.questionnaire-answer-list {
  margin: 0;
  padding: 0 14px 14px;
}

.questionnaire-answer-list div {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.questionnaire-answer-list dt {
  color: var(--muted);
  font-size: 13px;
}

.questionnaire-answer-list dd {
  margin: 5px 0 0;
  line-height: 1.55;
}

.screen-live-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.screen-live-header p,
.screen-live-header h2 {
  margin: 0;
}

.screen-live-header > div > small {
  color: #bfdbfe;
}

.screen-live-status {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 8px;
  align-items: center;
  min-width: 170px;
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.screen-live-status i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.14);
  animation: screen-live-pulse 1.4s ease-in-out infinite;
}

.screen-live-status span {
  grid-column: 2;
  color: #a7f3d0;
  font-size: 12px;
}

@keyframes screen-live-pulse {
  50% { opacity: 0.45; }
}

.screen-section-title {
  margin: 26px 0 0;
  color: #fef3c7;
  font-size: 24px;
}

.screen-featured-item {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-left: 7px solid #60a5fa;
  border-radius: 8px;
  background: rgba(30, 64, 175, 0.18);
}

.screen-featured-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.screen-featured-heading span,
.screen-featured-heading h3 {
  display: block;
  margin: 0;
}

.screen-featured-heading h3 {
  margin-top: 4px;
  font-size: 28px;
}

.screen-featured-ranking {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin-top: 14px;
}

.screen-featured-ranking p {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.screen-featured-ranking p > span {
  color: #93c5fd;
  font-size: 20px;
  font-weight: 800;
}

.screen-featured-ranking strong small,
.podium strong small,
.screen-rank-card strong small {
  margin-left: 5px;
  color: #fef3c7;
  font-size: 11px;
  font-weight: 700;
}

.screen-featured-ranking em {
  color: #a7f3d0;
  font-style: normal;
}

@media (max-width: 900px) {
  .intake-entry-actions,
  .questionnaire-options,
  .assistant-assessment-options,
  .manager-intake-columns,
  .screen-featured-ranking {
    grid-template-columns: 1fr;
  }

  .training-hub-card {
    min-height: 118px;
    padding: 16px;
  }

  .training-hub-card strong {
    font-size: 20px;
    line-height: 1.35;
  }

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

  .training-hub-card span {
    display: none;
  }

  .training-hub-card em {
    margin-top: 8px;
  }

  .training-hub-back {
    align-self: flex-start;
    width: auto;
  }

  .assistant-assessment-meta {
    grid-template-columns: 1fr;
  }

  .questionnaire-submit-bar,
  .training-hub-heading,
  .scope-health-strip,
  .screen-live-header,
  .screen-featured-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .questionnaire-submit-bar button {
    width: 100%;
  }

  .screen-live-status {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
.schulte-cell,
.color-choice,
.training-module-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.rail,
.main,
.workspace,
.panel {
  min-width: 0;
}

.rail {
  background: #10231f;
  color: #f5fffb;
  padding: 24px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #14b8a6;
  font-weight: 800;
}

.brand small,
.eyebrow,
.muted,
.screen-board small {
  color: var(--muted);
}

.rail .brand small {
  color: #a7c8c0;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-button,
.item-button,
.primary {
  border: 0;
  cursor: pointer;
}

.nav-button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5fffb;
  text-align: left;
}

.nav-button.active {
  background: #14b8a6;
  color: #06221d;
  font-weight: 700;
}

.main {
  padding: 28px;
}

.topbar,
.hero-panel,
.panel,
.screen-board {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.sound-toggle {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  gap: 7px;
  align-items: center;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f9f7;
  color: #33423e;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
}

.sound-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sound-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #9aa8a3;
  transition: background 160ms ease;
}

.sound-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(23, 34, 31, 0.22);
  transition: transform 160ms ease;
}

.sound-toggle input:checked + .sound-switch {
  background: var(--teal);
}

.sound-toggle input:checked + .sound-switch i {
  transform: translateX(16px);
}

.sound-toggle input:focus-visible + .sound-switch {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}

.sound-toggle strong {
  min-width: 13px;
  color: var(--teal);
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 13px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
}

.status-pill.ok,
.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.status-pill.warn,
.badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin: 18px 0;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  font-size: 30px;
  margin-bottom: 8px;
}

.hero-stats {
  display: flex;
  gap: 12px;
}

.hero-stats div {
  min-width: 100px;
  padding: 14px;
  border-radius: 8px;
  background: #f7fbfa;
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-size: 24px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  min-height: 420px;
}

.workspace > .panel,
.workspace > .active-training-panel,
.workspace > .student-more-panel {
  margin-bottom: 18px;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 2fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.auth-loading-panel {
  min-height: 180px;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
}

.auth-loading-panel strong {
  font-size: 24px;
}

.auth-loading-panel span {
  color: var(--muted);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.auth-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  gap: 12px;
  align-items: center;
}

.student-login-form,
.staff-login-form,
.student-profile-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.auth-text-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 12px;
}

.ghost {
  min-height: 44px;
  border: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font-weight: 700;
}

.ghost:active,
.training-module-card:active,
.color-choice:active,
.schulte-cell:active {
  transform: scale(0.98);
}

.student-account-strip {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

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

.student-account-identity strong,
.student-account-identity span {
  display: block;
}

.student-account-identity strong {
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.student-account-identity > div {
  min-width: 0;
}

.student-account-strip .ghost {
  flex: 0 0 auto;
  min-width: 56px;
  white-space: nowrap;
}

.student-account-identity span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.student-account-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 50%;
  background: #e6f7f4;
  color: var(--teal);
  font-size: 22px;
  font-weight: 900;
}

.student-profile-panel .section-head {
  align-items: center;
}

.student-profile-panel .metric-grid strong {
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.profile-number {
  color: var(--muted);
  font-size: 13px;
}

.student-profile-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-honor-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7ed;
}

.profile-honor-line strong {
  color: var(--gold);
  font-size: 20px;
}

.profile-honor-line span {
  color: #7c4a10;
}

.password-reset-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 120px minmax(0, 1fr) auto minmax(0, 0.8fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.password-reset-form small {
  grid-column: 2 / -1;
}

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

.metric-grid div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfa;
}

.metric-grid strong {
  display: block;
  font-size: 26px;
}

.metric-grid span,
.privacy-note {
  color: var(--muted);
}

.org-forms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.mini-form {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.mini-form.wide {
  grid-column: span 2;
}

.task-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.manual-record-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.task-form .span-all,
.manual-record-form .span-all {
  grid-column: span 3;
}

.task-form textarea,
.manual-record-form textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ghost.danger {
  border-color: #fecaca;
  color: #991b1b;
}

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

.task-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.task-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.task-card em {
  min-width: 72px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef2f7;
  color: #334155;
  font-style: normal;
  text-align: center;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.schulte-meta {
  min-width: 148px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfa;
  text-align: right;
}

.schulte-meta strong,
.schulte-meta span {
  display: block;
}

.schulte-meta strong {
  font-size: 26px;
}

.schulte-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.live-challenge-timer.active {
  border-color: #fca5a5;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgb(220 38 38 / 7%);
}

.live-challenge-timer.active strong {
  color: #c1121f;
  font-variant-numeric: tabular-nums;
}

.challenge-submitting {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #9f1239;
  font-size: 20px;
  font-weight: 800;
}

.schulte-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.secondary.active-control {
  border-color: var(--teal);
  color: var(--teal);
}

.secondary:disabled,
.primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.schulte-grid {
  display: grid;
  gap: clamp(6px, 1.8vw, 10px);
  width: min(100%, calc(100svw - 48px), 680px);
  margin: 12px auto 0;
  touch-action: manipulation;
  user-select: none;
}

.schulte-cell {
  aspect-ratio: 1;
  min-height: 0;
  padding: clamp(10px, 2.4vw, 18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: clamp(24px, 8vw, 42px);
  font-weight: 800;
}

.schulte-cell.done {
  background: #dcfce7;
  color: #166534;
}

.schulte-cell.wrong {
  background: #fee2e2;
  color: var(--danger);
}

/* Phase 67: config-driven Schulte visual-search engine. */
.schulte-engine {
  overflow: hidden;
  border-top: 6px solid var(--schulte-teal);
  background: var(--schulte-surface);
  color: var(--schulte-ink);
}

.schulte-engine-head,
.schulte-training-bar,
.schulte-view-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.schulte-engine-head h3,
.schulte-engine-head p,
.schulte-view-title h4,
.schulte-view-title p {
  margin: 0;
}

.schulte-engine-head h3 {
  font-size: 28px;
}

.schulte-engine-head p,
.schulte-view-title p {
  margin-top: 5px;
  color: #66635d;
}

.schulte-level-chip {
  padding: 8px 12px;
  border: 1px solid var(--schulte-line);
  border-radius: 6px;
  background: var(--schulte-paper);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.schulte-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 0;
  border-bottom: 1px solid var(--schulte-line);
}

.schulte-tabs button {
  min-height: 48px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #66635d;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  touch-action: manipulation;
}

.schulte-tabs button.active {
  border-bottom-color: var(--schulte-teal);
  color: var(--schulte-teal);
}

.schulte-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid #b7791f;
  background: #fff8e8;
  color: #6b4e12;
}

.schulte-view-section {
  padding: 20px 0 4px;
}

.schulte-view-title > strong {
  min-width: 64px;
  color: var(--schulte-teal);
  font-size: 26px;
  text-align: right;
}

.schulte-plan-list,
.schulte-record-list {
  margin-top: 16px;
  border-top: 1px solid var(--schulte-line);
}

.schulte-plan-row,
.schulte-record-list > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  border-bottom: 1px solid #dedad2;
}

.schulte-plan-row > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--schulte-line);
  border-radius: 50%;
  color: #55524d;
  font-weight: 900;
}

.schulte-plan-row.completed > span {
  border-color: #6f9a73;
  background: #eaf4e9;
  color: #31643a;
}

.schulte-plan-row strong,
.schulte-plan-row small,
.schulte-record-list strong,
.schulte-record-list small {
  display: block;
}

.schulte-plan-row small,
.schulte-record-list small {
  margin-top: 4px;
  color: #68645d;
}

.schulte-plan-row button {
  min-width: 86px;
}

.schulte-free-setup {
  display: grid;
  gap: 18px;
}

.schulte-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.schulte-step > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--schulte-teal);
  color: white;
  font-weight: 900;
}

.schulte-step label,
.schulte-step label strong,
.schulte-step > div > strong {
  display: block;
}

.schulte-step select {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid var(--schulte-line);
  border-radius: 6px;
  background: white;
  padding: 0 12px;
  color: var(--schulte-ink);
  font-size: 16px;
}

.schulte-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.schulte-segments button {
  min-width: 76px;
  min-height: 44px;
  border: 1px solid var(--schulte-line);
  border-radius: 6px;
  background: white;
  color: var(--schulte-ink);
  cursor: pointer;
  font-weight: 800;
  touch-action: manipulation;
}

.schulte-segments button.active {
  border-color: var(--schulte-teal);
  background: #e8f4f0;
  color: #0d5b52;
}

.schulte-rule-preview {
  padding: 15px 16px;
  border-left: 5px solid var(--schulte-red);
  background: var(--schulte-paper);
}

.schulte-rule-preview p,
.schulte-rule-preview small {
  display: block;
  margin: 5px 0 0;
  color: #66635d;
}

.schulte-start-wide {
  width: min(100%, 420px);
  min-height: 52px;
  margin: 4px auto 0;
  font-size: 18px;
}

.schulte-mastery-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 12px;
  padding: 15px;
  background: var(--schulte-paper);
}

.schulte-mastery-summary strong {
  color: var(--schulte-red);
  font-size: 28px;
}

.schulte-record-list > div {
  grid-template-columns: 90px minmax(0, 1fr) auto;
}

.schulte-record-list [class^="status-"] {
  font-size: 13px;
  font-weight: 800;
}

.schulte-record-list .status-mastered { color: #2c6a37; }
.schulte-record-list .status-unlocked { color: #8b5c12; }
.schulte-record-list .status-locked { color: #77736c; }

.schulte-ready {
  display: grid;
  min-height: 480px;
  align-content: space-between;
  gap: 24px;
}

.schulte-back {
  justify-self: start;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--schulte-teal);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.schulte-ready-main {
  text-align: center;
}

.schulte-ready-main > span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--schulte-red);
  font-size: 28px;
  font-weight: 900;
}

.schulte-ready-main h3 {
  margin: 0;
  font-size: 36px;
}

.schulte-ready-main p,
.schulte-ready-main small {
  display: block;
  margin: 10px auto 0;
  color: #66635d;
}

.schulte-training {
  min-height: min(820px, calc(100svh - 100px));
  padding: clamp(12px, 2vw, 24px);
  background: var(--schulte-paper);
}

.schulte-training-bar {
  min-height: 52px;
}

.schulte-training-bar > div {
  text-align: center;
}

.schulte-training-bar small,
.schulte-training-bar strong {
  display: block;
}

.schulte-training-bar strong {
  margin-top: 2px;
  color: var(--schulte-red);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.icon-action {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--schulte-line);
  border-radius: 50%;
  background: var(--schulte-surface);
  color: var(--schulte-ink);
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
  touch-action: manipulation;
}

.schulte-target {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-height: 76px;
  padding-top: 15px;
  text-align: center;
}

.schulte-target span,
.schulte-target small { color: #68645d; }

.schulte-target strong {
  max-width: 60%;
  overflow-wrap: anywhere;
  color: var(--schulte-teal);
  font-size: clamp(30px, 7vw, 50px);
}

.schulte-board-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
}

.schulte-grid.engine-grid {
  grid-template-columns: repeat(var(--schulte-grid-size), minmax(0, 1fr));
  gap: clamp(4px, 0.8vw, 8px);
  width: min(100%, var(--schulte-board-size));
  margin: 8px auto 0;
}

.schulte-grid.engine-grid .schulte-cell {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border-color: var(--schulte-line);
  border-radius: 5px;
  background: var(--schulte-surface);
  color: var(--schulte-ink);
  font-size: clamp(14px, calc(43px - var(--schulte-grid-size) * 3px), 34px);
  line-height: 1.05;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

.schulte-grid.engine-grid.material-poem .schulte-cell {
  padding: 4px;
  font-size: clamp(12px, 2.4vw, 20px);
}

.schulte-grid.engine-grid .tone-red { color: var(--schulte-red); }

.schulte-grid.engine-grid .schulte-cell.done {
  border-color: #c8c2b7;
  background: #e4e0d7;
  color: transparent;
}

.schulte-grid.engine-grid .schulte-cell:active:not(:disabled) {
  transform: scale(0.97);
  border-color: var(--schulte-teal);
  background: #e8f4f0;
}

.schulte-pause-cover {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  background: var(--schulte-paper);
  text-align: center;
}

.schulte-pause-cover strong { font-size: 28px; }
.schulte-pause-cover span { color: #66635d; }

.schulte-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border-left: 6px solid var(--schulte-red);
  background: #fff4f0;
}

.schulte-result > div strong,
.schulte-result > div span {
  display: block;
}

.schulte-result > div strong {
  color: var(--schulte-red);
  font-size: 30px;
}

.schulte-result > div span {
  margin-top: 4px;
  font-weight: 800;
}

.schulte-result p {
  grid-column: 1;
  margin: 2px 0 0;
  color: #68645d;
}

.schulte-result button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.schulte-admin-settings {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 18px 0;
}

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

.schulte-admin-settings input,
.schulte-admin-table input {
  width: 100%;
  min-height: 42px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  background: white;
  color: var(--ink);
}

.schulte-admin-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.schulte-admin-table td:last-child {
  white-space: nowrap;
}

.schulte-admin-table td:last-child button + button {
  margin-left: 6px;
}

.result-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7ed;
}

.result-strip span {
  color: var(--muted);
}

.achievement-banner {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 8px;
  background: #fff7f7;
}

.achievement-banner strong {
  color: #c1121f;
  font-size: 22px;
  line-height: 1.2;
}

.achievement-banner span {
  color: #7f1d1d;
  font-weight: 700;
  line-height: 1.55;
}

.achievement-banner em {
  color: #9f1239;
  font-style: normal;
}

.achievement-banner.tier-high {
  border-left-width: 8px;
  background: #fff1f2;
}

.achievement-banner.tier-middle {
  background: #fff7f7;
}

.achievement-banner.tier-growth {
  background: #fffafa;
}

.pi-keypad-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.pi-keypad-stage {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 2fr);
  gap: 14px;
  align-items: stretch;
}

.pi-keypad-stage > div,
.pi-keypad-output {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.pi-keypad-stage strong {
  color: #b91c1c;
  font-size: 28px;
}

.pi-keypad-stage em {
  color: var(--muted);
  font-style: normal;
}

.pi-keypad-output {
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.7;
}

.pi-number-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 520px);
  margin: 0 auto;
}

.pi-number-keypad button {
  min-height: 62px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 28px;
  font-weight: 800;
  touch-action: manipulation;
}

.pi-number-keypad button:active {
  background: #dcfce7;
  transform: scale(0.98);
}

.pi-number-keypad .keypad-action {
  color: #991b1b;
  font-size: 18px;
}

.pi-keypad-start {
  min-height: 52px;
  justify-self: center;
}

.leaderboard-sections {
  display: grid;
  gap: 16px;
}

.leaderboard-sections > div {
  min-width: 0;
}

.leaderboard-sections h4 {
  margin: 14px 0 8px;
  font-size: 16px;
}

.training-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.training-category-list {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.training-category h4 {
  margin: 0;
  font-size: 21px;
}

.training-center-title {
  margin-bottom: 20px;
  font-size: 24px;
}

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

.family-practice-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

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

.family-practice-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.student-switch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.student-switch-card {
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.student-switch-card.active {
  border-color: var(--teal);
  background: #e6f7f4;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.2);
}

.student-switch-card strong,
.student-switch-card span,
.student-switch-card em {
  display: block;
}

.student-switch-card span,
.student-switch-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.supervised-banner,
.supervised-actions {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.55;
}

.supervised-banner.active,
.supervised-actions {
  border: 1px solid #b7ddd5;
  background: #edf8f6;
}

.supervised-banner.warn {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.supervised-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.training-module-card {
  --training-accent: var(--teal);
  --training-soft: #f2f8f6;
  --training-ink: #235d55;
  position: relative;
  display: grid;
  min-height: 88px;
  place-items: center;
  padding: 16px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--training-accent) 32%, var(--line));
  border-radius: 8px;
  background: var(--training-soft);
  color: var(--training-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

.training-module-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--training-accent);
  content: "";
}

.training-module-card.active {
  border-color: var(--training-accent);
  box-shadow: inset 0 0 0 1px var(--training-accent), 0 6px 18px rgba(23, 34, 31, 0.08);
  transform: translateY(-1px);
}

.training-module-card.pending {
  border-style: dashed;
  background: #f5f7f6;
  color: #7c8783;
  cursor: not-allowed;
  opacity: 0.72;
}

.training-module-card[data-training-id="schulte"],
.active-training-panel[data-training-id="schulte"] {
  --training-accent: #2f755b;
  --training-soft: #edf7f1;
  --training-ink: #245b48;
}

.training-module-card[data-training-id="color_reaction"],
.active-training-panel[data-training-id="color_reaction"] {
  --training-accent: #7a4d82;
  --training-soft: #f6eef7;
  --training-ink: #623d69;
}

.training-module-card[data-training-id="attention_reaction_fusion"],
.active-training-panel[data-training-id="attention_reaction_fusion"] {
  --training-accent: #2c7378;
  --training-soft: #edf7f7;
  --training-ink: #245d61;
}

.training-module-card[data-training-id="quick_calculation"],
.active-training-panel[data-training-id="quick_calculation"] {
  --training-accent: #945322;
  --training-soft: #faf1e8;
  --training-ink: #744119;
}

.training-module-card[data-training-id="digital_codes"],
.active-training-panel[data-training-id="digital_codes"] {
  --training-accent: #3e609c;
  --training-soft: #edf2fa;
  --training-ink: #324e80;
}

.training-module-card[data-training-id="letter_codes"],
.active-training-panel[data-training-id="letter_codes"] {
  --training-accent: #506b82;
  --training-soft: #eef4f7;
  --training-ink: #3e566b;
}

.training-module-card[data-training-id="pi_100"],
.active-training-panel[data-training-id="pi_100"] {
  --training-accent: #914450;
  --training-soft: #faeff1;
  --training-ink: #733640;
}

.training-module-card[data-training-id="thirty_six"],
.active-training-panel[data-training-id="thirty_six"] {
  --training-accent: #755b1d;
  --training-soft: #faf5e7;
  --training-ink: #5e4816;
}

.training-module-card[data-training-id="random_digits"],
.active-training-panel[data-training-id="random_digits"] {
  --training-accent: #575393;
  --training-soft: #f1f0f9;
  --training-ink: #454276;
}

.training-module-card[data-training-id="random_chinese_words"],
.active-training-panel[data-training-id="random_chinese_words"] {
  --training-accent: #884664;
  --training-soft: #f9eef3;
  --training-ink: #6e3850;
}

.training-module-card[data-training-id="liberal_memory"],
.active-training-panel[data-training-id="liberal_memory"] {
  --training-accent: #72543a;
  --training-soft: #f7f1eb;
  --training-ink: #59412d;
}

.training-module-card[data-training-id="mind_map"],
.active-training-panel[data-training-id="mind_map"] {
  --training-accent: #8a3f63;
  --training-soft: #fbf0f5;
  --training-ink: #6f304f;
}

.training-module-card[data-training-id="english_words"],
.active-training-panel[data-training-id="english_words"] {
  --training-accent: #376a94;
  --training-soft: #edf5fa;
  --training-ink: #2b5577;
}

.training-module-card[data-training-id="english_reading"],
.active-training-panel[data-training-id="english_reading"] {
  --training-accent: #557543;
  --training-soft: #f0f6ed;
  --training-ink: #425d34;
}

.training-module-card[data-training-id="english_writing"],
.active-training-panel[data-training-id="english_writing"] {
  --training-accent: #705487;
  --training-soft: #f4f0f7;
  --training-ink: #59436c;
}

.training-module-card[data-training-id="daily_memory"],
.active-training-panel[data-training-id="daily_memory"] {
  --training-accent: #80503b;
  --training-soft: #f8f0ec;
  --training-ink: #653f2f;
}

.training-module-card strong,
.training-module-card span,
.training-module-card em {
  display: block;
}

.training-module-card strong {
  font-size: 22px;
  text-align: center;
}

.training-module-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.training-module-card em {
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.training-module-card em.ok {
  background: #dcfce7;
  color: #166534;
}

.training-module-card em.warn {
  background: #fef3c7;
  color: #92400e;
}

.selected-training-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #b7ddd5;
  border-radius: 8px;
  background: #edf8f6;
}

.selected-training-summary strong,
.selected-training-summary span {
  display: block;
}

.selected-training-summary span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.active-training-panel {
  --training-accent: var(--teal);
  --training-soft: #f2f8f6;
  --training-ink: #235d55;
  scroll-margin-top: 18px;
}

.active-training-panel > .panel {
  border-top: 5px solid var(--training-accent);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(23, 34, 31, 0.06);
}

.active-training-panel > .panel h3:first-of-type {
  color: var(--training-ink);
}

.active-training-panel .secondary.active-control {
  border-color: var(--training-accent);
  background: var(--training-soft);
  color: var(--training-ink);
}

.active-training-panel .primary:not(.danger-solid) {
  background: var(--training-accent);
}

.sensory-feedback-cue {
  position: fixed;
  left: 50%;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 50;
  min-width: 118px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  transform: translate(-50%, 10px) scale(0.96);
  transition: opacity 130ms ease, transform 180ms ease;
}

.sensory-feedback-cue.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.sensory-feedback-cue.correct {
  border-color: #9bcbb3;
  background: #e9f7ef;
  color: #235f47;
}

.sensory-feedback-cue.wrong {
  border-color: #e6b6b0;
  background: #fbeeed;
  color: #8d3028;
}

.sensory-feedback-cue.success,
.sensory-feedback-cue.complete {
  border-color: #d7bd72;
  background: #fff8df;
  color: #6f5311;
  font-size: 18px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.memory-practice-form,
.memory-practice-stage {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.memory-practice-form textarea {
  width: 100%;
  resize: vertical;
}

.memory-practice-stage {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.memory-practice-stage h4 {
  margin: 0;
}

.memory-practice-stage p {
  margin: 0;
  font-size: 20px;
  line-height: 1.8;
}

.humanities-memory-panel {
  border-top: 4px solid #4f7d68;
}

.hm-method-path {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid #cbded5;
  border-bottom: 1px solid #cbded5;
}

.hm-method-path div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hm-method-path b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #2f6f5a;
  color: #ffffff;
}

.hm-method-path strong {
  color: #214f3d;
  font-size: 15px;
}

.hm-method-path span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hm-entry-modes,
.hm-practice-selector .segmented-control {
  width: min(100%, 560px);
}

.hm-demo-materials,
.hm-practice-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hm-photo-import {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #8fb5a5;
  border-radius: 8px;
  background: #f7fbfa;
}

.hm-photo-import label {
  display: grid;
  gap: 8px;
  color: #294238;
  font-weight: 800;
}

.hm-photo-import img {
  width: min(100%, 520px);
  max-height: 360px;
  border-radius: 6px;
  object-fit: contain;
  object-position: left center;
}

.hm-ocr-message {
  min-height: 24px;
  margin: 0;
  color: #214f3d;
  font-weight: 800;
  line-height: 1.6;
}

.hm-ocr-message[data-status="error"] {
  color: #b42318;
}

.hm-ocr-message[data-status="working"] {
  color: #8a5b00;
}

.hm-practice-selector {
  align-items: end;
  justify-content: space-between;
}

.hm-practice-selector p {
  flex: 1 1 280px;
  margin: 0;
}

.hm-recall-head .hm-stage-heading {
  flex: 1;
}

.hm-order-stage {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.hm-order-stage h4 {
  margin: 0;
  color: #214f3d;
  font-size: 22px;
}

.hm-order-selected,
.hm-order-options {
  display: grid;
  gap: 9px;
}

.hm-order-selected {
  min-height: 90px;
  padding: 12px;
  border: 1px solid #b9d4c9;
  border-radius: 8px;
  background: #f7fbfa;
}

.hm-order-selected div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.hm-order-selected b {
  color: #b91c1c;
}

.hm-order-options button {
  min-height: 52px;
  text-align: left;
  white-space: normal;
  line-height: 1.55;
}

.hm-order-result {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: #7f1d1d;
}

.hm-order-result strong {
  color: #c1121f;
  font-size: 42px;
}

.hm-form,
.hm-recall-stage {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.hm-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 12px;
}

.hm-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #294238;
  font-weight: 700;
}

.hm-form textarea {
  width: 100%;
  min-height: 94px;
  resize: vertical;
  font-size: 17px;
  line-height: 1.65;
}

.hm-confirm-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 600 !important;
}

.hm-confirm-row input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.hm-analysis-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 16px 0;
  border-top: 1px solid #cbded5;
  border-bottom: 1px solid #cbded5;
}

.hm-analysis-band div {
  min-width: 0;
}

.hm-analysis-band span,
.hm-analysis-band strong {
  display: block;
}

.hm-analysis-band span {
  color: var(--muted);
  font-size: 13px;
}

.hm-analysis-band strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #214f3d;
  font-size: 17px;
}

.hm-analysis-band p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hm-start-button {
  margin-top: 16px;
}

.hm-stage-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.hm-stage-heading span {
  color: #3f725d;
  font-size: 14px;
  font-weight: 800;
}

.hm-stage-heading strong {
  text-align: right;
}

.hm-result {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid #cbded5;
  border-bottom: 1px solid #cbded5;
}

.hm-score {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.hm-score strong {
  color: #235f47;
  font-size: 44px;
}

.hm-score span {
  color: var(--muted);
  font-weight: 700;
}

.hm-result-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #40594f;
}

.hm-error-list {
  display: grid;
  gap: 8px;
}

.hm-error-list p {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #e2ebe7;
}

.hm-error-list p span {
  color: #8d4b38;
  font-size: 14px;
}

.hm-error-list p b {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.hm-perfect {
  margin: 0;
  color: #235f47;
  font-size: 18px;
  font-weight: 800;
}

.digits-board {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.digits-board div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.digits-board span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 13px;
}

.digits-board strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  letter-spacing: 0;
}

.digits-answer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.digits-answer-form input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
}

.digits-answer-form .span-all {
  grid-column: 1 / -1;
}

.code-answer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.code-answer-form label {
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
}

.code-answer-form input {
  min-width: 0;
  min-height: 50px;
  font-size: 18px;
}

.code-answer-card.reverse {
  grid-template-columns: 1fr;
}

.code-answer-card.reverse .code-prompt {
  min-height: 46px;
}

.code-submit-button {
  grid-column: 1 / -1;
  min-height: 52px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 480px);
  margin-top: 14px;
}

.digital-code-modes {
  margin-bottom: 4px;
}

.code-prompt {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #edf8f6;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  font-weight: 800;
}

.code-prompt.long {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 18px;
  text-align: center;
}

.student-more-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.student-more-panel > summary {
  min-height: 58px;
  padding: 17px 20px;
  cursor: pointer;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  list-style-position: inside;
}

.student-more-content {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.task-count-note {
  margin: 12px 0 0;
}

body[data-authenticated="true"] .nav {
  display: none;
}

.pi-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.pi-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: 18px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
}

.word-answer-form {
  display: grid;
  gap: 14px;
}

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

.word-row.memory-only {
  padding: 14px;
}

.word-prompt-row,
.word-input-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(68px, 1fr));
  gap: 8px;
}

.word-prompt-row span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #edf8f6;
  color: var(--teal);
  font-weight: 700;
  text-align: center;
}

.word-input-row input {
  min-width: 0;
  padding: 8px 6px;
  text-align: center;
}

.single-question-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.single-question-stage {
  display: grid;
  min-height: min(42svh, 320px);
  place-items: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  text-align: center;
}

.single-question-stage span,
.single-question-stage em {
  color: var(--muted);
  font-style: normal;
}

.single-question-stage strong {
  color: var(--teal);
  font-size: clamp(42px, 14vw, 92px);
  font-weight: 900;
}

.single-question-form input {
  min-height: 58px;
  font-size: 22px;
  text-align: center;
}

.single-question-form button {
  min-height: 56px;
}

.single-question-stage.compact {
  min-height: 160px;
  padding: 16px;
}

.single-question-stage.compact strong {
  font-size: clamp(36px, 10vw, 68px);
}

.choice-challenge {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.abcd-choice-grid button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 64px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  touch-action: manipulation;
}

.abcd-choice-grid button:active {
  background: #e6f5f2;
  border-color: var(--teal);
}

.abcd-choice-grid b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #edf8f6;
  color: var(--teal);
}

.abcd-choice-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.calc-answer-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.calc-answer-form .calc-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
}

.calc-answer-form span {
  min-width: 0;
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 900;
  white-space: nowrap;
}

.calc-answer-form span b {
  color: var(--muted);
  font-size: 16px;
}

.calc-answer-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 6px 8px;
  font-size: 22px;
  text-align: center;
}

.calc-submit-button {
  min-height: 52px;
}

.english-answer-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.english-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(140px, 1.1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.english-prompt {
  min-width: 0;
  color: var(--teal);
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.english-answer-row input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  font-size: 18px;
}

.english-submit-button {
  min-height: 52px;
}

.color-reaction-focus {
  display: grid;
  gap: 10px;
}

.color-reaction-stage {
  display: grid;
  min-height: 142px;
  place-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  text-align: center;
}

.color-reaction-stage > span {
  color: var(--muted);
  font-size: 15px;
}

.color-word {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  font-size: clamp(54px, 13vw, 82px);
  font-weight: 900;
}

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

.color-choice {
  min-height: 56px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: clamp(18px, 3.4vw, 22px);
  font-weight: 900;
  touch-action: manipulation;
}

.color-reaction-head {
  margin-bottom: 8px;
}

.color-reaction-toolbar {
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
}

.color-reaction-toolbar strong {
  color: var(--teal);
  font-size: 18px;
}

.compact-challenge-panel {
  padding-bottom: 16px;
}

.attention-search-toolbar {
  display: flex;
  gap: 12px;
  align-items: stretch;
  justify-content: space-between;
  margin: 10px 0;
}

.attention-target {
  display: flex;
  min-width: 112px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf8f6;
}

.attention-target span {
  color: var(--muted);
  font-weight: 700;
}

.attention-target strong {
  color: var(--teal);
  font-size: 34px;
}

.attention-search-grid {
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin: 0 auto;
}

.attention-cell {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #17211f;
  cursor: pointer;
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 800;
  touch-action: manipulation;
}

.attention-cell.found,
.attention-cell.found:disabled {
  border-color: #5ab9a8;
  background: #dff4ef;
  color: #0f766e;
  opacity: 1;
}

.color-choice.red {
  border-color: #fecaca;
  color: #dc2626;
}

.color-choice.blue {
  border-color: #bfdbfe;
  color: #2563eb;
}

.color-choice.green {
  border-color: #bbf7d0;
  color: #16a34a;
}

.color-choice.yellow {
  border-color: #fde68a;
  color: #ca8a04;
}

.color-choice.purple {
  border-color: #e9d5ff;
  color: #9333ea;
}

.color-choice.black {
  border-color: #d1d5db;
  color: #111827;
}

.color-word.red {
  color: #dc2626;
}

.color-word.blue {
  color: #2563eb;
}

.color-word.green {
  color: #16a34a;
}

.color-word.yellow {
  color: #ca8a04;
}

.color-word.purple {
  color: #9333ea;
}

.color-word.black {
  color: #111827;
}

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

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

.panel {
  padding: 20px;
}

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

.item-button {
  min-height: 48px;
  border-radius: 8px;
  background: #edf8f6;
  color: #0f766e;
  font-weight: 700;
}

.honor-card {
  padding: 18px;
  border-radius: 8px;
  background: #fff7ed;
}

.honor-card strong {
  display: block;
  margin: 8px 0;
  color: var(--gold);
  font-size: 30px;
}

.form-preview {
  display: grid;
  gap: 14px;
}

.form-preview.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.primary {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

.secondary {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.check-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.screen-board {
  min-height: 460px;
  padding: 30px;
  background: #081f1b;
  color: #ecfdf5;
}

.screen-board h2 {
  font-size: 42px;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.podium div {
  min-height: 150px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.podium span {
  font-size: 34px;
  color: #5eead4;
}

.podium strong,
.podium em {
  display: block;
}

.podium strong {
  margin-top: 18px;
  font-size: 24px;
}

.podium em {
  color: #a7f3d0;
  font-style: normal;
}

.screen-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.screen-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.screen-category-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.screen-category-card > h3 {
  color: #5eead4;
  font-size: 22px;
}

.screen-rank-card {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.screen-rank-card h3 {
  margin-bottom: 10px;
  color: #ccfbf1;
}

.screen-rank-card p {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.screen-rank-card p:last-child {
  border-bottom: 0;
}

.screen-rank-card span {
  color: #5eead4;
  font-weight: 800;
}

.screen-rank-card em {
  color: #a7f3d0;
  font-style: normal;
}

.empty.dark {
  background: rgba(255, 255, 255, 0.1);
  color: #ccfbf1;
}

.empty {
  padding: 18px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.forgot-password-toggle {
  justify-self: start;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  body[data-role="student"][data-authenticated="true"] .rail {
    display: none;
  }

  .brand {
    margin-bottom: 12px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-button {
    min-width: 92px;
    text-align: center;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .hero-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .topbar {
    flex-direction: column;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-panel {
    display: grid;
  }

  .hero-stats,
  .grid.two,
  .screen-rank-grid,
  .screen-category-grid,
  .form-preview.compact,
  .auth-panel,
  .auth-grid,
  .auth-inline,
  .password-reset-form,
  .metric-grid,
  .org-forms,
  .task-form,
  .manual-record-form,
  .digits-answer-form,
  .family-practice-grid,
  .student-switch-grid,
  .podium {
    grid-template-columns: 1fr;
    display: grid;
  }

  .student-login-form,
  .staff-login-form,
  .student-profile-form {
    grid-template-columns: 1fr;
    display: grid;
  }

  .password-reset-form small {
    grid-column: auto;
  }

  .mini-form.wide,
  .task-form .span-all,
  .manual-record-form .span-all {
    grid-column: auto;
  }

  .task-card {
    align-items: start;
    flex-direction: column;
  }

  .section-head,
  .result-strip,
  .supervised-actions,
  .selected-training-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .schulte-meta {
    width: 100%;
    text-align: left;
  }

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

  .student-profile-panel .metric-grid strong {
    font-size: 18px;
  }

  .training-module-grid,
  .code-answer-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-module-card {
    min-height: 82px;
    padding: 12px 8px;
  }

  .training-module-card strong {
    font-size: 19px;
  }

  .training-category h4 {
    font-size: 19px;
  }

  .code-answer-form label {
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 8px;
  }

  .code-answer-card.reverse {
    grid-template-columns: 1fr;
  }

  .code-prompt {
    font-size: 24px;
  }

  .code-prompt.long {
    font-size: 16px;
  }

  .code-answer-form input {
    min-height: 48px;
    padding: 7px;
    font-size: 16px;
  }

  .schulte-grid {
    gap: 6px;
  }

  .digits-board strong {
    font-size: 18px;
  }

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

  .calc-answer-form {
    grid-template-columns: 1fr;
  }

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

  .color-reaction-panel .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .color-reaction-panel .schulte-meta {
    width: auto;
    text-align: right;
  }

  .color-reaction-stage {
    min-height: 128px;
  }

  .english-answer-row {
    grid-template-columns: minmax(0, 0.95fr) minmax(126px, 1.05fr);
    padding: 8px;
  }

  .attention-search-toolbar {
    align-items: stretch;
  }

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

  .hero-panel h2 {
    font-size: 24px;
  }

  .screen-board h2 {
    font-size: 30px;
  }

  body[data-role="student"] .topbar {
    padding: 16px 18px;
  }

  body[data-role="student"] .topbar h1 {
    font-size: 23px;
  }
}

@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;
  }
}

@media (max-width: 380px) {
  .main {
    padding: 10px;
  }

  .training-module-grid,
  .code-answer-form {
    gap: 8px;
  }

  .training-module-card strong {
    font-size: 18px;
  }

  .code-answer-form label {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .schulte-engine-head {
    align-items: flex-start;
  }

  .schulte-engine-head h3 {
    font-size: 23px;
  }

  .schulte-level-chip {
    max-width: 130px;
    white-space: normal;
    text-align: right;
  }

  .schulte-view-title {
    align-items: flex-start;
  }

  .schulte-plan-row {
    grid-template-columns: 36px minmax(0, 1fr) 76px;
    gap: 8px;
  }

  .schulte-plan-row button {
    min-width: 72px;
    padding: 0 8px;
  }

  .schulte-mastery-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .schulte-record-list > div {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .schulte-record-list > div small {
    grid-column: 2;
  }

  .schulte-ready {
    min-height: 430px;
  }

  .schulte-ready-main h3 {
    font-size: 30px;
  }

  .schulte-training {
    min-height: calc(100svh - 32px);
  }

  .schulte-target {
    flex-wrap: wrap;
    gap: 4px 9px;
  }

  .schulte-target small {
    flex-basis: 100%;
  }

  .schulte-target strong {
    max-width: 72%;
  }

  .schulte-grid.engine-grid {
    width: min(100%, var(--schulte-board-size));
  }

  .schulte-result {
    grid-template-columns: 1fr;
  }

  .schulte-result p,
  .schulte-result button {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 1100px) {
  .schulte-admin-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .schulte-grid {
    width: min(calc(100svh - 190px), calc(100svw - 320px), 620px);
  }

  .schulte-cell {
    font-size: clamp(22px, 6svh, 36px);
  }

  .calc-answer-form {
    grid-template-columns: 1fr;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.avatar-button {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 2px solid #a7d8d1;
  border-radius: 50%;
  background: #e6f7f4;
  cursor: pointer;
  touch-action: manipulation;
}

.account-avatar {
  display: grid;
  width: 100%;
  height: 100%;
  object-fit: cover;
  place-items: center;
  border-radius: 50%;
}

.account-avatar.large {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}

.avatar-fallback {
  background: #e6f7f4;
  color: var(--teal);
  font-size: 22px;
  font-weight: 900;
}

.student-account-actions,
.voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-account-settings > summary {
  white-space: nowrap;
}

.student-login-account-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f3f8f6;
}

.student-login-account-note span {
  color: var(--muted);
}

.student-login-account-note strong {
  overflow-wrap: anywhere;
}

.student-profile-panel.compact {
  padding-top: 14px;
  padding-bottom: 14px;
}

.student-profile-panel.compact .section-head {
  margin-bottom: 0;
}

.staff-account-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 12px;
}

.staff-account-summary h3,
.staff-account-summary p,
.staff-account-summary .compact-action {
  grid-column: 2;
  margin: 0;
  justify-self: start;
}

.staff-account-summary .avatar-button {
  grid-row: 1 / span 3;
}

.staff-account-strip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  margin-bottom: 18px;
  padding: 12px 18px;
}

.staff-account-summary.compact {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.staff-account-summary.compact > div {
  min-width: 0;
}

.staff-account-summary.compact strong,
.staff-account-summary.compact span {
  display: block;
}

.staff-account-summary.compact strong {
  font-size: 17px;
}

.staff-account-summary.compact span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.staff-account-settings {
  position: relative;
}

.staff-account-settings > summary {
  min-height: 44px;
  padding: 12px 10px;
  color: var(--teal);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.staff-account-settings > summary::-webkit-details-marker {
  display: none;
}

.staff-account-settings-body {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(620px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 42px rgb(15 23 42 / 18%);
}

.staff-account-settings-body .auth-inline + .auth-inline {
  margin-top: 12px;
}

.compact-action {
  min-height: 32px;
  padding: 0 6px;
  font-size: 13px;
}

.management-metrics {
  margin: 14px 0 22px;
}

.management-dashboard-panel {
  overflow: hidden;
}

.management-split,
.student-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 22px;
}

.management-split h4,
.student-roster-section h4,
.student-detail-panel h4 {
  margin: 0 0 12px;
  font-size: 17px;
}

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

.team-performance-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.team-performance-card > span,
.team-performance-card > small {
  color: var(--muted);
  font-size: 12px;
}

.team-performance-card > small {
  grid-column: 2 / -1;
}

.team-performance-card em {
  color: #b45309;
  font-style: normal;
  font-weight: 800;
}

.item-progress-list > div {
  display: grid;
  grid-template-columns: minmax(74px, 0.9fr) minmax(100px, 1.5fr) 44px 82px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.item-progress-list span,
.item-progress-list strong,
.item-progress-list small {
  font-size: 13px;
}

.item-progress-list small {
  color: var(--muted);
  text-align: right;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf1f0;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.student-roster-section {
  margin-top: 26px;
}

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

.student-dashboard-card {
  position: relative;
  display: grid;
  min-height: 122px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
}

.student-dashboard-card.selected,
.student-dashboard-card:focus-visible {
  border-color: var(--teal);
  outline: 2px solid #b8e3dd;
}

.student-dashboard-card strong {
  padding-right: 30px;
  font-size: 17px;
}

.student-dashboard-card small,
.student-dashboard-card > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.student-dashboard-card em {
  color: #1d4ed8;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.rank-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #fff3cd;
  color: #92400e;
  font-weight: 900;
}

.student-detail-head,
.student-detail-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-detail-identity h3,
.student-detail-identity span {
  display: block;
  margin: 0;
}

.student-detail-identity span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.profile-detail-list {
  margin: 0;
}

.profile-detail-list > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.profile-detail-list dt {
  color: var(--muted);
}

.profile-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.best-score-grid,
.recent-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.best-score-grid > div,
.recent-record-grid > div {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.best-score-grid strong {
  color: var(--teal);
  font-size: 20px;
}

.recent-record-grid > div {
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}

.recent-record-grid span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-list > div,
.feedback-message {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-list span,
.feedback-message span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-list strong,
.feedback-message strong {
  display: block;
  margin-top: 4px;
}

.timeline-list p,
.feedback-message p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.timeline-list small,
.support-suggestion {
  display: block;
  margin-top: 7px;
  color: #1d4ed8;
  line-height: 1.55;
}

.feedback-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.feedback-form .span-all {
  grid-column: 1 / -1;
}

.feedback-message.student-reply {
  padding-left: 12px;
  border-left: 3px solid #1d4ed8;
}

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

.wisdom-grid > article {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.wisdom-grid span,
.wisdom-grid small {
  color: var(--muted);
  font-size: 12px;
}

.wisdom-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.wisdom-grid p {
  margin: 7px 0;
  line-height: 1.65;
  white-space: pre-line;
}

.checkbox-label {
  display: flex !important;
  min-height: 44px;
  align-items: center;
  flex-direction: row !important;
  gap: 8px;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
}

.voice-challenge-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

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

.voice-stage {
  display: grid;
  min-height: 154px;
  margin: 16px 0;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  background: #f8fbfa;
}

.voice-stage.recording {
  border-color: #dc2626;
  background: #fff7f7;
}

.voice-stage span,
.voice-stage em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.voice-stage strong {
  margin: 8px 0;
  font-size: 32px;
  letter-spacing: 0;
  text-align: center;
}

.voice-transcript-label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.voice-transcript-label textarea,
.voice-fallback-form input {
  font-size: 17px;
}

.voice-fallback-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.danger-solid {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

@media (max-width: 1100px) {
  .student-dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .staff-account-strip {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
  }

  .staff-account-settings {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .staff-account-settings > summary {
    padding: 7px 0;
  }

  .staff-account-settings-body {
    position: static;
    width: auto;
    margin-top: 6px;
    box-shadow: none;
  }

  .staff-account-settings-body .auth-inline {
    grid-template-columns: 1fr;
  }

  .student-account-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0;
  }

  .student-account-settings {
    flex-basis: 100%;
    order: 3;
  }

  .student-account-actions .ghost {
    padding: 0 6px;
    font-size: 13px;
  }

  .management-split,
  .student-detail-columns {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .team-performance-grid,
  .best-score-grid,
  .recent-record-grid,
  .wisdom-grid {
    grid-template-columns: 1fr;
  }

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

  .student-dashboard-card {
    min-height: 132px;
    padding: 12px;
  }

  .item-progress-list > div {
    grid-template-columns: minmax(72px, 1fr) minmax(86px, 1.4fr) 38px;
  }

  .item-progress-list small {
    display: none;
  }

  .profile-detail-list > div {
    grid-template-columns: 84px 1fr;
  }

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

  .feedback-form .span-all,
  .feedback-form button {
    grid-column: 1 / -1;
  }

  .voice-stage {
    min-height: 132px;
  }

  .voice-stage strong {
    font-size: 27px;
  }
}

@media (max-width: 380px) {
  .student-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.access-gate-panel {
  max-width: 760px;
  margin-inline: auto;
}

.gate-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #176b61;
  font-size: 14px;
  font-weight: 700;
}

.gate-form {
  margin-top: 18px;
}

.registration-consent,
.consent-form {
  display: grid;
  gap: 12px;
}

.registration-consent {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border: 1px solid #cbded8;
  border-radius: 6px;
}

.registration-consent legend {
  padding-inline: 6px;
  font-weight: 700;
}

.registration-consent > label,
.consent-form > label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.55;
}

.registration-consent input[type="checkbox"],
.consent-form input[type="checkbox"] {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin-top: 2px;
}

.registration-consent a,
.consent-form a,
.site-footer a {
  color: #176b61;
  font-weight: 700;
}

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

.consent-identity-grid label {
  display: grid;
  gap: 6px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 6px 28px;
  color: #5f6f6a;
  font-size: 13px;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.credential-issue-block {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d6b968;
  border-radius: 6px;
  background: #fff9e8;
}

.credential-issue-block > strong {
  display: block;
  margin-bottom: 10px;
  color: #735b18;
}

@media (max-width: 720px) {
  .hm-method-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hm-form-grid,
  .hm-analysis-band {
    grid-template-columns: 1fr;
  }

  .hm-analysis-band p {
    grid-column: auto;
  }

  .hm-stage-heading,
  .hm-score {
    align-items: flex-start;
    flex-direction: column;
  }

  .hm-stage-heading strong {
    text-align: left;
  }

  .hm-recall-head {
    align-items: stretch;
  }

  .hm-recall-head .schulte-meta {
    width: 100%;
  }

  .hm-error-list p {
    grid-template-columns: 1fr;
  }

  .consent-identity-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.mindmap-coach-panel {
  border-top: 4px solid #8a3f63;
}

.mindmap-head .schulte-meta {
  color: #6f304f;
}

.mm-capability-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  border-block: 1px solid #ead4df;
  color: #644352;
  font-size: 13px;
  font-weight: 700;
}

.mm-capability-strip span {
  padding: 10px 12px;
  text-align: center;
}

.mm-capability-strip span + span {
  border-left: 1px solid #ead4df;
}

.mm-form {
  display: grid;
  gap: 22px;
  margin-top: 18px;
}

.mm-form-section {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid #e4d5dc;
}

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

.mm-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5d2942;
}

.mm-section-title span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #8a3f63;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.mm-section-title strong {
  font-size: 18px;
}

.mm-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #3c3036;
  font-weight: 700;
}

.mm-form input,
.mm-form select,
.mm-form textarea {
  width: 100%;
}

.mm-form textarea {
  min-height: 92px;
  resize: vertical;
  font-size: 17px;
  line-height: 1.65;
}

.mm-field-grid {
  display: grid;
  gap: 12px;
}

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

.mm-field-grid.center-paths {
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.7fr);
  align-items: start;
}

.mm-field-grid.evidence {
  grid-template-columns: minmax(0, 1.5fr) minmax(140px, 0.5fr);
}

.mm-check-field,
.mm-confirm-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  align-self: end;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid #dcc5d0;
  border-radius: 6px;
  background: #fff8fb;
}

.mm-check-field input,
.mm-confirm-row input {
  width: 21px;
  min-width: 21px;
  height: 21px;
}

.mm-evidence-warning {
  padding: 12px 14px;
  border-left: 4px solid #b7791f;
  background: #fff8e8;
  color: #694e11;
  line-height: 1.55;
}

.mm-revision-context {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-block: 1px solid #e4d5dc;
}

.mm-revision-context span {
  color: #8a3f63;
  font-weight: 800;
}

.mm-revision-context strong {
  font-size: 18px;
}

.mm-revision-reason textarea {
  border-color: #b97797;
  background: #fff9fc;
}

.mm-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.mm-form-actions button {
  min-height: 48px;
  padding-inline: 20px;
}

.mm-result {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.mm-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid #d9dedc;
}

.mm-score-cell {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 16px;
  border-top: 4px solid currentColor;
}

.mm-score-cell + .mm-score-cell {
  border-left: 1px solid #d9dedc;
}

.mm-score-cell.work {
  color: #6f304f;
  background: #fff8fb;
}

.mm-score-cell.mastery {
  color: #245e8a;
  background: #f5faff;
}

.mm-score-cell.autonomy {
  color: #4f682d;
  background: #f8fbf3;
}

.mm-score-cell span,
.mm-score-cell em {
  overflow-wrap: anywhere;
}

.mm-score-cell span {
  font-weight: 800;
}

.mm-score-cell strong {
  font-size: 34px;
  line-height: 1.1;
}

.mm-score-cell em {
  font-size: 12px;
  font-style: normal;
}

.mm-next-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 15px 0;
  border-block: 2px solid #8a3f63;
}

.mm-next-action span {
  color: #6f304f;
  font-size: 13px;
  font-weight: 800;
}

.mm-next-action strong {
  font-size: 20px;
  line-height: 1.5;
}

.mm-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 26px;
}

.mm-evidence-section,
.mm-graph-section {
  min-width: 0;
}

.mm-evidence-section h4,
.mm-graph-section h4,
.mm-comparison h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.mm-dimension-table td,
.mm-dimension-table th {
  white-space: nowrap;
}

.mm-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.mm-missing strong {
  margin-right: 2px;
}

.mm-missing span {
  padding: 4px 8px;
  border: 1px solid #e3b6b2;
  border-radius: 999px;
  background: #fff4f3;
  color: #8a3028;
  font-size: 13px;
  font-weight: 700;
}

.mm-evidence-ok {
  color: #35714e;
  font-weight: 700;
}

.mm-center-node {
  padding: 13px 14px;
  border-left: 5px solid #8a3f63;
  background: #fbf0f5;
  color: #5d2942;
  font-size: 20px;
  font-weight: 850;
}

.mm-branch-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.mm-branch-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 9px 10px;
  border-bottom: 1px solid #eadde3;
  color: #493740;
}

.mm-branch-list span:first-child {
  color: #6f304f;
  font-weight: 800;
}

.mm-comparison {
  padding: 16px 0;
  border-block: 1px solid #d6dfd3;
}

.mm-comparison > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mm-comparison span {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f4f8f2;
  color: #3f5a32;
  font-size: 18px;
  font-weight: 800;
}

.mm-comparison p {
  margin: 12px 0 0;
}

.mm-review-band {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-left: 4px solid #b7791f;
  background: #fff8e8;
  color: #654b12;
}

@media (max-width: 840px) {
  .mm-field-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .mm-capability-strip {
    grid-template-columns: 1fr;
  }

  .mm-capability-strip span {
    text-align: left;
  }

  .mm-capability-strip span + span {
    border-top: 1px solid #ead4df;
    border-left: 0;
  }

  .mm-field-grid.three,
  .mm-field-grid.center-paths,
  .mm-field-grid.evidence {
    grid-template-columns: 1fr;
  }

  .mm-score-cell {
    padding: 12px 9px;
  }

  .mm-score-cell strong {
    font-size: 28px;
  }

  .mm-score-cell em {
    font-size: 11px;
  }

  .mm-next-action,
  .mm-revision-context {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mm-next-action strong {
    font-size: 18px;
  }

  .mm-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mm-form-actions button {
    width: 100%;
  }
}

.twenty-one-day-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.twenty-one-day-form label {
  display: grid;
  gap: 7px;
  font-weight: 750;
}

.twenty-one-day-form .wide { grid-column: 1 / -1; }
.twenty-one-day-form small, .td-feedback small { color: var(--muted); font-weight: 500; }
.td-history, .td-answers, .td-staff-list { display: grid; gap: 10px; }
.td-history > div, .td-answers > div, .td-staff-list details, .td-issue-grid form {
  border: 1px solid var(--line);
  padding: 12px;
  background: #fff;
  border-radius: 8px;
}
.td-history > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.td-history span, .td-history em { color: var(--muted); font-style: normal; }
.td-final { margin-top: 14px; padding: 12px; border-left: 4px solid var(--teal); background: #f2faf8; }
.td-issue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.td-answer-form { display: grid; gap: 9px; }
.td-answer-form span { color: var(--muted); }
.td-staff-list details summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.td-checkin-detail { display: grid; gap: 9px; margin-top: 12px; }
.td-checkin-image { display: block; width: min(100%, 780px); max-height: 720px; object-fit: contain; background: #f5f8f7; }

.td-progress-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
  border-top: 6px solid #dc4b33;
  background: #fff;
}

.td-progress-hero.pulse { border-top-color: #4f5963; }
.td-progress-hero.blue { border-top-color: #2477b8; }
.td-progress-hero.violet { border-top-color: #7854a9; }
.td-progress-hero.gold { border-top-color: #c88b16; }
.td-progress-copy { display: grid; align-content: center; gap: 8px; }
.td-progress-copy h3 { margin: 0; font-size: clamp(24px, 3vw, 38px); color: #173f73; letter-spacing: 0; }
.td-progress-copy p, .td-progress-copy small { margin: 0; color: var(--muted); }
.td-kicker { color: #a53027; font-size: 13px; font-weight: 850; }
.td-progress-bar { width: 100%; height: 12px; overflow: hidden; border-radius: 6px; background: #e8eeec; }
.td-progress-bar i { display: block; height: 100%; border-radius: inherit; background: #18776b; }
.td-progress-metrics, .td-teacher-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.td-progress-metrics > div, .td-teacher-metrics > div { display: grid; align-content: center; min-height: 82px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfa; }
.td-progress-metrics strong, .td-teacher-metrics strong { font-size: 25px; }
.td-progress-metrics span, .td-teacher-metrics span { color: var(--muted); font-size: 13px; }
.td-teacher-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.td-teacher-metrics .attention { border-color: #e4aea8; background: #fff4f2; color: #9b3027; }
.td-quality-label { align-self: center; color: #80570f; font-weight: 800; }

.td-day-grid { display: grid; grid-template-columns: repeat(7, minmax(42px, 1fr)); gap: 8px; margin: 16px 0 22px; }
.td-day { display: grid; place-items: center; align-content: center; min-height: 64px; border: 1px solid #cfdad6; border-radius: 8px; background: #f5f8f7; color: #71807a; }
.td-day span { font-size: 18px; font-weight: 850; }
.td-day small { min-height: 15px; font-size: 11px; }
.td-day.submitted { border-color: #62aaa0; background: #e7f6f2; color: #135e56; }
.td-day.reviewed { border-color: #d3a84c; background: #fff6d8; color: #80570f; box-shadow: inset 0 -4px 0 #d3a84c; }
.td-day-grid.compact { grid-template-columns: repeat(21, minmax(16px, 1fr)); gap: 3px; margin: 8px 0; }
.td-day-grid.compact .td-day { min-height: 25px; border-radius: 3px; }
.td-day-grid.compact .td-day span { font-size: 9px; }

.td-honor-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.td-honor-step { display: grid; justify-items: center; gap: 4px; min-width: 0; text-align: center; color: #7b8984; }
.td-honor-step strong { font-size: 17px; }
.td-honor-step span, .td-honor-step small { font-size: 12px; }
.td-honor-step small { min-height: 34px; color: var(--muted); }
.td-honor-step.locked { opacity: 0.45; filter: grayscale(1); }
.td-honor-medal { display: grid; place-items: center; width: 58px; height: 58px; border: 3px solid #9ca8a4; border-radius: 50%; background: #eef2f1; font-size: 24px; font-weight: 900; }
.td-honor-step.flame.earned .td-honor-medal { border-color: #d9442d; background: #fff0eb; color: #c93522; }
.td-honor-step.pulse.earned .td-honor-medal { border-color: #59616a; background: #edf0f2; color: #303840; }
.td-honor-step.blue.earned .td-honor-medal { border-color: #2477b8; background: #e8f4fc; color: #175a8e; }
.td-honor-step.violet.earned .td-honor-medal { border-color: #7854a9; background: #f1ebfa; color: #5d3b8d; }
.td-honor-step.gold.earned .td-honor-medal { border-color: #c88b16; background: #fff5d1; color: #8e5c07; }
.td-point-rules { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.td-point-rules summary { min-height: 44px; color: var(--teal); cursor: pointer; font-weight: 800; }
.td-point-rules div { display: flex; flex-wrap: wrap; gap: 8px; }
.td-point-rules div span, .td-points-earned span { padding: 6px 8px; border-radius: 6px; background: #eef5f3; color: #36534d; font-size: 12px; }
.td-point-rules p { color: var(--muted); font-size: 13px; }
.td-points-earned { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.td-points-earned > strong { color: #a56809; font-size: 22px; }

.td-roster { display: grid; gap: 8px; }
.td-student-row { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.td-student-row.needs-attention { border-left: 5px solid #bd4236; }
.td-student-row > summary { display: grid; grid-template-columns: minmax(150px, 0.7fr) minmax(260px, 1.5fr) minmax(180px, 0.8fr); gap: 18px; align-items: center; min-height: 72px; padding: 12px; cursor: pointer; }
.td-student-name, .td-student-honor { display: grid; gap: 3px; }
.td-student-name span, .td-student-progress span, .td-student-honor span { color: var(--muted); font-size: 12px; }
.td-student-progress { display: grid; gap: 6px; }
.td-student-expanded { padding: 0 12px 14px; border-top: 1px solid var(--line); }
.td-student-expanded p { margin-bottom: 0; color: var(--muted); }
.td-flags { display: flex; flex-wrap: wrap; gap: 7px; }
.td-flags span { padding: 5px 8px; border-radius: 5px; font-size: 12px; font-weight: 750; }
.td-flags .high { background: #fdecea; color: #9b3027; }
.td-flags .medium { background: #fff4cf; color: #80570f; }
.td-flags .ok { background: #e9f6ef; color: #276748; }
.td-review-form { display: grid; grid-template-columns: minmax(150px, 0.45fr) minmax(240px, 1fr); gap: 10px; padding: 12px; border: 1px solid #d6e3df; border-radius: 8px; background: #f7fbfa; }
.td-review-form label { display: grid; gap: 6px; font-weight: 750; }
.td-review-form .wide { grid-column: 1 / -1; }

@media (max-width: 680px) {
  .twenty-one-day-form, .td-issue-grid { grid-template-columns: 1fr; }
  .twenty-one-day-form .wide { grid-column: auto; }
  .td-history > div { grid-template-columns: 1fr; gap: 4px; }
  .td-staff-list details summary { display: grid; }
  .td-progress-hero { grid-template-columns: 1fr; gap: 16px; }
  .td-progress-metrics, .td-teacher-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-day-grid { grid-template-columns: repeat(7, minmax(34px, 1fr)); gap: 5px; }
  .td-day { min-height: 50px; }
  .td-honor-rail { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
  .td-honor-step { min-width: 68px; }
  .td-honor-medal { width: 48px; height: 48px; font-size: 20px; }
  .td-honor-step strong { font-size: 14px; }
  .td-student-row > summary { grid-template-columns: 1fr; gap: 8px; }
  .td-day-grid.compact { grid-template-columns: repeat(7, minmax(28px, 1fr)); gap: 4px; }
  .td-day-grid.compact .td-day { min-height: 28px; }
  .td-review-form { grid-template-columns: 1fr; }
  .td-review-form .wide { grid-column: auto; }
}

/* Teacher-led mind-map scoring during the pre-OCR transition period. */
.mm-teacher-scoreboard {
  border-top: 5px solid #b64457;
}

.mm-scoreboard-head h3 {
  color: #7f2637;
}

.mm-scoreboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.mm-scoreboard-summary > div {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #d7e0dc;
  background: #f7faf8;
}

.mm-scoreboard-summary strong {
  color: #15231f;
  font-size: 26px;
}

.mm-scoreboard-summary span {
  color: #68736f;
  font-size: 14px;
}

.mm-score-save-notice {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 4px solid #23815f;
  background: #edf8f2;
  color: #165d43;
  font-weight: 700;
}

.mm-score-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d6dedb;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.mm-score-table {
  min-width: 980px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.mm-score-table th,
.mm-score-table td {
  min-width: 68px;
  padding: 8px 6px;
  border-right: 1px solid #e0e6e3;
  border-bottom: 1px solid #e0e6e3;
  background: #fff;
  text-align: center;
}

.mm-score-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef3f1;
  color: #36443f;
  font-size: 13px;
}

.mm-score-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 154px;
  max-width: 154px;
  text-align: left;
}

.mm-score-table th:nth-child(2),
.mm-score-table td:nth-child(2) {
  min-width: 108px;
}

.mm-score-table thead th:first-child {
  z-index: 4;
  background: #e8efec;
}

.mm-score-table tbody th:first-child {
  background: #f8faf9;
}

.mm-score-table tbody th strong,
.mm-score-table tbody th small {
  display: block;
}

.mm-score-table tbody th strong {
  overflow: hidden;
  color: #15231f;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-score-table tbody th small {
  margin-top: 3px;
  color: #74807b;
  font-size: 11px;
}

.mm-work-score {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border: 1px dashed #aab8b2;
  border-radius: 6px;
  background: #fff;
  color: #4d5b56;
  font-size: 17px;
  font-weight: 800;
  touch-action: manipulation;
}

.mm-work-score:not(:disabled):active {
  transform: scale(0.96);
}

.mm-work-score.scored {
  border-style: solid;
}

.mm-work-score:disabled {
  border-style: solid;
  background: #f0f2f1;
  color: #9ba39f;
  font-size: 11px;
}

.mm-high-score {
  display: inline-grid;
  width: auto;
  min-width: 82px;
  height: 48px;
  padding: 0 10px;
  place-items: center;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.tone-starter {
  background: #f0f2f1;
  color: #53605b;
}

.tone-basic {
  background: #e6f1ec;
  color: #176348;
}

.tone-steady {
  background: #e7f0fa;
  color: #265d91;
}

.tone-advanced {
  background: #fff1cd;
  color: #77500b;
}

.tone-excellent {
  background: #fbe4e8;
  color: #9a3044;
}

.tone-master {
  background: #8e2639;
  color: #fff;
}

.mm-teacher-score-editor {
  display: grid;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  border: 2px solid #b64457;
  background: #fffafb;
  box-shadow: 0 10px 24px rgba(90, 38, 48, 0.12);
}

.mm-teacher-score-editor h4 {
  margin: 3px 0;
  color: #17231f;
  font-size: 24px;
}

.mm-teacher-score-editor p {
  margin: 0;
}

.mm-editor-kicker {
  color: #a3364b;
  font-size: 13px;
  font-weight: 800;
}

.mm-quick-score-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.mm-quick-score-row > label,
.mm-quick-score-row > div {
  display: grid;
  gap: 7px;
  min-height: 102px;
  align-content: center;
  padding: 12px;
  border: 1px solid #d9e0dd;
  background: #fff;
}

.mm-quick-score-row select {
  min-height: 46px;
  font-size: 20px;
  font-weight: 800;
}

.mm-quick-score-row strong {
  color: #9c2f44;
  font-size: 28px;
}

.mm-quick-score-row small,
.mm-quick-score-row span {
  color: #68736f;
}

.mm-dimension-editor {
  border: 1px solid #d9e0dd;
  background: #fff;
}

.mm-dimension-editor summary {
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 800;
}

.mm-dimension-editor[open] summary {
  border-bottom: 1px solid #d9e0dd;
}

.mm-dimension-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.mm-dimension-fields label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.mm-dimension-fields select {
  min-height: 42px;
}

.mm-dimension-fields small {
  color: #74807b;
  font-weight: 400;
}

.mm-dimension-editor > p {
  padding: 0 14px 14px;
}

.mm-teacher-comment {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.mm-score-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.mm-teacher-rubric {
  margin-top: 20px;
  border: 1px solid #d5dfdb;
  background: #f9fbfa;
}

.mm-teacher-rubric > summary {
  display: grid;
  gap: 3px;
  padding: 15px 16px;
  cursor: pointer;
}

.mm-teacher-rubric > summary span {
  color: #69756f;
  font-size: 13px;
}

.mm-dimension-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.mm-dimension-guide section {
  padding: 12px;
  border: 1px solid #dce4e0;
  background: #fff;
}

.mm-dimension-guide header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e3e8e6;
}

.mm-dimension-guide header span {
  color: #8c3142;
  font-weight: 800;
}

.mm-dimension-guide p {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 7px;
  margin: 7px 0 0;
  color: #56625e;
  font-size: 13px;
}

.mm-dimension-guide p b {
  color: #19352c;
}

.mm-score-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 16px;
}

.mm-score-level-grid > div {
  display: grid;
  grid-template-columns: 40px 72px 1fr;
  gap: 8px;
  min-height: 62px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(30, 48, 42, 0.1);
}

.mm-score-level-grid strong {
  font-size: 20px;
}

.mm-score-level-grid span {
  font-size: 13px;
  font-weight: 800;
}

.mm-score-level-grid small {
  line-height: 1.45;
}

@media (max-width: 900px) {
  .mm-dimension-fields,
  .mm-score-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-quick-score-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .mm-scoreboard-summary,
  .mm-dimension-guide,
  .mm-dimension-fields,
  .mm-score-level-grid {
    grid-template-columns: 1fr;
  }

  .mm-teacher-score-editor {
    padding: 14px;
  }

  .mm-score-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mm-score-editor-actions button {
    width: 100%;
  }
}

/* Phase 60: administrator operations center */
body[data-role="admin"][data-authenticated="true"] .rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #10251f;
}

body[data-role="admin"][data-authenticated="true"] .main {
  background: #f2f6f4;
}

body[data-role="admin"][data-authenticated="true"] .nav {
  display: grid;
  gap: 6px;
}

.admin-nav-context {
  display: grid;
  gap: 3px;
  padding: 0 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 2px;
}

.admin-nav-context span {
  color: #9fc0b6;
  font-size: 12px;
}

.admin-nav-context strong {
  font-size: 15px;
}

.admin-nav-button {
  display: grid;
  gap: 3px;
  min-height: 56px;
  align-content: center;
}

.admin-nav-button strong {
  font-size: 15px;
}

.admin-nav-button small {
  color: #a9c3bb;
  font-size: 11px;
  font-weight: 500;
}

.admin-nav-button.active small {
  color: #214a42;
}

.admin-workbench {
  display: grid;
  gap: 16px;
  padding-top: 18px;
}

.admin-workbench > .panel,
.admin-workbench > .management-dashboard-panel {
  margin: 0;
}

.admin-section-heading {
  display: flex;
  min-height: 94px;
  align-items: end;
  padding: 4px 2px 8px;
}

.admin-section-heading span {
  display: block;
  margin-bottom: 5px;
  color: #176b61;
  font-size: 12px;
  font-weight: 800;
}

.admin-section-heading h2 {
  margin-bottom: 7px;
  font-size: 28px;
  letter-spacing: 0;
}

.admin-section-heading p {
  max-width: 760px;
  margin: 0;
  color: #62716c;
  line-height: 1.6;
}

.admin-overview-panel {
  border-top: 4px solid #176b61;
}

.admin-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.admin-metric-strip > div {
  display: grid;
  gap: 5px;
  min-height: 116px;
  align-content: center;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.admin-metric-strip > div:last-child {
  border-right: 0;
}

.admin-metric-strip span,
.admin-metric-strip small {
  color: #64736e;
}

.admin-metric-strip strong {
  font-size: 34px;
  line-height: 1;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.admin-overview-grid > .panel {
  margin: 0;
}

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

.admin-quick-actions button {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid #cddbd6;
  border-left: 4px solid #176b61;
  border-radius: 6px;
  background: #f9fbfa;
  color: #17221f;
  cursor: pointer;
  text-align: left;
}

.admin-quick-actions button:nth-child(2) {
  border-left-color: #2563eb;
}

.admin-quick-actions button:nth-child(3) {
  border-left-color: #b7791f;
}

.admin-quick-actions button:nth-child(4) {
  border-left-color: #7c3f72;
}

.admin-quick-actions button:hover,
.admin-account-role-tabs button:hover {
  border-color: #70a49a;
  background: #f2f8f5;
}

.admin-quick-actions strong {
  font-size: 17px;
}

.admin-quick-actions span,
.admin-check-rows em,
.admin-activity-list span,
.admin-activity-list p {
  color: #65736e;
  font-size: 13px;
  font-style: normal;
}

.admin-check-rows {
  display: grid;
  gap: 0;
}

.admin-check-rows > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 53px;
  border-bottom: 1px solid var(--line);
}

.admin-check-rows > div:last-child {
  border-bottom: 0;
}

.admin-check-rows span {
  color: #89958f;
  font-size: 12px;
  font-weight: 800;
}

.admin-check-rows .done strong::after {
  content: "已就绪";
  margin-left: 8px;
  color: #167148;
  font-size: 11px;
}

.admin-check-rows .todo strong::after {
  content: "待完善";
  margin-left: 8px;
  color: #9a6416;
  font-size: 11px;
}

.admin-activity-list {
  display: grid;
}

.admin-activity-list > div {
  display: grid;
  grid-template-columns: 150px 180px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 47px;
  border-bottom: 1px solid var(--line);
}

.admin-activity-list > div:last-child {
  border-bottom: 0;
}

.admin-activity-list p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-summary {
  padding: 0;
  overflow: hidden;
}

.admin-account-role-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-account-role-tabs button {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: #26332f;
  cursor: pointer;
}

.admin-account-role-tabs button:last-child {
  border-right: 0;
}

.admin-account-role-tabs button.active {
  box-shadow: inset 0 -4px #176b61;
  background: #f1f8f5;
  color: #12584f;
}

.admin-account-role-tabs strong {
  font-size: 24px;
}

.admin-assignment-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.admin-assignment-shortcuts button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fbfdfc;
  color: #43514c;
  cursor: pointer;
}

.admin-assignment-shortcuts button:last-child {
  border-right: 0;
}

.admin-assignment-shortcuts button.active {
  background: #fff4e5;
  color: #9a4d0c;
  box-shadow: inset 0 -3px #d97706;
}

.admin-assignment-shortcuts strong {
  font-size: 20px;
}

.admin-account-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-account-create-form label,
.admin-scope-form label,
.admin-account-filter-form label {
  display: grid;
  gap: 6px;
  color: #52605b;
  font-size: 13px;
  font-weight: 700;
}

.admin-form-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
}

.admin-form-actions span {
  color: #6d7975;
  font-size: 12px;
}

.admin-credential-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e5c77b;
  border-left: 5px solid #b7791f;
  background: #fffbeb;
}

.admin-credential-result div {
  display: grid;
  gap: 4px;
}

.admin-credential-result span,
.admin-credential-result p {
  margin: 0;
  color: #74551c;
  font-size: 12px;
}

.admin-credential-result strong {
  font-size: 22px;
  letter-spacing: 0;
}

.admin-scope-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.admin-scope-form p {
  grid-column: 1 / -1;
  margin: 0;
}

.admin-account-filter-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 180px auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.admin-account-table td {
  vertical-align: top;
}

.admin-account-table td > strong,
.admin-account-table td > span,
.admin-account-table td > small {
  display: block;
  margin-bottom: 4px;
}

.account-role-badge {
  display: inline-flex !important;
  min-width: 48px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 5px;
  background: #e9f2ef;
  color: #176b61;
  font-size: 12px;
  font-weight: 800;
}

.account-role-badge.teacher {
  background: #e8efff;
  color: #3157a4;
}

.account-role-badge.assistant {
  background: #fff1da;
  color: #8a5917;
}

.account-role-badge.student {
  background: #edf6e9;
  color: #3e6e35;
}

.admin-account-actions {
  display: flex;
  min-width: 260px;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-account-actions button {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #cad8d3;
  border-radius: 5px;
  background: #ffffff;
  color: #245d55;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.admin-account-actions button.danger {
  border-color: #e6b7b2;
  color: #a32920;
}

.admin-account-actions button.danger.permanent {
  border-color: #c43d32;
  background: #fff5f4;
  color: #8c1d18;
}

.admin-danger-zone {
  border: 1px solid #e3b4af;
  border-top: 4px solid #a32920;
  background: #fffafa;
}

.admin-danger-zone .section-head {
  align-items: flex-start;
}

.admin-danger-zone h3 {
  margin-top: 5px;
  color: #6f1d18;
}

.admin-danger-label {
  color: #a32920;
  font-size: 12px;
  font-weight: 900;
}

.admin-danger-count {
  display: grid;
  min-width: 150px;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid #e4c6c2;
  background: #ffffff;
  text-align: right;
}

.admin-danger-count strong {
  color: #8c1d18;
  font-size: 28px;
}

.admin-danger-count span {
  color: #735b58;
  font-size: 12px;
}

.admin-trial-reset-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.admin-trial-reset-form label {
  display: grid;
  gap: 6px;
  color: #674b48;
  font-size: 13px;
  font-weight: 800;
}

.admin-danger-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #8c1d18;
  border-radius: 6px;
  background: #a32920;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.admin-danger-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.admin-danger-notes {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  color: #735b58;
  font-size: 12px;
}

.admin-reset-result {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid #2f7d68;
  background: #f1f8f5;
  color: #315f54;
}

.admin-reset-result small {
  overflow-wrap: anywhere;
}

.admin-account-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  color: #536863;
}

.admin-account-pagination button {
  min-width: 82px;
}

.admin-account-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Phase 62: batch account selection and deletion. */
.admin-batch-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #cbdad5;
  background: #f7faf9;
}

.admin-batch-selection-count {
  display: grid;
  min-width: 82px;
  min-height: 52px;
  place-content: center;
  border-right: 1px solid #cad8d3;
  text-align: center;
}

.admin-batch-selection-count strong {
  color: #176b61;
  font-size: 24px;
  line-height: 1;
}

.admin-batch-selection-count span {
  margin-top: 4px;
  color: #60716b;
  font-size: 12px;
}

.admin-batch-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-batch-toolbar-actions button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #bfcfca;
  border-radius: 6px;
  background: #ffffff;
  color: #245d55;
  cursor: pointer;
  font-weight: 800;
}

.admin-batch-toolbar-actions button.active {
  border-color: #176b61;
  background: #176b61;
  color: #ffffff;
}

.admin-batch-toolbar-actions button.danger {
  border-color: #b93b32;
  background: #fff5f4;
  color: #8c1d18;
}

.admin-batch-toolbar-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-batch-toolbar > p {
  grid-column: 2;
  margin: 0;
  color: #66736f;
  font-size: 12px;
}

.admin-select-cell {
  width: 68px;
  min-width: 68px;
  padding: 6px !important;
}

.admin-select-control {
  display: flex;
  min-width: 54px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  color: #536863;
  font-size: 11px;
  font-weight: 800;
}

.admin-select-control input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #176b61;
  cursor: pointer;
}

.admin-account-table tbody tr.selected > td {
  background: #eef8f4;
  box-shadow: inset 0 1px #b8d8ce, inset 0 -1px #b8d8ce;
}

.admin-account-list-panel[data-account-selection-mode="slide"] .admin-account-table-wrap {
  touch-action: none;
  user-select: none;
}

.admin-account-list-panel[data-account-selection-mode="slide"] .admin-account-table tbody tr {
  cursor: crosshair;
}

.admin-batch-delete-panel {
  border: 1px solid #d9a29d;
  border-top: 4px solid #a32920;
  background: #fffafa;
}

.admin-batch-delete-panel h3 {
  margin: 4px 0;
  color: #721f19;
}

.admin-batch-delete-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 16px;
}

.admin-batch-delete-preview span {
  padding: 6px 9px;
  border: 1px solid #e5c6c3;
  border-radius: 5px;
  background: #ffffff;
  color: #674b48;
  font-size: 12px;
}

.admin-batch-delete-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-batch-delete-form label {
  display: grid;
  gap: 6px;
  color: #674b48;
  font-size: 13px;
  font-weight: 800;
}

.admin-batch-delete-note {
  margin: 12px 0 0;
  color: #735b58;
  font-size: 12px;
}

.admin-batch-delete-result {
  display: grid;
  gap: 3px;
  margin: 0 0 14px;
  padding: 11px 13px;
  border-left: 4px solid #2f7d68;
  background: #f1f8f5;
  color: #315f54;
}

.admin-batch-delete-result small {
  overflow-wrap: anywhere;
}

.admin-process-steps,
.admin-data-package-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-process-steps > div,
.admin-data-package-list > div {
  display: grid;
  gap: 5px;
  min-height: 80px;
  align-content: center;
  padding: 14px;
  border-left: 3px solid #176b61;
  background: #f4f8f6;
}

.admin-process-steps span,
.admin-process-steps small,
.admin-data-package-list span {
  color: #687670;
  font-size: 12px;
}

.admin-template-download {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  margin-top: 14px;
  padding: 0 16px;
  text-decoration: none;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
}

@media (max-width: 1180px) {
  .admin-metric-strip,
  .admin-account-create-form,
  .admin-process-steps,
  .admin-data-package-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metric-strip > div:nth-child(2) {
    border-right: 0;
  }

  .admin-metric-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  body[data-role="admin"][data-authenticated="true"] .rail {
    height: auto;
    overflow: visible;
  }

  body[data-role="admin"][data-authenticated="true"] .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .admin-nav-context {
    display: none;
  }

  .admin-nav-button {
    min-width: 118px;
    min-height: 52px;
    text-align: left;
  }

  .admin-overview-grid,
  .admin-scope-form {
    grid-template-columns: 1fr;
  }

  .admin-activity-list > div {
    grid-template-columns: 115px minmax(120px, 0.5fr) minmax(180px, 1fr);
  }

  .admin-account-filter-form {
    grid-template-columns: minmax(0, 1fr) minmax(135px, 0.5fr) minmax(165px, 0.5fr) auto;
  }

  .admin-account-filter-form .ghost {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .admin-section-heading {
    min-height: 74px;
    align-items: start;
  }

  .admin-section-heading h2 {
    font-size: 23px;
  }

  .admin-metric-strip,
  .admin-quick-actions,
  .admin-account-role-tabs,
  .admin-assignment-shortcuts,
  .admin-account-create-form,
  .admin-process-steps,
  .admin-data-package-list,
  .admin-account-filter-form {
    grid-template-columns: 1fr;
  }

  .admin-metric-strip > div {
    min-height: 88px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-metric-strip > div:last-child {
    border-bottom: 0;
  }

  .admin-account-role-tabs button {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-account-role-tabs button:last-child {
    border-bottom: 0;
  }

  .admin-assignment-shortcuts button {
    min-height: 52px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-assignment-shortcuts button:last-child {
    border-bottom: 0;
  }

  .admin-credential-result,
  .admin-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-credential-result button,
  .admin-form-actions button {
    width: 100%;
  }

  .admin-activity-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 10px 0;
  }

  .admin-account-actions {
    min-width: 220px;
  }

  .admin-trial-reset-form {
    grid-template-columns: 1fr;
  }

  .admin-batch-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-batch-selection-count {
    grid-template-columns: auto auto;
    min-height: 44px;
    place-content: center start;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid #cad8d3;
    text-align: left;
  }

  .admin-batch-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-batch-toolbar-actions button {
    width: 100%;
  }

  .admin-batch-toolbar > p {
    grid-column: 1;
  }

  .admin-batch-delete-form {
    grid-template-columns: 1fr;
  }

  .admin-danger-count {
    width: 100%;
    text-align: left;
  }

  .admin-danger-button {
    width: 100%;
  }

  .admin-account-pagination {
    justify-content: space-between;
  }
}

/* Phase 54: English word coach and English ability. */
.english-learning-shell {
  display: grid;
  gap: 12px;
}

.english-learning-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #b9d2c9;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.english-learning-tabs button {
  min-height: 48px;
  border: 0;
  background: #ffffff;
  color: #35534a;
  cursor: pointer;
  font-weight: 800;
}

.english-learning-tabs button + button {
  border-left: 1px solid #b9d2c9;
}

.english-learning-tabs button.active {
  background: #176b61;
  color: #ffffff;
}

.english-coach-panel {
  border-top: 5px solid #176b61;
}

.english-ability-panel {
  border-top: 5px solid #2563eb;
}

.english-coach-head,
.english-ability-head {
  align-items: center;
}

.english-coach-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 8px;
}

.english-coach-stats span {
  display: grid;
  min-height: 66px;
  place-items: center;
  padding: 8px 12px;
  border: 1px solid #c8dcd5;
  background: #f1f8f5;
  color: #46635a;
  font-size: 12px;
  text-align: center;
}

.english-coach-stats strong {
  color: #145e55;
  font-size: 24px;
}

.english-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.42fr);
  gap: 14px;
}

.english-import-form label,
.english-prepare-form label,
.english-recall-form label,
.english-sentence-answer {
  display: grid;
  gap: 7px;
  color: #33423e;
  font-weight: 750;
}

.english-import-form input,
.english-import-form select,
.english-import-form textarea,
.english-screening-form input,
.english-prepare-form select,
.english-prepare-form textarea,
.english-recall-form input,
.english-sentence-answer input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #b9cbc5;
  border-radius: 6px;
  background: #ffffff;
  color: #17221f;
  padding: 11px 12px;
}

.english-import-form textarea,
.english-prepare-form textarea {
  min-height: 96px;
  resize: vertical;
}

.english-import-words,
.english-import-form .consent-check,
.english-import-form button {
  grid-column: 1 / -1;
}

.english-import-form .consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.english-import-form .consent-check input {
  width: 22px;
  min-height: 22px;
}

.english-source-note,
.english-unmatched,
.english-review-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #b7791f;
  background: #fff9e9;
  color: #654b12;
}

.english-resume-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #d8e2de;
}

.english-resume-section h4,
.english-screening-result h4,
.english-ability-setup h4 {
  margin: 0 0 12px;
}

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

.english-state-button {
  display: grid;
  min-height: 106px;
  align-content: center;
  gap: 6px;
  padding: 13px;
  border: 1px solid #b9d2c9;
  border-radius: 6px;
  background: #f5faf8;
  color: #173c35;
  cursor: pointer;
  text-align: left;
}

.english-state-button strong {
  overflow-wrap: anywhere;
  font-size: 21px;
}

.english-state-button span {
  color: #4e625c;
}

.english-state-button em {
  color: #176b61;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.english-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #dce8e4;
}

.english-progress span {
  display: block;
  height: 100%;
  background: #14a594;
  transition: width 180ms ease;
}

.english-word-question,
.english-study-word {
  display: grid;
  min-height: 190px;
  place-content: center;
  gap: 8px;
  margin: 16px 0;
  padding: 20px;
  border: 1px solid #c2d8d1;
  background: #f2f9f6;
  text-align: center;
}

.english-word-question strong,
.english-study-word strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #124f48;
  font-size: 42px;
  line-height: 1.15;
}

.english-word-question em,
.english-study-word em {
  color: #53645f;
  font-style: normal;
}

.english-screening-form,
.english-prepare-form,
.english-recall-form {
  display: grid;
  gap: 14px;
}

.english-screening-form > input {
  font-size: 21px;
}

.english-self-rating,
.english-pattern-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.english-self-rating legend,
.english-pattern-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 5px;
  color: #41534d;
  font-weight: 800;
}

.english-self-rating label,
.english-pattern-picker label {
  display: grid;
  min-height: 62px;
  place-items: center;
  padding: 9px;
  border: 1px solid #bdcec8;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
}

.english-self-rating input,
.english-pattern-picker input {
  width: 21px;
  height: 21px;
}

.english-level-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0 20px;
}

.english-level-grid > div {
  display: grid;
  min-height: 84px;
  place-content: center;
  gap: 3px;
  border: 1px solid #c8d5d1;
  background: #ffffff;
  text-align: center;
}

.english-level-grid strong {
  font-size: 24px;
}

.english-level-grid span {
  color: #596963;
  font-size: 12px;
}

.english-stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.english-stage-actions button,
.english-method-stage > button,
.english-ability-setup > button,
.english-ability-result > button {
  min-height: 48px;
}

.english-method-route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  margin-bottom: 16px;
  border-block: 1px solid #d1ddd9;
}

.english-method-route p {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid #e3eae7;
}

.english-method-route b {
  color: #176b61;
}

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

.english-recall-form button {
  grid-column: 1 / -1;
}

.english-recall-result,
.english-ability-result {
  display: grid;
  gap: 15px;
}

.english-recall-score {
  display: grid;
  min-height: 130px;
  place-content: center;
  border-block: 3px solid #176b61;
  text-align: center;
}

.english-ability-result .english-recall-score {
  border-color: #2563eb;
}

.english-recall-score strong {
  color: #176b61;
  font-size: 52px;
  line-height: 1;
}

.english-ability-result .english-recall-score strong {
  color: #1d4ed8;
}

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

.english-error-list li {
  display: grid;
  grid-template-columns: minmax(110px, 0.3fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-left: 4px solid #b42318;
  background: #fff4f2;
}

.english-success-note {
  padding: 13px;
  border-left: 4px solid #25855b;
  background: #eef9f3;
  color: #235f45;
}

.english-grade-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.english-grade-picker button {
  min-height: 56px;
  border: 1px solid #b8c9db;
  border-radius: 6px;
  background: #f4f7fb;
  color: #29415d;
  cursor: pointer;
  font-weight: 800;
}

.english-grade-picker button.active {
  border-color: #2563eb;
  background: #eaf1ff;
  color: #174cb5;
}

.english-pattern-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.english-pattern-intro div {
  display: grid;
  min-height: 92px;
  place-content: center;
  gap: 6px;
  padding: 12px;
  border-top: 4px solid #2563eb;
  background: #f5f8fe;
  text-align: center;
}

.english-pattern-intro span,
.english-pattern-picker span {
  color: #5d6979;
  font-size: 12px;
}

.english-ability-question .single-question-stage {
  min-height: 150px;
  margin: 16px 0;
}

.english-ability-question .single-question-stage strong {
  font-size: 30px;
}

.english-pattern-picker label:has(input:checked) {
  border-color: #2563eb;
  background: #edf3ff;
  color: #174cb5;
}

.english-word-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.english-word-blocks button {
  min-height: 46px;
  padding: 9px 14px;
  border: 1px solid #aebed4;
  border-radius: 6px;
  background: #ffffff;
  color: #233d60;
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
}

.english-sentence-answer input {
  margin-top: 7px;
  font-size: 18px;
}

.english-next-action {
  padding: 13px 15px;
  border-left: 4px solid #b7791f;
  background: #fff9e9;
  color: #654b12;
  font-weight: 700;
}

.english-ability-review {
  display: grid;
  gap: 8px;
}

.english-ability-review > div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 4px solid #25855b;
  background: #f2f9f5;
}

.english-ability-review > div.needs-work {
  border-left-color: #b7791f;
  background: #fff9e9;
}

.english-ability-review span {
  color: #5c6864;
}

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

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

@media (max-width: 620px) {
  .english-coach-head,
  .english-ability-head {
    align-items: stretch;
  }

  .english-import-form,
  .english-recall-form,
  .english-method-route {
    grid-template-columns: 1fr;
  }

  .english-import-form label,
  .english-import-form .consent-check,
  .english-import-form button,
  .english-recall-form button {
    grid-column: 1;
  }

  .english-self-rating,
  .english-pattern-picker,
  .english-pattern-intro {
    grid-template-columns: 1fr;
  }

  .english-self-rating label,
  .english-pattern-picker label {
    grid-template-columns: 24px minmax(0, 1fr);
    place-items: center start;
    text-align: left;
  }

  .english-pattern-picker label span {
    grid-column: 2;
  }

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

  .english-word-question,
  .english-study-word {
    min-height: 150px;
  }

  .english-word-question strong,
  .english-study-word strong {
    font-size: 34px;
  }

  .english-stage-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .english-stage-actions button,
  .english-method-stage > button,
  .english-ability-setup > button,
  .english-ability-result > button {
    width: 100%;
  }

  .english-error-list li {
    grid-template-columns: 1fr;
  }
}

.speech-growth-panel {
  --training-accent: #0f766e;
  border-top: 4px solid var(--training-accent);
}

.speech-growth-panel.busy {
  cursor: progress;
}

.speech-growth-panel.busy .speech-project-shell,
.speech-growth-panel.busy .speech-start-stage {
  opacity: 0.72;
}

.speech-growth-head {
  align-items: flex-start;
}

.speech-teacher-overview {
  padding: 14px 0;
  border-top: 1px solid #d8e3df;
  border-bottom: 1px solid #d8e3df;
}

.speech-progress-list,
.speech-project-list,
.speech-practice-tasks {
  display: grid;
  gap: 8px;
}

.speech-progress-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(180px, 1.5fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-left: 4px solid #2f7f71;
  background: #f3f8f6;
}

.speech-progress-row.attention {
  border-left-color: #b42318;
  background: #fff2f0;
}

.speech-progress-row span,
.speech-project-list button span {
  display: grid;
  gap: 2px;
}

.speech-progress-row small,
.speech-project-list small {
  color: #65716d;
}

.speech-progress-row em {
  color: #176b61;
  font-style: normal;
  font-weight: 800;
}

.speech-start-stage,
.speech-direction-stage,
.speech-topic-stage,
.speech-focus-stage,
.speech-interview-stage,
.speech-core-stage,
.speech-card-generate-stage,
.speech-practice-stage {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.speech-start-copy {
  display: grid;
  gap: 7px;
  max-width: 720px;
}

.speech-start-copy strong {
  font-size: 24px;
}

.speech-start-copy span {
  color: #56625e;
  font-size: 17px;
}

.speech-start-stage > .primary {
  width: max-content;
  min-height: 48px;
}

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

.speech-mode-grid button {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid #9fb9b1;
  border-top: 5px solid #0f766e;
  border-radius: 7px;
  background: #ffffff;
  color: #17312a;
  cursor: pointer;
  text-align: left;
}

.speech-mode-grid button:last-child {
  border-top-color: #3157a4;
  background: #f4f7fc;
}

.speech-mode-grid span,
.speech-mode-grid small {
  color: #65716d;
}

.speech-mode-grid strong {
  font-size: 21px;
}

.speech-project-list h4 {
  margin: 6px 0;
}

.speech-project-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #b9cbc5;
  border-radius: 6px;
  background: #ffffff;
  color: #14251f;
  cursor: pointer;
  text-align: left;
}

.speech-project-list em {
  color: #176b61;
  font-style: normal;
  font-weight: 800;
}

.speech-project-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-top: 16px;
}

.speech-project-toolbar strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.speech-step-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #dce7e3;
}

.speech-step-progress span {
  display: block;
  height: 100%;
  background: #0f766e;
  transition: width 180ms ease;
}

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

.speech-direction-grid button,
.speech-topic-grid button {
  min-height: 92px;
  padding: 14px;
  border: 1px solid #aebfba;
  border-radius: 8px;
  background: #ffffff;
  color: #17312a;
  cursor: pointer;
  text-align: left;
}

.speech-direction-grid strong {
  display: block;
  font-size: 20px;
}

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

.speech-topic-grid button {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 170px;
}

.speech-topic-grid button:nth-child(1) {
  border-top: 4px solid #0f766e;
}

.speech-topic-grid button:nth-child(2) {
  border-top: 4px solid #b7791f;
}

.speech-topic-grid button:nth-child(3) {
  border-top: 4px solid #3157a4;
}

.speech-topic-grid span {
  color: #65716d;
  font-size: 13px;
  font-weight: 800;
}

.speech-topic-grid strong {
  font-size: 20px;
  line-height: 1.35;
}

.speech-topic-grid small {
  color: #56625e;
  font-size: 15px;
  line-height: 1.5;
}

/* Phase 63: age-adaptive speech focus funnel and live clue board. */
.speech-focus-stage {
  display: grid;
  gap: 18px;
}

.speech-focus-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 0 14px;
  border-bottom: 1px solid #d8e3df;
}

.speech-focus-heading > div {
  display: grid;
  gap: 6px;
}

.speech-focus-heading span {
  color: #176b61;
  font-size: 15px;
  font-weight: 800;
}

.speech-focus-heading h4 {
  margin: 0;
  font-size: 25px;
  line-height: 1.35;
}

.speech-focus-heading p {
  margin: 0;
  color: #56625e;
  font-size: 16px;
}

.speech-focus-heading em {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #9fb9b1;
  border-radius: 5px;
  background: #edf7f4;
  color: #176b61;
  font-style: normal;
  font-weight: 800;
}

.speech-focus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: 20px;
  align-items: start;
}

.speech-focus-form {
  display: grid;
  gap: 14px;
}

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

.speech-focus-options label {
  position: relative;
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 62px;
  padding: 11px 13px;
  border: 2px solid #c4d2cd;
  border-radius: 7px;
  background: #ffffff;
  color: #1d302a;
  cursor: pointer;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  touch-action: manipulation;
}

.speech-focus-options label.selected {
  border-color: #0f766e;
  background: #eaf6f3;
  box-shadow: inset 4px 0 #0f766e;
}

.speech-focus-options input {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  accent-color: #0f766e;
}

.speech-focus-limit {
  color: #65716d;
}

.speech-focus-note {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.speech-focus-note textarea {
  min-height: 96px;
  font-size: 17px;
  font-weight: 500;
}

.speech-sentence-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
}

.speech-sentence-starters > span {
  width: 100%;
  color: #56625e;
}

.speech-sentence-starters button {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #aebfba;
  border-radius: 5px;
  background: #f7faf9;
  color: #245d53;
  cursor: pointer;
}

.speech-focus-help-tools {
  display: grid;
  grid-template-columns: auto minmax(210px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border-left: 4px solid #3157a4;
  background: #f2f6fc;
}

.speech-help-main {
  min-height: 50px;
  padding: 10px 15px;
  border: 0;
  border-radius: 6px;
  background: #3157a4;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 850;
}

.speech-focus-help-tools label {
  display: grid;
  gap: 5px;
  color: #4a5d76;
  font-size: 13px;
  font-weight: 800;
}

.speech-focus-help-tools select {
  min-height: 48px;
  background: #ffffff;
  font-size: 15px;
}

.speech-focus-help-result {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border-left: 4px solid #b7791f;
  background: #fff8e8;
  color: #593f0d;
}

.speech-focus-help-result p,
.speech-focus-help-result small {
  margin: 0;
  line-height: 1.55;
}

.speech-clue-board {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 10px;
  padding: 15px;
  border-top: 4px solid #b7791f;
  background: #fffaf0;
}

.speech-clue-board > strong {
  font-size: 20px;
}

.speech-clue-board > p {
  margin: 0;
  color: #675c47;
}

.speech-clue-board ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.speech-clue-board li {
  display: grid;
  gap: 3px;
  padding-top: 9px;
  border-top: 1px solid #e8dcc4;
}

.speech-clue-board li span {
  color: #8a651f;
  font-size: 13px;
  font-weight: 800;
}

.speech-clue-board li b {
  color: #312b20;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.speech-custom-topic,
.speech-interview-stage form,
.speech-core-stage,
.speech-teacher-notes form {
  display: grid;
  gap: 12px;
}

.speech-custom-topic {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.speech-custom-topic input,
.speech-interview-stage textarea,
.speech-core-stage input,
.speech-core-stage textarea,
.speech-teacher-notes textarea {
  margin-top: 7px;
}

.speech-stage-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.speech-stage-actions span {
  color: #65716d;
}

.speech-warning,
.speech-attention-stage {
  padding: 14px 16px;
  border-left: 4px solid #b7791f;
  background: #fff8e8;
  color: #654b12;
}

.speech-attention-stage {
  margin-top: 18px;
  border-left-color: #b42318;
  background: #fff2f0;
  color: #7a271a;
}

.speech-attention-stage strong {
  font-size: 22px;
}

.speech-card-sections {
  display: grid;
  gap: 8px;
}

.speech-card-sections section {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #dce6e2;
}

.speech-card-sections section > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #176b61;
  color: #ffffff;
  font-weight: 900;
}

.speech-card-sections section div {
  display: grid;
  gap: 7px;
}

.speech-card-sections section strong {
  font-size: 19px;
}

.speech-card-sections p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.speech-card-sections b {
  padding: 5px 8px;
  border-radius: 4px;
  background: #e8f3ef;
  color: #145a51;
}

.speech-card-sections small {
  color: #65716d;
  font-size: 14px;
}

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

.speech-difficulty-actions button,
.speech-practice-tasks button {
  min-height: 48px;
  border: 1px solid #aebfba;
  border-radius: 6px;
  background: #ffffff;
  color: #17312a;
  cursor: pointer;
  font-weight: 800;
}

.speech-feedback-result {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border-left: 4px solid #25855b;
  background: #eef8f2;
  color: #174d35;
}

.speech-feedback-result.needs-support {
  border-left-color: #b7791f;
  background: #fff8e8;
  color: #654b12;
}

.speech-feedback-result.mastered {
  border-left-color: #3157a4;
  background: #f2f5fb;
  color: #1f3f75;
}

.speech-deep-stage {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.speech-deep-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #f2f5fb;
  border-left: 4px solid #3157a4;
}

.speech-deep-summary div {
  display: grid;
  gap: 4px;
}

.speech-deep-summary strong {
  font-size: 20px;
}

.speech-deep-summary span {
  color: #566477;
}

.speech-deep-summary em {
  color: #3157a4;
  font-size: 21px;
  font-style: normal;
  font-weight: 900;
}

.speech-deep-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #dfe6f2;
}

.speech-deep-progress span {
  display: block;
  height: 100%;
  background: #3157a4;
  transition: width 180ms ease;
}

.speech-deep-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.speech-deep-timeline div {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 10px;
  border: 1px solid #cbd5e4;
  border-radius: 6px;
  background: #ffffff;
}

.speech-deep-timeline div.active {
  border-color: #3157a4;
  background: #edf2fb;
}

.speech-deep-timeline div.done {
  border-color: #25855b;
  background: #eef8f2;
}

.speech-deep-timeline span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #dfe6f2;
  color: #31425c;
  font-weight: 900;
}

.speech-deep-timeline small {
  color: #65716d;
}

.speech-deep-question {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid #b7c5dc;
  border-radius: 7px;
  background: #f8faff;
}

.speech-deep-question > span {
  color: #3157a4;
  font-weight: 900;
}

.speech-deep-question > strong {
  font-size: 22px;
  line-height: 1.5;
}

.speech-deep-question textarea {
  margin-top: 8px;
  min-height: 180px;
}

.speech-deep-generate {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
  border-left: 4px solid #3157a4;
  background: #f2f5fb;
}

.speech-deep-generate strong {
  font-size: 21px;
}

.speech-deep-outline,
.speech-deep-draft,
.speech-deep-paragraphs {
  display: grid;
  gap: 10px;
}

.speech-deep-outline section,
.speech-deep-paragraphs section {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #d4dde9;
  border-radius: 6px;
  background: #ffffff;
}

.speech-deep-outline section > span,
.speech-deep-paragraphs section > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3157a4;
  color: #ffffff;
  font-weight: 900;
}

.speech-deep-outline section div,
.speech-deep-paragraphs section div {
  display: grid;
  gap: 6px;
}

.speech-deep-outline p,
.speech-deep-outline small,
.speech-deep-paragraphs p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
}

.speech-deep-outline small {
  color: #65716d;
}

.speech-coaching-steps {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-left: 4px solid #b7791f;
  background: #fff8e8;
}

.speech-coaching-steps p {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.speech-coaching-steps p span {
  font-weight: 900;
}

.speech-reference {
  padding: 14px;
  border-left: 4px solid #3157a4;
  background: #f2f5fb;
}

.speech-reference pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.7;
}

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

.speech-practice-tasks button {
  display: grid;
  gap: 6px;
  min-height: 102px;
  padding: 12px;
  text-align: left;
}

.speech-practice-tasks button.completed {
  border-color: #25855b;
  background: #eef8f2;
  color: #17633f;
}

.speech-practice-tasks span,
.speech-practice-tasks small {
  color: #65716d;
}

.speech-teacher-notes {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #d8e3df;
}

.speech-teacher-notes p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  background: #f3f7f5;
}

@media (max-width: 900px) {
  .speech-direction-grid,
  .speech-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .speech-progress-row {
    grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr) auto;
  }

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

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

  .speech-clue-board {
    position: static;
  }
}

@media (max-width: 620px) {
  .pi-keypad-stage {
    grid-template-columns: 1fr;
  }

  .pi-keypad-stage > div {
    min-height: 82px;
  }

  .pi-keypad-output {
    min-height: 118px;
    font-size: 21px;
  }

  .achievement-banner strong {
    font-size: 20px;
  }

  .speech-direction-grid,
  .speech-topic-grid,
  .speech-practice-tasks,
  .speech-difficulty-actions,
  .speech-mode-grid,
  .speech-deep-timeline {
    grid-template-columns: 1fr;
  }

  .speech-deep-timeline div {
    min-height: 0;
  }

  .speech-deep-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .speech-direction-grid button {
    min-height: 66px;
  }

  .speech-topic-grid button {
    min-height: 132px;
  }

  .speech-custom-topic,
  .speech-progress-row {
    grid-template-columns: 1fr;
  }

  .speech-project-toolbar {
    grid-template-columns: auto 1fr;
  }

  .speech-project-toolbar strong {
    grid-column: 1 / -1;
    text-align: left;
  }

  .speech-stage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .speech-focus-heading {
    flex-direction: column;
  }

  .speech-focus-heading h4 {
    font-size: 22px;
  }

  .speech-focus-options,
  .speech-focus-help-tools {
    grid-template-columns: 1fr;
  }

  .speech-focus-options label {
    min-height: 58px;
    font-size: 17px;
  }

  .speech-help-main {
    width: 100%;
  }

  .speech-stage-actions button,
  .speech-custom-topic button,
  .speech-start-stage > .primary {
    width: 100%;
  }
}

/* Personality exploration: a private reflection tool, never a competitive score surface. */
.personality-panel {
  --personality-ink: #17312d;
  --personality-muted: #65746f;
  border-top: 6px solid #1d7a6d;
  color: var(--personality-ink);
}

.personality-legal-note,
.personality-result-heading,
.personality-progress-row,
.personality-question-actions,
.personality-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.personality-legal-note {
  padding: 10px 14px;
  border: 1px solid #b9d9d2;
  border-radius: 6px;
  background: #edf8f5;
  color: #28574f;
}

.personality-legal-note span,
.personality-progress-row span,
.personality-question-actions span,
.personality-result-heading p,
.personality-dimension-preview span,
.personality-result-grid p,
.personality-privacy-card p {
  color: var(--personality-muted);
}

.personality-intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 28px;
}

.personality-intro-copy h3,
.personality-result-heading h3 {
  margin: 8px 0 12px;
  font-size: 30px;
}

.personality-intro-copy > p {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.75;
}

.personality-kicker {
  color: #1d7a6d;
  font-size: 14px;
  font-weight: 800;
}

.personality-boundaries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.personality-boundaries span {
  padding: 8px 11px;
  border: 1px solid #c9d9d5;
  border-radius: 6px;
  background: #f8fbfa;
  color: #355650;
  font-weight: 700;
}

.personality-start-button {
  min-width: 180px;
  min-height: 50px;
  font-size: 18px;
}

.personality-dimension-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.personality-dimension-preview div {
  min-height: 112px;
  padding: 16px;
  border: 1px solid #d6e2df;
  border-top: 4px solid var(--dimension-accent);
  border-radius: 6px;
  background: #fff;
}

.personality-dimension-preview strong,
.personality-dimension-preview span {
  display: block;
}

.personality-dimension-preview strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.personality-dimension-preview span {
  line-height: 1.55;
}

.personality-disclaimer {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid #d9e3e0;
  color: #6f7e79;
  font-size: 14px;
}

.personality-progress-row {
  margin: 20px 0;
}

.personality-progress-row > div:first-child {
  display: grid;
  min-width: 150px;
  gap: 3px;
}

.personality-progress-track,
.personality-score-track {
  overflow: hidden;
  height: 10px;
  border-radius: 5px;
  background: #e5eeeb;
}

.personality-progress-track {
  flex: 1;
}

.personality-progress-track i,
.personality-score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1d7a6d;
  transition: width 180ms ease;
}

.personality-question-card {
  padding: 26px;
  border: 1px solid #c9d9d5;
  border-radius: 8px;
  background: #fbfdfc;
}

.personality-question-card > p {
  margin: 0;
  color: #71807b;
}

.personality-question-card h3 {
  margin: 18px 0 24px;
  font-size: 28px;
  line-height: 1.45;
  text-align: center;
}

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

.personality-answer {
  display: grid;
  min-height: 92px;
  padding: 12px 8px;
  border: 2px solid #d3dfdc;
  border-radius: 8px;
  background: #fff;
  color: #27433e;
  place-items: center;
}

.personality-answer:hover,
.personality-answer.selected {
  border-color: #1d7a6d;
  background: #eaf7f4;
}

.personality-answer span {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e9f1ef;
  font-weight: 900;
  place-items: center;
}

.personality-answer strong {
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}

.personality-question-actions {
  margin-top: 18px;
}

.personality-question-actions .danger {
  color: #a13d45;
}

.personality-result-heading {
  margin: 24px 0;
}

.personality-result-heading p {
  margin: 0;
}

.personality-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.personality-result-grid > section {
  padding: 20px;
  border: 1px solid #d6e2df;
  border-top: 5px solid var(--dimension-accent);
  border-radius: 8px;
  background: #fff;
}

.personality-result-title strong,
.personality-result-title span {
  display: block;
}

.personality-result-title strong {
  font-size: 21px;
}

.personality-result-title span {
  margin-top: 3px;
  color: #65746f;
}

.personality-result-title em {
  color: var(--dimension-accent);
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

.personality-score-track {
  margin: 14px 0;
}

.personality-score-track i {
  background: var(--dimension-accent);
}

.personality-practice,
.personality-privacy-card {
  padding: 12px 14px;
  border-radius: 6px;
  background: #f3f7f5;
}

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

.personality-practice span {
  margin-top: 5px;
  line-height: 1.55;
}

.personality-privacy-card {
  margin-top: 16px;
}

.personality-privacy-card p {
  margin: 6px 0 0;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .personality-intro-panel,
  .personality-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .personality-intro-copy h3,
  .personality-result-heading h3 {
    font-size: 24px;
  }

  .personality-dimension-preview {
    grid-template-columns: 1fr 1fr;
  }

  .personality-dimension-preview div {
    min-height: 104px;
    padding: 13px;
  }

  .personality-question-card {
    padding: 18px 12px;
  }

  .personality-question-card h3 {
    font-size: 23px;
  }

  .personality-answer-grid {
    grid-template-columns: 1fr;
  }

  .personality-answer {
    display: grid;
    grid-template-columns: 36px 1fr;
    min-height: 54px;
    padding: 8px 12px;
    place-items: center start;
  }

  .personality-answer strong {
    font-size: 17px;
    text-align: left;
  }

  .personality-legal-note,
  .personality-result-heading,
  .personality-question-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .personality-question-actions button,
  .personality-result-heading button {
    width: 100%;
  }
}

/* Training-first workspaces: frequent actions stay near the top, supporting data opens on demand. */
.management-data-section {
  min-width: 0;
}

.workspace > .workspace-disclosure {
  margin-bottom: 12px;
}

.workspace-disclosure {
  min-width: 0;
}

.workspace-disclosure > summary {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid #5b7f77;
  border-radius: 8px;
  background: #fcfdfc;
  box-shadow: 0 7px 22px rgba(23, 34, 31, 0.05);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.workspace-disclosure > summary:hover,
.workspace-disclosure > summary:focus-visible,
.workspace-disclosure[open] > summary {
  border-color: #9bb8b1;
  border-left-color: var(--teal);
  background: #f5fbf9;
  outline: none;
}

.workspace-disclosure > summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 107, 97, 0.16);
}

.workspace-disclosure-heading {
  min-width: 0;
}

.workspace-disclosure-heading strong,
.workspace-disclosure-heading small {
  display: block;
  letter-spacing: 0;
}

.workspace-disclosure-heading strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.workspace-disclosure-heading small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.workspace-disclosure-action {
  display: inline-flex;
  min-width: 78px;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
}

.workspace-disclosure-action::before {
  content: "展开";
}

.workspace-disclosure[open] .workspace-disclosure-action::before {
  content: "收起";
}

.workspace-disclosure-action i {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.workspace-disclosure[open] .workspace-disclosure-action i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.workspace-disclosure-content {
  min-width: 0;
  margin-top: 10px;
}

.workspace-disclosure:not([open]) > .workspace-disclosure-content {
  display: none;
}

.workspace-disclosure-content > .panel,
.workspace-disclosure-content > .grid,
.workspace-disclosure-content > .management-dashboard-stack {
  margin-bottom: 12px;
}

.workspace-disclosure-content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 620px) {
  .workspace > .workspace-disclosure {
    margin-bottom: 9px;
  }

  .workspace-disclosure > summary {
    min-height: 64px;
    gap: 10px;
    padding: 10px 12px;
  }

  .workspace-disclosure-heading strong {
    font-size: 17px;
  }

  .workspace-disclosure-heading small {
    font-size: 12px;
  }

  .workspace-disclosure-action {
    min-width: 58px;
    min-height: 44px;
    gap: 7px;
    font-size: 13px;
  }

  .workspace-disclosure-content {
    margin-top: 8px;
  }
}
