/* Site CSS — theme-agnostic; uses tokens from oxide.css */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100vw; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--fg-1);
  font-family: var(--font-mono);
}
img { max-width: 100%; display: block; }
a { -webkit-tap-highlight-color: transparent; color: var(--accent); }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 0; border-top: 1px solid var(--rule); position: relative; }
.section--alt { background: var(--bg-1); }

/* ---- Reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1),
              transform 800ms cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-24px); }
[data-reveal="left"].is-visible { transform: translateX(0); }
[data-reveal="right"] { transform: translateX(24px); }
[data-reveal="right"].is-visible { transform: translateX(0); }
[data-reveal="scale"] { transform: scale(0.96); opacity: 0; }
[data-reveal="scale"].is-visible { transform: scale(1); opacity: 1; }

/* ---- Loader ---- */
#page-loader {
  position: fixed; inset: 0;
  background: var(--bg-0);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  pointer-events: none;
  transition: opacity 600ms ease, visibility 600ms;
}
#page-loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--fg-0);
  display: flex; align-items: center; gap: 12px;
}
.loader-logo { height: 44px; width: auto; display: block; }
[data-theme="dark"]  .loader-logo--light { display: none; }
[data-theme="light"] .loader-logo--dark  { display: none; }
.loader-bar-wrap {
  margin-top: 28px;
  width: min(420px, 70vw);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.loader-bar-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.loader-bar-track {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0;
  white-space: pre;
  line-height: 1;
  display: block;
  width: 100%;
  text-align: left;
  overflow: hidden;
}
.loader-meta {
  margin-top: 16px; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-2);
}
.loader-meta .blink { animation: blink 700ms steps(2, end) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
@keyframes blink-fast { 50% { opacity: 0.3; } }
.blink-fast { animation: blink-fast 320ms steps(2,end) infinite; }

.cursor-block {
  display: inline-block;
  width: 0.5em; height: 1em;
  background: var(--accent);
  vertical-align: -0.12em;
  animation: blink 700ms steps(2, end) infinite;
  margin-left: 2px;
}

/* ---- Marquee ---- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  overflow: hidden; position: relative;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; gap: 64px;
  width: max-content;
  animation: marquee 38s linear infinite;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.marquee__track .dot { color: var(--accent); margin: 0 24px; }

/* ---- Stat strip ---- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
}
.stat-cell {
  padding: 32px 28px;
  border-right: 1px solid var(--rule);
  background: var(--bg-2);
  position: relative;
}
.stat-cell:last-child { border-right: none; }
.stat-cell::before {
  content: "// 0" counter(scell);
  counter-increment: scell;
  position: absolute;
  top: 12px; right: 14px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--fg-3);
}
.stat-strip { counter-reset: scell; }
.stat-cell .label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 16px;
}
.stat-cell .value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 44px;
  letter-spacing: -0.02em;
  color: var(--fg-0);
  line-height: 1;
}
.stat-cell .value .unit { color: var(--accent); font-size: 24px; margin-left: 4px; }
.stat-cell .desc { margin-top: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); line-height: 1.5; }
.stat-cell .bar { font-family: var(--font-mono); font-size: 12px; color: var(--accent); white-space: pre; }

/* ---- Problem section: visibly broken ---- */
.section--problem {
  position: relative;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 3px,
      var(--surface-bad) 3px,
      var(--surface-bad) 4px
    ),
    var(--bg-0);
}
.strikethrough-bad {
  position: relative;
  color: var(--fg-2);
  text-decoration: line-through;
  text-decoration-color: var(--bad);
  text-decoration-thickness: 2px;
}
.problem-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--rule-strong);
}
.problem-card {
  background: var(--bg-2);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-rows: 200px 1fr;
  min-height: 440px;
  position: relative;
}
.problem-card:nth-child(2n) { border-right: none; }
.problem-card:nth-last-child(-n+2) { border-bottom: none; }

