/* ============================================================
   dayone — shared stylesheet
   ============================================================
   IndigoPress reference design. All pages in the site share this
   one file — re-skinning a fork is mostly an exercise in
   overriding the design tokens in §1 below.

   Token override paths, in order of increasing friction:
     1. design.json → "palette" / "typography" keys.
        The builder emits a <style>:root { … }</style> block
        that wins via cascade order. See README.md.
     2. Edit the :root block directly in this file.
     3. Fork style.css wholesale for a bespoke look.

   Used by every page the builder emits: index.html, article.html,
   page.html, search/, author/, 404/.
   ============================================================ */


/* ============================================================
   1. Design tokens
   ============================================================
   DayOne is a blue-palette editorial skin. Colour lives in two
   layers: the semantic tokens a component uses (--bg, --ink,
   --accent, …) and the two brand shades used only by the
   IndigoPress wordmark (--brand-a, --brand-b). The dark-mode
   block at §99 redefines the same tokens, so every component
   inherits the new palette without per-rule edits.
   ============================================================ */
:root, [data-theme="light"] {
  /* Surface */
  --bg:          #F7F8FC;
  --bg-alt:      #ECF0F7;
  --rule:        #D7DDE8;

  /* Ink */
  --ink:         #0B1E3F;   /* deep navy-ink, not pure black */
  --ink-muted:   #4A5A78;
  --ink-subtle:  #8892A6;

  /* Accent — links, kickers, hover */
  --accent:      #5729A6;   /* indigo-accent — mid indigo */
  --accent-hot:  #6140AC;   /* hover — primary indigo */

  /* Wordmark — the two shades used for "Indigo" / "Press".
     Indigo is the darker of the pair, Press is the brighter. */
  --brand-a:     #4C1C98;   /* "Indigo" — deep indigo */
  --brand-b:     #6140AC;   /* "Press" — primary indigo */

  /* Inverse block — newsletter widget etc. Kept as dedicated
     tokens so the block can change shape in dark mode without
     each rule caring. */
  --inverse-bg:  #0B1E3F;
  --inverse-ink: #F4F1EA;

  /* Type */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Merriweather', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1280px;
  --gutter:    1.25rem;
}


/* ============================================================
   2. Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Skip-to-content: visually off-screen until it receives keyboard
   focus, at which point it slides into view. A sighted keyboard
   user gets an escape hatch past the masthead + nav, screen
   readers get it as the first link in document order. */
.skip-link {
  position: absolute;
  top: -44px;
  left: 0;
  z-index: 10000;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* ============================================================
   3. Layout container
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}


/* ============================================================
   4. Masthead
   ============================================================ */
.masthead {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.25rem;
}
.masthead-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.masthead-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.masthead-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0;
}
.masthead-title a { color: inherit; text-decoration: none; }

/* Wordmark split — applied by theme.js when the site-name is
   CamelCase (e.g. "IndigoPress" → "Indigo"+"Press"). Left alone for
   regular site names. */
.wm-a { color: var(--brand-a); }
.wm-b { color: var(--brand-b); }

/* Theme toggle — pinned to the top-right of the viewport.
   Fixed (not absolute) for two reasons: it stays reachable
   as the reader scrolls, and it never collides with the
   masthead's flex layout regardless of viewport width. */
.theme-toggle {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(11, 30, 63, 0.06);
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-alt);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }


/* ============================================================
   5. Section navigation
   ============================================================ */
.section-nav {
  border-bottom: 1px solid var(--rule);
}
.section-nav-inner {
  display: flex;
  gap: 1.5rem;
  padding-block: 0.85rem;
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-nav-inner::-webkit-scrollbar { display: none; }
.section-nav-inner a {
  white-space: nowrap;
  padding-block: 0.25rem;
  transition: color 150ms ease;
}
.section-nav-inner a.is-active { color: var(--accent); }
.section-nav-inner a:hover { color: var(--accent); text-decoration: none; }


/* ============================================================
   5b. Breadcrumbs
   Separator is drawn via CSS ::before on each non-first <li>
   so it doesn't end up in screen-reader output. Kept subdued
   so it reads as orientation, not as a headline element. */
.breadcrumbs {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-block: 1.25rem 0.5rem;
  letter-spacing: 0.01em;
}
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}
.breadcrumbs li {
  display: inline;
}
.breadcrumbs li + li::before {
  content: "›";
  margin: 0 0.5em;
  color: var(--rule);
}
.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.breadcrumbs [aria-current="page"] {
  color: var(--ink);
}


/* ============================================================
   5c. Table of contents (long articles only — injected when
   the article crosses the word-count threshold in INGP_Builder).
   ============================================================ */
.toc {
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  margin-block: 1.75rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
}
.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.6rem;
}
.toc ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}
.toc ol ol {
  list-style: lower-alpha;
  margin-block: 0.25rem;
  padding-left: 1.25rem;
}
.toc li {
  margin-block: 0.2rem;
}
.toc a {
  color: var(--ink);
  text-decoration: none;
}
.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}


/* ============================================================
   6. Section label (shared — used above grids and widgets)
   ============================================================ */
.section-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ink);
  margin: 0 0 1.5rem;
}


/* ============================================================
   7. Hero — text overlaid on image (index.html)
   ============================================================ */
