/* ==========================================================================
   Components
   Buttons, tags, cards, dividers, sections
   ========================================================================== */

/* ---- Global Focus Indicator (LYC-696 / WCAG 2.2 SC 2.4.11 + 2.4.13) ----
   Browser default outline (~0.67px gray) is invisible on the cream page bg
   and disappears entirely on dark surfaces. Replace with a 2px claret ring
   that meets the 3:1 contrast minimum. `:focus-visible` (not `:focus`) so
   mouse users don't see a ring on click — only keyboard / programmatic
   focus surfaces it. Per-context overrides below adjust color when the
   default ring would be invisible against the surface.
*/
:focus-visible {
  outline: 2px solid var(--color-claret);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Light variant for the dark footer (claret would be too dark on #040503) */
.site-footer :focus-visible {
  outline-color: var(--color-quarter-white);
  outline-offset: 3px;
}

/* On claret-filled buttons the default claret ring would be invisible; use
   the satin/quarter-white tone with extra offset so the ring sits clear of
   the button edge. */
.btn-primary:focus-visible,
.btn-filled:focus-visible {
  outline-color: var(--color-quarter-white);
  outline-offset: 3px;
}

/* Form inputs get a focused border state in addition to the outline so the
   field reads as "active" even if the outline is clipped by a parent. */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-claret);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-height);
  padding: 17px;
  border-radius: var(--btn-radius);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
}

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

.btn-outline--satin {
  background: transparent;
  border: var(--btn-border) solid var(--color-satin-linen);
  color: var(--color-satin-linen);
}

.btn-filled {
  background: var(--color-claret);
  border: none;
  color: var(--color-quarter-white);
}

.btn-filled--satin {
  background: var(--color-satin-linen);
  border: none;
  color: var(--color-claret);
}

/* LYC-690: canonical primary CTA — claret fill on quarter-white text.
   The theme markup widely uses `.btn.btn-primary` (header CTA, footer
   subscribe button, body inline subscribe in section-subscribe-banner,
   mobile drawer CTA). Previously only scoped variants existed
   (.subscribe-band .btn-primary, .mobile-drawer-cta .btn-primary), so
   the footer button appeared black-on-black and the archive subscribe
   banner rendered as plain text. This global rule fixes both surfaces.
*/
.btn-primary {
  background: var(--color-claret);
  border: none;
  color: var(--color-quarter-white);
  text-decoration: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-claret-hover);
  color: var(--color-quarter-white);
  text-decoration: none;
  opacity: 1; /* override .btn:hover { opacity: 0.85 } — we use a darker bg instead */
}

/* Compact button variant — used in the footer signup form alongside
   .btn-primary so the submit button fits beside the email input. */
.btn-sm {
  height: auto;
  padding: 12px 20px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.btn__arrow {
  width: 10px;
  height: 10px;
  display: inline-block;
}

/* ---- Category Tag ---- */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 6px;
  background: var(--color-satin-linen);
  border-radius: var(--tag-radius);
  font-family: var(--font-eyebrow);
  font-weight: 500;
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  text-transform: uppercase;
  color: var(--color-black);
  white-space: nowrap;
}

/* ---- Dividers ---- */
.divider-h {
  width: 100%;
  height: 1px;
  background: var(--color-black);
  opacity: 0.15;
}

.divider-h--light {
  background: var(--color-satin-linen);
  opacity: 0.3;
}

.divider-v {
  width: 1px;
  align-self: stretch;
  background: var(--color-black);
  opacity: 0.15;
}

.divider-v--light {
  background: var(--color-satin-linen);
  opacity: 0.3;
}

/* ---- Lyceum Symbol (pillar) color defaults ----
   The inline SVG from lyceum_symbol_svg() uses fill="currentColor" so each
   variant class sets `color` to the matching token. Callsite classes such as
   `.subscribe-hero__pillar` or `.footer-brand .lyceum-symbol` still win via
   specificity when they need a different hue, but these variant defaults
   guarantee the pillar is always visibly coloured even when a callsite
   forgets its own override. Sizing is always the callsite's job. */
.lyceum-symbol              { color: var(--color-black); }
.lyceum-symbol--claret      { color: var(--color-claret); }
.lyceum-symbol--black       { color: var(--color-black); }
.lyceum-symbol--white       { color: var(--color-white); }
.lyceum-symbol--linen       { color: var(--color-satin-linen); }
.lyceum-symbol--quarter-white { color: var(--color-quarter-white); }
.lyceum-symbol--shuttle-gray  { color: var(--color-shuttle-gray); }

