/* ============================================================
   Plant Based Minutes — Marketing CSS
   Complete rewrite per design spec (docs/research/design-spec.md)
   Brand palette: forest-900 / leaf-600 / leaf-500 / sun-500 / cream-50 / cream-100
   Typography: DM Serif Display (headings) + DM Sans (body)
   ============================================================ */

/* ── Design tokens ── */

:root {
  --brand-forest-900: #1e3d2f;
  --brand-leaf-600:   #4e9f3d;
  --brand-leaf-500:   #69b34c;
  --brand-sun-500:    #d46a1f;
  --brand-cream-50:   #fffdf7;
  --brand-cream-100:  #f6f4ec;

  --bg:          var(--brand-cream-50);
  --bg-alt:      var(--brand-cream-100);
  --ink:         var(--brand-forest-900);
  --ink-muted:   #4a5e50;
  --ink-light:   #8a9e8f;
  --leaf:        var(--brand-leaf-600);
  --leaf-light:  var(--brand-leaf-500);
  --sun:         var(--brand-sun-500);
  --line:        #ddd8ca;
  --ok:          #106d44;
  --error:       #9e2222;

  --section-pad-desktop: 80px;
  --section-pad-mobile:  48px;
  --content-max:         1200px;
  --card-radius:         12px;
  --radius-inner:        8px;   /* nested thumbnails/images inside cards */
  --radius-xs:           6px;   /* tiny UI elements: tags, calendar dots */
  --pill:                9999px;

  --shadow-card:   0 8px 32px rgba(30, 61, 47, 0.12);  /* elevated hover */
  --shadow-hover:  0 4px 20px rgba(30, 61, 47, 0.10);  /* subtle hover */
  --shadow-nav:    0 2px 16px rgba(30, 61, 47, 0.08);  /* nav bar */
  --shadow-focus:  0 0 0 3px rgba(78, 159, 61, 0.12);  /* focus ring */

  --leaf-dark:     #3d8630;  /* darken leaf for hover */
  --sun-dark:      #bc5c17;  /* darken sun for hover */
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: 'DM Sans', 'Avenir Next', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  color: var(--brand-forest-900);
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p { margin: 0; }

a { color: var(--leaf); }

img { display: block; max-width: 100%; }

/* ── Navigation ── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 68px;
  background: var(--brand-cream-50);
  border-bottom: 1px solid var(--line);
  transition: height 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.topbar.scrolled {
  height: 56px;
  box-shadow: var(--shadow-nav);
  border-color: transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--ink);
  margin-right: 1.5rem;
}

.brand-lockup-slot {
  display: inline-flex;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
}

.brand-lockup-hero {
  display: none;
}

.brand-lockup-footer {
  margin-bottom: 0.65rem;
}

.brand-lockup-footer-slot {
  display: none;
}

.brand-logo {
  width: 148px;
  height: auto;
  mix-blend-mode: multiply;
}

.topnav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  border-radius: var(--pill);
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.topnav a:hover,
.topnav a.active {
  color: var(--leaf);
  background: rgba(78, 159, 61, 0.08);
}

.topnav .cta-link {
  color: #fff;
  background: var(--brand-leaf-600);
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  margin-left: 0.25rem;
}

.topnav .cta-link:hover {
  background: var(--leaf-dark);
  color: #fff;
}

.topnav .nav-search {
  padding: 0.5rem 0.6rem;
  line-height: 0;
}

.topnav .nav-search svg {
  display: block;
}

/* ── Hero ── */

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--brand-cream-100);
}

.hero-media-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  gap: 0;
}

/* Content box with cream overlay */
.hero-content > * {
  max-width: 580px;
}

.hero-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 253, 247, 0.92) 45%, rgba(255, 253, 247, 0.1) 100%);
  pointer-events: none;
}

.kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}

.hero-content h1 {
  position: relative;
  z-index: 1;
}

.lede {
  position: relative;
  z-index: 1;
  margin: 0.85rem 0 0;
  color: var(--ink-muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 48ch;
}

.cta-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  align-items: center;
}

/* ── Layout ── */

main {
  width: 100%;
}

/* ── Buttons ── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--pill);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  min-height: 48px;
  border: 2px solid var(--line);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.button:hover {
  border-color: var(--leaf);
  color: var(--leaf);
  transform: scale(1.02);
}

.button.primary {
  border: none;
  background: var(--brand-sun-500);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
}

.button.primary:hover {
  background: var(--sun-dark);
  color: #fff;
  transform: scale(1.02);
}

.button.secondary {
  border: none;
  background: var(--brand-leaf-600);
  color: #fff;
  font-weight: 600;
}

.button.secondary:hover {
  background: var(--leaf-dark);
  color: #fff;
  transform: scale(1.02);
}

/* ── Cards & grids ── */

.grid {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.card-media {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.2s ease;
  border: none;
}

.card:hover .card-media {
  transform: scale(1.03);
}

.card h3 {
  margin: 0.6rem 0 0.4rem;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--brand-leaf-500);
  color: #fff;
  margin-bottom: 0.4rem;
}

.tag-chip.budget { background: var(--brand-sun-500); }
.tag-chip.vegan  { background: var(--brand-forest-900); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem 0;
}

/* Section layout */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-header h2 {
  margin: 0;
}

/* ── Forms ── */

.form-card {
  margin-top: 1.5rem;
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

input,
select {
  width: 100%;
  font: inherit;
  font-size: max(16px, 1em);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--leaf);
  box-shadow: var(--shadow-focus);
}

button {
  width: 100%;
  font: inherit;
  border: none;
  border-radius: var(--pill);
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  cursor: pointer;
  background: var(--brand-sun-500);
  min-height: 48px;
  transition: background 0.15s ease, transform 0.15s ease;
}

