/* ============================================
   RIFT ROOT — Section styles · v2
   palette: violet=accent only · cyan/lime=tertiary · light-grey=body
   ============================================ */

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.65);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms, background 250ms;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 10, 11, 0.85); }
.nav-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.nav-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--grey-4); }
.nav-wordmark { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; font-weight: 600; }
.nav-wordmark .dim { color: var(--grey-1); margin: 0 2px; }
.nav-llc {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--grey-1); border: 1px solid var(--line); padding: 2px 5px; margin-left: 4px;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-link {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--grey-3); letter-spacing: 0.06em; transition: color 200ms;
  white-space: nowrap;
}
.nav-link:hover { color: var(--violet-bright); }
.nav-link-num { color: var(--grey-1); font-size: 10px; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--grey-4); padding: 8px 14px; border: 1px solid var(--line);
  transition: border-color 200ms, color 200ms, background 200ms;
}
.nav-cta:hover { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-bright); }
.nav-cta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--violet); box-shadow: 0 0 8px var(--violet-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
.nav-burger {
  display: none; width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 5px;
  margin-left: auto; padding: 0 8px;
}
.nav-burger span { display: block; width: 22px; height: 1px; background: var(--grey-4); transition: transform 250ms, opacity 200ms; }
.nav-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile {
  border-top: 1px solid var(--line); background: var(--ink);
  padding: 20px var(--gutter); display: flex; flex-direction: column; gap: 4px;
}
.nav-mobile-link, .nav-mobile-cta {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 14px; color: var(--grey-4);
}
.nav-mobile-link .num { color: var(--grey-1); font-size: 11px; min-width: 24px; }
.nav-mobile-link .arrow { margin-left: auto; color: var(--grey-1); }
.nav-mobile-cta { color: var(--violet-bright); border-bottom: none; padding-top: 24px; }
.nav-mobile-cta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 8px var(--violet-glow); }
@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ===== LOGO MARK ===== */
.logo-mark { display: inline-block; color: var(--grey-4); }
.logo-mark svg { display: block; }
.nav-logo-img {
  display: block;
  flex-shrink: 0;
  /* Add a soft violet halo so it reads as a brand mark even at tiny sizes */
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.25));
}
.full-logo-img { filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.15)); }

