/**
 * Theme Name: Animal News Magazine
 * Theme URI: https://example.com/animal-news-magazine
 * Author: Professional Developer
 * Author URI: https://example.com
 * Description: A lightweight, mobile-first WordPress theme for animal news magazines. Editorial light theme with bento mosaic, latest dispatches, and narrow-column article reading.
 * Version: 2.0.0
 * Requires at least: 6.4
 * Tested up to: 6.5
 * Requires PHP: 8.4
 * License: GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: animal-news-magazine
 * Domain Path: /languages
 * Tags: one-column, custom-logo, custom-menu, featured-images, translation-ready, blog, news, animals, mobile-first, seo-friendly, schema-markup
 */

/* ==========================================================================
   1. Design Tokens
   ========================================================================== */
:root {
  /* Brand */
  --color-primary: #0a5c36;
  --color-primary-dark: #074228;
  --color-primary-light: #0e7a48;
  --color-secondary: #d4920b;
  --color-secondary-dark: #b37a09;
  --color-secondary-light: #e8a820;
  --color-accent: #c2410c;
  --color-accent-dark: #9a3409;

  /* Category family identity accents (dog / cat / exotic / care).
     Text hex clears >=4.5:1 on white for kicker text; -bright is the fill.
     House green is the neutral fallback for unmapped families. */
  --fam-dog: #b45309;        --fam-dog-bright: #f59e0b;
  --fam-cat: #0f766e;        --fam-cat-bright: #14b8a6;
  --fam-exotic: #6d28d9;     --fam-exotic-bright: #8b5cf6;
  --fam-care: #be185d;       --fam-care-bright: #ec4899;
  --fam-house: #0a5c36;      --fam-house-bright: #0e7a48;

  /* Surfaces */
  --color-background: #fefdfb;
  --color-surface: #f7f5f0;
  --color-surface-raised: #ffffff;
  --color-dark-surface: #0d1b16;

  /* Neutrals */
  --color-white: #ffffff;
  --color-off-white: #faf9f7;
  --color-light-gray: #f0ede8;
  --color-gray: #d6d2cb;
  --color-medium-gray: #9e9889;
  --color-dark-gray: #605c54;
  --color-charcoal: #3d3a35;
  --color-near-black: #1c1a17;

  /* Semantic */
  --color-text: #2c2a26;
  --color-text-light: #605c54;
  --color-text-muted: #9e9889;
  --color-link: #0a5c36;
  --color-link-hover: #074228;
  --color-border: #e8e4dd;

  /* Typography */
  --font-primary: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* Spacing */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Radii */
  --radius-card: 16px;
  --radius-tile: 14px;
  --radius-hero: 4px;
  --radius-pill: 999px;
  --radius-md: .5rem;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(44,42,38,.06), 0 0 1px rgba(44,42,38,.08);
  --shadow-card-hover: 0 8px 24px rgba(44,42,38,.12), 0 2px 6px rgba(44,42,38,.06);
  --shadow-lg: 0 12px 32px rgba(44,42,38,.16), 0 4px 12px rgba(44,42,38,.08);

  /* Transitions */
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --transition-fast: 150ms var(--ease-out-expo);
  --transition-normal: 250ms var(--ease-out-expo);
  --transition-slow: 400ms var(--ease-out-expo);

  /* Z-index */
  --z-sticky: 200;
  --z-modal: 500;
  --z-tooltip: 700;

  /* Container */
  --container-xl: 1280px;

  /* Tile scrim */
  --tile-scrim: linear-gradient(to top, rgba(13,27,22,.85), transparent 65%);
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-background);
  overflow-x: hidden;
}

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

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover, a:focus { color: var(--color-link-hover); }

::selection { background: var(--color-primary); color: #fff; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: var(--z-tooltip);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-near-black);
  letter-spacing: -0.01em;
}

p { margin-bottom: 1em; }
ul, ol { padding-left: 1.25em; }

blockquote {
  margin: 1.5em 0;
  padding: var(--space-1) 0 var(--space-1) var(--space-6);
  border-left: 3px solid var(--color-secondary);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.4em;
  line-height: 1.4;
  color: var(--color-text);
}

code, pre { font-family: var(--font-mono); font-size: .9em; }
code {
  padding: .1em .35em;
  background: var(--color-surface);
  border-radius: 4px;
}
pre {
  padding: var(--space-4);
  background: var(--color-near-black);
  color: #f0ede8;
  border-radius: 8px;
  overflow-x: auto;
}
pre code { padding: 0; background: none; color: inherit; }

/* ==========================================================================
   4. Layout primitives
   ========================================================================== */
.container,
.lx-container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

@media (min-width: 768px) {
  .container,
  .lx-container { padding: var(--space-8) var(--space-8); }
}

