:root {
  --lime: #7bdd4e;
  --lime-soft: #eaf9e2;
  --lime-deep: #5bb82f;
  --ink: #0a0a0a;
  --ink-2: #1a1a1a;
  --grey-1: #6b7280;
  --grey-2: #9ca3af;
  --grey-3: #d1d5db;
  --line: #ececec;
  --line-soft: #f3f4f6;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-panel: #f7f8f6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font-family: 'Geist', ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.serif { font-family: 'Instrument Serif', serif; font-weight: 400; }

/* Layout */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
nav .wrap {max-width: 100%;}
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ===== Top announcement bar ===== */
.topbar {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 10px 0;
  letter-spacing: -0.01em;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .left { display: flex; align-items: center; gap: 10px; color: #d1d5db; min-width: 0; }
.topbar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); flex-shrink: 0; }
.topbar .pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.06); padding: 3px 10px 3px 6px; border-radius: 20px; font-size: 12px; flex-shrink: 0; white-space: nowrap; }
.topbar .pill b { background: var(--lime); color: var(--ink); font-weight: 600; font-size: 10px; padding: 2px 7px; border-radius: 10px; letter-spacing: 0.02em; text-transform: uppercase; }
.topbar .right { display: flex; gap: 22px; color: #d1d5db; font-size: 12px; }
.topbar .right span b { color: #fff; font-weight: 500; }

/* Scrolling marquee for tablet/mobile */
.topbar .marquee { display: none; overflow: hidden; width: 100%; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.topbar .marquee-track { display: inline-flex; gap: 28px; white-space: nowrap; animation: marquee 38s linear infinite; align-items: center; padding-left: 100%; }
.topbar .marquee-track > * { flex-shrink: 0; }
.topbar .marquee .m-sep { color: rgba(255,255,255,0.3); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.topbar .marquee:hover .marquee-track { animation-play-state: paused; }

/* Drawer header — hidden on desktop, shown inside drawer on mobile */
.nav-drawer-head { display: none; }

/* Mobile accordion panel (inside each .nav-item) — only on tablet/mobile */
.nav-mobile-panel { display: none; }
@media (max-width: 1150px) {
  /* Mobile accordion panel content — flex column so we can order CTA to top */
  .nav-item.open .nav-mobile-panel {
    display: flex; flex-direction: column;
    padding: 4px 0 24px;
  }
  /* Back button always stays at top of the sub-page */
  .nav-item.open .nav-mobile-panel .nav-subback { order: -3; }
  /* Pin the promo/CTA to the top of the mobile panel */
  .nav-item.open .nav-mobile-panel .nav-mobile-cta { order: -2; margin: 4px 0 18px; }
  /* "Core hubs" heading sits just under the CTA */
  .nav-item.open .nav-mobile-panel .nav-mobile-heading[data-primary] { order: -1; margin-top: 8px; }
  /* On mobile, mega-promo CTA gets full-width look inside the drawer */
  .nav-item.open .nav-mobile-panel .mega-promo { padding: 22px 20px 18px; }
}
.nav-mobile-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; font-size: 15px; color: var(--ink); font-weight: 500; border-radius: 8px;
}
.nav-mobile-link:hover, .nav-mobile-link:active { color: var(--lime-deep); }
.nav-mobile-link.dim { color: var(--ink); font-weight: 500; }
.nav-mobile-link .nml-ico {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-panel); border: none;
  display: grid; place-items: center; flex-shrink: 0;
  color: var(--ink);
  transition: background 0.15s;
}
.nav-mobile-link .nml-ico svg { width: 20px; height: 20px; }
.nav-mobile-link:hover .nml-ico, .nav-mobile-link:active .nml-ico {
  background: var(--lime); color: var(--ink);
}
.nav-mobile-link .nml-label { flex: 1; }
.nav-mobile-link .nml-arrow {
  width: 12px; height: 12px; color: var(--grey-1); flex-shrink: 0;
}
.nav-mobile-heading {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-1); font-weight: 600; margin: 20px 0 4px;
}
.nav-mobile-heading::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
/* ===== Navigation ===== */
nav.main {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
nav.main > .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.03em; }
.logo-mark {
  width: 28px; height: 14px; flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 16' fill='none'><path d='M6 8 L16 3 L26 8' stroke='%230a0a0a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/><path d='M6 13 L16 8 L26 13' stroke='%235aba31' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-size: contain; background-position: center;
}
.nav-links { display: flex; gap: 3px; align-items: center; }
.nav-link { padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); border-radius: 8px; display: flex; align-items: center; gap: 5px; transition: background 0.15s; }
.nav-link:hover { background: var(--line-soft); }
.nav-link svg { width: 12px; height: 12px; opacity: 0.5; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; padding: 10px 16px; border-radius: 10px; transition: all 0.15s; letter-spacing: -0.005em; }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--line-soft); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-lime { background: var(--lime); color: var(--ink); font-weight: 600; }
.btn-lime:hover { background: var(--lime-deep); }
.btn svg { width: 14px; height: 14px; }

/* Mobile hamburger toggle */
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fff; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== MEGA MENU ===== */
.nav-item { position: relative; }
.nav-item .nav-link { cursor: pointer; font-family: inherit; color: var(--ink-2); }
.nav-item.open .nav-link { background: var(--line-soft); }
.nav-item.open .nav-link svg { transform: rotate(180deg); }
.nav-item .nav-link svg { transition: transform 0.2s; }

.mega-wrap {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 50px -30px rgba(0,0,0,0.15);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 99;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.mega-wrap.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-inner { padding: 40px 32px 44px; }
.mega-panel { display: none; }
.mega-panel.active { display: block; animation: megaIn 0.22s ease; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.mega-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 48px;
}
.mega-col-links { display: flex; flex-direction: column; gap: 4px; }
.mega-kicker {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--lime-deep); font-weight: 600; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.mega-kicker::before { content: ""; width: 16px; height: 1px; background: var(--lime-deep); }

.mega-link {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px;
  transition: background 0.15s; cursor: pointer;
}
.mega-link:hover { background: var(--bg-panel); }
.mega-link:hover .mega-ico { background: var(--lime); color: var(--ink); }
.mega-ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-panel); border: none;
  display: grid; place-items: center; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.mega-ico svg { width: 20px; height: 20px; }
