/* ═══ TOKEN SYSTEM ═══ */
:root {
  --ink: #1e2330;
  --parchment: #f5f1e8;
  --parchment-deep: #ece6d8;
  --brand-green: #318147;
  --brand-green-dark: #2a6e3c;
  --brand-green-bright: #61c07b;
  --vermilion: #b5432a;
  --sage: #5e7358;
  --ochre: #b8942e;
  --slate: #4a4e5a;
  --slate-light: #7a7e8a;
  --rule: #d4cfc4;
  --white: #ffffff;

  --font-display: 'Lora', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --max-width: 1120px;
  --header-height: 64px;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); }
body {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--parchment);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ═══ UTILITY ═══ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ═══ HEADER ═══ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height);
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--parchment);
  letter-spacing: -0.01em;
}
.site-logo em { font-style: italic; color: var(--ochre); font-weight: 400; }
.site-logo-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--parchment);
  padding: 3px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ═══ DESKTOP NAV ═══ */
.main-nav { display: none; }
@media (min-width: 860px) {
  .main-nav { display: flex; gap: 0; align-items: center; }
}
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 0.5rem 0.85rem;
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.01em;
  color: rgba(245,241,232,0.72);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--parchment); }
.nav-link[aria-current="page"] { color: var(--ochre); }

/* Dropdown arrow */
.nav-link--has-sub::after {
  content: '';
  display: inline-block; width: 0; height: 0; margin-left: 5px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  transition: transform 0.2s;
}
.nav-item:hover .nav-link--has-sub::after,
.nav-item.is-open .nav-link--has-sub::after,
.nav-item:focus-within .nav-link--has-sub::after {
  transform: rotate(180deg);
}

/* Dropdown panel */
.nav-dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 260px; padding: 0.5rem 0;
  max-height: 80vh; overflow-y: auto;
  background: var(--ink); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
}
.nav-item:hover .nav-dropdown,
.nav-item.is-open .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown a {
  display: block; padding: 0.6rem 1.25rem;
  font-size: 0.85rem; color: rgba(245,241,232,0.7);
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: rgba(245,241,232,0.06); color: var(--parchment);
}
.nav-dropdown .dropdown-label {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ochre);
}
.nav-dropdown .dropdown-divider {
  height: 1px; margin: 0.35rem 1rem;
  background: rgba(245,241,232,0.08);
}

/* Mega menu: full 25-category list, grouped by show. The longer "Fail with
   Me" group (dropdown-col--multi) splits into 2 sub-columns on wide screens
   to avoid one very tall list; below that width it falls back to a single
   column and the dropdown's own max-height/overflow-y (above) scrolls it. */
.nav-dropdown--mega { width: 300px; }
.nav-dropdown--mega .dropdown-grid {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 0 1.5rem; padding: 0 0.5rem;
}
.nav-dropdown--mega .dropdown-col { width: 100%; }
.nav-dropdown--mega .dropdown-col--multi { column-gap: 1rem; }
.nav-dropdown--mega .dropdown-col a { break-inside: avoid; }
.nav-dropdown--mega .dropdown-all { font-weight: 600; }
@media (min-width: 1100px) {
  /* Explicit widths (not max-width) here on purpose: an absolutely
     positioned multicol container's shrink-to-fit intrinsic width doesn't
     reliably account for a 2-column split, which caused the dropdown box
     to render narrower than its content and clip/scroll horizontally. */
  .nav-dropdown--mega { width: 640px; }
  .nav-dropdown--mega .dropdown-col { width: auto; }
  .nav-dropdown--mega .dropdown-col--multi { width: 340px; column-count: 2; }
  .nav-dropdown--mega .dropdown-col--multi .dropdown-label { column-span: all; }
}

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.install-app-btn {
  padding: 0.45rem 1rem; font-size: 0.8rem;
}
/* .btn's own `display: inline-flex` (styles.css above) ties in specificity
   with the browser's built-in `[hidden] { display: none }` rule and wins on
   source order, so the plain [hidden] attribute alone doesn't hide this
   button -- it stayed visible everywhere, even before pwa.js ever unhid it.
   This rule outranks .btn to make [hidden] actually take effect. */
.install-app-btn[hidden] { display: none; }
@media (max-width: 500px) { .install-app-btn { display: none; } }

/* ═══ MOBILE NAV ═══ */
.mobile-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: none; border: none;
  color: var(--parchment); cursor: pointer; border-radius: 6px;
}
.mobile-toggle:hover { background: rgba(245,241,232,0.08); }
@media (min-width: 860px) { .mobile-toggle { display: none; } }

