/* ==========================================================================
   Hemploop — design system
   Palette: deep hemp-green, lime-wash cream, terracotta accent
   ========================================================================== */

:root {
  /* Brand colours */
  --forest:        #1c3123;
  --forest-deep:   #12211a;
  --forest-mid:    #2f5138;
  --leaf:          #4a7c59;
  --sage:          #8fae90;
  --lime:          #d9e3c8;
  --cream:         #faf7f0;
  --cream-2:       #f2ede1;
  --sand:          #e4dcc8;
  --clay:          #c1653f;
  --clay-dark:     #a04f2e;
  --gold:          #d9a441;

  /* Ink */
  --ink:           #1a1f1b;
  --ink-soft:      #4c564d;
  --ink-mute:      #7c857e;

  /* Utility */
  --white:         #ffffff;
  --line:          rgba(28, 49, 35, 0.14);
  --line-soft:     rgba(28, 49, 35, 0.08);
  --shadow-sm:     0 1px 2px rgba(18, 33, 26, 0.06), 0 2px 8px rgba(18, 33, 26, 0.05);
  --shadow-md:     0 4px 14px rgba(18, 33, 26, 0.08), 0 12px 32px rgba(18, 33, 26, 0.07);
  --shadow-lg:     0 12px 40px rgba(18, 33, 26, 0.14);

  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     24px;

  --serif:  'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --wrap:   1200px;
  --wrap-narrow: 780px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

img { max-width: 100%; display: block; }
a { color: var(--forest-mid); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--forest-deep);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); }

section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: clamp(36px, 5vw, 64px); }

.bg-cream  { background: var(--cream); }
.bg-cream2 { background: var(--cream-2); }
.bg-forest { background: var(--forest); color: var(--lime); }
.bg-forest h1, .bg-forest h2, .bg-forest h3, .bg-forest h4 { color: var(--white); }
.bg-forest a { color: var(--lime); }
.bg-forest a:hover { color: var(--gold); }
.bg-white  { background: var(--white); }
.bg-lime   { background: var(--lime); }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--clay);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; background: var(--clay); display: block;
}
.bg-forest .eyebrow { color: var(--gold); }
.bg-forest .eyebrow::before { background: var(--gold); }

.lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 62ch; }
.bg-forest .lede { color: var(--sage); }

.section-head { max-width: 70ch; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--forest); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--forest-mid); color: var(--white); box-shadow: var(--shadow-md); }

.btn-clay { background: var(--clay); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-clay:hover { background: var(--clay-dark); color: var(--white); box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); color: var(--forest); border-color: var(--forest); }

.bg-forest .btn-ghost { color: var(--lime); border-color: rgba(217, 227, 200, 0.4); }
.bg-forest .btn-ghost:hover { background: rgba(217, 227, 200, 0.12); color: var(--white); border-color: var(--lime); }

/* The hero sits on its own dark background, so ghost buttons need light inks there too. */
.hero .btn-ghost { color: var(--lime); border-color: rgba(217, 227, 200, 0.42); }
.hero .btn-ghost:hover { background: rgba(217, 227, 200, 0.14); color: var(--white); border-color: var(--lime); }

.btn-sm { padding: 9px 17px; font-size: 0.86rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 68px; padding-inline: 24px;
  max-width: var(--wrap); margin-inline: auto;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 36px;
  background: linear-gradient(140deg, var(--leaf), var(--forest));
  display: grid; place-items: center;
  color: var(--lime); font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.22rem; color: var(--forest-deep); letter-spacing: -0.02em; }
