/* Journey2Health — deep calm modern */
:root {
  --bg: #0c1614;
  --bg-elev: #12201c;
  --bg-card: #162823;
  --bg-card-hover: #1c322c;
  --border: rgba(116, 194, 151, 0.18);
  --border-strong: rgba(116, 194, 151, 0.35);
  --text: #f8fcf9; /* senior-friendly bright body on dark theme */
  --text-muted: #e6efe9; /* explanation/list text — WCAG-friendlier vs dark bg */
  --accent: #74c297;
  --accent-soft: #98dcbd;
  --teal: #2a6b5e;
  --teal-bright: #3d8f7d;
  --forest: #1a3d34;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "Source Sans 3", system-ui, sans-serif;
  --display: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --header-h: 54px; /* logo7 */
  --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-padding-top: calc(var(--header-h, 64px) + 8px); scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(42, 107, 94, 0.35), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(116, 194, 151, 0.12), transparent 45%),
    var(--bg);
  min-height: 100vh;
}
body.gate-page { background: #0a1210; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-soft); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: #d4f0e3; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: #111; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 22, 20, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}
.header-inner {
  display: flex; align-items: center; justify-content: flex-start;
  min-height: var(--header-h); gap: 0.5rem;
}

/* Header tools: search icon + hamburger glued on the right */
.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-left: auto;
  flex: 0 0 auto;
  order: 3;
  z-index: 240;
}
.header-tools .site-search {
  order: 0;
  margin: 0;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
}
.header-tools .nav-toggle {
  order: 1;
  margin: 0;
  flex: 0 0 auto;
  display: none;
}
@media (max-width: 860px) {
  .header-tools .nav-toggle { display: flex; }
  .header-tools { margin-left: auto; }
  .site-nav { margin-left: 0; }
}

.logo { display: flex; align-items: center; gap: 0.5rem; color: var(--text); overflow: visible; }
.logo:hover { color: var(--text); }
.logo-wordmark {
  height: 67px;
  width: auto;
  max-height: 67px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.logo-text em { font-style: normal; font-size: 0.75rem; color: var(--accent); letter-spacing: 0.04em; }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border);
  border-radius: 8px; width: 44px; height: 44px; cursor: pointer; padding: 10px;
  flex-direction: column; justify-content: space-between;
  flex-shrink: 0;
  margin-left: 0.25rem;
  order: 3;
}
.nav-toggle span { display: block; height: 2px; background: var(--accent); border-radius: 2px; }
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.15rem 0.55rem; justify-content: flex-end; flex: 1 1 auto;
  margin-left: auto;
}
.site-nav > a,
.nav-group-btn {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  padding: 0.35rem 0.4rem; border-bottom: 2px solid transparent;
  background: transparent; border-top: 0; border-left: 0; border-right: 0;
  font-family: inherit; cursor: pointer; line-height: 1.2;
}
.site-nav > a:hover,
.site-nav > a.active,
.nav-group-btn:hover,
.nav-group-btn[aria-current="true"],
.nav-group.open > .nav-group-btn {
  color: var(--accent-soft); border-bottom-color: var(--accent);
}
.nav-group { position: relative; }
.nav-group-btn::after {
  content: ""; display: inline-block; margin-left: 0.35rem;
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; vertical-align: 0.15em; opacity: 0.7;
}
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 12.5rem; padding: 0.9rem 0.45rem 0.45rem; /* top pad bridges trigger→panel */
  background: rgba(14, 26, 24, 0.98); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  z-index: 70;
}
/* Invisible hover bridge above the panel (covers any residual gap / padding collapse) */
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -0.55rem;
  height: 0.55rem;
}
.nav-group:hover > .nav-dropdown,
.nav-group:focus-within > .nav-dropdown,
.nav-group.open > .nav-dropdown { display: flex; flex-direction: column; gap: 0.1rem; }
.nav-dropdown a {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  padding: 0.55rem 0.75rem; border-radius: 8px; border-bottom: none;
  white-space: nowrap;
}
.nav-dropdown a:hover,
.nav-dropdown a.active {
  color: var(--accent-soft); background: rgba(116, 194, 151, 0.1);
  border-bottom-color: transparent;
}
h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 600; line-height: 1.2;
  color: var(--text); margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 42rem; }
