:root {
  --bg: #fdf9f4;
  --bg-subtle: #f5efe5;
  --ink: #1a1712;
  --muted: #6b6258;
  --faint: #9a9080;
  --border: #e8e2da;
  --border-light: #efe9e1;
  --card-bg: #ffffff;
  --dark-card: #2c2a27;
  --plum: #6d4aa7;
  --plum-deep: #543a86;
  --plum-bg: #f2ecfa;
  --sage: #5aa17a;
  --ruby: #c02e5f;
  --gold: #d98a2b;
  --shadow: 0 2px 10px rgba(26, 23, 18, .07);
  --shadow-lift: 0 14px 34px rgba(26, 23, 18, .13);
  --gutter: max(1.25rem, calc((100vw - 1240px) / 2 + 1.25rem));
  --font: 'Poppins', system-ui, sans-serif;
}
@property --hue { syntax: '<number>'; inherits: false; initial-value: 35; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--plum); text-decoration: none; }
a:hover { text-decoration: underline; }

/* leave room for the fixed global header bar (desktop); mobile uses its bottom bar */
.wrap { max-width: 1240px; margin: 0 auto; padding: 116px 1.25rem 7rem; }

/* ── section ── */
.section { margin: 0 0 3.75rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 .4rem; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font); font-weight: 700; color: var(--ink); font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.section-head h2 .pillar { color: var(--ink); }
.section-head .see-all { font-size: .9rem; font-weight: 700; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: .25rem; }
.section-sub { color: var(--muted); margin: 0 0 1.1rem; max-width: 60ch; }

