/*
 * stories.css — the Scholar Stories series.
 *
 * WHERE THIS SITS IN THE CASCADE. Last. It is enqueued only on a single post in
 * the `scholar-stories` category (inc/stories.php), with `basic-borrego-posts`
 * as its dependency, so it may overrule posts.css and components.css and
 * nothing in the theme may overrule it. Every class here is prefixed
 * `bb-story-` and exists nowhere else, so nothing here can reach another page
 * even if the enqueue guard were removed.
 *
 * WHAT THE SERIES IS. Nine posts, one per person, each tracing a route through
 * BASIC's programs. The design has one job that ordinary article styling cannot
 * do: show that a scholarship is the far end of a road that starts with a book
 * in the mail at six months old. That is what .bb-story-path draws, and it is
 * the reason the series looks different from a Learning Academy write-up.
 *
 * THE DECORATION IS CACTUS. Barrel and beavertail prickly pear, the two plants
 * that actually grow on the Borrego valley floor and the same two the About
 * page uses. Not poppies, not vines. Post content cannot call
 * basic_borrego_botanical(), so each story inlines the same SVG markup that
 * function emits and this file positions it.
 *
 * COLOR RULES, inherited from components.css and not negotiable:
 *   - on cream: text is ink, forest or terracotta-text. Never `terracotta` as
 *     text below 2rem, never gold as text at all — both fail contrast.
 *   - `terracotta` is for rules, arrows and display numerals above 2rem.
 *   - gold is for rules and rings.
 *   - sage is decorative fill only, always with a forest stroke over it.
 *   - on forest: cream text, terracotta-on-dark accents, gold rules.
 *
 * SAFARI. Peter tests there, so: no backdrop-filter; -webkit-mask beside every
 * mask; overflow+isolation on anything with a radius over a photograph; every
 * image sized by aspect-ratio with object-fit rather than by height.
 */

/* ---------------------------------------------------------------------------
 * 1. LAYOUT
 *
 * The article keeps the theme's ordinary 760px measure. That is deliberate and
 * was arrived at the hard way: widening the ARTICLE to wideSize and then
 * re-narrowing the prose inside it left single.php's own header — the eyebrow,
 * the h1 and the posted date — sitting at the wide edge while the body text
 * started 170px further in. The headline visibly hung to the left of its own
 * first paragraph.
 *
 * So nothing widens. Instead the four elements that want width break OUT of the
 * measure with symmetric negative margins, which keeps the title, the prose and
 * the article all sharing one left edge.
 *
 * The breakout is gated on viewport width rather than expressed in vw units:
 * nothing on html or body clips horizontal overflow, so a vw-sized child would
 * add a horizontal scrollbar on any platform that shows them. Below the gate
 * the wide elements simply stay at the prose measure, which is the correct
 * behaviour on a laptop or a phone anyway.
 * ------------------------------------------------------------------------ */

.bb-story {
	display: flow-root;
}

/*
 * 1100px of content inside a 760px column: (1100 - 760) / 2 = 170px of negative
 * margin each side. The gate is 1100 + the theme's global padding, with room to
 * spare, so the breakout never reaches the viewport edge.
 */
@media (min-width: 1180px) {
	.bb-story--wide {
		margin-inline: -170px;
	}
}

/* Floats must not run under the next heading. */
.bb-post-article.category-scholar-stories h2,
.bb-post-article.category-scholar-stories h3 {
	clear: both;
}

.bb-story figure {
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * 2. KICKER AND STAGE PILL
 * Names the series, then places the person on BASIC's arc: Cradle, Cradle to
 * Classroom, Full Circle, Career, Graduate.
 * ------------------------------------------------------------------------ */

.bb-story-kicker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1rem;
	margin: 0 0 1.5rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terracotta-text);
}

.bb-story-stage {
	display: inline-block;
	padding: 0.3em 0.85em;
	border-radius: 999px;
	background-color: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--terracotta-text);
}

