/*
Theme Name: twe
Theme URI: https://thisworldexplained.com
Author: This World Explained
Author URI: https://thisworldexplained.com
Description: Classic WordPress theme for This World Explained. Three brand scopes (umbrella, Tales That Shaped Us, Okay, But...) switched per piece by series term -> body class -> CSS custom properties.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
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: twe
Tags: blog, news, accessibility-ready
*/

/* ------------------------------------------------------------------
   1. Self-hosted fonts (woff2 live in wp-content/uploads/twe-assets/fonts/).
   font-display: swap everywhere. Single-weight faces declare 100 900
   so the browser never synthesizes faux bold from a 400 file.
   ------------------------------------------------------------------ */

@font-face {
  font-family: Archivo;
  src: url("../../uploads/twe-assets/fonts/archivo/archivo-400.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../../uploads/twe-assets/fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next-400.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Literata;
  src: url("../../uploads/twe-assets/fonts/literata/literata-400.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Literata;
  src: url("../../uploads/twe-assets/fonts/literata/literata-400-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Fredoka;
  src: url("../../uploads/twe-assets/fonts/fredoka/fredoka-400.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Caveat;
  src: url("../../uploads/twe-assets/fonts/caveat/caveat-400.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------
   2. Tokens — default (umbrella This World Explained) scope on :root.
   Series scopes override the same token names via body class, so
   templates only ever reference these working tokens.
   ------------------------------------------------------------------ */

:root {
  /* umbrella surfaces + ink */
  --paper: #FCFCFD;
  --paper-2: #F1F3F6;
  --paper-3: #E3E7EC;
  --ink: #1B1E23;
  --ink-muted: #4E555F;
  --rule: #D7DCE2;
  --rule-strong: #A8B0BA;

  /* umbrella accent */
  --accent: #1F5266;
  --accent-hover: #143743;
  --on-accent: #FFFFFF;
  --accent-2: #4E555F;

  /* hero defaults (overridden per series) */
  --hero-bg: var(--paper-2);
  --hero-ink: var(--ink);

  /* faces */
  --font-archivo: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-atkinson: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-literata: Literata, "Iowan Old Style", Georgia, serif;
  --font-fredoka: Fredoka, Archivo, "Helvetica Neue", Helvetica, sans-serif;
  --font-caveat: Caveat, "Bradley Hand", cursive;
  --font-display: var(--font-archivo);
  --font-text: var(--font-atkinson);

  /* type scale */
  --step--2: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --step--1: clamp(0.84rem, 0.81rem + 0.15vw, 0.92rem);
  --step-0: clamp(1.00rem, 0.97rem + 0.18vw, 1.10rem);
  --step-1: clamp(1.19rem, 1.13rem + 0.30vw, 1.36rem);
  --step-2: clamp(1.42rem, 1.31rem + 0.55vw, 1.75rem);
  --step-3: clamp(1.69rem, 1.49rem + 1.00vw, 2.30rem);
  --step-4: clamp(2.01rem, 1.66rem + 1.75vw, 3.10rem);
  --step-5: clamp(2.40rem, 1.80rem + 3.00vw, 4.20rem);

  /* layout */
  --measure: 66ch;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
  --shell: 1280px;
  --radius: 3px;
  --target: 44px;
}

/* Tales That Shaped Us — warm parchment scope. The same token set is
   exposed on [data-series="tales"] so a series band can sit on an
   umbrella page (kit mechanism, same values). */
.series-tales,
[data-series="tales"] {
  --paper: #FFF5DA;
  --paper-2: #F0D0AD;
  --paper-3: #F0D0AD;
  --ink: #332633;
  --ink-muted: color-mix(in srgb, var(--ink) 78%, var(--paper));
  --rule: color-mix(in srgb, var(--ink) 18%, var(--paper));
  --rule-strong: color-mix(in srgb, var(--ink) 38%, var(--paper));
  --accent: #7F3842;            /* Archive Plum */
  --accent-hover: #235E64;      /* Deep Teal */
  --accent-2: #235E64;          /* Deep Teal */
  --on-accent: #FFF5DA;         /* Luminous Cream on Archive Plum — approved pairing */
  --hero-bg: #241F2E;
  --hero-ink: #FFF5DA;
  --font-display: var(--font-literata);
}

/* Okay, But… — brand paper scope. Route tokens live HERE only, never :root.
   [data-series="okay"] mirrors the scope for sections on umbrella pages. */
.series-okay,
[data-series="okay"] {
  --paper: #F7F3E8;
  --paper-2: #EDE7D6;
  --paper-3: #EDE7D6;
  --ink: #111111;
  --ink-muted: #666666;         /* warm gray */
  --rule: color-mix(in srgb, var(--ink) 16%, var(--paper));
  --rule-strong: color-mix(in srgb, var(--ink) 36%, var(--paper));
  --accent: #4776E6;            /* HOW */
  --accent-strong: #2F5BC7;     /* HOW darkened for solid fills (AA on white) */
  --accent-hover: #2C50B0;
  --accent-2: #B65F32;          /* Copper */
  --copper: #B65F32;
  --warm-gray: #666666;
  --on-accent: #FFFFFF;
  --hero-bg: #F7F3E8;
  --hero-ink: #111111;
  --font-display: var(--font-fredoka);
  --font-hand: var(--font-caveat);

  /* route colors: accents/surfaces only, never body text */
  --q-how: #4776E6;
  --q-why: #F4C95D;
  --q-who: #EF6A67;
  --q-where: #42B8A9;
}

/* ------------------------------------------------------------------
   3. Base
   ------------------------------------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: break-word;
}

img, svg, video, iframe { max-width: 100%; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

[hidden] { display: none !important; }

[id] { scroll-margin-top: 5rem; }

::selection { background: var(--accent); color: var(--on-accent); }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus-visible {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------
   4. Layout shell
   ------------------------------------------------------------------ */

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* same shell under the template-port class name */
.twe-shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-main {
  display: block;
  padding-block: clamp(1.5rem, 3vw, 3rem) clamp(3rem, 6vw, 5rem);
  min-height: 55vh;
}

/* ------------------------------------------------------------------
   5. Header
   ------------------------------------------------------------------ */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.9rem;
}

.site-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-title a {
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  padding: 0.35rem 0;
}

.site-title a:hover { color: var(--accent); }

.site-description {
  margin: 0.1rem 0 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.site-header .search-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-header .search-form input[type="search"] {
  min-height: var(--target);
  min-width: 12ch;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
}

.site-header .search-form .search-submit {
  min-height: var(--target);
  padding: 0.4rem 0.9rem;
}

/* primary nav */
.site-nav-wrap .site-nav,
nav.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li { display: flex; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-nav .current-menu-item > a,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------------
   6. Buttons
   ------------------------------------------------------------------ */

.twe-btn,
.search-form .search-submit,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  padding: 0.55rem 1.2rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-text);
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.twe-btn:hover,
.search-form .search-submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.twe-btn-outline {
  background: transparent;
  color: var(--accent);
}

.twe-btn-outline:hover {
  background: transparent;
  color: var(--accent-hover);
}

/* ------------------------------------------------------------------
   7. Breadcrumbs
   ------------------------------------------------------------------ */

.breadcrumbs { margin-bottom: 1rem; }

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.breadcrumbs-list li { display: flex; align-items: baseline; }

.breadcrumbs-list li + li::before {
  content: "\203A";
  margin-inline-end: 0.35rem;
  color: var(--ink-muted);
}

.breadcrumbs-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.15rem 0;
}

.breadcrumbs-list [aria-current="page"] {
  color: var(--ink-muted);
  font-weight: 600;
}

/* empty series state */
.twe-no-results {
  max-width: var(--measure);
}

/* ------------------------------------------------------------------
   8. Home (front-page.php) — ported from Home.dc.html + ContentCard.dc.html
   ------------------------------------------------------------------ */

/* question-type tokens at umbrella level (same values as .series-okay;
   site-base.css carries them in :root). Accents/surfaces only — never
   body text: each has a darkened -ink partner for type. */
:root {
  --q-how: #4776E6;  --q-how-ink: #2C50B0;
  --q-why: #F4C95D;  --q-why-ink: #7A5A0C;
  --q-who: #EF6A67;  --q-who-ink: #B2312E;
  --q-where: #42B8A9; --q-where-ink: #14675C;
}

/* shared section rhythm */
.twe-section {
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}

.twe-section:last-of-type { border-bottom: 0; }

.twe-section-alt { background: var(--paper-2); }

.twe-section-heading {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
}

.twe-section-heading-sm {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
}

.twe-section-lede {
  max-width: 64ch;
  margin: -0.5rem 0 1.5rem;
  color: var(--ink-muted);
}

.twe-section-rule-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.twe-section-rule-head .twe-section-heading { margin: 0; }

.twe-more-link {
  margin: 0;
  font-weight: 700;
  font-size: var(--step--1);
}

.twe-more-link a { font-weight: 700; }

.twe-muted-note { color: var(--ink-muted); font-size: var(--step--1); }

/* decorative art slot (design's image placeholder treatment) */
.twe-art-slot {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  padding: 0.75rem;
  border: 1px solid var(--rule-strong);
  background: repeating-linear-gradient(135deg, var(--paper-2) 0 9px, var(--paper-3) 9px 18px);
}

.twe-art-label {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink-muted);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.7rem;
}

/* buttons (solid ink / ghost / series-accent) */
.twe-btn-solid,
.twe-btn-ghost,
.twe-btn-accent,
.twe-newsletter-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: var(--step-0);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.twe-btn-solid {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.twe-btn-solid:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.twe-btn-ghost {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.twe-btn-ghost:hover { background: var(--paper-3); }

.twe-btn-accent {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  max-width: 26rem;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  text-align: start;
}

.twe-btn-accent:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.twe-btn-accent .twe-btn-kicker {
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* proposition hero */
.twe-prop-hero {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

.twe-prop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.twe-prop-main { min-width: 0; }

.twe-prop-title {
  max-width: 24ch;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.twe-prop-lede {
  max-width: 46ch;
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.twe-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.twe-prop-aside {
  min-width: 0;
  padding-left: clamp(1rem, 2vw, 2rem);
  border-left: 1px solid var(--rule);
}

.twe-rail-heading {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.twe-rail-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.twe-rail-item {
  padding-left: 0.85rem;
  border-left: 4px solid var(--accent);
}

.twe-rail-item.twe-rail-tales { border-left-color: var(--q-how-ink); }        /* Tales plum-navy rail */
.twe-rail-item.twe-rail-okay { border-left-color: #1B3A6B; }                   /* design: #1B3A6B okay rail */
.twe-rail-item.twe-rail-learning { border-left-color: var(--accent); }

.twe-rail-item a {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
}

.twe-rail-item a:hover { color: var(--accent); }

.twe-rail-item p {
  max-width: none;
  margin: 0.15rem 0 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

/* lead story band — Tales scope carried on the section itself (kit's
   data-series scope), so the umbrella front page can host a series band */
.twe-lead-band {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.twe-lead-band[data-series="tales"] { background: #FFF5DA; }  /* Tales cream panel — umbrella page, accent surface only */

.twe-lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.twe-lead-art { min-width: 0; }

.twe-lead-art .twe-art-slot { border-color: var(--rule-strong); }

.twe-lead-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule-strong);
}

.twe-lead-body { min-width: 0; }

.twe-lead-eyebrow {
  margin: 0 0 0.6rem;
  color: var(--q-how-ink);   /* plum rail ink doubles as the band's accent type */
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.twe-lead-title {
  max-width: 22ch;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.1;
}

.twe-lead-title a {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.twe-lead-title a:hover { color: var(--accent); }

.twe-lead-excerpt {
  max-width: 44ch;
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.twe-lead-meta {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

/* question cards */
.twe-question-section { border-bottom: 1px solid var(--rule); }

.twe-question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.twe-question-card {
  border: 1px solid var(--rule-strong);
  border-bottom-width: 6px;
  background: var(--paper);
}

.twe-question-card > a {
  display: block;
  min-height: 44px;
  padding: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.twe-question-card > a:hover { background: var(--paper-2); }

.twe-q-how { border-bottom-color: var(--q-how); }
.twe-q-why { border-bottom-color: var(--q-why); }
.twe-q-who { border-bottom-color: var(--q-who); }
.twe-q-where { border-bottom-color: var(--q-where); }

.twe-q-tag {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.twe-q-how .twe-q-tag { color: var(--q-how-ink); }
.twe-q-why .twe-q-tag { color: var(--q-why-ink); }
.twe-q-who .twe-q-tag { color: var(--q-who-ink); }
.twe-q-where .twe-q-tag { color: var(--q-where-ink); }

.twe-q-title {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.25;
}

.twe-q-count {
  display: block;
  color: var(--ink-muted);
  font-size: var(--step--2);
}

/* okay question band: mega cards with colour swatch plates */
.twe-question-band {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.twe-qtypes-heading {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.twe-hand-lead {
  margin: 0 0 1.75rem;
  color: var(--ink);
  font-family: var(--font-hand, Caveat, "Bradley Hand", cursive);
  font-size: var(--step-1);
}

.twe-question-card.twe-question-mega { border-width: 2px; border-bottom-width: 2px; }

.twe-question-mega > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

.twe-question-mega > a:hover { background: var(--paper-2); }

.twe-question-swatch {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.65rem;
  min-height: 4.2rem;
}

.twe-question-short {
  font-size: clamp(1.35rem, 1rem + 1.2vw, 1.7rem);
  white-space: nowrap;
}


.twe-q-how .twe-question-swatch { background: var(--q-how); }
.twe-q-why .twe-question-swatch { background: var(--q-why); }
.twe-q-who .twe-question-swatch { background: var(--q-who); }
.twe-q-where .twe-question-swatch { background: var(--q-where); }

.twe-question-short {
  color: #111111;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.twe-question-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1.1rem 1.1rem;
}

.twe-question-name { font-size: var(--step-0); font-weight: 700; }

.twe-question-domain {
  color: var(--ink-muted);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* content cards (ContentCard.dc.html) */
.twe-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.twe-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  height: 100%;
  padding-top: 0.9rem;
  border-top: 3px solid var(--accent);
  background: var(--paper);
}

.twe-card-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

.twe-card-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  align-items: center;
  margin: 0;
  color: var(--accent);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.twe-card-kicker a { color: inherit; }

.twe-card-kicker .twe-card-format { color: var(--ink-muted); font-weight: 600; }

.twe-kicker-sep { color: var(--rule-strong); }

.twe-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.25;
}

.twe-card-title a {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--rule-strong);
}

.twe-card-title a:hover {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.twe-card-dek {
  max-width: 44ch;
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.twe-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  margin: auto 0 0;
  padding-top: 0.35rem;
  color: var(--ink-muted);
  font-size: var(--step--2);
}

/* four ways in */
.twe-ways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.twe-ways-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.twe-ways-list a {
  display: block;
  padding: 0.4rem 0;
  color: var(--ink);
}

.twe-ways-list a:hover { color: var(--accent); }

.twe-ways-list .twe-ways-strong a { font-weight: 700; }

/* newsletter band */
.twe-newsletter-band {
  background: var(--ink);
  color: var(--paper);
}

.twe-newsletter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.twe-newsletter-band .twe-section-heading { color: var(--paper); }

.twe-newsletter-lede {
  max-width: 44ch;
  margin: 0;
  color: color-mix(in srgb, var(--paper) 82%, var(--ink));
}

.twe-newsletter-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--step--1);
  font-weight: 700;
}

.twe-field-help {
  margin: 0 0 0.6rem;
  color: color-mix(in srgb, var(--paper) 70%, var(--ink));
  font-size: var(--step--2);
}

.twe-newsletter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.twe-newsletter-form input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--paper);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--step-0);
}

.twe-newsletter-form button {
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.twe-newsletter-form button:hover {
  background: var(--paper-3);
  border-color: var(--paper-3);
}

/* ------------------------------------------------------------------
   9. Series landings (category-tales.php / category-okay-but.php)
      — ported from Series.dc.html. Colours come from the body scope
      (.series-tales / .series-okay token overrides).
   ------------------------------------------------------------------ */

.twe-series-hero {
  border-bottom: 1px solid var(--rule);
  background: var(--hero-bg);
  color: var(--hero-ink);
}

.twe-series-hero .breadcrumbs a,
.twe-series-hero .breadcrumbs span { color: var(--hero-ink); }

.twe-series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.twe-series-main { min-width: 0; }

.twe-series-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--paper);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.series-okay .twe-series-eyebrow { color: var(--accent); }

.twe-series-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.series-okay .twe-series-title { font-weight: 700; letter-spacing: -0.01em; }

.twe-series-tagline {
  display: inline-block;
  max-width: 34ch;
  margin: -0.4rem 0 1.1rem;
  padding-bottom: 0.2rem;
  border-bottom: 3px solid var(--q-how);
  font-family: var(--font-hand, Caveat, "Bradley Hand", cursive);
  font-size: var(--step-2);
  line-height: 1.3;
}

.twe-series-premise {
  max-width: 46ch;
  margin: 0 0 1.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
}

.twe-series-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ghost button on a dark hero needs hero-ink strokes */
.twe-series-hero .twe-btn-ghost {
  border-color: var(--hero-ink);
  color: var(--hero-ink);
}

.twe-series-hero .twe-btn-ghost:hover { background: color-mix(in srgb, var(--hero-ink) 12%, transparent); }

.twe-series-art { align-self: stretch; }

/* featured story */
.twe-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.twe-feature-art { min-width: 0; }

.twe-feature-body { min-width: 0; }

.twe-feature-format {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.twe-feature-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.15;
}

.twe-feature-title a {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.twe-feature-title a:hover { color: var(--accent); }

.twe-feature-dek {
  max-width: 46ch;
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

.twe-feature-meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

/* latest pieces */
.twe-piece-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.twe-piece {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding-top: 0.8rem;
  border-top: 3px solid var(--accent);
}

.twe-piece-format {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.twe-piece-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.25;
}

.twe-piece-title a {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--rule-strong);
}

.twe-piece-title a:hover { color: var(--accent); }

.twe-piece-dek {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.twe-piece-meta {
  margin: auto 0 0;
  color: var(--ink-muted);
  font-size: var(--step--2);
}

/* differences + other series */
.twe-section-series-scope {
  background: var(--paper-2);
}

.twe-diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem 2.5rem;
}

.twe-diff-item {
  padding-top: 0.85rem;
  border-top: 3px solid var(--accent);
}

.twe-diff-item h3 {
  margin: 0 0 0.4rem;
  font-size: var(--step-0);
  font-weight: 700;
}

.twe-diff-item p {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.twe-other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.twe-other-item {
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
}

.twe-other-item a {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  text-decoration: none;
}

.twe-other-item a:hover { color: var(--accent); }

.twe-other-item p {
  margin: 0.2rem 0 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

/* === STORY-CSS ===
   Single story layout — ported from Podcast.dc.html (the story template).
   Applies to partials/content-podcast.php (all formats route here).
   Colours resolve through the body scope: default umbrella, .series-tales
   or .series-okay. */
/* ------------------------------------------------------------------ */

.twe-story-masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink);
}

.twe-story-head {
  max-width: 46rem;
  padding-top: 1.5rem;
}

.twe-story-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: center;
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.twe-story-kicker a { color: inherit; }

.twe-kicker-format { color: var(--ink); font-weight: 600; }

.twe-kicker-sep { color: var(--rule-strong); }

.twe-story-title {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.08;
}

.twe-story-dek {
  max-width: 44ch;
  margin: 0 0 1.5rem;
  font-size: var(--step-1);
  line-height: 1.5;
}

/* player panel */
.twe-player-panel {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
  padding: 1.1rem;
  border: 1px solid var(--accent);
  background: var(--paper);
}

.twe-player-note {
  margin: 0 0 0.9rem;
  color: var(--ink-muted);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
}

.twe-player-poster img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.9rem;
  border: 1px solid var(--rule-strong);
}

/* post content inside the panel: the YouTube / audio / Podcast Player
   embed lives here */
.twe-player-embed { font-size: var(--step-0); }

.twe-player-embed > * { margin-block: 0 1rem; }

.twe-player-embed .wp-block-embed.is-type-video .wp-block-embed__wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
}

.twe-player-embed .wp-block-embed.is-type-video .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.twe-player-embed iframe,
.twe-player-embed .mejs-container,
.twe-player-embed audio {
  max-width: 100%;
}

.twe-player-embed .mejs-container { width: 100% !important; }

.twe-player-meta {
  margin: 0.75rem 0 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.twe-player-meta time { white-space: nowrap; }

/* sidebar + prose layout (data-layout="sidebar" treatment) */
.twe-story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1.75rem, 4vw, 3rem) 0 3rem;
}

@media (min-width: 62rem) {
  .twe-story-layout { grid-template-columns: 19rem minmax(0, 1fr); }

  .twe-chapters {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
}

.twe-chapters {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 1rem;
}

.twe-chapters h2 {
  margin: 0 0 0.6rem;
  color: var(--ink-muted);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.twe-chapters ol {
  margin: 0;
  padding: 0 0 0 1.2rem;
  font-size: var(--step--1);
}

.twe-chapters a {
  display: block;
  padding: 0.35rem 0;
  color: var(--ink);
}

.twe-chapters-empty {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--2);
}

.twe-story-prose {
  min-width: 0;
  max-width: 46rem;
  font-size: var(--step-0);
  line-height: 1.7;
}

.twe-prose-section { margin-bottom: 2.5rem; }

.twe-prose-section > h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.2;
}

/* transcript head: rule under the heading row */
.twe-transcript-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ink);
}

.twe-transcript-head h2 { margin: 0; }

.twe-transcript-body > * { margin-block: 0 1rem; }

/* wait… really? aside */
.twe-unconfirmed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 2.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
}

.twe-hand-note {
  margin: 0 0 0.2rem;
  color: var(--accent);
  font-family: var(--font-hand, Caveat, "Bradley Hand", cursive);
  font-size: var(--step-1);
  line-height: 1.2;
}

.twe-unconfirmed h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1.2;
}

.twe-unconfirmed p { margin: 0; line-height: 1.7; }

/* notes — [mfn_list] output (Modern Footnotes) */
.twe-fnlist {
  font-size: var(--step-0);
  line-height: 1.7;
}

.twe-fnlist ol,
.twe-fnlist ul,
.twe-fnlist .modern-footnotes-list {
  margin: 0;
  padding-left: 1.5rem;
}

.twe-fnlist li {
  margin-bottom: 0.9rem;
  font-size: var(--step--1);
}

.twe-fnlist li p { margin: 0 0 0.35rem; }

.twe-notes-label {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: var(--step--2);
}

/* episode credits */
.twe-credit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0 0 1rem;
  font-size: var(--step--1);
}

.twe-credit-grid dt {
  color: var(--ink-muted);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.twe-credit-grid dd { margin: 0.1rem 0 0; }

.twe-edit-link {
  margin: 1.25rem 0 0;
  font-size: var(--step--1);
}

/* where to go next */
.twe-next {
  padding-top: 1.5rem;
  border-top: 2px solid var(--accent);
}

.twe-next h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
}

.twe-next .nav-links {
  display: grid;
  gap: 1rem;
}

.twe-next .nav-links a {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
  gap: 0.25rem 1.25rem;
  align-items: baseline;
  padding: 0;
  color: var(--ink);
  text-decoration: none;
}

.twe-next .nav-links a:hover .twe-next-title { color: var(--accent); }

.twe-next-label {
  color: var(--accent);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.twe-next-title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
}

/* === END STORY-CSS === */

/* === PAGES-CSS (other agent) ===
   Append CSS for page-topics.php, archive.php, search.php, 404.php,
   page.php, page-newsletter.php, header.php, footer.php BELOW this marker.

/* === CHROME-CSS START === */

/* ------------------------------------------------------------------
   C0. Responsive utilities (from site-base.css): data-when wide/narrow.
   The header renders narrow-only and wide-only chrome.
   ------------------------------------------------------------------ */

[data-when="wide"] { display: none; }
@media (min-width: 62rem) {
  [data-when="wide"]   { display: revert; }
  [data-when="narrow"] { display: none !important; }
}

/* page frame: chrome + main stack, footer pushed to the bottom */
.twe-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.twe-site > .twe-404-page,
.twe-site > .twe-search-page { flex: 1 1 auto; }

/* ------------------------------------------------------------------
   C1. Header (SiteHeader.dc.html)
   ------------------------------------------------------------------ */

.twe-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.twe-header-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 0.9rem;
}

.twe-brand a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.twe-brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.twe-brand-tag {
  display: block;
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 0.35rem;
  max-width: 46rem;
}

/* compact menu drawer (narrow) */
.twe-menu-drawer { position: relative; }

.twe-menu-drawer > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--target);
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: var(--step--1);
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.twe-menu-drawer > summary::-webkit-details-marker { display: none; }

.twe-menu-icon {
  display: inline-block;
  width: 1.1rem;
  border-top: 2px solid var(--ink);
  border-bottom: 6px double var(--ink);
  height: 0.7rem;
}

.twe-drawer-nav {
  margin-top: 0.75rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.twe-drawer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.twe-drawer-menu a {
  padding: 0.7rem 0;
  min-height: var(--target);
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
  font-weight: 600;
}

.twe-drawer-menu li:last-child > a { border-bottom: 0; }

.twe-drawer-menu .current-menu-item > a,
.twe-drawer-menu a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.twe-drawer-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.9rem;
}

/* wide nav bar */
.twe-header-bar {
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.twe-header-bar-inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.twe-header-nav { display: flex; }

.twe-header-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.twe-header-menu > li {
  display: flex;
  position: relative;
}

.twe-header-menu a {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 0.85rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--target);
}

.twe-header-menu a:hover { text-decoration: underline; }

.twe-header-menu .current-menu-item > a,
.twe-header-menu a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--accent);
}

/* drop-down series panel (from the design's details/summary flyout) */
.twe-header-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: -1rem;
  z-index: 30;
  min-width: 19rem;
  background: var(--panel, var(--paper));
  border: 1px solid var(--rule-strong);
  box-shadow: 0 12px 28px -18px color-mix(in srgb, var(--ink) 55%, transparent);
  padding: 0.4rem;
  list-style: none;
  margin: 0;
}

.twe-header-menu .sub-menu a {
  display: block;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: var(--ink);
  min-height: var(--target);
}

.twe-header-menu .sub-menu a:hover {
  background: var(--paper-2);
  text-decoration: none;
}

/* header search (wide bar + narrow bar share the form) */
.twe-header-bar .twe-search-form,
.twe-header-bar .twe-search-form--compact,
.twe-header-search .twe-search-form,
.twe-header-search .twe-search-form--compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.twe-header-bar .twe-search-label,
.twe-header-search .twe-search-label {
  font-size: var(--step--2);
  color: var(--ink-muted);
  margin: 0;
  white-space: nowrap;
}

.twe-header-bar .twe-search-row,
.twe-header-search .twe-search-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.twe-header-bar input[type="search"],
.twe-header-search input[type="search"] {
  font-family: var(--font-text);
  font-size: var(--step--1);
  padding: 0.55rem 0.7rem;
  min-height: var(--target);
  width: 15rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.twe-header-search input[type="search"] {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.twe-header-bar .twe-search-submit,
.twe-header-search .twe-search-submit {
  font-family: var(--font-text);
  font-size: var(--step--1);
  font-weight: 700;
  min-height: var(--target);
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.twe-header-bar .twe-search-submit:hover,
.twe-header-search .twe-search-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.twe-header-search { border-top: 1px solid var(--rule); }

.twe-header-search .twe-search-form {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.6rem var(--gutter);
}

/* narrow screens: header stacks */
@media (max-width: 47.9rem) {
  .twe-header-bar-inner { flex-direction: column; align-items: stretch; }
}

/* ------------------------------------------------------------------
   C2. Search form, full variant (Search.dc.html / NotFound.dc.html)
   ------------------------------------------------------------------ */

.twe-search-form {
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  padding: 1.1rem;
  margin-bottom: 1.75rem;
}

.twe-search-form--compact {
  border: 0;
  background: transparent;
  padding: 0.4rem 0;
  margin-bottom: 0;
}

.twe-search-label {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.twe-search-help {
  margin: 0 0 0.6rem;
  font-size: var(--step--2);
  color: var(--ink-muted);
  max-width: 60ch;
}

.twe-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.twe-search-row input[type="search"] {
  flex: 1 1 16rem;
  min-width: 0;
  font-family: var(--font-text);
  font-size: var(--step-0);
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.twe-search-submit {
  min-height: 48px;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-text);
  font-size: var(--step-0);
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.twe-search-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

/* ------------------------------------------------------------------
   C3. Footer (SiteFooter.dc.html)
   ------------------------------------------------------------------ */

.twe-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.twe-footer .shell {
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.twe-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.twe-footer-name {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.35;
  max-width: 26ch;
}

.twe-footer-blurb {
  margin: 0 0 1rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
  max-width: 38ch;
}

.twe-footer-domain {
  margin: 0;
  font-size: var(--step--2);
  color: var(--ink-muted);
}

.twe-footer-heading {
  margin: 0 0 0.75rem;
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
}

.twe-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.twe-footer-menu a,
.twe-footer-list a {
  display: block;
  padding: 0.55rem 0;
  font-size: var(--step--1);
  color: var(--ink);
  text-decoration: none;
  min-height: var(--target);
}

.twe-footer-menu a:hover,
.twe-footer-list a:hover { text-decoration: underline; }

.twe-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.twe-footer-list--cols {
  columns: 2;
  column-gap: 1.25rem;
}

.twe-footer-list--cols a {
  padding: 0.45rem 0;
  min-height: 0;
  font-size: var(--step--2);
}

.twe-footer-bottom {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-strong);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem 2.5rem;
}

.twe-footer-note {
  margin: 0 0 0.75rem;
  font-size: var(--step--2);
  color: var(--ink-muted);
  max-width: 34ch;
}

.twe-footer-cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0.6rem  1.1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 700;
  border-radius: var(--radius);
}

.twe-footer-cta-btn:hover {
  background: var(--accent);
  color: var(--paper);
}

.twe-footer-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--2);
  color: var(--ink-muted);
}

.twe-footer-plain li { padding: 0.4rem 0; }

.twe-footer-plain a {
  display: block;
  padding: 0.4rem 0;
  color: var(--ink);
  text-decoration: none;
}

.twe-footer-plain a:hover { text-decoration: underline; }

.twe-footer-pending { font-style: italic; }

.twe-footer-copy {
  margin: 2rem 0 0;
  font-size: var(--step--2);
  color: var(--ink-muted);
  max-width: 78ch;
}

/* ------------------------------------------------------------------
   C4. 404 (NotFound.dc.html)
   ------------------------------------------------------------------ */

.twe-404-page {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
}

.twe-404-code {
  margin: 0 0 0.75rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.twe-404-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.1;
  max-width: 30ch;
}

.twe-404-lede {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
  align-items: end;
  margin: 0 0 2rem;
}

.twe-404-lede p {
  margin: 0;
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 52ch;
}

.twe-404-mascot {
  position: relative;
  width: min(16rem, 100%);
  height: 7rem;
  justify-self: end;
}

.twe-404-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
}

.twe-404-links h2 {
  margin: 0 0 0.6rem;
  font-size: var(--step-0);
  font-weight: 700;
}

.twe-404-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step-0);
}

.twe-404-links a {
  display: block;
  padding: 0.45rem 0;
  min-height: var(--target);
}

.twe-404-search .twe-search-form {
  border: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 0;
}

.twe-404-search .twe-search-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.twe-404-search input[type="search"] {
  flex: 1 1 12rem;
  min-width: 0;
  font-family: var(--font-text);
  font-size: var(--step-0);
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.twe-404-search .twe-search-submit {
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-text);
  font-size: var(--step-0);
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.twe-404-search .twe-search-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.twe-404-series li {
  border-left: 4px solid var(--accent);
  padding-left: 0.75rem;
  margin-bottom: 0.4rem;
}

.twe-404-series a {
  padding: 0.35rem 0;
}

.twe-404-broken {
  margin: 2rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* ------------------------------------------------------------------
   C5. Search results (Search.dc.html)
   ------------------------------------------------------------------ */

.twe-search-page {
  max-width: 64rem;
  margin-inline: auto;
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.twe-search-page .breadcrumbs { padding: 1rem 0 0; }

.twe-search-head {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin: 1.5rem 0 1rem;
}

.twe-search-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
}

.twe-search-mascot {
  position: relative;
  width: 4.5rem;
  height: 5.5rem;
  flex: 0 0 auto;
}

.twe-search-count {
  margin: 0 0 1.25rem;
  font-size: var(--step-1);
  font-family: var(--font-display);
}

.twe-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.twe-search-item {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
}

.twe-search-item-kicker {
  margin: 0 0 0.3rem;
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.twe-search-item-format {
  color: var(--ink-muted);
  font-weight: 600;
}

.twe-search-item-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
}

.twe-search-item-title a {
  color: var(--ink);
  text-decoration: none;
}

.twe-search-item-title a:hover { text-decoration: underline; }

.twe-search-item-dek {
  margin: 0 0 0.4rem;
  font-size: var(--step-0);
  color: var(--ink-muted);
  max-width: 64ch;
}

.twe-search-item-meta {
  margin: 0;
  font-size: var(--step--2);
  color: var(--ink-muted);
}

.twe-search-none {
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  padding: 1.5rem;
}

.twe-search-none h2,
.twe-search-start h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
}

.twe-search-none p {
  margin: 0 0 1rem;
  font-size: var(--step-0);
  color: var(--ink-muted);
  max-width: 60ch;
}

.twe-search-none ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: var(--step-0);
}

.twe-search-starters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.twe-search-starters a {
  display: block;
  min-height: var(--target);
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule-strong);
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-2);
}