.brand-tag { font-size: 0.63rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 0.9rem; font-weight: 500; color: var(--forest);
  text-decoration: none; padding: 9px 13px; border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav a:hover { background: var(--lime); color: var(--forest-deep); }
.nav a.active { background: var(--forest); color: var(--white); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 9px; width: 42px; height: 38px; cursor: pointer;
  color: var(--forest); align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--forest-deep);
  color: var(--lime);
  padding-block: clamp(64px, 9vw, 118px);
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.34; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(18,33,26,0.94) 8%, rgba(18,33,26,0.78) 46%, rgba(28,49,35,0.5) 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { color: var(--white); max-width: 20ch; }
.hero .lede { color: var(--sage); font-size: 1.16rem; max-width: 56ch; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 34px;
  margin-top: 42px; padding-top: 30px;
  border-top: 1px solid rgba(217, 227, 200, 0.22);
}
.hero-stat strong {
  display: block; font-family: var(--serif); font-size: 2rem;
  color: var(--white); line-height: 1.1;
}
.hero-stat span { font-size: 0.8rem; color: var(--sage); letter-spacing: 0.03em; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--lime); color: var(--forest); font-size: 1.15rem; margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--lime); color: var(--forest);
}
.badge-clay { background: rgba(193, 101, 63, 0.14); color: var(--clay-dark); }
.badge-gold { background: rgba(217, 164, 65, 0.2); color: #8a6415; }
.badge-forest { background: var(--forest); color: var(--lime); }
.badge-outline { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }

/* ---------- Listing cards ---------- */
.listing {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.listing:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.listing.is-featured { border-color: rgba(217, 164, 65, 0.55); box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.13), var(--shadow-sm); }
.listing-top { display: flex; align-items: flex-start; gap: 14px; }
.listing-logo {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px;
  background: var(--lime); color: var(--forest); display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
}
.listing h3 { font-size: 1.12rem; margin: 0 0 3px; }
.listing-type { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--clay); font-weight: 700; }
.listing p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.listing-meta { font-size: 0.82rem; color: var(--ink-mute); display: flex; flex-direction: column; gap: 3px; }
.listing-meta i { width: 15px; color: var(--sage); }
.listing-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Directory controls ---------- */
.filter-bar {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px;
  position: sticky; top: 80px; z-index: 20;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
input, select, textarea {
  font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream); width: 100%; transition: border-color 0.15s ease, background 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--leaf); background: var(--white);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.13);
}
textarea { resize: vertical; min-height: 104px; }

/* Range sliders need to opt out of the generic text-input styling. */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  padding: 0; border: none; background: transparent;
  height: 30px; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: var(--sand);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--forest); border: 3px solid var(--cream);
  box-shadow: var(--shadow-sm); margin-top: -8px;
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--sand);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--forest); border: 3px solid var(--cream);
  box-shadow: var(--shadow-sm);
}
input[type="range"]:focus-visible { outline: 2px solid var(--leaf); outline-offset: 4px; }
input[type="range"]:focus { box-shadow: none; background: transparent; }

output { font-weight: 700; color: var(--forest); }
.field output { font-size: 0.9rem; }
.result-count { font-size: 0.88rem; color: var(--ink-mute); margin: 20px 0 18px; }
.result-count strong { color: var(--forest); }

/* ---------- Sponsor / ad slots ---------- */
.ad-slot {
  position: relative; border-radius: var(--radius);
  border: 1px solid var(--line-soft); background: var(--white);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.ad-slot-label {
  position: absolute; top: 0; left: 0; z-index: 2;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--sand); color: var(--ink-soft); padding: 4px 10px;
  border-bottom-right-radius: 10px;
}
.ad-sponsor { display: grid; grid-template-columns: 150px 1fr; gap: 0; }
.ad-sponsor img { width: 100%; height: 100%; object-fit: cover; min-height: 150px; }
.ad-sponsor-body { padding: 22px; }
.ad-sponsor-body h4 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; }
.ad-sponsor-body p { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 14px; }

.ad-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px; padding: 24px 26px; flex-wrap: wrap;
}
.ad-banner-body { flex: 1 1 340px; }
.ad-banner h4 { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; margin-bottom: 6px; }
.ad-banner p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* Banner creative that carries its own headline and button — whole image is the link */
.ad-banner-creative .ad-banner-link { display: block; line-height: 0; }
.ad-banner-creative img { display: block; width: 100%; height: auto; }

