/* ============================================================
   Hivipunde — site styles
   ------------------------------------------------------------
   Design tokens, layout, public templates (home, article,
   archive, search, footer). Inter for everything; serif for
   long-form story body. One :root, no duplicate overrides.
   ============================================================ */

:root {
  /* Palette */
  --ink:           #050505;
  --ink-2:         #1b1b1b;
  --body:          #232323;
  --muted:         #6b6f76;
  --muted-2:       #9aa0a8;
  --surface:       #ffffff;
  --soft:          #f7f7f7;
  --soft-2:        #eeeeee;
  --line:          #e7e7e7;
  --line-strong:   #d1d4d8;

  --accent:        #5dbda5;   /* Hivipunde teal */
  --accent-dark:   #3b9e87;
  --accent-soft:   #edf8f4;
  --warm:          #d92d27;   /* used for breaking/danger only */
  --warm-soft:     #fdecea;

  /* Shape */
  --container:     1200px;
  --gutter:        22px;
  --radius-sm:     3px;
  --radius:        6px;
  --radius-lg:     10px;

  --shadow-sm:     0 1px 2px rgba(15, 17, 21, .04);
  --shadow-md:     0 4px 12px rgba(15, 17, 21, .08);
  --shadow-lg:     0 12px 28px rgba(15, 17, 21, .12);

  /* Type */
  --font-body:     "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display:  "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-serif:    Georgia, "Source Serif 4", "Times New Roman", serif;

  /* Motion */
  --t-fast:        120ms cubic-bezier(.4, 0, .2, 1);
  --t-med:         220ms cubic-bezier(.4, 0, .2, 1);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--surface);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--body);
  line-height: 1.5;
}

main { flex: 1; }

.site-main-content { min-width: 0; }
.desktop-ad-rail { display: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--accent-dark); }

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

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--ink); color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  z-index: 999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 0; top: 0;
  color: #fff;
  outline-offset: 0;
}

/* ============================================================
   Layout containers
   ============================================================ */
