/* ═══════════════════════════════════════════════════════════════
   BILLZAP BLOG — SHARED STYLESHEET (v3 "super cool")
   Premium light design matching the BillZap landing page:
   warm off-white, muted-green accent, glassy nav, glow + dot-grid
   backdrops, soft elevated cards, fluid responsive type.
   Same class names as before — HTML stays untouched.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bone: #FAFAF8;
  --bone-dim: #F4F2EF;
  --paper: #FFFFFF;
  --surface-dark: #0E0E0E;

  /* Text */
  --ink: #0A0A0A;
  --ink-soft: #1A1A1A;
  --gray-1: #2A2A2A;
  --gray-2: #4A4A4A;
  --gray-3: #646464;
  --gray-4: #8A8A8A;
  --gray-5: #D4D2CC;
  --on-dark: #F4F4F2;
  --on-dark-dim: #C9C9C5;

  /* Lines */
  --line-soft: #EEEEEC;
  --line: #D8D6D2;

  /* Accent */
  --neon: #00763E;
  --neon-dim: #005C31;
  --neon-bright: #00C26B;
  --neon-soft: #D6F5E6;
  --neon-mist: #EFFAF3;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(10,10,10,0.04), 0 8px 24px rgba(10,10,10,0.04);
  --shadow-hover: 0 4px 12px rgba(10,10,10,0.06), 0 20px 56px rgba(10,10,10,0.10);
  --shadow-glow: 0 0 48px rgba(0,194,107,0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --max-width: 1200px;
  --content-width: 760px;
  --gutter: 32px;
  --gutter-sm: 20px;

  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bone);
  overflow-x: clip;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { text-wrap: balance; }

.mi {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  display: inline-block;
  font-size: 22px; line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.mi-fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.mi-bold { font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (max-width: 720px) { .wrap { padding: 0 var(--gutter-sm); } }

/* ─────── SCROLL PROGRESS ─────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon), var(--neon-bright));
  width: 0;
  z-index: 200;
  transition: width 0.1s linear;
}

/* ─────── NAV — glassy, matches landing ─────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled {
  border-bottom-color: var(--line-soft);
  background: rgba(250, 250, 248, 0.88);
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 16px;
}
@media (max-width: 720px) {
  .nav-inner { height: 60px; padding: 0 var(--gutter-sm); }
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 18px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--neon);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,150,79,0.10);
}

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--gray-2);
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after { right: 0 !important; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1.5px; background: linear-gradient(90deg, var(--neon), var(--neon-bright));
  border-radius: 2px;
  transition: right .25s var(--ease);
}
.nav-links a:hover::after { right: 0; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ─────── BUTTONS ─────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--ink);
  border-radius: var(--r-md);
  background: var(--ink); color: #fff;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(10,10,10,0.20); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-neon { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); box-shadow: var(--shadow-card); }
.btn .mi { font-size: 18px; }
@media (max-width: 720px) {
  .btn { padding: 10px 16px; font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════
   BLOG INDEX
   ═══════════════════════════════════════════════════════════════ */

.blog-hero {
  padding: clamp(120px, 16vw, 170px) 0 clamp(56px, 8vw, 88px);
  text-align: center;
  position: relative;
  overflow: clip;
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(52% 46% at 50% 0%, rgba(0,194,107,0.13), transparent 70%);
  pointer-events: none;
}
.blog-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(10,10,10,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(64% 58% at 50% 24%, #000 30%, transparent 78%);
  mask-image: radial-gradient(64% 58% at 50% 24%, #000 30%, transparent 78%);
  pointer-events: none;
}
.blog-hero .wrap { position: relative; z-index: 2; }

.blog-hero-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--neon-dim);
  padding: 8px 18px;
  border: 1px solid rgba(0,118,62,0.18);
  border-radius: 9999px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 12px rgba(0,150,79,0.08);
  margin-bottom: 30px;
}
.blog-hero-label-dot {
  width: 8px; height: 8px; border-radius: 9999px;
  background: var(--neon-bright);
  animation: pulse-dot 2s var(--ease) infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(0,194,107,0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(0,194,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,194,107,0); }
}

.blog-hero h1 {
  font-weight: 650;
  font-size: clamp(42px, 9vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.blog-hero h1 .underline {
  background: linear-gradient(180deg, transparent 58%, var(--neon-soft) 58%);
  border-radius: 6px;
  padding: 0 0.06em;
  display: inline-block;
}
.blog-hero-sub {
  font-size: clamp(16px, 2.4vw, 20px);
  line-height: 1.6;
  max-width: 600px;
  color: var(--gray-2);
  margin: 0 auto;
}

/* ─────── GRID SECTION ─────── */
.blog-grid-section { padding: clamp(48px, 7vw, 88px) 0; }

.grid-section-label,
.featured-label,
.post-related-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--neon);
  text-transform: uppercase;
  margin-bottom: 26px;
  border: none;
  padding: 0;
  background: transparent;
}
.grid-section-label::before,
.featured-label::before,
.post-related-label::before {
  content: '';
  width: 24px; height: 1.5px;
  background: var(--neon);
  border-radius: 2px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  border: none;
}
@media (max-width: 860px) { .blog-grid { grid-template-columns: 1fr; gap: 22px; } }

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.blog-card::after {
  /* accent line draws across the top on hover (same as landing cards) */
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--neon), var(--neon-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
  z-index: 3;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0,118,62,0.25);
}
.blog-card:hover::after { transform: scaleX(1); }
/* neutralise legacy shared-border rules */
.blog-grid > .blog-card,
.blog-grid > .blog-card:nth-child(2n),
.blog-grid > .blog-card:nth-last-child(-n+2):nth-child(2n+1),
.blog-grid > .blog-card:nth-last-child(-n+2):nth-child(2n+1) ~ .blog-card,
.blog-grid > .blog-card:last-child {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ─────── COVERS ─────── */
.blog-card-cover {
  aspect-ratio: 16 / 10;
  background: var(--surface-dark);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line-soft);
}
.blog-card-cover-art {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

/* dark terminal cover — the landing's voice-demo language */
.blog-card-cover.cover-intro { background: var(--surface-dark); }
.blog-card-cover.cover-intro::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.blog-card-cover.cover-intro::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(48% 52% at 50% 44%, rgba(0,194,107,0.18), transparent 72%);
}
.cover-intro-card {
  position: relative;
  z-index: 2;
  background: rgba(22,22,22,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
  padding: 22px 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  box-shadow: 0 16px 40px rgba(0,0,0,0.42), 0 0 36px rgba(0,194,107,0.10);
  max-width: 82%;
  transition: transform .35s var(--ease);
}
.blog-card:hover .cover-intro-card { transform: translateY(-4px) scale(1.02); }
.cover-intro-card .cover-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--neon-bright);
  margin-bottom: 12px;
  font-weight: 500;
  text-transform: uppercase;
}
.cover-intro-card .cover-title {
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.08;
  color: var(--on-dark);
}
.cover-intro-card .cover-title .nu {
  color: var(--neon-bright);
  background: rgba(0,194,107,0.14);
  border-radius: 5px;
  padding: 0 5px;
}