.twe-search-starters a:hover { background: var(--paper-3); }

/* === CHROME-CSS END === */

/* Quinn lockup on Okay But hero */
.twe-series-art .twe-lockup{width:100%;max-width:420px;height:auto;display:block;margin:0 auto;}
@media (max-width:480px){.twe-series-art .twe-lockup{display:none}}

/* footer aliases for rebuilt footer.php */
.twe-footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) var(--gutter);
}
.twe-footer-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.35;
  max-width: 26ch;
}
.twe-footer-btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0.6rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 700;
  border-radius: var(--radius);
}
.twe-footer-btn:hover { background: var(--accent); color: var(--paper); }
.twe-footer-copy {
  margin: 2rem 0 0;
  font-size: var(--step--2);
  color: var(--ink-muted);
  max-width: 78ch;
}


/* TTSU landing rebuild — approved identity, cool surfaces, accessible layout */
body.series-tales {
  --paper: #f7fafb;
  --paper-2: #e8f0f2;
  --paper-3: #d9e5e8;
  --ink: #242132;
  --ink-muted: #43515a;
  --rule: #c7d3d7;
  --rule-strong: #83969d;
  --accent: #7f3842;
  --accent-hover: #235e64;
  --on-accent: #ffffff;
}

.twe-series-landing { padding-block: 0 clamp(3rem, 6vw, 5rem); background: var(--paper); }
.twe-series-hero { background: #241f2e; color: #fff5da; }
.twe-series-breadcrumbs { padding-top: 1rem; }
.twe-series-hero .breadcrumbs { margin: 0; }
.twe-series-hero .breadcrumbs-list { color: #fff5da; }
.twe-series-hero .breadcrumbs-list li + li::before { color: #f0d0ad; }
.twe-series-hero .breadcrumbs-list [aria-current="page"] { color: #fff5da; }
.twe-series-grid { grid-template-columns: minmax(0, 1.08fr) minmax(18rem, .92fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2rem, 4vw, 4rem) clamp(3rem, 6vw, 5.5rem); }
.twe-series-main { max-width: 45rem; }
.twe-series-title { max-width: 12ch; font-size: clamp(3rem, 6vw, 6.5rem); }
.twe-series-premise { max-width: 42ch; color: #fff5da; }
.twe-series-lockup { align-self: center; justify-self: center; width: min(100%, 31rem); padding: clamp(.75rem, 2vw, 1.25rem); border: 1px solid #d6b77d; border-radius: 1.25rem; background: #fff5da; box-shadow: 0 1.5rem 3rem rgba(0,0,0,.24); }
.twe-series-lockup-image { display: block; width: 100%; height: auto; border-radius: .65rem; }
.twe-series-local-nav { display: flex; flex-wrap: wrap; gap: .45rem .8rem; margin: 1.5rem 0 1.25rem; }
.twe-series-local-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem .8rem; border: 1px solid rgba(255,245,218,.72); border-radius: 999px; color: #fff5da; font-size: var(--step--1); font-weight: 700; text-decoration: none; }
.twe-series-local-nav a:hover, .twe-series-local-nav a:focus-visible { background: #fff5da; color: #241f2e; }
.twe-series-local-nav a.is-current { border-color: #d17778; background: #7f3842; }
.twe-series-hero .twe-btn-ghost { color: #fff5da; border-color: #fff5da; }
.twe-series-hero .twe-btn-ghost:hover { color: #241f2e; background: #fff5da; }
.twe-series-promise { background: #f7fafb; }
.twe-promise-grid, .twe-next-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 7vw, 8rem); align-items: start; }
.twe-section-kicker { margin: 0 0 .6rem; color: #7f3842; font-size: var(--step--2); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.twe-promise-grid .twe-section-heading { max-width: 18ch; margin-bottom: 0; }
.twe-promise-copy { max-width: 48ch; margin: .35rem 0 0; color: var(--ink-muted); font-size: var(--step-1); line-height: 1.65; }
.twe-section-featured { background: #e8f0f2; }
.twe-feature-card { position: relative; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1.5rem; max-width: 58rem; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid #83969d; border-radius: 1rem; background: #f7fafb; box-shadow: 0 .75rem 2rem rgba(36,33,50,.08); }
.twe-feature-card-mark { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: #235e64; color: #fff5da; font-size: 2rem; }
.twe-feature-title { max-width: 22ch; font-size: clamp(2rem, 4vw, 3.4rem); }
.twe-feature-dek { max-width: 56ch; }
.twe-text-link { font-weight: 800; }
.twe-piece { border-top-color: #235e64; }
.twe-piece-format, .twe-feature-format { color: #7f3842; }
.twe-section-alt { background: #f7fafb; }
.twe-series-next { background: #242132; color: #f7fafb; border-bottom: 0; }
.twe-series-next .twe-section-kicker { color: #d17778; }
.twe-series-next .twe-section-heading { color: #fff5da; max-width: 18ch; }
.twe-next-links { display: grid; gap: .75rem; }
.twe-next-link { display: grid; gap: .2rem; padding: 1rem 1.1rem; border: 1px solid #83969d; border-radius: .65rem; color: #fff5da; text-decoration: none; }
.twe-next-link:hover, .twe-next-link:focus-visible { border-color: #fff5da; background: #332d40; }
.twe-next-link span { font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; }
.twe-next-link small { color: #dce5e7; font-size: var(--step--1); }
@media (max-width: 61.99rem) { .twe-series-grid, .twe-promise-grid, .twe-next-grid { grid-template-columns: 1fr; } .twe-series-lockup { justify-self: start; max-width: 28rem; } }
@media (max-width: 38rem) { .twe-feature-card { grid-template-columns: 1fr; } .twe-feature-card-mark { width: 3.2rem; height: 3.2rem; } }


/* TTSU landing inheritance fixes: keep navigation inside the identity system */
body.series-tales .twe-series-breadcrumbs,
body.series-tales .twe-series-breadcrumbs .breadcrumbs,
body.series-tales .twe-series-breadcrumbs .breadcrumbs-list,
body.series-tales .twe-series-breadcrumbs .breadcrumbs-list li { background: transparent !important; }
body.series-tales .twe-series-breadcrumbs .breadcrumbs { padding: 0 !important; border: 0 !important; }
body.series-tales .twe-series-breadcrumbs .breadcrumbs-list { color: #fff5da !important; }
body.series-tales .twe-series-breadcrumbs .breadcrumbs-list a,
body.series-tales .twe-series-breadcrumbs .breadcrumbs-list [aria-current="page"] { color: #fff5da !important; }
body.series-tales .twe-series-local-nav { background: transparent !important; }
body.series-tales .twe-series-local-nav a { color: #fff5da !important; background: transparent !important; }
body.series-tales .twe-series-local-nav a:hover,
body.series-tales .twe-series-local-nav a:focus-visible { color: #241f2e !important; background: #fff5da !important; }
body.series-tales .twe-series-local-nav a.is-current { color: #fff5da !important; background: #7f3842 !important; }


/* TTSU compact hero calibration: shared geometry with Okay, But; TTSU identity retained */
body.series-tales .twe-series-grid { align-items: center; gap: clamp(2rem, 4vw, 4rem); padding-block: clamp(1.5rem, 3vw, 2.75rem) clamp(2.25rem, 4vw, 3.5rem); }
body.series-tales .twe-series-title { max-width: 16ch; font-size: clamp(2.75rem, 5vw, 5.2rem); line-height: 1.04; }
body.series-tales .twe-series-premise { max-width: 43ch; font-size: var(--step-0); line-height: 1.55; }
body.series-tales .twe-series-lockup { width: min(100%, 24rem); padding: .55rem; border-radius: .75rem; box-shadow: 0 .8rem 1.75rem rgba(0,0,0,.2); }
body.series-tales .twe-series-lockup-image { border-radius: .4rem; }
body.series-tales .twe-series-local-nav { margin-block: 1.1rem 1rem; }
@media (max-width: 61.99rem) { body.series-tales .twe-series-lockup { max-width: 21rem; } }


/* TTSU UX density pass: compact the path to the first meaningful choice */
body.series-tales .twe-header-top { padding-block: .85rem .7rem; }
body.series-tales .twe-brand-name { font-size: clamp(1.55rem, 2.3vw, 2.35rem); line-height: 1.05; }
body.series-tales .twe-brand-tag { margin-top: .3rem; font-size: .78rem; letter-spacing: .16em; }
body.series-tales .twe-header-bar-inner { min-height: 3.6rem; padding-block: .45rem; }
body.series-tales .twe-header-menu { gap: clamp(.85rem, 1.8vw, 1.6rem); }
body.series-tales .twe-search-form--compact { margin-block: 0; }
body.series-tales .twe-search-form--compact input { min-height: 2.65rem; }
body.series-tales .twe-breadcrumb { padding-block: .7rem; }
body.series-tales .twe-series-grid { padding-top: clamp(.8rem, 2vw, 1.6rem); }
body.series-tales .twe-series-title { max-width: 14ch; font-size: clamp(2.45rem, 4.2vw, 4.35rem); line-height: 1.02; }
body.series-tales .twe-series-premise { margin-block: .8rem 1rem; max-width: 40ch; line-height: 1.45; }
body.series-tales .twe-series-local-nav { margin-block: .75rem .7rem; gap: .55rem; }
body.series-tales .twe-series-local-nav a { padding: .55rem .8rem; }
body.series-tales .twe-series-actions { gap: .65rem; }
body.series-tales .twe-series-start,
body.series-tales .twe-series-classroom { padding: .8rem 1rem; }
body.series-tales .twe-series-lockup { width: min(100%, 19rem); padding: .4rem; }
@media (max-width: 61.99rem) {
  body.series-tales .twe-header-top { padding-block: .7rem .55rem; }
  body.series-tales .twe-header-bar-inner { min-height: 3rem; }
  body.series-tales .twe-series-grid { gap: 1.2rem; padding-bottom: 1.8rem; }
  body.series-tales .twe-series-title { font-size: clamp(2.3rem, 9vw, 3.35rem); }
  body.series-tales .twe-series-lockup { max-width: 17rem; }
}


/* TTSU type parity pass: align display scale with Okay But landing geometry */
body.series-tales .twe-series-title { max-width: 15ch; font-size: clamp(2.25rem, 3.6vw, 3.75rem); line-height: 1.06; }
body.series-tales .twe-series-eyebrow { font-size: .68rem; letter-spacing: .13em; }
body.series-tales .twe-series-premise { font-size: var(--step--1); line-height: 1.5; }
body.series-tales .twe-series-lockup { width: min(100%, 17rem); }
body.series-tales .twe-series-local-nav a { font-size: var(--step--2); }
body.series-tales .twe-series-start,
body.series-tales .twe-series-classroom { font-size: var(--step--1); }
@media (max-width: 61.99rem) {
  body.series-tales .twe-series-title { font-size: clamp(2.15rem, 8vw, 2.9rem); }
  body.series-tales .twe-series-lockup { max-width: 15rem; }
}


/* TTSU hero composition pass: proportional, integrated, and viewport-efficient */
body.series-tales .twe-series-hero .twe-shell { padding-inline: clamp(1rem, 3vw, 3rem); }
body.series-tales .twe-series-breadcrumbs { padding-top: .65rem; }
body.series-tales .twe-series-grid { grid-template-columns: minmax(0, 1.18fr) minmax(14rem, .82fr); gap: clamp(1.25rem, 3vw, 3rem); padding-block: 1.25rem 2rem; }
body.series-tales .twe-series-title { max-width: 15ch; margin-bottom: .7rem; font-size: clamp(2.15rem, 3.2vw, 3.35rem); line-height: 1.04; }
body.series-tales .twe-series-premise { max-width: 38ch; margin-bottom: .8rem; font-size: var(--step--1); line-height: 1.45; }
body.series-tales .twe-series-local-nav { margin-block: .55rem .65rem; }
body.series-tales .twe-series-local-nav a { min-height: 40px; padding: .42rem .68rem; }
body.series-tales .twe-series-actions { gap: .55rem; }
body.series-tales .twe-series-actions .twe-btn-accent { max-width: 24rem; padding: .62rem .85rem; }
body.series-tales .twe-series-actions .twe-btn-ghost { min-height: 44px; padding: .55rem .85rem; }
body.series-tales .twe-series-lockup { width: min(100%, 18rem); padding: .38rem; border-radius: .7rem; box-shadow: 0 .65rem 1.4rem rgba(0,0,0,.18); }
body.series-tales .twe-series-lockup-image { border-radius: .35rem; }
@media (max-width: 61.99rem) {
  body.series-tales .twe-series-grid { gap: 1rem; padding-block: .9rem 1.55rem; }
  body.series-tales .twe-series-title { font-size: clamp(2rem, 7vw, 2.7rem); }
  body.series-tales .twe-series-lockup { width: min(100%, 15rem); }
}

/* TTSU hero final rhythm: let the approved lockup belong to the content block */
body.series-tales .twe-series-grid { grid-template-columns: minmax(0, 1.22fr) minmax(13rem, .78fr); align-items: center; padding-block: .9rem 1.45rem; }
body.series-tales .twe-series-lockup { width: min(100%, 16rem); justify-self: center; margin-top: .15rem; }
body.series-tales .twe-series-actions { align-items: stretch; }
body.series-tales .twe-series-actions .twe-btn-accent,
body.series-tales .twe-series-actions .twe-btn-ghost { min-height: 42px; }
@media (max-width: 61.99rem) {
  body.series-tales .twe-series-grid { grid-template-columns: minmax(0, 1.12fr) minmax(11rem, .88fr); padding-block: .7rem 1.2rem; }
  body.series-tales .twe-series-lockup { width: min(100%, 13.5rem); }
}
/* TTSU lockup scale: increase approved mark without changing hero geometry */
body.series-tales .twe-series-lockup { width: min(100%, 20.8rem); }
@media (max-width: 61.99rem) {
  body.series-tales .twe-series-lockup { width: min(100%, 17.5rem); }
}
/* TTSU lockup footprint: match the owner-approved hero proportion */
body.series-tales .twe-series-lockup { width: min(100%, 30rem); }
@media (max-width: 61.99rem) {
  body.series-tales .twe-series-lockup { width: min(100%, 20rem); }
}
/* TTSU module rhythm: shared spacing and type across supporting story widgets */
body.series-tales .twe-section-featured,
body.series-tales .twe-section-alt,
body.series-tales .twe-series-next { padding-block: clamp(2.25rem, 4vw, 3.75rem); }
body.series-tales .twe-feature-card { padding: clamp(1.2rem, 2.2vw, 1.8rem); }
body.series-tales .twe-feature-title { font-size: clamp(1.45rem, 2.15vw, 2.1rem); line-height: 1.12; }
body.series-tales .twe-feature-dek,
body.series-tales .twe-piece-dek,
body.series-tales .twe-next-link { font-size: var(--step--1); line-height: 1.45; }
body.series-tales .twe-piece-grid,
body.series-tales .twe-next-links { gap: 1rem; }
body.series-tales .twe-piece { padding: 1.15rem 1.25rem; }
body.series-tales .twe-piece-title { font-size: clamp(1.05rem, 1.45vw, 1.35rem); line-height: 1.18; }
body.series-tales .twe-next-link { min-height: 5.25rem; padding: 1rem 1.15rem; }
@media (max-width: 61.99rem) {
  body.series-tales .twe-section-featured,
  body.series-tales .twe-section-alt,
  body.series-tales .twe-series-next { padding-block: 2.25rem; }
  body.series-tales .twe-feature-card { padding: 1.1rem; }
}

/* TTSU franchise media shelf — compact, feed-led, and ready for real video */
body.series-tales .twe-series-media { background: #f7fafb; }
body.series-tales .twe-series-media .twe-section-rule-head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: .45rem 2rem; align-items: end; }
body.series-tales .twe-series-media .twe-section-kicker { grid-column: 1 / -1; margin-bottom: .15rem; }
body.series-tales .twe-series-media .twe-section-heading { margin: 0; }
body.series-tales .twe-series-media .twe-section-intro { max-width: 48ch; margin: 0; color: var(--ink-muted); font-size: var(--step--1); line-height: 1.5; }
.twe-series-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.twe-series-media-card { display: flex; flex-direction: column; min-width: 0; min-height: 100%; padding: 1.25rem; border: 1px solid #c7d3d7; border-top: 4px solid #235e64; border-radius: .7rem; background: #ffffff; box-shadow: 0 .5rem 1.25rem rgba(36,33,50,.06); }
.twe-series-media-card:nth-child(2) { border-top-color: #7f3842; }
.twe-series-media-card:nth-child(3) { border-top-color: #83969d; }
.twe-series-media-kicker { margin: 0 0 .55rem; color: #7f3842; font-size: var(--step--2); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.twe-series-media-card h3 { margin: 0 0 .6rem; color: #242132; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.2; }
.twe-series-media-card p:not(.twe-series-media-kicker) { margin: 0 0 1rem; color: #43515a; font-size: var(--step--1); line-height: 1.55; }
.twe-series-media-card .twe-text-link { margin-top: auto; color: #235e64; font-size: var(--step--1); }
.twe-series-media-card:nth-child(2) .twe-text-link { color: #7f3842; }
.twe-series-video-placeholder { display: flex; align-items: center; justify-content: center; min-height: 5.5rem; margin-top: auto; padding: 1rem; border-radius: .45rem; background: #242132; color: #fff5da; font-family: var(--font-display); font-size: var(--step--1); text-align: center; }
@media (max-width: 61.99rem) {
  body.series-tales .twe-series-media .twe-section-rule-head { grid-template-columns: 1fr; }
  .twe-series-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twe-series-video-card { grid-column: 1 / -1; }
}
@media (max-width: 38rem) {
  .twe-series-media-grid { grid-template-columns: 1fr; }
  .twe-series-video-card { grid-column: auto; }
}


/* Learning materials hub — classroom-first, cool surfaces, no generic archive chrome */
.twe-learning-page { background: #f7fafb; }
.twe-learning-page .twe-page-header { max-width: 62rem; margin-bottom: 1.5rem; }
.twe-learning-page .twe-page-title { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.twe-learning-page .twe-page-layout { display: block; }
.twe-learning-page .twe-page-body, .twe-learning-page .twe-page-content { max-width: none; }
.twe-learning-library { color: #242132; }
.twe-learning-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; margin: 0 0 2.5rem; padding: clamp(1.5rem, 4vw, 3rem); border-radius: .9rem; background: #242132; color: #fff5da; }
.twe-learning-hero-copy { max-width: 54ch; }
.twe-learning-eyebrow { margin: 0 0 .65rem; color: #7f3842; font-size: var(--step--2); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.twe-learning-hero .twe-learning-eyebrow { color: #d17778; }
.twe-learning-hero h2 { margin: 0 0 .8rem; color: #fff5da; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.08; }
.twe-learning-hero p:last-child { margin: 0; color: #e8f0f2; font-size: var(--step-0); line-height: 1.6; }
.twe-learning-lockup { display: block; width: 100%; height: auto; border: .35rem solid #fff5da; border-radius: .6rem; }
.twe-learning-chooser, .twe-learning-resources { padding-block: 0 2.5rem; }
.twe-learning-section-head { max-width: 60ch; margin-bottom: 1.25rem; }
.twe-learning-section-head h2 { margin: 0 0 .55rem; font-size: clamp(1.65rem, 2.6vw, 2.45rem); line-height: 1.15; }
.twe-learning-section-head p:not(.twe-learning-eyebrow) { margin: 0; color: #43515a; font-size: var(--step--1); line-height: 1.55; }
.twe-learning-series-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 0 0 1.25rem; padding: .85rem 1rem; border: 1px solid #c7d3d7; border-radius: .6rem; background: #e8f0f2; }
.twe-learning-series-nav strong { font-size: var(--step--1); }
.twe-learning-series-nav div { display: flex; flex-wrap: wrap; gap: .45rem; }
.twe-learning-series-nav button { min-height: 40px; padding: .45rem .75rem; border: 1px solid #83969d; border-radius: 999px; background: #fff; color: #242132; font: inherit; font-size: var(--step--2); font-weight: 700; cursor: pointer; }
.twe-learning-series-nav button:hover, .twe-learning-series-nav button:focus-visible { border-color: #7f3842; background: #7f3842; color: #fff5da; }
.twe-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem .9rem; margin-bottom: .75rem; padding: 1rem; border: 1px solid #c7d3d7; border-radius: .6rem; background: #fff; }
.twe-filters label { color: #43515a; font-size: var(--step--2); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.twe-filters select { width: 100%; min-height: 44px; padding: .45rem .6rem; border: 1px solid #83969d; border-radius: .35rem; background: #fff; color: #242132; font: inherit; font-size: var(--step--1); }
.twe-learning-results { margin: 0 0 1.1rem; color: #43515a; font-size: var(--step--2); font-weight: 700; }
.twe-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.twe-resource-card { display: flex; flex-direction: column; min-width: 0; padding: 1.25rem; border: 1px solid #c7d3d7; border-top: 4px solid #235e64; border-radius: .65rem; background: #fff; box-shadow: 0 .45rem 1.1rem rgba(36,33,50,.05); }
.twe-resource-card:nth-child(2) { border-top-color: #7f3842; }
.twe-resource-card:nth-child(3) { border-top-color: #d17778; }
.twe-resource-kicker { margin: 0 0 .55rem; color: #43515a; font-size: var(--step--2); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.twe-resource-card h3 { margin: 0 0 .55rem; font-size: clamp(1.25rem, 1.8vw, 1.65rem); line-height: 1.18; }
.twe-resource-card h3 a { color: #242132; text-decoration: none; }
.twe-resource-card h3 a:hover { color: #7f3842; text-decoration: underline; }
.twe-resource-card p:not(.twe-resource-kicker) { margin: 0 0 1rem; color: #43515a; font-size: var(--step--1); line-height: 1.55; }
.twe-resource-link { margin-top: auto; color: #235e64; font-size: var(--step--1); font-weight: 800; }
.twe-resource-card:nth-child(2) .twe-resource-link, .twe-resource-card:nth-child(3) .twe-resource-link { color: #7f3842; }
.twe-learning-coming { margin: 1.25rem 0 0; color: #43515a; font-size: var(--step--1); font-style: italic; }
@media (max-width: 62rem) { .twe-learning-hero { grid-template-columns: minmax(0, 1fr) 13rem; } .twe-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .twe-resource-grid { grid-template-columns: 1fr; } }
@media (max-width: 38rem) { .twe-learning-hero { grid-template-columns: 1fr; } .twe-learning-lockup { max-width: 16rem; } .twe-filters { grid-template-columns: 1fr; } }


/* Okay, But… franchise landing — question-led, Quinn-forward, cool surfaces */
body.series-okay {
  --paper: #f7fafc;
  --paper-2: #edf2f7;
  --paper-3: #e2e9f2;
  --ink: #111827;
  --ink-muted: #425066;
  --rule: #cbd5e1;
  --rule-strong: #94a3b8;
  --accent: #4776e6;
  --accent-hover: #2f5bc7;
  --on-accent: #ffffff;
  --hero-bg: #111827;
  --hero-ink: #f7fafc;
}
body.series-okay .twe-series-landing { background: var(--paper); }
body.series-okay .twe-okay-hero { background: #111827; color: #f7fafc; }
body.series-okay .twe-okay-hero .twe-series-breadcrumbs,
body.series-okay .twe-okay-hero .breadcrumbs-list,
body.series-okay .twe-okay-hero .breadcrumbs-list a,
body.series-okay .twe-okay-hero .breadcrumbs-list [aria-current="page"] { color: #f7fafc !important; }
body.series-okay .twe-okay-hero .breadcrumbs-list li + li::before { color: #93c5fd; }
body.series-okay .twe-okay-hero .twe-series-eyebrow { color: #93c5fd; }
body.series-okay .twe-okay-hero .twe-series-title { max-width: 10ch; font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 700; letter-spacing: -.025em; }
body.series-okay .twe-okay-hero .twe-series-tagline { max-width: 31ch; color: #f7fafc; border-bottom-color: #4776e6; font-size: clamp(1.35rem, 2vw, 1.8rem); }
body.series-okay .twe-okay-hero .twe-series-premise { max-width: 42ch; color: #e2e8f0; font-size: var(--step-0); }
body.series-okay .twe-okay-hero .twe-series-local-nav a { border-color: #94a3b8; color: #f7fafc; }
body.series-okay .twe-okay-hero .twe-series-local-nav a.is-current { border-color: #4776e6; background: #4776e6; color: #fff; }
body.series-okay .twe-okay-hero .twe-series-local-nav a:hover,
body.series-okay .twe-okay-hero .twe-series-local-nav a:focus-visible { background: #f7fafc; color: #111827; }
body.series-okay .twe-okay-hero .twe-btn-accent { background: #4776e6; color: #fff; }
body.series-okay .twe-okay-hero .twe-btn-accent:hover { background: #2f5bc7; }
body.series-okay .twe-okay-hero .twe-btn-ghost { border-color: #f7fafc; color: #f7fafc; }
body.series-okay .twe-okay-hero .twe-btn-ghost:hover { background: #f7fafc; color: #111827; }
.twe-okay-lockup { width: min(100%, 30rem); padding: .55rem; border: 1px solid #93c5fd; border-radius: 1rem; background: #f7f3e8; box-shadow: 0 1.2rem 2.5rem rgba(0,0,0,.28); }
.twe-okay-lockup-image { display: block; width: 100%; height: auto; border-radius: .55rem; }
body.series-okay .twe-okay-explanation { background: #f7fafc; }
.twe-okay-explanation-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 7vw, 8rem); align-items: start; }
.twe-okay-explanation .twe-section-heading { max-width: 19ch; }
.twe-okay-explanation-copy { max-width: 58ch; color: #425066; font-size: var(--step-0); line-height: 1.65; }
.twe-okay-explanation-copy p { margin: 0 0 1rem; }
.twe-okay-explanation-copy p:last-child { margin-bottom: 0; }
.twe-okay-lanes { background: #edf2f7; }
.twe-okay-lanes .twe-section-intro,
.twe-okay-content .twe-section-intro { max-width: 42ch; margin: 0; color: #425066; font-size: var(--step--1); line-height: 1.55; }
.twe-okay-lane-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.twe-okay-lane { display: flex; flex-direction: column; min-width: 0; min-height: 100%; padding: 1.15rem; border: 1px solid #cbd5e1; border-top: 6px solid #4776e6; border-radius: .7rem; background: #fff; box-shadow: 0 .4rem 1rem rgba(15,23,42,.06); }
.twe-okay-lane-why { border-top-color: #c99b17; }
.twe-okay-lane-who { border-top-color: #d94f4b; }
.twe-okay-lane-where { border-top-color: #269889; }
.twe-okay-lane-question { margin: 0 0 .6rem; color: #425066; font-size: var(--step--2); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.twe-okay-lane h3 { margin: 0 0 .65rem; color: #111827; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.15; }
.twe-okay-lane p:not(.twe-okay-lane-question) { margin: 0 0 .7rem; color: #425066; font-size: var(--step--1); line-height: 1.5; }
.twe-okay-lane .twe-okay-lane-promise { color: #111827; font-weight: 700; }
.twe-okay-lanes-cta { margin: 1.4rem 0 0; }
.twe-okay-quinn { background: #f7fafc; }
.twe-okay-quinn-grid { display: grid; grid-template-columns: minmax(15rem, .75fr) minmax(0, 1.25fr); gap: clamp(2rem, 7vw, 8rem); align-items: center; }
.twe-okay-quinn-art { max-width: 24rem; padding: 1rem; border-radius: .9rem; background: #4776e6; }
.twe-okay-quinn-art img { display: block; width: 100%; height: auto; }
.twe-okay-quinn p { max-width: 56ch; color: #425066; font-size: var(--step-0); line-height: 1.65; }
.twe-okay-quinn-note { margin-top: 1.25rem; color: #2f5bc7 !important; font-family: var(--font-hand, Caveat, cursive); font-size: var(--step-2) !important; }
.twe-okay-content { background: #e2e9f2; }
.twe-okay-empty { max-width: 58rem; padding: 1.4rem 1.6rem; border-left: 6px solid #4776e6; background: #fff; }
.twe-okay-empty p { max-width: 62ch; margin: 0 0 .75rem; color: #425066; font-size: var(--step-0); }
.twe-okay-empty .twe-okay-empty-title { color: #111827; font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; }
body.series-okay .twe-okay-next { background: #111827; color: #f7fafc; }
body.series-okay .twe-okay-next .twe-section-kicker { color: #93c5fd; }
body.series-okay .twe-okay-next .twe-section-heading { color: #f7fafc; }
body.series-okay .twe-okay-next .twe-next-link { border-color: #64748b; color: #f7fafc; }
body.series-okay .twe-okay-next .twe-next-link:hover,
body.series-okay .twe-okay-next .twe-next-link:focus-visible { border-color: #93c5fd; background: #1e293b; }
body.series-okay .twe-okay-next .twe-next-link small { color: #cbd5e1; }
@media (max-width: 62rem) { .twe-okay-lane-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .twe-okay-explanation-grid, .twe-okay-quinn-grid { grid-template-columns: 1fr; gap: 2rem; } .twe-okay-quinn-art { max-width: 20rem; } }
@media (max-width: 38rem) { .twe-okay-lane-grid { grid-template-columns: 1fr; } .twe-okay-lockup { width: min(100%, 20rem); } }


/* Okay But isolation guard: never bleed into Tales That Shaped Us */
body.category-okay-but .twe-okay-hero { background-color: #111827 !important; background-image: none !important; color: #f7fafc !important; }
body.category-okay-but .twe-okay-hero .twe-series-eyebrow { color: #93c5fd !important; }
body.category-okay-but .twe-okay-hero .twe-series-tagline { color: #f7fafc !important; }
body.category-okay-but .twe-okay-hero .twe-series-premise { color: #e2e8f0 !important; }
body.category-okay-but .twe-okay-hero .breadcrumbs-list,
body.category-okay-but .twe-okay-hero .breadcrumbs-list a,
body.category-okay-but .twe-okay-hero .breadcrumbs-list [aria-current="page"] { color: #f7fafc !important; }
body.category-okay-but .twe-okay-lanes { background-color: #edf2f7 !important; background-image: none !important; }
body.category-okay-but .twe-okay-content { background-color: #e2e9f2 !important; background-image: none !important; }
body.category-okay-but .twe-okay-next { background-color: #111827 !important; background-image: none !important; }

body.category-okay-but .twe-okay-hero .twe-series-title { color:#f7fafc !important; }
body.category-okay-but .twe-okay-hero .twe-series-breadcrumbs,
body.category-okay-but .twe-okay-hero .twe-series-breadcrumbs .breadcrumbs,
body.category-okay-but .twe-okay-hero .twe-series-breadcrumbs .breadcrumbs-list,
body.category-okay-but .twe-okay-hero .twe-series-local-nav { background:transparent !important; }
body.category-okay-but .twe-okay-hero .twe-series-local-nav a { color:#f7fafc !important; background:transparent !important; }
body.category-okay-but .twe-okay-hero .twe-series-local-nav a.is-current { background:#4776e6 !important; color:#fff !important; }


/* Okay But hero density parity with the locked Tales landing */
body.category-okay-but .twe-okay-hero .twe-series-breadcrumbs { padding-top: .55rem; }
body.category-okay-but .twe-okay-hero .twe-series-grid { grid-template-columns: minmax(0, 1.18fr) minmax(14rem, .82fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: center; padding-block: .8rem 1.35rem; }
body.category-okay-but .twe-okay-hero .twe-series-title { margin-bottom: .65rem; font-size: clamp(2.35rem, 4.2vw, 4.35rem); line-height: 1.03; }
body.category-okay-but .twe-okay-hero .twe-series-tagline { margin-block: -.2rem .75rem; font-size: clamp(1.15rem, 1.7vw, 1.5rem); line-height: 1.25; }
body.category-okay-but .twe-okay-hero .twe-series-premise { max-width: 40ch; margin-bottom: .75rem; font-size: var(--step--1); line-height: 1.45; }
body.category-okay-but .twe-okay-hero .twe-series-local-nav { margin-block: .55rem .65rem; gap: .5rem .7rem; }
body.category-okay-but .twe-okay-hero .twe-series-local-nav a { min-height: 40px; padding: .42rem .68rem; font-size: var(--step--2); }
body.category-okay-but .twe-okay-hero .twe-series-actions { gap: .55rem; }
body.category-okay-but .twe-okay-hero .twe-series-actions .twe-btn-accent { min-height: 42px; padding: .62rem .85rem; }
body.category-okay-but .twe-okay-hero .twe-series-actions .twe-btn-ghost { min-height: 42px; padding: .55rem .85rem; }
body.category-okay-but .twe-okay-hero .twe-okay-lockup { width: min(100%, 24rem); }
@media (max-width: 61.99rem) {
  body.category-okay-but .twe-okay-hero .twe-series-grid { grid-template-columns: minmax(0, 1.12fr) minmax(11rem, .88fr); gap: 1rem; padding-block: .65rem 1.15rem; }
  body.category-okay-but .twe-okay-hero .twe-series-title { font-size: clamp(2.1rem, 7vw, 3rem); }
  body.category-okay-but .twe-okay-hero .twe-okay-lockup { width: min(100%, 18rem); }
}
@media (max-width: 38rem) {
  body.category-okay-but .twe-okay-hero .twe-series-grid { grid-template-columns: 1fr; }
  body.category-okay-but .twe-okay-hero .twe-okay-lockup { width: min(100%, 18rem); justify-self: start; }
}


/* Homepage product-discovery architecture: scoped to the front page only. */
body.home .twe-front-page { background: #f5f7f8; color: #17212b; }
body.home .twe-front-hero { background: #17212b; color: #f7f3e8; }
body.home .twe-front-hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(15rem, .6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; min-height: clamp(30rem, 64vh, 42rem); }
body.home .twe-front-title { max-width: 10ch; margin-bottom: 1rem; font-size: clamp(3rem, 7vw, 6.8rem); line-height: .98; }
body.home .twe-front-lede { max-width: 48ch; font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 1.48; }
body.home .twe-front-microcopy { max-width: 52ch; margin-top: 1rem; color: #b9d8e5; font-size: .95rem; }
body.home .twe-front-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
body.home .twe-front-hero-note { justify-self: end; max-width: 18rem; padding: 2rem; border: 1px solid rgba(247,243,232,.45); border-radius: 50%; background: #263746; text-align: center; transform: rotate(3deg); }
body.home .twe-front-note-mark { display: block; color: #f4c95d; font-size: 4rem; line-height: .8; }
body.home .twe-front-hero-note p { margin: .75rem 0 .35rem; font-family: var(--font-display, Georgia, serif); font-size: 1.4rem; }
body.home .twe-front-hero-note small { color: #b9d8e5; }
body.home .twe-front-lead { background: #ffffff; }
body.home .twe-front-lead-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(15rem, .6fr); gap: clamp(2rem, 7vw, 8rem); align-items: end; }
body.home .twe-front-lead-aside { padding: 1.4rem; border-left: 4px solid #4776e6; color: #40505f; }
body.home .twe-front-aside-label { margin-top: 0; color: #17212b; font-family: var(--font-display, Georgia, serif); font-size: 1.35rem; }
body.home .twe-front-formats { background: #e9eef1; }
body.home .twe-format-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
body.home .twe-format-card { display: flex; flex-direction: column; min-height: 20rem; padding: clamp(1.25rem, 2.2vw, 2rem); border: 1px solid #b9c6ce; border-top: 6px solid #4776e6; background: #ffffff; }
body.home .twe-format-card:nth-child(2) { border-top-color: #f4c95d; }
body.home .twe-format-card:nth-child(3) { border-top-color: #ef6a67; }
body.home .twe-format-card:nth-child(4) { border-top-color: #42b8a9; }
body.home .twe-format-label { margin: 0 0 .8rem; color: #4776e6; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
body.home .twe-format-card h3 { margin: 0 0 .75rem; font-size: clamp(1.35rem, 2.1vw, 2rem); line-height: 1.05; }
body.home .twe-format-card p { color: #40505f; }
body.home .twe-format-status { margin-top: auto; padding-top: .8rem; color: #5c6973; font-size: .9rem; }
body.home .twe-format-card .twe-text-link { margin-top: auto; }
body.home .twe-format-links { display: grid; gap: .45rem; margin-top: auto; }
body.home .twe-front-series { background: #ffffff; }
body.home .twe-front-topics { background: #17212b; color: #f7f3e8; }
body.home .twe-front-topics .twe-section-heading, body.home .twe-front-topics .twe-section-kicker { color: #f7f3e8; }
body.home .twe-front-topics .twe-section-intro { color: #d5e0e6; }
body.home .twe-topic-pills { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1.5rem 0; }
body.home .twe-topic-pills a { display: inline-flex; align-items: center; min-height: 42px; padding: .55rem .85rem; border: 1px solid #b9d8e5; border-radius: 999px; color: #f7f3e8; }
body.home .twe-topic-pills a:hover, body.home .twe-topic-pills a:focus-visible { background: #4776e6; color: #ffffff; }
body.home .twe-front-learning { background: #e9eef1; }
body.home .twe-front-learning-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 7vw, 8rem); align-items: center; }
body.home .twe-front-learning-grid > div:last-child { max-width: 48ch; }
@media (max-width: 60rem) {
  body.home .twe-front-hero-grid, body.home .twe-front-lead-grid, body.home .twe-front-learning-grid { grid-template-columns: 1fr; }
  body.home .twe-front-hero-note { justify-self: start; max-width: 15rem; padding: 1.4rem; }
  body.home .twe-format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 38rem) {
  body.home .twe-format-grid { grid-template-columns: 1fr; }
  body.home .twe-front-title { font-size: clamp(2.8rem, 14vw, 4.4rem); }
}


/* Homepage responsive tightening: content-led, consistent, and mobile-first. */
body.home .twe-front-hero-grid { min-height: 0; padding-block: clamp(2.6rem, 6vw, 5rem); }
body.home .twe-front-hero-note { max-width: 15rem; padding: 1.35rem; }
body.home .twe-front-hero-note p { font-size: 1.15rem; }
body.home .twe-front-lead, body.home .twe-front-formats, body.home .twe-front-series, body.home .twe-front-topics, body.home .twe-front-learning, body.home .twe-front-newsletter { padding-block: clamp(3rem, 6vw, 5.5rem); }
body.home .twe-front-lead-grid { align-items: center; }
body.home .twe-format-grid { align-items: stretch; }
body.home .twe-format-card { min-height: 0; }
body.home .twe-front-topics .twe-shell, body.home .twe-front-series .twe-shell { max-width: 76rem; }
@media (max-width: 60rem) {
  body.home .twe-front-hero-grid { padding-block: 2.75rem 3.25rem; gap: 1.5rem; }
  body.home .twe-front-hero-note { margin-top: .25rem; }
  body.home .twe-front-lead, body.home .twe-front-formats, body.home .twe-front-series, body.home .twe-front-topics, body.home .twe-front-learning, body.home .twe-front-newsletter { padding-block: 3.25rem; }
  body.home .twe-format-card { min-height: 17rem; }
}
@media (max-width: 38rem) {
  body.home .twe-front-hero-grid { padding-block: 2.25rem 2.75rem; gap: 1.1rem; }
  body.home .twe-front-hero-note { max-width: 12.5rem; padding: 1rem; transform: rotate(2deg); }
  body.home .twe-front-note-mark { font-size: 3rem; }
  body.home .twe-front-hero-note p { margin: .45rem 0 .2rem; font-size: 1rem; }
  body.home .twe-front-hero-note small { font-size: .78rem; }
  body.home .twe-front-lead, body.home .twe-front-formats, body.home .twe-front-series, body.home .twe-front-topics, body.home .twe-front-learning, body.home .twe-front-newsletter { padding-block: 2.75rem; }
  body.home .twe-format-card { min-height: 0; padding: 1.25rem; }
}


/* Final mobile hero correction: remove inherited display-heading bulk. */
body.home .twe-front-title { margin-top: 0; }
body.home .twe-front-kicker { margin-top: 0; }
body.home .twe-front-lede { margin-top: .65rem; }
@media (max-width: 60rem) {
  body.home .twe-front-hero-grid { padding-block: 2.25rem 2.5rem; }
}
@media (max-width: 38rem) {
  body.home .twe-front-title { max-width: 9ch; font-size: clamp(2.6rem, 10vw, 4rem); line-height: 1; margin-bottom: .8rem; }
  body.home .twe-front-lede { font-size: 1rem; line-height: 1.45; }
  body.home .twe-front-microcopy { margin-top: .75rem; font-size: .88rem; line-height: 1.4; }
  body.home .twe-front-actions { margin-top: 1rem; }
}


/* Tablet-width phones and narrow browsers need the same compact hero scale. */
@media (max-width: 60rem) {
  body.home .twe-front-title { max-width: 10ch; font-size: clamp(2.45rem, 8vw, 4rem); line-height: 1; margin-top: 0; margin-bottom: .8rem; }
  body.home .twe-front-lede { font-size: 1rem; line-height: 1.45; }
  body.home .twe-front-microcopy { font-size: .88rem; line-height: 1.4; }
  body.home .twe-front-hero-note { max-width: 13rem; padding: 1.1rem; }
}


/* Compact hero type scale for narrow and tablet-width mobile viewports. */
@media (max-width: 60rem) {
  body.home .twe-front-title { font-size: clamp(2.35rem, 5.5vw, 3.5rem); line-height: 1.02; }
}


/* Keep the hero compact on wider mobile/tablet widths; true phones remain stacked. */
@media (min-width: 48rem) and (max-width: 60rem) {
  body.home .twe-front-hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(11rem, .65fr); gap: 1.5rem; }
  body.home .twe-front-hero-note { justify-self: end; }
}


/* Final desktop hero cap: readable scale and content-led height. */
body.home .twe-front-hero-grid { min-height: auto; padding-block: clamp(2.5rem, 4vw, 4rem); }
body.home .twe-front-title { max-width: 9ch; font-size: clamp(2.75rem, 4.5vw, 5rem); line-height: 1; margin-top: 0; }
body.home .twe-front-lede { max-width: 48ch; font-size: clamp(1rem, 1.35vw, 1.25rem); line-height: 1.48; }
body.home .twe-front-microcopy { font-size: .9rem; }
@media (min-width: 61rem) {
  body.home .twe-front-hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(16rem, .75fr); gap: clamp(2rem, 5vw, 5rem); }
  body.home .twe-front-hero-note { max-width: 17rem; padding: 1.5rem; }
}


/* Desktop hero correction: proportionate editorial scale, never viewport-dominant. */
@media (min-width: 61rem) {
  body.home .twe-front-hero-grid { min-height: 0; padding-block: 2.75rem 3.25rem; }
  body.home .twe-front-title { max-width: 12ch; font-size: clamp(2.75rem, 3.8vw, 4rem); line-height: 1.03; margin: 0 0 .85rem; }
  body.home .twe-front-lede { max-width:  fiftych; font-size: 1.08rem; line-height: 1.5; }
  body.home .twe-front-microcopy { margin-top: .75rem; font-size: .88rem; }
  body.home .twe-front-actions { margin-top: 1.1rem; }
  body.home .twe-front-hero-note { max-width: 15rem; padding: 1.25rem; }
}


/* Enforce the final desktop reading scale. */
@media (min-width: 61rem) {
  body.home .twe-front-hero-grid { padding-block: 2rem 2.5rem; }
  body.home .twe-front-title { max-width: 12ch; font-size: clamp(2.5rem, 3vw, 3.25rem); line-height: 1.05; }
  body.home .twe-front-lede { max-width: 50ch; font-size: 1rem; line-height: 1.5; }
  body.home .twe-front-hero-note { max-width: 14rem; padding: 1.1rem; }
}


/* Homepage hard cap: prevent legacy hero rules from re-expanding the desktop layout. */
body.home .twe-front-hero { min-height: 0 !important; padding-block: 0 !important; }
body.home .twe-front-hero-grid { min-height: 0 !important; padding-block: clamp(2rem, 4vw, 3.5rem) !important; }
body.home .twe-front-title { max-width: 12ch !important; font-size: clamp(2.3rem, 3vw, 3.25rem) !important; line-height: 1.05 !important; margin-top: 0 !important; }
body.home .twe-front-lede { max-width: 50ch !important; font-size: 1rem !important; line-height: 1.5 !important; }
body.home .twe-front-hero-note { max-width: 14rem !important; }
@media (max-width: 60rem) {
  body.home .twe-front-hero-grid { padding-block: 2rem 2.4rem !important; }
  body.home .twe-front-title { font-size: clamp(2.3rem, 5.5vw, 3.25rem) !important; }
}
@media (max-width: 38rem) {
  body.home .twe-front-title { font-size: clamp(2.25rem, 10vw, 3rem) !important; }
}


/* Homepage curiosity visual: compact, responsive, and homepage-only. */
body.home .twe-front-hero-art {
	margin: 0;
	align-self: center;
	justify-self: end;
	width: min(100%, 34rem);
}
body.home .twe-front-hero-image {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid rgba(244, 201, 93, .28);
	border-radius: .5rem;
	box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .18);
}
@media (max-width: 60rem) {
	body.home .twe-front-hero-grid {
		grid-template-columns: 1fr !important;
	}
	body.home .twe-front-hero-art {
		justify-self: start;
		width: min(100%, 28rem);
	}
}
@media (max-width: 38rem) {
	body.home .twe-front-hero-art {
		width: min(100%, 22rem);
	}
}


/* Series cards: keep labels and descriptions visibly separated. */
.twe-series-card {
	display: flex;
	flex-direction: column;
	gap: .6rem;
}
.twe-series-card-description {
	display: block;
}


/* Topics / Explore gateway: curated pathways, clear hierarchy, evergreen output. */
.twe-explore-hero { background: #17212b; color: #f7f3e8; }
.twe-explore-hero-inner { padding-block: clamp(3rem, 7vw, 6rem); max-width: 70rem; }
.twe-explore-hero h1 { max-width: 12ch; margin: .35rem 0 1rem; color: #f7f3e8; font-size: clamp(2.5rem, 5vw, 5rem); line-height: .98; }
.twe-explore-hero-copy { max-width: 42rem; margin: 0 0 1.6rem; color: rgba(247,243,232,.9); font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.55; }
.twe-explore-search-band { background: #f7f3e8; border-bottom: 1px solid rgba(23,33,43,.14); }
.twe-explore-search-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: end; padding-block: clamp(2.2rem, 5vw, 4rem); }
.twe-explore-search-inner h2, .twe-topic-paths h2, .twe-explore-shelf h2, .twe-explore-next h2 { margin: .35rem 0 .65rem; color: #17212b; }
.twe-explore-search-inner p { max-width: 38rem; margin: 0; color: #3c4650; }
.twe-explore-search-form > div { display: flex; gap: .65rem; }
.twe-explore-search-form input { min-width: 0; flex: 1; border: 1px solid #84909a; border-radius: .35rem; padding: .85rem 1rem; background: #fff; color: #17212b; }
.twe-explore-search-form input:focus { outline: 3px solid #4776e6; outline-offset: 2px; }
.twe-topic-paths, .twe-explore-shelf { padding-block: clamp(3rem, 6vw, 5rem); background: #eef2f4; }
.twe-topic-paths .twe-section-intro { max-width: 40rem; color: #3c4650; }
.twe-topic-path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.twe-topic-path-card { padding: clamp(1.2rem, 2.5vw, 2rem); border: 1px solid #aab5bc; border-radius: .5rem; background: #fff; box-shadow: 0 .5rem 1.5rem rgba(23,33,43,.07); }
.twe-topic-path-card h3 { margin: 0 0 1rem; color: #17212b; font-size: 1.2rem; }
.twe-topic-path-card ul { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.twe-topic-path-card li a { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .6rem .7rem; border-radius: .3rem; color: #17212b; text-decoration: none; }
.twe-topic-path-card li a:hover, .twe-topic-path-card li a:focus-visible { background: #e7eefb; color: #17212b; }
.twe-topic-path-card li span { color: #5c6872; font-size: .82rem; white-space: nowrap; }
.twe-explore-shelf { background: #fff; }
.twe-explore-shelf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.twe-explore-story { display: flex; flex-direction: column; align-items: flex-start; padding: 1.35rem; border-top: 4px solid #4776e6; background: #f1f4f5; }
.twe-explore-story h3 { margin: .35rem 0 .75rem; font-size: 1.35rem; line-height: 1.15; }
.twe-explore-story h3 a { color: #17212b; text-decoration: none; }
.twe-explore-story p:not(.twe-piece-eyebrow) { margin: 0 0 1rem; color: #3c4650; line-height: 1.5; }
.twe-explore-story .twe-text-link { margin-top: auto; }
.twe-explore-next { background: #17212b; color: #f7f3e8; }
.twe-explore-next-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 6vw, 5rem); }
.twe-explore-next h2 { color: #f7f3e8; }
.twe-explore-next p { max-width: 38rem; color: rgba(247,243,232,.88); line-height: 1.55; }
.twe-explore-next-links { display: flex; flex-wrap: wrap; gap: .7rem; }
@media (max-width: 48rem) {
	.twe-explore-search-inner, .twe-explore-next-inner { grid-template-columns: 1fr; }
	.twe-topic-path-grid, .twe-explore-shelf-grid { grid-template-columns: 1fr; }
	.twe-explore-search-form > div { align-items: stretch; flex-direction: column; }
	.twe-explore-search-form .twe-btn-accent { align-self: flex-start; }
}


/* Keep Explore visually continuous with the homepage system. */
.twe-topics-page { background: #e9eef1; }
.twe-explore-search-band { background: #e9eef1; }
.twe-explore-search-inner h2, .twe-topic-paths h2, .twe-explore-shelf h2, .twe-explore-next h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.08; }
.twe-explore-search-inner p, .twe-topic-paths .twe-section-intro { color: #3c4650; }
.twe-topic-paths { background: #e9eef1; }
.twe-explore-shelf { background: #fff; }
.twe-explore-story { background: #e9eef1; }
.twe-explore-next { background: #17212b; }


/* Explore hero kicker: accessible contrast on the homepage navy. */
.twe-explore-hero .twe-section-kicker {
	color: #f4c95d !important;
}


/* Homepage hero secondary action: readable against navy at rest. */
body.home .twe-front-actions .twe-btn-ghost {
	color: #f7f3e8 !important;
	border-color: rgba(247, 243, 232, .78) !important;
	background: transparent !important;
}
body.home .twe-front-actions .twe-btn-ghost:hover,
body.home .twe-front-actions .twe-btn-ghost:focus-visible {
	color: #17212b !important;
	background: #f7f3e8 !important;
	border-color: #f7f3e8 !important;
}


/* ==========================================================================
   Topic & sub-series archives (archive.php) + standard pages (page.php)
   Added 2026-10-07: these templates had markup but no styling.
   ========================================================================== */
[data-series="okay-but"]{--card-accent:#4776E6}
[data-series="talesthatshapedus"]{--card-accent:#7F3842}

/* --- archive hero --- */
.twe-topic-head{position:relative;overflow:hidden;display:grid;gap:1.5rem;align-items:end;margin:1rem 0 2.5rem;padding:clamp(1.75rem,4vw,3rem);border-radius:20px;background:#1B1E23 !important;color:#F7F3E8}
@media (min-width:860px){.twe-topic-head{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}}
.twe-topic-head::after{content:"#";position:absolute;right:-.5rem;top:-3.5rem;font-family:var(--font-display);font-size:16rem;font-weight:800;line-height:1;color:rgba(255,255,255,.05);pointer-events:none}
.twe-topic-head>*{position:relative;z-index:1}
.twe-topic-eyebrow{margin:0 0 .5rem;color:#93c5fd;font-size:var(--step--2);font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.twe-topic-title{margin:0;color:#fff;font-size:clamp(2.2rem,5vw,3.6rem);line-height:1.05}
.twe-topic-desc{margin-top:.75rem;color:rgba(247,243,232,.85);max-width:40rem}
.twe-topic-desc p{margin:0}
.twe-topic-count{margin:0;padding:1rem 1.25rem;border-left:4px solid #93c5fd;background:rgba(255,255,255,.06);border-radius:0 12px 12px 0;color:rgba(247,243,232,.8);font-size:var(--step--1)}
.twe-topic-count strong{display:block;margin-bottom:.25rem;color:#fff;font-family:var(--font-display);font-size:1.35rem}
.twe-topic-section-title{margin:0 0 1rem;font-size:clamp(1.4rem,2.5vw,1.9rem)}

/* --- starter cards --- */
.twe-topic-starters{margin-bottom:3rem}
.twe-starter-grid{list-style:none;margin:0;padding:0;display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}
.twe-starter-card{position:relative;display:flex;flex-direction:column;gap:.5rem;padding:1.25rem 1.35rem 1.4rem;background:var(--paper);border:1px solid var(--rule);border-top:6px solid var(--card-accent,var(--accent));border-radius:14px;transition:transform .15s ease,box-shadow .15s ease}
.twe-starter-card:hover,.twe-starter-card:focus-within{transform:translateY(-3px);box-shadow:0 12px 28px rgba(0,0,0,.1)}
.twe-starter-card .twe-piece-eyebrow{margin:0;font-size:var(--step--2);font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.twe-starter-card .twe-piece-eyebrow a{position:relative;z-index:2;color:var(--card-accent,var(--accent))}
.twe-piece-sub{color:var(--ink-muted);font-weight:700}
.twe-starter-card .twe-piece-title{margin:0;font-size:1.3rem;line-height:1.2}
.twe-starter-card .twe-piece-title a{color:var(--ink);text-decoration:none}
.twe-starter-card .twe-piece-title a::after{content:"";position:absolute;inset:0;z-index:1}
.twe-starter-card:hover .twe-piece-title a,.twe-starter-card .twe-piece-title a:focus-visible{text-decoration:underline}
.twe-starter-card .twe-piece-dek{margin:0;color:var(--ink-muted);font-size:.95rem}
.twe-starter-card .twe-piece-meta{margin:auto 0 0;padding-top:.5rem;color:var(--ink-muted);font-size:.8rem}

/* --- everything list --- */
.twe-topic-all{margin-bottom:3rem}
.twe-topic-all-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem 1rem;border-bottom:2px solid var(--ink);margin-bottom:.25rem}
.twe-topic-explore-link{font-weight:700}
.twe-topic-list{list-style:none;margin:0;padding:0}
.twe-topic-row{display:grid;gap:.35rem 1.5rem;padding:1.1rem .75rem;border-bottom:1px solid var(--rule);border-left:4px solid transparent;transition:background .15s ease,border-color .15s ease}
@media (min-width:760px){.twe-topic-row{grid-template-columns:minmax(0,1fr) 13rem}}
.twe-topic-row:hover{background:var(--paper-2);border-left-color:var(--card-accent,var(--accent))}
.twe-topic-row-title{margin:0 0 .25rem;font-size:1.15rem}
.twe-topic-row-title a{color:var(--ink)}
.twe-topic-row .twe-piece-dek{margin:0;color:var(--ink-muted);font-size:.95rem}
.twe-topic-row-meta{margin:0;color:var(--ink-muted);font-size:.8rem;line-height:1.5}
.twe-topic-row-series{font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--card-accent,var(--accent))}
.twe-topic-all .pagination,.twe-topic-all .navigation{margin-top:1.5rem}

/* --- downloads, related topics, empty state --- */
.twe-topic-downloads{margin:0 0 3rem;padding:1.5rem;border-radius:16px;background:var(--paper-2)}
.twe-topic-downloads h2{margin-top:0}
.twe-topic-downloads-list{list-style:none;margin:0;padding:0;display:grid;gap:.75rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.twe-topic-downloads-list li{padding:1rem;border-radius:12px;background:var(--paper);border:1px solid var(--rule)}
.twe-topic-related{margin:0 0 3rem}
.twe-topic-chip-row{list-style:none;margin:.75rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem}
.twe-topic-chip-row a{display:inline-flex;gap:.4rem;align-items:center;padding:.4rem .9rem;border:1px solid var(--rule-strong);border-radius:999px;color:var(--ink);font-weight:600;text-decoration:none}
.twe-topic-chip-row a:hover,.twe-topic-chip-row a:focus-visible{background:var(--ink);color:var(--paper)}
.twe-explore-option-count{font-size:.8em;opacity:.7}
.twe-no-results{margin:1rem 0 3rem;padding:clamp(1.75rem,4vw,3rem);border-radius:20px;background:var(--paper-2);text-align:center}

/* --- standard pages (page.php) --- */
.twe-page-header{position:relative;margin:1rem 0 2rem;padding:clamp(1.5rem,4vw,2.75rem);border-radius:20px;background:linear-gradient(135deg,var(--paper-2),var(--paper)) !important;border:1px solid var(--rule);overflow:hidden}
.twe-page-header::before{content:"";position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--accent)}
.twe-page-header::after{content:"?";position:absolute;right:1.5rem;bottom:-2.5rem;font-family:var(--font-display);font-size:11rem;font-weight:800;line-height:1;color:var(--accent);opacity:.07;pointer-events:none}
.twe-page-title{margin:0;font-size:clamp(2rem,4.5vw,3.2rem);line-height:1.08;max-width:48rem}
.twe-page-lede{margin:.75rem 0 0;max-width:42rem;font-family:var(--font-display);font-size:clamp(1.1rem,2vw,1.35rem);color:var(--ink-muted)}
.twe-learning-page .twe-page-header{background:none !important;border:0;padding:0;border-radius:0}
.twe-learning-page .twe-page-header::before,.twe-learning-page .twe-page-header::after{display:none}
@media (min-width:960px){.twe-page-layout--sidebar{display:grid;grid-template-columns:15rem minmax(0,1fr);gap:3rem;align-items:start}}
.twe-page-toc{margin:0 0 2rem;padding:1.1rem 1.25rem;border-radius:14px;background:var(--paper-2);border:1px solid var(--rule)}
@media (min-width:960px){.twe-page-toc{position:sticky;top:1.5rem}}
.twe-page-toc-title{margin:0 0 .5rem;font-size:var(--step--2);font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-muted)}
.twe-page-toc-list{margin:0;padding:0;list-style:none;counter-reset:toc}
.twe-page-toc-list li{counter-increment:toc;padding:.35rem 0;border-top:1px solid var(--rule)}
.twe-page-toc-list li:first-child{border-top:0}
.twe-page-toc-list li::before{content:counter(toc,decimal-leading-zero);margin-right:.5rem;font-weight:800;font-size:.75rem;color:var(--accent)}
.twe-page-toc-list a{color:var(--ink);text-decoration:none;font-weight:600}
.twe-page-toc-list a:hover,.twe-page-toc-list a:focus-visible{text-decoration:underline}
.twe-page-content{max-width:46rem}
.twe-page-content>h2{position:relative;margin:2.5rem 0 1rem;padding-top:1rem;font-size:clamp(1.4rem,2.6vw,1.8rem)}
.twe-page-content>h2::before{content:"";position:absolute;left:0;top:0;width:3rem;height:4px;border-radius:2px;background:var(--accent)}
.twe-page-content>h2:first-child{margin-top:0}
.twe-page-content>ul:not([class]) li,.twe-page-content>ol:not([class]) li{margin-bottom:.5rem}
.twe-page-content>ul:not([class]) li::marker{color:var(--accent)}
.twe-page-content>p:first-child{font-size:1.1rem}
