:root {
  color-scheme: dark;
  --navy: #0a1427;
  --navy-dark: #101a2d;
  --navy-mid: #2c4267;
  --ink: #f0f4ff;
  --muted: #b9c5dc;
  --paper: #080d1b;
  --line: #384a6a;
  --accent: #afceff;
  --surface: #111b2e;
  --green: #91dbbd;
  --panel-padding: clamp(14px, 2.4vw, 26px);
  font-family: Geist, Inter, "Helvetica Neue", system-ui, sans-serif;
  font-synthesis: none;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
.test-environment { margin: 0; padding: 8px 16px; background: #ffda87; color: #2d210c; text-align: center; font-size: 13px; font-weight: 700; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
:focus-visible { outline: 3px solid #97cfff; outline-offset: 4px; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 10; padding: 10px; transform: translateY(-160%); background: var(--surface); }
.skip-link:focus { transform: none; }
.layout { display: grid; min-height: 100vh; grid-template-columns: 242px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 18px; max-width: 1760px; margin-inline: auto; padding: 20px clamp(16px, 2.5vw, 32px); }
.sidebar { align-self: start; position: sticky; top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--navy-dark); color: #ebf0f5; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: clamp(124px, 22vw, 156px); height: auto; }
#nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 7px; color: #bdcbd9; font-weight: 600; text-decoration: none; font-size: 13px; }
.nav-link:hover { background: #22334f; color: white; }
.nav-link[aria-current="page"] { color: white; background: #2b426a; box-shadow: inset 3px 0 var(--accent); }
.nav-link .symbol { color: var(--accent); }
.symbol { display: inline-grid; width: 22px; place-content: center; font-family: system-ui, sans-serif; font-size: 18px; line-height: 1; }
.workspace { min-width: 0; }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 62px; padding: 8px 17px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.topbar .brand { justify-self: start; }
#location { font-size: 13px; font-weight: 700; color: var(--muted); }
#account { display: flex; justify-self: end; gap: 10px; align-items: center; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #243654; color: var(--accent); font-size: 12px; font-weight: 750; }
.account-name { display: grid; gap: 1px; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.account-name small { color: var(--muted); font-size: 11px; }
.logout { font-size: 12px; padding: 5px 0 5px 12px; border-left: 1px solid var(--line); color: var(--muted); text-underline-offset: 2px; white-space: nowrap; }
main { max-width: 1480px; margin-inline: auto; padding: 0 0 28px; }
main:focus { outline: none; }
.loading { color: var(--muted); }
.hero { display: flex; align-items: center; min-height: 228px; padding: clamp(22px, 3.3vw, 42px); border: 1px solid #627fae; border-radius: 18px; background: radial-gradient(ellipse at right top, #1b3361, #0b1429 75%); color: white; }
.hero-inner { max-width: 510px; }
.hero h1 { font-size: clamp(31px, 4.2vw, 53px); }
.kicker { margin: 0 0 12px; color: var(--muted); font-weight: 750; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.hero .kicker { color: var(--accent); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(33px, 5vw, 60px); line-height: 1.02; letter-spacing: -.055em; margin-bottom: 14px; overflow-wrap: anywhere; }
h2 { font-size: clamp(23px, 2.8vw, 33px); letter-spacing: -.04em; margin-bottom: 8px; }
h3 { font-size: 20px; letter-spacing: -.035em; margin-bottom: 7px; }
h4 { font-size: 16px; margin-bottom: 7px; }
.hero p:not(.kicker) { color: #e0e8ee; max-width: 43ch; font-size: 15px; line-height: 1.6; margin-bottom: 19px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 41px; padding: 9px 14px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; line-height: 1.3; }
.button.primary { background: var(--accent); border-color: #a3c7ff; color: var(--navy); }
.button.primary:hover { background: #d7e7ff; }
.button.secondary { background: var(--surface); border-color: #526b93; color: var(--ink); }
.button.secondary:hover { background: #213450; }
.button.text-button { min-height: 34px; background: transparent; color: var(--ink); padding: 6px 8px; text-decoration: underline; text-underline-offset: 3px; }
.summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.metric { display: grid; gap: 3px; min-width: 0; padding: 14px clamp(10px, 2.4vw, 25px); }
.metric + .metric { border-left: 1px solid var(--line); }
.metric strong { color: var(--accent); font-size: 28px; letter-spacing: -.045em; }
.metric span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 15px; }
.section-head h2, .section-head p:last-child, .page-head p:last-child { margin-bottom: 0; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 49px); }
.page-head p:not(.kicker), .section-head p:not(.kicker), .muted { color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.course-card, .panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.course-card { display: flex; flex-direction: column; padding: 18px; }
.course-card h3, .card-intro { overflow-wrap: anywhere; }
.course-card .card-intro { color: var(--muted); margin-bottom: 16px; font-size: 13px; line-height: 1.55; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 5px; margin-bottom: 12px; }
.course-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 7px; background: #223754; color: #bad6ff; font-size: 21px; font-weight: 750; }
.tag { display: inline-flex; padding: 4px 7px; background: #24334c; color: #d5e2f6; border-radius: 5px; font-size: 10px; font-weight: 700; line-height: 1.3; }
.tag.done { background: #1a342f; color: var(--green); }
.tag.started { background: #223754; color: #bad6ff; }
.category { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .095em; margin-bottom: 6px; }
.card-progress { margin-top: auto; }
.progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.progress-copy strong { color: var(--ink); }
progress { display: block; height: 6px; width: 100%; appearance: none; border: none; border-radius: 9px; overflow: hidden; background: #26354f; color: var(--accent); }
progress::-webkit-progress-bar { background: #26354f; }
progress::-webkit-progress-value { background: #82baff; border-radius: 9px; }
progress::-moz-progress-bar { background: #82baff; border-radius: 9px; }
.card-footer { display: grid; align-items: center; gap: 4px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.back-link { color: var(--ink); font-weight: 750; font-size: 13px; text-underline-offset: 3px; }
.back-link { display: inline-block; margin-bottom: 18px; }
.panel { padding: var(--panel-padding); }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 14px; align-items: start; }
.lesson-text { white-space: pre-wrap; line-height: 1.72; overflow-wrap: anywhere; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { display: grid; gap: 6px; grid-template-columns: 1fr auto; align-items: start; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.lesson-list a { font-weight: 700; text-underline-offset: 3px; }
.lesson-list a[aria-current="page"] { color: #b5d4ff; }
.lesson-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.notice { margin: 14px 0; padding: 12px 14px; background: #1a342f; color: var(--green); border-radius: 7px; font-size: 13px; }
.notice:empty { display: none; }
.notice.error { background: #3d242f; color: #ffc0c6; }
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 14px; }
.search label { flex: 1 1 220px; max-width: 420px; }
label { display: grid; gap: 5px; color: var(--ink); font-weight: 650; font-size: 13px; }
input, select, textarea { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid #536a8e; border-radius: 6px; color: var(--ink); background: var(--surface); font-size: 14px; }
textarea { min-height: 110px; resize: vertical; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.check { display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); background: #192741; font-size: 12px; }
td progress { min-width: 92px; margin-top: 4px; }
td a { display: inline-block; font-weight: 750; text-underline-offset: 2px; }
td small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 13px; }
.learner-details { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.editor-form { display: grid; gap: 12px; }
.editor-form .button { justify-self: start; }
.management-list { display: grid; gap: 7px; margin-top: 18px; }
details.editor { border: 1px solid var(--line); border-radius: 7px; padding: 10px; min-width: 0; }
details.editor > summary { font-size: 13px; cursor: pointer; font-weight: 750; overflow-wrap: anywhere; }
details.editor[open] > summary { margin-bottom: 12px; }
.lesson-editors { margin-top: 14px; }
.management-search { margin: 20px 0 0; }
.empty { color: var(--muted); margin: 10px 0 0; }
.entry { max-width: 560px; margin: 7vh auto 0; }
.entry p { line-height: 1.6; }
@media (max-width: 1080px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .layout { gap: 11px; padding: 12px; }
  .sidebar { position: static; padding: 8px; }
  #nav { display: flex; flex-wrap: wrap; }
  .nav-link { padding: 8px 9px; gap: 5px; }
  .topbar { min-height: 55px; grid-template-columns: 1fr auto; }
  #location { display: none; }
  .hero { min-height: 245px; }
  .lesson-layout, .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 490px) {
  .account-name { display: none; }
  .topbar { padding-inline: 15px; }
  .hero { padding: 25px 18px; }
  .course-grid, .learner-details { grid-template-columns: 1fr; }
  .metric strong { font-size: 20px; }
  .metric span { font-size: 11px; }
}

.account-name { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; }
.account-name:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.logout { border: 0; border-left: 1px solid var(--line); background: transparent; }
.logout:hover { color: var(--ink); text-decoration: underline; }
.account-panel { max-width: 520px; }
.credential-panel { margin-bottom: 16px; border-color: #466c65; background: #132b2b; }
.credential-panel h2 { font-size: 23px; }
.credential-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.credential-actions label { flex: 1 1 300px; max-width: 440px; }
.credential-actions input { font-family: ui-monospace, monospace; }
.signed-out .layout { display: block; }
.signed-out .sidebar, .signed-out .topbar { display: none; }
.signed-out main { display: grid; min-height: calc(100vh - 40px); max-width: 1240px; align-items: center; padding: 18px; }
.login-layout { width: min(100%, 540px); margin-inline: auto; background: radial-gradient(ellipse at top left, #1b3361, var(--surface) 70%); border: 1px solid var(--line); border-radius: 16px; }
.login-panel { padding: clamp(25px, 6vw, 64px); }
.login-brand { margin-bottom: 30px; }
.login-brand .brand-logo { width: min(100%, 220px); }
.login-brand small { display: block; color: var(--muted); font-size: 12px; }
.login-panel h1 { font-size: clamp(35px, 5vw, 54px); }
.login-form { margin-top: 22px; }
.login-form .button { min-width: 135px; }
.login-form input { min-height: 44px; }
@media (max-width: 490px) {
  .account-name { display: grid; font-size: 11px; }
  .account-name small { display: none; }
  #account { gap: 6px; }
  #account .avatar { display: none; }
}

.portal-welcome {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  background: radial-gradient(ellipse at right top, #1b3361, #0b1429 75%);
  border-radius: 15px;
  color: white;
  padding: clamp(22px, 5vw, 52px);
}
.portal-welcome .kicker { color: var(--accent); }
.portal-welcome h1 { font-size: clamp(31px, 5vw, 54px); }
.portal-welcome p:last-child { color: #e6ecf3; margin-bottom: 0; }
.portal-welcome .button { flex: 0 0 auto; }
.portal-metrics, .portal-grid, .portal-records { display: grid; gap: 13px; }
.portal-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 17px 0; }
.portal-grid, .portal-records { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.portal-metric { display: grid; gap: 6px; text-decoration: none; }
.portal-metric:hover { border-color: #668297; background: #192a48; }
.portal-metric span { color: var(--muted); font-weight: 650; font-size: 13px; }
.portal-metric strong { font-size: 33px; letter-spacing: -.04em; }
.portal-section { margin-bottom: 23px; }
.portal-records > .empty { grid-column: 1 / -1; }
.portal-record .record-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 10px; }
.record-heading .tag { flex: 0 0 auto; }
.record-heading h3, .record-heading .kicker { margin-bottom: 3px; }
.portal-record h3, .portal-record p { overflow-wrap: anywhere; }
.record-date { font-size: 13px; font-weight: 700; color: var(--muted); }
.portal-text { white-space: pre-wrap; line-height: 1.5; }
.portal-text:last-child { margin-bottom: 0; }
.result-grade { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.field-hint { color: var(--muted); font-size: 12px; margin: 0; }
.portal-form { margin-top: 14px; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.review-note { padding: 11px 12px; border-left: 3px solid #8bbdff; background: #20324e; border-radius: 4px; display: grid; gap: 5px; font-size: 13px; }
.review-note span { white-space: pre-wrap; }
.tag.cancelled { background: #3d242f; color: #ffc0c6; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 15px; }
.portal-tabs a { text-decoration: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font-size: 13px; font-weight: 700; background: var(--surface); }
.portal-tabs a[aria-current="page"] { background: var(--navy-mid); color: white; border-color: var(--navy-mid); }
.portal-create { margin-bottom: 13px; max-width: 650px; }
.portal-create details.editor { border: none; padding: 0; }
.portal-people, .portal-files, .portal-checklist { list-style: none; margin: 0; padding: 0; }
.portal-people li + li, .portal-files li + li, .portal-checklist li + li { border-top: 1px solid var(--line); }
.portal-people a, .portal-checklist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; padding: 11px 0; }
.portal-people a:hover strong { text-decoration: underline; }
.portal-people small { display: block; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.portal-checklist span { color: var(--muted); font-size: 12px; }
.portal-files li { padding: 9px 0; }
.file-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; margin: 5px 0; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; background: #172641; font-size: 13px; }
.file-link:hover .file-name { text-decoration: underline; }
.file-name { overflow-wrap: anywhere; font-weight: 650; min-width: 0; }
.file-meta { color: var(--muted); font-size: 11px; }
.course-resources { margin-top: 14px; }
.course-countdown { margin-top: 8px; }
.course-countdown p { margin: 4px 0; }
.course-countdown [role="timer"] { font-size: 1.125rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.portal-countdown { max-width: 640px; margin: clamp(28px, 10vh, 96px) auto 0; text-align: center; padding: clamp(22px, 5vw, 48px); }
.portal-countdown h1 { margin: 0; }
.portal-countdown [role="timer"] { font-size: clamp(1.45rem, 4vw, 2.5rem); margin: 14px 0; }
@media (max-width: 670px) {
  .portal-welcome { flex-direction: column; align-items: start; }
  .portal-grid, .portal-records { grid-template-columns: 1fr; }
  .portal-metrics { gap: 6px; }
  .portal-metric { padding: 9px; }
  .portal-metric span { font-size: 11px; }
  .portal-metric strong { font-size: 26px; }
}
@media (max-width: 370px) {
  .field-pair { grid-template-columns: 1fr; }
}

[data-custom-document][hidden] { display: none; }
[data-exam-title][hidden] { display: none; }
.dashboard-task { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; width: 100%; overflow-wrap: anywhere; }
.dashboard-task small { display: block; }
.admin-stack { --section-gap: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--section-gap); }
.staff-overview .portal-welcome { padding-inline: calc(var(--panel-padding) + 1px); }
.staff-overview > .portal-grid { align-items: stretch; gap: var(--section-gap); }
.dashboard-reviews .portal-grid { column-gap: calc(var(--section-gap) + 2 * (var(--panel-padding) + 1px)); }
.staff-overview .portal-people a > :first-child { min-width: 0; overflow-wrap: anywhere; }
.dashboard-work [data-form="work-time"] { margin-bottom: var(--section-gap, 16px); }
.dashboard-work [data-form="work-time-date"] label { flex-grow: 0; }
.work-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.work-heading h2 { margin: 0; }
.work-report form[data-form="work-report-period"] label { flex: 0 1 190px; }
.work-report .search label { min-width: 0; }
.work-report td:first-child { overflow-wrap: anywhere; }

.identity-side { margin: 8px 0; }
.identity-side > strong { font-size: 13px; }

[data-attendance-time][hidden] { display: none; }

.portal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-panel { max-width: 800px; }
.profile-preview { min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.profile-management .profile-preview { max-width: 720px; }
.profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.profile-details div { min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.profile-details dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.profile-details dd { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.class-people li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; align-items: baseline; }
.class-people form { text-align: right; }
@media (max-width: 480px) {
  .profile-details { grid-template-columns: 1fr; }
  .class-people li { flex-wrap: wrap; }
}

.class-attendance { min-width: 680px; }
.class-attendance td:nth-child(2) { min-width: 168px; }
.class-attendance td:nth-child(3), .class-attendance td:nth-child(4) { min-width: 96px; }
.class-attendance input:disabled { background: #202c41; color: var(--muted); }
