:root {
    --ink: #102033;
    --ink-soft: #3a4d63;
    --paper: #f3f1ec;
    --paper-2: #e7eef5;
    --line: #c9d3df;
    --accent: #b45309;
    --accent-ink: #fff7ed;
    --hero-1: #0c2438;
    --hero-2: #1d4d6e;
    --max: 1080px;
    --font: "IBM Plex Sans", "Segoe UI", sans-serif;
    --display: "IBM Plex Serif", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(1200px 500px at 10% -10%, #d9e6f2 0%, transparent 55%),
        radial-gradient(900px 420px at 100% 0%, #efe6d8 0%, transparent 50%),
        var(--paper);
    line-height: 1.5;
}
a { color: #0b4f7a; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.top {
    position: sticky; top: 0; z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(243, 241, 236, 0.86);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top__inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 3.5rem;
}
.brand {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--ink);
    text-decoration: none;
}
.top__nav { display: flex; gap: 1rem; font-size: 0.95rem; }
.top__nav a { color: var(--ink-soft); text-decoration: none; }
.top__nav a:hover { color: var(--ink); }

.hero {
    position: relative;
    min-height: min(88vh, 720px);
    display: grid;
    align-items: end;
    padding: 5rem 0 4rem;
    color: #f5f7fa;
    overflow: hidden;
}
.hero__bg {
    position: absolute; inset: 0;
    background:
        linear-gradient(160deg, rgba(12,36,56,0.92), rgba(18,52,74,0.78)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath fill='%23ffffff' fill-opacity='0.04' d='M0 0h80v80H0zm80 80h80v80H80z'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #0c2438, #1d4d6e 55%, #8a5a2b);
    transform: scale(1.02);
    animation: heroDrift 18s ease-in-out infinite alternate;
}
@keyframes heroDrift {
    from { transform: scale(1.02) translate3d(0,0,0); }
    to { transform: scale(1.06) translate3d(-1.5%, -1%, 0); }
}
.hero__content { position: relative; z-index: 1; max-width: 720px; }
.hero__brand {
    margin: 0 0 0.75rem;
    font-family: var(--display);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    animation: rise 0.8s ease both;
}
.hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    font-weight: 500;
    color: #d7e4ef;
    animation: rise 0.9s ease 0.05s both;
}
.hero__lead {
    margin: 0 0 1.5rem;
    max-width: 36rem;
    color: #c3d2e0;
    animation: rise 1s ease 0.1s both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.search {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    animation: rise 1.05s ease 0.15s both;
}
.search input {
    border: 0;
    border-radius: 0.55rem;
    padding: 0.95rem 1rem;
    font: inherit;
    font-size: 1.05rem;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.search button {
    border: 0;
    border-radius: 0.55rem;
    padding: 0.95rem 1.25rem;
    font: inherit;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--accent);
    cursor: pointer;
}
.search button:hover { filter: brightness(1.05); }
.suggest {
    position: absolute;
    left: 0; right: 0; top: calc(100% + 0.35rem);
    margin: 0; padding: 0.35rem;
    list-style: none;
    background: #fff;
    color: var(--ink);
    border-radius: 0.55rem;
    box-shadow: 0 16px 40px rgba(16,32,51,0.18);
    max-height: 280px;
    overflow: auto;
    z-index: 5;
}
.suggest li button {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.65rem 0.75rem;
    border-radius: 0.4rem;
    font: inherit;
    cursor: pointer;
}
.suggest li button:hover,
.suggest li button[aria-selected="true"] {
    background: var(--paper-2);
}

.section { padding: 3.5rem 0 4.5rem; }
.section h2,
.page__head h1 {
    font-family: var(--display);
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
}
.section__lead,
.page__head p,
.muted { color: var(--ink-soft); }
.state-grid {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}
.state-grid a {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease, transform 0.15s ease;
}
.state-grid a:hover {
    background: color-mix(in srgb, var(--paper-2) 70%, transparent);
    transform: translateY(-1px);
}
.state-grid__name { font-weight: 600; }
.state-grid__meta { font-size: 0.88rem; color: var(--ink-soft); }

.page { padding: 2rem 0 4rem; }
.crumbs { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1rem; }
.crumbs a { color: inherit; }
.page__head { margin-bottom: 1.5rem; }

.table-wrap { overflow-x: auto; }
.county-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
}
.county-table th,
.county-table td {
    text-align: left;
    padding: 0.7rem 0.55rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.county-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

.jail-card {
    padding: 1.25rem 0 1.75rem;
    border-top: 1px solid var(--line);
}
.jail-card h2 {
    margin: 0 0 1rem;
    font-family: var(--display);
    font-size: 1.45rem;
}
.facts { margin: 0; display: grid; gap: 0.85rem; }
.facts div { display: grid; gap: 0.15rem; }
.facts dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}
.facts dd { margin: 0; word-break: break-word; }

.shot { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.shot h2 { font-family: var(--display); font-size: 1.25rem; margin: 0 0 0.75rem; }
.shot img {
    display: block;
    width: min(100%, 640px);
    height: auto;
    border: 1px solid var(--line);
    background: #fff;
}

.prose { max-width: 40rem; }
.prose h1 { font-family: var(--display); }

.foot {
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}
.foot__inner { display: grid; gap: 0.5rem; }
.foot a { color: inherit; }

@media (max-width: 640px) {
    .search { grid-template-columns: 1fr; }
    .hero { min-height: 78vh; align-items: center; padding-top: 4rem; }
    .county-table th:nth-child(2),
    .county-table td:nth-child(2) { display: none; }
}
