/* =====================================================================
   Perry County Sheriff's Office (PCSO) — Redesign Stylesheet
   ---------------------------------------------------------------------
   Vanilla CSS. No frameworks.
   Typography borrowed from the Crafto "Lawyer" template
   (Playfair Display for headings, DM Sans for body).
   Color palette extracted from the 2024 PCSO / Kentucky Sheriff's
   Association badge: sage/olive green, charcoal-black, silver-gray.
   ===================================================================== */

/* ---------- Fonts (same families used by the Lawyer template) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ---------- Design tokens (color palette from the badge) ---------- */
:root {
    /* Badge greens */
    --green:         #7c9068;   /* primary sage-olive green from the badge */
    --green-dark:    #61754e;   /* deeper green for hovers / accents      */
    --green-darker:  #495a3a;   /* darkest green                          */
    --green-tint:    #eef1e9;   /* very light green wash for section bands */

    /* Neutrals from the badge outline + silver fill */
    --ink:           #1b1f18;   /* near-black badge outline               */
    --charcoal:      #2a3126;   /* dark green-charcoal (footer / bands)   */
    --silver:        #c9cdc4;   /* silver-gray badge fill                 */
    --medium-gray:   #6a7065;   /* muted body text on light               */
    --line:          #e2e3dd;   /* hairline borders                       */
    --cream:         #f6f5f0;   /* page background                        */
    --white:         #ffffff;

    /* Accents */
    --gold:          #b98e44;   /* subtle warm accent (from old badge)    */
    --alert:         #9c2b2b;   /* 911 / emergency red                    */

    /* Type */
    --alt-font:      'Playfair Display', Georgia, serif;
    --primary-font:  'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;

    /* Layout */
    --maxw:          1200px;
    --radius:        8px;
    --shadow:        0 10px 30px rgba(27, 31, 24, 0.08);
    --shadow-sm:     0 4px 14px rgba(27, 31, 24, 0.07);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--primary-font);
    font-size: 17px;
    line-height: 1.75;
    color: var(--charcoal);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-dark); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--green-darker); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--alt-font);
    color: var(--ink);
    line-height: 1.2;
    margin: 0 0 .5em;
    font-weight: 700;
}

p { margin: 0 0 1.1em; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.6rem 0;
}

/* Utility helpers */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}
.text-center { text-align: center; }
.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;
}

/* =====================================================================
   1. Top utility bar — persistent 911 notice + Pay Taxes CTA
   ===================================================================== */
.util-bar {
    background: var(--ink);
    color: var(--white);
    font-size: 14px;
}
.util-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    flex-wrap: wrap;
    padding-top: 6px;
    padding-bottom: 6px;
}
.util-bar__emergency {
    font-weight: 500;
    letter-spacing: .01em;
}
/* The dot is inline so the emergency text flows as a normal sentence and
   wraps cleanly on small screens (instead of breaking as flex items). */