/* light "guide" cover — accent mist */
.blog-card-cover.cover-howto {
  background: linear-gradient(160deg, var(--neon-mist) 0%, var(--neon-soft) 100%);
}
.cover-howto::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(0,118,62,0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.cover-howto-card {
  position: relative;
  z-index: 2;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(0,118,62,0.14);
  border-radius: var(--r-md);
  padding: 20px 26px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  max-width: 84%;
  box-shadow: 0 10px 32px rgba(0,118,62,0.14);
  transition: transform .35s var(--ease);
}
.blog-card:hover .cover-howto-card { transform: translateY(-4px) scale(1.02); }
.cover-howto-card .step { display: flex; gap: 10px; }
.cover-howto-card .step .n { color: var(--neon); font-weight: 700; }
.cover-howto-card .step:nth-child(2) .n { color: var(--neon-dim); }

/* ─────── CARD BODY ─────── */
.blog-card-body {
  padding: 30px 30px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
@media (max-width: 540px) { .blog-card-body { padding: 24px 20px 26px; } }

.blog-card-meta,
.post-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-3);
  margin-bottom: 16px;
}
.blog-card-cat,
.post-cat {
  background: var(--neon-soft);
  color: var(--neon-dim);
  border-radius: 9999px;
  padding: 5px 12px;
  font-weight: 700;
}
.blog-card-meta .dot::before {
  content: '·';
  margin-right: 12px;
  color: var(--gray-4);
}

.blog-card h2 {
  font-weight: 650;
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
  transition: color .25s;
}
.blog-card:hover h2 { color: var(--neon-dim); }

.blog-card-excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-2);
  margin-bottom: 22px;
  flex: 1;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neon-dim);
  border: none;
  padding: 0;
  align-self: flex-start;
  transition: gap .25s var(--ease);
}
.blog-card:hover .blog-card-link { gap: 14px; }

