/* The Diabetic Dose: Ramp-inspired preview styles */
:root {
  --bg: #faf9f7;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: #e8e6e1;
  --teal: #0d7377;
  --teal-hover: #095c5f;
  --teal-soft: #e6f3f3;
  --cream-tint: #f3f1ec;
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 26, 26, 0.06), 0 1px 3px rgba(26, 26, 26, 0.04);
  --shadow-lg: 0 8px 20px rgba(26, 26, 26, 0.07), 0 2px 6px rgba(26, 26, 26, 0.04);
  --space-1: 0.25rem; /* 4px rhythm */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --section-pad-y: 4rem; /* ≥64px mobile */
  --section-pad-y-lg: 6rem; /* ≥96px desktop */
  --max: 720px;
  --max-wide: 960px;
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion: 0.55s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* sticky header clearance for in-page anchors */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px — within 16–18px QC band */
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-hover);
}

/* Keyboard focus rings — do not remove outline globally */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav a:focus-visible,
.nav .cta:focus-visible,
.logo:focus-visible,
.ticker-chip:focus-visible,
.spotlight-actions .text-link:focus-visible,
.footer-nav a:focus-visible,
.section-head a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.form-card input:focus-visible,
.form-mock input:focus-visible,
.download-card a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Cards clip outline via overflow:hidden — use ring via box-shadow */
a.card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--teal);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header / nav */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--text);
}

.logo span {
  color: var(--teal);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.25rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff !important;
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s ease, transform 0.2s var(--ease);
}

.nav .cta:hover {
  background: var(--teal-hover);
}

/* Layout */
main {
  min-height: 60vh;
  padding-bottom: 3.5rem; /* breathing room so last content is not cramped before footer */
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-pad-y) 1.25rem;
}

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--section-pad-y) 1.25rem;
}

/* Legacy simple hero (inner pages) */
.hero {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--section-pad-y) 1.25rem 3rem;
  text-align: left;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

/* Home hero banner */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 8% 18%, rgba(13, 115, 119, 0.1), transparent 55%),
    radial-gradient(ellipse 45% 40% at 92% 12%, rgba(13, 115, 119, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 45% at 70% 90%, rgba(250, 249, 247, 0.95), transparent 55%),
    linear-gradient(135deg, #faf9f7 0%, #f5f3ef 48%, #faf9f7 100%);
  background-size: 120% 120%, 120% 120%, 100% 100%, 100% 100%;
  animation: meshDrift 18s ease-in-out infinite alternate;
}

.hero-mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(250, 249, 247, 0.15) 0%, transparent 40%, rgba(250, 249, 247, 0.55) 100%);
  opacity: 0.9;
}

@keyframes meshDrift {
  0% {
    background-position: 0% 40%, 100% 0%, 50% 50%, 0% 0%;
  }
  100% {
    background-position: 18% 58%, 82% 28%, 50% 50%, 0% 0%;
  }
}

.hero-banner-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--section-pad-y) 1.25rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem 2.5rem;
  align-items: start;
}

.hero-copy h1 {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.hero-copy .lede {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.news-spotlight {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.news-spotlight::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal), #5bb5b8);
  border-radius: 3px 0 0 3px;
}

.spotlight-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

.news-spotlight h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.spotlight-meta {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.teaser-list {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.teaser-list a {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}

.teaser-list a:hover {
  background: linear-gradient(90deg, var(--teal-soft), var(--cream-tint));
  border-color: #d4e8e8;
  color: inherit;
  transform: translateX(2px);
}

.teaser-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text);
}

.teaser-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.start-here-panel .teaser-list {
  margin-bottom: 0.85rem;
}

.start-here-chips .chip-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.start-here-panel .spotlight-actions {
  margin-top: 0.15rem;
}

.spotlight-actions .text-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.spotlight-actions .text-link:hover {
  color: var(--teal-hover);
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff !important;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(13, 115, 119, 0.12);
  transition: background 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--teal-hover);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(13, 115, 119, 0.22);
}