.brand-row-inner,
.nav-shell-inner,
.archive-head,
.content-band,
.article-page,
.footer-inner,
.footer-bottom,
.top-story-strip,
.legacy-home {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   Ad placements
   ============================================================ */
.ad-placement {
  margin: clamp(22px, 3.4vw, 38px) auto;
  color: var(--muted);
  text-align: center;
}
.ad-placement__label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ad-placement__body {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: center;
}
.ad-placement__body > * {
  max-width: 100%;
}
.ad-placement__body > .adsbygoogle {
  width: 100%;
  min-width: 250px;
}
.ad-placement__body img {
  margin: 0 auto;
}
.ad-placement--site_above_brand,
.ad-placement--site_below_nav,
.ad-placement--blog_story_root,
.ad-placement--site_footer,
.ad-placement--home_after_top_stories,
.ad-placement--home_before_latest,
.ad-placement--archive_top {
  max-width: var(--container);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.ad-placement--article_after_header,
.ad-placement--article_after_featured_image,
.ad-placement--article_before_first_paragraph,
.ad-placement--article_after_paragraph_3,
.ad-placement--article_after_paragraph_8,
.ad-placement--article_after_paragraph_13,
.ad-placement--article_after_body {
  max-width: 720px;
}
.ad-placement--feed_after_fourth {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 34px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid var(--soft-2);
  border-bottom: 1px solid var(--soft-2);
}
.ad-placement--image a {
  display: inline-block;
}
.article-body .ad-placement {
  margin: 2.35em 0;
  padding: 1.15em 0;
  border-top: 1px solid var(--soft-2);
  border-bottom: 1px solid var(--soft-2);
  font-family: var(--font-body);
}
.article-body .ad-placement__label {
  margin-bottom: 10px;
}
.ad-placement--site_above_brand {
  margin-top: 8px;
  margin-bottom: 4px;
}
.ad-placement--site_above_brand .adsbygoogle {
  min-height: 90px;
}
.ad-placement--blog_story_root {
  margin-top: clamp(18px, 3vw, 34px);
  margin-bottom: clamp(20px, 3.4vw, 38px);
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--soft-2);
}
.article-page > .ad-placement--blog_story_root {
  margin-top: clamp(18px, 3vw, 30px);
  margin-bottom: clamp(22px, 3vw, 34px);
}
.ad-placement--site_footer {
  margin-top: 0;
  margin-bottom: clamp(26px, 4vw, 44px);
  padding-top: 6px;
  padding-bottom: clamp(18px, 3vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.site-footer .ad-placement__label {
  color: rgba(255, 255, 255, .58);
}
.ad-placement--home_before_latest {
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid var(--soft-2);
  border-bottom: 1px solid var(--soft-2);
}

/* Desktop side rails only activate when their ad placements render. */
@media (min-width: 1280px) {
  .site-main-shell:has(.desktop-ad-rail .ad-placement:not([hidden])) {
    width: min(calc(100% - (var(--gutter) * 2)), 1800px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: clamp(150px, 12vw, 220px) minmax(0, var(--container)) clamp(150px, 12vw, 220px);
    column-gap: clamp(12px, 1.5vw, 24px);
    align-items: start;
    justify-content: center;
  }

  .site-main-shell:has(.desktop-ad-rail .ad-placement:not([hidden])) .site-main-content {
    grid-column: 2;
  }

  .site-main-shell:has(.desktop-ad-rail .ad-placement:not([hidden])) .desktop-ad-rail {
    display: block;
    width: clamp(150px, 12vw, 220px);
    min-width: 0;
    padding-top: clamp(20px, 2.4vw, 34px);
  }

  .site-main-shell:has(.desktop-ad-rail .ad-placement:not([hidden])) .desktop-ad-rail:not(:has(.ad-placement:not([hidden]))) {
    display: none;
  }

  .desktop-ad-rail--left { grid-column: 1; }
  .desktop-ad-rail--right { grid-column: 3; }

  .desktop-ad-rail__sticky {
    position: sticky;
    top: 24px;
    display: grid;
    gap: clamp(22px, 3vh, 34px);
  }

  .desktop-ad-rail .ad-placement {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .desktop-ad-rail .ad-placement__label {
    margin-bottom: 8px;
  }

  .desktop-ad-rail .ad-placement__body {
    display: grid;
    place-items: center;
    width: 100%;
    height: clamp(520px, calc(100vh - 190px), 760px);
    min-height: 520px;
    padding: 8px;
    overflow: hidden;
    border: 1px solid var(--soft-2);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fff 0%, var(--soft) 100%);
    box-shadow: var(--shadow-sm);
  }

  .desktop-ad-rail [data-kt-desktop-ad-mount] {
    display: block;
    height: 100%;
    width: 100%;
  }

  .desktop-ad-rail .ad-placement__body > .adsbygoogle,
  .desktop-ad-rail [data-kt-desktop-ad-mount] > .adsbygoogle {
    height: 100%;
    width: 100%;
    min-width: 0;
    min-height: 520px;
  }

  .desktop-ad-rail .ad-placement__body img,
  .desktop-ad-rail .ad-placement--image a {
    width: 100%;
    height: 100%;
  }

  .desktop-ad-rail .ad-placement__body img {
    object-fit: cover;
  }
}

@media (min-width: 1540px) {
  .site-main-shell:has(.desktop-ad-rail .ad-placement:not([hidden])) {
    grid-template-columns: auto minmax(0, var(--container)) auto;
    column-gap: clamp(20px, 2vw, 34px);
  }

  .site-main-shell:has(.desktop-ad-rail .ad-placement:not([hidden])) .desktop-ad-rail {
    width: clamp(260px, 16vw, 300px);
  }

  .desktop-ad-rail .ad-placement__body {
    height: clamp(640px, calc(100vh - 180px), 920px);
    min-height: 640px;
    padding: 10px;
  }

  .desktop-ad-rail .ad-placement__body > .adsbygoogle,
  .desktop-ad-rail [data-kt-desktop-ad-mount] > .adsbygoogle {
    min-height: 640px;
  }
}

/* ============================================================
   Site header
   ============================================================ */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--surface);
}

.brand-row { border-bottom: 1px solid var(--soft-2); }
.brand-row-inner {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 452px) minmax(220px, 1fr);
  align-items: center;
  gap: 22px;
  padding-top: 16px;
  padding-bottom: 16px;
  min-height: 116px;
}

/* Menu toggle (mobile only) */
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Header search */
.header-search {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.header-search-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.header-search-label:hover { background: var(--soft); color: var(--accent-dark); }
.header-search-label svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.header-search input {
  width: 0;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  opacity: 0;
  transition: width var(--t-med), opacity var(--t-med), padding var(--t-med), border-color var(--t-med);
  outline: none;
}
.header-search:focus-within input,
.header-search input:not(:placeholder-shown) {
  width: 200px;
  padding: 0 10px;
  border-bottom-color: var(--line-strong);
  opacity: 1;
}
.header-search:focus-within input { border-bottom-color: var(--accent-dark); }
.header-search-submit {
  display: none;
  padding: 0 14px;
  height: 36px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.header-search:focus-within .header-search-submit,
.header-search input:not(:placeholder-shown) ~ .header-search-submit {
  display: inline-flex;
  align-items: center;
}
.header-search-submit:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* Brand logo */
.brand {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}
.brand img {
  width: auto;
  height: 100px;
  max-width: min(452px, 100%);
  object-fit: contain;
}

/* Header right (account) */
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.account-link:hover { color: var(--accent-dark); }
.account-icon {
  position: relative;
  display: inline-block;
  width: 22px; height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.account-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 8px; height: 8px;
  transform: translate(-50%, -50%);
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff;
}
/* Primary navigation */
.nav-shell {
  background: var(--surface);
  border-bottom: 1px solid var(--soft-2);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .04);
}
.nav-shell-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  flex-wrap: wrap;
}

.home-link {
  display: inline-flex;
  align-items: center;
  padding: 0 17px;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.home-link:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
  min-width: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 17px;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.nav-links a:hover {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

/* Mobile-only search inside nav-shell */
.nav-shell .nav-search { display: none; }

/* ============================================================
   Top story strip (homepage band under nav)
   ============================================================ */
.top-story-strip {
  padding-top: 30px;
  padding-bottom: 26px;
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 36px;
}
.strip-grid article { min-width: 0; }
.strip-grid h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}
.strip-grid h3 a:hover { color: var(--accent-dark); }
.strip-grid time {
  color: var(--muted);
  font-size: 12.5px;
}

/* ============================================================
   Legacy homepage 4-col layout
   ============================================================ */
.legacy-home {
  padding-bottom: 28px;
  display: grid;
  grid-template-columns: 240px minmax(360px, 1.65fr) minmax(220px, .8fr) 230px;
  gap: 26px;
  align-items: start;
}
.fresh-column,
.popular-column,
.news-stack { min-width: 0; }

.fresh-column h2,
.popular-column h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.fresh-kicker {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.fresh-list article {
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--soft-2);
}
.fresh-list article:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.fresh-list h3,
.popular-card h3,
.stack-story h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.fresh-list h3 a:hover,
.popular-card h3 a:hover,
.stack-story h3 a:hover { color: var(--accent-dark); }

/* Kicker (red category tag inside cards/lists is overridden by legacy teal earlier) */
.kicker {
  display: inline-block;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kicker:hover { color: var(--accent); }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.meta-by { color: var(--ink-2); font-weight: 700; }

.empty-state { color: var(--muted); padding: 24px 0; }

/* Lead tile (centre column) */
.lead-tile {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: var(--soft-2);
  border-radius: var(--radius);
}
.lead-image {
  display: block;
  height: 100%;
  min-height: 430px;
}
.lead-image img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2, .8, .2, 1);
}
.lead-tile:hover .lead-image img { transform: scale(1.03); }
.lead-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 130px 28px 30px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .15) 40%, rgba(0, 0, 0, .80) 100%);
}
.lead-category {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}
.lead-category:hover { background: var(--accent-dark); color: #fff; }
.lead-overlay h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 3.7vw, 46px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}
.lead-overlay h1 a { color: inherit; }
.lead-overlay h1 a:hover { color: #fff; opacity: .85; }

/* News stack (two cards under lead) */
.news-stack {
  display: grid;
  gap: 22px;
}
.stack-image {
  display: block;
  aspect-ratio: 16 / 10;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--soft-2);
  border-radius: var(--radius);
}
.stack-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms cubic-bezier(.2, .8, .2, 1);
}
.stack-story:hover .stack-image img { transform: scale(1.04); }
.stack-story .kicker { display: inline-block; margin-bottom: 6px; }
.stack-story h3 { font-size: 18px; line-height: 1.28; }

