:root {
    --ink: #14202b;
    --paper: #f7f4ee;
    --card: #ffffff;
    --line: #cfc8bc;
    --navy: #10243a;
    --navy-2: #1b3a5a;
    --gold: #e2b657;
    --focus: #10243a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.5;
}

h1, h2, h3 {
    font-family: Georgia, "Iowan Old Style", Palatino, serif;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--navy);
}

h1 { font-size: 2.15rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.45rem; margin: 0; }
h3 { font-size: 1.2rem; margin: 0 0 0.35rem; }

p { margin: 0 0 0.75rem; }

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

.skip {
    position: absolute;
    left: 0.75rem;
    top: -3rem;
    background: var(--navy);
    color: white;
    padding: 0.5rem 0.8rem;
    z-index: 6;
}
.skip:focus { top: 0.75rem; }

.wrap {
    width: min(40rem, calc(100% - 1.5rem));
    margin: 0 auto;
}

.site-header {
    background: var(--navy);
    color: #f7f4ee;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.85rem 0;
}

.brand {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
    margin-right: auto;
}

.mark { width: 2.6rem; height: 2.6rem; flex: none; }

.brand-name { display: block; font-family: Georgia, serif; font-size: 1.05rem; color: white; }
.brand-tag { display: block; color: #e2b657; font-size: 0.92rem; }

.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; }
.nav a { color: white; font-weight: 700; text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.2rem; }

.location {
    color: var(--navy);
    background: var(--gold);
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    max-width: 100%;
    line-height: 1.3;
}

main { padding: 1.25rem 0 2.5rem; }

.lede { font-size: 1.125rem; max-width: 38rem; }

.panel, .card, .sheet, .flash {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0.75rem;
}

.panel { padding: 1rem 1rem 1.15rem; }
.sheet { padding: 1.1rem 1rem 1.3rem; }
.card { padding: 0.95rem 1rem 1rem; }

.card-head, .sheet-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.card-head h3, .sheet-title h1 { margin: 0; }
.logo {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    flex: none;
    padding: 0.2rem;
}
.sheet-title .logo, .sheet-title .logo-fallback {
    width: 3.5rem;
    height: 3.5rem;
}
.logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.65rem;
    background: var(--navy);
    color: #fff;
    font-family: Georgia, "Iowan Old Style", Palatino, serif;
    font-weight: 700;
    font-size: 1.25rem;
    flex: none;
}

label { display: block; font-weight: 700; margin: 0.8rem 0 0.35rem; }
.hint, .meta { color: var(--ink); }

input, select, textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: white;
    border: 2px solid #8d877c;
    border-radius: 0.55rem;
    padding: 0.7rem 0.75rem;
    min-height: 3rem;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: 3px solid var(--navy);
    outline-offset: 1px;
    border-color: var(--navy);
}

.button, button, .actions a.button {
    display: inline-block;
    width: 100%;
    text-align: center;
    font: inherit;
    font-weight: 700;
    background: var(--navy);
    color: white;
    border: 2px solid var(--navy);
    border-radius: 0.6rem;
    padding: 0.7rem 0.9rem;
    min-height: 3rem;
    text-decoration: none;
    cursor: pointer;
}
.button:hover, button:hover { background: var(--navy-2); color: white; }
.button.secondary, button.secondary {
    background: white;
    color: var(--navy);
}
.button.secondary:hover, button.secondary:hover { background: #e7eef5; color: var(--navy); }
.button.danger { background: #6e2218; border-color: #6e2218; }
.actions { display: grid; gap: 0.5rem; margin-top: 0.8rem; }

.region-list {
    max-height: 18rem;
    overflow: auto;
    border: 2px solid var(--line);
    border-radius: 0.6rem;
    background: white;
    margin-top: 0.55rem;
}
.region-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.7rem 0.8rem;
    font-weight: 650;
    border-bottom: 1px solid #eee8de;
}
.region-option input { width: 1.2rem; height: 1.2rem; min-height: 0; margin-top: 0.15rem; }
.edit-list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.45rem; }
.edit-list a {
    display: block;
    background: white;
    border: 2px solid var(--line);
    border-radius: 0.6rem;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    color: var(--ink);
}
.edit-list a strong { display: block; color: var(--navy); }
.statewide { background: #f3f6f8; border-radius: 0.6rem; }

.jump {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    background: var(--paper);
    padding: 0.55rem 0 0.7rem;
    margin: 0 0 0.4rem;
}
.jump a {
    flex: none;
    background: var(--navy);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
}

.search-line { margin: 0.2rem 0 1rem; }
.search-line label { margin-top: 0; }

.group { margin: 0 0 1.75rem; scroll-margin-top: 4.2rem; }
.group h2 {
    border-bottom: 3px solid var(--navy);
    padding-bottom: 0.3rem;
    margin-bottom: 0.75rem;
}
.stack { display: grid; gap: 0.7rem; }
.empty-note { margin: 0.2rem 0 0; }

.flash {
    padding: 0.75rem 0.9rem;
    margin: 0 0 1rem;
    background: #f3faf4;
    border-color: #1f6b3a;
}
.errors {
    background: #fff6f4;
    border: 2px solid #8a3b2e;
    border-radius: 0.6rem;
    padding: 0.7rem 0.9rem;
    margin: 0 0 0.8rem;
}

.check { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.check input { width: 1.2rem; min-height: 0; }

.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.filters { display: grid; gap: 0.7rem; margin: 0 0 1rem; }
.filters label { margin: 0; }

.sheet h2 { margin-top: 1.1rem; }
.sheet table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.98rem; }
.sheet th, .sheet td { border: 1px solid #b9b2a6; padding: 0.5rem; text-align: left; vertical-align: top; }
.sheet th { background: #f3efe6; }
.note { background: #f3f6f8; border-radius: 0.5rem; padding: 0.7rem 0.8rem; }

.site-footer {
    background: var(--navy);
    color: #f7f4ee;
    font-size: 0.98rem;
}
.footer-inner { padding: 1.1rem 0 1.6rem; }
.site-footer a { color: var(--gold); }

@media (min-width: 700px) {
    h1 { font-size: 2.6rem; }
    .button, button, .actions a.button { width: auto; }
    .actions { display: flex; flex-wrap: wrap; }
    .wrap { width: min(44rem, calc(100% - 2rem)); }
}

@media print {
    .site-header, .site-footer, .noprint, .skip, .jump { display: none !important; }
    body { background: white; }
    .sheet, .card, .panel { border: 0; }
}