.problem-card__viz {
  position: relative;
  background:
    repeating-linear-gradient(
      0deg,
      var(--surface-bad) 0,
      var(--surface-bad) 1px,
      transparent 1px,
      transparent 5px
    ),
    var(--bg-1);
  border-bottom: 1px solid var(--rule);
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.problem-card__viz::before,
.problem-card__viz::after {
  content: ""; position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--bad);
  opacity: 0.5;
}
.problem-card__viz::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.problem-card__viz::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.problem-card__viz .scanline {
  position: absolute;
  left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--bad), transparent);
  opacity: 0.4;
  animation: scanline 4s linear infinite;
  pointer-events: none;
}
@keyframes scanline {
  0% { top: 0; opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}
.problem-card__viz .glitch-edge {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--bad);
  opacity: 0.6;
  animation: glitch 3.4s ease-in-out infinite;
}
@keyframes glitch {
  0%,90%,100% { transform: translateX(0); opacity: 0.6; }
  92% { transform: translateX(2px); opacity: 0.9; }
  94% { transform: translateX(-1px); opacity: 0.4; }
  96% { transform: translateX(3px); opacity: 0.9; }
  98% { transform: translateX(-2px); opacity: 0.6; }
}

.problem-card__body { padding: 24px 28px 28px; }
.problem-card__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.problem-card__num { font-family: var(--font-mono); font-size: 11px; color: var(--bad); letter-spacing: 0.14em; }
.problem-card__code {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--bad); letter-spacing: 0.1em;
  border: 1px solid var(--bad); padding: 2px 8px;
  background: var(--bad-tint);
  animation: blink 1.6s steps(2,end) infinite;
}
.problem-card h3 { margin-bottom: 10px; }
.problem-card p { color: var(--fg-2); margin: 0; font-size: 13.5px; max-width: 52ch; }

.problem-card__bar {
  position: relative;
  margin-top: 18px;
  height: 18px;
  display: flex; align-items: center;
  font-family: var(--font-mono);
}
.problem-card__bar-bg {
  position: absolute; left: 0; top: 6px; right: 0; height: 6px;
  background: var(--rule);
}
.problem-card__bar-fail {
  position: absolute; left: 0; top: 6px; height: 6px;
  width: var(--bar-fail, 50%);
  background: var(--bad);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0, transparent 4px,
    rgba(0,0,0,0.2) 4px, rgba(0,0,0,0.2) 7px
  );
  animation: barJitter 4s ease-in-out infinite;
}
@keyframes barJitter {
  0%,100% { transform: scaleX(1); }
  50% { transform: scaleX(0.985); }
}
.problem-card__bar-label {
  position: absolute; right: 0; top: -16px;
  font-size: 10px; color: var(--fg-3); letter-spacing: 0.06em;
}

/* In-card viz container reset */
.viz {
  width: 100%; max-width: 380px;
  font-family: var(--font-mono);
  color: var(--fg-1);
}
.viz__head {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--fg-3);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 10px;
}
.viz__bad { color: var(--bad); }
.viz__muted { color: var(--fg-2); }
.viz__legend {
  font-size: 10px; color: var(--fg-3);
  margin-top: 10px; display: flex; gap: 14px;
}

/* ---- Liquidity grid ---- */
.liq-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--rule);
}
.liq-card {
  background: var(--bg-2);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-rows: 220px 1fr;
  min-height: 440px;
  position: relative;
}
.liq-card:nth-child(2n) { border-right: none; }
.liq-card:nth-last-child(-n+2) { border-bottom: none; }
.liq-card__viz {
  background:
    radial-gradient(var(--grid-dot) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--bg-1);
  border-bottom: 1px solid var(--rule);
  padding: 20px 24px;
  height: 220px;
  display: flex; align-items: center; justify-content: center;
}
.liq-card__viz svg { width: 100%; height: 100%; max-width: 360px; max-height: 180px; }
.liq-card__body { padding: 24px 28px 28px; }
.liq-card__num { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; margin-bottom: 14px; }
.liq-card h3 { margin-bottom: 10px; }
.liq-card p { color: var(--fg-2); margin: 0; font-size: 13.5px; max-width: 52ch; }

