/* ============================================================================
   PaperMag Pro — UX Overhaul v2.0
   Layer-2 component stylesheet. Loaded AFTER design-tokens.css and the legacy
   polish files. Uses var(--pm-*) tokens only — no hardcoded hex.

   Contents (updated as phases land):
     - Phase 3: Editorial hero (this block)
     - Phase 4: Card system (added later)
     - Phase 5: Header & navigation (added later)
     - Phase 6+: Dark mode, reading, mobile, a11y (added later)
   ============================================================================ */


/* ============================================================================
   TKN-10 POLISH (2026-04-14) — user-reported fixes
   ----------------------------------------------------------------------------
   1. Hide legacy .pm-topbar (redundant with TKN-2 ticker + TKN-8 footer)
   2. Shrink hero title max-size so it fits the 5/12-fr desktop column
   3. Compress mobile hero padding (less dark void below image)
   4. Header menu pixel alignment (align-items + gap)
   5. Cap mobile hero title to 26px so the whole hero fits above-the-fold
   6. Article page: constrain content width on mobile, neutralize dark void
   7. Category archive: single-column grid at <=480, 2-col at 768, 3-col at 1024
   8. Cat-pills count hidden on mobile (clutter)
   ============================================================================ */

/* 1. Kill legacy topbar — duplicate of TKN-2 ticker + TKN-8 footer socials.
   apple-quality.css line 113 has `.pm-topbar { display: flex !important }`
   loading AFTER us with same specificity. Bump specificity with `body` prefix
   so we win regardless of source order. */
body .pm-topbar,
body > .pm-topbar,
body div.pm-topbar {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
  overflow: hidden !important;
}

/* 2 + 5. Hero title responsive resize — max 56px desktop, 26px tiny mobile. */
.pm-hero--editorial .pm-hero__title {
  font-size: clamp(1.625rem, 1.1rem + 2.2vw, 3.5rem) !important;
  line-height: 1.08 !important;
  hyphens: none !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}
@media (max-width: 480px) {
  .pm-hero--editorial .pm-hero__title {
    font-size: clamp(1.5rem, 1.1rem + 1.5vw, 1.75rem) !important;
  }
}

/* 3. Mobile hero — compress padding, tighten gap. */
@media (max-width: 1023px) {
  .pm-hero--editorial {
    padding: var(--pm-space-5) 0 var(--pm-space-8) !important;
  }
  .pm-hero__content {
    gap: var(--pm-space-3) !important;
    padding: 0 var(--pm-space-5) !important;
  }
  .pm-hero__dek {
    font-size: var(--pm-text-base) !important;
    margin: 0 !important;
  }
  .pm-hero__byline {
    padding-top: var(--pm-space-3) !important;
    margin-top: var(--pm-space-2) !important;
  }
}

/* 4. Header menu pixel alignment — ensure icon/logo/nav baseline. */
.pm-header__inner {
  align-items: center !important;
  gap: var(--pm-space-4) !important;
}
.pm-header__brand {
  display: flex !important;
  align-items: center !important;
  gap: var(--pm-space-2) !important;
  min-width: 0 !important;
}
.pm-header__brand a,
.pm-header__brand .pm-logo__link {
  display: inline-flex !important;
  align-items: center !important;
  font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem) !important;
  font-weight: 800 !important;
  font-family: var(--font-heading) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.pm-header__actions {
  display: flex !important;
  align-items: center !important;
  gap: var(--pm-space-2) !important;
}
.pm-header__actions button,
.pm-header__actions a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Hamburger / mobile drawer toggle — visible at <=1024 only. */
@media (max-width: 1023px) {
  #pm-header nav,
  .pm-header__nav { display: none !important; }
}
@media (min-width: 1024px) {
  .pm-hamburger,
  .pm-mobile-toggle,
  [data-toggle="drawer"] { display: none !important; }
}

/* Hide the letter-avatar SVG that appears in header "o" glyph position. */
.pm-header__actions .avatar,
.pm-header__actions .rsoc-letter-avatar {
  display: none !important;
}

/* Theme-level dark toggle (.pm-dark-toggle with tiny "o" dot indicator) is
   redundant with the platform-level .rsoc-dm-toggle from rsoc-theme-shared
   mu-plugin. Hide the theme one so there's a single canonical toggle. */
.pm-dark-toggle,
#pm-header .pm-dark-toggle,
.pm-header__actions .pm-dark-toggle {
  display: none !important;
}

/* 6. Article page mobile polish — ensure content is readable + cookie bar
   doesn't cover the whole screen. */