/* ==========================================================================
   5. Header — sticky branded
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}
.site-header.is-scrolled { box-shadow: 0 1px 3px rgba(44,42,38,.08); }
/* Auto-hide: slide the header out on scroll-down, back in on scroll-up.
   main.js (HeaderScroll) toggles .is-hidden by scroll direction.
   INVARIANT: the mobile drawer (.main-navigation) is position:fixed and a child
   of .site-header, so any transform here makes the header the drawer's containing
   block and shoves it off-screen. Safe ONLY because .is-hidden is never active
   while the drawer is open — enforced together by HeaderScroll's !menuOpen guard,
   openMenu() clearing .is-hidden, and `.no-scroll .site-header{transition:none}`
   below (snaps the transform away instantly, no interpolation window). Keep all
   three; don't add another code path that sets .is-hidden without the guard. */
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 14px var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
@media (min-width: 768px) { .header-inner { padding: 14px var(--space-8); } }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--color-near-black);
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand .custom-logo,
.brand img,
.brand .custom-logo-link img,
.site-header .custom-logo,
.site-header .custom-logo-link img {
  max-height: 32px !important;
  width: auto !important;
  height: auto !important;
  display: block;
}

/* SVG brand logo sits larger than the generic 32px image cap above. */
.brand .brand-logo { max-height: 88px !important; }

.site-description {
  display: none;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Header search: right slot on desktop, top of the nav drawer on mobile/tablet. */
.header-search { display: none; }
.header-search,
.nav-search { --search-h: 40px; }
.header-search .search-form,
.nav-search .search-form { max-width: none; width: 100%; }
.header-search .search-form-wrapper,
.nav-search .search-form-wrapper { display: flex; width: 100%; }
.header-search .search-field,
.nav-search .search-field { padding-block: 8px; }
.header-search .search-submit,
.nav-search .search-submit { display: inline-flex; align-items: center; padding: 8px 14px; }

.nav-search { margin-bottom: var(--space-4); }

@media (min-width: 1024px) {
  .header-search { display: block; max-width: 240px; margin-left: auto; }
  .nav-search { display: none; }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-near-black);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}
.menu-toggle:hover { background: var(--color-surface); }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="false"] .icon-close { display: none; }

.main-navigation {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--color-surface-raised);
  padding: var(--space-4);
  transform: translateX(-100%);
  transition: transform var(--transition-slow), visibility var(--transition-slow);
  overflow-y: auto;
}
.main-navigation.is-open { transform: translateX(0); }

/* Drawer top row: logo left, close button right (mobile only). */
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
/* Extra `.brand--drawer` rung so this deterministically beats the equal-specificity
   !important logo caps above (.brand .brand-logo 88px, .brand img 32px) regardless
   of source order. */
.nav-drawer-head .brand--drawer .brand-logo,
.nav-drawer-head .brand--drawer .custom-logo {
  max-height: 52px !important;
  width: auto !important;
}
.nav-close { flex-shrink: 0; }

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-menu li { list-style: none; }
.nav-menu a {
  display: block;
  padding: var(--space-3) 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-near-black);
  border-bottom: 1px solid var(--color-border);
}
.nav-menu .current-menu-item > a,
.nav-menu a:hover { color: var(--color-primary); }

@media (min-width: 1024px) {
  .menu-toggle, .nav-close, .nav-drawer-head { display: none; }
  .main-navigation {
    position: static;
    padding: 0;
    background: transparent;
    transform: none;
    overflow: visible;
    margin-left: var(--space-8);
  }
  .nav-menu {
    flex-direction: row;
    align-items: center;
    gap: 22px;
  }
  .nav-menu a {
    padding: 6px 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-charcoal);
    border-bottom: none;
    transition: color var(--transition-fast);
  }
  .nav-menu a:hover,
  .nav-menu a:focus-visible,
  .nav-menu .current-menu-item > a {
    color: var(--color-primary);
  }
  /* Sliding gold underline — grows from the left on hover/focus, pinned when
     the item is the current page. Scoped to top-level items so dropdown links
     (.sub-menu a) keep their plain look. */
  .nav-menu > li > a {
    position: relative;
  }
  .nav-menu > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--color-secondary);
    border-radius: var(--radius-pill);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--transition-normal);
  }
  .nav-menu > li > a:hover::after,
  .nav-menu > li > a:focus-visible::after,
  .nav-menu .current-menu-item > a::after {
    transform: scaleX(1);
  }
}

/* Submenus on desktop */
@media (min-width: 1024px) {
  .nav-menu .menu-item-has-children { position: relative; }
  .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: var(--space-2);
    background: var(--color-surface-raised);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  }
  .nav-menu .menu-item-has-children:hover > .sub-menu,
  .nav-menu .menu-item-has-children.is-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .sub-menu a {
    padding: var(--space-2) var(--space-3);
    border-radius: 6px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
  }
  .sub-menu a:hover { background: var(--color-surface); }
  /* main.js injects a chevron toggle on every has-children item at all widths;
     only the mobile drawer uses it, so hide it on desktop (hover opens here). */
  .sub-menu-toggle { display: none; }
}

/* Lock background scroll while the mobile drawer is open (main.js adds .no-scroll). */
.no-scroll { overflow: hidden; }
/* While the drawer is open, kill the header's auto-hide transition so any
   in-flight .is-hidden transform snaps to none instantly — the fixed drawer must
   never map to a transformed (containing-block) header. See .site-header.is-hidden. */
.no-scroll .site-header { transition: none; }

/* Mobile drawer: collapsible accordion sub-menus + parent/child hierarchy.
   main.js already injects the .sub-menu-toggle chevron and toggles .is-open on
   the parent <li>; these rules give that behaviour its look. Scoped below the
   desktop breakpoint so the hover dropdowns above stay untouched. */
