/*
Theme Name: Your Website Engineer
Theme URI: https://yourwebsiteengineer.com/
Author: Dustin Hartzler
Author URI: https://yourwebsiteengineer.com/
Description: Block theme for Your Website Engineer — a show about building on the web today. Presentation only; episode data lives in the ywe-core plugin.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 8.0
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ywe
Tags: blog, podcast, one-column, block-patterns, full-site-editing
*/

/*
 * Only what theme.json cannot express: a visible focus ring on everything and
 * the minimum button and touch-target heights. Everything else — palette,
 * type, spacing, element styles — lives in theme.json.
 */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--teal);
	outline-offset: 2px;
}

/* Buttons are 48px tall minimum and never below the 44px touch target. */
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
}

/*
 * The secondary button on dark grounds: transparent with an ink-muted border
 * and light text. Paired with the `is-style-outline` button style inside
 * noir and teal sections.
 */
.has-noir-background-color .wp-block-button.is-style-outline > .wp-block-button__link,
.has-teal-background-color .wp-block-button.is-style-outline > .wp-block-button__link {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--ink-muted);
	color: var(--wp--preset--color--surface);
}

.has-noir-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-teal-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--hard-hat);
	color: var(--wp--preset--color--hard-hat);
}

/* Links inside dark sections, where teal would disappear. */
.has-noir-background-color a:where(:not(.wp-element-button)),
.has-teal-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--hard-hat);
}

.has-noir-background-color a:where(:not(.wp-element-button)):hover,
.has-teal-background-color a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--surface);
}

/* -------------------------------------------------------------------------
 * Header
 * ---------------------------------------------------------------------- */

/* The logo lockup: helmet mark, then your_website over engineer. */
.ywe-lockup {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.ywe-lockup__mark {
	flex: none;
}

.ywe-lockup__words {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.ywe-lockup__prefix {
	color: var(--wp--preset--color--ink-muted-dark);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
}

.ywe-lockup__name {
	color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--display);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--display);
}

.ywe-header__row {
	width: 100%;
}

/* Nav links are light, and turn yellow for the section being viewed. */
.ywe-nav .wp-block-navigation-item .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--surface);
	font-weight: 500;
	text-decoration: none;
}

.ywe-nav .wp-block-navigation-item .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.ywe-nav .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--hard-hat);
}

.ywe-nav .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content.wp-block-navigation-item__content {
	font-weight: 600;
}

/*
 * The overlay menu. Core switches to it below 600px; the brand calls for
 * about 782px, so between the two the collapsed state is forced by hand.
 */
@media (min-width: 600px) and (max-width: 781.98px) {
	.ywe-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}

	.ywe-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.ywe-nav .wp-block-navigation__responsive-container.is-menu-open {
		display: flex;
		position: fixed;
		inset: 0;
		z-index: 100000;
		flex-direction: column;
		overflow: auto;
		padding: var(--wp--preset--spacing--50);
	}

	.ywe-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		align-items: flex-start;
		display: flex;
		flex-direction: column;
		padding-top: var(--wp--preset--spacing--50);
	}
}

/* The open/close toggles sit on the navy bar, so they must be light. */
.ywe-nav .wp-block-navigation__responsive-container-open,
.ywe-nav .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--surface);
	min-height: 44px;
	min-width: 44px;
}

/* Subscribe never collapses into the overlay; it stays beside the toggle. */
.ywe-header__subscribe {
	flex: none;
}

.ywe-header__browse a {
	color: var(--wp--preset--color--surface);
	text-decoration: none;
}

.ywe-header__browse a:hover {
	color: var(--wp--preset--color--hard-hat);
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */

.ywe-footer__row {
	width: 100%;
}

.ywe-footer a {
	color: var(--wp--preset--color--surface);
}

.ywe-footer a:hover {
	color: var(--wp--preset--color--hard-hat);
}

/*
 * Inside the overlay the links stack, so the right-justification the desktop
 * bar uses has to be undone at every width the overlay can appear at.
 */
.ywe-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	justify-content: flex-start;
}

.ywe-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation-item__content.wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--heading);
	min-height: 44px;
}

/* -------------------------------------------------------------------------
 * Block styles
 * ---------------------------------------------------------------------- */

.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	line-height: var(--wp--custom--line-height--label);
	text-transform: uppercase;
}

.is-style-pill,
.is-style-pill-accent {
	border-radius: var(--wp--custom--radius--pill);
	display: inline-flex;
	align-items: center;
	/* A pill sizes to its label, including inside a stretching flex column. */
	align-self: flex-start;
	min-height: 36px;
	padding: 4px 16px;
	width: fit-content;
}

.is-style-pill {
	background-color: var(--wp--preset--color--surface-raised);
	color: var(--wp--preset--color--ink);
}

.is-style-pill-accent {
	background-color: var(--wp--preset--color--saffron);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	text-transform: uppercase;
}

/* Pills carrying a link: the whole pill is the target, not the words. */
.is-style-pill a,
.is-style-pill-accent a {
	color: inherit;
	text-decoration: none;
}

.wp-block-group.is-style-card {
	background-color: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
}

/* The small uppercase tag used on resources and products. */
.ywe-tag {
	align-self: flex-start;
	background-color: var(--wp--preset--color--hard-hat);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	padding: 2px 10px;
	text-transform: uppercase;
	width: fit-content;
}

