/* ============================================================================
   Homepage-specific styles — layers on top of colors_and_type.css and
   ui_kits/web_app/styles.css. Hero treatments, marketing sections, footer.
   ============================================================================ */

/* The editorial chrome lives in a full-height flex column so the shared footer
   can be pinned to the bottom of the viewport on short pages (margin-top:auto
   below). homepage.css is only loaded on _base.html pages, so scoping these
   body rules here keeps them off the app-header pages. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hp-artboard {
  background: var(--bg-page);
  font-family: var(--font-body);
  color: var(--cocoa-900);
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Re-create the app header with same vocab but a marketing-friendly height */
.hp-header {
  display: flex; align-items: center; gap: 24px;
  padding: 16px 40px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-page);
}
.hp-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.hp-brand img { display: block; image-rendering: -webkit-optimize-contrast; }
.hp-brand-wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--cocoa-900);
  line-height: 1;
}
.hp-brand-wordmark em {
  font-style: italic; font-weight: 400;
  color: var(--teal-600);
}
.hp-nav {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
  justify-content: center;
}
.hp-nav a {
  color: var(--cocoa-700);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-md);
}
.hp-nav a:hover { background: var(--eggshell-100); color: var(--cocoa-900); }
.hp-header-right { display: flex; align-items: center; gap: 10px; }

/* ----- Footer (shared) ----------------------------------------------------- */
.hp-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding: 32px 40px 40px;
  background: var(--bg-card-sunk);
  font-family: var(--font-body);
  color: var(--cocoa-700);
  font-size: 13px;
}
.hp-footer-row { display: flex; gap: 40px; max-width: 1200px; margin: 0 auto; }
.hp-footer-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cocoa-800);
  margin: 0 0 12px;
}
.hp-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.hp-footer-col a { color: var(--cocoa-700); text-decoration: none; }
.hp-footer-col a:hover { color: var(--teal-600); }
.hp-footer-brand { flex: 1; max-width: 320px; }
.hp-footer-brand p { color: var(--cocoa-500); margin: 8px 0 0; line-height: 1.5; }
.hp-footer-bottom {
  max-width: 1200px; margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--cocoa-500);
  font-size: 12px;
}

/* ============================================================================
   HERO A — Tool-first (utility-as-hero)
   ============================================================================ */
.hpa-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  padding: 72px 40px 56px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.hpa-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-600);
  margin-bottom: 18px;
}
.hpa-h1 {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--cocoa-900);
  margin: 0 0 22px;
  text-wrap: balance;
}
.hpa-h1 em { font-style: italic; font-weight: 400; color: var(--teal-600); }
.hpa-lede {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.5;
  color: var(--cocoa-700);
  margin: 0 0 28px;
  max-width: 32ch;
  font-weight: 400;
}
.hpa-trust {
  display: flex; gap: 28px; align-items: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--cocoa-700);
}
.hpa-trust-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--cocoa-900);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.hpa-trust-stat span { color: var(--cocoa-500); font-size: 12px; }
.hpa-tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 24px 26px 22px;
  position: relative;
}
.hpa-tool-card::before {
  content: "Try it now";
  position: absolute; top: -10px; right: 20px;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--teal-500); color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.hpa-tool-card h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500;
  margin: 0 0 4px; color: var(--cocoa-900);
  letter-spacing: -0.005em;
}
.hpa-tool-card .hpa-tool-sub { font-family: var(--font-body); font-size: 13px; color: var(--cocoa-500); margin: 0 0 18px; }
.hpa-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.hpa-form-grid .field { display: flex; flex-direction: column; gap: 4px; }
.hpa-form-grid .field.span-2 { grid-column: span 2; }
.hpa-form-grid label {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  color: var(--cocoa-800);
}
.hpa-form-grid input, .hpa-form-grid select {
  font-family: var(--font-body); font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff; color: var(--cocoa-900);
}
.hpa-tools-grid {
  background: var(--bg-card-sunk);
  padding: 64px 40px;
}
.hpa-tools-grid-inner { max-width: 1200px; margin: 0 auto; }
.hpa-section-h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--cocoa-900);
  margin: 0 0 8px;
}
.hpa-section-h2 em { font-style: italic; font-weight: 400; color: var(--teal-600); }
.hpa-section-lede {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--cocoa-700);
  margin: 0 0 32px;
  max-width: 50ch;
}
.hpa-tools-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hpa-tool-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 180px;
}
.hpa-tool-mini-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cocoa-500);
}
.hpa-tool-mini h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--cocoa-900);
}
.hpa-tool-mini p { font-family: var(--font-body); font-size: 12.5px; color: var(--cocoa-700); margin: 0; line-height: 1.5; flex: 1; }
.hpa-tool-mini-cta {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  color: var(--teal-600);
  text-decoration: none;
  margin-top: 6px;
}