.pm-article,
.single-post .pm-article {
  background: var(--pm-color-bg) !important;
  color: var(--pm-color-text) !important;
}
.pm-article .entry-content {
  padding: 0 var(--pm-space-4);
}
@media (max-width: 640px) {
  .pm-article .entry-content {
    padding: 0 var(--pm-space-4);
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
  .pm-article .entry-content > p:first-of-type::first-letter {
    font-size: 3.25em !important;
    line-height: 0.9 !important;
  }
  .pm-article h2 { font-size: 1.5rem !important; margin-top: var(--pm-space-6) !important; }
  .pm-article h3 { font-size: 1.25rem !important; margin-top: var(--pm-space-5) !important; }
}

/* Single-post breadcrumbs — tighten on mobile. */
@media (max-width: 640px) {
  .pm-breadcrumbs, .pm-article__breadcrumbs {
    font-size: 12px;
    padding: var(--pm-space-2) var(--pm-space-4) !important;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }
}

/* Make the cookie-consent bar thinner on mobile so it doesn't eat the viewport.
   Real selector is .rsoc-consent (not .rsoc-cookie-consent). */
.rsoc-consent,
#rsoc-cookie-consent {
  padding: var(--pm-space-4) !important;
}
.rsoc-consent__inner {
  gap: var(--pm-space-3) !important;
}
@media (max-width: 640px) {
  .rsoc-consent,
  #rsoc-cookie-consent {
    padding: var(--pm-space-3) var(--pm-space-4) !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    max-height: 45vh !important;
    overflow-y: auto !important;
  }
  .rsoc-consent__inner {
    gap: var(--pm-space-2) !important;
  }
  .rsoc-consent button {
    padding: 8px 14px !important;
    font-size: 13px !important;
    min-height: 36px !important;
  }
  .rsoc-consent p,
  .rsoc-consent__text {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
}

/* 7. Category archive grid — responsive from 1-col mobile to 3-col desktop. */
.category .pm-main .pm-archive__grid,
.archive .pm-main .pm-archive__grid,
.pm-archive__grid,
.pm-category__grid,
.pm-top-stories__grid {
  display: grid !important;
  gap: var(--pm-space-6) !important;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1023px) {
  .category .pm-main .pm-archive__grid,
  .archive .pm-main .pm-archive__grid,
  .pm-archive__grid,
  .pm-category__grid,
  .pm-top-stories__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 640px) {
  .category .pm-main .pm-archive__grid,
  .archive .pm-main .pm-archive__grid,
  .pm-archive__grid,
  .pm-category__grid,
  .pm-top-stories__grid {
    grid-template-columns: 1fr !important;
    gap: var(--pm-space-5) !important;
  }
}

/* Category page header — pixel-perfect title alignment. */
.category .pm-archive__header,
.archive .pm-archive__header,
.pm-category-header {
  padding: var(--pm-space-8) var(--pm-space-5) var(--pm-space-6);
  text-align: center;
  border-bottom: 1px solid var(--pm-color-border);
  margin-bottom: var(--pm-space-8);
}
.category .pm-archive__title,
.archive .pm-archive__title {
  font-family: var(--font-heading) !important;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 var(--pm-space-2) !important;
}

/* 8. Cat-pills count hidden on small mobile (clutter). */
@media (max-width: 480px) {
  .pm-cat-pills__count { display: none !important; }
  .pm-cat-pills__link { padding: 6px 12px !important; font-size: 12px !important; }
  .pm-cat-pills { padding: var(--pm-space-4) 0 var(--pm-space-3) !important; }
}

/* Prevent horizontal scroll anywhere */
html, body { overflow-x: hidden !important; }

/* Ensure all images scale within their parents */
img { max-width: 100%; height: auto; }

/* CRITICAL: Hero section bg + title color must match theme.
   Legacy papermag-pro.css forces hero bg to near-black regardless of theme.
   In light mode that combines with dark title text → invisible.
   Force hero section to use token-driven bg, so light-mode = white bg + dark
   text, dark-mode (user-toggled) = dark bg + light text via existing overrides. */
.pm-hero--editorial {
  background: var(--pm-color-bg) !important;
  color: var(--pm-color-text) !important;
}
.pm-hero--editorial .pm-hero__title,
.pm-hero--editorial .pm-hero__title a {
  color: var(--pm-color-text) !important;
}
.pm-hero--editorial .pm-hero__dek {
  color: var(--pm-color-text-muted) !important;
}
.pm-hero--editorial .pm-hero__author {
  color: var(--pm-color-text) !important;
}
.pm-hero--editorial .pm-hero__meta,
.pm-hero--editorial .pm-hero__meta time {
  color: var(--pm-color-text-subtle) !important;
}

/* Same rescue for card titles in light mode — legacy final-polish.css has
   [data-theme="dark"] rules but no [data-theme="light"] default, so light
   cards can end up with dark bg + dark text if legacy rules pinned the bg. */
[data-theme="light"] .pm-card--standard,
.pm-card--standard {
  background: var(--pm-color-surface) !important;
  color: var(--pm-color-text) !important;
}
[data-theme="light"] .pm-card__title a,
.pm-card__title a {
  color: var(--pm-color-text) !important;
}
[data-theme="light"] .pm-card__excerpt,
.pm-card__excerpt {
  color: var(--pm-color-text-muted) !important;
}

/* Body default text color in light mode. */
[data-theme="light"] body,
body {
  background: var(--pm-color-bg) !important;
  color: var(--pm-color-text) !important;
}

/* ============================================================================
   TKN-11 HERO — FULL-WIDTH SIDE-BY-SIDE (2026-04-14, revised)
   Text LEFT, image RIGHT. Uses full viewport width (no narrow container).
   Vertically centered. Title left-aligned with comfortable measure.
   ============================================================================ */

/* Section: full width, normal padding (not container-constrained).
   IMPORTANT: legacy CSS sets display:grid on the section itself, which
   constrains the inner .pm-container.pm-hero__grid to a single grid track
   (~817px). Force display:block so the inner grid fills the section. */
.pm-hero--editorial {
  display: block !important;
  padding: var(--pm-space-10) var(--pm-space-8) !important;
  background: var(--pm-color-bg) !important;
  width: 100% !important;
  max-width: none !important;
}