.mega-badge {
  font-family: 'Geist Mono', monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 0;
  color: var(--ink); padding: 0 4px;
  line-height: 1;
}
.mega-txt { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.mega-txt b { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.mega-txt i { font-style: normal; font-size: 12px; color: var(--grey-1); line-height: 1.45; }

.mega-sub {
  font-size: 13px; color: var(--ink-2); padding: 9px 14px;
  border-radius: 8px; cursor: pointer; font-weight: 500;
  transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.mega-sub:hover { background: var(--bg-panel); color: var(--lime-deep); }
.mega-sub::before { content: "→"; color: var(--grey-2); font-size: 12px; opacity: 0; transition: opacity 0.15s; }
.mega-sub:hover::before { opacity: 1; }
.mega-kicker-star { margin-top: 22px; color: var(--ink); }
.mega-kicker-star::before { background: var(--ink); }
.mega-sub-star::after { content: "★"; color: var(--lime-deep); font-size: 11px; margin-left: 6px; }

.mega-col-promo { display: flex; flex-direction: column; gap: 14px; }
.mega-promo {
  background: var(--ink); color: #fff; border-radius: 16px;
  padding: 22px 22px 20px; position: relative; overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}
.mega-promo:hover { transform: translateY(-2px); }
.mega-promo::before {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(123,221,78,0.35) 0%, transparent 70%);
}
.mega-promo-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--lime); color: var(--ink);
  padding: 3px 9px; border-radius: 20px;
  position: relative; z-index: 1;
}
.mega-promo-title {
  font-size: 20px; letter-spacing: -0.02em; font-weight: 600;
  margin: 14px 0 8px; position: relative; z-index: 1;
}
.mega-promo-sub {
  font-size: 12px; color: var(--grey-2); line-height: 1.5;
  position: relative; z-index: 1;
}
.mega-promo-cta {
  margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--lime);
  position: relative; z-index: 1;
}
.mega-stat {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.mega-stat-num { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
.mega-stat-lbl { font-size: 11px; color: var(--grey-1); }

/* ===== HERO ===== */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--lime-soft); color: var(--ink);
  padding: 6px 14px 6px 6px; border-radius: 40px;
  font-size: 13px; font-weight: 500;
  border: 1px solid rgba(123, 221, 78, 0.4);
}
.eyebrow .chip { background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.03em; text-transform: uppercase; }
.eyebrow .arrow { color: var(--grey-1); font-size: 12px; }
h1.hero-title {
  font-size: 82px; line-height: 0.96; letter-spacing: -0.045em;
  font-weight: 600; color: var(--ink);
  margin: 24px 0 22px;
}
h1.hero-title .accent { color: var(--lime-deep); }
h1.hero-title .serif { font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.hero p.lede { font-size: 19px; line-height: 1.5; color: var(--grey-1); max-width: 540px; margin-bottom: 34px; letter-spacing: -0.01em; }
.hero-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-cta .btn-lime { padding: 14px 22px; font-size: 15px; }
.hero-cta .inline-sub { font-size: 13px; color: var(--grey-1); display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.hero-cta .inline-sub b { color: var(--ink); font-weight: 600; }

.hero-meta { margin-top: 40px; display: flex; gap: 40px; border-top: 1px solid var(--line); padding-top: 28px; max-width: 540px; }
.hero-meta .cell { }
.hero-meta .cell .num { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); display: flex; align-items: baseline; gap: 4px; }
.hero-meta .cell .num small { font-size: 14px; color: var(--lime-deep); font-weight: 500; }
.hero-meta .cell .lbl { font-size: 12px; color: var(--grey-1); margin-top: 2px; letter-spacing: -0.005em; }

/* Hero visual — stack of product-like cards */
.hero-visual { position: relative; height: 580px; }
.viz-card {
  position: absolute; background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04), 0 20px 40px -20px rgba(0,0,0,0.12);
}

/* House schematic card — main */
.viz-house { top: 30px; left: 0; right: 30px; height: 360px; padding: 22px; overflow: hidden; }
.viz-house .row1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.viz-house .tab-pills { display: flex; gap: 4px; background: var(--line-soft); padding: 3px; border-radius: 8px; }
.viz-house .tab-pills span { font-size: 11px; padding: 4px 10px; border-radius: 6px; color: var(--grey-1); font-weight: 500; }
.viz-house .tab-pills .on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.viz-house .row1 .dots { display: flex; gap: 5px; }
.viz-house .row1 .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: block; }

.house-svg { width: 100%; height: 280px; display: block; }

/* Savings card */
.viz-savings {
  bottom: 30px; left: 40px; width: 280px; padding: 18px;
}
.viz-savings .row { display: flex; align-items: center; justify-content: space-between; }
.viz-savings .k { font-size: 11px; color: var(--grey-1); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.viz-savings .v { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); margin: 6px 0 2px; }
.viz-savings .v small { color: var(--lime-deep); font-size: 14px; font-weight: 500; }
.viz-savings .sub { font-size: 12px; color: var(--grey-1); }
.viz-savings .spark { margin-top: 14px; height: 48px; }

