/* ============================================================
   paulhines.energy — global.css
   Design tokens + base reset + components.
   Aesthetic: editorial, minimal, dark canvas, white content cards.
   ============================================================ */

:root {
  /* Page / chrome — always dark */
  --page-bg:        #0d1117;
  --chart-bg:       #161b22;   /* slightly lifted from page */
  --surface-dark:   rgba(255,255,255,0.025);
  --border-dark:    rgba(255,255,255,0.07);
  --border-subtle:  rgba(255,255,255,0.05);

  --text-primary-dark:   #e6edf3;
  --text-secondary-dark: rgba(255,255,255,0.40);
  --text-muted-dark:     rgba(255,255,255,0.25);

  --accent-dark:    #4ade80;   /* bright green — on dark bg */
  --accent-dim:     rgba(74,222,128,0.07);

  /* Content cards — warm off-white */
  --card-bg:        #f2f0eb;   /* warm off-white — softer than #fff on dark page */
  --card-bg-muted:  #eceae4;   /* nested surfaces, e.g. inline charts */
  --card-border:    #dddad2;   /* warm border to match */

  --text-primary-card:   #1a1a18;
  --text-secondary-card: #555555;
  --text-muted-card:     #aaaaaa;

  --accent-card:    #16a34a;   /* darker green — on white bg */

  /* Chart palette — consistent across all visuals */
  --chart-total:      #4ade80;
  --chart-fossil:     #60a5fa;
  --chart-renewables: #f59e0b;
  --chart-nuclear:    #a78bfa;
  --chart-other:      #94a3b8;

  /* Layout */
  --maxw:           1120px;
  --nav-h:          56px;
  --viz-h:          0px;   /* sticky chart-header height, set by header-viz.js */
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: var(--page-bg);
  color: var(--text-primary-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* Mount wrappers must not form a box, or their sticky children (nav, chart)
   would unstick as soon as the short wrapper scrolls out of view. */
#nav-mount, #viz-mount { display: contents; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,17,23,0.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border-dark);
}
.site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text-primary-dark);
}
.nav-logo .accent { color: var(--accent-dark); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a {
  color: var(--text-secondary-dark);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text-primary-dark); }
.nav-links a.ext::after { content: " ↗"; font-size: 0.85em; opacity: 0.6; }
.nav-social { display: flex; align-items: center; gap: 12px; }
.nav-social a { color: var(--text-muted-dark); }
.nav-social a:hover { color: var(--accent-dark); }
.nav-social svg { width: 16px; height: 16px; }

/* ============================================================
   LANDING — header viz region
   ============================================================ */
.header-viz {
  position: sticky;            /* stays pinned below the nav while scrolling */
  top: var(--nav-h);
  z-index: 40;                 /* below nav (50), above page content */
  background: var(--page-bg);  /* hide content scrolling underneath */
  padding: 18px 0 22px;
}
.header-viz.collapsed { padding-bottom: 12px; }
.header-viz.collapsed .hv-body,
.header-viz.collapsed .hv-filters { display: none; }

.hv-collapse {
  font-family: inherit;
  font-size: 11px;
  color: var(--text-secondary-dark);
  background: var(--surface-dark);
  border: 0.5px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.hv-collapse:hover { color: var(--text-primary-dark); border-color: rgba(255,255,255,0.30); }
.header-viz .hv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.header-viz h1 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text-primary-dark);
}
.hv-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.hv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#hv-modes .chip { font-size: 12px; padding: 4px 12px; }