/* Secondary / quiet CTA — one teal primary per band */
.btn-ghost {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
  box-shadow: none;
  font-weight: 600;
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text) !important;
  border-color: #d4d0c8;
  box-shadow: var(--shadow-sm);
}

.btn-sm,
.btn.btn-sm {
  padding: 0.5rem 1rem;
  min-height: 44px;
  font-size: 0.875rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0 0 2rem;
  max-width: 75ch;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

/* Homepage Start here: even 2×2 (avoid lone second-row card) */
.card-grid.start-here {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem;
}

@media (max-width: 700px) {
  .card-grid.start-here {
    grid-template-columns: 1fr !important;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.22s ease,
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--teal), #7ec8ca);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.start-here .card::before,
.card-grid .card:hover::before {
  opacity: 1;
}

.start-here .card {
  border-left-color: transparent;
}

.start-here .card::before {
  opacity: 0.85;
}

a.card:hover {
  border-color: #cfe5e5;
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card .card-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--teal);
  text-decoration: none;
}

/* Medium splash: hero visual, card thumbs, visual guides */
.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.hero-visual {
  margin: 0;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.card-with-thumb {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.card-with-thumb .card-body {
  padding: 1.15rem 1.35rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-with-thumb .card-body p {
  flex: 1;
}

.card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cream-tint);
  border-bottom: 1px solid var(--border);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.card-thumb.thumb-contain {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.card-thumb.thumb-contain img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.start-here .card-with-thumb::before {
  top: 0;
  bottom: 0;
  height: auto;
}

.section-lede {
  margin: -0.5rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 48rem;
}

.visual-guides-section {
  padding-top: calc(var(--section-pad-y) - 0.5rem);
}

.visual-guides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
}

.visual-guide {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.22s ease,
    transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.visual-guide:hover {
  border-color: #cfe5e5;
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.visual-guide:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--teal);
}

.visual-guide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: var(--cream-tint);
  border-bottom: 1px solid var(--border);
}

.visual-guide-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.visual-guide-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.visual-guide-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.visual-guide .card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--teal);
  text-decoration: none;
}

.news-item-with-media {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.news-item-media {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--cream-tint);
  aspect-ratio: 4 / 3;
}

.news-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.news-item-body h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .visual-guides {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hero-aside {
    gap: 1.25rem;
  }

  .news-item-with-media {
    grid-template-columns: 1fr;
  }

  .news-item-media {
    max-width: 320px;
  }
}