/* Popular card (right rail) */
.popular-card {
  background: #fff;
  padding: 18px 18px 6px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15, 17, 21, .04);
  border-radius: var(--radius);
}
.popular-card article {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--soft-2);
}
.popular-card article:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.popular-card .kicker { display: block; margin-bottom: 6px; }
.popular-card time {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* ============================================================
   Section heads
   ============================================================ */
.content-band {
  padding-top: 24px;
  padding-bottom: 40px;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--soft-2);
}
.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}
.section-head span {
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   Article grid + cards
   ============================================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
  align-items: stretch;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--soft-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.article-card:hover {
  border-bottom-color: var(--accent);
  transform: translateY(-1px);
}
.article-card.no-image {
  padding-top: 12px;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--soft-2);
}
.card-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--soft-2);
  overflow: hidden;
  border-radius: var(--radius);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.2, .8, .2, 1);
}
.article-card:hover .card-media img { transform: scale(1.04); }
.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 0;
  flex: 1;
}
.article-card.no-image .card-body { padding-top: 0; }
.card-body h3 {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: break-word;
}
.card-body h3 a:hover { color: var(--accent-dark); }
.card-excerpt {
  color: #555;
  font-size: 14.5px;
  line-height: 1.55;
}
.card-excerpt p { margin: 0; }
.card-body .meta { margin-top: auto; }