/* ============================================================================
   HERO B — Editorial / research bureau
   ============================================================================ */
.hpb-bar {
  background: var(--cocoa-900);
  color: var(--eggshell-100);
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 8px 40px;
  display: flex; align-items: center; gap: 16px;
}
.hpb-bar strong { color: var(--honey-200); font-weight: 700; letter-spacing: 0.04em; }
.hpb-bar .hpb-bar-arrow { margin-left: auto; opacity: 0.7; }

.hpb-mast {
  text-align: center;
  padding: 32px 40px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-page);
}
.hpb-mast-h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--cocoa-900);
  margin: 0;
  line-height: 1;
}
.hpb-mast-h1 em { font-style: italic; font-weight: 400; color: var(--teal-600); }
.hpb-mast-sub {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cocoa-500);
  margin-top: 10px;
}

.hpb-lead {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 40px;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px;
}
.hpb-lead-eyebrow {
  font-family: var(--font-body); font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--terracotta-600); margin-bottom: 14px;
}
.hpb-lead-h2 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.02;
  color: var(--cocoa-900);
  margin: 0 0 16px;
}
.hpb-lead-h2 em { font-style: italic; font-weight: 400; }
.hpb-lead-dek {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.5;
  color: var(--cocoa-700);
  margin: 0 0 24px;
  font-weight: 400;
}
.hpb-byline { font-family: var(--font-body); font-size: 12.5px; color: var(--cocoa-500); }
.hpb-byline strong { color: var(--cocoa-800); font-weight: 600; }
.hpb-lead-chart {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; flex-direction: column;
  font-family: var(--font-mono);
}
.hpb-chart-caption {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--cocoa-500);
  text-align: center;
  margin-top: 10px;
}

.hpb-stories {
  background: var(--bg-page);
  padding: 56px 40px;
  border-top: 1px solid var(--border-soft);
}
.hpb-stories-inner { max-width: 1200px; margin: 0 auto; }
.hpb-stories-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 12px;
}
.hpb-stories-h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--cocoa-900);
  margin: 0;
}
.hpb-stories-h3 em { font-style: italic; font-weight: 400; color: var(--teal-600); }
.hpb-stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.hpb-story {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 2px solid var(--cocoa-900);
  padding-top: 14px;
}
.hpb-story-cat {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terracotta-600);
}
.hpb-story-h4 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.18;
  color: var(--cocoa-900);
  margin: 0;
  text-wrap: balance;
}
.hpb-story p { font-family: var(--font-body); font-size: 13.5px; color: var(--cocoa-700); margin: 0; line-height: 1.5; }
.hpb-story-meta { font-family: var(--font-mono); font-size: 11px; color: var(--cocoa-500); margin-top: 4px; }

/* ============================================================================
   HERO C — Category shopper / affiliate
   ============================================================================ */
.hpc-hero {
  background: linear-gradient(180deg, var(--bg-page) 0%, var(--eggshell-100) 100%);
  padding: 72px 40px 48px;
  text-align: center;
}
.hpc-hero-inner { max-width: 920px; margin: 0 auto; }
.hpc-h1 {
  font-family: var(--font-display);
  font-size: 68px;
  font-weight: 500;
  letter-spacing: -0.024em;
  color: var(--cocoa-900);
  line-height: 1;
  margin: 0 0 18px;
  text-wrap: balance;
}
.hpc-h1 em { font-style: italic; font-weight: 400; color: var(--teal-600); }
.hpc-lede {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--cocoa-700);
  line-height: 1.45;
  margin: 0 auto 36px;
  max-width: 36ch;
  font-weight: 400;
}
.hpc-trust-strip {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  font-family: var(--font-body); font-size: 12px;
  color: var(--cocoa-700);
  margin-bottom: 40px;
  box-shadow: var(--shadow-xs);
}
.hpc-trust-strip strong { font-family: var(--font-mono); color: var(--cocoa-900); margin-right: 4px; }
.hpc-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}
.hpc-cat {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
  text-align: left;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.hpc-cat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--teal-400); }