/* Floating chip — installer */
.viz-installer {
  top: 0; right: 0; width: 260px; padding: 14px 16px;
  display: flex; gap: 12px; align-items: center;
}
.viz-installer .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #c5f4a5, #7bdd4e); flex-shrink: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--ink); }
.viz-installer .meta .name { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 5px; }
.viz-installer .meta .name .tick { width: 12px; height: 12px; background: var(--lime); border-radius: 50%; display: grid; place-items: center; color: var(--ink); font-size: 8px; font-weight: 900; }
.viz-installer .meta .sub { font-size: 11px; color: var(--grey-1); }
.viz-installer .meta .stars { font-size: 10px; color: var(--ink); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.viz-installer .meta .stars b { font-weight: 600; }
.viz-installer .meta .stars span { color: var(--grey-1); }

/* Floating chip — EPC */
.viz-epc {
  bottom: 170px; right: 0; width: 210px; padding: 16px;
}
.viz-epc .h { font-size: 11px; color: var(--grey-1); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.viz-epc .bars { margin-top: 12px; display: flex; flex-direction: column; gap: 3px; }
.viz-epc .bar { height: 14px; border-radius: 3px; position: relative; display: flex; align-items: center; padding: 0 8px; color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; }
.viz-epc .bar span { position: absolute; right: -28px; font-size: 10px; color: var(--grey-1); }
.viz-epc .bar.a { background: #4caf50; width: 95%; }
.viz-epc .bar.b { background: #8bc34a; width: 85%; }
.viz-epc .bar.c { background: var(--lime); color: var(--ink); width: 75%; outline: 2px solid var(--ink); outline-offset: 1px; }
.viz-epc .bar.d { background: #fdd835; color: var(--ink); width: 65%; }
.viz-epc .bar.e { background: #ff9800; width: 55%; }
.viz-epc .foot { margin-top: 12px; font-size: 11px; color: var(--grey-1); }
.viz-epc .foot b { color: var(--ink); font-weight: 600; }

/* ===== LOGO BAR ===== */
.logos {
  padding: 36px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.logos .label { font-size: 12px; color: var(--grey-1); text-align: center; margin-bottom: 22px; letter-spacing: 0.02em; }
.logos .row { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; opacity: 0.7; }
.logos .logo-item { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.logos .logo-item.italic { font-style: italic; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 24px; }
.logos .logo-item.tight { letter-spacing: -0.05em; font-weight: 700; }
.logos .logo-item .sq { display: inline-block; width: 10px; height: 10px; background: var(--ink); margin-right: 6px; vertical-align: middle; }

/* ===== CATEGORIES ===== */
section { padding: 100px 0; }
.section-head { margin-bottom: 48px; display: flex; align-items: end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.section-head .tag { font-size: 12px; color: var(--lime-deep); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-head .tag::before { content: ""; width: 18px; height: 1px; background: var(--lime-deep); }
.section-head h2 { font-size: 52px; line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; max-width: 700px; }
.section-head h2 .serif { font-style: italic; font-weight: 400; }
.section-head .right { max-width: 340px; color: var(--grey-1); font-size: 15px; line-height: 1.55; }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.cat {
  background: #fff; padding: 28px 24px 24px; position: relative;
  color: inherit; text-decoration: none;
  min-height: 260px; display: flex; flex-direction: column; justify-content: space-between;
  transition: background 0.2s; cursor: pointer;
}
.cat:hover { background: var(--bg-soft); }
.cat:hover .cat-arrow { background: var(--lime); transform: translate(4px, -4px); }
.cat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg-panel);
  display: grid; place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
}
.cat-icon svg { width: 22px; height: 22px; }
.cat h3 { font-size: 19px; letter-spacing: -0.02em; font-weight: 600; margin-bottom: 6px; }
.cat p { font-size: 13px; color: var(--grey-1); line-height: 1.5; }
.cat-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); }
.cat-foot .stat { font-size: 11px; color: var(--grey-1); }
.cat-foot .stat b { color: var(--ink); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.cat-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  transition: all 0.2s;
}
.cat-arrow svg { width: 12px; height: 12px; }
.cat-featured { background: var(--ink); color: #fff; }
.cat-featured:hover { background: var(--ink-2); }
.cat-featured p { color: var(--grey-2); }
.cat-featured .cat-icon { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.cat-featured .cat-icon svg { color: var(--lime); }
.cat-featured .cat-foot { border-top-color: rgba(255,255,255,0.12); }
.cat-featured .cat-foot .stat { color: var(--grey-2); }
.cat-featured .cat-foot .stat b { color: #fff; }
.cat-featured .cat-arrow { background: var(--lime); color: var(--ink); }

/* ===== CALCULATOR / COMPARE PANEL ===== */
.compare-section { background: var(--bg-panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.compare-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
.compare-grid h2 { font-size: 48px; letter-spacing: -0.035em; line-height: 1.04; font-weight: 600; margin: 16px 0 22px; }
.compare-grid .bullet { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.compare-grid .bullet:last-child { border-bottom: 0; }
.compare-grid .bullet .num { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--grey-1); margin-top: 3px; flex-shrink: 0; }
.compare-grid .bullet h4 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 3px; }
.compare-grid .bullet p { font-size: 13px; color: var(--grey-1); line-height: 1.5; }

.calc-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.15);
}
.calc-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.calc-head .title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.calc-head .title .tag { font-size: 10px; background: var(--lime-soft); color: var(--lime-deep); padding: 2px 7px; border-radius: 20px; font-weight: 600; letter-spacing: 0.04em; }
.calc-head .status { font-size: 11px; color: var(--grey-1); display: flex; align-items: center; gap: 6px; }
.calc-head .status .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field label { font-size: 11px; color: var(--grey-1); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; display: block; margin-bottom: 6px; }
.field .input { height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font-size: 14px; display: flex; align-items: center; color: var(--ink); font-weight: 500; }
.field .input.gray { background: var(--bg-soft); color: var(--grey-1); }
.field .segs { display: flex; gap: 6px; }
.field .seg { height: 40px; flex: 1; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--grey-1); font-weight: 500; }
.field .seg.on { border-color: var(--ink); background: var(--ink); color: #fff; }

.calc-out { margin-top: 20px; background: var(--bg-soft); border-radius: 14px; padding: 20px; }
.calc-out .row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 8px 0; }
.calc-out .row.hl { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
.calc-out .row.hl .v { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.calc-out .row .k { color: var(--grey-1); }
.calc-out .row .v { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.calc-out .row .v.accent { color: var(--lime-deep); }

.calc-btn { width: 100%; height: 48px; margin-top: 16px; background: var(--ink); color: #fff; border-radius: 10px; font-weight: 500; font-size: 14px; display: grid; place-items: center; }

/* ===== GUIDES / ARTICLES ===== */
.articles { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.article {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.12); }
.article .thumb {
  height: 240px; background: var(--bg-panel); position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.article.featured .thumb { height: 340px; }
.article .thumb .chip { position: absolute; top: 14px; left: 14px; font-size: 11px; padding: 4px 10px; background: #fff; border: 1px solid var(--line); border-radius: 20px; font-weight: 500; z-index: 2; }
.article .thumb .chip.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 600; }
.article .body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.article .meta { font-size: 11px; color: var(--grey-1); display: flex; gap: 10px; align-items: center; letter-spacing: 0.02em; margin-bottom: 10px; }
.article .meta .dot { width: 3px; height: 3px; background: var(--grey-3); border-radius: 50%; }
.article h3 { font-size: 20px; letter-spacing: -0.02em; line-height: 1.25; font-weight: 600; margin-bottom: 8px; }
.article.featured h3 { font-size: 28px; letter-spacing: -0.025em; line-height: 1.15; }
.article p { font-size: 13px; color: var(--grey-1); line-height: 1.55; flex: 1; }
.article .readmore { margin-top: 16px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.article .readmore::after { content: "→"; transition: transform 0.2s; }
.article:hover .readmore::after { transform: translateX(3px); }

/* Placeholder thumbs */
.thumb-solar { background:
  repeating-linear-gradient(90deg, #1a2633 0 30px, #0f1720 30px 31px),
  #0f1720;
  position: relative;
}
.thumb-solar::before {
  content: ""; position: absolute; inset: 20% 15%;
  background: repeating-linear-gradient(90deg, #233040 0 18%, #1a2633 18% 20%),
              repeating-linear-gradient(0deg, #233040 0 18%, #1a2633 18% 20%);
  background-blend-mode: multiply;
  border: 1px solid #2a3847;
  transform: perspective(600px) rotateX(55deg);
  border-radius: 2px;
}
.thumb-solar::after {
  content: ""; position: absolute; top: 18%; right: 18%;
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle, var(--lime) 0%, rgba(123,221,78,0.3) 50%, transparent 75%);
}

.thumb-ev {
  background: var(--ink); position: relative;
  display: flex; align-items: center; justify-content: center;
}
.thumb-ev::before {
  content: ""; width: 120px; height: 180px;
  background: linear-gradient(180deg, var(--lime) 0%, var(--lime) 30%, #1a1a1a 30%, #1a1a1a 100%);
  border-radius: 24px 24px 8px 8px;
  box-shadow: 0 0 0 8px rgba(255,255,255,0.03);
}
.thumb-ev::after {
  content: ""; position: absolute; width: 40px; height: 4px; background: #fff;
  top: calc(50% + 4px); border-radius: 2px;
}

.thumb-heatpump {
  background: var(--bg-panel); position: relative; overflow: hidden;
}
.thumb-heatpump::before {
  content: ""; position: absolute; inset: 20%;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0deg, transparent 60deg, var(--lime) 60deg, var(--lime) 80deg, transparent 80deg, transparent 120deg, var(--ink) 120deg, var(--ink) 140deg, transparent 140deg);
}
.thumb-heatpump::after {
  content: ""; position: absolute; inset: 36%;
  background: var(--bg-panel);
  border-radius: 50%;
  border: 2px solid var(--ink);
}

/* ===== METRICS / STATS STRIP ===== */
.stats-section { padding: 80px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); color: #fff; }
.stats-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 48px; align-items: end; }
.stats-grid h2 { font-size: 40px; letter-spacing: -0.035em; line-height: 1.1; font-weight: 500; max-width: 380px; }
.stats-grid h2 .lime { color: var(--lime); }
.stat-cell { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 22px; }
.stat-cell .num { font-size: 48px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; display: flex; align-items: baseline; gap: 6px; }
.stat-cell .num small { font-size: 18px; color: var(--lime); font-weight: 400; }
.stat-cell .lbl { font-size: 13px; color: var(--grey-2); margin-top: 10px; line-height: 1.4; }

/* ===== HOW IT WORKS ===== */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.step { background: #fff; padding: 36px 32px; }
.step .n { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--lime-deep); margin-bottom: 80px; display: flex; align-items: center; gap: 8px; }
.step .n::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.step h3 { font-size: 24px; letter-spacing: -0.025em; font-weight: 600; margin-bottom: 10px; }
.step p { font-size: 14px; color: var(--grey-1); line-height: 1.55; }
.step .tick { margin-top: 20px; font-size: 12px; color: var(--grey-1); display: flex; align-items: center; gap: 8px; }
.step .tick::before { content: "✓"; width: 16px; height: 16px; border-radius: 50%; background: var(--lime-soft); color: var(--lime-deep); display: grid; place-items: center; font-size: 10px; font-weight: 700; }

/* ===== MARKET PRICES ===== */
.prices-panel {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px 0 0;
}
.prices-head { display: flex; align-items: center; justify-content: space-between; padding: 0 32px 24px; border-bottom: 1px solid var(--line); }
.prices-head h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.prices-head .note { font-size: 12px; color: var(--grey-1); display: flex; align-items: center; gap: 8px; }
.prices-head .note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.prices-table { }
.prices-row {
  display: grid; grid-template-columns: 1fr 1.8fr 1.2fr 1fr 1fr 1.2fr; gap: 16px;
  padding: 16px 32px; align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.prices-row:last-child { border-bottom: 0; }
.prices-row.head { font-size: 11px; color: var(--grey-1); text-transform: uppercase; letter-spacing: 0.05em; background: #fff; font-weight: 500; }
.prices-row .item { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.prices-row .item .ico { width: 32px; height: 32px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; }
.prices-row .item .ico svg { width: 16px; height: 16px; }
.prices-row .price { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.prices-row .chg { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 500; }
.prices-row .chg.up { color: #dc2626; }
.prices-row .chg.dn { color: var(--lime-deep); }
.prices-row .payback { color: var(--grey-1); }
.prices-row .grant { font-size: 11px; padding: 3px 8px; border-radius: 20px; background: var(--lime-soft); color: var(--lime-deep); font-weight: 600; display: inline-block; }
.prices-row .grant.no { background: var(--line-soft); color: var(--grey-1); }

/* ===== NEWSLETTER CTA ===== */
.cta-final {
  background: var(--ink); color: #fff; border-radius: 24px; padding: 64px;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
}
.cta-final::before {
  content: ""; position: absolute; right: -100px; top: -100px; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(123,221,78,0.25) 0%, transparent 65%);
}
.cta-final h2 { font-size: 52px; letter-spacing: -0.035em; line-height: 1.02; font-weight: 500; }
.cta-final h2 .lime { color: var(--lime); }
.cta-final h2 .serif { font-style: italic; font-weight: 400; }
.cta-final p { color: var(--grey-2); font-size: 16px; margin-top: 18px; max-width: 440px; line-height: 1.55; }
.cta-final form { display: flex; gap: 8px; margin-top: 28px; }
.cta-final input { flex: 1; height: 52px; padding: 0 18px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; color: #fff; font-size: 14px; font-family: inherit; }
.cta-final input::placeholder { color: var(--grey-2); }
.cta-final button { height: 52px; padding: 0 22px; background: var(--lime); color: var(--ink); font-weight: 600; border-radius: 12px; font-size: 14px; }
.cta-final .fine { font-size: 11px; color: var(--grey-2); margin-top: 14px; }

.cta-right {
  position: relative; display: flex; flex-direction: column; gap: 12px;
}
.cta-stat-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
  padding: 20px; display: flex; align-items: center; gap: 16px;
}
.cta-stat-card .big { font-size: 34px; font-weight: 500; letter-spacing: -0.03em; color: #fff; }
.cta-stat-card .big .lime { color: var(--lime); }
.cta-stat-card .txt { font-size: 13px; color: var(--grey-2); line-height: 1.4; }
.cta-stat-card .txt b { color: #fff; font-weight: 600; }

/* ===== FOOTER ===== */
footer { padding: 80px 0 40px; border-top: 1px solid var(--line); }
.foot-top {
  display: grid;
  grid-template-columns: 1.2fr 3fr;
  gap: 64px;
  padding-bottom: 56px;
  margin-bottom: 32px;
}
.foot-brand .logo { margin-bottom: 18px; }
.foot-brand p { font-size: 13px; color: var(--grey-1); line-height: 1.55; max-width: 340px; }
.foot-brand .foot-brand-meta { margin-top: 20px; display: flex; gap: 16px; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey-2); flex-wrap: wrap; }
.foot-brand .foot-brand-meta span { display: inline-flex; align-items: center; gap: 6px; }
.foot-brand .foot-brand-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(123,221,78,0.18); }
.foot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; margin-bottom: 48px; }
.foot-brand .logo { margin-bottom: 18px; }
.foot-brand p { font-size: 13px; color: var(--grey-1); line-height: 1.55; max-width: 340px; }
.foot-col h5 { font-size: 11px; color: var(--ink); margin-bottom: 18px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-family: 'Geist Mono', ui-monospace, monospace; }
.foot-col a { display: block; font-size: 13.5px; color: var(--grey-1); padding: 5px 0; letter-spacing: -0.1px; }
.foot-col a:hover { color: var(--ink); }

.foot-company {
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.foot-company h5 {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); font-weight: 500;
  font-family: 'Geist Mono', ui-monospace, monospace;
  margin-right: 8px;
  display: flex; align-items: center;
}
.foot-company a {
  font-size: 13px; color: var(--grey-1); padding: 2px 0;
  display: inline-flex; align-items: center;
}
.foot-company a:hover { color: var(--ink); }
.foot-base {
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--grey-1);
  flex-wrap: wrap; gap: 16px;
}
.foot-base .lang { display: flex; gap: 18px; }
.foot-base .lang span { display: flex; align-items: center; gap: 6px; }

@media (max-width: 1240px) {
  /* Tighten main nav so items stay on one line before the hamburger breakpoint */
  .nav-links { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 13px; gap: 4px; }
  .nav-link svg { width: 10px; height: 10px; }
  .logo { font-size: 16px; }
}

@media (max-width: 900px) {
  .foot-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .foot-company { gap: 16px 22px; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 1150px) {
  .hero-grid, .compare-grid, .articles, .cta-final, .foot-grid, .stats-grid, .foot-top { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { height: 480px; }
  h1.hero-title { font-size: 56px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  /* Tablet & mobile: show hamburger, slide-in mobile menu */
  nav.main { position: relative; backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav-toggle { display: flex; order: 3; margin-left: 8px; }
  .nav-right { gap: 6px; margin-left: auto; }
  .nav-right .btn { padding: 8px 12px; font-size: 13px; }

  /* Full-screen drawer */
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    width: 100vw; max-width: 100%;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0; z-index: 200;
    transform: translateX(100%); transition: transform 0.28s ease;
    overflow-y: auto; display: flex;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    isolation: isolate;
  }
  .nav-links.open { transform: translateX(0); }

  /* Drawer header */
  .nav-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 35px; border-bottom: none;
    position: sticky; top: 0; background: #fff; z-index: 2;
  }
  .nav-drawer-head .logo { font-size: 17px; }
  .nav-close {
    width: 40px; height: 40px; border-radius: 10px;
    background: transparent; border: none; color: var(--ink);
    display: grid; place-items: center; cursor: pointer;
  }
  .nav-close:hover { background: var(--bg-panel); }
  .nav-close svg { width: 20px; height: 20px; }

  /* Scrim — only visible briefly during the transition (full-screen drawer covers everything anyway) */
  .nav-scrim { display: none; }

  .nav-item { width: 100%; border-bottom: none; padding: 0 35px; }
  .nav-item:last-of-type { border-bottom: none; }
  .nav-item .nav-link { width: 100%; justify-content: space-between; padding: 20px 0; font-size: 16px; border-radius: 0; background: transparent; color: var(--ink); font-weight: 500; }
  .nav-item .nav-link svg { opacity: 0.5; transition: transform 0.2s; width: 14px; height: 14px; }
  /* Main-list chevron points right (drill-in affordance) */
  .nav-item .nav-link svg { transform: rotate(-90deg); }
  .nav-item.open .nav-link svg { transform: rotate(-90deg); opacity: 1; }

  /* Sub-page: replaces the main list as a full-drawer view */
  .nav-links { position: fixed; }
  /* When a sub-page is open, hide main nav items behind it */
  .nav-links.subpage-open .nav-item:not(.open) { display: none; }
  .nav-links.subpage-open .nav-item.open { border: none; padding: 0 35px; }
  .nav-links.subpage-open .nav-item.open > .nav-link { display: none; }

  .nav-mobile-panel {
    position: static;
    background: #fff;
    padding: 0 0 32px;
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .nav-item.open .nav-mobile-panel { display: flex; }
  /* Back header inside each sub-page, injected by JS */
  .nav-subback {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 0 14px; margin: 0;
    border-bottom: none; position: sticky; top: 0; background: #fff; z-index: 2;
    font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
    border-top: none;
  }
  .nav-subback svg { width: 16px; height: 16px; color: var(--ink); }
  /* Keep the drawer-head logo visible on sub-pages; back button sits next to it */

  /* Backdrop when menu open — not needed; full-screen drawer covers page */
  body.nav-open { overflow: hidden; }

  /* Desktop mega menu hidden on tablet/mobile */
  .mega-wrap { display: none !important; }

  /* Scrolling ticker bar */
  .topbar .wrap { padding: 0; }
  .topbar .left, .topbar .right { display: none; }
  .topbar .marquee { display: block; }
  .prices-row { grid-template-columns: 1fr 1.5fr 1fr; }
  .prices-row .payback, .prices-row .grant { display: none; }
  .cta-final { padding: 36px; }
  .cta-final h2 { font-size: 36px; }
}

/* ============================================================
   SEO/A11Y patch — paste into your existing stylesheet.
   These updates accompany the new header.php and replace the
   old presentational <b>/<i> styling hooks inside .mega-txt
   with semantic spans. Add a skip link and focus styles too.
   ============================================================ */

/* --- 1. New semantic mega-link text classes --------------- */
/* Replaces the old `.mega-txt b` and `.mega-txt i` rules.    */

.mega-txt-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: block;
}
.mega-txt-desc {
  font-size: 12px;
  color: var(--grey-1);
  line-height: 1.45;
  display: block;
}

/* OPTIONAL: remove the old selectors from your CSS to avoid
   a stray <b>/<i> inheriting odd styles elsewhere on the site.
   Find and delete:

   .mega-txt b { font-size: 14px; ... }
   .mega-txt i { font-style: normal; ... }
*/


/* --- 2. mega-promo card: now an <a> wrapper with <span> kids ---
   The promo CTA cards are now anchor elements containing inline
   spans (was: divs). Make sure the spans display as blocks so
   the visual layout is unchanged. */

.mega-promo .mega-promo-tag,
.nav-mobile-cta .mega-promo-tag {
  display: inline-block;
}
.mega-promo .mega-promo-title,
.mega-promo .mega-promo-sub,
.mega-promo .mega-promo-cta,
.nav-mobile-cta .mega-promo-title,
.nav-mobile-cta .mega-promo-sub,
.nav-mobile-cta .mega-promo-cta {
  display: block;
}

/* Anchors inherit color, but defensive: */
a.mega-promo {
  text-decoration: none;
  color: inherit;
}


/* --- 3. Skip-to-content link ----------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}


/* --- 4. Visible focus styles for keyboard users ---------- */
/* Lighthouse and WCAG both flag missing :focus-visible.    */

.nav-link:focus-visible,
.nav-mobile-link:focus-visible,
.mega-link:focus-visible,
.mega-sub:focus-visible,
.nav-toggle:focus-visible,
.nav-close:focus-visible,
.btn:focus-visible,
.logo:focus-visible,
a.mega-promo:focus-visible {
  outline: 2px solid var(--lime-deep);
  outline-offset: 2px;
}


/* --- 5. (Optional) Open-state visual cue from ARIA -------
   If you want to drive the open style from aria-expanded
   instead of (or in addition to) the JS-toggled .open class: */

.nav-item .nav-link[aria-expanded="true"] {
  background: var(--line-soft);
}
.nav-item .nav-link[aria-expanded="true"] svg {
  transform: rotate(180deg);
}


/* ===========================================================================
   Spoke pillar pages — sticky sub-nav, hero, lead strip, body scaffold.
   =========================================================================== */

/* ===== Spoke sub-nav (sits below main nav on pillar pages) ===== */
.spoke-nav {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.spoke-nav .wrap {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 40px;
}
.spoke-nav-label {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey-1);
  padding: 10px 18px 10px 0;
  border-right: 1px solid var(--line);
  margin-right: 18px;
  flex-shrink: 0;
}
.spoke-nav-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(123,221,78,0.18); }
.spoke-nav-scroll {
  display: flex; align-items: stretch; gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.spoke-nav-scroll::-webkit-scrollbar { display: none; }
.spoke-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  font-size: 13px; letter-spacing: -0.1px;
  color: var(--grey-1);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color .15s ease;
  border-bottom: 2px solid transparent;
}
.spoke-link:hover { color: var(--ink); }
.spoke-link[aria-current="page"],
.spoke-link.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--ink);
}
.spoke-link .num {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--grey-2);
  letter-spacing: 0.05em;
}
.spoke-link[aria-current="page"] .num,
.spoke-link.active .num { color: var(--lime-deep); }

@media (max-width: 900px) {
  .spoke-nav { top: 60px; }
  .spoke-nav .wrap { padding-left: 20px; padding-right: 0; min-height: 38px; }
  .spoke-nav-label { display: none; }
  .spoke-link { padding: 10px 12px; font-size: 12px; }
  .spoke-link:first-child { padding-left: 0; }
}

/* ===== Pillar hero ===== */
.pillar-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.pillar-crumbs {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-1);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
}
.pillar-crumbs a { color: var(--grey-1); }
.pillar-crumbs a:hover { color: var(--ink); }
.pillar-crumbs .sep { color: var(--grey-3); }
.pillar-crumbs .here { color: var(--ink); }

.pillar-hero h1 {
  font-size: 72px;
  line-height: 1.02;
  letter-spacing: -2.5px;
  font-weight: 600;
  margin-bottom: 20px;
  max-width: 900px;
}
.pillar-hero .deck {
  font-size: 20px;
  line-height: 1.5;
  color: var(--grey-1);
  max-width: 680px;
  letter-spacing: -0.2px;
}
.pillar-hero .hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--grey-1);
  flex-wrap: wrap;
}
.pillar-hero .hero-meta b { color: var(--ink); font-weight: 500; }

/* ===== Lead strip (compact affiliate CTA band) ===== */
section.lead-strip { padding: 0; }
.lead-strip {
  background: #0a0a0a;
  color: #fff;
  border-bottom: 1px solid #1a1a1a;
  position: relative;
  overflow: hidden;
}
.lead-strip::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 200px at 85% -10%, rgba(123,221,78,0.14), transparent 60%),
    radial-gradient(600px 180px at 5% 110%, rgba(123,221,78,0.08), transparent 70%);
  pointer-events: none;
}
.lead-strip .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 40px;
  padding-top: 18px; padding-bottom: 18px;
}
.lead-strip-left {
  display: flex; align-items: flex-start; gap: 16px;
  min-width: 0;
}
.lead-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 8px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #d1d5db;
  flex-shrink: 0;
  margin-top: 1px;
}
.lead-badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(123,221,78,0.25);
  animation: leadPulse 2s infinite ease-in-out;
}
@keyframes leadPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(123,221,78,0.25); }
  50% { box-shadow: 0 0 0 6px rgba(123,221,78,0); }
}
.lead-head {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin: 0;
  color: #fff;
}
.lead-head em {
  font-style: normal;
  color: var(--lime);
  font-weight: 500;
}
.lead-sub {
  font-size: 12.5px;
  color: #9ca3af;
  letter-spacing: -0.1px;
  margin-top: -4px;
}
.lead-form {
  display: flex; align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 10px;
  padding: 5px 5px 5px 16px;
  flex-shrink: 0;
  width: 360px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 8px 24px -8px rgba(0,0,0,0.4);
  transition: box-shadow .15s ease;
}
.lead-form:focus-within {
  box-shadow: 0 0 0 1px rgba(123,221,78,0.5), 0 8px 28px -8px rgba(123,221,78,0.2);
}
.lead-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0; outline: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.2px;
  padding: 9px 0;
}
.lead-form input::placeholder { color: var(--grey-2); }
.lead-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
  white-space: nowrap;
  border: 0;
  font-family: inherit;
  flex-shrink: 0;
}
.lead-btn:hover { background: #1f1f1f; transform: translateX(1px); }
.lead-btn:hover svg { transform: translate(1px, -1px); }
.lead-btn svg { width: 14px; height: 14px; transition: transform .15s ease; }
.lead-disclosure {
  display: flex; align-items: center; gap: 5px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-top: 4px;
  justify-content: flex-end;
}
.lead-disclosure svg { width: 11px; height: 11px; opacity: 0.7; }
.lead-trust {
  display: flex; align-items: center; gap: 18px;
  font-size: 12px; color: #9ca3af;
  white-space: nowrap;
  flex-wrap: wrap;
  margin-top: 2px;
}
.lead-trust span { display: inline-flex; align-items: center; gap: 6px; }
.lead-trust svg { width: 13px; height: 13px; color: var(--lime); }
.lead-headblock { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 1100px) {
  .lead-form { width: 320px; }
  .lead-trust { gap: 14px; font-size: 11px; }
}
@media (max-width: 900px) {
  .lead-form { width: 280px; }
}
@media (max-width: 820px) {
  .lead-strip .wrap {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 16px; padding-bottom: 16px;
  }
  .lead-strip-left { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lead-head { font-size: 16px; }
  .lead-form { width: 100%; }
  .lead-disclosure { justify-content: flex-start; }
}

/* ===== Spoke body (block-editor content) ===== */
.spoke-body {
  padding: 64px 0 96px;
  background: var(--bg);
}
.spoke-body article { max-width: 1440px; margin: 0 auto; }

.spoke-section {
  padding: 48px 0;
  scroll-margin-top: 120px;
  border-top: 1px solid var(--line-soft);
}
.spoke-section:first-of-type { border-top: 0; padding-top: 16px; }
.spoke-section > h2,
.spoke-section .wp-block-heading {
  font-size: 36px;
  letter-spacing: -1px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 20px;
}
.spoke-section p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .pillar-hero { padding: 40px 0 32px; }
  .pillar-hero h1 { font-size: 48px; letter-spacing: -1.5px; }
  .pillar-hero .deck { font-size: 17px; }
  .spoke-body { padding: 40px 0 64px; }
  .spoke-section { padding: 32px 0; scroll-margin-top: 100px; }
  .spoke-section > h2,
  .spoke-section .wp-block-heading { font-size: 28px; }
}

/* Override: align spoke article flush-left to match the pillar-hero. */
.spoke-body article {
  max-width: 1440px;
  margin: 0;            /* was: 0 auto */
}

/* And kill the visible top border on the very first section so the whole
   body block reads as one column starting flush below the hero. */
.spoke-body .spoke-section:first-child,
.spoke-body article > .spoke-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

/* ===========================================================================
   ARTICLE TEMPLATE — comprehensive styling overhaul.
   ===========================================================================

   This REPLACES the entire "ARTICLE TEMPLATE — additions to existing
   .pillar-hero / .spoke-body system" block I gave you previously.

   In your theme.css, find the comment:
     "/* ===== ARTICLE TEMPLATE — additions ... */"
   Delete EVERYTHING from there to the end of the file, and paste this in.

   Strategy: rather than forcing custom Gutenberg blocks (Phase 1 work),
   this styles existing default Gutenberg blocks (paragraph, quote, table,
   list, etc.) to look mockup-faithful. When Phase 1 lands and we add
   proper custom blocks (Key Takeaways, Worked Example, Image, Inline CTA),
   those will be visual upgrades on top of this foundation, not replacements.

   Specifically:
     - blockquote with first child <h4> → renders as Key Takeaways panel
     - blockquote without h4         → renders as Author Aside ("A note on…")
     - default <table>                → renders with mockup styled-table look
     - paragraphs starting "[image"   → render as image-placeholder cards
     - <ol> after <hr>+ <h4>Sources  → renders as styled sources block
     - .post-related grid (existing)  → upgraded to mockup styling

   =========================================================================== */


/* ---- 1. Override: remove old .spoke-body article max-width ---------------- */

.spoke-body .post-grid > article.post-content {
  max-width: none;
  margin: 0;
}


/* ---- 2. Eyebrow + breadcrumbs + post-deck --------------------------------- */

.post-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-deep);
  font-weight: 600;
  margin-bottom: 18px;
}
.post-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--lime-deep);
}

