/*
Theme Name: Bodhi Wisdom
Theme URI: https://bodhiwisdom.org/
Author: Bodhi Wisdom
Description: A warm, contemporary theme for the teachings of Ven. Geshe Dorji Damdul. Built around the Dharma Resource content model: six discovery areas, cross-cutting topics, and an archive that stays visually secondary to the teachings themselves.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bodhi-wisdom
Tags: custom-menu, featured-images, translation-ready, block-styles, wide-blocks, accessibility-ready
*/

/* =========================================================================
   1. Design tokens
   ====================================================================== */
:root {
	/* Warm neutrals */
	--bw-ivory:        #faf6ef;
	--bw-ivory-deep:   #f2ebdd;
	--bw-surface:      #ffffff;
	--bw-line:         #e6dccb;
	--bw-line-soft:    #efe7d8;

	/* Ink */
	--bw-ink:          #2b2320;
	--bw-ink-soft:     #5b5049;
	--bw-ink-faint:    #857a71;

	/* Primary + accents */
	--bw-maroon:       #6d1f2e;
	--bw-maroon-deep:  #4a1220;
	--bw-maroon-soft:  #8d3b48;
	--bw-saffron:      #b9711a;
	--bw-gold:         #dda93f;

	/* Category accents */
	--bw-lotus:        #9c4468;
	--bw-teal:         #2c6f66;
	--bw-coral:        #b8532c;
	--bw-green:        #4a7539;

	/* Type */
	--bw-serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
	--bw-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	/* Space + shape */
	--bw-container: 1180px;
	--bw-narrow:    760px;
	--bw-radius:    14px;
	--bw-radius-sm: 8px;
	--bw-shadow:    0 1px 2px rgba(43, 35, 32, .05), 0 8px 24px -12px rgba(43, 35, 32, .18);
	--bw-shadow-lg: 0 2px 4px rgba(43, 35, 32, .06), 0 18px 40px -18px rgba(43, 35, 32, .28);
}

/* =========================================================================
   2. Reset + base
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
	margin: 0;
	background: var(--bw-ivory);
	color: var(--bw-ink);
	font-family: var(--bw-sans);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }
/* Never height:auto on an iframe — it overrides the HTML height attribute and
   collapses the frame to the 150px replaced-element default, which is what
   shrank the Google Calendar embed on the Schedule page. */
iframe, object, embed { max-width: 100%; }
img { display: block; }

h1, h2, h3, h4 {
	font-family: var(--bw-serif);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -.01em;
	color: var(--bw-ink);
	margin: 0 0 .5em;
	text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
h4 { font-size: 1.08rem; }

p { margin: 0 0 1.15em; }

a { color: var(--bw-maroon); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--bw-maroon-soft); }

:focus-visible {
	outline: 3px solid var(--bw-saffron);
	outline-offset: 3px;
	border-radius: 3px;
}

hr { border: 0; border-top: 1px solid var(--bw-line); margin: 2.5rem 0; }

.bw-container { width: 100%; max-width: var(--bw-container); margin-inline: auto; padding-inline: 22px; }
.bw-narrow    { max-width: var(--bw-narrow); margin-inline: auto; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap;
}
.screen-reader-text:focus {
	position: fixed !important; top: 12px; left: 12px; width: auto; height: auto;
	clip: auto; clip-path: none; padding: 12px 20px; background: var(--bw-maroon);
	color: #fff; z-index: 999; border-radius: var(--bw-radius-sm);
}

/* =========================================================================
   3. Buttons + small UI
   ====================================================================== */