.hpc-cat.featured { background: var(--teal-700); color: var(--eggshell-100); }
.hpc-cat.featured .hpc-cat-h3 { color: var(--eggshell-100); }
.hpc-cat.featured .hpc-cat-meta { color: var(--teal-200); }
.hpc-cat.featured .hpc-cat-cta { color: var(--honey-200); }
.hpc-cat-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cocoa-500);
  margin-bottom: 14px;
}
.hpc-cat.featured .hpc-cat-eyebrow { color: var(--honey-200); }
.hpc-cat-h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--cocoa-900);
  margin: 0 0 6px;
  line-height: 1.05;
}
.hpc-cat-meta {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--cocoa-500);
  margin: 0 0 14px;
}
.hpc-cat-list { font-family: var(--font-body); font-size: 13px; color: var(--cocoa-700); margin: 0; flex: 1; line-height: 1.7; }
.hpc-cat.featured .hpc-cat-list { color: var(--eggshell-200); }
.hpc-cat-cta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-600);
  margin-top: 12px;
}

.hpc-how {
  padding: 64px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.hpc-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.hpc-how-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 56px;
  color: var(--teal-500);
  line-height: 1;
  margin-bottom: 12px;
}
.hpc-how h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.008em;
  color: var(--cocoa-900);
  margin: 0 0 8px;
}
.hpc-how p { font-family: var(--font-body); font-size: 14px; line-height: 1.55; color: var(--cocoa-700); margin: 0; }

/* ============================================================================
   HERO D — Data viz hero
   ============================================================================ */
.hpd-hero {
  background: var(--cocoa-900);
  color: var(--eggshell-100);
  padding: 56px 40px 64px;
  position: relative;
  overflow: hidden;
}
.hpd-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(52, 117, 133, 0.25), transparent 60%);
  pointer-events: none;
}
.hpd-hero-inner {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px;
  align-items: center;
}
.hpd-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--teal-400);
  margin-bottom: 18px;
}
.hpd-h1 {
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1;
  color: var(--eggshell-50);
  margin: 0 0 22px;
}
.hpd-h1 em { font-style: italic; font-weight: 400; color: var(--honey-200); }
.hpd-lede {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--linen-300);
  margin: 0 0 30px;
  max-width: 38ch;
}
.hpd-h1-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--honey-500);
  color: var(--cocoa-900);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.hpd-h1-btn:hover { background: var(--honey-600); color: var(--eggshell-50); }
.hpd-h1-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1px solid rgba(251, 247, 239, 0.25);
  color: var(--eggshell-100);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  margin-left: 12px;
}
.hpd-h1-btn-secondary:hover { background: rgba(251, 247, 239, 0.08); }

.hpd-chart-card {
  background: rgba(251, 247, 239, 0.04);
  border: 1px solid rgba(251, 247, 239, 0.12);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(8px);
}
.hpd-chart-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.hpd-chart-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--eggshell-100);
  margin: 0;
}
.hpd-chart-state {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--linen-300);
}

.hpd-bottom {
  background: var(--bg-page);
  padding: 56px 40px 48px;
}
.hpd-bottom-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px;
}
.hpd-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}
.hpd-stat-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cocoa-500);
}
.hpd-stat-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1;
  color: var(--cocoa-900);
  margin: 12px 0 8px;
}
.hpd-stat-num em { font-style: italic; font-weight: 400; color: var(--teal-600); }
.hpd-stat-cap {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--cocoa-700);
  line-height: 1.45;
  margin: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   Standardized rate-filing card (.fc-*)
   Shared by the rate-alerts, pet and line-landing pages. Markup lives in
   main/templates/main/filing_card.html.
   ────────────────────────────────────────────────────────────────────────── */