@media (max-width: 700px) {
  .card-thumb {
    aspect-ratio: 16 / 9;
  }

  /* Keep text readable: don't let thumbs dominate small cards */
  .card-with-thumb .card-body {
    padding: 1rem 1.15rem 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .visual-guide {
    transition: none;
  }
}

/* Sections on home */
.section {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: var(--section-pad-y) 1.25rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-head a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.band {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--section-pad-y) 0;
  margin: 1rem 0 0;
}

.band .inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.disclaimer-box {
  background: var(--teal-soft);
  border: 1px solid #c5e0e0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2rem 0 0;
}

.disclaimer-box strong {
  color: var(--text);
}

/* Prose / posts — readable measure ≤75ch */
.prose {
  max-width: 75ch;
}

.prose p {
  margin: 0 0 1rem;
  line-height: 1.5;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.5em; /* readable indent ≥1.25em */
}

.prose li {
  margin-bottom: 0.5rem;
}

article.prose,
.wrap.prose {
  max-width: var(--max);
}

.prose strong {
  font-weight: 600;
}

.post-cta {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.post-cta p {
  margin: 0 0 0.5rem;
}

.post-cta p:last-child {
  margin-bottom: 0;
}

/* News / list rows */
.news-item,
.list-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s var(--ease);
}

.news-item::before,
.list-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 3px;
  border-radius: 2px;
  background: var(--teal);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.news-item:hover,
.list-row:hover {
  background: linear-gradient(90deg, var(--teal-soft) 0%, #fff 42%, var(--cream-tint) 100%);
  border-color: #d4e8e8;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.news-item:hover::before,
.list-row:hover::before {
  opacity: 1;
}

.news-item h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.news-item .source {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.news-item ul {
  margin: 0.5rem 0 0;
  padding-left: 1.5em;
}

/* Simple link lists (resources, etc.) */
.wrap > ul:not(.check-list) > li,
.wrap-wide > ul:not(.check-list) > li,
.link-list > li {
  padding: 0.45rem 0.65rem;
  margin: 0 -0.65rem 0.15rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.wrap > ul:not(.check-list) > li:hover,
.wrap-wide > ul:not(.check-list) > li:hover,
.link-list > li:hover {
  background: linear-gradient(90deg, var(--teal-soft), var(--cream-tint));
}

/* Generic lists: readable indent (non-check-list) */
.wrap > ul:not(.check-list),
.wrap-wide > ul:not(.check-list),
.link-list {
  padding-left: 1.5em;
}

.tldr {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.tldr ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.form-mock {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 28rem;
}

.form-mock label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-mock input[type="email"],
.form-mock input[type="text"] {
  width: 100%;
  padding: 0.75rem 0.85rem;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 1rem;
  background: #fff;
}

.form-mock .hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}


/* Lead magnet signup (Netlify Forms) */
.lead-magnet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.75rem 0;
}

@media (min-width: 720px) {
  .lead-magnet-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.form-card,
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.form-card-title {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.form-card-lede {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.1rem;
}

.form-card label,
.download-card label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-card .optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-card input[type="email"],
.form-card input[type="text"] {
  width: 100%;
  padding: 0.75rem 0.85rem;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 1rem;
  background: #fff;
}

.form-card .hint,
.download-card .hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.netlify-honeypot {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.btn-secondary,
a.btn-secondary {
  background: #fff;
  color: var(--teal) !important;
  border: 2px solid var(--teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}

.btn-secondary:hover,
a.btn-secondary:hover {
  background: var(--teal-soft);
  color: var(--teal-hover) !important;
  border-color: var(--teal-hover);
}

.btn-secondary:focus-visible,
a.btn-secondary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.checklist-preview {
  margin: 1.25rem 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--cream-tint);
}

.checklist-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.thank-you-card {
  max-width: 28rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem; /* ≥8px */
  padding: 0.75rem 0.25rem 0.75rem 0.15rem;
  margin: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: background 0.2s ease;
  line-height: 1.5;
  /* checkbox + gap ≈ indent feel ≥1.25em */
}

.check-list li:hover {
  background: linear-gradient(90deg, var(--teal-soft), transparent);
}

.check-list li::before {
  content: "";
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  border: 2px solid var(--teal);
  border-radius: 3px;
  box-sizing: border-box;
  position: static;
}

/* Entrance motion */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--motion) var(--ease),
    transform var(--motion) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card-grid .card.reveal:nth-child(1) { --reveal-delay: 0ms; }
.card-grid .card.reveal:nth-child(2) { --reveal-delay: 60ms; }
.card-grid .card.reveal:nth-child(3) { --reveal-delay: 120ms; }
.card-grid .card.reveal:nth-child(4) { --reveal-delay: 180ms; }
.card-grid .card.reveal:nth-child(5) { --reveal-delay: 240ms; }
.card-grid .card.reveal:nth-child(6) { --reveal-delay: 300ms; }

.hero-copy.reveal { --reveal-delay: 40ms; }
.news-spotlight.reveal { --reveal-delay: 140ms; }
.hero-aside.reveal { --reveal-delay: 120ms; }
.visual-guide.reveal:nth-child(1) { --reveal-delay: 0ms; }
.visual-guide.reveal:nth-child(2) { --reveal-delay: 80ms; }
.visual-guide.reveal:nth-child(3) { --reveal-delay: 160ms; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 2.5rem 1.25rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0;
}

.footer-note a {
  color: var(--text-muted);
}

@media (max-width: 800px) {
  .hero-banner-inner {
    grid-template-columns: 1fr;
    padding: var(--section-pad-y) 1.25rem;
    gap: 1.75rem;
  }

  .hero-copy h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .nav {
    width: 100%;
  }

  .news-spotlight {
    padding: 1.25rem;
  }
}

/* Desktop section vertical padding ≥96px */
@media (min-width: 768px) {
  :root {
    --section-pad-y: var(--section-pad-y-lg);
  }

  .hero {
    padding-top: var(--section-pad-y-lg);
  }
}



/* Horizontal ticker / marquee: Ramp cream/teal */
.ticker {
  --ticker-bg: var(--cream-tint);
  --ticker-fg: var(--text);
  /* Wide enough that a chip is fully opaque only once fully on-screen */
  --ticker-fade: clamp(3.25rem, 10vw, 5.5rem);
  --ticker-inset: var(--ticker-fade);
  background: var(--ticker-bg);
  color: var(--ticker-fg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

/* Soft edge fades (paired with track spacers below) */
.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--ticker-fade);
  z-index: 3;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--ticker-bg) 0%, transparent 100%);
}

.ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--ticker-bg) 0%, transparent 100%);
}

.ticker-slim .ticker-group {
  padding: 0.5rem 0.5rem;
  gap: 0.5rem;
}

.ticker-viewport {
  overflow: hidden;
  width: 100%;
  /* Keep chips inside the inset before they read as “in view”. */
  padding-inline: var(--ticker-inset);
  box-sizing: border-box;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    transparent calc(var(--ticker-fade) - 0.5rem),
    #000 var(--ticker-fade),
    #000 calc(100% - var(--ticker-fade)),
    transparent calc(100% - var(--ticker-fade) + 0.5rem),
    transparent
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    transparent calc(var(--ticker-fade) - 0.5rem),
    #000 var(--ticker-fade),
    #000 calc(100% - var(--ticker-fade)),
    transparent calc(100% - var(--ticker-fade) + 0.5rem),
    transparent
  );
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 50s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0;
  flex-shrink: 0;
}

