:root {
    color-scheme: light;
    --ink: #123344;
    --muted: #496171;
    --brand: #006e65;
    --brand-deep: #00574f;
    --brand-light: #dcefe8;
    --canvas: #f4f7f8;
    --surface: #ffffff;
    --stroke: #c9d8dd;
    --control: #778e98;
    --error: #a42628;
    --error-bg: #fff1f0;
    --focus: #a64b00;
    --radius: 1rem;
    --font: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font: 1rem/1.53 var(--font);
    -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-deep); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: .15em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -.024em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.16rem; }
p { margin-bottom: 1rem; }
ul { padding-inline-start: 1.22em; }
.wrap { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.skip-link {
    position: absolute;
    z-index: 10;
    inset: .75rem auto auto .75rem;
    transform: translateY(-200%);
    background: var(--surface);
    padding: .75rem 1rem;
}
.skip-link:focus { transform: none; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--stroke); }
.header-inner, .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 2rem;
    min-height: 5.25rem;
    padding-block: .75rem;
}
.wordmark { display: inline-flex; align-items: center; font-weight: 750; }
.wordmark img, img.wordmark { width: min(47vw, 14rem); height: auto; max-height: 6.4rem; object-fit: contain; }
.header-links { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.65rem; font-size: .95rem; }
.hero { background: linear-gradient(115deg, #e1f1e9 0%, #eff6f3 64%, #e8f0f6 100%); border-bottom: 1px solid var(--stroke); }
.hero-inner { padding-block: clamp(2.35rem, 6vw, 4.25rem); }
.hero-kicker { color: var(--brand-deep); margin-bottom: .85rem; font-size: 1rem; font-weight: 720; }
.hero h1 { max-width: 21ch; margin: 0 0 .7rem; }
.hero-copy { max-width: 64ch; margin-bottom: 0; color: #385265; font-size: clamp(1.02rem, 2.5vw, 1.25rem); }
.hero p:last-child { margin-bottom: 0; }
.page-content { padding-block: clamp(1.55rem, 4vw, 3rem) clamp(2.5rem, 6vw, 5rem); }
.portal-layout { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(15rem, 1fr); gap: clamp(1.1rem, 3vw, 2.15rem); align-items: start; }
.portal-primary, .portal-aside { min-width: 0; }
.portal-aside { display: grid; gap: 1rem; }
.panel, .form-section, .status-panel, .side-panel, .receipt-card, .prose {
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    background: var(--surface);
    padding: clamp(1.1rem, 3.5vw, 2rem);
}
.side-panel { padding: 1.35rem; }
.side-panel h2 { font-size: 1.18rem; margin-bottom: .7rem; }
.side-panel p { font-size: .95rem; margin-bottom: .85rem; }
.side-panel p:last-child, .panel > :last-child, .form-section > :last-child, .status-panel > :last-child { margin-bottom: 0; }
.side-panel a, .site-footer a { overflow-wrap: anywhere; }
.side-panel ul { margin: 0; }
.side-panel li + li { margin-top: .38rem; }
.section-intro { color: var(--muted); margin-bottom: 1.3rem; }
.form-stack { display: grid; gap: 1.12rem; }
.form-section { min-inline-size: 0; }
.form-section h2, .status-panel h2 { margin-bottom: .65rem; }
.status-panel { position: relative; border-top: 4px solid var(--brand); }
.status-panel p { max-width: 64ch; }
.status-line { color: var(--brand-deep); font-weight: 700; }
.status-panel .status-line { margin-bottom: .7rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.15rem; align-items: start; }
.field, .field-wide { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
label, legend { color: var(--ink); font-weight: 680; }
.field > label, .field-wide > label { display: block; margin-bottom: .4rem; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
    width: 100%;
    min-width: 0;
    min-height: 2.85rem;
    padding: .58rem .72rem;
    border: 1px solid var(--control);
    border-radius: .5rem;
    color: var(--ink);
    background: var(--surface);
}
input:not([type=radio]):not([type=checkbox]):hover, select:hover, textarea:hover { border-color: var(--brand-deep); }
input[type=date] { min-inline-size: 9.4rem; }
input[type=checkbox], input[type=radio] { min-width: 1.11rem; width: 1.11rem; height: 1.11rem; flex: 0 0 1.11rem; margin: .19rem 0 0; accent-color: var(--brand-deep); }
input[type=file] { cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; color: var(--brand-deep); border: 1px solid var(--stroke); background: #f0f7f4; padding: .34rem .6rem; margin-right: .58rem; border-radius: .36rem; cursor: pointer; }
textarea { min-height: 6.8rem; resize: vertical; display: block; }
.field-hint { margin: .42rem 0 0; color: var(--muted); font-size: .92rem; }
.required-mark { font-weight: 800; color: var(--brand-deep); }
.field-error { color: var(--error); font-size: .94rem; font-weight: 650; margin: .45rem 0 0; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error) !important; }
.choice-group { border: 0; margin: 0; min-inline-size: 0; padding: 0; }
.choice-group legend { margin-bottom: .4rem; padding: 0; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.choice, .check-row { display: flex; gap: .7rem; align-items: start; }
.choice {
    min-height: 2.85rem;
    border: 1px solid var(--stroke);
    border-radius: .56rem;
    padding: .64rem .68rem;
    line-height: 1.35;
    cursor: pointer;
}
.choice:hover, .choice:has(:checked) { border-color: var(--brand); background: #f0f7f4; }
.check-row + .check-row { margin-top: .95rem; }
.check-row label { font-weight: 530; }
.check-row input { margin-top: .26rem; }
.field-tags { color: var(--muted); font-size: .89rem; font-weight: 500; }
.help-box { margin-top: .8rem; border-inline-start: 3px solid var(--brand); border-radius: 0 .45rem .45rem 0; background: #edf5f2; padding: .64rem .8rem; font-size: .93rem; }
.help-box p { margin-bottom: 0; }
.attachment { padding: .85rem; background: #f4f8f7; border: 1px dashed #86a9a3; border-radius: .7rem; }
.attachment .field-hint:first-of-type { margin: 0 0 .7rem; }
.replacement > summary { color: var(--ink); font-size: 1.02rem; font-weight: 700; cursor: pointer; }
.replacement[open] summary { margin-bottom: 1rem; }
.replacement > p { margin-bottom: 1rem; }
.replacement input { font-size: .97rem; }
.submit-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 1.15rem; }
.actions { display: flex; gap: .66rem 1rem; flex-wrap: wrap; align-items: center; }
.button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--brand-deep);
    border-radius: .55rem;
    min-height: 2.75rem;
    padding: .57rem .93rem;
    text-decoration: none;
    font-weight: 700;
    color: #fff;
    background: var(--brand-deep);
}
.button:hover, .btn:hover { background: #06473f; }
.button:disabled, .btn:disabled { opacity: .64; cursor: wait; }
.button-secondary, .btn-secondary { background: var(--surface); color: var(--brand-deep); }
.button-secondary:hover, .btn-secondary:hover { background: #edf5f2; }
.alert, .error-summary { border: 1px solid var(--stroke); border-radius: .65rem; padding: .88rem 1.07rem; margin-block: 0 1rem; background: #eef5f4; }
.error-summary { border-color: #cf8885; background: var(--error-bg); }
.error-summary h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.error-summary ul { margin-bottom: 0; }
.error-summary a { color: var(--error); }
.error-summary p:last-child { margin-bottom: 0; }
.site-footer { background: #eaf1f2; border-top: 1px solid var(--stroke); }
.footer-inner { font-size: .91rem; padding-block: 1.4rem; }
.footer-inner p { margin-bottom: .2rem; }
.footer-inner strong { color: var(--ink); }
.site-footer nav, .footer-links { display: flex; flex-wrap: wrap; gap: .55rem 1rem; }
.receipt-card, .prose { max-width: 53rem; margin-inline: auto; }
.receipt-card code { overflow-wrap: anywhere; }
.receipt-card dt { font-weight: 710; }
.receipt-card dd { margin: 0 0 .7rem; }
.prose li + li { margin-block-start: .35rem; }
.prose h2 { margin-top: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

@media (min-width: 56rem) {
    .portal-aside { position: sticky; top: 1.4rem; }
}
@media (max-width: 55.99rem) {
    .portal-layout { grid-template-columns: minmax(0, 1fr); }
    .portal-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
    .wrap { width: min(100% - 1.4rem, 72rem); }
    .header-inner { gap: .5rem; min-height: 4.25rem; }
    .wordmark img, img.wordmark { max-height: 4.65rem; }
    .header-links { justify-content: flex-end; gap: .32rem .75rem; font-size: .88rem; }
    .hero-inner { padding-block: 1.9rem; }
    .portal-aside, .field-grid, .choices { grid-template-columns: minmax(0, 1fr); }
    .footer-inner { align-items: start; flex-direction: column; }
}
@media print {
    .site-header, .site-footer, .hero, .button, .btn, .portal-aside { display: none !important; }
    .wrap { width: 100%; }
    body, .panel, .receipt-card, .prose { background: #fff; color: #111; border: 0; }
    .receipt-card, .prose, .page-content { padding: 0; }
}

.organization-fields { display: grid; gap: .85rem; }
#organization-filter label { display: block; margin-bottom: .4rem; }
#organization-manual { padding: .85rem; background: #f4f8f7; border-radius: .55rem; }

.area-label { margin: 0 0 .4rem; font-weight: 680; }
.area-output { display: block; min-height: 2.85rem; padding: .58rem .72rem; border: 1px solid var(--stroke); border-radius: .5rem; color: var(--brand-deep); background: #f0f7f4; font-weight: 680; }