.ad-placeholder {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: rgba(228, 220, 200, 0.2); padding: 26px; text-align: center;
}
.ad-placeholder p { font-size: 0.88rem; color: var(--ink-mute); margin: 0 0 10px; }

/* ---------- Calculator ---------- */
.calculator {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 36px);
  box-shadow: var(--shadow-md);
}
.calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 8px; }
.calc-out {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px;
  margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line-soft);
}
.calc-metric { text-align: center; padding: 16px 10px; border-radius: var(--radius); background: var(--cream-2); }
.calc-metric strong {
  display: block; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--forest); line-height: 1.1; margin-bottom: 4px;
}
.calc-metric span { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.35; display: block; }
.calc-note { font-size: 0.82rem; color: var(--ink-mute); margin-top: 18px; margin-bottom: 0; }

/* ---------- Steps / process ---------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  counter-increment: step; position: relative;
  padding: 0 0 34px 62px; border-left: 2px solid var(--line);
}
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before {
  content: counter(step); position: absolute; left: -19px; top: -2px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--forest); color: var(--lime);
  display: grid; place-items: center; font-weight: 700; font-size: 0.92rem;
  font-family: var(--sans);
}
.step h3 { margin-bottom: 6px; font-size: 1.16rem; }
.step p { margin-bottom: 8px; color: var(--ink-soft); font-size: 0.95rem; }

/* On dark sections the step markers need to invert, or they vanish into the background. */
.bg-forest .step { border-left-color: rgba(217, 227, 200, 0.22); }
.bg-forest .step:last-child { border-left-color: transparent; }
.bg-forest .step::before { background: var(--lime); color: var(--forest-deep); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 620px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data th { background: var(--cream-2); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); font-weight: 700; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(217, 227, 200, 0.24); }
.table-highlight { background: rgba(217, 164, 65, 0.12); }

/* ---------- Pricing cards ---------- */
.tier {
  background: var(--white); border: 1.5px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; position: relative;
  box-shadow: var(--shadow-sm);
}
.tier.featured { border-color: var(--clay); box-shadow: var(--shadow-md); }
.tier-flag {
  position: absolute; top: -12px; left: 28px;
  background: var(--clay); color: var(--white); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; padding: 5px 13px; border-radius: 999px;
}
.tier-price { font-family: var(--serif); font-size: 2.3rem; color: var(--forest); line-height: 1; margin: 12px 0 4px; }
.tier-price small { font-size: 0.85rem; font-family: var(--sans); color: var(--ink-mute); font-weight: 500; }
.tier ul { list-style: none; padding: 0; margin: 20px 0 0; font-size: 0.92rem; }
.tier li { display: flex; gap: 10px; margin-bottom: 11px; color: var(--ink-soft); }
.tier li i { color: var(--leaf); margin-top: 3px; flex: 0 0 16px; }
.tier .btn { margin-top: auto; }

/* ---------- Stats strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.stat-strip > div { background: var(--white); padding: 26px 20px; text-align: center; }
.stat-strip strong { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--forest); line-height: 1.1; }
.stat-strip span { font-size: 0.8rem; color: var(--ink-mute); }

/* ---------- Prose ---------- */
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.1em; }
.prose li { color: var(--ink-soft); }
.prose blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--clay);
  font-family: var(--serif); font-size: 1.2rem; color: var(--forest); font-style: italic;
}
.callout {
  background: var(--lime); border-radius: var(--radius); padding: 24px 26px;
  border-left: 4px solid var(--leaf); margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--forest-deep); }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 12px;
}
details.faq summary {
  cursor: pointer; font-weight: 600; color: var(--forest-deep); font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 1.4rem; color: var(--clay); font-weight: 400; line-height: 1; }