/* The yellow play button that marks anything playable. */
.ywe-play {
	align-items: center;
	background-color: var(--wp--preset--color--hard-hat);
	border-radius: var(--wp--custom--radius--pill);
	display: flex;
	flex: none;
	height: 64px;
	justify-content: center;
	width: 64px;
}

.ywe-play--sm {
	height: 52px;
	width: 52px;
}

/* -------------------------------------------------------------------------
 * Hero, topics, tracks, host, newsletter
 * ---------------------------------------------------------------------- */

/* The yellow marker behind "website engineer" in the hero headline. */
.ywe-highlight {
	background-color: var(--wp--preset--color--hard-hat);
	border-radius: 10px;
	color: var(--wp--preset--color--ink);
	padding: 0 10px;
}

.ywe-topics__row {
	width: 100%;
}

.ywe-topics .is-style-eyebrow {
	margin-right: 8px;
}

/*
 * The mockup lets the three track cards wrap onto a second row at 1440px.
 * The brief asks for them beside the intro in one row, so the intro takes a
 * third of the width and each card takes a fifth, down to a single column on
 * phones.
 */
.ywe-tracks__row {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

.ywe-tracks__intro {
	flex: 1 1 300px;
	min-width: 0;
}

.ywe-track {
	flex: 1 1 200px;
	min-width: 0;
}

.ywe-track a {
	color: inherit;
	text-decoration: none;
}

.ywe-track a:hover {
	text-decoration: underline;
}

.ywe-host__photo {
	background-color: var(--wp--preset--color--teal);
	border-radius: var(--wp--custom--radius--lg);
	display: flex;
	align-items: flex-end;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.ywe-host__photo img {
	border-radius: 0;
	display: block;
	height: auto;
	width: 100%;
}

.ywe-stat {
	border-top: 4px solid var(--wp--preset--color--saffron);
	padding-top: 10px;
}

.ywe-stat__figure {
	font-size: 40px;
	font-weight: 700;
	line-height: 1;
}

/* -------------------------------------------------------------------------
 * Opt-in forms
 *
 * No provider is wired up yet, so every form posts to
 * ywe_optin_form_action(), which is empty until one is chosen.
 * ---------------------------------------------------------------------- */

.ywe-optin-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.ywe-optin-form__label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ywe-optin-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ywe-optin-form__input {
	background-color: var(--wp--preset--color--surface-raised);
	border: 2px solid var(--wp--preset--color--ink-muted-dark);
	border-radius: var(--wp--custom--radius--md);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	font: inherit;
	height: 48px;
	min-width: 0;
	padding: 0 16px;
}

/*
 * Only inside the side-by-side row is the field allowed to grow. In the
 * stacked form the form itself is a flex column, where a flex-basis would
 * be read as a height and stretch the field into a box.
 */
.ywe-optin-form__row .ywe-optin-form__input {
	flex: 1 1 220px;
}

.ywe-optin-form__button {
	background-color: var(--wp--preset--color--hard-hat);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	min-height: 48px;
	padding: 0 24px;
}

.ywe-optin-form--stacked .ywe-optin-form__input,
.ywe-optin-form--stacked .ywe-optin-form__button {
	width: 100%;
}

/* On the yellow card the field border and the button both go navy. */
.ywe-optin-form--on-yellow .ywe-optin-form__input {
	border-color: var(--wp--preset--color--ink);
}

.ywe-optin-form--on-yellow .ywe-optin-form__button {
	background-color: var(--wp--preset--color--noir);
	color: var(--wp--preset--color--surface);
}

.ywe-optin__body {
	flex: 1 1 320px;
	min-width: 0;
}

.ywe-optin__flag {
	align-self: flex-start;
	background-color: var(--wp--preset--color--noir);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--saffron);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	padding: 2px 12px;
	text-transform: uppercase;
	width: fit-content;
}

/* The guide cover: a yellow book standing on the teal opt-in block. */
.ywe-guide-cover {
	aspect-ratio: 3 / 4;
	background-color: var(--wp--preset--color--hard-hat);
	border-left: 6px solid #E0A90A;
	border-radius: 4px 10px 10px 4px;
	box-shadow: 10px 10px 0 var(--wp--preset--color--noir);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	display: flex;
	flex: 0 0 150px;
	flex-direction: column;
	justify-content: space-between;
	padding: 16px 14px;
}

.ywe-guide-cover__flag {
	align-self: flex-start;
	background-color: var(--wp--preset--color--saffron);
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	padding: 1px 8px;
	text-transform: uppercase;
}

.ywe-guide-cover__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 0.95;
}

.ywe-guide-cover__foot {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 9px;
}

.ywe-announce__cta a {
	color: inherit;
}

/* -------------------------------------------------------------------------
 * Cards
 * ---------------------------------------------------------------------- */

.ywe-card,
.ywe-post-card,
.ywe-product {
	background-color: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--lg);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

/*
 * A tool tile holds its text directly, so it stays a block. As a flex
 * column the constrained layout's auto margins would center each short
 * paragraph instead of filling the tile.
 */
.ywe-tool {
	background-color: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 14px;
	height: 100%;
}

.ywe-card__body,
.ywe-post-card__body,
.ywe-product__body {
	flex-grow: 1;
}

.ywe-card .wp-block-post-title a,
.ywe-post-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.ywe-card .wp-block-post-title a:hover,
.ywe-post-card .wp-block-post-title a:hover {
	text-decoration: underline;
}