/* Grid: side-by-side, NOT center-stacked. Text 1fr / image 1fr at desktop;
   widens text column slightly at very large viewports. */
.pm-hero--editorial .pm-hero__grid,
.pm-hero--editorial > .pm-hero__grid,
.pm-hero--editorial > .pm-container.pm-hero__grid,
.pm-hero--editorial > .pm-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: var(--pm-space-8) !important;
  align-items: center !important;
  justify-items: stretch !important;
}

@media (min-width: 1024px) {
  .pm-hero--editorial .pm-hero__grid,
  .pm-hero--editorial > .pm-hero__grid,
  .pm-hero--editorial > .pm-container.pm-hero__grid,
  .pm-hero--editorial > .pm-container {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--pm-space-12) !important;
  }
}

/* Content column: LEFT-aligned, vertically centered. */
.pm-hero--editorial .pm-hero__content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  max-width: none !important;
  width: 100% !important;
  gap: var(--pm-space-4) !important;
  margin: 0 !important;
}

/* Title: left-aligned, no clamp, no ellipsis. */
.pm-hero--editorial .pm-hero__title,
.pm-hero--editorial .pm-hero__title a {
  display: block !important;
  text-align: left !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  max-width: none !important;
  margin: 0 !important;
}

@media (min-width: 1024px) {
  .pm-hero--editorial .pm-hero__title {
    font-size: clamp(2.25rem, 1.6rem + 1.6vw, 3.5rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.025em !important;
  }
}

/* Dek: left-aligned, comfortable measure. */
.pm-hero--editorial .pm-hero__dek {
  max-width: 60ch !important;
  text-align: left !important;
  margin: 0 !important;
}

/* Byline: left-aligned, no centered overrides. */
.pm-hero--editorial .pm-hero__byline {
  justify-content: flex-start !important;
  padding-top: var(--pm-space-3) !important;
  margin-top: var(--pm-space-2) !important;
  border-top: 1px solid var(--pm-color-border) !important;
  width: 100% !important;
  max-width: 60ch !important;
}

/* Badge: left-aligned, no centering. */
.pm-hero--editorial .pm-badge--category {
  margin: 0 !important;
}

/* Media column: full-fluid right side. */
.pm-hero--editorial .pm-hero__media {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
.pm-hero--editorial .pm-hero__media-frame {
  aspect-ratio: 3 / 2 !important;
  border-radius: var(--pm-radius-lg) !important;
  width: 100% !important;
  max-width: none !important;
}

/* Mobile: single column, image on top. */
@media (max-width: 1023px) {
  .pm-hero--editorial { padding: var(--pm-space-5) var(--pm-space-4) var(--pm-space-8) !important; }
  .pm-hero--editorial .pm-hero__media { order: -1 !important; }
  .pm-hero--editorial .pm-hero__media-frame { aspect-ratio: 16 / 10 !important; border-radius: var(--pm-radius-md) !important; }
}


/* ============================================================================
   TKN-9 HOTFIX — Forced overrides beating the legacy !important stack.
   ----------------------------------------------------------------------------
   papermag-pro.css, polish.css, and especially apple-quality.css use
   !important liberally on body, ticker, and hero selectors. Without these
   counter-!important rules, TKN-0/1/2 lose the cascade and the whole design
   regresses to Times font, stacked ticker, and shrunken hero image.
   These are surgical — only the minimum needed for the design to land.
   ============================================================================ */

body,
body input, body button, body select, body textarea {
  font-family: var(--font-ui) !important;
}

.pm-article,
.pm-article p,
.pm-hero__dek {
  font-family: var(--font-body) !important;
}

.pm-hero__title,
.pm-hero--editorial .pm-hero__title,
.pm-card__title,
h1, h2, h3, h4 {
  font-family: var(--font-heading) !important;
}

/* Ticker must be horizontal flex, one row, marqueeing. */
.pm-ticker__track { display: flex !important; overflow: hidden !important; min-width: 0 !important; flex: 1 !important; }
.pm-ticker__list {
  display: flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  animation: pm-ticker-scroll 45s linear infinite !important;
}
.pm-ticker__item { display: inline-flex !important; flex-shrink: 0 !important; }
.pm-ticker { height: 36px !important; }
.pm-ticker__container { height: 36px !important; }

/* Hero frame must fill its grid column. Legacy .pm-hero__image had fixed
   width/height — wrapping in __media-frame restores fluid width. */
.pm-hero__media { width: 100% !important; min-width: 0 !important; }
.pm-hero__media-frame {
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: 3 / 2 !important;
}
.pm-hero__media-frame .pm-hero__image {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
}


/* ============================================================================
   TKN-0 FOUNDATION — Typography cascade fix + legacy cleanup (2026-04-13)

   Purpose: Ensure font stack consistency across all PaperMag Pro components
   by establishing canonical aliases for heading/body/UI/mono fonts. Prevents
   the "Times New Roman" fallback issue seen in apple-quality.css from bleeding
   into component typography. Idempotent—safe to re-declare even if
   design-tokens.css already has correct values.

   What this fixes:
   - Badge/meta/byline text now inherits --pm-font-ui (not serif fallback)
   - Article dek/body text now explicitly uses --pm-font-body (editorial serif)
   - Header nav links use consistent --pm-font-ui (sans-serif, crisp at small sizes)
   - Legacy .pm-search-toggle hidden (duped by new search overlay component)

   Dependencies:
   - Assumes design-tokens.css has defined --pm-font-{heading,body,ui,mono}
   - Layer-1 (design-tokens.css) provides safe fallback chains
   - Layer-2 (this file) enforces semantic use via BEM class selectors
   ============================================================================ */

:root {
  --font-heading: var(--pm-font-heading, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  --font-body:    var(--pm-font-body, "Crimson Pro", Georgia, "Times New Roman", serif);
  --font-ui:      var(--pm-font-ui, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  --font-mono:    var(--pm-font-mono, "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

body,
input, button, select, textarea {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "calt";
}

#pm-header,
.pm-header,
#pm-header nav,
#pm-header nav a,
.pm-header__nav,
.pm-header__nav a,
.pm-header__actions,
.pm-header__actions * {
  font-family: var(--font-ui);
}

#pm-header nav a {
  font-size: var(--pm-text-sm);
  font-weight: 500;
  letter-spacing: 0;
}

.pm-badge,
.pm-badge--category,
.pm-card__cat,
.pm-card__meta,
.pm-card__author,
.pm-card__read-time,
.pm-hero__meta,
.pm-hero__author,
.pm-hero__byline-text {
  font-family: var(--font-ui);
}

.pm-article,
.pm-article p,
.pm-hero__dek {
  font-family: var(--font-body);
}

#pm-search-toggle,
.pm-header__search-toggle {
  display: none !important;
}


/* ============================================================================
   Hero — Editorial layout: 7-column text / 5-column image on desktop,
   stacked vertically on mobile. No slider, single post, typographic.
   ============================================================================ */

.pm-hero--editorial {
  padding: var(--pm-space-16) 0 var(--pm-space-20);
  background: var(--pm-color-bg);
  border-bottom: 1px solid var(--pm-color-border);
}

.pm-hero__grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--pm-space-12);
  align-items: center;
}

.pm-hero__content { display: flex; flex-direction: column; gap: var(--pm-space-5); }

.pm-hero__title {
  font-family: var(--pm-font-heading);
  font-size: var(--pm-text-hero);
  font-weight: 800;
  line-height: var(--pm-leading-tight);
  letter-spacing: var(--pm-tracking-tight);
  color: var(--pm-color-text);
  margin: 0;
}

.pm-hero__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--pm-color-primary), var(--pm-color-primary));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--pm-ease-reveal);
}