button:hover {
  background: var(--sun-dark);
  transform: scale(1.01);
}

.meta,
.status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.status.success { color: var(--ok); }
.status.error   { color: var(--error); }

/* ── Footer ── */

.footer {
  background: var(--brand-cream-100);
  border-top: 1px solid var(--line);
  padding: 3rem 2rem 1.5rem;
  color: var(--ink);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-brand .brand-logo,
.footer-brand-logo {
  width: 140px;
}

.footer-brand p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  max-width: 34ch;
  line-height: 1.55;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-nav-group h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.footer-nav-group a {
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.6;
}

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

.footer-email-signup p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.footer-email-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-email-form input[type="email"] {
  flex: 1 1 160px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  min-height: 44px;
  width: auto;
}

.footer-email-form button {
  border-radius: var(--pill);
  background: var(--brand-leaf-600);
  color: #fff;
  border: none;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  width: auto;
  min-height: 44px;
  transition: background 0.15s ease;
  transform: none;
}

.footer-email-form button:hover {
  background: var(--leaf-dark);
  transform: none;
}

.footer-email-signup .newsletter-status.success { color: var(--brand-leaf-600); }
.footer-email-signup .newsletter-status.error   { color: #dc2626; }

/* Footer start CTA (replaces email signup form) */
.footer-start-cta h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.25rem;
}

.footer-start-cta p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

/* Social links */
.footer-social h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}

