/* ==========================================================================
   21percent.org — Redesign
   Aesthetic: preserved from current site (greyscale, enso brushstroke logo,
   serif display type). Adds editorial layout + full comment interaction system.
   ========================================================================== */

/* --- Type Scale --- */
:root {
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* --- Spacing --- */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;
  --space-32: 8rem;

  /* --- Fonts --- */
  --font-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* --- Radius & motion --- */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Widths */
  --content-narrow: 680px;
  --content-default: 1100px;
  --content-wide: 1320px;
}

/* --- LIGHT MODE (default — matches current site's grey character) --- */
:root, [data-theme="light"] {
  /* Warm, editorial off-white — much easier to read than the current dark grey */
  --color-bg: #efeeea;
  --color-surface: #f6f5f1;
  --color-surface-2: #fbfaf6;
  --color-surface-offset: #e5e3dd;
  --color-surface-dynamic: #d8d6d0;
  --color-divider: #c9c6bf;
  --color-border: #b8b5ad;

  /* The site's ink — the enso is drawn in this */
  --color-ink: #0d0d0c;
  --color-text: #1a1a19;
  --color-text-muted: #5a5854;
  --color-text-faint: #8a8883;
  --color-text-inverse: #f6f5f1;

  /* Nav / header — a deep charcoal echoing the current site's grey nav bar */
  --color-header: #2b2a28;
  --color-header-text: #f6f5f1;
  --color-header-muted: #b8b5ad;

  /* Accent — a muted oxblood, quiet but serious. Used only for calls to
     action, upvote-active state, and the "Live" indicator. */
  --color-accent: #8a2a1f;
  --color-accent-hover: #6e2118;
  --color-accent-highlight: #ecd8d4;

  /* Semantic */
  --color-upvote: #437a22;
  --color-downvote: #964219;
  --color-flag: #8a2a1f;
  --color-like: #a13544;

  --shadow-sm: 0 1px 2px rgba(20, 20, 18, 0.06);
  --shadow-md: 0 4px 14px rgba(20, 20, 18, 0.08);
  --shadow-lg: 0 20px 40px rgba(20, 20, 18, 0.12);
}

/* --- DARK MODE --- */
[data-theme="dark"] {
  --color-bg: #16161a;
  --color-surface: #1c1c20;
  --color-surface-2: #22222a;
  --color-surface-offset: #26262c;
  --color-surface-dynamic: #34343a;
  --color-divider: #2b2b31;
  --color-border: #3a3a40;

  --color-ink: #f6f5f1;
  --color-text: #e5e4e0;
  --color-text-muted: #98968f;
  --color-text-faint: #6a6862;
  --color-text-inverse: #16161a;

  --color-header: #0d0d0f;
  --color-header-text: #f6f5f1;
  --color-header-muted: #98968f;

  --color-accent: #c76659;
  --color-accent-hover: #d97e73;
  --color-accent-highlight: #3b2825;

  --color-upvote: #6daa45;
  --color-downvote: #d9905a;
  --color-flag: #c76659;
  --color-like: #dd6974;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.6);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
p { text-wrap: pretty; }

::selection { background: var(--color-ink); color: var(--color-bg); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

a, button, [role="button"] {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

/* ==========================================================================
   HEADER — echoes current site's dark charcoal nav band + centered enso mark
   ========================================================================== */
.site-header {
  background: var(--color-header);
  color: var(--color-header-text);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.site-header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-header-text);
}

.logo-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}
.logo-wordmark small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-header-muted);
  margin-top: 3px;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .site-header .logo-wordmark small { display: none; }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
}

.site-nav a {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-header-muted);
  padding: var(--space-2) 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--color-header-text);
  border-bottom-color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-header-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { color: var(--color-header-text); background: rgba(255,255,255,0.08); }