.util-bar__emergency .dot {
    display: inline-block;
    vertical-align: middle;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--alert);
    margin-right: 7px;
    box-shadow: 0 0 0 0 rgba(156, 43, 43, .7);
    animation: pulse 2s infinite;
}
.util-bar__emergency .sep { margin: 0 4px; opacity: .5; }
.util-bar__emergency .nowrap { white-space: nowrap; }
.util-bar__emergency a { color: #fff; font-weight: 700; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(156, 43, 43, .6); }
    70%  { box-shadow: 0 0 0 8px rgba(156, 43, 43, 0); }
    100% { box-shadow: 0 0 0 0 rgba(156, 43, 43, 0); }
}
.util-bar__tax {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: #fff;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 40px;
    font-size: 13.5px;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.util-bar__tax:hover { background: var(--green-dark); color: #fff; }

/* =====================================================================
   2. Header / navigation
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    /* Must sit above the mobile nav backdrop (z-index 1040) so the drawer,
       which lives inside the header, is not covered/dimmed by the backdrop. */
    z-index: 1060;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 12px rgba(27,31,24,.04);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 84px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand img { width: 56px; height: auto; }
.brand__text { line-height: 1.15; }
.brand__title {
    font-family: var(--alt-font);
    font-weight: 800;
    font-size: 19px;
    color: var(--ink);
    display: block;
}
.brand__sub {
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green-dark);
    font-weight: 600;
}

/* Primary nav — only the top-level list is a flex row (nested dropdowns stay block) */
.main-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav a {
    display: block;
    padding: 10px 14px;
    color: var(--charcoal);
    font-weight: 500;
    font-size: 15.5px;
    border-radius: 6px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: var(--green-dark); background: var(--green-tint); }

/* Dropdowns */
.has-dropdown { position: relative; }
.has-dropdown > a::after {
    content: "";
    display: inline-block;
    width: .5em; height: .5em;
    margin-left: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .7;
}
.dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 250px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .18s ease;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown li { margin: 0; }
.dropdown a {
    padding: 9px 12px;
    font-size: 14.5px;
    border-radius: 5px;
    color: var(--charcoal);
}
.dropdown a:hover { background: var(--green-tint); color: var(--green-darker); }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 44px; height: 44px;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    position: relative;
    width: 26px; height: 2px;
    background: var(--ink);
    margin: 0 auto;
    transition: all .25s ease;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after  { top: 8px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open span::after  { top: 0; transform: rotate(-45deg); }

/* =====================================================================
   3. Hero (home page)
   ===================================================================== */
.hero {
    position: relative;
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(124,144,104,.35), transparent 60%),
        linear-gradient(160deg, var(--charcoal) 0%, var(--ink) 100%);
    color: var(--white);
    overflow: hidden;
}
.hero::after {
    /* subtle badge watermark */
    content: "";
    position: absolute;
    right: -60px; bottom: -60px;
    width: 420px; height: 420px;
    background: url('../images/pcso-badge.png') no-repeat center / contain;
    opacity: .07;
    pointer-events: none;
}
.hero .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 40px;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 72px;
}
.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: 13px;
    font-weight: 600;
    color: var(--silver);
    margin-bottom: 14px;
}
.hero h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    margin-bottom: 18px;
}
.hero h1 span { color: var(--green); font-style: italic; }
.hero p.lead {
    font-size: 18px;
    color: rgba(255,255,255,.82);
    max-width: 40ch;
    margin-bottom: 28px;
}
.hero__badge {
    justify-self: center;
    width: min(320px, 80%);
    filter: drop-shadow(0 18px 30px rgba(0,0,0,.45));
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* =====================================================================
   4. Buttons
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--primary-font);
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1;
    padding: 15px 30px;
    border-radius: 40px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
    text-align: center;
}
.btn--primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn--primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn--gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn--gold:hover { background: #a37c39; border-color: #a37c39; color: #fff; }
.btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--outline-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline-dark:hover { background: var(--ink); color: #fff; }
.btn--lg { padding: 18px 40px; font-size: 16.5px; }

/* =====================================================================
   5. Property-tax CTA banner (high-visibility, reusable)
   ===================================================================== */
.tax-cta {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: #fff;
    border-radius: 14px;
    padding: 34px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.tax-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../images/pcso-badge.png') no-repeat right -40px center / 220px;
    opacity: .1;
}
.tax-cta__text { position: relative; z-index: 1; max-width: 60ch; }
.tax-cta__text h2 { color: #fff; margin-bottom: 6px; font-size: 1.9rem; }
.tax-cta__text p { color: rgba(255,255,255,.9); margin: 0; }
.tax-cta__actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }
.tax-cta .btn--outline:hover { color: var(--green-darker); }

/* =====================================================================
   6. Sections & general content
   ===================================================================== */
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--band { background: var(--white); }
.section--green { background: var(--green-tint); }
.section--dark { background: var(--charcoal); color: rgba(255,255,255,.85); }
.section--dark h2, .section--dark h3 { color: #fff; }

.section-head { max-width: 760px; margin: 0 auto 46px; text-align: center; }
.section-head .eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 13px;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-head p { color: var(--medium-gray); }

/* Divider mark under headings */
.rule {
    width: 64px; height: 3px; border: 0;
    background: var(--green);
    margin: 14px 0 24px;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* =====================================================================
   7. Core-functions grid (KRS duties)
   ===================================================================== */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.function-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.function-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--green);
}
.function-card__icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--green-tint);
    color: var(--green-dark);
    margin-bottom: 18px;
}
.function-card__icon svg { width: 28px; height: 28px; }
.function-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.function-card p { color: var(--medium-gray); font-size: 15.5px; margin: 0; }
.function-card .krs {
    display: inline-block;
    margin-top: 14px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--green-dark);
    background: var(--green-tint);
    padding: 3px 10px;
    border-radius: 20px;
}