.hero {
  position: relative;
  margin-block: 1.75rem 2.5rem;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 5;
  background: #222;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,0.40) 60%,
    rgba(0,0,0,0.85) 100%
  );
  pointer-events: none;
}
.hero-text {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1.25rem;
  color: #fff;
  z-index: 1;
}
.hero-category {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #BFDBFE;
  margin: 0 0 0.65rem;
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.625rem, 5.5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.8rem;
  color: #fff;
}
.hero-headline a { color: #fff; text-decoration: none; }
.hero-headline a:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.6); }
.hero-dek {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 62ch;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.92);
}
.hero-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.82);
}
.hero-meta .dot { margin-inline: 0.45rem; opacity: 0.55; }


/* ============================================================
   8. Card grid — text below image (index.html)
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 2px;
}
.card-category {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0.85rem 0 0.4rem;
}
.card-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 0.55rem;
  color: var(--ink);
}
.card-headline a { color: var(--ink); text-decoration: none; }
.card-headline a:hover { color: var(--accent); }
.card-dek {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
}
.card-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ink-subtle);
}


/* ============================================================
   9. Two-column layout (feed.html)
   ============================================================ */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: 2rem 3rem;
}


/* ============================================================
   10. Feed column — horizontal article rows (feed.html)
   ============================================================ */
.feed-col {
  min-width: 0;
}

.row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.row:first-of-type { padding-top: 0.5rem; }
.row:last-of-type { border-bottom: none; }

.row-image {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-alt);
}
.row-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 350ms ease;
}
.row:hover .row-image img { transform: scale(1.03); }

.row-text { min-width: 0; }

.row-category {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.35rem;
}
.row-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.row-dek {
  /* Hidden on mobile, revealed at ≥768px */
  display: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
}
.row-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ink-subtle);
}


/* ============================================================
   11. Sidebar (feed.html)
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.widget-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ink);
  margin: 0 0 1rem;
}

/* --- Advertisement --- */
.ad {
  background: var(--bg-alt);
  border: 1px dashed #CFC8B7;
  padding: 1.25rem;
  text-align: center;
  border-radius: 2px;
}
.ad-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin: 0 0 0.6rem;
}
.ad-body {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 0;
  padding-block: 2rem;
}
.ad-large .ad-body { padding-block: 4rem; }

/* --- Most Read --- */
.most-read {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: mr;
}
.most-read li {
  counter-increment: mr;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.most-read li:last-child { border-bottom: none; padding-bottom: 0; }
.most-read li::before {
  content: counter(mr);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}
.most-read a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--ink);
}

/* --- Newsletter ---
   Uses --inverse-bg / --inverse-ink so the block can re-skin
   itself in dark mode without each nested rule needing an
   override. The rgba() alphas still hardcode a warm-white for
   the input chrome; dark mode overrides them at §99. */
.newsletter {
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  padding: 1.5rem 1.25rem;
  border-radius: 2px;
}
.newsletter h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--inverse-ink);
}
.newsletter p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  color: rgba(244, 241, 234, 0.78);
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.newsletter input[type="email"] {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(244, 241, 234, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: var(--inverse-ink);
  border-radius: 2px;
}
.newsletter input[type="email"]::placeholder { color: rgba(244, 241, 234, 0.5); }
.newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-hot);
  background: rgba(255, 255, 255, 0.08);
}
.newsletter button {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 150ms ease;
}
.newsletter button:hover { background: var(--accent-hot); }

/* --- Trending tags --- */
.trending {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.trending a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  background: var(--bg-alt);
  border-radius: 999px;
  color: var(--ink-muted);
  transition: all 150ms ease;
}
.trending a:hover {
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}


/* ============================================================
   12. Author pages
   ============================================================ */

.author-header {
  border-top: 3px solid var(--ink);
  padding-top: 1.5rem;
  margin-bottom: 2.5rem;
}
.author-kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.author-name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.1;
}
.author-bio {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 0 0.5rem;
}

/* Feed: one article per row */
.author-feed .cat-story {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.25rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.author-feed .cat-story:first-child { border-top: 1px solid var(--rule); }
.author-feed .cat-story:last-child  { border-bottom: none; }

.author-feed .cat-story img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
}
.author-feed .cat-story h2 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.3;
  margin: 0 0 0.3rem;
}
.author-feed .cat-story h2 a { color: var(--ink); text-decoration: none; }
.author-feed .cat-story h2 a:hover { color: var(--accent); }
.author-feed .cat-story p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0 0 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.author-feed .cat-byline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

/* No-image fallback: full width text */
.author-feed .cat-story:not(:has(img)) {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .author-feed .cat-story { grid-template-columns: 160px 1fr; gap: 1.5rem; }
  .author-feed .cat-story img { width: 160px; height: 105px; }
}


/* ============================================================
   13. Search results
   ============================================================ */

.result-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.result-item:first-child { border-top: 1px solid var(--rule); }
.result-item:nth-child(even) { background: var(--bg-alt); padding-inline: 0.75rem; margin-inline: -0.75rem; border-radius: 3px; }

.result-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}
.result-title a { color: var(--ink); text-decoration: none; }
.result-title a:hover { color: var(--accent); }

.result-excerpt {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.result-item mark {
  background: rgba(37, 99, 235, 0.14);
  color: var(--accent);
  font-style: normal;
  border-radius: 2px;
  padding: 0 2px;
}

.empty-state {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink-muted);
  padding: 2rem 0;
}

/* ============================================================
   13. Page template — static pages and category listings
   ============================================================ */

