:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #63708a;
  --line: #dce3ef;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --blue: #185adb;
  --blue-dark: #103f9e;
  --amber: #ffbd3e;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
.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; }
.topbar { min-height: 76px; padding: 14px clamp(20px, 4vw, 64px); background: #0d1d3a; color: #fff; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-logo { display: block; width: 116px; height: auto; flex: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; }
.brand small { margin-top: 2px; color: #afbdd4; font-size: .8rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.instructor-name { color: #d7dfec; font-size: .84rem; font-weight: 700; }
.admin-link { color: #fff; font-size: .84rem; font-weight: 750; text-decoration: none; }
.admin-link:hover, .admin-link:focus { text-decoration: underline; }
.logout-button { padding: 7px 10px; border: 1px solid #53647e; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 64px; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.045em; line-height: 1; }
h2 { margin-bottom: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.search input { width: min(360px, 38vw); min-height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 6px 20px rgba(19, 41, 84, .05); }
.search input:focus { outline: 3px solid rgba(24, 90, 219, .2); border-color: var(--blue); }
.dashboard-filter-panel { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 30px rgba(19, 41, 84, .05); }
.filter-heading { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.filter-heading > a { color: var(--blue-dark); font-size: .82rem; font-weight: 800; text-decoration: none; }
.filter-heading > a:hover, .filter-heading > a:focus { text-decoration: underline; }
.dashboard-filter-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; }
.dashboard-filter-form label { display: grid; gap: 6px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.dashboard-filter-form input, .dashboard-filter-form select { width: 100%; height: 48px; min-height: 48px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.dashboard-filter-form input:focus, .dashboard-filter-form select:focus { border-color: var(--blue); outline: 3px solid rgba(24,90,219,.16); }
.dashboard-filter-form .primary-button { min-height: 48px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.summary-grid article { min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 30px rgba(19, 41, 84, .05); }
.summary-grid span, .summary-grid small { display: block; }
.summary-grid span { color: var(--muted); font-size: .86rem; font-weight: 700; }
.summary-grid strong { display: block; margin: 10px 0 8px; font-size: 2.5rem; line-height: 1; }
.summary-grid small { color: var(--muted); font-size: .8rem; }
.summary-grid .needs-review { border-top: 4px solid var(--amber); padding-top: 19px; }
.results-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 36px rgba(19, 41, 84, .06); }
.webhook-review-help { margin: 0; padding: 16px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .86rem; line-height: 1.5; }
.webhook-review-panel td:first-child { max-width: 230px; overflow-wrap: anywhere; }
.webhook-review-panel td:last-child { min-width: 245px; }
.webhook-resolution-form { display: grid; gap: 8px; }
.webhook-resolution-form label { display: grid; gap: 5px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.webhook-resolution-form input { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.webhook-resolution-form button { justify-self: start; }
.webhook-review-panel details { padding: 16px 22px; border-top: 1px solid var(--line); }
.webhook-review-panel summary { color: var(--blue-dark); cursor: pointer; font-weight: 800; }
.webhook-review-panel details .table-wrap { margin-top: 14px; }
.panel-heading { padding: 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.filters { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #edf2f9; }
.filters a { min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; text-decoration: none; font-size: .82rem; font-weight: 700; }
.filters a.active { background: #fff; color: var(--blue-dark); box-shadow: 0 1px 4px rgba(19, 41, 84, .12); }
.empty-state { min-height: 260px; padding: 48px 32px; display: grid; grid-template-columns: 170px minmax(0, 460px); align-items: center; justify-content: center; gap: 40px; }
.empty-state p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.empty-plot { width: 160px; aspect-ratio: 1; position: relative; border: 1px solid #cbd6e7; border-radius: 50%; background: radial-gradient(circle, rgba(24,90,219,.1) 0 25%, transparent 26% 49%, rgba(24,90,219,.08) 50% 51%, transparent 52% 74%, rgba(24,90,219,.08) 75% 76%, transparent 77%); }
.empty-plot::before { content: ""; position: absolute; inset: 22px; background: rgba(24,90,219,.14); clip-path: polygon(50% 0, 84% 28%, 73% 74%, 45% 100%, 8% 69%, 15% 30%); }
.empty-plot span { position: absolute; top: 50%; left: 50%; width: 1px; height: 50%; transform-origin: top; background: #cbd6e7; }
.empty-plot span:nth-child(1) { transform: rotate(0deg); }
.empty-plot span:nth-child(2) { transform: rotate(60deg); }
.empty-plot span:nth-child(3) { transform: rotate(120deg); }
.empty-plot span:nth-child(4) { transform: rotate(180deg); }
.empty-plot span:nth-child(5) { transform: rotate(240deg); }
.empty-plot span:nth-child(6) { transform: rotate(300deg); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 20px; border-bottom: 1px solid var(--line); text-align: left; font-size: .9rem; }
th { color: var(--muted); font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #eef3fb; font-size: .75rem; font-weight: 800; }
.status-review_required { background: var(--danger-soft); color: var(--danger); }
.status-clean { background: #e9f8ef; color: #147a3d; }
.status-manually_resolved { background: #e7f3ff; color: #1458a5; }
.status-published { background: #e9f8ef; color: #147a3d; }
.status-ready { background: #e7f3ff; color: #1458a5; }
.status-needs_review { background: var(--danger-soft); color: var(--danger); }
.status-excluded { background: #f3f4f6; color: #526070; }

.reviewed-correction {
  color: #6b4e16;
  font-size: 0.82rem;
  margin: 0.2rem 0 0;
}
.student-link { color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.student-link:hover { text-decoration: underline; }
.back-link { display: inline-flex; margin-bottom: 26px; color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.student-detail-heading { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.student-detail-heading h1 { margin-bottom: 10px; }
.student-detail-heading .student-detail-subtitle { margin: 0 0 8px; color: var(--ink); font-size: 1rem; font-weight: 650; }
.student-detail-heading p:last-child { margin: 0; color: var(--muted); }
.identity-badge { padding: 8px 11px; border-radius: 999px; background: #fff8e8; color: #77520b; font-size: .78rem; font-weight: 800; }
.activity-stack { display: grid; gap: 18px; }
.activity-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 12px 34px rgba(19,41,84,.06); }
.activity-card > header { padding: 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.activity-card > header > span { color: var(--muted); font-size: .82rem; }
.activity-date-detail { margin: 7px 0 0; color: var(--muted); font-size: .82rem; font-weight: 700; }
.comparison-meta { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 7px; }
.comparison-meta span { padding: 5px 8px; border-radius: 999px; background: #edf2f9; color: var(--blue-dark); font-size: .75rem; font-weight: 800; }
.report-download { display: inline-block; margin-top: 12px; color: var(--blue-dark); font-size: .82rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.comparison-grid { display: grid; grid-template-columns: minmax(390px, 1.1fr) minmax(360px, 1fr); }
.radar-wrap { padding: 30px; border-right: 1px solid var(--line); }
.radar { display: block; width: 100%; max-width: 560px; height: auto; margin-inline: auto; overflow: visible; }
.radar-grid .radar-ring, .radar-grid line { fill: none; stroke: #d9e2f0; stroke-width: 1; }
.radar-grid text { fill: var(--muted); font-size: 9px; text-anchor: middle; dominant-baseline: middle; }
.radar-level-labels text { fill: #344765; font-size: 7px; text-anchor: middle; dominant-baseline: middle; }
.radar-level-labels .radar-level-zero { font-size: 6px; }
.radar-grid line.radar-unassessed { stroke: #e8edf5; stroke-dasharray: 3 4; }
.radar-grid text.radar-unassessed { fill: #a0acc0; }
.radar-start { fill: rgba(255, 143, 31, .18); stroke: #f07d00; stroke-width: 3; stroke-dasharray: 7 5; }
.radar-end { fill: rgba(24, 90, 219, .2); stroke: var(--blue); stroke-width: 3; }
.radar-standalone { fill: rgba(28, 145, 108, .2); stroke: #1c916c; stroke-width: 3; }
.radar-legend { display: flex; justify-content: center; gap: 22px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.radar-legend span { display: inline-flex; align-items: center; gap: 7px; }
.radar-legend i { width: 11px; height: 11px; border-radius: 3px; }
.legend-start { background: #f07d00; }
.legend-end { background: var(--blue); }
.legend-standalone { background: #1c916c; }
.unassessed-note { margin: 16px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; text-align: center; }
.concept-guide { padding: 20px 26px 24px; border-top: 1px solid var(--line); background: #f9fbff; }
.concept-guide h3 { margin: 0 0 8px; font-size: 1rem; }
.concept-guide p { margin: 0 0 12px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.concept-guide dl { display: grid; grid-template-columns: minmax(100px, 130px) 1fr; gap: 7px 12px; margin: 0; font-size: .82rem; line-height: 1.45; }
.concept-guide dt { font-weight: 800; color: var(--ink); }
.concept-guide dd { margin: 0; color: var(--muted); }
.comparison-warning { margin: 18px 0 0; padding: 11px 12px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: .78rem; line-height: 1.45; }
.assessment-list { padding: 14px 22px; }
.assessment-list section { padding: 17px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 18px; }
.assessment-list section:last-child { border-bottom: 0; }
.assessment-list strong, .assessment-list span { display: block; }
.assessment-list div > span { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.score-comparison { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.score-comparison > span { margin: 0; padding: 10px 12px; border-radius: 9px; background: #f4f7fb; }
.score-comparison small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.score-comparison strong { color: var(--ink); font-size: .9rem; }
.assessment-list p { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: .8rem; }
.assessment-list .chart-inclusion { color: var(--muted); font-weight: 750; }
.assessment-list .chart-inclusion-active { color: #147a3d; }
.success-notice { margin: -10px 0 22px; padding: 13px 15px; border: 1px solid #a9dfbd; border-radius: 11px; background: #e9f8ef; color: #126233; font-weight: 700; }
.review-controls, .audit-history { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; }
.review-controls summary, .audit-history summary { padding: 11px 13px; color: var(--blue-dark); cursor: pointer; font-size: .82rem; font-weight: 800; }
.review-form { padding: 4px 13px 13px; display: grid; grid-template-columns: 1fr 1.5fr; gap: 11px; }
.review-form label { display: grid; gap: 5px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.review-form select, .review-form input, .duplicate-form input { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.review-form .review-reason { grid-column: 1 / -1; }
.review-form .primary-button { grid-column: 1 / -1; min-height: 42px; }
.duplicate-form { padding: 13px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.duplicate-form .secondary-button { min-height: 42px; }
.audit-history { background: #fff; }
.audit-history p { padding: 0 13px 11px; color: var(--muted); }
.mapping-panel { margin-bottom: 18px; }
.mapping-form { padding: 22px; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(220px, 1.2fr) auto; align-items: end; gap: 14px; }
.mapping-form label { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.mapping-form select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.mapping-form select:focus { border-color: var(--blue); outline: 3px solid rgba(24,90,219,.16); }
.mapping-form .primary-button { white-space: nowrap; }
.mapping-empty { margin: 0; padding: 28px 22px; color: var(--muted); }
.admin-nav-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-nav-grid a { min-height: 138px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 30px rgba(19,41,84,.05); color: var(--ink); text-decoration: none; display: grid; align-content: center; gap: 8px; }
.admin-nav-grid a:hover, .admin-nav-grid a:focus { border-color: var(--blue); outline: 3px solid rgba(24,90,219,.12); }
.admin-nav-grid strong { font-size: 1.15rem; }
.admin-nav-grid span, .admin-help, .cell-note { color: var(--muted); line-height: 1.45; }
.admin-form-panel { margin-bottom: 18px; }
.admin-action-form { padding: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 14px; }
.admin-action-form label, .student-admin-search label { display: grid; gap: 6px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.admin-action-form input, .compact-admin-form input, .student-admin-search input { width: 100%; min-height: 43px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.admin-action-form input:focus, .compact-admin-form input:focus, .student-admin-search input:focus { border-color: var(--blue); outline: 3px solid rgba(24,90,219,.14); }
.admin-help { margin: 0; padding: 0 22px 22px; font-size: .84rem; }
.cell-note { display: block; margin-top: 4px; font-size: .78rem; font-weight: 500; }
.compact-admin-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto; align-items: center; gap: 8px; min-width: 260px; }
.compact-admin-form .secondary-button { min-height: 38px; }
.compact-admin-form.stacked { margin-top: 10px; grid-template-columns: 1fr; min-width: min(420px, 60vw); }
.inline-editor summary { color: var(--blue-dark); font-size: .82rem; font-weight: 800; cursor: pointer; }
.student-admin-search { display: flex; align-items: end; gap: 12px; }
.student-admin-search label { flex: 1; }
.student-admin-search .primary-button { min-height: 43px; }
.student-admin-search a { padding: 12px 0; color: var(--blue-dark); font-weight: 800; text-decoration: none; }
.mapping-location, .mapping-assignee small { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; font-weight: 500; }
.mapping-assignees { display: grid; gap: 8px; }
.mapping-assignee { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.mapping-assignee > span { min-width: 0; }
.remove-button { padding: 7px 10px; border: 1px solid #efb3ad; border-radius: 8px; background: #fff; color: var(--danger); font-size: .78rem; font-weight: 800; cursor: pointer; }
.remove-button:hover, .remove-button:focus { background: var(--danger-soft); outline: 2px solid rgba(180,35,24,.14); }
.unassigned { color: var(--muted); font-style: italic; }
.review-workflow-panel { margin-bottom: 18px; }
.review-workflow-intro { padding: 22px; border-bottom: 1px solid var(--line); }
.review-workflow-intro > p { color: var(--muted); line-height: 1.55; }
.historical-merge-form { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; align-items: end; gap: 12px; }
.historical-merge-form label, .inline-review-form { display: grid; gap: 6px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.historical-merge-form select, .historical-merge-form input, .inline-review-form input, .publication-control input, .standalone-publication-form input, .mapping-form input { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.identity-suggestions { margin: 16px 0; padding: 16px; border: 1px solid #f1d27a; border-radius: 14px; background: #fff9e8; }
.identity-suggestions > p { margin: 6px 0 12px; color: var(--muted); }
.suggestion-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 9px; }
.suggestion-card { display: grid; gap: 3px; padding: 11px 13px; border-radius: 10px; background: #fff; }
.suggestion-card small, .review-list-filter span { color: var(--muted); }
.review-list-filter { display: flex; align-items: end; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.review-list-filter label { display: grid; gap: 5px; min-width: min(420px, 60vw); font-size: .78rem; font-weight: 800; }
.review-list-filter input { min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.review-list-filter span { padding-bottom: 11px; }
tr[hidden] { display: none; }
.inline-review-form { grid-template-columns: minmax(160px, 1fr) auto; align-items: center; }
.inline-review-form .secondary-button { min-height: 42px; }
.publication-control, .standalone-publication-form { grid-column: 1 / -1; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; display: grid; gap: 9px; }
.publication-control span { color: var(--muted); font-size: .82rem; }
.publication-active { border-color: #a9dfbd; background: #e9f8ef; }
.publication-prerequisite { margin-top: 15px; padding: 11px 12px; border-radius: 9px; background: #fff8e8; color: #77520b; font-size: .8rem; }
.standalone-publication-form { margin-top: 6px; grid-template-columns: 1fr auto; }

@media (max-width: 920px) {
  .comparison-grid { grid-template-columns: 1fr; }
  .radar-wrap { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar-actions { flex-wrap: wrap; }
  main { width: min(100% - 28px, 1180px); padding-top: 28px; }
  .workspace-heading { align-items: stretch; flex-direction: column; }
  .search input { width: 100%; }
  .filter-heading { align-items: flex-start; }
  .dashboard-filter-form { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-grid article { min-height: 120px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; overflow-x: auto; }
  .empty-state { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .student-detail-heading { align-items: flex-start; flex-direction: column; }
  .review-form, .duplicate-form { grid-template-columns: 1fr; }
  .mapping-form { grid-template-columns: 1fr; }
  .admin-nav-grid { grid-template-columns: 1fr; }
  .admin-action-form { grid-template-columns: 1fr; }
  .student-admin-search { align-items: stretch; flex-direction: column; }
  .compact-admin-form { grid-template-columns: 1fr; min-width: 220px; }
  .historical-merge-form { grid-template-columns: 1fr; }
  .review-list-filter { align-items: stretch; flex-direction: column; }
  .review-list-filter label { min-width: 0; }
  .review-list-filter span { padding-bottom: 0; }
  .inline-review-form, .standalone-publication-form { grid-template-columns: 1fr; }
  .topbar-actions .instructor-name { display: none; }
  .webhook-open-table { overflow: visible; }
  .webhook-open-table table, .webhook-open-table tbody, .webhook-open-table tr, .webhook-open-table td { display: block; width: 100%; }
  .webhook-open-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .webhook-open-table tr { padding: 16px 20px; border-bottom: 1px solid var(--line); }
  .webhook-open-table tr:last-child { border-bottom: 0; }
  .webhook-open-table td { max-width: none !important; min-width: 0 !important; padding: 5px 0; border: 0; overflow-wrap: anywhere; }
  .webhook-open-table td:nth-child(1)::before, .webhook-open-table td:nth-child(2)::before,
  .webhook-open-table td:nth-child(3)::before, .webhook-open-table td:nth-child(4)::before { display: block; margin-bottom: 3px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .webhook-open-table td:nth-child(1)::before { content: "Response"; }
  .webhook-open-table td:nth-child(2)::before { content: "Form"; }
  .webhook-open-table td:nth-child(3)::before { content: "Issue"; }
  .webhook-open-table td:nth-child(4)::before { content: "Last received"; }
  .webhook-open-table td:nth-child(5) { margin-top: 10px; }
  .mapping-list-panel .table-wrap { overflow: visible; }
  .mapping-list-panel table, .mapping-list-panel tbody, .mapping-list-panel tr, .mapping-list-panel td { display: block; width: 100%; }
  .mapping-list-panel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .mapping-list-panel tr { padding: 18px 20px; border-bottom: 1px solid var(--line); }
  .mapping-list-panel tr:last-child { border-bottom: 0; }
  .mapping-list-panel td { padding: 3px 0; border: 0; }
  .mapping-list-panel td:nth-child(2) { color: var(--muted); font-size: .8rem; }
  .mapping-list-panel td:nth-child(2)::before { content: "Programme · "; font-weight: 800; }
  .mapping-list-panel td:nth-child(3) { margin-top: 13px; }
  .mapping-list-panel td:nth-child(3)::before { content: "Assigned instructors"; display: block; margin-bottom: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .instructor-directory-panel .table-wrap, .instructor-audit-panel .table-wrap { overflow: visible; }
  .instructor-directory-panel table, .instructor-directory-panel tbody, .instructor-directory-panel tr, .instructor-directory-panel td,
  .instructor-audit-panel table, .instructor-audit-panel tbody, .instructor-audit-panel tr, .instructor-audit-panel td { display: block; width: 100%; }
  .instructor-directory-panel thead, .instructor-audit-panel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .instructor-directory-panel tr, .instructor-audit-panel tr { padding: 16px 20px; border-bottom: 1px solid var(--line); }
  .instructor-directory-panel tr:last-child, .instructor-audit-panel tr:last-child { border-bottom: 0; }
  .instructor-directory-panel td, .instructor-audit-panel td { padding: 4px 0; border: 0; overflow-wrap: anywhere; }
  .instructor-directory-panel td:last-child, .instructor-audit-panel td:last-child { margin-top: 8px; }
  .instructor-directory-panel .compact-admin-form.stacked, .instructor-audit-panel .compact-admin-form.stacked { min-width: 0; width: 100%; }
}

.student-body { position: relative; min-height: 100vh; background: linear-gradient(145deg, #0d1d3a 0 42%, #185adb 42% 100%); }
.student-header { position: absolute; top: 22px; left: clamp(14px, 2vw, 32px); z-index: 1; }
.student-shell { width: min(680px, calc(100% - 28px)); min-height: 100vh; padding: 96px 0 34px; display: grid; align-content: center; gap: 18px; }
.student-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 850; }
.student-card { padding: clamp(26px, 7vw, 52px); border-radius: 24px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.student-card h1 { margin-bottom: 14px; font-size: clamp(2rem, 7vw, 3.25rem); line-height: 1.05; }
.step { margin-bottom: 10px; color: var(--blue); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.student-help { margin-bottom: 26px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.choice-stack { display: grid; gap: 12px; }
.choice-button { width: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff; color: var(--ink); text-align: left; cursor: pointer; }
.choice-button:hover, .choice-button:focus { border-color: var(--blue); outline: 3px solid rgba(24,90,219,.16); }
.role-choice { display: block; text-decoration: none; }
.choice-button strong, .choice-button span { display: block; }
.choice-button strong { margin-bottom: 4px; font-size: 1.05rem; }
.choice-button span { color: var(--muted); }
.student-form { display: grid; gap: 18px; }
.student-form label { display: grid; gap: 7px; color: var(--ink); font-size: .9rem; font-weight: 750; }
.student-form input, .student-form select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font: inherit; }
.student-form input:focus, .student-form select:focus { border-color: var(--blue); outline: 3px solid rgba(24,90,219,.16); }
.birthday-form { grid-template-columns: .7fr 1.3fr; }
.birthday-form .primary-button { grid-column: 1 / -1; }
.primary-button, .secondary-button { min-height: 50px; padding: 0 20px; border-radius: 11px; font-weight: 800; cursor: pointer; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.primary-button:hover, .primary-button:focus { background: var(--blue-dark); outline: 3px solid rgba(24,90,219,.18); }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.choice-row { display: flex; gap: 10px; }
.candidate-card { margin: 22px 0; padding: 20px; border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: 12px; background: #f8faff; }
.candidate-card strong, .candidate-card span { display: block; }
.candidate-card strong { font-size: 1.25rem; }
.candidate-card span { margin-top: 5px; color: var(--muted); }
.selection-summary { margin: 22px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f8faff; }
.selection-summary p { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.selection-summary p:last-child { border-bottom: 0; }
.selection-summary span { color: var(--muted); font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.selection-summary strong { line-height: 1.4; }
.compact-summary { margin-top: 0; }
.form-error { padding: 10px 12px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.quiet-notice { padding: 12px 14px; border-radius: 10px; background: #fff8e8; color: #77520b; line-height: 1.5; }
.privacy-note { margin: 0; color: rgba(255,255,255,.72); text-align: center; font-size: .8rem; }

@media (max-width: 560px) {
  .topbar-actions { width: 100%; justify-content: flex-start; }
  .brand-copy { display: none; }
  .student-header { top: 14px; left: 14px; }
  .student-shell { align-content: start; padding-top: 94px; }
  .student-card { border-radius: 18px; }
  .birthday-form { grid-template-columns: 1fr; }
  .birthday-form .primary-button { grid-column: auto; }
  .choice-row { flex-direction: column; }
}