/* ---------------------------------------------------------------------------
 * 3. HERO
 *
 * Four variants, because the nine stories do not have nine comparable
 * photographs and pretending otherwise is what makes a series look cheap:
 *   --portrait  a real portrait, the default
 *   --group     a landscape family photograph
 *   --type      no usable portrait: the quote carries the page, with a small
 *               circular crop and an icon medallion beside it
 *   --video     a short silent loop, poster-backed
 * ------------------------------------------------------------------------ */

.bb-story-hero {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	margin-block: 1rem 2.5rem;
}

.bb-story-hero__media {
	/* isolation:isolate keeps Safari from painting the image outside the
	   rounded corner during a view transition. */
	border-radius: var(--bb-radius-blob-soft, 62% 38% 55% 45% / 46% 52% 48% 54%);
	overflow: hidden;
	isolation: isolate;
	aspect-ratio: 4 / 5;
	background-color: var(--wp--preset--color--base-alt);
}

.bb-story-hero--group .bb-story-hero__media {
	aspect-ratio: 3 / 2;
}

.bb-story-hero__media img,
.bb-story-hero__media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bb-story-hero__copy {
	/* min-width:0 keeps a long word in the quote from widening the track. */
	min-width: 0;
}

/* The opening quotation mark, set as ornament rather than punctuation. */
.bb-story-hero__glyph {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(3rem, 7vw, 5rem);
	line-height: 0.5;
	color: var(--wp--preset--color--terracotta);
	margin-bottom: 0.4em;
}

.bb-post-article.category-scholar-stories .bb-story-hero__quote {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(1.5rem, 3.2vw, 2.4rem);
	line-height: 1.22;
	color: var(--wp--preset--color--forest);
	text-wrap: balance;
}

.bb-story-hero__name {
	margin: 1.35rem 0 0;
	padding-top: 1rem;
	border-top: 2px solid var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	color: var(--wp--preset--color--forest);
}

.bb-story-hero__desc {
	margin: 0.3rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terracotta-text);
}

/* --type: quote-led, for a story whose only photograph is a 25 KB social
   graphic. The medallion carries the person's field as icons instead. */
.bb-story-hero--type {
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
}

.bb-story-hero--type .bb-story-hero__media {
	width: 9rem;
	aspect-ratio: 1;
	border-radius: 50%;
}

.bb-story-hero__medallion {
	display: flex;
	gap: 0.6rem;
	margin-top: 1rem;
}

.bb-story-hero__medallion span {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--terracotta-text);
	color: var(--wp--preset--color--base);
}

.bb-story-hero__medallion svg {
	width: 1.4rem;
	height: 1.4rem;
}

/* ---------------------------------------------------------------------------
 * 4. LEDE
 * ------------------------------------------------------------------------ */

.bb-post-article.category-scholar-stories .bb-story-lede {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.3rem;
	line-height: 1.5;
	color: var(--wp--preset--color--forest);
}

/* ---------------------------------------------------------------------------
 * 5. THE PATH — the signature graphic of the series
 *
 * Six stations on a rail: Imagination Library, Family Literacy, TK Academy,
 * Learning Academy, Scholarship, Graduate. The stations this person passed
 * through are lit; the rest stay muted, so one glance says both what they did
 * and what else BASIC runs.
 *
 * The rail between two lit stations is drawn terracotta by the station on the
 * RIGHT of the pair, reaching back half a column. Consecutive stations then
 * read as one continuous journey rather than as separate dots — which is the
 * whole argument of the series in a single visual gesture.
 *
 * Color is never the only signal: each station carries visually hidden text
 * saying whether it was completed, so a screen reader and a monochrome print
 * both convey it.
 * ------------------------------------------------------------------------ */

.bb-story-path {
	--bb-story-dot: 3.4rem;
	list-style: none;
	/*
	 * margin-block, NOT the margin shorthand. The shorthand would set
	 * margin-inline here too and silently cancel the .bb-story--wide breakout
	 * declared above it, leaving the path strip alone at the prose measure
	 * while the hero and the bands around it reached full width.
	 */
	margin-block: 2.5rem 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	position: relative;
}

/* The unlit rail, inset by half a column at each end so it starts and stops
   under the first and last dots rather than at the edge of the page. */
