:root {
    --ink: #172033;
    --muted: #5c667a;
    --navy: #17365d;
    --navy-dark: #102744;
    --blue-soft: #edf4fb;
    --gold: #b58b34;
    --border: #d8dee8;
    --surface: #ffffff;
    --surface-alt: #f5f7fa;
    --danger: #8b1f2d;
    --success-bg: #e8f5ed;
    --success: #28613d;
    --shadow: 0 12px 32px rgba(23, 32, 51, 0.08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--surface-alt);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(23, 54, 93, 0.08), transparent 28rem),
        var(--surface-alt);
    color: var(--ink);
    line-height: 1.55;
}

a { color: var(--navy); }
a:hover { color: var(--navy-dark); }

.shell {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 1000;
    transform: translateY(-160%);
    background: var(--navy-dark);
    color: #fff;
    padding: .7rem 1rem;
    border-radius: .4rem;
}
.skip-link:focus { transform: none; }

.site-header {
    background: var(--navy-dark);
    color: #fff;
    border-bottom: 4px solid var(--gold);
}

.site-header__inner {
    min-height: 78px;
    display: flex;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    color: #fff;
    text-decoration: none;
}
.brand:hover { color: #fff; }

.brand__mark {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: .03em;
}

.brand__title,
.brand__subtitle { display: block; }
.brand__title { font-weight: 750; letter-spacing: .01em; }
.brand__subtitle { color: #cad4e2; font-size: .82rem; }

.main-content { padding-block: 3.5rem 4.5rem; }

.hero { max-width: 800px; margin-bottom: 1.6rem; }
.hero__eyebrow,
.section-kicker {
    margin: 0 0 .35rem;
    color: var(--gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .78rem;
}

h1, h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy-dark);
    line-height: 1.16;
}

h1 { font-size: clamp(2.2rem, 5vw, 4.15rem); margin: 0; letter-spacing: -.035em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 0; }

.hero__lead {
    margin: 1rem 0 0;
    max-width: 720px;
    color: var(--muted);
    font-size: 1.1rem;
}

.notice {
    margin-block: 1.7rem 2rem;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--gold);
    background: #fffaf0;
    border-radius: 0 .65rem .65rem 0;
    color: #4b4650;
}

.search-card,
.results-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.search-card { padding: clamp(1.25rem, 3vw, 2rem); }
.results-card { margin-top: 1.5rem; overflow: hidden; }

.section-heading,
.results-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
}

.section-heading { margin-bottom: 1.5rem; }
.section-heading > p,
.data-date { margin: 0; color: var(--muted); font-size: .92rem; }
.section-heading > p { max-width: 360px; }

fieldset { border: 0; padding: 0; margin: 0; }

.search-option label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 750;
    color: var(--navy-dark);
}

input {
    width: 100%;
    min-height: 48px;
    padding: .7rem .8rem;
    border: 1px solid #aeb8c7;
    border-radius: .55rem;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input:focus {
    outline: 3px solid rgba(23, 54, 93, .18);
    border-color: var(--navy);
}

.name-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.or-divider {
    position: relative;
    display: grid;
    place-items: center;
    margin: 1.3rem 0;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .08em;
}
.or-divider::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    height: 1px;
    background: var(--border);
}
.or-divider span { position: relative; background: #fff; padding: 0 .8rem; }

.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .7rem 1.1rem;
    border-radius: .55rem;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.button--primary { background: var(--navy); color: #fff; }
.button--primary:hover { background: var(--navy-dark); color: #fff; }
.button--secondary { background: #fff; color: var(--navy); border-color: #aeb8c7; }
.button--secondary:hover { background: var(--blue-soft); color: var(--navy-dark); }

.validation-summary:empty,
.field-validation:empty { display: none; }
.validation-summary {
    margin-bottom: 1rem;
    border: 1px solid #dca8af;
    background: #fff3f4;
    color: var(--danger);
    border-radius: .6rem;
    padding: .75rem 1rem;
}
.validation-summary ul { margin: 0; padding-left: 1.25rem; }
.field-validation { display: block; color: var(--danger); margin-top: .35rem; font-size: .88rem; }

.results-header {
    padding: 1.4rem 1.6rem;
    border-bottom: 1px solid var(--border);
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem 1.15rem; text-align: left; border-bottom: 1px solid var(--border); }
th {
    background: var(--surface-alt);
    color: var(--muted);
    font-size: .77rem;
    letter-spacing: .055em;
    text-transform: uppercase;
}
tbody tr:last-child td { border-bottom: 0; }

.status-badge {
    display: inline-block;
    padding: .28rem .55rem;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success);
    font-size: .82rem;
    font-weight: 800;
}

.status-message { padding: 2rem; }
.status-message h1,
.status-message h2 { margin-bottom: .6rem; }
.status-message p { margin: 0; color: var(--muted); }
.status-message p + p { margin-top: 1rem; }
.status-message--error { border-left: 4px solid var(--danger); }

.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font-size: .88rem;
    padding-block: 1.3rem;
}
.site-footer p { margin: 0; }

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

@media (max-width: 700px) {
    .main-content { padding-block: 2.2rem 3rem; }
    .name-grid { grid-template-columns: 1fr; }
    .section-heading,
    .results-header { align-items: flex-start; flex-direction: column; gap: .7rem; }

    table, thead, tbody, th, td, tr { display: block; }
    thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    tbody tr { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
    tbody tr:last-child { border-bottom: 0; }
    td {
        display: grid;
        grid-template-columns: minmax(110px, .8fr) 1.4fr;
        gap: .7rem;
        padding: .5rem 0;
        border: 0;
    }
    td::before { content: attr(data-label); color: var(--muted); font-weight: 750; font-size: .82rem; }
}


.field-hint {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