@media (max-width: 900px) {
  .site-header-inner { grid-template-columns: auto 1fr; }
  .site-nav { display: none; }
  .site-nav.mobile-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--color-header);
    flex-direction: column;
    padding: var(--space-4) var(--space-6);
    gap: var(--space-4);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .site-nav a { text-align: left; }
  .mobile-toggle { display: inline-flex; }
}
@media (min-width: 901px) { .mobile-toggle { display: none; } }

/* ==========================================================================
   HERO — front-page "wordmark" moment. Echoes the current homepage's giant
   serif 21 Group inside the enso, but reframes it as an editorial masthead
   with a live tribunal banner below.
   ========================================================================== */
.hero {
  padding: var(--space-16) var(--space-6) var(--space-12);
  border-bottom: 1px solid var(--color-divider);
  background:
    radial-gradient(ellipse at 50% 40%, var(--color-surface) 0%, transparent 60%),
    var(--color-bg);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-10); }
}

.hero-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 0 var(--color-accent);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(138,42,31,0.7); }
  70% { box-shadow: 0 0 0 12px rgba(138,42,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(138,42,31,0); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 0.95;
  color: var(--color-ink);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}
.hero h1 em { font-style: italic; color: var(--color-accent); font-weight: 400; }

.hero-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 34ch;
  margin-bottom: var(--space-8);
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.hero-meta strong { color: var(--color-ink); font-weight: 600; }

.hero-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  position: relative;
}
.hero-mark svg {
  width: 100%;
  max-width: 460px;
  height: auto;
}

/* ==========================================================================
   TRIBUNAL BAR — a horizontal live-coverage rail below the hero.
   ========================================================================== */
.tribunal-bar {
  background: var(--color-ink);
  color: var(--color-surface);
  padding: var(--space-4) var(--space-6);
}
.tribunal-bar-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.tribunal-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-muted);
}
.tribunal-headline {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  flex: 1;
  min-width: 220px;
}
.tribunal-links {
  display: flex; gap: var(--space-5);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tribunal-links a { color: var(--color-surface); border-bottom: 1px solid rgba(255,255,255,0.25); padding-bottom: 2px; }
.tribunal-links a:hover { border-bottom-color: var(--color-accent); color: var(--color-accent); }

/* ==========================================================================
   POSTS GRID
   ========================================================================== */
.section {
  padding: var(--space-16) var(--space-6);
}
.section-inner { max-width: var(--content-wide); margin: 0 auto; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-ink);
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  font-style: italic;
}
.section-title a {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 3px;
}
.section-title a:hover { color: var(--color-ink); border-bottom-color: var(--color-ink); }

.posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-12);
}
@media (max-width: 900px) { .posts-grid { grid-template-columns: 1fr; gap: var(--space-10); } }

.posts-main { display: flex; flex-direction: column; gap: var(--space-10); }

.post-lead {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-divider);
}
@media (max-width: 700px) { .post-lead { grid-template-columns: 1fr; } }

.post-lead .kicker,
.post-card .kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.post-lead h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-4);
  color: var(--color-ink);
}
.post-lead h3 a:hover { color: var(--color-accent); }

.post-lead p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.65;
  margin-bottom: var(--space-5);
}

.post-meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  align-items: center;
}
.post-meta .dot { color: var(--color-border); }
.post-meta .comments {
  color: var(--color-text);
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
}
.post-meta .comments svg { width: 14px; height: 14px; }

.post-lead-figure {
  background: var(--color-surface-offset);
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 1px solid var(--color-divider);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-lead-figure svg { width: 60%; height: 60%; opacity: 0.85; }

/* Post cards */
.post-card {
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-divider);
}
.post-card:last-child { border-bottom: none; }

.post-card h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-3);
  color: var(--color-ink);
  line-height: 1.15;
}
.post-card h4 a:hover { color: var(--color-accent); }

.post-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: var(--space-10); }

.side-block h3 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-5);
  font-weight: 600;
}

