/*
Theme Name: AI Blogs
Theme URI: https://aiblogs.example/
Author: AI Blogs
Author URI: https://aiblogs.example/
Description: A warm editorial blog theme inspired by Medium and slow-magazine layouts. Built for writing about how AI shows up in real work, study, medicine, and everyday life. Includes dark mode, reading progress, auto table of contents, bookmarks, custom comments, and a Customizer "Tweaks" panel for accent color, font pairing, density, card style, default theme, and hero variant.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-blogs
Tags: blog, two-columns, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready, block-styles, full-site-editing, dark-mode
*/

/* =========================================================
   AI Blogs — warm editorial system
   ========================================================= */

:root {
  --bg: #faf7f2;
  --bg-elev: #f3ede3;
  --paper: #ffffff;
  --line: #e6dfd2;
  --line-strong: #c8bda9;
  --ink: #1a1714;
  --ink-soft: #4a423a;
  --ink-muted: #847766;
  --accent: #c2410c;
  --accent-soft: #f8e7d7;
  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "Instrument Sans", "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius-card: 4px;
  --pad: 1;
  --gap: 48px;
  --content-max: 1280px;
}

[data-theme="dark"] {
  --bg: #171513;
  --bg-elev: #1f1c19;
  --paper: #1f1c19;
  --line: #2c2823;
  --line-strong: #423b33;
  --ink: #f4ede1;
  --ink-soft: #cdc2b1;
  --ink-muted: #8a7e6c;
  --accent-soft: #3a2418;
}

/* Font pairing variants (set via body class from customizer) */
.font-newsreader-instrument { --serif: "Newsreader", Georgia, serif; --sans: "Instrument Sans", system-ui, sans-serif; }
.font-sourceserif-dm        { --serif: "Source Serif 4", Georgia, serif; --sans: "DM Sans", system-ui, sans-serif; }
.font-ebgaramond-ibmplex    { --serif: "EB Garamond", Georgia, serif; --sans: "IBM Plex Sans", system-ui, sans-serif; }
.font-lora-geist            { --serif: "Lora", Georgia, serif; --sans: "Geist", system-ui, sans-serif; }

/* Density variants */
.density-compact { --pad: 0.75; --gap: 32px; }
.density-regular { --pad: 1;    --gap: 48px; }
.density-comfy   { --pad: 1.25; --gap: 64px; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body { min-height: 100vh; overflow-x: hidden; }

::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* =========================================================
   Reading progress bar (single.php)
   ========================================================= */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.reading-progress__bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* =========================================================
   Top Nav
   ========================================================= */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  max-width: var(--content-max);
  margin: 0 auto;
  gap: 32px;
}
.nav-left { display: flex; align-items: center; gap: 44px; min-width: 0; }
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-2px);
  flex-shrink: 0;
}
.brand-mark { font-style: italic; letter-spacing: -0.02em; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav-links a {
  color: inherit;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links .current-cat > a {
  color: var(--ink);
  border-color: var(--accent);
}

.nav-right { display: flex; align-items: center; gap: 16px; }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg-elev); color: var(--ink); }
.icon-btn.is-active { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 16px; height: 16px; }

.btn {
  font: 500 14px/1 var(--sans);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-elev); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

/* =========================================================
   Typography
   ========================================================= */
.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
.h-display em { font-style: italic; font-weight: 400; color: var(--accent); }

.h-1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
.h-2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
.h-3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

.eyebrow {
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.lede {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 400;
  text-wrap: pretty;
  margin: 0;
}
.muted { color: var(--ink-muted); }
.soft { color: var(--ink-soft); }

/* =========================================================
   Tag / Chip
   ========================================================= */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.tag.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.bullet { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-muted); display: inline-block; }

/* =========================================================
   Layout helpers
   ========================================================= */
.container {
  padding: 0 56px;
  max-width: var(--content-max);
  margin: 0 auto;
}
.col { display: flex; flex-direction: column; }
.row { display: flex; }
.row-center { display: flex; align-items: center; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; }
.gap-18 { gap: 18px; } .gap-24 { gap: 24px; }
hr.rule { border: none; border-top: 1px solid var(--line); margin: 0; }

/* =========================================================
   Avatar
   ========================================================= */
.avatar {
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font: 500 14px/1 var(--sans);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* =========================================================
   Card / Article card variants
   ========================================================= */
.card { background: transparent; }
.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-elev);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  display: block;
}
.card-img.tall { aspect-ratio: 4 / 5; }
.card-img.square { aspect-ratio: 1 / 1; }
.card-img.wide { aspect-ratio: 21 / 9; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.cards-framed .card.cardish {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.cards-floating .card.cardish {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(20,15,10,.02), 0 12px 24px -16px rgba(50,30,10,.10);
}
.cards-editorial .card.cardish { padding: 0; }

.card a { color: var(--ink); }
.card a:hover { color: var(--accent); text-decoration: none; }

.card-stack { display: flex; flex-direction: column; gap: 14px; }
.card-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: calc(14px * var(--pad)) 0;
  border-top: 1px solid var(--line);
}
.card-row .card-img { aspect-ratio: 4 / 3; border-radius: 6px; }
.card-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.card-feature .card-img { aspect-ratio: 5 / 4; }
.card-feature .card-title { font-size: clamp(36px, 4.2vw, 56px); }

.card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
}
.card-title a { color: inherit; }
.card-dek {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.card-byline {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  margin-top: 6px;
}

/* placeholder when no featured image */
.ph-bars {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,.04) 0 8px, transparent 8px 18px),
    var(--bg-elev);
  display: grid;
  place-items: center;
  font: 500 11px/1 var(--mono);
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px;
  text-align: center;
}