/* ===== HERO ===== */
.hero { position: relative; padding-top: 110px; padding-bottom: var(--section-y); overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; opacity: 0.4;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  pointer-events: none;
}
body[data-no-grid] .hero-grid { display: none; }
.hero-inner { position: relative; z-index: 1; }
.hero-meta {
  display: flex; justify-content: space-between;
  padding-block: 12px 28px; border-bottom: 1px solid var(--line);
  margin-bottom: 36px; flex-wrap: wrap; gap: 12px;
}
.hero-meta .mono-label { display: inline-flex; align-items: center; }
.hero-logo-row { padding-block: 16px 48px; }
.hero-logo-row .full-logo-img { height: clamp(140px, 22vw, 240px) !important; }
.hero-body { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: end; }
@media (min-width: 880px) { .hero-body { grid-template-columns: 1.4fr 1fr; gap: 64px; } }
.hero-title { font-size: clamp(44px, 8.6vw, 108px); margin-bottom: 8px; }
.hero-side { display: flex; flex-direction: column; gap: 28px; }
.hero-lede { font-size: clamp(15px, 1.4vw, 17px); color: var(--grey-4); max-width: 44ch; line-height: 1.65; }
.hero-lede .hl-cyan { color: var(--cyan); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stats {
  margin-top: clamp(56px, 9vw, 96px);
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (min-width: 720px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: 28px 24px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; position: relative;
}
.stat::before {
  content: ''; position: absolute; top: -1px; left: -1px; width: 24px; height: 1px;
  background: currentColor; opacity: 0.6;
}
.stat-violet { color: var(--violet-bright); }
.stat-cyan   { color: var(--cyan); }
.stat-lime   { color: var(--lime); }
.stat-grey   { color: var(--grey-3); }
.stat-k {
  font-size: clamp(40px, 5vw, 64px); line-height: 1;
  color: currentColor;
}
.stat-v { color: var(--grey-3); }
.stat-sub { font-size: 11px; color: var(--grey-2); line-height: 1.4; max-width: 30ch; }

/* ===== SECTIONS GENERAL ===== */
.section { padding-block: var(--section-y); position: relative; }
.section-thesis  { background: var(--ink-2); }
.section-erebus  { background: var(--ink); }
.section-beyond  { background: var(--ink-2); }
.section-why     { background: var(--ink); }
.section-about   { background: var(--ink-2); }
.section-ask     { background: var(--ink); }
.section-contact { background: var(--ink-2); }

/* ===== THESIS ===== */
.thesis-hero { max-width: 64ch; margin-bottom: clamp(56px, 8vw, 88px); }
.thesis-title { font-size: clamp(36px, 5.4vw, 68px); margin-bottom: 40px; }
.thesis-lede { color: var(--grey-4); font-size: 16px; line-height: 1.7; max-width: 60ch; }

/* ---- THESIS STACK (numbered numbered cards) ---- */
.thesis-stack {
  list-style: none; margin: 0 0 clamp(56px, 8vw, 88px); padding: 0;
  border-top: 1px solid var(--line);
}
.stack {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  position: relative;
}
@media (max-width: 720px) {
  .stack { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
}
.stack-anchor { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stack-num {
  font-size: clamp(56px, 6vw, 84px); line-height: 0.9; color: var(--grey-2);
  letter-spacing: -0.04em; font-weight: 500;
}
.stack-violet .stack-num { color: var(--violet-bright); }
.stack-cyan   .stack-num { color: var(--cyan); }
.stack-lime   .stack-num { color: var(--lime); }
.stack-tag {
  font-family: var(--font-mono); font-size: 10px; padding: 4px 8px;
  border: 1px solid currentColor; letter-spacing: 0.18em;
}
.stack-body { padding-top: 8px; }
.stack-line {
  color: var(--grey-4); font-size: 15px; line-height: 1.7;
  font-family: var(--font-mono); max-width: 62ch; margin: 0 0 4px 0;
}
.stack-line:last-of-type { margin-bottom: 0; }
.stack-metric {
  margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-mono);
}
.metric-bracket { color: var(--grey-1); font-size: 18px; }
.metric-tag {
  font-size: 9px; padding: 2px 6px; border: 1px solid currentColor;
  letter-spacing: 0.18em;
}
.metric-lime  .metric-tag { color: var(--lime); }
.metric-cyan  .metric-tag { color: var(--cyan); }
.metric-violet .metric-tag { color: var(--violet-bright); }
.metric-value { font-size: 32px; line-height: 1; letter-spacing: -0.03em; }
.metric-lime  .metric-value { color: var(--lime); }
.metric-cyan  .metric-value { color: var(--cyan); }
.metric-violet .metric-value { color: var(--violet-bright); }
.metric-label { color: var(--grey-2); font-size: 11px; letter-spacing: 0.12em; }

/* legacy pipeline classes (kept innocuous in case something still references) */
.pn {
  border: 1px solid var(--line); background: var(--ink);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 250ms, transform 200ms;
}
.pn:hover { transform: translateY(-2px); }
.pn-violet:hover { border-color: var(--violet); }
.pn-cyan:hover   { border-color: var(--cyan); }
.pn-lime:hover   { border-color: var(--lime); }
.pn-head { display: flex; align-items: center; justify-content: space-between; }
.pn-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--grey-1);
  letter-spacing: 0.12em;
}
.pn-title {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--grey-4); letter-spacing: -0.01em; margin-top: 4px;
}
.pn-body { color: var(--grey-3); font-size: 13px; line-height: 1.6; }

.pn-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-1); flex: 0 0 32px;
}
.pn-arrow-back { color: var(--violet-bright); }
@media (max-width: 720px) {
  .pn-arrow { transform: rotate(90deg); flex: 0 0 24px; height: 24px; }
  .pn-arrow-back { transform: rotate(90deg); }
}

.thesis-callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--lime);
  background: var(--ink);
  padding: clamp(28px, 5vw, 48px);
}
.thesis-callout .chip { margin-bottom: 16px; }
.thesis-callout-body { font-size: clamp(20px, 2.6vw, 32px); max-width: 56ch; }

