:root {
    --ink: #20314d;
    --muted: #697b93;
    --blue: #285fe4;
    --blue-hover: #1e4fc7;
    --border: #e2e8f1;
    --bg: #f4f7fc;
    --nav: 250px;
    --topbar: 78px;
    --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: #285cc4; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a, button, input, textarea, select, summary { outline-offset: 3px; }
:focus-visible { outline: 3px solid #91b5ff; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 28px; font-weight: 720; letter-spacing: -.65px; line-height: 1.25; }
h2 { margin-bottom: 15px; font-size: 18px; font-weight: 650; }
h3 { margin-bottom: 12px; font-size: 15px; }
p { margin-bottom: 14px; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 9px; color: #73849c; font-size: 10px; font-weight: 750; letter-spacing: 1.55px; text-transform: uppercase; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; z-index: 99; padding: 12px 18px; background: white; }
.skip-link:focus { top: 0; }

/* Application shell */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; height: var(--topbar); padding: 10px 30px 10px 22px; background: white; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 225px; color: var(--ink); font-size: 21px; font-weight: 750; letter-spacing: -.3px; }
.brand:hover { text-decoration: none; }
.brand img { width: 53px; height: 53px; object-fit: contain; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .3px; }
.account { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.account-profile { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.account-profile:hover { text-decoration: none; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #eaf0ff; color: #2a5ace; font-size: 12px; font-weight: 700; }
.account-name { font-size: 13px; font-weight: 650; line-height: 1.4; }
.account-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.account-divider { height: 28px; width: 1px; background: var(--border); }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; color: var(--ink); background: white; border: 1px solid var(--border); border-radius: 8px; }
.menu-toggle .icon { width: 21px; height: 21px; }
.shell { display: flex; min-height: calc(100vh - var(--topbar)); }
.sidebar { position: sticky; top: var(--topbar); align-self: flex-start; display: flex; flex-direction: column; width: var(--nav); min-height: calc(100vh - var(--topbar)); max-height: calc(100vh - var(--topbar)); flex: none; padding: 27px 14px 20px; background: white; border-right: 1px solid var(--border); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #dce4ef transparent; overscroll-behavior: contain; }
.sidebar-label { margin: 0 0 12px; padding: 0 15px; color: #8292a8; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 1.35px; }
.sidebar-label.account-label { padding-top: 22px; margin-top: 22px; border-top: 1px solid #edf1f7; }
.nav-item, .nav-group > summary { position: relative; display: flex; align-items: center; gap: 11px; min-height: 43px; margin: 3px 0; padding: 10px 13px; color: #576a85; font-size: 13px; font-weight: 550; border-radius: 7px; transition: background .15s, color .15s; }
.nav-item > span, .nav-group > summary > span:not(.nav-chevron) { flex: 1; min-width: 0; }
.nav-item .icon, .nav-group > summary > .icon { color: #7e90aa; }
.nav-item:hover, .nav-group > summary:hover { color: #284b83; background: #f3f6fb; text-decoration: none; }
.nav-item.active { color: #245bcf; background: #eaf1ff; font-weight: 650; }
.nav-item.active::before { content: ""; position: absolute; inset: 11px auto 11px 0; width: 3px; border-radius: 3px; background: #3266e3; }
.nav-item.active .icon, .nav-group > summary.current-group, .nav-group > summary.current-group > .icon { color: #2c5dca; }
.nav-group > summary { list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-chevron { display: inline-flex; margin-left: auto; color: #8a9ab1; }
.nav-chevron .icon { width: 14px; height: 14px; flex-basis: 14px; transition: transform .15s; }
.nav-group[open] > summary .nav-chevron .icon { transform: rotate(90deg); }
.nav-children { margin: 3px 0 8px 23px; padding-left: 10px; border-left: 1px solid #e5ebf5; }
.nav-children .nav-item { padding: 9px 10px; min-height: 39px; font-size: 12px; }
.nav-children .nav-item > .icon { display: none; }
.sidebar-footer { display: flex; align-items: flex-start; gap: 10px; margin-top: 30px; padding: 21px 13px 0; border-top: 1px solid var(--border); }
.sidebar-footer strong { display: block; color: #61738d; font-size: 11px; font-weight: 600; }
.sidebar-footer div > span { display: block; margin-top: 4px; color: #93a0b2; font-size: 10px; }
.service-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #35a77f; box-shadow: 0 0 0 3px #edf9f4; }
.nav-backdrop { display: none; }
.content { display: flex; flex-direction: column; min-width: 0; width: calc(100% - var(--nav)); }
main { flex: 1; width: 100%; max-width: 1840px; margin: 0 auto; padding: 30px 34px; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 34px; color: #91a0b4; border-top: 1px solid var(--border); font-size: 11px; }
footer span { color: var(--muted); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.page-heading p { margin-bottom: 0; }
.page-heading .eyebrow { margin-bottom: 9px; }
.page-heading .muted { margin-top: 8px; font-size: 13px; }
.title-with-count { display: flex; align-items: center; gap: 12px; }
.title-with-count h1 { margin-bottom: 0; }
.record-count { display: inline-flex; padding: 3px 9px; color: #526f9f; background: #e8eef9; border: 1px solid #dce5f5; border-radius: 6px; font-size: 11px; font-weight: 650; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel { margin-bottom: 25px; padding: 24px; background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 3px 12px #1e3b6604; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; }
.panel-heading a { font-size: 12px; font-weight: 550; }
.narrow { max-width: 760px; }

/* Forms and actions */
label { display: flex; flex-direction: column; gap: 8px; color: #53667f; font-size: 13px; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 13px; color: #263c5b; background-color: white; border: 1px solid #d6dfec; border-radius: 7px; font-size: 14px; font-weight: 400; line-height: 1.5; box-shadow: 0 1px 2px #183b6803; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #92a0b4; opacity: 1; }
input:not([type=checkbox]):hover, select:hover, textarea:hover { border-color: #b9cae3; }
input:not([type=checkbox]):focus, select:focus, textarea:focus { border-color: #729af1; outline: none; box-shadow: 0 0 0 3px #285fe414; }
input:disabled, select:disabled, textarea:disabled { color: #8b98ab; background-color: #f4f6fa; cursor: not-allowed; }
input[readonly], textarea[readonly] { background-color: #f8fafd; }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236c7d96' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
select[multiple] { background-image: none; padding-right: 13px; }
textarea { resize: vertical; min-height: 90px; }
input[type=checkbox] { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); vertical-align: middle; cursor: pointer; }
input[type=file] { padding: 6px; font-size: 12px; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 6px 10px; color: #4a6285; background: #f0f4fb; border: 0; border-radius: 4px; font: inherit; cursor: pointer; }
input.input-validation-error, select.input-validation-error, textarea.input-validation-error { border-color: #d65b6a; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 17px; color: white; background: var(--blue); border: 1px solid var(--blue); border-radius: 7px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; text-decoration: none; box-shadow: 0 2px 3px #285fe40a; transition: background .15s, border-color .15s, box-shadow .15s; }
.button:hover { color: white; background: var(--blue-hover); border-color: var(--blue-hover); text-decoration: none; box-shadow: 0 3px 8px #285fe419; }
.button:active { box-shadow: none; }
.button.secondary { color: #496182; background: white; border-color: #d5dfed; box-shadow: 0 1px 2px #183b6804; }
.button.secondary:hover { color: #31558b; background: #f6f9ff; border-color: #b9cce9; }
.button.ghost { color: #526c92; background: transparent; border-color: transparent; box-shadow: none; }
.button.ghost:hover { color: #2558b6; background: #edf3ff; border-color: #e3ecfd; }
.button.danger { color: #b53c51; background: #fff3f5; border-color: #f9dce1; box-shadow: none; }
.button.danger:hover { color: #a8253d; background: #ffe8ed; border-color: #efbac6; }
.button.small { min-height: 33px; gap: 6px; padding: 6px 10px; border-radius: 6px; font-size: 12px; }
.button.small .icon { width: 15px; height: 15px; flex-basis: 15px; }
.button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.text-button { padding: 0; color: #285cc4; background: none; border: 0; font-size: 12px; }
.text-button.danger { color: #b53c51; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.stack .muted { margin: 0; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { flex-direction: row; align-items: center; gap: 10px; min-height: 40px; font-weight: 500; }
.inline-form { display: flex; align-items: end; gap: 10px; }
.inline-form input { max-width: 115px; }
.notice { margin-bottom: 22px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.notice.readonly { display: flex; align-items: center; gap: 10px; color: #5874a0; background: #eef4ff; border-color: #dce7fd; }
.notice.readonly .icon { width: 16px; height: 16px; flex-basis: 16px; color: #6684b6; }
.notice.readonly strong { color: #426395; font-weight: 600; }
.notice.success { display: flex; align-items: center; gap: 10px; color: #19734e; background: #effaf4; border-color: #cfebdc; }
.validation { color: #ad3349; font-size: 13px; }
.validation ul { margin: 0; padding-left: 20px; }
.validation:empty, .validation-summary-valid { display: none; }
.badge { display: inline-block; padding: 4px 10px; color: #5d7496; background: #edf2fb; border-radius: 5px; font-size: 11px; font-weight: 550; white-space: nowrap; }
.badge.good { color: #18754c; background: #e9f9f0; }
.badge.review { color: #8d6419; background: #fff4db; }

/* Search, records and pagination */
.toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin: 0 0 22px; }
.toolbar label { min-width: 170px; }
.toolbar .search { flex: 1 1 300px; max-width: 560px; }
.toolbar .status-filter { flex: 0 1 190px; }
.toolbar-actions { display: flex; align-items: center; gap: 6px; }
.input-with-icon { position: relative; display: block; }
.input-with-icon > .icon { position: absolute; left: 14px; top: 50%; z-index: 1; transform: translateY(-50%); color: #8b9bb4; pointer-events: none; }
.input-with-icon > input { padding-left: 42px !important; }
.records-panel { padding: 0; overflow: hidden; }
.records-toolbar { margin: 0; padding: 22px 24px 18px; }
.records-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 0 24px 16px; color: #8090a7; font-size: 12px; }
.records-summary strong { color: #536984; font-weight: 550; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 8px; color: #5274aa; background: #eff4ff; border: 1px solid #e0e9fd; border-radius: 5px; font-size: 11px; }
.filter-chip > .icon, .filter-chip a > .icon { width: 13px; height: 13px; flex-basis: 13px; }
.filter-chip a { display: inline-flex; padding: 2px; color: #6f87ad; border-radius: 3px; }
.filter-chip a:hover { background: #dfeaff; }
.table-wrap { overflow: auto; scrollbar-width: thin; scrollbar-color: #cad5e4 #f7f9fc; }
.table-wrap:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf1f7; vertical-align: top; overflow-wrap: anywhere; }
th { color: #697e9b; background: #f6f8fc; font-size: 11px; font-weight: 650; letter-spacing: .15px; }
td { max-width: 400px; color: #526782; white-space: pre-wrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { background: white; }
tbody tr:hover { background: #f8faff; }
.records-table { max-height: min(66vh, 800px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.data-table { font-size: 13px; line-height: 1.6; }
.data-table th, .data-table td { padding: 14px 18px; }
.data-table th { position: sticky; top: 0; z-index: 2; padding-top: 13px; padding-bottom: 13px; color: #657895; background: #f5f8fd; font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 -1px #e1e8f3; }
.data-table th:first-child, .data-table td:first-child { padding-left: 24px; }
.data-table td { vertical-align: middle; }
.data-table .cell-name { min-width: 145px; color: #344d70; font-weight: 550; }
.data-table .cell-email { min-width: 195px; }
.data-table .cell-category { min-width: 170px; }
.data-table .cell-question { min-width: 280px; max-width: 460px; }
.data-table .cell-answer { min-width: 185px; max-width: 360px; }
.data-table .cell-extra { min-width: 90px; max-width: 170px; }
.data-table td.action-col { position: sticky; right: 0; z-index: 1; min-width: 150px; max-width: 250px; padding-right: 22px; background: inherit; border-left: 1px solid #edf1f7; white-space: normal; }
.data-table th.action-col { position: sticky; right: 0; z-index: 3; border-left: 1px solid #e7edf5; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.row-actions form { display: inline-flex; margin: 0; }
.row-actions .button { font-size: 11px; }
.empty-value { color: #c1cad7; font-size: 12px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid transparent; border-radius: 5px; font-size: 11px; font-weight: 550; line-height: 1.6; white-space: nowrap; }
.status-badge.is-active { color: #23865f; background: #edf9f3; border-color: #d8efe3; }
.status-badge.is-inactive { color: #7a8ba3; background: #f2f5f9; border-color: #e5eaf2; }
.status-badge.is-warning { color: #ac7820; background: #fff7e6; border-color: #f5e8ca; }
.status-dot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor; }
.empty { padding: 35px 20px; text-align: center; color: #8392a8; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 24px; color: #71839f; font-size: 13px; }
.empty-state strong { margin-top: 5px; color: #405978; font-size: 15px; font-weight: 600; }
.empty-state p { margin: 0 0 5px; }
.empty-icon { display: grid; place-items: center; width: 49px; height: 49px; color: #7899d0; background: #f0f5ff; border-radius: 12px; }
.empty-icon .icon { width: 23px; height: 23px; }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding: 18px 24px; color: #7b8ca5; font-size: 12px; }
.page-summary strong { color: #516b8d; font-weight: 550; }
.page-size { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--border); color: #9aa7b9; font-size: 11px; }
.page-nav { display: flex; align-items: center; gap: 5px; }
.page-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 34px; min-height: 34px; padding: 5px 9px; color: #6a7f9e; background: white; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
a.page-link:hover { background: #f1f5ff; color: #2a5dc9; border-color: #e1e9fa; text-decoration: none; }
.page-link.current { color: #285fe4; background: #edf3ff; border-color: #dbe6ff; font-weight: 650; }
.page-link.disabled { color: #bec7d4; cursor: default; }
.page-link .icon { width: 14px; height: 14px; flex-basis: 14px; }
.page-ellipsis { padding: 0 3px; color: #a8b4c6; }

/* Dashboard and supporting pages */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 25px; }
.metric { display: flex; flex-direction: column; padding: 22px 22px 0; overflow: hidden; color: white; border-radius: 9px; box-shadow: 0 4px 12px #12223d09; }
.metric:hover { color: white; text-decoration: none; filter: brightness(1.04); }
.metric > span { color: #fffD; font-size: 13px; }
.metric > strong { font-size: 34px; line-height: 1.5; letter-spacing: -.5px; }
.metric > small { margin: 14px -22px 0; padding: 10px 22px; background: #00000010; font-size: 11px; }
.metric.blue { background: #3265d9; }
.metric.amber { background: #c89124; }
.metric.green { background: #21956e; }
.metric.slate { background: #536d91; }
.line-chart { height: 240px; position: relative; }
.chart-data { margin-top: 15px; color: var(--muted); font-size: 12px; }
.chart-data summary { cursor: pointer; }
.month-counts { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; margin-top: 14px; }
.month-counts span { text-align: center; }
.month-counts strong { display: block; color: var(--ink); }
.graph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.graph-card { padding: 20px; border: 1px solid var(--border); border-radius: 8px; }
.graph-card h3 { min-height: 36px; font-size: 13px; line-height: 1.6; }
.graph-body { display: flex; align-items: center; justify-content: center; gap: 28px; }
.donut { display: grid; place-items: center; position: relative; width: 130px; height: 130px; flex: none; border-radius: 50%; }
.donut > span { display: flex; align-items: center; justify-content: center; flex-direction: column; width: 92px; height: 92px; background: white; border-radius: 50%; font-size: 24px; font-weight: 650; }
.donut small { color: var(--muted); font-size: 10px; font-weight: 400; }
.legend { display: grid; grid-template-columns: auto auto; gap: 8px 25px; font-size: 12px; }
.legend dt { display: flex; align-items: center; gap: 8px; }
.legend dd { margin: 0; font-weight: 650; }
.key { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.key.yes { background: #2563eb; }
.key.no { background: #d99b21; }
.key.other { background: #dce3ed; }
.details { display: grid; grid-template-columns: 180px 1fr; gap: 0; margin: 0 0 24px; font-size: 13px; }
.details dt, .details dd { padding: 10px 0; border-bottom: 1px solid var(--border); }
.details dt { color: var(--muted); }
.details dd { margin: 0; white-space: pre-wrap; }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.score-total { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 16px 20px; background: #edf4ff; border: 1px solid #dfe9fd; border-radius: 7px; }
.score-total > span { margin-left: auto; }

/* Printable reports */
.report-paper { max-width: 1000px; margin: 0 auto; padding: 38px; color: #192a43; background: white; border: 1px solid var(--border); }
.report-heading { display: flex; align-items: center; justify-content: center; gap: 28px; margin-bottom: 30px; padding-bottom: 20px; text-align: center; border-bottom: 3px solid #253d60; }
.report-heading img { width: 95px; height: 95px; object-fit: contain; }
.report-heading h2 { margin-bottom: 4px; font-size: 23px; }
.report-heading h3 { margin-bottom: 6px; font-size: 18px; }
.report-heading p { margin: 0; font-size: 11px; }
.report-title { text-align: center; font-size: 20px; }
.report-period { margin: 0 0 26px; text-align: center; color: var(--muted); }
.report-section { margin: 28px 0; }
.report-section h3 { padding: 10px 0; border-bottom: 2px solid #c7d5e6; font-size: 14px; }
.report-table th, .report-table td { border: 1px solid #bdcddd; font-size: 11px; }
.answer-list { padding-left: 22px; font-size: 12px; }
.answer-list li { margin: 14px 0; }
.answer { margin: 8px 0 15px; white-space: pre-wrap; font-size: 12px; }
.signatures { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 40px; font-size: 11px; }

/* Sign-in and recovery */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 40px 20px; background: radial-gradient(ellipse at 20% 20%, #e4ecff, transparent 55%), #f3f7fc; }
.auth-card { width: 100%; max-width: 440px; padding: 38px 40px; background: white; border: 1px solid #e0e8f4; border-radius: 12px; box-shadow: 0 15px 60px #23395d0b; }
.auth-logo { display: block; width: 95px; height: 95px; margin: 0 auto 24px; object-fit: contain; }
.auth-card > .eyebrow { text-align: center; }
.auth-card h1 { margin: 18px 0 8px; font-size: 26px; }
.auth-card > .muted { margin-bottom: 25px; font-size: 13px; }
.auth-card .stack { gap: 18px; }
.auth-card .stack > a { text-align: center; font-size: 12px; }
.error-panel { padding: 40px; }
.error-panel h1 { font-size: 24px; }
[hidden] { display: none !important; }

@media (min-width: 1800px) {
    .data-table { font-size: 14px; }
    .data-table th { font-size: 12px; }
    .nav-item, .nav-group > summary { font-size: 14px; }
}
@media (max-width: 1200px) {
    :root { --nav: 228px; }
    main { padding: 26px 24px; }
    .topbar { padding-right: 24px; }
    .brand { min-width: 208px; }
    .metrics { gap: 13px; }
    .metric { padding: 18px 17px 0; }
    .metric small { margin-left: -17px; margin-right: -17px; padding-left: 17px; }
    .metric strong { font-size: 29px; }
    .score-grid { grid-template-columns: 1fr 1fr; }
    .graph-body { gap: 16px; }
    .page-size { display: none; }
    .records-toolbar { padding: 20px; }
    .records-summary { padding-right: 20px; padding-left: 20px; }
    .pagination { padding: 17px 20px; }
}
@media (max-width: 980px) {
    :root { --topbar: 72px; }
    .topbar { gap: 12px; padding: 9px 18px; }
    .brand { min-width: 0; flex: 1; font-size: 19px; gap: 9px; }
    .brand img { width: 45px; height: 45px; }
    .menu-toggle { display: inline-flex; order: -1; }
    .account { gap: 12px; }
    .account-name, .account-divider { display: none; }
    .sidebar { position: fixed; top: var(--topbar); bottom: 0; left: 0; z-index: 25; display: none; width: 260px; max-height: calc(100dvh - var(--topbar)); }
    .nav-open .sidebar { display: flex; box-shadow: 12px 0 40px #1b2c4e18; }
    .nav-open .nav-backdrop { position: fixed; inset: var(--topbar) 0 0; z-index: 24; display: block; width: 100%; padding: 0; background: #1b2c4e45; border: 0; }
    body.nav-open { overflow: hidden; }
    .content { width: 100%; }
    .page-heading { align-items: flex-start; }
    .graph-grid { grid-template-columns: 1fr; }
    .pagination { gap: 12px; }
}
@media (max-width: 680px) {
    .topbar { padding-right: 13px; padding-left: 13px; gap: 9px; }
    .brand { font-size: 17px; }
    .brand img { width: 39px; height: 39px; }
    .brand small { font-size: 9px; }
    .account { gap: 8px; }
    .avatar { width: 32px; height: 32px; font-size: 10px; }
    .signout-button span { display: none; }
    .signout-button.button.small { width: 35px; height: 35px; padding: 6px; }
    main { padding: 22px 15px; }
    h1 { font-size: 24px; }
    .page-heading { flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
    .page-heading > .actions { width: 100%; }
    .page-heading > .actions > .button { flex: 1; }
    .metrics { grid-template-columns: 1fr 1fr; gap: 11px; }
    .metric span { font-size: 12px; }
    .metric strong { font-size: 29px; }
    .metric small { font-size: 10px; }
    .panel { padding: 20px 17px; }
    .records-panel { padding: 0; }
    .records-toolbar { padding: 18px 17px 16px; gap: 14px; }
    .records-toolbar .search { flex: 1 1 100%; max-width: none; min-width: 0; }
    .records-toolbar .status-filter { flex: 1 1 140px; }
    .toolbar-actions { flex: 1; }
    .toolbar-actions > .button { flex: 1; }
    .records-summary { padding: 0 17px 14px; font-size: 11px; }
    .records-table { max-height: 62vh; }
    .data-table th:first-child, .data-table td:first-child { padding-left: 17px; }
    .data-table td.action-col { position: static; min-width: 130px; }
    .data-table th.action-col { position: sticky; right: auto; }
    .pagination { padding: 16px 17px; justify-content: center; }
    .page-summary { width: 100%; text-align: center; font-size: 11px; }
    .page-link { min-width: 29px; min-height: 32px; padding: 5px 7px; font-size: 11px; }
    .page-direction > span { display: none; }
    .page-nav { gap: 3px; }
    .form-grid, .score-grid { grid-template-columns: 1fr; }
    .score-total { font-size: 12px; gap: 10px; }
    .score-total > span { margin-left: 0; }
    .details { grid-template-columns: 130px 1fr; font-size: 12px; }
    .report-paper { padding: 20px; }
    .report-heading { gap: 15px; }
    .report-heading img { width: 60px; height: 60px; }
    .report-heading h2 { font-size: 17px; }
    .report-heading h3 { font-size: 14px; }
    .report-heading p { font-size: 9px; }
    .month-counts { grid-template-columns: repeat(6, 1fr); }
    .auth-card { padding: 30px 25px; }
    footer { padding: 18px 15px; flex-wrap: wrap; }
    .notice.readonly { align-items: flex-start; gap: 8px; flex-wrap: wrap; }
    .notice.readonly > span { flex-basis: 100%; padding-left: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
    @page { size: A4; margin: 15mm; }
    body { color: black; background: white; font-size: 11pt; }
    .topbar, .sidebar, .nav-backdrop, footer, .notice, .no-print, .skip-link { display: none !important; }
    .content { display: block; width: 100%; }
    .shell, main { display: block; max-width: none; min-height: 0; margin: 0; padding: 0; }
    .report-paper { max-width: none; margin: 0; padding: 0; border: 0; }
    .report-heading, tr, .signatures, .details dt, .details dd { break-inside: avoid; }
    .report-section h3 { break-after: avoid; }
    .report-section { margin: 20px 0; }
    table { table-layout: fixed; }
    .report-table td, .report-table th { font-size: 9pt; }
    .answer { font-size: 10pt; }
    .records-table { max-height: none; overflow: visible; }
    .data-table th, .data-table td.action-col { position: static; }
    a { color: black; text-decoration: none; }
    thead { display: table-header-group; }
}