@media (max-width: 1023.98px) {
  /* Closed off-canvas drawer is hidden from focus/AT, not merely translated away
     (prevents tabbing into invisible off-screen controls); revealed with the
     slide-in. visibility transitions discretely, so it holds visible through the
     slide-out then hides. */
  .main-navigation { visibility: hidden; }
  .main-navigation.is-open { visibility: visible; }

  /* Parent row: link fills the width, chevron pins right, sub-menu wraps to its
     own full-width line below. Divider moves to the row so it spans both. */
  .nav-menu .menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-menu .menu-item-has-children > a {
    flex: 1 1 auto;
    border-bottom: none;
  }
  /* Parents read heavier than their children. */
  .nav-menu > li > a { font-weight: 700; }

  /* Chevron toggle button. */
  .sub-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    color: var(--color-charcoal);
    cursor: pointer;
  }
  .sub-menu-toggle svg { transition: transform var(--transition-normal); }
  .sub-menu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

  /* Collapsed by default; main.js toggles .is-open on the parent <li> to reveal. */
  .nav-menu .sub-menu {
    flex-basis: 100%;
    width: 100%;
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .nav-menu .menu-item-has-children.is-open > .sub-menu { display: block; }

  /* Children: indented, lighter, muted — a clear second rung. */
  .nav-menu .sub-menu a {
    padding-left: var(--space-6);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-light);
  }
  .nav-menu .sub-menu a:hover,
  .nav-menu .sub-menu .current-menu-item > a { color: var(--color-primary); }
}

/* ==========================================================================
   6. Badges
   ========================================================================== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  text-decoration: none;
  line-height: 1.4;
}
.badge:hover { background: var(--color-primary-dark); color: #fff; }
.badge--gold { background: var(--color-secondary); color: var(--color-near-black); }
.badge--gold:hover { background: var(--color-secondary-dark); color: var(--color-near-black); }
.badge--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.badge--ghost:hover { background: var(--color-primary); color: #fff; }
.badge--alert { background: var(--color-accent); }

/* --------------------------------------------------------------------------
   Category family identity
   A `.fam-<key>` class on a component root exposes --accent to descendants;
   the `.kicker` eyebrow and accent hovers read it. Dogs-vs-Cats "wears both".
   -------------------------------------------------------------------------- */
.fam-dog    { --accent: var(--fam-dog);    --accent-bright: var(--fam-dog-bright); }
.fam-cat    { --accent: var(--fam-cat);    --accent-bright: var(--fam-cat-bright); }
.fam-exotic { --accent: var(--fam-exotic); --accent-bright: var(--fam-exotic-bright); }
.fam-care   { --accent: var(--fam-care);   --accent-bright: var(--fam-care-bright); }
.fam-house  { --accent: var(--fam-house);  --accent-bright: var(--fam-house-bright); }
.fam-vs     { --accent: var(--fam-dog);    --accent-bright: var(--fam-cat);
              --fam-gradient: linear-gradient(90deg, var(--fam-dog), var(--fam-cat)); }

/* Kicker: category eyebrow, colored by the family accent. */
.kicker {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--accent, var(--fam-house));
  text-decoration: none;
}
.kicker:hover { text-decoration: underline; }

/* Dogs vs Cats: text "wears both" colors. One --fam-gradient var (set on
   .fam-vs, overridden -bright on tiles) drives every versus element, so the
   clip mechanism lives in two @supports blocks instead of three. */
