:root {
    --dq-ink: #1a1a1a;
    --dq-bg: #f7f7f5;
    --dq-card: #ffffff;
    --dq-border: #dcdcd6;
    --dq-accent: #14532d;
    --dq-accent-light: #e9f3ec;
    --dq-muted: #6b6b66;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--dq-bg);
    color: var(--dq-ink);
    line-height: 1.5;
}

a { color: var(--dq-accent); }

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

/* ---- Full-width banner (scrolls away; nav below it stays sticky) ---- */
.site-banner {
    display: block;
    width: 100%;
}

.site-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- Sticky header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dq-card);
    border-bottom: 1px solid var(--dq-border);
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dq-ink);
    text-decoration: none;
    white-space: nowrap;
}

.header-search {
    display: flex;
    gap: 6px;
    flex: 1 1 320px;
}

.header-search select,
.header-search input[type="text"] {
    padding: 8px;
    border: 1px solid var(--dq-border);
    border-radius: 4px;
    font-size: 0.9rem;
}

.header-search input[type="text"] {
    flex: 1;
    min-width: 120px;
}

.header-search button {
    padding: 8px 14px;
    background: var(--dq-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.site-nav {
    display: flex;
    gap: 14px;
    font-size: 0.9rem;
}

/* ---- Footer ---- */
.site-footer {
    background: #111;
    color: #ddd;
    /* colored border required by house rule: black-background elements need
       a visible edge so resizing on a black desktop stays legible */
    border-top: 3px solid var(--dq-accent);
    margin-top: 40px;
}

.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

.donate-link img {
    max-height: 60px;
}

.related-resources {
    margin: 16px 0;
    font-size: 0.9rem;
}

.related-resources-label {
    color: #999;
    margin-right: 8px;
}

.related-resources a,
.footer-links a {
    color: #9fd6b3;
    margin-right: 14px;
    text-decoration: none;
}

.related-resources a:hover,
.footer-links a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    color: #999;
    font-size: 0.8rem;
    margin-top: 16px;
}

/* ---- Cards / results ---- */
.card {
    background: var(--dq-card);
    border: 1px solid var(--dq-border);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
}

.card h3 {
    margin-top: 0;
}

.result-source-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--dq-accent-light);
    color: var(--dq-accent);
    font-size: 0.75rem;
    margin-right: 6px;
}

.badge-warning {
    background: #fdecea;
    color: #611a15;
}

/* ---- Forms (contact, install, etc.) ---- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--dq-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn:hover {
    opacity: 0.9;
    color: #fff;
}

form.site-form label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

form.site-form input[type="text"],
form.site-form input[type="email"],
form.site-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--dq-border);
    border-radius: 4px;
    margin-top: 4px;
    font-family: inherit;
}

form.site-form button.btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--dq-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.optin-honeypot { position: absolute; left: -9999px; }

.optin-captcha-img { display: block; margin: 6px 0; border: 1px solid var(--dq-border); }

.note-text { padding: 10px; border-radius: 4px; background: var(--dq-accent-light); }

.confirm-box {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
    background: var(--dq-card);
    border: 1px solid var(--dq-border);
    border-radius: 6px;
    padding: 24px;
}

.agency-links .agency-link {
    display: inline-block;
    margin: 0 12px 10px 0;
    padding: 6px 12px;
    background: var(--dq-accent-light);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ---- State map section ---- */
.state-drilldown {
    margin-top: 30px;
}

.legislator-links {
    margin-top: 8px;
    font-size: 0.9rem;
}