.footer-social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social-icons a {
  color: var(--brand-forest-900);
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-social-icons a:hover {
  color: var(--brand-leaf-600);
}

.footer-bottom {
  max-width: var(--content-max);
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p,
.footer-bottom a {
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--leaf);
}

.app-version {
  display: none;
}

/* ── Video / Watch page ── */

.watch-grid {
  margin-top: 1.5rem;
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1.25rem;
}

.watch-playlist-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.watch-playlist-nav-link {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 0.4rem 0.85rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.watch-playlist-nav-link:hover {
  background: var(--brand-leaf-600);
  color: #fff;
  border-color: var(--brand-leaf-600);
}

.watch-playlist-section {
  margin-top: 1.75rem;
  scroll-margin-top: 1rem;
}

.watch-playlist-section h2 {
  margin-bottom: 0.35rem;
}

.playlist-section-desc {
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.video-grid {
  display: grid;
  gap: 1.25rem;
}

.video-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.video-thumb-link,
.video-thumb-wrap {
  display: block;
  border-radius: var(--radius-inner);
  overflow: hidden;
  margin-bottom: 0.7rem;
  aspect-ratio: 16/9;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-player {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--card-radius);
  display: block;
  background: #000;
  margin-bottom: 0.65rem;
}

.video-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.coming-soon-banner {
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem auto;
  text-align: center;
  max-width: var(--content-max);
  font-size: 0.95rem;
  color: var(--ink);
}

.watch-coming-soon-banner {
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1.5rem 1.25rem;
  margin-top: 1.5rem;
  text-align: center;
}

.watch-coming-soon-banner .kicker {
  color: var(--leaf);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.watch-coming-soon-banner h2 {
  margin-bottom: 0.5rem;
}

.watch-newsletter-cta {
  margin-top: 1.5rem;
}

.coming-soon-msg {
  font-size: 0.85rem;
  color: var(--leaf);
  font-weight: 600;
  margin: 0.4rem 0 0.5rem;
}

.recipe-highlight {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

.subtle-button {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--card-radius);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  width: auto;
  min-height: 44px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.subtle-button:hover {
  background: var(--brand-cream-100);
  border-color: var(--leaf);
  transform: none;
}

.saved-video-list {
  display: grid;
  gap: 0.6rem;
}

.saved-video-row {
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

/* ── Library page ── */

.library-panel {
  margin-top: 1.25rem;
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1.25rem;
}

.library-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.85rem;
  align-items: flex-end;
}

.library-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 160px;
  min-width: 0;
}

.library-search-group {
  flex: 2 1 260px;
}

.library-reset-group {
  flex: 0 0 auto;
}

.library-results {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.library-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.library-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.library-card img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.library-card-content {
  padding: 0.85rem;
  display: grid;
  gap: 0.5rem;
}

.library-card-content h3,
.library-card-content p {
  margin: 0;
}

.library-empty {
  border: 1px dashed var(--line);
  border-radius: var(--card-radius);
  background: var(--bg);
  padding: 1.25rem;
  text-align: center;
}

.library-empty h3,
.library-empty p {
  margin: 0;
}

/* ── Playlists page ── */

.curated-collections {
  margin-bottom: 2rem;
}

.collection-group {
  margin-bottom: 2.5rem;
}

.collection-group:last-child {
  margin-bottom: 0;
}

.collection-description {
  margin-bottom: 1rem;
}

.playlist-panel {
  margin-top: 1.25rem;
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1.25rem;
}

.playlist-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.playlist-card,
.playlist-detail-card,
.playlist-track {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
  display: grid;
  gap: 0.55rem;
}

.playlist-detail {
  margin-top: 1rem;
}

.playlist-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.playlist-track-grid {
  display: grid;
  gap: 0.75rem;
}

/* ── Guides ── */

.guides-panel {
  margin-top: 1.25rem;
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1.25rem;
}

.guides-header {
  margin-bottom: 1rem;
}

.guides-header h2 {
  margin: 0 0 0.25rem;
}

.guides-list {
  display: grid;
  gap: 0.75rem;
}

.guide-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.guide-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.guide-card-header::-webkit-details-marker {
  display: none;
}

.guide-card-info {
  display: grid;
  gap: 0.3rem;
  flex: 1;
}

.guide-card-info h3,
.guide-card-info p {
  margin: 0;
}

.guide-toggle {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 6l5 5 5-5' stroke='%234a5e50' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
}

.guide-card[open] .guide-toggle {
  transform: rotate(180deg);
}

.guide-body {
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid var(--line);
}

.guide-body h4 {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.guide-body p  { margin: 0 0 0.5rem; }

.guide-body ul {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.35rem;
}

.guide-body ul li {
  margin-bottom: 0.3rem;
}

.guide-meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: var(--brand-cream-100);
  border-radius: var(--radius-inner);
  padding: 0.45rem 0.65rem;
}

.guide-tag {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-muted);
  background: var(--brand-cream-100);
  border-radius: var(--radius-xs);
  padding: 0.1rem 0.45rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  margin: 0.35rem 0 0.6rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.guide-table th {
  text-align: left;
  padding: 0.35rem 0.55rem;
  background: var(--brand-cream-100);
  border-bottom: 2px solid var(--line);
  color: var(--ink-muted);
  font-weight: 600;
}

.guide-table td {
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid var(--line);
}

.guide-callout {
  margin-top: 0.9rem;
  background: rgba(78, 159, 61, 0.07);
  border-left: 3px solid var(--leaf);
  border-radius: 0 var(--radius-inner) var(--radius-inner) 0;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
}

/* ── Social proof ── */

.social-proof-shell {
  display: grid;
  gap: 1rem;
}

.social-proof-shell h2,
.social-proof-shell p {
  margin: 0;
}

.social-proof-metrics,
.social-proof-testimonials {
  display: grid;
  gap: 0.75rem;
}

.social-proof-item,
.social-proof-quote {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
}

.social-proof-item h3,
.social-proof-item p,
.social-proof-quote p,
.social-proof-quote footer {
  margin: 0;
}

.social-proof-item p,
.social-proof-quote footer {
  color: var(--ink-muted);
}

.social-proof-quote footer {
  margin-top: 0.55rem;
  font-size: 0.875rem;
}

/* ── Mission aims ── */

.mission-aims {
  display: grid;
  gap: 1rem;
  margin-top: 0.85rem;
}

.mission-aim {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
}

.mission-aim-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.5rem;
}

.mission-aim h3 { margin: 0 0 0.35rem; }
.mission-aim p  { margin: 0; color: var(--ink-muted); }

.mission-sources {
  padding-left: 1.3rem;
  margin: 0.5rem 0 0;
}

.mission-sources li {
  margin-bottom: 0.5rem;
  color: var(--ink-muted);
}

.mission-sources a { color: var(--leaf); }

/* ── Avatar bio ── */

.avatar-bio-shell {
  display: grid;
  gap: 1rem;
}

.avatar-bio-shell h2,
.avatar-bio-shell > p {
  margin: 0;
}

.avatar-bio-grid {
  display: grid;
  gap: 1rem;
}

.avatar-bio-card {
  display: grid;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1.1rem;
  align-items: start;
}

.avatar-bio-portrait {
  width: 100%;
  max-width: 200px;
  border-radius: var(--card-radius);
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
}

.avatar-bio-body {
  display: grid;
  gap: 0.5rem;
}

.avatar-bio-name {
  margin: 0;
  font-size: 1.1rem;
  color: var(--brand-forest-900);
}

.avatar-bio-role {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--ink-muted);
}

.avatar-bio-tagline {
  margin: 0;
  font-style: italic;
  color: var(--ink-muted);
  border-left: 3px solid var(--leaf);
  padding-left: 0.65rem;
}

.avatar-bio-body p:last-child {
  margin: 0;
  color: var(--ink-muted);
}

/* ── How it works ── */

.how-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.how-step:last-of-type {
  border-bottom: none;
}

.how-step-number {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--sun);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-step-body h3 { margin: 0 0 0.3rem; }
.how-step-body p  { margin: 0 0 0.3rem; }

/* ── Daily challenge ── */

.challenge-card {
  background: var(--bg);
  border: 2px solid var(--sun);
  border-radius: var(--card-radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.challenge-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.challenge-card p  { margin: 0 0 0.65rem; color: var(--ink-muted); }
.challenge-card p:last-child { margin-bottom: 0; }

.challenge-action {
  font-weight: 700;
  color: var(--ink);
}

.challenge-streak {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  color: var(--ink);
}

.challenge-complete-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.challenge-calendar-wrap {
  margin-top: 1.25rem;
}

.challenge-calendar-heading {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.challenge-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.calendar-day--done {
  background: var(--ok);
  color: #fff;
  font-weight: 700;
}

.calendar-day--today {
  box-shadow: 0 0 0 2px var(--sun);
}

/* ── Homepage content sections ── */

.homepage-content-section {
  margin-top: var(--section-pad-mobile);
}

@media (min-width: 780px) {
  .homepage-content-section {
    margin-top: var(--section-pad-desktop);
  }
}

/* ── Intro video section ── */

.intro-video-section {
  background: var(--bg-alt);
  padding: var(--section-pad-mobile) 1.25rem;
}

.intro-video-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
}

.intro-video-headline {
  margin-bottom: 0.75rem;
}

.intro-video-body {
  color: var(--ink-muted);
  max-width: 52ch;
  margin: 0 auto 1.75rem;
}

.intro-video-player-wrap {
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin: 0 auto;
}

.intro-video-player {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  background: #000;
  object-fit: cover;
}

@media (min-width: 780px) {
  .intro-video-section {
    padding: var(--section-pad-desktop) 2rem;
  }

  .intro-video-player-wrap {
    max-width: 640px;
  }

  .intro-video-player {
    aspect-ratio: 16 / 9;
  }
}

/* ── New to Plant-Based? section ── */

.new-to-pb-section {
  background: var(--brand-cream-100);
  padding: var(--section-pad-mobile) 1.25rem;
}

.new-to-pb-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.new-to-pb-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.new-to-pb-header h2 {
  margin: 0 0 0.5rem;
}

.new-to-pb-header p {
  color: var(--ink-muted);
  margin: 0;
}

.new-to-pb-steps {
  display: grid;
  gap: 1.25rem;
}

.new-to-pb-card {
  display: grid;
  grid-template-columns: 2rem 88px 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.new-to-pb-card:hover {
  border-color: var(--leaf);
  box-shadow: var(--shadow-hover);
}

.new-to-pb-step-num {
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  flex-shrink: 0;
}

.new-to-pb-thumb {
  width: 88px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-inner);
  border: 1px solid var(--line);
  display: block;
}

.new-to-pb-card-body {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.new-to-pb-card-body h3 {
  margin: 0;
  font-size: 0.95rem;
}

.new-to-pb-card-body p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.new-to-pb-cta {
  margin-top: 1.5rem;
  text-align: center;
}

@media (min-width: 780px) {
  .new-to-pb-section {
    padding: var(--section-pad-desktop) 2rem;
  }

  .new-to-pb-steps {
    grid-template-columns: 1fr 1fr;
  }
}

.homepage-video-grid {
  display: grid;
  gap: 1rem;
}

.homepage-video-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.homepage-video-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.view-count-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--pill);
  pointer-events: none;
}

.article-card-grid {
  display: grid;
  gap: 1rem;
}

.article-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.8rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-card:hover {
  border-color: var(--leaf);
  box-shadow: var(--shadow-hover);
}

.article-card-thumb {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-inner);
  display: block;
  border: 1px solid var(--line);
}

.article-card-body {
  display: grid;
  gap: 0.2rem;
  align-content: start;
}

.article-card-body h3 { margin: 0; font-size: 0.95rem; }

.article-card-body p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-pillar {
  margin: 0 !important;
  font-size: 0.72rem !important;
  color: var(--leaf) !important;
}

/* ── Article page ── */

.article-page {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.article-breadcrumb {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.article-breadcrumb a {
  color: var(--leaf);
  text-decoration: none;
  font-weight: 600;
}

.article-breadcrumb span {
  margin: 0 0.3rem;
}

.article-title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.article-meta {
  margin: 0 0 1.25rem !important;
  color: var(--ink-muted) !important;
}

.article-hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--card-radius);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  display: block;
}

.article-body { line-height: 1.75; color: var(--ink); }

.article-body h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; color: var(--brand-forest-900); }
.article-body h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; color: var(--brand-forest-900); }
.article-body p  { margin: 0 0 0.85rem; }

.article-body ol,
.article-body ul {
  padding-left: 1.4rem;
  margin: 0 0 0.85rem;
}

.article-body li   { margin-bottom: 0.4rem; }
.article-body hr   { border: none; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.article-body strong { font-weight: 700; color: var(--ink); }

/* MAH-403: Contextual cross-links */
.contextual-link {
  color: var(--brand-leaf-600);
  text-decoration: underline;
  text-decoration-color: var(--brand-leaf-500);
  text-underline-offset: 2px;
  font-weight: inherit;
}
.contextual-link:hover {
  color: var(--brand-forest-900);
  text-decoration-color: var(--brand-forest-900);
}

.article-body code {
  background: var(--brand-cream-100);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

/* Key Takeaway callout box */
.key-takeaway {
  background: var(--brand-cream-100);
  border-left: 4px solid var(--brand-leaf-600);
  border-radius: var(--radius-inner);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0 1.75rem;
}
.key-takeaway h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-leaf-600);
  margin: 0 0 0.45rem;
  font-weight: 700;
}
.key-takeaway p {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.6;
}

/* ── Callout Boxes (MAH-375) ── */

/* Pro Tip */
.article-tip {
  background: #eef7ee;
  border-left: 4px solid var(--brand-leaf-600);
  border-radius: var(--radius-inner);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.article-tip-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--brand-leaf-600);
  margin-top: 0.15rem;
}
.article-tip-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-leaf-600);
  font-weight: 700;
  margin: 0 0 0.3rem;
}
.article-tip-content p {
  margin: 0;
  line-height: 1.6;
  color: var(--ink);
}