.pm-hero__title a:hover { background-size: 100% 2px; }

.pm-hero__dek {
  font-family: var(--pm-font-body);
  font-size: var(--pm-text-xl);
  line-height: var(--pm-leading-snug);
  color: var(--pm-color-text-muted);
  max-width: 58ch;
  margin: 0;
}

.pm-hero__byline {
  display: flex;
  align-items: center;
  gap: var(--pm-space-3);
  margin-top: var(--pm-space-4);
}

.pm-hero__byline-text { display: flex; flex-direction: column; line-height: 1.3; }

.pm-hero__author {
  font-family: var(--pm-font-ui);
  font-size: var(--pm-text-sm);
  font-weight: 600;
  color: var(--pm-color-text);
}

.pm-hero__meta {
  font-family: var(--pm-font-ui);
  font-size: var(--pm-text-xs);
  color: var(--pm-color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--pm-space-2);
}

.pm-hero__media { position: relative; }

.pm-hero__image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--pm-radius-lg);
  box-shadow: var(--pm-shadow-lg);
}

.pm-hero__image--placeholder {
  background: linear-gradient(135deg, var(--pm-indigo-900) 0%, var(--pm-indigo-600) 60%, var(--pm-cyan-500) 100%);
}

.pm-badge--category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid var(--pm-indigo-100);
  background: var(--pm-indigo-50);
  border-radius: var(--pm-radius-full);
  color: var(--pm-color-primary);
  text-decoration: none;
  transition: background var(--pm-ease), color var(--pm-ease);
}

.pm-badge--category:hover {
  background: var(--pm-color-primary);
  color: #fff;
}

/* Mobile: stack image → content, reduce hero padding */
@media (max-width: 768px) {
  .pm-hero--editorial { padding: var(--pm-space-8) 0 var(--pm-space-10); }
  .pm-hero__grid {
    grid-template-columns: 1fr;
    gap: var(--pm-space-6);
  }
  .pm-hero__media { order: -1; }
  .pm-hero__image { aspect-ratio: 16 / 10; border-radius: var(--pm-radius-md); }
  .pm-hero__title { font-size: clamp(1.875rem, 1.5rem + 2vw, 2.5rem); }
  .pm-hero__dek { font-size: var(--pm-text-lg); }
}


/* ============================================================================
   Cards — Standard variant with image, category chip, title, excerpt, meta
   Used by template-parts/card-standard.php across Top Stories, Discover Grid,
   and other listing contexts.
   ============================================================================ */

.pm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--pm-space-4);
  background: var(--pm-color-surface);
  border-radius: var(--pm-radius-md);
  overflow: hidden;
  transition: transform var(--pm-ease-spring), box-shadow var(--pm-ease);
  will-change: transform;
}

.pm-card:hover { transform: translateY(-4px); box-shadow: var(--pm-shadow-hover); }

.pm-card__image-link {
  display: block;
  overflow: hidden;
  border-radius: var(--pm-radius-md);
  aspect-ratio: 16 / 10;
}