/* metric toggle — a segmented control (Total | Annual change) */
.hv-toggle {
  display: inline-flex;
  padding: 2px;
  border: 0.5px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: var(--surface-dark);
}
.hv-toggle .seg {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.hv-toggle .seg:hover { color: var(--text-primary-dark); }
.hv-toggle .seg.active {
  background: rgba(74,222,128,0.15);
  color: var(--accent-dark);
}
.hv-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted-dark);
  margin-right: 4px;
}
.chip {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 0.5px solid rgba(255,255,255,0.14);
  color: var(--text-secondary-dark);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover { color: var(--text-primary-dark); border-color: rgba(255,255,255,0.30); }
.chip.active {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
  background: rgba(74,222,128,0.07);
}

/* chart container — slightly lifted dark surface */
.chart-container {
  background: var(--chart-bg);
  border: 0.5px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px 16px 10px;
}
.hv-chart { width: 100%; }
.hv-chart svg { width: 100%; height: auto; overflow: visible; }

/* axes: labels only, no domain/tick lines; gridlines drawn separately */
.hv-axis text { fill: rgba(255,255,255,0.28); font-size: 10px; }
.hv-axis .domain, .hv-axis line { display: none; }
.hv-gridlines line { stroke: rgba(255,255,255,0.05); stroke-width: 0.5; }
.hv-gridlines .domain { display: none; }

.hv-annotation line { stroke: rgba(255,255,255,0.08); stroke-width: 0.5; stroke-dasharray: 3 3; }
.hv-annotation text { fill: rgba(255,255,255,0.30); font-size: 9px; }
.hv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
}
.hv-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-secondary-dark);
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  transition: color 0.15s, opacity 0.15s;
}
.hv-legend .lg:hover { color: var(--text-primary-dark); }
.hv-legend .lg.off { opacity: 0.4; }
.hv-legend .lg.off .sw { box-shadow: inset 0 0 0 1px currentColor; background: transparent !important; }
.hv-legend .sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
}
.hv-caption {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted-dark);
}

/* shared tooltip (header + post charts) */
.viz-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  background: var(--chart-bg);
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-primary-dark);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  min-width: 160px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.viz-tooltip .tt-year { color: rgba(255,255,255,0.45); font-size: 10px; margin-bottom: 5px; }
.viz-tooltip .tt-row { display: flex; align-items: center; gap: 7px; margin-top: 2px; }
.viz-tooltip .tt-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.viz-tooltip .tt-name { color: var(--text-secondary-dark); }
.viz-tooltip .tt-amt { margin-left: auto; padding-left: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.viz-tooltip .tt-empty { color: var(--text-muted-dark); }

/* ============================================================
   LANDING — body grid
   ============================================================ */
.landing-body {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 32px;
  padding: 32px 0 64px;
  align-items: start;
}

/* featured post card — renders the full latest post inline */
.featured-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 32px 40px;
  color: var(--text-secondary-card);
  transition: box-shadow 0.2s ease;
}
.featured-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.12); }

/* quiet permalink at the foot of the featured post */
.post-permalink {
  display: block;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 0.5px solid var(--card-border);
  font-size: 11px;
  color: var(--text-muted-card);
  text-decoration: none;
}
.post-permalink:hover { color: var(--accent-card); }

/* sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: calc(var(--nav-h) + var(--viz-h, 0px) + 16px);   /* clears the sticky nav + chart header */
  align-self: start;                /* required so sticky works inside the grid row */
}
.sidebar h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted-dark);
  margin: 0 0 12px;
  font-weight: 600;
}
.post-stub {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
}
.post-stub:first-of-type { border-top: none; padding-top: 0; }
.post-stub .ps-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary-dark);
  line-height: 1.35;
}
.post-stub:hover .ps-title { color: var(--accent-dark); }
.post-stub .ps-meta {
  font-size: 11px;
  color: var(--text-muted-dark);
  margin-top: 3px;
}
/* active stub (currently shown in the featured area) */
.post-stub.active {
  border-left: 2px solid var(--accent-dark);
  padding-left: 8px;
}

/* About — a pinned post, shown as a quiet special stub at the foot */
.sidebar-rule {
  height: 0.5px;
  background: rgba(255,255,255,0.07);
  margin: 16px 0;
}
.post-stub--about { border-top: none; padding-top: 0; }
.post-stub--about .stub-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
}
.post-stub--about .stub-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  margin-top: 2px;
}
.post-stub--about:hover .stub-title { color: var(--accent-dark); }

/* ============================================================
   POST PAGE
   ============================================================ */
.post-shell {
  padding: 40px 24px 80px;
  display: flex;
  justify-content: center;
}
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  width: 100%;
  max-width: 960px;
  padding: 32px 40px 40px;
  color: var(--text-secondary-card);
}

/* post header (rendered from markdown title/byline, styled here) —
   shared by the post page and the landing page's featured card */