/* Quick Stat */
.article-stat-callout {
  background: var(--brand-forest-900);
  color: #fff;
  border-radius: var(--radius-inner);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}
.article-stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-leaf-500);
  display: block;
  font-family: 'DM Serif Display', serif;
}
.article-stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0.4rem 0 0;
  line-height: 1.4;
}

/* Ingredient Spotlight */
.article-ingredient-spotlight {
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand-leaf-600);
  border-radius: var(--radius-inner);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
}
.article-ingredient-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 700;
  margin: 0 0 0.2rem;
}
.article-ingredient-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-forest-900);
  margin: 0 0 0.45rem;
  font-family: 'DM Serif Display', serif;
}
.article-ingredient-desc {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ── Inline Images (MAH-336) ── */

.article-inline-img-wrap {
  margin: 2rem 0;
  padding: 0;
}
.article-inline-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}
.article-inline-caption {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.4;
  font-style: italic;
  text-align: center;
}

/* ── Table of Contents (MAH-334) ── */

.article-toc {
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-leaf-600);
  border-radius: var(--radius-inner);
  margin: 0 0 1.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
}

.article-toc .toc-details { margin: 0; }

.article-toc .toc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-leaf-600);
  user-select: none;
}
.article-toc .toc-summary::-webkit-details-marker { display: none; }
.article-toc .toc-chevron { transition: transform 0.2s; flex-shrink: 0; }
.article-toc .toc-details[open] .toc-chevron { transform: rotate(180deg); }