.muted { color: var(--text-muted); }
.eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; font-weight: 600;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #549872);
  color: #1a1510; box-shadow: 0 8px 24px rgba(116, 194, 151, 0.25);
}
.btn-primary:hover { color: #111; box-shadow: 0 10px 28px rgba(116, 194, 151, 0.35); }
.btn-ghost {
  background: transparent; border-color: var(--border-strong); color: var(--accent-soft);
}
.btn-ghost:hover { background: rgba(116, 194, 151, 0.08); color: var(--accent-soft); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary.is-ready,
.btn-primary:not(:disabled) {
  opacity: 1;
  box-shadow: 0 10px 30px rgba(116, 194, 151, 0.5);
  filter: brightness(1.06);
}
.btn:disabled.btn-primary { filter: grayscale(0.25) brightness(0.85); }
.section { padding: 3.5rem 0; }
.section-tight { padding: 2.5rem 0; }
.hero { padding: 4rem 0 3rem; border-bottom: 1px solid var(--border); }

/* Full-bleed photo heroes (Spices hub, etc.) */
.hero-photo {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-bottom: 1px solid var(--border);
  min-height: clamp(280px, 42vw, 460px);
  display: flex;
  align-items: flex-end;
}
.hero-photo-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-photo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.hero-photo-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 14, 12, 0.55) 0%, rgba(8, 14, 12, 0.25) 38%, rgba(8, 14, 12, 0.72) 72%, rgba(8, 14, 12, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 14, 12, 0.55) 0%, rgba(8, 14, 12, 0.15) 55%, rgba(8, 14, 12, 0.35) 100%);
}
.hero-photo-content {
  position: relative;
  z-index: 2;
  padding-top: clamp(3.5rem, 8vw, 5.5rem);
  padding-bottom: clamp(2.25rem, 5vw, 3.25rem);
  max-width: 48rem;
}
.hero-photo .eyebrow {
  color: var(--accent);
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
}
.hero-photo h1 {
  color: #f4efe4;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}
.hero-photo .lead {
  color: rgba(244, 239, 228, 0.92);
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
  max-width: 40rem;
}
.hero-photo .hero-photo-note,
.hero-photo .muted {
  color: rgba(210, 200, 180, 0.78);
}
.hero-photo code {
  color: rgba(244, 239, 228, 0.85);
  background: rgba(0,0,0,0.35);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.spices-hero .hero-photo-media img {
  object-position: center 38%;
}
@media (max-width: 700px) {
  .hero-photo { min-height: 320px; }
  .hero-photo-content { max-width: none; }
}

.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.card:hover { background: var(--bg-card-hover); border-color: var(--border-strong); transform: translateY(-3px); }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card a.card-link { color: inherit; display: block; }
.card a.card-link:hover { color: inherit; }
.card .card-cta { margin-top: 0.9rem; font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.badge {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 999px; background: rgba(42, 107, 94, 0.4);
  color: var(--accent-soft); border: 1px solid var(--border); margin-bottom: 0.6rem;
}
.badge-soon { background: rgba(139, 107, 74, 0.25); }
.protocol-grid {
  display: grid; gap: 1rem;
  /* ~2/3 prior card width → aim 4–5 bottles per row */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.protocol-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
}
.protocol-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.protocol-card .img-wrap {
  /* Frame removed: transparent, hug the bottle — do not force a tall picture box */
  background: transparent; display: grid; place-items: center;
  min-height: 0; flex: 0 0 auto; align-self: center;
  width: 100%; padding: 0.85rem 0.75rem 0.35rem;
  border-bottom: none;
}
.protocol-card .img-wrap img {
  /* Restore original bottle display size; natural aspect locked */
  max-height: 220px; width: auto; height: auto; object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.4));
  transition: transform 0.3s;
}
.protocol-card:hover .img-wrap img { transform: scale(1.04); }
.protocol-card .img-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: var(--text-muted); text-align: center; padding: 1rem;
  background: linear-gradient(160deg, var(--forest), #0e1a17);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
}
.protocol-body { padding: 0.85rem 0.85rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.protocol-body h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.dose { font-weight: 600; color: var(--accent); margin: 0 0 0.5rem; font-size: 0.98rem; }
.protocol-body .actions { margin-top: auto; padding-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.protocol-body .actions a { font-size: 0.9rem; font-weight: 600; }
.sup-hero {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  padding: 3rem 0 2rem;
}
.sup-hero .img-panel {
  /* No large picture frame — transparent panel hugging product art */
  background: transparent; border: 0; box-shadow: none;
  border-radius: 0; padding: 0.25rem; display: grid; place-items: center;
}
.sup-hero .img-panel img { max-height: 320px; width: auto; height: auto; object-fit: contain; }
.img-placeholder {
  width: 100%; min-height: 160px; display: grid; place-items: center;
  color: var(--text-muted); text-align: center; padding: 1rem;
  background: linear-gradient(160deg, var(--forest), #0e1a17);
  border: 1px dashed var(--border); border-radius: 10px;
}
.content-block {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.75rem; margin-bottom: 1.25rem;
}
.content-block h2 { font-size: 1.45rem; color: var(--accent-soft); }
.content-block ul { padding-left: 1.2rem; color: var(--text-muted); }
.content-block li { margin-bottom: 0.35rem; }
.ref-list { list-style: none; padding: 0; margin: 0; }
.ref-list li { margin-bottom: 0.5rem; }
.ref-list a { font-weight: 500; }
.note-box {
  border-left: 3px solid var(--accent);
  background: rgba(116, 194, 151, 0.08);
  padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; margin: 1rem 0;
  color: var(--text-muted); font-size: 0.95rem;
}
.gate-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.gate-card {
  width: min(100%, 640px); background: var(--bg-card);
  border: 1px solid var(--border-strong); border-radius: 18px;
  padding: 2.25rem 2rem; box-shadow: var(--shadow);
}
.gate-card h1 { margin-bottom: 0.25rem; }
.gate-disc {
  max-height: 280px; overflow-y: auto; margin: 1.5rem 0;
  padding: 1rem 1.1rem; background: rgba(0,0,0,0.25);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 0.92rem; color: var(--text-muted);
}
.gate-disc p { margin: 0 0 0.85rem; }
.gate-disc p:last-child { margin-bottom: 0; }
.gate-actions { display: flex; flex-direction: column; gap: 0.85rem; }
.gate-check {
  display: flex; gap: 0.75rem; align-items: flex-start;
  color: var(--text-muted); font-size: 0.95rem; cursor: pointer;
}
.gate-check input { margin-top: 0.3rem; accent-color: var(--accent); width: 1.1rem; height: 1.1rem; }
.site-footer {
  margin-top: 3rem; border-top: 1px solid var(--border);
  background: #0a1210; padding: 2.5rem 0 1.5rem;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr 2fr; }
.brand-mark { font-family: var(--display); font-size: 1.3rem; }
.tagline { color: var(--accent); margin: 0.2rem 0 0.5rem; font-size: 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.35rem; }
.footer-disclaimer { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.footer-disclaimer h4 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.footer-disclaimer p { margin: 0 0 0.6rem; }
.footer-bottom {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-muted);
}
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; animation: none; }
/* Fail-safe: if site.js never loads, content still appears (empty-JS cache poison) */
@keyframes j2h-reveal-failsafe { to { opacity: 1; transform: none; } }
.reveal:not(.visible) { animation: j2h-reveal-failsafe 0.45s ease 1.2s forwards; }
.playlist-list { list-style: none; padding: 0; }
.playlist-list li {
  margin-bottom: 0.85rem; padding: 1rem 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.playlist-list li:hover { border-color: var(--border-strong); }
.two-col { display: grid; gap: 1.5rem; grid-template-columns: 1.2fr 1fr; }
@media (max-width: 860px) {
  .sup-hero, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .site-search { margin-left: 0; }
  .site-nav { margin-left: 0; }
  .nav-toggle { display: flex; order: 3; margin-left: 0.25rem; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: rgba(12, 22, 20, 0.98); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    padding: 0.85rem 1.1rem 1.35rem; gap: 0.35rem;
    order: 4; width: 100%; flex: none;
    max-height: min(78vh, 640px); overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .header-inner { position: relative; }
  .site-nav > a,
  .nav-group-btn {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.85rem 0.65rem;
    text-align: left;
    width: 100%;
    border-bottom: 1px solid rgba(116, 194, 151, 0.12);
    border-radius: 0;
  }
  .site-nav > a:hover,
  .site-nav > a.active,
  .nav-group-btn:hover,
  .nav-group-btn[aria-current="true"],
  .nav-group.open > .nav-group-btn {
    border-bottom-color: rgba(116, 194, 151, 0.35);
  }
  .nav-group { width: 100%; }
  .nav-group-btn::after { float: right; margin-top: 0.45rem; }
  .nav-dropdown {
    position: static; display: none;
    min-width: 0; width: 100%;
    padding: 0.15rem 0 0.35rem 0.75rem;
    background: transparent; border: none; box-shadow: none;
    border-radius: 0;
  }
  .nav-group:hover > .nav-dropdown,
  .nav-group:focus-within > .nav-dropdown { display: none; }
  .nav-group.open > .nav-dropdown { display: flex; flex-direction: column; gap: 0.15rem; }
  .nav-dropdown a {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.8rem 0.7rem;
    white-space: normal;
    border-radius: 10px;
  }
}

/* Shelf examples — multiple brands for one nutrient */
.shelf-grid {
  display: grid;
  gap: 1rem;
  /* Match protocol density: ~2/3 prior frame width */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 1rem;
}
.shelf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.7rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.shelf-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.shelf-card .shelf-img {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; background: transparent; border-radius: 0; padding: 0.5rem 0.25rem 0.15rem;
}
.shelf-card .shelf-img img { max-height: 150px; width: auto; height: auto; object-fit: contain; }
.shelf-card h3 { font-size: 1.05rem; margin: 0; color: var(--text); }
.shelf-card .brand { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin: 0; }
.shelf-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.shelf-card .shelf-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }


/* Nature's Detox List */
.claim-callout {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin: 0.75rem 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.claim-callout strong {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.claim-callout p { margin: 0; }
.detox-toc ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.5rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.detox-toc li { margin: 0; }
.detox-toc a { font-weight: 600; }
figure.detox-source {
  margin: 0 0 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
figure.detox-source img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-inline: auto;
}
figure.detox-source figcaption {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  line-height: 1.5;
}


/* Senior-friendly reading contrast (dark theme retained) */
.content-block p,
.content-block li,
.content-block ul,
.protocol-body p,
.protocol-body .muted,
.sup-copy p,
.sup-copy li,
.prose p,
.prose li,
.note-box,
.note-box p,
.muted,
p.muted,
.card p,
.shelf-card p,
.footer-disclaimer,
.footer-disclaimer p,
.footer-bottom,
.gate-disc,
.gate-disc p,
.gate-check,
.ref-list,
.ref-list li,
.detox-toc li,
figure.detox-source figcaption {
  color: var(--text-muted);
}
.content-block p,
.content-block li,
.sup-copy p,
.sup-copy li,
.prose p,
.prose li,
.protocol-body p,
.note-box,
.note-box p,
.lead,
.card p,
.shelf-card p {
  color: #f1f7f3;
}
.lead { color: #f5faf7; }
.content-block h2,
.content-block h3,
.prose h2,
.prose h3 {
  color: #f8f4e8;
}
.footer-disclaimer,
.footer-disclaimer p,
.gate-disc,
.gate-disc p {
  color: #dde8e2;
}


/* spice bowl thumbs */
.sup-hero .img-panel img[src*="spices/bowls/"],
.card img[src*="spices/bowls/"] {
  background: transparent;
  object-fit: contain;
}


/* —— Featured horizontal banner (My Protocol immune deep-dive) —— */
.feature-banner {
  display: block;
  width: 100%;
  margin: 0 0 2.25rem;
  padding: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  border: 1px solid rgba(140, 200, 170, 0.28);
  background:
    radial-gradient(1200px 280px at 12% 0%, rgba(90, 180, 140, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(28, 48, 40, 0.95) 0%, rgba(18, 32, 26, 0.98) 55%, rgba(24, 40, 34, 0.95) 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-banner:hover {
  border-color: rgba(160, 220, 180, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.34);
  color: inherit;
}
.feature-banner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: stretch;
  padding: 1.6rem 1.75rem 1.7rem;
}
.feature-banner-copy .badge {
  display: inline-block;
  margin-bottom: 0.65rem;
}
.feature-banner-copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text, #f5faf6);
}
.feature-banner-copy p {
  margin: 0 0 1rem;
  max-width: 44rem;
  color: var(--text-muted, #d0ddd6);
  font-size: 1.05rem;
  line-height: 1.65;
}
.feature-banner-cta {
  display: inline-block;
  font-weight: 600;
  color: var(--accent, #8fd6a8);
  font-size: 0.98rem;
}
.feature-banner-trio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-content: center;
}
.trio-chip {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.1rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(140, 200, 170, 0.18);
}
.trio-label {
  font-weight: 600;
  color: var(--text, #f5faf6);
  font-size: 0.95rem;
}
.trio-dose {
  justify-self: end;
  font-weight: 600;
  color: var(--accent-soft, #b7e0c4);
  font-size: 0.9rem;
  white-space: nowrap;
}
.trio-note {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--text-muted, #d0ddd6);
  opacity: 0.85;
}
@media (max-width: 820px) {
  .feature-banner-inner {
    grid-template-columns: 1fr;
    padding: 1.35rem 1.25rem 1.4rem;
  }
  .trio-dose { justify-self: start; }
  .trio-chip {
    grid-template-columns: 1fr;
  }
}


/* —— Dual-watch video feature (Story / Documentaries) —— */
.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.1rem 0 0;
}
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.feature-doc {
  padding: 1.35rem 1.35rem 1.5rem;
}
.feature-doc h2,
.feature-doc h3 {
  margin: 0.35rem 0 0.65rem;
  font-family: var(--display);
}
.feature-doc-media {
  margin: 0 0 1rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 420px;
}
.feature-doc-media img {
  width: 100%;
  height: auto;
  display: block;
}
.feature-doc .video-embed {
  grid-column: 1 / -1;
}

.video-embed--feature {
  margin-top: 0.75rem;
  width: 100%;
  max-width: 100%;
  /* Keep true 16:9 — do not set min-height (it breaks aspect-ratio and overflows the card) */
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
.feature-doc .video-embed,
.feature-doc .video-embed--feature {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  clear: both;
}
.feature-doc {
  overflow: hidden; /* clip any iframe overflow inside the card */
  max-width: 100%;
}
.feature-doc-media { display: none; } /* avoid thumb overlapping player when leftover markup exists */

/* YouTube thumb link (when embed is disabled / Error 153) */
.yt-thumb-link {
  display: block;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}
.yt-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #000;
}
.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-thumb-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 0, 0, 0.85);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.yt-thumb-play::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}
.yt-thumb-link:hover .yt-thumb-play { background: rgba(255, 0, 0, 1); }
.yt-thumb-caption {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 600;
}
.feature-doc .yt-thumb-link { margin-top: 0.75rem; }

/* Documentary cards — left thumb, right text */
.doc-grid {
  display: grid;
  gap: 1.15rem;
}
.doc-card {
  display: grid;
  grid-template-columns: minmax(140px, 280px) 1fr;
  gap: 1.15rem 1.35rem;
  align-items: center;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.doc-card:hover {
  border-color: var(--accent, #74c297);
  transform: translateY(-1px);
}
.doc-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #000;
}
.doc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.doc-card-body h3,
.doc-card-body h2 {
  margin: 0.35rem 0 0.45rem;
}
.doc-card-body p {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.doc-card-meta {
  font-size: 0.85rem;
  color: var(--accent, #74c297);
  font-weight: 600;
}
.doc-card--story {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.doc-card--story:hover { transform: none; }
@media (max-width: 700px) {
  .doc-card {
    grid-template-columns: 1fr;
  }
}


/* —— Site search (icon toggle + dropdown) —— */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.site-search {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  margin-left: 0.35rem;
  margin-right: 0;
  z-index: 60;
  order: 2;
}
.site-nav { order: 1; }
.nav-toggle { order: 3; }
.logo { order: 0; }
.site-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(22, 40, 35, 0.85);
  color: var(--accent, #74c297);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.site-search-toggle:hover,
.site-search-toggle:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(116, 194, 151, 0.15);
}
.site-search.is-open .site-search-toggle {
  border-color: var(--accent);
  background: var(--bg-elev);
}
.site-search-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(340px, 92vw);
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  z-index: 70;
}
.site-search-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  background: rgba(22, 40, 35, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.95rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.site-search-input::placeholder { color: rgba(230, 239, 233, 0.45); }
.site-search-input:focus {
  border-color: var(--accent);
  background-color: rgba(22, 40, 35, 0.95);
  box-shadow: 0 0 0 2px rgba(116, 194, 151, 0.15);
}
.site-search-results {
  margin-top: 0.45rem;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 0.15rem;
}
.site-search-results[hidden] { display: none !important; }
.site-search-panel[hidden] { display: none !important; }
.site-search-item {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s;
}
.site-search-item:hover,
.site-search-item.is-active {
  background: rgba(116, 194, 151, 0.1);
  color: var(--text);
}
.site-search-item-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-soft);
  line-height: 1.3;
}
.site-search-item-snippet {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.site-search-item mark {
  background: rgba(116, 194, 151, 0.28);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}
.site-search-empty {
  padding: 0.65rem 0.7rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
@media (max-width: 860px) {
  .site-search {
    margin-left: 0.35rem;
  }
  .site-search-panel {
    position: fixed;
    top: calc(var(--header-h, 58px) + 0.5rem);
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }
}


/* —— Herb hub section rhythm —— */
.section-tight .card-grid {
  margin-bottom: 0.5rem;
}
.section-tight > .container + .content-block,
.section-tight .herb-after-grid {
  margin-top: 2.75rem;
}
#herb-nutrients {
  margin-top: 2.75rem;
  padding-top: 0.25rem;
}
.section-tight .protocol-grid.herbs-protocol-grid {
  margin-bottom: 0.25rem;
}
.herbs-protocol-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.herbs-protocol-grid .protocol-card .img-wrap img {
  max-height: 200px;
}
/* living herb cutouts (transparent PNG) */
.card img[src*="images/herbs/"],
.protocol-card img[src*="images/herbs/"],
.sup-hero .img-panel img[src*="images/herbs/"] {
  background: transparent;
  object-fit: contain;
}


/* Spices library: equal row/column gaps + fixed square thumb slots */
.section-tight .protocol-grid.spices-protocol-grid {
  margin-bottom: 0.25rem;
}
.spices-protocol-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  align-items: stretch;
}
.spices-protocol-grid .protocol-card {
  height: 100%;
  min-height: 0;
}
.spices-protocol-grid .protocol-card > .card-link,
.spices-protocol-grid .protocol-card:not(:has(.card-link)) {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
/* Coming-soon cards have no .card-link; keep body flex-fill */
.spices-protocol-grid .protocol-card > .img-wrap + .protocol-body {
  flex: 1;
}
.spices-protocol-grid .protocol-card .img-wrap {
  /* Fixed square slot: absolute img so tall PNGs cannot expand the row */
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  flex: 0 0 auto;
  align-self: stretch;
  box-sizing: border-box;
  padding: 0.75rem;
  overflow: hidden;
  background: transparent;
}
.spices-protocol-grid .protocol-card .img-wrap img {
  position: absolute;
  inset: 0.75rem;
  width: calc(100% - 1.5rem);
  height: calc(100% - 1.5rem);
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: center;
}

.spices-section-title {
  margin: 2.5rem 0 0.75rem;
}
.spices-section-lead {
  margin: 0 0 1.15rem;
}

/* Deficiency library cards */
.deficiency-grid .def-symptoms-label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent-soft); margin: 0.85rem 0 0.35rem; font-weight: 600;
}
.deficiency-grid .def-symptoms {
  margin: 0 0 0.75rem; padding-left: 1.1rem;
  color: var(--text-muted); font-size: 0.86rem; line-height: 1.45;
}
.deficiency-grid .def-symptoms li { margin: 0.2rem 0; }

/* ==== MOBILE LAYOUT POLISH (header clearance + even cards) ==== */
html {
  scroll-padding-top: calc(var(--header-h) + 12px);
}

.site-header {
  background: rgba(12, 22, 20, 0.96);
}

.header-inner {
  padding-top: max(0.35rem, env(safe-area-inset-top));
}

.gate-wrap {
  padding-top: max(2rem, env(safe-area-inset-top) + 1.25rem);
  padding-bottom: max(2rem, env(safe-area-inset-bottom) + 1.25rem);
  align-content: center;
}
.gate-card {
  margin-inline: auto;
}

.section {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
}
.section-tight {
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
}
.card-grid {
  gap: 1.25rem;
}
.two-col {
  gap: 1.25rem;
}
.card {
  padding: 1.35rem;
}

@media (max-width: 860px) {
  :root {
    --header-h: 53px;
  }

  .header-inner {
    flex-wrap: nowrap;
    align-items: center;
    min-height: var(--header-h);
    gap: 0.5rem;
    padding-top: max(0.25rem, env(safe-area-inset-top));
    padding-bottom: 0.25rem;
  }

  .logo {
    flex: 0 1 auto;
    min-width: 0;
  }
  .logo-text em {
    display: none;
  }

  .site-search {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    order: 2;
  }

  .nav-toggle {
    order: 3;
    flex: 0 0 auto;
  }

  .site-nav {
    top: 100%;
  }

  .hero {
    padding: 2rem 0 2.25rem;
  }
  main#main,
  main {
    padding-top: 0.35rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card {
    padding: 1.25rem;
  }

  .card-grid > .card,
  .card-grid > article.card {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .card-grid .card-link {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .card-grid .card-cta {
    margin-top: auto;
    padding-top: 0.85rem;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }
  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }
  .gate-card {
    padding: 1.5rem 1.15rem;
  }
  .gate-disc {
    max-height: min(40vh, 240px);
  }
}

/* 2026-09-23 header stack — Avenir-like system sans (medium-bold). Cache-bust: site.css?v=20260923a */
:root {
  --display: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
h1, h2, h3, h4,
.logo-text strong,
.brand-mark,
.hero h1,
.gate-card h1,
.feature-banner-copy h2,
.feature-doc h2,
.feature-doc h3,
.prose h2,
.prose h3,
.content-block h2,
.content-block h3,
.doc-card-body h2,
.doc-card-body h3 {
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* 2026-09-23 videos mobile playlist/doc fix */
.doc-card-unit {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.doc-card-unit .watch-actions {
  margin: 0;
  padding: 0 0.15rem 0.35rem;
}
.doc-card-unit .watch-actions .btn {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
}

.doc-grid {
  min-width: 0;
}
.doc-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.doc-card-media,
.doc-card-media img {
  max-width: 100%;
}

.playlist-list li {
  min-width: 0;
}
.playlist-list .btn {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .doc-card {
    grid-template-columns: 1fr !important;
    padding: 0.9rem;
    gap: 0.85rem;
  }
  .doc-card-media {
    max-width: 100%;
  }
  .watch-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
  }
  .watch-actions .btn {
    width: 100%;
    box-sizing: border-box;
  }
  .playlist-list li {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }
  .playlist-list li .btn,
  .playlist-list li a.btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  /* Keep header search from shoving menus off-screen on Videos */
  .site-search {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
  }
  .site-search-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .site-search-results {
    left: 0;
    right: 0;
    width: auto;
    max-width: calc(100vw - 1.5rem);
  }
  .doc-grid {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .playlist-list li {
    padding: 0.9rem;
  }
  .doc-card-body h3 {
    font-size: 1.15rem;
  }
}

/* 2026-09-23 videos mobile header/nav fix */
/* Compact sticky header on phones; keep hamburger above the open drawer */
@media (max-width: 860px) {
  :root {
    --header-h: 51px;
  }

  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    overflow: visible;
  }

  .header-inner {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    min-height: var(--header-h);
    max-height: none;
    padding-top: max(0.3rem, env(safe-area-inset-top));
    padding-bottom: 0.3rem;
  }

  .logo {
    order: 0;
    flex: 0 1 auto;
    min-width: 0;
  }
  .logo-text em {
    display: none;
  }

  .site-search {
    order: 1;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    z-index: 220;
  }
  .site-search-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .site-search-results {
    left: 0;
    right: auto;
    width: min(100vw - 1.25rem, 22rem);
    max-width: calc(100vw - 1.25rem);
    z-index: 230;
  }

  .nav-toggle {
    order: 2;
    display: flex;
    flex: 0 0 auto;
    position: relative;
    z-index: 240; /* above open nav so it stays tappable to close */
  }

  .site-nav {
    order: 4;
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    margin: 0;
    padding: 0.65rem 1rem 1.1rem;
    background: rgba(10, 18, 16, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 210;
    box-shadow: 0 16px 32px rgba(0,0,0,0.45);
  }
  .site-nav.open {
    display: flex;
  }

  /* When menu is open, don't let page content fight the drawer */
  body.nav-is-open {
    overflow: hidden;
  }

  /* Hero / section copy must wrap, not clip under scrollbar */
  .section .lead,
  .section p.muted,
  .hero p,
  .doc-card-body p {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }

  main {
    padding-top: 0.25rem;
  }
}

@media (max-width: 480px) {
  :root {
    --header-h: 44px;
  }
  .logo-wordmark {
    height: 55px;
    width: auto;
    max-height: 55px;
  }
  .logo-text strong {
    font-size: 1.05rem;
  }
}


/* sticky content clear */
@media (max-width: 860px) {
  main#main,
  main {
    scroll-margin-top: calc(var(--header-h, 58px) + 6px);
  }
  .section:first-of-type,
  .hero {
    scroll-margin-top: calc(var(--header-h, 58px) + 6px);
  }
}


/* 2026-09-23: icon search must never flex-grow (keeps it beside hamburger) */
.site-search,
.header-tools .site-search {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.header-tools {
  display: flex !important;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto !important;
  flex: 0 0 auto !important;
}

/* === Conditions hub list layout (page-conditions) === */
/* Scoped to body.page-conditions — compact title+descriptor rows */
body.page-conditions .conditions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.page-conditions .conditions-row {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: none;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
}
body.page-conditions .conditions-row[hidden] {
  display: none !important;
}
body.page-conditions .conditions-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: none;
}
body.page-conditions .conditions-row-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 54px;
  padding: 8px 14px;
  color: inherit;
  text-decoration: none;
}
body.page-conditions .conditions-row-link:hover {
  color: inherit;
}
body.page-conditions .conditions-row-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex: 1 1 auto;
  min-width: 0;
}
body.page-conditions .conditions-row-title,
body.page-conditions .conditions-row-link h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
body.page-conditions .conditions-row-desc {
  margin: 0;
  font-size: 0.85em;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}
body.page-conditions .conditions-row-chevron {
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
  padding-left: 0.25rem;
}
body.page-conditions .conditions-row:hover .conditions-row-chevron {
  opacity: 1;
  transform: translateX(2px);
}
@media (max-width: 700px) {
  body.page-conditions .conditions-list {
    gap: 6px;
  }
  body.page-conditions .conditions-row-link {
    padding: 9px 12px;
    min-height: 52px;
  }
  body.page-conditions .conditions-row-title,
  body.page-conditions .conditions-row-link h3 {
    font-size: 0.98rem;
  }
  body.page-conditions .conditions-row-desc {
    -webkit-line-clamp: 2;
    font-size: 0.85em;
  }
}
/* === end Conditions hub list layout === */



/* 2026-10-05 mobile menu fix: the desktop nav uses flex-wrap:wrap; in the phone
   drawer (column + max-height) an opened Library list overflowed the height and
   the browser wrapped the whole menu into off-screen columns. Phones only:
   one column, top-aligned, items never shrink, drawer scrolls vertically. */
@media (max-width: 860px) {
  .site-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
  .site-nav > a,
  .site-nav > .nav-group {
    flex: 0 0 auto;
  }
}

/* page-tools: compact hero so lookup is above the fold */
body.page-tools .hero {
  padding: 1.1rem 0 0.85rem;
}
body.page-tools .hero .lead {
  margin-bottom: 0;
  max-width: 42rem;
}
body.page-tools .hero h1 {
  margin-bottom: 0.35rem;
}
body.page-tools .section-tight {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}
body.page-tools .section-tight + .section-tight {
  padding-top: 0.5rem;
}

/* logo8 — 2026-10-06 phones only (<=767px): shorter header bar + wordmark 25% larger (55px -> 69px).
   The PNG carries ~7px of transparent/soft-shadow margin above and below the lettering at 69px tall,
   so the image box overflows the 56px bar by ~6.5px each side (negative margins) while the visible
   lettering stays inside the bar. Width is capped by viewport so narrow phones never collide with
   the search/hamburger buttons. min-height is a fixed value (not var(--header-h)) because site.js
   writes the measured header height into --header-h; feeding that back as min-height made the bar
   ratchet taller by 1px per sync. Desktop/tablet (>=768px) untouched. */
@media (max-width: 767px) {
  .header-inner {
    min-height: calc(56px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: 0;
  }
  .logo-wordmark {
    --lw: min(69px, calc((100vw - 124px) * 0.2769));
    height: var(--lw);
    max-height: 69px;
    width: auto;
    max-width: none; /* global img{max-width:100%} would squeeze it inside the shrinkable .logo link */
    margin: calc(var(--lw) * -0.094) calc(var(--lw) * -0.072) calc(var(--lw) * -0.094) calc(var(--lw) * -0.058);
  }
}

/* ── 2026-10-28 Disclaimer: one-time modal + one-line footer strip ─────── */
html.j2h-modal-open, html.j2h-modal-open body { overflow: hidden; }
.j2h-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(6, 12, 10, 0.82);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.j2h-modal-card {
  width: min(100%, 620px); max-height: calc(100vh - 2rem); overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 1.75rem 1.75rem 1.5rem; box-shadow: var(--shadow);
}
.j2h-modal-card h2 { margin: 0.1rem 0 0; font-size: 1.45rem; }
.j2h-modal-card .gate-disc { margin: 1rem 0 1.15rem; max-height: min(38vh, 260px); }
.j2h-modal-note { margin: 0; font-size: 0.85rem; color: var(--text-muted); opacity: 0.85; }
@media (max-width: 480px) {
  .j2h-modal-card { padding: 1.25rem 1.05rem; }
  .j2h-modal-card h2 { font-size: 1.25rem; }
}
.footer-grid { grid-template-columns: 1fr 1fr; }
.disclaimer-strip {
  margin-top: 0.75rem; padding: 0.55rem 0 0.15rem;
  font-size: 0.82rem; line-height: 1.45; color: var(--text-muted); opacity: 0.9;
}
.disclaimer-strip p { margin: 0; }
.disclaimer-strip a { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.site-footer-mini { margin-top: 3rem; border-top: 1px solid var(--border); background: #0a1210; padding: 1rem 0 1.25rem; }
.disclaimer-page .gate-disc { max-height: none; font-size: 1rem; }

/* ── 2026-10-28 Bookshelf (data: assets/js/bookshelf-data.js) ───────────── */
.bk-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.bk-tab {
  font: inherit; font-size: 0.98rem; font-weight: 600; cursor: pointer;
  padding: 0.45rem 1rem; border-radius: 999px;
  color: var(--text); background: var(--bg-card); border: 1px solid var(--border-strong);
}
.bk-tab[aria-selected="true"] { background: var(--accent); color: #0c1614; border-color: var(--accent); }
.bk-tab .bk-count { opacity: 0.75; font-weight: 500; margin-left: 0.3rem; }
.bk-shelf-head { margin: 0 0 1.1rem; }
.bk-shelf-head h2 { margin: 0 0 0.25rem; }
.bk-shelf-head p { margin: 0; color: var(--text-muted); }
.bk-list { display: grid; gap: 1.25rem; }
.bk-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; align-items: start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem;
}
.bk-cover img {
  width: 150px; height: auto; border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45); background: #0a1210;
}
.bk-body h3 { margin: 0 0 0.15rem; font-size: 1.3rem; line-height: 1.3; }
.bk-meta { margin: 0 0 0.65rem; color: var(--accent-soft); font-size: 0.95rem; }
.bk-body p.bk-desc { margin: 0 0 1rem; color: #f1f7f3; }
.bk-links { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.bk-links .btn { font-size: 0.92rem; padding: 0.5rem 0.95rem; }
.bk-empty {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center; color: var(--text-muted);
}
@media (max-width: 560px) {
  .bk-item { grid-template-columns: 96px 1fr; gap: 1rem; padding: 1rem; }
  .bk-cover img { width: 96px; }
  .bk-body h3 { font-size: 1.12rem; }
  .bk-links .btn { flex: 1 1 auto; text-align: center; }
}

/* ── 2026-10-28b Compact footer: one band (brand + Explore row), divider,
      then copyright + disclaimer link sharing one line (stacks on mobile). ── */
.site-footer {
  margin-top: 2.5rem; padding: 1.1rem 0 0.9rem;
  display: grid;
  grid-template-columns: minmax(1rem, 1fr) minmax(0, calc(var(--max) / 2)) minmax(0, calc(var(--max) / 2)) minmax(1rem, 1fr);
  align-items: start;
}
.site-footer > .container { width: auto; margin: 0; }
.site-footer .footer-grid {
  grid-column: 2 / 4;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 0.8rem; border-bottom: 1px solid var(--border);
}
.site-footer .footer-grid > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; }
.site-footer .brand-mark { font-size: 1.15rem; }
.site-footer .tagline { margin: 0; font-size: 0.85rem; }
.site-footer .footer-grid > div:first-child > p.muted,
.site-footer .footer-grid h4 {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.95rem; }
.site-footer .footer-links li { margin: 0; }
.site-footer .footer-bottom {
  grid-column: 2; margin: 0; padding: 0.65rem 0 0; border-top: 0;
  font-size: 0.82rem; line-height: 1.45;
}
.site-footer .footer-bottom p { margin: 0; }
.site-footer .disclaimer-strip {
  grid-column: 3; margin: 0; padding: 0.65rem 0 0; text-align: right;
}
.site-footer-mini { margin-top: 2.5rem; padding: 0.7rem 0 0.8rem; }
.site-footer-mini .disclaimer-strip { margin: 0; padding: 0; }
@media (max-width: 700px) {
  .site-footer { display: block; padding: 1rem 0 0.9rem; }
  .site-footer > .container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
  .site-footer .footer-grid { gap: 0.45rem 1rem; padding-bottom: 0.7rem; }
  .site-footer .footer-links { gap: 0.15rem 0.95rem; }
  .site-footer .footer-bottom { padding-top: 0.6rem; }
  .site-footer .disclaimer-strip { text-align: left; padding-top: 0.2rem; }
}