.post-card .post-tag,
.featured-card .post-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-card);
  background: rgba(22,163,74,0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.post-card .post-byline,
.featured-card .post-byline {
  font-size: 12.5px;
  color: var(--text-muted-card);
  margin: 0 0 4px;
}
.post-card hr,
.featured-card hr {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 20px 0 24px;
}

/* ---------- post prose ---------- */
.post-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary-card);
  max-width: 820px;
}
.post-body h1 {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary-card);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.post-body h2 { font-size: 1.15rem; font-weight: 500; color: var(--text-primary-card); margin: 1.75rem 0 0.5rem; }
.post-body h3 { font-size: 1rem; font-weight: 500; color: var(--text-primary-card); margin: 1.25rem 0 0.4rem; }
.post-body p  { margin-bottom: 1rem; }
.post-body a  { color: var(--accent-card); text-decoration: none; }
.post-body a:hover { text-decoration: underline; }
.post-body code { font-family: monospace; font-size: 0.9em; background: var(--card-bg-muted); padding: 1px 4px; border-radius: 3px; }
.post-body ul, .post-body ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.post-body li { margin-bottom: 0.35rem; }
.post-body blockquote {
  margin: 1.25rem 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent-card);
  color: var(--text-primary-card);
  font-style: italic;
}
.post-body strong { color: var(--text-primary-card); }

/* inline charts inside posts */
.post-chart {
  margin: 1.5rem 0;
  background: var(--card-bg-muted);
  border: 0.5px solid #ece9e2;
  border-radius: 7px;
  padding: 12px 14px;
}
.post-chart svg { width: 100%; height: auto; overflow: visible; }
.post-chart .pc-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary-card);
  margin-bottom: 2px;
}
.post-chart .pc-caption { font-size: 10.5px; color: var(--text-muted-card); margin-top: 6px; }
.post-chart .pc-axis text { fill: var(--text-muted-card); font-size: 10px; }
.post-chart .pc-axis .domain, .post-chart .pc-axis line { display: none; }
.post-chart .pc-gridlines line { stroke: rgba(0,0,0,0.06); stroke-width: 0.5; }
.post-chart .pc-gridlines .domain { display: none; }

/* GDP/energy indexed chart — a dark "mini header viz" inside the white card */
#gdp-energy-chart {
  background: var(--chart-bg);
  border: 0.5px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 12px 14px 10px;
}
#gdp-energy-chart svg { width: 100%; height: auto; overflow: visible; }
.ge-legend { display: flex; justify-content: flex-end; gap: 16px; margin-bottom: 2px; }
.ge-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,0.45); }
.ge-swatch { width: 16px; height: 0; border-top: 2px solid rgba(255,255,255,0.55); display: inline-block; }
.ge-swatch.ge-dashed { border-top-style: dashed; }
.ge-toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ge-pill {
  font-family: inherit;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.42);
  cursor: pointer;
  white-space: nowrap;
}
/* caption sits on the white card, below the dark chart */
.post-body .chart-caption {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted-card);
  margin: 6px 0 1rem;
}
.viz-tooltip .tt-sub { font-size: 10px; color: rgba(255,255,255,0.35); margin-bottom: 4px; }

/* prev / next */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  font-size: 13px;
  font-weight: 500;
}
.post-nav a { color: var(--accent-card); }
.post-nav a:hover { text-decoration: underline; }
.post-nav .spacer { flex: 1; }

/* ============================================================
   FORECASTING POST — .fc-* chart components
   Scoped with fc- prefix; used by posts/forecasting/charts.js
   ============================================================ */