/* ── filter bar — single line, full-bleed, horizontal scroll ── */
.filters { display: flex; flex-wrap: nowrap; align-items: center; gap: .55rem; margin: 0 0 1.35rem; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; overflow-x: auto; scroll-padding-left: var(--gutter); scrollbar-width: none; -ms-overflow-style: none; }
.filters::-webkit-scrollbar { display: none; height: 0; }
.filters > * { flex: 0 0 auto; }
.filter-search { display: flex; align-items: center; gap: .5rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: 999px; padding: .1rem .3rem .1rem .85rem; width: 260px; transition: border-color .2s ease; }
.filter-search:focus-within { border-color: var(--plum); }
.filter-search svg { flex: 0 0 auto; color: var(--faint); }
.filter-search input { border: none; background: transparent; font: inherit; font-size: .88rem; color: var(--ink); padding: .5rem .25rem; width: 100%; outline: none; }
.filter-select {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: .84rem; font-weight: 500; color: var(--ink);
  background-color: var(--card-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6258' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center;
  border: 1px solid var(--border); border-radius: 999px; padding: .5rem 2rem .5rem .95rem; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.filter-select:hover { border-color: var(--ink); }
.filter-select:focus { outline: none; border-color: var(--ink); }
.filter-toggle { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; font-weight: 500; color: var(--ink); cursor: pointer; background: var(--card-bg); border: 1px solid var(--border); border-radius: 999px; padding: .45rem .9rem; user-select: none; white-space: nowrap; transition: border-color .2s ease; }
.filter-toggle:hover { border-color: var(--ink); }
.filter-toggle input { display: none; }
.filter-toggle .knob { width: 30px; height: 18px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; flex: 0 0 auto; }
.filter-toggle .knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.filter-toggle input:checked + .knob { background: var(--ink); }
.filter-toggle input:checked + .knob::after { transform: translateX(12px); }

/* ── carousel (full-bleed, scrollbar hidden) ── */
.carousel-wrap { position: relative; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.carousel { display: flex; gap: 1.4rem; overflow-x: auto; scroll-snap-type: x proximity; padding: .5rem var(--gutter) 1.4rem; scroll-padding-left: var(--gutter); scrollbar-width: none; -ms-overflow-style: none; align-items: stretch; }
.carousel::-webkit-scrollbar { display: none; height: 0; }
.carousel .empty { color: var(--faint); font-style: italic; padding: 2rem .25rem; font-size: .9rem; }

.item { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; }
.item.nl { width: 384px; }
.item.med { width: 300px; }
.item.cls, .item.yt { width: 404px; }

/* ── card shell — no border on photos ── */
.card { position: relative; background: var(--card-bg); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s; display: flex; flex-direction: column; }
.item:hover .card { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card.dark { background: var(--dark-card); }

.card-media { position: relative; width: 100%; overflow: hidden; background: linear-gradient(135deg, var(--bg-subtle), #e6dccb); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-square { aspect-ratio: 1 / 1; }
.ar-wide { aspect-ratio: 16 / 9; }
.placeholder-glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(26,23,18,.14); }
.card.dark .card-media { background: linear-gradient(135deg, #3a352f, #24211d); }
.card.dark .placeholder-glyph { color: rgba(255,255,255,.14); }

/* scalloped seal-check badge + hover tooltip */
.seal { position: absolute; bottom: 12px; left: 12px; z-index: 3; width: 27px; height: 27px; line-height: 0; cursor: help; }
.seal svg { display: block; width: 100%; height: 100%; }
.seal.dark { color: var(--ink); filter: drop-shadow(0 1px 2px rgba(255,255,255,.7)); }
.seal.light { color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.seal[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 0; width: max-content; max-width: 210px; background: #1a1712; color: #fff; font-family: var(--font); font-size: .74rem; font-weight: 500; line-height: 1.35; text-align: left; padding: .45rem .65rem; border-radius: 9px; box-shadow: 0 6px 18px rgba(0,0,0,.24); opacity: 0; transform: translateY(5px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; z-index: 12; }
.seal[data-tip]:hover::after { opacity: 1; transform: translateY(0); }

.duration-badge { position: absolute; bottom: 12px; right: 12px; z-index: 3; font-size: .8rem; font-weight: 600; color: #fff; background: rgba(20,17,12,.82); padding: .22rem .6rem; border-radius: 10px; letter-spacing: .01em; }

.coming-soon-overlay { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 1.25rem; text-align: center; color: #fff; background: rgba(26,23,18,.58); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.coming-soon-overlay strong { font-size: 1.2rem; line-height: 1.2; }
.coming-soon-overlay > span:last-child { max-width: 31ch; font-size: .78rem; line-height: 1.45; color: rgba(255,255,255,.86); }
.coming-soon-kicker { padding: .22rem .55rem; border: 1px solid rgba(255,255,255,.48); border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.placeholder-item .card { cursor: default; }
.placeholder-item:hover .card { transform: none; box-shadow: var(--shadow); }

/* ── newsletter card (always free) ── */
.nl .card-body { padding: 1rem 1.1rem 1.2rem; }
.nl-title { font-weight: 800; font-size: 1.32rem; line-height: 1.18; margin: 0 0 .35rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-excerpt { color: var(--muted); font-size: .96rem; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.45em * 3); }
.item .caption { text-align: center; padding: 1rem .5rem 0; }
.caption .cap-date { font-weight: 700; font-size: 1.24rem; letter-spacing: -.01em; color: var(--ink); }
.caption .cap-meta { font-size: .82rem; color: var(--faint); margin-top: .1rem; }
.caption .cap-title { font-weight: 800; font-size: 1.18rem; line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caption .cap-cat { font-size: .92rem; color: var(--faint); margin-top: .15rem; }
.caption .cap-cat .pillar { color: inherit; }

/* ── meditation card (stays square) ── */
.med .card-media { aspect-ratio: 1 / 1; }
.audio-pill { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: calc(100% - 2.4rem); display: flex; align-items: center; gap: .7rem; background: rgba(255,255,255,.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.32); border-radius: 999px; padding: .5rem .6rem; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.audio-btn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.audio-btn:disabled { cursor: default; opacity: .85; }
.audio-time { font-size: .82rem; color: #fff; font-family: 'Geist Mono', ui-monospace, monospace; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.audio-track { flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.5); overflow: hidden; min-width: 30px; }
.audio-fill { height: 100%; width: 0; background: #fff; border-radius: 999px; }

/* ── dark class / youtube body ── */
.card.dark .card-body { padding: 1rem 1.15rem 1.15rem; min-height: 7.9rem; }
.dark-title { font-family: var(--font); font-weight: 800; color: #fff; font-size: 1.14rem; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .1rem; font-size: .8rem; color: rgba(255,255,255,.82); align-content: flex-start; }
.meta-row .mi { display: inline-flex; align-items: center; gap: .28rem; white-space: nowrap; }
.meta-row .sep { color: rgba(255,255,255,.4); margin: 0 .3rem; }
.tier-dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; border: 1.5px solid rgba(255,255,255,.5); }

/* ── lock overlay (meditations + classes only; never newsletter) ── */
.lock-overlay { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .7rem; padding: 1.25rem; }
.card-media.blurred img, .card-media.blurred .placeholder-glyph { filter: blur(7px); transform: scale(1.08); }
.card-media.blurred::after { content: ''; position: absolute; inset: 0; background: rgba(60,55,48,.42); z-index: 1; }
.lock-overlay .lock-ic { color: #1a1712; }
.card.dark .lock-overlay .lock-ic { color: #fff; }
.lock-overlay p { margin: 0; font-size: .96rem; line-height: 1.35; color: #fff; font-weight: 500; max-width: 20ch; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.lock-cta { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 700; color: var(--ink); border: none; border-radius: 999px; padding: .6rem 1.3rem; cursor: pointer; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.lock-cta.hue { background: hsl(var(--hue), 85%, 76%); animation: hue-cycle 10s linear infinite; }
.lock-cta.hue:hover { text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.24); }
@keyframes hue-cycle { from { --hue: 0; } to { --hue: 360; } }
@supports not (background: hsl(var(--hue), 85%, 76%)) { .lock-cta.hue { background: #fad79a; animation: none; } }
.lock-login { font-size: .74rem; font-weight: 600; color: #fff; text-decoration: underline; opacity: .92; }
.lock-login:hover { opacity: 1; color: #fff; }

/* ── footer ── */
.foot { border-top: 1px solid var(--border); margin-top: 2rem; padding: 2rem 1.25rem; text-align: center; color: var(--muted); font-size: .82rem; }
.foot .socials { display: flex; gap: 1rem; justify-content: center; margin: 0 0 .9rem; }
.foot .socials a { color: var(--muted); display: inline-flex; }
.foot .socials a:hover { color: var(--plum); }

/* ── tier preview switcher (dev/annotation aid) ── */
#previewBar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 10050;
  display: flex; align-items: center; gap: .3rem; padding: .35rem .4rem .35rem .8rem;
  background: rgba(26,23,18,.94); backdrop-filter: blur(10px); border-radius: 999px;
  box-shadow: 0 8px 26px rgba(0,0,0,.28); font-family: var(--font);
}
#previewBar .pv-label { color: rgba(255,255,255,.62); font-size: .72rem; font-weight: 600; letter-spacing: .02em; margin-right: .2rem; white-space: nowrap; }
#previewBar .pv-btn { border: none; cursor: pointer; background: transparent; color: rgba(255,255,255,.82);
  font: inherit; font-size: .78rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; transition: background .15s, color .15s; }
#previewBar .pv-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
#previewBar .pv-btn.on { background: #fff; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .lock-cta.hue { animation: none; } }

@media (max-width: 600px) {
  .wrap { padding: 1.75rem 1rem 6.5rem; }
  .item.nl { width: 86vw; max-width: 380px; }
  .item.med { width: 66vw; max-width: 280px; }
  .item.cls, .item.yt { width: 86vw; max-width: 380px; }
  .filter-search { width: 200px; }
}