.post-head .pillar-crumbs,
.pillar-hero .pillar-crumbs { margin-bottom: 24px; }

.post-deck {
  font-size: 19px;
  line-height: 1.55;
  color: var(--grey-1);
  max-width: 720px;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}
.post-deck strong { color: var(--ink); font-weight: 500; }


/* ---- 3. Post-meta-row ----------------------------------------------------- */

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.post-author .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.post-author .avatar img,
.post-author .avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  border: 0;
}
.post-author .who {
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.post-author .who .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.post-author .who .role {
  font-size: 12px;
  color: var(--grey-1);
  letter-spacing: -0.005em;
}

.post-meta-row .stat-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  flex-shrink: 0;
}
.post-meta-row .stat {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--grey-1);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.post-meta-row .stat b { color: var(--ink); font-weight: 500; }
.post-meta-row .stat svg { width: 14px; height: 14px; flex-shrink: 0; }

.post-share {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.share-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: #fff;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
}
.share-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.share-btn svg { width: 15px; height: 15px; }
.share-btn--copied {
  background: var(--lime-deep) !important;
  color: #fff !important;
  border-color: var(--lime-deep) !important;
}


/* ---- 4. Post body grid + sticky TOC rail ---------------------------------- */

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 80px;
  align-items: start;
}
.post-grid--no-toc {
  grid-template-columns: minmax(0, 1fr);
}

