/*
 * LSDI College SIS
 * Layout: fixed green sidebar + white top bar + card-based content on a pale green-grey ground.
 * Colors come from the school seal: forest green, deep green, and a muted gold accent.
 */
:root {
    --green-900: #123A26;
    --green-800: #1A4A31;
    --green-700: #1F5B3A;
    --green-100: #E3F0E6;
    --green-050: #F2F4F1;
    --gold-500: #B08A2E;
    --gold-100: #FBF0D9;
    --gold-800: #7A5200;
    --ink: #17231C;
    --muted: #56655B;
    --line: #DCE3DD;
    --line-soft: #EEF2EE;
    --surface: #FFFFFF;
    --surface-alt: #F7F9F6;
    --blue-100: #E4EDF6;
    --blue-800: #1F4E79;
    --red-100: #FBE7E7;
    --red-800: #9B2C2C;
    --grey-100: #ECEFEC;
    --grey-800: #3E4A42;

    --font-display: "Crimson Pro", Georgia, "Times New Roman", serif;
    --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;

    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--green-050);
    color: var(--ink);
    font: 15px/1.5 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); }
a:hover { color: var(--green-900); }

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

h1, h2, h3 { margin: 0; text-wrap: balance; }

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

.icon { flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.93em; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ shell */
.shell { display: flex; min-height: 100%; }

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--green-900);
    color: #CFE0D4;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Thin, green-toned scrollbar for the sidebar */
.sidebar {
    scrollbar-width: thin;                        /* Firefox, Chrome 121+, Edge 121+ */
    scrollbar-color: #2F6B49 transparent;         /* thumb, track */
}
.sidebar::-webkit-scrollbar { width: 6px; }       /* older Chrome, Safari */
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #2F6B49; border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #3F7A55; }

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; text-decoration: none; }
.brand img { width: 40px; height: 46px; object-fit: contain; }
.brand-name { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 600; color: #fff; line-height: 1.1; }
.brand-sub { display: block; font-size: 12px; color: #A9C3B1; }

.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: #8FAE99; padding: 0 12px 6px;
}
.nav-link {
    display: flex; align-items: center; gap: 12px;
    min-height: 42px; padding: 0 12px; border-radius: var(--radius);
    color: #CFE0D4; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.nav-link:hover { background: var(--green-800); color: #fff; }
.nav-link[aria-current="page"] { background: var(--green-700); color: #fff; }
.nav-link[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.nav-link[aria-disabled="true"]:hover { background: none; color: #CFE0D4; }
.nav-soon {
    margin-left: auto; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 2px 6px; border-radius: 4px; background: var(--green-800); color: #A9C3B1;
}
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid #245A3C; display: flex; flex-direction: column; gap: 4px; }

.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    min-height: 76px; background: var(--surface); border-bottom: 1px solid var(--line);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px 24px; padding: 12px 32px;
}
.crumb { font-size: 12px; color: var(--muted); }
.page-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--green-900); line-height: 1.1; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.term-chip {
    min-height: 36px; display: inline-flex; align-items: center; gap: 8px;
    padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 13px; font-weight: 500;
}
.term-chip.is-missing { border-color: var(--gold-500); background: var(--gold-100); color: var(--gold-800); }

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--green-100); color: var(--green-700);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.user-name { display: block; font-size: 14px; font-weight: 600; }
.user-role { display: block; font-size: 12px; color: var(--muted); }

.content { flex-grow: 1; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 24px; }

/* ------------------------------------------------------------------ building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-body { padding: 20px 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; }
.card-title { font-size: 16px; font-weight: 600; }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.split { display: flex; gap: 24px; align-items: flex-start; }
.split > .grow { flex-grow: 1; min-width: 0; }
.split > .aside { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; }

.kpi { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi-value { font-family: var(--font-display); font-size: 42px; font-weight: 600; line-height: 1; color: var(--green-900); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 13px; color: var(--muted); }

.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0 24px 20px; }
.stage { display: flex; flex-direction: column; gap: 8px; }
.stage-bar { height: 8px; border-radius: 4px; background: var(--line); }
.stage-label { font-size: 13px; color: var(--muted); }
.stage-value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; position: relative; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
    text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); font-weight: 600; padding: 10px 12px; background: var(--surface-alt);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data th:first-child, table.data td:first-child { padding-left: 24px; }
table.data th:last-child, table.data td:last-child { padding-right: 24px; }
table.data tr:last-child td { border-bottom: 0; }
table.data .right { text-align: right; }

.pill {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
    background: var(--grey-100); color: var(--grey-800);
}
.pill-green { background: var(--green-100); color: var(--green-700); }
.pill-blue { background: var(--blue-100); color: var(--blue-800); }
.pill-gold { background: var(--gold-100); color: var(--gold-800); }
.pill-red { background: var(--red-100); color: var(--red-800); }

.action-list { list-style: none; margin: 0; padding: 0 20px 8px; }
.action-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.action-count {
    min-width: 36px; height: 36px; border-radius: var(--radius);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.action-title { display: block; font-size: 14px; font-weight: 500; }
.action-sub { display: block; font-size: 12px; color: var(--muted); }

.bar-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green-700); border-radius: 5px; }

.empty { padding: 28px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ------------------------------------------------------------------ alerts */
.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--radius); font-size: 14px; border: 1px solid;
}
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert-success { background: var(--green-100); border-color: #B9D7C1; color: var(--green-900); }
.alert-error { background: var(--red-100); border-color: #EBC3C3; color: var(--red-800); }
.alert-warn { background: var(--gold-100); border-color: #EBD7A6; color: var(--gold-800); }

/* ------------------------------------------------------------------ forms */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--red-800); }
.input {
    min-height: 46px; width: 100%; padding: 0 14px;
    border: 1px solid #C9D4CC; border-radius: var(--radius);
    background: var(--surface); color: var(--ink); font: 15px var(--font-body);
}
.input:focus { border-color: var(--green-700); outline: 2px solid var(--green-100); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--red-800); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--green-700); }