/* ---- HUGE CTA Band ---- */
.cta-mega {
  position: relative;
  padding: 140px 0 160px;
  background: var(--bg-0);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.cta-mega__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}
.cta-mega__inner { position: relative; z-index: 1; }
.cta-mega__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-2);
  display: flex; align-items: center; gap: 12px;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.cta-mega__pulse { color: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.cta-mega__rule { flex: 1; height: 1px; background: var(--rule); max-width: 240px; }
.cta-mega__h {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(56px, 11vw, 156px);
  line-height: 0.95;
  letter-spacing: -3.5px;
  color: var(--fg-0);
  margin: 0;
}
.cta-mega__h-accent { color: var(--accent); }
.cta-mega__cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 700ms steps(2, end) infinite;
}
.cta-mega__lead {
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-1);
  max-width: 60ch;
}
.cta-mega__ctas {
  margin-top: 40px;
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
.cta-mega__hint {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.06em;
  display: inline-flex; align-items: center;
  margin-left: 8px;
}
.btn--lg { height: 52px; padding: 0 28px; font-size: 13px; }
.cta-mega__partners {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--rule);
  background: var(--bg-1);
}
.cta-mega__partner {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
  position: relative;
  transition: background 220ms;
}
.cta-mega__partner:last-child { border-right: none; }
.cta-mega__partner:hover { background: var(--accent-tint); }
.cta-mega__partner-num { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; }
.cta-mega__partner-k { font-family: var(--font-mono); font-size: 18px; color: var(--fg-0); margin-top: 12px; font-weight: 500; }
.cta-mega__partner-v { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 8px; letter-spacing: 0.06em; }