.post-content {
  max-width: 850px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

.post-content p { margin-bottom: 22px; }
.post-content p strong { color: var(--ink); font-weight: 600; }
.post-content p em { color: var(--ink); }

.post-content a {
  color: var(--lime-deep);
  font-weight: 500;
  border-bottom: 1px solid rgba(91, 184, 47, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.15s, background 0.15s;
}
.post-content a:hover {
  border-bottom-color: var(--lime-deep);
  background: var(--lime-soft);
}

.post-content h2,
.post-content h2.wp-block-heading {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 56px 0 20px;
  scroll-margin-top: 90px;
  color: var(--ink);
}
.post-content > h2:first-child,
.post-content > .wp-block-heading:first-child { margin-top: 0; }

.post-content h3,
.post-content h3.wp-block-heading {
  font-size: 22px;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 36px 0 14px;
  line-height: 1.3;
  color: var(--ink);
}

.post-content h4,
.post-content h4.wp-block-heading {
  font-size: 18px;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 28px 0 12px;
  line-height: 1.35;
  color: var(--ink);
}

.post-content ul,
.post-content ol,
.post-content .wp-block-list {
  margin: 0 0 24px 22px;
  padding-left: 0;
}
.post-content li,
.post-content .wp-block-list li {
  margin-bottom: 10px;
  padding-left: 6px;
}
.post-content ul li::marker,
.post-content ul.wp-block-list li::marker { color: var(--lime-deep); }
.post-content ol li::marker,
.post-content ol.wp-block-list li::marker {
  color: var(--grey-1);
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
}

/* Separator: cleaner than default */
.post-content .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
  max-width: 60px;
  opacity: 1;
}


/* ---- 5. Key Takeaways callout (styled blockquote with H4 first child) -----
   The Markdown converter renders the Key Takeaways block as:
     <blockquote class="wp-block-quote">
       <h4 class="wp-block-heading"><strong>Key takeaways</strong></h4>
       <ul>...</ul>
     </blockquote>
   We detect this by `:has(> h4:first-child)` and apply panel styling. */

.post-content .wp-block-quote:has(> h4:first-child) {
  background: linear-gradient(135deg, var(--lime-soft) 0%, #f4fbef 100%);
  border: 1px solid rgba(123, 221, 78, 0.4);
  border-left: 4px solid var(--lime);
  border-radius: 16px;
  padding: 32px 36px;
  margin: 32px 0 40px;
  position: relative;
  overflow: hidden;
  font-style: normal;
}
.post-content .wp-block-quote:has(> h4:first-child)::before {
  content: "";
}
.post-content .wp-block-quote:has(> h4:first-child) h4 {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime-deep);
  font-weight: 600 !important;
  margin: 0 0 18px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-content .wp-block-quote:has(> h4:first-child) h4 strong {
  font-weight: 600;
  color: var(--lime-deep);
}
.post-content .wp-block-quote:has(> h4:first-child) ul,
.post-content .wp-block-quote:has(> h4:first-child) .wp-block-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.post-content .wp-block-quote:has(> h4:first-child) li {
  position: relative;
  padding: 10px 0 10px 32px !important;
  margin: 0 !important;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  border-bottom: 1px dashed rgba(91, 184, 47, 0.25);
}
.post-content .wp-block-quote:has(> h4:first-child) li:last-child {
  border-bottom: 0;
}
.post-content .wp-block-quote:has(> h4:first-child) li::marker {
  content: '';
}
.post-content .wp-block-quote:has(> h4:first-child) li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.post-content .wp-block-quote:has(> h4:first-child) li strong,
.post-content .wp-block-quote:has(> h4:first-child) li b {
  color: var(--ink);
  font-weight: 600;
}


/* ---- 6. Author aside / "A note on..." (regular blockquote) ----------------
   For blockquotes WITHOUT a leading h4 (i.e. the architect aside, worked
   examples, the "Bottom line" callout). These get a softer panel style. */

.post-content .wp-block-quote:not(:has(> h4:first-child)) {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lime);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  font-style: normal;
}
.post-content .wp-block-quote:not(:has(> h4:first-child)) p {
  margin: 0 0 12px !important;
  font-size: 15px;
  line-height: 1.6;
}
.post-content .wp-block-quote:not(:has(> h4:first-child)) p:last-child {
  margin: 0 !important;
}
.post-content .wp-block-quote:not(:has(> h4:first-child)) p strong {
  color: var(--ink);
}
.post-content .wp-block-quote:not(:has(> h4:first-child)) p em {
  color: var(--ink);
  font-style: italic;
}


/* ---- 7. Styled tables ----------------------------------------------------- */

.post-content .wp-block-table {
  margin: 32px 0;
}
.post-content .wp-block-table figcaption {
  font-size: 12px;
  color: var(--grey-1);
  margin-top: 8px;
  text-align: left;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.04em;
}

.post-content table {
  width: 100%;
  table-layout: auto !important;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  border-spacing: 0;
}

/* Header row: black, mono caps, no internal dividers */
.post-content thead {
  background: var(--ink);
  color: #fff;
}
.post-content thead th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'Geist Mono', ui-monospace, monospace;
  border: 0 !important;
  color: #fff;
}
.post-content thead th:not(:first-child) {
  text-align: right;
}