/* ===== EREBUS ===== */
.erebus-hero {
  display: grid; grid-template-columns: 1fr; gap: 56px; align-items: stretch;
}
@media (min-width: 960px) { .erebus-hero { grid-template-columns: 1.2fr 1fr; gap: 64px; } }
.erebus-tag { margin-bottom: 24px; }
.erebus-title { font-size: clamp(36px, 6vw, 80px); margin-bottom: 44px; }
.erebus-lede { color: var(--grey-4); font-size: 16px; max-width: 56ch; line-height: 1.7; }
.erebus-diagram-v2 {
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: clamp(20px, 3vw, 32px);
}
.ed-stack {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0;
}
.ed-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 28px;
}
.ed-stage:last-child { padding-bottom: 0; }
.ed-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-align: left;
  color: var(--grey-3);
  white-space: nowrap;
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
}
html body .ed-stage.ed-cyan   .ed-tag { color: rgb(34, 211, 238) !important; }
html body .ed-stage.ed-violet .ed-tag { color: rgb(192, 132, 252) !important; }
html body .ed-stage.ed-lime   .ed-tag { color: rgb(163, 230, 53) !important; }
html body .ed-stage.ed-amber  .ed-tag { color: rgb(245, 165, 36) !important; }
.ed-card {
  background: rgb(10, 10, 11);
  border: 1px solid var(--line);
  border-left: 3px solid var(--grey-2);
  padding: 18px 22px;
  position: relative;
  width: 100%;
}
html body .ed-card.ed-card { background: rgb(10, 10, 11) !important; }
html body .ed-stage.ed-cyan   .ed-card { border-left-color: rgb(34, 211, 238); }
html body .ed-stage.ed-violet .ed-card { border-left-color: rgb(192, 132, 252); }
html body .ed-stage.ed-lime   .ed-card { border-left-color: rgb(163, 230, 53); }
html body .ed-stage.ed-amber  .ed-card { border-left-color: rgb(245, 165, 36); }
.ed-ship .ed-card {
  background: rgba(163, 230, 53, 0.06);
  border-color: var(--lime);
  border-left-width: 3px;
}
.ed-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: none;
}
html body .ed-title { color: rgb(232, 232, 234) !important; }
.ed-ship .ed-title {
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}
html body .ed-ship .ed-title { color: rgb(163, 230, 53) !important; }
.ed-body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}
html body .ed-body { color: rgb(181, 181, 189) !important; }
.ed-connector {
  position: absolute;
  left: 14px;
  bottom: 4px;
  width: 1px;
  height: 24px;
  border-left: 1px dashed var(--line);
}
.ed-arms {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.ed-arm {
  position: relative;
  background: rgb(17, 17, 20);
  border: 1px solid var(--line);
  padding: 10px 6px 16px;
  text-align: center;
  font-family: var(--font-mono);
}
.ed-arm-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
}
html body .ed-arm-label { color: rgb(139, 139, 149) !important; }
.ed-arm-num {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}
html body .ed-arm-num { color: rgb(232, 232, 234) !important; }
.ed-arm-dot {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgb(168, 85, 247);
  animation: ed-pulse 1.8s infinite;
}
@keyframes ed-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.ed-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.ed-chart-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
html body .ed-chart-label { color: rgb(139, 139, 149) !important; }
.ed-chart-svg {
  width: 100%;
  height: 56px;
  display: block;
}
.ed-chart-line { stroke-linecap: round; stroke-linejoin: round; }
html body .ed-chart-svg .ed-chart-lime { stroke: rgb(163, 230, 53) !important; }
html body .ed-chart-svg .ed-chart-cyan { stroke: rgb(34, 211, 238) !important; }
.ed-loop-note {
  margin-top: 32px;
  padding: 16px 0 0;
  border-top: 1px dashed rgb(168, 85, 247);
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-family: var(--font-mono);
}
.ed-loop-arrow {
  font-size: 20px;
}
html body .ed-loop-arrow { color: rgb(192, 132, 252) !important; }
.ed-loop-text {
  font-size: 13px;
  line-height: 1.5;
}
html body .ed-loop-text { color: rgb(181, 181, 189) !important; }
@media (max-width: 720px) {
  .ed-card { padding: 14px 16px; }
  .ed-tag { font-size: 10px; }
  .ed-arms { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .ed-arm { padding: 6px 2px 12px; }
  .ed-charts { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  .erebus-hero { grid-template-columns: 1.05fr 0.95fr !important; gap: 56px; align-items: stretch; }
  .erebus-hero-text { align-self: start; position: sticky; top: 88px; }
}
.erebus-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .erebus-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .erebus-grid { grid-template-columns: repeat(3, 1fr); } }

.pillar-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.pillar-glyph { font-size: 44px; line-height: 1; font-style: italic; }
.glyph-violet { color: var(--violet-bright); }
.glyph-cyan   { color: var(--cyan); }
.glyph-lime   { color: var(--lime); }
.pillar-title {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--grey-4); font-weight: 600;
}
.pillar-violet { border-top: 2px solid var(--violet); }
.pillar-cyan   { border-top: 2px solid var(--cyan); }
.pillar-lime   { border-top: 2px solid var(--lime); }
.pillar-body { color: var(--grey-3); font-size: 14px; line-height: 1.65; margin-bottom: 20px; }
.pillar-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--grey-3); border: 1px solid var(--line);
  padding: 4px 8px; background: var(--ink-2);
}