/* =========================================================
   Grids
   ========================================================= */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); row-gap: 56px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.grid-list { display: flex; flex-direction: column; }

/* =========================================================
   Hero variants
   ========================================================= */
.hero-editorial { padding: 64px 0 48px; }
.hero-editorial .hero-meta {
  display: flex; gap: 12px; align-items: center; margin-bottom: 22px;
}
.hero-editorial .hero-cta {
  display: flex; gap: 24px; margin-top: 36px; align-items: center; flex-wrap: wrap;
}

.hero-split {
  padding: 48px 0 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-split .card-img { aspect-ratio: 4 / 5; border-radius: 8px; }

.hero-list {
  padding: 56px 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
}
.hero-list .hero-feed { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.hero-list .hero-feed a {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  align-items: center;
}
.hero-list .hero-feed a:hover { color: var(--accent); }
.hero-list .feed-num { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.hero-list .feed-title { font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.2; display: block; }
.hero-list .feed-meta { font-size: 13px; color: var(--ink-muted); display: block; margin-top: 4px; }

/* =========================================================
   Section headers
   ========================================================= */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head .see-all { font-size: 14px; color: var(--ink-soft); }

/* =========================================================
   Newsletter CTA block
   ========================================================= */
.newsletter-block {
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 44px;
  position: relative;
  overflow: hidden;
}
.newsletter-block .signup-row {
  display: flex; margin-top: 24px; gap: 8px; max-width: 440px; flex-wrap: wrap;
}
.newsletter-block input[type="email"] {
  flex: 1; min-width: 200px;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font: 15px var(--sans);
  outline: none;
}
.newsletter-block input[type="email"]:focus { border-color: var(--accent); }
.newsletter-block .social-row { margin-top: 18px; display: flex; gap: 18px; align-items: center; }
.newsletter-block .avatar-stack { display: flex; }
.newsletter-block .avatar-stack .avatar { border: 2px solid var(--bg-elev); margin-left: -10px; }
.newsletter-block .avatar-stack .avatar:first-child { margin-left: 0; }

/* =========================================================
   Sections list (home + about)
   ========================================================= */
.sections-list { display: flex; flex-direction: column; margin-top: 16px; }
.sections-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.sections-list a:hover { color: var(--accent); }
.sections-list .sec-title { font-family: var(--serif); font-weight: 500; font-size: 19px; }
.sections-list .sec-desc { margin: 4px 0 0; font-size: 14px; color: var(--ink-muted); }
.sections-list .sec-count { align-self: center; color: var(--ink-muted); font-size: 13px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 48px 56px 36px;
  background: var(--bg);
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: var(--content-max);
  margin: 0 auto;
}
.site-footer h4 {
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin: 0 0 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }

/* =========================================================
   Category hero band
   ========================================================= */
.cat-hero {
  padding: 64px 0 36px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.cat-hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 56px;
}
.cat-hero .breadcrumb {
  display: flex; gap: 8px; align-items: center; margin-bottom: 14px; font-size: 13px;
}
.cat-hero .cat-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: end;
}
.cat-hero .cat-stats { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--ink-soft); }
.cat-hero .cat-stats .stat-row {
  display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line);
}
.cat-hero .cat-stats .stat-row:last-child { border-bottom: 1px solid var(--line); }
.cat-hero .cat-stats strong { font-family: var(--serif); font-weight: 500; }