/* Body cells: only horizontal dividers, no verticals */
.post-content tbody td {
  padding: 14px 18px;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  font-variant-numeric: tabular-nums;
  vertical-align: top;
  font-size: 14px;
}
.post-content tbody td:first-child {
  font-weight: 600;
  color: var(--ink);
}
.post-content tbody td:not(:first-child) {
  text-align: right;
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.post-content tbody tr:last-child td {
  border-bottom: 0 !important;
}
.post-content tbody td strong {
  color: var(--ink);
  font-weight: 700;
}

/* Highlight row: any tr containing a <strong> cell */
.post-content tbody tr:has(strong) {
  background: var(--lime-soft);
}
.post-content tbody tr:has(strong) td:first-child {
  position: relative;
  padding-left: 32px;
}
.post-content tbody tr:has(strong) td:first-child::before {
  content: "★";
  position: absolute;
  left: 12px;
  top: 14px;
  color: var(--lime-deep);
  font-size: 11px;
}


/* ---- 8. Image placeholder paragraphs --------------------------------------
   Until proper image blocks replace them, paragraphs whose text content
   starts with [image are styled as dashed-border placeholder cards.
   Achieved with :has() — modern browsers (Safari 15.4+, Chrome 105+, Firefox 121+).
   For older browsers, this gracefully degrades to plain italic text. */

.post-content p:has(> em:only-child),
.post-content p > em:only-child {
  /* Paragraph that's *only* an em (e.g. captions) — leave alone */
}

/* Use a more targeted trick: paragraphs whose first text node looks like
   "[image" can't be matched by CSS alone. Instead, we add a class server-side
   in PHP. Until that's done, these paragraphs show as italic + muted. */
.post-content p.image-placeholder,
.post-content p.is-image-placeholder {
  border: 1px dashed var(--grey-3);
  border-radius: 12px;
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-soft) 0,
      var(--bg-soft) 12px,
      #f3f4f0 12px,
      #f3f4f0 13px
    );
  padding: 36px 28px;
  margin: 28px 0;
  text-align: center;
  color: var(--grey-1);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}


