:root {
    --coffee-dark: #2b1810;
    --coffee-medium: #6f4e37;
    --coffee-light: #c8a582;
    --cream: #faf6f0;
    --card: #ffffff;
    --text: #2b2118;
    --muted: #756a5e;
    --accent: #d4772d;
    --accent-dark: #b85e1a;
    --border: #e8dccb;
    --shadow: 0 2px 8px rgba(43, 24, 16, 0.06);
    --shadow-hover: 0 8px 24px rgba(43, 24, 16, 0.12);
    --radius: 12px;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

* { box-sizing: border-box; }

section[id] {
    scroll-margin-top: 90px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
    background: var(--coffee-dark);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; }
.logo {
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-icon { font-size: 1.4rem; }

#siteNav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: var(--coffee-light); font-weight: 500; }
.site-header nav a:hover { color: white; }

.near-me-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.near-me-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

.add-listing-link {
    background: transparent;
    border: 1px solid var(--coffee-light);
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white !important;
}
.add-listing-link:hover { background: var(--coffee-light); color: var(--coffee-dark) !important; }

/* ---------- Messages ---------- */
.messages { margin: 16px 0; }
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
}
.message-success { background: #e5f4e3; color: #285c26; border: 1px solid #b7ddb1; }
.message-error { background: #fbe6e2; color: #8a2d1f; border: 1px solid #f2b8ab; }

/* Inline lead-form errors. Both the .leadbox and .consumer-capture blocks sit on
   dark coffee surfaces, so these use a warm light tone to stay readable. Shown
   when a lead form is re-rendered after an invalid submit, so the visitor can see
   what to fix without losing what they already typed. */
.errorlist {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffb4a2;
}
.lead-form-errors {
    background: rgba(255, 180, 162, 0.14);
    border: 1px solid #ffb4a2;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: #ffd9cf;
}
.lead-form-errors .errorlist { margin: 0; color: #ffd9cf; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: white; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    padding: 56px 0 36px;
    text-align: center;
    background: linear-gradient(180deg, rgba(200,165,130,0.18), transparent);
    border-radius: 0 0 24px 24px;
}
.hero.hero-compact { padding: 36px 0 20px; }
.hero h1 { font-size: 2.6rem; color: var(--coffee-dark); margin-bottom: 12px; }
.hero p { color: var(--muted); max-width: 680px; margin: 0 auto 24px; font-size: 1.05rem; }

.hero-search {
    display: flex;
    max-width: 580px;
    margin: 0 auto 20px;
    gap: 0;
    box-shadow: var(--shadow);
    border-radius: 30px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
}
.hero-search input[type="text"] {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    background: transparent;
}
.hero-search button {
    border: none;
    background: var(--accent);
    color: white;
    padding: 14px 28px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}
.hero-search button:hover { background: var(--accent-dark); }

.stat-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 16px auto 20px;
}
.stat-pill {
    background: white;
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--muted);
    box-shadow: var(--shadow);
}
.stat-pill b { color: var(--coffee-dark); }
.hero-near-btn { margin-top: 10px; }

h2 { color: var(--coffee-medium); margin-top: 36px; font-size: 1.45rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 32px; }
.section-header h2 { margin-top: 0; }
.view-all-link { font-weight: 600; color: var(--accent-dark); font-size: 0.95rem; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin: 18px 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Badges ---------- */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
}
.badge-top { background: #fdf3d8; color: #8a5800; border: 1px solid #f6dd99; }
.badge-wholesale { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }
.badge-roaster { background: #fbe9e7; color: #bf360c; border: 1px solid #ffccbc; }
.badge-verified { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }

/* ---------- City Summary & Quick Stats ---------- */
.city-summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 16px 0 24px;
    box-shadow: var(--shadow);
}
.summary-text { font-size: 1.02rem; color: var(--text); margin: 0 0 14px; line-height: 1.6; }
.quick-stats-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-badge {
    background: var(--cream);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.86rem;
    color: var(--coffee-dark);
}

/* ---------- Chip Filters ---------- */
.filter-wrapper { margin: 20px 0 12px; }
.chip-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.filter-chip {
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.filter-chip.active { background: var(--coffee-dark); color: white; border-color: var(--coffee-dark); }

/* ---------- Filter bar ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 12px;
}
.filter-bar input[type="text"],
.filter-bar select {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    background: white;
    color: var(--text);
}
.filter-bar input[type="text"] { flex: 1; min-width: 180px; }
.filter-bar button {
    background: var(--coffee-dark);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.filter-bar button:hover { background: var(--coffee-medium); }
.result-count { color: var(--muted); font-size: 0.9rem; margin: 12px 0; }

/* ---------- Roaster grid/cards ---------- */
.roaster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.roaster-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}
.roaster-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.roaster-card h2 { margin: 0 0 6px; font-size: 1.18rem; }
.roaster-card h2 a { color: var(--coffee-dark); }
.category-tag, .location-tag { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.address, .phone { color: var(--muted); font-size: 0.88rem; margin: 3px 0; }
.card-actions { margin-top: auto; padding-top: 14px; }
.card-link { font-weight: 600; font-size: 0.9rem; color: var(--accent-dark); }

/* Star ratings */
.stars { color: var(--accent); letter-spacing: 1px; font-size: 0.95rem; }
.rating-row { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 600; color: var(--coffee-dark); }
.rating-row .review-count { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

/* Best-of Ranking Cards */
.best-card { padding-left: 20px; }
.rank-badge {
    position: absolute;
    top: -10px;
    right: 14px;
    background: var(--accent);
    color: white;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* State Filter Pills Bar */
.state-pills-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 20px 0;
}
.pills-label { font-weight: 700; color: var(--coffee-dark); font-size: 0.88rem; margin-right: 6px; }
.pill {
    padding: 5px 11px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}
.pill:hover { border-color: var(--accent); color: var(--accent-dark); }
.pill.active { background: var(--coffee-dark); color: white; border-color: var(--coffee-dark); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 32px 0; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--coffee-dark);
    font-weight: 500;
}
.pagination .current { background: var(--coffee-dark); color: white; border-color: var(--coffee-dark); }
.pagination a:hover { border-color: var(--accent); }

/* ---------- Map ---------- */
.map-container { height: 360px; border-radius: var(--radius); overflow: hidden; margin: 20px 0; border: 1px solid var(--border); }

/* ---------- FAQ Accordion ---------- */
.city-faq-section { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.faq-container { margin-top: 16px; }
.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--coffee-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-icon { font-size: 1.3rem; color: var(--accent); font-weight: 400; transition: transform 0.2s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 20px 16px; color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.faq-item.open .faq-answer { display: block; }

/* ---------- Roaster detail ---------- */
.roaster-detail { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-top: 12px; }
.roaster-header { margin-bottom: 16px; }
.roaster-detail .details { margin: 24px 0; }
.roaster-detail dt { font-weight: 600; color: var(--coffee-medium); margin-top: 14px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.roaster-detail dd { margin: 4px 0 0; }
.hours { white-space: pre-line; font-size: 0.92rem; }
.description { font-size: 1.02rem; color: var(--text); margin: 16px 0; }
.description p { margin: 0 0 12px; }
.description p:last-child { margin-bottom: 0; }

/* ---------- Roaster detail: internal linking block ---------- */
.nearby { margin: 2.5rem 0; }
.nearby h2 { margin-bottom: 1rem; }
.nearby-subhead { margin-top: 2rem; }
.nearby .nearby-cities { margin-top: 2.25rem; }
.see-all-wrap { margin-top: 1.25rem; }
.see-all-link { font-weight: 600; color: var(--accent-dark); }
.see-all-link:hover { text-decoration: underline; }

.detail-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.maps-link, .website-link, .claim-btn {
    display: inline-block;
    padding: 11px 20px;
    background: var(--coffee-dark);
    color: white !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
}
.maps-link:hover, .website-link:hover { background: var(--coffee-medium); }
.claim-btn { background: transparent; border: 1px solid var(--border); color: var(--coffee-dark) !important; }
.claim-btn:hover { background: var(--cream); border-color: var(--accent); }

/* ---------- Backlink Badge Generator Card ---------- */
.owner-badge-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px 0;
    box-shadow: var(--shadow);
}
.badge-preview { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.badge-icon { font-size: 2.2rem; }
.badge-preview h3 { margin: 0 0 4px; font-size: 1.15rem; color: var(--coffee-dark); }
.badge-preview p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.badge-code-box { display: flex; flex-direction: column; gap: 8px; }
.badge-code-box label { font-weight: 600; font-size: 0.85rem; color: var(--coffee-dark); }
.badge-code-box textarea {
    width: 100%;
    padding: 10px;
    font-family: monospace;
    font-size: 0.82rem;
    background: #fdfaf6;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.btn-copy {
    align-self: flex-start;
    background: var(--accent);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-copy:hover { background: var(--accent-dark); }

/* ---------- Community Tips ---------- */
.community-tips-section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.tip-card { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.tip-quote { font-style: italic; color: var(--text); margin: 0 0 8px; font-size: 0.94rem; }
.tip-author { font-size: 0.82rem; font-weight: 600; color: var(--muted); margin: 0; }
.tip-date { font-weight: 400; color: #a1978d; }
.add-tip-box { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.add-tip-box h3 { margin: 0 0 12px; font-size: 1.05rem; }
.tip-form .form-row { margin-bottom: 10px; }
.tip-form input, .tip-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
}
.btn-submit-tip {
    background: var(--coffee-dark);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
/* Honeypot: off-screen rather than display:none — some bots skip hidden inputs,
   but almost none skip an input that is merely positioned away. Shared by every
   public form via partials/honeypot.html.

   NOTE: the same declaration is repeated inline on the wrapper in honeypot.html.
   /static/ is cached for 7 days with no URL fingerprint, so relying on this file
   alone let a stale stylesheet expose the field as visible text on the live site. */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.tip-moderation-note {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 12px;
}
.tip-message {
    font-size: 0.88rem;
    border-radius: 8px;
    padding: 9px 12px;
    margin: 0 0 12px;
}
.tip-message.error {
    background: #fdecea;
    border: 1px solid #f0b7b0;
    color: #8a1f14;
}
.tip-message.success {
    background: #eaf6ee;
    border: 1px solid #b4ddc2;
    color: #1d5c33;
}

/* ---------- Explore Directory Grid ---------- */
.explore-directory { margin-top: 48px; }
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 18px;
}
.explore-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.explore-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.explore-icon { font-size: 2rem; margin-bottom: 12px; }
.explore-card h3 { margin: 0 0 8px; font-size: 1.12rem; color: var(--coffee-dark); }
.explore-card p { color: var(--muted); font-size: 0.88rem; margin: 0; line-height: 1.5; }

/* ---------- Statistics Study Page ---------- */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0 36px;
}
.stat-highlight {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}
.highlight-number { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--accent); }
.highlight-label { color: var(--muted); font-size: 0.88rem; font-weight: 600; text-transform: uppercase; }

.table-responsive { overflow-x: auto; background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.stats-table { width: 100%; border-collapse: collapse; text-align: left; }
.stats-table th, .stats-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.stats-table th { background: #f7efe4; color: var(--coffee-dark); font-weight: 700; }

.state-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.state-stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.state-stat-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.stat-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 10px; }
.bar-container { background: #eee5d8; height: 8px; border-radius: 4px; overflow: hidden; }
.bar-fill { background: var(--accent); height: 100%; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 64px;
    padding: 36px 0;
    background: var(--coffee-dark);
    color: var(--coffee-light);
    font-size: 0.85rem;
    text-align: center;
}
.footer-links { margin-bottom: 14px; }
.footer-links a { color: var(--coffee-light); margin: 0 4px; }
.footer-links a:hover { color: white; }
.disclaimer { color: #8e7c6d; font-size: 0.78rem; max-width: 600px; margin: 10px auto 0; }

/* ---------- State / popular city grid ---------- */
.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.state-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.state-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.state-name { font-weight: 700; color: var(--coffee-dark); font-size: 1.05rem; }
.state-count { color: var(--muted); font-size: 0.85rem; }

/* ---------- Why choose section ---------- */
.why-choose { margin-top: 48px; }
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.why-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
}
.why-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.why-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--coffee-dark); }
.why-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Newsletter ---------- */
.newsletter {
    margin-top: 48px;
    background: var(--coffee-dark);
    color: white;
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
}
.newsletter h2 { color: white; margin-top: 0; }
.newsletter p { color: var(--coffee-light); max-width: 480px; margin: 0 auto 20px; }
.newsletter-form { display: flex; max-width: 420px; margin: 0 auto; gap: 10px; flex-wrap: wrap; justify-content: center; }
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-family: var(--font-body);
}
.newsletter-form button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.newsletter-form button:hover { background: var(--accent-dark); }

/* ---------- Forms (Add Listing) ---------- */
.form-page { max-width: 640px; margin: 20px auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.listing-form .form-field { margin-bottom: 18px; }
.listing-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--coffee-dark); font-size: 0.92rem; }
.listing-form input, .listing-form select, .listing-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: white;
    color: var(--text);
}
.field-help { color: var(--muted); font-size: 0.82rem; margin: 4px 0 0; }
.field-error { color: #b8342a; font-size: 0.85rem; margin: 4px 0 0; }
.submit-btn {
    background: var(--coffee-dark);
    color: white;
    border: none;
    padding: 13px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
.submit-btn:hover { background: var(--coffee-medium); }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    #siteNav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--coffee-dark);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px 24px;
        gap: 14px;
    }
    #siteNav.open { display: flex; }
    .header-inner { position: relative; }
    .hero h1 { font-size: 2rem; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .stat-row { flex-direction: column; align-items: center; }
}

/* State stats report */
.stats-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.stats-table th, .stats-table td { border: 1px solid #e2d6c8; padding: 0.5rem 0.75rem; text-align: left; font-size: 0.95rem; }
.stats-table th { background: #f7efe6; }
.cite-box { background: #f7efe6; border-left: 4px solid #b85e1a; padding: 0.9rem 1.2rem; margin: 2rem 0; border-radius: 4px; }

/* Nearby cities internal linking */
.nearby-cities { margin: 3rem 0; }
.nearby-cities h2 { margin-bottom: 1rem; }
.nearby-city-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nearby-city-link {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid #e2d6c8;
  border-radius: 999px;
  color: #5a3e2b;
  font-size: 0.9rem;
  text-decoration: none;
}
.nearby-city-link:hover { background: #f7efe6; }

/* HTML sitemap hub */
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.sitemap-state h2 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.sitemap-cities { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.sitemap-cities li { padding: 2px 0; }
.muted { color: #999; }

/* Static trust pages */
.static-page { max-width: 760px; line-height: 1.7; }
.static-page h2 { margin-top: 2rem; }
.static-page a { color: #b85e1a; }

/* State report link */
.report-link { display: inline-block; padding: 0.6rem 1rem; background: #f7efe6; border-radius: 8px; color: #b85e1a; font-weight: 600; text-decoration: none; }
.report-link:hover { background: #efe2d2; }

/* Blog */
.blog-header { max-width: 760px; margin-bottom: 2rem; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-card { border: 1px solid #e2d6c8; border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.blog-cover { width: 100%; height: 170px; object-fit: cover; }
.blog-card-body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; }
.blog-card-body h2 { font-size: 1.15rem; line-height: 1.35; margin: 0; }
.blog-meta { color: #8a7563; font-size: 0.85rem; margin: 0; }
.blog-cover-full { width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; margin: 1rem 0; }
.blog-body { line-height: 1.8; font-size: 1.02rem; }
.blog-body h2 { margin-top: 1.8rem; }
.blog-city-box { background: #f7efe6; border-radius: 12px; padding: 1.2rem 1.5rem; margin: 2rem 0; }
.blog-city-box ul { padding-left: 1.2rem; }
.blog-grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------- Hours table (UX fix: scraped blob -> readable weekly table) ---------- */
.hours .open-badge { display: inline-block; font-weight: 700; font-size: 0.88rem; padding: 3px 10px; border-radius: 999px; }
.hours .open-now { background: #e5f4e3; color: #1e6b22; border: 1px solid #b7ddb1; }
.hours .closed-now { background: #fbe6e2; color: #8a2d1f; border: 1px solid #f2b8ab; }
.hours .today-hours { color: var(--muted); font-size: 0.9rem; margin-left: 6px; }
.hours-table { width: 100%; max-width: 420px; border-collapse: collapse; margin-top: 10px; background: white; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: 0.92rem; }
.hours-table th, .hours-table td { padding: 7px 14px; text-align: left; border-bottom: 1px solid #f0e6d8; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: none; }
.hours-table th { width: 110px; color: var(--coffee-dark); font-weight: 600; background: #fdf8f1; }
.hours-table .today-row th, .hours-table .today-row td { background: #fff4e3; font-weight: 700; }
.hours-closed { color: #a1978d; }
.map-fallback-note { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
/* Open-now badges on listing cards */
.badge-open { background: #e5f4e3; color: #1e6b22; border: 1px solid #b7ddb1; }
.badge-closed { background: #f1ece6; color: #756a5e; border: 1px solid #e0d5c5; }

/* ================================================================
   LEAD CAPTURE (monetization playbook)
   Form 1: wholesale match · Form 2: consumer list · Form 3: free claim
   ================================================================ */

/* ---------- Form 1: wholesale match (the money form) ---------- */
.leadbox {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 32px;
    background: linear-gradient(135deg, #2b1810, #4a2c1c);
    color: #fff;
    border-radius: var(--radius);
    padding: 36px 34px;
    margin: 28px 0 12px;
    box-shadow: var(--shadow-hover);
}
.leadbox-copy h2 { color: #fff; margin: 10px 0 12px; font-size: 1.7rem; line-height: 1.2; }
.leadbox-copy p { color: var(--coffee-light); margin: 0 0 14px; }
.leadbox-kicker {
    display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #f0c088; background: rgba(255, 255, 255, 0.1);
    padding: 4px 11px; border-radius: 20px;
}
.leadbox-points { list-style: none; padding: 0; margin: 0 0 16px; }
.leadbox-points li { position: relative; padding-left: 24px; margin-bottom: 8px; color: #f3e6d8; font-size: 0.94rem; }
.leadbox-points li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.leadbox-trust { font-size: 0.82rem; color: #b39c88 !important; margin: 0 !important; }

.lead-form {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 22px;
}
.lead-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form label { display: block; font-size: 0.82rem; color: #d9c7b5; margin-bottom: 14px; font-weight: 600; }
.lead-form input, .lead-form select {
    display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
    background: #fff; border: 1px solid #d8c7b4; border-radius: 8px;
    color: var(--text); font-family: var(--font-body); font-size: 0.94rem;
}
.lead-form input:focus, .lead-form select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.lead-consent {
    display: flex !important; align-items: flex-start; gap: 10px;
    font-weight: 400 !important; font-size: 0.82rem !important;
    color: #d9c7b5; line-height: 1.5;
}
.lead-consent input { width: auto !important; margin: 3px 0 0 !important; flex: 0 0 auto; }
.lead-submit {
    width: 100%; padding: 14px; background: var(--accent); color: #2b1810;
    border: 0; border-radius: 8px; font-size: 1.02rem; font-weight: 700;
    cursor: pointer; font-family: var(--font-body); margin-top: 4px;
}
.lead-submit:hover { background: #e08a3f; }
.lead-tiny { font-size: 0.76rem; color: #a8927e; text-align: center; margin: 12px 0 0; }
.lead-tiny a { color: #e0b184; text-decoration: underline; }

/* ---------- Form 2: consumer bean list ---------- */
.consumer-capture {
    margin-top: 48px;
    background: var(--coffee-dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
}
.consumer-capture-inner { max-width: 660px; margin: 0 auto; }
.consumer-capture h2 { color: #fff; margin: 0 0 8px; }
.consumer-capture p { color: var(--coffee-light); margin: 0 0 20px; }
.consumer-form-fields { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.consumer-form-fields input, .consumer-form-fields select {
    padding: 12px 16px; border-radius: 8px; border: none; font-size: 0.95rem;
    font-family: var(--font-body); color: var(--text); background: #fff;
}
.consumer-form-fields input[name="email"] { flex: 1 1 240px; min-width: 200px; }
.consumer-form-fields input[name="zip_code"] { width: 130px; }
.consumer-form-fields select { width: 160px; }
.consumer-form-fields button {
    background: var(--accent); color: #fff; border: none; padding: 12px 22px;
    border-radius: 8px; font-weight: 600; cursor: pointer; font-family: var(--font-body);
}
.consumer-form-fields button:hover { background: var(--accent-dark); }
.consumer-consent { justify-content: center; margin-top: 14px; color: var(--coffee-light) !important; }
.consumer-consent input { accent-color: var(--accent); }

/* ---------- Form 3: free claim CTA ---------- */
.claim-cta-box {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent);
    border-radius: var(--radius); padding: 24px 28px; margin: 28px 0;
    box-shadow: var(--shadow);
}
.claim-cta-copy h2 { margin: 0 0 8px; font-size: 1.25rem; }
.claim-cta-copy p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.claim-cta-btn {
    flex: 0 0 auto; background: var(--coffee-dark); color: #fff !important;
    padding: 13px 24px; border-radius: 8px; font-weight: 700; white-space: nowrap;
}
.claim-cta-btn:hover { background: var(--coffee-medium); }
.wholesale-inline-cta { margin-top: 14px; }
.wholesale-inline-cta a { font-weight: 600; font-size: 0.94rem; }
.card-link-cta {
    display: inline-block; background: var(--accent); color: #fff !important;
    padding: 9px 16px; border-radius: 8px; font-weight: 600;
}
.card-link-cta:hover { background: var(--accent-dark); }

/* ---------- Exit-intent popup ---------- */
.exit-popup-overlay {
    position: fixed; inset: 0; background: rgba(20, 12, 7, 0.6);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.exit-popup-overlay.open { display: flex; }
.exit-popup {
    position: relative; background: #fff; border-radius: 16px;
    max-width: 460px; width: 100%; padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); text-align: center;
}
.exit-popup h2 { margin: 0 0 8px; font-size: 1.45rem; color: var(--coffee-dark); }
.exit-popup p { color: var(--muted); margin: 0 0 18px; }
.exit-popup .consumer-form-fields { flex-direction: column; }
.exit-popup .consumer-form-fields input,
.exit-popup .consumer-form-fields select { border: 1px solid var(--border); width: 100%; }
/* The email field carries `flex: 1 1 240px` so it stretches in the row layout.
   Once this container flips to column that 240px becomes a HEIGHT basis and
   blows the email box up to 240px tall. Reset it back to auto. */
.exit-popup .consumer-form-fields input[name="email"] { flex: 0 0 auto; }
.exit-popup .consumer-form-fields button { width: 100%; }
.exit-popup-consent { color: var(--muted) !important; }
.exit-popup-close {
    position: absolute; top: 10px; right: 14px; background: none; border: none;
    font-size: 1.6rem; line-height: 1; color: #b3a396; cursor: pointer;
}

@media (max-width: 820px) {
    .leadbox { grid-template-columns: 1fr; padding: 26px 20px; }
    .lead-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .claim-cta-box { flex-direction: column; align-items: flex-start; }
    .consumer-form-fields input[name="zip_code"],
    .consumer-form-fields select { width: 100%; }
}