/* Track spacers: chip fully clears inset/fade before it enters the readable band */
.ticker-group::before,
.ticker-group::after {
  content: "";
  flex: 0 0 var(--ticker-inset);
  width: var(--ticker-inset);
  height: 1px;
  pointer-events: none;
}

.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem 0.5rem 0.45rem;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}

.ticker-chip:hover {
  background: var(--teal-soft);
  border-color: #cfe5e5;
  color: var(--text);
  transform: translateY(-1px);
}

.ticker-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  line-height: 1.2;
}

.ticker-title {
  color: inherit;
  line-height: 1.25;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .ticker {
    /* Give the moving track a real mobile-safe inset on both edges. */
    --ticker-fade: clamp(3.75rem, 14vw, 5rem);
    --ticker-inset: calc(var(--ticker-fade) + 0.5rem);
  }

  .ticker-chip {
    font-size: 0.8125rem;
    padding: 0.45rem 0.7rem 0.45rem 0.4rem;
    min-height: 44px;
  }

  .ticker-group {
    padding: 0.5rem 0.45rem;
    gap: 0.5rem;
  }

  .ticker-title {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    transform: none;
    flex-wrap: wrap;
    width: 100%;
    max-width: var(--max-wide);
    margin: 0 auto;
    justify-content: center;
  }

  .ticker-group[aria-hidden="true"] {
    display: none;
  }

  .ticker-group {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.65rem 1rem;
  }

  .ticker-chip:hover {
    transform: none;
  }

  .ticker-viewport {
    mask-image: none;
    -webkit-mask-image: none;
    overflow: visible;
    padding-inline: 1rem;
  }

  .ticker::before,
  .ticker::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-mesh {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card,
  .news-item,
  .list-row,
  .teaser-list a,
  .btn,
  .nav .cta {
    transition: none;
  }

  a.card:hover,
  .news-item:hover,
  .list-row:hover,
  .teaser-list a:hover {
    transform: none;
  }
}

/* QC: wrapped sticky nav needs more scroll clearance on phone */
@media (max-width: 800px) {
  html {
    scroll-padding-top: 12rem;
  }

  .site-header {
    /* keep sticky but leave room for multi-row nav */
  }

  main {
    padding-top: 0.5rem;
  }

  .hero-banner,
  .wrap,
  .wrap-wide {
    scroll-margin-top: 12rem;
  }

  /* Section targets need their own clearance; the wrap itself is not the target. */
  .resources-hub > .shelf[id] {
    scroll-margin-top: 12rem;
  }

  /* Hide injected Netlify deploy badge on narrow screens (covers content) */
  body > a[href*="netlify.com"][style*="position"],
  body > div[id*="netlify" i],
  iframe[title*="Netlify" i],
  a#netlify-badge,
  .netlify-badge {
    display: none !important;
  }
}



/* QC: compound class on secondary links must not inherit primary white text */
.btn.btn-secondary,
a.btn.btn-secondary {
  background: #fff !important;
  color: var(--teal) !important;
  border: 2px solid var(--teal) !important;
  box-shadow: none !important;
}
.btn.btn-secondary:hover,
a.btn.btn-secondary:hover {
  background: var(--teal-soft) !important;
  color: var(--teal-hover) !important;
}


/* About knowledge map: even rows on wide screens */
.card-grid.about-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 900px) {
  .card-grid.about-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .card-grid.about-map {
    grid-template-columns: 1fr;
  }
}