.bw-btn {
	display: inline-flex; align-items: center; gap: .5em;
	font-family: var(--bw-sans); font-size: .98rem; font-weight: 600;
	padding: .82em 1.5em; border-radius: 999px; border: 1.5px solid transparent;
	text-decoration: none; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s;
	min-height: 44px;
}
.bw-btn--primary { background: var(--bw-maroon); color: #fff; }
.bw-btn--primary:hover { background: var(--bw-maroon-deep); color: #fff; transform: translateY(-1px); }
.bw-btn--ghost { background: transparent; color: var(--bw-maroon); border-color: var(--bw-line); }
.bw-btn--ghost:hover { background: #fff; border-color: var(--bw-maroon); color: var(--bw-maroon); }
.bw-btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.bw-btn--light:hover { background: #fff; color: var(--bw-maroon-deep); }

.bw-kicker {
	font-family: var(--bw-sans); font-size: .7rem; font-weight: 700;
	letter-spacing: .14em; text-transform: uppercase; color: var(--bw-ink-faint);
	margin: 0 0 .5em;
}

.bw-eyebrow {
	display: block; font-size: .74rem; font-weight: 700; letter-spacing: .13em;
	text-transform: uppercase; color: var(--bw-saffron); margin-bottom: .7em;
}

/* Placeholder marking — deliberately impossible to miss. */
.bw-ph-ribbon {
	display: inline-flex; align-items: center; gap: .4em;
	background: repeating-linear-gradient(45deg, #b3261e, #b3261e 8px, #8e1d17 8px, #8e1d17 16px);
	color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .1em;
	text-transform: uppercase; padding: .32em .7em; border-radius: 4px;
}
.bw-ph-banner {
	border: 2px dashed #b3261e; background: #fdf0ef; color: #7d1a14;
	padding: 1rem 1.25rem; border-radius: var(--bw-radius-sm); margin: 0 0 1.75rem;
	font-size: .93rem; line-height: 1.55;
}
.bw-ph-banner strong { color: #b3261e; }
.bw-card.is-placeholder { border-style: dashed; border-color: #e2a9a4; }

/* =========================================================================
   4. Header
   ====================================================================== */
.bw-header { position: relative; z-index: 60; }

.bw-utility {
	background: var(--bw-maroon-deep);
	color: rgba(255,255,255,.82);
	font-size: .84rem;
}
.bw-utility .bw-container { display: flex; align-items: center; gap: 1.5rem; min-height: 42px; }
.bw-utility a { color: rgba(255,255,255,.82); text-decoration: none; }
.bw-utility a:hover { color: #fff; text-decoration: underline; }
.bw-utility__tag { margin-right: auto; letter-spacing: .02em; opacity: .8; }
.bw-utility__nav { display: flex; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.bw-utility__nav li { margin: 0; }

.bw-masthead {
	background: var(--bw-ivory);
	border-bottom: 1px solid var(--bw-line);
	position: sticky; top: 0; z-index: 50;
}
.bw-masthead .bw-container {
	display: flex; align-items: center; gap: 1.5rem; min-height: 78px;
}

.bw-brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.bw-brand__mark { flex: none; width: 40px; height: 40px; color: var(--bw-maroon); }
.bw-brand__name {
	font-family: var(--bw-serif); font-size: 1.32rem; font-weight: 600;
	color: var(--bw-ink); line-height: 1.1; letter-spacing: -.015em;
}
.bw-brand__sub { display: block; font-family: var(--bw-sans); font-size: .68rem; font-weight: 600;
	letter-spacing: .11em; text-transform: uppercase; color: var(--bw-ink-faint); margin-top: .28em; }

/* Primary nav */
.bw-nav { display: flex; align-items: center; gap: .35rem; }
.bw-nav__list { display: flex; align-items: center; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.bw-nav__list > li { position: relative; margin: 0; }

.bw-nav__link,
.bw-nav__toggle {
	display: inline-flex; align-items: center; gap: .4em;
	font-family: var(--bw-sans); font-size: .95rem; font-weight: 600;
	color: var(--bw-ink); text-decoration: none;
	padding: .6em .9em; border-radius: 999px; border: 0; background: none;
	cursor: pointer; min-height: 44px; line-height: 1;
}
.bw-nav__link:hover, .bw-nav__toggle:hover { background: var(--bw-ivory-deep); color: var(--bw-maroon); }
.bw-nav__link.is-active { color: var(--bw-maroon); }
.bw-nav__toggle[aria-expanded="true"] { background: var(--bw-ivory-deep); color: var(--bw-maroon); }
.bw-nav__caret { width: 10px; height: 10px; transition: transform .18s; }
.bw-nav__toggle[aria-expanded="true"] .bw-nav__caret { transform: rotate(180deg); }

.bw-nav__cta { margin-left: .5rem; }

/* Dropdown panels */
.bw-panel {
	position: absolute; top: calc(100% + 10px); left: 0;
	background: var(--bw-surface); border: 1px solid var(--bw-line);
	border-radius: var(--bw-radius); box-shadow: var(--bw-shadow-lg);
	padding: .7rem; min-width: 300px; display: none;
}
.bw-panel[data-open="true"] { display: block; }
.bw-panel::before {
	content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
}
.bw-panel--wide { min-width: 560px; display: none; }
.bw-panel--wide[data-open="true"] { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
.bw-panel--right { left: auto; right: 0; }

.bw-panel__item {
	display: flex; gap: .7rem; align-items: flex-start;
	padding: .65rem .7rem; border-radius: var(--bw-radius-sm); text-decoration: none; color: var(--bw-ink);
}
.bw-panel__item:hover { background: var(--bw-ivory); color: var(--bw-ink); }
.bw-panel__icon { flex: none; width: 22px; height: 22px; margin-top: .15rem; }
.bw-panel__t { display: block; font-weight: 600; font-size: .93rem; line-height: 1.3; }
.bw-panel__d { display: block; font-size: .78rem; color: var(--bw-ink-faint); line-height: 1.4; margin-top: .15em; }
.bw-panel__foot {
	grid-column: 1 / -1; border-top: 1px solid var(--bw-line-soft); margin-top: .4rem; padding: .7rem .7rem .3rem;
	font-size: .85rem;
}

/* Search */
.bw-search { position: relative; }
.bw-search__form { display: flex; align-items: center; }
.bw-search__input {
	font-family: var(--bw-sans); font-size: .9rem; padding: .6em 1em; width: 190px;
	border: 1px solid var(--bw-line); border-radius: 999px; background: #fff; color: var(--bw-ink);
	min-height: 44px;
}
.bw-search__input::placeholder { color: var(--bw-ink-faint); }
.bw-search__btn {
	background: none; border: 0; cursor: pointer; padding: .5em; margin-left: -2.6em;
	color: var(--bw-ink-faint); display: inline-flex; min-height: 44px; align-items: center;
}
.bw-search__btn:hover { color: var(--bw-maroon); }

/* Mobile toggle */
.bw-burger {
	display: none; align-items: center; justify-content: center; gap: .5em;
	background: none; border: 1.5px solid var(--bw-line); border-radius: 999px;
	padding: .55em 1em; font-family: var(--bw-sans); font-weight: 600; font-size: .9rem;
	color: var(--bw-ink); cursor: pointer; min-height: 44px;
}

.bw-mobile { display: none; background: var(--bw-surface); border-bottom: 1px solid var(--bw-line); }
.bw-mobile[data-open="true"] { display: block; }
.bw-mobile__section { border-bottom: 1px solid var(--bw-line-soft); padding: 1.1rem 0; }
.bw-mobile__section:last-child { border-bottom: 0; }
.bw-mobile__h { font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
	color: var(--bw-ink-faint); margin: 0 0 .7rem; }
.bw-mobile__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.bw-mobile__list a {
	display: block; padding: .7rem .2rem; text-decoration: none; color: var(--bw-ink);
	font-weight: 500; border-radius: var(--bw-radius-sm); min-height: 44px;
}
.bw-mobile__list a:hover { background: var(--bw-ivory); color: var(--bw-maroon); }

/* =========================================================================
   5. Hero
   ====================================================================== */
.bw-hero {
	background:
		radial-gradient(120% 90% at 88% 8%, rgba(221,169,63,.16), transparent 55%),
		radial-gradient(90% 80% at 4% 96%, rgba(109,31,46,.10), transparent 60%),
		var(--bw-ivory);
	border-bottom: 1px solid var(--bw-line-soft);
	padding: clamp(2.75rem, 1rem + 7vw, 5.5rem) 0;
}
.bw-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.bw-hero__title { font-size: clamp(2rem, 1.15rem + 2.4vw, 3.05rem); margin-bottom: .4em; max-width: 18ch; }
.bw-hero__title em { font-style: normal; color: var(--bw-maroon); }
.bw-hero__text { font-size: clamp(1.02rem, .96rem + .3vw, 1.18rem); color: var(--bw-ink-soft); max-width: 34em; margin-bottom: 1.9em; }
.bw-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.bw-hero__media { position: relative; }
.bw-hero__media img {
	width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%;
	border-radius: 200px 200px var(--bw-radius) var(--bw-radius);
	box-shadow: var(--bw-shadow-lg);
}
.bw-hero__caption {
	position: absolute; left: 50%; transform: translateX(-50%); bottom: -18px;
	background: var(--bw-surface); border: 1px solid var(--bw-line); border-radius: 999px;
	padding: .55em 1.2em; font-size: .82rem; font-weight: 600; color: var(--bw-ink-soft);
	box-shadow: var(--bw-shadow); white-space: nowrap;
}

/* =========================================================================
   6. Sections
   ====================================================================== */
.bw-section { padding: clamp(3rem, 1.5rem + 5vw, 5.5rem) 0; }
.bw-section--tint { background: var(--bw-ivory-deep); }
.bw-section--paper { background: var(--bw-surface); }
.bw-section__head { max-width: 44rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.bw-section__head p { color: var(--bw-ink-soft); margin-bottom: 0; }
.bw-section__head--center { margin-inline: auto; text-align: center; }

/* =========================================================================
   7. Explore cards
   ====================================================================== */
.bw-explore-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem;
}
.bw-explore-card {
	position: relative; display: flex; flex-direction: column; gap: .55rem;
	background: var(--bw-surface); border: 1px solid var(--bw-line);
	border-radius: var(--bw-radius); padding: 1.65rem 1.5rem 1.5rem;
	text-decoration: none; color: var(--bw-ink);
	transition: transform .2s, box-shadow .2s, border-color .2s;
	overflow: hidden;
}
.bw-explore-card::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
	background: var(--bw-accent, var(--bw-maroon));
}
.bw-explore-card:hover, .bw-explore-card:focus-visible {
	transform: translateY(-3px); box-shadow: var(--bw-shadow-lg);
	border-color: var(--bw-accent, var(--bw-maroon)); color: var(--bw-ink);
}
.bw-explore-card__icon {
	width: 40px; height: 40px; color: var(--bw-accent, var(--bw-maroon)); margin-bottom: .35rem;
}
.bw-explore-card__kicker {
	font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
	color: var(--bw-accent, var(--bw-maroon));
}
.bw-explore-card__title { font-family: var(--bw-serif); font-size: 1.32rem; font-weight: 600; line-height: 1.2; }
.bw-explore-card__blurb { font-size: .93rem; color: var(--bw-ink-soft); line-height: 1.55; margin: 0; }
.bw-explore-card__meta {
	margin-top: auto; padding-top: 1rem; font-size: .8rem; font-weight: 600; color: var(--bw-ink-faint);
	display: flex; align-items: center; gap: .4em;
}
.bw-explore-card__meta .bw-arrow { transition: transform .2s; }
.bw-explore-card:hover .bw-arrow { transform: translateX(3px); }

/* =========================================================================
   8. Start Here
   ====================================================================== */
.bw-start { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.bw-start__item {
	display: flex; flex-direction: column; gap: .3rem;
	background: var(--bw-surface); border: 1px solid var(--bw-line); border-left: 3px solid var(--bw-gold);
	border-radius: var(--bw-radius-sm); padding: 1.15rem 1.25rem; text-decoration: none; color: var(--bw-ink);
	transition: border-left-color .18s, transform .18s, box-shadow .18s;
}
.bw-start__item:hover { border-left-color: var(--bw-maroon); transform: translateY(-2px); box-shadow: var(--bw-shadow); color: var(--bw-ink); }
.bw-start__q { font-family: var(--bw-serif); font-size: 1.08rem; font-weight: 600; }
.bw-start__d { font-size: .84rem; color: var(--bw-ink-faint); }

/* =========================================================================
   9. Resource cards
   ====================================================================== */
.bw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
.bw-cards--4 { grid-template-columns: repeat(4, 1fr); gap: 1.15rem; }

.bw-card {
	position: relative; display: flex; flex-direction: column;
	background: var(--bw-surface); border: 1px solid var(--bw-line);
	border-radius: var(--bw-radius); overflow: hidden;
	transition: transform .2s, box-shadow .2s;
}
.bw-card:hover, .bw-card:focus-within { transform: translateY(-3px); box-shadow: var(--bw-shadow-lg); }
.bw-card__thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bw-ivory-deep); overflow: hidden; }
.bw-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bw-card__thumb--diagram { background: #fff; border-bottom: 1px solid var(--bw-line-soft); }
/* Tall diagrams are anchored to the top so the card shows the title band. */
.bw-card__thumb--diagram img { object-fit: cover; object-position: center top; }
/* Move the badge off the diagram's own title band. */
.bw-card__thumb--diagram .bw-card__badges { top: auto; bottom: .6rem; }
.bw-card__thumb--pattern {
	display: grid; place-items: center;
	background: linear-gradient(140deg, var(--bw-accent, var(--bw-maroon)) 0%, rgba(0,0,0,.35) 190%);
}
.bw-card__thumb--pattern svg { width: 52px; height: 52px; color: rgba(255,255,255,.85); }
.bw-card__badges { position: absolute; top: .7rem; left: .7rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.bw-card__format {
	background: rgba(255,255,255,.95); color: var(--bw-accent, var(--bw-maroon));
	font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
	padding: .32em .65em; border-radius: 4px;
}
.bw-card__body { display: flex; flex-direction: column; gap: .45rem; padding: 1.1rem 1.15rem 1.25rem; flex: 1; }
.bw-card__title { font-family: var(--bw-serif); font-size: 1.1rem; font-weight: 600; line-height: 1.28; margin: 0; }
.bw-card__title a { color: var(--bw-ink); text-decoration: none; }
.bw-card__title a::after { content: ""; position: absolute; inset: 0; }
.bw-card__title a:hover { color: var(--bw-maroon); }
.bw-card__excerpt { font-size: .88rem; color: var(--bw-ink-soft); line-height: 1.5; margin: 0; }
.bw-card__meta {
	margin-top: auto; padding-top: .85rem; display: flex; flex-wrap: wrap; gap: .5rem .75rem;
	font-size: .76rem; color: var(--bw-ink-faint); align-items: center;
}
.bw-card__meta .bw-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }
/* Separator belongs to the item that follows, so it never strands at a line end. */
.bw-card__meta > span + span::before { content: "\00b7"; margin-right: .55em; opacity: .5; }

.bw-tag {
	display: inline-block; font-size: .72rem; font-weight: 600; color: var(--bw-ink-soft);
	background: var(--bw-ivory); border: 1px solid var(--bw-line-soft);
	padding: .2em .6em; border-radius: 999px; text-decoration: none;
}
a.bw-tag:hover { border-color: var(--bw-maroon); color: var(--bw-maroon); }

/* =========================================================================
   10. Explore tabs + subtabs
   ====================================================================== */
.bw-explore-head {
	background: var(--bw-ivory-deep); border-bottom: 1px solid var(--bw-line);
	padding: clamp(2rem, 1rem + 3vw, 3.25rem) 0 0;
}
.bw-explore-head__intro { max-width: 46rem; margin-bottom: 1.75rem; }
.bw-explore-head__intro p { color: var(--bw-ink-soft); margin-bottom: 0; }
.bw-explore-head__topic {
	display: inline-flex; align-items: center; gap: .5em; margin: -.2rem 0 .9rem;
	font-family: var(--bw-sans); font-size: .95rem; font-weight: 600; color: var(--bw-ink-soft);
}
.bw-explore-head__topic b { color: var(--bw-accent, var(--bw-maroon)); font-weight: 700; }
.bw-explore-head__topic .bw-clear { font-weight: 500; font-size: .85rem; }

/* Tab row */
.bw-tabs { position: relative; }
/* Fade the right edge so it reads as scrollable on narrow screens. */
.bw-tabs::after, .bw-subtabs::after {
	content: ""; position: absolute; top: 0; right: 0; bottom: 1px; width: 42px;
	pointer-events: none; opacity: 0;
}
@media (max-width: 960px) {
	.bw-tabs::after { opacity: 1; background: linear-gradient(90deg, rgba(242,235,221,0), var(--bw-ivory-deep)); }
	.bw-subtabs { position: relative; }
	.bw-subtabs::after { opacity: 1; background: linear-gradient(90deg, rgba(250,246,239,0), var(--bw-ivory)); }
}
.bw-tabs__scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.bw-tabs__list {
	display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0;
	border-bottom: 1px solid var(--bw-line); min-width: max-content;
}
.bw-tabs__list li { margin: 0; }
.bw-tab {
	display: inline-flex; align-items: center; gap: .5em; white-space: nowrap;
	padding: .85em 1.1em; text-decoration: none; color: var(--bw-ink-soft);
	font-weight: 600; font-size: .92rem; border-bottom: 3px solid transparent;
	margin-bottom: -1px; min-height: 44px;
}
.bw-tab:hover { color: var(--bw-maroon); background: rgba(255,255,255,.5); }
.bw-tab[aria-current="page"] { color: var(--bw-accent, var(--bw-maroon)); border-bottom-color: var(--bw-accent, var(--bw-maroon)); }
.bw-tab svg { width: 18px; height: 18px; flex: none; }

/* Subtab row */
.bw-subtabs { background: var(--bw-ivory); border-bottom: 1px solid var(--bw-line); }
.bw-subtabs__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bw-subtabs__list {
	display: flex; gap: .45rem; list-style: none; margin: 0; padding: .85rem 0; min-width: max-content;
}
.bw-subtabs__list li { margin: 0; }
.bw-subtab {
	display: inline-flex; align-items: center; white-space: nowrap;
	padding: .5em 1em; border-radius: 999px; border: 1px solid var(--bw-line);
	background: var(--bw-surface); color: var(--bw-ink-soft); text-decoration: none;
	font-size: .88rem; font-weight: 600; min-height: 40px;
}
.bw-subtab:hover { border-color: var(--bw-maroon); color: var(--bw-maroon); }
.bw-subtab[aria-current="page"] { background: var(--bw-maroon); border-color: var(--bw-maroon); color: #fff; }
.bw-subtabs__label { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--bw-ink-faint); align-self: center; margin-right: .35rem; white-space: nowrap; }

/* Secondary filters */
.bw-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 2rem; }
.bw-filters__label { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bw-ink-faint); }
.bw-filters__note { font-size: .82rem; color: var(--bw-ink-faint); margin-left: auto; }

.bw-count { font-size: .85rem; color: var(--bw-ink-faint); margin-bottom: 1.5rem; }

.bw-empty {
	border: 1px dashed var(--bw-line); border-radius: var(--bw-radius);
	padding: 3rem 2rem; text-align: center; color: var(--bw-ink-soft); background: var(--bw-surface);
}

/* =========================================================================
   11. Library band
   ====================================================================== */
.bw-library {
	background:
		radial-gradient(90% 120% at 80% 0%, rgba(221,169,63,.14), transparent 60%),
		var(--bw-maroon-deep);
	color: #fff;
	padding: clamp(3rem, 1.5rem + 5vw, 5rem) 0;
}
.bw-library h2 { color: #fff; }
.bw-library .bw-section__head p { color: rgba(255,255,255,.72); }
.bw-library .bw-eyebrow { color: var(--bw-gold); }
.bw-library__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.bw-library__item {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 1rem 1.15rem; border-radius: var(--bw-radius-sm);
	background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13);
	color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
	transition: background .18s, border-color .18s, transform .18s;
	min-height: 56px;
}
.bw-library__item:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.4); color: #fff; transform: translateX(2px); }
.bw-library__item svg { flex: none; opacity: .6; }
.bw-library__foot { margin-top: 1.75rem; font-size: .9rem; color: rgba(255,255,255,.66); }
.bw-library__foot a { color: var(--bw-gold); }

/* =========================================================================
   12. About strip
   ====================================================================== */
.bw-about__grid--noimg { grid-template-columns: 1fr !important; max-width: 62ch; }
.bw-about__grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center; }
.bw-about__portrait {
	width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
	border: 6px solid var(--bw-surface); box-shadow: var(--bw-shadow-lg);
}
.bw-about__text { color: var(--bw-ink-soft); }
.bw-about__text p:first-of-type { font-size: 1.08rem; color: var(--bw-ink); }

/* =========================================================================
   13. Article / page content
   ====================================================================== */
.bw-page { padding: clamp(2rem, 1rem + 3vw, 3.5rem) 0 clamp(3rem, 2rem + 4vw, 5rem); }

.bw-crumbs { font-size: .82rem; color: var(--bw-ink-faint); margin-bottom: 1.25rem; }
.bw-crumbs a { color: var(--bw-ink-soft); text-decoration: none; }
.bw-crumbs a:hover { color: var(--bw-maroon); text-decoration: underline; }
.bw-crumbs span { margin: 0 .45em; opacity: .5; }

.bw-entry-head { margin-bottom: 2rem; }
.bw-entry-head h1 { margin-bottom: .4em; }
.bw-entry-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .8rem;
	font-size: .84rem; color: var(--bw-ink-faint); padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--bw-line);
}

.bw-prose { font-size: 1.03rem; line-height: 1.78; color: var(--bw-ink); }
.bw-prose > * { max-width: 100%; }
.bw-prose h2 { margin-top: 2.2em; }
.bw-prose h3 { margin-top: 1.8em; }
.bw-prose h4 { margin-top: 1.5em; font-family: var(--bw-sans); font-weight: 700; letter-spacing: 0; }
.bw-prose a { color: var(--bw-maroon); }
.bw-prose ul, .bw-prose ol { padding-left: 1.35em; margin: 0 0 1.3em; }
.bw-prose li { margin-bottom: .5em; }
.bw-prose img { border-radius: var(--bw-radius-sm); margin: 1.75em auto; box-shadow: var(--bw-shadow); }
.bw-prose figure { margin: 1.75em 0; }
.bw-prose figcaption { font-size: .84rem; color: var(--bw-ink-faint); text-align: center; margin-top: .7em; }
.bw-prose blockquote {
	margin: 1.75em 0; padding: .3em 0 .3em 1.5em; border-left: 3px solid var(--bw-gold);
	font-family: var(--bw-serif); font-size: 1.12rem; color: var(--bw-ink-soft); font-style: italic;
}
.bw-prose table { width: 100%; border-collapse: collapse; margin: 1.75em 0; font-size: .93rem; }
.bw-prose th, .bw-prose td { border: 1px solid var(--bw-line); padding: .65em .85em; text-align: left; vertical-align: top; }
.bw-prose th { background: var(--bw-ivory-deep); font-weight: 700; }
.bw-prose code { background: var(--bw-ivory-deep); padding: .12em .4em; border-radius: 4px; font-size: .9em; }
.bw-prose hr { margin: 2.5em 0; }
.bw-table-wrap { overflow-x: auto; margin: 1.75em 0; }

/* Embedded Google Calendars: fill the column and stay tall enough to be usable.
   Done in CSS rather than by editing the page, so the original embed markup is
   preserved and any future calendar page gets the same treatment. */
.bw-prose iframe[src*="calendar.google.com"] {
	width: 100%;
	min-height: min(80vh, 760px);
	border: 1px solid var(--bw-line);
	border-radius: var(--bw-radius-sm);
	background: #fff;
	display: block;
}
@media (max-width: 620px) {
	.bw-prose iframe[src*="calendar.google.com"] { min-height: 70vh; }
}

/* Existing classic-editor content is unpredictable; keep it inside the column. */
.bw-prose iframe, .bw-prose object, .bw-prose embed { max-width: 100%; }
.bw-prose .wp-caption { max-width: 100% !important; }

/* Page layout with sidebar */
.bw-with-aside { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.bw-aside { position: sticky; top: 100px; }
.bw-aside__box {
	background: var(--bw-surface); border: 1px solid var(--bw-line);
	border-radius: var(--bw-radius); padding: 1.35rem 1.4rem; margin-bottom: 1.15rem;
}
.bw-aside__h { font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
	color: var(--bw-ink-faint); margin: 0 0 .9rem; }
.bw-aside__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.bw-aside__list a {
	display: block; padding: .5rem .6rem; margin: 0 -.6rem; border-radius: var(--bw-radius-sm);
	text-decoration: none; color: var(--bw-ink-soft); font-size: .92rem; font-weight: 500;
}
.bw-aside__list a:hover { background: var(--bw-ivory); color: var(--bw-maroon); }
.bw-aside__list a[aria-current="page"] { background: var(--bw-ivory-deep); color: var(--bw-maroon); font-weight: 600; }

/* Media embed on a resource */
.bw-media { margin: 0 0 2rem; border-radius: var(--bw-radius); overflow: hidden; background: #000; }
.bw-media iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.bw-media audio { width: 100%; display: block; }

.bw-continue { margin-top: clamp(3rem, 5vw, 4.5rem); padding-top: 2.5rem; border-top: 1px solid var(--bw-line); }

/* Pagination */
.bw-pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 3rem; flex-wrap: wrap; }
.bw-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
	padding: 0 .9em; border-radius: var(--bw-radius-sm); border: 1px solid var(--bw-line);
	background: var(--bw-surface); color: var(--bw-ink-soft); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.bw-pagination .page-numbers:hover { border-color: var(--bw-maroon); color: var(--bw-maroon); }
.bw-pagination .page-numbers.current { background: var(--bw-maroon); border-color: var(--bw-maroon); color: #fff; }

/* =========================================================================
   14. Footer
   ====================================================================== */
.bw-footer { background: var(--bw-ink); color: rgba(255,255,255,.7); padding: clamp(2.75rem, 5vw, 4rem) 0 0; }
.bw-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.bw-footer a:hover { color: #fff; text-decoration: underline; }
.bw-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.bw-footer__h { font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
	color: rgba(255,255,255,.45); margin: 0 0 1rem; }
.bw-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .92rem; }
.bw-footer__brand { font-family: var(--bw-serif); font-size: 1.3rem; color: #fff; margin-bottom: .5rem; }
.bw-footer__about { font-size: .9rem; line-height: 1.6; max-width: 30ch; }
.bw-footer__social { display: flex; gap: .6rem; margin-top: 1.15rem; }
.bw-footer__social a {
	display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
	border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
}
.bw-footer__social a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
.bw-footer__bar {
	border-top: 1px solid rgba(255,255,255,.12); padding: 1.35rem 0; font-size: .84rem;
	display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: rgba(255,255,255,.5);
}

/* =========================================================================
   15. Dev notice (local only)
   ====================================================================== */
.bw-devbar {
	background: repeating-linear-gradient(45deg, #b3261e, #b3261e 12px, #9c2019 12px, #9c2019 24px);
	color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-align: center;
	padding: .55rem 1rem; position: relative; z-index: 70;
}
.bw-devbar a { color: #fff; text-decoration: underline; }

/* =========================================================================
   16. Responsive
   ====================================================================== */
@media (max-width: 1080px) {
	.bw-cards--4 { grid-template-columns: repeat(2, 1fr); }
	.bw-start { grid-template-columns: repeat(2, 1fr); }
	.bw-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
	.bw-nav, .bw-search--desktop { display: none; }
	.bw-burger { display: inline-flex; }
	.bw-hero__grid { grid-template-columns: 1fr; }
	.bw-hero__media { max-width: 300px; margin-inline: auto; order: -1; }
	.bw-hero__media img { aspect-ratio: 1; border-radius: 50%; }
	.bw-hero__caption { display: none; }
	.bw-explore-grid { grid-template-columns: repeat(2, 1fr); }
	.bw-cards { grid-template-columns: repeat(2, 1fr); }
	.bw-library__grid { grid-template-columns: repeat(2, 1fr); }
	.bw-with-aside { grid-template-columns: 1fr; }
	.bw-aside { position: static; }
	.bw-about__grid { grid-template-columns: 1fr; text-align: center; }
	.bw-about__portrait { max-width: 220px; margin-inline: auto; }
	.bw-about__grid .bw-btn { margin-inline: auto; }
	.bw-utility__nav { gap: 1rem; }
}

@media (max-width: 620px) {
	body { font-size: 16px; }
	.bw-container { padding-inline: 18px; }
	.bw-explore-grid, .bw-cards, .bw-cards--4, .bw-start, .bw-library__grid { grid-template-columns: 1fr; }
	.bw-footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
	.bw-utility .bw-container { min-height: 38px; font-size: .78rem; }
	.bw-utility__tag { display: none; }
	.bw-utility__nav { width: 100%; justify-content: space-between; gap: .5rem; }
	.bw-masthead .bw-container { min-height: 66px; }
	.bw-brand__mark { width: 34px; height: 34px; }
	.bw-brand__name { font-size: 1.12rem; }
	.bw-hero { padding: 2.25rem 0 3rem; }
	.bw-hero__actions .bw-btn { width: 100%; justify-content: center; }
	.bw-filters__note { margin-left: 0; width: 100%; }
	.bw-footer__bar { flex-direction: column; gap: .5rem; }
}

@media (max-width: 420px) {
	.bw-brand__sub { display: none; }
}

/* =========================================================================
   17. Print
   ====================================================================== */
@media print {
	.bw-header, .bw-footer, .bw-devbar, .bw-continue, .bw-aside, .bw-tabs, .bw-subtabs { display: none !important; }
	body { background: #fff; font-size: 12pt; }
}

/* =========================================================================
   18. Retreat session headers (imported transcript material)
   ====================================================================== */
.bw-session {
	display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: baseline;
	background: var(--bw-ivory-deep); border-left: 3px solid var(--bw-maroon);
	border-radius: var(--bw-radius-sm); padding: .95rem 1.15rem; margin: 2.5em 0 1.5em;
}
.bw-session__name {
	font-family: var(--bw-sans); font-weight: 700; font-size: .82rem;
	letter-spacing: .06em; text-transform: uppercase; color: var(--bw-maroon);
}
.bw-session__when { font-size: .86rem; color: var(--bw-ink-soft); }
.bw-session__where { font-size: .86rem; color: var(--bw-ink-faint); }
.bw-session__where::before { content: "· "; }
.bw-prose > .bw-session:first-child { margin-top: 0; }
/* Session headers now arrive as a Group of paragraphs, so kill the paragraph
   bottom margin that would otherwise break the single-line layout. */
.bw-session p { margin: 0; }

/* Imported retreat diagrams */
.bw-figure { margin: 2em 0; }
.bw-figure a { display: block; }
figure.bw-figure { margin-left: 0; margin-right: 0; }
.bw-figure img {
	width: 100%; border: 1px solid var(--bw-line); border-radius: var(--bw-radius-sm);
	background: #fff; box-shadow: var(--bw-shadow); margin: 0;
}
.bw-figure figcaption { font-size: .84rem; color: var(--bw-ink-faint); text-align: center; margin-top: .7em; }
.bw-prose .wp-block-table { margin: 1.75em 0; }
.bw-prose .wp-block-table table { margin: 0; }

/* =========================================================================
   19. AI-assisted provenance
   Amber rather than red: this is "a person has not checked this yet", not
   "this is invented". Placeholder marking stays red and takes precedence.
   ====================================================================== */
.bw-ai-ribbon {
	display: inline-flex; align-items: center; gap: .4em;
	background: #8a5a00; color: #fff;
	font-size: .62rem; font-weight: 800; letter-spacing: .1em;
	text-transform: uppercase; padding: .32em .7em; border-radius: 4px;
}
.bw-card.is-ai-pending { border-color: #e3c98f; }

.bw-ai-banner {
	border: 1px solid #e0bd7a; border-left: 4px solid #b9711a;
	background: #fdf6e9; color: #6b4708;
	padding: 1rem 1.25rem; border-radius: var(--bw-radius-sm); margin: 0 0 1.75rem;
	font-size: .93rem; line-height: 1.55;
}
.bw-ai-banner strong { color: #8a5a00; }
.bw-ai-banner__src {
	display: block; margin-top: .6em; font-size: .84rem; color: #8a7350;
	border-top: 1px solid #ecd9b4; padding-top: .6em;
}