.most-discussed { display: flex; flex-direction: column; gap: var(--space-5); }
.discussed-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
}
.discussed-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text-faint);
  line-height: 1;
  min-width: 32px;
}
.discussed-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.25;
  color: var(--color-ink);
  margin-bottom: var(--space-2);
}
.discussed-title:hover { color: var(--color-accent); }
.discussed-meta {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.support-card {
  background: var(--color-ink);
  color: var(--color-surface);
  padding: var(--space-6);
  border-radius: var(--radius-sm);
}
.support-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-surface);
  border: none;
  padding: 0;
  margin-bottom: var(--space-3);
  letter-spacing: normal;
  text-transform: none;
  font-weight: 500;
}
.support-card p {
  font-size: var(--text-sm);
  color: rgba(246,245,241,0.75);
  margin-bottom: var(--space-5);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
}
.btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-surface); }
.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-surface);
}
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }

/* ==========================================================================
   ARTICLE PAGE
   ========================================================================== */
.article-wrap { padding: var(--space-12) var(--space-6) var(--space-16); }
.article {
  max-width: var(--content-narrow);
  margin: 0 auto;
}
.article-header { margin-bottom: var(--space-10); text-align: center; }
.article-header .kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.article-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: var(--space-6);
  line-height: 1.1;
}
.article-byline {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.article-body { font-size: 1.0625rem; line-height: 1.65; }
.article-body p { margin-bottom: var(--space-5); color: var(--color-text); }
.article-body .lede {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--color-ink);
  margin-bottom: var(--space-8);
}
.article-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-2) var(--space-6);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--color-text);
  margin: var(--space-8) 0;
}

.article-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6) 0;
  margin: var(--space-8) 0;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.article-tools .share-links { display: flex; gap: var(--space-4); }
.article-tools a:hover { color: var(--color-accent); }

/* ==========================================================================
   COMMENTS — full interactive system
   ========================================================================== */
.comments-section {
  max-width: 820px;
  margin: 0 auto;
  padding-top: var(--space-8);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-ink);
  margin-bottom: var(--space-6);
}
.comments-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  font-weight: 500;
}
.comments-count { color: var(--color-text-muted); font-family: var(--font-body); font-style: normal; font-size: var(--text-base); margin-left: var(--space-3); }

.sort-tabs {
  display: flex;
  gap: var(--space-1);
  background: var(--color-surface-offset);
  padding: 4px;
  border-radius: var(--radius-full);
}
.sort-tab {
  padding: 6px var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
}
.sort-tab.active {
  background: var(--color-ink);
  color: var(--color-surface);
}
.sort-tab:hover:not(.active) { color: var(--color-ink); }

/* Composer */
.composer {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-8);
}
.composer textarea {
  width: 100%;
  min-height: 96px;
  border: none;
  background: transparent;
  resize: vertical;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  outline: none;
  line-height: 1.5;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  margin-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.composer-hint { font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.05em; }
.name-input {
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 6px var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
  min-width: 160px;
}
.name-input:focus { border-color: var(--color-ink); }

/* Comment tree */
.comment-list { display: flex; flex-direction: column; gap: var(--space-5); }

/* Article is a plain block so nested .comment-replies (a sibling of
   .comment-inner) can never be squeezed by grid auto-flow. The grid
   lives one level deeper on .comment-inner. */
.comment {
  display: block;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.comment-inner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--space-4);
}
.comment:first-child { border-top: none; padding-top: 0; }

/* Pinned comment gets a subtle emphasis */
.comment.pinned {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.pinned-tag {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  white-space: nowrap;
}
.pinned-tag svg { width: 14px; height: 14px; flex-shrink: 0; }

.vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 2px;
}
.vote-btn {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
}
.vote-btn:hover { background: var(--color-surface-offset); color: var(--color-text); }
.vote-btn.active.up { color: var(--color-upvote); background: color-mix(in oklab, var(--color-upvote) 15%, transparent); }
.vote-btn.active.down { color: var(--color-downvote); background: color-mix(in oklab, var(--color-downvote) 15%, transparent); }
.vote-btn svg { width: 18px; height: 18px; }
.vote-score {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  min-width: 24px;
  text-align: center;
  font-family: var(--font-mono);
}
.vote-score.positive { color: var(--color-upvote); }
.vote-score.negative { color: var(--color-downvote); }

