/*
Theme Name: Omorphos
Theme URI:
Author: Omorphos
Description: Clean, minimal marketing theme for educational language-learning ebooks.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: omorphos
Tags: custom-menu, featured-images, footer-widgets, custom-colors
*/

/* =========================================================
   CSS Custom Properties
   ========================================================= */

:root {
	/* Color palette — the neutral ramp (bg, border, stone tiers, muted text)
	   is aligned to the brand's own grey scale (Off-white/Stone-100/Stone-400/Stone-600),
	   not the invented Tailwind-"stone" values this theme originally shipped
	   with — see the 2026-08-13 visual-drift pass below.
	   stone-3 (#D6D3CF) had no equivalent step in the brand ramp between
	   Stone-100 and Stone-400 — collapsed into Stone-100 rather than
	   inventing an in-between value locally; this loses one border-weight
	   tier (input borders, dividers, the reading-progress dot all get
	   slightly lighter). Revisit if a Stone-200 is ever added to the brand
	   token set. */
	--color-bg:          #F7F5F2; /* was #FAFAF9 — brand Off-white */
	--color-surface:     #FFFFFF;
	--color-border:      #E2DDD6; /* was #E7E4DF — brand Stone-100 */
	--color-text:        #1C1917;
	--color-text-strong: #3A3530; /* brand Stone-800 — no prior equivalent existed */
	--color-muted:       #6B6259; /* was #78716C — brand Stone-600 */
	--color-stone-400:     #9A9189; /* was #A8A29E — brand Stone-400 */
	--color-stone-3:     var(--color-border); /* alias, not its own value — was a literal #E2DDD6
	   duplicate of --color-border (both Stone-100), which meant the two could silently drift
	   apart if one was ever repointed and the other wasn't. Existing --color-stone-3 call
	   sites are unchanged (a var() alias resolves the same as a literal), but new code should
	   reach for --color-border directly. */
	/* --color-accent/-dark/-light (navy, #2d5a8e family) RETIRED
	   2026-08-14 — was doing four unrelated jobs (eyebrows, breadcrumb
	   links, language chips, availability dates), which is why nothing on
	   the page read as a signal. Every former usage was individually
	   reassigned to one of: --color-muted (eyebrows/status/generic UI
	   chrome — the default for anything not named below), --color-coffee
	   (real links), --color-terracotta-ink (availability/commerce
	   messaging), or the chip pairing (--color-stone-50/--color-text-strong).
	   Kept as dead code briefly during the reassignment; do not reintroduce. */
	--color-stone-50:    #F0EDE8; /* brand Stone-50 — light neutral tint, e.g. chip backgrounds, selected-state fills */
	--color-accent-new:   var(--color-terracotta-ink); /* alias, not its own value — was a
	   literal #b84f00, a third undocumented rust hex doing the exact job --color-terracotta-ink
	   (declared below) already exists for: preorder/availability commerce signaling (book card
	   preorder overlay/badge, single-book preorder purchase label + CTA, upcoming-row preorder/
	   new badges). Left-over experimental name/value, never consolidated onto the terracotta
	   reservation rule stated just below. Existing --color-accent-new call sites are unchanged
	   (a var() alias resolves the same as a literal) and now correctly track the one canonical
	   commerce color instead of a rogue third value that could drift from it. New code should
	   reach for --color-terracotta-ink directly. */
	/* Terracotta is reserved for commerce ONLY as of 2026-08-14 — CTA/
	   preorder buttons and availability messaging, full stop (the
	   Recommendations "Ours" flag was considered for this role and
	   explicitly decided against — it's Ink-on-Stone-50, not terracotta,
	   see that block's own CSS). It no longer appears on links, rules,
	   borders, chart bars, or hover states of any kind — that was the
	   previous (now superseded) design. `-ink` is the solid-fill pairing
	   for anything with white text on top (CTA button backgrounds); plain
	   `--color-terracotta` is for the no-white-text cases. */
	--color-terracotta:     #D85A30;
	--color-terracotta-ink: #B24A26;
	/* Coffee — the ONE interactive color left on the site. Every link,
	   site-wide, uses this and nothing else (never terracotta, never the
	   old navy). See the sitewide `a` rule below. */
	--color-coffee:      #4A3B31;
	--color-coffee-hover: #392E26; /* CTA filled-button hover */
	--color-coffee-press: #302620; /* CTA filled-button active */
	--color-stone-4:     #C9C2B8;  /* light button pressed-state on Ink */
	--color-surface-alt: #F3F0EB;  /* was a bare literal on the recommendations "ours" card fill — named now that a second component needs it */
	/* Supporting palette (2026-08-14) — teal/ochre/olive, per the
	   omorphos-visual skill. Exists so components can differ from each
	   other (Note's variants, chart series) WITHOUT reaching for terracotta,
	   which stays commerce-only. Each has one job — see the skill for the
	   full "why," including why an all-neutral page isn't a substitute for
	   this (three Note variants that were all white boxes, a chart with no
	   encoding left). Olive is deliberately unused for now — reserved for a
	   third series/aside type, not to be spent decoratively. Never use teal
	   or olive to mean "correct"/"better" — identity only, not a verdict. */
	--color-teal:      #00806B;
	--color-teal-tint: #E2EDEA;
	--color-teal-ink:  #1A5F52;
	--color-ochre:      #A8781A;
	--color-ochre-tint: #F5EEDC;
	--color-ochre-ink:  #7A5A12;
	/* The level dial (planner-509; plugins/omorphos-assessment/docs/CLAUDE-level-dial.md): zone fills and 4px zone bars, the window border
	   and the inactive level letters. Stronger than the shared tints above, which are 1.2:1 against the window; measured in the doc. Literal
	   values in every block (inheritance would carry a resolved value into a .scheme-light subtree). The light growth bar is #946714, not
	   the ochre #A8781A: that is 2.90:1 against its own fill. */
	--dial-comfort-fill: #C9E3DB;
	--dial-growth-fill:  #EBDDB5;
	--dial-comfort-bar:  #00806B;
	--dial-growth-bar:   #946714;
	--dial-edge:         #8A8279;
	--dial-letter:       #3A3530;
	--color-olive:      #5F821E; /* reserved — not yet used anywhere */
	--color-olive-tint: #EAEEDF;
	--color-olive-ink:  #4A5A20;

	/* Typography */
	--font-serif:     'Lora', Georgia, serif;
	--font-sans:      'DM Sans', system-ui, sans-serif;
	--font-size-xs:   0.75rem;
	--font-size-sm:   0.875rem;
	--font-size-base: 1rem;
	--font-size-lg:   1.125rem;
	--font-size-xl:   1.25rem;
	--font-size-2xl:  1.5rem;
	--font-size-3xl:  2rem;
	--font-size-4xl:  2.75rem;

	/* Spacing */
	--space-1:  0.25rem;
	--space-2:  0.5rem;
	--space-3:  0.75rem;
	--space-4:  1rem;
	--space-6:  1.5rem;
	--space-8:  2rem;
	--space-10: 2.5rem;
	--space-12: 3rem;
	--space-16: 4rem;
	--space-24: 6rem;

	/* Layout */
	--container-width:   1200px;
	--container-padding: 1.25rem;
	--border-radius:     6px;
	--border-radius-md:  8px;
	--border-radius-lg:  12px;

	/* Transitions */
	--transition: 150ms ease;


	/* cefr badge colors — emitted from omorphos_cefr_registry() (omorphos-books
	   inc/cefr-registry.php) on wp_head so CSS and the cover badge share one
	   source. Fallbacks kept here in case the plugin is inactive. */
	--color-cefr-a1: #1D2E87;
	--color-cefr-a2: #146171;
	--color-cefr-b1: #1C6E45;
	--color-cefr-b2: #8B7418;
	--color-cefr-c1: #865213;
	--color-cefr-c2: #772237;

	/* Shared section-variant tokens */
	--color-ink:        var(--color-text);  /* was a literal #1C1917 duplicate despite its own
	   comment already claiming to be an alias — now actually one. Explicit name for
	   dark-bg variants. */
	--color-off-white:  var(--color-bg);  /* alias, not its own value — was a literal #F7F5F2
	   duplicate of --color-bg (identical, not "slightly warmer" as the old comment claimed);
	   used by variant-b. Existing call sites unchanged; new code should reach for
	   --color-bg directly. */
	--color-amber:      #BF7833;  /* honey-caramel; used by variant-c */
	--color-dark-brown: #3A1A07;  /* dark chocolate brown; used by variant-e */
	--color-natural:    #EDD5BF;  /* warm nude/natural; used by variant-f */

	/* Sitewide .btn--primary tokens (see that rule below) — read by the
	   generic .btn--primary class used well beyond any one block (e.g.
	   .single-book__buy-btn--preorder's own override). Deliberately
	   converged to the CTA block's own Coffee-filled default (2026-08-14,
	   direct ask — "I am tied in with the CTA block ones ... update the
	   sitewide generics to mimic") — previously Ink, kept as a separate
	   system from --cta-fill-bg on purpose; that reasoning is superseded
	   now that .btn is meant to visually match .call-to-action__button-
	   primary. Reuses the same --color-coffee-hover/-press tokens the CTA
	   block itself reads, rather than a second hardcoded hex copy. */
	--btn-primary-bg:         var(--color-coffee);
	--btn-primary-hover-bg:   var(--color-coffee-hover);
	--btn-primary-active-bg:  var(--color-coffee-press);

	/* CTA block button tokens — :root fallback, same reasoning as
	   --btn-primary-bg above. .call-to-action__button-primary/-secondary/
	   -text read these via var(), but the block that normally supplies
	   them (.gt-call-to-action-block, call-to-action.css) isn't always
	   present in the DOM around them — 404.php renders these same button
	   classes standalone (inc/theme-setup.php's own comment on why it
	   enqueues call-to-action.css unconditionally there), with no wrapper
	   at all. Without a :root default, an unresolved var() falls back to
	   each property's CSS-wide default (background: transparent, etc.),
	   silently making those buttons invisible. Values match
	   .gt-call-to-action-block's own defaults exactly — this is a floor,
	   not a second source of truth; change the block's own tokens and
	   update this to match if the block's defaults ever move. */
	--cta-fill-bg:            var(--color-coffee);
	--cta-fill-fg:            var(--color-on-coffee);
	--cta-fill-bg-hover:      var(--color-coffee-hover);
	--cta-fill-bg-active:     var(--color-coffee-press);
	--cta-outline-fg:         var(--color-ink);
	--cta-outline-bd:         var(--color-ink);
	--cta-outline-bg-hover:   var(--color-ink);
	--cta-outline-fg-hover:   var(--color-surface);
	--cta-link-fg:            var(--color-coffee);
	--cta-link-rule:          var(--color-link-rule);
	--cta-focus:              var(--color-coffee);

	/* Roles added for light and dark (planner-494, docs/CLAUDE-theming.md). */
	--color-on-coffee:        #FFFFFF; /* text or icon on a --color-coffee fill (a primary button): white in light, near-black in dark */
	--color-on-coffee-rgb:    255 255 255; /* the same color as a triplet, for rgb(var(--color-on-coffee-rgb) / .75) */
	--btn-primary-fg:         var(--color-on-coffee); /* text on .btn--primary; a rule that repaints --btn-primary-bg with terracotta sets this to white too */
	--ctl-border:             #8A8279; /* boundary of a form field or the theme toggle: 3:1 against the page and cards in both modes
	   (--color-border is the decorative divider and is not enough for a control) */
	--color-page:             #FFFFFF; /* the page ground (body). --color-bg is the card ground that sits on it, --color-surface the raised layer above that */
	--color-link-rule:        rgba(74, 59, 49, 0.35); /* the faint underline under a link (text-decoration-color) */
	--color-scrim:            rgba(28, 25, 23, 0.55); /* the dimmer behind a modal */
	--color-search-mask: rgba(60, 45, 35, 0.74); /* the layer over the blurred page behind the search overlay (planner-538) */
	--color-search-on-mask: #FFFFFF; /* text and the focus ring directly on that mask */
	--logo-filter:            none; /* the header and footer logo is a black SVG in an <img>, which cannot use currentColor: in dark it is inverted to near-white */
	--lang-icon-tone:         initial; /* a language icon is a mask filled with the language's own stored hex (--lang-icon-recolor, set per term, a dark ink). Unset here, so that hex wins in light; the dark blocks set it to the text tone so the icon stays visible on a dark ground */
	--color-disabled-text:    #9A9189; /* an option that cannot be chosen (a zero-result filter): in light the same stone as before; dark values sit close to the page ground, since a disabled control is exempt from contrast and should recede */
	--color-disabled-fill:    #9A9189;
	--color-disabled-on:      #FFFFFF;
	--color-card-edge:         #E2DDD6; /* the outline of a contained card or callout (translation excerpt, note, tips): the same stone as --color-border in light; in dark a step lighter, since --color-border is only 1.35:1 against the page */
	--color-callout:           #F7F5F2; /* the tint of a callout (tips): the card ground in light; in dark one step above it, since the card ground is 1.04:1 against the page */
	--color-callout-edge:      transparent; /* the outline of a callout: none in light, as before */
	--color-text-soft:         #6B6259; /* secondary running text (a translation under its original): the muted stone in light; in dark lighter than --color-muted, which reads dim next to body text */
	/* A CEFR hue used as TEXT on the page or a card: the hue itself in light (it follows the registry's color), a lighter tone of it in dark. */
	--color-cefr-a1-text: var(--color-cefr-a1);
	--color-cefr-a2-text: var(--color-cefr-a2);
	--color-cefr-b1-text: var(--color-cefr-b1);
	--color-cefr-b2-text: #826C15; /* #8B7418 (the hue) is 4.19:1 as text on a card ground; this tone is 4.7:1 and the chips keep the hue */
	--color-cefr-c1-text: var(--color-cefr-c1);
	--color-cefr-c2-text: var(--color-cefr-c2);
	--color-info-ink:         #0E5C7D; /* the cool-blue link (find your level) */
	--color-commerce-text:    #B24A26; /* terracotta used as TEXT (availability and preorder messaging). The terracotta FILLS (--color-terracotta, -ink) keep their value in both modes; as text on a dark page they would be 3.4:1 */
	/* Never change with the mode: colored section bands (variants A, C, E, F) and the cookie sheet keep their own colors. */
	--fixed-ink:              #1C1917;
	--fixed-white:            #FFFFFF;
	--fixed-coffee-press:     #302620;
	--band-a-bg:              #1C1917; /* variant A, the Ink band: the one band that has a dark counterpart (a touch lighter, so it still reads on a dark page) */
	--band-b-bg:              #F7F5F2; /* variant B, the off-white band: the page ground in dark, so a full-width band is not a second brown */
	--fixed-bg:               #F7F5F2; /* the light tones band A's text and buttons are drawn in: the same in both modes */
	--fixed-border:           #E2DDD6;
	--fixed-stone-400:        #9A9189;
	--fixed-stone-4:          #C9C2B8;
	/* Status colors: text on the page or a card (error, success) and ink-on-tint pairs. */
	--color-error:            #B32D2E;
	--color-success:          #2D6A4F;
	--color-danger-ink:       #8C1D17;
	--color-danger-tint:      #F5E7E5;
	--color-success-ink:      #065F46;
	--color-success-tint:     #D1FAE5;
	--color-warn-ink:         #8B5E12;
	--color-warn-tint:        #FEF3E2;
	--color-warn-icon:        #B45309;
	/* Badge pairs (.badge--*): tint background with an ink that is at least 4.5:1 on it. */
	--badge-series-bg:        #EEF4ED;  --badge-series-fg:        #2D6A4F;
	--badge-level-bg:         #F3EEF9;  --badge-level-fg:         #6A3D9A;
	--badge-new-bg:           #FFF0E0;  --badge-new-fg:           #B84F00;
	--badge-unpub-bg:         #F1F5F9;  --badge-unpub-fg:         #5E6E84;  --badge-unpub-border: #94A3B8;
	--badge-cat-method-bg:    #E3EEF0;  --badge-cat-method-fg:    #146171;
	--badge-cat-deep-bg:      #F7F5F2;  --badge-cat-deep-fg:      #57534E;
	--badge-cat-inside-bg:    #E8E4DE;  --badge-cat-inside-fg:    #57534E;
	--badge-cat-guides-bg:    #EFE9DC;  --badge-cat-guides-fg:    #865213;
	--badge-cat-educators-bg: #E7E4E4;  --badge-cat-educators-fg: #57534E;
	--badge-cat-news-bg:      #DDE3E8;  --badge-cat-news-fg:      #2D5A8E;

}

/* =========================================================
   Light and dark (planner-494) — docs/CLAUDE-theming.md
   Nothing below does anything unless <html> carries data-modes="on", which the theme prints only while
   omorphos_theme_modes_enabled() is true (inc/theme-modes.php). Light is the :root block above, unchanged.
   Dark is the same role names with dark values, in two places that must stay identical (tests/theme-modes.php
   fails if they differ): a stored choice (data-theme="dark", set by the head script from localStorage
   'omorphos-theme') and the device setting when nothing is stored. Roles only here; colors that are still
   literals elsewhere in this file move onto roles in the later planner-494 steps.
   Not changed on purpose: the terracotta pair (commerce fills keep white text and read against a dark page at 3.4:1)
   and the CEFR hues (white text on them is 4.6 to 11.7:1 in both modes).
   ========================================================= */
:root[data-modes="on"]                       { color-scheme: light dark; }
:root[data-modes="on"][data-theme="light"]   { color-scheme: light; }

:root[data-modes="on"][data-theme="dark"] {
	color-scheme: dark;
	--color-page:          #171512;
	--color-bg:            #1c1917;
	--color-surface:       #22201e;
	--color-surface-alt:   #262321;
	--color-border:        #332e27;
	--color-text:          #ece7e0;
	--color-text-strong:   #d4cec6;
	--color-muted:         #a39c93;
	--color-stone-400:     #958d84;
	--color-stone-50:      #2a2623;
	--color-coffee:        #c99872;
	--color-coffee-hover:  #b7865f;
	--color-coffee-press:  #a5764f;
	--color-on-coffee:     #171512;
	--color-on-coffee-rgb: 23 21 18;
	--color-link-rule:     rgba(201, 152, 114, 0.35);
	--color-scrim:         rgba(0, 0, 0, 0.6);
	--color-search-mask: rgba(12, 10, 9, 0.8); /* the layer over the blurred page behind the search overlay (planner-538) */
	--color-search-on-mask: #E8E2DB; /* text and the focus ring directly on that mask */
	--logo-filter:         invert(1) brightness(0.93);
	--lang-icon-tone:      #ece7e0;
	--color-disabled-text: #6b645c;
	--color-disabled-fill: #2e2a25;
	--color-disabled-on:   #857d73;
	--color-card-edge:     #47413a;
	--color-callout:       #262321;
	--color-callout-edge:  #47413a;
	--color-text-soft:     #c2bbb2;
	--color-commerce-text: #e8825a;
	--color-info-ink:      #6fc1e3;
	--color-cefr-a1-text: #7486e1;
	--color-cefr-a2-text: #3cc1dc;
	--color-cefr-b1-text: #48d08c;
	--color-cefr-b2-text: #ddbd3b;
	--color-cefr-c1-text: #e29436;
	--color-cefr-c2-text: #d46883;
	--ctl-border:          #7d756b;
	--band-a-bg:           #262321;
	--band-b-bg:           #171512;
	--color-teal:          #4fbfa6;
	--color-teal-tint:     #16302a;
	--color-teal-ink:      #7fd4c0;
	--color-ochre:         #e0b559;
	--color-ochre-tint:    #362b15;
	--color-ochre-ink:     #e8c777;
	--dial-comfort-fill:   #1d4b40;
	--dial-growth-fill:    #4a3a16;
	--dial-comfort-bar:    #4fbfa6;
	--dial-growth-bar:     #e0b559;
	--dial-edge:           #7d756b;
	--dial-letter:         #d4cec6;
	--color-olive:         #9bb85a;
	--color-olive-tint:    #232a14;
	--color-olive-ink:     #b8cf80;
	--color-error:         #f08a82;
	--color-success:       #7bd0a6;
	--color-danger-ink:    #f2a49c;
	--color-danger-tint:   #3a1f1c;
	--color-success-ink:   #86e0b0;
	--color-success-tint:  #14301f;
	--color-warn-ink:      #e8c777;
	--color-warn-tint:     #362b15;
	--color-warn-icon:     #f0b36d;
	--badge-series-bg:     #1b3c2d;  --badge-series-fg:     #9bd4bb;
	--badge-level-bg:      #2b1b3c;  --badge-level-fg:      #b799d6;
	--badge-new-bg:        #3c291b;  --badge-new-fg:        #e4b18b;
	--badge-unpub-bg:      #242a32;  --badge-unpub-fg:      #acb6c3;  --badge-unpub-border: #4e5e74;
	--badge-cat-method-bg: #1b363c;  --badge-cat-method-fg: #8bd5e4;
	--badge-cat-deep-bg:   #2e2c29;  --badge-cat-deep-fg:   #bbb8b4;
	--badge-cat-inside-bg: #2e2c29;  --badge-cat-inside-fg: #bbb8b4;
	--badge-cat-guides-bg: #3c2d1b;  --badge-cat-guides-fg: #e4bc8b;
	--badge-cat-educators-bg: #2e2c29;  --badge-cat-educators-fg: #bbb8b4;
	--badge-cat-news-bg:   #1b2a3c;  --badge-cat-news-fg:   #93b5dd;
}

@media (prefers-color-scheme: dark) {
	:root[data-modes="on"]:not([data-theme]) {
		color-scheme: dark;
		--color-page:          #171512;
		--color-bg:            #1c1917;
		--color-surface:       #22201e;
		--color-surface-alt:   #262321;
		--color-border:        #332e27;
		--color-text:          #ece7e0;
		--color-text-strong:   #d4cec6;
		--color-muted:         #a39c93;
		--color-stone-400:     #958d84;
		--color-stone-50:      #2a2623;
		--color-coffee:        #c99872;
		--color-coffee-hover:  #b7865f;
		--color-coffee-press:  #a5764f;
		--color-on-coffee:     #171512;
		--color-on-coffee-rgb: 23 21 18;
		--color-link-rule:     rgba(201, 152, 114, 0.35);
		--color-scrim:         rgba(0, 0, 0, 0.6);
		--color-search-mask: rgba(12, 10, 9, 0.8); /* the layer over the blurred page behind the search overlay (planner-538) */
		--color-search-on-mask: #E8E2DB; /* text and the focus ring directly on that mask */
		--logo-filter:         invert(1) brightness(0.93);
		--lang-icon-tone:      #ece7e0;
		--color-disabled-text: #6b645c;
		--color-disabled-fill: #2e2a25;
		--color-disabled-on:   #857d73;
		--color-card-edge:     #47413a;
		--color-callout:       #262321;
		--color-callout-edge:  #47413a;
		--color-text-soft:     #c2bbb2;
		--color-commerce-text: #e8825a;
		--color-info-ink:      #6fc1e3;
		--color-cefr-a1-text: #7486e1;
		--color-cefr-a2-text: #3cc1dc;
		--color-cefr-b1-text: #48d08c;
		--color-cefr-b2-text: #ddbd3b;
		--color-cefr-c1-text: #e29436;
		--color-cefr-c2-text: #d46883;
		--ctl-border:          #7d756b;
		--band-a-bg:           #262321;
		--band-b-bg:           #171512;
		--color-teal:          #4fbfa6;
		--color-teal-tint:     #16302a;
		--color-teal-ink:      #7fd4c0;
		--color-ochre:         #e0b559;
		--color-ochre-tint:    #362b15;
		--color-ochre-ink:     #e8c777;
		--dial-comfort-fill:   #1d4b40;
		--dial-growth-fill:    #4a3a16;
		--dial-comfort-bar:    #4fbfa6;
		--dial-growth-bar:     #e0b559;
		--dial-edge:           #7d756b;
		--dial-letter:         #d4cec6;
		--color-olive:         #9bb85a;
		--color-olive-tint:    #232a14;
		--color-olive-ink:     #b8cf80;
		--color-error:         #f08a82;
		--color-success:       #7bd0a6;
		--color-danger-ink:    #f2a49c;
		--color-danger-tint:   #3a1f1c;
		--color-success-ink:   #86e0b0;
		--color-success-tint:  #14301f;
		--color-warn-ink:      #e8c777;
		--color-warn-tint:     #362b15;
		--color-warn-icon:     #f0b36d;
		--badge-series-bg:     #1b3c2d;  --badge-series-fg:     #9bd4bb;
		--badge-level-bg:      #2b1b3c;  --badge-level-fg:      #b799d6;
		--badge-new-bg:        #3c291b;  --badge-new-fg:        #e4b18b;
		--badge-unpub-bg:      #242a32;  --badge-unpub-fg:      #acb6c3;  --badge-unpub-border: #4e5e74;
		--badge-cat-method-bg: #1b363c;  --badge-cat-method-fg: #8bd5e4;
		--badge-cat-deep-bg:   #2e2c29;  --badge-cat-deep-fg:   #bbb8b4;
		--badge-cat-inside-bg: #2e2c29;  --badge-cat-inside-fg: #bbb8b4;
		--badge-cat-guides-bg: #3c2d1b;  --badge-cat-guides-fg: #e4bc8b;
		--badge-cat-educators-bg: #2e2c29;  --badge-cat-educators-fg: #bbb8b4;
		--badge-cat-news-bg:   #1b2a3c;  --badge-cat-news-fg:   #93b5dd;
	}
}

/* A subtree that keeps the LIGHT roles in every mode: a book shown on screen (the Reader Demo's stage) is a light object on a dark
   page, and its own light/dark/e-ink buttons choose among the BOOK's modes, not the site's. Inheritance carries a resolved value, so
   the aliases that point at a role (--color-ink, --btn-primary-*, --cta-*) are redeclared here too. tests/theme-modes.php fails if a
   role changes in :root and not here. Generated from :root; edit :root and copy. */
.scheme-light,
.reader-demo__stage {
	color-scheme: light;
	--color-page: #FFFFFF;
	--color-bg: #F7F5F2;
	--color-surface: #FFFFFF;
	--color-surface-alt: #F3F0EB;
	--color-border: #E2DDD6;
	--color-text: #1C1917;
	--color-text-strong: #3A3530;
	--color-muted: #6B6259;
	--color-stone-400: #9A9189;
	--color-stone-50: #F0EDE8;
	--color-coffee: #4A3B31;
	--color-coffee-hover: #392E26;
	--color-coffee-press: #302620;
	--color-on-coffee: #FFFFFF;
	--color-on-coffee-rgb: 255 255 255;
	--color-link-rule: rgba(74, 59, 49, 0.35);
	--color-scrim: rgba(28, 25, 23, 0.55);
	--color-search-mask: rgba(60, 45, 35, 0.74); /* the layer over the blurred page behind the search overlay (planner-538) */
	--color-search-on-mask: #FFFFFF; /* text and the focus ring directly on that mask */
	--logo-filter: none;
	--lang-icon-tone: initial;
	--color-disabled-text: #9A9189;
	--color-disabled-fill: #9A9189;
	--color-disabled-on: #FFFFFF;
	--color-card-edge: #E2DDD6;
	--color-callout: #F7F5F2;
	--color-callout-edge: transparent;
	--color-text-soft: #6B6259;
	--color-commerce-text: #B24A26;
	--color-info-ink: #0E5C7D;
	--color-cefr-a1-text: var(--color-cefr-a1);
	--color-cefr-a2-text: var(--color-cefr-a2);
	--color-cefr-b1-text: var(--color-cefr-b1);
	--color-cefr-b2-text: #826C15;
	--color-cefr-c1-text: var(--color-cefr-c1);
	--color-cefr-c2-text: var(--color-cefr-c2);
	--ctl-border: #8A8279;
	--band-a-bg: #1C1917;
	--band-b-bg: #F7F5F2;
	--color-teal: #00806B;
	--color-teal-tint: #E2EDEA;
	--color-teal-ink: #1A5F52;
	--color-ochre: #A8781A;
	--color-ochre-tint: #F5EEDC;
	--color-ochre-ink: #7A5A12;
	--dial-comfort-fill: #C9E3DB;
	--dial-growth-fill: #EBDDB5;
	--dial-comfort-bar: #00806B;
	--dial-growth-bar: #946714;
	--dial-edge: #8A8279;
	--dial-letter: #3A3530;
	--color-olive: #5F821E;
	--color-olive-tint: #EAEEDF;
	--color-olive-ink: #4A5A20;
	--color-error: #B32D2E;
	--color-success: #2D6A4F;
	--color-danger-ink: #8C1D17;
	--color-danger-tint: #F5E7E5;
	--color-success-ink: #065F46;
	--color-success-tint: #D1FAE5;
	--color-warn-ink: #8B5E12;
	--color-warn-tint: #FEF3E2;
	--color-warn-icon: #B45309;
	--badge-series-bg: #EEF4ED;
	--badge-series-fg: #2D6A4F;
	--badge-level-bg: #F3EEF9;
	--badge-level-fg: #6A3D9A;
	--badge-new-bg: #FFF0E0;
	--badge-new-fg: #B84F00;
	--badge-unpub-bg: #F1F5F9;
	--badge-unpub-fg: #5E6E84;
	--badge-unpub-border: #94A3B8;
	--badge-cat-method-bg: #E3EEF0;
	--badge-cat-method-fg: #146171;
	--badge-cat-deep-bg: #F7F5F2;
	--badge-cat-deep-fg: #57534E;
	--badge-cat-inside-bg: #E8E4DE;
	--badge-cat-inside-fg: #57534E;
	--badge-cat-guides-bg: #EFE9DC;
	--badge-cat-guides-fg: #865213;
	--badge-cat-educators-bg: #E7E4E4;
	--badge-cat-educators-fg: #57534E;
	--badge-cat-news-bg: #DDE3E8;
	--badge-cat-news-fg: #2D5A8E;
	--color-stone-3: var(--color-border);
	--color-accent-new: var(--color-terracotta-ink);
	--color-ink: var(--color-text);
	--color-off-white: var(--color-bg);
	--btn-primary-bg: var(--color-coffee);
	--btn-primary-hover-bg: var(--color-coffee-hover);
	--btn-primary-active-bg: var(--color-coffee-press);
	--cta-fill-bg: var(--color-coffee);
	--cta-fill-fg: var(--color-on-coffee);
	--cta-fill-bg-hover: var(--color-coffee-hover);
	--cta-fill-bg-active: var(--color-coffee-press);
	--cta-outline-fg: var(--color-ink);
	--cta-outline-bd: var(--color-ink);
	--cta-outline-bg-hover: var(--color-ink);
	--cta-outline-fg-hover: var(--color-surface);
	--cta-link-fg: var(--color-coffee);
	--cta-link-rule: var(--color-link-rule);
	--cta-focus: var(--color-coffee);
	--btn-primary-fg: var(--color-on-coffee);
}

/* Print is always light: a dark page prints light text on white paper otherwise. The same light values as the scope above (generated from
   :root with it), applied in print to both ways a page can be dark: a stored choice, and the device with nothing stored. Same specificity as
   the dark blocks and later in the file, so it wins. tests/theme-modes.php keeps it equal to the scope. */
@media print {
	:root[data-modes="on"][data-theme="dark"],
	:root[data-modes="on"]:not([data-theme]) {
		color-scheme: light;
		--color-page: #FFFFFF;
		--color-bg: #F7F5F2;
		--color-surface: #FFFFFF;
		--color-surface-alt: #F3F0EB;
		--color-border: #E2DDD6;
		--color-text: #1C1917;
		--color-text-strong: #3A3530;
		--color-muted: #6B6259;
		--color-stone-400: #9A9189;
		--color-stone-50: #F0EDE8;
		--color-coffee: #4A3B31;
		--color-coffee-hover: #392E26;
		--color-coffee-press: #302620;
		--color-on-coffee: #FFFFFF;
		--color-on-coffee-rgb: 255 255 255;
		--color-link-rule: rgba(74, 59, 49, 0.35);
		--color-scrim: rgba(28, 25, 23, 0.55);
		--color-search-mask: rgba(60, 45, 35, 0.74); /* the layer over the blurred page behind the search overlay (planner-538) */
		--color-search-on-mask: #FFFFFF; /* text and the focus ring directly on that mask */
		--logo-filter: none;
		--lang-icon-tone: initial;
		--color-disabled-text: #9A9189;
		--color-disabled-fill: #9A9189;
		--color-disabled-on: #FFFFFF;
		--color-card-edge: #E2DDD6;
		--color-callout: #F7F5F2;
		--color-callout-edge: transparent;
		--color-text-soft: #6B6259;
		--color-commerce-text: #B24A26;
		--color-info-ink: #0E5C7D;
		--color-cefr-a1-text: var(--color-cefr-a1);
		--color-cefr-a2-text: var(--color-cefr-a2);
		--color-cefr-b1-text: var(--color-cefr-b1);
		--color-cefr-b2-text: #826C15;
		--color-cefr-c1-text: var(--color-cefr-c1);
		--color-cefr-c2-text: var(--color-cefr-c2);
		--ctl-border: #8A8279;
		--band-a-bg: #1C1917;
		--band-b-bg: #F7F5F2;
		--color-teal: #00806B;
		--color-teal-tint: #E2EDEA;
		--color-teal-ink: #1A5F52;
		--color-ochre: #A8781A;
		--color-ochre-tint: #F5EEDC;
		--color-ochre-ink: #7A5A12;
		--dial-comfort-fill: #C9E3DB;
		--dial-growth-fill: #EBDDB5;
		--dial-comfort-bar: #00806B;
		--dial-growth-bar: #946714;
		--dial-edge: #8A8279;
		--dial-letter: #3A3530;
		--color-olive: #5F821E;
		--color-olive-tint: #EAEEDF;
		--color-olive-ink: #4A5A20;
		--color-error: #B32D2E;
		--color-success: #2D6A4F;
		--color-danger-ink: #8C1D17;
		--color-danger-tint: #F5E7E5;
		--color-success-ink: #065F46;
		--color-success-tint: #D1FAE5;
		--color-warn-ink: #8B5E12;
		--color-warn-tint: #FEF3E2;
		--color-warn-icon: #B45309;
		--badge-series-bg: #EEF4ED;
		--badge-series-fg: #2D6A4F;
		--badge-level-bg: #F3EEF9;
		--badge-level-fg: #6A3D9A;
		--badge-new-bg: #FFF0E0;
		--badge-new-fg: #B84F00;
		--badge-unpub-bg: #F1F5F9;
		--badge-unpub-fg: #5E6E84;
		--badge-unpub-border: #94A3B8;
		--badge-cat-method-bg: #E3EEF0;
		--badge-cat-method-fg: #146171;
		--badge-cat-deep-bg: #F7F5F2;
		--badge-cat-deep-fg: #57534E;
		--badge-cat-inside-bg: #E8E4DE;
		--badge-cat-inside-fg: #57534E;
		--badge-cat-guides-bg: #EFE9DC;
		--badge-cat-guides-fg: #865213;
		--badge-cat-educators-bg: #E7E4E4;
		--badge-cat-educators-fg: #57534E;
		--badge-cat-news-bg: #DDE3E8;
		--badge-cat-news-fg: #2D5A8E;
		--color-stone-3: var(--color-border);
		--color-accent-new: var(--color-terracotta-ink);
		--color-ink: var(--color-text);
		--color-off-white: var(--color-bg);
		--btn-primary-bg: var(--color-coffee);
		--btn-primary-hover-bg: var(--color-coffee-hover);
		--btn-primary-active-bg: var(--color-coffee-press);
		--cta-fill-bg: var(--color-coffee);
		--cta-fill-fg: var(--color-on-coffee);
		--cta-fill-bg-hover: var(--color-coffee-hover);
		--cta-fill-bg-active: var(--color-coffee-press);
		--cta-outline-fg: var(--color-ink);
		--cta-outline-bd: var(--color-ink);
		--cta-outline-bg-hover: var(--color-ink);
		--cta-outline-fg-hover: var(--color-surface);
		--cta-link-fg: var(--color-coffee);
		--cta-link-rule: var(--color-link-rule);
		--cta-focus: var(--color-coffee);
		--btn-primary-fg: var(--color-on-coffee);
	}
}

/* =========================================================
   Reset & Base
   ========================================================= */

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	/* Literal #FFFFFF, not var(--color-bg) — --color-bg (#F7F5F2) is the
	   fill several card components (.series-card, .book-card, .lang-books,
	   .lang-chip active/hover) use to read as a distinct surface against
	   the page. Painting the page itself with the same token made those
	   cards invisible — a card and its own background can't share one
	   value. --color-bg stays #F7F5F2 and keeps doing card duty; only the
	   page ground changes. */
	background-color: var(--color-page);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: var(--font-size-base);
	line-height: 1.65;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Sitewide default link treatment (2026-08-14, supersedes two earlier
   versions of this rule — see git history): Coffee text, Coffee underline.
   Coffee is the ONE interactive color on the site — never terracotta
   (reserved for commerce: CTA/preorder/availability only) and never the
   old navy (retired entirely). Underline is translucent at rest, solid on
   hover — text color itself never changes on hover/focus. Any
   component-level `a` rule with its own `color` still overrides this one
   normally (cascade); see the many component-specific link fixes
   elsewhere in this file for the ones that needed updating to match. */
a {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

a:hover {
	text-decoration-color: var(--color-coffee);
}

a:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}

/* Every site button gets the same Coffee focus ring as a link, not the browser's default blue one (the success
   views focus their Close button, which is where it showed). Light ring on the dark CTA bands. */
.btn:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}
.variant-a .btn:focus-visible,
.variant-e .btn:focus-visible {
	outline-color: var(--color-surface);
}

h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	line-height: 1.25;
	font-family: var(--font-serif);
	font-weight: 700;
}

/* Base heading scale — h2 matches .section__title's size exactly (both
   2xl here, both bump to 3xl at 640px below) so a plain h2.wp-block-heading
   anywhere (not just inside .entry-content, which previously had its own
   scoped override) reads as the same visual weight as the site's styled
   section headers. h1/h3-h6 scale proportionally off that same anchor. */
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
	margin-top: 0;
	margin-bottom: var(--space-4);
}

ul, ol {
	padding-left: var(--space-6);
	margin-bottom: var(--space-4);
}

/* =========================================================
   Block gap — set via theme.json styles.spacing.blockGap (2rem).
   WordPress applies this as margin-block-start on all blocks.
   Use adjacent sibling CSS to adjust specific transitions.
   ========================================================= */

/* =========================================================
   Layout Utilities
   ========================================================= */

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

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute;
	white-space: nowrap;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* The skip link, once focused: the site's primary-button look (Coffee fill,
   on-coffee text) instead of WordPress core's grey chip, with the same Coffee
   ring as every other link. `a.` outranks core's own .screen-reader-text:focus
   whichever stylesheet prints last. Hidden until focused, so it never shows to
   a mouse visitor. */
a.screen-reader-text:focus {
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	overflow: visible;
	z-index: 100000;
	background: var(--color-coffee);
	color: var(--color-on-coffee);
	border-radius: 6px;
	box-shadow: none;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1;
	padding: 12px 18px;
	left: 12px;
	top: 12px;
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}

/* Prevent any section from widening the page and hiding the container's right padding */
.site-main {
	overflow-x: clip;
}

/* =========================================================
   Site Header
   ========================================================= */

.site-header {
	/* --color-surface (white), not --color-bg (page background) — matches
	   .site-footer's own convention below. Was --color-bg before, which
	   read as "white enough" while that token was #FAFAF9 (close to
	   #FFFFFF); the 2026-08-13 visual-drift pass moved --color-bg to the
	   more visibly warm brand Off-white (#F7F5F2), which exposed this as a
	   real, pre-existing mismatch — the header lost its distinction from
	   the page background it sits on top of. */
	background: var(--color-page);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Admin bar — mobile bar is 46px tall */
.admin-bar .site-header {
	top: 46px;
}

.site-header__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-3);
	padding-block: var(--space-4);
}

/* Wraps branding + the mobile menu toggle as their own row, so that row
   stays exactly one line regardless of whether .main-navigation (below,
   in DOM order) is rendered inline (≥640px) or as a collapsed overlay
   panel (<640px) — see the max-width:639.98px block further down. */
.site-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* width:100% intentionally NOT set here — it belongs only in the
	   max-width:639.98px block below. Unscoped, it also applies once
	   .site-header__inner becomes a flex ROW at >=640px (shared with
	   .main-navigation), where it forced this element to claim the
	   entire row's width and squeezed .main-navigation down to almost
	   nothing — the actual cause of nav links wrapping mid-word on wide
	   viewports. */
	/* No background/position/z-index needed here — .mobile-nav-backdrop
	   is a SIBLING of <header>, not a descendant (see header.php's own
	   comment), so the header's single opaque background + higher
	   stacking (position:sticky, z-index:100 above) already occludes the
	   backdrop as one whole unit. An earlier version tried patching
	   background/z-index onto this element and .main-navigation
	   individually instead, which left gaps (this element's own padding,
	   the flex gap between it and .main-navigation) where the backdrop's
	   dim tint still showed through — fixed at the real root instead of
	   patched per piece. */
}

/* The <div class="container"> that wraps .site-header__inner (see
   header.php) becomes the containing block for .main-navigation's
   position:absolute mobile overlay (below) — the panel's left/right
   edges line up with the container's own padding box, the same inset
   every other section on the page uses, rather than spanning edge-to-edge
   against the full-bleed <header>. Scoped to this one instance of
   .container (a class used sitewide) via the .site-header ancestor, not
   changed globally. */
.site-header .container {
	position: relative;
}

/* In-page anchors (planner-286): the header is sticky, so a jump to a heading's
   #id would land it underneath. Offset every linkable heading by the header's
   height plus a little air. scroll-margin-top on the heading, not
   scroll-padding-top on <html>: WordPress's admin-bar.min.css already owns
   html { scroll-padding-top } (and loads after the theme), and the two offsets
   add, so a logged-in editor gets admin bar + header + gap, a reader just
   header + gap. --site-header-height is the one value to change if the header's
   height does; measured 69px under 640px and 71px from 640px up. */
:root {
	--site-header-height: 69px;
}

@media (min-width: 640px) {
	:root {
		--site-header-height: 71px;
	}
}

:is(h1, h2, h3, h4, h5, h6)[id] {
	scroll-margin-top: calc(var(--site-header-height) + 1.5rem);
}

/* Hamburger / × toggle — mobile only, hidden again in the ≥640px block
   below where nav already renders inline with its own inline search
   reveal (unchanged). Bars morph to an × via the [aria-expanded]
   attribute JS already sets, no separate toggled class needed. */
.menu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--color-text);
	cursor: pointer;
}
.menu-toggle:hover {
	background: var(--color-stone-50);
}
.menu-toggle__bar {
	transform-box: fill-box;
	transform-origin: center;
	transition: transform 180ms ease, opacity 140ms ease;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar--1 {
	transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar--2 {
	opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar--3 {
	transform: translateY(-6px) rotate(-45deg);
}

/* Dims + blurs the page below the header while the mobile menu is open —
   same rgba/blur treatment as .assessment-overlay and the other modal
   overlays sitewide, for visual consistency. A SIBLING of <header> in the
   DOM (see header.php's own comment), not a child of it: position:fixed
   is viewport-relative regardless of DOM nesting either way, but living
   outside .site-header means the header's own single opaque background +
   higher stacking (position:sticky, z-index:100 above) occludes this
   backdrop as one whole unit — header and everything inside it, including
   the open .main-navigation overlay panel — with no per-piece z-index/
   background patching needed on the header's own internal pieces.
   Faded via opacity/visibility (not a hard display:none/block swap) so it
   transitions smoothly instead of snapping in/out. */
.mobile-nav-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(28, 25, 23, 0.32);
	backdrop-filter: blur(2px);
	z-index: 90;
	visibility: hidden;
	opacity: 0;
	transition: opacity var(--transition), visibility 0s linear var(--transition);
}

.site-header.is-nav-open ~ .mobile-nav-backdrop {
	visibility: visible;
	opacity: 1;
	transition: opacity var(--transition);
}

/* Body-scroll lock while the mobile menu is open (assets/js/mobile-nav.js
   toggles this on <html>) — otherwise the dimmed page behind the overlay
   panel can still be scrolled underneath it. */
html.has-mobile-nav-open {
	overflow: hidden;
}

.site-branding a {
	text-decoration: none;
	color: var(--color-text);
}
.site-branding .custom-logo-link img {
	max-height: 2rem;
	width: auto;
	height: auto;
}
/* Header and footer logo: a black SVG in an <img>, so light and dark is a filter (--logo-filter, none in light). */
.custom-logo {
	filter: var(--logo-filter);
}

.site-title {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	font-weight: 700;
	margin: 0;
	letter-spacing: -0.01em;
}

.site-tagline {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0;
}

/* =========================================================
   Navigation
   ========================================================= */

.main-navigation {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--space-3);
	width: 100%;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

.main-navigation a {
	font-size: var(--font-size-sm);
	font-weight: 500;
	color: var(--color-text);
	text-decoration: none;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Nav is not in-content prose — no resting underline (base rule above
   already correctly has text-decoration:none, unchanged). Hover gets an
   underline + Coffee (not terracotta — terracotta is commerce-only as of
   2026-08-14), same "appears only on interaction" rule as everywhere
   else, but text color never shifts. */
.main-navigation a:hover {
	color: var(--color-text);
	text-decoration: underline;
	text-decoration-color: var(--color-coffee);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* Below 640px, .main-navigation stops being a normal-flow row and becomes
   a collapsed overlay panel anchored below .site-header .container (its
   nearest positioned ancestor, set above) — its left/right edges line up
   with the container's own padding box, the same inset every other
   section of the page uses, rather than spanning edge-to-edge against the
   full-bleed <header>. Taken OUT of flow deliberately: .site-header stays
   sticky, so a panel that grew inline would reserve/release layout space
   as it opened and closed — pushing page content around it, worse once
   the header is actually stuck mid-scroll. Toggled via
   .site-header.is-nav-open (assets/js/mobile-nav.js sets this alongside
   the toggle button's own aria-expanded). */
@media ( max-width: 639.98px ) {
	.site-header__top {
		width: 100%;
	}

	.main-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--color-page);
		border-bottom: 1px solid var(--color-border);
		box-shadow: 0 12px 20px -8px rgba(28, 25, 23, 0.18);
		padding: var(--space-4) var(--container-padding);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-6px);
		transition: opacity var(--transition), transform var(--transition), visibility 0s linear var(--transition);
	}

	.site-header.is-nav-open .main-navigation {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		transition: opacity var(--transition), transform var(--transition);
	}

	.main-navigation ul {
		flex-direction: column;
		width: 100%;
		gap: 0;
	}

	.main-navigation ul li {
		border-top: 1px solid var(--color-border);
	}
	.main-navigation ul li:first-child {
		border-top: none;
	}

	.main-navigation a {
		display: block;
		padding: var(--space-3) 0;
	}

	/* In the phone panel the search is a full-width button row (planner-538): it opens the search overlay like the icon does
	   above 640px, and its label is shown instead of hidden. */
	/* The phone's search is the icon in the top bar (.site-search__trigger--bar), so the panel's own row is hidden here. */
	.main-navigation .site-search {
		display: none;
		order: -1;
		width: 100%;
		margin-bottom: var(--space-3);
	}
	.main-navigation .site-search__trigger,
	.main-navigation .site-search__link {
		width: 100%;
		height: auto;
		min-height: 44px;
		justify-content: flex-start;
		gap: var(--space-3);
		padding: 0 var(--space-3);
		border: 1px solid var(--color-border);
		border-radius: var(--border-radius);
		background: var(--color-surface);
		color: var(--color-text);
	}
	.main-navigation .site-search__label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
		font-size: var(--font-size-sm);
	}
}

/* =========================================================
   Header sign-in and account (planner-451, docs/CLAUDE-header-account.md)
   Colors are the theme's roles (--color-text, --color-page, --color-border, --color-stone-50), so they follow light and dark. Coffee fill
   means buy and terracotta means preorder, so the signed-out control is an outline button, the same family as the free-offer buttons.
   ========================================================= */

.site-header__actions {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.header-account {
	position: relative;
}

.header-account--out {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border: 2px solid var(--color-text);
	border-radius: 6px;
	background: transparent;
	color: var(--color-text);
	font-size: var(--font-size-sm);
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background var(--transition), color var(--transition);
}
.header-account--out:hover {
	background: var(--color-text);
	color: var(--color-page);
}
.header-account--out:focus-visible,
.header-account__button:focus-visible,
.header-account__list a:focus-visible,
.header-account__list button:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}

.header-account__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 10px 5px 5px;
	border: 1px solid var(--ctl-border); /* 3:1 control edge (was --color-border, 1.2:1: the button's shape could not be seen; contrast audit 21 Nov 2026) */
	border-radius: 999px;
	background: var(--color-page);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
}
.header-account__button:hover {
	border-color: var(--color-text);
}
.header-account__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--color-border);
	border-radius: 50%;
	background: var(--color-stone-50);
	color: var(--color-text-strong);
	font-size: 13px;
	font-weight: 500;
}
/* On a phone the name is dropped to save width (the menu's first line carries it); the button keeps its full accessible name. */
.header-account__name {
	display: none;
	max-width: 14ch;
	overflow: hidden;
	text-overflow: ellipsis;
}
@media ( min-width: 640px ) {
	.header-account__name {
		display: inline;
	}
}

.header-account__menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 110;
	width: 250px;
	max-width: calc(100vw - 2 * var(--container-padding));
	padding: 6px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	background: var(--color-page);
	box-shadow: 0 8px 24px rgba(28, 25, 23, 0.12);
}
.header-account__menu[hidden] {
	display: none;
}
.header-account__who {
	display: grid;
	margin: 0 0 4px;
	padding: 8px 10px 10px;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-muted);
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
}
.header-account__who strong {
	color: var(--color-text);
	font-size: var(--font-size-sm);
	font-weight: 500;
}
.header-account__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.header-account__list a,
.header-account__list button {
	display: block;
	width: 100%;
	padding: 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--color-text);
	font: inherit;
	font-size: var(--font-size-sm);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
/* The hover tint is the search overlay's highlight (omorphos-search.css --so-tint): the text color mixed into the surface, 10% in light and
   8% in dark (about 1.24:1 against the surface). --color-stone-50 was almost the dark surface itself, so the hover barely showed. */
.header-account__menu {
	--header-account-tint: color-mix(in srgb, var(--color-text) 10%, var(--color-surface));
}
:root[data-modes="on"][data-theme="dark"] .header-account__menu {
	--header-account-tint: color-mix(in srgb, var(--color-text) 8%, var(--color-surface));
}
@media ( prefers-color-scheme: dark ) {
	:root[data-modes="on"]:not([data-theme]) .header-account__menu {
		--header-account-tint: color-mix(in srgb, var(--color-text) 8%, var(--color-surface));
	}
}
.header-account__list a:hover,
.header-account__list button:hover {
	background: var(--header-account-tint);
}

/* At ≥640px the top row stops being a box: its two children (the logo and the actions group) become items of the header row, and the
   actions group goes last, after the nav and search. Below 640px the top row stays as it was (logo left, actions right). */
@media ( min-width: 640px ) {
	.site-header__top {
		display: contents;
	}
	.site-header__actions {
		order: 2;
		margin-left: var(--space-4);
	}
}

/* =========================================================
   Site Search (header) — a fixed-size icon button that opens the search overlay
   (planner-538; omorphos-shared assets/omorphos-search.css). It used to grow an inline input and shift the header; it never
   changes size now. With no script a <noscript> link to the search results page takes its place (header.php).
   ========================================================= */

.site-search {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.site-search__trigger,
.site-search__link {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--color-muted);
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: color var(--transition), background var(--transition);
}

.site-search__trigger:hover,
.site-search__link:hover {
	background: var(--color-stone-50);
}

.site-search__trigger:focus-visible,
.site-search__link:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 2px;
}

/* The top-bar icon: phones only, text color like the menu toggle beside it; from 640px the search sits in the nav. */
.site-search__trigger--bar { color: var(--color-text); }
@media ( min-width: 640px ) {
	.site-search__trigger--bar { display: none; }
}

/* The label is the button's accessible name; only the phone panel shows it. */
.site-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* =========================================================
   Site Footer
   ========================================================= */

.site-footer {
	background: var(--color-page);
	border-top: 1px solid var(--color-border);
	padding-block: var(--space-12);
}

/* =========================================================
   Buttons
   ========================================================= */

/* Converged with the CTA block's own button system (2026-08-14, direct
   ask) — fixed px padding/line-height instead of em-based (which scaled
   with whatever font-size context a button happened to sit in), and no
   hover-lift transform (the CTA spec deliberately removed that — see
   call-to-action.css's own LAYER 3 comment). Compare against
   .call-to-action__button-primary/-secondary in that file; keep the two
   in sync if either changes again. */
.btn {
	appearance: none;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	gap: var(--space-2);
	padding: 12px 24px;
	line-height: 1.2;
	border-radius: var(--border-radius-md);
	font-size: var(--font-size-base);
	font-family: var(--font-sans);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.btn--primary {
	background: var(--btn-primary-bg);
	color: var(--btn-primary-fg);
	border-color: var(--btn-primary-bg);
}

.btn--primary:hover {
	background: var(--btn-primary-hover-bg);
	border-color: var(--btn-primary-hover-bg);
	color: var(--btn-primary-fg);
	text-decoration: none;
}

.btn--primary:active {
	background: var(--btn-primary-active-bg);
	border-color: var(--btn-primary-active-bg);
}

.btn--outline {
	background: transparent;
	color: var(--color-ink);
	border-color: var(--color-ink);
}

.btn--outline:hover {
	background: var(--color-ink);
	color: var(--color-surface);
	text-decoration: none;
}

.btn--outline:active {
	filter: brightness(.88);
}

.btn--ghost {
	background: transparent;
	color: var(--color-muted);
	border-color: var(--color-border);
}

.btn--ghost:hover {
	border-color: var(--color-muted);
	color: var(--color-muted);
	text-decoration: none;
}

.btn--lg {
	padding: 1em 2em;
	font-size: var(--font-size-lg);
}

/* =========================================================
   Taxonomy Badges
   ========================================================= */

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: var(--space-1) var(--space-3);
	border-radius: 999px;
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
}

.badge--series   { background: var(--badge-series-bg); color: var(--badge-series-fg); }
.badge--language { background: var(--color-stone-50); color: var(--color-text-strong); } /* was navy — retired 2026-08-14, "language chips" is one of navy's four named former jobs. Watch a full catalog grid: navy was doing real scannability work here; if chips get hard to tell apart, fix with weight or the language icon, not a color */
.badge--topic    { background: var(--color-warn-tint); color: var(--color-warn-ink); }
.badge--level    { background: var(--badge-level-bg); color: var(--badge-level-fg); text-transform: none; } /* level codes are already uppercase in the string; keeps "Early B1" position prefix from being all-capped — kept generic/range-agnostic since content-series-card.php also uses this class for a level RANGE ("B1–B2", "Early B1"), which has no single CEFR color and wouldn't fit a circle. The row card's own single-level badge overrides shape/color below, scoped to .book-card__row-level specifically. */

/* Circular, CEFR-registry-colored — row-card-only override (a single book
   always has exactly one badge level, unlike the series-card range badge
   above). Reads the same --color-cefr-* custom properties the cover badge/
   level-range component/reference table already share (omorphos-books'
   CEFR registry, emitted sitewide on wp_head) — a color change there stays
   in sync here too. */
.book-card__row-level {
	color: #fff;
	width: 1.75em;
	height: 1.75em;
	padding: 0;
	justify-content: center;
	flex-shrink: 0;
}
.book-card__row-level--a1 { background: var(--color-cefr-a1); }
.book-card__row-level--a2 { background: var(--color-cefr-a2); }
.book-card__row-level--b1 { background: var(--color-cefr-b1); }
.book-card__row-level--b2 { background: var(--color-cefr-b2); }
.book-card__row-level--c1 { background: var(--color-cefr-c1); }
.book-card__row-level--c2 { background: var(--color-cefr-c2); }
.badge--new        { background: var(--badge-new-bg); color: var(--badge-new-fg); }
.badge--unpublished { background: var(--badge-unpub-bg); color: var(--badge-unpub-fg); border: 1px dashed var(--badge-unpub-border); }

/* Blog category chips — one color per category, matching the "Blog
   Featured Image Framework"'s six locked canvas colors exactly (same
   background tints as each category's featured-image canvas), so a
   category reads as the same visual identity whether it's the card's
   image background or its chip. Text color is each canvas's own "Source"
   hue from that framework (the CEFR/theme color it was tinted from) —
   Language Deep-Dives, Inside the Books, and For Educators have no such
   source hue (all three are neutral canvases by design), so their chip
   text shares one dark warm gray (#57534E) instead of each inventing its
   own — checked against WCAG AA (4.5:1) against each of those three
   canvases specifically, since the lightest of the three
   (Language Deep-Dives' #F7F5F2) failed at the sitewide --color-muted
   value (#78716C, 4.41:1) before being darkened to this one. Mapped from
   category
   slug via omorphos_blog_category_badge_class() (inc/blog.php); any
   category not in that map (e.g. Uncategorized) falls back to the
   generic .badge--topic amber above. */
.badge--cat-method-research     { background: var(--badge-cat-method-bg); color: var(--badge-cat-method-fg); }
.badge--cat-language-deep-dives { background: var(--badge-cat-deep-bg); color: var(--badge-cat-deep-fg); }
.badge--cat-inside-the-books    { background: var(--badge-cat-inside-bg); color: var(--badge-cat-inside-fg); }
.badge--cat-reading-guides      { background: var(--badge-cat-guides-bg); color: var(--badge-cat-guides-fg); }
.badge--cat-educators           { background: var(--badge-cat-educators-bg); color: var(--badge-cat-educators-fg); }
.badge--cat-news-releases       { background: var(--badge-cat-news-bg); color: var(--badge-cat-news-fg); }

.badge:hover { opacity: 0.8; text-decoration: none; }

.badge__icon {
	display: block;
	width: 1em;
	height: 1em;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.badge__icon--svg {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

.badge__icon--svg svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
}

/* Recoloured SVG mask — same technique as .page-hero__icon--mask */
.badge__icon--mask {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	background-color: var(--lang-icon-tone, var(--lang-icon-recolor, currentColor));
	-webkit-mask-image: var(--lang-icon-svg);
	mask-image: var(--lang-icon-svg);
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
}

/* Language filter option icon — same three shapes as .badge__icon* above
   (plain <img>, inline SVG, recoloured SVG mask), own class names since
   this renders inside a .fopt button, not a .badge wrapper. Sizing matches
   the other sidebar circles (.filter__cefr_abbr) rather than the smaller
   1em badge convention, since it's the leading glyph in its own row here,
   not an inline chip icon. */
.filter__lang_icon {
	display: block;
	width: 1.25em;
	height: 1.25em;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.filter__lang_icon--svg {
	width: 1.25em;
	height: 1.25em;
	flex-shrink: 0;
}

.filter__lang_icon--svg svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
}

.filter__lang_icon--mask {
	width: 1.25em;
	height: 1.25em;
	flex-shrink: 0;
	background-color: var(--lang-icon-tone, var(--lang-icon-recolor, currentColor));
	-webkit-mask-image: var(--lang-icon-svg);
	mask-image: var(--lang-icon-svg);
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
}

.filter__lang_icon--emoji {
	font-size: 1.1em;
	line-height: 1;
	flex-shrink: 0;
}

/* Admin-only unpublished state — subtle opacity on the card. Not the book card (2026-10-24): an in-development book is
   shown to visitors as it is (status line, bell), so an admin sees the same card, not a dimmed one; its "In Development"
   corner badge still marks it. */
.series-card--unpublished,
.language-card--unpublished,
.post-card--unpublished { opacity: 0.65; }

/* =========================================================
   Book Card
   ========================================================= */

.book-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	overflow: hidden;
	transition: box-shadow var(--transition), transform var(--transition);
}

.book-card:hover {
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
	transform: translateY(-2px);
}

.book-card__cover {
	position: relative;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	background: var(--color-surface);
	/* Self-clips to a rounded rect (image AND anything absolutely positioned
	   inside it, e.g. .book-card__status-overlay) regardless of context.
	   Previously the rounding only came from the *card's* own overflow:hidden
	   clipping the cover when it sat flush against the card edge (the plain
	   desktop grid layout) — the mobile-row/detailed layouts give the cover
	   its own margin inset from the card edge, so that ancestor clipping
	   never reached it there, and the status overlay (which has no radius
	   of its own) rendered as a visibly square-cornered rectangle against
	   the rounded cover image beneath it. Reported three times before this
	   fix landed on the actual root cause. */
	border-radius: var(--border-radius);
	/* Chrome's filter+border-radius clip bug (see .book-card__cover img's own
	   comment below) turned out to survive putting border-radius directly on
	   the filtered element too — confirmed live: removing the coming_soon
	   grayscale filter made the corner round correctly, restoring it broke
	   it again, regardless of where the radius itself lived. The actual fix
	   is forcing this element onto its own compositing layer so the
	   filtered child's rasterized layer gets clipped by the rounded mask
	   correctly — the standard workaround for this exact, well-documented
	   Chromium bug. Confirmed live: adding this alone (with the filter
	   restored) fixed the corner. */
	transform: translateZ(0);
}

.book-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
	/* Chrome has a well-known bug where a `filter` on a child (e.g. this
	   theme's own .book-card--coming_soon grayscale filter, right below)
	   escapes the parent's border-radius + overflow:hidden clip — the
	   filtered image keeps rendering into the corner past the parent's
	   rounded clip boundary. Confirmed live: an outline on .book-card__cover
	   showed a correctly rounded clip edge, with the grayscale-filtered
	   image content still filling the sharp square corner behind it.
	   `border-radius: inherit` puts the radius directly on the image
	   itself so it's rounded regardless of whether the parent's clip
	   actually composites correctly. */
	border-radius: inherit;
}

.book-card:hover .book-card__cover img {
	transform: scale(1.03);
}

.book-card__cover--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-border);
	font-size: 3rem;
}

.book-card__status-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
}

.book-card__status-overlay span {
	background: var(--color-surface);
	color: var(--color-text);
	font-size: var(--font-size-sm);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: var(--space-2) var(--space-4);
	border-radius: var(--border-radius);
}

/* Same rust used on the single-book page's own "Available for preorder"
   label (--color-accent-new) — keeps "preorder" reading as the same status
   color wherever it shows up on the site, distinct from the plain white
   "Coming {date}" pill this book showed before it was marked preorder. */
.book-card__status-overlay--preorder span {
	background: var(--color-accent-new);
	color: #fff;
}

.book-card__corner-badge {
	position: absolute;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 1;
	box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.book-card--coming_soon .book-card__cover img {
	filter: grayscale(30%);
}

.book-card--coming_soon:hover .book-card__cover img {
	transform: none;
}

.book-card__body {
	padding: var(--space-4);
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: var(--space-3);
	min-width: 0;
}

.book-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
}
/* The level chip (omorphos_cefr_chip_html(), the book page's own) stretches to the language chip's height, so the two
   share one edge top and bottom, and is as wide as it is tall; it is not a link, so it has no hover. */
.book-card__badges .cefr-chip { align-self: stretch; width: 1.75rem; min-width: 0; padding: 0; } /* square: as wide as the language chip is tall (28px) */

.book-card__title {
	font-family: var(--font-serif);
	font-size: var(--font-size-lg);
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
}

/* §1a's sitewide link treatment, restored here — this selector's own
   `text-decoration: none` was overriding the theme-level default by
   specificity, leaving blue-on-hover as a surviving pocket (2026-08-13). */
.book-card__title a {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.book-card__title a:hover {
	color: var(--color-coffee);
	text-decoration-color: var(--color-coffee);
}

.book-card__romanization,
.series-card__romanization {
	font-size: var(--font-size-sm);
	font-weight: 400;
	color: var(--color-muted);
	margin-left: 0.35em;
}

.book-card__untitled-note {
	display: block;
	font-size: var(--font-size-sm);
	font-weight: 400;
	font-style: italic;
	color: var(--color-muted);
	margin-top: var(--space-1);
}

.book-card__excerpt {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0;
	flex: 1;
}

/* Description only belongs on the detailed layout — the compact card
   (grid or mobile list row) has no room for it at any viewport width. */
.book-card:not(.book-card--detailed) .book-card__excerpt {
	display: none;
}

.book-card__location {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0;
}

.book-card__location svg {
	flex-shrink: 0;
}

/* Same as the description — detailed layout only. */
.book-card:not(.book-card--detailed) .book-card__location {
	display: none;
}

.book-card__footer {
	margin-top: auto;
}

.book-card__footer .btn {
	width: 100%;
	justify-content: center;
	font-size: var(--font-size-sm);
	padding: 0.6em 1.25em;
	letter-spacing: 0.04em;
}

.book-card__release-date {
	font-size: var(--font-size-sm);
	font-weight: 600;
	/* Plain muted status text by default — terracotta/rust is reserved for an
	   OPEN preorder specifically (.book-card__release-date--preorder below);
	   this base rule previously colored every release date (including a
	   plain, non-actionable "Coming Sep 11") terracotta-ink unconditionally,
	   contradicting the sitewide "terracotta is commerce-only, earned not
	   default" rule — found while building the archive's row cards. */
	color: var(--color-muted);
	margin: 0;
	/* Body copy's sitewide 1.65 line-height is too loose for a short status
	   label that sometimes wraps to two lines ("Available for preorder —
	   releases Aug 25") — matches .book-card__title's own 1.3. */
	line-height: 1.3;
}

.book-card__release-date--preorder {
	color: var(--color-commerce-text);
}

.book-card__status-notice {
	font-size: var(--font-size-xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 var(--space-2);
}

/* Plain informational notice, not a second CTA — sits below whatever
   button/date the footer already rendered, separated by a thin divider
   rather than competing with it for attention. Shown whenever a book
   has a real Sample Preset configured (_book_sample_preset_id, gated
   the same way single-book.php's own "Request a Free Sample" button
   is), regardless of the book's purchase status — a preorder/coming-soon
   book can still offer a sample to read now. */
.book-card__sample-notice {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	margin: var(--space-2) 0 0;
	padding-top: var(--space-2);
	border-top: 1px solid var(--color-border);
}

/* Same visual slot as the plain notice above, but a real link — shown
   instead of it once the visitor already holds a live sample token for
   this exact book (2026-09-20), linking straight into it rather than the
   request-a-sample flow they've already been through. Block-level (an
   <a> isn't by default) so it keeps the same layout as the <p> it
   replaces, plus the accent/hover/focus treatment every other in-content
   link in this theme gets. */
.book-card__sample-notice--link {
	display: block;
	color: var(--color-coffee);
	text-decoration: none;
	font-weight: 600;
}
.book-card__sample-notice--link:hover,
.book-card__sample-notice--link:focus-visible {
	text-decoration: underline;
}

/* Sample-first footer (the detailed card: series pages): the sample is the action, Buy / Preorder / "tell me when it's out"
   is the quiet link beside it, and what the sample includes sits under both. See docs/CLAUDE-book-card.md. */
.book-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2) var(--space-4);
}
.book-card__footer .book-card__sample-btn {
	width: auto;
	border-width: 2px;
	font-weight: 600;
}
.book-card__quiet-link {
	font-size: var(--font-size-sm);
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.book-card__quiet-link:hover { text-decoration-color: var(--color-coffee); }
.book-card__quiet-link:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 3px; }
.book-card__quiet-stack {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
}
/* The Kindle+ message on the sample-first card: part of the buy area, under the Buy link, plain muted text. */
.book-card__quiet-note {
	font-size: var(--font-size-xs);
	line-height: 1.3;
	color: var(--color-muted);
}
.book-card__quiet-note--below {
	display: block;
	margin-top: var(--space-1); /* under the compact card's Get the book button */
}
.book-card__sample-line {
	margin: var(--space-2) 0 0;
	font-size: var(--font-size-xs);
	line-height: 1.4;
	color: var(--color-muted);
}

.book-series-position {
	/* Explicit size — nested inside a heading in both places it's used
	   (single-book.php's <h1>, content-book-card.php's <h2>), which
	   previously left it inheriting that heading's own large font-size
	   instead of a size of its own — reported live on single-book.php as
	   "way too big." --font-size-sm matches the sizing convention already
	   used for secondary book-card metadata (.book-card__location) — the
	   right register for the card context. Bumped back up specifically
	   for the single-book page below, where --font-size-sm alone read as
	   too small next to that page's own larger title. */
	font-size: var(--font-size-sm);
	font-weight: normal;
	font-style: italic;
	color: var(--color-muted);
	/* Breathing room from the title text directly above — nesting inside
	   a heading means this otherwise sits flush against that line with
	   no gap at all. */
	margin: var(--space-1) 0 0;
}

/* =========================================================
   Book Card — detailed layout variant
   One book per row (not a multi-column grid), two-column card on
   desktop (cover left, title/label/status/description right), single
   stacked column on mobile. Used on series pages via the Asset Cards
   block's "Card layout: Detailed" setting. Reuses every compact-layout
   sub-element/token as-is — only the card's own flex direction and
   column widths change. See template-parts/content-book-card.php.
   ========================================================= */

/* Two classes (not just .books-grid--detailed) so this reliably beats the
   later, single-class desktop ".books-grid { grid-template-columns:
   repeat(auto-fill, ...) }" override further down — same specificity would
   otherwise let source order decide, and that rule comes after this one. */
.books-grid.books-grid--detailed {
	grid-template-columns: 1fr;
}

/* Large/full-screen viewports: two detailed cards side by side instead of
   one per row — each card still keeps its own internal cover-left/text-right
   two-column layout, so this is a grid of two-column cards, not a second
   level of columns inside a single row.
   The column count follows the GRID's own width, not the viewport's: a fixed
   repeat(2, 1fr) at 1280px+ put a lone card in half of a narrow container
   (a 720px blog column showed a 348px card with a cramped text column).
   520px is the narrowest a detailed card reads well (168px cover + inset +
   a text column), so a full-width page (about 1150px of content) still gets
   two columns and anything narrower gets one. */
@media ( min-width: 1280px ) {
	.books-grid.books-grid--detailed {
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
	}
}

@media ( min-width: 768px ) {
	.book-card--detailed {
		flex-direction: row;
		align-items: flex-start;
	}

	.book-card--detailed .book-card__cover {
		/* Narrower + inset, not the original flush 240px — a considered
		   redesign, not a patch. Mocked up as three real options (flush
		   240px baseline / inset 240px / inset 168px) against real catalog
		   content before landing this — this is Option C, the one picked.
		   168px gives the description column meaningfully more width, and
		   the inset margin (below) is what actually fixes the root
		   complaint: flush-to-the-card's-edge let the card's own outer
		   border-radius cut an awkward curve straight through the cover
		   art, and the cover otherwise had no visual "frame" of its own —
		   same reasoning the <768px detailed-card rule was already built
		   on (see its own comment, below), just never extended up to this
		   breakpoint until now. */
		width: 168px;
		flex-shrink: 0;
		/* Natural height, not a forced 2:3 crop — several covers in this
		   catalog are illustrated as a taller/more-square poster-style
		   composition with the title baked into the artwork near the top,
		   so a fixed 2:3 frame (base .book-card__cover rule) cropped that
		   title text tight against the frame's own edge. */
		aspect-ratio: auto;
		/* Inset with its own rounded corners instead of sitting flush
		   against the card edge — see the width comment above. Only the
		   left/top/bottom get the gap; the right edge meets the body's own
		   padding, so the two don't double up. */
		margin: var(--space-4) 0 var(--space-4) var(--space-4);
		background: transparent;
	}

	.book-card--detailed .book-card__cover img {
		/* Base rule sets height:100% (needs a defined-height parent, which
		   this no longer is now that aspect-ratio is auto) — override to
		   scale naturally with the width, same as the <768px rule below. */
		height: auto;
		border-radius: var(--border-radius);
		display: block;
	}

	.book-card--detailed .book-card__body {
		padding: var(--space-6);
	}
}

/* =========================================================
   Books Grid — mobile: 2 columns
   ========================================================= */

.books-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-6);
	list-style: none;
	padding: 0;
	margin: 0;
	min-width: 0;
	width: 100%;
}

/* =========================================================
   Archive Layout (with sidebar) — mobile: stacked
   ========================================================= */

.archive-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8);
	align-items: start;
}

.archive-sidebar {
	position: static;
}

/* =========================================================
   Applied-filters row — book archive only
   ========================================================= */

.applied-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	padding-bottom: var(--space-3);
	border-bottom: 1px solid var(--color-border);
	margin-bottom: var(--space-4);
}

.applied-filters__label {
	font-size: var(--font-size-xs);
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--color-muted);
	font-weight: 700;
}

/* Quiet chip: the flag or level circle carries the color, so the chip is a surface with a rule, not the
   Coffee fill that every chip shared. The icon sits first, same classes and size as the filter list's. */
.applied-filters__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: var(--color-surface);
	color: var(--color-text);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 0.25em 0.6em 0.25em 0.3em;
	font-size: var(--font-size-sm);
}

.applied-filters__chip .filter__lang_icon,
.applied-filters__chip .filter__lang_icon--svg,
.applied-filters__chip .filter__lang_icon--mask { width: 1.25em; height: 1.25em; }
.applied-filters__chip .filter__cefr_abbr { width: 1.6em; height: 1.6em; font-size: 0.7rem; }

.applied-filters__x {
	border: none;
	background: none;
	color: var(--color-muted);
	font-weight: 700;
	font-size: 0.85rem;
	line-height: 1;
	padding: 0 2px;
	text-decoration: none;
}

.applied-filters__clear {
	font-size: var(--font-size-sm);
	color: var(--color-coffee);
}

.applied-filters__count {
	margin-left: auto;
	color: var(--color-muted);
	font-size: var(--font-size-sm);
	white-space: nowrap;
}

@media ( max-width: 767px ) {
	.applied-filters {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		mask-image: linear-gradient( to right, #000 88%, transparent 100% );
	}

	.applied-filters::-webkit-scrollbar {
		display: none;
	}

	.applied-filters__chip {
		flex: 0 0 auto;
	}

	/* Lives in .filter-trigger-bar instead — see filters.js/book-filters.php. */
	.applied-filters__count {
		display: none;
	}
}

/* =========================================================
   Series panel/list — book archive only
   ========================================================= */

.slab {
	/* Explicit — .slab now renders as a real <h2> in some contexts (the
	   book-archive results/series section labels), so without this it
	   inherits var(--font-serif) from the sitewide bare h1-h6 rule. Always
	   wants the sans eyebrow treatment regardless of which tag it's on. */
	font-family: var(--font-sans);
	font-size: var(--font-size-xs);
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--color-muted);
	font-weight: 700;
	margin: var(--space-6) 0 var(--space-3);
}

.slab:first-child {
	margin-top: 0;
}

/* Default list — plain hairline rows, no box. Emphasis is reserved for the
   singular promoted case below (the "one bordered surface on a page of
   hairline rows" rule this catalog's other single-item panels — the
   Recommended block, "ours" recommendation entries — already follow). */
.srow-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.srow {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: var(--space-4);
	align-items: center;
	padding: var(--space-3) 0;
}

/* Separators go BETWEEN rows, never after the last one — a per-row
   border-bottom needed a :last-child (or :last-of-type) override to avoid
   a trailing hairline before whatever follows the list, and that class of
   fix is exactly what the book-archive brief's own §6 flags as fragile
   (its own worked example: a :last-of-type override that silently matched
   the wrong element once the block gained non-.srow siblings). A sibling
   selector has no override to forget and stays correct regardless of what
   comes after the list. */
.srow + .srow {
	border-top: 1px solid var(--color-border);
}

.srow--promoted,
.catalog-recommended {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	padding: var(--space-6);
	margin-bottom: var(--space-6);
}

.srow--promoted {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: var(--space-4);
}

/* Same "one boxed surface on a page of hairline rows" treatment as
   .srow--promoted (the series panel), and deliberately mutually exclusive
   with it — promotion needs a filter narrowed to one series; this needs
   none active. See inc/catalog-recommended.php. */
.catalog-recommended {
	position: relative;
}

.catalog-recommended__x {
	position: absolute;
	top: var(--space-4);
	right: var(--space-4);
	border: none;
	background: none;
	color: var(--color-muted);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
}

.catalog-recommended__k {
	font-size: var(--font-size-xs);
	letter-spacing: 0.09em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--color-muted);
	margin: 0 0 var(--space-1);
}

.catalog-recommended__h {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: var(--font-size-lg);
	color: var(--color-text);
	margin: 0 0 var(--space-1);
}

.catalog-recommended__why {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0 0 var(--space-4);
	max-width: 56ch;
}


.catalog-recommended__foot {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	align-items: center;
	margin-top: var(--space-4);
	padding-top: var(--space-3);
	border-top: 1px solid var(--color-border);
	font-size: var(--font-size-sm);
}

.catalog-recommended__foot .link,
.catalog-recommended__foot button {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--color-coffee);
	cursor: pointer;
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.srow__k {
	display: block;
	font-size: var(--font-size-xs);
	letter-spacing: 0.09em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--color-muted);
	margin-bottom: 2px;
}

.srow__t {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: var(--font-size-base);
	margin: 0;
}

.srow--promoted .srow__t {
	font-size: var(--font-size-lg);
}

.srow__t a {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.srow__t a:hover {
	color: var(--color-coffee);
	text-decoration-color: var(--color-coffee);
}

.srow__m {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 2px 0 0;
}

.srow--promoted .srow__m {
	margin-top: var(--space-2);
	max-width: 52ch;
}

.srow__cta {
	font-size: var(--font-size-sm);
	color: var(--color-coffee);
	white-space: nowrap;
}

/* =========================================================
   Compact row book cards — book archive only. New modifier;
   .book-card/.book-card--detailed's own rules are untouched.
   ========================================================= */

.books-grid.books-grid--row {
	grid-template-columns: 1fr;
	gap: 0;
}

.book-card--row {
	flex-direction: row;
	height: auto;
	align-items: center;
	border: none;
	border-radius: 0;
	background: none;
	/* Anchors the title anchor's ::after stretched-link overlay below. */
	position: relative;
}

/* Separators go BETWEEN rows, never after the last one — see .srow + .srow's
   own comment above for why this is the sibling-selector pattern, not a
   :last-child/:last-of-type override. Scoped to .books-grid__item (the <li>
   wrapper), NOT .book-card--row (the <article> itself) — each row card is
   now wrapped in its own <li class="books-grid__item"> for real list
   semantics (screen readers announcing "list of N books"), so the actual
   adjacent siblings inside .books-grid are the <li>s, never the <article>s
   directly. A .book-card--row + .book-card--row selector can't match two
   articles that each have a different parent. */
.books-grid--row .books-grid__item + .books-grid__item {
	border-top: 1px solid var(--color-border);
}

.book-card--row:hover {
	box-shadow: none;
	transform: none; /* the lift is wrong on a list row */
}

/* The row is the destination — a stretched link on the title anchor, not a
   wrapping <a> or a JS click handler (both would break cmd/middle-click,
   text selection, nested-interactive validity, and the screen-reader
   announcement — see the book-archive brief's own §6). Hovering/focusing
   anywhere in the row activates the title's own hover/focus state, since
   the ::after overlay below is generated by (and hover-state-linked to)
   the anchor itself. */
.book-card--row .book-card__title a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* No background fill on hover (tried and reverted — too loud across a
   full-width row on a page of otherwise-quiet hairlines). The underline
   going solid Coffee already says exactly where the row goes; this rule
   just makes sure that fires from a hover anywhere in the row, not only
   when the pointer happens to be directly over the anchor's own text. */
.book-card--row:hover .book-card__title a {
	text-decoration-color: var(--color-coffee);
}

.book-card--row:focus-within {
	outline: 2px solid var(--color-coffee);
	outline-offset: 2px;
}

/* Any other link inside the row's meta line (e.g. a series name, should
   one ever become linked) must sit above the title's overlay or it's
   unreachable — the overlay would otherwise swallow every click. */
.book-card--row .book-card__row-meta a {
	position: relative;
	z-index: 2;
}

.book-card--row .book-card__cover {
	width: 44px;
	flex: 0 0 44px;
	margin: var(--space-3) 0;
	/* Top-aligned, not vertically centered against the row — a wrapped
	   two-line title/meta stack is taller than the 44px cover, and a
	   centered cover reads as floating/misaligned against it. */
	align-self: flex-start;
	/* Square, not rounded — desktop already reads square in practice (the
	   card's own overflow:hidden clips a flush-left cover against the
	   card's own border-radius:0), but that only works while the cover
	   sits flush with zero horizontal inset; at mobile the cover is a
	   plain grid item with no such flush edge to clip against, so the
	   base .book-card__cover radius rendered visibly rounded there while
	   desktop looked square — an unintentional mismatch, not a deliberate
	   mobile-only style. Explicit here so both are square by the same
	   rule, not by an accidental clipping side-effect. */
	border-radius: 0;
}

/* Sized for a full grid-width cover — at this layout's 44px cover it's
   oversized/wrong (overlapping the tiny thumbnail almost edge to edge).
   The same status is already conveyed by .book-card__footer's own text
   ("New", release date, etc.), so this is pure redundant chrome here. */
.book-card--row .book-card__corner-badge {
	display: none;
}

/* Just the title block now (location/excerpt are already CSS-hidden outside
   --detailed; the footer used to live in here too but is now printed as
   .book-card__row-availability, a sibling of this element rather than a
   descendant — see content-book-card.php's own comment at that block for
   why the old nested position was the actual bug behind the right column
   never landing in a real third column). No more flex-direction:row/wrap/
   justify-content — those existed only to arrange the title next to the
   footer inside this one flex item; with nothing left to arrange against,
   this is back to a plain single-item box. */
.book-card--row .book-card__body {
	padding: var(--space-3) 0 var(--space-3) var(--space-4);
}

.book-card--row .book-card__badges {
	display: none; /* language now shown as plain text in .book-card__row-meta instead (see content-book-card.php's row_meta_parts) */
}

/* The full-cover status pill ("Coming Aug 25"/"Preorder") is sized for a
   normal grid-width cover — at this layout's 44px cover it overflows badly.
   The same status already renders in .book-card__row-availability's own
   text, so this is pure redundant overflow here, not lost information. */
.book-card--row .book-card__status-overlay {
	display: none;
}

/* The row's own "when can I get this" column — a true third flex child of
   .book-card--row (sibling of the cover and .book-card__body), NOT nested
   inside the body the way the shared .book-card__footer is for every other
   layout. .book-card__body keeps its inherited flex:1 (from the base
   .book-card__body rule), so it grows to fill whatever space this column
   doesn't need, which is what pins this column flush to the row's own
   right edge with no margin-left:auto required. */
.book-card__row-availability {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
	padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
}

.book-card__row-availability-date {
	margin: 0;
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	white-space: nowrap;
}

.book-card__row-availability-qualifier {
	margin: 0;
	font-size: var(--font-size-xs);
	font-weight: 700;
	color: var(--color-muted);
}

/* Terracotta only when a preorder is genuinely open — every other state
   (in development, plain "coming soon", out of print) stays neutral. Same
   "commerce-only accent, earned not default" rule the rest of the theme
   already follows for this color (see this file's own "Navy retirement +
   Coffee links" section). */
.book-card__row-availability-qualifier--preorder {
	color: var(--color-commerce-text);
}

.book-card__row-meta {
	margin: var(--space-1) 0 0;
	font-size: var(--font-size-sm);
	/* Reset both — this renders inside .book-card__title (an <h2>), whose
	   own font-family:serif/font-weight:700 otherwise leaks through since
	   this rule never overrode either, only font-size. Meta is secondary
	   information, not part of the heading's own visual weight. */
	font-family: var(--font-sans);
	font-weight: 400;
	color: var(--color-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.book-card__row-meta-item {
	display: inline-flex;
	align-items: center;
}

/* Dot separators are structural (CSS), not baked into the PHP-built string —
   so a hidden --secondary item (mobile, below) cleanly drops both its own
   text AND its own leading dot, instead of leaving an orphaned "· ·". */
.book-card__row-meta-item:not(:first-child)::before {
	content: '\00B7';
	margin: 0 0.5em;
	color: var(--color-stone-400);
}

.book-card__row-level {
	vertical-align: 1px;
}

@media ( max-width: 767px ) {
	.book-card--row {
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr);
		/* Split, not a uniform `gap` — column-gap separates cover from text;
		   row-gap needs to be tight (this is one visual block: title, meta,
		   then availability, not two spaced-apart sections). */
		column-gap: var(--space-3);
		row-gap: 2px;
	}

	/* Specificity bump (class repeated) — the generic mobile compact-card
	   cover rule below (.book-card:not(.book-card--detailed) .book-card__cover,
	   0,3,0 from the :not() argument's own class) otherwise beats a plain
	   .book-card--row .book-card__cover (0,2,0) regardless of source order,
	   forcing this cover to its 90px/aspect-ratio:auto treatment instead of
	   the dense row's 44px column — confirmed live (a real cover rendered at
	   ~90px wide, overlapping the title text next to it).
	   margin-top matches .book-card__body's own top padding (var(--space-3),
	   set by the same generic compact-card rule below) — the row itself
	   still needs that space-3 inset at its top for breathing room, so the
	   fix is giving the cover the SAME offset rather than stripping the
	   title's own (removing it outright made the whole row look cramped
	   against whatever precedes it, not aligned — see the git history for
	   the first, wrong attempt at this). Both columns now start at the
	   same y-offset from the row's own top edge instead of the cover
	   sitting flush at 0 while the title started a further space-3 down. */
	.book-card--row.book-card--row .book-card__cover.book-card__cover {
		width: 44px;
		aspect-ratio: 2 / 3;
		margin: var(--space-3) 0 0;
		/* Without this, the cover only auto-places into row 1 (beside the
		   title/meta) — row 2 (.book-card__row-availability, column 2 only)
		   ends up a fully separate row with nothing in column 1, and since
		   the cover is taller than the title+meta text, row 1's own height
		   grows to fit it, pushing row 2 down well past where the meta line
		   actually ends. Spanning both rows makes the cover sit beside the
		   WHOLE title+meta+availability stack, so row 1/row 2's own heights
		   are driven by their own (shorter) text content instead. */
		grid-row: 1 / span 2;
	}

	/* Same specificity problem, third time in this one row/mobile section:
	   .book-card:not(.book-card--detailed) .book-card__cover img (below)
	   sets an explicit border-radius directly on the <img> itself, at
	   (0,3,1) — beating both the wrapper's own border-radius:0 (which the
	   image's base rule only picks up via `border-radius: inherit`, and
	   inherit loses outright to any rule setting an explicit value) and a
	   plain .book-card--row .book-card__cover img (0,2,1). Needs the same
	   specificity bump as its two siblings above. */
	.book-card--row.book-card--row .book-card__cover.book-card__cover img {
		border-radius: 0;
	}

	/* Bottom/left padding handed off to the grid's own column-gap/row-gap
	   above — keeping them here too would double-space in both directions
	   (a left gap from BOTH padding-left and column-gap; a vertical gap
	   from BOTH padding-bottom and row-gap). Top padding stays — it's what
	   keeps this column's own top edge level with the cover's own
	   margin-top, per that rule's own comment.
	   Specificity bump (class repeated) — same recurring problem this one
	   file's mobile/row section has hit twice already (cover width, image
	   border-radius, both documented above): the generic mobile compact-
	   card rule (.book-card:not(.book-card--detailed) .book-card__body,
	   0,3,0 from the :not() argument's own class) sets a uniform
	   `padding: var(--space-3)` that otherwise beats a plain
	   .book-card--row .book-card__body (0,2,0) regardless of source order
	   — confirmed live: computed padding came back as a uniform 12px on
	   all four sides instead of this rule's own top-only value, which is
	   exactly what put the availability column 12px left of the title
	   (the still-12px left padding this rule was supposed to zero out). */
	.book-card--row.book-card--row .book-card__body.book-card__body {
		padding: var(--space-3) 0 0 0;
	}

	/* A row's own height is whatever its taller column needs (cover vs.
	   title+meta[+availability] text) — a short book (no availability
	   line, e.g. a plain "available now" title) has nothing forcing any
	   space below its own text before the next row's border-top
	   separator, so it read as flush/cramped against the hairline
	   directly under it. Bottom padding on the <li> itself (not the grid
	   items inside it) guarantees a minimum gap regardless of which
	   column happens to be tallest for a given book. */
	.books-grid--row .books-grid__item {
		padding-bottom: var(--space-3);
	}

	/* .book-card--row itself is now a CSS grid (above), not the desktop
	   flex row — .book-card__row-availability was a flex sibling of the
	   cover/body there, but a grid only auto-places a 3rd item into an
	   implicit new row starting back at column 1 (underneath the cover,
	   not underneath the title) unless told otherwise. Column 2, own row —
	   stacks directly under the title, matching how upcoming-releases.php's
	   own mobile reflow reverses to a left-aligned, stacked date. */
	.book-card__row-availability {
		grid-column: 2;
		align-items: flex-start;
		text-align: left;
		padding: 0;
	}

	/* Setting + page count drop first from the meta line at this width —
	   level and series position are what a learner needs to scan; the rest
	   is on the book page. */
	.book-card--row .book-card__row-meta-item--secondary {
		display: none;
	}
}

/* ── Mobile filter trigger bar ── */
.filter-trigger-bar {
	display: none; /* shown only on mobile via media query below */
}

/* ── Filter drawer (bottom sheet, mobile only) ── */
.filter-drawer {
	/* On desktop the drawer wrapper is transparent — form sits inside .archive-sidebar */
}

.filter-drawer__close {
	display: none;
}

.filter-drawer-overlay {
	display: none;
}

/* ── Mobile overrides ── */
@media ( max-width: 767px ) {
	.archive-sidebar {
		display: contents; /* let .filter-drawer position itself fixed */
	}

	/* Tightened spacing (direct ask) — the H1 and Filters trigger now sit
	   on one row instead of the title stacking above a separately-padded
	   .filter-trigger-bar row, so .archive-chead's own margin-bottom is
	   the only gap left before the results below. */
	.archive-chead {
		margin-bottom: var(--space-4);
	}

	.archive-chead__row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-3);
	}

	.archive-chead__title {
		margin: 0;
	}

	.filter-trigger-bar {
		display: flex;
		align-items: center;
		flex-shrink: 0;
	}

	.filter-trigger {
		display: inline-flex;
		align-items: center;
		gap: var(--space-2);
		padding: var(--space-2) var(--space-4);
		border: 1px solid var(--color-border);
		border-radius: var(--border-radius);
		background: var(--color-surface);
		font-size: var(--font-size-sm);
		font-weight: 500;
		font-family: var(--font-sans);
		cursor: pointer;
		color: var(--color-text);
	}

	.filter-trigger__count {
		background: var(--color-muted);
		color: var(--color-surface);
		border-radius: 999px;
		font-size: 0.7rem;
		font-weight: 700;
		padding: 1px 6px;
		line-height: 1.4;
	}

	.filter-submit {
		display: inline-flex;
	}

	.filter-drawer {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 400;
		background: var(--color-surface);
		border-radius: 12px 12px 0 0;
		padding: var(--space-8) var(--space-4) var(--space-8);
		max-height: 80vh;
		overflow-y: auto;
		transform: translateY(100%);
		transition: transform 280ms ease;
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	}

	.filter-drawer.is-open {
		transform: translateY(0);
	}

	.filter-drawer__close {
		display: block;
		position: absolute;
		top: var(--space-4);
		right: var(--space-4);
		background: none;
		border: none;
		font-size: 1.1rem;
		line-height: 1;
		cursor: pointer;
		color: var(--color-muted);
		padding: 4px 6px;
	}

	.filter-drawer-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 399;
	}

	.filter-drawer-overlay.is-visible {
		display: block;
	}

	/* ── Book grid: single-column horizontal list cards ──
	   Scoped to :not(.book-card--detailed) — the detailed layout variant
	   (series pages) keeps the normal stacked column + full-width cover on
	   mobile too, matching its desktop two-column treatment instead of the
	   compact grid's narrow 90px thumbnail row. */
	.books-grid {
		grid-template-columns: 1fr;
	}

	.book-card:not(.book-card--detailed) {
		flex-direction: row;
		height: auto;
		/* Without this, the cover (a flex item) stretches to match the row's
		   own height — same fix .book-card--detailed's mobile row already
		   has. Only mattered once the cover switched to a natural aspect
		   ratio (below): with a fixed 2:3 crop the stretch was invisible
		   (the cover always filled its own box), but a natural-height cover
		   left a visible gap under the image once it stopped matching the
		   taller text column's height. */
		align-items: flex-start;
	}

	.book-card:not(.book-card--detailed) .book-card__cover {
		width: 90px;
		flex-shrink: 0;
		/* Natural height, not a forced 2:3 crop — matches .book-card--detailed's
		   own mobile-row cover (below) so a cover whose real art isn't 2:3
		   doesn't get cropped/distorted-looking here while looking correct
		   there. Width is fixed to the column, height follows the image. */
		aspect-ratio: auto;
		/* Transparent inset frame — the image itself is rounded (below), not
		   this container, so there's no flush edge for the card's own corner
		   radius to cut through. */
		margin: var(--space-2) 0 var(--space-2) var(--space-2);
		background: transparent;
	}

	.book-card:not(.book-card--detailed) .book-card__cover img {
		/* Base rule sets height:100% (needs a defined-height parent, which
		   this no longer is now that aspect-ratio is auto) — override to
		   scale naturally with the width, same as the detailed variant. */
		height: auto;
		border-radius: var(--border-radius);
		display: block;
	}

	/* Move NEW/unpublished badge to bottom of cover (near body boundary) */
	.book-card:not(.book-card--detailed) .book-card__corner-badge {
		top: auto;
		bottom: var(--space-2);
		left: var(--space-2);
		/* No `right` — setting both left and right on an absolutely positioned
		   element with no explicit width stretches it to fill the span
		   between them, overriding the badge's normal fit-to-content sizing. */
		max-width: calc(100% - var(--space-4));
		font-size: 0.55rem;
		padding: 2px 6px;
		letter-spacing: 0.02em;
		white-space: normal;
		line-height: 1.2;
		text-align: center;
	}

	/* Narrow 90px cover: shrink and top-anchor the status pill so it
	   doesn't collide with the corner badge pinned to the bottom. */
	.book-card:not(.book-card--detailed) .book-card__status-overlay {
		align-items: flex-start;
		padding-top: var(--space-1);
	}

	.book-card:not(.book-card--detailed) .book-card__status-overlay span {
		font-size: 0.55rem;
		font-weight: 700;
		letter-spacing: 0.02em;
		padding: 2px 6px;
		white-space: normal;
		text-align: center;
		max-width: calc(100% - var(--space-2));
		line-height: 1.25;
	}

	.book-card:not(.book-card--detailed) .book-card__body {
		padding: var(--space-3);
		gap: var(--space-2);
	}

	.book-card:not(.book-card--detailed) .book-card__title {
		font-size: var(--font-size-base);
	}

	.book-card__footer {
		margin-top: auto;
	}

	.book-card:not(.book-card--detailed) .book-card__footer .btn {
		min-width: 100px;
		align-self: flex-start;
		font-size: var(--font-size-xs);
		padding: 0.5em 1em;
	}

	/* Detailed layout on mobile: same thumbnail-left/text-right row as the
	   compact layout, just a bigger thumbnail (more room since it's one
	   card per row, not two-up) and none of the compact layout's space-
	   saving trims — excerpt/description, full-size title, and full-size
	   footer button all stay as they render on desktop. */
	.book-card--detailed {
		flex-direction: row;
		height: auto;
		align-items: flex-start;
	}

	.book-card--detailed .book-card__cover {
		width: 150px;
		flex-shrink: 0;
		/* Natural height — no forced 2:3 crop. Width is fixed to the column,
		   height follows the cover image's own aspect ratio. */
		aspect-ratio: auto;
		/* Transparent inset frame — the image itself is rounded (below), not
		   this container, so there's no flush edge/mismatched-height gap for
		   a visible background to show through. */
		margin: var(--space-3) 0 var(--space-3) var(--space-3);
		background: transparent;
	}

	/* This 150px cover never got the same shrink treatment the compact
	   layout's 90px cover has above (.book-card:not(.book-card--detailed)
	   .book-card__status-overlay*) — the badge kept rendering at its full
	   desktop size (14px font, 8px/16px padding, ~153px unwrapped), which
	   barely doesn't fit 150px. Result: it wrapped to two lines and, being
	   edge-to-edge at that point, had its own rounded corners clipped by
	   the cover's overflow:hidden, reading as a square full-bleed bar
	   instead of a pill. Found live at 700px viewport ("Preorder Now" on
	   Nordeste Agora · Livro 2).

	   Deliberately NOT top-anchored the way the compact 90px version above
	   is — that top-anchor exists there specifically to dodge a corner
	   badge pinned to the BOTTOM of the compact cover (see its own comment).
	   The detailed layout's corner badge stays top-left (no override below),
	   so top-anchoring the status pill here only pushed it flush against
	   the cover's own top edge, clipping its rounded corners against the
	   cover's overflow:hidden — found live the same way, one shrink pass
	   later. Centered (the base rule's own default) has no such edge to
	   clip against. */
	.book-card--detailed .book-card__status-overlay span {
		font-size: 0.65rem;
		font-weight: 700;
		letter-spacing: 0.02em;
		padding: 4px 10px;
		white-space: normal;
		text-align: center;
		max-width: calc(100% - var(--space-2));
		line-height: 1.25;
	}

	.book-card--detailed .book-card__cover img {
		/* Base rule sets height:100% (needs a defined-height parent, which
		   this no longer is) — override to scale naturally with the width. */
		height: auto;
		border-radius: var(--border-radius);
		display: block;
	}

	.book-card--detailed .book-card__body {
		padding: var(--space-4);
	}
}

/* Detailed card on a phone (<600px): a header row, not a narrow text column. A small cover sits beside the chips, title,
   series and location; the description and the buttons run the card's full width below. The 150px cover left the text a
   ~150px column (a three-line title, a tall sliver of description). The markup is unchanged: the body becomes
   `display: contents`, so its children are grid items of the card, and the cover spans the header rows. */
@media ( max-width: 599px ) {
	.book-card--detailed {
		display: grid;
		grid-template-columns: 28% minmax( 0, 1fr );
		/* The body's own flex gap (--space-3 between its children) is gone with display: contents, so it is restated here. */
		gap: var(--space-3);
		align-items: start;
		padding: var(--space-3);
	}

	.book-card--detailed .book-card__cover {
		grid-column: 1;
		grid-row: 1 / span 3;
		width: auto;
		margin: 0;
	}

	.book-card--detailed .book-card__body {
		display: contents;
	}

	.book-card--detailed .book-card__body > * {
		grid-column: 1 / -1;
	}

	.book-card--detailed .book-card__body > .book-card__badges,
	.book-card--detailed .book-card__body > .book-card__title,
	.book-card--detailed .book-card__body > .book-card__location {
		grid-column: 2;
	}

	/* Buttons across the card; the Buy link and the Kindle+ line share one line under it. */
	.book-card--detailed .book-card__footer .book-card__sample-btn {
		width: 100%;
		justify-content: center;
		text-align: center;
	}

	.book-card--detailed .book-card__actions {
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-2);
	}

	.book-card--detailed .book-card__quiet-stack {
		flex-direction: row;
		align-items: baseline;
		gap: var(--space-2);
	}

	.book-card--detailed .book-card__quiet-note::before {
		content: "\00b7\00a0";
	}
}

/* Breadcrumb sits in its own container, standalone (no wide hero above it
   to share spacing with) — found live too tight against the site nav and
   too loose against the page content below it. Top padding gives it room
   to breathe under the nav; .breadcrumbs' own margin-bottom is small on
   purpose here since the main container right after it also carries its
   own (now-reduced) top padding — see archive-book.php. */
.archive-breadcrumb-row {
	padding-top: var(--space-6);
}

.archive-main {
	min-width: 0; /* prevent grid blowout */
}

/* Compact in-column title — replaces the sitewide wide taxonomy-header hero
   on this page only. Sentence case, reduced size (not --font-size-4xl),
   sitting directly above the results it describes rather than spanning the
   full container above the two-column layout. */
.archive-chead {
	margin-bottom: var(--space-6);
}

.archive-chead__title {
	font-family: var(--font-serif);
	font-weight: 600;
	font-size: var(--font-size-xl);
	color: var(--color-text);
	margin: 0 0 2px;
}

.archive-chead__desc {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0;
	max-width: 60ch;
}

.archive-main.is-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 150ms ease;
}

/* Skeleton primitive (planner-523): a placeholder bar or block that shimmers while content loads. Colors are roles, so both modes follow;
   the shimmer stops under prefers-reduced-motion. Build a placeholder out of .skel pieces that mirror the real layout (same sizes, same
   gaps), mark it aria-hidden and put aria-busy on the container. First used by the recommendation pager (assets/js/recommendations-pager.js). */
.skel {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--color-stone-50);
	border-radius: 3px;
}

.skel::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-surface) 65%, transparent), transparent);
	transform: translateX(-100%);
	animation: skel-shimmer 1.4s ease-in-out infinite;
}

@keyframes skel-shimmer {
	to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
	.skel::after { animation: none; }
}

.filter-group {
	margin-bottom: var(--space-6);
}


.filter__lang_region {
	text-transform: uppercase;
	font-weight: 700;
	color: var(--color-muted);
	font-size: var(--font-size-xs);
}

/* Circular, CEFR-registry-colored — was plain muted text with no
   per-level color at all. Same --color-cefr-* tokens (and the same
   "one circle per level" treatment) as the row card's own level badge,
   .book-card__row-level, above — kept as a separate rule since this one
   sits inline in a filter label rather than a meta line. */
.filter__cefr_abbr {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75em;
	height: 1.75em;
	flex-shrink: 0;
	border-radius: 999px;
	color: #fff;
	font-weight: 700;
	font-size: var(--font-size-xs);
	text-transform: uppercase;
}
.filter__cefr_abbr--a1 { background: var(--color-cefr-a1); }
.filter__cefr_abbr--a2 { background: var(--color-cefr-a2); }
.filter__cefr_abbr--b1 { background: var(--color-cefr-b1); }
.filter__cefr_abbr--b2 { background: var(--color-cefr-b2); }
.filter__cefr_abbr--c1 { background: var(--color-cefr-c1); }
.filter__cefr_abbr--c2 { background: var(--color-cefr-c2); }
.filter-group__title {
	font-size: var(--font-size-sm);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin-bottom: var(--space-3);
}

.filter-group ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.filter-group li {
	/* Not on the --space scale (3/4/6/8) — deliberately tighter than any
	   defined step; the options are already visually separated by their
	   own padding/hover state, so this is just a hairline of breathing
	   room between rows, not a spacing rhythm to keep in sync elsewhere. */
	margin-bottom: 2px;
}

/* The real form control (checkbox) is hidden — see book-filters.php's own
   comment on why it's kept in the DOM at all (FormData(form) still needs
   real name[]=value pairs). display:none doesn't exclude a field from
   form submission, only `disabled`/a missing name does, so this is safe. */
.fopt__input {
	display: none;
}

/* The visible, accessible control — a real <button aria-pressed>, matching
   the mockup's own markup (not a checkbox+label). One control, one focus
   stop; the paired checkbox above carries no accessible state of its own
   (aria-hidden+tabindex="-1" in the markup). */
.fopt {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	width: 100%;
	text-align: left;
	font-family: inherit;
	font-size: var(--font-size-sm);
	color: var(--color-text-strong);
	background: none;
	border: none;
	border-radius: var(--border-radius);
	padding: var(--space-2);
	margin: 0 calc(var(--space-2) * -1);
	cursor: pointer;
}

.fopt:hover {
	background: var(--color-stone-50);
}

/* Selected filter option — filled Coffee, white text. Coffee is this site's
   one interactive color, and a filter option is an interactive control —
   same treatment the applied-filters chip it mirrors already uses. Server-
   rendered on load (book-filters.php) from aria-pressed; kept in sync live
   by filters.js's click handler on .fopt. */
.fopt[aria-pressed="true"] {
	background: var(--color-coffee);
	color: var(--color-on-coffee);
	font-weight: 700;
}

.fopt[aria-pressed="true"]:hover {
	background: var(--color-coffee);
}

/* The recolor mask exists because the source badge SVG is white — a
   per-language dark hex (--lang-icon-recolor, term meta) is what makes it
   visible against this button's normal light background. On a selected
   option, that background is already dark (Coffee) with white text, so
   the SAME dark recolor now reads as a mismatched, low-contrast blob —
   the icon should go back to the light color the badge was originally
   drawn in instead. Overrides the property directly (not the custom
   property itself, which is set per-language elsewhere) — higher
   specificity than the base .filter__lang_icon--mask rule regardless of
   which language's own recolor value is in play. */
.fopt[aria-pressed="true"] .filter__lang_icon--mask {
	background-color: currentColor;
}

.fopt[aria-pressed="true"] .filter-group__count,
.fopt[aria-pressed="true"] .filter__lang_region {
	color: rgb(var(--color-on-coffee-rgb) / 0.75);
}

/* A zero-count option can't select anything (see book-filters.php's
   disabled() call on both the hidden input and the button) — visually
   distinct, not just non-interactive, so it doesn't read as a normal
   option that happens to do nothing. */
.fopt:disabled {
	color: var(--color-disabled-text);
	cursor: default;
}

.fopt:disabled:hover {
	background: none;
}

/* A zero-count level shouldn't show its full CEFR color — that reads as an
   available, selectable option same as any other level circle. An earlier
   version just faded the real CEFR color via opacity (a translucent
   purple/teal/etc.), which read as busy/distracting across 6 circles at
   once — reported live. A flat neutral gray, same tone as the rest of the
   disabled row's text, is the plainer "there's nothing here" signal;
   overrides the base .filter__cefr_abbr--{level} background at equal
   specificity via source order (this rule loads after it). */
.filter-group__item--zero .filter__cefr_abbr {
	background: var(--color-disabled-fill);
	color: var(--color-disabled-on);
}

.filter-group__item--zero input[type="checkbox"] {
	cursor: default;
}

.filter-actions {
	display: flex;
	gap: var(--space-2);
	margin-top: var(--space-4);
}

/* Desktop filters act immediately on change (filters.js) — no Apply step
   needed. This submit button only ever renders inside the mobile bottom
   sheet, where it's both confirmation and dismissal (see the button's own
   PHP comment, template-parts/book-filters.php). */
.filter-submit {
	display: none;
}

/* =========================================================
   Single Book Page — mobile: stacked
   ========================================================= */

article.single-book {
	/* Top padding matches .page-hero's top value at every breakpoint
	   (base/768px: --space-8, 1024px: --space-12 below) so the gap
	   above the breadcrumb is identical on book pages and series/
	   language pages. Bottom padding is independent and unchanged. */
	padding-top: var(--space-8);
	padding-bottom: var(--space-12);
}

.single-book__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8);
	align-items: start;
}

.single-book__sidebar {
	max-width: 260px;
	margin-inline: auto;
}

.single-book__cover {
	/* Purely a layout wrapper — no border-radius/shadow/background of its
	   own (see the <img> rule below for why those live there instead).
	   Plain block + text-align (not display:flex) — a flex row's default
	   stretch/cross-axis behavior was interacting unpredictably with the
	   <img>'s own percentage sizing (reported live: image not reacting to
	   its actual container, no change on window resize). text-align:center
	   centers the inline-level <img> with zero flex ambiguity. */
	margin-bottom: var(--space-6);
	text-align: center;
	/* min-height:0 lets this shrink below the image's own intrinsic size
	   once .single-book__sidebar becomes a height-constrained flex column
	   (≥768px, see below) — without it a flex child won't shrink past its
	   content's natural size no matter how little room is actually left. */
	min-height: 0;
}

/* A book with no cover shows a fixed-height placeholder. In the height-constrained sidebar the wrapper above shrinks to
   what the button column leaves, and an un-shrunk placeholder overflowed it and painted over the buy links (found with a
   tall Kindle+ button column: the links could not be clicked). It now shrinks with its wrapper. */
.single-book__cover .book-card__cover--placeholder {
	height: 100%;
	min-height: 0;
	max-height: 100%;
	overflow: hidden;
}

.single-book__cover img {
	/* max-height (not a forced height:100%) + auto width — the image
	   shrinks to fit whatever definite height .single-book__cover
	   actually has (only meaningful once the ≥768px sticky rules below
	   give it one via flex:1 1 auto; at narrower widths .single-book__cover
	   has no explicit height at all, so max-height is simply a no-op and
	   the image falls back to max-width instead), while width stays auto
	   so it's always derived from the image's own real intrinsic aspect
	   ratio — no object-fit, no cropping, no distortion. This is what
	   "reacting to its container" actually requires: the element's own
	   rendered box always equals the real visible picture, whichever
	   constraint (max-width or max-height) ends up binding. */
	display: block;
	margin-inline: auto;
	width: auto;
	max-width: 100%;
	height: auto;
	/* planner-273 — below 1024px the sidebar is a plain stacked column, so
	   the 100% below is a no-op and a 2:3 cover ran ~390px tall on a phone,
	   pushing every buy button and the sample CTA below the fold (measured
	   2 Oct 2026 at 570px wide: first buy 634px, sample 732px, the book
	   title below a 741px viewport). Capping by viewport height keeps the
	   cover recognizable while the CTAs stay on screen. The >=1024px block
	   restores 100% (its own flex-grown, absolutely-positioned sizing).
	   Plain 45vh, NOT min(100%, 45vh): a percentage inside min() against an
	   indefinite container height makes the whole expression drop to none,
	   which silently disabled the cap on first try. */
	max-height: 45vh;
	border-radius: var(--border-radius-lg);
}

/* Phones (<600px): cover and buy buttons side by side, so the sample button is
   on the first screen. Stacked, a 45vh cover plus the price and one button per
   retailer put it 50–140px below the fold on every iPhone (measured 14 Oct
   2026: 750px top on a 664px iPhone 13 viewport), and its view counter
   (sample_cta_view) only fires once it is half on screen. */
@media ( max-width: 599px ) {
	.single-book__sidebar {
		max-width: none;
		margin-inline: 0;
		display: grid;
		grid-template-columns: minmax( 0, 36% ) minmax( 0, 1fr );
		column-gap: var(--space-4);
		align-items: start;
	}

	.single-book__sidebar > * {
		grid-column: 2;
	}

	.single-book__sidebar > .single-book__cover {
		grid-column: 1;
		grid-row: 1 / span 6;
		margin-bottom: 0;
	}

	.single-book__cover img {
		width: 100%;
		max-height: none;
	}

	.single-book__sidebar .single-book__cta-row {
		gap: var(--space-2);
		margin-bottom: var(--space-4);
	}

	.single-book__sidebar .single-book__cta-row .btn {
		padding-inline: var(--space-3);
		font-size: var(--font-size-sm);
	}

	/* A Kindle+ title's column (availability line, button, buy link, membership box, notes; docs/CLAUDE-kindle-plus.md) is far
	   taller and wordier than the short column the side-by-side grid above was made for, and in the narrow second column it
	   wrapped into a long sliver. Here the cover is a left float instead: the column's text wraps beside it and runs full width
	   once it is past the cover. The button column must not be a flex/grid box (a BFC would sit wholly beside the float), so it
	   is a plain block; the buttons and the membership box are flex boxes, which narrow to fit beside the float on their own. */
	.single-book__sidebar:has( .single-book__availability ) {
		display: block;
	}

	.single-book__sidebar:has( .single-book__availability ) > .single-book__cover {
		float: left;
		width: 36%;
		margin: 0 var(--space-4) var(--space-2) 0;
	}

	.single-book__sidebar:has( .single-book__availability ) .single-book__cta-row {
		display: block;
		overflow: visible;
	}

	.single-book__sidebar:has( .single-book__availability ) .single-book__cta-row > * {
		margin-bottom: var(--space-2);
	}

	.single-book__sidebar:has( .single-book__availability ) .single-book__cta-row > .btn {
		display: flex;
		justify-content: center;
	}

	/* The membership box is shorter on a phone: the label and text sit at the left and "Join Kindle+ on Amazon" is an
	   outlined button at the right (a grid, so the markup order is unchanged); the note runs full width under both. */
	.single-book__sidebar .single-book__kplus {
		display: grid;
		grid-template-columns: minmax( 0, 1fr ) auto;
		column-gap: var(--space-3);
		align-items: center;
	}
	.single-book__sidebar .single-book__kplus-label {
		grid-column: 1;
		grid-row: 1;
	}
	.single-book__sidebar .single-book__kplus-text {
		grid-column: 1;
		grid-row: 2;
	}
	.single-book__sidebar .single-book__kplus-link {
		grid-column: 2;
		grid-row: 1 / span 2;
		max-width: 8.5rem;
		padding: 8px 12px;
		border: 2px solid var(--color-ink);
		text-align: center;
		text-decoration: none;
		line-height: 1.3;
	}
	.single-book__sidebar .single-book__kplus-note {
		grid-column: 1 / -1;
		grid-row: 3;
		margin-top: 2px;
	}
}

/* The series/volume eyebrow above the title — see single-book.php's own
   comment on why this replaced the old .book-series-position-nested-in-
   the-<h1> placement. Reuses the sitewide eyebrow convention
   (.taxonomy-header__eyebrow) rather than inventing a second one. The
   series-name <a> inherits the uppercase/tracking so the whole line reads
   as one label; its own color/underline come from the sitewide link rule. */
.single-book__eyebrow {
	font-size: var(--font-size-sm);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-muted);
	font-weight: 600;
	margin: 0 0 var(--space-2);
}

.single-book__title {
	font-size: var(--font-size-3xl);
	margin-bottom: var(--space-2);
}

/* Now sits below the title as a quiet supporting line, not above it as a
   second headline — see the project's own subtitle-placement note. */
.single-book__subtitle {
	font-size: var(--font-size-lg);
	color: var(--color-muted);
	margin: var(--space-2) 0;
}

.single-book__romanization {
	font-size: var(--font-size-lg);
	font-weight: 400;
	color: var(--color-muted);
	margin-left: 0.35em;
}

.single-book__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-6);
}

.single-book__description {
	font-size: var(--font-size-lg);
	line-height: 1.75;
	margin-bottom: var(--space-8);
}

.single-book__back-cover-summary {
	font-size: var(--font-size-base);
	line-height: 1.75;
	color: var(--color-text);
	margin-bottom: var(--space-8);
}

.single-book__back-cover-summary-heading {
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin-bottom: var(--space-3);
}

.single-book__specs {
	margin-bottom: var(--space-8);
}

.single-book__specs-heading {
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin-bottom: var(--space-3);
}

.single-book__specs-list {
	margin: 0;
	border-top: 1px solid var(--color-border);
}

.single-book__specs-row {
	display: flex;
	gap: var(--space-4);
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--color-border);
	font-size: var(--font-size-sm);
}

.single-book__specs-row dt {
	flex: 0 0 40%;
	color: var(--color-muted);
}

.single-book__specs-row dd {
	margin: 0;
	color: var(--color-text);
	font-weight: 600;
	display: flex;
	flex-wrap: wrap; /* the level note drops to its own line before it squeezes the badge */
	align-items: center;
	gap: var(--space-2);
}

/* Colorized CEFR chip — same --color-cefr-* custom properties as the cover
   badge / level-range component (level-range.php), so the Reading Level
   row's color always matches the rest of the site for that level. */
.cefr-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	padding: 0.15em 0.5em;
	border-radius: var(--border-radius-md);
	font-size: var(--font-size-xs);
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cefr-chip--a1 { background-color: var(--color-cefr-a1); }
.cefr-chip--a1-a2 { background: linear-gradient(135deg, var(--color-cefr-a1), var(--color-cefr-a2)); }
.cefr-chip--a2 { background-color: var(--color-cefr-a2); }
.cefr-chip--a2-b1 { background: linear-gradient(135deg, var(--color-cefr-a2), var(--color-cefr-b1)); }
.cefr-chip--b1 { background-color: var(--color-cefr-b1); }
.cefr-chip--b1-b2 { background: linear-gradient(135deg, var(--color-cefr-b1), var(--color-cefr-b2)); }
.cefr-chip--b2 { background-color: var(--color-cefr-b2); }
.cefr-chip--b2-c1 { background: linear-gradient(135deg, var(--color-cefr-b2), var(--color-cefr-c1)); }
.cefr-chip--c1 { background-color: var(--color-cefr-c1); }
.cefr-chip--c1-c2 { background: linear-gradient(135deg, var(--color-cefr-c1), var(--color-cefr-c2)); }
.cefr-chip--c2 { background-color: var(--color-cefr-c2); }

.single-book__specs-cefr-label {
	font-weight: 600;
}

/* The level badge on the book page is the same 28px square as on the cards (one level, two characters). */
.cefr-chip--square {
	width: 1.75rem;
	height: 1.75rem;
	min-width: 0;
	padding: 0;
	flex: none;
	vertical-align: middle;
	border-radius: var(--border-radius-md);
}

/* The note beside the book's level: the plain link, or (a reader with a result in this language) a short fit note. */
/* The row's label lines up with the badge's own line (the 28px badge makes this row taller than the others), and stays there when
   the level note wraps to a second line. */
.single-book__specs-row:has(.cefr-chip--square) { align-items: flex-start; }
.single-book__specs-row:has(.cefr-chip--square) dt { display: flex; align-items: center; min-height: 1.75rem; }
.single-book__level-fit { display: inline-flex; align-items: center; margin-left: var(--space-2); font-size: var(--font-size-sm); font-weight: 400; line-height: 1.3; }
.single-book__level-link {
	padding: 0.4em 0;
	font: inherit;
	color: var(--color-coffee);
	background: none;
	border: 0;
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}
.single-book__level-link:hover { text-decoration-color: var(--color-coffee); }
.single-book__level-link:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 3px; }
.single-book__level-fit-note { display: inline-flex; align-items: center; gap: 0.4em; line-height: 1.3; color: var(--color-text-strong); }
.single-book__level-fit-icon { flex: none; }
.single-book__level-fit-note--alert { padding: 0.15em 0.7em; background: var(--color-stone-50); border-radius: var(--border-radius-md); } /* the result screen's notice: neutral, rounded, the info icon */

/* Info-icon tooltip on a spec row's value (currently: Print Length's
   English-equivalent reading-investment comparison — see
   omorphos_book_specs()'s own docblock for why this is a tooltip and not
   its own row). Real <button> (keyboard-focusable) + :hover/:focus-within
   reveal, not a bare [title] attribute — title has no reliable keyboard
   path and never appears on touch at all. */
.single-book__specs-tooltip {
	position: relative;
	display: inline-flex;
}

.single-book__specs-tooltip-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1rem;
	height: 1.1rem;
	padding: 0;
	border: none;
	background: none;
	color: var(--color-muted);
	font-size: var(--font-size-base);
	line-height: 1;
	cursor: help;
}
.single-book__specs-tooltip-trigger:hover,
.single-book__specs-tooltip-trigger:focus-visible {
	color: var(--color-muted);
}

.single-book__specs-tooltip-text {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: 220px;
	padding: var(--space-2) var(--space-3);
	background: var(--color-ink, #1C1917);
	color: var(--color-surface);
	font-size: var(--font-size-xs);
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	border-radius: var(--border-radius);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--transition);
	z-index: 5;
	/* Tap-to-open on touch (no hover) — a focusable trigger + :focus-within
	   on the wrapper covers both mouse hover and keyboard/touch focus. */
	pointer-events: none;
}

.single-book__specs-tooltip:hover .single-book__specs-tooltip-text,
.single-book__specs-tooltip:focus-within .single-book__specs-tooltip-text {
	opacity: 1;
	visibility: visible;
}

.single-book__artifacts {
	margin-bottom: var(--space-8);
}

.single-book__artifacts-heading {
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin-bottom: var(--space-2);
}

.single-book__artifacts-intro {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin-bottom: var(--space-4);
	max-width: 60ch;
}

/* Auto-fill grid, not a single vertical list — a book with a long tail of
   different artifact types (a dozen+ rows) read as an overly long column
   before; this reflows into as many ~220px-minimum columns as the
   container width allows (1 on mobile, 2-3 on a wider details pane),
   collapsing back to one automatically at narrow widths with no media
   query needed. */
.single-book__artifacts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	/* row-gap column-gap — was `var(--space-3) var(--space-5)`, but
	   --space-5 doesn't exist in this theme's scale (3/4/6/8 only), so the
	   column gap silently fell back to nothing and columns read as too
	   tight/cramped. */
	row-gap: var(--space-6);
	column-gap: var(--space-8);
}

.single-book__artifacts-item {
	display: flex;
	align-items: baseline;
	gap: var(--space-3);
	min-width: 0;
}

/* Bold ink-colored text, not a filled color pill — the accent-blue badge
   read as its own separate UI element (a status/tag chip) rather than part
   of the sentence "22× Notebook Entries", which lost readers trying to
   parse what the number even meant. Plain bold text sitting inline with
   the label reads as one unit instead. */
.single-book__artifacts-count {
	flex: 0 0 auto;
	min-width: 2rem;
	text-align: right;
	font-size: var(--font-size-lg);
	font-weight: 700;
	color: var(--color-text);
	font-variant-numeric: tabular-nums;
}

.single-book__artifacts-text {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
}

.single-book__artifacts-label {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-text);
}

.single-book__artifacts-desc {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
}

/* Study materials outline (single-book.php): same heading/intro treatment
   as the artifact highlights above, a plain two-line list with no counts and
   no links. */
.single-book__materials {
	margin-bottom: var(--space-8);
}

.single-book__materials-heading {
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin-bottom: var(--space-2);
}

.single-book__materials-intro {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin-bottom: var(--space-4);
	max-width: 60ch;
}

.single-book__materials-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	row-gap: var(--space-4);
	column-gap: var(--space-8);
}

.single-book__materials-item {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	min-width: 0;
}

.single-book__materials-label {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-text);
}

.single-book__materials-desc {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
}

/* "Buy Now" + "Request a Free Sample" sit side by side as the page's two
   primary purchase-decision actions — see single-book.php's sidebar.
   Natural-width buttons in a centered, wrapping flex row, same shape as
   every other CTA group on the site (.hero__actions,
   .call-to-action__actions) — not stretched to fill the column. An
   earlier version force-stretched both to 100% width, then tried a
   natural-width row, then a "Buy Now" popover — all three didn't land;
   this settled back on full-width/stacked, which was the one version
   reported as fine on its own (the popover interaction was the actual
   problem, not the width). */
.single-book__cta-row {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	margin-bottom: var(--space-6);
}

.retailer-buttons {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.retailer-buttons .btn {
	width: 100%;
	text-align: center;
}

.single-book__sample-btn {
	width: 100%;
	/* A bit of extra breathing room above, on top of .single-book__cta-row's
	   own uniform gap — Request a Free Sample is a different kind of
	   action than Buy/More retailers (reported live: sitting inside the
	   purchase cluster's own spacing made it read as part of that group).
	   Small enough not to look like a mistake if it's ever the only
	   button in the row (no retailer links configured yet). */
	margin-top: var(--space-2);
	/* Same fix as .single-book__buy-btn — "Request a Free Sample" (22
	   characters, longer than any buy-button label) wraps to two lines at
	   the sidebar's narrower widths using the base .btn size. */
	font-size: var(--font-size-sm);
	letter-spacing: 0.03em;
	line-height: 1.2;
}

/* planner-273 — the sample CTA's framing line. Neutrals only (Stone-100
   hairline, Stone-600 text, the Ink outline button): terracotta stays the
   preorder accent, and a second dark/saturated fill would read as a third
   buy button. Weight comes from separation and a stated reason to click,
   not hue. Deliberately small — an earlier boxed card read too large. */
.single-book__sample-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	/* The cta-row's own 12px gap already separates this block from what is
	   above it; the 12px margin it had on top doubled that to 24px (visible
	   as dead space under the affiliate disclosure). Pulled in to 8px total. */
	margin-top: calc(-1 * var(--space-1));
	padding-top: 10px;
	border-top: 1px solid var(--color-border);
}

.single-book__sample-card-lead {
	margin: 0;
	font-size: var(--font-size-xs);
	line-height: 1.35;
	color: var(--color-muted);
}

/* Inside the block the button drops the standalone extra top margin (the
   block's own gap spaces it), goes a little smaller, and takes a bolder
   label. */
.single-book__sample-card .single-book__sample-btn {
	margin-top: 0;
	padding-block: 8px;
	font-size: 0.8125rem;
	font-weight: 600;
}

/* Compact sticky CTA bar (assets/js/sticky-cta-bar.js) — 768–1023px only.
   That range has no sticky sidebar of its own (see the ≥1024px block
   below for why: a tall sticky sidebar crowds a tablet-portrait
   viewport's own height), but it's also a very common "half a desktop
   screen" window width — this restores the "buy button always visible
   while scrolling" benefit via a slim bottom bar instead of the full
   sidebar treatment, shown only once the real CTA row has scrolled out
   of view. Mirrors the actual CTA block (purchase label + button) — not
   a cover thumbnail/title composition, an earlier version that read as a
   different, invented mini-card rather than "the CTA block, compact."
   Hard-gated to this exact range in CSS (not just left to the JS) —
   display:none outside it means the bar literally cannot render
   regardless of what the script does. */
.single-book-sticky-cta {
	display: none;
}

@media ( min-width: 768px ) and ( max-width: 1023.98px ) {
	.single-book-sticky-cta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		/* flex-wrap, not nowrap — label + both buy and sample buttons
		   together can be tight right at the 768px edge; wrapping to a
		   second line beats silently overflowing off-screen. */
		flex-wrap: wrap;
		gap: var(--space-2) var(--space-4);
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 500;
		padding: var(--space-3) var(--container-padding);
		background: var(--color-surface);
		border-top: 1px solid var(--color-border);
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
		/* Hidden by default (both visually and from keyboard focus/AT —
		   visibility:hidden removes it from the tab order, unlike opacity
		   alone) until the real CTA row scrolls out of view. */
		visibility: hidden;
		opacity: 0;
		transform: translateY(8px);
		/* Delay the visibility flip until the opacity/transform transition
		   (150ms, matching --transition) finishes, so it doesn't jump out
		   of the tab order mid-fade. */
		transition: opacity var(--transition), transform var(--transition), visibility 0s linear 150ms;
	}

	.single-book-sticky-cta--visible {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		transition: opacity var(--transition), transform var(--transition);
	}
}

/* Cloned from .single-book__purchase-label, which is styled for sitting
   directly above a full-width stacked button (a small negative
   margin-bottom to hug it) — reset that here since this label instead
   sits beside the button in a horizontal bar. */
.single-book-sticky-cta__label {
	margin: 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Holds both the buy/preorder button and the sample-request button when
   both exist (independent siblings in .single-book__cta-row — a book can
   have a purchase cluster AND a configured sample request at once). */
.single-book-sticky-cta__actions {
	display: flex;
	/* flex-start, not center: a Kindle+ title's buy button has a line under it (the stack below), and centering put the sample
	   button lower than the buy button. Both buttons share one height (below), so their tops and bottoms line up. */
	align-items: flex-start;
	gap: var(--space-2);
	flex-shrink: 0;
}

.single-book-sticky-cta__btn {
	flex-shrink: 0;
	/* One height for the buy and sample buttons: the outline sample button's 2px border made it taller than the filled one. */
	box-sizing: border-box;
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* Real sizing is set inline by sticky-cta-bar.js (width:auto) —
	   .single-book__buy-btn/.single-book__sample-btn are width:100% for
	   their normal full-width sidebar column, and a stylesheet rule here
	   can't reliably out-cascade that (same specificity, source order
	   dependent) the way an inline style always can. */
	white-space: nowrap;
}

/* A Kindle+ title's bar (docs/CLAUDE-kindle-plus.md): the availability sentence and affiliate note at the left, and the buy button
   with a join / buy line under it. */
.single-book-sticky-cta__text {
	flex: 1 1 14rem;
	min-width: 0;
}
.single-book-sticky-cta__avail {
	margin: 0;
	font-size: var(--font-size-sm);
	line-height: 1.3;
	color: var(--color-text);
}
.single-book-sticky-cta__note {
	margin: 2px 0 0;
	font-size: 0.6875rem;
	line-height: 1.3;
	color: var(--color-muted);
}
.single-book-sticky-cta__stack {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
}
.single-book-sticky-cta__under {
	margin: 0;
	font-size: var(--font-size-xs);
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	color: var(--color-text);
}
.single-book-sticky-cta__under a {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.single-book-sticky-cta__under a:hover {
	text-decoration-color: var(--color-coffee);
}

.retailer-buttons__disclosure {
	margin: var(--space-2) 0 0;
	font-size: var(--font-size-xs);
	color: var(--color-muted);
}

/* Shown under the cover in place of the purchase cluster when a book is
   coming_soon and not yet marked available for preorder (single-book.php)
   — same accent-blue treatment and copy source (omorphos_book_release_label())
   as .book-card__release-date's own non-preorder coming_soon branch, so a
   book reads consistently between its card and its own page. */
.single-book__release-notice {
	margin: 0 0 var(--space-2);
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-commerce-text); /* availability messaging */
	text-align: center;
}

/* Small label above the purchase cluster — "Purchase at:" once released,
   or "Available for preorder" while the book is still coming_soon and
   _book_available_for_preorder is checked (single-book.php). Sits inside
   .single-book__cta-row's own flex column/gap, so no margin of its own
   beyond a small margin-bottom to keep it visually attached to the
   buttons it's labeling rather than reading as its own row. */
.single-book__purchase-label {
	margin: 0 0 calc(-1 * var(--space-1)) 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-muted);
}

.single-book__price-line {
	margin: 0;
	font-family: var(--font-sans);
	color: var(--color-text);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--space-1);
}
.single-book__price { font-size: var(--font-size-xl, 1.5rem); font-weight: 700; line-height: 1.1; }
.single-book__price-currency,
.single-book__price-format { font-size: var(--font-size-sm); color: var(--color-muted); }
.single-book__price-note {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-xs, 0.8rem);
	color: var(--color-muted);
}

.single-book__purchase-label--preorder {
	color: var(--color-commerce-text);
}

/* Featured retailer buttons (max 2 — see
   omorphos_get_featured_retailer_links()) + the "More retailers" trigger,
   same full-width/stacked treatment as the sample button above. */
.single-book__buy-btn {
	width: 100%;
	text-align: center;
	/* A dynamic label ("Preorder on Amazon", or a longer retailer name)
	   wraps to two lines at the sidebar's narrower widths using the base
	   .btn size (1rem + 0.06em letter-spacing + 1.5em padding) — smaller
	   size/tracking keeps it on one line in the common case, and a tight
	   line-height keeps a genuine wrap (a very long retailer name) looking
	   deliberate rather than loosely spaced. */
	font-size: var(--font-size-sm);
	letter-spacing: 0.03em;
	line-height: 1.2;
}

/* Preorder state — same rust (--color-accent-new) as the purchase label
   and the book card's own preorder badge/text, completing that visual
   language on the actual CTA instead of leaving it the plain black
   .btn--primary look every other buy button uses. Scoped to this modifier
   class rather than changing .btn--primary itself, which is a sitewide
   button style used well beyond book purchase buttons. */
.single-book__buy-btn--preorder {
	--btn-primary-bg: var(--color-accent-new);
	--btn-primary-fg: #FFFFFF;
	--btn-primary-hover-bg: #963f00; /* ~15% darker than --color-accent-new, same darken-on-hover pattern .btn--primary itself uses */
	--btn-primary-active-bg: #7a3400; /* ~15% darker again than the hover shade, same relationship .btn--primary's own Coffee active state has to its hover — without this override the new sitewide :active rule would fall through to the root's Coffee-press default instead of a darker rust */
}

/* Kindle Unlimited badge — sits directly under the Amazon buy button only
   (single-book.php only renders this on the 'amazon'-platform link), so it
   needs to read as attached to that one button, not as its own row inside
   .single-book__cta-row's flex gap — negative margin-top pulls it snug
   against the button above, same "hug what it's labeling" trick
   .single-book__purchase-label already uses. */
.single-book__ku-badge {
	/* The three footnotes under the buy button (this, the exclusivity line, the affiliate disclosure) share one style:
	   0.6875rem, left-aligned, snug under what they annotate. */
	margin: calc(-1 * var(--space-2)) 0 0;
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	line-height: 1.25;
	font-weight: 400;
	color: var(--color-muted); /* a note, not availability: terracotta is for preorder and availability only */
	text-align: left;
}

/* Kindle+ title (KDP Select), temporary, docs/CLAUDE-kindle-plus.md. The quiet "or buy the ebook" link under the
   main button, the box that offers Amazon's membership, and the "sold only on Amazon" line. */
.single-book__alt-buy {
	margin: calc(-1 * var(--space-2)) 0 0;
	font-size: var(--font-size-sm);
	color: var(--color-text);
	text-align: center;
}
.single-book__alt-buy a,
.single-book__kplus-link {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.single-book__alt-buy a:hover,
.single-book__kplus-link:hover {
	text-decoration-color: var(--color-coffee);
}
.single-book__kplus {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 8px 10px; /* a light inset: the disclosure under it has none, so a deep one made the box read as indented */
	background: var(--color-bg);
	border: 1px solid var(--color-border);
}
.single-book__kplus-label,
.single-book__kplus-text,
.single-book__kplus-note {
	margin: 0;
}
.single-book__kplus-label {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
}
.single-book__kplus-note {
	font-size: 0.6875rem;
	line-height: 1.25;
	color: var(--color-muted);
	text-align: left;
}
.single-book__kplus + .single-book__retailer-disclosure {
	margin-top: 0; /* the disclosure normally hugs the buttons above it (negative margin); after the box that read as unstyled */
}
/* The answer to the "Availability:" label above it: body text, snug under the label. */
.single-book__availability {
	margin: calc(-1 * var(--space-2)) 0 0;
	font-size: var(--font-size-sm);
	line-height: 1.4;
	color: var(--color-text);
}
.single-book__kplus-text {
	font-size: var(--font-size-sm);
	line-height: 1.5;
	color: var(--color-text);
}
.single-book__kplus-link {
	font-size: var(--font-size-sm);
	font-weight: 500;
	padding-block: 6px; /* a real tap target for a text link */
}

/* Plain text link, not a .btn — a full-height button here competed with
   the cover for the sidebar's limited vertical space (the cover flexes
   to fill whatever's left after the CTA row, see .single-book__cover in
   the ≥768px rules below), and "More retailers" is a secondary,
   lower-frequency action that doesn't need equal visual weight with
   Buy/Sample anyway. */
.single-book__more-retailers-btn {
	/* planner-273 — small, right-aligned and tucked under the last buy
	   button (the cta-row's 12px gap pulled in to ~4px) instead of its own
	   centered row: it is a lower-frequency action and was costing a full
	   row of the sidebar's height. A chevron marks it as a link to more. */
	display: block;
	align-self: flex-end;
	width: auto;
	/* Space above, and a 44px-tall hit area, so a thumb aiming at Buy the Ebook
	   can't land on this (and vice versa). */
	margin-top: calc(-1 * var(--space-2)); /* offsets the row gap + the box's own padding: visible gap ~18px, hit box still 44px and clear of the Buy button */
	padding: var(--space-3) var(--space-2);
	min-height: 44px;
	background: none;
	border: none;
	text-align: right;
	font-family: var(--font-sans);
	font-size: var(--font-size-xs);
	color: var(--color-coffee);
	text-decoration: underline;
	cursor: pointer;
}

.retailer-modal__disclosure {
	margin: var(--space-4) 0 0;
	font-size: var(--font-size-xs);
	line-height: 1.4;
	color: var(--color-muted);
}

@media (max-width: 640px) {
	.single-book__more-retailers-btn { margin-top: calc(-1 * var(--space-1)); }
}

.single-book__more-retailers-icon {
	display: inline-block;
	margin-left: 0.2em;
	vertical-align: -1px;
}

.single-book__more-retailers-btn:hover {
	color: var(--color-coffee-hover);
}

.single-book__sandbox-notice {
	/* Sits outside .single-book__cta-row (it renders whether or not that
	   row rendered anything, e.g. a book with only a sandbox_only row and
	   no other purchase option) — needs its own top margin, unlike
	   .single-book__retailer-disclosure above. */
	display: inline-block;
	margin: var(--space-3) 0 0;
}

.single-book__retailer-disclosure {
	/* No margin-top — this now sits inside .single-book__cta-row's own
	   flex column, right after the purchase cluster it's disclosing
	   (moved there from after the whole row, including Request a Free
	   Sample, which it was never actually about). The row's own `gap`
	   already provides spacing; an extra margin here would double up. */
	margin: calc(-1 * var(--space-2)) 0 0; /* planner-273: sits snug under the buttons/link (gap 12px -> 4px) */
	font-size: 0.6875rem;
	line-height: 1.25;
	color: var(--color-muted);
}

/* =========================================================
   "More retailers" modal (single-book.php)
   ========================================================= */

.retailer-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000; /* same layer as the other site modals (.capture-modal-overlay) */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-6);
	background: var(--color-scrim);
	backdrop-filter: blur(2px);
	animation: assessmentOverlayIn 200ms ease forwards; /* same fade/blur/rise as .capture-modal */
}

.retailer-modal-overlay[hidden] {
	display: none;
}

/* Dismissal, shared by the retailer and capture modals: JS adds .is-closing, waits for the animation to end, then hides. */
@keyframes modalOverlayOut {
	from { opacity: 1; }
	to   { opacity: 0; }
}
@keyframes modalCardOut {
	from { opacity: 1; transform: translateY( 0 )    scale( 1 ); }
	to   { opacity: 0; transform: translateY( 8px ) scale( 0.98 ); }
}
.retailer-modal-overlay.is-closing,
.capture-modal-overlay.is-open.is-closing {
	animation: modalOverlayOut 180ms ease forwards;
	pointer-events: none;
}
.retailer-modal-overlay.is-closing .retailer-modal,
.capture-modal-overlay.is-closing .capture-modal {
	animation: modalCardOut 180ms ease forwards;
}

.retailer-modal {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 380px;
	max-height: 80vh;
	overflow: hidden; /* the card never scrolls: only __body does, so the header stays put */
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	box-shadow: 0 24px 64px rgba(0,0,0,0.15);
	animation: assessmentModalIn 250ms ease forwards;
}

.retailer-modal.retailer-modal--wide { max-width: 560px; } /* the recommendations overflow list (planner-91) */

/* Fixed header: title left, close right, a hairline under it. */
.retailer-modal__header {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-4) var(--space-3) var(--space-4) var(--space-6);
	border-bottom: 1px solid var(--color-border);
}

/* The only scrolling region (min-height: 0 lets a flex child shrink below its content). */
.retailer-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: var(--space-4) var(--space-6) var(--space-6);
}

.retailer-modal__close {
	/* Same glyph treatment as .capture-modal__close: a plain 22px x that darkens on hover. */
	flex: none;
	background: none;
	border: none;
	font-size: 1.375rem;
	line-height: 1;
	color: var(--color-muted);
	cursor: pointer;
	padding: var(--space-1);
	transition: color var(--transition);
}

.retailer-modal__close:hover { color: var(--color-text); }

.retailer-modal__title {
	/* Same type as .capture-modal__title (the sample/newsletter modal), so every modal's heading matches. */
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	color: var(--color-text);
	margin: 0;
}

.retailer-modal__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--color-border);
}

.retailer-modal__item {
	border-bottom: 1px solid var(--color-border);
}

.retailer-modal__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-1);
	color: var(--color-text);
	text-decoration: none;
}

.retailer-modal__link:hover {
	color: var(--color-coffee); /* a real link */
}

.retailer-modal__name {
	font-size: var(--font-size-base);
}

.retailer-modal__arrow {
	color: var(--color-muted);
	flex-shrink: 0;
}

.single-book__contributors {
	margin-top: var(--space-8);
	margin-bottom: var(--space-8);
	padding-top: var(--space-8);
	border-top: 1px solid var(--color-border);
}

.single-book__faqs {
	margin-top: var(--space-8);
}

.single-book__faqs-heading {
	font-family: var(--font-sans);
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 var(--space-4);
}

/* Quieter than the shared .search-result-row treatment (search.php) —
   this section sits directly under the book's own authored content and
   shouldn't compete with it for attention, so these overrides are
   scoped to .single-book__faqs only; search.php's own FAQ results are
   untouched. */
.single-book__faqs .search-results__list {
	gap: 0;
}

.single-book__faqs .search-result-row {
	padding: 0.7rem 0;
}

.single-book__faqs .search-result-row__title {
	font-family: var(--font-sans);
	font-weight: 500;
	font-size: 0.9rem;
	line-height: 1.4;
	color: var(--color-text-strong);
}

.single-book__faqs .search-result-row__chevron {
	width: 12px;
	height: 12px;
}

.single-book__faqs .search-result-row__excerpt {
	font-size: 0.8125rem;
	padding-right: var(--space-4);
}

.single-book__faqs-more {
	display: inline-block;
	margin-top: var(--space-3);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.single-book__faqs-more:hover {
	text-decoration-color: var(--color-coffee);
}

/* "More to Read" — inc/related-content.php / template-parts/related-content.php.
   Same section rhythm as .single-book__faqs directly above; also used,
   unscoped, on taxonomy-book_series.php's own bottom slot. */
.related-content {
	margin-top: var(--space-8);
}

.related-content__heading {
	font-family: var(--font-sans);
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 var(--space-4);
}

/* The "Reading in {language}" guide row — deliberately not styled as a
   post card: it links to a whole evergreen page, not one article, so it
   gets its own banded treatment above the grid rather than looking like
   a fourth card among the latest posts. */
.related-content__guide {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	padding: var(--space-4) var(--space-6);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	text-decoration: none;
	margin-bottom: var(--space-6);
}

.related-content__guide-icon {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--color-stone-50);
	color: var(--color-coffee);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.related-content__guide-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.related-content__guide-title {
	font-family: var(--font-serif);
	font-size: var(--font-size-lg);
	font-weight: 500;
	line-height: 1.3; /* was unset (browser default, ~1.15 for Lora) — too
	   tight once this wraps to 2 lines, reported live. Matches
	   .book-card__title's own line-height at the same font-family/size. */
	color: var(--color-text);
}

.related-content__guide-sub {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}

.related-content__guide-cta {
	font-size: var(--font-size-sm);
	font-weight: 500;
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	white-space: nowrap;
	flex-shrink: 0;
}

.related-content__guide:hover .related-content__guide-cta {
	text-decoration-color: var(--color-coffee);
}

.related-content__grid {
	display: grid;
	/* Fixed track counts, not repeat(auto-fit, minmax(...)) — auto-fit
	   collapses empty tracks and lets the remaining 1fr track(s) stretch
	   to fill the row, so a book page with only 1-2 real matches rendered
	   a single card blown up to the full container width (reported live:
	   /books/namui-dungji-natseon-al/, which today only matches Method &
	   Research). Same fixed-column pattern .posts-grid already uses —
	   a card takes its normal share of the row regardless of how many
	   categories actually matched. */
	grid-template-columns: repeat(2, 1fr);
	/* --space-5 doesn't exist in this theme's scale (1/2/3/4/6/8/10/12
	   only — see .posts-grid's own identical fix, a few hundred lines up)
	   — that silently invalidated the whole gap declaration, collapsing
	   it to the CSS default (`normal`, effectively 0) and leaving these
	   cards touching edge to edge with no gutter (reported live against
	   a real screenshot). --space-6 matches .posts-grid's own gap. */
	gap: var(--space-6);
}

@media (min-width: 768px) {
	.related-content__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* One column on a phone, like .posts-grid (planner-532). The «From the blog» panel needs no rule of its own here: after one card it takes the
   one column, after two it already spans the row. */
@media (max-width: 479px) {
	.related-content__grid {
		grid-template-columns: 1fr;
	}
}

/* "From the blog" — fills the short row when one or two posts matched. A quiet Stone-50 panel, not a white card: an
   eyebrow, the blog's categories as a hairline list, and the browse link pinned to the bottom. Spans whatever the
   matched cards leave: 2 columns after one card, 1 after two; the two-column phone grid gives 1 after one card and
   the full row after two. */
.related-content__blog {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding: var(--space-6);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
}
.related-content__blog--after-2 {
	grid-column: 1 / -1;
}
.related-content__blog-eyebrow {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
}
.related-content__blog-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.related-content__blog-list li {
	border-top: 1px solid var(--color-border);
}
.related-content__blog-list a {
	display: block;
	padding: var(--space-3) 0;
	font-family: var(--font-serif);
	font-size: var(--font-size-lg);
	color: var(--color-text-strong);
	text-decoration: none;
}
.related-content__blog-list a:hover {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-underline-offset: 3px;
}
.related-content__blog-cta {
	margin-top: auto;
	font-size: var(--font-size-sm);
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.related-content__blog-cta:hover {
	text-decoration-color: var(--color-coffee);
}
@media (min-width: 768px) {
	.related-content__blog--after-1 {
		grid-column: span 2;
	}
	.related-content__blog--after-2 {
		grid-column: span 1;
	}
}

/* Four posts: the carousel shows three across (same count as the grid) and the fourth scrolls in; two across on phones
   with the next card peeking past the edge. */
.related-content__carousel .asset-carousel__track > * {
	flex: 0 0 max(240px, calc(100% - 96px));
}
@media (min-width: 768px) {
	.related-content__carousel .asset-carousel__track > * {
		flex-basis: calc((100% - 2 * var(--space-4)) / 3);
	}
}

@media (max-width: 767px) {
	/* The base row layout (icon | title+sub | cta, all on one line) doesn't
	   fit a narrow width — the guide-page title (the CTA text) is often a
	   long real headline, and the base rule's `white-space: nowrap` +
	   `flex-shrink: 0` on .related-content__guide-cta refused to let it
	   wrap or shrink, forcing the whole row (and the page) wider than the
	   viewport — reported live as horizontal overflow, with the title
	   squeezed into a one-word-per-line sliver in the leftover space.
	   Stack vertically instead: icon on top, title/sub below it, the link
	   as its own full-width row underneath — direct ask ("put the link
	   underneath and maybe the icon on top"). 767px, not 480 — matches
	   .related-content__grid's own 768px breakpoint just above (this
	   component's real "mobile/tablet" line elsewhere in this file), and
	   480px turned out too narrow to actually trigger while testing in a
	   merely-narrowed desktop window rather than a true phone; the CTA's
	   own content (a full sentence-length page title) needs the room well
	   before 480px regardless of device. */
	.related-content__guide {
		flex-direction: column;
		align-items: flex-start;
	}

	.related-content__guide-cta {
		white-space: normal;
		flex-shrink: 1;
	}
}

/* =========================================================
   Feature Grid — image magnify/lightbox modal
   ========================================================= */

.feature-image-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-6);
	background: rgba(0,0,0,0.75);
	backdrop-filter: blur(2px);
}

.feature-image-lightbox-overlay[hidden] {
	display: none;
}

.feature-image-lightbox {
	position: relative;
	max-width: min(90vw, 1200px);
	max-height: 90vh;
	display: flex;
}

.feature-image-lightbox__img {
	max-width: 100%;
	max-height: 90vh;
	width: auto;
	height: auto;
	border-radius: var(--border-radius);
	box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.feature-image-lightbox__close {
	/* Overlaps the image's top-right corner so it reads as part of the image
	   (was 44px above it, detached). The overlay's own padding leaves room
	   for the overhang. */
	position: absolute;
	top: -14px;
	right: -14px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	z-index: 1;
}

.feature-image-lightbox__close:hover {
	background: var(--color-bg);
}

/* =========================================================
   Homepage — Section headings
   ========================================================= */

.section {
	padding-block: var(--space-12);
}

.section--alt {
	background: var(--color-page);
}

.section__header {
	margin-bottom: var(--space-8);
}

.section__eyebrow {
	font-size: var(--font-size-sm);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-muted); /* Stone-600, not Stone-400 — fails AA at this size/weight */
	font-weight: 600;
	display: block;
	margin-bottom: var(--space-2);
}

.section__title {
	font-size: var(--font-size-2xl);
	margin-bottom: var(--space-3);
}

.section__subtitle {
	font-size: var(--font-size-base);
	color: var(--color-muted);
}

/* =========================================================
   Homepage — Series Overview
   ========================================================= */

.series-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
	/* list-style/padding/margin reset — a no-op when this is a plain <div>
	   (series-list.php's grid mode), needed now that search.php's own
	   --row mode renders it as a real <ul> for list semantics, same as
	   .books-grid already resets for its own <ul> usage. */
	list-style: none;
	padding: 0;
	margin: 0;
}

/* =========================================================
   Asset Carousel — optional left/right-navigable variant of any
   card grid (series-list.php's `layout_mode: 'carousel'` arg, and
   the Asset Cards block's own "Layout" field for assetType=series).
   Generic on purpose — targets whatever card element a list template
   part renders as a direct child, not a per-asset-type class name, so
   the same mechanism works for books/authors/languages later without
   rebuilding it. See assets/js/asset-carousel.js for the scroll/nav
   behavior; this file only owns layout.
   ========================================================= */

.asset-carousel {
	position: relative;
}

.asset-carousel__track {
	display: flex;
	gap: var(--space-4);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	/* No -webkit-overflow-scrolling: touch — that property is a legacy
	   pre-iOS-13 momentum-scroll shim (native overflow scrolling has been
	   smooth by default since), and combining it with mask-image below is
	   a well-documented iOS Safari bug: the masked edge fade either freezes
	   or stops repainting mid-swipe. Found live: "that doesn't work on
	   mobile" — the fade wasn't updating during a real touch swipe. */
	scrollbar-width: none; /* Firefox — buttons + swipe are the controls, not a visible scrollbar */
	/* A card comes to rest clear of the 32px edge fade below, not under it (found on the CEFR cards: the card
	   in view had its left edge faded out). The first card at scroll 0 still sits flush — no fade there. */
	scroll-padding-inline: 32px;
	padding-bottom: 2px;   /* keeps card hover box-shadow from clipping against overflow-x */
}

.asset-carousel__track::-webkit-scrollbar {
	display: none;
}

/* Every direct child of the track (whatever card partial the list
   template part rendered) gets a fixed carousel width instead of the
   grid's own column sizing — deliberately untyped so this rule doesn't
   need updating per asset type. */
.asset-carousel__track > * {
	scroll-snap-align: start;
	flex: 0 0 280px;
	/* Cards in a row are one height (the tallest). A card whose own rule says height: 100% (.book-card) has a percentage of
	   an auto-height track, which the flex row does not stretch, so each card kept its own content height. `auto` lets the
	   row's default stretch apply; the card is a flex column and fills it. */
	height: auto;
}

/* Room after the last card so the arrows can page any card to the first position (asset-carousel.js sets the value
   from the track and card widths; 0 when the cards fit). */
.asset-carousel__track > :last-child {
	margin-right: var(--asset-carousel-tail, 0px);
}

/* Edge fade — found live: a trailing card sliced flat at the container's
   own edge with no visual cue read as a broken/clipped layout, not "more
   content, keep scrolling." Fades whichever edge still has content beyond
   it (asset-carousel.js toggles these three modifier classes off actual
   scroll position); a track that doesn't overflow at all gets no mask, so
   a short row of cards stays at full opacity. Kept conservative on colors —
   `mask-image` fades to transparent regardless of the section's own
   background, which reads correctly against every current use (a uniform
   page/section background, not a patterned one). */
.asset-carousel--scrollable .asset-carousel__track {
	-webkit-mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent);
	mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent);
}

.asset-carousel--scrollable.asset-carousel--at-start .asset-carousel__track {
	-webkit-mask-image: linear-gradient(to right, black calc(100% - 32px), transparent);
	mask-image: linear-gradient(to right, black calc(100% - 32px), transparent);
}

.asset-carousel--scrollable.asset-carousel--at-end .asset-carousel__track {
	-webkit-mask-image: linear-gradient(to left, black calc(100% - 32px), transparent);
	mask-image: linear-gradient(to left, black calc(100% - 32px), transparent);
}

.asset-carousel__nav {
	/* The shared advance control: tall pill, transparent at rest, solid on
	   hover/focus (same geometry as the reader and homepage demo; see
	   omorphos_advance_chevron_svg()). */
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 88px;
	border-radius: 999px;
	border: none;
	background: transparent;
	color: var(--color-text);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	z-index: 2;
	transition: background var(--transition), box-shadow var(--transition), color var(--transition);
}

.asset-carousel__nav:hover,
.asset-carousel__nav:focus-visible {
	background: var(--color-surface);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.asset-carousel__nav:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 2px;
}

.asset-carousel__nav[aria-disabled='true'] {
	opacity: 0.35;
	cursor: default;
	box-shadow: none;
	pointer-events: none;
}

.asset-carousel__nav svg {
	display: block;
}

/* Nothing to scroll (every card already fits) means both arrows would sit
   disabled: hide them instead. asset-carousel.js adds --scrollable once it
   measures an overflowing track. */
.asset-carousel:not(.asset-carousel--scrollable) .asset-carousel__nav {
	display: none;
}

/* Arrows keep their full 32px and hang in a gutter outside the module, never over a card. Wider than 1260px the
   window's own margin is that gutter (arrows at -40px). Narrower, the module itself is pulled in 36px a side so the
   gutter exists inside the container's 20px padding: arrow 32px + 4px gap. More to Read narrows as one piece (title,
   banner and cards share the new edge, `.related-content--carousel`) instead of the cards alone. Touch devices hide
   the arrows and get no gutter. */
.asset-carousel__nav--prev {
	left: -36px;
}

.asset-carousel__nav--next {
	right: -36px;
}

.asset-carousel--scrollable,
.related-content--carousel {
	margin-inline: 36px;
}

.related-content--carousel .asset-carousel--scrollable {
	margin-inline: 0;
}

@media (min-width: 1260px) {
	.asset-carousel__nav--prev {
		left: -40px;
	}

	.asset-carousel__nav--next {
		right: -40px;
	}

	.asset-carousel--scrollable,
	.related-content--carousel {
		margin-inline: 0;
	}
}

/* Touch devices — arrow buttons hidden in favor of native touch-swipe
   scroll-snap: a tap target crowded against the page edge is a worse control
   than the swipe gesture it would duplicate. Keyed on the input device, not
   the viewport width: a desktop browser in a narrow window still has no
   horizontal-scroll gesture for many mouse users, so it keeps the arrows
   whenever the track overflows (hidden only when nothing scrolls, above). */
@media (hover: none) and (pointer: coarse) {
	.asset-carousel__nav {
		display: none;
	}

	.asset-carousel--scrollable,
	.related-content--carousel {
		margin-inline: 0;
	}
}

.series-card {
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	background: var(--color-surface); /* white, matches the page — .book-card now
	   uses the same token (2026-08-13), no more beige/white split between them */
	overflow: hidden; /* clips the thumbnail (below) to the card's own rounded
	   corners — same convention .book-card already uses for .book-card__cover,
	   flush at the top edge rather than inset with its own padding/radius. */
	transition: box-shadow var(--transition);
}

.series-card:hover {
	box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* Card thumbnail — generated via the Planner drawer's Image Generator
   utility (_series_card_image_id). Absent by default (see
   content-series-card.php's own comment) — no layout reserved for it when
   unset, so an unclassified series' card still reads exactly as it did
   before this field existed: .series-card__body alone carries the padding
   in that case, same as .series-card itself did pre-thumbnail. */
.series-card__thumbnail-link {
	display: block;
}

.series-card__thumbnail {
	display: block;
	width: 100%;
	aspect-ratio: 1200 / 675;
	object-fit: cover;
}

.series-card__body {
	padding: var(--space-6);
}

.series-card__name {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	font-weight: 700;
	margin-bottom: var(--space-2);
}

.series-card__name a {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.series-card__name a:hover {
	color: var(--color-coffee);
	text-decoration-color: var(--color-coffee);
}

.series-card__translation {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	font-style: italic;
	margin-top: calc( var(--space-2) * -1 );
	margin-bottom: var(--space-2);
}

.series-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
	margin-bottom: var(--space-3);
}

.series-card__description {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin-bottom: var(--space-4);
	/* Line-clamp, direct ask (2026-09-27) — cards were rendering at wildly
	   different heights depending on how long an author happened to write
	   a given series' description, and a tall card could run past the
	   viewport height. Truncated with an ellipsis is fine here on purpose
	   — the card's own job is to get a click through to the series page,
	   not to be read in full on the card itself. */
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.series-card__meta {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	letter-spacing: 0.04em;
}

/* Row layout — dense single-line list row (search results' own "Series"
   section, mirroring content-book-card.php's own 'row' layout/CSS almost
   exactly: small flush-left thumbnail, title, one meta line, stretched-link
   overlay on the title so the whole row is the click target). See
   .series-grid--row .series-grid__item + .series-grid__item below for the
   hairline separators (same books-grid--row convention: scoped to the <li>
   siblings, not the <article>s directly, since each row is its own list
   item). */
/* Doubled class on purpose (same as .books-grid.books-grid--row): the
   >=1024px `.series-grid { repeat(auto-fill, minmax(280px, 1fr)) }` rule sits
   later in this file at the same specificity and would otherwise win, laying
   two series out side by side instead of as a single-column list. */
.series-grid.series-grid--row {
	grid-template-columns: 1fr;
	gap: 0;
}

.series-card--row {
	display: flex;
	flex-direction: row;
	align-items: center;
	border: none;
	border-radius: 0;
	background: none;
	position: relative; /* anchors the title anchor's ::after stretched-link overlay below */
}

.series-card--row:hover {
	box-shadow: none;
}

.series-grid--row .series-grid__item + .series-grid__item {
	border-top: 1px solid var(--color-border);
}

.series-card--row .series-card__name a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.series-card--row:hover .series-card__name a {
	text-decoration-color: var(--color-coffee);
}

.series-card--row:focus-within {
	outline: 2px solid var(--color-coffee);
	outline-offset: 2px;
}

.series-card--row .series-card__thumbnail-link,
.series-card--row .series-card__thumbnail {
	width: 44px;
	flex: 0 0 44px;
	height: 44px;
	margin: var(--space-3) 0;
	align-self: flex-start;
	border-radius: 0;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.series-card--row .series-card__body {
	padding: var(--space-3) 0 var(--space-3) var(--space-4);
}

.series-card--row .series-card__row-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-2);
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	margin: 0;
}

.series-card--row .series-card__row-meta-item:not(:first-child)::before {
	content: '\00b7';
	margin-right: var(--space-2);
}

.series-card--row .series-card__row-meta-item--secondary {
	color: var(--color-muted);
}

/* =========================================================
   Homepage — Learning Approach
   ========================================================= */

.principles-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8);
}

.principle-card {
	text-align: center;
}

.principle-card__icon {
	font-size: 2.5rem;
	margin-bottom: var(--space-4);
	display: block;
}

.principle-card__title {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	margin-bottom: var(--space-3);
}

.principle-card__description {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	line-height: 1.7;
}

/* =========================================================
   Taxonomy Archive Header
   ========================================================= */

/* =========================================================
   Breadcrumbs (inc/breadcrumbs.php) — rendered inside
   .taxonomy-header/.page-hero (their own flex `gap` already spaces it
   from the eyebrow below, no margin needed there) and directly inside
   single.php/single-book.php's plain-block containers (margin-bottom
   below handles spacing there instead — the small doubled gap this
   creates in the flex contexts reads fine as slightly more separation
   from the title, not a bug).
   ========================================================= */

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin-bottom: var(--space-2);
}

/* single.php/single-book.php's containers are plain block flow (no flex
   `gap` doing the spacing the way .taxonomy-header/.page-hero__inner
   already do), so .breadcrumbs' own small default margin read as too
   tight against the eyebrow/title right below it — direct feedback,
   screenshot showed the trail nearly touching "NEWS & RELEASES." Bumped
   just for these two contexts rather than raising the shared default,
   which would double up with the flex-gap contexts' existing spacing. */
.single-post__container .breadcrumbs,
.single-book .breadcrumbs,
.page-doc__container .breadcrumbs {
	margin-bottom: var(--space-6);
}

.breadcrumbs__link {
	color: var(--color-muted);
	text-decoration: none;
}

.breadcrumbs__link:hover {
	color: var(--color-coffee);
	text-decoration: underline;
}

.breadcrumbs__separator {
	color: var(--color-stone-400);
}

.breadcrumbs__current {
	color: var(--color-text);
	font-weight: 500;
}

.taxonomy-header {
	padding-block: var(--space-8) var(--space-6);
	background: var(--color-page);
	border-bottom: 1px solid var(--color-border);
}

.taxonomy-header .container {
	--taxonomy-header-gap: 0.875rem; /* also the text column's gap when the header has an image (.taxonomy-header__text) */
	display: flex;
	flex-direction: column;
	gap: var(--taxonomy-header-gap);
}

.taxonomy-header__eyebrow {
	font-size: var(--font-size-sm);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-muted);
	font-weight: 600;
	margin: 0;
}

.taxonomy-header__title {
	font-size: var(--font-size-3xl);
	margin: 0;
}

.taxonomy-header__romanization {
	font-size: var(--font-size-lg);
	font-weight: 400;
	color: var(--color-muted);
	margin-left: 0.35em;
}

.taxonomy-header__subtitle {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	font-style: italic;
	margin: var(--space-1) 0 0;
}

.taxonomy-header__description {
	font-size: var(--font-size-base);
	color: var(--color-muted);
	max-width: 680px;
	margin: 0;
}

/* =========================================================
   Page Content
   ========================================================= */

.page-content {
	padding-block: var(--space-12);
}

.entry-header {
	margin-bottom: var(--space-8);
}

.entry-title {
	font-size: var(--font-size-3xl);
}

.entry-content {
	max-width: 720px;
}

.entry-content--full {
	max-width: none;
	/* A regular Page (page.php) gets its own bottom breathing room from
	   the .page-content article wrapper (padding-block: var(--space-12))
	   below — but the three templates using entry-content--full
	   (front-page.php's authored-homepage branch, page-language.php,
	   templates/full-width.php) skip that wrapper entirely, going
	   straight from this div to the footer. The last block (often a
	   full-bleed dark/tinted section) butted directly against the
	   footer with zero gap. padding-bottom only, not padding-block —
	   these pages typically open with a hero that wants to sit flush
	   under the header, so adding top padding here would undo that. */
	padding-bottom: var(--space-12);
}

/* page-series.php — direct correction, 2026-09-27: two earlier attempts
   here both added bottom padding to .page-series-main itself (flush
   .lang-switcher-bar against the footer), on the assumption that gap was
   the missing one. Wrong on both passes — the user's own annotated
   screenshot (an X over that footer-adjacent gap, a bracket pointing up
   at "More to Read") made the actual target explicit: .lang-switcher-bar
   is a bordered/tinted utility strip (border-top + background: below)
   that's SUPPOSED to sit flush against the footer, the same way it does
   everywhere else this bar appears — the real missing gap is ABOVE it,
   between the "More to Read" related-content block and this bar, which
   currently abut with zero space between them. Scoped to this one
   template (`.page-series-main .lang-switcher-bar`, not the bar class
   itself) for the same reason as before: .lang-switcher-bar is shared
   with page-language.php, which reaches it through different markup and
   must not be affected. */
.page-series-main .lang-switcher-bar {
	margin-top: var(--space-12);
}

/* Same gap on the Learn pages (page-language.php, planner-468): «More to Read»'s cards otherwise sit on the bar's top
   rule. Only when the section rendered (`:has`), so a language with no guide and no posts adds no empty space. */
.page-language-related:has(.related-content) {
	padding-bottom: var(--space-12);
}

/* Above it, the page content's own bottom padding (48px), its section's (48px) and the heading's margin (32px) stacked to
   128px (John, 9 Nov). The section drops its bottom padding when the section follows, and the heading sits 16px below,
   so the content ends 64px above «More to Read». */
.page-content-section:has(+ .page-language-related .related-content) {
	padding-bottom: 0;
}

.page-language-related .related-content {
	margin-top: var(--space-4);
}

/* One gap between the blocks on a Learn page (page-language.php, planner-468, John 9 Nov): 64px from the hero to the first
   block and from each block to the next, the same as the gap above «More to Read». The gaps used to depend on which blocks
   carry their own 48px padding (the level cards and "How you're supported" do, the feature grids and book cards do not), so
   they ran 137, 94, 32, 80 and 80px. Here every block loses its own vertical padding and takes one top margin. The first 64px is the hero's
   bottom padding plus the section's top padding: 40 + 24 from 640px, where the hero's padding grows, and 24 + 40 below it (the hero
   is 16px tighter there; John, 9 Nov: phones too). Scoped by the template's body class, so the same
   blocks on other pages keep their padding. */
.page-template-page-language .page-content-section {
	padding-top: var(--space-10);
}

@media ( min-width: 640px ) {
	.page-template-page-language .page-content-section {
		padding-top: var(--space-6);
	}
}

/* `.entry-content.entry-content--full` (three classes) so a block's own top margin cannot win by loading later: the
   call-to-action block's `.gt-call-to-action-block.variant-default` sets `margin-block-start: 22px` at two classes. */
.page-template-page-language .entry-content.entry-content--full > * {
	margin-top: var(--space-16);
	padding-top: 0;
	padding-bottom: 0;
}

.page-template-page-language .entry-content.entry-content--full > :first-child {
	margin-top: 0;
}

/* Block gap — theme.json sets --wp--style--block-gap (2rem).
   Zero bottom margins so browser defaults don't stack with it.
   First child gets no top gap — true for page-language.php and
   templates/full-width.php, the other two .entry-content--full
   consumers, which are meant to sit flush under the header. The
   homepage is the one exception: see the .home rule below.

   The bottom-margin zeroing rule is `!important`, deliberately — found
   live, 2026-09-08: the homepage's own hero row (a wp:columns block) had
   a hand-set `margin-bottom: 4em` added directly via WordPress core's
   per-block "Advanced → Additional CSS" support, which silently defeated
   the "no block contributes its own bottom margin" invariant this
   comment already documented, since a per-block custom-CSS class renders
   no more specific than this bare selector and can win the cascade
   purely on source order — collapsing with the next block's own
   margin-block-start to produce a 64px gap instead of the uniform 32px
   every other block-to-block gap on the page uses. `margin-block-start`
   on a non-first child is deliberately left alone (no `!important`) — an
   editor can still intentionally widen the gap before one specific
   section; only the "no block contributes its own bottom margin"
   invariant is hardened. See omorphos-books' Product Enhancement
   `planner-151` for the original report. */
.entry-content > * {
	margin-block-end: 0 !important;
}
.entry-content > * + * {
	margin-block-start: var(--wp--style--block-gap, 2rem);
}

/* Homepage only — the hero row needs real breathing room under the
   header, unlike the other two .entry-content--full consumers above,
   which are meant to sit flush. This was previously only achieved by a
   hand-set per-block custom-CSS value on the homepage's own hero-row
   block (`margin-top: 3em`) — kept at the exact same 48px/--space-12
   visual, but now driven by real, git-tracked theme CSS scoped to
   `.home` specifically, not a one-off content-level hack that only this
   one page happened to carry. `.home` is the WP-core body class present
   whenever is_front_page() is true, regardless of which page template
   is assigned — reliable here since page-language.php/full-width.php
   pages never carry it. */
.home .entry-content--full > *:first-child {
	margin-block-start: var(--space-12);
}

/* Consecutive paragraphs need tighter spacing than the full block gap. */
.entry-content > p + p {
	margin-block-start: var(--space-4);
}

/* FTC affiliate disclosure — rendered at the end of a post/page's own
   content (omorphos_render_affiliate_disclosure(), inc/affiliate-disclosure.php)
   when any component on the page flagged an affiliate link (e.g. the
   Recommendations block). Was previously squeezed into the sitewide
   footer's three-way flex row, styled with .footer-copy's copyright-line
   contrast (--color-stone-3, ~1.3:1 against white — functionally
   invisible for a full sentence) — moved here (2026-08-14, direct
   request) so it reads as belonging to the content above it, with real
   contrast of its own. Note: .footer-copy's own --color-stone-3 was
   later fixed too (2026-08-17, reported live) — this move still stands
   on its own merits (belongs with the content it discloses about), but
   the contrast reasoning above is now historical, not a live problem. */
.affiliate-disclosure {
	margin: var(--space-6) 0 0;
	padding-top: var(--space-4);
	border-top: 1px solid var(--color-border);
	font-size: var(--font-size-sm);
	font-style: italic;
	color: var(--color-muted);
}

/* Headings: larger gap above, tighter gap below their content.
   Font-size comes from the base h1-h6 scale now (see top of file) — these
   were previously the only place h2/h3 got sized at all, which meant a
   wp-block-heading outside .entry-content fell back to unstyled browser
   defaults. Kept scoped here for the margin only. */
.entry-content > h2,
.entry-content > .wp-block-heading:is(h2) {
	margin-block-start: var(--space-12);
}
.entry-content > h3,
.entry-content > .wp-block-heading:is(h3) {
	margin-block-start: var(--space-8);
}

/* Images */
.entry-content img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Lists */
.entry-content ul,
.entry-content ol {
	padding-inline-start: var(--space-6);
}
.entry-content li + li {
	margin-block-start: var(--space-2);
}

/* =========================================================
   Author Card
   ========================================================= */

.author-card {
	display: flex;
	gap: var(--space-4);
	align-items: flex-start;
}

.author-card + .author-card {
	margin-top: var(--space-6);
	padding-top: var(--space-6);
	border-top: 1px solid var(--color-border);
}

.author-card__avatar {
	flex-shrink: 0;
}

.author-card__avatar img {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
}

.author-card--small .author-card__avatar img {
	width: 40px;
	height: 40px;
}

.author-card__name {
	font-weight: 700;
	margin: 0 0 var(--space-1);
	display: flex;
	align-items: baseline;
	gap: var(--space-2);
	flex-wrap: wrap;
}

.author-card__name a {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.author-card__name a:hover {
	color: var(--color-coffee);
	text-decoration-color: var(--color-coffee);
}

.author-card__role {
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.author-card__meta {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0 0 var(--space-2);
}

.author-card__bio {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: var(--space-2) 0 var(--space-3);
	line-height: 1.6;
}

.author-card__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

.author-card__link {
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-coffee);
}

/* =========================================================
   No Results
   ========================================================= */

.no-results {
	padding: var(--space-12);
	text-align: center;
	color: var(--color-muted);
}

/* Book catalog's own filtered no-results state (S2/S3/S4/S5 — see
   inc/catalog-no-results.php) — a real heading + explanation, not the
   plain centered .no-results pattern the other archive pages still use.
   Left-aligned, matching the books-grid it replaces. */
.catalog-no-results {
	padding: var(--space-8) 0;
	max-width: 60ch;
}

/* No font-size/weight/family override — a bare h2 already matches
   .omo-recommendations__heading's own size exactly (both inherit the
   sitewide bare heading scale, style.css's own h1-h6 rules), so the two
   headings on this page (this one, then "You might like these instead"
   below it) read as the same visual weight instead of two different
   sizes. Only margin is this component's own concern. */
.catalog-no-results__heading {
	color: var(--color-text);
	margin: 0 0 var(--space-2);
}

.catalog-no-results__body {
	color: var(--color-muted);
	margin: 0 0 var(--space-6);
}

.catalog-no-results__suggestions {
	list-style: none;
	margin: 0 0 var(--space-6);
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.catalog-no-results__suggestions li {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}

/* S1's upcoming-books list — plain text, no links or cover art (these are
   draft/private posts with no public permalink to send anyone to — same
   "nameable but unlinked" convention content-book-card.php's own
   $is_private branch already uses). */
.catalog-no-results__upcoming {
	list-style: none;
	margin: 0 0 var(--space-6);
	padding: 0;
}

.catalog-no-results__upcoming li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--space-2) var(--space-3);
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--color-border);
}

.catalog-no-results__upcoming-title {
	font-family: var(--font-serif);
	font-weight: 700;
	color: var(--color-text);
}

.catalog-no-results__upcoming-meta {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}

.catalog-no-results__upcoming-status {
	margin-left: auto;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	white-space: nowrap;
}

/* =========================================================
   404 Page
   ========================================================= */

.error-404__content {
	padding-block: var(--space-4) var(--space-16);
}

/* Rendered inside .taxonomy-header's own container (via page-header.php's
   after_html slot) — that container is already flex-column with a
   consistent gap between eyebrow/title/description/this, so no extra
   margin is needed here, just the row layout for the buttons themselves. */
.error-404__cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

/* Same pill-with-icon shape as the header's former inline search
   (replaced by the overlay button in planner-538), always visible (this
   is the page's own primary search entry point) and sized up accordingly.
   Shared by template-parts/inline-search-form.php — used on 404.php and
   search.php, not scoped to either page despite the class names' origin. */
.inline-search-form {
	display: flex;
	align-items: center;
	max-width: 480px;
	margin-bottom: var(--space-6);
	border: 2px solid var(--color-border);
	border-radius: var(--border-radius);
	background: var(--color-surface);
	transition: border-color var(--transition);
}

.inline-search-form:focus-within {
	border-color: var(--color-muted);
}

.inline-search-form__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border: none;
	background: transparent;
	color: var(--color-muted);
	cursor: pointer;
	transition: color var(--transition);
}

.inline-search-form__icon:hover,
.inline-search-form:focus-within .inline-search-form__icon {
	color: var(--color-muted);
}

.inline-search-form__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.9em 1em 0.9em 0;
	border: none;
	background: transparent;
	font-size: var(--font-size-lg);
	font-family: var(--font-sans);
	color: var(--color-text);
}

.inline-search-form__input:focus {
	outline: none;
}

/* =========================================================
   Hero — mobile: single column
   ========================================================= */

.hero {
	border-bottom: 1px solid var(--color-border);
}

.hero__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8);
	padding-top: 2rem;
	padding-bottom: 3rem;
}

.hero__title {
	font-family: var(--font-serif);
	font-size: clamp(1.875rem, 6vw, 2.625rem);
	font-weight: 300;
	font-style: italic;
	line-height: 1.18;
	letter-spacing: -0.01em;
	color: var(--color-text);
	margin: 0 0 1.5rem;
}

.hero__title strong {
	font-weight: 500;
	font-style: normal;
}

/* Typewriter cursor — only visible once JS adds .is-animating */
.hero__lang-word.is-animating::after {
	content: '|';
	font-weight: 300;
	font-style: italic;
	color: var(--color-muted);
	margin-left: 1px;
	animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0; }
}

.hero__description {
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	font-weight: 300;
	line-height: 1.8;
	color: var(--color-muted);
	margin: 0 0 1.125rem;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
	margin-top: 2rem;
}

.hero__text-link {
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--color-muted);
	text-decoration: none;
	transition: color var(--transition);
}

.hero__text-link:hover {
	color: var(--color-text);
}

/* Language panel — mobile: horizontal chips below copy */
.hero__languages {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	background: var(--color-page);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	width: 100%;
	container-type: inline-size;
	container-name: lang-panel;
}

/* Hide the region label when the panel is too narrow to show it cleanly.
   The region stays in the <a title> attribute for a11y/tooltip coverage. */
@container lang-panel (max-width: 240px) {
	.lang-chip__region {
		display: none;
	}
}

.hero__languages-label {
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--color-muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0;
}

.hero__lang-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Active chip set by JS */
.lang-chip.is-active {
	border-color: var(--color-text);
	background: var(--color-bg);
	font-weight: 500;
}
.lang-chip__region {
	font-size: 0.6875rem;
	text-transform: uppercase;
	color: var(--color-muted);
}

/* =========================================================
   Pull quote band
   ========================================================= */

.pull-quote-band {
	padding: 3rem 0;
	border-bottom: 1px solid var(--color-border);
}

.pull-quote-band__inner {
	display: grid;
	grid-template-columns: 3px 1fr;
	gap: 1.5rem;
	align-items: start;
}

.pull-quote-band__rule {
	width: 3px;
	min-height: 60px;
	align-self: stretch;
	background: var(--color-stone-3);
	border-radius: 2px;
}

.pull-quote-band__text {
	font-family: var(--font-serif);
	font-size: 1.125rem;
	font-weight: 400;
	font-style: italic;
	line-height: 1.55;
	color: var(--color-text);
	margin: 0 0 1.25rem;
}

.pull-quote-band__attribution {
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-stone-400);
	margin: 0;
}

/* =========================================================
   What we do — mobile: single column, nav hidden
   ========================================================= */

.what-we-do {
	border-bottom: 1px solid var(--color-border);
}

.what-we-do__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

.what-we-do__nav {
	display: none;
}

.what-we-do__nav-label {
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-stone-400);
	margin: 0 0 1.25rem;
}

.what-we-do__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.what-we-do__nav-link {
	display: block;
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--color-muted);
	text-decoration: none;
	padding: 5px 0 5px 12px;
	border-left: 2px solid transparent;
	transition: color var(--transition), border-color var(--transition);
}

.what-we-do__nav-link:hover,
.what-we-do__nav-link.is-active {
	color: var(--color-text);
	border-left-color: var(--color-text);
}

.what-we-do__heading {
	font-family: var(--font-serif);
	font-size: 1.625rem;
	font-weight: 400;
	font-style: italic;
	line-height: 1.2;
	color: var(--color-text);
	margin: 0 0 1.5rem;
}

.what-we-do__copy {
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	font-weight: 300;
	line-height: 1.85;
	color: var(--color-muted);
	margin: 0 0 1.125rem;
}

.differentiators {
	margin-top: 2rem;
}

.differentiator {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 1.25rem;
	align-items: start;
	padding: 1.25rem 0;
	border-top: 1px solid var(--color-border);
}

.differentiator:last-child {
	border-bottom: 1px solid var(--color-border);
}

.differentiator__num {
	font-family: var(--font-serif);
	font-size: 0.8125rem;
	font-style: italic;
	color: var(--color-muted);
	padding-top: 2px;
}

.differentiator__title {
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text);
	margin: 0 0 0.3125rem;
}

.differentiator__desc {
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 300;
	line-height: 1.7;
	color: var(--color-muted);
	margin: 0;
}

/* =========================================================
   Upcoming Releases (rebuilt 2026-08-16 from a full component spec —
   three columns: language · title+meta · status/action. Reuses the
   language badge helper, the CTA button classes (terracotta override
   for the preorder button only — see call-to-action.css's own LAYER 1
   docblock for why a token override, not a descendant background rule,
   is the only safe way to recolor a CTA button), and
   .single-book__romanization's own convention for the romanized-title
   span. Responds to its own container, not the viewport — same
   container-query convention the homepage language panel already
   established — since this component can end up in a narrower column
   later and a viewport query would get that wrong.
   ========================================================= */

.upcoming-releases {
	container-type: inline-size;
	container-name: upc;
}

/* Tighter than the sitewide .section__header default (--space-8/32px) —
   direct ask: the header should flow into the list, not sit at arm's
   length from it the way a section-with-its-own-visual-frame needs. */
.upcoming-releases .section__header {
	margin-bottom: var(--space-4);
}

/* No border-top on the list itself (removed, was 1px solid var(--color-border))
   — the first row flows directly off the header instead of sitting behind
   its own opening rule. Each row's own border-bottom still divides the
   rows from each other and closes off the last one. */

.upcoming-row {
	display: grid;
	grid-template-columns: 136px minmax(0, 1fr) 200px;
	gap: var(--space-6);
	padding: var(--space-4) 0;
	border-bottom: 1px solid var(--color-border);
	line-height: 1.4;
	align-items: center;
}

/* The last row sits above the Browse button; no rule under it. */
.upcoming-releases__list > .upcoming-row:last-child {
	border-bottom: 0;
}

/* justify-self:start (not stretch, the grid default for an item's INLINE
   axis — align-self only controls the block/cross axis, which was the
   wrong property entirely for "don't stretch this item's width") keeps
   the language badge sized to its own content, never the full width of
   its grid column, at every step including the single-column stack
   below (confirmed live: align-self alone left it stretched there). */
.upcoming-row__language {
	display: flex;
	justify-self: start;
}

.upcoming-row__identity {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.upcoming-row__title-line {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	flex-wrap: wrap;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.upcoming-row__title-line:hover .upcoming-row__title,
.upcoming-row__title-line:focus-visible .upcoming-row__title {
	text-decoration: underline;
}

.upcoming-row__title {
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--color-text);
	margin: 0;
}

.upcoming-row__romanization {
	font-family: var(--font-serif);
	font-size: 0.9375rem;
	font-weight: 400;
	color: var(--color-muted);
}

.upcoming-row__meta {
	font-size: 0.9375rem;
	color: var(--color-muted);
}

.upcoming-row__status {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	text-align: right;
}

.upcoming-row__date {
	font-size: 0.9375rem;
	color: var(--color-muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.upcoming-row__date--preorder {
	color: var(--color-commerce-text);
	font-weight: 500;
}

/* Terracotta preorder button — the token is overridden, not a descendant
   background rule, so the CTA architecture's whole point (nothing can
   out-specify the button rules, see call-to-action.css's own LAYER 3
   docblock) stays intact for a button used outside the CTA block itself. */
.upcoming-row__status .call-to-action__button-primary {
	--cta-fill-bg: var(--color-terracotta-ink);
	--cta-fill-fg: #FFFFFF; /* white on the terracotta fill, as in light: the default is the dark-mode text on a tan fill */
	--cta-fill-bg-hover: #9E4022;
	--cta-fill-bg-active: #8A3A1E;
}

@container upc (max-width: 44rem) {
	/* Real grid placement, not display:contents — .upcoming-row__language
	   is a SIBLING of .upcoming-row__identity in the DOM, not an
	   ancestor of .upcoming-row__title-line, so collapsing it with
	   display:contents can never nest the badge inside the title line;
	   it only promotes the badge to an orphaned grid item that the
	   browser auto-places into whatever cell is left, which is exactly
	   the broken layout this replaces (confirmed live). Language stacks
	   above title/meta in column 1; status spans both of those rows in
	   column 2, vertically centered. */
	.upcoming-row {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto auto;
		row-gap: 6px;
		column-gap: 20px;
	}
	.upcoming-row__language {
		grid-column: 1;
		grid-row: 1;
	}
	.upcoming-row__identity {
		grid-column: 1;
		grid-row: 2;
	}
	.upcoming-row__status {
		grid-column: 2;
		grid-row: 1 / 3;
		align-self: center;
	}
}

@container upc (max-width: 28rem) {
	.upcoming-row {
		grid-template-columns: 1fr;
		grid-template-rows: none;
		gap: var(--space-2);
		align-items: start;
	}
	/* Reset the 44rem step's explicit placement back to plain document
	   order now that there's only one column — otherwise .upcoming-row__status's
	   own grid-column:2/grid-row:1/3 from that query (still active here,
	   container queries don't behave like an if/else chain) would target
	   a column that no longer exists. */
	.upcoming-row__language,
	.upcoming-row__identity,
	.upcoming-row__status {
		grid-column: 1;
		grid-row: auto;
	}
	.upcoming-row__status {
		/* Date above the button, reversing desktop order — stacked and
		   left-aligned, an action reads better last, and it puts the tap
		   target at the bottom of the row. */
		align-self: start;
		flex-direction: column-reverse;
		align-items: flex-start;
		text-align: left;
		gap: var(--space-2);
	}
	/* --sm computes to ~36px tall, under the 44px touch-target minimum —
	   this is the one place the block shouldn't inherit the small size. */
	.upcoming-row__status .call-to-action__button-primary {
		--cta-btn-padding: 12px 24px;
		--cta-btn-font-size: 1rem;
	}
}

.upcoming-cta {
	text-align: center;
	padding-top: var(--space-4);
}

/* =========================================================
   Email signup — mobile: single column
   ========================================================= */

/* Email signup section (template-parts/email-capture.php) — a trigger for
   the shared newsletter modal, not its own form; see that file's own
   docblock for the 2026-08-07 consolidation. Everything the old inline
   form needed (input/consent/honeypot/feedback states) is gone — the
   modal owns all of that now. */
.email-signup__trigger-wrap {
	margin-top: var(--space-6);
}

.email-signup__btn {
	margin-bottom: var(--space-3);
}

.email-signup__fine-print {
	font-family: var(--font-sans);
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	line-height: 1.6;
	margin: 0;
	text-align: left;
}

/* Dark variant backgrounds (A = ink, E = dark brown) */
.variant-a .email-signup__fine-print,
.variant-e .email-signup__fine-print {
	color: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   Footer — mobile: single column
   ========================================================= */

.site-footer__top {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--color-border);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-3);
	padding-top: 1.75rem;
}

/* Light and dark button (planner-494, assets/js/theme-toggle.js, docs/CLAUDE-theming.md): one icon-only button at the end of the
   footer's bottom row, showing the mode a click switches to. The legal links and the button sit together on the right. 40px square,
   a 3:1 control edge (--ctl-border), the site's 2px focus ring. Hidden until the script runs (the `hidden` attribute). */
.site-footer__bottom .footer-legal {
	margin-inline-start: auto;
}

.theme-toggle__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--ctl-border);
	border-radius: var(--border-radius);
	background: var(--color-page);
	color: var(--color-text);
	cursor: pointer;
}

.theme-toggle__btn[hidden] {
	display: none;
}

.theme-toggle__btn:hover {
	border-color: var(--color-text);
}

.theme-toggle__btn:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 2px;
}

.theme-toggle__btn[data-shows="moon"] .theme-toggle__icon--sun,
.theme-toggle__btn[data-shows="sun"] .theme-toggle__icon--moon {
	display: none;
}

/* `.has-planner-fab` (omorphos-books' planner-launcher.php, frontend origin
   only) marks a page where the floating Planner speed-dial FAB is mounted
   for a logged-in editor — it's `position: fixed; right: 24px; bottom: 24px`
   (48px FAB + a same-row notification bell, planner.css), landing directly
   on this row otherwise. Extra clearance only, not a layout change any
   visitor without edit access ever sees. */
.has-planner-fab .site-footer__bottom {
	padding-bottom: 76px;
}

.footer-brand__logo {
	margin-bottom: 0.625rem;
	opacity: 0.5;
}

.footer-brand__logo img,
.footer-brand__logo svg {
	height: 28px;
	width: auto;
	display: block;
}

.footer-brand__name {
	font-family: var(--font-serif);
	font-size: 0.9375rem;
	font-weight: 400;
	color: var(--color-text);
	margin: 0 0 0.625rem;
}

.footer-brand__name em {
	font-style: italic;
	color: var(--color-muted);
}

.footer-brand__tagline {
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 300;
	color: var(--color-muted);
	line-height: 1.7;
	max-width: 180px;
	margin: 0;
}

.footer-col__heading {
	font-family: var(--font-sans);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 0.875rem;
}

.footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5625rem;
	/* font-size set here, not only on the <a> below — a <li> with no
	   font-size of its own still inherits the root 16px, and every line
	   box gets an invisible "strut" sized off that inherited font/
	   line-height even when the actual (smaller, 13px) link text is what's
	   visible. For a single-line item the mismatch is invisible; for a
	   wrapped item ("Reading in Brazilian Portuguese") each of its two
	   line boxes was getting stretched to the strut's 16px-based height
	   instead of the link's own 13px-based one, so the wrapped lines sat
	   at an inconsistent rhythm from the explicit inter-item `gap` above.
	   Matching the font-size here removes the mismatch at its source. */
	font-size: 0.8125rem;
}

.footer-col ul a {
	font-family: var(--font-sans);
	font-weight: 300;
	color: var(--color-muted);
	text-decoration: none;
	transition: color var(--transition);
}

.footer-col ul a:hover {
	color: var(--color-text);
}

.footer-copy {
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	color: var(--color-muted);
	margin: 0;
}

/* =========================================================
   Lang chip — shared component
   ========================================================= */

.lang-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.875rem;
	border: 1px solid var(--color-border);
	border-radius: 2rem;
	background: var(--color-surface);
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--color-text);
	text-decoration: none;
	transition: border-color 0.15s, background 0.15s;
}

.lang-chip:hover {
	border-color: var(--color-text);
	background: var(--color-bg);
	text-decoration: none;
}

.lang-chip__icon {
	font-size: 1.1em;
	line-height: 1;
}

/* Inline SVG icon in a chip — fixed px so font-size:0 doesn't collapse em units */
.lang-chip__icon--svg {
	font-size: 0;
	display: inline-block;
	width: 18px;
	height: 18px;
	vertical-align: middle;
	flex-shrink: 0;
}

.lang-chip__icon--svg svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Recoloured SVG mask — same technique as .page-hero__icon--mask */
.lang-chip__icon--mask {
	font-size: 0;
	display: inline-block;
	width: 18px;
	height: 18px;
	vertical-align: middle;
	flex-shrink: 0;
	background-color: var(--lang-icon-tone, var(--lang-icon-recolor, currentColor));
	-webkit-mask-image: var(--lang-icon-svg);
	mask-image: var(--lang-icon-svg);
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
}

/* =========================================================
   Language / Series landing page
   ========================================================= */

.page-hero {
	border-bottom: 1px solid var(--color-border);
	padding-block: var(--space-8) var(--space-6);
	background: var(--color-page);
}

.page-hero__inner {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.page-hero__eyebrow {
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.page-hero__icon {
	font-size: 2.5rem;
	line-height: 1;
}

/* SVG icon: emoji font-size doesn't apply; constrain the inline SVG directly */
.page-hero__icon--svg {
	font-size: 0;
	display: block;
	width: 56px;
	height: 56px;
}

.page-hero__icon--svg svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Recoloured icon: SVG used as luminance mask; span is coloured by --lang-icon-recolor */
.page-hero__icon--mask {
	font-size: 0;
	display: block;
	width: 56px;
	height: 56px;
	background-color: var(--lang-icon-tone, var(--lang-icon-recolor, currentColor));
	-webkit-mask-image: var(--lang-icon-svg);
	mask-image: var(--lang-icon-svg);
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
}

/* Language page: the flag sits beside the title as one heading, scaled to the title's cap height. */
.page-hero__heading {
	display: flex;
	align-items: center;
	gap: 0.875rem;
}

.page-hero__heading .page-hero__icon--svg,
.page-hero__heading .page-hero__icon--mask {
	width: clamp(2.25rem, 6vw, 3rem);
	height: clamp(2.25rem, 6vw, 3rem);
	flex: none;
}

.page-hero__title {
	font-size: clamp(1.875rem, 5vw, 3.25rem);
	line-height: 1.25;
    font-family: var(--font-serif);
    font-weight: 700;
	color: var(--color-text);
	margin: 0;
}

.page-hero__romanization {
	font-size: clamp(1rem, 2.5vw, 1.375rem);
	font-weight: 400;
	color: var(--color-muted);
	margin-left: 0.35em;
}

.page-hero__subtitle {
	font-family: var(--font-sans);
	font-size: 1rem;
	font-style: italic;
	color: var(--color-muted);
	margin: var(--space-2) 0 0;
}


.page-hero__description {
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	font-weight: 300;
	line-height: 1.5;
	color: var(--color-muted);
	max-width: 56ch;
	margin: 0;
}

/* Page lead — rich text shown in hero directly below the title */
.page-hero__lead {
	font-family: var(--font-sans);
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.6;
	color: var(--color-text);
	max-width: 68ch;
	margin: 0;
}

.page-hero__lead p,
.page-hero__lead .section__description {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
	margin: 0 0 1.4em;
}

.page-hero__lead p:last-child,
.page-hero__lead .section__description:last-child {
	margin-bottom: 0;
}

.page-hero__actions {
	display: flex;
	gap: var(--space-3);
	flex-wrap: wrap;
}

.page-content-section {
	padding-block: var(--space-8);
}

.page-content-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-8);
	align-items: start;
}

/* Two-column layout when sidebar is active — kicks in at 768px */
@media ( min-width: 768px ) {
	.page-content-section--has-sidebar .page-content-layout {
		grid-template-columns: 1fr 280px;
	}
}

.page-main-content {
	min-width: 0; /* prevent grid blowout */
}

.page-sidebar {
	min-width: 0;
}

.lang-books {
	background: var(--color-bg);
}

.lang-books__browse-link {
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	color: var(--color-muted);
	text-decoration: none;
}

.lang-books__browse-link:hover {
	color: var(--color-text);
}

.lang-switcher-bar {
	border-top: 1px solid var(--color-border);
	padding-block: var(--space-6);
	background: var(--color-page);
}

.lang-switcher-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.lang-switcher-bar__label {
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--color-muted);
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.lang-switcher-bar__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* =========================================================
   Admin reader-preview banner (inc/theme-setup.php)
   ========================================================= */

.reader-preview-banner {
	position: sticky;
	top: 0;
	z-index: 9000;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-3);
	padding: var(--space-2) var(--space-4);
	background: var(--color-accent-new);
	color: #fff;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	text-align: center;
}

.reader-preview-banner a {
	color: #fff;
	text-decoration: underline;
	font-weight: 600;
	white-space: nowrap;
}

/* =========================================================
   Cookie consent banner
   ========================================================= */

.cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9000;
	/* Dark full-bleed sheet, not a thin white strip that reads as
	   ignorable chrome — direct report: "it takes up very little space
	   and you can engage with the page without responding." A dark
	   surface against the site's own light pages is the actual attention
	   cue; --color-coffee-press is the darkest step of the theme's one
	   dark-neutral token (CTA buttons' own active/pressed state), reused
	   here rather than a new color — darker than the button's resting
	   --color-coffee so the sheet reads clearly against the site's white
	   pages and keeps text contrast comfortably above WCAG AA. */
	background: var(--fixed-coffee-press);
	box-shadow: 0 -8px 28px rgba(0,0,0,0.18);
	transform: translateY(100%);
	transition: transform 280ms ease, visibility 0s linear 280ms;
	/* Resting state is hidden from assistive tech / keyboard tab order
	   independent of the server-rendered `hidden` attribute (inc/theme-
	   setup.php's `$hidden_attr`) — that attribute is computed from
	   $_COOKIE server-side at PHP render time, which gets baked into the
	   page when full-page caching is active (SpeedyCache, confirmed live
	   on production): a page cached from a request with no consent cookie
	   present serves that same frozen "not hidden" HTML to every visitor
	   afterward, regardless of their own actual cookie. JS (cookie-
	   consent.js) is the real source of truth either way — it only ever
	   adds .is-visible when the REAL browser cookie says consent hasn't
	   been recorded — but a focusable Accept/No-thanks button sitting at
	   visibility:visible (just transformed off-screen) would still be
	   keyboard-reachable when it shouldn't be, if the cache ever serves
	   the attribute-less markup. visibility:hidden closes that gap without
	   depending on the attribute at all. */
	visibility: hidden;
}

.cookie-banner.is-visible {
	transform: translateY(0);
	visibility: visible;
	transition: transform 280ms ease;
}

.cookie-banner__inner {
	/* A single left-aligned stack — title, message, then the button row
	   underneath, all starting from the same left edge — rather than a
	   copy-left/actions-right row. Direct correction after the first pass:
	   "it should be bigger... and the buttons should be left aligned
	   under the text." */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
	padding-block: var(--space-10);
}

.cookie-banner__copy {
	/* Caps how wide the text column gets on a very wide viewport — same
	   reasoning crooked.com's own banner keeps its copy well short of the
	   full bar width rather than stretching a sentence edge to edge. */
	max-width: 640px;
}

.cookie-banner__title {
	font-size: var(--font-size-2xl);
	font-weight: 500;
	color: var(--fixed-white);
	margin: 0 0 0.4em;
}

.cookie-banner__message {
	font-size: var(--font-size-base);
	/* --color-stone-4 is already documented as "light button pressed-
	   state on Ink" — the theme's own token for light text/UI on a dark
	   surface, not a one-off color introduced for this banner. */
	color: var(--color-stone-4);
	margin: 0;
	line-height: 1.6;
}

/* Sitewide `a` defaults to --color-coffee (the one link color, see the
   "Coffee — the ONE interactive color" note above `--color-terracotta`) —
   a dark brown that's invisible against this banner's own dark
   --color-coffee-press background. Terracotta is off-limits too (reserved
   for commerce/CTA only, see the same note). --color-surface (white,
   already the title's color) is the theme's existing light-on-dark token,
   so the link reuses it rather than introducing a new color. */
.cookie-banner__message a {
	color: var(--fixed-white);
	text-decoration-color: rgba(255, 255, 255, 0.5);
}

.cookie-banner__message a:hover,
.cookie-banner__message a:focus-visible {
	text-decoration-color: var(--fixed-white);
}

/* When consent is already accepted, the re-open message gets a note
   prepended (see cookie-consent.js's data-omorphos-cookies="manage"
   handler — a real, translatable DOM text node via t(), not a CSS
   content: string, which is invisible to every i18n discovery mechanism
   this site has). This rule only styles it. */
.cookie-banner__accepted-note {
	font-weight: 500;
	color: var(--fixed-white);
}

.cookie-banner__actions {
	display: flex;
	gap: var(--space-3);
	flex-shrink: 0;
}

/* .btn--primary's own default background IS --color-coffee — identical
   to this banner's new background above, which would make Accept
   invisible against it. Scoped override to the terracotta accent
   instead, the theme's other real CTA color (see .single-book__buy-btn
   --preorder's own use of it above) — also gives Accept the sitewide
   "at most one accent action per view" treatment against the neutral
   coffee backdrop. */
.cookie-banner .btn--primary,
.cookie-banner .btn--ghost {
	/* Accept and No thanks are the same button: the same cream fill, Ink
	   text and border (Off-white on Coffee, 12:1+). They used to differ in
	   fill (terracotta vs outline), which made one choice the visual
	   default; equal weight is the point, not a look. Terracotta is
	   reserved for preorder and availability, so it is gone from here. */
	--btn-primary-bg: #F7F5F2;
	--btn-primary-fg: #1C1917;
	--btn-primary-hover-bg: #E2DDD6;
	--btn-primary-active-bg: #E2DDD6;
	background: #F7F5F2;
	color: #1C1917;
	border: 1px solid #F7F5F2;
}

.cookie-banner .btn--primary:hover,
.cookie-banner .btn--ghost:hover {
	background: #E2DDD6;
	border-color: #E2DDD6;
	color: #1C1917;
	transform: none;
}

/* Small button size used in the banner */
.btn--sm {
	padding: 0.5rem 1rem;
	font-size: var(--font-size-sm);
}

/* Legal nav in footer (cookie prefs, delete data, privacy policy) */
.footer-legal {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3) var(--space-4);
	align-items: center;
}

.footer-legal__link {
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	color: var(--color-muted);
	text-decoration: none;
	transition: color var(--transition);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.footer-legal__link:hover,
.footer-legal__link:focus-visible {
	color: var(--color-text);
}

/* =========================================================
   Admin utilities
   ========================================================= */

.admin-edit-link {
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--color-stone-400);
	text-decoration: none;
	border-bottom: 1px dashed var(--color-stone-3);
	padding-bottom: 1px;
	white-space: nowrap;
	align-self: center;
}

.admin-edit-link:hover {
	color: var(--color-text);
	border-bottom-color: var(--color-text);
}

.admin-section-actions {
	margin-top: var(--space-6);
	text-align: center;
}

/* =========================================================
   Assessment modal
   ========================================================= */

/* Step enter / exit animations */
@keyframes assessmentOverlayIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes assessmentModalIn {
	from { opacity: 0; transform: translateY( 12px ) scale( 0.98 ); }
	to   { opacity: 1; transform: translateY( 0 )    scale( 1 ); }
}

@keyframes assessmentFadeIn {
	from { opacity: 0; transform: translateY( 6px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

@keyframes assessmentFadeOut {
	from { opacity: 1; transform: translateY( 0 ); }
	to   { opacity: 0; transform: translateY( -4px ); }
}

/* Step transitions — only used for changes once the modal is already open */
.assessment-step,
.assessment-checking {
	animation: assessmentFadeIn 220ms ease forwards;
}

/* Prior result: renders at opacity 0 first (height locks in), then transitions
   to visible once .is-visible is added via requestAnimationFrame. */
.assessment-prior-result {
	opacity: 0;
	transform: translateY( 6px );
	transition: opacity 280ms ease, transform 280ms ease;
}

.assessment-prior-result.is-visible {
	opacity: 1;
	transform: translateY( 0 );
}

/* Three-dot loading indicator shown while checking for a prior result */
.assessment-checking {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	padding: var(--space-12) var(--space-6);
}

@keyframes assessmentDotPulse {
	0%, 80%, 100% { opacity: 0.25; transform: scale( 0.75 ); }
	40%           { opacity: 1;    transform: scale( 1 ); }
}

.assessment-checking__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-muted);
	animation: assessmentDotPulse 1.2s ease-in-out infinite;
}

.assessment-checking__dot:nth-child(2) { animation-delay: 0.2s; }
.assessment-checking__dot:nth-child(3) { animation-delay: 0.4s; }

/* Wraps the domain title + options; fades in on mount, out when .is-leaving.
   Must be a real flex child (flex: 1) so the options list still fills space. */
.assessment-domain-content {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: assessmentFadeIn 220ms ease forwards;
}

.assessment-domain-content.is-leaving {
	animation: assessmentFadeOut 180ms ease forwards;
}

.assessment-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: var(--color-scrim);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-4);
	backdrop-filter: blur(2px);
	animation: assessmentOverlayIn 200ms ease forwards;
}

.assessment-modal {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	width: 100%;
	max-width: 620px;
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0,0,0,0.15);
	display: flex;
	flex-direction: column;
	animation: assessmentModalIn 250ms ease forwards;
}

/* Fixed header row: language name + close button */
.assessment-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-4) var(--space-6);
	border-bottom: 1px solid var(--color-border);
	flex-shrink: 0;
	gap: var(--space-3);
}

.assessment-modal__lang {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-text);
	letter-spacing: 0.01em;
	line-height: 1.25; /* the page's 1.65 made a wrapped title ("Portuguese Level Assessment" on a phone) too airy */
}

.assessment-modal__close {
	background: none;
	border: none;
	font-size: 1.125rem;
	color: var(--color-muted);
	cursor: pointer;
	/* A 44px tap target (it was 22 x 26) that takes no more room than before: the negative margin gives the extra back, and
	   keeps the glyph on the content's right edge. */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: -10px -13px -10px 0;
	line-height: 1;
	transition: color var(--transition);
	flex-shrink: 0;
}

.assessment-modal__actions { display: flex; align-items: center; gap: var(--space-4); }

.assessment-modal__step {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	white-space: nowrap;
}

.assessment-modal__retake {
	padding: 0;
	font: inherit;
	font-size: var(--font-size-sm);
	color: var(--color-coffee);
	background: none;
	border: 0;
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}
.assessment-modal__retake:hover { text-decoration-color: var(--color-coffee); }
.assessment-modal__retake:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 3px; }

.assessment-modal__close:hover {
	color: var(--color-text);
}

/* Body area: fills remaining height, scrolls when content overflows */
.assessment-modal > .assessment-step,
.assessment-modal > .assessment-prior-result {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: var(--space-6);
}
.assessment-modal > .assessment-step.assessment-step--question {
	padding: 0;
}
/* Question step: internal flex layout — step indicator + title pinned at top,
   options scroll in the middle, actions pinned at bottom. */
.assessment-step--question {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
}

.assessment-step--question .assessment-steps {
	flex-shrink: 0;
	padding: var(--space-6) var(--space-6) 0;
	margin-bottom: 0;
}

.assessment-step--question .assessment-step__title {
	flex-shrink: 0;
	padding: var(--space-4) var(--space-6) var(--space-2);
	margin: 0;
}

/* .assessment-domain-content (its parent) is flex:1 — this just needs to scroll */
.assessment-step--question .assessment-options-wrap {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.assessment-options__instruction {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	padding: var(--space-3) var(--space-6) var(--space-2);
	margin: 0;
}

.assessment-step--question .assessment-options {
	margin: 0;
	padding: 0;
}

.assessment-step--question .assessment-error,
.assessment-step--question .assessment-step__saving {
	flex-shrink: 0;
	padding: var(--space-2) var(--space-6) 0;
}

.assessment-step--question .assessment-step__actions {
	flex-shrink: 0;
	padding: var(--space-4) var(--space-6) var(--space-6);
	margin-top: 0;
	border-top: 1px solid var(--color-border);
}

/* Named step indicator */
.assessment-steps {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 0;
	margin-bottom: var(--space-6);
}

.assessment-steps__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	position: relative;
	gap: var(--space-1);
}

/* Connector line between items */
.assessment-steps__item + .assessment-steps__item::before {
	content: '';
	position: absolute;
	top: 13px;
	right: calc(50% + 14px);
	left: calc(-50% + 14px);
	height: 2px;
	background: var(--color-border);
}

.assessment-steps__item--done + .assessment-steps__item::before,
.assessment-steps__item--done + .assessment-steps__item--active::before {
	background: var(--color-text-strong);
}

.assessment-steps__circle {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
	border: 2px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-muted);
	transition: all 200ms ease;
	position: relative;
	z-index: 1;
}

.assessment-steps__item--active .assessment-steps__circle {
	border-color: var(--color-text-strong);
	background: var(--color-text-strong);
	color: var(--color-surface);
}

.assessment-steps__item--done .assessment-steps__circle {
	border-color: var(--color-text-strong);
	background: var(--color-text-strong);
	color: var(--color-surface);
	font-size: 0.875rem;
}

.assessment-steps__label {
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-muted);
	text-align: center;
	max-width: 64px;
	line-height: 1.3;
}

.assessment-steps__item--active .assessment-steps__label {
	color: var(--color-muted);
}

/* Step shared */
.assessment-step__meta {
	font-size: var(--font-size-xs);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 var(--space-3);
}

.assessment-step__title {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	font-weight: 400;
	line-height: 1.3;
	color: var(--color-text);
	margin: 0 0 var(--space-6);
}

.assessment-step__subtitle {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: calc(-1 * var(--space-4)) 0 var(--space-6);
}

.assessment-step__actions {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-top: var(--space-6);
}

.assessment-step__actions--result {
	flex-direction: column;
	align-items: stretch;
}

/* Language selector */
.assessment-language-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.assessment-language-btn {
	width: 100%;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	font-family: var(--font-sans);
	font-size: var(--font-size-base);
	font-weight: 400;
	color: var(--color-text);
	cursor: pointer;
	text-align: left;
	transition: border-color var(--transition), background var(--transition);
}

.assessment-language-btn:hover {
	border-color: var(--color-muted);
	background: var(--color-stone-50);
}

.assessment-language-btn__icon {
	font-size: 1.25rem;
	line-height: 1;
}

.assessment-language-btn__icon--img {
	display: block;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.assessment-language-btn__icon--svg {
	display: block;
	width: 1.5em;
	height: 1.5em;
	flex-shrink: 0;
}

.assessment-language-btn__icon--svg svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
}

/* Recoloured SVG mask — same technique as .page-hero__icon--mask */
.assessment-language-btn__icon--mask {
	display: block;
	width: 1.5em;
	height: 1.5em;
	flex-shrink: 0;
	background-color: var(--lang-icon-tone, var(--lang-icon-recolor, currentColor));
	-webkit-mask-image: var(--lang-icon-svg);
	mask-image: var(--lang-icon-svg);
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
}

.assessment-modal__lang-icon {
	display: block;
	width: 1.1em;
	height: 1.1em;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.assessment-modal__lang-icon--svg {
	border-radius: 0;
}

.assessment-modal__lang-icon--svg svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
}

/* Recoloured SVG mask — same technique as .page-hero__icon--mask */
.assessment-modal__lang-icon--mask {
	border-radius: 0;
	background-color: var(--lang-icon-tone, var(--lang-icon-recolor, currentColor));
	-webkit-mask-image: var(--lang-icon-svg);
	mask-image: var(--lang-icon-svg);
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
}

/* Domain questions — full-width flush list, no horizontal padding */
.assessment-options {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.assessment-options li {
	border-bottom: 1px solid var(--color-border);
}

.assessment-options li:first-child {
	border-top: 1px solid var(--color-border);
}

.assessment-option {
	width: 100%;
	padding: var(--space-3) var(--space-6);
	background: var(--color-surface);
	border: none;
	border-radius: 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 400;
	color: var(--color-text);
	cursor: pointer;
	text-align: left;
	line-height: 1.6;
	transition: background var(--transition), color var(--transition);
}

.assessment-option:hover:not(:disabled) {
	background: var(--color-stone-50);
	color: var(--color-text-strong);
}

.assessment-option.is-selected {
	background: var(--color-stone-50);
	color: var(--color-text-strong);
	font-weight: 500;
}

/* Briefly dims all options while auto-advancing to next domain */
.assessment-option.is-advancing {
	opacity: 0.5;
	cursor: default;
}

.assessment-step__saving {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	text-align: center;
	margin: var(--space-4) 0 0;
}

/* Prior result — reuses .assessment-breakdown grid, just needs spacing */
.assessment-prior-result {
	margin-bottom: var(--space-2);
}

.assessment-prior-result .assessment-breakdown {
	margin-bottom: var(--space-4);
}

.assessment-prior-result__single {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0 0 var(--space-4);
}

/* Result screen */
.assessment-result__eyebrow {
	font-size: var(--font-size-xs);
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 var(--space-5);
}

/* Breakdown grid */
.assessment-breakdown {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-3);
	margin-bottom: var(--space-6);
}

.assessment-breakdown__card {
	padding: var(--space-4);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
}

.assessment-breakdown__card-label {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	margin: 0 0 var(--space-2);
	line-height: 1.4;
}

.assessment-breakdown__bar-wrap {
	height: 4px;
	background: var(--color-border);
	border-radius: 2px;
	overflow: hidden;
	margin-bottom: var(--space-2);
}

.assessment-breakdown__bar-fill {
	height: 100%;
	background: var(--color-text-strong);
	border-radius: 2px;
	transition: width 600ms ease;
}

.assessment-breakdown__card-level {
	display: flex;
	align-items: baseline;
	gap: var(--space-2);
	margin: 0;
}

.assessment-breakdown__card-level strong {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	font-weight: 400;
	font-style: italic;
	color: var(--color-text); /* Ink — this is a result display, treated as a heading, not body/meta text */
	line-height: 1;
}

.assessment-breakdown__card-level span {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
}

/* Overall badge */
.assessment-overall {
	text-align: center;
	padding: var(--space-6) var(--space-4);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	margin-bottom: var(--space-6);
}

.assessment-overall__label {
	font-size: var(--font-size-xs);
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 var(--space-2);
}

.assessment-overall__badge {
	font-family: var(--font-serif);
	font-size: 4rem;
	font-weight: 300;
	font-style: italic;
	color: var(--color-text); /* Ink — the quiz's headline result, treated as a heading */
	line-height: 1;
	margin-bottom: var(--space-1);
}

.assessment-overall__name {
	font-size: var(--font-size-base);
	font-weight: 500;
	color: var(--color-text);
	margin: 0 0 var(--space-3);
}

.assessment-overall__note {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	margin: 0;
	line-height: 1.6;
}

.assessment-result__note {
	font-size: var(--font-size-xs);
	color: var(--color-stone-400);
	margin: var(--space-4) 0 0;
	text-align: center;
}

@media (max-width: 480px) {
	.assessment-breakdown {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   Assessment — inline / embedded mode
   [level_assessment display="inline"]
   ========================================================= */

/* Inline / embedded assessment — feels like page content, not a modal card */
.assessment-embed {
	width: 100%;
	max-width: 620px;
	margin-inline: auto;
}

.assessment-embed .assessment-modal {
	max-width: 100%;
	max-height: none;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	animation: none;
}

/* Header becomes a simple section heading row */
.assessment-modal__header--inline {
	background: transparent;
	border-bottom: 2px solid var(--color-border);
	padding-left: 0;
	padding-right: 0;
}

.assessment-modal__header--inline .assessment-modal__lang {
	font-size: var(--font-size-xl);
	font-family: var(--font-serif);
	font-weight: 600;
}

/* Step body: no horizontal padding offset, page scrolls */
.assessment-embed .assessment-modal > .assessment-step,
.assessment-embed .assessment-modal > .assessment-prior-result {
	overflow-y: visible;
	padding-left: 0;
	padding-right: 0;
}

/* =========================================================
   Reading check (omorphos-assessment, planner-404)
   The flow after the language picker: self-rating, three passages, goal, result dial, sample request.
   Square corners and the neutral ramp throughout; teal is the comfort zone and ochre the growth zone (identity, not a
   verdict). The free sample is the plain outline button: terracotta is commerce only.
   ========================================================= */

.check { display: flex; flex-direction: column; }

/* In the modal the step itself does not scroll: the progress bar and the footer stay put, the middle scrolls. */
.assessment-modal > .assessment-step.check { padding: 0; overflow: hidden; }
/* flex: 0 1 auto + an explicit height set by CheckFlow: the modal's own max-height still caps it (it shrinks), and the
   height change transitions. overflow is hidden while it is changing so no scrollbar flashes. */
.check-scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; transition: height 280ms ease; }
.check-scroll.is-resizing { overflow-y: hidden; }
.check-scroll__inner { padding: var(--space-6); }
.check-footer-wrap { flex: none; overflow: hidden; transition: height 280ms ease; }
.check-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-4);
	padding: var(--space-4) var(--space-6);
	background: var(--color-surface);
	border-top: 1px solid var(--color-border);
}
.check-footer:empty { display: none; }
.assessment-embed .assessment-modal > .assessment-step.check { overflow: visible; }
.assessment-embed .check-scroll { overflow: visible; }
.assessment-embed .check-scroll__inner { padding-left: 0; padding-right: 0; }
.assessment-embed .check-footer { padding-left: 0; padding-right: 0; }

.check-back { margin: 0 0 var(--space-3); font-size: var(--font-size-sm); } /* the language is already in the header, so Back is the first line on its own, at the left */

.check-eyebrow {
	margin: 0 0 var(--space-1);
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.check-title {
	margin: var(--space-2) 0 var(--space-3);
	font-family: var(--font-serif);
	font-size: var(--font-size-2xl);
	font-weight: 600;
	line-height: 1.25;
	color: var(--color-text);
}
.check-title--small { font-size: var(--font-size-xl); }
.check-title:focus,
.check-subtitle:focus { outline: none; } /* focus moves here for screen readers; the heading is not a control */

.check-subtitle {
	margin: 0 0 var(--space-2);
	font-family: var(--font-serif);
	font-size: var(--font-size-lg);
	font-weight: 600;
	line-height: 1.3;
	color: var(--color-text);
}

.check-lede { margin: 0 0 var(--space-6); font-size: var(--font-size-sm); color: var(--color-muted); }
.check-muted { color: var(--color-muted); font-weight: 400; font-size: var(--font-size-sm); }
.check-question { margin: 0 0 var(--space-3); font-size: var(--font-size-base); font-weight: 600; color: var(--color-text); }
.check-passage {
	margin: var(--space-2) 0 var(--space-6);
	padding: var(--space-4) var(--space-4);
	font-family: var(--font-serif);
	font-size: var(--font-size-lg);
	line-height: 1.55;
	color: var(--color-text);
	background: var(--color-bg);
	border-left: 3px solid var(--color-border);
}
/* A passage taken from a published text (planner-564, pattern B, mockup claude/mockups/passage-credit-2026-11.html): a figure with the text and
   a credit as a footer inside the block, after a thin rule. The class margin already beats the browser's figure margins. */
.check-passage--credited { padding-bottom: var(--space-3); }
.check-passage__text { margin: 0; }
/* A passage can carry line breaks (a dialogue, two paragraphs of a story): they are kept, runs of spaces still collapse. */
p.check-passage,
.check-passage__text { white-space: pre-line; }
.check-credit {
	margin: var(--space-3) 0 0;
	padding-top: var(--space-2);
	border-top: 1px solid var(--color-border);
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	color: var(--color-muted); /* 5.49:1 on the passage block in light, 6.44:1 in dark */
	overflow-wrap: break-word; /* a long title wraps instead of widening the screen */
}
.check-credit cite { font-style: italic; }

.check-stack { display: flex; flex-direction: column; gap: var(--space-2); }

.check-opt {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	font: 500 var(--font-size-base) / 1.35 var(--font-sans);
	color: var(--color-text);
	text-align: left;
	background: var(--color-surface);
	border: 1.5px solid var(--color-border);
	border-radius: 0;
	cursor: pointer;
}
.check-opt:hover { border-color: var(--color-coffee); background: var(--color-stone-50); }
.check-opt[aria-pressed="true"] { border-color: var(--color-coffee); background: var(--color-stone-50); box-shadow: inset 0 0 0 1px var(--color-coffee); }
.check-opt small { display: block; margin-top: 2px; font-size: var(--font-size-xs); font-weight: 400; color: var(--color-muted); }
.check-opt--quiet { border-style: dashed; font-weight: 400; }
.check-opt:focus-visible,
.check-chip:focus-visible,
.check-input:focus-visible,
.check-link:focus-visible,
.check-checkbox input:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 3px; }

.check-toast { min-height: 1.4em; margin: var(--space-3) 0 0; font-size: var(--font-size-sm); color: var(--color-muted); }

.check-link {
	padding: 0.4em 0; /* a standalone link is at least 24px tall to tap (WCAG 2.5.8); vertical padding on an inline link adds hit area without moving the lines */
	font: inherit;
	color: var(--color-coffee);
	background: none;
	border: 0;
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}
.check-link:hover { text-decoration-color: var(--color-coffee); }

.check-fine { margin: var(--space-3) 0 0; font-size: var(--font-size-xs); color: var(--color-muted); }
.check-fine--above { margin: var(--space-2) 0 var(--space-4); }
.check-rule { margin: var(--space-6) 0; border: 0; border-top: 1px solid var(--color-border); }

.check-label { display: block; margin-bottom: 4px; font-size: var(--font-size-xs); font-weight: 600; }
.check-input {
	width: 100%;
	padding: var(--space-3);
	margin-bottom: var(--space-2);
	font: 400 var(--font-size-base) var(--font-sans);
	border: 1.5px solid var(--color-border);
	border-radius: 0;
}
.check-error { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); font-size: var(--font-size-sm); color: var(--color-danger-ink); background: var(--color-danger-tint); } /* Danger ink on Danger tint */
.check-checkbox { display: flex; gap: var(--space-2); align-items: flex-start; font-size: var(--font-size-sm); }
.check-checkbox input { margin-top: 3px; }

.check-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.check-chip {
	padding: var(--space-3) var(--space-4);
	font: 500 var(--font-size-sm) var(--font-sans);
	color: var(--color-text);
	background: var(--color-surface);
	border: 1.5px solid var(--color-border);
	border-radius: 0;
	cursor: pointer;
}
.check-chip:hover,
.check-chip[aria-pressed="true"] { border-color: var(--color-coffee); background: var(--color-stone-50); }
.check-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--color-coffee); }

/* Result: heading + dial, then the pick. One column in the modal; two on a wide embedded page (below). */
.check-result { display: flex; flex-direction: column; }
.check-result__b { min-width: 0; }

/* The dial's sizes are variables so the level-check card can draw the same dial smaller (planner-509). The live dial's script positions its
   strip in pixels with CELL = 120 (CheckDial.jsx), so --dial-cell stays 120px on every dial that script drives. */
.check-dial { --dial-cell: 120px; --dial-h: 64px; --dial-pad-top: 26px; --dial-bar: 4px; margin: var(--space-2) 0 0; }
.check-dial__marker { margin: 0 0 4px; text-align: center; font-size: var(--font-size-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text); } /* centered over the pointer, which sits at 50% of the window */
.check-dial__window {
	position: relative;
	height: var(--dial-h);
	overflow: hidden;
	background: var(--color-surface);
	border: 1px solid var(--dial-edge);
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.check-dial__strip {
	position: absolute;
	top: 0;
	left: 0;
	width: calc(6 * var(--dial-cell));
	height: 100%;
	transition: transform 1.5s cubic-bezier(0.16, 0.84, 0.24, 1);
	will-change: transform;
}
/* Zones: --dial-x is where the pointer sits on the strip, --dial-end where the growth zone stops (equal at C2). The component sets both inline
   (CheckDial.jsx, in px) and the static card sets them with calc(); the colors are the --dial-* role tokens, never the shared tints. The 4px
   bars on the bottom edge carry the zones' extent at 3:1 (the fills alone are a wash); docs/CLAUDE-level-dial.md in omorphos-assessment. */
.check-dial__track {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, var(--dial-comfort-bar) 0, var(--dial-comfort-bar) var(--dial-x), var(--dial-growth-bar) var(--dial-x), var(--dial-growth-bar) var(--dial-end), transparent var(--dial-end)) left bottom / 100% var(--dial-bar) no-repeat,
		linear-gradient(90deg, var(--dial-comfort-fill) 0, var(--dial-comfort-fill) var(--dial-x), var(--dial-growth-fill) var(--dial-x), var(--dial-growth-fill) var(--dial-end), transparent var(--dial-end));
}
.check-dial__cells { position: absolute; inset: 0; display: flex; }
.check-dial__cell {
	position: relative;
	flex: none;
	width: var(--dial-cell);
	padding-top: var(--dial-pad-top);
	font-weight: 600;
	font-size: var(--font-size-base);
	text-align: center;
	color: var(--dial-letter); /* never --color-muted here: it is 3.6:1 on the dark comfort fill */
	border-left: 1px solid var(--color-border);
}
.check-dial__ticks {
	position: absolute;
	left: 0;
	right: 0;
	bottom: var(--dial-bar); /* the ruler sits on top of the zone bars */
	height: 9px;
	background-image: linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
	background-size: 40px 9px;
}
.check-dial__lbl { position: absolute; top: 7px; z-index: 1; font-size: var(--font-size-xs); font-weight: 600; white-space: nowrap; }
.check-dial__lbl--c { width: 100px; text-align: right; color: var(--color-teal-ink); }
.check-dial__lbl--g { color: var(--color-ochre-ink); }
.check-dial__pointer { position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--color-text); }
.check-dial__pointer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: var(--color-text);
}
/* Windows high contrast removes backgrounds, so the bars would vanish: draw them in system colors and keep the window's edge. */
@media (forced-colors: active) {
	.check-dial__track { background: linear-gradient(90deg, Highlight 0, Highlight var(--dial-x), LinkText var(--dial-x), LinkText var(--dial-end), transparent var(--dial-end)) left bottom / 100% var(--dial-bar) no-repeat; }
	.check-dial__window { border-color: CanvasText; }
}
.check-dial__you { margin: var(--space-1) 0 0; text-align: center; font-family: var(--font-serif); font-size: var(--font-size-lg); font-weight: 600; color: var(--color-text); }
.check-dial__why { max-width: 28rem; margin: 0 auto var(--space-4); text-wrap: balance; text-align: center; font-size: var(--font-size-xs); color: var(--color-muted); }
/* The static dial (planner-509; omorphos-assessment inc/check-dial.php, no script): the strip is placed from --dial-p (the position in level
   units) and --dial-grow (1, or 0 at C2) instead of a measured pixel offset, so it is right in cached HTML and with script blocked. */
.check-dial--static {
	--dial-x: calc(var(--dial-p) * var(--dial-cell));
	--dial-end: calc(var(--dial-x) + var(--dial-grow) * var(--dial-cell));
}
.check-dial--static .check-dial__strip { left: 50%; margin-left: calc(var(--dial-x) * -1); transition: none; will-change: auto; }
.check-dial--static .check-dial__lbl--c { left: calc(var(--dial-x) - 107px); }
.check-dial--static .check-dial__lbl--g { left: calc(var(--dial-x) + 7px); }
/* Entrance (planner-509, omorphos-assessment assets/level-dial.js): a dial that asked for it (data-dial-animate) is armed by the script, which
   parks the strip at the start of the scale with no transition, and gets .is-in the first time it is on screen, which slides it to its place
   once. The HTML holds the final position, so no script, a failed script or reduced motion all show the dial at rest. */
.check-dial--static.is-armed:not(.is-in) .check-dial__strip { margin-left: 0; }
.check-dial--static.is-armed.is-in .check-dial__strip { transition: margin-left 1.5s cubic-bezier(0.16, 0.84, 0.24, 1); }
@media (prefers-reduced-motion: reduce) {
	.check-dial--static.is-armed:not(.is-in) .check-dial__strip,
	.check-dial--static.is-armed.is-in .check-dial__strip { margin-left: calc(var(--dial-x) * -1); transition: none; }
}
/* The card size: smaller cells and window, a caret above the window instead of the pointer's own, no ruler. */
.check-dial--compact { --dial-cell: 62px; --dial-h: 54px; --dial-pad-top: 24px; width: 100%; max-width: 200px; margin: 0; }
.check-dial--compact .check-dial__frame::before { content: ""; display: block; width: 0; height: 0; margin: 0 auto 2px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--color-text); }
.check-dial--compact .check-dial__pointer::before, .check-dial--compact .check-dial__ticks { display: none; }
.check-dial--compact .check-dial__cell { font-size: 0.8125rem; }
/* A 190px window: the live dial's 16% edge fade would dim the last letters of a long label («Crescimento»), so the fade is 6% here. */
.check-dial--compact .check-dial__window {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.check-dial--compact .check-dial__lbl { top: 6px; }
.check-dial--compact .check-dial__you { margin: 5px 0 0; font-family: inherit; font-size: var(--font-size-xs); font-weight: 600; color: var(--color-text-strong); }

/* The pick: one card, book on top and the sample strip beneath it. */
.check-pick { margin: 0 0 var(--space-1); background: var(--color-surface); border: 1.5px solid var(--color-border); }
.check-book { display: flex; gap: var(--space-4); padding: var(--space-4); }
.check-book__cover { flex: none; width: 56px; height: 84px; object-fit: cover; background: var(--color-stone-50); border: 1px solid var(--color-border); }
.check-book__title { margin: 0 0 2px; font-family: var(--font-serif); font-size: var(--font-size-lg); font-weight: 600; color: var(--color-text); }
.check-book__meta { margin: 0; font-size: var(--font-size-sm); color: var(--color-muted); }
.check-pick__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-4);
	padding: var(--space-4);
	background: var(--color-bg);
	border-top: 1px solid var(--color-border);
}
.check-pick-block { width: 100%; }
.check-footer:has(.check-pick-block) { padding-top: var(--space-3); padding-bottom: var(--space-3); }
/* The pinned pick is deliberately small: it should read as a footer, not a second page. */
.check-pick-block .check-subtitle { margin-bottom: var(--space-2); font-size: var(--font-size-base); }
.check-pick-block .check-book { gap: var(--space-3); padding: var(--space-3); }
.check-pick-block .check-book__cover { width: 40px; height: 60px; }
.check-pick-block .check-book__title { font-size: var(--font-size-base); }
.check-pick-block .check-book__meta { font-size: var(--font-size-xs); }
.check-pick-block .check-eyebrow { margin-bottom: 0; }
.check-pick-block .check-pick__actions { gap: var(--space-3); padding: var(--space-3); }
.check-pick-block .check-pick__actions .check-link { font-size: var(--font-size-sm); }
.check-pick-block .check-more { margin-top: var(--space-2); font-size: var(--font-size-xs); }
.check-footer:has(.check-pick-block) { background: var(--color-bg); } /* the pinned pick sits on the page ground, the card white on it */
.check-more { margin: var(--space-3) 0 0; font-size: var(--font-size-sm); }
.check-note { display: flex; align-items: flex-start; gap: var(--space-3); margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); font-size: var(--font-size-sm); line-height: 1.2; color: var(--color-text-strong); background: var(--color-stone-50); border-radius: var(--border-radius-md); } /* neutral on purpose: ochre is the growth zone on the dial above; Stone-800 on Stone-50 is the chip pairing (10.4:1) */
.check-note__icon { flex: none; margin-top: 1px; color: var(--color-muted); }
.check-note__text { margin: 0; }
.check-recs { list-style: none; margin: 0; padding: 0; }
/* Recommended reading on the result (planner-519): a small row, because the list sits low in a modal whose middle scrolls. A 36x54 book
   (the real cover, else a palette-colored book with placeholder bars), the title as the one link on one line, author and level on one
   line, and one cut line of the cultural note (the hook). About 86px a row with the hook, against 96px for the old plain rows. The five
   fills are written out, like the recommendation tiles', because a cover keeps its own color in both modes. */
.check-rec { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; border-top: 1px solid var(--color-border); }
.check-rec__cover {
	flex: none; position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 3px;
	box-sizing: border-box; width: 36px; height: 54px; overflow: hidden; border-radius: 2px;
	background: var(--color-stone-50);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16), 0 0 0 1px color-mix(in srgb, var(--color-text) 14%, transparent);
}
.check-rec__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.check-rec__cover--tile { padding: 8px 4px 6px 12px; background: var(--tile-bg, #3a3530); box-shadow: inset 4px 0 0 rgba(0, 0, 0, 0.2), inset 5px 0 0 rgba(255, 255, 255, 0.14), 0 1px 3px rgba(0, 0, 0, 0.16), 0 0 0 1px color-mix(in srgb, var(--color-text) 14%, transparent); }
.check-rec__cover--tile i { display: block; height: 3px; background: #f7f5f2; opacity: 0.85; border-radius: 1px; }
.check-rec__cover--tile i:nth-child(1) { width: 92%; }
.check-rec__cover--tile i:nth-child(2) { width: 62%; }
.check-rec__cover--tile i:nth-child(3) { width: 40%; opacity: 0.55; margin-top: 3px; }
.check-rec__cover--tone-0 { --tile-bg: #1a5f52; }
.check-rec__cover--tone-1 { --tile-bg: #7a5a12; }
.check-rec__cover--tone-2 { --tile-bg: #4a5a20; }
.check-rec__cover--tone-3 { --tile-bg: #4a3b31; }
.check-rec__cover--tone-4 { --tile-bg: #3a3530; }
.check-rec__body { flex: 1; min-width: 0; }
.check-rec__title { margin: 0; font-size: var(--font-size-base); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-rec__link { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--color-link-rule); }
.check-rec__link:hover { text-decoration-color: var(--color-coffee); }
.check-rec__link:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 3px; border-radius: 2px; }
.check-rec .check-book__meta { margin: 1px 0 0; }
.check-rec__source { white-space: nowrap; }
.check-rec__source::before { content: ' \00b7 '; }
.check-rec__source--first::before { content: none; }
@media ( max-width: 560px ) {
	.check-rec__source { display: block; }
	.check-rec__source::before { content: none; }
}
.check-rec__source svg { margin-left: 2px; vertical-align: -1px; }
.check-rec__disclosure { margin: var(--space-2) 0 0; font-size: var(--font-size-xs); color: var(--color-muted); }
.check-rec__hook { margin: 3px 0 0; font-family: var(--font-serif); font-style: italic; font-size: var(--font-size-sm); line-height: 1.4; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* On a page ([level_assessment display="inline"]): questions stay a 620px column; the result is two columns once there is room. */
@media ( min-width: 860px ) {
	.assessment-embed:has(.check-result) { max-width: 1032px; }
	.modal-trigger-page__content:has(.check-result) { max-width: 1032px; } /* the Modal Trigger template's 720px card */
	/* Inside that card the embed keeps the 50px side gutters the questions have (a 620px column in the 720px card): without this the
	   result's 1032px embed filled the 1032px card edge to edge and the header, the columns and the footer button touched its edges. */
	.modal-trigger-page__content:has(.check-result) .assessment-embed { max-width: min(932px, calc(100% - 100px)); }
	.assessment-embed .check-result {
		display: grid;
		grid-template-columns: minmax(0, 440px) minmax(0, 400px);
		gap: var(--space-16);
		justify-content: center;
		align-items: start;
	}
	.assessment-embed .check-result__b { padding-top: 6px; }
}

/* =========================================================
   GDPR notices and delete-data form
   ========================================================= */

.omorphos-notice {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 8000;
	background: var(--color-text);
	color: var(--color-bg);
	font-size: var(--font-size-sm);
	padding: var(--space-4) 0;
	text-align: center;
}

.omorphos-data-form {
	max-width: 480px;
}

.omorphos-data-form__intro {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin-bottom: var(--space-4);
}

.omorphos-data-form__form {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.omorphos-data-form__success {
	font-size: var(--font-size-sm);
	color: var(--color-success);
}

.omorphos-data-form__error {
	font-size: var(--font-size-sm);
	color: var(--color-error);
	margin-bottom: var(--space-4);
}

/* "Not sure of your level?" inline trigger in filter sidebar */
.filter-assessment-trigger {
	display: inline-block;
	margin-top: var(--space-3);
	background: none;
	border: none;
	padding: 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-xs);
	color: var(--color-coffee); /* functions as a text link */
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.filter-assessment-trigger:hover {
	color: var(--color-coffee); /* text color never shifts on hover, per the sitewide link rule */
}

.assessment-error {
	font-size: var(--font-size-sm);
	color: var(--color-error);
	margin: var(--space-2) 0 0;
}

/* =========================================================
   Block Editor Patterns
   ========================================================= */

.pattern-pull-quote {
	border-left: 3px solid var(--color-stone-3);
	padding-left: 1.5rem;
	margin-block: 2rem;
}

p.pattern-pull-quote__text {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-style: italic;
	line-height: 1.55;
	color: var(--color-text);
	margin: 0 0 1rem;
}

p.pattern-pull-quote__attribution {
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-stone-400);
	margin: 0;
}

.pattern-differentiator {
	border-top: 1px solid var(--color-border);
	padding-block: 1.25rem;
	margin: 0 !important;
}

.pattern-differentiator:last-child {
	border-bottom: 1px solid var(--color-border);
}

.pattern-differentiators .wp-block-columns {
	gap: 1.25rem !important;
	align-items: start;
	flex-wrap: nowrap !important;
}

p.pattern-differentiator__num {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 0.8125rem;
	color: var(--color-muted);
	margin: 0;
	padding-top: 2px;
}

p.pattern-differentiator__title {
	font-family: var(--font-sans);
	font-size: 0.875rem;
	color: var(--color-text);
	margin: 0 0 0.3125rem;
}

p.pattern-differentiator__title strong {
	font-weight: 500;
}

p.pattern-differentiator__desc {
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 300;
	line-height: 1.7;
	color: var(--color-muted);
	margin: 0;
}

.pattern-stats-row {
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
	padding-block: 1.5rem;
	margin-block: 1.5rem;
}

p.pattern-stat__num {
	font-family: var(--font-serif);
	font-size: 1.75rem;
	font-weight: 300;
	font-style: italic;
	color: var(--color-text);
	line-height: 1;
	margin: 0 0 0.25rem;
}

p.pattern-stat__label {
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	color: var(--color-stone-400);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0;
}

.pattern-editorial-col {
	max-width: 640px;
	margin-block: 2rem;
}

h2.pattern-editorial-col__heading {
	font-family: var(--font-serif);
	font-size: 1.625rem;
	font-weight: 400;
	font-style: italic;
	line-height: 1.2;
	color: var(--color-text);
	margin: 0 0 1.5rem;
}

p.pattern-editorial-col__body {
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	font-weight: 300;
	line-height: 1.85;
	color: var(--color-muted);
	margin: 0 0 1rem;
}

/* ==========================================================================
   A series' level table (planner-643, docs/CLAUDE-level-table.md):
   one column per level, in the shared Asset Carousel.
   ========================================================================== */

.level-table__title {
	font-family: var(--font-sans);
	line-height: 1.5;
}

.level-table__note {
	margin: 0 0 var(--space-4);
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	text-align: center;
}

@media (min-width: 640px) {
	.level-table__note {
		padding-left: 0.5rem;
		text-align: left;
	}
}

.level-table .asset-carousel__track {
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0 0 2px;
}

/* Two columns share the row; more than fit scroll. The 86% leaves the next column showing on a phone. */
.level-table .asset-carousel__track > .level-table__column {
	flex: 1 0 min(16rem, 86%);
	min-width: 0;
	margin-block: 0;
	margin-left: 0;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	background: var(--color-surface);
}

.level-table__level {
	margin: 0;
	padding: var(--space-3);
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: center;
	color: #fff; /* on the CEFR hues, which are the same in both modes */
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	background: var(--color-cefr-a1);
}

.level-table__level--a2 { background: var(--color-cefr-a2); }
.level-table__level--b1 { background: var(--color-cefr-b1); }
.level-table__level--b2 { background: var(--color-cefr-b2); }
.level-table__level--c1 { background: var(--color-cefr-c1); }
.level-table__level--c2 { background: var(--color-cefr-c2); }
.level-table__level--a1-a2 { background: linear-gradient(90deg, var(--color-cefr-a1), var(--color-cefr-a2)); }
.level-table__level--a2-b1 { background: linear-gradient(90deg, var(--color-cefr-a2), var(--color-cefr-b1)); }
.level-table__level--b1-b2 { background: linear-gradient(90deg, var(--color-cefr-b1), var(--color-cefr-b2)); }
.level-table__level--b2-c1 { background: linear-gradient(90deg, var(--color-cefr-b2), var(--color-cefr-c1)); }
.level-table__level--c1-c2 { background: linear-gradient(90deg, var(--color-cefr-c1), var(--color-cefr-c2)); }

.level-table .level-table__books {
	list-style: none;
	margin: 0;
	padding: 0;
}

.level-table .level-table__book {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	align-items: center;
	gap: var(--space-3);
	min-height: 104px; /* even rows, so the columns line up */
	margin: 0;
	padding: var(--space-3) var(--space-4);
}

.level-table .level-table__book + .level-table__book {
	border-top: 1px solid var(--color-border);
}

.level-table__cover {
	display: block;
	aspect-ratio: 5 / 8;
	overflow: hidden;
	background: var(--color-surface-alt);
}

.level-table .level-table__cover img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.level-table .level-table__book p {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	line-height: 1.4;
	color: var(--color-muted);
}

.level-table .level-table__book .level-table__book-title {
	font-size: var(--font-size-base);
	color: var(--color-text);
}

.level-table__book-title a {
	color: var(--color-text);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-underline-offset: 3px;
}

.level-table__romanization {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}

.level-table .level-table__book .level-table__translation {
	font-style: italic;
}

.level-table .level-table__book .level-table__meta {
	font-size: var(--font-size-xs);
}

/* ==========================================================================
   1. Layout Wrappers
   ========================================================================== */

.cefr-level-range__outer-wrapper {
    display: grid;
    grid-template-columns: 5rem 3fr;
    gap: 0.5rem;
    min-height: 0;
	
	
}

.cefr-level-range__labels-wrapper {
    display: flex;
    flex-direction: column;
	order:0;
}

.cefr-level-range__labels-wrapper > div {
    font-family: var(--font-sans);
    font-size: var(--font-size-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    text-align: center;
    flex: 1;
}

.cefr-table table {
	width: 100%;
	border-collapse: collapse;
}
/* Clean, LevelTable-style rules (2026-10-09): no banding, no vertical lines — a rule between rows, a heavier
   one under a quiet small-caps header. The generic .entry-content table rules skip .cefr-table. */
.cefr-table th,
.cefr-table td {
	border: 0;
	border-bottom: 1px solid var(--color-border);
	padding: var(--space-4) var(--space-3);
	text-align: left;
	vertical-align: top;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	line-height: 1.55;
	color: var(--color-text);
	background: transparent;
}
.cefr-table th {
	padding-block: var(--space-2);
	border-bottom: 2px solid var(--color-border);
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
}
.cefr-table th:first-child,
.cefr-table td:first-child {
	text-align: center;
}
.cefr-table td .cefr-level__badge {
	margin: 0 0.5rem 0 0;
}
.cefr-table .cefr-table__header--cefrlevel {
	width: 120px;
}
/* Highlighted level (CEFR Table block "Highlight level"; Studio LevelTable's highlight, on the site):
   a tint across the row and a bar on its left edge in the level's own CEFR color (--cefr-accent, set
   inline from --color-cefr-{level}). The label sits under the badge; with no label, screen-reader text. */
.cefr-table tr.cefr-table__row--highlight td {
	background: var(--color-surface-alt);
	background: color-mix(in srgb, var(--cefr-accent, var(--color-coffee)) 9%, var(--color-surface));
	color: var(--color-text-strong);
	font-weight: 500;
}
.cefr-table tr.cefr-table__row--highlight td:first-child {
	box-shadow: inset 4px 0 0 var(--cefr-accent, var(--color-coffee));
}
.cefr-table__highlight-label {
	display: block;
	margin-top: var(--space-2);
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	color: var(--color-text-strong);
}
/* The level badge in the CEFR table and its phone cards: the same 28px square as the level chip on book cards and the
   book page (.cefr-chip--square), same corner radius, weight and type size, so a level reads the same everywhere. */
.cefr-badge {
		display: flex;
		width: 1.75rem;
		height: 1.75rem;
		align-items: center;
		justify-content: center;
		border-radius: var(--border-radius-md);
		font-size: var(--font-size-xs);
		font-weight: 700;
		letter-spacing: 0.02em;
		line-height: 1;
		text-transform: uppercase;
		color: #fff;
		text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
		margin: 0 auto;
	}
	.cefr-badge.cefr-badge--a1 { background-color: var(--color-cefr-a1); }
	.cefr-badge.cefr-badge--a2 { background-color: var(--color-cefr-a2); }
	.cefr-badge.cefr-badge--b1 { background-color: var(--color-cefr-b1); }
	.cefr-badge.cefr-badge--b2 { background-color: var(--color-cefr-b2); }
	.cefr-badge.cefr-badge--c1 { background-color: var(--color-cefr-c1); }
	.cefr-badge.cefr-badge--c2 { background-color: var(--color-cefr-c2); }

/* The level name ("Beginner") under the badge in the table's level column; in a phone card it sits beside the badge in
   the header band. */
.cefr-level-name {
	display: block;
	margin-top: var(--space-1);
	font-size: var(--font-size-sm);
	font-weight: 500;
	line-height: 1.3;
	color: var(--color-muted);
}
/* The name in the level's own text color, as on the milestone cards (.milestone-card__level-name): the hue itself in
   light, a lighter tone in dark (the --color-cefr-*-text roles). */
.cefr-level-name[data-level="a1"] { color: var(--color-cefr-a1-text); }
.cefr-level-name[data-level="a2"] { color: var(--color-cefr-a2-text); }
.cefr-level-name[data-level="b1"] { color: var(--color-cefr-b1-text); }
.cefr-level-name[data-level="b2"] { color: var(--color-cefr-b2-text); }
.cefr-level-name[data-level="c1"] { color: var(--color-cefr-c1-text); }
.cefr-level-name[data-level="c2"] { color: var(--color-cefr-c2-text); }

/* Mobile: the table gives way to the shared Asset Carousel (see
   template-parts/cefr-crosswalk.php): one swipeable card per CEFR level,
   same track, edge fade and snap as the book/series carousels. The carousel
   is hidden above phone width; the table is hidden at it. */
.cefr-table__carousel {
	display: none;
}

.cefr-card {
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	background: var(--color-surface);
	overflow: hidden;
}

.cefr-card__level {
	background: var(--color-bg);
	padding: var(--space-3) var(--space-4);
	border-bottom: 1px solid var(--color-border);
}

.cefr-card__level {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1) var(--space-3);
}
.cefr-card__level .cefr-badge {
	margin: 0;
}
.cefr-level-name--card {
	margin: 0;
}

/* Narrower than the default 280px carousel card on phones, so the neighbouring cards show past the edge fades. */
.cefr-table__carousel .asset-carousel__track > * {
	flex-basis: max(240px, calc(100% - 96px));
}

.cefr-card--highlight {
	border-color: var(--cefr-accent, var(--color-coffee));
	box-shadow: inset 0 4px 0 var(--cefr-accent, var(--color-coffee));
}
.cefr-card--highlight .cefr-card__level {
	background: var(--color-surface-alt);
	background: color-mix(in srgb, var(--cefr-accent, var(--color-coffee)) 12%, var(--color-surface));
}

.cefr-card__row {
	padding: var(--space-3) var(--space-4);
	border-bottom: 1px solid var(--color-border);
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	color: var(--color-text);
}

.cefr-card__row:last-child {
	border-bottom: none;
}

.cefr-card__label {
	font-size: var(--font-size-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin-bottom: var(--space-1);
}

@media ( max-width: 767px ) {
	.cefr-table__container {
		display: none;
	}

	.cefr-table__carousel {
		display: block;
	}
}

/* ==========================================================================
   Generic content tables — any plain <table> inside page/post body copy
   (the Privacy Policy's cookie table, Terms of Use, a blog post, FAQ, etc.)
   that isn't one of the purpose-built table components above (.cefr-table).
   Previously fully unstyled — no borders, no header distinction, browser
   default only (reported live on the Privacy Policy's cookie table).
   Scoped to .entry-content so it covers both page.php layouts (plain-doc
   and hero) and single.php blog posts alike, without touching every
   template/shortcode that happens to output a <table>.
   ========================================================================== */
.entry-content table:not(.cefr-table):not(.data-chart__data) {
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	/* Keeps a wide table's scrolling inside the table. Without it, a table whose content is wider than a phone made the WHOLE
	   page scroll sideways (a single 420px cell was enough: measured in a 375px frame, 2026-11-14), because the table's
	   overflow reached the viewport even though the table itself scrolls. The table still scrolls; nothing it draws is cut
	   (cells have their own padding). */
	contain: paint;
	width: 100%;
	margin: var(--space-4) 0;
	border-collapse: collapse;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	color: var(--color-text);
}

.entry-content table:not(.cefr-table):not(.data-chart__data) th,
.entry-content table:not(.cefr-table):not(.data-chart__data) td {
	border: 1px solid var(--color-border);
	padding: var(--space-3);
	text-align: left;
	vertical-align: top;
}

.entry-content table:not(.cefr-table):not(.data-chart__data) th {
	background: var(--color-surface-alt);
	color: var(--color-text-strong);
	font-weight: 600;
	white-space: nowrap;
}

.entry-content table:not(.cefr-table):not(.data-chart__data) tbody tr:nth-child(even) td {
	background: var(--color-bg);
}

/* Row labels in the first column. A comparison table (a header row of things, a column of what is compared) leaves its top-left
   header cell empty. The table is a scrolling block, so its columns are sized by their content: the label column, against two
   columns of sentences, shrank to its longest word and wrapped "Who carries the night" over four lines (the forro post).
   Core's "Fixed width table cells" cannot help (it needs a real table box) and the editor has no per-column width, so an empty
   corner cell is the signal: that column gets a floor. Typing text in the corner cell also works (th does not wrap). */
.entry-content table:not(.cefr-table):not(.data-chart__data):has(thead th:first-child:empty) :is(th, td):first-child {
	min-width: 9rem;
}

.entry-content td code {
	font-size: var(--font-size-xs);
}

/* ==========================================================================
   2. Entry & Exit Labels
   ========================================================================== */

.cefr-level-range__label-entry {
    display: flex;
    justify-content: flex-end; 
	align-items: flex-start; /* Align bottom right */
}

.cefr-level-range__label-exit {
    display: flex;
    justify-content: flex-end; /* Align top right */
    align-items: flex-end; /* Align bottom right */
}

/* ==========================================================================
   3. CEFR Level Blocks
   ========================================================================== */

.cefr-level {
    display: grid;
    grid-template-columns: 75px auto;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--color-text);
    line-height: 1;
    margin: 0;
    flex: 1;
    position: relative;
}

.cefr-level-range--book .cefr-level__book-name {
	display: none;
}



.cefr-level-range__title {
		font-size: var(--font-size-sm);
		font-weight: 500;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		color: var(--color-muted);
		margin: 0 0 var(--space-3);
		text-align: center;
	}

.cefr-level__badge {
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-transform: uppercase;
}

.cefr-level__name {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
}


/* Modifier for range variations */
.cefr-level-range {
	order: 1;
    flex-direction: column;
}

.cefr-level-range .cefr-level__badge {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex: 1;
	height: 48px;
	align-items: center;
	margin-bottom: 1px;
}
.cefr-level-range__assessment-link {
	font-size: var(--font-size-xs);
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-muted);
	text-decoration: none;
	/* margin-top: var(--space-3); */
	text-align: right;


		margin: var(--space-3) 0;
}

/* ==========================================================================
   4. CEFR Theme Colors
   ========================================================================== */

.cefr-level__a1 .cefr-level__badge { background-color: var(--color-cefr-a1); }
.cefr-level__a1-a2 .cefr-level__badge { background: linear-gradient(180deg, var(--color-cefr-a1), var(--color-cefr-a2)); }
.cefr-level__a2 .cefr-level__badge { background-color: var(--color-cefr-a2); }
.cefr-level__a2-b1 .cefr-level__badge { background: linear-gradient(180deg, var(--color-cefr-a2), var(--color-cefr-b1)); }
.cefr-level__b1 .cefr-level__badge { background-color: var(--color-cefr-b1); }
.cefr-level__b1-b2 .cefr-level__badge { background: linear-gradient(180deg, var(--color-cefr-b1), var(--color-cefr-b2)); }
.cefr-level__b2 .cefr-level__badge { background-color: var(--color-cefr-b2); }
.cefr-level__b2-c1 .cefr-level__badge { background: linear-gradient(180deg, var(--color-cefr-b2), var(--color-cefr-c1)); }
.cefr-level__c1 .cefr-level__badge { background-color: var(--color-cefr-c1); }
.cefr-level__c1-c2 .cefr-level__badge { background: linear-gradient(180deg, var(--color-cefr-c1), var(--color-cefr-c2)); }
.cefr-level__c2 .cefr-level__badge { background-color: var(--color-cefr-c2); }


.cefr-level__book-name .book-text {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-muted);
        text-align: left;
    
    /* Shifts text slightly to the right of the line so it doesn't overlap */
    padding-left: 0.75rem; 
    
}
.wp-block-heading {
	margin-top: var(--space-8);
}

/* =========================================================
   Variants & Modifiers
   ========================================================= */

/* variant-default: used by email-capture block fallback */


/* variant-a/b/c/d are defined in the Section Variants block at end of file */



/* =========================================================
   Media Queries — min-width, mobile-first
   ========================================================= */









/* 480px — small phones landscape, phablets */
@media ( min-width: 480px ) {
	.email-signup__form {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
	}

	.email-signup__input {
		flex: 1;
		min-width: 220px;
		width: auto;
	}

	.email-signup__btn {
		flex-shrink: 0;
		align-self: auto;
	}

	.series-grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	}

	.principles-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}

	.cefr-level-range {
		width: 100%;
		display: flex;
		flex-direction: row;
		order: 0;
	}

	.cefr-level-range__title {
		text-align: left;
		padding-left: 0.5rem;
	}
	
	.cefr-level-range__outer-wrapper {
		display: flex;
		justify-content: space-between;
		flex-direction: column;
		height: auto;
		/* padding-bottom: 1em; */
		

	}
	.cefr-level-range__labels-wrapper {
		flex-direction: row;
		order: 1;
	}
	.cefr-level-range__assessment-link{
		/* order: 2; */
		align-self: flex-end;
	}
	.cefr-level-range__label-entry, .cefr-level-range__label-exit {
		display: flex;
		flex:1
	}
	.cefr-level-range__label-entry {
		justify-content: flex-start;
		align-items: flex-start;
	}
	.cefr-level {
		grid-template-columns: auto;
		text-align: center;
	}
	.cefr-level__name {
		padding: 0;
		justify-content: center;
		padding-top: 0.5rem;
	}
	.cefr-level__a1-a2 .cefr-level__badge {
		background: linear-gradient(90deg, var(--color-cefr-a1), var(--color-cefr-a2));
	}
	.cefr-level__a2-b1 .cefr-level__badge {
		background: linear-gradient(90deg, var(--color-cefr-a2), var(--color-cefr-b1));
	}
	.cefr-level__b1-b2 .cefr-level__badge {
		background: linear-gradient(90deg, var(--color-cefr-b1), var(--color-cefr-b2));
	}
	.cefr-level__b2-c1 .cefr-level__badge {
		background: linear-gradient(90deg, var(--color-cefr-b2), var(--color-cefr-c1));
	}
	.cefr-level__c1-c2 .cefr-level__badge {
		background: linear-gradient(90deg, var(--color-cefr-c1), var(--color-cefr-c2));
	}

	
	.cefr-level-range--custom.cefr-level-range--has-description {
		padding: 3rem 0 0;
	}
	.cefr-level {
		position: relative; /* Crucial so absolute children position correctly */
	}

	/* 2. The Pillar: This acts as your vertical pointer line and centers itself */
	.cefr-level .cefr-level__book-name {
		position: absolute;
		left: 10%; /* Adjust this percentage to place the dot exactly where it belongs on the bar */
		width: 2px; /* This becomes your solid line */
		background-color: var(--color-ink);
		
		/* Top alternating defaults */
		bottom: 33%; /* Starts line right from the middle of the gauge bar */
		height: 3rem; /* Length of the pointer line */
		
		/* Flex alignment to push text to the top */
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
	}

	/* 3. The Dot: Perfectly centered on the 2px wide line */
	.cefr-level .cefr-level__book-name::before {
		content: '';
		position: absolute;
		width: 10px;
		height: 10px;
		background: var(--color-ink);
		border-radius: 50%;
		
		/* Perfect center centering on a 2px line */
		left: 50%;
		transform: translateX(-50%);
		
		/* Default bottom alignment for top-positioned items */
		bottom: 0;
	}
	/* Missing closing brace found live (2026-08-05) — the min-width:480px
	   block opened above never closed, silently nesting every rule after
	   it (including width-unconditional ones, like the Korean italic
	   suppression and prefers-reduced-motion blocks near EOF) inside a
	   min-width:480px context they were never meant to be scoped to.
	   Confirmed live: Korean italic suppression worked at >=480px,
	   silently failed below it — narrower than "mobile" in the loose
	   sense, but real phones in portrait are routinely under 480px wide. */
}

/* 4. The Text Container: Keeps text from messing with the line positioning */
.cefr-level__book-name .book-text {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-muted);
    white-space: normal; /* Allows wrapping */
    width: 180px; /* Give it a safe maximum wrapping width */
    text-align: left;
    
    /* Shifts text slightly to the right of the line so it doesn't overlap */
    padding-left: 0.75rem; 
    
    /* Pulls text slightly upward so it sits nicely near the top of the line */
    transform: translateY(-0.25rem); 
}



	.cefr-level:nth-of-type(2n) .cefr-level__book-name {
		top: 33%; /* Drops down from the middle of the bar */
		bottom: auto;
		height: 4rem; /* Length of the pointer line */
		justify-content: flex-end; /* Pushes text to the bottom of the line */
	}

	.cefr-level:nth-of-type(2n) .cefr-level__book-name::before {
		bottom: auto;
		top: 0;
	}


	.cefr-level:nth-of-type(2n) .cefr-level__book-name .book-text {
		/* align-self: flex-end; */
		text-align: left;
		transform: translateY(0.25rem); 
	}

.cefr-level-range--custom .cefr-level__book-name {
	height: 5rem; /* Allows the line to stretch based on content */
}
.cefr-level-range--custom .cefr-level__book-name .book-text__subtitle {
	font-weight: 500;
	padding-bottom: 0.25rem;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}
.cefr-level-range--custom .cefr-level__book-name .book-text__description {
	font-weight: normal;
	font-size: var(--font-size-xs);
	/* color: var(--color-muted); */
}

/* 640px — tablet portrait, large phones landscape */
@media ( min-width: 640px ) {
	h1 { font-size: var(--font-size-4xl); }
	h2 { font-size: var(--font-size-3xl); }

	.site-header__inner {
		flex-direction: row;
		align-items: center;
		gap: 0;
	}

	/* Nav renders inline again at this width — the mobile hamburger/overlay
	   from the max-width:639.98px block above no longer applies. */
	.menu-toggle {
		display: none;
	}

	.main-navigation {
		width: auto;
		margin-left: auto;
		opacity: 1;
		transition: opacity 200ms ease;
	}

	.main-navigation ul {
		flex-wrap: nowrap;
		gap: var(--space-6);
	}

	/* Hides the inline nav for the duration of an active resize, revealing
	   it again (with the fade above) once resize settles — assets/js/
	   mobile-nav.js toggles this class on <html> via a debounced 'resize'
	   listener. Without it, dragging the viewport across the 640px
	   breakpoint shows a visible jump: .main-navigation goes from
	   position:absolute/hidden (mobile) to a normal-flow, margin-left:auto
	   flex item mid-resize, and the browser paints that intermediate,
	   not-yet-settled layout for a frame or two — nav links briefly jammed
	   against the logo before margin-left:auto pushes them to their final
	   position. Scoped to this breakpoint only — the mobile panel's own
	   open/close opacity (driven by .site-header.is-nav-open, above) is
	   untouched by this. */
	html.is-header-resizing .main-navigation {
		transition: none;
		opacity: 0;
	}

	.site-footer__top {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}

	.pull-quote-band__text {
		font-size: 1.375rem;
	}

	.pull-quote-band {
		padding: 4.5rem 0;
	}

	.section {
		padding-block: var(--space-16);
	}

	.section__header {
		margin-bottom: var(--space-10);
	}

	.section__title {
		font-size: var(--font-size-3xl);
	}

	.section__subtitle {
		font-size: var(--font-size-lg);
		max-width: 600px;
	}

	.taxonomy-header {
		padding-block: var(--space-12) var(--space-10);
	}

	.taxonomy-header__title {
		font-size: var(--font-size-4xl);
	}

	.taxonomy-header__description {
		font-size: var(--font-size-lg);
	}

	.entry-title {
		font-size: var(--font-size-4xl);
	}

	.what-we-do__heading {
		font-size: 1.875rem;
	}

	.what-we-do__copy {
		max-width: 520px;
	}

	.differentiators {
		margin-top: 3rem;
	}

	.email-signup__heading {
		font-size: 1.75rem;
	}

	.page-hero {
		padding-block: var(--space-12) var(--space-10);
	}

	.page-hero__icon {
		font-size: 3rem;
	}

	.page-content-section {
		padding-block: var(--space-12);
	}

	p.pattern-pull-quote__text {
		font-size: 1.375rem;
	}

	.pattern-pull-quote {
		padding-left: 2rem;
	}
}

/* 768px — tablet landscape, small desktop */
@media ( min-width: 768px ) {
	.variant-a,
	.variant-b,
	.variant-c,
	.variant-d,
	.variant-e,
	.variant-f {
		padding: var(--space-12) var(--container-padding);
	}

	.email-signup__btn {
		width: auto;
	}

	.archive-layout {
		grid-template-columns: 240px 1fr;
	}

	.archive-sidebar {
		position: sticky;
		top: 80px;
	}

	/* Multi-column grid only once the mobile horizontal-list card layout
	   (max-width: 767px, above) has fully handed off — avoids the overlap
	   window where both rules used to apply at once (640–767px). */
	.books-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}

	/* Compact grid cards on desktop: the cover sits flush against the
	   card's own top edge (no margin inset), so it's cropped by the
	   card's own overflow:hidden + border-radius-lg — it should carry no
	   independent radius of its own here. The base .book-card__cover rule
	   gives every OTHER context (mobile row, detailed) its own radius
	   because those covers sit inset from the card edge with margin,
	   where the card's own clip never reaches them — that reasoning does
	   not apply here, so reset back to flush/square. */
	.book-card:not(.book-card--detailed) .book-card__cover {
		border-radius: 0;
		transform: none;
	}

	article.single-book {
		padding-bottom: var(--space-16);
	}

	.single-book__title {
		font-size: var(--font-size-4xl);
	}

	/* 768–1023px: was staying on the single-column stacked layout all the
	   way to 1024px (deliberately, per the 1024px block's own comment —
	   its sticky/height:100vh sidebar treatment is desktop-only and would
	   crowd a tablet-portrait viewport). But that left a wide dead zone
	   below 1024px where a 260px-capped, centered single column wastes
	   roughly half the available width. This is a plain, non-sticky
	   two-column grid — narrower than the ≥1024px sidebar, no sticky
	   positioning, no height constraint — just enough to stop wasting
	   horizontal space at tablet widths. The ≥1024px block below still
	   overrides both of these with its own wider/sticky values. */
	.single-book__layout {
		grid-template-columns: 220px 1fr;
		gap: var(--space-6);
	}

	.single-book__sidebar {
		max-width: none;
		margin-inline: 0;
	}

}

/* 1024px — the sticky 2-column buy sidebar needs real desktop/laptop width
   to not feel cramped: a 320px fixed cover column plus a sidebar that can
   grow up to 900px tall is comfortable on a 1280px+ display, but at
   768–1023px (the whole portrait- AND landscape-tablet range, e.g. iPad
   768–834px portrait, older 1024px landscape excluded on purpose) it eats
   most of the available width AND most of the viewport height at once,
   crowding out the title/description and making the purchase block feel
   oversized. Below 1024px this now stays on the same comfortable stacked
   single-column layout used at true mobile widths (see "mobile: stacked"
   above) instead of switching early. */
@media ( min-width: 1024px ) {
	article.single-book {
		/* .page-hero jumps to --space-12 top padding at this breakpoint
		   too (see 4492) — keep matching it. */
		padding-top: var(--space-12);
	}

	.single-book__layout {
		grid-template-columns: 320px 1fr;
		gap: var(--space-12);
	}

	.single-book__sidebar {
		max-width: none;
		margin-inline: 0;
		/* The sidebar is an ordinary column at its natural height, made
		   sticky (--pinned, below) by assets/js/book-sidebar-pin.js. A
		   fixed-height box made the cover (which took whatever the buttons
		   left over) shrink to a thumbnail beside a tall Kindle+ column, and
		   an inner scroll was rejected, so the column keeps its height and
		   the script sets how far down it sticks. */
		--sidebar-top: 88px;
		display: flex;
		flex-direction: column;
	}

	.single-book__sidebar--pinned {
		/* Site header is itself position:sticky;top:0 (~71px tall), so the
		   normal offset (--sidebar-top) must clear it; the admin-bar rules
		   below raise it. --pin-top is --sidebar-top, or negative when the
		   column is taller than the window, so it scrolls until its bottom
		   edge meets the bottom of the window and sticks there. */
		position: sticky;
		top: var(--pin-top, var(--sidebar-top));
	}

	.single-book__cover {
		/* A fixed 380px, the cover's own long-standing cap (planner-273: keeps
		   the buy buttons and sample CTA at the fold). The <img> is
		   absolutely positioned so its max-height:100% resolves against this
		   definite height. */
		flex: 0 0 auto;
		height: 380px;
		margin-bottom: 0;
		position: relative;
	}

	.single-book__cover img {
		position: absolute;
		inset: 0;
		margin: auto;
		max-height: 100%;
	}

	.single-book__cta-row {
		flex: 0 0 auto;
		margin-top: var(--space-6);
		margin-bottom: 0;
	}

	/* Logged-in WP admin bar pushes the sticky header down (see
	   .admin-bar .site-header above) — the sidebar's own offset needs the
	   same compensation or it sticks underneath the header while an admin
	   is browsing the site. Mobile-width admin bar (46px) applies below
	   the 783px breakpoint; the desktop 32px variant is compensated
	   separately at the 783px breakpoint, which overrides this above that
	   width — 783 < 1024 so both cases are covered here regardless of
	   which admin-bar height is active once the sidebar goes sticky. */
	.admin-bar .single-book__sidebar {
		--sidebar-top: 134px;
	}
}

/* 783px — WordPress admin bar desktop breakpoint */
@media screen and ( min-width: 783px ) {
	.admin-bar .site-header {
		top: 32px;
	}
	.admin-bar .single-book__sidebar {
		--sidebar-top: 120px;
	}
}

/* 900px — wide tablet, desktop */
@media ( min-width: 900px ) {
	.hero__inner {
		grid-template-columns: 1fr minmax(280px, 360px);
		gap: var(--space-16);
		padding-top: 4rem;
		padding-bottom: 6rem;
	}

	/* Single-column variant: no language panel */
	.hero--single .hero__inner {
		grid-template-columns: 1fr;
		max-width: 680px;
	}

	.hero__title {
		margin-bottom: 2.25rem;
	}

	.hero__actions {
		gap: 1.75rem;
		margin-top: 3rem;
	}

	.hero__languages {
		padding: 2rem 2rem 1.75rem;
		
		/* max-width: 360px; */
	}

	.hero__lang-chips {
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.what-we-do__layout {
		grid-template-columns: 200px 1fr;
		gap: 4rem;
	}

	.what-we-do__nav {
		display: block;
		position: sticky;
		top: 4rem;
	}

	.email-signup__layout {
		grid-template-columns: 1fr 280px;
		gap: 4rem;
		align-items: center;
	}

	.site-footer__top {
		grid-template-columns: 1.4fr 1fr 1fr 1fr;
		gap: 2.5rem;
		padding-bottom: 2.5rem;
	}
}

/* =========================================================
   Section Variants
   Apply .variant-a/.variant-b/.variant-c/.variant-d to any
   section wrapper. Each variant overrides only the delta from
   the global .section__* base styles defined above.
   ========================================================= */

/* ── Base: actions row ── */
/* .call-to-action__actions dropped — CTA-block-exclusive, now defined
   entirely in call-to-action.css. Left here it would still apply
   margin-top (nothing conflicting to override it), stacking an unwanted
   extra gap on top of that file's own spacing. */
.section__actions {
	display: flex;
	gap: var(--space-4);
	flex-wrap: wrap;
	margin-top: var(--space-6);
	justify-content: flex-start;
}

/* ── Shared padding ── */
.variant-a,
.variant-b,
.variant-c,
.variant-d,
.variant-e,
.variant-f {
	padding: var(--space-8) var(--container-padding);
}

/* When a template-part uses a .container inside a variant section,
   suppress its horizontal padding — the variant already provides the gutter */
.variant-a > .container,
.variant-b > .container,
.variant-c > .container,
.variant-d > .container,
.variant-e > .container,
.variant-f > .container {
	padding-inline: 0;
}

/* ── Centered layout (A, C, E, F) ── */
.variant-a,
.variant-c,
.variant-e,
.variant-f {
	text-align: center;
}

.variant-a .section__header,
.variant-c .section__header,
.variant-e .section__header,
.variant-f .section__header {
	max-width: 600px;
	margin-inline: auto;
}

/* .call-to-action__actions is CTA-block-exclusive (confirmed — no other
   block emits that class), so it's been dropped from this shared/sitewide
   rule entirely rather than left to tie against the CTA block's own
   higher-specificity .gt-call-to-action-block.variant-X rules — see that
   block's own call-to-action.css for where alignment/color/etc. for the
   CTA block now lives. .section__actions stays; it's a generic class
   other components (Asset Cards, Email Capture) still use. */
.variant-a .section__actions,
.variant-c .section__actions,
.variant-e .section__actions,
.variant-f .section__actions {
	justify-content: center;
}

/* ── Dark-bg text colors (A + E share this) ── */
.variant-a .section__eyebrow,
.variant-e .section__eyebrow {
	color: rgba(255, 255, 255, 0.7);
}

.variant-a .section__title,
.variant-a .section__heading,
.variant-e .section__title,
.variant-e .section__heading {
	color: var(--fixed-white);
}

.variant-a .section__subtitle,
.variant-a .section__description,
.variant-e .section__subtitle,
.variant-e .section__description {
	color: rgba(255, 255, 255, 0.9);
}

/* ── White ghost buttons on dark bg (A + E) ── */
/* .call-to-action__button-text dropped from this shared rule — CTA-block-
   exclusive class, same reasoning as .call-to-action__actions above. */
.variant-a .btn--ghost,
.variant-a .btn--ghost:link,
.variant-a .btn--ghost:visited,
.variant-e .btn--ghost,
.variant-e .btn--ghost:link,
.variant-e .btn--ghost:visited {
	color: var(--fixed-white);
}

.variant-a .btn--ghost:hover,
.variant-a .btn--ghost:focus,
.variant-e .btn--ghost:hover,
.variant-e .btn--ghost:focus {
	color: var(--fixed-white);
	opacity: 0.7;
}

/* ── White outline buttons on dark bg (A + E) ── */
/* .call-to-action__button-secondary dropped — CTA-block-exclusive. */
.variant-a .btn--outline,
.variant-a .btn--outline:link,
.variant-a .btn--outline:visited,
.variant-e .btn--outline,
.variant-e .btn--outline:link,
.variant-e .btn--outline:visited {
	background-color: transparent;
	color: var(--fixed-white);
	border-color: var(--fixed-white);
}

/* ── Bare links on dark bg (A + E) ── */
.variant-a a:not([class]),
.variant-e a:not([class]) {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: underline;
}

.variant-a a:not([class]):hover,
.variant-e a:not([class]):hover {
	color: var(--fixed-white);
}

/* ─────────────────────────────────────
   Variant A — Dark (Ink)
   ───────────────────────────────────── */
.variant-a {
	background-color: var(--band-a-bg);
	color: var(--fixed-white);
}

/* .call-to-action__button-primary/-secondary dropped from these three
   rules — CTA-block-exclusive classes, now overridden at higher
   specificity by call-to-action.css's own .gt-call-to-action-block.variant-a
   rules instead of tying against these. */
.variant-a .btn--primary,
.variant-a .btn--primary:link,
.variant-a .btn--primary:visited {
	background-color: var(--fixed-white);
	color: var(--fixed-ink);
	border-color: var(--fixed-white);
}

.variant-a .btn--primary:hover,
.variant-a .btn--primary:focus {
	background-color: rgba(255, 255, 255, 0.88);
	color: var(--fixed-ink);
}

.variant-a .btn--outline:hover,
.variant-a .btn--outline:focus {
	background-color: var(--fixed-white);
	color: var(--fixed-ink);
}

/* ─────────────────────────────────────
   Variant B — Off-white, left-aligned
   (default alignment — no overrides needed)
   ───────────────────────────────────── */
.variant-b {
	background-color: var(--band-b-bg);
	text-align: left;
}

/* ─────────────────────────────────────
   Variant C — Honey/Amber (dark ink text on warm bg)
   ───────────────────────────────────── */
.variant-c {
	background-color: var(--color-amber);
	color: var(--fixed-ink);
}

/* Override cool-colored elements that clash on warm honey bg */
.variant-c .section__eyebrow {
	color: rgba(28, 25, 23, 0.6);
}

.variant-c .section__subtitle,
.variant-c .section__description {
	color: rgba(28, 25, 23, 0.8);
}

.variant-c .email-signup__consent-text,
.variant-c .email-signup__fine-print {
	color: rgba(28, 25, 23, 0.65);
}

/* .call-to-action__button-primary/-secondary dropped — same reasoning as
   variant-a above. */
.variant-c .btn--primary,
.variant-c .btn--primary:link,
.variant-c .btn--primary:visited {
	background-color: var(--fixed-ink);
	color: var(--fixed-white);
	border-color: var(--fixed-ink);
}

.variant-c .btn--primary:hover,
.variant-c .btn--primary:focus {
	background-color: #2A2520;
	color: var(--fixed-white);
}

.variant-c .btn--outline,
.variant-c .btn--outline:link,
.variant-c .btn--outline:visited {
	background-color: transparent;
	color: var(--fixed-ink);
	border-color: var(--fixed-ink);
}

.variant-c .btn--outline:hover,
.variant-c .btn--outline:focus {
	background-color: var(--fixed-ink);
	color: var(--fixed-white);
}

/* ─────────────────────────────────────
   Variant D — Minimal (bordered), left-aligned
   (default alignment — no overrides needed)
   ───────────────────────────────────── */
.variant-d {
	border-top: 1px solid var(--color-stone-3);
	border-bottom: 1px solid var(--color-stone-3);
}
/* ─────────────────────────────────────
   Variant E — Dark Brown (dark bg, white text, centered)
   ───────────────────────────────────── */
.variant-e {
	background-color: var(--color-dark-brown);
	color: var(--fixed-white);
}

/* .call-to-action__button-primary dropped — same reasoning as variant-a
   above. */
.variant-e .btn--primary,
.variant-e .btn--primary:link,
.variant-e .btn--primary:visited {
	background-color: var(--fixed-white);
	color: var(--fixed-ink);
	border-color: var(--fixed-white);
}

.variant-e .btn--primary:hover,
.variant-e .btn--primary:focus {
	background-color: rgba(255, 255, 255, 0.88);
	color: var(--fixed-ink);
}

.variant-e .btn--outline:hover,
.variant-e .btn--outline:focus {
	background-color: var(--fixed-white);
	color: var(--fixed-ink);
}

/* ─────────────────────────────────────
   Variant F — Natural (warm nude bg, dark text, centered)
   ───────────────────────────────────── */
.variant-f {
	background-color: var(--color-natural);
	color: var(--fixed-ink);
}

/* Override cool/muted-colored elements that clash on warm natural bg */
.variant-f .section__eyebrow {
	color: rgba(28, 25, 23, 0.55);
}

.variant-f .section__subtitle,
.variant-f .section__description {
	color: rgba(28, 25, 23, 0.75);
}

.variant-f .email-signup__consent-text,
.variant-f .email-signup__fine-print {
	color: rgba(28, 25, 23, 0.6);
}

/* ── Responsive — re-center left-aligned variants on mobile ── */
@media (max-width: 599px) {

	.variant-d {
		text-align: center;
	}

	/* .call-to-action__actions dropped — CTA-block-exclusive, now handled
	   by call-to-action.css's own .gt-call-to-action-block-scoped rules. */
	.variant-b .section__actions,
	.variant-d .section__actions {
		justify-content: center;
	}
}

/* =========================================================
   Link adornments — shared across blocks
   ========================================================= */

.link-adornment--arrow-right::after {
	content: '→';
	display: inline-block;
	margin-left: 0.5em;
	transition: transform var(--transition);
}

.link-adornment--external::after {
	content: '↗';
	display: inline-block;
	margin-left: 0.5em;
	transition: transform var(--transition);
}

.link-adornment--download::after {
	content: '↓';
	display: inline-block;
	margin-left: 0.5em;
	transition: transform var(--transition);
}

.link-adornment--chevron-right::after {
	content: '›';
	display: inline-block;
	margin-left: 0.3em;
	font-size: 1.2em;
	line-height: 1;
	transition: transform var(--transition);
}

/* ============================================================
   Modal Trigger page template
   ============================================================ */

.modal-trigger-page {
	min-height: 60vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: var(--space-12) var(--container-padding);
}

.modal-trigger-page__content {
	background: var(--color-surface);
	border-radius: var(--border-radius-lg);
	/* A 1px border in the border token, like the site's other cards: the old 6%-black shadow was a soft smudge on the light ground and nothing at all on the dark one. */
	border: 1px solid var(--color-border);
	width: 100%;
	max-width: 720px;
	overflow: hidden;
}

/* The embedded assessment and the support form carry no side padding of their own (they sit in a 620px column, centered, so a 720px card leaves
   them 50px gutters). Once the card is narrower than that (a phone, a narrow window) the column fills it and the heading, the text and the rule
   touch the card's edge while the options inside have their own padding. A gutter on the card from there down; at 760px and up the 620px column
   and its 50px gutters are exactly as before (24px padding + 26px of centering), and the wide result's rule below is not affected. */
@media ( max-width: 759px ) {
	.modal-trigger-page__content { padding-inline: var(--space-6); }
}

/* ============================================================
   Search results
   ============================================================ */

.search-results__section {
	margin-bottom: var(--space-12);
}

.search-results__section:last-child {
	margin-bottom: 0;
}

.search-results__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
}

/* The ?s= results page on the result model (planner-541): a search-result list, one design per kind (inc/search-page.php).
   One link per row; the whole row is clickable through that link's stretched ::after (A11Y-22), the focus ring is drawn on it. */
.sr-back { margin: 0 0 var(--space-4); font-size: var(--font-size-sm); }
.sr-back a { color: var(--color-coffee); text-decoration: underline; text-decoration-color: var(--color-link-rule); text-decoration-thickness: 2px; text-underline-offset: 3px; display: inline-block; padding-block: 10px; }
.sr-back a:hover { text-decoration-color: var(--color-coffee); }
.sr-count { margin: 0 0 var(--space-6); color: var(--color-muted); font-size: var(--font-size-sm); }
.sr-none { margin: 0 0 var(--space-6); }
.sr-group { margin: 0 0 var(--space-8); }
.sr-group__title { margin: 0 0 var(--space-3); font-family: var(--font-serif); font-size: var(--font-size-xl); font-weight: 500; line-height: 1.25; color: var(--color-text); }
.sr-group--top .sr-group__title { font-family: var(--font-sans); font-size: var(--font-size-xs, 12px); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); } /* the Top result is a label, the other groups are headings */
.sr-list { list-style: none; margin: 0; padding: 0; }
.sr-row { position: relative; display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4) 0; border-top: 1px solid var(--color-border); min-height: 44px; }
.sr-row:last-child { border-bottom: 1px solid var(--color-border); }
.sr-row__body { min-width: 0; flex: 1; }
.sr-row__title { margin: 0; font-family: var(--font-serif); font-size: var(--font-size-lg); line-height: 1.3; }
.sr-row__title a { color: var(--color-coffee); text-decoration: underline; text-decoration-color: var(--color-link-rule); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sr-row__title a::after { content: ''; position: absolute; inset: 0; }
.sr-row__title a:hover { text-decoration-color: var(--color-coffee); }
.sr-row__title a:focus-visible { outline: 0; }
.sr-row__title a:focus-visible::after { outline: 2px solid var(--color-coffee); outline-offset: 2px; }
.sr-row__meta { margin: 2px 0 0; color: var(--color-muted); font-size: var(--font-size-sm); }
.sr-row__snippet { margin: var(--space-2) 0 0; color: var(--color-text); font-size: var(--font-size-sm); }
.sr-row__thumb { flex: none; width: 48px; height: 72px; border-radius: 3px; overflow: hidden; background: var(--color-surface-alt); }
.sr-row__thumb--series { height: 48px; }
.sr-row__thumb--post, .sr-row__thumb--page { height: 48px; }
.sr-row__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sr-row--top { padding: var(--space-4); border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-alt); }
.sr-row--top:last-child { border-bottom: 1px solid var(--color-border); }
.sr-row--top .sr-row__title { font-size: var(--font-size-xl); }
.sr-faq__summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); cursor: pointer; min-height: 44px; list-style: none; }
.sr-faq__summary::-webkit-details-marker { display: none; }
.sr-faq { width: 100%; }
.sr-faq__q { font-family: var(--font-serif); font-size: var(--font-size-lg); }
.sr-faq[open] .search-result-row__chevron { transform: rotate(180deg); }
.sr-faq__a { color: var(--color-muted); font-size: var(--font-size-sm); padding-bottom: var(--space-2); }
.sr-faq__summary:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 2px; }
/* Actions (a shortcut, the catalog filter, a language, a portal page): the overlay's icon tile and an arrow, a card of their own, sans type
   instead of the serif article title, so they do not read as pages (John, 16 Nov 2026). The icon masks are omorphos-shared's. */
.sr-row--action { align-items: center; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-alt); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-2); }
.sr-row--action:last-child { border-bottom: 1px solid var(--color-border); }
.sr-row--action .sr-row__title { font-family: var(--font-sans); font-weight: 500; font-size: var(--font-size-base); }
.sr-row--action .sr-row__meta { margin-top: 0; }
.sr-row--action.sr-row--top .sr-row__title { font-size: var(--font-size-base); } /* a shortcut as Top result is the same slim bar as any action row */
.sr-row__tile { flex: none; width: 30px; height: 30px; border-radius: 7px; background: var(--color-surface); border: 1px solid var(--color-border); position: relative; }
.sr-row__tile::before { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; background: var(--color-muted); -webkit-mask: var(--so-icon, none) center/contain no-repeat; mask: var(--so-icon, none) center/contain no-repeat; }
.sr-row__tile--flag::before { display: none; } /* the flag (the overlay's .omo-so__flag, absolutely centered in its tile) is the icon */
.sr-row__go { flex: none; color: var(--color-muted); font-size: var(--font-size-lg); line-height: 1; }
.sr-row--action:hover .sr-row__go { color: var(--color-coffee); }
@media (forced-colors: active) { .sr-row__tile, .sr-row--action { border-color: CanvasText; } .sr-row__tile::before { background: CanvasText; } }
/* Weight follows the kind (planner-541): books as covers in a grid, a series as a wide card, articles with date and first line, pages as one line, answers with a preview. */
.sr-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-6) var(--space-4); }
.sr-card { position: relative; min-width: 0; }
@media (min-width: 640px) { .sr-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } } /* larger covers where there is room; the 130px minimum above still gives two columns at 320 */
.sr-card--book .sr-card__cover { display: block; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--color-surface-alt); border: 1px solid var(--color-border); }
.sr-card--book .sr-card__cover--empty { display: flex; align-items: flex-end; padding: var(--space-3); }
.sr-card__ph { font-family: var(--font-serif); font-size: var(--font-size-sm); line-height: 1.25; color: var(--color-muted); }
.sr-card--book .sr-card__cover .sr-row__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-card__title { margin: var(--space-2) 0 0; font-family: var(--font-serif); font-size: var(--font-size-base); line-height: 1.3; }
.sr-card__title a { color: var(--color-coffee); text-decoration: underline; text-decoration-color: var(--color-link-rule); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sr-card__title a:hover { text-decoration-color: var(--color-coffee); }
.sr-card__title a::after, .sr-card__name a::after { content: ''; position: absolute; inset: 0; }
.sr-card__title a:focus-visible, .sr-card__name a:focus-visible { outline: 0; }
.sr-card__title a:focus-visible::after, .sr-card__name a:focus-visible::after { outline: 2px solid var(--color-coffee); outline-offset: 2px; }
.sr-card__series, .sr-card__state { margin: 2px 0 0; color: var(--color-muted); font-size: var(--font-size-sm); }
.sr-card__chips { margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.sr-chip { display: inline-block; max-width: 100%; padding: 1px 8px; border-radius: 99px; background: var(--color-surface-alt); color: var(--color-text); font-size: var(--font-size-sm); line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; } /* one line always: a wrapped chip turns into a blob */
.sr-card--series { list-style: none; display: flex; align-items: stretch; justify-content: space-between; gap: var(--space-4); border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-alt); overflow: hidden; margin-bottom: var(--space-3); }
.sr-card--series .sr-card__body { padding: var(--space-4); min-width: 0; align-self: center; }
.sr-card__name { margin: 0; font-family: var(--font-serif); font-size: var(--font-size-xl); line-height: 1.25; }
.sr-card__name a { color: var(--color-coffee); text-decoration: underline; text-decoration-color: var(--color-link-rule); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sr-card__art { flex: none; width: min(42%, 300px); aspect-ratio: 16 / 9; } /* the catalog series card's 16:9 thumbnail */
.sr-card__art .sr-row__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-row__thumb--end { order: 2; width: 84px; height: 56px; }
.sr-row--post .sr-row__body { flex: 1; }
.sr-row--page { align-items: baseline; gap: var(--space-3); padding: var(--space-2) 0; }
.sr-row--page .sr-row__title { font-family: var(--font-sans); font-size: var(--font-size-base); }
.sr-row--page .sr-row__meta { margin: 0; }
.sr-faq__text { min-width: 0; display: block; }
.sr-faq__q { display: block; }
.sr-faq__preview { display: block; margin-top: 2px; color: var(--color-muted); font-size: var(--font-size-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-faq[open] .sr-faq__preview { display: none; }
@media (forced-colors: active) { .sr-card--book .sr-card__cover, .sr-card--series { border-color: CanvasText; } .sr-card__title a:focus-visible::after, .sr-card__name a:focus-visible::after { outline-color: Highlight; } }
.sr-pager { margin-top: var(--space-8); }
.pagination.sr-pager .page-numbers { min-width: 44px; min-height: 44px; } /* beats the catalog pager's 36px, which loads later */ /* touch targets (A11Y-24) */
@media (forced-colors: active) {
	.sr-row--top { border-color: CanvasText; }
	.sr-row__title a:focus-visible::after, .sr-faq__summary:focus-visible { outline-color: Highlight; }
}

.search-result-row {
	padding-bottom: var(--space-6);
	border-bottom: 1px solid var(--color-border);
}

.search-result-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.search-result-row__title {
	font-family: var(--font-serif);
	font-size: var(--font-size-lg);
	margin: 0 0 var(--space-2);
}

.search-result-row__title a {
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.search-result-row__title a:hover {
	color: var(--color-coffee);
	text-decoration-color: var(--color-coffee);
}

.search-result-row__excerpt {
	color: var(--color-muted);
	font-size: var(--font-size-sm);
	margin: 0;
}

.search-result-row--faq .search-result-row__title {
	color: var(--color-text); /* Ink, not Coffee — an FAQ result has no link-out (see this file's own comment on that), so it's title text, not link text */
}

/* FAQ results are a <details>/<summary> accordion, collapsed by default —
   same no-JS disclosure pattern already used elsewhere on this site (CEFR
   Crosswalk's sources list, Evidence Claim's zone 3) — a search matching
   several FAQs at once used to show every full answer expanded, running
   the results list long fast. */
.search-result-row__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	cursor: pointer;
	list-style: none;
}

.search-result-row__toggle::-webkit-details-marker {
	display: none;
}

.search-result-row__toggle::marker {
	content: '';
}

.search-result-row__toggle:focus {
	outline: none;
}

.search-result-row__toggle:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 2px;
}

.search-result-row__toggle .search-result-row__title {
	margin: 0;
}

.search-result-row__chevron {
	flex-shrink: 0;
	color: var(--color-muted);
	transition: transform 200ms ease;
}

.search-result-row--faq[open] .search-result-row__chevron {
	transform: rotate(180deg);
}

.search-result-row--faq .search-result-row__excerpt {
	margin-top: var(--space-3);
}

/* ── Generic email-capture modal (assets/js/email-capture-modal.js) ──────────────
   Single-screen form, not the multi-step assessment modal — reuses the same
   overlay/surface/shadow tokens as .assessment-overlay/.assessment-modal
   above rather than its own bespoke look, since it's the same "modal over
   the page" pattern. Hidden by default (display:none); JS only ever toggles
   .is-open, never removes the element from the DOM. Shared by every mode
   (sample_request, newsletter, …) — the JS swaps title/description/button
   text and which of the two checkbox rows is visible per mode; the chrome
   itself never changes. */
.capture-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: var(--color-scrim);
	align-items: center;
	justify-content: center;
	padding: var(--space-4);
	backdrop-filter: blur(2px);
}

.capture-modal-overlay.is-open {
	display: flex;
	animation: assessmentOverlayIn 200ms ease forwards;
}

.capture-modal {
	position: relative;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	width: 100%;
	max-width: 440px;
	padding: var(--space-8) var(--space-6) var(--space-6);
	box-shadow: 0 24px 64px rgba(0,0,0,0.15);
	animation: assessmentModalIn 250ms ease forwards;
}

.capture-modal__close {
	position: absolute;
	/* A 44px tap target (the glyph box was 21 x 30), centered where the glyph already was. */
	top: 5px;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	font-size: 1.375rem;
	line-height: 1;
	color: var(--color-muted);
	cursor: pointer;
	padding: 0;
	transition: color var(--transition);
}

.capture-modal__close:hover { color: var(--color-text); }

.capture-modal__title {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	color: var(--color-text);
	margin: 0 0 var(--space-2);
}

.capture-modal__desc {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	line-height: 1.5;
	margin: 0 0 var(--space-6);
}

/* Book title/cover shown above the title/desc for sample_request mode only
   (see email-capture-modal.js's open() — cfg.bookTitle/cfg.bookCoverUrl,
   localized only on that book's own single-book.php). display:none[hidden]
   override needed same as every other hidden-toggled element in this file
   — see the "Gotcha" notes on .capture-modal-form__success etc below;
   this element has no unconditional display of its own, but the override
   is added defensively for consistency with the rest of this block. */
.capture-modal__book-preview {
	/* planner-273 — a checkout-style line item: cover, title/series/FREE SAMPLE
	   badge, and "Free" aligned right like a price, on a hairline. */
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	/* A quiet panel, pushed below the close button, so the "Free" price isn't crowding the x. */
	margin: var(--space-4) 0 var(--space-6);
	padding: var(--space-3) var(--space-4);
	background: var(--color-stone-50);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
}
.capture-modal__book-preview[hidden] { display: none; }
.capture-modal__book-cover {
	width: 52px;
	height: 78px;
	object-fit: cover;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.15);
	flex-shrink: 0;
}
.capture-modal__book-info { flex: 1; min-width: 0; }
.capture-modal__book-title {
	font-family: var(--font-serif);
	font-size: var(--font-size-base);
	color: var(--color-text);
	line-height: 1.3;
	margin: 0;
}
.capture-modal__book-series {
	margin: 2px 0 0;
	font-size: var(--font-size-xs);
	line-height: 1.35;
	color: var(--color-muted);
}
.capture-modal__book-series[hidden] { display: none; }
.capture-modal__book-sample {
	margin: var(--space-1) 0 0;
	font-size: var(--font-size-xs);
	line-height: 1.35;
	font-weight: 600;
	color: var(--color-text);
}
.capture-modal__book-sample[hidden] { display: none; }

/* A signup that offers a choice of mailing lists (planner-269): a fieldset of checkbox rows (name + description), none
   pre-ticked. The consent checkbox below it is separate and required. [hidden] needs explicit overrides because these
   class rules set display, which beats the browser's own [hidden] rule. */
.capture-modal-lists {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}
.capture-modal-lists[hidden],
.capture-modal-lists__error[hidden] { display: none; }
.capture-modal-lists legend { padding: 0; margin-bottom: var(--space-2); }
.capture-modal-lists__error { margin: 0; }
.capture-modal-list {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	padding: var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	background: var(--color-surface);
	cursor: pointer;
	transition: border-color var(--transition), background var(--transition);
}
.capture-modal-list:hover { border-color: var(--color-muted); }
.capture-modal-list input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--color-coffee); }
.capture-modal-list.is-checked { border-color: var(--color-coffee); background: var(--color-stone-50); }
.capture-modal-list:focus-within { outline: 2px solid var(--color-coffee); outline-offset: 1px; }
.capture-modal-list__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.capture-modal-list__name { font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text); line-height: 1.35; }
.capture-modal-list__desc { font-size: var(--font-size-xs); color: var(--color-muted); line-height: 1.4; }

/* A taller form (the list picker) must still fit a short screen: the card scrolls instead of running off it. */
.capture-modal {
	max-height: calc(100dvh - 2 * var(--space-4));
	overflow-y: auto;
}
/* Neutral like the sample buttons (outline, Ink border): Stone-50 fill, Ink text and border. */
.capture-modal__badge {
	display: inline-block;
	margin-top: var(--space-2);
	padding: 2px 7px;
	background: var(--color-stone-50);
	color: var(--color-ink);
	border: 1px solid var(--color-ink);
	font-family: var(--font-sans);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}
.capture-modal__book-price {
	flex-shrink: 0;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-text);
}

.capture-modal-form { display: flex; flex-direction: column; gap: var(--space-3); }

/* The free-sample mode renders the shared sample form (assets/js/capture-shared.js) into this slot and hides the
   generic form, heading and book row that the other modes use. */
.capture-modal__sample-slot[hidden] { display: none; }
.capture-modal.is-sample > .capture-modal__book-preview,
.capture-modal.is-sample > .capture-modal__title,
.capture-modal.is-sample > .capture-modal__desc,
.capture-modal.is-sample > .capture-modal-form { display: none; }
.capture-modal__title:focus,
.capture-modal-form__success-heading:focus { outline: none; } /* the sample heading takes focus for screen readers; it is not a control */

/* Where the shared sample form renders its buttons outside the form (e.g. the assessment's pinned footer). */
.capture-sample__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.capture-sample__actions--form { margin-top: var(--space-2); } /* the buttons sit in the form, right under the last field */
.capture-sample__extra {
	padding: 0;
	font: inherit;
	font-size: var(--font-size-sm);
	color: var(--color-coffee);
	background: none;
	border: 0;
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}
.capture-sample__extra:hover { text-decoration-color: var(--color-coffee); }
.capture-sample__extra:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 3px; }
.check-sample .capture-modal__book-preview { margin-top: 0; }

/* .capture-modal-form's own flex column only lays out ITS direct children
   (honeypot / __fields / __success) — this nested wrapper (label, input,
   checkbox rows, submit button) never had a display rule of its own, so
   the <label>/<input> pair fell back to their default inline/inline-block
   flow and rendered side by side on one line instead of stacked, visually
   overlapping. flex-direction:column here (with align-items stretch, the
   flex default) blockifies + full-widths every child for free. */
.capture-modal-form__fields {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}
/* Same class-selector-beats-[hidden]-UA-rule gotcha as .capture-modal-form__success
   and .capture-modal-form__checkbox below — this rule's own unconditional
   display:flex was added for the stacking fix above, but it just as easily
   beats [hidden] too. Without this, the whole form (including a stale
   "Sending…" status line) stayed visible underneath the success checkmark. */
.capture-modal-form__fields[hidden] {
	display: none;
}

.capture-modal-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.capture-modal-form__label {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-text);
}

.capture-modal-form__input {
	font-family: var(--font-sans);
	font-size: var(--font-size-base);
	width: 100%;
	padding: var(--space-3);
	border: 1px solid var(--color-stone-400); /* 3:1 on white: a field reads as a field, not a disabled box */
	border-radius: var(--border-radius);
	background: var(--color-surface);
	color: var(--color-text);
	box-sizing: border-box;
}
.capture-modal-form__input::placeholder { color: var(--color-muted); opacity: 1; }

.capture-modal-form__input:focus {
	outline: 2px solid var(--color-coffee);
	outline-offset: 1px;
}

.capture-modal-form__notice {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	line-height: 1.4;
	margin: 0;
}
.capture-modal-form__notice a { color: inherit; text-decoration: underline; }
.capture-modal-form__notice[hidden] { display: none; }

.capture-modal-form__checkbox {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2);
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	line-height: 1.4;
	cursor: pointer;
}

.capture-modal-form__checkbox input { margin-top: 2px; flex-shrink: 0; }

/* One-line terms notice under the submit button (planner-273) — replaced the
   three-bullet summary + "I understand" checkbox, which made the free sample
   look like a legal step. [hidden] needs the explicit override: a class
   selector's display beats the UA [hidden] rule. */
.capture-modal-form__terms-note {
	margin: 0;
	font-size: var(--font-size-xs);
	line-height: 1.4;
	color: var(--color-muted);
}
.capture-modal-form__terms-note[hidden] { display: none; }
.capture-modal-form__terms-note a { color: inherit; text-decoration: underline; }

/* The newsletter-cross and consent checkbox rows are shown/hidden per mode
   via the [hidden] attribute (see email-capture-modal.js's open()) — same
   class-selector-beats-[hidden]-UA-rule gotcha as the success view below,
   so both need an explicit override for the toggle to actually take effect. */
.capture-modal-form__checkbox[hidden] {
	display: none;
}

.capture-modal-form__submit { margin-top: var(--space-2); width: 100%; justify-content: center; }

/* Covers both cases the JS disables this button for: mid-submit ("Sending…")
   and newsletter mode's required-but-unchecked consent box — previously no
   visual difference from the enabled state at all, just a non-clickable
   button with no affordance explaining why. */
.capture-modal-form__submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.capture-modal-form__status {
	font-size: var(--font-size-sm);
	margin: 0;
	min-height: 1.2em;
}

.capture-modal-form__status--success { color: var(--color-success); }
.capture-modal-form__status--error   { color: var(--color-error); }

/* Shown in place of the whole field group on success — see
   email-capture-modal.js's handleSubmit(); a disabled-but-still-visible
   form read as ambiguous ("did that work? should I try again?") and
   invited a second submission. */
.capture-modal-form__success {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--space-3);
	padding: var(--space-4) 0;
}
/* The class selector above beats the browser's own very-low-priority
   [hidden] UA rule, so the JS's `successWrap.hidden = true` was silently
   ignored — the checkmark showed alongside the form fields even before any
   submission. Needs an explicit override the JS's hidden-attribute toggle
   can actually win against. */
.capture-modal-form__success[hidden] {
	display: none;
}

/* Matches omorphos-support's .support-confirm-* success screen exactly
   (assets/css/support-frontend.css) — same light-green badge/dark-green
   checkmark, serif heading, muted body text, outlined Close button — so
   every "you did the thing, here's confirmation" moment across the site
   reads as the same pattern instead of each modal inventing its own. */
.capture-modal-form__success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--color-success-tint);
	color: var(--color-success-ink);
	font-size: 1.5rem;
	line-height: 1;
	margin-bottom: var(--space-2);
}

/* Expired/invalid confirmation-link states (MODES.confirm_expired/
   confirm_invalid, isError:true) — amber warning instead of the green
   checkmark, so it doesn't read as a success. */
.capture-modal-form__success-icon--error {
	background: var(--color-warn-tint);
	color: var(--color-warn-icon);
}

.capture-modal-form__success-heading {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	color: var(--color-text);
	margin: 0;
}

.capture-modal-form__success-msg {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0;
}

.capture-modal-form__success-close { margin-top: var(--space-2); }

/* "Also find us on" — shown only on the modal's 'confirmed' state (real
   double-opt-in completion), never on the "check your inbox" state right
   after submitting. See email-capture-modal.js's buildFollowChannelsHtml()
   and MODES.confirmed's own comment for why. Deliberately quiet — small
   text label + small linked pills, no button styling, so it reads as a
   footnote to the real confirmation above it, not a second competing CTA. */
.capture-modal-form__follow {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-2);
	margin-top: var(--space-2);
	padding-top: var(--space-4);
	border-top: 1px solid var(--color-border);
	width: 100%;
}
/* Rule of thumb this file already documents elsewhere: any element toggled
   via the `hidden` property that also carries its own unconditional
   `display` rule needs an explicit [hidden] override, or the class-level
   `display:flex` above beats the browser's own very-low-priority [hidden]
   UA style and the toggle silently does nothing. */
.capture-modal-form__follow[hidden] { display: none; }
.capture-modal-form__manage { margin: 0; font-size: var(--font-size-sm); }

.capture-modal-form__follow-label {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
	margin: 0;
}

.capture-modal-form__follow-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-2);
}

.capture-modal-form__follow-link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-1) var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	color: var(--color-text);
	text-decoration: none;
	font-size: var(--font-size-sm);
	transition: var(--transition);
}

.capture-modal-form__follow-link:hover,
.capture-modal-form__follow-link:focus-visible {
	border-color: var(--color-muted);
	background: var(--color-bg);
}

/* Not circular-cropped, deliberately — these are Simple Icons brand
   glyphs (square-ish viewBox, varying internal padding), not uploaded
   avatar photos; a 50% border-radius clipped real detail off some of
   them (confirmed live, Substack/Goodreads both looked wrong). object-fit:
   contain + no radius shows each glyph whole, at its own natural shape. */
.capture-modal-form__follow-logo {
	width: 18px;
	height: 18px;
	object-fit: contain;
	flex-shrink: 0;
}

.capture-modal-form__follow-text {
	display: inline-flex;
	align-items: baseline;
	gap: var(--space-1);
}

.capture-modal-form__follow-title { font-weight: 600; }

.capture-modal-form__follow-handle {
	color: var(--color-muted);
	font-size: var(--font-size-xs);
}

body.capture-modal-open { overflow: hidden; }

/* Inline embed (assets/js/email-capture-modal.js's buildInlineEmbed(),
   [omorphos_email_capture] shortcode) — the form itself IS the page
   content, no overlay/card chrome around it (unlike .capture-modal
   above), so this just adds padding + reuses .capture-modal__title/desc's
   typography under new class names (:not() would be more DRY but these
   two rules are simple enough that duplicating them beats fighting
   specificity against the overlay-specific selector). */
.capture-embed {
	padding: var(--space-8) var(--space-6);
}

.capture-embed__title {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	color: var(--color-text);
	margin: 0 0 var(--space-2);
}

.capture-embed__desc {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	line-height: 1.5;
	margin: 0 0 var(--space-6);
}

/* =========================================================
   Language-specific italic suppression — Korean (ko)
   Korean serif/sans fonts have no italic tradition; synthetic
   slant looks broken. Suppress on any element that would
   otherwise be italic on book cards, series cards, and single
   book pages when the content language is Korean.

   single-book.php no longer needs an entry here — its own eyebrow
   (.single-book__eyebrow) and subtitle (.single-book__subtitle) are both
   sans-serif/non-italic by their base rule now (see the "subtitle
   placement" restructure); .book-series-position is only ever italic on
   book cards/series cards, which still need this override.
   ========================================================= */

.book-card--lang-ko .book-series-position {
	font-style: normal;
}

/* series-card__translation is always English text (a romanization
   or translated title), so italic is appropriate there regardless
   of the series language — no override needed. */

/* =========================================================
   Blog — post card, grid, single post, comments
   ========================================================= */

.posts-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-6);
	list-style: none;
	padding: 0;
	margin: 0;
	min-width: 0;
	width: 100%;
}

@media ( min-width: 768px ) {
	.posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* One column on a phone (planner-532): two columns made each card 163px wide, so an 18px title of 60 to 100 characters ran to four or five
   lines (64 of 106 post-card titles at 390px). One column gives the title about 350px, the way the book cards already sit. */
@media ( max-width: 479px ) {
	.posts-grid {
		grid-template-columns: 1fr;
	}
}

/* the_posts_pagination() default markup: nav.pagination > .nav-links >
   a.page-numbers(.prev/.next) + span.page-numbers.current + span.page-numbers.dots.
   Centered pager, current page as a filled pill — same "navigation, not body
   content" treatment as the site's primary nav (no underline at rest). */
.pagination {
	margin-top: var(--space-12);
	display: flex;
	justify-content: center;
}

.pagination .nav-links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 var(--space-3);
	border-radius: var(--border-radius);
	color: var(--color-text);
	font-size: var(--font-size-sm);
	font-weight: 500;
	text-decoration: none;
	transition: background var(--transition), color var(--transition);
}

.pagination a.page-numbers:hover {
	background: var(--color-stone-50);
	color: var(--color-coffee);
}

.pagination .page-numbers.current {
	background: var(--color-text);
	color: var(--color-surface);
}

.pagination .page-numbers.dots {
	color: var(--color-muted);
	background: none;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
	color: var(--color-coffee);
	font-weight: 600;
	padding: 0 var(--space-4);
}

.pagination a.page-numbers:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 2px;
}

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	overflow: hidden;
}

.post-card__cover {
	display: block;
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--color-stone-3);
}

/* Admin-only — see inc/blog.php's omorphos_blog_admin_status_label().
   Same absolute-corner-badge shape as .book-card__corner-badge, just not
   shared as one class across differently-structured card components. */
.post-card__corner-badge {
	position: absolute;
	bottom: var(--space-2);
	left: var(--space-2);
	z-index: 1;
	box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.post-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.post-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: var(--space-4);
	flex: 1;
}

.post-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
	margin-bottom: var(--space-1);
}

.post-card__title {
	font-size: var(--font-size-lg);
	margin: 0;
	line-height: 1.3;
}

.post-card__title a {
	color: var(--color-text);
	text-decoration: none;
}

.post-card__title a:hover {
	text-decoration: underline;
}

/* A book title inside a post title (omorphos_post_title_html(), planner-503). Explicit so no heading rule can flatten the cite. */
.post-title-book {
	font-style: italic;
}

.post-card__meta {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	margin: 0;
}

.post-card__excerpt {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0;
	flex: 1;
}

.post-card__read-more {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-coffee);
	text-decoration: none;
	margin-top: var(--space-2);
}

.post-card__read-more:hover {
	text-decoration: underline;
}

/* Single post */

/* Full-bleed white surface for the article itself (byline through
   categories) — reads as one continuous "the article" zone against the
   page's default gray, which everything after it (comments, a future
   promo block) sits on instead. Matches .taxonomy-header's own
   --color-surface background, so the page-header block above it and this
   flow together as one visual unit even though they're two adjacent
   elements. */
.single-post__article {
	background: var(--color-page);
}

/* Admin-only — see inc/blog.php's omorphos_blog_admin_status_label().
   Same dim treatment as .book-card--unpublished/.post-card--unpublished,
   applied to the whole article surface here since there's no separate
   "cover" element to dim on the single-post page the way a card has. */
.single-post__article--unpublished {
	opacity: 0.7;
}

.single-post__unpublished-notice {
	display: inline-block;
	margin: 0 0 var(--space-4);
}

/* ============================================================
   Titles and headings (planner-508 for the post H1, planner-532 for everything else)
   One list, so a new title class gets the protection by joining it here instead of needing its own rule.
   1. Even breaks: `text-wrap: balance` keeps a single word from standing alone on the last line. It changes where words break, never the
      line count, and a browser balances only a few lines (about six in Chrome), so a longer text just wraps as it did. A browser without it
      wraps as before. Titles and headings only: never a paragraph.
   2. A long page or post H1 steps down on wider screens so it stays near three lines. The class (title--long over 75 characters, title--xlong
      over 95) comes from omorphos_title_size_class() (inc/formatting.php), which every H1 template calls. Phones get no step: a longer
      title there is fine. Measured on the real post titles: in the 720px column 40px puts every title at three lines; at about 600px
      (640 to 1023) 40px does it for 76 to 95 characters and 34px for more. The title is never cut.
   ============================================================ */
.taxonomy-header__title,
.page-hero__title,
.single-book__title,
.page-doc__title,
.archive-chead__title,
.section__title,
.entry-content :is(h2, h3, h4),
.wp-block-heading,
.page-doc__content :is(h2, h3, h4),
.single-post__content :is(h2, h3, h4),
.post-card__title,
.book-card__title,
.series-card__name,
.feature-card__title-wrapper,
.upcoming-row__title,
.read-next__title,
.search-result-row__title,
.omo-recommendations__title,
.omo-recommendations__heading,
.related-content__guide-title,
.cefr-level-range__title,
.single-book__specs-heading,
.single-book__back-cover-summary-heading,
.single-book__artifacts-heading,
.single-book__materials-heading,
.single-book__faqs-heading,
.related-content__heading,
.read-next__heading,
.blog-comments__heading,
.author-card__name {
	text-wrap: balance;
}

@media ( min-width: 640px ) and ( max-width: 1023px ) {
	.title--long { font-size: 2.5rem; }
	.title--xlong { font-size: 2.125rem; }
}

@media ( min-width: 1024px ) {
	.title--xlong { font-size: 2.5rem; }
}

.single-post__container {
	max-width: 760px;
	padding-block: var(--space-8) var(--space-12);
}

.single-post__meta {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	margin: 0 0 var(--space-6);
}


.single-post__content {
	font-size: var(--font-size-base);
	line-height: 1.7;
}

.single-post__categories {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-top: var(--space-8);
	padding-top: var(--space-6);
	border-top: 1px solid var(--color-border);
}

/* Plain content/document pages (Privacy Policy, Terms of Use, FAQ, etc —
   page.php's $is_plain_doc branch) — same "title merged into the same
   white surface as the body, no divider" treatment as .single-post__*
   above, just under its own namespace since this isn't post content. A
   page WITH a page-header CTA block (lead/buttons) still gets the wider
   taxonomy-header hero instead — this is only for the plain document case. */
.page-doc__article {
	background: var(--color-page);
}

.page-doc__container {
	max-width: 760px;
	padding-block: var(--space-8) var(--space-12);
}

.page-doc__title {
	margin-bottom: var(--space-6);
}

.page-doc__content {
	font-size: var(--font-size-base);
	line-height: 1.7;
}

/* Standalone pages (inc/standalone.php, header-/footer-standalone.php,
   template-parts/standalone-article.php): pages linked from inside ebooks —
   omorphos-books' study materials, their articles, the series preview. Laid
   out exactly like a blog post (.single-post__* / .entry-content above); this
   block only covers what a post doesn't have. No site header; the footer has
   no links. */
.standalone-back {
	margin: 0 0 var(--space-6);
	font-size: var(--font-size-sm);
}

.standalone-badges {
	margin: 0 0 var(--space-3);
}

/* Title block with a book cover beside it (cover_url). The cover reuses
   .standalone-book__cover below. */
.standalone-head {
	display: flex;
	gap: var(--space-6);
	align-items: center;
	margin-bottom: var(--space-6);
}
.standalone-head__text {
	min-width: 0;
}
.standalone-head .single-post__meta {
	margin-bottom: 0;
}

/* One material (or one book) per section, separated by a hairline. */
.standalone-section > * {
	margin-block: 0;
}
.standalone-section > * + * {
	margin-block-start: var(--space-3);
}
.standalone-section + .standalone-section {
	padding-top: var(--space-8);
	border-top: 1px solid var(--color-border);
}

.standalone-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.standalone-meta {
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	font-variant-numeric: tabular-nums;
}

.standalone-note {
	display: block;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}

/* Series preview: cover beside the text. */
.standalone-book {
	display: flex;
	gap: var(--space-4);
	align-items: flex-start;
}
.standalone-book__cover {
	flex: none;
	width: 84px;
	aspect-ratio: 5 / 8;
	border-radius: 3px;
	overflow: hidden;
	background: var(--color-border);
}
.standalone-book__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.standalone-book__text {
	min-width: 0;
}
/* A book title in a list is not a page section heading: card-title size, no extra top margin
   (the eyebrow above it already spaces it). The .entry-content prefix beats that scope's own h2 rule. */
.entry-content .standalone-book__title {
	font-size: var(--font-size-xl);
	line-height: 1.3;
	margin: var(--space-1) 0 var(--space-2);
}
.entry-content .standalone-books {
	list-style: none;
	padding: 0;
}
.entry-content .standalone-book + .standalone-book {
	margin-block-start: var(--space-8);
	padding-top: var(--space-8);
	border-top: 1px solid var(--color-border);
}

/* Glossary page (omorphos-books inc/materials-glossary.php): an app-like page. A toolbar stays at the top while you scroll (search with a clear
   button, a custom chapter picker, the speech-speed toggle, the count), and each chapter's heading sticks just under it, so you always see which
   chapter you are in; a heading is released when its chapter ends and the next one takes over. Entries are plain blocks with a hairline between;
   the pronounce button is a round outlined button that only shows when the device has a voice. Site tokens only; focus is the sitewide 2px Coffee ring at 3px offset. */
.glossary__bar {
	position: sticky;
	top: 0;
	z-index: 30;
	margin-block: var(--space-4) var(--space-2);
	padding-block: var(--space-3) var(--space-2);
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
}
.glossary__bar-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
}
.glossary__field {
	position: relative;
	flex: 1 1 14rem;
	min-width: 0;
	height: 2.75rem;
	/* The site's former header search pill: a Stone-100 border, the icon inside, a borderless input; the border darkens to muted on focus. */
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	transition: border-color var(--transition);
}
.glossary__field:focus-within {
	border-color: var(--color-muted);
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}
.glossary__field-icon {
	position: absolute;
	left: var(--space-3);
	top: 50%;
	transform: translateY(-50%);
	color: var(--color-muted);
	pointer-events: none;
}
.glossary__input {
	width: 100%;
	height: 100%;
	padding: 0 2.5rem;
	font: inherit; /* 16px, so iOS does not zoom the page when the field is focused */
	color: var(--color-text);
	background: transparent;
	border: 0;
	border-radius: var(--border-radius);
	appearance: none;
}
.glossary__input:focus {
	outline: none;
}
.glossary__input::-webkit-search-cancel-button {
	display: none;
}
.glossary__clear {
	position: absolute;
	right: var(--space-1);
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	color: var(--color-muted);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background var(--transition);
}
.glossary__clear:hover {
	background: var(--color-stone-50);
}
.glossary__clear[hidden] {
	display: none;
}
/* The chapter picker is the theme's select menu: sized to fit the toolbar, and marked when a chapter (not "All chapters") is chosen. */
.glossary__bar .glossary__chapters {
	flex: 0 1 17rem;
	min-width: 0;
}
.glossary__bar .glossary__chapters .select-menu__trigger {
	width: 100%;
}
.glossary__bar .glossary__chapters:not([data-value="all"]) .select-menu__trigger {
	background: var(--color-stone-50);
	border-color: var(--color-text-strong);
}
.glossary__slow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	height: 2.25rem;
	padding: 0 var(--space-3);
	font: inherit;
	font-size: var(--font-size-sm);
	font-weight: 500;
	color: var(--color-text-strong);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	cursor: pointer;
	white-space: nowrap;
}
.glossary__slow-state {
	min-width: 1.75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
/* The switch: a track with a knob. On = a dark track with the knob at the right, Off = an empty track with the knob at the left; together with the
   word On / Off beside it, the state never depends on color alone. */
.glossary__switch {
	position: relative;
	flex: none;
	width: 2.5rem;
	height: 1.5rem;
	border: 2px solid var(--color-text-strong);
	border-radius: 999px;
	background: var(--color-surface);
}
.glossary__switch i {
	position: absolute;
	top: 50%;
	left: 2px;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: var(--color-text-strong);
	transform: translateY(-50%);
	transition: left 0.15s ease, background-color 0.15s ease;
}
.glossary__slow[aria-checked="true"] .glossary__switch {
	background: var(--color-text-strong);
}
.glossary__slow[aria-checked="true"] .glossary__switch i {
	left: calc(100% - 1rem - 2px);
	background: var(--color-surface);
}
@media (prefers-reduced-motion: reduce) {
	.glossary__switch i {
		transition: none;
	}
}
.glossary__clear:focus-visible,
.glossary__slow:focus-visible,
.glossary-entry__say:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}
.glossary__status {
	margin: 0 0 0 auto;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.glossary__chapter {
	margin-block-start: var(--space-6);
}
.entry-content .glossary__chapter-title {
	position: sticky;
	top: var(--glossary-bar-h, 0px);
	z-index: 20;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
	margin: 0;
	padding: var(--space-2) var(--space-3);
	background: var(--color-stone-50);
	border-bottom: 1px solid var(--color-border);
	font-family: var(--font-sans, inherit);
	font-size: var(--font-size-sm);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: var(--color-text-strong);
}
.glossary__chapter-count {
	flex: none;
	font-weight: 400;
	color: var(--color-muted);
	font-variant-numeric: tabular-nums;
}
.glossary-entry {
	padding: var(--space-4) var(--space-3);
	border-bottom: 1px solid var(--color-border);
}
.glossary-entry > * {
	margin-block: 0;
}
.glossary-entry > * + * {
	margin-block-start: var(--space-1);
}
.entry-content .glossary-entry__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	margin: 0;
	font-size: var(--font-size-xl);
	line-height: 1.3;
}
.glossary-entry__alt {
	font-size: var(--font-size-base);
	font-weight: 400;
	color: var(--color-muted);
}
.glossary-entry__say {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	color: var(--color-text-strong);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 50%;
	cursor: pointer;
	transition: border-color var(--transition), background var(--transition);
}
.glossary-entry__say[hidden] {
	display: none;
}
.glossary-entry__say:hover {
	border-color: var(--color-muted);
}
.glossary-entry__say.is-speaking {
	background: var(--color-stone-50);
	border-color: var(--color-text-strong);
}
.glossary-entry__gloss {
	font-weight: 600;
}
/* The book-language definition reads as the main line; the English one under it is the quieter translation, so the two do not run together. */
.glossary-entry__def--gloss {
	margin-block-start: var(--space-2);
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}
.glossary-entry__example {
	font-style: italic;
}
.glossary__none {
	margin-top: var(--space-6);
}

/* Play / stop swap on the pronounce button, and the "now playing" bar. The bar is fixed to the foot of the screen (clear of the iPhone home bar)
   while a word is spoken; the three moving bars are decoration only, still under reduced motion. */
.glossary-entry__icon-stop {
	display: none;
}
.glossary-entry__say.is-speaking .glossary-entry__icon-play {
	display: none;
}
.glossary-entry__say.is-speaking .glossary-entry__icon-stop {
	display: block;
}
.glossary__now {
	position: fixed;
	left: 50%;
	bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
	z-index: 50;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	grid-template-areas: "action main speed close";
	align-items: center;
	gap: var(--space-3);
	width: min(44rem, calc(100% - 2 * var(--space-4)));
	padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
	transform: translateX(-50%);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	box-shadow: 0 8px 28px rgba(28, 25, 23, 0.16);
}
.glossary__now[hidden] {
	display: none;
}
.glossary__now-stop {
	grid-area: action;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	color: var(--btn-primary-fg);
	background: var(--btn-primary-bg);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.glossary__now-icon-play {
	display: none;
}
.glossary__now.is-idle .glossary__now-icon-stop {
	display: none;
}
.glossary__now.is-idle .glossary__now-icon-play {
	display: block; /* the triangle's path is already drawn so its visual center (its centroid) sits at the middle of the box: no nudge */
}
.glossary__now-main {
	grid-area: main;
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.glossary__now-caption {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}
.glossary__now-word {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	line-height: 1.25;
	color: var(--color-text-strong);
}
.glossary__now .glossary__slow {
	grid-area: speed;
}
.glossary__now-close {
	grid-area: close;
	align-self: start;
	justify-self: end; /* always the top right corner of the card */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	color: var(--color-text-strong);
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.glossary__now-close:focus-visible,
.glossary__now-stop:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}
.glossary__wave {
	display: inline-flex;
	align-items: flex-end;
	gap: 2px;
	height: 12px;
}
.glossary__wave i {
	display: block;
	width: 3px;
	height: 100%;
	background: var(--color-text-strong);
	border-radius: 1px;
	transform-origin: bottom;
	animation: glossary-wave 0.9s ease-in-out infinite;
}
.glossary__wave i:nth-child(2) {
	animation-delay: 0.15s;
}
.glossary__wave i:nth-child(3) {
	animation-delay: 0.3s;
}
.glossary__wave i:nth-child(4) {
	animation-delay: 0.45s;
}
.glossary__now.is-idle .glossary__wave {
	display: none;
}
/* Back to top: a fixed round button, shown after ~1.5 screens of scrolling; it sits above the mini player when that is showing. */
.glossary__top {
	position: fixed;
	right: var(--space-4);
	bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
	z-index: 45;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	color: var(--color-text-strong);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(28, 25, 23, 0.14);
}
.glossary__top:hover {
	border-color: var(--color-muted);
}
.glossary__top[hidden] {
	display: none;
}
.glossary__top:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}
.glossary__now:not([hidden]) ~ .glossary__top {
	bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
}
@keyframes glossary-wave {
	0%, 100% { transform: scaleY(0.3); }
	50%      { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
	.glossary__wave i {
		animation: none;
		transform: scaleY(0.7);
	}
}
@media (max-width: 640px) {
	.glossary__now {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: "action main close" "speed speed speed";
	}
	.glossary__now .glossary__slow {
		justify-self: start;
	}
	.glossary__now:not([hidden]) ~ .glossary__top {
		bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
	}
	.glossary__field {
		flex-basis: 100%;
	}
	.glossary__bar .glossary__chapters {
		flex: 1 1 0;
	}
}

.standalone-footer {
	padding-block: var(--space-8);
	border-top: 1px solid var(--color-border);
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}

@media (max-width: 480px) {
	.standalone-book__cover {
		width: 64px;
	}
	.standalone-head {
		gap: var(--space-4);
	}
}

/* Comments — deliberately plain, no nested-reply visual threading beyond
   WP's own default list-item nesting (this blog's comment volume is
   expected to be low; a more elaborate thread UI isn't worth building
   until that's no longer true). */

/* Read next (planner-492): the next post and a book card at the end of a post. docs/CLAUDE-read-next.md.
   The whole card is the link: the title link's ::after covers it, so there is one tab stop per card. */
.read-next {
	/* No top padding: the article's own bottom padding (48px) already separates it from the tags above. */
	padding-block: 0;
}

.read-next__container {
	max-width: 760px; /* the same column as the article and the comments, so the left edges line up */
}

.read-next__heading {
	font-family: var(--font-serif);
	font-size: var(--font-size-2xl);
	margin: 0 0 var(--space-4);
}

.read-next__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: var(--space-4);
}

.read-next__grid--single {
	grid-template-columns: minmax(0, 1fr);
}

.read-next__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: var(--space-4);
	background: var(--color-surface);
	border: 1px solid var(--color-card-edge);
	border-radius: var(--border-radius-md);
}

.read-next__card--book {
	flex-direction: row;
	align-items: flex-start;
	gap: var(--space-4);
}

.read-next__cover {
	flex: 0 0 72px;
	line-height: 0;
}

.read-next__cover img {
	width: 72px;
	height: auto;
	border-radius: 4px;
}

.read-next__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	min-width: 0;
}

.read-next__label {
	margin: 0;
	font-size: var(--font-size-xs);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.read-next__title {
	margin: 0;
	font-size: var(--font-size-lg);
	line-height: 1.3;
}

.read-next__title a {
	color: var(--color-text);
	text-decoration: none;
}

.read-next__title a::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--border-radius-md);
}

.read-next__title a:hover {
	text-decoration: underline;
}

.read-next__title a:focus-visible {
	outline: none;
	text-decoration: underline;
}

.read-next__title a:focus-visible::after {
	outline: 2px solid var(--color-coffee); /* the theme's own focus ring (a:focus-visible) */
	outline-offset: 2px;
}

.read-next__meta {
	margin: 0;
	font-size: var(--font-size-sm);
	color: var(--color-muted);
}

.read-next__reason {
	align-self: flex-start;
	margin: 0;
	padding: 2px var(--space-3);
	font-size: var(--font-size-xs);
	color: var(--color-text-strong);
	background: var(--color-stone-50);
	border: 1px solid var(--color-border);
	border-radius: 999px;
}

.read-next__cue {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-coffee); /* the site's link color, as .post-card__read-more */
}

@media (max-width: 640px) {
	.read-next__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media print {
	.read-next {
		display: none;
	}
}

.single-post__comments {
	max-width: 760px;
	padding-block: var(--space-8) var(--space-16);
	/* No border-top here — the white .single-post__article → gray page-bg
	   transition right above this already reads as a clear section break;
	   an additional border on this narrower, centered container (not
	   full-bleed like the white section) would float disconnected in the
	   gray area with nothing to visually relate to. */
}

.blog-comments__heading {
	font-size: var(--font-size-xl);
	margin-bottom: var(--space-4);
}

.blog-comments__list {
	list-style: none;
	margin: 0 0 var(--space-8);
	padding: 0;
}

/* Real markup from WP core's default html5 comment walker (not something
   this theme controls the structure of, only its styling):
     <article class="comment-body">
       <footer class="comment-meta">
         <div class="comment-author vcard"><img class="avatar">Name <span class="says">says:</span></div>
         <div class="comment-metadata"><a><time>...</time></a></div>
         <em class="comment-awaiting-moderation">...</em>       (unapproved only)
       </footer>
       <div class="comment-content"><p>...</p></div>
       <div class="reply"><a class="comment-reply-link">Reply</a></div>
     </article>
   avatar/name/date are siblings-of-siblings, not already grouped into one
   row — .comment-meta is what's turned into the flex row below so they
   read as one header line instead of avatar-stacked-above-name (the
   unstyled default). */

.blog-comments__list .comment-body {
	/* Was var(--space-5) — not a real token in this theme's scale
	   (3/4/6/8 only; see the CSS custom properties section of this file's
	   own docs), so the whole padding-block value was invalid and
	   collapsed to 0 — the actual cause of the cramped spacing reported
	   live, not a deliberate tight layout. Split top/bottom (not
	   padding-block) — top stayed too generous relative to the divider
	   sitting right above it (li + li's own border-top already reads as
	   the separator), while the bottom still needs the fuller space to
	   clear the .reply button below it. */
	padding-top: var(--space-4);
	padding-bottom: var(--space-6);
}

.blog-comments__list ol.children .comment-body {
	padding-top: var(--space-3);
	padding-bottom: var(--space-4);
}

/* Dividers live on the <li> sibling boundary, not on .comment-body's own
   border — a border on .comment-body itself showed up between a comment
   and its OWN nested reply (ol.children is appended right after
   .comment-body, inside the same <li>), reading as a stray line in the
   middle of one thread rather than a separator between distinct threads.
   `li + li` only matches a later sibling at the SAME nesting level, so a
   top-level comment's own children are never affected by the top-level
   rule, and vice versa for the nested rule below. */
.blog-comments__list > li + li {
	border-top: 1px solid var(--color-border);
}

.blog-comments__list ol.children > li + li {
	border-top: 1px solid var(--color-border);
}

.blog-comments__list .comment-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-3);
	margin-bottom: var(--space-3);
}

.blog-comments__list .comment-author.vcard {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

/* Shape shared by every .avatar wherever it renders (comment list, the
   "posting as" pill, …) — unscoped so it isn't tied to one container.
   Context-specific rules below only set size. */
.avatar {
	border-radius: 50%;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.blog-comments__list .avatar {
	width: 40px;
	height: 40px;
}

.blog-comments__list .comment-author .fn {
	font-weight: 600;
	font-style: normal;
	font-size: var(--font-size-sm);
	color: var(--color-text);
}

/* "says:" reads as filler once name + avatar are already visually grouped
   into one row — kept in the DOM (some assistive tech / plugins expect
   it) but not shown. */
.blog-comments__list .comment-author .says {
	display: none;
}

.blog-comments__list .comment-metadata {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
}

.blog-comments__list .comment-metadata a {
	color: inherit;
	text-decoration: none;
}

.blog-comments__list .comment-metadata a:hover {
	text-decoration: underline;
}

.blog-comments__list .comment-metadata .edit-link {
	margin-left: var(--space-2);
}

.blog-comments__list .comment-awaiting-moderation {
	display: inline-block;
	font-style: normal;
	font-weight: 600;
	font-size: var(--font-size-xs);
	color: var(--color-warn-ink);
	background: var(--color-warn-tint);
	padding: var(--space-1) var(--space-2);
	border-radius: var(--border-radius);
	margin-top: var(--space-1);
}

.blog-comments__list .comment-content p {
	font-size: var(--font-size-base);
	line-height: 1.6;
	color: var(--color-text);
	margin: 0 0 var(--space-2);
}

.blog-comments__list .comment-content p:last-child {
	margin-bottom: 0;
}

.blog-comments__list .reply {
	margin-top: var(--space-3);
	margin-bottom: var(--space-3);
}

/* This is a real <button>, not an <a> (see omorphos_blog_comment_callback()
   in inc/blog.php for why) — without an explicit reset, the browser's
   default button chrome (border/background/padding) still shows through
   for whatever this rule doesn't touch, which is why it rendered as a
   boxed button instead of the plain link it's meant to look like. */
.blog-comments__list .comment-reply-link {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-coffee);
	text-decoration: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
}

.blog-comments__list .comment-reply-link:hover {
	text-decoration: underline;
}

/* Nested replies — a left accent rule reads more clearly at this depth
   than pure indentation alone, and doubles as a visual "this is a reply
   thread" marker without needing a background-color change per depth
   level (this theme only nests one level deep in practice — WP's default
   max_depth is unrestricted, but a blog this size isn't expected to grow
   deep reply chains). */
.blog-comments__list ol.children {
	list-style: none;
	/* margin-bottom (was 0) — this is the container the left accent line
	   actually lives on, not the innermost .reply div; without it the
	   vertical line ran flush into the next top-level comment's divider,
	   even though .reply itself already had breathing room above it. */
	margin: var(--space-4) 0 var(--space-4) var(--space-5);
	padding-left: var(--space-4);
	border-left: 2px solid var(--color-border);
}

/* The margin-bottom above had NO visible effect on its own — real bug,
   not a caching issue (confirmed the declaration was actually being
   served, then confirmed live that manually re-adding the same value in
   DevTools didn't survive a refresh either). Root cause: ol.children is
   the last child inside its <li>, and since that <li> has no padding/
   border of its own, a last child's margin-bottom collapses straight
   through the parent's bottom edge instead of producing visible space
   (CSS margin collapsing — see MDN "Mastering margin collapsing"). Any
   padding on the <li> itself blocks that collapse regardless of value,
   which is what actually makes ol.children's margin-bottom (and .reply's,
   for a comment with no children) finally show up. */
.blog-comments__list li {
	padding-bottom: var(--space-2);
}


.blog-comments__gravatar-note {
	font-size: var(--font-size-xs);
	color: var(--color-muted);
	margin: var(--space-2) 0 0;
}

.blog-comments__gravatar-note a {
	color: inherit;
	text-decoration: underline;
}

/* Marks a staff reply (sent publicly from omorphos-support's Support
   Inbox) in the public thread — reuses .badge/.badge--topic's existing
   chip look (same amber tone already used for category chips elsewhere
   on this page), just smaller/inline since it sits directly next to a
   name instead of standing alone. */
.blog-comments__staff-badge {
	font-size: 0.6875rem;
	padding: 1px var(--space-2);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	vertical-align: middle;
}

.blog-comments__closed {
	color: var(--color-muted);
	font-style: italic;
}

/* Shared input styling — used by the modal's own fields
   (.blog-comment-modal__field input/textarea below). */
.blog-comments__field {
	width: 100%;
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	font-family: var(--font-sans);
	font-size: var(--font-size-base);
	background: var(--color-surface);
	color: var(--color-text);
}

.blog-comments__toggle {
	/* Small default footprint (direct feedback) — a plain button, not the
	   full form, is what a post page shows until someone actually wants to
	   comment. */
	margin-top: var(--space-2);
}

/* =========================================================
   Blog comment modal
   ---------------------------------------------------------
   Same overlay/dialog visual language as .capture-modal-overlay/
   .capture-modal (assets/js/email-capture-modal.js), own class prefix
   since it's built by a different script with a different field set —
   not worth sharing markup/classes across two files that don't otherwise
   depend on each other.
   ========================================================= */

.blog-comment-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: var(--color-scrim);
	align-items: flex-start;
	justify-content: center;
	padding: var(--space-6) var(--space-4);
	overflow-y: auto;
	backdrop-filter: blur(2px);
}

.blog-comment-modal-overlay.is-open {
	display: flex;
}

.blog-comment-modal {
	position: relative;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	width: 100%;
	max-width: 520px;
	padding: var(--space-6);
	box-shadow: 0 24px 64px rgba(0,0,0,0.15);
	margin-block: var(--space-8);
}

.blog-comment-modal__close {
	position: absolute;
	top: var(--space-3);
	right: var(--space-3);
	background: none;
	border: none;
	font-size: 1.375rem;
	line-height: 1;
	color: var(--color-muted);
	cursor: pointer;
	padding: var(--space-1);
}

.blog-comment-modal__close:hover { color: var(--color-text); }

.blog-comment-modal__title {
	font-family: var(--font-serif);
	font-size: var(--font-size-xl);
	margin: 0 0 var(--space-4);
	padding-right: var(--space-8);
}

.blog-comment-modal__quote {
	background: var(--color-bg);
	border-left: 3px solid var(--color-border);
	border-radius: var(--border-radius);
	padding: var(--space-3);
	margin-bottom: var(--space-4);
}

.blog-comment-modal__quote-author {
	font-size: var(--font-size-xs);
	font-weight: 600;
	color: var(--color-muted);
	margin: 0 0 var(--space-1);
}

.blog-comment-modal__quote-text {
	font-size: var(--font-size-sm);
	color: var(--color-text);
	font-style: italic;
	margin: 0;
}

.blog-comment-modal-form {
	display: flex;
	flex-direction: column;
	/* Direct feedback on the old inline form: too much space between
	   fields. Tighter gap + each field's own compact label-to-input
	   spacing (below) instead of the old form's looser var(--space-4). */
	gap: var(--space-3);
}

.blog-comment-modal__field label {
	display: block;
	font-size: var(--font-size-sm);
	font-weight: 600;
	margin-bottom: var(--space-1);
}

.blog-comment-modal__field .required {
	color: var(--color-muted);
}

.blog-comment-modal__fields {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

/* Same "a class selector's own unconditional display rule beats the
   browser's very-low-specificity [hidden] UA style" gotcha this codebase
   has hit (and documented) multiple times already, in the exact same
   family of modals — .capture-modal-form__fields/__success in
   email-capture-modal.js's own CSS. Missing this override here is why
   both the pill AND the fields showed at once regardless of which one
   JS's `.hidden = true/false` was actually toggling — found live. */
.blog-comment-modal__fields[hidden] {
	display: none;
}

.blog-comment-modal__remember {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--font-size-sm);
	color: var(--color-muted);
	cursor: pointer;
}

.blog-comment-modal__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* "Posting as" pill — replaces the two Name/Email fields once a visitor
   has successfully posted once (saved to localStorage, not WP core's own
   comment-author cookie — see this file's own docblock for why). */
.blog-comment-modal__pill {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-bg);
}

.blog-comment-modal__pill[hidden] {
	display: none;
}

.blog-comment-modal__pill-avatar .avatar {
	width: 24px;
	height: 24px;
	font-size: var(--font-size-xs);
}

.blog-comment-modal__pill-text {
	flex: 1;
	font-size: var(--font-size-sm);
	color: var(--color-text);
}

.blog-comment-modal__pill-email {
	color: var(--color-muted);
}

.blog-comment-modal__pill-clear {
	background: none;
	border: none;
	font-size: 1.125rem;
	line-height: 1;
	color: var(--color-muted);
	cursor: pointer;
	padding: var(--space-1);
}

.blog-comment-modal__pill-clear:hover { color: var(--color-text); }

.blog-comment-modal__error {
	font-size: var(--font-size-sm);
	color: var(--color-warn-ink);
	background: var(--color-warn-tint);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--border-radius);
	margin: 0;
}

.blog-comment-modal__submit {
	align-self: flex-start;
}

/* Initials-in-a-circle avatar (JS-inserted comments and the "posting as"
   pill) — matches the real <img class="avatar"> WP core renders (same
   width/height/border-radius), just filled with a color instead of a
   photo, since building the correct Gravatar URL client-side would need
   an MD5 hash of the email. Centered via text-align/line-height, not
   flex — `.blog-comments__list .avatar`'s own `display: block` (0,2,0
   specificity) would otherwise beat a `display: flex` override here
   (0,1,0) whenever this renders inside the comment list, since the more
   specific rule wins regardless of source order. line-height needs an
   explicit px value matching the avatar's own height (not 1/normal),
   since percentage/keyword line-heights don't reliably vertically-center
   single-line text this way. */
.blog-comments__initials-avatar {
	text-align: center;
	line-height: 40px;
	color: #fff;
	font-weight: 600;
}

.blog-comment-modal__pill-avatar .blog-comments__initials-avatar {
	line-height: 24px;
}

/* =========================================================
   Reduced motion
   ---------------------------------------------------------
   Every transition/animation on the site is presentational
   (hover states, modal/drawer open-close, chevron rotation) —
   none carries information that's lost by cutting it to a
   near-instant duration, so a blanket override is safe here
   rather than needing a case-by-case opt-out list.
   ========================================================= */

@media ( prefers-reduced-motion: reduce ) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* "Notify me when it's out" (template-parts/book-notify.php, assets/js/book-notify.js, planner-129 step 5).
   Neutrals plus the Teal tint pairing for "you're on the list" (the same tint/ink pair the Note filled variant and the
   system success notices use). Terracotta stays commerce-only, so the control is never filled with it. Three variants:
   button (outline, under a release notice), link (a quiet text link for when a preorder or sample is the main action) and
   icon (a bell, for cards and dense rows). */
.book-notify {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
	color: var(--color-ink);
}
.book-notify__icon { flex: none; }
.book-notify--button {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 14px;
	font-size: 0.875rem;
	font-weight: 600;
	background: transparent;
	border: 2px solid var(--color-ink);
	border-radius: var(--radius-sm, 6px);
}
.book-notify--button:hover { background: var(--color-ink); color: var(--color-surface); }
.book-notify--link {
	padding: 4px 0;
	font-size: var(--font-size-sm, 0.875rem);
	background: none;
	border: 0;
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.book-notify--link:hover { text-decoration-color: var(--color-coffee); }
.book-notify--icon {
	width: 36px;
	height: 36px;
	padding: 0;
	background: var(--color-surface);
	border: 1.5px solid var(--color-ink);
	border-radius: var(--radius-sm, 6px);
}
.book-notify--icon:hover { background: var(--color-ink); color: var(--color-surface); }
.book-notify:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 3px; }
/* On the list: teal tint, with a 1.5px teal-ink edge so it still reads as a control against white. */
.book-notify.is-on {
	background: var(--color-teal-tint);
	color: var(--color-teal-ink);
	border-color: var(--color-teal-ink);
}
.book-notify--link.is-on { background: none; border: 0; text-decoration-color: var(--color-teal-ink); }
.book-notify.is-on:hover { background: var(--color-teal-tint); color: var(--color-teal-ink); }
.book-notify.is-pending { border-style: dashed; }
.book-notify--link.is-pending { border: 0; }
/* Icon variant, on: the bell fills in and a check badge appears, so "on" is not colour alone. The words live in the tooltip
   (hover or keyboard focus on a pointer device; touch gets the toast). */
.book-notify { position: relative; z-index: 2; } /* above a row's stretched-link overlay (z-index 1), so any variant is clickable there (the icon bell, and the text link on a phone) */
/* The check badge hangs 7px past the button's bottom-right corner (`.book-notify__check`: right and bottom -7px). The button owns
   that space, so a bell at the edge of a card with `overflow: hidden` (the catalog rows, the "At your level" card) or of the page
   no longer has its badge cropped. It is reserved always, so turning the bell on never moves the layout. */
.book-notify--icon { margin-right: 7px; margin-bottom: 7px; }
.book-notify__icon--solid, .book-notify__check { display: none; }
.book-notify.is-on .book-notify__icon--line { display: none; }
.book-notify.is-on .book-notify__icon--solid { display: block; }
.book-notify__glyph { position: relative; display: inline-flex; flex: none; }
.book-notify__check {
	position: absolute;
	right: -7px;
	bottom: -7px;
	width: 16px;
	height: 16px;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--color-teal-ink);
	border: 2px solid var(--color-surface);
	align-items: center;
	justify-content: center;
	color: var(--color-surface);
}
.book-notify__glyph .book-notify__check { right: -6px; bottom: -5px; width: 13px; height: 13px; border-width: 1.5px; }
.book-notify__check svg { width: 8px; height: 8px; display: block; }
.book-notify__glyph .book-notify__check svg { width: 6px; height: 6px; }
.book-notify.is-on .book-notify__check { display: flex; }
/* The check badge's ring is the button's own tint when the bell sits in a tinted button, so it reads as a cut-out. */
.book-notify--button.is-on .book-notify__check { border-color: var(--color-teal-tint); }
.book-notify__tip {
	display: none;
	position: absolute;
	right: calc(100% + 10px); /* to the left of the bell: a card or row clips (overflow hidden) anything above or below it */
	top: 50%;
	transform: translateY(-50%);
	width: max-content;
	max-width: 210px;
	padding: 8px 10px;
	border-radius: var(--radius-sm, 6px);
	background: var(--color-ink);
	color: var(--color-surface);
	font-size: var(--font-size-xs, 0.8125rem);
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	pointer-events: none;
	z-index: 5;
}
@media (hover: hover) {
	.book-notify--icon:hover .book-notify__tip,
	.book-notify--icon:focus-visible .book-notify__tip { display: block; }
}
/* The one confirmation toast (assets/js/book-notify.js): also the live region. */
.book-notify-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: calc(100vw - 32px);
	padding: 10px 14px;
	border-radius: var(--radius-sm, 6px);
	background: var(--color-ink);
	color: var(--color-surface);
	font-size: 0.875rem;
}
.book-notify-toast[hidden] { display: none; }
.book-notify-toast__undo {
	background: none;
	border: 0;
	padding: 2px;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.book-notify-toast__undo:focus-visible { outline: 2px solid var(--color-surface); outline-offset: 2px; }
/* On a card, the control sits under the release date. */
.book-card__notify { margin-top: var(--space-2); }
/* The detailed card puts its bell at the left of the text column, with the cover beside it, so the tooltip opens to the
   right (to the left it ran under the card's overflow:hidden and was cut off). */
.book-card--detailed .book-notify__tip { right: auto; left: calc(100% + 10px); }
.book-card__row-availability .book-notify--icon { margin-top: var(--space-2); margin-left: auto; }
/* In a catalog row (and the "At your level" card, which is one) the bell is an icon in the right-hand availability column, and
   where the row stacks (767px and under, see the mobile row block above) a text link under the date: the bell took a 36px line of
   its own, an ordinary use of a phone's height being a quiet link. Only one is displayed, so only one is in the accessibility tree. */
.book-card__notify--narrow { display: none; }
@media ( max-width: 767px ) {
	.book-card__notify--wide { display: none; }
	.book-card__notify--narrow { display: block; }
	.book-card__row-availability .book-notify--link { padding: 2px 0; }
}

/* Notify control on the book page and in the sample CTA block (planner-129 step 5). */
.single-book__notify { margin-top: var(--space-2); }
.single-book__notify-note { margin: 6px 0 0; font-size: var(--font-size-xs); line-height: 1.35; color: var(--color-muted); }
.book-sample-cta__notify { margin: 10px 0 0; }

/* Notify bell on an Upcoming Releases row (planner-129 step 5): under the date, right-aligned in the status column (where the
   Preorder button sits above it on a preorder row), smaller than on a card. */
.upcoming-row__status .book-notify--icon {
	width: 32px;
	height: 32px;
	flex: none;
}
/* Where the row stacks (its own container 28rem and under, see the @container upc blocks above), the bell would take a line of
   its own, so a text link replaces it, as in a catalog row (see .book-card__notify--narrow). One is displayed at a time, so only one
   is in the accessibility tree. The status column is column-reverse there, so `order: -1` puts the link BELOW the date. */
.upcoming-row__notify--narrow { display: none; }
@container upc ( max-width: 28rem ) {
	.upcoming-row__notify--wide { display: none; }
	.upcoming-row__notify--narrow { display: block; order: -1; }
	.upcoming-row__status .book-notify--link { padding: 2px 0; }
}


/* Select menu: the site's own dropdown (template-parts/select-menu.php, assets/js/select-menu.js). Neutrals only; the selected
   option is marked with a check and weight, never with the accent. */
.select-menu {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	gap: var(--space-1);
}
.select-menu__label {
	font-family: var(--font-sans);
	font-size: var(--font-size-xs, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-muted);
}
.select-menu__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: 44px;
	padding: var(--space-2) var(--space-4);
	font: inherit;
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--color-text-strong);
	text-align: left;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	cursor: pointer;
}
.select-menu__trigger:hover { border-color: var(--color-muted); }
.select-menu__trigger:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 2px; }
.select-menu__chevron { flex: none; color: var(--color-muted); transition: transform var(--transition); }
.select-menu.is-open .select-menu__chevron { transform: rotate(180deg); }
.select-menu .select-menu__list {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 20;
	box-sizing: border-box;
	min-width: 100%;
	max-height: 280px;
	margin: 0;
	padding: var(--space-1);
	padding-inline-start: var(--space-1); /* beats .entry-content ul { padding-inline-start }, which otherwise indents the options */
	overflow-y: auto;
	list-style: none;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
	box-shadow: 0 8px 24px rgba(28, 25, 23, 0.10);
}
.select-menu .select-menu__list[hidden] { display: none; }
.select-menu .select-menu__option {
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding: var(--space-2) var(--space-3);
	font-family: var(--font-sans);
	font-size: var(--font-size-sm);
	color: var(--color-text);
	white-space: nowrap;
	border-radius: var(--border-radius-md);
	cursor: pointer;
}
.select-menu .select-menu__option.is-active { background: var(--color-surface-alt); }
.select-menu .select-menu__option.is-selected { font-weight: 700; color: var(--color-text-strong); }
.select-menu__check { flex: none; visibility: hidden; color: var(--color-coffee); }
.select-menu .select-menu__option.is-selected .select-menu__check { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
	.select-menu__chevron { transition: none; }
}
.select-menu__trigger-icon,
.select-menu__option-icon { display: inline-flex; flex: none; align-items: center; font-size: 1.125rem; }
.select-menu__trigger-icon:empty { display: none; }
.select-menu__trigger { justify-content: flex-start; }
.select-menu__value { flex: 1 1 auto; }
.select-menu__option-label { flex: 1 1 auto; }
.select-menu .select-menu__option { justify-content: flex-start; }
.select-menu__icon { display: block; width: 1em; height: 1em; flex: none; }
.select-menu__icon--svg svg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.select-menu__icon--mask {
	background-color: var(--lang-icon-tone, var(--lang-icon-recolor, currentColor));
	-webkit-mask-image: var(--lang-icon-svg);
	mask-image: var(--lang-icon-svg);
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
}
.select-menu__icon--emoji { width: auto; height: auto; line-height: 1; }
img.select-menu__icon { border-radius: 50%; object-fit: cover; }
.select-menu__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.select-menu__caption { font-size: var(--font-size-xs, 0.8125rem); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); line-height: 1.3; }
.select-menu__action { flex: none; font-size: var(--font-size-sm); font-weight: 700; color: var(--color-coffee); }
.select-menu__option-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.select-menu__option-meta { font-size: var(--font-size-xs, 0.8125rem); font-weight: 400; color: var(--color-muted); }


/* "Where are you based?" after confirming (planner-188; email-capture-modal.js renderCountryQuestion). A short, optional
   question inside the confirmation view: neutral, quiet, nothing in the accent colour. */
.capture-country {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	margin: var(--space-5, 20px) 0 var(--space-2);
	padding: var(--space-4);
	text-align: left;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg);
}
.capture-country__q { font-size: var(--font-size-sm); color: var(--color-text); }
.capture-country__select {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	min-height: 44px;
	padding: var(--space-2) 40px var(--space-2) var(--space-3);
	font: inherit;
	font-size: var(--font-size-sm);
	color: var(--color-text-strong);
	background-color: var(--color-surface);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236B6259' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	border: 1px solid var(--color-stone-400);
	border-radius: var(--border-radius-lg);
}
.capture-country__select:focus-visible { outline: 2px solid var(--color-coffee); outline-offset: 2px; }
.capture-country__help { margin: 0; font-size: var(--font-size-xs, 0.8125rem); color: var(--color-muted); }
.capture-country__actions { display: flex; align-items: center; gap: var(--space-4); }
.capture-country__skip {
	background: none;
	border: 0;
	padding: 2px;
	font: inherit;
	font-size: var(--font-size-sm);
	color: var(--color-coffee);
	text-decoration: underline;
	text-decoration-color: var(--color-link-rule);
	text-underline-offset: 3px;
	cursor: pointer;
}
.capture-country__status:empty { display: none; }
.capture-country__status, .capture-country__done { margin: 0; font-size: var(--font-size-sm); color: var(--color-text); }
.capture-modal-form__country-field { display: flex; flex-direction: column; gap: var(--space-1); }
.capture-modal-form__country-field[hidden] { display: none; }
.capture-modal-form__optional { font-weight: 400; color: var(--color-muted); }

/* Page header with an image (CTA block "Header image", page-header variant): text left, screenshot right; stacked
   (text first) below 900px. Without an image the header is unchanged. */
.taxonomy-header__split {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-6);
	align-items: center;
}
@media (min-width: 900px) {
	.taxonomy-header__split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; }
}
.taxonomy-header__text {
	display: flex;
	flex-direction: column;
	gap: var(--taxonomy-header-gap);
	min-width: 0;
}
.taxonomy-header__media { min-width: 0; }
.taxonomy-header__image {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-lg, 8px);
	background: var(--color-surface);
}

/* ── Term format (planner-321) ─────────────────────────────────────────────
   <i class="omo-term" lang="…">, applied with the editor's "Term" format
   (editor-formats/): a word or form discussed as language (맞지, -ㅂ니다, falei),
   not a title or stress. Latin-script languages keep the plain italic that is
   the English convention for foreign terms. Korean, Japanese and Chinese have
   no italic (the browser fakes a slant) and their typography doesn't use it,
   so they sit upright in a Stone-50 chip instead. */
.omo-term {
	font-style: italic;
}

.omo-term:lang(ko),
.omo-term:lang(ja),
.omo-term:lang(zh) {
	font-style: normal;
	background: var(--color-stone-50);
	border-radius: 4px;
	padding: 1px 5px;
	word-break: keep-all;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Say aloud (planner-501): the pronunciation button script/say-aloud.js puts right after a term marked "Say aloud" in the editor
   (docs/CLAUDE-js-assets.md; mockup pattern A: a round 24px icon button). A real <button> with a hidden-text name; hidden until
   the device has a voice or the term has a recording. Pressed = a filled button AND a stop square (never colour alone).
   Roles, not literals, so light and dark follow the page. No transitions or animation, so nothing needs the reduced-motion block. */
.say-aloud-group {
	white-space: nowrap; /* nothing breaks between the term's last character and its button (say-aloud.js groups them) */
}

/* A long term (a whole example sentence, planner-595) wraps like any text. Chrome decides the break before the button from the
   style of the text just before it, so the group's no-wrap is not enough once the term wraps: the term opts back in, and its
   last character is followed by a word joiner in a no-wrap pseudo-element, which keeps the last word on the button's line.
   Measured 100 to 480px: no button alone on a line. A one-word term has no break inside it and looks exactly as before. */
.say-aloud-group .omo-term {
	white-space: normal;
}

.say-aloud-group .omo-term::after {
	content: "\2060";
	white-space: nowrap;
}

.say-aloud {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	width: 24px;
	height: 24px;
	margin: 0 0 0 4px;
	padding: 0;
	border: 1px solid var(--ctl-border);
	border-radius: 50%;
	background: transparent;
	color: var(--color-coffee);
	font: inherit;
	font-style: normal;
	line-height: 1;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none; /* a copied sentence should not carry the hidden button name */
}

.say-aloud[hidden] {
	display: none;
}

.say-aloud:hover {
	border-color: var(--color-coffee);
	background: var(--color-stone-50);
}

.say-aloud:focus-visible {
	outline: 2px solid var(--color-coffee);
	outline-offset: 3px;
}

.say-aloud svg {
	display: block;
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.say-aloud .say-aloud__stop {
	display: none;
}

.say-aloud[aria-pressed="true"] {
	border-color: var(--color-coffee);
	background: var(--color-coffee);
	color: var(--color-on-coffee);
}

.say-aloud[aria-pressed="true"] .say-aloud__play {
	display: none;
}

.say-aloud[aria-pressed="true"] .say-aloud__stop {
	display: block;
}

@media (forced-colors: active) {
	.say-aloud {
		border-color: ButtonText;
		color: ButtonText;
	}

	.say-aloud[aria-pressed="true"] {
		forced-color-adjust: none;
		border-color: Highlight;
		background: Highlight;
		color: HighlightText;
	}
}

@media print {
	.say-aloud {
		display: none;
	}
}

/* In the block editor a marked term shows a dotted underline, so an author can see which terms will get the button (the
   button itself only exists on the public page). */
.editor-styles-wrapper .omo-term[data-say-aloud] {
	text-decoration: underline dotted;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* Hangul breaks between syllables by default, splitting a word like
   하십시오체 across lines. keep-all breaks only at spaces, as Korean
   typesetting does. Any text marked lang="ko", anywhere on the site. `body`
   rather than .entry-content so the editor (where add_editor_style() turns
   `body` into .editor-styles-wrapper) wraps the same way. Korean text with no
   lang attribute is not covered; mark it (Term, or core's Language format). */
body :lang(ko) {
	word-break: keep-all;
}

/* Visitor regions (planner-452, inc/visitor-regions.php): the wrapper around a part of a page that can show a signed-in reader's own
   state. It adds no box, so a region sits in a sidebar or a block exactly where its contents did. */
.visitor-region {
	display: contents;
}

/* Visitor regions (planner-452): while a signed-in reader's version is on its way, the regions that would visibly change
   (not cards, which are mostly unchanged and stay as printed) keep their space but are not painted or read, so a Buy button
   never flashes before "In Your Library". The head script sets the class only when the signed-in marker cookie is present
   and removes it on any outcome. The swapped-in region fades in; the reduced-motion block above zeroes the animation. */
html.omo-regions-pending [data-visitor-region]:not([data-visitor-region="book-card"]) { visibility: hidden; }
.visitor-region--hydrated { animation: omo-region-in 0.15s ease-out; }
@keyframes omo-region-in { from { opacity: 0; } to { opacity: 1; } }

/* The catalog grouped by language (planner-524): with two or more languages selected, one section per language. A header with the
   language's icon, its name and, at the right, how many books (or that there are none at this level); an empty language's section
   says so and lists that language's recommendations under it. Mockup: claude/mockups/planner-524-by-language.html. */
.lang-group + .lang-group {
	margin-top: var(--space-8);
	padding-top: var(--space-8);
	border-top: 1px solid var(--color-border);
}

.lang-group__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 var(--space-4);
	font-family: var(--font-heading);
	font-size: var(--font-size-xl);
}

.lang-group__icon {
	display: inline-flex;
	font-size: 1.5rem;
	line-height: 1;
}

.lang-group__note {
	margin-left: auto;
	font: 400 var(--font-size-sm) / 1.2 var(--font-body);
	color: var(--color-muted);
	text-align: right;
}

.lang-group__empty {
	margin: 0 0 var(--space-3);
	color: var(--color-muted);
}


.lang-group__all {
	margin: var(--space-3) 0 0;
}

/* The recommendations under an empty language's label (planner-524): the list brings its own 32px top and bottom margin (a
   free-standing block), which put the first row 42px below the label and added to the space before the next language. Inside a
   language section the label's own 12px is the gap and the section's own top margin separates the sections. */
.lang-group .omo-recommendations {
	margin-block: 0;
}