/*
 * The episode panel. Its colors come from the episode_format term class
 * that get_post_class() puts on the Post Template item, so one card pattern
 * covers all four formats. Classic is the default, since that is what the
 * 555 archive episodes are.
 */
.ywe-card__panel {
	aspect-ratio: 16 / 7;
	background-color: var(--wp--preset--color--surface-mint);
	box-sizing: border-box;
	justify-content: space-between;
	isolation: isolate;
	overflow: hidden;
	position: relative;
}

/*
 * The episode artwork fills the panel, behind the number and the play
 * button. The format color stays underneath, so an episode without
 * artwork still gets its colored panel.
 */
.ywe-card__art {
	inset: 0;
	margin: 0;
	position: absolute;
	z-index: -1;
}

.ywe-card__art img {
	border-radius: 0;
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

/*
 * A scrim, so the number stays legible over artwork of any brightness.
 * It is strongest at the bottom, where the number and play button sit.
 */
.ywe-card__art::after {
	background: linear-gradient(
		to bottom,
		rgb(23 43 54 / 25%) 0%,
		rgb(23 43 54 / 10%) 35%,
		rgb(23 43 54 / 78%) 100%
	);
	content: "";
	inset: 0;
	position: absolute;
}

/* Over artwork the number is always light, whatever the format. */
.ywe-card:has(.ywe-card__art) .ywe-card__number {
	color: var(--wp--preset--color--surface);
	text-shadow: 0 1px 12px rgb(23 43 54 / 55%);
}

/*
 * The >_ kicker marks an empty colored panel. Over artwork it is just
 * clutter, and it collides with artwork that has its own text in the
 * top-left corner.
 */
.ywe-card:has(.ywe-card__art) .ywe-card__kicker {
	visibility: hidden;
}

.ywe-card__kicker,
.ywe-card__number {
	color: var(--wp--preset--color--ink);
}

.ywe-card__number {
	font-size: 56px;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 0.9;
}

.ywe-card__panel-foot {
	width: 100%;
}

.episode_format-talk-to-builders .ywe-card__panel {
	background-color: var(--wp--preset--color--noir);
}

.episode_format-talk-to-builders .ywe-card__kicker,
.episode_format-talk-to-builders .ywe-card__number {
	color: var(--wp--preset--color--hard-hat);
}

.episode_format-build-with-ai .ywe-card__panel {
	background-color: var(--wp--preset--color--hard-hat);
}

.episode_format-automate-the-business .ywe-card__panel {
	background-color: var(--wp--preset--color--teal);
}

.episode_format-automate-the-business .ywe-card__kicker {
	color: var(--wp--preset--color--saffron);
}

.episode_format-automate-the-business .ywe-card__number {
	color: var(--wp--preset--color--saffron);
}

/* The format pill in the card's meta line, colored to match the panel. */
.ywe-card__format {
	background-color: var(--wp--preset--color--surface-mint);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--ink);
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	padding: 0 10px;
	text-transform: uppercase;
}

.ywe-card__format a {
	color: inherit;
	text-decoration: none;
}

.episode_format-talk-to-builders .ywe-card__format {
	background-color: var(--wp--preset--color--noir);
	color: var(--wp--preset--color--surface);
}

.episode_format-build-with-ai .ywe-card__format {
	background-color: var(--wp--preset--color--hard-hat);
}

.episode_format-automate-the-business .ywe-card__format {
	background-color: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--surface);
}

/* An empty duration binding should not leave a gap in the meta line. */
.ywe-card__duration:empty {
	display: none;
}

.ywe-post-card__image img {
	border-radius: 0;
}

.ywe-product__photo {
	align-items: center;
	aspect-ratio: 4 / 3;
	display: flex;
	justify-content: center;
}

.ywe-row__main {
	flex: 999 1 320px;
	min-width: 0;
}

/* Rows stack inside one bordered card, hairline between them. */
.ywe-rows > .ywe-row + .ywe-row {
	border-top: 1px solid #E3EDE9;
}

.ywe-tools__label {
	color: var(--wp--preset--color--ink-muted);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	text-transform: uppercase;
}

.ywe-tools__label::before {
	background-color: var(--wp--preset--color--saffron);
	border-radius: 3px;
	content: "";
	display: inline-block;
	height: 10px;
	margin-right: 10px;
	width: 10px;
}

/* -------------------------------------------------------------------------
 * Featured episode
 * ---------------------------------------------------------------------- */

.ywe-featured {
	overflow: hidden;
}

.ywe-featured__art {
	aspect-ratio: 16 / 9;
	background-color: var(--wp--preset--color--noir);
	flex: 1 1 420px;
	min-width: 0;
	overflow: hidden;
	position: relative;
}

/* The episode's own artwork fills the panel; the badge and play button sit
 * over it. An episode with no featured image leaves the noir panel bare. */
.ywe-featured__img {
	inset: 0;
	margin: 0;
	position: absolute;
}

.ywe-featured__img,
.ywe-featured__img a,
.ywe-featured__art img {
	display: block;
	height: 100%;
	width: 100%;
}

/*
 * Episode artwork is 839x327 (about 2.6:1) and the panel is 16/9, so cover
 * would crop the title off both ends. The fit is set by the block's `scale`
 * attribute in patterns/featured-episode.php, not here: core prints
 * object-fit inline on the img, and an inline style beats this file.
 */

.ywe-featured__art .ywe-play {
	z-index: 1;
}

.ywe-featured__cue {
	display: inline-block;
	text-decoration: none;
}