.pm-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--pm-ease-reveal);
}

.pm-card:hover .pm-card__image { transform: scale(1.04); }

.pm-card__image--placeholder {
  background: linear-gradient(135deg, var(--pm-indigo-400), var(--pm-cyan-500));
}

.pm-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--pm-space-2);
  padding: 0 var(--pm-space-1) var(--pm-space-4);
}

.pm-card__cat {
  font-family: var(--pm-font-ui);
  font-size: var(--pm-text-xs);
  font-weight: 600;
  letter-spacing: var(--pm-tracking-wide);
  text-transform: uppercase;
  color: var(--pm-color-primary);
  text-decoration: none;
}

.pm-card__title {
  font-family: var(--pm-font-heading);
  font-size: var(--pm-text-xl);
  font-weight: 700;
  line-height: var(--pm-leading-tight);
  letter-spacing: var(--pm-tracking-tight);
  margin: 0;
}

.pm-card__title a {
  color: var(--pm-color-text);
  text-decoration: none;
  background-image: linear-gradient(var(--pm-color-primary), var(--pm-color-primary));
  background-size: 0 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--pm-ease);
}

.pm-card__title a:hover { background-size: 100% 1.5px; }

.pm-card__excerpt {
  font-family: var(--pm-font-body);
  font-size: var(--pm-text-base);
  line-height: var(--pm-leading-snug);
  color: var(--pm-color-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pm-card__meta {
  font-family: var(--pm-font-ui);
  font-size: var(--pm-text-xs);
  color: var(--pm-color-text-subtle);
  display: flex;
  align-items: center;
  gap: var(--pm-space-2);
  flex-wrap: wrap;
}

.pm-card__author { font-weight: 500; color: var(--pm-color-text-muted); }


/* ============================================================================
   Header — sticky, shrink on scroll, logo swap via [data-theme]
   ============================================================================ */

.pm-header {
  position: sticky;
  top: 0;
  z-index: var(--pm-z-header);
  height: var(--pm-header-height);
  background: var(--pm-color-header-bg);
  border-bottom: 1px solid var(--pm-color-border);
  transition: height var(--pm-ease), box-shadow var(--pm-ease), background var(--pm-ease);
}

.pm-header--scrolled {
  height: var(--pm-header-height-scrolled);
  box-shadow: var(--pm-shadow-sm);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--pm-color-header-bg) 85%, transparent);
}

.pm-header__inner {
  max-width: var(--pm-container);
  margin: 0 auto;
  padding: 0 var(--pm-space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pm-space-6);
}

.pm-header__brand { display: flex; align-items: center; min-width: 0; }

.pm-logo__link,
.pm-logo__link--img {
  display: inline-flex;
  align-items: center;
  gap: var(--pm-space-2);
  font-family: var(--pm-font-heading);
  font-weight: 800;
  font-size: var(--pm-text-xl);
  color: var(--pm-color-text);
  text-decoration: none;
  line-height: 1;
}

.pm-logo__img { display: block; max-height: 36px; width: auto; }
.pm-logo__img--light { display: block; }
.pm-logo__img--dark  { display: none; }

[data-theme="dark"] .pm-logo__img--light { display: none; }
[data-theme="dark"] .pm-logo__img--dark  { display: block; }

/* Search toggle button (in header) with Cmd+K hint on desktop */
.pm-search-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--pm-space-2);
  background: transparent;
  color: var(--pm-color-text);
  border: 1px solid var(--pm-color-border);
  border-radius: var(--pm-radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--pm-font-ui);
  font-size: var(--pm-text-sm);
  transition: background var(--pm-ease), border-color var(--pm-ease);
}
.pm-search-toggle:hover,
.pm-search-toggle:focus-visible {
  background: var(--pm-color-surface-alt);
  border-color: var(--pm-color-border-strong);
}
.pm-search-toggle__icon { flex-shrink: 0; }

.pm-search-toggle::after {
  content: "⌘K";
  font-family: var(--pm-font-mono);
  font-size: 11px;
  color: var(--pm-color-text-subtle);
  margin-left: var(--pm-space-2);
  padding: 2px 6px;
  border: 1px solid var(--pm-color-border);
  border-radius: var(--pm-radius-sm);
  background: var(--pm-color-bg);
}

@media (max-width: 768px) {
  .pm-search-toggle::after { display: none; }
}


/* ============================================================================
   Search overlay — full-viewport modal opened by ⌘K / Ctrl+K or toggle
   ============================================================================ */

.pm-search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--pm-z-overlay);
  background: rgba(24, 24, 27, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--pm-ease);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh var(--pm-space-6) var(--pm-space-6);
}

.pm-search-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.pm-search-overlay__inner {
  width: 100%;
  max-width: 720px;
  background: var(--pm-color-surface);
  border-radius: var(--pm-radius-lg);
  box-shadow: var(--pm-shadow-xl);
  padding: var(--pm-space-4);
  display: flex;
  align-items: center;
  gap: var(--pm-space-3);
  position: relative;
  transform: translateY(-8px);
  transition: transform var(--pm-ease);
}

.pm-search-overlay--open .pm-search-overlay__inner {
  transform: translateY(0);
}

.pm-search-overlay__form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--pm-space-2);
}