.comment-body { min-width: 0; word-wrap: break-word; overflow-wrap: break-word; }
.comment-text { min-width: 0; overflow-wrap: break-word; word-break: normal; hyphens: auto; }
.comment-text a { word-break: break-all; }
.comment-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.commenter-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-ink);
}
.commenter-badge {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-surface);
}
.commenter-badge.editor { background: var(--color-accent); }
.commenter-badge.verified { background: var(--color-upvote); }
.comment-time { font-size: var(--text-xs); color: var(--color-text-faint); }
.comment-text {
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.comment-text p + p { margin-top: var(--space-2); }

.comment-actions {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  align-items: center;
  flex-wrap: wrap;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  font-weight: 500;
  font-size: var(--text-xs);
}
.action-btn:hover { color: var(--color-ink); background: var(--color-surface-offset); }
.action-btn svg { width: 14px; height: 14px; }

.action-btn.like.active { color: var(--color-like); }
.action-btn.like.active svg { fill: currentColor; }
.action-btn.flag.active { color: var(--color-flag); }
.action-btn.flag.active svg { fill: currentColor; }
.action-count { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* Replies (indented tree) */
.comment-replies {
  margin-top: var(--space-4);
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.comment-replies .comment { padding-top: var(--space-3); }

/* Reply composer */
.reply-composer {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}
.reply-composer textarea {
  width: 100%;
  min-height: 60px;
  border: none;
  background: transparent;
  resize: vertical;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  outline: none;
  color: var(--color-text);
}
.reply-composer .composer-footer { padding-top: var(--space-2); margin-top: var(--space-2); }
.reply-composer.hidden { display: none; }

/* Flag confirmation dialog */
.flag-menu {
  position: absolute;
  z-index: 20;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.flag-menu button {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.flag-menu button:hover { background: var(--color-surface-offset); }

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-ink);
  color: var(--color-surface);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: transform 250ms cubic-bezier(0.16,1,0.3,1), opacity 250ms;
  pointer-events: none;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-ink);
  color: var(--color-surface);
  padding: var(--space-16) var(--space-6) var(--space-8);
  margin-top: var(--space-16);
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-10);
}
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand { max-width: 340px; }
.footer-brand .logo-wordmark small { letter-spacing: 0.12em; white-space: nowrap; }
.footer-brand p {
  color: rgba(246,245,241,0.65);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  line-height: 1.6;
}
.footer-brand .logo-wordmark { color: var(--color-surface); }
.footer-brand .logo-wordmark small { color: rgba(246,245,241,0.55); }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(246,245,241,0.55);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { color: var(--color-surface); font-size: var(--text-sm); border-bottom: 1px solid transparent; }
.footer-col a:hover { border-bottom-color: var(--color-accent); color: var(--color-accent); }

.footer-legal {
  max-width: var(--content-wide);
  margin: var(--space-10) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(246,245,241,0.1);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246,245,241,0.5);
}

.mobile-toggle svg { width: 20px; height: 20px; }

/* ============================================================
   A-REAL variant additions — hero removed, proper blog index
   ============================================================ */