/* ---- Footer grid ---- */
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-link:hover { color: var(--accent) !important; padding-left: 4px; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .cta-mega__partners { grid-template-columns: repeat(3, 1fr); }
  .cta-mega__partner { border-bottom: 1px solid var(--rule); }
  .cta-mega__partner:nth-child(3n) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 980px) {
  .section { padding: 80px 0; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .adv-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .adv-grid > * { min-width: 0; overflow: hidden; border-right: none !important; border-bottom: 1px solid var(--rule); }
  .adv-grid > *:last-child { border-bottom: none; }
  .stat-cell { border-right: none; }
  .stat-cell:nth-child(odd) { border-right: 1px solid var(--rule); }
  .stat-cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .problem-grid, .liq-grid { grid-template-columns: 1fr; }
  .problem-card, .liq-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .cta-mega { padding: 100px 0 120px; }
  /* About / Connect grids — stack to fewer columns on tablet */
  .about-team { grid-template-columns: repeat(2, 1fr) !important; }
  .about-team > * { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .about-team > *:nth-child(odd) { border-right: 1px solid var(--rule) !important; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat-cell { border-right: none !important; border-bottom: 1px solid var(--rule); }
  /* Compact 2-up partner grid on phone — feels closer to a logo row than full-width cards */
  .cta-mega__partners {
    margin-top: 40px;
    grid-template-columns: repeat(2, 1fr);
  }
  .cta-mega__partner {
    padding: 14px 14px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }
  .cta-mega__partner:nth-child(2n) { border-right: none; }
  .cta-mega__partner:nth-last-child(-n+1) { border-bottom: none; } /* if odd count, last spans alone */
  .cta-mega__partner:nth-child(odd):last-child {
    grid-column: 1 / -1;
    border-right: none;
    border-bottom: none;
  }
  .cta-mega__partner-num { display: none; }
  .cta-mega__partner-k { font-size: 14px; margin-top: 0; }
  .cta-mega__partner-v { font-size: 10px; margin-top: 4px; }
  /* Newsletter spans full width; link columns stack in a 2×2 grid below it */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "news news"
      "site prod"
      "comp social";
    gap: 28px 16px;
  }
  .footer-grid > *:nth-child(1) { grid-area: news; }
  .footer-grid > *:nth-child(2) { grid-area: site; }
  .footer-grid > *:nth-child(3) { grid-area: prod; }
  .footer-grid > *:nth-child(4) { grid-area: comp; }
  .footer-grid > *:nth-child(5) { grid-area: social; }
  .footer-link { font-size: 11px !important; line-height: 22px !important; }
  .marquee__track { font-size: 12px; gap: 32px; }
  .marquee__track .dot { margin: 0 12px; }
  h1, .h1 { font-size: 32px; line-height: 1.1; }
  h2, .h2 { font-size: 24px; line-height: 1.15; }
  h3, .h3 { font-size: 18px; }
  .lead { font-size: 14px; }
  .cta-mega { padding: 64px 0 80px; }
  .cta-mega__h { font-size: clamp(36px, 11vw, 64px); }
  .cta-mega__lead { font-size: 14px; }
  .cta-mega__ctas .btn--lg { width: 100%; justify-content: center; }
  .cta-mega__hint { width: 100%; justify-content: center; text-align: center; }
  /* Stack any multi-column grid on phone — covers both className-based and inline-style grids */
  .unlock-grid, .diff-grid, .connect-grid, .usecase-grid,
  .about-pillars, .about-team, .about-culture,
  div[style*="grid-template-columns: repeat(2, 1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Fix inline borders on stacked cards (most use borderRight conditionally) */
  .container > div > div[style*="border-right: 1px solid"],
  .container > div > div[style*="borderRight"] {
    border-right: none !important;
    border-bottom: 1px solid var(--rule);
  }
  .diff-col--left { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .connect-grid > form { border-right: none !important; border-bottom: 1px solid var(--rule); }

  /* Section 5 — Advanced Workloads / Scale */
  .adv-card { padding: 24px 16px 20px !important; }
  .adv-card h3 { font-size: 20px !important; line-height: 1.18; }
  /* Stack the cluster-a / channel / cluster-b viz vertically AND center content */
  .adv-workloads-viz {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px 10px !important;
  }
  .adv-workloads-viz__src,
  .adv-workloads-viz__dest {
    align-items: center !important;
    text-align: center !important;
  }
  /* Header row (cluster-a / 8× gpu) — center as one line */
  .adv-workloads-viz__src > div:first-child,
  .adv-workloads-viz__dest > div:first-child {
    width: 100% !important;
    justify-content: center !important;
    gap: 10px;
  }
  /* Bottom status line full-width centered */
  .adv-workloads-viz__dest > div:last-child {
    text-align: center !important;
    width: 100% !important;
  }
  .adv-workloads-viz__channel {
    min-width: 0 !important;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin: 4px 0;
    padding: 10px 4px !important;
  }
}

/* ---- Blog ---- */
.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--rule);
  background: var(--bg-2);
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 28px 26px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--fg-0);
  position: relative;
  transition: background 220ms, padding-left 220ms;
}
.blog-card:last-child { border-bottom: none; }
.blog-card:hover { background: var(--bg-1); padding-left: 36px; }
.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.blog-card__num { color: var(--accent); }
.blog-card__tag { color: var(--accent); }
.blog-card__date { color: var(--fg-2); }
.blog-card__title {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.2;
  margin: 4px 0 0;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--fg-0);
  max-width: 50ch;
}
.blog-card__sub {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 4px 0 0;
  color: var(--fg-2);
  max-width: 64ch;
}
.blog-card__arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ---- Blog post body — flush with the hero title, container's right margin
   mirrors the left so the body uses the full content width. ---- */