.page-main { padding-block: 2rem 4rem; }

.page-header {
  border-top: 3px solid var(--ink);
  padding-top: 1.25rem;
  margin-bottom: 1.75rem;
}

/* Kicker label — shown for category pages, empty for static */
.page-kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.4rem;
  min-height: 0;           /* collapses to nothing when empty */
}
.page-kicker:empty { display: none; }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

/* Static page body */
.page-body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: 680px;
}
.page-body:empty { display: none; }
.page-body h2 { font-family: var(--font-display); font-size: 1.5rem; margin-top: 2rem; }
.page-body h3 { font-family: var(--font-display); font-size: 1.25rem; margin-top: 1.5rem; }
.page-body a  { color: var(--accent); text-decoration: underline; }
.page-body p  { margin-block: 1rem; }
.page-body ul, .page-body ol { padding-left: 1.5rem; }

/* Category grid — hidden when empty (static pages) */
.cat-grid:empty { display: none; }


/* ============================================================
   14. Archive pages (category listings)
   ============================================================ */

.cat-header {
  border-top: 3px solid var(--ink);
  padding-top: 1.25rem;
  margin-block: 2rem 1.5rem;
}
.cat-kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.cat-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.1;
}
.author-bio {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 60ch;
  margin-top: 0.5rem;
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.cat-story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.cat-story:last-child { border-bottom: none; }
.cat-story img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.cat-story h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.22;
  margin: 0;
}
.cat-story h2 a { color: var(--ink); text-decoration: none; }
.cat-story h2 a:hover { color: var(--accent); }
.cat-story p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}
.cat-byline {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}


/* ============================================================
   13. Legal pages (privacy, terms, imprint)
   ============================================================ */

.legal-page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 5rem;
}

.legal-header {
  border-top: 3px solid var(--ink);
  padding-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.legal-kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

.legal-meta {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 0;
}
.legal-meta a { color: var(--ink-muted); text-decoration: underline; text-decoration-thickness: 1px; }

.legal-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
}
.legal-body h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin: 2.5rem 0 0.6rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--rule);
  line-height: 1.2;
}
.legal-body h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 1.75rem 0 0.4rem;
}
.legal-body p { margin: 0.9rem 0; }
.legal-body ul, .legal-body ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}
.legal-body li { margin-bottom: 0.4rem; }
.legal-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.legal-body strong { font-weight: 700; }