/* ---- Article Card (LYC-165 / REQ-44) ----
   Canonical `.card` pattern. Mirrors `designs/html/design-tokens.css` so the
   homepage grids, category archives, and search results all share one
   implementation. Variants layer on top:
     .card           : default grid card (300x360 thumb aspect 3/2)
     .card-lead      : oversized hero-lede card for long-form grids
     .card-sm        : smaller headline variant used in stacked sidecars
     .card-expanded  : horizontal row (200x220 thumb left + content right)
     .card-video     : 21/9 poster with centered play-button overlay
*/
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--color-black);
}

.card .thumb {
  aspect-ratio: 16 / 9;
  background: var(--color-satin-linen);
  overflow: hidden;
  position: relative;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .eyebrow {
  color: var(--color-claret);
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--color-black);
}

.card p {
  margin: 0;
  color: var(--color-shuttle-gray);
  font-size: 16px;
  line-height: 1.5;
}

.card .byline {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-shuttle-gray);
  letter-spacing: 0.04em;
}

.card:hover,
.card:focus-visible {
  text-decoration: none;
  color: var(--color-black);
}

.card:hover h3,
.card:focus-visible h3 {
  color: var(--color-claret);
}

.card:focus-visible {
  outline: 2px solid var(--color-claret);
  outline-offset: 4px;
}

/* ---- Lead variant (wider hero card for long-form grids) ---- */
.card-lead h3 {
  font-size: 44px;
  line-height: 1.05;
}

/* ---- Small variant (stacked sidecar card) ---- */
.card-sm h3 {
  font-size: 20px;
}

/* ---- Video variant (21/9 poster with play overlay) ---- */
.card-video .thumb {
  aspect-ratio: 21 / 9;
}

.card-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--color-overlay-dark);
  box-shadow: var(--shadow-2, 0 4px 12px rgba(4, 5, 3, 0.08));
  pointer-events: none;
}

.card-video__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 16px 0 16px 28px;
  border-color: transparent transparent transparent var(--color-white);
}

/* ---- Expanded variant (horizontal 200x220 thumb + content) ---- */
.card-expanded {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-rule);
}

.card-expanded .thumb {
  width: 200px;
  aspect-ratio: 10 / 11;
}

.card-expanded__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-expanded__body h3 {
  font-size: 28px;
  line-height: 1.15;
}

@media (max-width: 640px) {
  .card-expanded {
    grid-template-columns: 80px 1fr;
    gap: 16px;
  }

  .card-expanded .thumb {
    width: 80px;
    aspect-ratio: 1 / 1;
  }

  .card-expanded__body h3 {
    font-size: 20px;
  }

  .card-lead h3 {
    font-size: 32px;
  }
}

/* ---- Article Card Row (4 cards with dividers) ---- */
.card-row {
  display: flex;
  gap: var(--card-gap);
  align-items: flex-start;
}

.card-row .divider-v {
  flex-shrink: 0;
  height: 364px;
}

/* ---- Legacy alias for back-compat (pre-REQ-44 row layout) ---- */
.article-expanded {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-rule);
}

/* ---- Section Title Bar ---- */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
  background: var(--color-quarter-white);
}

.section-title__label {
  font-family: var(--font-eyebrow);
  font-weight: 500;
  font-size: var(--text-2xl);
  line-height: var(--leading-normal);
  text-transform: uppercase;
  color: var(--color-black);
}

.section-title__link {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-black);
  text-align: right;
}

/* ---- Category Tabs ---- */
.tabs {
  display: flex;
  align-items: center;
  position: relative;
}

.tabs::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-rule-strong);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 110px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.tab--wide {
  width: 141px;
}

.tab__label {
  font-family: var(--font-eyebrow);
  font-weight: 500;
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  text-transform: uppercase;
  text-align: center;
  color: var(--color-shuttle-gray-soft);
  width: 100%;
}

.tab__indicator {
  width: 100%;
  height: 0;
  background: var(--color-rule);
}

.tab--active .tab__label {
  color: var(--color-black);
}

.tab--active .tab__indicator {
  height: 2px;
  background: var(--color-black);
}

/* ---- Ad Placeholder styles will live here once ad slots launch.
   Phase 1 has no rendered ad markup; see template-parts/ad-slot.php. ---- */

/* ---- Recommended Sidebar ---- */
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 398px;
}

.sidebar-list__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-list__title {
  font-family: var(--font-eyebrow);
  font-weight: 500;
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  text-transform: uppercase;
  color: var(--color-black);
}

.sidebar-item {
  display: flex;
  gap: 90px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-rule-strong);
}

.sidebar-item__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.sidebar-item__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-2xl);
  line-height: normal;
  color: var(--color-black);
  max-width: 208px;
}

.sidebar-item__date {
  font-family: var(--font-eyebrow);
  font-weight: 500;
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  text-transform: uppercase;
  color: var(--color-shuttle-gray);
}