.post-body {
  max-width: none;
  margin: 0;
  font-family: var(--font-mono);
  color: var(--fg-1);
}
.post-body__p {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 20px;
}
.post-body__h3 {
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.25;
  margin: 48px 0 16px;
  color: var(--fg-0);
  letter-spacing: -0.3px;
}
.post-body__h4 {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.3;
  margin: 32px 0 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.post-body__list {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 20px;
  padding-left: 24px;
}
.post-body__list li { margin-bottom: 6px; }
.post-body__code {
  background: var(--bg-2);
  border: 1px solid var(--rule-strong);
  padding: 16px 18px;
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--accent);
  overflow-x: auto;
  white-space: pre;
}
.post-body__note {
  display: block;
  border-left: 2px solid var(--accent);
  padding: 8px 14px;
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  background: var(--bg-2);
}
.post-body__callout {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-0);
  font-style: normal;
}

/* ---- Prev / next nav at end of post ---- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  margin-top: 80px;
}
.post-nav__col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 20px;
  border-right: 1px solid var(--rule);
  text-decoration: none;
  color: var(--fg-0);
  font-family: var(--font-mono);
  transition: background 220ms;
}
.post-nav__col:last-child { border-right: none; }
.post-nav__col:hover { background: var(--bg-2); }
.post-nav__col--next { text-align: right; }
.post-nav__col--index { text-align: center; }
.post-nav__label {
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.post-nav__title {
  font-size: 13.5px;
  color: var(--fg-1);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .blog-card { padding: 22px 18px; }
  .blog-card__title { font-size: 18px; }
  .post-body__p, .post-body__list { font-size: 14px; }
  .post-body__h3 { font-size: 19px; margin: 36px 0 12px; }
  .post-body__h4 { font-size: 14px; }
  .post-body__code { font-size: 11.5px; padding: 12px 14px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__col { border-right: none; border-bottom: 1px solid var(--rule); text-align: left !important; }
  .post-nav__col:last-child { border-bottom: none; }
}

/* ---- Blog card thumbnail ---- */
.blog-card {
  display: grid !important;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}
.blog-card__thumb {
  width: 220px;
  height: 140px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--rule-strong);
  position: relative;
}
.blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 360ms cubic-bezier(.2,.7,.2,1);
}
.blog-card:hover .blog-card__thumb img { transform: scale(1.03); }
.blog-card__body { display: flex; flex-direction: column; gap: 10px; }

/* ---- Post body figures (images and videos) — capped narrower than the
   text and centered, so they sit like a focal column inside the wide body. */
.post-body__figure {
  margin: 36px auto;
  padding: 0;
  border: 1px solid var(--rule-strong);
  background: var(--bg-2);
  max-width: 70ch;
}
.post-body__figure img {
  width: 100%;
  height: auto;
  display: block;
}
.post-body__figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  text-align: center;
}
.post-body__video {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}
.post-body__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .blog-card {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .blog-card__thumb { width: 100%; height: 160px; }
  .post-body__figure { margin: 22px 0; }
  .post-body__figure figcaption { font-size: 10.5px; padding: 8px 12px; }
}

/* ---- Product page viz blocks — responsive containment ---- */
.prod-viz {
  width: 100%;
  min-width: 0;
  overflow: hidden; /* keep ASCII bars + cell grids inside the box */
}