.fam-vs .kicker,
.dispatch.fam-vs .dispatch__num { color: var(--fam-dog); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .fam-vs .kicker,
  .dispatch.fam-vs .dispatch__num {
    background: var(--fam-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* ==========================================================================
   7. Card
   ========================================================================== */
.card {
  background: var(--color-surface-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-light-gray) center/cover no-repeat;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out-expo);
}
.card:hover .card__media img { transform: scale(1.04); }

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

.card__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
.card__title a { color: var(--color-near-black); }
.card__title a:hover { color: var(--accent, var(--color-primary)); }

.card__excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-light);
  margin: var(--space-2) 0 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.card__meta {
  margin-top: auto;
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.card__meta a { color: var(--color-text-muted); }
.card__meta a:hover { color: var(--color-primary); }

.card--big .card__media { aspect-ratio: 16 / 9; }
.card--big .card__title { font-size: 28px; line-height: 1.1; }

@media (min-width: 768px) {
  .card__title { font-size: 22px; }
}

/* ==========================================================================
   8. Mosaic (front page hero grid)
   ========================================================================== */
.mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 56px;
}

.tile {
  position: relative;
  border-radius: var(--radius-tile);
  overflow: hidden;
  display: block;
  min-height: 200px;
  text-decoration: none;
  color: #fff;
  transition: transform var(--transition-normal);
}
.tile:hover { transform: translateY(-3px); color: #fff; }

.tile__media {
  position: absolute;
  inset: 0;
  background: var(--color-light-gray) center/cover no-repeat;
}
.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile__scrim {
  position: absolute;
  inset: 0;
  background: var(--tile-scrim);
}

.tile__copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 20px;
  z-index: 1;
}

.tile__badge { margin-bottom: 6px; }

.tile__title {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 6px 0 0;
  color: #fff;
}
.tile__title--s { font-size: 16px; }
.tile__title--m { font-size: 22px; }
.tile__title--l { font-size: 26px; }
@media (min-width: 768px) { .tile__title--l { font-size: 32px; } }

.tile__meta { font-size: 12px; color: rgba(255,255,255,.85); margin-top: 6px; }

/* Category (post) tiles carry a family kicker + a colored spine at the bottom
   edge. Over a dark scrim, use the -bright accent for legibility. Editorial
   tiles (cream/text) have no fam-* class, so they get neither. */
.tile__kicker { margin-bottom: 2px; }
.tile .kicker {
  color: var(--accent-bright, #fff);
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.tile[class*="fam-"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--accent-bright, var(--fam-house));
  z-index: 2;
}
/* On dark tiles the versus gradient uses the -bright variant; overriding the
   var recolors both the spine (::after) and the kicker. */
.tile.fam-vs { --fam-gradient: linear-gradient(90deg, var(--fam-dog-bright), var(--fam-cat-bright)); }
.tile.fam-vs::after { background: var(--fam-gradient); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .tile.fam-vs .kicker {
    background: var(--fam-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* Variant: text tile (near-black background, used for "Breaking") */
.tile--text {
  background: var(--color-near-black);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}
.tile--text .tile__scrim { display: none; }
.tile--text .tile__copy {
  position: static;
  padding: 0;
}
.tile--text .tile__title { color: #fff; }

/* Variant: cream tile (newsletter promo) — the deliberate standout: a bold gold
   CTA block with a real green "Subscribe" button. Three copy slots stack as
   eyebrow (badge) -> headline (meta) -> button (title). No photo, no glyph. */
.tile--cream {
  background: linear-gradient(135deg, #f6b21f 0%, #e2930f 100%);
  color: var(--color-near-black);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 180px;
  box-shadow: 0 8px 24px rgba(212,146,11,.40);
}
.tile--cream .tile__scrim { display: none; }
.tile--cream .tile__copy {
  position: static;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  justify-content: space-between;
}
/* Eyebrow */
.tile--cream .tile__badge {
  align-self: flex-start;
  background: var(--color-near-black);
  color: #fff;
  border: 0;
  font-weight: 700;
}
/* Headline hook */
.tile--cream .tile__meta {
  color: var(--color-near-black);
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
/* Button */
.tile--cream .tile__title {
  align-self: flex-start;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-primary);
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(7,66,40,.35);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
}
.tile--cream .tile__title--s { font-size: 15px; }
.tile--cream:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(212,146,11,.50);
}
.tile--cream:hover .tile__title {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(7,66,40,.42);
}

@media (min-width: 768px) {
  .mosaic {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 180px;
  }
  .tile { min-height: 0; }
  .tile--a { grid-column: span 4; grid-row: span 3; }
  .tile--b { grid-column: span 2; grid-row: span 2; }
  .tile--c { grid-column: span 2; grid-row: span 1; }
  .tile--d { grid-column: span 2; grid-row: span 2; }
  .tile--e { grid-column: span 2; grid-row: span 1; }
  .tile--f { grid-column: span 2; grid-row: span 2; }
  .tile--g { grid-column: span 2; grid-row: span 1; }
  .tile--text, .tile--cream { min-height: 0; }
}

/* ==========================================================================
   9. Latest dispatches band (full-bleed cream strip)
   ========================================================================== */
.dispatches-band {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 40px var(--space-4);
  margin-top: 56px;
}
@media (min-width: 768px) {
  .dispatches-band { padding: 40px var(--space-8); }
}

.dispatches-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
}

.dispatches-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}
.dispatches-header h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 28px;
  margin: 0;
  color: var(--color-near-black);
}
/* Editorial section titles get a short house-green accent rule. */
.dispatches-header h2,
.feature-stream__header h2 {
  position: relative;
  padding-left: 16px;
}
.dispatches-header h2::before,
.feature-stream__header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 0.82em;
  border-radius: 2px;
  background: var(--color-primary);
}

/* Homepage masthead signature: a thin four-family accent bar under the header.
   Scoped to the front page so other pages are unaffected. */
body.home .site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg,
    var(--fam-dog) 0%, var(--fam-dog) 25%,
    var(--fam-cat) 25%, var(--fam-cat) 50%,
    var(--fam-exotic) 50%, var(--fam-exotic) 75%,
    var(--fam-care) 75%, var(--fam-care) 100%);
}

.dispatches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 64px;
}
@media (min-width: 768px) {
  .dispatches-grid { grid-template-columns: 1fr 1fr; }
}

.dispatch {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: var(--space-4);
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.dispatch__num {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 28px;
  color: var(--accent, var(--color-primary));
  line-height: 1;
}
.dispatch__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.2;
  margin: 0;
}
.dispatch__title a { color: var(--color-near-black); }
.dispatch__title a:hover { color: var(--accent, var(--color-primary)); }
.dispatch__meta {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.dispatches-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: var(--space-8);
}
@media (min-width: 640px) {
  .dispatches-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .dispatches-cards { grid-template-columns: repeat(4, 1fr); }
}
.dispatches-cards .card__title { font-size: 17px; }

/* ==========================================================================
   Front page — More stories (feature stream)
   ========================================================================== */
.feature-stream {
    padding: var(--space-12) 0;
}

.feature-stream__inner {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.feature-stream__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-border);
}