.pm-search-overlay__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--pm-font-heading);
  font-size: var(--pm-text-xl);
  font-weight: 500;
  color: var(--pm-color-text);
  padding: var(--pm-space-2) var(--pm-space-3);
  min-width: 0;
}

.pm-search-overlay__input::placeholder {
  color: var(--pm-color-text-subtle);
  font-weight: 400;
}

.pm-search-overlay__submit,
.pm-search-overlay__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--pm-color-text-muted);
  border: 1px solid var(--pm-color-border);
  border-radius: var(--pm-radius-sm);
  cursor: pointer;
  transition: background var(--pm-ease), color var(--pm-ease), border-color var(--pm-ease);
}
.pm-search-overlay__submit:hover,
.pm-search-overlay__close:hover,
.pm-search-overlay__submit:focus-visible,
.pm-search-overlay__close:focus-visible {
  background: var(--pm-color-surface-alt);
  color: var(--pm-color-text);
  border-color: var(--pm-color-border-strong);
}

@media (max-width: 640px) {
  .pm-search-overlay { padding: 6vh var(--pm-space-4) var(--pm-space-4); }
  .pm-search-overlay__inner { padding: var(--pm-space-3); }
  .pm-search-overlay__input { font-size: var(--pm-text-lg); }
}


/* ============================================================================
   TKN-1 HERO CINEMATIC — image dominance, multi-stop scrim, slow Ken Burns.
   Image column grows on wider viewports; frame clips the image for the
   10s scale(1.06) hover animation. Honours prefers-reduced-motion.
   ============================================================================ */

@media (min-width: 1024px) {
  .pm-hero--editorial .pm-hero__grid {
    grid-template-columns: 6fr 6fr;
    gap: var(--pm-space-12);
  }
}
@media (min-width: 1440px) {
  .pm-hero--editorial .pm-hero__grid {
    grid-template-columns: 5fr 7fr;
  }
}

.pm-hero__media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--pm-radius-lg);
  aspect-ratio: 3 / 2;
  box-shadow: var(--pm-shadow-xl);
  isolation: isolate;
}

.pm-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 10s var(--pm-ease-reveal);
  transform-origin: center center;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pm-hero__media-frame:hover .pm-hero__image {
    transform: scale(1.06);
  }
}

.pm-hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(24,24,27,0)    0%,
      rgba(24,24,27,0)    45%,
      rgba(24,24,27,0.35) 85%,
      rgba(24,24,27,0.55) 100%);
  mix-blend-mode: multiply;
}

.pm-hero .pm-badge--category {
  display: inline-flex;
  align-items: center;
  gap: var(--pm-space-2);
  padding: 6px 12px;
  background: var(--pm-indigo-50);
  color: var(--pm-color-primary);
  border: 1px solid var(--pm-indigo-100);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--pm-ease), color var(--pm-ease), transform var(--pm-ease);
}
.pm-hero .pm-badge--category:hover {
  background: var(--pm-color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.pm-hero--editorial .pm-hero__title {
  font-family: var(--font-heading);
  font-size: var(--pm-text-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: var(--pm-space-5) 0 var(--pm-space-4);
}

.pm-hero__dek {
  font-family: var(--font-body);
  font-size: var(--pm-text-xl);
  line-height: 1.5;
  color: var(--pm-color-text-muted);
  max-width: 58ch;
  margin: 0 0 var(--pm-space-6);
}
.pm-hero__dek::first-line {
  font-style: italic;
  color: var(--pm-color-text);
}

.pm-hero__byline {
  display: flex;
  align-items: center;
  gap: var(--pm-space-3);
  padding-top: var(--pm-space-4);
  border-top: 1px solid var(--pm-color-border);
}
.pm-hero__byline img,
.pm-hero__byline .avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--pm-color-bg), 0 0 0 4px var(--pm-color-primary);
}

@media (max-width: 1023px) {
  .pm-hero--editorial .pm-hero__grid {
    grid-template-columns: 1fr;
    gap: var(--pm-space-6);
  }
  .pm-hero__media { order: -1; }
  .pm-hero__media-frame { aspect-ratio: 16 / 10; border-radius: var(--pm-radius-md); }
  .pm-hero--editorial .pm-hero__title { font-size: clamp(1.875rem, 1.4rem + 2.6vw, 2.75rem); }
}


/* ============================================================================
   TKN-2 TICKER — Full-bleed marquee above the masthead. Pure CSS scroll,
   pause on hover / focus-within. Hidden below 480px.
   ============================================================================ */

.pm-ticker {
  background: var(--pm-zinc-900);
  color: #fff;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 479px) {
  .pm-ticker { display: none; }
}

.pm-ticker__container {
  display: flex;
  align-items: stretch;
  height: 36px;
  max-width: var(--pm-container);
  margin: 0 auto;
  padding: 0 var(--pm-space-6);
  gap: var(--pm-space-4);
}

.pm-ticker__label {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--pm-space-3);
  background: var(--pm-indigo-600);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-left: calc(-1 * var(--pm-space-6));
}