@media (max-width: 640px) {
  /* Performance — UtilizationBars + ColdStartViz rows shed the rigid 3-col grid */
  .util-bar-row,
  .cold-row {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "label value" "bar bar" !important;
    gap: 6px 10px !important;
    padding: 12px 12px !important;
  }
  .util-bar-row > *:nth-child(1),
  .cold-row > *:nth-child(1) { grid-area: label; }
  .util-bar-row > *:nth-child(3),
  .cold-row > *:nth-child(3) { grid-area: value; }
  .util-bar-row > *:nth-child(2),
  .cold-row > *:nth-child(2) { grid-area: bar; min-width: 0; }
  .cold-row__bar {
    overflow: hidden;
    display: block;
    font-size: 11px !important;
    letter-spacing: 0 !important;
  }

  /* Orchestration — worker columns shrink to fit */
  .orch-viz > div:nth-child(2) > div { gap: 6px !important; }
  .orch-viz > div:nth-child(2) > div > div > div:nth-child(2) { height: 88px !important; }

  /* Reliability — stack NODE-A / channel / NODE-B vertically */
  .rel-viz__row {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 16px 14px !important;
  }
  .rel-viz__row > div > div[style*="grid-template-columns: repeat(8"] {
    grid-template-columns: repeat(8, 1fr) !important;
  }
  .rel-viz__row > div > div[style*="grid-template-columns: repeat"] span {
    width: auto !important;
    aspect-ratio: 1.2 / 1;
  }
  /* Center channel between the two stacked nodes */
  .rel-viz__row > div:nth-child(2) {
    align-self: center;
    width: 100%;
    text-align: center;
  }
  .rel-viz__row > div:nth-child(2) > div:nth-child(2) {
    margin: 6px auto !important;
    width: 60% !important;
  }

  /* How it works — stack the 3-step grid */
  .how-viz > div:nth-child(2) {
    grid-template-columns: 1fr !important;
  }
  .how-viz > div:nth-child(2) > div {
    border-right: none !important;
    border-bottom: 1px solid var(--rule);
    min-height: 0 !important;
    padding: 22px 18px !important;
  }
  .how-viz > div:nth-child(2) > div:last-child {
    border-bottom: none;
  }

  /* Product benefits grid stacks on mobile */
  .prod-benefits {
    grid-template-columns: 1fr !important;
  }
  .prod-benefits > .prod-benefit {
    border-right: none !important;
    border-bottom: 1px solid var(--rule) !important;
  }
  .prod-benefits > .prod-benefit:last-child {
    border-bottom: none !important;
  }
}

/* ---- Use case viz — mobile-specific layouts so text doesn't break out of cells ---- */
@media (max-width: 640px) {
  /* AutoSpot: 8-cell row is too tight on mobile. Switch to 4-col × 2-row,
     and clip any state label that's still too wide. */
  .spot-viz__row {
    grid-template-columns: repeat(4, 1fr) !important;
    row-gap: 8px;
    column-gap: 6px;
    padding: 14px 12px !important;
  }
  .spot-viz__row > div {
    padding: 8px 4px !important;
    min-width: 0;
    overflow: hidden;
  }
  .spot-viz__row > div > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .spot-viz__row > div > span:nth-child(2) { font-size: 9px !important; }
  /* drop the third status word — the colored border already conveys state */
  .spot-viz__row > div > span:nth-child(3) { display: none; }

  /* Comp Bio: the 120px label column eats too much room and squashes the
     animated cells to 3px. Stack label above the cells. */
  .cbio-row {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "label value" "cells cells" !important;
    row-gap: 6px;
    column-gap: 10px;
    padding: 10px 0 !important;
  }
  .cbio-row > div:nth-child(1) { grid-area: label; }
  .cbio-row > div:nth-child(3) { grid-area: value; }
  .cbio-row > div:nth-child(2) {
    grid-area: cells;
    min-width: 0;
  }

  /* Training: 8 ranks across 375px — switch to 4×2 so rank labels (29px)
     have breathing room and the fault flash stays inside the box. */
  .train-viz__row {
    grid-template-columns: repeat(4, 1fr) !important;
    row-gap: 6px;
    column-gap: 6px;
    padding: 14px 12px !important;
  }
  .train-viz__row > div {
    padding: 8px 4px !important;
    min-width: 0;
    overflow: hidden;
  }
  .train-viz__row > div > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .train-viz__strip { padding: 10px 12px 14px !important; }

  /* The viz footer strips wrap nicely instead of overlapping */
  .spot-viz > div:last-child,
  .cbio-viz > div:last-child,
  .train-viz > div:last-child {
    flex-wrap: wrap !important;
    gap: 6px 10px !important;
    font-size: 9.5px !important;
  }
}