.feature-stream__header h2 {
    font-family: var(--font-heading);
    margin: 0;
}

/* Responsive card grid: 2 columns (phone) -> 3 (tablet) -> 4 (large desktop). */
.feature-stream__rows {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

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

@media (min-width: 1024px) {
    .feature-stream__rows { grid-template-columns: repeat(4, 1fr); }
}

/* --- Editorial cadence bands: feature block / headline list / card row --- */
.feature-stream__bands {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
}

/* Feature block: a big lead beside a 2x2 of smaller cards. */
.stream-feature {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}
@media (min-width: 900px) {
    .stream-feature {
        grid-template-columns: 1.5fr 1fr;
        align-items: start;
    }
}
.stream-feature__side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.stream-feature__lead .card__title { font-size: 26px; }

/* Headline list: a tinted, text-only break in the image rhythm. */
.stream-list {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    padding: var(--space-5) var(--space-6);
    display: grid;
    grid-template-columns: 1fr;
    column-gap: var(--space-8);
}
@media (min-width: 768px) {
    .stream-list { grid-template-columns: 1fr 1fr; }
}
.headline-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 2px var(--space-3);
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
}
.headline-row__kicker { grid-column: 1 / -1; margin-bottom: 2px; }
.headline-row__title {
    grid-column: 1;
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.2;
    margin: 0;
    color: var(--color-near-black);
    transition: color var(--transition-normal);
}
.headline-row:hover .headline-row__title { color: var(--accent, var(--color-primary)); }
.headline-row__meta {
    grid-column: 2;
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* --- Article card (title + image) --- */
/* Mobile: one per row, image and title side by side, alternating sides. */
.feature-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--color-surface-raised);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-row:nth-child(even) {
    flex-direction: row-reverse;
}

.feature-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.feature-row__media {
    display: block;
    position: relative;
    overflow: hidden;
    flex: 0 0 42%;
    align-self: stretch;
    aspect-ratio: 4 / 3;
    background: var(--color-light-gray) center/cover no-repeat;
}

.feature-row__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out-expo);
}

.feature-row:hover .feature-row__media img {
    transform: scale(1.04);
}

.feature-row__copy {
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    flex: 1 1 auto;
}

.feature-row__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    line-height: 1.25;
    margin: 0;
}

.feature-row__title a {
    color: var(--color-text);
    text-decoration: none;
}

.feature-row__title a:hover {
    color: var(--accent, var(--color-primary));
}

/* Tablet and up: uniform vertical cards, image on top. */
@media (min-width: 768px) {
    .feature-row,
    .feature-row:nth-child(even) {
        flex-direction: column;
        align-items: stretch;
    }

    .feature-row__media {
        flex: none;
        aspect-ratio: 16 / 10;
    }
}

@media (min-width: 1024px) {
    .feature-row__title { font-size: 1.25rem; }
}

/* ==========================================================================
   10. Archive — text header
   ========================================================================== */
.archive-head {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 48px var(--space-4) 0;
}
@media (min-width: 768px) {
  .archive-head { padding: 48px var(--space-8) 0; }
}

.archive-head__inner {
  padding-bottom: 32px;
  border-bottom: 2px solid var(--color-near-black);
}

.crumb {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  text-transform: none;
}
.crumb a { color: var(--color-primary); }
.crumb a:hover { color: var(--color-primary-dark); }
.crumb .sep { margin: 0 .35em; color: var(--color-text-muted); }

.archive-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--color-near-black);
  margin: 0 0 14px;
}
@media (min-width: 768px) { .archive-title { font-size: 56px; } }
@media (min-width: 1024px) { .archive-title { font-size: 64px; } }

.archive-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-light);
  max-width: 60ch;
  margin: 0 0 22px;
}

.archive-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.archive-stats b {
  color: var(--color-near-black);
  font-family: var(--font-mono);
  font-weight: 500;
  margin-right: 6px;
}

/* Archive body */
.archive-body {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 40px var(--space-4) 80px;
}
@media (min-width: 768px) {
  .archive-body { padding: 40px var(--space-8) 80px; }
}

/* ==========================================================================
   11. Pillbar (category filter)
   ========================================================================== */
.pillbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 14px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.pillbar::-webkit-scrollbar { height: 4px; }
.pillbar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface-raised);
  font-size: 12px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.pill:hover { background: var(--color-surface); color: var(--color-near-black); border-color: var(--color-gray); }
.pill.is-on,
.pill[aria-current="page"] {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.pill.is-on:hover,
.pill[aria-current="page"]:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* ==========================================================================
   12. Lead row + grid-4 (category content)
   ========================================================================== */
.lead-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: 48px;
}
@media (min-width: 1024px) {
  .lead-row { grid-template-columns: 2fr 1fr 1fr; }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   13. Editor's note banner (category)
   ========================================================================== */
.editor-note {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 28px var(--space-8);
  margin: 48px 0;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: center;
}
.editor-note__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-light);
  background-size: cover;
  background-position: center;
}
.editor-note__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 4px;
  color: var(--color-near-black);
}
.editor-note__meta {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0;
}
.editor-note__meta a { color: var(--color-primary); }

/* ==========================================================================
   14. Article (single post)
   ========================================================================== */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px var(--space-4) 80px;
}
@media (min-width: 768px) { .article-wrap { padding: 48px var(--space-8) 80px; } }