.fc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.fc-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast, 120ms) var(--ease-out, ease);
}
a.fc-card:hover { border-color: var(--teal-500); }
.fc-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cocoa-500);
}
.fc-rank {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-700);
  margin-right: 2px;
}
.fc-company {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--cocoa-900);
  line-height: 1.25;
}
.fc-product {
  font-size: 13px;
  color: var(--cocoa-700);
}
.fc-timing {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--cocoa-800);
}
.fc-timing strong { color: var(--teal-700); }
.fc-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cocoa-700);
  background: var(--bg-card-sunk);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  margin-right: 6px;
}
.fc-impacts {
  display: flex;
  gap: 0;
  margin-top: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.fc-impact {
  flex: 1;
  padding: 6px 8px;
  text-align: center;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-card-sunk);
}
.fc-impact:last-child { border-right: 0; }
.fc-impact.is-avg { background: var(--teal-50); }
.fc-imp-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cocoa-500);
  margin-bottom: 2px;
}
.fc-imp-val {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--cocoa-900);
}
.fc-imp-val.is-up { color: #8a1f1f; }
.fc-imp-val.is-down { color: var(--teal-700); }
.fc-empty {
  font-size: 13.5px;
  color: var(--cocoa-500);
  font-style: italic;
}

/* ============================================================================
   Responsive — consumer/editorial chrome and hero variants
   The desktop layout above is built on fixed multi-column grids and large
   display type. These queries collapse those to single columns, let the
   header nav scroll horizontally, and dial the type down for small screens.
   ============================================================================ */

/* Tablet: drop the densest grids (4-up tools/cats, 3-up stories/stats) to 2-up
   and narrow the two-column hero/lead splits. */
@media (max-width: 1024px) {
  .hpa-hero,
  .hpb-lead,
  .hpd-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hpa-tools-cards,
  .hpc-cats { grid-template-columns: repeat(2, 1fr); }
  .hpb-stories-grid,
  .hpc-how-grid,
  .hpd-bottom-inner { grid-template-columns: repeat(2, 1fr); }
}

/* Phones: stack everything, scroll the header nav, shrink display type. */
@media (max-width: 720px) {
  /* --- Header: brand + actions on row one, nav scrolls full-width below --- */
  .hp-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }
  .hp-brand-wordmark { font-size: 18px; }
  .hp-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Hide the scrollbar but keep the row swipeable. */
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px;
  }
  .hp-nav::-webkit-scrollbar { display: none; }
  .hp-nav a { white-space: nowrap; flex: 0 0 auto; }
  .hp-header-right { margin-left: auto; gap: 8px; }
  /* The ghost "Sign in" is secondary — drop it so the primary CTA fits. */
  .hp-header-right .btn-ghost { display: none; }

  /* --- Subnav already scrolls; just tighten its gutter --- */
  .hp-subnav-inner { justify-content: flex-start; padding: 0 16px; }

  /* --- Footer: single column --- */
  .hp-footer { padding: 28px 16px 32px; }
  .hp-footer-row { flex-direction: column; gap: 28px; }
  .hp-footer-brand { max-width: none; }
  .hp-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }

  /* --- Hero A (tool-first) --- */
  .hpa-hero { padding: 40px 16px 32px; }
  .hpa-h1 { font-size: 40px; }
  .hpa-tools-grid { padding: 40px 16px; }
  .hpa-tools-cards { grid-template-columns: 1fr; }
  .hpa-form-grid { grid-template-columns: 1fr; }
  .hpa-form-grid .field.span-2 { grid-column: auto; }
  .hpa-section-h2 { font-size: 28px; }

  /* --- Hero B (editorial / the live homepage) --- */
  .hpb-bar { flex-wrap: wrap; gap: 6px 12px; padding: 8px 16px; }
  .hpb-bar .hpb-bar-arrow { margin-left: 0; }
  .hpb-mast { padding: 24px 16px 14px; }
  .hpb-mast-h1 { font-size: 34px; }
  .hpb-lead { padding: 32px 16px; gap: 28px; }
  .hpb-lead-h2 { font-size: 30px; }
  .hpb-lead-dek { font-size: 17px; }
  .hpb-stories { padding: 36px 16px; }
  .hpb-stories-grid { grid-template-columns: 1fr; gap: 24px; }
  .hpb-stories-head { flex-wrap: wrap; gap: 8px; }

  /* --- Hero C (category shopper) --- */
  .hpc-hero { padding: 40px 16px 32px; }
  .hpc-h1 { font-size: 40px; }
  .hpc-cats { grid-template-columns: 1fr; }
  .hpc-how { padding: 40px 16px; }
  .hpc-how-grid { grid-template-columns: 1fr; gap: 28px; }

  /* --- Hero D (data viz) --- */
  .hpd-hero { padding: 36px 16px 40px; }
  .hpd-h1 { font-size: 38px; }
  .hpd-h1-btn-secondary { margin-left: 0; margin-top: 10px; }
  .hpd-bottom { padding: 36px 16px; }
  .hpd-bottom-inner { grid-template-columns: 1fr; gap: 16px; }

  /* --- Filing cards: one per row on the narrowest screens --- */
  .fc-list { grid-template-columns: 1fr; }
}