/* =====================================================================
   8. Quick-links grid
   ===================================================================== */
.quicklinks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.quicklink {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    color: var(--charcoal);
    box-shadow: var(--shadow-sm);
    transition: all .2s ease;
}
.quicklink:hover { border-color: var(--green); transform: translateY(-3px); color: var(--green-darker); }
.quicklink__icon { color: var(--green-dark); }
.quicklink__icon svg { width: 30px; height: 30px; }
.quicklink strong { font-family: var(--alt-font); font-size: 1.1rem; }
.quicklink span { font-size: 14px; color: var(--medium-gray); }

/* =====================================================================
   9. Page title band (interior pages)
   ===================================================================== */
.page-title {
    position: relative;
    background:
        radial-gradient(900px 400px at 85% -30%, rgba(124,144,104,.4), transparent 60%),
        linear-gradient(160deg, var(--charcoal) 0%, var(--ink) 100%);
    color: #fff;
    padding: 70px 0 60px;
    overflow: hidden;
}
.page-title::after {
    content: "";
    position: absolute;
    right: -40px; top: 50%;
    transform: translateY(-50%);
    width: 260px; height: 260px;
    background: url('../images/pcso-badge.png') no-repeat center / contain;
    opacity: .08;
}
.page-title .container { position: relative; z-index: 2; }
.page-title h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 10px; }
.page-title p { color: rgba(255,255,255,.8); margin: 0; max-width: 60ch; }
.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 18px;
    font-size: 13.5px;
    color: var(--silver);
}
.breadcrumb a { color: var(--silver); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb li::after { content: "›"; margin-left: 8px; opacity: .6; }
.breadcrumb li:last-child::after { content: ""; }

/* =====================================================================
   10. Article / prose content
   ===================================================================== */
.prose { max-width: 860px; margin: 0 auto; }
.prose.wide { max-width: 1000px; }
.prose h2 { font-size: 1.9rem; margin-top: 1.2em; }
.prose h2 small { display: block; font-size: .95rem; font-family: var(--primary-font); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--green-dark); margin-top: 6px; }
.prose h3 { font-size: 1.35rem; margin-top: 1.4em; }
.prose ul li, .prose ol li { color: var(--charcoal); }
.prose .lead { font-size: 20px; color: var(--charcoal); }
.prose blockquote {
    margin: 1.6em 0;
    padding: 20px 28px;
    border-left: 4px solid var(--green);
    background: var(--green-tint);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--alt-font);
    font-style: italic;
    color: var(--ink);
}
.prose blockquote cite { display: block; margin-top: 10px; font-size: 15px; font-style: normal; color: var(--medium-gray); font-family: var(--primary-font); }

/* Callout / notice box */
.notice {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 1.4em 0;
    box-shadow: var(--shadow-sm);
}
.notice--alert { border-left-color: var(--alert); }
.notice--alert strong { color: var(--alert); }
.notice p:last-child { margin-bottom: 0; }
.notice h4 { margin-bottom: 6px; }