.sidebar-item__image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---- Most Read List ---- */
.most-read-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-rule-strong);
}

.most-read-item__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  color: var(--color-black);
  max-width: 348px;
}

.most-read-item__subtitle {
  font-family: var(--font-body-serif);
  font-weight: 500;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-shuttle-gray);
}

/* ==========================================================================
   Layout Primitives (LYC-222 / R2-G3)
   Container classes consumed across every page template. Tokens are
   declared in _tokens.css (LYC-216): --container-max=1280px,
   --container-wide=1440px, --container-article=720px, --gutter=clamp(16px,3vw,40px).
   Fallback values on each var() call keep layouts intact if a token is ever
   unset (e.g. during partial stylesheet loads or sandbox previews).
   `margin-inline: auto` is the modern logical equivalent of `margin: 0 auto`
   and works correctly in both LTR and RTL contexts.
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max, 1280px);
  margin-inline: auto;
  padding-inline: var(--gutter, 24px);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide, 1440px);
  margin-inline: auto;
  padding-inline: var(--gutter, 24px);
}

.container-article {
  width: 100%;
  max-width: var(--container-article, 720px);
  margin-inline: auto;
  padding-inline: var(--gutter, 24px);
}

/* =====================================================================
   Topic archive 2-col layout (LYC-237 / R3-M5)
   Mirrors designs/html/topic-archive.html: main article grid + right-rail
   aside with Related Topics chips and an Authors-writing-on-topic list.
   Stacks to a single column at <=1024px.
   ===================================================================== */
.topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-10);
  margin-top: var(--space-8);
}
@media (max-width: 1024px) {
  .topic-layout { grid-template-columns: 1fr; }
}

.topic-hero {
  margin-bottom: var(--space-8);
}
.topic-hero .lede {
  color: var(--color-shuttle-gray);
  max-width: 680px;
  margin-top: var(--space-3);
}

.topic-aside .aside-block {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: var(--rule-width, 1px) solid var(--color-rule);
}
.topic-aside .aside-block h3 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-3);
  color: var(--color-shuttle-gray);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* LYC-693: chip-row was wrapping awkwardly on narrow viewports (search-page
   filters). Switch to horizontal-scroll on mobile so chips stay on one line
   and the user can swipe through them. Hides the scrollbar visually but
   keeps the scroll behavior. */
@media (max-width: 768px) {
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--space-2);
  }
  .chip-row::-webkit-scrollbar {
    display: none;
  }
  .chip-row .chip {
    flex: 0 0 auto;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--color-satin-linen);
  color: var(--color-black);
  font-family: var(--font-ui);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 2px;
  text-decoration: none;
}
.chip:hover { background: var(--color-claret); color: var(--color-white); }

.aside-author-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.aside-author-list a {
  font-family: var(--font-body-serif);
  color: var(--color-black);
  text-decoration: none;
}
.aside-author-list a:hover { color: var(--color-claret); }

/* ==========================================================================
   Search term highlighting (LYC-236 / R3-M4)
   Used by inc/search.php `lyceum_highlight_search_term()` to wrap matches in
   <mark>. wp_kses() in the card template preserves <mark> with no attrs.
   ========================================================================== */
mark {
  background: var(--color-satin-linen);
  color: var(--color-black);
  padding: 0 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Body-page reading column (LYC-238 / R3-m1)
   /about/, /privacy/, /terms/ render through page.php with `.article-body`.
   The mockup specifies 720 px reading measure (.prose), not the default 800.
   ========================================================================== */
body.page .article-body {
  max-width: var(--container-article, 720px);
}

/* ==========================================================================
   Author cards (LYC-226 / R3-C3)
   Used by archive-lyceum_author.php grid-3 Editors + grid-4 Contributors,
   About editors grid (LYC-235), and single-lyceum_author.php "Written for"
   section (LYC-227).
   ========================================================================== */
.card-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  text-decoration: none;
  color: var(--color-black);
  padding: var(--space-4);
  transition: background var(--dur-fast, 120ms) var(--ease-std, ease);
}
.card-author:hover { background: var(--color-satin-linen); text-decoration: none; }
.card-author__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-satin-linen);
  object-fit: cover;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--color-claret);
  flex-shrink: 0;
}
.card-author .eyebrow {
  color: var(--color-shuttle-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}
.card-author h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
  color: var(--color-black);
  margin: 0;
}
.card-author:hover h3 { color: var(--color-claret); }
.card-author p {
  color: var(--color-shuttle-gray);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  max-width: 28ch;
}
.card-author .card__read-more {
  color: var(--color-claret);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: var(--space-2);
}