details.faq[open] summary::after { content: '\2013'; }
details.faq p { margin: 14px 0 0; font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-msg {
  display: none; border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: 0.9rem; margin-top: 16px;
}
.form-msg.ok { display: block; background: var(--lime); color: var(--forest-deep); border-left: 3px solid var(--leaf); }
.form-msg.err { display: block; background: rgba(193, 101, 63, 0.13); color: var(--clay-dark); border-left: 3px solid var(--clay); }
.form-hint { font-size: 0.8rem; color: var(--ink-mute); margin-top: 12px; }
.required { color: var(--clay); }

/* ---------- Newsletter band ---------- */
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input { flex: 1 1 240px; background: rgba(255,255,255,0.94); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: var(--sage); padding-block: 60px 30px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 44px; }
.site-footer h4 { color: var(--white); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--sans); }
.site-footer a { color: var(--sage); text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--lime); }
.site-footer .brand-name { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(217,227,200,0.16); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--ink-mute);
}
.footer-note { font-size: 0.82rem; color: var(--ink-mute); max-width: 46ch; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin-block: 40px; border: 0; }
.skeleton { background: linear-gradient(90deg, var(--cream-2) 25%, var(--sand) 50%, var(--cream-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); height: 190px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 56px 24px; color: var(--ink-mute); }
.empty-state i { font-size: 2rem; color: var(--sage); margin-bottom: 12px; display: block; }

/* ---------- Email contact ---------- */
.js-email {
  display: inline-flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-top: 4px;
}
.email-link {
  font-weight: 600; word-break: break-all;
}
.email-copy { padding: 4px 12px !important; font-size: 0.75rem !important; }
.bg-forest .email-link { color: var(--lime); }
.bg-forest .email-copy { color: var(--sage); border-color: rgba(217,227,200,0.34); }
.bg-forest .email-copy:hover { color: var(--white); border-color: var(--lime); background: rgba(217,227,200,0.12); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-32 { margin-top: 32px; }

/* Visually hidden, still read by screen readers. */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Traffic dashboard (internal)
   Self-contained: safe to remove along with traffic.html + js/traffic.js.
   ========================================================================== */

/* [hidden] must win over any display rule we set below. */
.dash-empty[hidden],
#dash-body[hidden] { display: none !important; }

.dash-callout {
  background: var(--white); border-left: 4px solid var(--clay);
  border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.dash-callout h3 { display: flex; align-items: center; gap: 10px; color: var(--clay-dark); }
.dash-callout h3 i { font-size: 1.1rem; }

.dash-empty {
  background: var(--white); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 44px 28px; text-align: center;
}
.dash-empty h3 { margin-top: 0; }
.dash-empty p { max-width: 58ch; margin-inline: auto; color: var(--ink-soft); }

.dash-block { margin-top: 46px; }
.dash-block h3 { margin-bottom: 6px; }
.dash-sub { font-size: 0.9rem; color: var(--ink-mute); max-width: 78ch; margin-bottom: 20px; }
.dash-note { font-size: 0.86rem; color: var(--ink-soft); margin-top: 16px; }
.dash-block-quiet {
  background: var(--cream-2); border-radius: var(--radius); padding: 28px 30px;
}
.dash-caveats { padding-left: 1.15em; margin-bottom: 18px; }
.dash-caveats li { color: var(--ink-soft); font-size: 0.92rem; }

.chart-frame { position: relative; width: 100%; }

/* Horizontal bar lists (sources, devices) */
.bar-list { list-style: none; padding: 0; margin: 0; }
.bar-item { margin-bottom: 16px; }
.bar-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; font-size: 0.9rem; margin-bottom: 6px;
}
.bar-head span { color: var(--ink); font-weight: 500; word-break: break-word; }
.bar-head strong { color: var(--forest); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-head em { color: var(--ink-mute); font-style: normal; font-weight: 500; font-size: 0.84em; }
.bar-track {
  height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden;
}
.bar-fill {
  height: 100%; background: var(--leaf); border-radius: 999px;
  transition: width 0.4s ease;
}

@media (max-width: 720px) {
  .dash-callout { padding: 22px 20px; }
  .dash-block-quiet { padding: 22px 20px; }
  .bar-head { font-size: 0.85rem; }
}

/* ==========================================================================
   Lead viewer (internal)
   Self-contained: safe to remove along with leads.html + js/leads.js.
   ========================================================================== */

.lead-toolbar {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
}
.lead-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-tab {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--white); color: var(--ink-soft);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.lead-tab:hover { border-color: var(--leaf); color: var(--forest); }
.lead-tab[aria-selected="true"] {
  background: var(--forest); border-color: var(--forest); color: var(--lime);
}
.lead-tab i { font-size: 0.85rem; }
.lead-tab-n {
  font-size: 0.74rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: var(--cream-2); color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.lead-tab[aria-selected="true"] .lead-tab-n { background: rgba(217,227,200,0.22); color: var(--lime); }

.lead-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.lead-filters input, .lead-filters select {
  font-family: var(--sans); font-size: 0.9rem; padding: 10px 14px;
  border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--white); color: var(--ink);
}
.lead-filters input { min-width: 240px; }
.lead-filters input:focus, .lead-filters select:focus { outline: 2px solid var(--leaf); outline-offset: 1px; }

/* ---------- Lead cards ---------- */
.lead-card {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}
.lead-card.is-new { border-left: 4px solid var(--clay); }
.lead-card.is-unseen { box-shadow: var(--shadow-sm); }

.lead-card > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; padding: 16px 20px;
}
.lead-card > summary::-webkit-details-marker { display: none; }
.lead-card > summary:hover { background: rgba(217,227,200,0.18); }
.lead-card[open] > summary { border-bottom: 1px solid var(--line-soft); }

.lead-head { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.lead-icon {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px;
  background: var(--lime); color: var(--forest); display: grid; place-items: center;
  font-size: 0.95rem;
}
.lead-title { display: block; font-weight: 600; color: var(--forest-deep); font-size: 1rem; }
.lead-sub { display: block; font-size: 0.85rem; color: var(--ink-mute); }
.lead-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.lead-when { font-size: 0.8rem; color: var(--ink-mute); white-space: nowrap; padding-top: 4px; }

.badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.badge-new { background: rgba(193,101,63,0.15); color: var(--clay-dark); }
.badge-progress { background: rgba(217,164,65,0.18); color: #8a6410; }
.badge-good { background: rgba(74,124,89,0.16); color: var(--forest-mid); }
.badge-muted { background: var(--cream-2); color: var(--ink-mute); }
.badge-unseen { background: var(--forest); color: var(--lime); }

.lead-body { padding: 18px 20px 20px; }
.lead-fields {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 22px; margin-bottom: 16px;
}
.lead-field span {
  display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 2px;
}
.lead-field strong { font-weight: 500; color: var(--ink); font-size: 0.92rem; word-break: break-word; }

.lead-message {
  background: var(--cream); border-left: 3px solid var(--sage);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px;
  font-size: 0.92rem; color: var(--ink-soft); white-space: pre-wrap;
}
.lead-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 720px) {
  .lead-toolbar { flex-direction: column; align-items: stretch; }
  .lead-filters input { min-width: 0; flex: 1 1 auto; }
  .lead-filters select { flex: 1 1 auto; }
  .lead-card > summary { flex-direction: column; gap: 8px; }
  .lead-when { padding-top: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .filter-bar { grid-template-columns: 1fr 1fr; position: static; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--white); border: 1px solid var(--line-soft);
    border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: var(--radius-sm); }
  .ad-sponsor { grid-template-columns: 1fr; }
  .ad-sponsor img { height: 140px; min-height: 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .calc-inputs { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .hero-stat strong { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; justify-content: center; }
  .step { padding-left: 46px; }
  .step::before { width: 30px; height: 30px; left: -16px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .wrap { padding-inline: 18px; }
  .stat-strip { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .newsletter-form, .filter-bar { display: none; }
  body { background: white; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