/* ─────── FEATURED CARD ─────── */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover), var(--shadow-glow);
  border-color: rgba(0,118,62,0.25);
}
@media (max-width: 860px) { .featured-card { grid-template-columns: 1fr; } }

.featured-card-cover {
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: clamp(34px, 5vw, 56px) clamp(26px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
@media (max-width: 540px) { .featured-card-cover { min-height: 230px; } }
.featured-card-cover::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.featured-card-cover::after {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  right: -140px; bottom: -180px;
  background: radial-gradient(closest-side, rgba(0,194,107,0.22), transparent 72%);
  pointer-events: none;
}

.featured-cover-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--neon-bright);
  text-transform: uppercase;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  position: relative; z-index: 2;
}
.featured-cover-title {
  font-weight: 650;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  position: relative; z-index: 2;
}
.featured-cover-title .nu {
  color: var(--neon-bright);
  background: rgba(0,194,107,0.14);
  border-radius: 6px;
  padding: 0 7px;
  display: inline-block;
}
.featured-cover-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #9a9a9a;
  text-transform: uppercase;
  position: relative; z-index: 2;
}

.featured-card-body {
  padding: clamp(28px, 4vw, 48px) clamp(22px, 3.5vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-card-body h2 {
  font-weight: 650;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--ink);
}

.featured-toc {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 20px;
  background: var(--neon-mist);
  border: 1px solid rgba(0,118,62,0.12);
  border-radius: var(--r-md);
  margin: 18px 0 24px;
}
.featured-toc span:first-child {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-dim);
  margin-bottom: 4px;
}
.ftoc-item { font-size: 14px; color: var(--gray-1); }

/* ─────── COMING SOON ─────── */
.coming-soon {
  position: relative;
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: clamp(56px, 8vw, 88px) 0;
  text-align: center;
  overflow: hidden;
  border: none;
}
.coming-soon::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.coming-soon::after {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  left: 50%; top: 100%;
  transform: translate(-50%, -42%);
  background: radial-gradient(closest-side, rgba(0,194,107,0.2), transparent 72%);
}
.coming-soon h3 {
  position: relative; z-index: 2;
  font-weight: 650;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.coming-soon h3 .underline {
  color: var(--neon-bright);
  background: rgba(0,194,107,0.13);
  border-radius: 6px;
  padding: 0 0.12em;
}
.coming-soon p {
  position: relative; z-index: 2;
  font-size: 16px;
  color: var(--on-dark-dim);
  text-transform: none;
  letter-spacing: 0;
  max-width: 540px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   POST PAGE
   ═══════════════════════════════════════════════════════════════ */

.post-hero {
  padding: clamp(116px, 15vw, 150px) 0 clamp(40px, 6vw, 60px);
  position: relative;
  overflow: clip;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bone);
}
.post-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(48% 50% at 50% 0%, rgba(0,194,107,0.11), transparent 72%);
  pointer-events: none;
}
.post-hero .wrap { position: relative; z-index: 2; }

.post-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-2);
  margin-bottom: 28px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: rgba(255,255,255,0.8);
  transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.post-back:hover { color: var(--ink); border-color: var(--ink); transform: translateX(-3px); }
.post-back .mi { font-size: 16px; }

.post-meta { justify-content: center; margin-bottom: 26px; }
.post-meta .sep { color: var(--gray-4); }

.post-title {
  font-weight: 650;
  font-size: clamp(32px, 6.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  color: var(--ink);
}
.post-title .underline {
  background: linear-gradient(180deg, transparent 58%, var(--neon-soft) 58%);
  border-radius: 6px;
  padding: 0 0.05em;
  display: inline-block;
}

.post-tldr {
  font-size: clamp(16px, 2.4vw, 20px);
  line-height: 1.62;
  max-width: 660px;
  margin: 0 auto;
  color: var(--gray-2);
}
.post-tldr strong { font-weight: 600; color: var(--ink); }

/* ─────── BODY ─────── */
.post-body-section { padding: clamp(44px, 6vw, 72px) 0 clamp(64px, 8vw, 96px); background: var(--bone); border: none; }

.post-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (max-width: 720px) { .post-body { padding: 0 var(--gutter-sm); } }

.post-body h2 {
  font-weight: 650;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin: 60px 0 22px;
  color: var(--ink);
  padding-top: 0;
  border-top: none;
  position: relative;
}
.post-body h2::before {
  content: '';
  display: block;
  width: 44px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--neon), var(--neon-bright));
  margin-bottom: 18px;
}
.post-body h2:first-child { margin-top: 0; }