/* Grid-4 for Contributors (3 columns at 1024, 2 at 640) */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* Authors page hero + sections */
.page-authors .authors-hero { margin-block: var(--space-10) var(--space-8); }
.page-authors .authors-hero .eyebrow { color: var(--color-claret); display: block; margin-bottom: var(--space-2); }
.page-authors .authors-hero .lede { color: var(--color-shuttle-gray); max-width: 680px; margin-top: var(--space-3); }
.page-authors .authors-section { margin-block: var(--space-12); }

/* ==========================================================================
   Categories hub (LYC-228 / R3-C5)
   /categories/ page, matches designs/html/categories-hub.html.
   ========================================================================== */
.page-categories .categories-hero { margin-block: var(--space-10) var(--space-8); }
.page-categories .categories-hero .eyebrow { color: var(--color-claret); display: block; margin-bottom: var(--space-2); }
.page-categories .categories-hero .lede { color: var(--color-shuttle-gray); max-width: 680px; margin-top: var(--space-3); }
.page-categories .categories-grid-section { margin-block: var(--space-12); }
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-6);
  text-decoration: none;
  color: var(--color-black);
  border: var(--rule-width, 1px) solid var(--color-rule);
  transition: background var(--dur-fast, 120ms) var(--ease-std, ease);
}
.category-tile:hover { background: var(--color-satin-linen); text-decoration: none; }
.category-tile__icon { width: 80px; height: 80px; color: var(--color-claret); }
.category-tile .eyebrow { color: var(--color-shuttle-gray); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.category-tile__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  color: var(--color-black);
  margin: 0;
}
.category-tile:hover .category-tile__name { color: var(--color-claret); }
.category-tile__desc { color: var(--color-shuttle-gray); font-size: 14px; line-height: 1.55; margin: 0; }
.category-tile__count { color: var(--color-shuttle-gray); font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.04em; }
.category-tile__read {
  color: var(--color-claret);
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: var(--space-2);
}

/* ==========================================================================
   About page sections (LYC-235 / R3-M3)
   page-about.php renders prose + #masthead Editors grid + #contact 4-door.
   ========================================================================== */
.page-about .prose {
  max-width: var(--container-article, 720px);
  margin-inline: auto;
  margin-block: var(--space-10);
}
.page-about .article-body p { font-family: var(--font-body-serif); font-size: 19px; line-height: 1.7; margin: 0 0 var(--space-5); }
.page-about .article-body p.lede { font-size: 22px; color: var(--color-shuttle-gray); }

.page-about .about-section {
  margin-block: var(--space-16);
  padding-top: var(--space-8);
  border-top: var(--rule-width, 1px) solid var(--color-rule);
}

.page-about .about-contact__lede {
  color: var(--color-shuttle-gray);
  font-family: var(--font-body-serif);
  font-size: 19px;
  line-height: 1.55;
  margin: var(--space-4) 0 var(--space-8);
  max-width: 640px;
}

.contact-doors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-block: var(--space-6);
}
@media (max-width: 640px) { .contact-doors { grid-template-columns: 1fr; } }

.contact-door {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border: var(--rule-width, 1px) solid var(--color-rule);
  background: var(--color-quarter-white);
  text-decoration: none;
  color: var(--color-black);
  transition: background var(--dur-fast, 120ms) var(--ease-std, ease);
}
.contact-door:hover { background: var(--color-satin-linen); }
.contact-door h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin: 0;
}
.contact-door p { color: var(--color-shuttle-gray); font-size: 15px; line-height: 1.45; margin: 0; }
.contact-door__email {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--color-claret);
  margin-top: var(--space-2);
}

/* LYC-714: single mailto contact block (replaces 4-door grid). */
.page-about .about-contact__mailto {
  margin: var(--space-4) 0 var(--space-6);
  font-family: var(--font-body-serif);
  font-size: 22px;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.page-about .mailto-link {
  color: var(--color-claret);
  text-decoration: none;
  border-bottom: var(--rule-width, 1px) solid var(--color-claret);
  transition: color var(--dur-fast, 120ms) var(--ease-std, ease), border-color var(--dur-fast, 120ms) var(--ease-std, ease);
}
.page-about .mailto-link:hover,
.page-about .mailto-link:focus-visible {
  color: var(--color-claret-hover);
  border-bottom-color: var(--color-claret-hover);
}

/* ==========================================================================
   Contact page (hotfix 2026-04-15)
   page-contact.php renders designs/html/contact.html layout.
   ========================================================================== */
.page-contact .contact-head {
  margin-block: var(--space-10) var(--space-8);
}
.page-contact .contact-head .muted {
  color: var(--color-shuttle-gray);
  margin-top: var(--space-3);
  max-width: 540px;
}

.page-contact .contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  margin-block: var(--space-8) var(--space-12);
}
@media (max-width: 640px) { .page-contact .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border: var(--rule-width, 1px) solid var(--color-rule);
  background: var(--color-quarter-white);
}
.contact-card .eyebrow { color: var(--color-claret); }
.contact-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
}
.contact-card p { color: var(--color-shuttle-gray); margin: 0; line-height: 1.55; }
.contact-card .contact-email { margin-top: var(--space-2); }
.contact-card .contact-email a {
  color: var(--color-claret);
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.contact-card .contact-email a:hover { text-decoration: underline; }

.page-contact .contact-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-10);
  margin-block: var(--space-8) var(--space-12);
  padding-top: var(--space-8);
  border-top: var(--rule-width, 1px) solid var(--color-rule);
}
@media (max-width: 640px) { .page-contact .contact-meta { grid-template-columns: 1fr; } }
.contact-meta-block .muted { color: var(--color-shuttle-gray); margin: 0 0 var(--space-2); }
.contact-meta-block p { margin: 0; line-height: 1.6; }