/* Compact masthead sitting under the header */
.masthead {
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-surface);
  padding: 2.75rem 0 2.5rem;
}
.masthead-inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--space-gutter);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-6);
}
.masthead-mark { display: grid; place-items: center; }
.masthead-mark svg { width: 110px; height: 110px; color: var(--color-ink); }
.masthead-strap {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text);
  max-width: 56ch;
  font-style: italic;
}
.masthead-strap strong {
  font-style: normal;
  font-weight: 500;
  color: var(--color-ink);
}
.masthead-note {
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted);
  max-width: 52ch;
}
@media (max-width: 720px) {
  .masthead-inner { grid-template-columns: 1fr; text-align: center; gap: var(--space-4); }
  .masthead-mark svg { width: 88px; height: 88px; }
  .masthead-strap { max-width: none; font-size: 1.1875rem; }
  .masthead-note { max-width: none; margin-left: auto; margin-right: auto; }
}

/* Blog index — lead post at top */
.feed-wrap {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: var(--space-7) var(--space-gutter);
}

.feed-lead {
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: 2.25rem;
  max-width: 1080px;
}
.feed-lead-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 2.25rem;
  align-items: center;
}
.feed-lead .lead-text { min-width: 0; }
.feed-lead .lead-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 300px;
  overflow: hidden;
  background: var(--color-surface-2);
  display: block;
  box-shadow: 0 1px 0 var(--color-rule);
}
.feed-lead .lead-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  filter: saturate(0.9);
  transition: transform 400ms ease;
}
.feed-lead .lead-image:hover img { transform: scale(1.02); }
.feed-lead .kicker {
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.feed-lead h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0.6rem 0 1rem;
}
.feed-lead h2 a { color: var(--color-ink); }
.feed-lead h2 a:hover { color: var(--color-accent); }
.feed-lead p.lead-dek {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 1.15rem;
  max-width: 60ch;
}
@media (max-width: 780px) {
  .feed-lead-split { grid-template-columns: 1fr; gap: 1.5rem; }
  .feed-lead-split .lead-image { order: -1; aspect-ratio: 16 / 10; max-height: 260px; }
}
.feed-lead .post-meta { color: var(--color-muted); font-size: var(--text-sm); }

/* Feed section title */
.feed-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: 0;
  margin-top: 0;
}
.feed-section-title h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
.feed-section-title h3 em { font-style: italic; color: var(--color-accent); }
.feed-section-title .pagination {
  display: flex;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.06em;
}
.feed-section-title .pagination a { color: var(--color-muted); }
.feed-section-title .pagination a:hover, .feed-section-title .pagination .current { color: var(--color-accent); }
.feed-section-title .pagination .current { font-weight: 700; }

/* Feed items — two column grid, each an article card */
.feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 0;
  column-gap: 0;
}
.feed-item {
  padding: 1.75rem 2rem 1.75rem 0;
  border-bottom: 1px solid var(--color-rule);
  border-right: 1px solid var(--color-rule);
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 1.35rem;
  align-items: start;
}
.feed-item:nth-child(even) { padding-right: 0; padding-left: 2rem; border-right: 0; }
.feed-item:nth-last-child(-n+2) { border-bottom: 0; }
.feed-item .thumb {
  width: 116px;
  height: 116px;
  overflow: hidden;
  background: var(--color-surface-2);
  border: 1px solid var(--color-rule);
  position: relative;
  transition: transform 250ms ease;
}
.feed-item .thumb:hover { transform: translateY(-1px); }
.feed-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
}
.feed-item .thumb-num {
  position: absolute;
  top: 6px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #fff;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  background: rgba(20,20,18,0.72);
  backdrop-filter: blur(4px);
}
.feed-item .thumb.thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-muted);
  font-size: 2.5rem;
}
.feed-item .kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.55rem;
  font-weight: 600;
}
.feed-item h4 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
  color: var(--color-ink);
}
.feed-item h4 a { color: var(--color-ink); }
.feed-item h4 a:hover { color: var(--color-accent); }
.feed-item p {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.0625rem;
  color: var(--color-text);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}