.article-card.variant-compact .card-body h3 { font-size: 17px; }
.article-card.variant-compact .card-media { aspect-ratio: 16 / 9; }

/* ============================================================
   Infinite scroll
   ============================================================ */
.load-more {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 32px 0 8px;
}
.load-more-pulse { display: inline-flex; gap: 8px; }
.load-more-pulse span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .4;
  animation: bounce 1s infinite ease-in-out;
}
.load-more-pulse span:nth-child(2) { animation-delay: .15s; }
.load-more-pulse span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40%           { transform: scale(1);  opacity: 1;  }
}
.load-more-fallback {
  display: none;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}
html.no-js .load-more-pulse { display: none; }
html.no-js .load-more-fallback { display: inline-block; }

/* Fallback noscript pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 14px;
}
.pagination a {
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
}
.pagination a:hover { background: var(--accent-dark); color: #fff; }

/* ============================================================
   Archive / category / search head
   ============================================================ */
.archive-head {
  padding-top: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--soft-2);
}
.archive-head h1 {
  margin: 6px 0 10px;
  color: var(--ink);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}
.archive-description {
  color: var(--body);
  font-size: 16px;
  line-height: 1.6;
  max-width: 70ch;
}
.archive-description p { margin: 0 0 .8em; }
.archive-description p:last-child { margin-bottom: 0; }
.archive-count {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-dark); }
.breadcrumbs span[aria-hidden] { color: var(--line-strong); }

/* ============================================================
   Search results panel
   ============================================================ */
.search-summary {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}
.compact-list { display: grid; gap: 10px; }
.compact-list a {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.compact-list a:hover { border-color: var(--ink); background: var(--soft); }
.compact-list small { color: var(--muted); }

/* ============================================================
   Article detail page
   ============================================================ */
.preview-banner {
  width: min(820px, calc(100% - (var(--gutter) * 2)));
  margin: 24px auto 0;
  padding: 12px 16px;
  border: 1px solid #f0d7a7;
  border-radius: var(--radius);
  background: #fff7e8;
  color: #664100;
  font-size: 13.5px;
  font-weight: 800;
}

.article-page {
  max-width: 860px;
  padding-top: clamp(30px, 4vw, 44px);
  padding-bottom: clamp(46px, 5vw, 64px);
}
.article-header {
  max-width: 720px;
  margin: 0 auto 24px;
}
.article-header h1 {
  margin: 8px 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
}
.article-dek {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--body);
  margin: 0 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--soft-2);
}
.article-dek p { margin: 0; }

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13.5px;
}
.byline-author { display: flex; align-items: center; gap: 12px; }
.byline-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}
.byline-name {
  display: block;
  font-weight: 800;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}