/* ===== BT1-adapted IA + medium splash extras ===== */

.path-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.path-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}

.path-chip:hover {
  background: var(--teal-soft);
  border-color: #cfe5e5;
  color: var(--text);
}

.path-chip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.disclaimer-strip {
  max-width: var(--max-wide);
  margin: 0.75rem auto 0;
  padding: 0.55rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.disclaimer-strip a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

.disclaimer-strip a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.section-nav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  position: sticky;
  top: 3.6rem;
  z-index: 40;
  background: rgba(250, 249, 247, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 1rem;
  margin: 0;
}

.section-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.section-nav a:hover,
.section-nav a.is-active {
  color: var(--text);
  background: #fff;
  border-color: var(--border);
}

.section-nav a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (max-width: 800px) {
  /* Let the shelf nav form rows instead of clipping labels behind a scrollbar. */
  .section-nav {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    scrollbar-width: none;
    row-gap: 0.2rem;
  }

  .section-nav a {
    flex: 0 1 auto;
    max-width: 9rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
}

@media (min-width: 900px) {
  .section-nav {
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    max-width: var(--max-wide);
    margin: 0.5rem auto 0;
    padding-inline: 1.25rem;
    flex-wrap: wrap;
    overflow: visible;
  }
}

.resources-hub {
  padding-top: 1.5rem;
  padding-bottom: var(--section-pad-y);
}

.timely-pin {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #cfe5e5;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--teal-soft), #fff 55%);
}

.timely-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  background: #fff;
  border: 1px solid #cfe5e5;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.timely-pin a {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.timely-pin a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.timely-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shelf {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.35rem 1.35rem 1.25rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* The shelf cards are the actual fragment targets on resources.html. */
.resources-hub > .shelf[id] {
  scroll-margin-top: 5.5rem;
}

.shelf-pinned {
  border-color: #cfe5e5;
  box-shadow: var(--shadow-md);
}

.shelf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
}

.shelf-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.shelf-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.shelf-lede {
  margin: -0.25rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.shelf-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shelf-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.shelf-links li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.shelf-links a {
  text-decoration: none;
  color: var(--text);
}

.shelf-links a:hover {
  color: var(--teal);
}

.shelf-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stub-notes {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}

.stub-notes p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stub-notes p:last-child { margin-bottom: 0; }

.visual-guides-compact {
  margin-top: 0.5rem;
}

.briefing-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.briefing-cta-compact { margin-top: 1.15rem; }

.briefing-cta-copy h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.briefing-cta-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
}

.anchor-target {
  display: block;
  position: relative;
  top: -5rem;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  .path-chips { gap: 0.4rem; }
  .path-chip { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
  .briefing-cta { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .path-chip { transition: none; }
}