.ywe-featured__cue:hover {
	text-decoration: underline;
}


/* Bottom right, matching the episode cards, and clear of the artwork's own
 * wordmark in the bottom left corner. */
.ywe-featured__art .ywe-play {
	bottom: 24px;
	position: absolute;
	right: 24px;
}

.ywe-featured__body {
	flex: 1 1 380px;
	min-width: 0;
}

.ywe-featured .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.ywe-featured .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* Card interiors span the card, whatever their own layout type. */
.ywe-card > .wp-block-group,
.ywe-post-card > .wp-block-group,
.ywe-product > .wp-block-group {
	width: 100%;
}

/* -------------------------------------------------------------------------
 * Single episode
 * ---------------------------------------------------------------------- */

.ywe-episode__back a,
.ywe-classic-banner__cta a {
	color: inherit;
	text-decoration: none;
}

.ywe-episode__back a:hover,
.ywe-classic-banner__cta a:hover {
	text-decoration: underline;
}

.ywe-episode__back a {
	color: var(--wp--preset--color--teal);
}

.ywe-episode__badge {
	background-color: var(--wp--preset--color--surface-mint);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--ink);
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	padding: 0 10px;
	text-transform: uppercase;
}

.ywe-episode__duration:empty {
	display: none;
}

/* The original 839 x 327 artwork. */
.ywe-episode__art img {
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--md);
	width: 100%;
}

.ywe-episode__nav {
	width: 100%;
}

.ywe-episode__nav .wp-block-post-navigation-link {
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Episode tabs
 * ---------------------------------------------------------------------- */

.ywe-tabs__list {
	align-self: flex-start;
	background-color: var(--wp--preset--color--surface-mint);
	border-radius: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: var(--wp--preset--spacing--40);
	padding: 4px;
	width: fit-content;
}

.ywe-tabs__tab {
	background: transparent;
	border: 0;
	border-radius: 10px;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	min-height: 44px;
	padding: 0 18px;
}

.ywe-tabs__tab[aria-selected="true"] {
	background-color: var(--wp--preset--color--noir);
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--saffron);
	color: var(--wp--preset--color--surface);
}

.ywe-tabs__panel {
	font-size: var(--wp--preset--font-size--reading);
	line-height: var(--wp--custom--line-height--reading);
}

.ywe-tabs__panel[hidden] {
	display: none;
}

.ywe-tabs__panel:focus-visible {
	outline: 2px solid var(--wp--preset--color--teal);
	outline-offset: 4px;
}

/* -------------------------------------------------------------------------
 * Chapters and transcript
 * ---------------------------------------------------------------------- */

.ywe-chapters {
	display: flex;
	flex-direction: column;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ywe-chapter {
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	display: flex;
	gap: 16px;
	padding: 10px 0;
}

.ywe-chapter__time {
	color: var(--wp--preset--color--ink-muted);
	flex: none;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	padding-top: 3px;
	width: 64px;
}

.ywe-transcript__bar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: var(--wp--preset--spacing--30);
}

.ywe-transcript__search {
	background-color: var(--wp--preset--color--surface-raised);
	border: 2px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--md);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	flex: 1 1 240px;
	font: inherit;
	font-size: var(--wp--preset--font-size--body);
	min-height: 48px;
	min-width: 0;
	padding: 0 16px;
}

.ywe-transcript__download {
	align-items: center;
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	font-size: 15px;
	font-weight: 600;
	min-height: 48px;
	padding: 0 18px;
	text-decoration: none;
}