.mobile-nav {
  display: none; position: fixed;
  top: var(--header-height); left: 0; right: 0; bottom: 0;
  background: var(--ink); z-index: 99;
  overflow-y: auto; padding: 1rem 1.5rem 2rem;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block; padding: 0.75rem 0;
  font-size: 1rem; color: rgba(245,241,232,0.8);
  border-bottom: 1px solid rgba(245,241,232,0.06);
}
.mobile-nav a:hover { color: var(--parchment); }
.mobile-nav .mobile-section-label {
  display: block; padding: 1.25rem 0 0.35rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ochre);
  border-bottom: none;
}
.mobile-nav .mobile-sub a { padding-left: 1rem; font-size: 0.9rem; }

/* ═══ HERO ═══ */
.hero {
  margin-top: var(--header-height);
  padding: var(--space-2xl) 0 var(--space-xl);
  background: var(--ink);
  position: relative; overflow: hidden;
}

/* ═══ INNER-PAGE HEADER ═══ */
.page-header {
  margin-top: var(--header-height);
  padding: var(--space-lg) 0;
}
.page-header .section-title { margin-bottom: 0; }
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(
      transparent, transparent 31px,
      rgba(245,241,232,0.03) 31px, rgba(245,241,232,0.03) 32px
    );
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 720px;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ochre);
  margin-bottom: var(--space-md);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700; line-height: 1.15;
  color: var(--parchment);
  margin-bottom: var(--space-md);
}
.hero h1 em {
  font-style: italic; font-weight: 400;
  color: var(--ochre);
}
.hero-subtitle {
  font-size: 1.1rem; line-height: 1.6;
  color: rgba(245,241,232,0.7);
  max-width: 560px;
  margin-bottom: var(--space-lg);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem; border-radius: 6px;
  font-size: 0.875rem; font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  border: none; cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand-green); color: var(--white); }
.btn--primary:hover { background: var(--brand-green-dark); }
.btn--ghost {
  background: transparent; color: var(--parchment);
  border: 1px solid rgba(245,241,232,0.2);
}
.btn--ghost:hover { border-color: rgba(245,241,232,0.5); }

/* ═══ SECTION FOUNDATIONS ═══ */
.section { padding: var(--space-xl) 0; }
.section--alt { background: var(--parchment-deep); }
.section--dark { background: var(--ink); color: var(--parchment); }
.section-eyebrow {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand-green);
  margin-bottom: var(--space-xs);
}
.section--dark .section-eyebrow { color: var(--ochre); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; line-height: 1.2;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}
.section--dark .section-title { color: var(--parchment); }
.section-intro {
  max-width: 620px; font-size: 1.05rem; line-height: 1.65;
  color: var(--slate-light);
  margin-bottom: var(--space-lg);
}

/* ═══ MISSION ═══ */
.mission-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 720px) {
  .mission-grid { grid-template-columns: 1fr 1fr; }
}
.mission-text p {
  margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.7;
}
.mission-card {
  display: block; background: var(--white); border-radius: 10px;
  padding: var(--space-md); border-left: 3px solid var(--brand-green);
  transition: box-shadow 0.2s;
}
.mission-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.mission-card + .mission-card { border-left-color: var(--sage); }
.mission-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  margin-bottom: 0.5rem;
}
.mission-card p { font-size: 0.95rem; line-height: 1.6; }
.mission-card-link {
  display: inline-block; margin-top: 0.75rem;
  font-size: 0.85rem; font-weight: 600; color: var(--brand-green);
}
.mission-card:hover .mission-card-link { text-decoration: underline; }

/* ═══ EPISODES ═══ */
.episode-search { margin-bottom: var(--space-md); }
.episode-search input {
  width: 100%; max-width: 480px;
  padding: 0.65rem 1rem; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--white);
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
}
.episode-search input:focus {
  outline: none; border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(49,129,71,0.15);
}
.episode-search input::placeholder { color: var(--slate-light); }
.episode-filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: var(--space-lg);
}
.filter-btn {
  padding: 0.45rem 1rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 500;
  background: var(--white); border: 1px solid var(--rule);
  color: var(--slate); cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--brand-green); color: var(--brand-green); }
.filter-btn.is-active {
  background: var(--ink); border-color: var(--ink); color: var(--parchment);
}