.post-body h3 {
  font-weight: 650;
  font-size: clamp(19px, 3vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  color: var(--ink);
}
.post-body h4 {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin: 30px 0 12px;
  color: var(--ink);
}

.post-body p {
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.75;
  color: var(--gray-1);
  margin-bottom: 24px;
}
.post-body p strong { font-weight: 600; color: var(--ink); }
.post-body p em { font-style: italic; }

.post-body a {
  color: var(--neon-dim);
  font-weight: 500;
  border-bottom: 1.5px solid var(--neon-soft);
  padding-bottom: 1px;
  transition: border-color .2s, background .2s;
  border-radius: 2px;
}
.post-body a:hover { border-bottom-color: var(--neon); background: var(--neon-mist); }

.post-body ul, .post-body ol { margin: 0 0 24px; padding-left: 26px; }
.post-body li {
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.7;
  color: var(--gray-1);
  margin-bottom: 10px;
}
.post-body li strong { font-weight: 600; color: var(--ink); }
.post-body ul li::marker { color: var(--neon); }
.post-body ol li::marker { font-family: var(--mono); font-weight: 700; color: var(--neon-dim); }

.post-body blockquote {
  border: 1px solid rgba(0,118,62,0.14);
  border-left: 3px solid var(--neon);
  background: var(--neon-mist);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 30px 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--gray-1);
  font-style: normal;
}
.post-body blockquote strong { color: var(--ink); }

.post-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--neon-mist);
  border: 1px solid rgba(0,118,62,0.14);
  padding: 2px 7px;
  color: var(--neon-dim);
  border-radius: 6px;
}
.post-body pre {
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: 20px 22px;
  margin: 24px 0;
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,0.08);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}
.post-body pre code { background: transparent; border: none; padding: 0; color: var(--on-dark); }

.post-body hr { border: none; border-top: 1px solid var(--line-soft); margin: 44px 0; }

.post-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 28px 0;
  font-size: 15px;
  box-shadow: var(--shadow-card);
  background: var(--paper);
}
.post-body table th {
  background: var(--bone-dim);
  color: var(--gray-2);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.post-body table th:last-child { border-right: none; }
.post-body table td {
  padding: 12px 16px;
  border-top: none;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  color: var(--gray-1);
  vertical-align: top;
  background: var(--paper);
}
.post-body table td:last-child { border-right: none; }
.post-body table tr:last-child td { border-bottom: none; }
.post-body table tr:nth-child(even) td { background: var(--bone); }
.post-body table tr:hover td { background: var(--neon-mist); }
.post-body table td strong { color: var(--ink); }

@media (max-width: 720px) {
  /* wide tables scroll sideways instead of stretching the page */
  .post-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 13.5px;
  }
  .post-body table th, .post-body table td { padding: 10px 12px; }
}

/* ─────── TOC ─────── */
.post-toc {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 26px;
  margin: 32px 0 40px;
}
.post-toc-label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.post-toc-label::before {
  content: '';
  width: 20px; height: 1.5px;
  background: var(--neon);
  border-radius: 2px;
}
.post-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc-counter; }
.post-toc li { counter-increment: toc-counter; padding: 7px 0; font-size: 15px; margin: 0; }
.post-toc li a {
  border: none;
  background: none;
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--gray-1);
  font-weight: 500;
  transition: color .2s, transform .2s var(--ease);
}
.post-toc li a:hover { color: var(--neon-dim); background: none; transform: translateX(4px); }
.post-toc li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--neon);
  font-weight: 700;
  flex-shrink: 0;
}