/* Imprint-specific: address block */
.legal-body address {
  font-style: normal;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Callout-style blocks for [BRACKETED] placeholder text */
.legal-body em {
  font-style: normal;
  background: rgba(37, 99, 235, 0.07);
  border: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: 3px;
  padding: 0 4px;
  font-family: var(--font-sans);
  font-size: 0.9em;
  color: var(--accent);
}


/* ============================================================
   15. Article page
   ============================================================ */

.article-wrap { padding-top: 2rem; padding-bottom: 4rem; }

.article-header {
  max-width: 720px;
  margin: 0 auto 1.5rem;
}

.article-kicker {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.14;
  margin: 0 0 1rem;
  font-weight: 700;
}

.article-byline {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.byline-author {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.byline-author:hover { color: var(--accent); text-decoration: underline; }

.modified-badge {
  font-size: 0.75rem;
  background: var(--bg-alt);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  color: var(--ink-muted);
}

/* Featured image and inline figures share the 720px body column so the
   lead art doesn't tower over the text it illustrates. */
.article-wrap .featured-image,
.article-wrap figure {
  max-width: 720px;
  margin: 1.5rem auto 2rem;
}
.article-wrap .featured-image img,
.article-wrap figure img {
  width: 100%;
  height: auto;
  display: block;
}
.article-wrap figcaption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-top: 0.4rem;
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
}
.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}
.post-content p,
.post-content li {
  text-align: justify;
  hyphens: auto;
}
.post-content p { margin-block: 1.1rem; }
.post-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0 1.5rem 1rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--ink-muted);
  font-style: italic;
}
.post-content img { max-width: 100%; height: auto; margin: 1.5rem auto; display: block; }
.post-content ul, .post-content ol { padding-left: 1.5rem; }
.post-content li { margin-block: 0.4rem; }
.post-content hr { border: none; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.post-content pre { background: var(--bg-alt); padding: 1rem; overflow-x: auto; font-size: 0.875rem; border-radius: 4px; }
.post-content code { font-size: 0.875em; background: var(--bg-alt); padding: 0.1em 0.35em; border-radius: 3px; }

/* Related stories — centered under the 720px body column. The emitted
   markup is <aside class="related"> with .related-heading and
   .related-list, so it needs its own column rule (the aside sits outside
   .post-content, so it doesn't inherit the body's max-width). */
.article-wrap .related {
  max-width: 720px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.article-wrap .related-heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}
.article-wrap .related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-wrap .related-list li {
  margin: 0.5rem 0;
}
.article-wrap .related-list a {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}
.article-wrap .related-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* In-article ad slot — same 720px column as the body. Invisible when the
   operator hasn't configured an ad; when configured, framed with an
   "Advertisement" kicker so readers can tell paid content from editorial. */
.article-wrap .ingp-da-slot {
  max-width: 720px;
  margin: 2.5rem auto;
  text-align: center;
}
.article-wrap .ingp-da-slot:empty { display: none; }
.article-wrap .ingp-da-slot:not(:empty) {
  padding: 1.5rem 1rem;
  background: var(--bg-alt);
  border-radius: 4px;
}
.article-wrap .ingp-da-slot:not(:empty)::before {
  content: "Advertisement";
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

/* ------------------------------------------------------------
   Two-column article layout
   ------------------------------------------------------------
   The grid-wrap IS the two-column grid: body column (720px) and
   sidebar column (280px). Putting the WHOLE article (header, image,
   body, related) in column 1 means the sidebar has the full article
   height to stick against — not just the short post-body row. Short
   posts no longer push the sidebar down into the middle of the page.

   Below 1080px the grid collapses to a single column and the sidebar
   stacks below the body.
   ------------------------------------------------------------ */
.article-wrap .article-grid-wrap {
  max-width: 1048px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 720px 280px;
  gap: 3rem;
  align-items: start;
}

/* Body column — all the per-article content stacks here. min-width:0
   prevents long code blocks / images from blowing out the track. */
.article-body {
  min-width: 0;
}

/* Body-column children no longer need their own max-width + auto margins —
   the 720px grid track already caps them. Reset the old 720px-centering
   rules so they fill their column. */
.article-body .article-header,
.article-body .featured-image,
.article-body > figure,
.article-body .toc,
.article-body > .ingp-da-slot,
.article-body .related {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.article-sidebar {
  position: sticky;
  top: 2rem;
  /* align-self: start keeps the sidebar anchored to the top of its
     grid track regardless of how tall the body column grows. */
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-family: var(--font-sans);
}
:is(.article-sidebar, .page-sidebar) .ingp-da-slot {
  max-width: none;
  margin: 0;
  text-align: center;
}
/* Sidebar ad keeps the "Advertisement" kicker from the shared rule but
   loses the 720px cap and auto-margin, since the column is already 280. */

/* Sidebar chrome — shared between article and page (category/static) sidebars.
   :is() lets one rule cover both .article-sidebar and .page-sidebar without
   repeating the comma list for every descendant. */
:is(.article-sidebar, .page-sidebar) .ingp-signup,
:is(.article-sidebar, .page-sidebar) .ingp-contact {
  background: var(--bg-alt);
  border-radius: 4px;
  padding: 1.25rem;
}
:is(.article-sidebar, .page-sidebar) .ingp-signup-heading,
:is(.article-sidebar, .page-sidebar) .ingp-contact-heading {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
  line-height: 1.2;
}
:is(.article-sidebar, .page-sidebar) .ingp-signup-lede {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
}
:is(.article-sidebar, .page-sidebar) .ingp-newsletter,
:is(.article-sidebar, .page-sidebar) .ingp-contact form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
:is(.article-sidebar, .page-sidebar) .ingp-newsletter-label,
:is(.article-sidebar, .page-sidebar) .ingp-contact form label {
  /* Field labels are self-explanatory from the placeholder; hide visually
     but keep in the DOM for screen readers. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
:is(.article-sidebar, .page-sidebar) .ingp-newsletter input[type="email"],
:is(.article-sidebar, .page-sidebar) .ingp-contact input,
:is(.article-sidebar, .page-sidebar) .ingp-contact textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font: inherit;
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--ink);
  box-sizing: border-box;
}
:is(.article-sidebar, .page-sidebar) .ingp-contact textarea {
  min-height: 90px;
  resize: vertical;
}
:is(.article-sidebar, .page-sidebar) .ingp-newsletter-btn,
:is(.article-sidebar, .page-sidebar) .ingp-contact button {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 3px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
:is(.article-sidebar, .page-sidebar) .ingp-newsletter-btn:hover,
:is(.article-sidebar, .page-sidebar) .ingp-contact button:hover {
  filter: brightness(0.92);
}
:is(.article-sidebar, .page-sidebar) .ingp-newsletter-msg {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
  min-height: 1em;
}
:is(.article-sidebar, .page-sidebar) .ingp-privacy-note,
:is(.article-sidebar, .page-sidebar) .privacy-consent {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  line-height: 1.45;
  margin: 0.5rem 0 0;
}

@media (max-width: 1080px) {
  .article-wrap .article-grid-wrap {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
  .article-sidebar {
    position: static;
    margin-top: 2rem;
  }
}

/* ============================================================
   Page grid — static pages and category listings
   ============================================================

   Mirror of the article-grid pattern: body column on the left,
   sticky sidebar with the same signup/contact/ad chrome on the
   right. Below 1024px the grid collapses to one column and the
   sidebar stacks below the body.
   ------------------------------------------------------------ */
.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.page-body-col {
  min-width: 0;
}

.page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-family: var(--font-sans);
}

@media (min-width: 1024px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 3rem;
    align-items: start;
  }
  .page-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
  }
  /* The body column is narrower than the full container once the 280px
     sidebar + 3rem gap are taken out. Step the cat-grid down from 3 to
     2 columns so cards don't get too cramped. */
  .page-grid .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   Sponsored content
   ============================================================

   Four touch-points:
     1. `.sponsored-badge`   — small pill on cards + lead kicker
     2. `.lead-kicker`       — wraps the badge above a lead story;
                               must be inline-block width, not full row
     3. `.sponsored-notice`  — compliance bar above a sponsored article
     4. `body.sponsored`     — subtle tint on the article page so
                               readers notice they're in paid territory
   ------------------------------------------------------------ */

.sponsored-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #8B6914;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  line-height: 1.3;
}

.lead-kicker {
  /* Shrink-wrap so the badge doesn't stretch across the full lead
     column — without this the kicker <div> takes 100% width and the
     badge floats alone at the left edge. */
  display: block;
  margin-bottom: 0.5rem;
}
.lead-kicker .sponsored-badge {
  /* No extra styling needed — the badge rule above handles it. */
}

/* Badge on stream/side cards — nudge it to sit beside the category
   kicker rather than below the headline. */
.card .sponsored-badge,
.sponsored-card .sponsored-badge {
  margin-right: 0.4rem;
  vertical-align: middle;
}

.sponsored-notice {
  /* Sits inside .container, so it aligns with the article body.
     Pale parchment + goldenrod rule so it reads as "disclosure"
     not "warning". */
  max-width: 1048px;
  margin: 1.5rem auto 0;
  padding: 0.6rem 0.9rem;
  background: #FAF5E6;
  border-left: 3px solid #8B6914;
  color: #5A4410;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.45;
  border-radius: 2px;
}

body.sponsored .article-wrap {
  /* Subtle parchment wash on the entire article canvas so the reader
     has a persistent visual cue they're in paid content. Kept very
     light — the sponsored-notice bar carries the explicit disclosure. */
  background: linear-gradient(to bottom, #FDFBF3 0, #FDFBF3 400px, transparent 800px);
}

[data-theme="dark"] .sponsored-notice {
  background: #2A2416;
  border-left-color: #C9A34A;
  color: #E8D9A8;
}
[data-theme="dark"] body.sponsored .article-wrap {
  background: linear-gradient(to bottom, #1A1608 0, #15120A 400px, transparent 800px);
}

/* Comments */
.comments-section {
  border-top: 1px solid var(--rule);
  padding-top: 2.5rem;
  margin-top: 2rem;
  max-width: 720px;
}
.comments-section h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-bottom: 1.5rem;
}
/* Comment list — separator on every comment after the first, plus
   a small Reply affordance and an "in reply to" line for threaded
   replies. Tree-ordered render in script.js attaches a depth-N class
   (0..3, capped) so we can indent replies under their parent visually.
   Cap matches WP's default threading sweet spot — past three levels,
   the "↳ in reply to {name}" pill carries the rest of the structure. */
.comment + .comment {
  border-top: 1px solid var(--rule);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}
.comment.depth-1 { margin-left: 1.5rem; }
.comment.depth-2 { margin-left: 3rem;   }
.comment.depth-3 { margin-left: 4.5rem; }
.comment-reply-to {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}
.comment-reply-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  cursor: pointer;
}
.comment-reply-btn:hover { color: var(--ink); text-decoration: underline; }
.reply-hint {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}
.reply-hint-cancel {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.comment-form h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.form-cols { display: grid; gap: 1rem; margin-bottom: 1rem; }
.form-row label { font-family: var(--font-sans); font-size: 0.875rem; display: block; margin-bottom: 0.3rem; }
.form-row input, .form-row textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
}
.form-row textarea { min-height: 120px; resize: vertical; margin-bottom: 1rem; }
.btn-comment {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-comment:hover { background: var(--accent); }


/* ============================================================
   12b. Shortcodes
   ============================================================

   Styles for classes emitted by ingp/lib/_shortcodes.php when it
   converts [caption], [gallery], [youtube], [su_*] and the
   INGP-native {{...}} equivalents into inline HTML at build time.
   Scoped inside .article-body so article content is styled, but
   category / static pages get the same treatment via .page-body.

   Kept together so the conversion behaviour and its visual rules
   live side-by-side — touching one pair reads cleanly next to
   the other.
   ------------------------------------------------------------ */

/* [caption] → <figure class="ingp-figure"> */
.ingp-figure {
  margin: 2rem 0;
}
.ingp-figure img { display: block; width: 100%; height: auto; }
.ingp-figure figcaption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  padding-top: 0.5rem;
  line-height: 1.45;
}
.ingp-figure.alignleft  { float: left;  margin-right: 1.5rem; max-width: 50%; }
.ingp-figure.alignright { float: right; margin-left:  1.5rem; max-width: 50%; }
.ingp-figure.aligncenter { text-align: center; }

/* [gallery] */
.ingp-gallery {
  display: grid;
  gap: 0.5rem;
  margin: 2rem 0;
  grid-template-columns: repeat(3, 1fr);
}
.ingp-gallery-cols-1 { grid-template-columns: 1fr; }
.ingp-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ingp-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ingp-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ingp-gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }
.ingp-gallery-cols-6 { grid-template-columns: repeat(6, 1fr); }
.ingp-gallery img { width: 100%; height: auto; display: block; }

