:root {
  --ink: #16243a;
  --muted: #647184;
  --navy: #12345b;
  --blue: #1769aa;
  --teal: #087e76;
  --gold: #d8a631;
  --paper: #ffffff;
  --bg: #f3f6f8;
  --line: #d9e1e8;
  --danger: #a72c35;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(21, 48, 76, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.18; margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.035em; }
h2 { font-size: 1.45rem; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.page { min-height: calc(100vh - 155px); padding-block: 36px 64px; }
.site-header { background: var(--navy); color: #fff; border-bottom: 4px solid var(--gold); }
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--gold); color: var(--gold); font-weight: 800; letter-spacing: .08em; }
.brand small { display: block; color: #c7d3df; font-size: .75rem; }
nav { display: flex; align-items: center; gap: 20px; }
nav a, nav .link-button { color: #fff; text-decoration: none; }
.site-footer { padding: 24px 0; background: #e7edf2; color: var(--muted); font-size: .9rem; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin-bottom: 8px; }
.page-heading p { margin-bottom: 0; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.narrow { max-width: 640px; margin-inline: auto; }
.panel, .auth-card, .name-card, .answer-panel, .attempt-history { padding: clamp(22px, 4vw, 38px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { margin-top: 7vh; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.metrics article { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius); }
.metrics span { display: block; color: var(--muted); font-size: .85rem; }
.metrics strong { font-size: 2rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 18px; border: 1px solid var(--navy); border-radius: 7px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: #1a477a; }
.button-secondary { border-color: #a8b5c2; background: #fff; color: var(--navy); }
.button-secondary:hover { background: #eef3f6; }
.button-danger { background: var(--danger); border-color: var(--danger); }
.button.disabled { opacity: .55; cursor: not-allowed; }
.inline-form { display: inline; }
.link-button { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
.danger-link { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 7px 12px; font-size: .88rem; }
.stack-form { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 7px; font-weight: 700; font-size: .91rem; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #aab7c4; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(23, 105, 170, .18); border-color: var(--blue); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.field-error { color: var(--danger); }
.private-label { width: max-content; padding: 2px 7px; border-radius: 4px; background: #fff1cf; color: #77540b; font-size: .72rem; }
.alert { margin-bottom: 22px; padding: 14px 18px; border-left: 4px solid var(--blue); background: #e8f3fb; border-radius: 5px; }
.alert-success { border-color: var(--teal); background: #e7f6f3; }
.alert-error { border-color: var(--danger); background: #fff0f1; }
.alert-notice { border-color: var(--gold); background: #fff7df; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.block { display: block; margin-top: 4px; color: var(--muted); }
.tag, .status { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #eaf0f5; color: #46566b; font-size: .74rem; font-weight: 800; }
.tag-accent { background: #e2f4f1; color: #08736c; }
.status-published { background: #dff4e9; color: #176b45; }
.status-draft { background: #fff1cf; color: #77540b; }
.status-unpublished { background: #ececf1; color: #5d5d68; }
.empty-state { padding: 36px 18px; text-align: center; color: var(--muted); }
.student-hero { padding: 42px 0 36px; text-align: center; }
.student-hero h1 { margin-bottom: 8px; color: var(--navy); }
.lead { color: var(--muted); font-size: 1.2rem; }
.student-chip { display: inline-flex; gap: 10px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.name-card { margin-bottom: 36px; border-top: 4px solid var(--gold); }
.name-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.practice-section { margin-top: 20px; }
.muted-section .exercise-grid { opacity: .75; }
.filter-bar { display: grid; grid-template-columns: repeat(4, 1fr) auto auto; align-items: end; gap: 12px; margin-bottom: 24px; padding: 18px; background: #e7edf2; border-radius: 8px; }
.filter-bar.compact { grid-template-columns: minmax(220px, 1fr) auto auto; }
.exercise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.exercise-card { display: flex; flex-direction: column; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.exercise-card h3 { margin: 16px 0 8px; font-size: 1.25rem; }
.exercise-card .button { margin-top: auto; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.marks { color: var(--muted); font-size: .87rem; }
.preview-banner { margin-bottom: 22px; padding: 12px 16px; background: #fff2c9; border: 1px solid #e5c86f; border-radius: 7px; }
.practice-heading { max-width: 860px; margin: 0 auto 28px; }
.practice-heading h1 { margin: 14px 0; }
.back-link { display: inline-block; margin-bottom: 24px; }
.exhibit-panel, .requirement-panel, .submission-success, .ai-placeholder { max-width: 860px; margin: 0 auto 22px; padding: clamp(22px, 4vw, 38px); border-radius: var(--radius); }
.exhibit-panel { background: #e8f1f7; border-left: 5px solid var(--blue); }
.requirement-panel { background: var(--navy); color: #fff; }
.requirement-panel .eyebrow { color: #82d9d2; }
.requirement-panel h2 { margin-bottom: 0; font-size: 1.35rem; }
.submission-success { background: #e5f5ec; border: 1px solid #a6d9bd; }
.answer-panel, .attempt-history { max-width: 860px; margin: 0 auto 22px; }
.ai-placeholder { border: 2px dashed #acb8c3; background: transparent; text-align: center; color: var(--muted); }
.attempt-list { display: grid; gap: 14px; }
.attempt-card { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.attempt-card.latest { border-left: 4px solid var(--teal); }
.attempt-card h2, .attempt-card h3 { margin-bottom: 0; font-size: 1rem; }
.attempt-card time { color: var(--muted); font-size: .82rem; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.lecturer-attempts { margin-top: 22px; }
.progress-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; margin: 0 auto 22px; }
.progress-panel > div, .model-answer-panel, .audit-section { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.level-hero, .focus-card, .recommendation-card, .completion-progress { margin: 0 auto 22px; padding: clamp(24px, 4vw, 36px); border-radius: var(--radius); }
.level-hero { background: var(--navy); color: #fff; }
.level-hero .eyebrow { color: #82d9d2; }.level-hero h2 { margin: 6px 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.focus-card { background: #fff7df; border-left: 5px solid var(--gold); }
.recommendation-card { background: #e5f5ec; border: 1px solid #a6d9bd; }
.completion-progress { max-width: 860px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.compact-recommendation { max-width: 860px; }
.skill-profile { display: grid; gap: 10px; }
.skill-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(120px, auto); gap: 14px; align-items: center; padding: 14px 16px; background: #eef4f6; border-radius: 8px; }
.skill-row small { color: var(--muted); text-align: right; }.level-pill { color: var(--navy); }
.metrics.three { grid-template-columns: repeat(3, 1fr); }
.guidance-note { padding: 12px 15px; background: #eef4f6; border-radius: 7px; color: var(--muted); }
.verb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.verb-grid > div { display: grid; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.verb-grid span, .verb-grid small { color: var(--muted); }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }.two-column > * { margin: 0 0 22px; }
.history-filters { grid-template-columns: repeat(4, 1fr) auto auto; }
.status-improved { background: #dff4e9; color: #176b45; }.status-regressed { background: #fff0f1; color: var(--danger); }.status-stable, .status-completed { background: #eaf0f5; color: #46566b; }
.progress-changes { display: flex; flex-wrap: wrap; gap: 10px; }.progress-changes p { padding: 8px 12px; background: #e5f5ec; border-radius: 7px; }
.coaching-result { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.score-orb { display: grid; place-items: center; width: 88px; height: 88px; border: 5px solid var(--teal); border-radius: 50%; }
.score-orb strong { font-size: 1.8rem; line-height: 1; }.score-orb span { font-size: .7rem; color: var(--muted); }
.eir-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.dimension { display: grid; gap: 3px; padding: 13px; background: #eef4f6; border-radius: 7px; }
.dimension span { font-size: .72rem; color: var(--teal); font-weight: 800; text-transform: uppercase; }.dimension small { color: var(--muted); }
.coaching-hint { padding: 16px; border-left: 4px solid var(--gold); background: #fff7df; }.coaching-hint p:last-child { margin-bottom: 0; }
.coaching-state { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 16px; padding: 14px; background: #eef4f6; border-radius: 7px; }
.spinner { width: 25px; height: 25px; border: 3px solid #b8c7d1; border-top-color: var(--teal); border-radius: 50%; animation: spin 1s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.model-answer-panel { max-width: 860px; margin: 0 auto 22px; }.model-answer { padding: 20px; background: #eef4f6; border-radius: 7px; }
#auto-evaluate { max-width: 860px; margin: 0 auto 22px; text-align: center; }.audit-section { margin-bottom: 22px; }.json-audit { max-height: 440px; overflow: auto; padding: 16px; background: #101b29; color: #d9e7f5; border-radius: 7px; white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.review-card { margin-bottom: 1rem; }
.review-card h3 { margin: 1.15rem 0 .35rem; }
.review-notes, .regenerate-box { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: #eef4f6; }
.gap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.gap-grid article { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.check-label { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; }
.bulk-actions { position: sticky; bottom: 0; background: #fff; padding: .8rem; border-top: 1px solid var(--line); }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.button-danger { background: #7d2626; border-color: #7d2626; color: #fff; }

@media (max-width: 900px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .exercise-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .history-filters, .verb-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar .button { align-self: end; }
  .header-inner { align-items: flex-start; padding-block: 16px; }
  nav { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1180px); }
  .header-inner, .split { align-items: flex-start; flex-direction: column; }
  nav { gap: 12px; }
  .brand small { display: none; }
  .metrics, .metrics.three, .exercise-grid, .form-grid.two, .filter-bar, .filter-bar.compact, .name-form, .history-filters, .verb-grid, .two-column { grid-template-columns: 1fr; }
  .progress-panel, .eir-grid, .coaching-result { grid-template-columns: 1fr; }
  .skill-row { grid-template-columns: 1fr; }.skill-row small { text-align: left; }
  .page { padding-top: 24px; }
  .page-heading .button { width: 100%; }
  h1 { font-size: 2rem; }
}
.auth-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 auto 28px; max-width: 900px; }
.auth-card { margin: 0 auto; padding: clamp(24px, 5vw, 42px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.account-details { display: grid; grid-template-columns: minmax(120px, .4fr) 1fr; gap: 10px 20px; }
.account-details dt { color: var(--muted); font-weight: 700; }.account-details dd { margin: 0; overflow-wrap: anywhere; }
.privacy-note { margin: 20px auto; padding: 18px 20px; background: #eef4f6; border-radius: 10px; }
.access-link-panel { border-left: 5px solid var(--teal); }.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }.copy-row input { min-width: 0; }
.claim-card { border-left: 5px solid var(--gold); }.status-active { background: #dff4e9; color: #176b45; }.status-inactive { background: #fff0f1; color: var(--danger); }
@media (max-width: 620px) { .auth-choice, .copy-row, .account-details { grid-template-columns: 1fr; } .copy-row .button { width: 100%; } }