.feed-item .post-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-muted);
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
  letter-spacing: 0.02em;
}
.feed-item .post-meta .commenting {
  color: var(--color-accent);
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  font-weight: 600;
}
@media (max-width: 800px) {
  .feed-grid { grid-template-columns: 1fr; }
  .feed-item, .feed-item:nth-child(even) { padding: 1.75rem 0; border-right: 0; padding-left: 0; grid-template-columns: 96px 1fr; gap: 1.15rem; }
  .feed-item .thumb { width: 96px; height: 96px; }
}

/* More-from-the-blog + about strip */
.about-strip {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
  padding: var(--space-6) 0;
  margin-top: var(--space-6);
}
.about-strip-inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--space-gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.about-strip h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.about-strip h3 em { font-style: italic; color: var(--color-accent); }
.about-strip p {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.0625rem;
  color: var(--color-text);
  line-height: 1.55;
  margin-bottom: 0.85rem;
  max-width: 52ch;
}
.about-strip .cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 3px;
}
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tags-cloud a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-rule);
  background: var(--color-surface);
  font-size: 0.8125rem;
  color: var(--color-text);
  font-family: var(--font-sans);
}
.tags-cloud a:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }
@media (max-width: 800px) { .about-strip-inner { grid-template-columns: 1fr; } }

/* ==========================================================================
   Article figures + horizontal separator
   ========================================================================== */
.article-figure {
  margin: var(--space-8) 0;
  text-align: center;
}
.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
}
.article-figure figcaption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 0.65rem;
  letter-spacing: 0.02em;
}
hr.article-sep {
  border: 0;
  height: 1px;
  background: var(--color-rule);
  margin: var(--space-8) auto;
  max-width: 240px;
}
.article-body h2, .article-body h3, .article-body h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  margin: var(--space-8) 0 var(--space-3);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.article-body h2 { font-size: 1.75rem; }
.article-body h3 { font-size: 1.375rem; }
.article-body h4 { font-size: 1.125rem; font-family: var(--font-sans); letter-spacing: 0; }
.article-body ul, .article-body ol {
  margin: 0 0 var(--space-5) 1.25rem;
  padding-left: 0.25rem;
  color: var(--color-text);
  line-height: 1.65;
}
.article-body li { margin-bottom: 0.35rem; }

/* ==========================================================================
   Share menu (article + per-comment)
   ========================================================================== */
.share-menu {
  position: absolute;
  z-index: 200;
  width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  padding: 0.5rem;
  font-family: var(--font-sans);
  animation: share-menu-in 120ms ease-out;
}
@keyframes share-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.share-menu-header {
  padding: 0.35rem 0.65rem 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.share-menu a, .share-menu button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: transparent;
  border: 0;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
  text-decoration: none;
}
.share-menu a:hover, .share-menu button:hover {
  background: var(--color-surface-2);
  color: var(--color-ink);
  text-decoration: none;
}
.share-menu .share-icon svg {
  width: 16px;
  height: 16px;
  color: var(--color-text);
  display: block;
}
.share-menu .share-url {
  margin-top: 0.4rem;
  padding: 0.4rem 0.5rem 0.2rem;
  border-top: 1px solid var(--color-rule);
}
.share-menu .share-url input {
  width: 100%;
  border: 1px solid var(--color-rule);
  background: var(--color-surface-2);
  padding: 0.4rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-muted);
  border-radius: 3px;
}

/* ==========================================================================
   Cite modal
   ========================================================================== */
.cite-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20, 15, 12, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  animation: fade-in 140ms ease-out;
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
.cite-modal {
  background: var(--color-surface);
  max-width: 560px;
  width: 100%;
  border-radius: 6px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.30);
}
.cite-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.cite-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; margin: 0; color: var(--color-ink); }
.cite-close {
  background: transparent; border: 0; cursor: pointer;
  font-size: 1.6rem; color: var(--color-muted); line-height: 1;
  width: 32px; height: 32px; border-radius: 50%;
}
.cite-close:hover { background: var(--color-surface-2); color: var(--color-ink); }
.cite-modal textarea {
  width: 100%; min-height: 100px;
  border: 1px solid var(--color-rule);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 0.75rem 0.85rem;
  border-radius: 4px;
  resize: vertical;
}
.cite-actions { display: flex; justify-content: flex-end; margin-top: 0.85rem; }