.ywe-transcript__count {
	color: var(--wp--preset--color--ink-muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
}

.ywe-transcript__count:empty {
	display: none;
}

.ywe-transcript__p[hidden] {
	display: none;
}

/* -------------------------------------------------------------------------
 * Ninja Forms
 *
 * The contact form ships unstyled against a block theme, so give its fields
 * the same treatment as the opt-in form's.
 * ---------------------------------------------------------------------- */

.nf-form-cont input[type="text"],
.nf-form-cont input[type="email"],
.nf-form-cont input[type="tel"],
.nf-form-cont input[type="url"],
.nf-form-cont input[type="number"],
.nf-form-cont select,
.nf-form-cont textarea {
	background-color: var(--wp--preset--color--surface-raised);
	border: 2px solid var(--wp--preset--color--ink-muted-dark);
	border-radius: var(--wp--custom--radius--md);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	font: inherit;
	padding: 12px 16px;
	width: 100%;
}

.nf-form-cont input[type="text"],
.nf-form-cont input[type="email"],
.nf-form-cont input[type="tel"],
.nf-form-cont input[type="url"],
.nf-form-cont input[type="number"],
.nf-form-cont select {
	height: 48px;
	padding-block: 0;
}

.nf-form-cont textarea {
	line-height: 1.6;
	min-height: 160px;
	resize: vertical;
}

.nf-form-cont .nf-field-label label {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 6px;
}

.nf-form-cont .nf-field-container {
	margin-bottom: 20px;
}

/* Radio and checkbox rows read as lists, not stacked form fields. */
.nf-form-cont .nf-field-element ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nf-form-cont .list-radio-wrap li,
.nf-form-cont .list-checkbox-wrap li {
	align-items: center;
	display: flex;
	gap: 8px;
	margin-bottom: 6px;
}

.nf-form-cont .list-radio-wrap li label,
.nf-form-cont .list-checkbox-wrap li label {
	font-weight: 400;
	margin: 0;
}

.nf-form-cont input[type="button"],
.nf-form-cont input[type="submit"],
.nf-form-cont button[type="submit"] {
	background-color: var(--wp--preset--color--hard-hat);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	min-height: 48px;
	padding: 0 28px;
	width: auto;
}

.nf-form-cont input[type="button"]:hover,
.nf-form-cont input[type="submit"]:hover {
	background-color: var(--wp--preset--color--saffron);
}

.nf-form-cont .nf-error-msg,
.nf-form-cont .ninja-forms-req-symbol {
	color: var(--wp--preset--color--error);
}

.nf-form-cont .nf-error .nf-field-element input,
.nf-form-cont .nf-error .nf-field-element textarea {
	border-color: var(--wp--preset--color--error);
}

/* -------------------------------------------------------------------------
 * Contact page
 * ---------------------------------------------------------------------- */

.ywe-contact__offer-cta a,
.ywe-contact__aside .wp-block-heading {
	text-decoration: none;
}

.ywe-contact__offer-cta a {
	color: inherit;
}

.ywe-contact__offer-cta a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Relaunch notice
 *
 * Temporary bar above the header. Remove the pattern from parts/header.html
 * and these rules go unused.
 * ---------------------------------------------------------------------- */

.ywe-notice__row {
	justify-content: center;
}

.ywe-notice__label {
	font-size: 12px;
	white-space: nowrap;
}

.ywe-notice__text {
	margin: 0;
}

.ywe-notice__text a {
	color: var(--wp--preset--color--hard-hat);
	font-weight: 600;
	text-underline-offset: 3px;
}

.ywe-notice__text a:hover {
	color: var(--wp--preset--color--surface);
}

@media (max-width: 600px) {
	.ywe-notice__row {
		justify-content: flex-start;
	}
}

/* -------------------------------------------------------------------------
 * Player
 * ---------------------------------------------------------------------- */

.ywe-player {
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
}

.ywe-player iframe {
	border: 0;
	display: block;
	width: 100%;
}

/* -------------------------------------------------------------------------
 * Single episode: the video layout
 * ---------------------------------------------------------------------- */

.ywe-episode__hero-row,
.ywe-episode__body-row {
	width: 100%;
}

/* The media column takes the room; the meta column holds at about a third. */
.ywe-episode__media,
.ywe-episode__main {
	flex: 999 1 620px;
	min-width: 0;
}

.ywe-episode__aside,
.ywe-episode__sidebar {
	flex: 1 1 320px;
	min-width: 0;
}

.ywe-video,
.ywe-episode__media .ywe-player,
.ywe-episode__main .ywe-player {
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
}

/* The player now sits above the tabs, in the reading column. Pull the tabs
 * a little closer so the player reads as part of them, not a loose block. */
.ywe-episode__main .ywe-player {
	margin-block-end: -4px;
}

.ywe-video iframe {
	aspect-ratio: 16 / 9;
	border: 0;
	display: block;
	height: auto;
	width: 100%;
}

.ywe-listen {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ywe-listen__link {
	align-items: center;
	border: 2px solid var(--wp--preset--color--ink-muted);
	border-radius: var(--wp--custom--radius--md);
	box-sizing: border-box;
	color: var(--wp--preset--color--surface);
	display: inline-flex;
	font-size: 15px;
	font-weight: 500;
	min-height: 44px;
	padding: 0 16px;
	text-decoration: none;
}

.ywe-listen__link:hover {
	border-color: var(--wp--preset--color--hard-hat);
	color: var(--wp--preset--color--hard-hat);
}

.ywe-episode__avatar img {
	border-radius: var(--wp--custom--radius--pill);
	height: 44px;
	object-fit: cover;
	object-position: 50% 15%;
	width: 44px;
}

/* Episode tags: the first one accented, the rest quiet, per the brand rule
   that saffron is one highlighted tag per group. */
.ywe-episode__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ywe-episode__tags a {
	background-color: #2A4552;
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--surface);
	padding: 4px 12px;
	text-decoration: none;
}

.ywe-episode__tags a:first-of-type {
	background-color: var(--wp--preset--color--saffron);
	color: var(--wp--preset--color--ink);
}

/* post-terms separates terms with a comma; the pills do that job. */
.ywe-episode__tags .wp-block-post-terms__separator {
	display: none;
}

/* -------------------------------------------------------------------------
 * Episode sidebar
 * ---------------------------------------------------------------------- */

.ywe-tools-list {
	background-color: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--lg);
	padding: 20px;
}

.ywe-tools-list__label {
	color: var(--wp--preset--color--ink-muted);
	margin: 0 0 12px;
}

.ywe-tools-list__items {
	display: flex;
	flex-direction: column;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ywe-tools-list__item a {
	font-weight: 500;
	text-decoration: none;
}

.ywe-tools-list__item a:hover {
	text-decoration: underline;
}

.ywe-gear-card a {
	color: inherit;
	text-decoration: none;
}

.ywe-gear-card a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Episode archive
 * ---------------------------------------------------------------------- */

.ywe-archive__hero-row {
	width: 100%;
}

.ywe-archive__intro {
	flex: 1 1 460px;
	max-width: 680px;
	min-width: 0;
}

.ywe-archive__search .wp-block-search__input {
	background-color: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--ink-muted);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	font-size: 17px;
	min-height: 52px;
	padding: 0 18px;
}