/* [audio], [video] */
.ingp-audio, .ingp-video { display: block; width: 100%; margin: 1.5rem 0; }

/* [youtube], [vimeo], [embed] */
.ingp-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 2rem 0;
  background: var(--bg-alt);
}
.ingp-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* [su_quote], [su_pullquote] */
.ingp-quote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--ink);
}
.ingp-quote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-style: normal;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}
.ingp-pullquote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.35;
  max-width: 28ch;
  margin: 1.5rem auto;
  padding: 0.5rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  text-align: center;
  color: var(--ink);
}
.ingp-pullquote-left  { float: left;  margin: 0.5rem 2rem 1rem 0; }
.ingp-pullquote-right { float: right; margin: 0.5rem 0 1rem 2rem; }

/* [su_highlight] */
.ingp-highlight { background: #fff4a3; padding: 0.1em 0.25em; }

/* [su_dropcap] */
.ingp-dropcap {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 0.9;
  float: left;
  margin: 0.1em 0.1em 0 0;
  color: var(--accent);
}

/* [su_divider] */
.ingp-divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* [su_spacer], [su_spacing] */
.ingp-spacer { width: 100%; }

/* [su_button] */
.ingp-btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 3px;
  margin: 0.5rem 0;
}
.ingp-btn:hover { filter: brightness(0.9); }