/* ==========================================================================
   WordPress-specific tweaks
   ========================================================================== */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--color-ink); color: var(--color-surface);
  padding: 0.5rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; background: rgba(20,15,12,0.85);
  z-index: 400; display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
.search-overlay.open { display: flex; }
.search-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: transparent; border: 0; color: var(--color-surface);
  font-size: 2rem; cursor: pointer;
}
.search-overlay .search-form {
  display: flex; gap: 0.5rem; width: min(560px, 100%);
}
.search-overlay .search-field {
  flex: 1; padding: 0.9rem 1rem;
  border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.06);
  color: var(--color-surface);
  font-family: var(--font-sans); font-size: 1rem; border-radius: 3px;
}
.search-overlay .search-field::placeholder { color: rgba(255,255,255,0.5); }
.search-overlay .search-submit {
  background: var(--color-accent); color: var(--color-surface); border: 0;
  padding: 0.9rem 1.2rem; font-family: var(--font-sans);
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; border-radius: 3px;
}

/* Fallback featured image treatment — smaller and centered */
.article-hero--fallback img,
.twentyone-fallback-img {
  object-fit: contain;
  background: var(--color-surface-2);
}

/* Archive description */
.archive-description {
  max-width: 720px; margin: 0 auto var(--space-6);
  font-family: var(--font-sans); font-size: 1rem; color: var(--color-muted);
  line-height: 1.55; text-align: center;
}

/* WordPress default block-editor content inside article-body */
.article-body img {
  max-width: 100%; height: auto; margin: var(--space-5) 0;
  border-radius: 2px;
}
.article-body figure { margin: var(--space-6) 0; text-align: center; }
.article-body figcaption {
  font-family: var(--font-sans); font-size: 0.8125rem;
  color: var(--color-muted); margin-top: 0.5rem; letter-spacing: 0.02em;
}
.article-body a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { text-decoration-thickness: 2px; }

/* Comments — reset default WP wrappers we don't render */
.comment-list ol, .comment-list ul { list-style: none; padding: 0; margin: 0; }

/* Nested reply threads: level 1 gets a modest indent + rule.
   Level 2+ (and every deeper level) get NO further indent — they simply
   render inside the same vertical rule as level 1. This prevents any
   compounding squeeze at depth 3, 4, 5… */
.comment-replies {
  margin-top: var(--space-5);
  margin-left: var(--space-4);
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}
/* Every deeper level: zero extra indent, just a small vertical gap. */
.comment-replies .comment-replies {
  margin-top: var(--space-4);
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

/* NUCLEAR word-breaking for comments — whatever the CSS grid or flex
   parent decides about column widths, this ensures no comment ever
   renders one character per line. Uses maximum specificity to beat
   any inherited or later-declared rules. */
body .comment-list .comment,
body .comment-list .comment .comment-body,
body .comment-list .comment .comment-text,
body .comment-list .comment .comment-text p,
body .comment-list .comment .comment-text span,
body .comment-list .comment .comment-text div {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto;
}
body .comment-list .comment .comment-text a,
body .comment-list .comment .comment-text code {
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
}

/* Force the comment grid's body column to be able to shrink. Without
   min-width:0 on the grid item, the 1fr track uses min-content sizing
   which for a long unbroken string is the entire word's width. */
body .comment-list article.comment {
  min-width: 0 !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  width: 100% !important;   /* nested-reply fix: without this, flex
                               children of .comment-replies collapse
                               to intrinsic width (~11px) once we
                               remove their min-content floor above. */
  box-sizing: border-box;
}

/* .comment-replies is display:flex flex-direction:column. Its child
   <article class="comment"> must be told to fill the cross-axis,
   otherwise — combined with min-width:0 above — the article
   collapses to a few pixels wide and the text column resolves to 0. */
/* Every container in the comment chain must be 100% wide. Any single
   container that collapses to intrinsic width will squeeze all its
   descendants. Applying to every level guarantees the chain holds. */
body .comments-section,
body .comment-list,
body .comment-list .comment-replies,
body .comment-list article.comment,
body .comment-list article.comment > .comment-body {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}
body .comment-list .comment-replies {
  display: block;
}
body .comment-list .comment-replies > article.comment {
  margin-top: var(--space-5);
}

/* All comments — including deep replies — keep their vote column. */

@media (max-width: 720px) {
  .comment-replies { margin-left: var(--space-3); padding-left: var(--space-3); }
  .comment-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }
  .vote-col {
    flex-direction: row;
    gap: var(--space-2);
    padding-top: 0;
    justify-content: flex-start;
  }
}