.byline-author time {
  color: var(--muted);
  font-size: 12.5px;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.share-row a,
.share-row button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.share-row a:hover,
.share-row button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.share-row button.is-copied {
  background: #103b2f;
  border-color: #103b2f;
  color: #fff;
}
.share-row svg { width: 16px; height: 16px; fill: currentColor; }

.article-image {
  margin: 24px 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--soft);
}
.article-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.article-body {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.35vw, 19.5px);
  line-height: 1.72;
  color: var(--body);
  overflow-wrap: break-word;
}
.article-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-body a:hover { color: var(--accent); }
.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body figure { margin: 0 0 1.35em; }
.article-body p { text-wrap: pretty; }
.article-body ul,
.article-body ol { padding-left: 1.25em; }
.article-body li + li { margin-top: .35em; }
.article-body h2 {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin: 1.6em 0 .55em;
  color: var(--ink);
}
.article-body h3 {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 1.5em 0 .5em;
  color: var(--ink);
}
.article-body h4 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  margin: 1.4em 0 .5em;
}
.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 4px 0 4px 20px;
  color: var(--ink-2);
  font-style: italic;
  font-size: 21px;
  line-height: 1.55;
}
.article-body img,
.article-body iframe,
.article-body video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.article-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}
.article-body .story-embed {
  margin: 1.7em 0;
  font-family: var(--font-body);
}
.story-embed iframe {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
  background: var(--soft);
  box-shadow: var(--shadow-sm);
}
.story-embed--youtube iframe,
.story-embed--vimeo iframe,
.story-embed--maps iframe {
  aspect-ratio: 16 / 9;
}
.story-embed--twitter iframe,
.story-embed--instagram iframe,
.story-embed--tiktok iframe {
  min-height: 560px;
}
.story-embed--spotify iframe {
  min-height: 180px;
  aspect-ratio: auto;
}
.story-link-card {
  margin: 1.5em 0;
  font-family: var(--font-body);
}
.story-link-card a {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
}
.story-link-card a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.story-link-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.story-link-card strong {
  font-size: 17px;
}
.story-link-card small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.article-body figure.story-inline-image { margin: 1.6em 0; }
.article-body figure.story-inline-image img { width: 100%; display: block; }
.article-body figcaption {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.article-tags {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--soft-2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-tags a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--soft);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.article-tags a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.related-band { padding-top: 12px; }

/* Static pages (About, Contact, etc.) — body in sans, slightly smaller */
.page-copy .article-body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: clamp(36px, 5vw, 56px);
  background: var(--ink);
  color: #cbd0d8;
  content-visibility: auto;
  contain-intrinsic-size: 520px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  padding-top: 44px;
  padding-bottom: 32px;
}
.footer-brand strong {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.footer-brand p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #a1a8b3;
  max-width: 38ch;
}
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a {
  color: #cbd0d8;
  font-size: 14px;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  padding-bottom: 26px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  color: #8a93a0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1180px) {
  .legacy-home {
    grid-template-columns: 240px minmax(340px, 1.4fr) minmax(220px, .9fr);
  }
  .popular-column { grid-column: 1 / -1; }
  .popular-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
  .popular-card article {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
}

@media (max-width: 900px) {
  .brand-row-inner {
    grid-template-columns: 44px 1fr auto;
    min-height: 78px;
    gap: 12px;
  }
  .menu-toggle { display: inline-flex; }

  /* Hide header search on small screens — search lives in nav menu */
  .header-search { display: none; }

  .brand { grid-column: 2; }
  .brand img { height: 56px; }

  .account-link span:last-child { display: none; }
  /* Collapsible primary nav */
  .nav-shell-inner {
    flex-direction: column;
    align-items: stretch;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 0;
  }
  .home-link {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    background: var(--soft);
    color: var(--ink);
  }
  .home-link:hover { background: var(--soft-2); color: var(--accent-dark); }
  .nav-links {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-med) ease;
  }
  .nav-shell.is-open .nav-links {
    max-height: 600px;
    border-top: 1px solid var(--soft-2);
  }
  .nav-links a {
    width: 100%;
    padding: 14px 18px;
    border-bottom: 1px solid var(--soft-2);
    margin-bottom: 0;
  }
  .nav-links a:hover { background: var(--soft); border-bottom-color: var(--soft-2); }

  /* Always-visible mobile search inside nav */
  .nav-shell .nav-search {
    display: grid;
    grid-template-columns: 1fr 44px;
    width: 100%;
    padding: 10px 12px;
    gap: 0;
    background: var(--soft);
    border-top: 1px solid var(--soft-2);
  }
  .nav-shell .nav-search input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-right: 0;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    outline: none;
  }
  .nav-shell .nav-search input:focus {
    border-color: var(--accent-dark);
    box-shadow: inset 0 0 0 1px var(--accent-dark);
  }
  .nav-shell .nav-search button {
    height: 42px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .nav-shell .nav-search button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
  .nav-shell .nav-search button svg {
    width: 18px; height: 18px;
    fill: none; stroke: #fff; stroke-width: 2;
    stroke-linecap: round;
  }

  /* Homepage layout collapses */
  .top-story-strip { padding-top: 24px; padding-bottom: 20px; }
  .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .legacy-home {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .lead-tile { order: -1; }
  .fresh-column { order: 1; }
  .news-stack { order: 2; }
  .popular-column { order: 3; }
  .lead-tile,
  .lead-image,
  .lead-image img { min-height: 360px; }
  .popular-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  .ad-placement {
    margin-top: 18px;
    margin-bottom: 24px;
  }
  .ad-placement__label {
    margin-bottom: 6px;
    font-size: 9px;
    letter-spacing: .1em;
  }
  .article-body .ad-placement {
    margin: 1.9em 0;
    padding: 0;
  }
  .ad-placement--feed_after_fourth {
    margin-top: 2px;
    margin-bottom: 30px;
  }
  .ad-placement--site_above_brand,
  .ad-placement--blog_story_root,
  .ad-placement--site_footer {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .ad-placement--site_above_brand {
    margin-top: 4px;
    margin-bottom: 0;
  }
  .ad-placement--site_above_brand .adsbygoogle {
    min-height: 90px;
  }
  .ad-placement--blog_story_root {
    margin-top: 16px;
    margin-bottom: 22px;
  }

  .header-actions { gap: 10px; }
  .brand img { height: 46px; }
  .brand-row-inner { min-height: 70px; padding-top: 12px; padding-bottom: 12px; }

  .strip-grid { grid-template-columns: 1fr; gap: 16px; }
  .strip-grid h3 { font-size: 17px; }

  .lead-tile,
  .lead-image,
  .lead-image img { min-height: 300px; }
  .lead-overlay { padding: 100px 20px 22px; }
  .lead-overlay h1 { font-size: 28px; }

  .popular-card { grid-template-columns: 1fr; padding: 16px; }
  .popular-card article {
    border-bottom: 1px solid var(--soft-2);
    padding-bottom: 14px;
    margin-bottom: 14px;
  }
  .popular-card article:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

  .content-band { padding-top: 20px; padding-bottom: 34px; }
  .article-grid { grid-template-columns: 1fr; gap: 24px; }
  .section-head h2 { font-size: 22px; }

  .archive-head h1,
  .article-header h1 {
    font-size: clamp(31px, 9vw, 38px);
    line-height: 1.06;
  }

  .article-page {
    padding-top: 24px;
    padding-bottom: 42px;
  }
  .article-header {
    margin-bottom: 20px;
  }
  .share-row a {
    flex: 1 1 calc(50% - 4px);
  }
  .share-row button {
    flex: 1 1 calc(50% - 4px);
  }
  .story-embed--twitter iframe,
  .story-embed--instagram iframe,
  .story-embed--tiktok iframe {
    min-height: 520px;
  }
  .article-body { font-size: 17.5px; }
  .article-body blockquote { font-size: 19px; }
  .article-body h2 { font-size: 24px; }
  .article-body h3 { font-size: 20px; }

  .footer-inner { grid-template-columns: 1fr; gap: 26px; padding-top: 34px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   Reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
