:root { color-scheme: light; --ink:#163244; --muted:#526775; --accent:#116b70; --line:#cbd8df; --surface:#fff; --page:#f3f7f8; }
* { box-sizing:border-box; }
body { margin:0; background:var(--page); color:var(--ink); font:1rem/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color:var(--accent); text-underline-offset:.18em; overflow-wrap:anywhere; }
a:hover { text-decoration-thickness:2px; }
header { display:flex; align-items:center; flex-wrap:wrap; gap:1rem 2rem; padding:1rem clamp(1rem,3vw,2.5rem); background:var(--surface); border-bottom:1px solid var(--line); }
.wordmark { font-size:1.5rem; font-weight:750; letter-spacing:-.04em; text-decoration:none; color:var(--ink); }
main { width:100%; max-width:1200px; min-width:0; margin:0 auto; padding:clamp(1rem,3vw,2rem); }
h1,h2,h3 { line-height:1.25; overflow-wrap:anywhere; }
h1 { font-size:clamp(1.65rem,3vw,2.2rem); margin:.5rem 0 1rem; }
h2 { font-size:1.25rem; margin:0 0 1rem; }
h3 { font-size:1.1rem; margin:1.25rem 0 .5rem; }
p { margin:.65rem 0; overflow-wrap:anywhere; }
.card,.notice { min-width:0; margin:1.25rem 0; padding:clamp(1rem,2.5vw,1.5rem); border:1px solid var(--line); border-radius:.65rem; background:var(--surface); }
.notice { background:#e8f4f3; border-left:4px solid var(--accent); }
.warning,.gap { color:#79380a; }
p.warning { padding:.8rem 1rem; background:#fff3df; border-left:4px solid #ae5a0c; border-radius:.25rem; }
.muted,.helper { color:var(--muted); }
.small,.helper { font-size:.875rem; }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:1rem; }
.cards .card { margin:0; }
form { min-width:0; }
form p { margin:0 0 1rem; }
label { display:block; margin-bottom:.35rem; font-weight:600; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),textarea,select { display:block; width:100%; max-width:100%; min-width:0; padding:.65rem .75rem; border:1px solid #8da4af; border-radius:.35rem; background:white; color:var(--ink); font:inherit; }
textarea { resize:vertical; }
input[type=month],input[type=date] { min-height:46px; }
input[type=checkbox],input[type=radio] { margin-right:.4rem; }
button,.button { display:inline-block; max-width:100%; padding:.65rem 1rem; border:1px solid var(--accent); border-radius:.35rem; background:var(--accent); color:white; font:600 .95rem/1.4 system-ui,sans-serif; text-decoration:none; cursor:pointer; text-align:center; white-space:normal; }
button:disabled { opacity:.6; cursor:not-allowed; }
button.secondary,.button.secondary { background:white; color:var(--accent); }
:focus-visible { outline:3px solid #176da0; outline-offset:3px; }
.filters { display:flex; align-items:end; flex-wrap:wrap; gap:1rem; }
.filters>p,.filters>div { flex:1 1 220px; margin:0; min-width:0; }
.filters>button { flex:0 1 auto; }
dl { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); gap:.5rem 1.5rem; }
dt { font-weight:600; }
dd { margin:0; overflow-wrap:anywhere; }
table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:.94rem; }
th,td { padding:.65rem .5rem; vertical-align:top; text-align:left; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
th { background:#edf3f5; font-size:.875rem; }
.table-wrap { overflow-x:auto; max-width:100%; }
.table-wrap:focus-visible { outline-offset:0; }
.errorlist { color:#8b2222; padding-left:1.2rem; }
.entry { min-height:100vh; display:grid; place-items:center; padding:1.25rem; }
.entry-content { width:100%; max-width:440px; padding:clamp(1rem,4vw,2rem); background:white; border:1px solid var(--line); border-radius:.75rem; }
.brand-logo { display:block; margin-bottom:1.5rem; font-size:2rem; font-weight:750; color:var(--ink); text-decoration:none; }
.package-links { display:flex; flex-wrap:wrap; gap:.75rem; }
.report-preview { width:100%; height:70vh; border:1px solid var(--line); }
img,canvas { max-width:100%; height:auto; }
@media(max-width:600px) {
 header { padding:1rem; }
 header .portal-brand-nav { flex-wrap:wrap; flex-shrink:1; min-width:0; }
 header .portal-main-nav { gap:.75rem 1rem; }
 header .portal-main-nav a,header .portal-main-nav button { white-space:normal; }
 header .portal-main-nav a { max-width:100%; }
 main { padding:1rem; }
 .filters { display:block; }
 .filters>p,.filters>div { margin-bottom:1rem; }
 .filters>button { width:100%; }
 dl { grid-template-columns:minmax(0,1fr); gap:.2rem; }
 dd { margin-bottom:.8rem; }
 /* Preserve readable columns inside a bounded, keyboard-scrollable region. */
 .table-wrap table:has(th:nth-child(5)) { min-width:640px; }
 .table-wrap:has(table) { overscroll-behavior-x:contain; }
}