.bb-story-path::before {
	content: "";
	position: absolute;
	left: calc(100% / 12);
	right: calc(100% / 12);
	top: calc(var(--bb-story-dot) / 2 - 1px);
	height: 2px;
	background-color: rgba(57, 62, 46, 0.18);
}

.bb-story-path__station {
	position: relative;
	text-align: center;
	padding-inline: 0.35rem;
}

.bb-story-path__icon {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: var(--bb-story-dot);
	height: var(--bb-story-dot);
	margin: 0 auto 0.6rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--forest);
	opacity: 0.45;
}

.bb-story-path__icon svg {
	width: 1.4rem;
	height: 1.4rem;
}

.bb-story-path__label {
	display: block;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.3;
	color: rgba(57, 62, 46, 0.6);
}

.bb-story-path .is-lit .bb-story-path__icon {
	background-color: var(--wp--preset--color--terracotta-text);
	color: var(--wp--preset--color--base);
	opacity: 1;
	/* Two rings: cream to punch a hole in the rail, then gold. */
	box-shadow:
		0 0 0 3px var(--wp--preset--color--base),
		0 0 0 5px var(--wp--preset--color--gold);
}

.bb-story-path .is-lit .bb-story-path__label {
	color: var(--wp--preset--color--forest);
	font-weight: 600;
}

/* Gold marks a station someone came back to as an adult — Tania, who was a
   BASIC scholar and now teaches the Learning Academy. */
.bb-story-path .is-gold .bb-story-path__icon {
	background-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--forest-deep);
	opacity: 1;
	box-shadow:
		0 0 0 3px var(--wp--preset--color--base),
		0 0 0 5px var(--wp--preset--color--terracotta-text);
}

.bb-story-path .is-gold .bb-story-path__label {
	color: var(--wp--preset--color--forest);
	font-weight: 600;
}

.bb-story-path .is-lit + .is-lit::before,
.bb-story-path .is-lit + .is-gold::before,
.bb-story-path .is-gold + .is-lit::before {
	content: "";
	position: absolute;
	left: -50%;
	right: 50%;
	top: calc(var(--bb-story-dot) / 2 - 1px);
	height: 2px;
	background-color: var(--wp--preset--color--terracotta);
}

/* A count badge, for the family story where three siblings share one station. */
.bb-story-path__badge {
	position: absolute;
	top: -0.35rem;
	right: calc(50% - var(--bb-story-dot) / 2 - 0.7rem);
	z-index: 2;
	padding: 0.1em 0.5em;
	border-radius: 999px;
	background-color: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--base);
	font-size: 0.65rem;
	font-weight: 700;
}

.bb-story-path__caption {
	text-align: center;
	font-size: var(--wp--preset--font-size--x-small);
	color: rgba(57, 62, 46, 0.72);
	margin: 0.85rem 0 2.5rem;
}

/* ---------------------------------------------------------------------------
 * 6. STAT TILES — the house idiom from the TK Academy write-up
 * ------------------------------------------------------------------------ */

.bb-story-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 3rem;
	background-color: var(--wp--preset--color--base-alt);
	border-radius: 12px;
	padding: 1.75rem 2rem;
	margin-block: 2.25rem;
	clear: both;
}

.bb-story-stats .stat {
	flex: 1 1 130px;
}

.bb-story-stats .num {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.5rem;
	line-height: 1;
	color: var(--wp--preset--color--terracotta-text);
	margin-bottom: 0.25rem;
	font-variant-numeric: tabular-nums;
}

.bb-story-stats .label {
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--wp--preset--color--forest);
}

/* ---------------------------------------------------------------------------
 * 7. QUOTE BAND
 * ------------------------------------------------------------------------ */

.bb-story-band {
	position: relative;
	overflow: hidden;
	background-color: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--base);
	border-radius: 10px 40px 10px 40px;
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
	margin-block: 2.5rem;
	text-align: center;
	clear: both;
}

.bb-post-article.category-scholar-stories .bb-story-band__quote {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: clamp(1.35rem, 2.8vw, 2rem);
	line-height: 1.3;
	color: var(--wp--preset--color--base);
	text-wrap: balance;
}