/* Info cards row (address / hours / contact) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 1.6em 0;
}
.info-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
}
.info-card h3 {
    font-size: 1rem; text-transform: uppercase; letter-spacing: .1em;
    font-family: var(--primary-font); font-weight: 700; color: var(--green-dark);
    margin-bottom: 12px;
}
.info-card address { font-style: normal; line-height: 1.7; }
.info-card p { margin: 0; }

/* Divisions module cards (about page) */
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 1.4em 0;
}
.module {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.module__title {
    background: var(--charcoal);
    color: #fff;
    padding: 16px 22px;
}
.module__title h3 { color: #fff; margin: 0; font-size: 1.2rem; }
.module__body { padding: 20px 22px; }
.module__body p { margin: 0; font-size: 15.5px; color: var(--medium-gray); }

/* =====================================================================
   11. Accordion (toggle panels) — for Tax & Reports pages
   ===================================================================== */
.accordion { margin: 1.4em 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); background: var(--white); }
.accordion__item:last-child { border-bottom: 0; }
.accordion__header {
    width: 100%;
    text-align: left;
    background: var(--white);
    border: 0;
    padding: 20px 24px;
    font-family: var(--alt-font);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background .2s;
}
.accordion__header:hover { background: var(--green-tint); }
.accordion__header .plus {
    flex: none;
    width: 26px; height: 26px;
    position: relative;
    border-radius: 50%;
    background: var(--green-tint);
    transition: background .2s;
}
.accordion__header .plus::before,
.accordion__header .plus::after {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: 12px; height: 2px; background: var(--green-dark);
    transform: translate(-50%,-50%);
    transition: transform .25s ease;
}
.accordion__header .plus::after { transform: translate(-50%,-50%) rotate(90deg); }
.accordion__item.open .plus { background: var(--green); }
.accordion__item.open .plus::before,
.accordion__item.open .plus::after { background: #fff; }
.accordion__item.open .plus::after { transform: translate(-50%,-50%) rotate(0deg); }
.accordion__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.accordion__panel-inner { padding: 0 24px 22px; color: var(--medium-gray); }
.accordion__panel-inner p:last-child { margin-bottom: 0; }

/* =====================================================================
   12. Tabs — for CCDW & Reports pages
   ===================================================================== */
.tabs { margin: 1.4em 0; }
.tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 2px solid var(--line);
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}
.tabs__nav button {
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 12px 20px;
    font-family: var(--primary-font);
    font-weight: 600;
    font-size: 15px;
    color: var(--medium-gray);
    cursor: pointer;
    transition: all .2s;
}
.tabs__nav button:hover { color: var(--green-dark); }
.tabs__nav button.active { color: var(--green-darker); border-bottom-color: var(--green); }
.tabs__panel {
    display: none;
    padding: 24px 4px 0;
    animation: fade .3s ease;
}
.tabs__panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

/* =====================================================================
   13. Checkpoints list
   ===================================================================== */
.checkpoint-list {
    columns: 2;
    column-gap: 40px;
    list-style: none;
    padding: 0;
    counter-reset: cp;
}
.checkpoint-list li {
    break-inside: avoid;
    padding: 10px 0 10px 40px;
    position: relative;
    border-bottom: 1px solid var(--line);
    font-size: 15.5px;
}
.checkpoint-list li::before {
    counter-increment: cp;
    content: counter(cp);
    position: absolute; left: 0; top: 8px;
    width: 28px; height: 28px;
    display: grid; place-items: center;
    background: var(--green-tint);
    color: var(--green-dark);
    font-size: 13px; font-weight: 700;
    border-radius: 50%;
}

/* =====================================================================
   14. Link list (resources / agencies)
   ===================================================================== */
.linklist {
    list-style: none; padding: 0; margin: 1.2em 0;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 30px;
}
.linklist li { margin: 0; }
.linklist a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--charcoal);
    font-size: 15px;
    transition: all .2s;
}
.linklist a:hover { border-color: var(--green); background: var(--green-tint); color: var(--green-darker); }
.linklist a::before {
    content: "›"; color: var(--green); font-weight: 700; font-size: 18px; flex: none;
}
.linklist a[target="_blank"]::after {
    content: "↗"; margin-left: auto; opacity: .45; font-size: 13px;
}