.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin: 0 0 12px;
}

.article-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--color-near-black);
}
@media (min-width: 768px) { .article-title { font-size: 52px; } }

.deck {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: var(--color-text-light);
  margin: 0 0 32px;
}
@media (min-width: 768px) { .deck { font-size: 22px; } }

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
  font-size: 13px;
}
.byline__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  background: var(--color-primary-light) center/cover no-repeat;
}
.byline__avatar img {
  width: 100%; height: 100%;
  border-radius: var(--radius-pill);
  object-fit: cover;
}
.byline__name {
  font-weight: 600;
  color: var(--color-near-black);
}
.byline__name a { color: var(--color-near-black); }
.byline__name a:hover { color: var(--color-primary); }
.byline__meta {
  color: var(--color-text-muted);
  font-size: 12px;
  margin-top: 2px;
}
.byline__meta > * + *::before {
  content: '·';
  margin: 0 6px;
}

.hero-figure { margin: 0 0 32px; }
.hero-figure__img {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-hero);
  overflow: hidden;
  background: var(--color-light-gray) center/cover no-repeat;
}
.hero-figure__img img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-figure figcaption {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 13px;
  color: var(--color-text-light);
  padding: 8px 0 0;
}

.article-body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--color-text);
}
.article-body p { margin-bottom: 24px; }
.article-body p:last-of-type { margin-bottom: 0; }

.article-body > p:first-of-type::first-letter,
.article-body .has-drop-cap::first-letter {
  font-family: var(--font-heading);
  font-size: 72px;
  line-height: 1;
  float: left;
  padding: 6px 12px 0 0;
  color: var(--color-primary);
  font-weight: 400;
}

.article-body h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  margin: 40px 0 12px;
  color: var(--color-near-black);
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  margin: 32px 0 10px;
  color: var(--color-near-black);
}
/* Deeper article headings + any stray body h1: match the 600 weight of h2/h3 above */
.article-body h1,
.article-body h4,
.article-body h5,
.article-body h6 {
  font-weight: 600;
}
.article-body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article-body img { border-radius: 8px; margin: 24px 0; }
.article-body ul, .article-body ol { margin-bottom: 24px; padding-left: 1.5em; }
.article-body ul li, .article-body ol li { margin-bottom: 8px; }

.article-body blockquote,
.article-body .pull,
.article-body .wp-block-pullquote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 26px;
  line-height: 1.3;
  border-left: 3px solid var(--color-secondary);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  color: var(--color-text);
  background: none;
}
.article-body blockquote p { margin-bottom: 0; }

