/* =========================================================
   County Criminal History - reference template
   Two-row header, left rail, serif display headings.
   ========================================================= */

:root {
    --brand: #1d4d3c;
    --brand-deep: #113327;
    --brand-mid: #2c6b54;
    --brand-soft: #e9f1ec;
    --spark: #b45309;
    --spark-deep: #8f4207;
    --spark-soft: #f8ecdd;
    --ink: #21272e;
    --ink-soft: #49525c;
    --ink-faint: #6e7780;
    --paper: #ffffff;
    --paper-soft: #f5f7f6;
    --paper-panel: #eef3f0;
    --line: #d7e0da;
    --line-faint: #e5ebe7;
    --flag: #a02c2c;
    --lift-sm: 0 1px 3px rgba(17,51,39,.08);
    --lift-md: 0 3px 12px rgba(17,51,39,.09);
    --page-max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', 'Segoe UI', -apple-system, Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
}

h1, h2, h3, h4, h5 {
    font-family: 'Bitter', Georgia, 'Times New Roman', serif;
}

a { color: var(--brand-mid); text-decoration: underline; }
a:hover { color: var(--spark-deep); }

img { max-width: 100%; height: auto; display: block; }

.wrap {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 22px;
}

/* =========================================================
   TOP BAR - brand row (white) over full-width navbar (dark)
   ========================================================= */
.topbar { background: var(--paper); }

.brand-row {
    padding: 16px 0 12px;
}

.brand-row .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand img { height: 46px; width: auto; }

.brand-name {
    font-family: 'Bitter', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-deep);
    line-height: 1.1;
}



.navbar {
    background: var(--brand);
    border-bottom: 3px solid var(--spark);
}

.navbar nav {
    display: flex;
    flex-wrap: wrap;
}

.navbar a {
    padding: 11px 16px;
    color: #e6efe9;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}

.navbar a:hover { background: var(--brand-deep); color: #fff; }

.navbar a.here {
    background: var(--brand-deep);
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--spark);
}

/* =========================================================
   PAGE HEAD - light band, dark serif title, copper keel
   ========================================================= */
.page-head {
    background: var(--brand-soft);
    border-bottom: 1px solid var(--line);
    padding: 30px 0 26px;
}

.page-head .crumbs {
    font-size: 13px;
    color: var(--ink-faint);
    margin-bottom: 6px;
}

.page-head .crumbs a { color: var(--brand-mid); text-decoration: none; }
.page-head .crumbs a:hover { text-decoration: underline; }

.page-head h1 {
    font-size: 34px;
    font-weight: 800;
    color: var(--brand-deep);
    line-height: 1.18;
    padding-bottom: 12px;
    position: relative;
}

.page-head h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 68px;
    height: 4px;
    background: var(--spark);
    border-radius: 2px;
}

/* =========================================================
   LEDE - opening paragraph band
   ========================================================= */
.lede {
    background: var(--paper);
    padding: 26px 0 14px;
}

.lede p {
    font-size: 17.5px;
    line-height: 1.72;
    color: var(--ink);
    margin: 0;
}

/* =========================================================
   LOOKUP BAND - boxed search panel
   ========================================================= */
.lookup-band { padding: 18px 0 24px; }

.lookup-box {
    background: var(--paper-panel);
    border: 1px solid var(--line);
    border-left: 5px solid var(--brand);
    border-radius: 6px;
    padding: 20px 22px 14px;
    box-shadow: var(--lift-sm);
}

.lookup-box h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--brand-deep);
    margin-bottom: 12px;
}

.lookup-note {
    font-size: 12px;
    color: var(--ink-faint);
    margin-top: 8px;
    text-align: right;
}

/* =========================================================
   MAIN GRID - LEFT rail + article
   (article first in the DOM; grid areas place the rail left)
   ========================================================= */
.main-zone { padding: 10px 0 46px; }

.page-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas: "rail article";
    gap: 42px;
    align-items: start;
}

.page-grid.full {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "article";
}

.article { grid-area: article; min-width: 0; }

.article > section { margin-bottom: 34px; }

.article img {
    max-width: 100%;
    max-height: 440px;
    width: auto;
    height: auto;
    margin: 16px 0;
    border: 1px solid var(--line-faint);
    border-radius: 4px;
}

.article h2 {
    font-size: 25px;
    font-weight: 700;
    color: var(--brand-deep);
    line-height: 1.28;
    margin: 6px 0 14px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--line-faint);
}

.article h3 {
    font-size: 18.5px;
    font-weight: 700;
    color: var(--ink);
    margin: 18px 0 9px;
}

.article p {
    margin-bottom: 14px;
    color: var(--ink-soft);
}

.article ul,
.article ol {
    margin: 12px 0 18px 24px;
    color: var(--ink-soft);
}

.article li { margin-bottom: 7px; }

/* =========================================================
   RAIL (left column)
   ========================================================= */
.rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 14px;
}

.rail-box {
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px 16px 14px;
}

.rail-box h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-deep);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--spark);
}

.rail-box ul { list-style: none; margin: 0; }

.rail-box li {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px dotted var(--line);
}

.rail-box li:last-child { border-bottom: 0; }

.rail-box li a {
    text-decoration: none;
    color: var(--ink);
    display: block;
}

.rail-box li a:hover { color: var(--spark-deep); text-decoration: underline; }

.rail-box img { border-radius: 4px; margin-bottom: 10px; }

.rail-contact {
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.6;
}

.rail-contact strong {
    color: var(--ink);
    display: block;
    margin-bottom: 3px;
}