.ywe-archive__search .wp-block-search__button {
	background-color: var(--wp--preset--color--hard-hat);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	min-height: 52px;
	padding: 0 24px;
}

/* The filter bar sticks under the hero as the grid scrolls. */
.ywe-filters {
	position: sticky;
	top: 0;
	z-index: 1;
}

.admin-bar .ywe-filters {
	top: 32px;
}

.ywe-filters__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ywe-filter {
	align-items: center;
	background-color: var(--wp--preset--color--surface-raised);
	border: 2px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	font-size: 15px;
	font-weight: 600;
	min-height: 44px;
	padding: 0 18px;
	text-decoration: none;
}

.ywe-filter:hover {
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink);
}

.ywe-filter--current {
	background-color: var(--wp--preset--color--noir);
	border-color: var(--wp--preset--color--noir);
	color: var(--wp--preset--color--surface);
}

.ywe-filter--current:hover {
	color: var(--wp--preset--color--hard-hat);
}

.ywe-archive__heading {
	width: 100%;
}

.ywe-pagination {
	margin-top: var(--wp--preset--spacing--50);
}

/* -------------------------------------------------------------------------
 * Single post
 * ---------------------------------------------------------------------- */

.ywe-post__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ywe-post__tags a {
	background-color: var(--wp--preset--color--surface-mint);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--ink);
	font-weight: 500;
	padding: 4px 12px;
	text-decoration: none;
}

/* Saffron marks one tag per group, per the brand rule. */
.ywe-post__tags a:first-of-type {
	background-color: var(--wp--preset--color--saffron);
}

.ywe-post__tags .wp-block-post-terms__separator {
	display: none;
}

.ywe-post__avatar img {
	border-radius: var(--wp--custom--radius--pill);
	height: 44px;
	object-fit: cover;
	object-position: 50% 15%;
	width: 44px;
}

.ywe-post__image img {
	border-radius: var(--wp--custom--radius--lg);
	width: 100%;
}

/*
 * wrap-reverse so the contents list sits above the article on phones,
 * where a sidebar after 2,000 words would never be seen.
 */
.ywe-post__row {
	flex-wrap: wrap-reverse;
	width: 100%;
}

.ywe-post__main {
	flex: 999 1 560px;
	min-width: 0;
}

.ywe-post__sidebar {
	align-self: flex-start;
	flex: 1 1 220px;
	min-width: 0;
	position: sticky;
	top: var(--wp--preset--spacing--40);
}

.ywe-post__main .wp-block-post-content {
	font-size: var(--wp--preset--font-size--reading);
	line-height: var(--wp--custom--line-height--reading);
}

.ywe-post__nav {
	width: 100%;
}

.ywe-post__nav .wp-block-post-navigation-link {
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * On this page, related episode
 * ---------------------------------------------------------------------- */

.ywe-toc {
	background-color: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--lg);
	display: flex;
	flex-direction: column;
	font-size: 15px;
	gap: 10px;
	padding: 20px;
}

.ywe-toc__label,
.ywe-related__label {
	color: var(--wp--preset--color--ink-muted);
	font-size: 12px;
	margin: 0;
}

.ywe-toc__link {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.ywe-toc__link:hover {
	text-decoration: underline;
}

.ywe-related {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 20px;
}

.ywe-related__link {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

.ywe-related__link:hover {
	text-decoration: underline;
}

/* The reading column's own furniture. */
.ywe-post__main :where(h2) {
	margin-top: var(--wp--preset--spacing--30);
}

/*
 * Inline code and code blocks, wherever prose appears: the reading column
 * of a post, and an episode's show notes and transcript panels.
 */
:is(.wp-block-post-content, .ywe-post__main, .ywe-tabs__panel) :where(code):not(.wp-block-code code) {
	background-color: var(--wp--preset--color--surface-mint);
	border-radius: var(--wp--custom--radius--sm);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 15px;
	padding: 2px 6px;
}

/*
 * Every code block, wherever it appears — a post, a page, or an episode's
 * show notes. The label is positioned against it, so it needs to be a
 * positioning context everywhere, not only inside a reading column.
 */
.wp-block-code {
	background-color: var(--wp--preset--color--noir);
	color: var(--wp--preset--color--surface);
	overflow-x: auto;
	position: relative;
}

/*
 * The language label on a code block. The text comes from ywe-core, which
 * reads the is-lang-* class, so any value an author typed can be shown
 * without a CSS rule per language.
 */
.ywe-code-lang {
	color: var(--wp--preset--color--ink-muted-dark);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	position: absolute;
	right: 16px;
	text-transform: uppercase;
	top: 12px;
	user-select: none;
}

/* Keep the first line clear of the label. */
.wp-block-code:has(.ywe-code-lang) code {
	display: block;
	padding-right: 72px;
}

/* -------------------------------------------------------------------------
 * Blog index
 * ---------------------------------------------------------------------- */

.ywe-featured-post {
	background-color: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--hairline);
	overflow: hidden;
}

.ywe-featured-post__image {
	flex: 1 1 520px;
	margin: 0;
	min-width: 0;
}

.ywe-featured-post__image img {
	border-radius: 0;
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ywe-featured-post__body {
	display: flex;
	flex: 1 1 360px;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.ywe-featured-post .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.ywe-featured-post .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Topic chips
 * ---------------------------------------------------------------------- */

.ywe-chips__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
}

.ywe-chips__label {
	color: var(--wp--preset--color--ink-muted);
	margin: 0 0 12px;
}

.ywe-chip {
	align-items: center;
	background-color: var(--wp--preset--color--surface-raised);
	border-radius: var(--wp--custom--radius--pill);
	box-sizing: border-box;
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	font-weight: 600;
	min-height: 44px;
	padding: 0 18px;
	text-decoration: none;
}

.ywe-chip:hover {
	color: var(--wp--preset--color--ink);
	outline: 2px solid var(--wp--preset--color--ink);
}

.ywe-chip--accent {
	background-color: var(--wp--preset--color--saffron);
}

.ywe-chip--current {
	background-color: var(--wp--preset--color--noir);
	color: var(--wp--preset--color--surface);
}

.ywe-chips--related {
	border-top: 1px solid var(--wp--preset--color--hairline);
	padding-top: var(--wp--preset--spacing--50);
}

/* -------------------------------------------------------------------------
 * Topic archive header
 * ---------------------------------------------------------------------- */

.ywe-topic {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 760px;
}

.ywe-topic__eyebrow {
	color: var(--wp--preset--color--saffron);
	margin: 0;
}

.ywe-topic__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--display);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.02;
	margin: 0;
}