.article-body .wp-block-pullquote {
  border-left: 3px solid var(--color-secondary);
  text-align: left;
}
.article-body .wp-block-pullquote cite {
  display: block;
  margin-top: var(--space-3);
  font-style: normal;
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--color-text-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 48px 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  list-style: none;
  padding-left: 0;
}
.tag-list li { margin: 0; }
.tag-list a,
.tag-pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-light);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.tag-list a:hover,
.tag-pill:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Author bio card */
.author-bio {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: center;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-top: 24px;
}
.author-bio__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-light) center/cover no-repeat;
  flex-shrink: 0;
}
.author-bio__avatar img { width: 100%; height: 100%; border-radius: var(--radius-pill); object-fit: cover; }
.author-bio__name {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 4px;
  color: var(--color-near-black);
}
.author-bio__name a { color: var(--color-near-black); }
.author-bio__name a:hover { color: var(--color-primary); }
.author-bio__desc {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   15. Photo placeholders (gradient fallbacks for missing thumbnails)
   ========================================================================== */
.ph { background-position: center; background-size: cover; }
.ph-canopy { background-image: linear-gradient(135deg, #1a4a2e 0%, #2d7a4a 60%, #4ea876 100%); }
.ph-marine { background-image: linear-gradient(135deg, #0c3d5c 0%, #2374a6 60%, #6bb6dc 100%); }
.ph-arctic { background-image: linear-gradient(135deg, #6b8a9a 0%, #b4ccd8 60%, #e8eef2 100%); }
.ph-desert { background-image: linear-gradient(135deg, #8a5a2c 0%, #d4a574 60%, #f0d6a6 100%); }
.ph-forest { background-image: linear-gradient(135deg, #1c3a26 0%, #355c3e 60%, #6a8c6e 100%); }
.ph-mountain { background-image: linear-gradient(135deg, #3a4a55 0%, #6a7c87 60%, #b0bec7 100%); }
.ph-tundra { background-image: linear-gradient(135deg, #4a5a52 0%, #7c8c80 60%, #c2cdc2 100%); }
.ph-night { background-image: linear-gradient(135deg, #0c1424 0%, #1f2c4a 60%, #3c4d7c 100%); }
.ph-coral { background-image: linear-gradient(135deg, #b04a3c 0%, #d4775a 60%, #f0a48a 100%); }
.ph-tide { background-image: linear-gradient(135deg, #154e5c 0%, #3287a0 60%, #82c8de 100%); }
.ph-savanna { background-image: linear-gradient(135deg, #6c5424 0%, #b88c40 60%, #e6c682 100%); }
.ph-clay { background-image: linear-gradient(135deg, #6c2c14 0%, #b85426 60%, #e88a5a 100%); }

/* ==========================================================================
   16. Footer — dark 5-column
   ========================================================================== */
.site-footer {
  background: var(--color-dark-surface);
  color: rgba(255,255,255,0.75);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 56px var(--space-4) 32px;
}
@media (min-width: 768px) { .footer-inner { padding: 56px var(--space-8) 32px; } }

.footer-top {
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}
.footer-brand .footer-tagline { margin-left: auto; margin-right: auto; }
.footer-brand .footer-newsletter { margin-left: auto; margin-right: auto; }

.footer-brand .brand__name { color: #fff; }
.footer-tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255,255,255,0.7);
  margin: 14px 0 18px;
  max-width: 32ch;
}

.footer-newsletter {
  display: flex;
  gap: 0;
  max-width: 320px;
}
.footer-newsletter input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 6px 0 0 6px;
  font-family: inherit;
  font-size: 14px;
}
.footer-newsletter input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.footer-newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--color-secondary);
  background: rgba(255,255,255,0.1);
}
.footer-newsletter button {
  padding: 10px 16px;
  background: var(--color-secondary);
  color: var(--color-near-black);
  border: 0;
  border-radius: 0 6px 6px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.footer-newsletter button:hover { background: var(--color-secondary-light); }

.footer-newsletter__notice {
  max-width: 320px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}
.footer-newsletter__notice--success {
  background: rgba(70,180,110,0.15);
  border: 1px solid rgba(70,180,110,0.4);
  color: #d6f5e2;
}
.footer-newsletter__notice--error {
  background: rgba(220,80,80,0.15);
  border: 1px solid rgba(220,80,80,0.4);
  color: #f8d7d7;
}

/* Honeypot field — kept in the DOM for bots, removed from view and a11y tree. */
.anm-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 15px;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: 0.04em;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col li { margin: 0; }
.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--color-secondary); }

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.footer-social a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}
.footer-social svg { width: 14px; height: 14px; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: var(--color-secondary); }
.footer-bottom .footer-legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0;
}
.footer-bottom .footer-legal li { margin: 0; }

/* ==========================================================================
   16b. Related posts
   ========================================================================== */
.related-posts {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 56px var(--space-4);
  margin-top: 56px;
}
@media (min-width: 768px) { .related-posts { padding: 56px var(--space-8); } }

.related-posts__inner {
  max-width: var(--container-xl);
  margin: 0 auto;
}

.related-posts__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 24px;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-near-black);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .related-posts__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .related-posts__grid { grid-template-columns: repeat(3, 1fr); } }

/* ==========================================================================
   17. Comments
   ========================================================================== */
.entry-comments {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.comments-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 24px;
}
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-list .children {
  list-style: none;
  padding-left: 24px;
  margin-top: 16px;
  border-left: 2px solid var(--color-border);
}
.comment-author {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.comment-author .avatar { width: 40px; height: 40px; border-radius: var(--radius-pill); }
.comment-author .fn { font-weight: 600; color: var(--color-near-black); }
.comment-metadata { font-size: 12px; color: var(--color-text-muted); margin-bottom: 12px; }
.comment-content { font-size: 15px; line-height: 1.6; }
.reply a {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comment-respond { margin-top: 24px; }
.comment-reply-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 16px;
}
.comment-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 16px;
  background: var(--color-surface-raised);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(10,92,54,0.12);
}
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form .form-submit input[type="submit"] {
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: background-color var(--transition-fast);
}
.comment-form .form-submit input[type="submit"]:hover { background: var(--color-primary-dark); }

/* ==========================================================================
   18. Pagination, search, 404
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}
.pagination .page-numbers:hover { background: var(--color-surface); }
.pagination .page-numbers.current {
  background: var(--color-primary);
  color: #fff;
}
.pagination .page-numbers.dots { color: var(--color-text-muted); }

.search-form {
  display: flex;
  gap: 0;
  max-width: 480px;
}
.search-field {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  background: var(--color-surface-raised);
}
.search-field:focus {
  outline: none;
  border-color: var(--color-primary);
}
.search-submit {
  padding: 10px 18px;
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.search-submit:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }

.error-404 {
  text-align: center;
  padding: 80px var(--space-4);
  max-width: 600px;
  margin: 0 auto;
}
.error-404 h1 {
  font-family: var(--font-heading);
  font-size: 64px;
  color: var(--color-primary);
  margin: 0 0 16px;
}
.error-404 p {
  font-size: 17px;
  color: var(--color-text-light);
  margin: 0 0 32px;
}

/* ==========================================================================
   19. Scroll-to-top
   ========================================================================== */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s, background-color var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.scroll-to-top:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
.scroll-to-top.is-visible { opacity: 1; visibility: visible; }

/* ==========================================================================
   20. WordPress core block adjustments (used inside .article-body)
   ========================================================================== */
.alignwide { max-width: 920px; margin-left: auto; margin-right: auto; }
.alignfull {
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.wp-block-image figcaption {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 13px;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 8px;
}

.wp-block-quote {
  border-left: 3px solid var(--color-secondary);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
}

.wp-block-button__link {
  background: var(--color-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  display: inline-block;
}
.wp-block-button__link:hover { background: var(--color-primary-dark); color: #fff; }

/* ==========================================================================
   20b. Blog index / search / 404 / page templates
   ========================================================================== */

.content-area {
  max-width: var(--container-xl);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 1024px) {
  .content-area { grid-template-columns: minmax(0, 1fr) 300px; }
  .content-area--full-width { grid-template-columns: 1fr; }
}
.content-area--full-width { grid-template-columns: 1fr; }

.main-content { min-width: 0; }

.page-header {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 2px solid var(--color-near-black);
}
.page-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-near-black);
  margin: 0;
}
@media (min-width: 768px) { .page-title { font-size: 48px; } }

.search-header {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 2px solid var(--color-near-black);
}
.search-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
  color: var(--color-near-black);
}
.search-query { color: var(--color-primary); }
.search-count { font-size: 13px; color: var(--color-text-muted); margin: 0; }

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}
@media (min-width: 640px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .articles-grid { grid-template-columns: repeat(3, 1fr); } }

.article-card {
  background: var(--color-surface-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.article-card--featured {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .article-card--featured {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
  }
}

.article-card__image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 0;
  background: var(--color-light-gray) center/cover no-repeat;
}
.article-card__image a { display: block; width: 100%; height: 100%; }
.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out-expo);
}
.article-card:hover .article-card__image img { transform: scale(1.04); }

.article-card__category {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1;
}
.category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.category-badge:hover { background: var(--color-primary-dark); color: #fff; }

.article-card__content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.article-card__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
.article-card--featured .article-card__title { font-size: 32px; }
.article-card__title a { color: var(--color-near-black); }
.article-card__title a:hover { color: var(--color-primary); }

.article-card__excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-light);
}

.article-card__meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  font-size: 12px;
  color: var(--color-text-muted);
}
.article-card__author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.article-card__author-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
}
.article-card__date,
.article-card__reading-time { color: var(--color-text-muted); }

.no-results {
  padding: var(--space-12) 0;
  text-align: center;
}
.no-results .page-content { margin-top: var(--space-6); }
.no-results .search-form { margin: var(--space-6) auto 0; }

.page-links {
  margin: var(--space-6) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 13px;
}
.page-links a,
.page-links span {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.page-links a { color: var(--color-primary); }
.page-links > span:not(.screen-reader-text) {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.single-page .entry-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.single-page .entry-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-near-black);
  margin: 0;
}
@media (min-width: 768px) { .single-page .entry-title { font-size: 52px; } }

.entry-featured-image {
  margin: 0 0 var(--space-6);
  border-radius: var(--radius-hero);
  overflow: hidden;
}
.entry-featured-image img { width: 100%; height: auto; display: block; }

.entry-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text);
}
.entry-content p { margin-bottom: var(--space-5); }
.entry-content h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 26px;
  margin: 36px 0 12px;
  color: var(--color-near-black);
}
.entry-content h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 20px;
  margin: 28px 0 10px;
  color: var(--color-near-black);
}

.suggested-links,
.recent-posts {
  margin-top: var(--space-8);
}
.suggested-links h2,
.recent-posts h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 var(--space-4);
  color: var(--color-near-black);
}
.suggested-links ul,
.recent-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 640px) {
  .suggested-links ul,
  .recent-posts ul { grid-template-columns: repeat(2, 1fr); }
}
.suggested-links li a,
.recent-posts li a {
  display: block;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  color: var(--color-near-black);
  transition: background-color var(--transition-fast);
}
.suggested-links li a:hover,
.recent-posts li a:hover { background: var(--color-light-gray); color: var(--color-primary); }
.suggested-links .count { color: var(--color-text-muted); font-size: 12px; margin-left: 6px; }

.entry-comments {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

/* Header-top widget bar (breaking/trending ticker) */
.header-top-bar {
  background: var(--color-near-black);
  color: rgba(255,255,255,.92);
  font-size: 13px;
}
.header-top-bar__inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 8px var(--space-4);
}
.header-top-bar a { color: var(--color-secondary); }
.header-top-bar a:hover { color: #fff; }

/* Widget area shell (sidebar) */
.widget-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.widget-area .widget {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}
.widget-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 var(--space-3);
  color: var(--color-near-black);
}

.anm-recent-posts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.anm-recent-post { display: grid; grid-template-columns: 72px 1fr; gap: var(--space-3); align-items: flex-start; }
.anm-recent-post-thumbnail { display: block; overflow: hidden; border-radius: var(--radius-md); }
.anm-recent-post-img { width: 72px; height: 72px; object-fit: cover; }
.anm-recent-post-title { display: block; font-weight: 500; color: var(--color-near-black); line-height: 1.3; }
.anm-recent-post-title:hover { color: var(--color-primary); }
.anm-recent-post-date { font-size: 12px; color: var(--color-text-muted); }

/* ==========================================================================
   21. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover, .tile:hover, .scroll-to-top:hover { transform: none; }
  .card:hover .card__media img { transform: none; }
}

/* ==========================================================================
   22. Print
   ========================================================================== */
@media print {
  .site-header, .site-footer, .scroll-to-top, .skip-link, .pillbar, .footer-newsletter,
  .related-posts, .entry-comments {
    display: none !important;
  }
  .article-wrap { max-width: none; padding: 0; }
  body { color: #000; background: #fff; }
  a, a:visited { text-decoration: underline; color: #000; }
  .article-body img { max-width: 100% !important; page-break-inside: avoid; }
}