/* ==========================================================================
   Chip active state (LYC-241 / R4-S1)
   Used by search filter chips. .is-active == Claret-filled chip.
   ========================================================================== */
.chip.is-active {
  background: var(--color-claret);
  color: var(--color-white);
}
.chip.is-active:hover {
  background: var(--color-claret-hover, var(--color-claret));
  color: var(--color-white);
}

/* Search page layout additions (LYC-241) */
.page-search__filters {
  margin: var(--space-4) 0 var(--space-10);
}
.page-search__authors {
  margin-top: var(--space-16);
}
.page-search__authors .section-head {
  margin-bottom: var(--space-8);
}

/* ==========================================================================
   Branded empty + no-results states (LYC-720)
   --------------------------------------------------------------------------
   Replaces the spartan H1+prompt that shipped under LYC-167. Adds an
   Archivo Narrow eyebrow row + Claret 3px accent rule above the serif
   headline so both states feel like first-class editorial surfaces rather
   than fallback templates.
   ========================================================================== */
.page-search__empty {
  margin: var(--space-12) 0 var(--space-16);
  max-width: 720px;
}

.page-search__empty .page-search__eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-shuttle-gray);
  margin-bottom: var(--space-3);
}

/* Claret accent rule sits between the eyebrow and the serif headline. The
   ::before pseudo keeps the markup clean (no extra <hr>). */
.page-search__empty .page-search__heading {
  position: relative;
  padding-top: var(--space-3);
  margin-bottom: var(--space-4);
}
.page-search__empty .page-search__heading::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-claret);
  margin-bottom: var(--space-4);
}

.page-search__empty .page-search__prompt {
  color: var(--color-shuttle-gray);
  margin: 0 0 var(--space-6);
  max-width: 60ch;
}

/* When chips render under the no-results state, give them a little breathing
   room above and let them wrap on narrow viewports (chip-row handles horiz
   scroll fallback at the global level). */