.pm-ticker__track {
  display: flex;
  overflow: hidden;
  min-width: 0;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.pm-ticker__list {
  display: flex;
  align-items: center;
  gap: var(--pm-space-6);
  list-style: none;
  padding: 0;
  margin: 0;
  animation: pm-ticker-scroll 45s linear infinite;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: var(--pm-space-6);
}

.pm-ticker:hover .pm-ticker__list,
.pm-ticker:focus-within .pm-ticker__list {
  animation-play-state: paused;
}

@keyframes pm-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.pm-ticker__item { display: inline-flex; align-items: center; }
.pm-ticker__dot { color: var(--pm-indigo-600); margin-right: var(--pm-space-2); }

.pm-ticker__link {
  color: inherit;
  text-decoration: none;
  transition: color var(--pm-ease);
}
.pm-ticker__link:hover { color: var(--pm-cyan-500); }

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


/* ============================================================================
   TKN-3 CATEGORY PILLS — horizontal scrollable row between hero and grid.
   ============================================================================ */

.pm-cat-pills {
  padding: var(--pm-space-6) 0 var(--pm-space-4);
  border-bottom: 1px solid var(--pm-color-border);
}

.pm-cat-pills__list {
  display: flex;
  gap: var(--pm-space-3);
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.pm-cat-pills__list::-webkit-scrollbar { display: none; }

.pm-cat-pills__link {
  display: inline-flex;
  align-items: center;
  gap: var(--pm-space-2);
  padding: 8px 16px;
  background: var(--pm-color-surface);
  border: 1px solid var(--pm-color-border);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--pm-color-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--pm-ease), color var(--pm-ease), border-color var(--pm-ease), transform var(--pm-ease);
}

.pm-cat-pills__link:hover,
.pm-cat-pills__link:focus-visible {
  background: var(--pm-color-primary);
  border-color: var(--pm-color-primary);
  color: #fff;
  transform: translateY(-1px);
}
.pm-cat-pills__link:hover .pm-cat-pills__count { background: rgba(255,255,255,0.15); color: #fff; }

.pm-cat-pills__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  background: var(--pm-zinc-100);
  color: var(--pm-color-text-muted);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}


/* ============================================================================
   TKN-4 NUMBERED TRENDING — huge outline numeral behind each ranked card.
   Uses data-rank attribute so markup stays semantic.
   ============================================================================ */

.pm-numbered {
  position: relative;
  padding-left: var(--pm-space-8);
}

.pm-numbered::before {
  content: attr(data-rank);
  position: absolute;
  left: -12px;
  top: -24px;
  font-family: var(--font-heading);
  font-size: clamp(92px, 8vw, 180px);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--pm-color-border-strong);
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.pm-numbered > * { position: relative; z-index: 1; }

.pm-numbered:hover::before {
  -webkit-text-stroke: 2px var(--pm-color-primary);
  color: color-mix(in srgb, var(--pm-color-primary) 8%, transparent);
  transition: color var(--pm-ease-reveal), -webkit-text-stroke-color var(--pm-ease-reveal);
}

@media (max-width: 640px) {
  .pm-numbered { padding-left: var(--pm-space-6); }
  .pm-numbered::before { font-size: 72px; top: -12px; }
}


/* ============================================================================
   TKN-5 CARD HOVER — Ken Burns image + gradient-underline title + icon meta.
   Overlays the Phase-4 base card with richer hover interactions.
   ============================================================================ */

.pm-card__image-link {
  position: relative;
  isolation: isolate;
}
.pm-card__image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(24,24,27,0.35));
  opacity: 0;
  transition: opacity var(--pm-ease-reveal);
  pointer-events: none;
  z-index: 1;
}

.pm-card:hover .pm-card__image-link::after { opacity: 1; }
.pm-card:hover .pm-card__image {
  transform: scale(1.06);
  transition-duration: 6s;
}

.pm-card__title a {
  background-image: linear-gradient(90deg, var(--pm-color-primary), var(--pm-cyan-500));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--pm-ease-reveal), color var(--pm-ease);
  padding-bottom: 2px;
}
.pm-card:hover .pm-card__title a { background-size: 100% 2px; }

.pm-card__read-time::before,
.pm-card__meta time::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  background: currentColor;
  vertical-align: -1px;
  mask-repeat: no-repeat; mask-size: contain;
  -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain;
  opacity: 0.6;
}
.pm-card__read-time::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
}
.pm-card__meta time::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}

.pm-card__cat {
  display: inline-block;
  padding: 3px 10px;
  background: var(--pm-indigo-50);
  border: 1px solid var(--pm-indigo-100);
  border-radius: 999px;
  color: var(--pm-color-primary);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: background var(--pm-ease), color var(--pm-ease);
}
.pm-card__cat:hover { background: var(--pm-color-primary); color: #fff; }


/* ============================================================================
   TKN-6 ARTICLE TYPOGRAPHY — editorial body treatment on single posts only.
   Scoped to .pm-article so archive/category excerpts are untouched.
   ============================================================================ */

.pm-article .entry-content,
.pm-article > p {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-body);
  font-size: var(--pm-text-lg);
  line-height: 1.75;
  color: var(--pm-color-text);
}

.pm-article .entry-content p + p { margin-top: var(--pm-space-4); }

.pm-article .entry-content > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 4.5em;
  font-weight: 800;
  line-height: 0.85;
  float: left;
  color: var(--pm-color-primary);
  padding: 0.1em 0.12em 0 0;
  margin-right: 0.05em;
}

.pm-article blockquote {
  position: relative;
  margin: var(--pm-space-8) 0;
  padding: var(--pm-space-5) var(--pm-space-6);
  border-left: 3px solid var(--pm-color-primary);
  background: var(--pm-color-surface-alt);
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--pm-text-xl);
  line-height: 1.5;
  color: var(--pm-color-text);
}
.pm-article blockquote::before {
  content: "\201C";
  position: absolute;
  left: -8px; top: -12px;
  font-family: var(--font-heading);
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  color: var(--pm-color-primary);
  opacity: 0.18;
  pointer-events: none;
}