.ywe-topic__hash {
	color: var(--wp--preset--color--hard-hat);
	margin-right: 4px;
}

.ywe-topic__description {
	color: var(--wp--preset--color--hairline);
	font-size: 18px;
}

.ywe-topic__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-muted-dark);
}

.ywe-topic__stat strong {
	color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--display);
	font-size: 24px;
	margin-right: 4px;
}

/* -------------------------------------------------------------------------
 * 404
 * ---------------------------------------------------------------------- */

.ywe-404__row {
	width: 100%;
}

.ywe-404__mark {
	align-items: center;
	display: flex;
	flex: 0 1 300px;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.ywe-404__code {
	color: var(--wp--preset--color--hard-hat);
	font-family: var(--wp--preset--font-family--display);
	font-size: 96px;
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
	margin: 0;
}

.ywe-404__body {
	flex: 1 1 440px;
	min-width: 0;
}

.ywe-terminal {
	background-color: #0E1C24;
	border: 1px solid #2A4552;
	border-radius: var(--wp--custom--radius--md);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 15px;
	line-height: 1.7;
	padding: 16px 20px;
}

.ywe-terminal p {
	margin: 0;
}

.ywe-terminal__cmd {
	color: var(--wp--preset--color--ink-muted-dark);
	overflow-wrap: anywhere;
}

.ywe-terminal__err {
	color: var(--wp--preset--color--saffron);
}

.ywe-terminal__prompt {
	color: var(--wp--preset--color--surface);
}

.ywe-terminal__caret {
	background-color: var(--wp--preset--color--hard-hat);
	display: inline-block;
	height: 18px;
	vertical-align: -3px;
	width: 10px;
}

.ywe-404__search .wp-block-search__input {
	background-color: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--ink-muted);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	min-height: 52px;
	padding: 0 16px;
}

.ywe-404__search .wp-block-search__button {
	background-color: var(--wp--preset--color--hard-hat);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	font-weight: 700;
	min-height: 52px;
	padding: 0 24px;
}

.ywe-404__links p {
	margin: 0;
}

.ywe-404__links a {
	align-items: center;
	border: 2px solid var(--wp--preset--color--ink-muted);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--surface);
	display: inline-flex;
	min-height: 44px;
	padding: 0 16px;
	text-decoration: none;
}

.ywe-404__links a:hover {
	border-color: var(--wp--preset--color--hard-hat);
	color: var(--wp--preset--color--hard-hat);
}

/* -------------------------------------------------------------------------
 * Search
 * ---------------------------------------------------------------------- */

.ywe-search__heading {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ywe-search__grep {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 15px;
	margin: 0;
	overflow-wrap: anywhere;
}

.ywe-search__prompt {
	color: var(--wp--preset--color--ink-muted-dark);
}

.ywe-search__term {
	color: var(--wp--preset--color--hard-hat);
}

.ywe-search__path {
	color: var(--wp--preset--color--ink-muted-dark);
}

.ywe-search__summary {
	font-family: var(--wp--preset--font-family--display);
	font-size: 40px;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.1;
	margin: 0;
}

.ywe-search__field .wp-block-search__input {
	background-color: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--ink-muted);
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	font-size: 17px;
	min-height: 52px;
	padding: 0 18px;
}

.ywe-search__field .wp-block-search__button {
	background-color: var(--wp--preset--color--hard-hat);
	border: 0;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	min-height: 52px;
	padding: 0 24px;
}