.bb-story-band__quote::before {
	content: "";
	display: block;
	width: 4rem;
	height: 2px;
	margin: 0 auto 1.25rem;
	background-color: var(--wp--preset--color--gold);
}

.bb-story-band__cite {
	display: block;
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--body);
	font-style: normal;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terracotta-on-dark);
}

/* ---------------------------------------------------------------------------
 * 8. CACTUS
 *
 * Barrel and beavertail, the same drawings the About page carries. They sit in
 * the corner of a band or a letter card, large, low-opacity, and clipped by the
 * parent's overflow so only part of the plant shows — the way a real one sits
 * at the edge of a photograph rather than in the middle of it.
 * ------------------------------------------------------------------------ */

.bb-story-cactus {
	position: absolute;
	pointer-events: none;
	display: block;
}

.bb-story-cactus svg {
	display: block;
	width: 100%;
	height: auto;
}

.bb-story-band .bb-story-cactus {
	right: -1.25rem;
	bottom: -2rem;
	width: 8.5rem;
	color: var(--wp--preset--color--gold);
	opacity: 0.28;
}

.bb-story-letter .bb-story-cactus {
	right: -0.75rem;
	bottom: -1.5rem;
	width: 7rem;
	color: var(--wp--preset--color--terracotta-text);
	opacity: 0.22;
}

.bb-story-cta .bb-story-cactus {
	right: 0.5rem;
	bottom: -1.75rem;
	width: 8rem;
	color: var(--wp--preset--color--base);
	opacity: 0.16;
}

/* ---------------------------------------------------------------------------
 * 9. LETTER — "in their own words"
 *
 * A sand card tilted a fraction of a degree, so a scholar's own statement reads
 * as a document rather than as more of the article's voice. The children unwind
 * the rotation so the text itself stays level and legible.
 * ------------------------------------------------------------------------ */

.bb-story-letter {
	position: relative;
	overflow: hidden;
	background-color: var(--wp--preset--color--base-alt);
	border-radius: 4px;
	padding: clamp(1.5rem, 4vw, 2.5rem);
	margin-block: 2.5rem;
	box-shadow: 0 3px 14px rgba(42, 42, 36, 0.14);
	transform: rotate(-0.4deg);
	clear: both;
}

.bb-story-letter > * {
	position: relative;
	z-index: 1;
	transform: rotate(0.4deg);
}

.bb-story-letter__label {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terracotta-text);
	margin: 0 0 0.85rem;
}

.bb-post-article.category-scholar-stories .bb-story-letter p {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--wp--preset--color--contrast);
}

.bb-story-letter p:last-child {
	margin-bottom: 0;
}

.bb-story-letter__sig {
	margin-top: 1.25rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(143, 69, 41, 0.25);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--terracotta-text);
}

@media (prefers-reduced-motion: reduce) {
	.bb-story-letter,
	.bb-story-letter > * {
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * 10. THEN AND NOW
 * Two portraits of the same child years apart, with the years set large enough
 * to be read as the point of the picture.
 * ------------------------------------------------------------------------ */

.bb-story-then-now {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 1.25rem;
	align-items: center;
	margin-block: 2.5rem 2.25rem;
	clear: both;
}

.bb-story-then-now__frame {
	position: relative;
	margin: 0;
}

.bb-story-then-now__frame img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 14px;
}

.bb-story-then-now__year {
	position: absolute;
	top: -0.55em;
	left: -0.1em;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.5rem, 6vw, 4rem);
	line-height: 1;
	color: var(--wp--preset--color--terracotta);
	font-variant-numeric: tabular-nums;
}

.bb-story-then-now__arrow {
	display: grid;
	place-items: center;
	color: var(--wp--preset--color--terracotta-text);
}

.bb-story-then-now__arrow svg {
	width: 2rem;
	height: 2rem;
}

/* ---------------------------------------------------------------------------
 * 11. PHOTOGRAPHS
 * ------------------------------------------------------------------------ */


.bb-story-float-right {
	float: right;
	width: 38%;
	margin: 0.35rem 0 1.25rem 1.75rem;
}