.episodes-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .episodes-grid { grid-template-columns: repeat(2, 1fr); }
}

.episode-card {
  background: var(--white); border-radius: 10px;
  overflow: hidden; transition: box-shadow 0.2s;
  border: 1px solid var(--rule);
}
.episode-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.episode-embed {
  width: 100%; aspect-ratio: 16/9;
  border: none; background: var(--parchment-deep);
}
.episode-embed-facade {
  width: 100%; aspect-ratio: 16/9;
  border: none; padding: 0; margin: 0; display: block;
  background-color: var(--parchment-deep);
  background-size: cover; background-position: center;
  position: relative; cursor: pointer;
}
.episode-embed-facade::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.15); transition: background 0.2s;
}
.episode-embed-facade:hover::after,
.episode-embed-facade:focus-visible::after { background: rgba(0,0,0,0.35); }
.episode-embed-facade--static { cursor: default; }
.episode-embed-facade--static::after { background: rgba(0,0,0,0.05); }
.episode-embed-facade--static:hover::after { background: rgba(0,0,0,0.05); }
.episode-embed-facade .play-button {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(0,0,0,0.75); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.episode-body { padding: 1.25rem; }
.episode-tag {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 0.5rem;
}
.tag--eq { background: #e8f0e6; color: var(--sage); }
.tag--self-awareness { background: #fef3e2; color: #9a7420; }
.tag--writer-interview { background: #f0e6e4; color: var(--vermilion); }
.tag--mindfulness { background: #e6eaf0; color: #4a5e8a; }
.tag--grief { background: #f0e8f0; color: #7a4a7a; }
.tag--parenting { background: #e6f0ee; color: #3a7a6a; }
.tag--poet-interview { background: #f5e6ea; color: #a34a6a; }
.tag--poetry { background: #e6e8f7; color: #4a4fb0; }
.tag--performing-arts { background: #f5e0ef; color: #a02f82; }
.tag--book-coaching { background: #f0e6d8; color: #8a5f2f; }
.tag--journaling-self-discovery { background: #ede0ef; color: #7a3a8a; }
.tag--therapy-counseling { background: #e2eef2; color: #2d6e82; }
.tag--resilience { background: #f7ece0; color: #b5641f; }
.tag--mens-mental-health { background: #e4eaf5; color: #3a5a9e; }
.tag--health-wellness { background: #e2f2ea; color: #2f8a5f; }
.tag--mental-health-matters { background: #ece4f5; color: #6a4aa8; }
.tag--relationships { background: #fbe6e6; color: #c14545; }
.tag--anger-management { background: #f7e8dc; color: #b04e1e; }
.tag--speaking-communication { background: #dff2f2; color: #1f7d82; }
.tag--life-coaching { background: #eef0dc; color: #75801f; }
.tag--imposter-syndrome { background: #f5ecd8; color: #96731a; }
.tag--personal-growth { background: #e2f0e2; color: #2f7a3a; }
.tag--nervous-system { background: #e6e2f7; color: #4f3ab0; }
.tag--somatic-therapy { background: #f2e2d8; color: #a05a35; }
.tag--healing-self-discovery { background: #dcf0ec; color: #1f8073; }
.episode-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600; color: var(--ink);
  margin-bottom: 0.4rem; line-height: 1.35;
}
.episode-desc {
  font-size: 0.9rem; line-height: 1.55; color: var(--slate-light);
}
.episode-meta {
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem; color: var(--slate-light);
  display: flex; gap: 1rem;
}
.episodes-status {
  grid-column: 1 / -1;
  font-size: 0.95rem; color: var(--slate-light);
  text-align: center; padding: var(--space-lg) 0;
}
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: var(--space-lg);
}
.pagination-btn {
  padding: 0.5rem 1.25rem; border-radius: 6px;
  background: var(--white); border: 1px solid var(--rule);
  font-size: 0.85rem; font-weight: 600; color: var(--slate);
  cursor: pointer; transition: all 0.2s;
}
.pagination-btn:hover:not(:disabled) { border-color: var(--brand-green); color: var(--brand-green); }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-status { font-size: 0.85rem; color: var(--slate-light); }
.episode-extra-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 0.75rem;
}
.extra-tag {
  padding: 0.15rem 0.55rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 500;
  background: var(--parchment-deep); color: var(--slate-light);
  border: 1px solid var(--rule);
}
.episode-audio-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 0.85rem;
  font-size: 0.85rem; font-weight: 600; color: var(--sage);
}
.episode-audio-link:hover { text-decoration: underline; }
.acast-player {
  display: block;
  margin-top: 0.85rem;
  border-radius: 6px;
  overflow: hidden;
}

/* ═══ BLOG ═══ */
.blog-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.blog-card {
  background: var(--white); border-radius: 10px;
  padding: 1.5rem; border: 1px solid var(--rule);
  transition: box-shadow 0.2s;
}
.blog-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.blog-card-date {
  font-size: 0.75rem; color: var(--slate-light);
  margin-bottom: 0.5rem;
}
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600; color: var(--ink);
  margin-bottom: 0.5rem; line-height: 1.35;
}
.blog-card p {
  font-size: 0.9rem; line-height: 1.55; color: var(--slate-light);
}
.blog-card .read-more {
  display: inline-block; margin-top: 0.75rem;
  font-size: 0.85rem; font-weight: 600; color: var(--brand-green);
}
.blog-card .read-more:hover { text-decoration: underline; }

/* ═══ ARTICLES ═══ */
.articles-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}
.article-card {
  display: block;
  background: var(--white); border-radius: 10px;
  padding: 1.5rem; border: 1px solid var(--rule);
  transition: box-shadow 0.2s;
}
.article-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.article-card .episode-tag { margin-bottom: 0.6rem; }
.article-title {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600; color: var(--ink);
  margin-bottom: 0.5rem; line-height: 1.35;
}
.article-desc {
  font-size: 0.9rem; line-height: 1.55; color: var(--slate-light);
}
.article-card .episode-meta { border-top: none; padding-top: 0; margin-top: 0.6rem; }
.article-card .episode-extra-tags { margin-top: 0.6rem; }
.article-card .read-more {
  display: inline-block; margin-top: 0.75rem;
  font-size: 0.85rem; font-weight: 600; color: var(--brand-green);
}
.article-card:hover .read-more { text-decoration: underline; }

/* ═══ ABOUT ═══ */
.about-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--space-lg); align-items: center;
}
@media (min-width: 720px) {
  .about-grid { grid-template-columns: 300px 1fr; }
}
.about-photo {
  width: 100%; max-width: 300px; aspect-ratio: 3/4;
  object-fit: cover; border-radius: 10px;
  border: 3px solid var(--rule);
}
.about-text h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700; color: var(--ink);
  margin-top: 1.5rem; margin-bottom: 0.5rem;
}
.about-text h3:first-of-type { margin-top: 0; }
.about-text p { margin-bottom: 1rem; font-size: 1rem; line-height: 1.65; }
.about-books { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.toolkit-list { margin-top: 0.5rem; }
.toolkit-list li { font-size: 1rem; line-height: 1.65; margin-bottom: 0.5rem; }
.toolkit-link { color: var(--brand-green); font-weight: 600; }
.toolkit-link:hover { text-decoration: underline; }

/* ═══ LISTEN BAND ═══ */
.listen-band {
  text-align: center;
  padding: var(--space-xl) 0;
}
.listen-band .section-title { margin-bottom: var(--space-xs); }
.listen-band p {
  color: rgba(245,241,232,0.65); margin-bottom: var(--space-md);
}
.acast-feed-wrap {
  max-width: 640px; margin: 0 auto var(--space-md);
  border-radius: 10px; overflow: hidden;
}
.acast-feed-wrap iframe { display: block; }
.platform-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.platform-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem; border-radius: 6px;
  font-size: 0.85rem; font-weight: 600;
  background: var(--ochre); color: var(--ink);
  transition: background 0.2s;
}
.platform-link:hover { background: #d4a836; }

/* ═══ NEWSLETTER ═══ */
.newsletter-band {
  background: var(--sage); color: var(--white);
  padding: var(--space-lg) 0; text-align: center;
}
.newsletter-band h2 {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.newsletter-band p { max-width: 500px; margin: 0 auto var(--space-md); opacity: 0.9; }

/* ═══ COMMUNITY ═══ */
.community-content p {
  margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.7;
}
.community-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  margin-top: 1.5rem; margin-bottom: 0.5rem;
}
.guidelines-list {
  margin: 1rem 0 1.5rem 1.25rem;
  list-style: disc;
}
.guidelines-list li {
  list-style: disc; margin-bottom: 0.5rem;
  font-size: 0.95rem; line-height: 1.6;
}
.video-wrapper {
  position: relative; padding-bottom: 56.25%; /* 16:9 */
  height: 0; overflow: hidden; border-radius: 8px;
  margin: 2rem 0 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.video-wrapper iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: 0; border-radius: 8px;
}
.video-caption {
  font-family: var(--font-body);
  font-size: 0.9rem; color: var(--slate-light);
  margin-top: 0.75rem; line-height: 1.5;
}

/* ═══ EVENTS ═══ */
.events-grid {
  display: grid; gap: 2rem;
  margin-top: 2rem;
}
.event-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 2rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: box-shadow 0.2s ease;
}
.event-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.08); }
.event-label {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ochre);
}
.event-label--upcoming { color: var(--ochre); }
.event-label--past { color: var(--slate-light); }
.event-title {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700; line-height: 1.3;
  color: var(--ink); margin: 0;
}
.event-meta {
  font-family: var(--font-body);
  font-size: 0.95rem; color: var(--slate); line-height: 1.6;
}
.event-meta span { display: inline-block; margin-right: 1.25rem; }
.event-description {
  font-family: var(--font-body);
  font-size: 0.95rem; color: var(--slate); line-height: 1.7;
}
.event-actions { margin-top: 0.5rem; }
.events-note {
  font-family: var(--font-body);
  font-size: 0.95rem; color: var(--slate-light);
  margin-top: 2.5rem; line-height: 1.6;
}
@media (max-width: 600px) {
  .event-card { padding: 1.5rem; }
  .event-meta span { display: block; margin-right: 0; margin-bottom: 0.25rem; }
}

/* ═══ CONTACT ═══ */
.contact-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 640px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-reasons li {
  list-style: disc; margin-left: 1.25rem;
  margin-bottom: 0.5rem; font-size: 0.95rem;
}
.social-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.social-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: 6px;
  font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--rule);
  transition: border-color 0.2s, color 0.2s;
}
.social-link:hover { border-color: var(--brand-green); color: var(--brand-green); }

/* ═══ FOOTER ═══ */
.site-footer {
  background: var(--parchment-deep); color: var(--slate-light);
  padding: var(--space-lg) 0 var(--space-md);
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-logo {
  width: 96px; height: 96px;
  margin-bottom: 0.75rem;
  display: block;
}
.footer-brand-desc {
  font-size: 0.85rem; max-width: 300px;
}
.footer-grid h4 {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-green);
  margin-bottom: 0.75rem;
}
.footer-grid ul li { margin-bottom: 0.4rem; }
.footer-grid ul a {
  font-size: 0.85rem; color: var(--slate-light);
  transition: color 0.15s;
}
.footer-grid ul a:hover { color: var(--brand-green); }
.footer-copy { font-size: 0.8rem; text-align: center; }
.footer-share { display: flex; justify-content: center; margin-bottom: 1rem; }

/* ═══ SHARE ═══ */
.share-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.75rem; border-radius: 6px;
  border: 1px solid var(--rule); background: var(--white);
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--slate); cursor: pointer; transition: all 0.15s;
}
.share-btn:hover { border-color: var(--brand-green); color: var(--brand-green); }

/* Icon-only variant, used in the tight episode-card meta row */
.share-btn--icon { padding: 0.4rem; border-radius: 50%; margin-left: auto; }

/* Floating over the article deck, which changes background per slide --
   its own translucent light backdrop keeps it legible either way. */
.deck-share { position: absolute; top: 16px; right: 16px; z-index: 10; }
.deck-share .share-btn {
  background: rgba(245,241,232,0.92); backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Popover menu (Web Share API is used instead where the browser supports
   it -- this is the fallback). Positioned via JS with position:fixed, see
   share.js, so it works from any container without needing `position:
   relative` on every possible parent (episode cards, footer, deck). */
.share-menu {
  position: fixed; z-index: 200;
  width: 200px; padding: 0.4rem 0;
  background: var(--ink); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.share-menu a, .share-menu button {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.55rem 1rem; font-family: var(--font-body);
  font-size: 0.85rem; color: rgba(245,241,232,0.85);
  background: none; border: none; text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.share-menu a:hover, .share-menu button:hover {
  background: rgba(245,241,232,0.06); color: var(--parchment);
}
.share-menu svg { flex-shrink: 0; }

/* ═══ CHAT ASSISTANT ═══ */
.chat-widget { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 300; }

.chat-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--brand-green); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 8px 24px rgba(30,35,48,0.25);
  transition: background 0.15s, transform 0.15s;
}
.chat-toggle:hover { background: var(--brand-green-dark); transform: scale(1.05); }
/* The browser's built-in [hidden]{display:none} UA rule isn't reliably
   applied to SVG elements the way it is on HTML elements -- confirmed via
   testing, not assumed -- so these two icons need it stated explicitly. */
.chat-toggle svg[hidden] { display: none; }

.chat-panel {
  position: absolute; right: 0; bottom: calc(56px + 0.75rem);
  width: min(360px, calc(100vw - 2.5rem)); height: min(520px, 70vh);
  background: var(--white); border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(30,35,48,0.3);
  display: flex; flex-direction: column;
}
/* .chat-panel's own `display: flex` above ties in specificity with the
   browser's built-in [hidden]{display:none} rule and wins by source order
   (same class of bug as the earlier Install App button [hidden] fix) --
   without this, the panel never actually hides regardless of open/close
   state, since [hidden] alone can't override it. Confirmed via
   getComputedStyle before fixing, not assumed. */
.chat-panel[hidden] { display: none; }

.chat-panel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; padding: 1rem 1.1rem;
  background: var(--ink); color: var(--parchment);
}
.chat-panel-title { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.chat-panel-sub { font-size: 0.75rem; color: rgba(245,241,232,0.6); margin-top: 0.15rem; }
.chat-panel-close {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(245,241,232,0.1); color: var(--parchment);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s;
}
.chat-panel-close:hover { background: rgba(245,241,232,0.2); }

.chat-log {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--parchment);
}
/* Anchors short conversations to the bottom without the large empty gap
   above the suggestions/input -- NOT via justify-content:flex-end, which
   breaks this container's scrollable-overflow calculation once content is
   long enough to need scrolling (confirmed: scrollHeight reported as equal
   to clientHeight even with messages rendered thousands of pixels off-
   screen above, making them permanently unreachable). A ::before spacer
   with margin-top:auto only consumes free space when there IS free space
   above the content -- it collapses to 0 once content overflows, so normal
   top-down scrolling keeps working. */
.chat-log::before { content: ''; margin-top: auto; }
.chat-row { display: flex; }
.chat-row--user { justify-content: flex-end; }
.chat-row--bot { justify-content: flex-start; }
.chat-bubble {
  max-width: 88%; font-size: 0.85rem; line-height: 1.55;
  padding: 0.65rem 0.9rem; border-radius: 12px;
}
.chat-row--user .chat-bubble { background: var(--brand-green); color: var(--white); border-bottom-right-radius: 3px; }
.chat-row--bot .chat-bubble { background: var(--white); color: var(--slate); border: 1px solid var(--rule); border-bottom-left-radius: 3px; }
.chat-bubble a { color: inherit; text-decoration: underline; }
.chat-row--bot .chat-bubble a { color: var(--brand-green); font-weight: 600; }

.chat-result {
  margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--rule);
}
.chat-result:first-of-type { margin-top: 0.75rem; }
.chat-result-title { font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; margin: 0.35rem 0 0.2rem; line-height: 1.4; }
.chat-result-meta { font-size: 0.75rem; color: var(--slate-light); }

.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0 1rem 0.75rem; background: var(--parchment);
}
.chat-suggestion {
  padding: 0.35rem 0.75rem; border-radius: 20px;
  border: 1px solid var(--rule); background: var(--white);
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--brand-green);
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.chat-suggestion:hover { background: #e8f0e6; border-color: var(--brand-green); }

.chat-input-row {
  display: flex; gap: 0.5rem; padding: 0.75rem;
  border-top: 1px solid var(--rule); background: var(--white);
}
.chat-input-row input {
  flex: 1; min-width: 0; padding: 0.55rem 0.8rem; border-radius: 8px;
  border: 1px solid var(--rule); font-family: var(--font-body); font-size: 0.85rem;
}
.chat-input-row input:focus { outline: none; border-color: var(--brand-green); }
.chat-input-row button {
  padding: 0.55rem 1rem; border-radius: 8px; border: none;
  background: var(--brand-green); color: var(--white);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.chat-input-row button:hover { background: var(--brand-green-dark); }

@media (max-width: 480px) {
  .chat-widget { right: 1rem; bottom: 1rem; }
  .chat-panel {
    position: fixed; inset: 1rem; bottom: calc(56px + 1.5rem);
    width: auto; height: auto;
  }
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-dropdown { transition: none; }
  .episode-card, .blog-card { transition: none; }
}