.page-search__empty .page-search__chips {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ==========================================================================
   Mobile responsive : Header height + Subscribe form density (hotfix 2026-04-15)
   User report: "On mobile view the header is too tall and the subscribe text
   boxes are too tall."
   ========================================================================== */
@media (max-width: 1023px) {
  /* Tighten the header to a single compact row on mobile/tablet */
  .site-header .header-inner {
    min-height: 56px;
    padding-block: var(--space-2);
    gap: var(--space-3);
  }
  .site-header__mark {
    gap: var(--space-2);
  }
  .site-header__mark .lyceum-symbol {
    width: 28px;
    height: 24px;
  }
  .site-header__mark .lyceum-wordmark {
    height: 16px;
    max-width: 140px;
  }
  .site-header__mark-tagline {
    display: none;
  }
  .header-search-btn,
  .header-menu-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 640px) {
  /* Even tighter on phones */
  .site-header .header-inner {
    min-height: 52px;
  }
  .site-header__mark .lyceum-symbol {
    width: 24px;
    height: 20px;
  }
  .site-header__mark .lyceum-wordmark {
    height: 14px;
    max-width: 120px;
  }
}

/* Subscribe form density on mobile : shorter, softer to match viewport */
@media (max-width: 767px) {
  .subscribe-form {
    gap: var(--space-2);
  }
  .subscribe-form input[type="email"] {
    font-size: 16px;        /* prevents iOS zoom-on-focus */
    padding: 10px 12px;
    min-height: 44px;       /* down from 52px */
  }
  .subscribe-form button,
  .subscribe-form button[type="submit"] {
    min-height: 44px;
    padding-inline: var(--space-5);
  }
}

/* Section-head eyebrow variant (REQ-5 / Pass-2). Used by Latest row,
   Guest/Long-Form split, and other sections with smaller label headings. */
.section-head--eyebrow h2,
.section-head--eyebrow .section-head__title {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.section-head--eyebrow a,
.section-head--eyebrow .section-head__link {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  text-decoration: none;
}
.section-head--eyebrow a:hover,
.section-head--eyebrow .section-head__link:hover {
  color: var(--color-accent-hover);
}

/* Empty-section CTA (REQ-1 / Pass-2). Shown when a section has zero posts
   and the soft-cta variant is used. */
.empty-section-cta {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--color-text-muted);
}
.empty-section-cta .btn {
  margin-top: var(--space-4);
}


/* ==========================================================================
   WPForms theme integration (LYC-686 — second pass)

   First pass used .wpforms-form selectors that tied with WPForms's own at
   (0,2,1) and lost on cascade order. Second pass uses two layers:

   1. WPForms's published CSS-variable theming API on .wpforms-container-full.
      Their Modern renderer reads these vars for color, radius, border, focus.
      Setting them once cascades through every form on the site.

   2. Higher-specificity selectors (`.wpforms-container-full ...`) for
      font-family + size, since WPForms exposes no var for typography.

   Reference (WPForms public docs):
     --wpforms-field-*           input/textarea
     --wpforms-label-*           field labels
     --wpforms-label-error-*     validation
     --wpforms-button-*          submit button
   ========================================================================== */

.lyceum-subscribe-form-wrap {
  max-width: 480px;
  margin: var(--space-6, 24px) auto 0;
  text-align: left;
}

.lyceum-subscribe-form-wrap .wpforms-container,
.lyceum-subscribe-form-wrap .wpforms-container-full {
  margin: 0;
  padding: 0;
}

/* ---- Variable-driven theming ---- */
.wpforms-container-full,
.wpforms-container.wpforms-container-full {
  /* fields */
  --wpforms-field-border-radius: 0;
  --wpforms-field-background-color: var(--color-page-bg);
  --wpforms-field-border-color: var(--color-rule-strong, rgba(4, 5, 3, 0.15));
  --wpforms-field-border-size: 1px;
  --wpforms-field-text-color: var(--color-text);
  --wpforms-field-menu-color: var(--color-page-bg);

  /* labels */
  --wpforms-label-color: var(--color-text);
  --wpforms-label-sublabel-color: var(--color-text-muted);
  --wpforms-label-error-color: #b91c1c;

  /* button */
  --wpforms-button-border-radius: var(--btn-radius, 10px);
  --wpforms-button-background-color: var(--color-claret);
  --wpforms-button-text-color: var(--color-quarter-white);
  --wpforms-button-border-color: var(--color-claret);
  --wpforms-button-border-size: 0;

  /* page */
  --wpforms-page-break-color: var(--color-claret);
  --wpforms-page-break-color-alt: var(--color-page-bg);
}

/* ---- Typography (no var exposed by WPForms — use specificity).
   `.wpforms-container-full` selectors win against the plugin's own (0,2,1)
   selectors AND its !important font-family declarations. */
.wpforms-container-full .wpforms-form input[type="text"],
.wpforms-container-full .wpforms-form input[type="email"],
.wpforms-container-full .wpforms-form input[type="url"],
.wpforms-container-full .wpforms-form input[type="tel"],
.wpforms-container-full .wpforms-form input[type="number"],
.wpforms-container-full .wpforms-form textarea,
.wpforms-container-full .wpforms-form select {
  font-family: var(--font-body-serif) !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  height: 48px;
  padding: 0 var(--space-4, 16px);
  -webkit-appearance: none;
  appearance: none;
}

.wpforms-container-full .wpforms-form textarea {
  height: auto;
  min-height: 120px;
  padding: var(--space-3, 12px) var(--space-4, 16px);
}

.wpforms-container-full .wpforms-form .wpforms-field-label,
.wpforms-container-full .wpforms-form label {
  font-family: var(--font-ui) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2, 8px);
}

.wpforms-container-full .wpforms-form .wpforms-field-sublabel,
.wpforms-container-full .wpforms-form .wpforms-field-description {
  font-family: var(--font-ui) !important;
  font-size: 12px !important;
}

.wpforms-container-full .wpforms-form button.wpforms-submit,
.wpforms-container-full .wpforms-form input.wpforms-submit,
.wpforms-container-full .wpforms-form button[type="submit"],
.wpforms-container-full .wpforms-form input[type="submit"],
.wpforms-container-full .wpforms-form .wpforms-submit-container button,
.wpforms-container-full .wpforms-form .wpforms-submit-container input[type="submit"] {
  font-family: var(--font-ui) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  height: var(--btn-height, 44px) !important;
  min-height: var(--btn-height, 44px) !important;
  min-width: 160px;
  padding: 0 var(--space-6, 24px) !important;
  line-height: 1 !important;
  text-decoration: none;
  cursor: pointer;
}