.rail-search .search-widget .search-form {
    grid-template-columns: 1fr;
    gap: 8px;
}

.rail-search .lookup-note { text-align: center; margin-top: 5px; font-size: 11px; }

/* =========================================================
   OFFICE CARDS (agency / facility address blocks)
   ========================================================= */
.office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 16px 0 22px;
}

.office-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand-mid);
    border-radius: 6px;
    padding: 15px 17px;
    box-shadow: var(--lift-sm);
}

.office-card h4 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--brand-deep);
    margin-bottom: 7px;
    line-height: 1.3;
}

.office-card p {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 4px;
    line-height: 1.5;
}

.office-card .tel { color: var(--ink); font-weight: 600; }

/* =========================================================
   TABLES
   .grid-table  = multi-column data (header row filled)
   .facts-table = 2-column field/value style
   ========================================================= */
.grid-table,
.facts-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 14.5px;
}

.grid-table th,
.grid-table td,
.facts-table th,
.facts-table td {
    padding: 11px 13px;
    border: 1px solid var(--line-faint);
    text-align: left;
    vertical-align: top;
}

.grid-table thead th {
    background: var(--brand-deep);
    color: #fff;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.grid-table tbody tr:nth-child(odd) td { background: var(--paper-soft); }

.facts-table th {
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 700;
    width: 34%;
}

/* =========================================================
   ALERTS / CALLOUTS
   ========================================================= */
.alert {
    padding: 13px 16px;
    border-radius: 5px;
    margin: 16px 0;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid var(--line);
    border-left: 5px solid var(--brand-mid);
    background: var(--paper-soft);
    color: var(--ink);
}

.alert-info { border-left-color: var(--brand-mid); background: var(--brand-soft); color: var(--brand-deep); }
.alert-warn { border-left-color: var(--spark); background: var(--spark-soft); color: #5c3a06; }
.alert-flag { border-left-color: var(--flag); background: #f9ecec; color: #5f1f1f; }

/* =========================================================
   TERM LIST (definition boxes)
   ========================================================= */
.term-list {
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px 18px;
    margin: 16px 0 22px;
}

.term-list dt {
    font-weight: 700;
    color: var(--brand-deep);
    margin-top: 10px;
}

.term-list dt:first-child { margin-top: 0; }

.term-list dd {
    margin-left: 0;
    color: var(--ink-soft);
    font-size: 15px;
}

/* =========================================================
   TALLY BAND (small stats row)
   ========================================================= */
.tally-band {
    background: var(--paper-soft);
    border-top: 1px solid var(--line-faint);
    border-bottom: 1px solid var(--line-faint);
    padding: 18px 0;
}

.tally-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    text-align: center;
}

.tally-num {
    font-family: 'Bitter', Georgia, serif;
    font-size: 25px;
    font-weight: 800;
    color: var(--brand);
    display: block;
}

.tally-label {
    font-size: 12px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: .8px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}

.btn-solid { background: var(--brand); color: #fff; }
.btn-solid:hover { background: var(--brand-deep); color: #fff; }

.btn-line { background: var(--paper); color: var(--brand); border: 1px solid var(--brand); }
.btn-line:hover { background: var(--brand-soft); }

/* =========================================================
   SEARCH WIDGET (markup injected by search.js -
   .search-widget / .search-form / .search-input /
   .search-select / .search-button names are FIXED)
   ========================================================= */
.search-widget { width: 100%; }

.search-widget .search-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.search-widget .search-input,
.search-widget .search-select {
    padding: 12px 13px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
}

.search-widget .search-input:focus,
.search-widget .search-select:focus {
    outline: none;
    border-color: var(--brand-mid);
    box-shadow: 0 0 0 3px rgba(44,107,84,.16);
}

.search-widget .search-button {
    background: var(--spark);
    color: #fff;
    font-weight: 700;
    font-family: inherit;
    font-size: 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 12px 13px;
    letter-spacing: .4px;
}

.search-widget .search-button:hover { background: var(--spark-deep); }

/* =========================================================
   FOOTER - dark green, 4 columns w/ brand, legal at BOTTOM
   ========================================================= */
.site-footer {
    background: var(--brand-deep);
    color: #cfdcd4;
    margin-top: 44px;
}

.foot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    padding: 34px 0 28px;
}





.foot-grid h5 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin-bottom: 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255,255,255,.16);
}

.foot-grid ul { list-style: none; }
.foot-grid li { margin-bottom: 7px; font-size: 14px; }
.foot-grid a { color: #cfdcd4; text-decoration: none; }
.foot-grid a:hover { color: #fff; text-decoration: underline; }

.foot-legal {
    border-top: 1px solid rgba(255,255,255,.14);
    padding: 16px 0;
    font-size: 12.5px;
    color: #9fb3a8;
    line-height: 1.6;
}

.foot-legal strong { color: #e6efe9; }

.foot-base {
    background: #0b241b;
    padding: 13px 0;
    text-align: center;
    font-size: 12px;
    color: #86988e;
}

.foot-base a { color: #9fb3a8; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
    .page-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "article" "rail";
        gap: 30px;
    }
    .rail { position: static; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .navbar a { padding: 9px 11px; font-size: 13px; }
    .page-head h1 { font-size: 25px; }
    .article h2 { font-size: 21px; }
    .search-widget .search-form { grid-template-columns: 1fr; }
    .search-widget .search-button { padding: 14px; }
    .foot-grid { grid-template-columns: 1fr; gap: 22px; }
    .lede p { font-size: 16px; }
}