.bb-story-float-right img {
	border-radius: 12px;
}

.bb-post-article.category-scholar-stories .bb-story figcaption,
.bb-post-article.category-scholar-stories .wp-element-caption {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: rgba(57, 62, 46, 0.72);
	border-top: 1px solid rgba(57, 62, 46, 0.2);
	padding-top: 0.45rem;
	margin-top: 0.6rem;
	text-align: left;
}

/* ---------------------------------------------------------------------------
 * 11b. CORE ALIGNMENTS INSIDE A STORY
 *
 * Why this section exists. A post body is capped at contentSize and posts.css
 * defines NO rule for alignwide, so a gallery marked `alignwide` in the editor
 * renders at exactly the same width as the paragraph above it — the author
 * asked for width and silently got none. `alignright`/`alignleft` are worse:
 * core floats them with no width, so the float takes its intrinsic size and the
 * text wraps around a shape nobody chose. Both read as "the pictures are
 * misaligned", and both are invisible in the editor, which shows a wide canvas.
 *
 * So the series honors all three, with a stated width contract:
 *   alignwide   reaches the series' own wide measure
 *   alignfull   is CLAMPED to wide, never edge-to-edge — a full-bleed block
 *               inside an article column looks like a layout bug, and if it is
 *               the FIRST block it flips the whole page into composed mode
 *               (see basic_borrego_is_composed)
 *   alignleft/right float at a fixed fraction, and drop the float on phones
 *
 * Staff editing one of these posts in wp-admin get the same result the reader
 * gets, because stories.css is registered with add_editor_style().
 * ------------------------------------------------------------------------ */

@media (min-width: 1180px) {
	.bb-story > .alignwide,
	.bb-story > .alignfull {
		/* The same symmetric breakout .bb-story--wide uses. alignfull is
		   deliberately identical to alignwide: nothing inside an article column
		   goes edge-to-edge, and a full-bleed block here reads as a bug. */
		margin-inline: -170px;
	}
}

.bb-story .alignright {
	float: right;
	width: 38%;
	margin: 0.35rem 0 1.25rem 1.75rem;
}

.bb-story .alignleft {
	float: left;
	width: 38%;
	margin: 0.35rem 1.75rem 1.25rem 0;
}

.bb-story .alignright img,
.bb-story .alignleft img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}

.bb-story .aligncenter {
	margin-inline: auto;
}

/* A gallery that reaches wide needs its own columns; core's gallery flex
   basis assumes the theme sets none. */
.bb-story .wp-block-gallery.alignwide.has-nested-images {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
}

.bb-story .wp-block-gallery.alignwide.columns-3.has-nested-images {
	grid-template-columns: repeat(3, 1fr);
}

.bb-story .wp-block-gallery.has-nested-images .wp-block-image {
	width: 100%;
	margin: 0;
}

.bb-story .wp-block-gallery.has-nested-images .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
}

/* ---------------------------------------------------------------------------
 * 12. SMALL PIECES: icon headings, skill pills, year chips, facts strip
 * ------------------------------------------------------------------------ */

.bb-post-article.category-scholar-stories .bb-story-h {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.bb-story-h .bb-story-icon {
	flex: none;
	width: 1.2em;
	height: 1.2em;
	color: var(--wp--preset--color--terracotta-text);
}

.bb-story-checks {
	list-style: none;
	margin: 1.5rem 0 2rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.bb-story-checks li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.45em 0.95em;
	border-radius: 999px;
	background-color: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--forest);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.bb-story-checks svg {
	width: 1em;
	height: 1em;
	color: var(--wp--preset--color--terracotta-text);
}

.bb-story-years {
	list-style: none;
	margin: 1.75rem 0 2rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr));
	gap: 0.5rem;
}

