:root {
  color-scheme: light;
  --cloud: #f5f4ef;
  --paper: #fffefa;
  --ink: #302b35;
  --muted: #77717d;
  --line: #e8e3e8;
  --lilac: #d8cbee;
  --lavender: #bfa9df;
  --ameo-wash: #f7f3fa;
  --ameo-wash-border: #eee8f3;
  --ameo-button-wash: #eadcf6;
  --ameo-button-border: #d9c2eb;
  --peach: #f5d2b7;
  --sage: #d8e2d2;
  --blue: #d4e1ed;
  --plum: #574563;
  --plum-dark: #40334a;
  --danger: #a8424d;
  --shadow: 0 12px 38px rgba(74, 61, 83, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cloud);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--cloud); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(191, 169, 223, .55); outline-offset: 2px; }
[hidden] { display: none !important; }

.page-shell { width: min(100% - 32px, 1200px); margin: 0 auto; padding: 22px 0 38px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--plum); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 13px; }
.brand b { color: var(--ink); font-weight: 650; }
.quiet-button { border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px; background: var(--paper); color: var(--plum); font-size: 14px; font-weight: 650; }
.danger-button { border: 1px solid #e6b8bd; border-radius: 999px; padding: 9px 14px; color: var(--danger); background: #fff5f5; font-size: 13px; font-weight: 700; }
.danger-button:hover { border-color: #d88d96; background: #ffeded; }
.danger-button:disabled { cursor: wait; opacity: .65; }
.navigation-button { border-color: var(--ameo-button-border); background: var(--ameo-button-wash); color: var(--plum-dark); box-shadow: 0 2px 0 rgba(87, 69, 99, .08); transition: background .15s, border-color .15s, transform .15s; }
.navigation-button:hover { border-color: #c9a9e2; background: #e1ccef; transform: translateY(-1px); }
.navigation-button:active { transform: translateY(0); }

.hero { margin: 6px 0 22px; }
.eyebrow { margin: 0 0 7px; color: #806b91; font-size: 13px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: clamp(28px, 5vw, 40px); line-height: 1.12; letter-spacing: -.04em; font-weight: 690; }
h2 { margin-bottom: 8px; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; }
h3 { margin-bottom: 7px; font-size: 17px; line-height: 1.3; }
.muted { color: var(--muted); line-height: 1.6; }

.card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: var(--paper); box-shadow: var(--shadow); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); gap: 18px; align-items: stretch; }
.login-intro { padding: clamp(24px, 6vw, 48px); background: linear-gradient(145deg, #fffefa 5%, #f4eff9 100%); }
.login-intro p { max-width: 430px; margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.login-form { display: grid; align-content: center; gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field label { color: #5f5965; font-size: 14px; font-weight: 650; }
.form-field input { width: 100%; height: 48px; border: 1px solid #e5e0e7; border-radius: 11px; padding: 0 13px; color: var(--ink); background: #fff; }
.form-field input::placeholder { color: #99929e; }
.primary-button { min-height: 48px; border: 0; border-radius: 12px; padding: 11px 16px; color: #fff; background: var(--plum); font-weight: 750; transition: background .15s, transform .15s; }
.primary-button:hover { background: var(--plum-dark); transform: translateY(-1px); }
.form-error { min-height: 20px; margin: 0; color: var(--danger); font-size: 14px; }
.turnstile-box { min-height: 66px; display: grid; align-items: center; justify-content: start; overflow: hidden; }

.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.subject-card { min-height: 184px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.subject-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: var(--plum); background: var(--lilac); font-weight: 800; }
.subject-card:nth-child(2) .subject-mark { background: var(--peach); }
.subject-card:nth-child(3) .subject-mark { background: var(--sage); }
.subject-card .muted { margin-bottom: 0; font-size: 14px; }
.subject-card .primary-button { margin-top: auto; width: 100%; }
.student-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.student-tools h2, .student-tools p { margin-bottom: 4px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 14px; }
.admin-requests { display: grid; gap: 10px; margin-bottom: 14px; }
.admin-request-list { display: grid; gap: 9px; }
.admin-request-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: #fff; }
.admin-request-info { display: grid; gap: 5px; min-width: 0; }
.admin-request-info small, .admin-request-status { color: var(--muted); font-size: 13px; }
.admin-request-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-request-actions .primary-button { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.admin-request-actions .quiet-button { padding: 8px 12px; }
.admin-request-actions button:disabled { cursor: wait; opacity: .65; }
.list { display: grid; gap: 9px; margin: 14px 0 0; padding: 0; list-style: none; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.list-item > div { display: grid; gap: 4px; min-width: 0; }
.list-item small { color: var(--muted); font-size: 13px; }
.attempt-list .list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.attempt-list .attempt-detail-panel { grid-column: 1 / -1; min-width: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.attempt-answer-list { display: grid; gap: 9px; }
.attempt-answer-card { display: grid; gap: 7px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.attempt-answer-card p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.attempt-answer-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.attempt-answer-status { border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 750; }
.attempt-answer-status.is-correct { color: #28633e; background: #e8f4eb; }
.attempt-answer-status.is-wrong { color: #963943; background: #fff0f0; }
.attempt-answer-meta, .attempt-answer-card .muted { color: var(--muted); font-size: 13px; }
.attempt-answer-options { display: grid; gap: 5px; margin: 0; padding-left: 22px; font-size: 13px; }
.attempt-answer-options .is-correct-option { color: #28633e; font-weight: 700; }
.attempt-answer-options .is-selected-option { color: var(--plum); font-weight: 700; }
.attempt-answer-solution { border-radius: 9px; padding: 9px 10px; color: #5d5662; background: #f6f2f8; font-size: 13px; }
.grade-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 12px; }
.grade-picker label { color: #5f5965; font-size: 14px; font-weight: 650; }
.grade-access { display: grid; gap: 9px; min-width: 190px; }
.grade-access summary { color: var(--plum); cursor: pointer; font-size: 14px; font-weight: 650; }
.grade-access-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.grade-option { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.grade-option input { margin: 0; accent-color: var(--plum); }
.grade-access-message { min-height: 16px; color: var(--muted); }
.grade-access .quiet-button { justify-self: start; }
.student-account-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.quota-editor { display: grid; gap: 6px; min-width: 132px; }
.quota-editor label { color: #5f5965; font-size: 12px; font-weight: 650; }
.quota-editor .student-selector { width: 100%; }
.parent-management { margin-bottom: 1.25rem; }
.parent-workspace, .parent-tab-panel, .parent-tab-panel > .content-grid { min-width: 0; width: 100%; }
.parent-workspace { display: grid; gap: 12px; }
.parent-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 2px; }
.parent-tab { min-width: 0; min-height: 54px; border: 1px solid var(--plum); border-radius: 14px; padding: 12px 18px; color: #fff; background: var(--plum); box-shadow: 0 2px 0 rgba(87,69,99,.08); font-size: 16px; font-weight: 750; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.parent-tab:hover { border-color: var(--plum-dark); color: #fff; background: var(--plum-dark); transform: translateY(-1px); }
.parent-tab.is-active { border-color: var(--plum-dark); color: #fff; background: var(--plum); box-shadow: 0 4px 12px rgba(87,69,99,.2), inset 0 0 0 1px rgba(255,255,255,.16); }
.parent-tab.is-active:hover { border-color: var(--plum-dark); background: var(--plum-dark); }
.parent-tab-panel { display: grid; gap: 14px; }
.parent-tab-panel > .report-card, .parent-tab-panel > .content-grid { margin-top: 0; }
.parent-tab-panel .content-grid { grid-template-columns: minmax(0, 1fr); }
.account-card { display: grid; gap: 8px; }
.account-card > p { margin-bottom: 0; }
.account-form { width: 100%; max-width: none; }
.secondary-password-reset { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.secondary-password-reset label { display: grid; gap: 6px; color: #5f5965; font-size: 13px; font-weight: 650; }
.secondary-password-reset input { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; background: #fff; }
.secondary-password-reset small { grid-column: 1 / -1; }
.student-pin-list { display: grid; gap: 9px; }
.student-pin-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(170px, .8fr) auto auto; align-items: end; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.student-pin-info { display: grid; gap: 4px; align-self: center; }
.student-pin-info small { color: var(--muted); }
.student-pin-field { gap: 5px; }
.student-pin-field label { font-size: 12px; }
.student-pin-field input { height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; }
.donation-card { margin-top: 16px; border-color: var(--ameo-wash-border); background: linear-gradient(135deg, #fffefa, var(--ameo-wash)); }
.donation-card > p { margin-bottom: 0; }
.donation-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 240px)); justify-content: center; gap: 12px; margin-top: 16px; }
.donation-tier { display: flex; min-width: 0; min-height: 72px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--ameo-button-border); border-radius: 14px; padding: 12px 14px; color: var(--plum-dark); background: #fff; box-shadow: 0 2px 0 rgba(87,69,99,.06); font-weight: 650; text-align: center; transition: background .15s, border-color .15s, transform .15s; }
.donation-tier:hover { border-color: #c9a9e2; background: var(--ameo-button-wash); transform: translateY(-1px); }
.donation-tier strong { color: var(--plum); font-size: 18px; }
.donation-dialog { width: min(430px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 18px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: 0 28px 90px rgba(44,35,50,.24); }
.donation-dialog::backdrop { background: rgba(44,36,51,.42); backdrop-filter: blur(3px); }
.secondary-parent-form { margin: 1rem 0 1.5rem; }
.secondary-parent-list { display: grid; gap: 1rem; }
.secondary-parent-row {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid var(--line, #e8e0ec);
  border-radius: 1rem;
  background: var(--surface, #fffefa);
}
.secondary-parent-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.parent-student-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .45rem; }
.secondary-parent-row > button { justify-self: start; }
.student-form { display: grid; gap: 12px; margin-top: 14px; }
.student-form .primary-button { width: 100%; }
.empty-state { border: 1px dashed #d9d0df; border-radius: 14px; padding: 18px; color: var(--muted); background: rgba(255,255,255,.55); line-height: 1.55; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; color: #64576c; background: #ece8f0; font-size: 13px; font-weight: 650; }
.loading-card { min-height: 180px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loading-mark { width: 24px; height: 24px; border: 3px solid var(--lilac); border-top-color: var(--plum); border-radius: 50%; animation: spin .8s linear infinite; }
.page-footer { padding-top: 22px; color: #8e8792; text-align: center; font-size: 13px; }
.notice { margin: 0; border-radius: 11px; padding: 11px 13px; color: #5d5662; background: #f4f0f7; font-size: 14px; line-height: 1.5; }
.report-card { margin-top: 15px; }
.report-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.report-heading h2 { margin-bottom: 0; }
.analysis-controls { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.student-selector { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--ink); background: #fff; }
.analysis-output { margin-top: 14px; border: 1px solid #e7deec; border-radius: 13px; padding: 15px; background: linear-gradient(145deg, #fffefa, #f8f4fb); line-height: 1.6; }
.analysis-output p { margin: 6px 0; color: #5d5662; }
.analysis-pattern { margin-top: 10px; border-top: 1px solid rgba(120, 105, 130, .16); padding-top: 10px; }
.analysis-note { margin-bottom: 0; font-size: 14px; }
.analysis-model { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; }
.vip-payment-card { margin-bottom: 14px; border-color: #e5dcec; background: linear-gradient(135deg, #fffefa, #f7f2fa); }
.vip-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.vip-actions .primary-button, .vip-actions .quiet-button { min-height: 44px; }
.vip-payment-dialog { width: min(430px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 18px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: 0 28px 90px rgba(44, 35, 50, .24); }
.vip-payment-dialog::backdrop { background: rgba(44, 36, 51, .42); backdrop-filter: blur(3px); }
.vip-payment-inner { display: grid; gap: 11px; padding: 20px; }
.vip-payment-inner .report-heading { margin: 0; }
.vip-payment-inner .report-heading h2 { margin: 0; }
.vip-payment-qr { display: block; width: min(270px, 100%); aspect-ratio: 1; justify-self: center; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.vip-payment-details { border-radius: 12px; padding: 11px 13px; background: #f5f1f8; }
.vip-payment-details p { margin: 3px 0; font-size: 14px; }
.vip-payment-details small { display: block; margin-top: 9px; line-height: 1.5; }
.admin-console { display: grid; gap: 14px; margin-bottom: 14px; }
.admin-settings-card { display: grid; gap: 9px; }
.admin-settings-card > p { margin-bottom: 0; }
.admin-settings-card .primary-button { justify-self: start; }
.admin-vip-card { display: grid; gap: 12px; }
.admin-vip-card .report-heading { margin-bottom: 0; }
.admin-vip-list { display: grid; gap: 9px; }
.admin-vip-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: #fff; }
.admin-vip-info { display: grid; gap: 5px; min-width: 0; }
.admin-vip-info small { color: var(--muted); }
.admin-vip-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.admin-vip-actions .primary-button, .admin-vip-actions .quiet-button, .admin-vip-actions .danger-button { min-height: 39px; padding: 7px 11px; font-size: 12px; }
.admin-cleanup-card { display: grid; gap: 10px; }
.admin-cleanup-card > p { margin-bottom: 0; }
.admin-cleanup-card .form-field { max-width: 320px; }
.admin-cleanup-card .quiet-button, .admin-cleanup-card .danger-button { justify-self: start; }
.cleanup-status { min-height: 22px; margin-bottom: 0; }
.stats-card { display: grid; gap: 12px; }
.stats-content { display: grid; gap: 12px; }
.stats-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stats-tile { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--ameo-wash-border); border-radius: 12px; background: var(--ameo-wash); }
.stats-tile small { color: var(--muted); font-size: 12px; }
.stats-tile strong { color: var(--plum); font-size: 20px; }
.stats-table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.stats-table th, .stats-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stats-table th { color: #75677e; font-weight: 700; }
.stats-topics-heading { margin: 4px 0 0; }
.stats-topics { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.stats-topic { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.stats-topic small { color: var(--muted); }
.stats-topic p { margin: 0; color: #675f6b; font-size: 13px; }
.parent-stats-card { margin-top: 14px; }
.knowledge-map { display: grid; gap: 14px; }
.knowledge-cycle { display: grid; gap: 12px; }
.knowledge-cycle > h2 { margin-bottom: 0; }
.knowledge-topic { border-top: 1px solid var(--line); padding-top: 12px; }
.knowledge-topic > h3 { color: var(--plum); }
.knowledge-lessons { display: grid; gap: 10px; }
.knowledge-lesson { border: 1px solid var(--ameo-wash-border); border-radius: 13px; padding: 13px; background: var(--ameo-wash); }
.knowledge-lesson-info { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.knowledge-lesson-info small, .cycle-test-card small { color: var(--muted); }
.knowledge-summary { margin-top: 8px; margin-bottom: 8px; font-size: 14px; }
.knowledge-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.knowledge-actions .quiet-button { background: #fffefa; }
.subject-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.cycle-tests { display: grid; gap: 12px; margin-top: 14px; }
.cycle-tests > h2, .cycle-tests > p { margin-bottom: 0; }
.cycle-test-card { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: #fff; }
.cycle-test-card > div { display: grid; gap: 5px; }
.cycle-test-card .primary-button { grid-column: 2; grid-row: 1 / span 2; }
.cycle-test-card .primary-button:disabled { cursor: not-allowed; color: #756f79; background: #e8e3e8; transform: none; }
.cycle-test-message { grid-column: 1 / -1; color: var(--danger) !important; }
.mistake-notebook { display: grid; gap: 14px; }
.mistake-list { display: grid; gap: 9px; }
.mistake-item { border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; background: #fff; }
.mistake-prompt { color: var(--ink); cursor: pointer; font-weight: 650; line-height: 1.5; }
.mistake-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.mistake-meta small, .mistake-item > small { color: var(--muted); }
.mistake-item > p { margin: 9px 0 0; color: #5d5662; line-height: 1.5; overflow-wrap: anywhere; }
.mistake-hint { display: block; margin-top: 8px; color: #806b91; }
.lesson-summary { margin-bottom: 14px; border-color: var(--ameo-wash-border); background: var(--ameo-wash); }
.lesson-points { display: grid; gap: 8px; margin: 12px 0 0; padding-left: 22px; line-height: 1.55; }
.quiz-form { display: grid; gap: 14px; border-color: var(--ameo-wash-border); background: var(--ameo-wash); }
.question-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.question-number { margin-bottom: 7px; color: #806b91; font-size: 13px; font-weight: 750; }
.question-prompt { margin-bottom: 13px; font-size: 17px; font-weight: 650; line-height: 1.45; }
.question-prompt-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.question-prompt-row .question-prompt { flex: 1; }
.speech-button { flex: 0 0 auto; border: 1px solid #e5dcec; border-radius: 999px; padding: 7px 11px; color: var(--plum); background: #f8f4fc; font-size: 13px; font-weight: 650; }
.speech-button:disabled { cursor: not-allowed; opacity: .6; }
.answer-input { width: 100%; max-width: 360px; height: 48px; border: 1px solid #e5e0e7; border-radius: 11px; padding: 0 13px; }
.answer-control { display: grid; gap: 8px; }
.choice-option { display: flex; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.question-actions { margin-top: 11px; }
.hint-button { border: 1px solid #e5dcec; border-radius: 999px; padding: 7px 12px; color: var(--plum); background: #f8f4fc; font-size: 14px; font-weight: 650; }
.hint-text { margin: 9px 0 0; border-radius: 10px; padding: 10px 12px; color: #62506f; background: #f4f0f7; line-height: 1.5; }
.solution-box { margin-top: 13px; border-left: 3px solid var(--peach); border-radius: 0 10px 10px 0; padding: 10px 12px; background: #fff8f2; line-height: 1.5; }
.solution-box.correct { border-left-color: #9daf97; background: #f3f7f0; }
.solution-box p { margin: 5px 0 0; color: #5d5662; }
.solution-box small { display: block; margin-top: 6px; color: #806b91; }
.submit-quiz { width: 100%; }
.ordered-words { min-height: 45px; border: 1px dashed #d9d0df; border-radius: 10px; padding: 12px; color: var(--muted); }
.word-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.word-chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--plum); background: #fffefa; }
.word-chip:disabled { cursor: default; color: #fff; border-color: var(--plum); background: var(--plum); opacity: .72; }
.selected-word { margin: 0 6px 5px 0; border: 1px solid #d9d0df; border-radius: 999px; padding: 5px 10px; color: var(--plum); background: #f4f0f7; }
.selected-word:hover { border-color: var(--danger); color: var(--danger); }
.reset-words { justify-self: start; }
.test-timer { margin-left: auto; border-radius: 999px; padding: 9px 14px; color: var(--plum); background: #ece8f0; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.setup-card { width: min(100%, 560px); margin: 28px auto; }
.setup-card .student-form { max-width: 420px; }
.advanced-button { width: 100%; margin-top: 8px; border-color: var(--ameo-wash-border); color: var(--plum); background: #fff; }
.advanced-access-message { display: block; margin-top: 7px; color: var(--danger); font-weight: 650; }
.advanced-access-toggle { display: flex; align-items: center; gap: 9px; width: fit-content; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; color: var(--ink); background: #fff; font-weight: 650; cursor: pointer; }
.advanced-access-toggle input { width: 18px; height: 18px; accent-color: var(--plum); }
.advanced-quota-editor { display: grid; justify-items: start; gap: 8px; width: 100%; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 10px; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 560px); padding-top: 14px; }
  .topbar { margin-bottom: 22px; }
  .login-layout, .content-grid { grid-template-columns: 1fr; }
  .login-intro { padding: 25px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .subject-card { min-height: 150px; }
  .card { padding: 18px; border-radius: 16px; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .list-item { align-items: flex-start; flex-direction: column; }
  .grade-access { width: 100%; }
  .student-account-actions { width: 100%; flex-direction: column; }
  .quota-editor { width: 100%; }
  .subject-header-actions { width: 100%; justify-content: flex-start; }
  .student-tools { align-items: flex-start; flex-direction: column; }
  .knowledge-lesson-info { align-items: flex-start; flex-direction: column; gap: 4px; }
  .admin-request-row { align-items: flex-start; flex-direction: column; }
  .admin-request-actions { width: 100%; }
  .admin-vip-row { align-items: flex-start; flex-direction: column; }
  .admin-vip-actions { width: 100%; }
  .stats-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vip-actions { flex-direction: column; align-items: stretch; }
  .vip-actions .primary-button, .vip-actions .quiet-button { width: 100%; }
  .cycle-test-card { grid-template-columns: 1fr; }
  .cycle-test-card .primary-button { grid-column: auto; grid-row: auto; }
  .question-prompt-row { flex-direction: column; }
  .test-timer { margin-left: 0; }
  .parent-tabs { width: 100%; gap: 8px; }
  .attempt-list .list-item { grid-template-columns: minmax(0, 1fr) auto; }
  .parent-tab { min-height: 48px; padding: 9px 8px; font-size: 14px; }
  .donation-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .donation-tier { min-height: 68px; padding: 9px 6px; font-size: 12px; }
  .donation-tier strong { font-size: 16px; }
  .student-pin-row { grid-template-columns: 1fr 1fr; align-items: end; }
  .student-pin-info { grid-column: 1 / -1; }
  .student-pin-row .danger-button { grid-column: 1 / -1; }
  .secondary-password-reset { grid-template-columns: 1fr; }
  .secondary-password-reset small { grid-column: auto; }
}
@media (min-width: 761px) and (max-width: 980px) {
  .student-pin-row { grid-template-columns: minmax(0, 1fr) minmax(150px, 1fr); }
  .student-pin-info { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