.pm-article .pm-pullquote {
  float: right;
  clear: right;
  width: min(340px, 40%);
  margin: var(--pm-space-4) 0 var(--pm-space-6) var(--pm-space-6);
  padding: var(--pm-space-5) 0;
  border-top: 2px solid var(--pm-color-primary);
  border-bottom: 2px solid var(--pm-color-primary);
  font-family: var(--font-heading);
  font-size: var(--pm-text-2xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--pm-color-text);
}

.pm-article .entry-content a {
  color: var(--pm-color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--pm-color-primary) 45%, transparent);
  transition: text-decoration-color var(--pm-ease);
}
.pm-article .entry-content a:hover { text-decoration-color: currentColor; }

.pm-article figure figcaption {
  margin-top: var(--pm-space-3);
  font-family: var(--font-ui);
  font-size: 13px;
  font-style: italic;
  color: var(--pm-color-text-muted);
  text-align: center;
}

.pm-article h2 { margin: var(--pm-space-10) 0 var(--pm-space-3); font-size: var(--pm-text-2xl); }
.pm-article h3 { margin: var(--pm-space-8) 0 var(--pm-space-3); font-size: var(--pm-text-xl); }


/* ============================================================================
   TKN-7 READING PROGRESS — 2px bar at viewport top, fills as reader scrolls.
   Only shows on .single-post (JS in header-smart.js creates the element).
   ============================================================================ */

.pm-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--pm-color-primary), var(--pm-cyan-500));
  z-index: calc(var(--pm-z-header) + 1);
  pointer-events: none;
  transition: width 120ms linear, opacity var(--pm-ease);
  opacity: 0;
}
.single-post .pm-progress { opacity: 1; }


/* ============================================================================
   TKN-8 PREMIUM FOOTER — Dark 4-column footer styled onto the existing
   .pm-footer markup (preserves Customizer integration, widget areas, legal
   fallback). Key selectors:
     .pm-footer / .pm-footer__grid / .pm-footer__col
     .pm-footer-widget__title / .pm-footer__link-list / .pm-footer__popular-list
     .pm-footer__bottom / .pm-footer__social-link
   ============================================================================ */

.pm-footer {
  margin-top: var(--pm-space-16);
  padding: var(--pm-space-16) 0 var(--pm-space-8);
  background: var(--pm-zinc-900);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
}

.pm-footer a {
  color: inherit;
  text-decoration: none;
  transition: color var(--pm-ease);
}
.pm-footer a:hover { color: #fff; }

.pm-footer .pm-container {
  max-width: var(--pm-container);
  margin: 0 auto;
  padding: 0 var(--pm-space-6);
}

.pm-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--pm-space-10);
}

.pm-footer__col { min-width: 0; }

.pm-footer-widget__title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 var(--pm-space-4);
  padding-bottom: var(--pm-space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Link lists (Newsroom/Categories sidebar renders as ul) */
.pm-footer__link-list,
.pm-footer__cat-list,
.pm-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pm-space-3);
}
.pm-footer__link-list li a,
.pm-footer__cat-list li a {
  display: inline-block;
  font-size: 14px;
  line-height: 1.4;
}

/* Categories grid (2-sub-column layout inside col 1) */
.pm-footer__categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pm-space-6);
}

/* Contact list items — icon + label/link side-by-side */
.pm-footer__contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pm-space-3);
}
.pm-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--pm-space-3);
  font-size: 13px;
}
.pm-footer__contact-item svg {
  flex-shrink: 0;
  color: var(--pm-color-primary);
  margin-top: 2px;
}

/* Popular posts with thumbnails */
.pm-footer__popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pm-space-4);
}
.pm-footer__popular-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--pm-space-3);
  align-items: start;
}
.pm-footer__popular-thumb {
  display: block;
  overflow: hidden;
  border-radius: var(--pm-radius-sm);
  aspect-ratio: 1 / 1;
}
.pm-footer__popular-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--pm-ease-reveal);
}
.pm-footer__popular-item:hover .pm-footer__popular-thumb img { transform: scale(1.06); }
.pm-footer__popular-info { min-width: 0; }
.pm-footer__popular-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 4px;
}
.pm-footer__popular-date {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}

/* Bottom bar — copyright left, social icons right */
.pm-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pm-space-6);
  margin-top: var(--pm-space-10);
  padding-top: var(--pm-space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.pm-footer__bottom-social {
  display: flex;
  gap: var(--pm-space-3);
}
.pm-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  transition: background var(--pm-ease), color var(--pm-ease), transform var(--pm-ease);
}
.pm-footer__social-link:hover {
  background: var(--pm-color-primary);
  color: #fff;
  transform: translateY(-1px);
}
.pm-footer__social-link svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 1023px) {
  .pm-footer__grid { grid-template-columns: repeat(2, 1fr); gap: var(--pm-space-8); }
  .pm-footer__categories-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pm-footer__grid { grid-template-columns: 1fr; }
  .pm-footer__bottom { flex-direction: column; align-items: flex-start; gap: var(--pm-space-4); }
  .pm-footer__categories-grid { grid-template-columns: 1fr; }
}