.topic-filters {
  padding: 36px 0 0;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* =========================================================
   Single Article (single.php)
   ========================================================= */
.article-head { padding: 64px 56px 32px; max-width: 1200px; margin: 0 auto; }
.article-breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 24px; font-size: 13px; }
.article-meta-row { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.article-title { font-size: clamp(36px, 5vw, 68px); max-width: 1000px; }
.article-lede { margin-top: 22px; max-width: 820px; }

.article-byline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin-top: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.byline-author { display: flex; gap: 14px; align-items: center; }
.byline-author strong { font-family: var(--serif); font-weight: 500; font-size: 18px; display: block; }
.byline-author .byline-sub { font-size: 13px; color: var(--ink-muted); }
.article-actions { display: flex; gap: 8px; }

.article-hero-img {
  max-width: 1100px;
  margin: 32px auto 8px;
  aspect-ratio: 21 / 9;
  height: auto;
  border-radius: 8px;
}
.article-caption {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 13px;
  padding: 0 56px;
  color: var(--ink-muted);
}

.article-grid {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 48px;
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 0 56px;
}
.article-toc { position: sticky; top: 90px; align-self: flex-start; }
.article-toc h4 {
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.article-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.article-toc li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: baseline; }
.article-toc .toc-num { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.article-toc a {
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  display: block;
}
.article-toc li.is-active a { color: var(--ink); border-color: var(--accent); }
.article-toc li.is-active .toc-num { color: var(--accent); }

.ai-summary-btn {
  margin-top: 28px;
  padding: 10px 14px;
  font-size: 13px;
  width: 100%;
  justify-content: flex-start !important;
}
.ai-summary-panel {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 32px;
  display: none;
}
.ai-summary-panel.is-open { display: block; }
.ai-summary-panel header {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
}
.ai-summary-panel .close-btn {
  background: transparent; border: none; color: var(--accent); margin-left: auto; cursor: pointer;
}
.ai-summary-panel p {
  margin: 0; color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.55;
}

/* Article prose */
.prose {
  max-width: 680px;
  margin: 0 auto;
}
.prose, .entry-content {
  font-family: var(--serif);
}
.entry-content p,
.prose p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.entry-content > p:first-of-type::first-letter,
.prose > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 76px;
  line-height: 0.85;
  padding: 8px 12px 0 0;
  color: var(--accent);
  font-weight: 500;
}
.entry-content h2,
.prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}
.entry-content h3,
.prose h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}
.entry-content blockquote,
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.entry-content ul, .prose ul,
.entry-content ol, .prose ol { padding-left: 22px; margin: 0 0 22px; }
.entry-content li, .prose li {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  margin: 6px 0;
}
.entry-content figure,
.prose figure { margin: 32px 0; }
.entry-content figcaption,
.prose figcaption { font-size: 13px; color: var(--ink-muted); margin-top: 8px; text-align: center; }
.entry-content code, .prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-elev);
  padding: 2px 6px;
  border-radius: 4px;
}
.entry-content pre, .prose pre {
  font-family: var(--mono);
  background: var(--bg-elev);
  padding: 18px 22px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--line);
}
.entry-content a, .prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* End-of-article action bar */
.article-actions-bar {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.article-actions-bar .spacer { flex: 1; }

/* About-author aside */
.author-aside h4 {
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.author-aside .card-img { aspect-ratio: 1 / 1; border-radius: 8px; margin-bottom: 14px; }
.author-aside strong { font-family: var(--serif); font-weight: 500; font-size: 18px; }
.author-aside .author-bio {
  margin: 6px 0 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.5;
}
.author-aside .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* =========================================================
   Comments
   ========================================================= */
.comments-area { margin-top: 48px; }
.comments-area h3 { margin-bottom: 18px; }
.comment-respond {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.comment-respond .comment-respond-body { flex: 1; }
.comment-respond textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  border: none;
  outline: none;
  background: transparent;
  font: 16px var(--sans);
  color: var(--ink);
}
.comment-respond .form-submit-row {
  display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 12px; flex-wrap: wrap;
}
.comment-respond .form-hint { font-size: 12px; color: var(--ink-muted); }

.comment-form-inputs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px;
}
.comment-form-inputs input {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 14px var(--sans);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.comment-list .children {
  list-style: none;
  padding: 0 0 0 50px;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.comment-body {
  display: flex; gap: 14px; align-items: flex-start;
}
.comment-body .comment-content { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.comment-body .comment-author { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.comment-body .comment-author strong { font-family: var(--serif); font-weight: 500; }
.comment-body .comment-author .comment-time { font-size: 12px; color: var(--ink-muted); }
.comment-body p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.comment-body .reply { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.comment-body .reply a { color: inherit; }
.comment-body .reply a:hover { color: var(--accent); }

/* =========================================================
   Search page
   ========================================================= */
.search-header { padding: 48px 0 24px; }
.search-input-row {
  display: flex; gap: 12px; align-items: center; margin-top: 14px;
  border-bottom: 2px solid var(--ink);
  padding: 8px 0;
}
.search-input-row input {
  flex: 1; border: none; outline: none; background: transparent;
  font: 500 clamp(24px, 3vw, 36px)/1.1 var(--serif);
  color: var(--ink);
  letter-spacing: -0.02em;
}
.kbd {
  display: inline-flex; align-items: center;
  font: 500 11px/1 var(--mono);
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--bg-elev);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.search-results-summary { margin-top: 14px; font-size: 14px; }

.search-layout {
  padding: 24px 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
}
.search-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 90px; align-self: flex-start; }
.search-sidebar h4 {
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin: 0 0 12px;
}
.search-sidebar .filter-group { display: flex; flex-direction: column; gap: 8px; }
.search-sidebar label {
  display: flex; gap: 10px; align-items: center;
  font-size: 14px; color: var(--ink-soft); cursor: pointer;
}
.search-sidebar input[type="checkbox"],
.search-sidebar input[type="radio"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
.search-sidebar select {
  width: 100%; padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font: 14px var(--sans);
}

.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.active-filters .tag.accent button {
  border: none; background: transparent; color: inherit; cursor: pointer; padding: 0; margin-left: 4px; font-size: inherit;
}
.related-authors {
  margin-top: 40px;
  padding: 28px;
  background: var(--bg-elev);
  border-radius: 10px;
}
.related-authors .authors-row {
  display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap;
}
.author-chip {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 16px; background: var(--paper);
  border-radius: 999px; border: 1px solid var(--line);
}
.author-chip strong { font-family: var(--serif); font-weight: 500; font-size: 15px; }
.author-chip .author-chip-sub { font-size: 12px; color: var(--ink-muted); display: block; margin-top: 2px; }

/* =========================================================
   Author page
   ========================================================= */
.author-cover {
  height: 200px;
  background: linear-gradient(120deg, var(--accent-soft), transparent 60%), var(--bg-elev);
  position: relative;
  overflow: hidden;
}
.author-cover .ph-bars { opacity: 0.3; }
.author-head {
  padding: 0 56px;
  margin-top: -64px;
  position: relative;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}
.author-head-row {
  display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap;
}
.author-avatar-lg {
  width: 144px; height: 144px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font: 500 56px/1 var(--sans);
  border: 6px solid var(--bg);
  flex-shrink: 0;
}
.author-avatar-lg img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.author-name-block { flex: 1; padding-bottom: 12px; min-width: 200px; }
.author-name-block .role { color: var(--ink-soft); font-size: 16px; margin: 6px 0 0; }
.author-actions { display: flex; gap: 10px; padding-bottom: 12px; flex-wrap: wrap; }

.author-bio-row {
  display: flex; gap: 32px; margin-top: 28px; align-items: flex-start; flex-wrap: wrap;
}
.author-bio-row .bio-text { flex: 1; max-width: 720px; margin: 0; }
.author-stats { display: flex; flex-direction: column; gap: 10px; min-width: 240px; font-size: 14px; color: var(--ink-soft); }
.author-stats .stat-row { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.author-stats strong { font-family: var(--serif); font-weight: 500; }

.author-tabs {
  display: flex; gap: 24px; border-bottom: 1px solid var(--line);
  padding: 40px 0 0;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: 56px;
  padding-right: 56px;
}
.author-tabs a {
  padding: 14px 4px; font-size: 14px; text-decoration: none;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.author-tabs a.is-active { color: var(--ink); border-color: var(--accent); }

/* =========================================================
   About page
   ========================================================= */
.about-hero { padding: 88px 56px 56px; max-width: 1100px; margin: 0 auto; }
.about-hero .h-display { font-size: clamp(40px, 7vw, 84px); margin-top: 14px; }
.about-hero .lede { margin-top: 26px; max-width: 760px; font-size: clamp(18px, 2vw, 24px); }
.about-img { padding: 40px 56px 64px; max-width: 1100px; margin: 0 auto; }
.about-img .card-img { aspect-ratio: 21 / 9; border-radius: 12px; height: auto; }
.about-2col {
  padding: 32px 56px 64px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.about-2col h2 { margin-bottom: 14px; }
.about-2col p { font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

.principles { padding: 32px 56px 80px; max-width: 1100px; margin: 0 auto; }
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.principle .principle-num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; }
.principle h3 { margin: 10px 0 8px; font-size: 20px; }
.principle p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

.editors { padding: 64px 56px 64px; max-width: 1100px; margin: 0 auto; }
.editors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.editor-card .editor-tile {
  width: 100%; aspect-ratio: 4 / 5;
  background: var(--accent);
  border-radius: 8px;
  display: grid; place-items: center;
  color: #fff;
  font: 500 64px/1 var(--sans);
  overflow: hidden;
}
.editor-card .editor-tile img { width: 100%; height: 100%; object-fit: cover; }
.editor-card strong { font-family: var(--serif); font-weight: 500; font-size: 18px; display: block; margin-top: 12px; }
.editor-card .editor-sub { color: var(--ink-muted); font-size: 13px; margin: 4px 0 0; }

.write-cta {
  padding: 32px 56px 88px; max-width: 1100px; margin: 0 auto;
}
.write-cta .write-inner {
  background: var(--ink); color: var(--bg);
  border-radius: 12px; padding: 56px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
}
.write-cta h2 { color: var(--bg); font-size: clamp(28px, 3.6vw, 42px); margin: 0; }
.write-cta p { margin-top: 14px; font-family: var(--serif); font-size: 19px; line-height: 1.55; color: rgba(250,247,242,0.8); max-width: 540px; }
.write-cta .write-actions { display: flex; flex-direction: column; gap: 12px; }
.write-cta .btn-ghost { color: var(--bg); border-color: rgba(250,247,242,0.3); }

/* =========================================================
   Newsletter page
   ========================================================= */
.newsletter-hero {
  padding: 88px 56px 64px;
  background: var(--bg-elev);
}
.newsletter-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 56px; align-items: center;
}
.newsletter-form-card {
  margin-top: 32px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 520px;
}
.newsletter-form-card label.label-cap {
  font: 500 12px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 10px;
}
.newsletter-form-card input[type="email"] {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: 17px var(--sans);
  outline: none;
  margin-bottom: 18px;
}
.newsletter-form-card .pickers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.newsletter-form-card .cadence-row { display: flex; gap: 6px; margin-bottom: 22px; }
.newsletter-form-card .cadence-row .tag { flex: 1; justify-content: center; }
.newsletter-form-card .submit-row {
  width: 100%; justify-content: center; padding: 16px; font-size: 15px;
}
.newsletter-form-card .legal {
  margin-top: 12px; margin-bottom: 0; font-size: 12px; text-align: center; color: var(--ink-muted);
}

.issue-preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 24px 48px -28px rgba(80,40,10,.18);
}
.issue-preview header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.issue-preview ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.issue-preview li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.issue-preview .issue-eye { font: 500 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-muted); }
.issue-preview .issue-sub { font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; display: block; }
.issue-preview .issue-title { font-family: var(--serif); font-size: 15px; line-height: 1.35; display: block; }

.testimonials { padding: 64px 56px; }
.testimonials-inner { max-width: 1100px; margin: 0 auto; }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.testimonial {
  margin: 0; padding: 24px;
  background: var(--bg-elev);
  border-radius: 10px;
}
.testimonial p { font-family: var(--serif); font-size: 18px; line-height: 1.55; color: var(--ink); margin: 0; }
.testimonial .who { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
.testimonial .who strong { font-weight: 500; font-size: 13px; display: block; }
.testimonial .who .who-role { color: var(--ink-muted); font-size: 12px; display: block; }

/* =========================================================
   Pagination
   ========================================================= */
.pagination {
  margin: 56px 0 0;
  display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.pagination a, .pagination .current {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.pagination .current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================
   Misc
   ========================================================= */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.alignleft { float: left; margin: 0 24px 24px 0; }
.alignright { float: right; margin: 0 0 24px 24px; }
.aligncenter { display: block; margin: 24px auto; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

/* sticky positioning helper */
.sticky-90 { position: sticky; top: 90px; align-self: flex-start; }

/* Custom scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
   Responsive
   ========================================================= */
/* Nav becomes hamburger earlier than other layout changes —
   the full 7-item menu + icons + Subscribe needs ~1220-1280px to fit cleanly. */
@media (max-width: 1280px) {
  .nav { padding: 18px 24px; gap: 12px; }
  .nav-left { gap: 20px; min-width: 0; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; }
}

@media (max-width: 1100px) {
  .article-grid { grid-template-columns: 1fr; padding: 0 24px; }
  .article-toc { position: static; display: none; }
  .author-aside { display: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .editors-grid { grid-template-columns: repeat(2, 1fr); }
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .newsletter-hero-inner { grid-template-columns: 1fr; }
  .write-cta .write-inner { grid-template-columns: 1fr; padding: 36px; }
  .cat-hero .cat-grid { grid-template-columns: 1fr; }
  .search-layout { grid-template-columns: 1fr; }
  .search-sidebar { position: static; }
  .hero-split, .hero-list { grid-template-columns: 1fr; }
  .card-feature { grid-template-columns: 1fr; gap: 24px; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-2col { grid-template-columns: 1fr; gap: 32px; }

  .container { padding: 0 24px; }
  .article-head { padding-left: 24px; padding-right: 24px; }
  .article-caption { padding: 0 24px; }
  .site-footer { padding-left: 24px; padding-right: 24px; }
  .cat-hero-inner { padding: 0 24px; }
  .author-head { padding: 0 24px; }
  .author-tabs { padding-left: 24px; padding-right: 24px; }
  .about-hero, .about-img, .about-2col, .principles, .editors, .write-cta { padding-left: 24px; padding-right: 24px; }
  .newsletter-hero { padding: 64px 24px; }
  .testimonials { padding: 48px 24px; }
  .article-hero-img { max-width: calc(100vw - 48px); margin-left: 24px; margin-right: 24px; }
}

@media (max-width: 720px) {
  .nav { padding: 14px 16px; gap: 10px; }
  .nav-left { gap: 14px; }
  .nav-right .subscribe-btn { display: none; }
  .container { padding: 0 16px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .editors-grid, .principles-grid { grid-template-columns: 1fr; }
  .article-head { padding: 32px 16px 24px; }
  .article-grid { padding: 0 16px; margin-top: 32px; }
  .article-hero-img { margin-left: 16px; margin-right: 16px; max-width: calc(100vw - 32px); }
  .article-caption { padding: 0 16px; }
  .card-row { grid-template-columns: 1fr; gap: 12px; }
  .site-footer { padding: 36px 16px 24px; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-hero, .about-img, .about-2col, .principles, .editors, .write-cta { padding-left: 16px; padding-right: 16px; }
  .newsletter-hero { padding: 48px 16px; }
  .testimonials { padding: 36px 16px; }
  .cat-hero-inner, .author-head, .author-tabs { padding-left: 16px; padding-right: 16px; }
  .write-cta .write-inner { padding: 28px 16px; }
  .author-tabs { gap: 12px; overflow-x: auto; padding-top: 20px; }
  .h-display { font-size: clamp(32px, 9vw, 56px); }
  .entry-content > p:first-of-type::first-letter,
  .prose > p:first-of-type::first-letter { font-size: 56px; padding: 6px 10px 0 0; }
}

/* =========================================================
   MAGAZINE-COVER HERO + NEW HOMEPAGE SECTIONS
   ========================================================= */

/* ── Magazine hero ─────────────────────────────────────── */
.hero-magazine {
  position: relative;
  padding: 32px 0 0;
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg-elev) 50%, var(--bg)) 100%);
}
.hero-magazine .container { max-width: var(--content-max); margin: 0 auto; padding: 0 56px; }

.masthead-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
.masthead-left, .masthead-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.masthead-right { color: var(--ink-soft); gap: 16px; }
.issue-num { font-family: var(--serif); font-weight: 500; letter-spacing: 0.02em; }
.kicker { font: 500 12px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.14em; }
.live-stat { display: inline-flex; gap: 8px; align-items: center; }
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #16a34a;
  opacity: 0.6;
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}
.live-stat strong { color: var(--ink); }

.hero-cover-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  padding: 56px 0 48px;
  align-items: start;
}

.hero-meta-row { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.hero-meta-row .tag { font-size: 11px; padding: 6px 10px; }

.hero-headline {
  font-size: clamp(48px, 6.5vw, 92px) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 1100px;
  text-wrap: balance;
}
.hero-headline em {
  font-style: italic;
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.hero-headline em::after {
  content: '';
  position: absolute;
  bottom: 0.08em; left: -0.06em; right: -0.06em;
  height: 0.22em;
  background: var(--accent-soft);
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-0.5deg);
}

.hero-dek {
  margin-top: 26px;
  max-width: 560px;
  font-size: clamp(18px, 1.6vw, 22px);
}

.hero-byline {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-byline .byline-meta { display: flex; flex-direction: column; gap: 2px; }
.hero-byline .byline-meta strong { font-family: var(--serif); font-weight: 500; font-size: 15px; }
.hero-byline .byline-sub { font-size: 13px; }
.hero-byline .vbar { width: 1px; height: 32px; background: var(--line); margin: 0 4px; }
.hero-cta-btn { padding: 12px 20px; color: #fff !important; }

.hero-cover-image { position: relative; }
.hero-cover-img {
  aspect-ratio: 4/5;
  border-radius: 4px;
  display: block;
  overflow: hidden;
}
.hero-cover-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hero-cover-img:hover img { transform: scale(1.02); }

.hero-chip-top {
  position: absolute;
  left: -18px;
  top: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font: 500 12px var(--sans);
  box-shadow: 0 12px 24px -16px rgba(50, 30, 10, 0.25);
  z-index: 2;
}

.hero-pull-callout {
  position: absolute;
  right: -12px;
  bottom: 32px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  padding: 14px 18px;
  max-width: 240px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 18px 36px -18px rgba(20, 15, 10, 0.35);
  z-index: 2;
}
.hero-pull-callout .eyebrow { font-size: 10px; }
.hero-pull-callout p { margin: 8px 0 0; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.35; color: var(--bg); }

.in-this-issue {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.in-this-issue .it-label { flex-shrink: 0; }
.in-this-issue .it-track {
  display: flex;
  gap: 24px;
  align-items: center;
  overflow-x: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.in-this-issue .it-track::-webkit-scrollbar { display: none; }
.issue-item {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
}
.issue-item:hover { color: var(--accent); }
.issue-kicker { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; }
.issue-title { font-family: var(--serif); font-size: 14px; color: var(--ink-soft); }
.issue-item:hover .issue-title { color: var(--ink); }

/* ── Where to start ───────────────────────────────────── */
.where-to-start { padding: 72px 56px 56px; }
.wts-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; gap: 16px; flex-wrap: wrap; }
.section-intro { margin: 6px 0 32px; font-size: 15px; color: var(--ink-muted); max-width: 640px; }

.paths-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.path-card {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.path-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -20px rgba(50, 30, 10, 0.18);
}
.path-head { display: flex; gap: 10px; align-items: center; }
.path-glyph {
  width: 28px; height: 28px;
  border-radius: 6px;
  color: #fff;
  display: grid; place-items: center;
  font: 500 12px/1 var(--mono);
  flex-shrink: 0;
}
.path-role { font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 1.3; }
.path-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.path-item { display: flex; gap: 10px; align-items: baseline; }
.path-item .path-num { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); flex-shrink: 0; }
.path-item a { font-family: var(--serif); font-size: 15px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.path-item a:hover { color: var(--accent); }
.path-cta {
  margin-top: auto;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

/* ── Editor's pick + Latest stories sections ─────────── */
.editors-pick-section { padding: 56px 56px 64px; }
.latest-stories-section { padding: 56px 56px 64px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.section-head .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head .see-all { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.section-head .see-all:hover { color: var(--accent); }

/* ── Pull-quote moment ─────────────────────────────── */
.pull-quote-moment {
  padding: clamp(72px, 10vw, 120px) 56px;
  background: var(--ink);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.pull-quote-moment::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.06;
  filter: blur(60px);
  pointer-events: none;
}
.pq-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.pq-mark {
  font-family: var(--serif);
  font-size: clamp(120px, 16vw, 200px);
  line-height: 0.7;
  color: var(--accent);
  display: block;
  height: clamp(60px, 8vw, 80px);
  user-select: none;
}
.pq-text {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--bg);
  max-width: 1000px;
  text-wrap: balance;
}
.pq-tail { color: var(--accent); font-style: italic; }
.pq-attribution {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.pq-author { display: flex; gap: 14px; align-items: center; }
.pq-author-meta { display: flex; flex-direction: column; gap: 2px; }
.pq-author-meta strong { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.pq-source { font-size: 13px; color: rgba(250, 247, 242, 0.6); }
.pq-spacer { flex: 1; }
.btn-on-dark {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--ink) !important;
  padding: 12px 20px;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  font: 500 14px var(--sans);
  border: 1px solid var(--bg);
  transition: transform 0.2s ease;
}
.btn-on-dark:hover { transform: translateY(-1px); }

/* ── Topics worth discussing ─────────────────────────── */
.topics-worth { padding: 72px 56px 56px; }
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.topic-card {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.topic-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -20px rgba(50, 30, 10, 0.18); }
.topic-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.topic-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #16a34a;
}
.topic-status .status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #16a34a; flex-shrink: 0;
}
.topic-q {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 22px);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}
.topic-context { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.topic-cta-row { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.topic-cta { font-size: 13px; text-decoration: none; font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }

/* ── Founder spotlight ───────────────────────────────── */
.founder-spotlight { padding: 72px 56px 56px; }
.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: center;
}
.founder-portrait-wrap { position: relative; }
.founder-portrait {
  aspect-ratio: 4/5;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.founder-portrait img { width: 100%; height: 100%; object-fit: cover; }
.founder-initials {
  color: #fff;
  font: 500 96px/1 var(--sans);
  letter-spacing: 0.02em;
}
.founder-badge {
  position: absolute;
  bottom: -18px; left: -18px;
  color: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  font: 500 12px var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  box-shadow: 0 12px 24px -14px rgba(50, 30, 10, 0.3);
}
.founder-text > .eyebrow { margin-bottom: 12px; display: inline-block; }
.founder-name { font-size: clamp(36px, 4.5vw, 56px); margin: 0; }
.founder-role { font-size: 15px; margin: 4px 0 0; }
.founder-bio { margin-top: 24px; font-size: clamp(17px, 1.6vw, 21px); max-width: 580px; }
.founder-posts { display: flex; flex-direction: column; margin-top: 28px; }
.founder-post-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  align-items: center;
}
.founder-post-row:hover { color: var(--accent); }
.founder-post-row:hover .founder-post-title { color: var(--accent); }
.founder-post-date { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); letter-spacing: 0.05em; }
.founder-post-title { font-family: var(--serif); font-weight: 500; font-size: 17px; line-height: 1.3; transition: color 0.15s; }
.founder-post-read { font-size: 13px; }
.founder-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ── Two-up section (Newsletter + Sections) ──────────── */
.two-up-section {
  padding: 64px 56px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
}
.sections-column { display: flex; flex-direction: column; }

/* ── Archive section ─────────────────────────────────── */
.archive-section { padding: 40px 56px 80px; }
.archive-section h2 { margin-bottom: 28px; }

/* =========================================================
   RESPONSIVE — magazine hero + new sections
   ========================================================= */

@media (max-width: 1280px) {
  .hero-magazine .container { padding: 0 24px; }
  .where-to-start { padding-left: 24px; padding-right: 24px; }
  .editors-pick-section,
  .latest-stories-section { padding-left: 24px; padding-right: 24px; }
  .pull-quote-moment { padding-left: 24px; padding-right: 24px; }
  .topics-worth { padding-left: 24px; padding-right: 24px; }
  .founder-spotlight { padding-left: 24px; padding-right: 24px; }
  .two-up-section { padding-left: 24px; padding-right: 24px; }
  .archive-section { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 1100px) {
  .hero-cover-grid { grid-template-columns: 1fr; gap: 36px; padding: 36px 0; }
  .hero-cover-image { max-width: 540px; margin: 0 auto; width: 100%; }
  .hero-headline { font-size: clamp(40px, 7vw, 64px) !important; }
  .hero-chip-top { left: 8px; top: 16px; }
  .hero-pull-callout { right: 8px; bottom: 16px; max-width: 200px; padding: 12px 14px; }
  .hero-pull-callout p { font-size: 14px; }

  .paths-grid { grid-template-columns: repeat(2, 1fr); }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .founder-grid { grid-template-columns: 1fr; gap: 36px; }
  .founder-portrait-wrap { max-width: 480px; margin: 0 auto; width: 100%; }
  .two-up-section { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; padding-bottom: 48px; }

  .where-to-start,
  .editors-pick-section,
  .latest-stories-section,
  .topics-worth,
  .founder-spotlight { padding-top: 56px; padding-bottom: 48px; }
}

@media (max-width: 720px) {
  .hero-magazine { padding-top: 16px; }
  .hero-magazine .container { padding: 0 16px; }
  .masthead-band { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .masthead-left, .masthead-right { font-size: 12px; gap: 10px; }
  .masthead-right { width: 100%; flex-wrap: wrap; }
  .hero-cover-grid { padding: 32px 0; gap: 28px; }
  .hero-headline { font-size: clamp(32px, 9vw, 48px) !important; }
  .hero-dek { font-size: 17px; margin-top: 20px; }
  .hero-byline { gap: 12px; margin-top: 24px; flex-wrap: wrap; }
  .hero-byline .vbar { display: none; }
  .hero-cta-btn { width: 100%; justify-content: center; order: 99; }
  .hero-chip-top { font-size: 11px; padding: 6px 12px; left: 12px; top: 12px; }
  .hero-pull-callout { padding: 10px 14px; max-width: 180px; font-size: 12px; right: 12px; bottom: 12px; }
  .hero-pull-callout p { font-size: 13px; }
  .in-this-issue { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 0; }
  .in-this-issue .it-track { width: 100%; gap: 18px; padding-bottom: 4px; }

  .paths-grid { grid-template-columns: 1fr; gap: 16px; }
  .topics-grid { grid-template-columns: 1fr; gap: 16px; }
  .where-to-start,
  .editors-pick-section,
  .latest-stories-section,
  .topics-worth,
  .founder-spotlight { padding-left: 16px; padding-right: 16px; padding-top: 40px; padding-bottom: 36px; }
  .two-up-section { padding: 36px 16px; gap: 32px; }
  .archive-section { padding: 24px 16px 56px; }

  .pull-quote-moment { padding: 64px 16px; }
  .pq-mark { font-size: clamp(80px, 22vw, 120px); height: clamp(40px, 12vw, 60px); }
  .pq-text { font-size: clamp(22px, 6vw, 32px); }
  .pq-attribution { gap: 12px; }
  .pq-attribution .btn-on-dark { width: 100%; justify-content: center; }

  .founder-portrait .founder-initials { font-size: 64px; }
  .founder-badge { font-size: 11px; padding: 10px 14px; bottom: -14px; left: -10px; }
  .founder-name { font-size: clamp(30px, 8vw, 40px); }
  .founder-bio { font-size: 17px; margin-top: 18px; }
  .founder-post-row { grid-template-columns: 48px 1fr; gap: 10px; padding: 14px 0; }
  .founder-post-read { display: none; }
  .founder-post-title { font-size: 16px; }
  .founder-actions { gap: 8px; }
  .founder-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  .hero-headline { font-size: clamp(28px, 9vw, 38px) !important; }
  .hero-pull-callout { display: none; }
  .hero-chip-top { font-size: 10px; padding: 5px 10px; }
  .path-card, .topic-card { padding: 18px; }
}

/* =========================================================
   COMMENT FORM FIX (WP outputs <form class="comment-respond">)
   ========================================================= */
form.comment-respond,
form#commentform {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px 12px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  align-items: start;
}
form.comment-respond > p,
form#commentform > p { margin: 0; }
form.comment-respond .comment-notes,
form#commentform .comment-notes {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}
form.comment-respond textarea,
form#commentform textarea#comment {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  border: 1px solid var(--line);
  outline: none;
  background: var(--bg);
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  padding: 14px;
  border-radius: 8px;
  display: block;
}
form.comment-respond .comment-form-author { grid-column: 1; }
form.comment-respond .comment-form-email  { grid-column: 2; }
form.comment-respond .comment-form-url    { grid-column: 3; }
form.comment-respond .comment-form-author label,
form.comment-respond .comment-form-email  label,
form.comment-respond .comment-form-url    label {
  display: block;
  font: 500 11px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin: 0 0 6px;
}
form.comment-respond .comment-form-author input,
form.comment-respond .comment-form-email  input,
form.comment-respond .comment-form-url    input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: 14px var(--sans);
  outline: none;
}
form.comment-respond input:focus,
form.comment-respond textarea:focus { border-color: var(--accent); }
form.comment-respond .comment-form-cookies-consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}
form.comment-respond .form-submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

@media (max-width: 720px) {
  form.comment-respond,
  form#commentform { grid-template-columns: 1fr; }
  form.comment-respond .comment-form-author,
  form.comment-respond .comment-form-email,
  form.comment-respond .comment-form-url { grid-column: 1; }
}

/* Mobile nav drawer (open state) */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 12px 20px 24px;
}
.nav-mobile-menu.is-open { display: flex; }
.nav-mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.nav-mobile-menu a:last-child { border-bottom: 0; }