.fc-chart-wrap {
  background: #161b22;
  border: 0.5px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px 16px 10px;
  margin: 0;
  overflow: visible;
}
.fc-chart-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.fc-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; align-items: center; }
.fc-chipbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fc-chip-group { display: flex; align-items: center; gap: 4px; }
.fc-chip-label {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 2px;
}
.fc-chip {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 0.5px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.40);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: inherit;
}
.fc-chip:hover { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.65); }
.fc-chip--active { border-color: #4ade80; color: #4ade80; background: rgba(74,222,128,0.07); }
.fc-dd-wrap { display: flex; align-items: center; gap: 6px; }
.fc-select {
  font-family: inherit;
  font-size: 11px;
  padding: 3px 8px;
  border: 0.5px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: #1f2937;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
}
.fc-axis text { fill: rgba(255,255,255,0.28); font-size: 10px; font-family: Inter, sans-serif; }
.fc-axis .domain, .fc-axis line { display: none; }
.fc-axis-label { fill: rgba(255,255,255,0.22); font-size: 10px; font-family: Inter, sans-serif; }
.fc-info-card {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 10px 0 6px;
  display: none;
}
.fc-ic-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.fc-ic-date { font-weight: 600; font-size: 13px; color: rgba(255,255,255,0.85); }
.fc-ic-market { font-size: 11px; color: rgba(255,255,255,0.35); }
.fc-ic-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 10px;
  background: rgba(239,68,68,0.18); color: #ef4444; font-weight: 500;
}
.fc-ic-label { font-size: 11px; color: rgba(255,255,255,0.40); font-style: italic; }
.fc-ic-stats { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 8px; }
.fc-ic-stat { min-width: 80px; }
.fc-ic-val { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.88); }
.fc-ic-lbl { font-size: 10px; color: rgba(255,255,255,0.28); margin-top: 1px; }
.fc-ic-note {
  font-size: 12px; color: rgba(255,255,255,0.52); line-height: 1.55;
  border-top: 0.5px solid rgba(255,255,255,0.08); padding-top: 8px; margin-top: 2px;
}
.fc-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 4px; align-items: center; }
.fc-leg-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(255,255,255,0.38); }
.fc-leg-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.fc-leg-ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #ef4444; display: inline-block; flex-shrink: 0; }
.fc-source { font-size: 10px; color: rgba(255,255,255,0.22); margin: 6px 0 0; line-height: 1.4; }
.fc-tooltip {
  position: absolute;
  background: #161b22;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 12px;
  color: rgba(255,255,255,0.80);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.40);
  z-index: 100;
  max-width: 250px;
  line-height: 1.5;
}
.fc-tt-date { font-size: 10px; color: rgba(255,255,255,0.38); margin-bottom: 5px; }
.fc-tt-row { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.fc-tt-row span { color: rgba(255,255,255,0.40); }
.fc-tt-row b { color: rgba(255,255,255,0.88); font-weight: 600; }
.fc-tt-scarcity { font-size: 11px; color: #f87171; margin-top: 5px; font-weight: 500; }
.fc-tt-note {
  font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 5px;
  line-height: 1.4; border-top: 0.5px solid rgba(255,255,255,0.08); padding-top: 5px;
}
.fc-table-wrap { overflow-x: auto; }
.fc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fc-table thead tr { border-bottom: 0.5px solid rgba(255,255,255,0.10); }
.fc-table th {
  text-align: left; padding: 6px 10px 6px 0; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.28); font-weight: 500; white-space: nowrap;
}
.fc-table td {
  padding: 8px 10px 8px 0; border-bottom: 0.5px solid rgba(255,255,255,0.06);
  vertical-align: top; line-height: 1.45; color: rgba(255,255,255,0.72);
}
.fc-td-explain { color: rgba(255,255,255,0.48); font-size: 11px; }
.fc-tr-scarcity td:first-child { border-left: 2px solid #ef4444; padding-left: 6px; }
.fc-table th:not(:last-child), .fc-table td:not(:last-child) { white-space: nowrap; }
.fc-table th:last-child, .fc-table td:last-child { width: 48%; }
.post-chart { position: relative; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .landing-body { grid-template-columns: 1fr; gap: 28px; }
  .featured-card, .post-card { padding: 24px 22px; }
  .header-viz .hv-top { flex-direction: column; align-items: flex-start; }
  .hv-filters { gap: 10px; }
  .nav-links { gap: 12px; }
  .featured-card .post-body h1 { font-size: 1.4rem; }
  .sidebar { position: static; }   /* no sticky once stacked single-column */
}
@media (max-width: 420px) {
  .wrap, .site-nav .nav-inner { padding-left: 16px; padding-right: 16px; }
  .nav-links a:not(.ext) { display: none; } /* keep social + external on tiny screens */
  .post-shell { padding: 24px 14px 60px; }
}