.erebus-callout {
  margin-top: clamp(32px, 4vw, 48px);
  padding: clamp(32px, 5vw, 56px) !important;
  background: var(--ink-2) !important;
}
.callout-label { margin-bottom: 24px; display: inline-flex; align-items: center; }
.callout-body { font-size: clamp(22px, 3vw, 36px); max-width: 32ch; }

/* ===== ABOUT ===== */
.about-prose {
  max-width: 68ch; margin: 0;
  display: flex; flex-direction: column; gap: 22px;
}
.about-lede {
  font-size: clamp(24px, 2.8vw, 38px); line-height: 1.25;
  color: var(--grey-4); letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.about-text {
  font-size: 16px; line-height: 1.75;
  color: var(--grey-4); font-family: var(--font-mono);
  max-width: 64ch; margin: 0;
}
.hl-mono { font-family: var(--font-mono); color: var(--cyan); padding: 0 2px; }
.about-sig {
  margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.about-sig-meta { color: var(--grey-1); font-size: 10px; letter-spacing: 0.18em; }

/* ===== RAIL SYSTEM — recurring side-channel for half-width sections ===== */
.rail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}
@media (min-width: 960px) {
  .rail-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 72px;
  }
}
.rail-prose { min-width: 0; }

.side-rail {
  position: relative;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(0deg, transparent 0 18px, var(--line-2) 18px 19px),
    var(--ink-2);
  padding: 28px 28px 24px 36px;
  font-family: var(--font-mono);
  display: flex; flex-direction: column; gap: 22px;
  overflow: hidden;
}
.side-rail::before {
  /* corner accent — top-left bracket */
  content: ''; position: absolute; top: -1px; left: -1px;
  width: 18px; height: 18px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}
.rail-violet { color: var(--violet-bright); }
.rail-cyan   { color: var(--cyan); }
.rail-lime   { color: var(--lime); }
.rail-grey   { color: var(--grey-3); }

.rail-ticks {
  position: absolute;
  left: 14px; top: 28px; bottom: 28px;
  width: 4px; height: auto;
  color: var(--line);
  opacity: 0.9;
}

.rail-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.rail-index {
  font-size: clamp(56px, 7vw, 88px); line-height: 0.9;
  letter-spacing: -0.04em; color: currentColor;
  flex-shrink: 0;
}
.rail-caption {
  font-size: 10px; letter-spacing: 0.22em; color: var(--grey-2);
  align-self: flex-end; padding-bottom: 8px;
  text-transform: uppercase;
  writing-mode: horizontal-tb;
}

.rail-data { display: flex; flex-direction: column; gap: 0; margin: 0; }
.rail-row {
  display: grid; grid-template-columns: 70px 1fr;
  gap: 14px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.rail-row:last-child { border-bottom: none; }
.rail-k {
  font-size: 9px; letter-spacing: 0.18em; color: var(--grey-1);
  text-transform: uppercase;
}
.rail-v {
  font-size: 10.5px; color: var(--grey-4);
  letter-spacing: 0.04em; line-height: 1.5;
  margin: 0;
}

.rail-foot {
  display: flex; align-items: center; gap: 10px;
  padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 9px; letter-spacing: 0.18em; color: var(--grey-1);
  text-transform: uppercase;
}
.rail-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}
.pulse-violet { color: var(--violet-bright); box-shadow: 0 0 8px var(--violet-glow); }
.pulse-cyan   { color: var(--cyan);          box-shadow: 0 0 8px var(--cyan-glow); }
.pulse-lime   { color: var(--lime);          box-shadow: 0 0 8px var(--lime-glow); }
.rail-stamp { color: var(--grey-2); }