/* [su_note], [su_box] */
.ingp-note, .ingp-box {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  font-family: var(--font-body);
}
.ingp-box-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  margin: 0 0 0.35rem;
}

/* [su_heading] */
.ingp-heading {
  font-family: var(--font-display);
  margin-top: 1.75rem;
}

/* [su_list] */
.ingp-list ul, .ingp-list ol { padding-left: 1.5rem; }

/* [su_spoiler] (HTML5 <details>) */
.ingp-spoiler {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border-radius: 3px;
}
.ingp-spoiler summary {
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.ingp-spoiler-body { margin-top: 0.75rem; }

/* Dark mode — tune the surfaces that were hard-coded light. */
@media (prefers-color-scheme: dark) {
  body.dark .ingp-highlight { background: #6b5800; color: #fff4a3; }
}
body.dark .ingp-highlight { background: #6b5800; color: #fff4a3; }


/* ============================================================
   13. Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}


/* ============================================================
   14. RESPONSIVE
   ============================================================
   Base (above)   = mobile  < 768px
   Tablet         ≥ 768px   (iPad portrait & up)
   Desktop        ≥ 1024px  (2-col feed layout activates here)
   Wide           ≥ 1440px
   ============================================================ */

/* --- iPad ≥ 768px --- */
@media (min-width: 768px) {
  :root { --gutter: 2rem; }

  .masthead-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  /* Archive grid — 2 cols on tablet */
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-story { grid-template-columns: 1fr; }

  /* Front grid — two side columns appear */
  .front-grid {
    grid-template-columns: 1fr 1px 2fr 1px 1fr;
    gap: 0 2rem;
  }
  .col-divider { display: block; background: var(--rule); }
  .lead-story, .side-col { padding-inline: 0; }
  .body-preview { display: block; }

  /* Category grid — 2 cols */
  .category-grid { grid-template-columns: 2fr 1fr 1fr; }

  /* Form cols */
  .form-cols { grid-template-columns: 1fr 1fr; }

  /* Hero (index) */
  .hero {
    aspect-ratio: 16 / 9;
    margin-block: 2.25rem 3rem;
  }
  .hero-text { padding: 2.25rem; max-width: 720px; }

  /* Card grid (index) */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }
  .card-headline { font-size: 1.4375rem; }

  /* Feed rows (feed) */
  .row {
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding-block: 1.75rem;
  }
  .row-headline { font-size: 1.3125rem; }
  .row-dek { display: block; }
}

/* --- Desktop ≥ 1024px --- */
@media (min-width: 1024px) {
  :root { --gutter: 2.5rem; }

  /* Archive grid — 3 cols on desktop */
  .cat-grid { grid-template-columns: repeat(3, 1fr); }

  /* Front grid — widen lead column */
  .front-grid { gap: 0 2.5rem; }
  .lead-story h2 { font-size: 2.25rem; }

  /* Hero (index) */
  .hero { aspect-ratio: 21 / 9; }
  .hero-text { padding: 3rem; }

  /* Card grid (index) */
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2.5rem;
  }
  .card-headline { font-size: 1.5rem; }

  /* Two-column split activates (feed) */
  .layout {
    grid-template-columns: 3fr 1fr;
    gap: 3rem;
  }

  /* Feed rows (feed) */
  .row {
    grid-template-columns: 240px 1fr;
    gap: 1.75rem;
    padding-block: 2rem;
  }
  .row-headline { font-size: 1.4375rem; }
}

/* --- Wide ≥ 1440px --- */
@media (min-width: 1440px) {
  .hero-text { padding: 3.5rem; }

  .layout { gap: 4rem; }
  .row { grid-template-columns: 280px 1fr; }
  .row-headline { font-size: 1.5rem; }
}

/* ============================================================
   Print stylesheet
   ============================================================
   Readers print articles for offline reading, clippings, or
   archival. Goal: one continuous readable column, black on
   white, no chrome. The printed page should be the article
   itself, its byline, and its body — nothing else.
   External link URLs are exposed after anchors so a printed
   reference still resolves back to the source. */
@media print {
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Strip chrome: nav, ads, comments, footer, forms, signup. */
  .masthead,
  .section-nav,
  .breadcrumbs,
  .toc,
  .ingp-da-slot,
  .ingp-signup,
  .article-sidebar,
  .comments-section,
  .comment-form,
  .footer,
  .sponsored-notice,
  .privacy-banner,
  .related,
  button,
  form,
  .skip-link {
    display: none !important;
  }

  /* Collapse the grid back to a single column for print. */
  .article-grid-wrap { display: block; max-width: none; }

  .container,
  .article-wrap,
  main {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .featured-image img,
  .post-content img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .article-kicker,
  .article-byline {
    color: #333 !important;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
    break-after: avoid;
    color: #000 !important;
  }
  p, li, blockquote {
    orphans: 3;
    widows: 3;
  }

  /* Expose external link destinations. Skip in-page (#…) and
     same-origin (/…) links to avoid noisy "(#comments)" trails. */
  a[href]:not([href^="#"]):not([href^="/"])::after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #555;
    word-break: break-all;
  }

  blockquote, figure, .pull-quote {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}


/* ============================================================
   99. Dark mode
   ============================================================
   Activated by theme.js which sets data-theme on <html> from
   localStorage or (first visit) from prefers-color-scheme. The
   dark palette is the same indigo skin pushed down into deep-
   indigo / near-black surfaces, with the accent lightened so
   it still has bite against the darker ground.

   Because the palette is tokens-only, every component inherits
   the new colours without per-rule edits. The exceptions —
   newsletter chrome and the featured-image gradient — live in
   this block.
   ============================================================ */
[data-theme="dark"] {
  --bg:          #0A1422;
  --bg-alt:      #132036;
  --rule:        #1F2D47;

  --ink:         #E8ECF5;
  --ink-muted:   #A9B3C7;
  --ink-subtle:  #6A7690;

  --accent:      #A78BFA;   /* light indigo — reads against dark bg */
  --accent-hot:  #C4B5FD;

  --brand-a:     #6140AC;   /* "Indigo" — saturated mid-indigo, reads against the near-black bg */
  --brand-b:     #C4B5FD;   /* "Press" — pale indigo, lifts off the bg */

  --inverse-bg:  #5729A6;   /* newsletter = saturated indigo block */
  --inverse-ink: #FFFFFF;
}

/* No-JS dark fallback — honour OS preference when theme.js hasn't run.
   The :not([data-theme]) guard makes this a strict fallback: once JS
   sets data-theme on <html>, the [data-theme="dark"] block above wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:          #0A1422;
    --bg-alt:      #132036;
    --rule:        #1F2D47;
    --ink:         #E8ECF5;
    --ink-muted:   #A9B3C7;
    --ink-subtle:  #6A7690;
    --accent:      #A78BFA;
    --accent-hot:  #C4B5FD;
    --brand-a:     #6140AC;
    --brand-b:     #C4B5FD;
    --inverse-bg:  #5729A6;
    --inverse-ink: #FFFFFF;
  }
}

/* The theme toggle button is JS-driven — hide it when JS hasn't run,
   surface a tiny inline hint via the sibling <noscript> instead. */
:root:not([data-theme]) .theme-toggle { display: none; }
.theme-noscript {
  display: inline-flex; align-items: center;
  font-size: 0.78rem; font-style: italic;
  color: var(--ink-subtle); padding: 0 8px;
  white-space: nowrap;
}

/* Search-match highlight needs a dark-mode alpha — the light
   rgba() gets lost against the dark bg. */
[data-theme="dark"] .result-item mark {
  background: rgba(96, 165, 250, 0.22);
}

/* Legal [BRACKETED] callouts — same story. */
[data-theme="dark"] .legal-body em {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.4);
}

/* Newsletter form chrome — the rgba(244,241,234,…) alphas above
   are warm-white and stop reading against the bright-blue dark
   newsletter block. Push them to plain white at matching alpha. */
[data-theme="dark"] .newsletter p {
  color: rgba(255, 255, 255, 0.82);
}
[data-theme="dark"] .newsletter input[type="email"] {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .newsletter input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
[data-theme="dark"] .newsletter button {
  background: #0B1E3F;
  color: #fff;
}
[data-theme="dark"] .newsletter button:hover {
  background: #09182F;
}

/* ── Privacy consent banner ────────────────────────────────────
   Emitted by {{privacy-banner}} when analytics_mode=full or the
   operator has pasted third-party trackers. Centered card docked
   at the viewport bottom; collapses to a full-width bar on small
   screens. Themed via semantic tokens so each design adapts. */
.ingp-privacy-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.125rem;
  background: #EAB308;
  color: #111;
  border: 1px solid #A16207;
  border-radius: 6px;
  box-shadow: 0 14px 48px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.14);
  font-size: 0.9rem;
  line-height: 1.45;
  z-index: 9999;
}
.ingp-privacy-banner-msg  { flex: 1; }
.ingp-privacy-banner-msg a { color: #111; text-decoration: underline; }
.ingp-privacy-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ingp-privacy-banner button {
  font: inherit;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.ingp-privacy-accept {
  background: #111;
  color: #fff;
  border-color: #111;
}
.ingp-privacy-accept:hover {
  background: #000;
}
.ingp-privacy-decline {
  background: transparent;
  color: #111;
  border-color: #111;
}
.ingp-privacy-decline:hover {
  background: rgba(0,0,0,0.08);
  color: #000;
  border-color: #000;
}
/* Phones: flatten to a full-width bar. Removes the floating-card
   feel when there's no room for it and keeps the buttons easy to
   tap. */
@media (max-width: 600px) {
  .ingp-privacy-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .ingp-privacy-banner-actions { justify-content: flex-end; }
}

/* ────────────── Standfirst + share row (between headline and byline) ────────────── */
.article-standfirst {
    font-size: 1.15em;
    line-height: 1.5;
    color: var(--mid, #555);
    font-style: italic;
    margin: 0.5rem 0 0.85rem;
    max-width: 38em;
}
/* ============================================================
   Share row — three palette modes × three mark compositions.
   ============================================================
   Markup is identical regardless of operator choice; visual
   decisions live entirely in this stylesheet. Two data attrs
   on the wrapper drive everything:
     data-share-style: mono | mono-hover | colour
     data-share-marks: icon | icon-label | label
   See ingp/lib/_share.php for the render side.
   ============================================================ */
.article-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin: 0.5rem 0 1rem;
    font-size: 0.85em;
}
.article-share-label {
    color: var(--ink-muted, var(--ink-soft, var(--ink-subtle, var(--mid, #666))));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.article-share-link,
.article-share-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--ink, #111);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.15em 0.1em;
    font: inherit;
    line-height: 1;
    transition: color 120ms ease;
}
.article-share-icon {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;
}
.article-share-text {
    /* Visible by default; hidden when data-share-marks="icon". */
    display: inline;
}

/* Hover/focus underline applies to every mode; colour-on-hover is
   handled below per data-share-style. */
.article-share-link:hover .article-share-text,
.article-share-copy:hover .article-share-text,
.article-share-link:focus-visible .article-share-text,
.article-share-copy:focus-visible .article-share-text {
    text-decoration: underline;
}

/* ── Marks: icon-only / icon+label / label-only ─────────────── */
.article-share[data-share-marks="icon"]  .article-share-text {
    /* Visually hidden but kept readable to screen readers + still
       picked up by aria-label fallbacks. Standard sr-only pattern. */
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.article-share[data-share-marks="label"] .article-share-icon {
    display: none;
}

/* ── Style: mono (default editorial) ─────────────────────────── */
.article-share[data-share-style="mono"] .article-share-link,
.article-share[data-share-style="mono"] .article-share-copy {
    color: var(--ink-muted, var(--ink-soft, var(--ink-subtle, var(--mid, #555))));
}
.article-share[data-share-style="mono"] .article-share-link:hover,
.article-share[data-share-style="mono"] .article-share-copy:hover,
.article-share[data-share-style="mono"] .article-share-link:focus-visible,
.article-share[data-share-style="mono"] .article-share-copy:focus-visible {
    color: var(--ink, #111);
}

/* ── Style: mono-hover (recommended default) ─────────────────── */
.article-share[data-share-style="mono-hover"] .article-share-link,
.article-share[data-share-style="mono-hover"] .article-share-copy {
    color: var(--ink-muted, var(--ink-soft, var(--ink-subtle, var(--mid, #555))));
}
.article-share[data-share-style="mono-hover"] [data-share-platform="x"]:hover,
.article-share[data-share-style="mono-hover"] [data-share-platform="x"]:focus-visible        { color: #000; }
.article-share[data-share-style="mono-hover"] [data-share-platform="facebook"]:hover,
.article-share[data-share-style="mono-hover"] [data-share-platform="facebook"]:focus-visible { color: #1877F2; }
.article-share[data-share-style="mono-hover"] [data-share-platform="linkedin"]:hover,
.article-share[data-share-style="mono-hover"] [data-share-platform="linkedin"]:focus-visible { color: #0A66C2; }
.article-share[data-share-style="mono-hover"] [data-share-platform="email"]:hover,
.article-share[data-share-style="mono-hover"] [data-share-platform="email"]:focus-visible,
.article-share[data-share-style="mono-hover"] [data-share-platform="copy"]:hover,
.article-share[data-share-style="mono-hover"] [data-share-platform="copy"]:focus-visible    { color: var(--accent, #5729A6); }

/* ── Style: colour (always brand-coloured) ───────────────────── */
.article-share[data-share-style="colour"] [data-share-platform="x"]        { color: #000; }
.article-share[data-share-style="colour"] [data-share-platform="facebook"] { color: #1877F2; }
.article-share[data-share-style="colour"] [data-share-platform="linkedin"] { color: #0A66C2; }
.article-share[data-share-style="colour"] [data-share-platform="email"]    { color: var(--accent, #5729A6); }
.article-share[data-share-style="colour"] [data-share-platform="copy"]     { color: var(--accent, #5729A6); }
.article-share[data-share-style="colour"] [data-share-platform]:hover,
.article-share[data-share-style="colour"] [data-share-platform]:focus-visible {
    filter: brightness(0.85);
}

/* ── Layout: menu (toggle + collapsible) ─────────────────────────
   Markup difference vs row mode: the leading "Share" label becomes
   a <button class="article-share-toggle">, and the platform buttons
   live inside a sibling .article-share-menu. Show/hide is keyed off
   aria-expanded on the toggle — single source of truth, so a screen
   reader and the visual layer can never disagree.                 */
.article-share[data-share-layout="menu"] .article-share-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--ink-muted, var(--ink-soft, var(--ink-subtle, var(--mid, #555))));
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.15em 0.1em;
    font: inherit;
    line-height: 1;
}
.article-share[data-share-layout="menu"] .article-share-toggle .article-share-label {
    /* Keep the existing label typography — same uppercase / weight / tracking. */
    font-size: inherit;
}
.article-share[data-share-layout="menu"] .article-share-toggle::after {
    content: "▾";
    display: inline-block;
    font-size: 0.85em;
    line-height: 1;
    transition: transform 120ms ease;
}
.article-share[data-share-layout="menu"] .article-share-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}
.article-share[data-share-layout="menu"] .article-share-menu {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}
.article-share[data-share-layout="menu"] .article-share-toggle[aria-expanded="true"] + .article-share-menu {
    display: inline-flex;
}