.article-toc .toc-list {
  list-style: none;
  margin: 0;
  padding: 0 1.25rem 0.9rem;
  counter-reset: toc-h2;
}

.article-toc .toc-h2 { counter-increment: toc-h2; }
.article-toc .toc-h3 { padding-left: 1.1rem; }

.article-toc .toc-h2 > a,
.article-toc .toc-h3 > a {
  display: block;
  padding: 0.22rem 0;
  text-decoration: none;
  line-height: 1.4;
}
.article-toc .toc-h2 > a { color: var(--ink); font-weight: 500; }
.article-toc .toc-h3 > a { color: var(--ink-muted); font-size: 0.86rem; }
.article-toc .toc-h2 > a:hover,
.article-toc .toc-h3 > a:hover { color: var(--brand-leaf-600); }

/* Smooth scroll for anchor links */
html { scroll-behavior: smooth; }

/* Offset for sticky header */
.article-body h2,
.article-body h3 { scroll-margin-top: 80px; }

/* Desktop: always expanded, hide toggle chevron */
@media (min-width: 768px) {
  .article-toc .toc-summary { cursor: default; pointer-events: none; }
  .article-toc .toc-chevron { display: none; }
}

/* ── MAH-409: Health/medical disclaimer ── */

.article-disclaimer {
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--ink-light);
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.article-disclaimer p {
  margin: 0;
}

.article-tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}

.article-tag-links .meta {
  margin-right: 0.25rem;
  font-size: 0.8rem;
}

.tag-filter-link {
  font-size: 0.82rem;
  color: var(--leaf);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--leaf);
  border-radius: var(--pill);
  padding: 0.2rem 0.65rem;
  transition: background 0.15s, color 0.15s;
}

.tag-filter-link:hover {
  background: var(--leaf);
  color: #fff;
}

.article-cta-row {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* ── Related guides section ── */

.article-related {
  margin: 2rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}

.article-related-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-forest-900);
  margin: 0 0 1rem;
}

.article-related-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 600px) {
  .article-related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── MAH-390: Related Articles (You might also like) ── */

.related-articles {
  margin: 2.5rem 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
}

.related-articles-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-forest-900);
  margin: 0 0 1rem;
}

.related-articles-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.related-articles-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.related-articles-card:hover {
  border-color: var(--leaf);
  box-shadow: var(--shadow-hover);
}

.related-articles-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.related-articles-body {
  padding: 0.75rem;
  display: grid;
  gap: 0.2rem;
}

.related-articles-body h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

@media (min-width: 600px) {
  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Affiliate product section ── */

.article-affiliate {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem 1rem;
  background: var(--brand-cream-100);
  border-radius: var(--card-radius);
  border: 1px solid var(--line);
}

.affiliate-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-forest-900);
  margin: 0 0 0.2rem;
}

.affiliate-subhead {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.affiliate-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.affiliate-card:hover {
  border-color: var(--leaf);
  box-shadow: var(--shadow-hover);
}

.affiliate-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.affiliate-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}

.affiliate-card-desc {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.45;
  flex: 1;
}

.affiliate-card-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--leaf);
}

.affiliate-disclaimer {
  font-size: 0.72rem;
  color: var(--ink-light);
  margin: 0;
  font-style: italic;
}

.article-loading {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Article byline ── */

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.article-author { font-weight: 600; color: var(--ink); text-decoration: none; }
.article-author:hover { text-decoration: underline; }

.article-author-role { color: var(--ink-muted); font-style: italic; }

.article-author-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  flex-shrink: 0;
}

.article-byline-dot { color: var(--ink-muted); }

.article-view-count { color: var(--leaf); font-weight: 600; }

/* ── MAH-391: Reading Time Badge ── */

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.reading-time-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Article video ── */