.portrait-monogram::after {
  content: ''; position: absolute; top: 8px; right: 22%;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--violet); box-shadow: 0 0 16px var(--violet-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
.portrait-meta { padding-top: 16px; border-top: 1px solid var(--line); position: relative; }
.portrait-name { font-size: 36px; margin-top: 4px; }
.portrait-role { font-size: 12px; color: var(--grey-3); font-family: var(--font-mono); margin-top: 4px; }
.portrait-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); position: relative;
}
.portrait-stats > div { display: flex; flex-direction: column; gap: 4px; }
.portrait-stats .display { font-size: 24px; }
.about-lede { font-size: clamp(22px, 2.6vw, 32px); margin-bottom: 36px; }
.about-text { color: var(--grey-4); font-size: 14px; line-height: 1.75; margin-bottom: 16px; max-width: 60ch; }
.timeline { list-style: none; margin-top: 40px; border-top: 1px solid var(--line); }
.timeline-row { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline-y { color: var(--grey-1); padding-top: 2px; }
.timeline-t { color: var(--grey-4); font-size: 14px; font-weight: 500; }
.timeline-d { color: var(--grey-3); font-size: 13px; margin-top: 2px; }

/* ===== X-DRIVEN ===== */
.xdriven {
  margin-top: clamp(56px, 8vw, 96px);
  display: flex; flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
  align-items: stretch;
  border-top: 1px solid var(--line);
  padding-top: clamp(40px, 6vw, 64px);
}
.xdriven-pullquote {
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.1;
  color: var(--grey-4);
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.xdriven-lede {
  color: var(--grey-4);
  font-size: 14px; line-height: 1.7;
  font-family: var(--font-mono);
  max-width: 64ch;
  margin: 0;
}
html body .xdriven-lede { color: rgb(232, 232, 234) !important; }
html body .xdriven-lede em { color: rgb(192, 132, 252) !important; }
.xdriven-stage {
  background: var(--ink);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
}
.xdriven-stage::before, .xdriven-stage::after {
  content: ''; position: absolute;
  width: 12px; height: 12px;
  border-color: var(--violet); border-style: solid;
}
.xdriven-stage::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.xdriven-stage::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.xdriven-svg { width: 100%; height: auto; display: block; }
/* Beat the host noir-mode SVG fill rewrite. The host injects [data-noir-inline-fill]
   with !important, same specificity as a single class, so we boost ours with chained
   class selectors to guarantee victory regardless of stylesheet order. */
html body .xdriven-svg .xd-card-fill.xd-card-fill { fill: rgb(10,10,11) !important; }
html body .xdriven-svg .xd-text-bright.xd-text-bright { fill: rgb(232,232,234) !important; }
html body .xdriven-svg .xd-text-dim.xd-text-dim    { fill: rgb(181,181,189) !important; }
html body .xdriven-svg .xd-text-meta.xd-text-meta  { fill: rgb(139,139,149) !important; }
html body .xdriven-svg .xd-text-cyan.xd-text-cyan  { fill: rgb(34,211,238) !important; }
html body .xdriven-svg .xd-text-violet.xd-text-violet { fill: rgb(192,132,252) !important; }
html body .xdriven-svg .xd-text-lime.xd-text-lime  { fill: rgb(163,230,53) !important; }
html body .xdriven-svg .xd-text-amber.xd-text-amber { fill: rgb(245,165,36) !important; }
html body .xdriven-svg .xd-text-rose.xd-text-rose  { fill: rgb(240,113,120) !important; }
.xdriven-foot {
  font-family: var(--font-mono);
  font-size: 13px; line-height: 1.6;
  color: var(--grey-3);
  text-align: left;
  max-width: 64ch;
  margin: 0;
}
.xdriven-foot em {
  font-family: var(--font-mono);
  font-style: normal;
  letter-spacing: 0.06em;
}

/* ===== SURFACE — operational inventory ===== */
.section-surface { background: var(--ink); }

.surface-head { margin-bottom: clamp(40px, 6vw, 64px); max-width: 72ch; }
.surface-title { font-size: clamp(32px, 5vw, 64px); margin-bottom: 20px; }
.surface-lede {
  color: var(--grey-4); font-size: 15px; line-height: 1.7;
  font-family: var(--font-mono); max-width: 64ch;
}
.surface-lede strong { color: var(--violet-bright); font-weight: 600; }

/* 8-chip stat strip */
.surface-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: clamp(48px, 7vw, 72px);
}
@media (max-width: 880px)  { .surface-stat-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .surface-stat-strip { grid-template-columns: 1fr 1fr; } }

.surface-stat-cell {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.surface-stat-cell::before {
  content: ''; position: absolute; top: -1px; left: -1px;
  width: 20px; height: 1px; background: var(--violet-bright); opacity: 0.6;
}
.surface-stat-value {
  font-size: clamp(28px, 3.6vw, 44px); line-height: 1;
  color: var(--violet-bright); font-family: var(--font-mono);
  letter-spacing: -0.03em;
}
.surface-stat-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--grey-2); letter-spacing: 0.12em; line-height: 1.4;
}

/* 5-category grid */
.surface-cat-grid {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(32px, 5vw, 48px);
}

.surface-cat-row {
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--cat-accent, var(--violet));
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--ink);
  transition: background 200ms;
}
.surface-cat-row:hover { background: var(--ink-2); }

.surface-cat-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.surface-cat-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cat-accent, var(--violet)); flex-shrink: 0;
}
.surface-cat-name {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--grey-4); letter-spacing: 0.06em;
  flex: 1; min-width: 0;
}
.surface-cat-count {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--cat-accent, var(--violet)); letter-spacing: 0.14em;
  white-space: nowrap;
}