/* Download list */
.downloads { list-style: none; padding: 0; margin: 1.2em 0; }
.downloads li { margin-bottom: 10px; }
.downloads a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--charcoal);
    font-weight: 500;
}
.downloads a:hover { border-color: var(--green); background: var(--green-tint); }
.downloads svg { width: 22px; height: 22px; color: var(--green-dark); flex: none; }

/* =====================================================================
   15. Footer
   ===================================================================== */
.site-footer {
    background: var(--ink);
    color: #a9b0a2;
    padding: 60px 0 0;
    font-size: 15px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
}
.site-footer h4 {
    color: #fff;
    font-family: var(--primary-font);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 18px;
}
.site-footer a { color: #a9b0a2; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 60px; }
.footer-brand .brand__title { color: #fff; font-size: 17px; }
.footer-brand .brand__sub { color: var(--green); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-contact address { font-style: normal; line-height: 1.8; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    color: #cfd4c9;
}
.footer-social a:hover { background: var(--green); border-color: var(--green); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: #838a7c;
}
.footer-bottom a { color: #838a7c; }

/* =====================================================================
   16. Back-to-top button
   ===================================================================== */
.totop {
    position: fixed;
    right: 22px; bottom: 22px;
    width: 48px; height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    box-shadow: var(--shadow);
    z-index: 900;
}
.totop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { background: var(--green-dark); }

/* =====================================================================
   17. Responsive
   ===================================================================== */
@media (max-width: 992px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero__badge { order: -1; width: 210px; }
    .hero p.lead { margin-left: auto; margin-right: auto; }
    .hero__actions { justify-content: center; }
    .functions-grid { grid-template-columns: repeat(2, 1fr); }
    .quicklinks { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    /* Collapse nav into mobile drawer */
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: 0; right: 0;
        height: 100vh;
        width: min(320px, 84vw);
        background: var(--white);
        box-shadow: -8px 0 30px rgba(0,0,0,.15);
        padding: 84px 20px 30px;
        transform: translateX(100%);
        transition: transform .3s ease;
        overflow-y: auto;
        z-index: 1050;
    }
    .main-nav.open { transform: translateX(0); }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .main-nav a { padding: 12px 14px; }
    .has-dropdown > a::after { float: right; }
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--green-tint);
        border-radius: 0;
        margin: 2px 0 6px 12px;
        padding: 0;
        display: none;
    }
    .has-dropdown.open > .dropdown { display: block; }
    .nav-backdrop {
        position: fixed; inset: 0;
        background: rgba(20,24,17,.5);
        opacity: 0; visibility: hidden;
        transition: opacity .3s;
        z-index: 1040;
    }
    .nav-backdrop.show { opacity: 1; visibility: visible; }
    body.nav-open { overflow: hidden; }
}

@media (max-width: 680px) {
    body { font-size: 16px; }
    .section { padding: 52px 0; }
    .functions-grid,
    .quicklinks,
    .info-grid,
    .module-grid,
    .linklist { grid-template-columns: 1fr; }
    .checkpoint-list { columns: 1; }
    .tax-cta { padding: 26px 24px; }
    .tax-cta__text h2 { font-size: 1.5rem; }
    /* Stack the utility bar so the emergency line and the tax button
       each get their own centered row on narrow screens. */
    .util-bar .container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 9px;
        padding-top: 9px;
        padding-bottom: 9px;
    }
    .util-bar__emergency { font-size: 13px; line-height: 1.6; }
    .util-bar__tax { width: 100%; justify-content: center; }
    .brand__title { font-size: 16px; }
    .brand img { width: 46px; }
    .prose h2 { font-size: 1.55rem; }
}