.wpforms-container-full .wpforms-form button.wpforms-submit:hover,
.wpforms-container-full .wpforms-form input.wpforms-submit:hover,
.wpforms-container-full .wpforms-form button[type="submit"]:hover,
.wpforms-container-full .wpforms-form input[type="submit"]:hover {
  background-color: var(--color-claret-hover, #6A0E2F) !important;
  border-color: var(--color-claret-hover, #6A0E2F) !important;
  color: var(--color-quarter-white) !important;
  opacity: 1 !important;
}

.wpforms-container-full .wpforms-form button.wpforms-submit:focus-visible,
.wpforms-container-full .wpforms-form input.wpforms-submit:focus-visible,
.wpforms-container-full .wpforms-form button[type="submit"]:focus-visible,
.wpforms-container-full .wpforms-form input[type="submit"]:focus-visible {
  outline: 2px solid var(--color-quarter-white) !important;
  outline-offset: 3px !important;
}

/* Confirmation message after a successful submit. */
.wpforms-confirmation-container,
.wpforms-confirmation-container-full {
  background: var(--color-surface-warm) !important;
  border: 1px solid var(--color-rule) !important;
  border-radius: 0 !important;
  padding: var(--space-4, 16px) var(--space-6, 24px) !important;
  font-family: var(--font-body-serif) !important;
  font-size: 16px !important;
  color: var(--color-text) !important;
}

/* Mobile stack. */
@media (max-width: 640px) {
  .lyceum-subscribe-form-wrap {
    max-width: 100%;
  }
  .wpforms-container-full .wpforms-form button.wpforms-submit,
  .wpforms-container-full .wpforms-form input.wpforms-submit,
  .wpforms-container-full .wpforms-form button[type="submit"],
  .wpforms-container-full .wpforms-form input[type="submit"] {
    width: 100% !important;
  }
}
/* ===== END WPForms theme integration ===== */


/* ==========================================================================
   Reel 5-up Strip (LYC-725 / Upgrade-4 Wave 3)

   Surface 4 from factory-ux-designer.md. 5-up portrait grid below the
   editorial lead; collapses to 3-up tablet (cards 4 + 5 hidden) and to a
   horizontal scroll-snap row on mobile (all 5 cards present, peek of the
   next card).

   Token-only styling. The two non-tokenized constants (--reel-card-radius
   8px, --reel-overlay-dark rgba scrim) are scoped to this section as
   local CSS custom properties so they do not leak into the global token
   namespace. 8px matches the spec's `radius-md` ask; --color-overlay-dark
   already provides a 70% black scrim but the title overlay needs an 82%
   gradient stop, hence the locally-scoped scrim primitive.

   Voice rule: zero em dashes.
   ========================================================================== */
.reel-strip {
  /* Section-scoped primitives. Kept local until a global --radius-md /
     --color-overlay-strong token lands in _tokens.css. */
  --reel-card-radius: 8px;
  --reel-card-radius-sm: 4px;
  --reel-overlay-bottom: rgba(4, 5, 3, 0.82);
  --reel-overlay-mid: rgba(4, 5, 3, 0.0);
  --reel-chip-bg: rgba(4, 5, 3, 0.72);
  --reel-play-bg: rgba(255, 255, 255, 0.92);

  margin-block: var(--space-12);
  padding-inline: var(--gutter);
  max-width: var(--container-max);
}

.reel-strip__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.reel-strip__head-text {
  min-width: 0;
  flex: 1 1 auto;
}

.reel-strip__eyebrow {
  font-family: var(--font-eyebrow, sans-serif);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-claret);
  margin: 0 0 var(--space-2);
}

.reel-strip__title {
  font-family: var(--font-display, serif);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  line-height: var(--leading-tight);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}

.reel-strip__dek {
  font-family: var(--font-body-serif, serif);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 62ch;
}

.reel-strip__all {
  font-family: var(--font-eyebrow, sans-serif);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-claret);
  text-decoration: none;
  white-space: nowrap;
  align-self: flex-end;
  flex: 0 0 auto;
}

.reel-strip__all:hover,
.reel-strip__all:focus-visible {
  color: var(--color-claret-hover);
  text-decoration: underline;
}

.reel-strip__all:focus-visible {
  outline: var(--rule-thick) solid var(--color-claret);
  outline-offset: 3px;
}

/* The bottom "All Reels" surfaces on mobile only; hidden on desktop /
   tablet where the top-right CTA already serves the role. */
.reel-strip__all--bottom {
  display: none;
}

/* ---- Grid ---- */
.reel-strip__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

/* Safari: list-style none drops the implicit list role; role="list" on the
   markup re-attaches it, and this rule defends against any margin/padding
   reset cascades from typography.css. */