/* Sample entry rows */
.surface-cat-samples {
  display: flex; flex-direction: column; gap: 6px;
  padding-left: 20px;
  border-left: 1px dashed var(--line);
}

.surface-sample {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}

.surface-sample-path {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--grey-3); letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 34ch;
}
.surface-sample-name {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--grey-1); letter-spacing: 0.04em;
}

/* Method badges (surface section — tighter than surface-page badges) */
.sbadge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 1px 5px; border: 1px solid currentColor;
  white-space: nowrap; flex-shrink: 0;
}
.sbadge-get     { color: #22D3EE; }
.sbadge-post    { color: #A3E635; }
.sbadge-patch   { color: #F5A524; }
.sbadge-delete  { color: #F07178; }
.sbadge-cron    { color: #F5A524; }
.sbadge-do      { color: #C084FC; }
.sbadge-env     { color: #8B8B95; }
.sbadge-svc     { color: #22D3EE; }
.sbadge-handler { color: #A3E635; }
.sbadge-proxy   { color: #C084FC; }
.sbadge-default { color: #8B8B95; }

/* Footer line */
.surface-foot {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--grey-2); font-size: 10px; letter-spacing: 0.18em;
}
.surface-foot-link {
  color: var(--grey-3); text-decoration: underline;
  text-decoration-color: var(--line); letter-spacing: 0.06em;
  transition: color 200ms;
}
.surface-foot-link:hover { color: var(--violet-bright); }

@media (max-width: 640px) {
  .surface-cat-row { padding: 16px 16px 16px 18px; }
  .surface-sample-path { max-width: 22ch; }
  .surface-cat-samples { padding-left: 12px; }
}

/* ===== DEMO — Compositor economics ===== */
.section-demo { background: var(--ink-2); }

.demo-hero {
  max-width: 66ch;
  margin-bottom: clamp(48px, 7vw, 80px);
}
.demo-title {
  font-size: clamp(36px, 5.4vw, 68px);
  margin-bottom: 28px;
}
.demo-lede {
  color: var(--grey-4);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  max-width: 64ch;
  margin: 0;
}
.demo-mono {
  font-family: var(--font-mono);
  color: var(--lime);
  font-size: 13px;
}

/* Headline 3-stat row — reuses .stat + .stat-k/.stat-v/.stat-sub from Hero */
.demo-headline-row {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: clamp(40px, 6vw, 64px);
}
@media (min-width: 720px) {
  .demo-headline-row { grid-template-columns: repeat(3, 1fr); }
}

/* Savings bar */
.demo-savings-wrap { margin-bottom: clamp(40px, 6vw, 64px); }
.demo-savings-bar {
  border: 1px solid var(--line);
  background: var(--ink);
  padding: clamp(16px, 2.5vw, 28px);
  position: relative;
}
.demo-savings-bar::before,
.demo-savings-bar::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--violet); border-style: solid;
}
.demo-savings-bar::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.demo-savings-bar::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.demo-savings-svg { width: 100%; height: auto; display: block; max-height: 140px; }

/* Arms table */
.demo-arms-wrap { margin-bottom: clamp(40px, 6vw, 64px); }
.demo-arms {
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
}
.demo-arm-row {
  display: grid;
  grid-template-columns: 1.8fr 0.8fr 0.7fr 0.7fr 0.6fr 1.2fr;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.demo-arm-row:last-child { border-bottom: none; }
.demo-arm-header {
  background: var(--ink);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--grey-2);
  text-transform: uppercase;
  padding: 8px 14px;
}
.demo-arm-selected { background: rgba(163, 230, 53, 0.04); }
.demo-arm-rejected { opacity: 0.5; }
.demo-arm-name { color: var(--grey-4); font-size: 12px; letter-spacing: 0.02em; }
.demo-arm-rej-label { color: var(--rose); font-size: 10px; letter-spacing: 0.08em; }
.demo-arm-price { color: var(--grey-3); font-size: 11px; }
.demo-arm-q    { color: var(--grey-3); font-size: 11px; }
.demo-free { color: var(--lime); font-style: normal; font-size: 11px; }
.demo-arm-zero { color: var(--grey-1); font-size: 11px; }
.demo-tier-chip { font-size: 9px !important; padding: 2px 6px !important; letter-spacing: 0.12em !important; }

/* Arm selection mini-bar */
.demo-sel-bar-wrap { display: flex; align-items: center; gap: 8px; }
.demo-sel-bar {
  display: inline-block; height: 6px;
  background: var(--lime); opacity: 0.75;
  max-width: 80px; min-width: 4px;
}
.demo-sel-pct { color: var(--lime); font-size: 11px; }

/* Key metrics grid */
.demo-metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(36px, 5vw, 56px);
}
@media (min-width: 600px)  { .demo-metrics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .demo-metrics-grid { grid-template-columns: repeat(5, 1fr); } }

.demo-metric {
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.demo-metric:last-child { border-right: none; }
@media (max-width: 1023px) {
  .demo-metric { border-right: 1px solid var(--line); }
  .demo-metric:nth-child(2n) { border-right: none; }
}
.demo-metric-label {
  font-size: 9px !important; letter-spacing: 0.18em !important;
  color: var(--grey-1) !important; display: block;
}
.demo-metric-value {
  font-size: clamp(24px, 3vw, 36px); line-height: 1;
  color: var(--grey-4); letter-spacing: -0.02em;
}
.demo-metric-sub {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--grey-2); line-height: 1.5; max-width: 24ch;
}

/* Footer line */
.demo-footer-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--grey-2);
  padding-top: clamp(20px, 3vw, 32px); border-top: 1px dashed var(--line);
}
.demo-footer-sep { color: var(--grey-1); }
.demo-footer-link {
  color: var(--violet-bright); font-size: 11px;
  font-family: var(--font-mono); letter-spacing: 0.04em; transition: color 200ms;
}
.demo-footer-link:hover { color: var(--cyan); }
.demo-footer-path { color: var(--grey-2); font-size: 11px; font-family: var(--font-mono); }

@media (max-width: 720px) {
  .demo-arm-row { grid-template-columns: 1.6fr 0.7fr 0.6fr 1fr; font-size: 11px; }
  /* hide $/1M out and quality columns on small screens */
  .demo-arm-row > :nth-child(4),
  .demo-arm-row > :nth-child(5) { display: none; }
}

/* ===== BEYOND GENERATION ===== */
.beyond-wrap { max-width: 1100px; }
.beyond-title {
  font-size: clamp(34px, 5vw, 64px); line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: clamp(40px, 6vw, 64px);
  max-width: 22ch;
}
.beyond-cols {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 880px) {
  .beyond-cols { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
.beyond-col {
  border-top: 1px solid var(--line);
  padding-top: 20px; display: flex; flex-direction: column; gap: 14px;
}
.beyond-col p {
  color: var(--grey-4); font-size: 14px; line-height: 1.7;
  font-family: var(--font-mono); margin: 0;
}

/* ===== ASK ===== */
.ask-wrap { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
@media (min-width: 880px) { .ask-wrap { grid-template-columns: 1fr 1fr; gap: 64px; } }
.ask-title { font-size: clamp(34px, 4.8vw, 60px); margin-bottom: 36px; }
.ask-text { color: var(--grey-4); font-size: 15px; line-height: 1.7; max-width: 50ch; margin-bottom: 32px; }
.ask-list { background: var(--ink-2) !important; }
.ask-list-head { margin-bottom: 24px; display: inline-flex; align-items: center; }
.ask-list ul { list-style: none; }
.ask-line {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 0; border-top: 1px dashed var(--line);
  font-family: var(--font-mono); font-size: 12px;
}
.ask-line:last-child { border-bottom: 1px dashed var(--line); }
.ask-bullet {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; flex-shrink: 0; align-self: center;
}
.bullet-violet { background: var(--violet); box-shadow: 0 0 8px var(--violet-glow); }
.bullet-cyan   { background: var(--cyan);   box-shadow: 0 0 8px var(--cyan-glow); }
.bullet-lime   { background: var(--lime);   box-shadow: 0 0 8px var(--lime-glow); }
.ask-k { color: var(--grey-4); white-space: nowrap; }
.ask-dots { flex: 1; border-bottom: 1px dotted var(--grey-1); height: 1px; align-self: center; min-width: 24px; }
.ask-v { color: var(--grey-3); font-size: 11px; text-align: right; }

/* ===== CONTACT ===== */
.contact-wrap { display: grid; grid-template-columns: 1fr; gap: 56px; }
@media (min-width: 880px) { .contact-wrap { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }
.contact-line { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 32px; }
.contact-email {
  display: inline-block; font-size: clamp(28px, 4vw, 48px);
  color: var(--violet-bright); border-bottom: 1px solid var(--violet);
  padding-bottom: 4px; transition: color 200ms;
  word-break: break-all;
}
.contact-email:hover { color: var(--cyan); border-color: var(--cyan); }
.contact-channels { border-top: 1px solid var(--line); }

.contact-prose {
  display: flex; flex-direction: column; gap: 20px;
  max-width: 44ch;
}
.contact-prose-line {
  font-family: var(--font-serif, 'Instrument Serif', serif);
  font-style: italic;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  color: var(--grey-5, #E8E8EA);
  letter-spacing: -0.01em;
  margin: 0;
}
.contact-prose-body {
  color: var(--grey-4);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}
.contact-prose-body em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--violet-bright);
  padding: 0 2px;
}
.contact-row {
  display: grid; grid-template-columns: 90px 1fr 24px;
  align-items: center; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  transition: padding 200ms;
}
.contact-row:hover { padding-left: 8px; }
.contact-row:hover .contact-arrow { color: var(--cyan); transform: translate(2px, -2px); }
.contact-row.is-placeholder { cursor: default; opacity: 0.7; }
.contact-row.is-placeholder:hover { padding-left: 0; }
.contact-label { color: var(--grey-1); }
.contact-value {
  color: var(--grey-4); font-family: var(--font-mono); font-size: 13px;
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.placeholder-pill, .live-pill {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  padding: 2px 6px; border: 1px solid currentColor;
}
.placeholder-pill { color: var(--grey-3); border-color: var(--grey-1); }
.live-pill { color: var(--lime); }
.contact-arrow { color: var(--grey-3); transition: color 200ms, transform 200ms; }

/* ===== EREBUS EXPLORE CTAs ===== */
.erebus-explore-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: clamp(20px, 3vw, 28px);
  /* This row is the last element in its section — keep bottom breathing room tight
     so section padding-block doesn't double the gap. */
  margin-bottom: calc(-1 * clamp(16px, 2vw, 24px));
}
.explore-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 9px 18px;
  border: 1px solid currentColor;
  background: transparent;
  transition: background 200ms, color 200ms;
  white-space: nowrap;
}
.explore-cta-violet { color: var(--violet-bright); }
.explore-cta-cyan   { color: var(--cyan); }
.explore-cta-lime   { color: var(--lime); }
.explore-cta-violet:hover { background: var(--violet-soft); color: var(--violet-bright); }
.explore-cta-cyan:hover   { background: var(--cyan-soft);   color: var(--cyan); }
.explore-cta-lime:hover   { background: var(--lime-soft);   color: var(--lime); }
@media (max-width: 600px) {
  .erebus-explore-row { justify-content: flex-start; flex-direction: column; }
  .explore-cta { width: 100%; justify-content: center; }
}

/* ===== FOOTER ===== */
.footer { margin-top: var(--section-y); border-top: 1px solid var(--line); padding-block: 28px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-mark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--grey-3);
}
.footer-mark .dim { color: var(--grey-1); }
.footer-meta { display: inline-flex; align-items: center; }
.footer-meta .dot {
  width: 6px; height: 6px; background: var(--lime); border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 8px var(--lime-glow);
}

/* ===== TWEAKABLE KNOBS ===== */
[data-violet-low] { --violet-glow: rgba(168, 85, 247, 0.18); }
[data-violet-low] .nav-cta .dot,
[data-violet-low] .footer-meta .dot { animation: none; box-shadow: none; }
[data-violet-heavy] { --violet-glow: rgba(168, 85, 247, 0.55); }
[data-density-tight] { --section-y: clamp(56px, 8vw, 100px); }
[data-density-loose] { --section-y: clamp(120px, 16vw, 200px); }

[data-mono] .display, [data-mono] .display em,
[data-mono] .pillar-glyph, [data-mono] .cap-title,
[data-mono] .portrait-monogram, [data-mono] .portrait-name,
[data-mono] .stat-k, [data-mono] .contact-email {
  font-family: var(--font-mono) !important;
  font-style: normal !important;
  font-weight: 600 !important;
  letter-spacing: -0.04em !important;
}

/* ===== FORCEFUL OVERRIDE: ed-stage tag/card stacking =====
   Every ed-stage MUST render its tag above its card on a new line,
   regardless of host CSS, media queries, or specificity wars. */
html body .erebus-diagram-v2 .ed-stack,
html body .erebus-diagram-v2 ol.ed-stack {
  display: block !important;
}
html body .erebus-diagram-v2 .ed-stage,
html body .erebus-diagram-v2 li.ed-stage {
  display: block !important;
  flex-direction: unset !important;
  grid-template-columns: unset !important;
  width: 100% !important;
}
html body .erebus-diagram-v2 .ed-stage > .ed-tag,
html body .erebus-diagram-v2 li.ed-stage > .ed-tag {
  display: block !important;
  width: 100% !important;
  float: none !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
html body .erebus-diagram-v2 .ed-stage > .ed-card,
html body .erebus-diagram-v2 li.ed-stage > .ed-card {
  display: block !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
  margin: 0 !important;
}