.btn {
    min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 18px; border-radius: var(--radius); border: 1px solid #C9D4CC;
    background: var(--surface); color: var(--ink); font: 600 14px var(--font-body);
    text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--green-700); color: var(--ink); }
.btn-primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.btn-block { width: 100%; min-height: 50px; font-size: 15px; }

/* ------------------------------------------------------------------ sign-in */
.auth { display: flex; min-height: 100%; }
.auth-panel {
    width: 44%; max-width: 620px; background: var(--green-900); color: #E8F1EA;
    padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #D9C27A; }
.auth-seal { width: 132px; height: auto; }
.auth-school { font-family: var(--font-display); font-weight: 600; font-size: 52px; line-height: 1.02; color: #fff; margin: 20px 0 16px; }
.auth-tagline { font-size: 17px; line-height: 1.6; color: #CFE0D4; max-width: 420px; margin: 0; }
.auth-address { font-size: 13px; line-height: 1.5; color: #A9C3B1; }
.auth-form-wrap { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form { width: 100%; max-width: 420px; }
.auth-title { font-family: var(--font-display); font-weight: 600; font-size: 38px; color: var(--green-900); }
.auth-lead { margin: 6px 0 0; font-size: 15px; color: var(--muted); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { flex-direction: column; align-items: stretch; }
    .split > .aside { width: 100%; }
}

/* ------------------------------------------------------------------ list and form screens */
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.page-actions .muted { font-size: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.filters .field { flex: 1 1 160px; min-width: 0; }
.filters .field-wide { flex: 2 1 240px; }
.filters .input, .filters .select { min-height: 42px; font-size: 14px; }
.filters-actions { display: flex; gap: 8px; }

.select {
    min-height: 46px; width: 100%; padding: 0 36px 0 12px;
    border: 1px solid #C9D4CC; border-radius: var(--radius);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2356655B' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none; color: var(--ink); font: 15px var(--font-body);
}

.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-danger { color: var(--red-800); border-color: #E3B5B5; }
.btn-danger:hover { background: var(--red-100); border-color: var(--red-800); color: var(--red-800); }

.cell-main { display: block; font-weight: 500; color: var(--ink); text-decoration: none; }
a.cell-main:hover { color: var(--green-700); text-decoration: underline; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 4px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; }
.check-card { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-card input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green-700); flex-shrink: 0; }
.check-card small { display: block; color: var(--muted); font-size: 12px; }
.check-card code { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
fieldset.group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
fieldset.group + fieldset.group { padding-top: 18px; border-top: 1px solid var(--line-soft); }
fieldset.group legend { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }

.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.danger-zone { border-color: #EBC3C3; }
.danger-zone .card-title { color: var(--red-800); }

.issued-box {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 16px 20px; border: 2px dashed var(--gold-500); border-radius: var(--radius);
    background: var(--gold-100);
}
.issued-password { font-family: var(--font-mono); font-size: 26px; font-weight: 500; letter-spacing: 0.06em; color: var(--ink); user-select: all; word-break: break-all; }

.diff { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.diff th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.diff td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; word-break: break-word; }
.diff .before { color: var(--red-800); }
.diff .after { color: var(--green-700); }
details.audit-details summary { cursor: pointer; color: var(--green-700); font-size: 13px; }

.pagination { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 16px 24px; }
.pagination li > a, .pagination li > span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-size: 14px; color: var(--ink);
}
.pagination li.active a { background: var(--green-700); border-color: var(--green-700); color: #fff; }

@media (max-width: 860px) {
    .form-grid { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 1fr; gap: 2px 0; }
    .kv dd { margin-bottom: 10px; }
    .filters { padding: 16px; }
}

/* ------------------------------------------------------------------ academic setup */
.subnav {
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin;
    border-bottom: 1px solid var(--line); margin-top: -8px;
}
.subnav a {
    flex-shrink: 0; padding: 10px 14px; font-size: 14px; font-weight: 500; white-space: nowrap;
    color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.subnav a:hover { color: var(--green-900); }
.subnav a[aria-current="page"] { color: var(--green-900); font-weight: 600; border-bottom-color: var(--gold-500); }

.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.term-picker { display: flex; gap: 8px; align-items: center; }
.term-picker .select { min-height: 40px; min-width: 260px; font-size: 14px; }

.form-card { max-width: 880px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Read-only values shown among form fields, and radio choices that reveal more fields. */
.field .label-text { font-size: 13px; font-weight: 600; }
.readonly-value { min-height: 46px; display: flex; align-items: center; font-size: 15px; }
.form-grid .span-all { grid-column: 1 / -1; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px 24px; }
fieldset.group.account-group { padding-top: 18px; border-top: 1px solid var(--line-soft); }
[data-show-if][hidden] { display: none !important; }
.scope-note { margin: 0; font-size: 14px; }

/* Faculty loads */
.chip-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; text-decoration: none; font-size: 14px; }
.chip-tabs a[aria-current="page"] { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.chip-tabs .count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold-100); color: var(--gold-800); font-size: 12px; font-weight: 600; text-align: center; }
.load-head { align-items: flex-start; }
.text-red { color: var(--red-800); }
.data a.mono, .data span.mono { white-space: nowrap; }

/* Student records */
.student-form { display: flex; flex-direction: column; gap: 24px; }
.student-form > .form-actions { margin: 0; }
fieldset.group.admit-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
fieldset.group.person-group + fieldset.group.person-group { margin-top: 14px; }
.select-sm, .input-sm { min-height: 38px; font-size: 14px; padding-top: 0; padding-bottom: 0; }
.data .select-sm { min-width: 150px; }
.data .input-sm { min-width: 180px; }
.progress { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green-700); }
.checklist-term h3 { margin: 0; padding: 14px 24px 8px; font-size: 14px; font-weight: 600; color: var(--green-900); border-top: 1px solid var(--line-soft); }
.checklist-table { table-layout: fixed; min-width: 640px; }
.checklist-table th:nth-child(1) { width: 120px; }
.checklist-table th:nth-child(3) { width: 70px; }
.checklist-table th:nth-child(4) { width: 140px; }
.checklist-table th:nth-child(5) { width: 240px; }
.add-panel summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--green-900); }
.add-panel[open] summary { margin-bottom: 16px; }
/* Admissions and enrollment */
.search-row { display: flex; gap: 8px; }
.search-row .input { flex: 1; }
.pick-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.pick-list li + li { border-top: 1px solid var(--line-soft); }
.pick-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 14px; color: inherit; text-decoration: none; }
.pick-list a:hover { background: var(--green-100); }
.stack-buttons { display: flex; flex-direction: column; gap: 8px; }
.stack-buttons .btn { width: 100%; }
.needs-box { border: 1px solid #EBD7A6; background: var(--gold-100); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.needs-box ul { margin: 0; padding-left: 18px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.inline-form .input { min-height: 38px; font-size: 14px; flex: 1 1 180px; }
.units-meter { font-variant-numeric: tabular-nums; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.kv-tight { grid-template-columns: 230px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.data .check-col { width: 44px; }
.data .check-col input, .load-head .check input { width: 18px; height: 18px; accent-color: var(--green-700); }
.loads-form { display: flex; flex-direction: column; gap: 24px; }
.review-bar .card-body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.return-box { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; flex: 1 1 360px; max-width: 640px; }
.return-box .field { flex: 1 1 260px; }

a.kpi-link { color: inherit; text-decoration: none; }
a.kpi-link:hover { border-color: var(--green-700); }

.checklist { list-style: none; margin: 0; padding: 0 24px 16px; counter-reset: none; }
.checklist li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.checklist a { color: var(--ink); text-decoration: none; font-weight: 500; }
.checklist a:hover { color: var(--green-700); text-decoration: underline; }
.check-mark {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; background: var(--grey-100); color: var(--grey-800);
}
.checklist li.is-done .check-mark { background: var(--green-700); color: #fff; }
.checklist li.is-done a { color: var(--muted); font-weight: 400; }

.term-block { border-top: 1px solid var(--line); }
.term-block-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 24px 6px; }
.term-block-head h3 { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-700); }
/* Same column widths in every semester table, so the curriculum reads as one grid. */
.term-block table.data { table-layout: fixed; min-width: 760px; }
.term-block table.data th:nth-child(1) { width: 130px; }
.term-block table.data th:nth-child(3), .term-block table.data th:nth-child(4) { width: 64px; }
.term-block table.data th:nth-child(5) { width: 76px; }
.term-block table.data th:nth-child(6) { width: 210px; }
.term-block table.data th:nth-child(7) { width: 96px; }

.day-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.day-pick { position: relative; }
.day-pick input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.day-pick span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 44px; padding: 0 12px;
    border: 1px solid #C9D4CC; border-radius: var(--radius); font-size: 14px; font-weight: 600; background: var(--surface);
}
.day-pick input:checked + span { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.day-pick input:focus-visible + span { outline: 2px solid var(--gold-500); outline-offset: 2px; }

.timetable-wrap { overflow-x: auto; padding: 0 24px 24px; }
.timetable { display: grid; min-width: 720px; position: relative; font-size: 12px; }
.tt-corner, .tt-day { border-bottom: 1px solid var(--line); }
.tt-day { display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.tt-hour { color: var(--muted); font-size: 11px; padding-right: 8px; text-align: right; transform: translateY(-7px); }
.tt-line { border-top: 1px dashed var(--line-soft); pointer-events: none; }
.tt-block {
    z-index: 1; margin: 1px 2px; padding: 4px 6px; border-radius: 6px; overflow: hidden;
    background: var(--green-100); border-left: 3px solid var(--green-700);
    color: var(--green-900); text-decoration: none; display: flex; flex-direction: column; gap: 1px; line-height: 1.25;
}
.tt-block:hover { background: #D3E8D9; color: var(--green-900); }
.tt-block.is-lab { background: var(--blue-100); border-left-color: var(--blue-800); color: var(--blue-800); }
.tt-block strong { font-size: 12px; }
.tt-block span { font-size: 11px; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1100px) {
    .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
    .term-picker .select { min-width: 0; }
    .timetable-wrap { padding: 0 16px 16px; }
    .subnav { margin-top: 0; }
}

/* ------------------------------------------------------------------ small-screen menu */
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-toggle, .sidebar-close { display: none; }
.menu-toggle, .sidebar-close {
    width: 44px; height: 44px; flex-shrink: 0; align-items: center; justify-content: center;
    border-radius: var(--radius); cursor: pointer; background: none;
}
.menu-toggle { border: 1px solid var(--line); color: var(--green-900); }
.sidebar-close { border: 1px solid #245A3C; color: #fff; }
.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(18, 58, 38, 0.45); }

@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .topbar { padding: 12px 16px; }
    .content { padding: 20px 16px 40px; }
    .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth { flex-direction: column; }
    .auth-panel { width: 100%; max-width: none; padding: 32px 24px; gap: 20px; }
    .auth-seal { width: 72px; }
    .auth-school { font-size: 34px; margin: 12px 0 8px; }

    /* With JavaScript: the sidebar is a drawer opened by the menu button. */
    .js .menu-toggle, .js .sidebar-close { display: inline-flex; }
    .js .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
        width: min(300px, 85vw); height: 100%;
        transform: translateX(-100%); visibility: hidden;
        /* Closing: slide out first, then hide, so it leaves the tab order after the animation. */
        transition: transform 0.2s ease, visibility 0s linear 0.2s;
    }
    .js body.menu-open .sidebar {
        transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
        /* Opening: visible at once, so focus can move into the menu. */
        transition: transform 0.2s ease, visibility 0s;
    }
    .js body.menu-open { overflow: hidden; }

    /* Without JavaScript: the sidebar stays on the page as a wrapped bar. */
    .no-js .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .no-js .nav-group { flex-direction: row; flex-wrap: wrap; }
    .no-js .nav-label, .no-js .nav-soon, .no-js .brand-sub { display: none; }
    .no-js .sidebar-foot { margin: 0; padding: 0; border: 0; flex-direction: row; }
}

@media (max-width: 520px) {
    .grid-4 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

@media (max-width: 640px) {
    .kv-tight { grid-template-columns: 1fr; gap: 2px 0; }
    .kv-tight dd { margin-bottom: 8px; }
}