.reel-strip__card {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* ---- Card ---- */
.reel-strip__card-link {
  position: relative;
  display: block;
  border-radius: var(--reel-card-radius);
  text-decoration: none;
  color: var(--color-white);
  background: var(--color-text); /* fallback while poster loads */
  isolation: isolate; /* keeps the focus ring above the card chrome */
}

.reel-strip__card-link:focus-visible {
  /* Outline draws outside the card's border-box without being clipped by
     .reel-strip__media's overflow: hidden, so we keep the focus indicator
     on the anchor itself. */
  outline: var(--rule-thick) solid var(--color-claret);
  outline-offset: 3px;
}

.reel-strip__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--reel-card-radius);
  overflow: hidden;
  background: var(--color-surface-warm);
}

.reel-strip__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease-out, filter 280ms ease-out;
  display: block;
}

.reel-strip__poster--missing {
  background: var(--color-surface-warm);
}

.reel-strip__card-link:hover .reel-strip__poster,
.reel-strip__card-link:focus-visible .reel-strip__poster {
  transform: scale(1.04);
  filter: brightness(0.92);
}

/* ---- Overlays: duration chip ---- */
.reel-strip__duration {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 2;
  padding: var(--space-1) var(--space-2);
  background: var(--reel-chip-bg);
  color: var(--color-white);
  font-family: var(--font-eyebrow, sans-serif);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ---- Overlays: editors' pick badge ---- */
.reel-strip__badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 2;
  padding: var(--space-1) var(--space-2);
  background: var(--color-claret);
  color: var(--color-white);
  font-family: var(--font-eyebrow, sans-serif);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--reel-card-radius-sm);
}

/* ---- Overlays: title overlay (bottom gradient) ---- */
.reel-strip__title-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: var(--space-3);
  background: linear-gradient(
    to top,
    var(--reel-overlay-bottom) 0%,
    var(--reel-overlay-mid) 100%
  );
  pointer-events: none;
}

.reel-strip__card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-white);
  font-family: var(--font-body-serif, serif);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
}

/* ---- Overlays: play affordance ---- */
.reel-strip__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  margin-left: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--reel-play-bg);
  color: var(--color-black);
  border-radius: 50%;
  transition: background 200ms ease-out, color 200ms ease-out, transform 200ms ease-out;
  pointer-events: none;
}

.reel-strip__card-link:hover .reel-strip__play,
.reel-strip__card-link:focus-visible .reel-strip__play {
  background: var(--color-claret);
  color: var(--color-white);
  transform: scale(1.08);
}

/* Center the SVG triangle visually inside the circle by nudging it 2px
   right; the geometric center of a triangle is to the left of its
   bounding box midpoint. */
.reel-strip__play svg {
  margin-left: 2px;
}

/* ---- Responsive: tablet 641-1023px ---- */
@media (max-width: 1023px) {
  .reel-strip__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }
  /* Hide cards 4 + 5 so "All Reels" picks up the rest. */
  .reel-strip__card:nth-child(n+4) {
    display: none;
  }
}

/* ---- Responsive: mobile <= 640px ---- */
@media (max-width: 640px) {
  .reel-strip {
    /* Mobile breaks out of the gutter so the snap row reaches the screen
       edges; the inner cards reinstate left padding via scroll-padding. */
    padding-inline: 0;
  }

  .reel-strip__head {
    flex-direction: column;
    align-items: stretch;
    padding-inline: var(--gutter);
  }

  .reel-strip__all--top {
    display: none;
  }

  .reel-strip__grid {
    display: flex;
    grid-template-columns: none;
    gap: var(--space-3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    padding-inline: var(--gutter);
    padding-bottom: var(--space-3);
    -webkit-overflow-scrolling: touch;
  }

  /* Restore visibility for cards 4 + 5 on mobile (overrides the tablet
     :nth-child(n+4) hide above). */
  .reel-strip__card,
  .reel-strip__card:nth-child(n+4) {
    display: block;
    flex: 0 0 64%;
    scroll-snap-align: start;
  }

  .reel-strip__all--bottom {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-4) var(--gutter) 0;
    padding: var(--space-3) var(--space-4);
    border: var(--rule-width) solid var(--color-claret);
    border-radius: var(--reel-card-radius-sm);
    text-align: center;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .reel-strip__poster,
  .reel-strip__card-link:hover .reel-strip__poster,
  .reel-strip__card-link:focus-visible .reel-strip__poster,
  .reel-strip__play,
  .reel-strip__card-link:hover .reel-strip__play,
  .reel-strip__card-link:focus-visible .reel-strip__play {
    transition: none;
    transform: none;
    filter: none;
  }
}
/* ===== END Reel 5-up Strip ===== */