/* ---- 9. Sources block (PHP filter adds .sources-list to OL after H4 "Sources") -- */

.post-content h4:has(+ ol.sources-list) {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-1) !important;
  font-weight: 600 !important;
  margin: 48px 0 18px !important;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.post-content ol.sources-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: src;
}
.post-content ol.sources-list li {
  counter-increment: src;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 12px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  align-items: baseline;
}
.post-content ol.sources-list li:last-child { border-bottom: 0; }
.post-content ol.sources-list li::marker { content: ''; }
.post-content ol.sources-list li::before {
  content: counter(src, decimal-leading-zero);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--lime-deep);
  background: var(--lime-soft);
  width: 28px;
  height: 22px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.post-content ol.sources-list li a {
  color: var(--ink-2);
  border-bottom: 1px solid var(--grey-3);
  background: transparent;
}
.post-content ol.sources-list li a:hover {
  border-bottom-color: var(--ink);
  background: transparent;
}


/* ---- 10. Related articles (already there, polish to match mockup) ---------
   Existing structure works; small style tweaks to match mockup more
   closely. */

.post-related {
  background: var(--bg-panel);
  margin-top: 96px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  /* Break out of the .wrap padding to span the section width */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(32px, calc(50vw - 720px));
  padding-right: max(32px, calc(50vw - 720px));
}