/* Composer form built by comment_form() */
.composer input[type="email"] {
  border: 1px solid var(--color-rule);
  background: var(--color-surface);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans); font-size: 0.85rem;
  color: var(--color-text); border-radius: 3px;
  margin-right: 0.5rem;
}
.composer input[type="email"]::placeholder { color: var(--color-muted); }

/* Reply form (WP inline) */
#respond { margin-top: var(--space-6); }
.comment-reply-title { display: none; }

/* Vote-btn active state */
.vote-btn.is-active { color: var(--color-accent); }
.vote-btn.is-active svg { stroke: var(--color-accent); }

/* Pagination (WP default markup) */
.pagination.navigation, .comments-pagination.navigation, .posts-navigation {
  margin: var(--space-8) auto; display: flex; gap: 0.5rem;
  justify-content: center; font-family: var(--font-sans); font-size: 0.85rem;
}
.pagination .page-numbers, .comments-pagination a, .posts-navigation a {
  padding: 0.4rem 0.75rem; border: 1px solid var(--color-rule);
  color: var(--color-text); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--color-ink); color: var(--color-surface); border-color: var(--color-ink); }
.pagination .page-numbers:hover, .comments-pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ==========================================================================
   Browse by Subject — front-page chips + filtered-view banner (v1.2.6)
   ========================================================================== */
.subject-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.subject-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--color-rule);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease, transform 120ms ease;
}
.subject-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.subject-chip-label {
  font-weight: 500;
  letter-spacing: -0.005em;
}
.subject-chip-count {
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 0.75rem;
  color: var(--color-text-muted, #7a7369);
  font-variant-numeric: tabular-nums;
}
.subject-chip.is-current {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-surface);
}
.subject-chip.is-current .subject-chip-count {
  color: var(--color-surface);
  opacity: 0.85;
}
.subject-chip--clear {
  border-style: dashed;
  border-color: var(--color-rule);
  background: transparent;
  color: var(--color-text-muted, #7a7369);
  font-size: 0.8125rem;
}
.subject-chip--clear:hover {
  border-style: solid;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Filter banner on the archive view */
.subject-banner {
  margin: 0 0 var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-2);
  border-left: 3px solid var(--color-accent);
  border-radius: 2px;
}
.subject-banner-inner {
  display: flex;
  gap: var(--space-4);
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.subject-banner-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted, #7a7369);
  margin-bottom: 0.35rem;
}
.subject-banner-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.1;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.015em;
  color: var(--color-text);
}
.subject-banner-blurb {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1rem;
  color: var(--color-text);
  margin: 0;
  max-width: 62ch;
  line-height: 1.5;
}
.subject-banner-clear {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.subject-banner-clear:hover {
  background: var(--color-accent);
  color: var(--color-surface);
  text-decoration: none;
}
@media (max-width: 640px) {
  .subject-banner-inner { align-items: flex-start; flex-direction: column; }
  .subject-banner-title { font-size: 1.5rem; }
}