.article-video-wrap {
  margin: 1.5rem 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.article-video {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

/* ── Article library card view count ── */

.article-card-views {
  margin: 0 !important;
  font-size: 0.75rem !important;
  color: var(--leaf) !important;
  font-weight: 600;
}

/* ── Articles library section (library page) ── */

.articles-library {
  margin-bottom: 2rem;
}

.articles-library-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.articles-library-header h2 { margin: 0; }

/* ── Filter pills ── */

.library-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.filter-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.filter-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-right: 0.15rem;
  white-space: nowrap;
}

.filter-pill {
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}

.filter-pill:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.filter-pill--active,
button.filter-pill[aria-pressed="true"] {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}

.filter-clear {
  background: none;
  border: none;
  padding: 0.3rem 0.25rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.filter-clear:hover { color: var(--ink); }

/* ── Library subheader (sort tabs + count) ── */

.articles-library-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.articles-filter-count {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ── Start page filter links ── */

.start-filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.start-filter-links .meta { margin-right: 0.25rem; }

.articles-sort-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sort-tab {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.sort-tab:hover { border-color: var(--leaf); color: var(--leaf); }

.sort-tab--active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}

.articles-library-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.article-library-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-library-card:hover {
  border-color: var(--leaf);
  box-shadow: var(--shadow-hover);
}

.article-library-thumb {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-inner);
  display: block;
  border: 1px solid var(--line);
}

.article-library-body {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.article-library-body h3 {
  margin: 0;
  font-size: 0.95rem;
}

.article-library-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.article-library-views {
  font-size: 0.75rem;
  color: var(--leaf);
  font-weight: 600;
}

@media (min-width: 600px) {
  .articles-library-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-library-card {
    grid-template-columns: 1fr;
  }

  .article-library-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
  }
}

@media (min-width: 1024px) {
  .articles-library-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Main content padding ── */

#marketing-root {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Responsive: Desktop (≥1024px) ── */

@media (min-width: 1024px) {
  .topbar { padding: 0 3rem; }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid .full {
    grid-column: 1 / -1;
  }

  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }


  .library-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .playlist-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .playlist-track-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-proof-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-proof-testimonials {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avatar-bio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr;
  }
}

/* ── Responsive: Tablet (640px–1023px) ── */

@media (min-width: 640px) and (max-width: 1023px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-proof-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 600px) {
  .homepage-video-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .article-card-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
  }

  .article-card-body p {
    -webkit-line-clamp: 3;
  }

  .avatar-bio-card {
    grid-template-columns: 180px 1fr;
  }
}

@media (min-width: 820px) {
  .avatar-bio-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Mobile (≤640px) ── */

@media (max-width: 640px) {
  .topbar {
    padding: 0 1rem;
    height: 60px;
  }

  .topbar.scrolled {
    height: 50px;
  }

  .topnav {
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .brand-logo {
    width: 120px;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-content {
    padding: 2.5rem 1.25rem;
  }

  .hero-content::before {
    background: rgba(255, 253, 247, 0.9);
  }

  .footer {
    padding: 2rem 1rem 1.25rem;
  }

  #marketing-root {
    padding: 1.5rem 1rem 3rem;
  }
}

/* ── Homepage articles pillar filters ── */

.homepage-pillar-filters {
  margin-bottom: 1.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.homepage-pillar-filters::-webkit-scrollbar {
  display: none;
}

/* ── Read Next ── */

.article-read-next {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.read-next-heading {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--brand-forest-900);
}

.read-next-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.read-next-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.read-next-card:hover {
  border-color: var(--leaf);
  box-shadow: var(--shadow-hover);
}

.read-next-thumb {
  width: 80px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-inner);
  border: 1px solid var(--line);
  display: block;
}

.read-next-body {
  display: grid;
  gap: 0.2rem;
  align-content: start;
}

.read-next-body h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

@media (min-width: 600px) {
  .read-next-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .read-next-card {
    grid-template-columns: 1fr;
  }

  .read-next-thumb {
    width: 100%;
    height: 120px;
  }
}

/* ── Article claps & comments ── */

.article-clap-row {
  display: flex;
  justify-content: center;
  margin: 2rem 0 1rem;
}

.article-clap-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--brand-cream-100);
  border: 2px solid var(--line);
  border-radius: var(--pill);
  padding: 0.55rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  width: auto;
  min-height: auto;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.article-clap-btn:hover {
  border-color: var(--leaf);
  background: var(--bg);
  transform: scale(1.04);
}

.article-clap-btn.clapped {
  border-color: var(--leaf);
  color: var(--leaf);
}

.clap-icon { font-size: 1.15rem; line-height: 1; }
.clap-count { min-width: 1ch; }

.article-comments {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.comments-heading {
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
  color: var(--brand-forest-900);
}

.comment-form {
  margin-bottom: 2rem;
}

.comment-form textarea {
  width: 100%;
  font: inherit;
  font-size: max(16px, 1em);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.comment-form textarea:focus-visible {
  outline: none;
  border-color: var(--leaf);
  box-shadow: var(--shadow-focus);
}

.comment-form button {
  max-width: 180px;
}

.comment-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.comment-author {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.comment-text {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.95rem;
}

.comment-empty {
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0.5rem 0;
}

/* ── /start page sections ── */

.start-path-grid,
.start-browse-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}

.start-path-card,
.start-browse-card {
  background: var(--brand-cream-50, #fefcf8);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.start-path-card .card-media,
.start-browse-card .card-media {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.start-path-card .kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--leaf);
  margin: 1rem 1rem 0.25rem;
}

.start-path-card h3,
.start-browse-card h3 {
  margin: 0.25rem 1rem 0.5rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.start-path-card p,
.start-browse-card p {
  margin: 0 1rem 1rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.start-path-card .button,
.start-browse-card .button {
  margin: 0 1rem 1.25rem;
  display: inline-block;
}

.start-welcome p {
  max-width: 68ch;
  line-height: 1.7;
}

.start-quick-wins ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.8;
}

.start-quick-wins li {
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

@media (min-width: 640px) {
  .start-path-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .start-browse-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── I Made This button ── */

.made-this-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.made-this-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--brand-leaf-600);
  color: #fff;
  border: none;
  border-radius: var(--pill);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.6rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.made-this-btn:hover:not(:disabled) {
  background: var(--brand-forest-900);
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(78, 159, 61, 0.25);
}

.made-this-btn:active:not(:disabled) {
  transform: scale(0.98);
}

@keyframes made-this-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.made-this-btn.made {
  background: var(--brand-leaf-600);
  color: #fff;
  cursor: default;
  animation: made-this-pop 0.35s ease;
}

.made-this-btn.made:disabled {
  opacity: 0.85;
}

.made-this-count {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ── Community Impact section (homepage) ── */

.community-impact {
  background: var(--brand-forest-900);
  color: #fff;
  text-align: center;
}

.community-impact-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-pad-mobile) 1.5rem;
}

@media (min-width: 768px) {
  .community-impact-inner {
    padding: var(--section-pad-desktop) 2rem;
  }
}

.community-impact-heading {
  color: #fff;
  margin-bottom: 1.25rem;
}

.community-impact-stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.community-impact-number {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  color: var(--brand-leaf-500);
}

.community-impact-unit {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 22ch;
  line-height: 1.4;
}

.community-impact-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.5rem;
}

/* ── Newsletter sections ── */

.newsletter-section {
  background: var(--brand-forest-900);
  border-radius: var(--card-radius);
  padding: 2.5rem 2rem;
  text-align: center;
}

.newsletter-section h2 {
  color: #fff;
  margin: 0 0 0.5rem;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.newsletter-section p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

.newsletter-input-row {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-input-row input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--pill);
  font: inherit;
  font-size: max(16px, 1em);
  background: #fff;
  color: var(--ink);
}

.newsletter-input-row button {
  width: auto;
}

.newsletter-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  min-height: 1.25em;
}

.newsletter-section .newsletter-status.success { color: #95d5b2; }
.newsletter-section .newsletter-status.error   { color: #fca5a5; }

/* Hero email form */
.hero-email-form {
  margin-top: 1.75rem;
}

.hero-email-form .newsletter-input-row {
  margin: 0;
  max-width: 440px;
}

.hero-email-form .newsletter-status.success { color: var(--brand-leaf-600); }
.hero-email-form .newsletter-status.error   { color: #dc2626; }

/* Article-level newsletter CTA */

.article-newsletter-cta {
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

.article-newsletter-cta h2 {
  margin: 0 0 1.25rem;
  font-size: 1.3rem;
}

.article-newsletter-cta .newsletter-status.success { color: var(--brand-leaf-600); }
.article-newsletter-cta .newsletter-status.error   { color: #dc2626; }

@media (max-width: 480px) {
  .newsletter-input-row {
    flex-direction: column;
  }
}

/* ── Nutrition Box (MAH-341) ── */

.nutrition-box {
  background: var(--brand-cream-100);
  border-left: 4px solid var(--brand-leaf-600);
  border-radius: var(--radius-inner);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0 1.75rem;
}
.nutrition-box h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-leaf-600);
  margin: 0 0 0.2rem;
  font-weight: 700;
}
.nutrition-serving {
  font-size: 0.8rem;
  color: var(--ink-muted, #666);
  margin: 0 0 0.85rem;
}
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}
.nutrition-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.nutrition-label {
  font-size: 0.68rem;
  color: var(--ink-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nutrition-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.nutrition-disclaimer {
  font-size: 0.7rem;
  color: var(--ink-muted, #666);
  margin: 0;
  font-style: italic;
}
@media (max-width: 560px) {
  .nutrition-value { font-size: 0.9rem; }
  .nutrition-label { font-size: 0.62rem; }
}

/* ── Reading Progress Bar (MAH-343 / MAH-383) ── */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--brand-leaf-600, #4e9f3d);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* ── Print Recipe Button (MAH-344) ── */
.print-recipe-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-leaf-600, #2d6a4f);
  background: transparent;
  border: 1px solid var(--brand-leaf-600, #2d6a4f);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.print-recipe-btn:hover {
  background: var(--brand-leaf-600, #2d6a4f);
  color: #fff;
}
.print-recipe-btn svg {
  flex-shrink: 0;
}

/* ── @media print (MAH-344) ── */
@media print {
  /* Hide everything except recipe content */
  #reading-progress-bar,
  .topbar,
  .article-breadcrumb,
  .article-video-wrap,
  .article-cta-row,
  .article-related,
  .related-articles,
  .article-newsletter-cta,
  .newsletter-section,
  footer,
  .print-recipe-btn,
  .article-share-bar,
  script,
  [data-cf-beacon] {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }

  .article-page {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .article-title {
    font-size: 22pt;
    margin-bottom: 0.4rem;
  }

  .article-byline {
    font-size: 9pt;
    color: #444;
    margin-bottom: 0.75rem;
  }

  .article-hero-img {
    max-width: 60%;
    display: block;
    margin: 0.5rem 0 1rem;
  }

  /* Show ingredients and instructions clearly */
  .article-body h2,
  .article-body h3 {
    page-break-after: avoid;
    font-size: 13pt;
    margin-top: 1rem;
  }

  .article-body ul,
  .article-body ol {
    page-break-inside: avoid;
  }

  /* Nutrition box: keep on screen */
  .nutrition-box {
    border-left: 2pt solid #2d6a4f;
    page-break-inside: avoid;
  }

  /* Key takeaway */
  .key-takeaway {
    border: 1pt solid #2d6a4f;
    page-break-inside: avoid;
  }

  /* Hide decorative inline images */
  .article-inline-img-wrap {
    display: none !important;
  }

  /* Hide cross-links, TOC */
  .article-toc,
  .article-cross-link {
    display: none !important;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  @page {
    margin: 1.5cm;
  }
}

/* ── Search Overlay (MAH-387) ── */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}

.search-overlay.open {
  pointer-events: auto;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 61, 47, 0.35);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.search-overlay.open .search-overlay-backdrop {
  opacity: 1;
}

.search-overlay-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--brand-cream-50);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(30, 61, 47, 0.14);
  transform: translateY(-100%);
  transition: transform 0.2s ease;
  padding: 0.75rem 1.5rem 0;
}

.search-overlay.open .search-overlay-bar {
  transform: translateY(0);
}

.search-overlay-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-bottom: 0.75rem;
}

.search-overlay-input {
  flex: 1;
  height: 48px;
  padding: 0 1rem;
  font-size: 1.05rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--brand-cream-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.search-overlay-input:focus-visible {
  border-color: var(--brand-leaf-600);
  box-shadow: var(--shadow-focus);
}

.search-overlay-input::-webkit-search-cancel-button {
  display: none;
}

.search-overlay-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: var(--radius-inner);
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}

.search-overlay-close:hover {
  background: rgba(78, 159, 61, 0.08);
  color: var(--leaf);
}

.search-overlay-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: calc(min(420px, 55vh));
  overflow-y: auto;
  max-width: var(--content-max);
  margin: 0 auto;
}

.search-overlay-results:not(:empty) {
  padding-bottom: 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.search-result-item a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--brand-cream-100);
  transition: background 0.12s;
  border-radius: var(--radius-xs);
}

.search-result-item:last-child a {
  border-bottom: none;
}

.search-result-item a:hover {
  background: rgba(78, 159, 61, 0.07);
  color: var(--ink);
}

.search-result-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.search-result-meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  text-transform: capitalize;
  font-weight: 500;
}

.search-overlay-empty {
  padding: 0.9rem 0.25rem 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  max-width: var(--content-max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 599px) {
  .search-overlay-bar {
    padding: 0.6rem 1rem 0;
  }

  .search-overlay-input {
    font-size: 0.97rem;
    height: 44px;
  }
}

/* ── MAH-388: Skip-to-content accessibility link ── */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  z-index: 10000;
  padding: 0.5rem 1rem;
  background: var(--brand-forest-900);
  color: var(--brand-cream-50);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--card-radius) 0;
  transition: top 0.15s ease;
}

/* ── MAH-392: Answer-first opener paragraph ── */
.article-answer-summary {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--brand-forest-900);
  background: var(--brand-cream-100, #f6f8f4);
  border-left: 3px solid var(--brand-leaf-500, #4a8c57);
  padding: 0.75rem 1rem;
  margin: 0.85rem 0 1.25rem;
  border-radius: 0 4px 4px 0;
}

/* ── MAH-412: Answer-first summary boxes (green callout) ── */
.article-answer-summary-box {
  background: #E8F5E9;
  border-left: 4px solid #1B5E20;
  padding: 16px;
  margin: 0 0 1.5rem;
  border-radius: 0 6px 6px 0;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  color: #1a3a1a;
}

/* ── MAH-395: Callout boxes ── */
.callout-box {
  background: #eef5ec;
  border-left: 4px solid var(--brand-forest-900, #1e3d2f);
  padding: 0.85rem 1rem 0.85rem 1.25rem;
  margin: 1.25rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--brand-forest-900, #1e3d2f);
}

.callout-box__label {
  display: block;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-leaf-600, #4e9f3d);
  margin-bottom: 0.3rem;
}

.callout-box--did-you-know .callout-box__label::before { content: "◆ "; }
.callout-box--quick-tip   .callout-box__label::before { content: "✦ "; }
.callout-box--try-this    .callout-box__label::before { content: "▶ "; }

.callout-box__text {
  display: block;
}

@media (max-width: 640px) {
  .callout-box {
    margin: 1rem 0;
  }
}

.skip-to-content:focus-visible {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── MAH-393: Social Share Buttons ── */
.article-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.75rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-forest-900, #1B5E20);
  background: transparent;
  border: 1px solid var(--brand-forest-900, #1B5E20);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
  width: auto;       /* override global button { width: 100% } */
  min-height: unset; /* override global button { min-height: 48px } */
}

.share-btn:hover {
  background: var(--brand-forest-900, #1B5E20);
  color: #fff;
}

.share-btn svg {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .share-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
  }
}

@media print {
  .article-share-bar { display: none; }
}

/* ── FAQ Section (MAH-462) ── */

.article-faq {
  margin: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}

.article-faq > h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--ink);
  margin: 0 0 1.25rem;
}

.article-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--leaf);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  list-style: none;
  user-select: none;
  gap: 0.75rem;
  margin: 0;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--leaf);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: '\2212';
}

.faq-answer {
  padding: 0 1.1rem 1rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

.faq-answer p {
  margin: 0;
}

/* ── MAH-394: Keyboard Focus Styles ── */

/* Suppress browser default ring on mouse clicks; only show for keyboard nav */
:focus:not(:focus-visible) {
  outline: none;
}

/* Default :focus-visible — brand green, 3px solid, visible on light backgrounds */
:focus-visible {
  outline: 3px solid var(--brand-leaf-600);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Nav links — pill-shaped, match border-radius */
.topnav a:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--brand-leaf-600);
  outline-offset: 2px;
  border-radius: var(--pill);
}

/* Buttons — pill shape */
button:focus-visible {
  outline: 3px solid var(--brand-leaf-600);
  outline-offset: 3px;
  border-radius: var(--pill);
}

/* Article cards — link cards, card radius */
.article-card:focus-visible {
  outline: 3px solid var(--brand-leaf-600);
  outline-offset: 2px;
  border-radius: var(--card-radius);
}

/* Share buttons */
.share-btn:focus-visible {
  outline: 3px solid var(--brand-leaf-600);
  outline-offset: 3px;
  border-radius: 6px;
}

/* FAQ accordion summary — inset outline to stay within overflow:hidden container */
.faq-question:focus-visible {
  outline: 3px solid var(--brand-leaf-600);
  outline-offset: -2px;
  border-radius: var(--radius-inner);
}

/* Newsletter section sits on dark forest background — use white ring */
.newsletter-section a:focus-visible,
.newsletter-section button:focus-visible,
.newsletter-section input:focus-visible {
  outline-color: #fff;
}


/* ── MAH-389: Back-to-top button ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: unset;
  padding: 0;
  border-radius: 50%;
  background: var(--brand-leaf-600, #3a7d44);
  color: #fff;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.back-to-top--visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--brand-leaf-700, #2f6637);
}

@media (max-width: 768px) {
  .back-to-top {
    width: 52px;
    height: 52px;
    bottom: 1.25rem;
    right: 1.25rem;
  }
}