.ywe-filter__count {
	color: var(--wp--preset--color--ink-muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	margin-left: 6px;
}

.ywe-filter--current .ywe-filter__count {
	color: var(--wp--preset--color--ink-muted-dark);
}

.ywe-search__empty {
	max-width: 760px;
}

/* -------------------------------------------------------------------------
 * /now/ and Resources
 * ---------------------------------------------------------------------- */

.ywe-updated {
	align-self: flex-start;
	background-color: var(--wp--preset--color--saffron);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	padding: 6px 14px;
	width: fit-content;
}

.ywe-now__cd {
	margin: 0;
}

/* The sticky section bar on long pages, from the page's own h2s. */
.ywe-toc--horizontal {
	background: none;
	border: 0;
	border-radius: 0;
	flex-direction: row;
	overflow-x: auto;
	padding: 0;
}

.ywe-toc--horizontal .ywe-toc__link {
	align-items: center;
	background-color: var(--wp--preset--color--surface-raised);
	border: 2px solid transparent;
	border-radius: var(--wp--custom--radius--pill);
	display: inline-flex;
	font-size: 15px;
	font-weight: 600;
	min-height: 44px;
	padding: 0 18px;
	white-space: nowrap;
}

.ywe-toc--horizontal .ywe-toc__link:hover {
	border-color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.ywe-toc__links {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Declared after the generic rule above, which would otherwise win. */
.ywe-toc--horizontal .ywe-toc__links {
	flex-direction: row;
	gap: 8px;
}

.ywe-resources__bar {
	position: sticky;
	top: 0;
	z-index: 1;
}

.admin-bar .ywe-resources__bar {
	top: 32px;
}

.ywe-disclosure .ywe-tag {
	display: inline-flex;
	vertical-align: baseline;
}

/* An empty section bar would just be a mint stripe, so hide it. */
.ywe-resources__bar:not(:has(.ywe-toc__link)) {
	display: none;
}

/*
 * Classic episode: the 839px article column with a right rail beside it.
 * The rail drops under the article below about 1060px, where 839 + 260
 * plus the gap no longer fit.
 */
.ywe-episode__row {
	width: 100%;
}

/*
 * The top of the page and the article column share the same 839px width
 * and the same left edge, so the artwork, player and show notes line up
 * even though only the lower half has a rail beside it.
 */
.ywe-episode__top {
	margin-inline-end: auto;
	margin-inline-start: 0;
	max-width: 839px;
}

.ywe-episode__column {
	flex: 999 1 620px;
	min-width: 0;
}

.ywe-episode__rail {
	align-self: flex-start;
	flex: 1 1 260px;
	min-width: 0;
	position: sticky;
	top: var(--wp--preset--spacing--40);
}

.admin-bar .ywe-episode__rail {
	top: calc(32px + var(--wp--preset--spacing--40));
}

/* The "Focused on" card at the top of the /now/ page. */
.ywe-focus__grid {
	width: 100%;
}

/* Resources: the yellow "start here" card and the product grid. */
.ywe-featured-resource__body {
	flex: 999 1 420px;
	min-width: 0;
}

.ywe-product-grid,
.ywe-rows {
	width: 100%;
}

.ywe-rows {
	background-color: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
}

.ywe-product__cta .wp-block-button__link {
	border-width: 2px;
}

/*
 * The header, main and footer are siblings in .wp-site-blocks, so the root
 * block gap pushed a 24px band of page background between them. Sections
 * inside main keep their own spacing; these three sit flush, as drawn.
 */
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* -------------------------------------------------------------------------
 * Landing page
 * ---------------------------------------------------------------------- */

/* The guide cover, shown large in the landing hero. */
.ywe-guide-cover--lg {
	aspect-ratio: 3 / 4;
	border-left-width: 10px;
	border-radius: 6px 16px 16px 6px;
	box-shadow: 18px 18px 0 var(--wp--preset--color--teal);
	flex: none;
	gap: 12px;
	padding: 32px 28px;
	width: min(300px, 80vw);
}

.ywe-guide-cover--lg .ywe-guide-cover__flag {
	font-size: 12px;
	padding: 3px 12px;
}

.ywe-guide-cover--lg .ywe-guide-cover__title {
	font-size: 44px;
	letter-spacing: -0.035em;
}

.ywe-guide-cover--lg .ywe-guide-cover__foot {
	font-size: 13px;
	font-weight: 500;
}

.ywe-guide-cover__by {
	align-items: center;
	display: flex;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 500;
	gap: 10px;
}

.ywe-landing__hero-media {
	display: flex;
	flex: 0 1 360px;
	justify-content: center;
	min-width: 0;
}

.ywe-landing__hero-copy {
	flex: 1 1 480px;
	min-width: 0;
}

/* The two-field form. */
.ywe-optin-form--full {
	gap: 10px;
	max-width: 520px;
}

.ywe-optin-form__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ywe-optin-form__field {
	display: flex;
	flex: 1 1 180px;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	min-width: 0;
}

.ywe-optin-form__button--wide {
	width: 100%;
}

.ywe-optin-form__note {
	color: var(--wp--preset--color--ink-muted-dark);
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

/* The numbered "what's inside" list. */
.ywe-parts {
	counter-reset: ywe-part;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.ywe-part {
	border-top: 1px solid var(--wp--preset--color--hairline);
	display: flex;
	gap: 20px;
	padding: 20px 0;
}

.ywe-part__num {
	color: var(--wp--preset--color--saffron);
	flex: none;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	padding-top: 4px;
	width: 32px;
}

.ywe-checks {
	display: flex;
	flex-direction: column;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ywe-check {
	border-left: 3px solid var(--wp--preset--color--hard-hat);
	padding-left: 16px;
}

/* The honeypot: present for bots, never shown to a person. */
.ywe-optin-form__trap {
	left: -9999px;
	position: absolute;
}

.ywe-optin-notice {
	border-radius: var(--wp--custom--radius--md);
	font-weight: 600;
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 12px 16px;
}

.ywe-optin-notice--ok {
	background-color: var(--wp--preset--color--success);
	color: var(--wp--preset--color--surface);
}

.ywe-optin-notice--bad {
	background-color: var(--wp--preset--color--error);
	color: var(--wp--preset--color--surface);
}