/* ─────── ✦ AI SUMMARY ─────── */
.ai-sum {
  margin: 0 0 36px;
  position: relative;
}
.ai-sum-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 12px 22px;
  min-height: 44px;
  border-radius: 9999px;
  background: linear-gradient(var(--paper), var(--paper)) padding-box,
              linear-gradient(120deg, #00C26B, #2D5BFF, #00C26B) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 12px rgba(0,150,79,0.12);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  cursor: pointer;
}
.ai-sum-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,150,79,0.22);
}
.ai-sum-btn:disabled { opacity: 0.65; cursor: default; transform: none; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.ai-sum .spark {
  display: inline-block;
  background: linear-gradient(120deg, #00964F, #2D5BFF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 17px;
  line-height: 1;
}
.ai-sum.is-open .ai-sum-btn .spark { animation: spark-spin 1.2s var(--ease); }
@keyframes spark-spin {
  from { transform: rotate(0) scale(1); }
  50%  { transform: rotate(180deg) scale(1.25); }
  to   { transform: rotate(360deg) scale(1); }
}

.ai-sum-panel {
  display: none;
  margin-top: 16px;
  border-radius: var(--r-lg);
  background: linear-gradient(var(--paper), var(--paper)) padding-box,
              linear-gradient(120deg, rgba(0,194,107,0.55), rgba(45,91,255,0.4), rgba(0,194,107,0.55)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 8px 32px rgba(0,150,79,0.10);
  overflow: hidden;
}
.ai-sum.is-open .ai-sum-panel { display: block; animation: panel-in .45s var(--ease); }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.ai-sum-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-dim);
  background: linear-gradient(90deg, var(--neon-mist), rgba(45,91,255,0.05));
}
.ai-sum-body {
  padding: 22px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-1);
  min-height: 80px;
}
.ai-sum-body p { margin: 0 0 14px !important; font-size: 16px !important; }
.ai-sum-body ul { margin: 0 0 6px !important; padding-left: 22px !important; }
.ai-sum-body li { font-size: 15px !important; margin-bottom: 6px !important; }
.ai-sum-body .typing-cursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: var(--neon-bright);
  vertical-align: text-bottom;
  margin-left: 2px;
  border-radius: 2px;
  animation: cursor-blink 0.8s steps(1) infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }

/* shimmer skeleton while "thinking" */
.ai-sum-skel { display: grid; gap: 12px; }
.ai-sum-skel span {
  display: block;
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bone-dim) 25%, var(--neon-soft) 50%, var(--bone-dim) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}
.ai-sum-skel span:nth-child(1) { width: 92%; }
.ai-sum-skel span:nth-child(2) { width: 100%; }
.ai-sum-skel span:nth-child(3) { width: 76%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.ai-sum-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line-soft);
}
.ai-sum-foot span {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-3);
  margin-right: 4px;
}
.ai-sum-foot a {
  font-size: 13px;
  font-weight: 600;
  color: var(--neon-dim);
  padding: 7px 14px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--paper);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.ai-sum-foot a:hover {
  border-color: var(--neon);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,150,79,0.14);
}

/* ─────── POST CTA ─────── */
.post-cta {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--neon-mist) 55%, var(--neon-soft) 100%);
  color: var(--ink);
  padding: clamp(56px, 9vw, 88px) 0;
  text-align: center;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.post-cta::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(0,118,62,0.10) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(70% 85% at 50% 100%, #000, transparent);
  mask-image: radial-gradient(70% 85% at 50% 100%, #000, transparent);
}
.post-cta h3 {
  position: relative; z-index: 2;
  font-weight: 650;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.post-cta p {
  position: relative; z-index: 2;
  font-size: 16px;
  color: var(--gray-2);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 30px;
  opacity: 1;
}
.post-cta .btn {
  position: relative; z-index: 2;
  background: var(--ink); color: #fff; border-color: var(--ink);
  font-size: 15px;
  padding: 14px 28px;
}

/* ─────── RELATED ─────── */
.post-related { padding: clamp(56px, 8vw, 80px) 0; background: var(--bone); }
.post-related h3 {
  font-weight: 650;
  font-size: clamp(24px, 3.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 30px;
}

/* ─────── FAQ ─────── */
.faq-block {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  margin: 32px 0;
  overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--line-soft); padding: 20px 24px; transition: background .2s; }
.faq-item:hover { background: var(--neon-mist); }
.faq-item:last-child { border-bottom: none; }
.faq-item h4 {
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--ink);
  display: flex;
  gap: 10px;
}
.faq-item h4::before {
  content: 'Q';
  font-family: var(--mono);
  font-weight: 700;
  color: var(--neon);
  flex-shrink: 0;
}
.faq-item p { font-size: 15px !important; margin: 0 0 0 26px !important; color: var(--gray-1); }

/* ─────── FOOTER ─────── */
.footer {
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  padding: clamp(44px, 6vw, 64px) 0 30px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
}
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 420px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-2);
  max-width: 380px;
  margin-top: 16px;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-3);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--gray-2);
  padding: 5px 0;
  transition: color .2s;
}
.footer-col a:hover { color: var(--neon-dim); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gray-3);
  letter-spacing: 0.04em;
  text-transform: none;
  flex-wrap: wrap;
  gap: 16px;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