.bb-story-years li {
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	border-radius: 8px;
	background-color: var(--wp--preset--color--terracotta-text);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.1rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.bb-story-years li a {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.bb-story-years li a:hover,
.bb-story-years li a:focus {
	background-color: var(--wp--preset--color--forest);
	border-radius: 8px;
}

.bb-story-years .is-off {
	background-color: var(--wp--preset--color--base-alt);
	color: rgba(57, 62, 46, 0.45);
}

.bb-story-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 2.5rem;
	border-block: 1px solid rgba(57, 62, 46, 0.22);
	padding: 1.1rem 0;
	margin-block: 2rem;
	clear: both;
}

.bb-story-facts > div {
	flex: 0 1 auto;
}

.bb-story-facts dt {
	margin: 0 0 0.15rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terracotta-text);
}

.bb-story-facts dd {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.0625rem;
	color: var(--wp--preset--color--forest);
}

/* ---------------------------------------------------------------------------
 * 13. CLOSING: the ask, and where to read next
 * ------------------------------------------------------------------------ */

.bb-story-cta {
	position: relative;
	overflow: hidden;
	background-color: var(--wp--preset--color--forest-deep);
	color: var(--wp--preset--color--base);
	border-radius: 10px;
	padding: clamp(2rem, 5vw, 3rem);
	margin-block: 3rem 2rem;
	text-align: center;
	clear: both;
}

.bb-post-article.category-scholar-stories .bb-story-cta h2 {
	margin: 0 0 0.6rem;
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--x-large);
}

.bb-story-cta p {
	position: relative;
	z-index: 1;
	max-width: 36rem;
	margin-inline: auto;
	font-size: var(--wp--preset--font-size--small);
	color: rgba(239, 231, 219, 0.88);
}

.bb-story-cta__actions {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.85rem;
	margin-top: 1.5rem;
}

.bb-story-cta__btn,
.bb-story-cta__ghost {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85em 1.9em;
	border-radius: 5px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.bb-story-cta__btn {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--forest-deep);
}

.bb-story-cta__btn:hover,
.bb-story-cta__btn:focus {
	background-color: var(--wp--preset--color--terracotta-on-dark);
	color: var(--wp--preset--color--forest-deep);
}

.bb-story-cta__ghost {
	border: 1.5px solid rgba(239, 231, 219, 0.6);
	color: var(--wp--preset--color--base);
}

.bb-story-cta__ghost:hover,
.bb-story-cta__ghost:focus {
	border-color: var(--wp--preset--color--base);
	background-color: rgba(239, 231, 219, 0.12);
}


/* ---------------------------------------------------------------------------
 * 14. NARROW SCREENS
 *
 * 700px matches the breakpoint the TK Academy and golf write-ups use, so the
 * series reflows at the same width as the rest of Stories & News.
 * ------------------------------------------------------------------------ */

@media (max-width: 700px) {
	.bb-story-hero,
	.bb-story-hero--type {
		grid-template-columns: 1fr;
	}

	.bb-story-hero__media {
		aspect-ratio: 4 / 5;
	}

	.bb-story-hero--type .bb-story-hero__media {
		aspect-ratio: 1;
	}

	/* Two rows of three. The rail would no longer describe a single line, so
	   it goes: the lit dots still carry the meaning. */
	.bb-story-path {
		grid-template-columns: repeat(3, 1fr);
		row-gap: 1.5rem;
	}

	.bb-story-path::before,
	.bb-story-path .is-lit + .is-lit::before,
	.bb-story-path .is-lit + .is-gold::before,
	.bb-story-path .is-gold + .is-lit::before {
		display: none;
	}

	.bb-story-then-now {
		grid-template-columns: 1fr;
	}

	.bb-story-then-now__arrow {
		transform: rotate(90deg);
	}



	.bb-story-float-right {
		float: none;
		width: 100%;
		margin: 1rem 0;
	}

	.bb-story .alignright,
	.bb-story .alignleft {
		float: none;
		width: 100%;
		margin: 1rem 0;
	}

	.bb-story .wp-block-gallery.alignwide.has-nested-images,
	.bb-story .wp-block-gallery.alignwide.columns-3.has-nested-images {
		grid-template-columns: 1fr 1fr;
	}

	.bb-story-band .bb-story-cactus,
	.bb-story-letter .bb-story-cactus,
	.bb-story-cta .bb-story-cactus {
		display: none;
	}
}