.post-related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}
.post-related-head h2 {
  font-size: 28px;
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
.post-related-all {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-deep);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.post-related-all:hover {
  border-bottom-color: var(--lime-deep);
}

.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.post-related-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
}
.post-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, 0.12);
}
.post-related-thumb {
  height: 180px;
  background: var(--bg-panel);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.post-related-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-related-eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-deep);
  font-weight: 600;
  margin-bottom: 12px;
}
.post-related-title {
  font-size: 17px;
  letter-spacing: -0.015em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 12px;
  flex: 1;
}
.post-related-meta {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--grey-1);
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}


/* ---- 11. TOC right rail (desktop) ----------------------------------------- */

.toc-rail {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 13px;
}

.toc-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-1);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.toc-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(123, 221, 78, 0.18);
}

.toc-list {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: none !important;
}
.toc-list li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-increment: none !important;
}
.toc-list li::before,
.toc-list li::marker {
  content: none !important;
  display: none !important;
}
.toc-list a,
.toc-mobile a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--grey-1);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
  margin-left: -2px;
  border-bottom: 0;
  font-weight: 400;
}
.toc-list a:hover,
.toc-mobile a:hover {
  color: var(--ink);
  background: var(--bg-soft);
  border-bottom: 0;
}
.toc-list a.active,
.toc-mobile a.active {
  color: var(--ink);
  font-weight: 500;
  border-left-color: var(--lime);
  background: var(--bg-soft);
}
.toc-list .num,
.toc-mobile .num {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--grey-2);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.toc-list a.active .num,
.toc-mobile a.active .num {
  color: var(--lime-deep);
}


/* ---- 12. Mobile TOC ------------------------------------------------------- */

.toc-mobile-toggle { display: none; }
.toc-mobile { display: none; }

@media (max-width: 1100px) {
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .toc-rail { display: none; }

  .toc-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
  }
  .toc-mobile-toggle-label {
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-1);
  }
  .toc-mobile-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
  .toc-mobile-toggle svg { transition: transform 0.2s; }

  .toc-mobile {
    display: block;
    padding: 8px 12px 12px;
    margin-bottom: 24px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .toc-mobile[hidden] { display: none; }
}


/* ---- 13. Mobile body adjustments ------------------------------------------ */

@media (max-width: 720px) {
  .post-content {
    font-size: 16px;
    max-width: 100%;
  }
  .post-content h2,
  .post-content h2.wp-block-heading { font-size: 28px; margin: 40px 0 16px; }
  .post-content h3,
  .post-content h3.wp-block-heading { font-size: 19px; margin: 28px 0 12px; }

  .post-meta-row {
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
  }
  .post-meta-row .stat-divider { display: none; }
  .post-share {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .share-btn { width: 38px; height: 38px; }

  .post-content .wp-block-quote:has(> h4:first-child) {
    padding: 24px 22px;
  }
  .post-content .wp-block-quote:has(> h4:first-child) li {
    font-size: 14.5px;
    padding-left: 30px !important;
  }

  .post-content .wp-block-table {
    overflow-x: auto;
  }
  .post-content table { min-width: 480px; }

  .post-related-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 600px) {
  .post-related-grid { grid-template-columns: 1fr; }
}

/* ===========================================================================
   ARTICLE WIDTH OVERRIDE — append to the very end of theme.css.

   This must come AFTER the legacy `.spoke-body article { max-width: 1440px }`
   rule that's still in your stylesheet. By appending at the end, our rule
   wins the cascade.

   We're explicitly targeting only single-post articles (`.post-content`)
   and leaving any other use of `.spoke-body article` alone (e.g. spoke
   pillar pages, which were the original target of the 1440px rule).
   =========================================================================== */

/* The article body inside the post grid: comfortable reading column. */
.spoke-body .post-grid > article.post-content,
.spoke-body article.post-content {
  max-width: 850px !important;
  margin: 0 !important;
}

/* On mobile (single column, no TOC rail), let the article fill the wrap. */
@media (max-width: 1100px) {
  .spoke-body .post-grid > article.post-content,
  .spoke-body article.post-content {
    max-width: 100% !important;
  }
}
