/* ============================================================
   HUMAN HARNESS — editorial cinematic system
   Big italic serifs, mono labels, paper-cream type on deep black.
   Two-tone duality: human ember vs machine cyan.
   ============================================================ */

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #050505;
  --bg-deep: #020202;
  --bg-raised: rgba(12, 12, 13, 0.78);
  --bg-strong: rgba(20, 20, 22, 0.94);

  /* lines */
  --line: rgba(243, 240, 232, 0.10);
  --line-strong: rgba(243, 240, 232, 0.22);
  --line-bright: rgba(243, 240, 232, 0.42);

  /* type */
  --paper: #f3f0e8;
  --text: #f3f0e8;
  --muted: #a09c92;
  --faint: #5a564f;
  --ink: #050505;

  /* duality */
  --ember: #ff6b3c;          /* human / warm / blood */
  --ember-bright: #ff885c;
  --ember-deep: #c4451f;
  --cyan: #5ee5d6;           /* machine / cold / system */
  --cyan-bright: #8df4e6;
  --cyan-deep: #1d9c8e;
  --telegram: #2aabee;       /* telegram brand blue */
  --telegram-deep: #1a8acb;

  /* secondary */
  --gold: #f5c85f;
  --green: #6ee58f;
  --red: #ff5b66;
  --steel: #b4c0ca;

  /* type families */
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  max-width: 100vw;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100vw;
  background:
    radial-gradient(ellipse at 14% 8%, rgba(94, 229, 214, 0.10), transparent 36rem),
    radial-gradient(ellipse at 88% 92%, rgba(255, 107, 60, 0.10), transparent 38rem),
    radial-gradient(ellipse at 50% 50%, rgba(94, 229, 214, 0.04), transparent 60rem),
    var(--bg-deep);
  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a { font: inherit; }
button { color: inherit; }

/* ---------- ATMOSPHERE LAYERS ---------- */

#harness-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

/* fine grid that fades downward */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(243, 240, 232, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 240, 232, 0.020) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.9), transparent 78%);
}

/* horizontal scanlines */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.012) 0px,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.6;
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.10;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.94  0 0 0 0 0.91  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  animation: grain 1.6s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-5%, 3%); }
  40%  { transform: translate(4%, -4%); }
  60%  { transform: translate(-3%, 5%); }
  80%  { transform: translate(2%, 2%); }
  100% { transform: translate(0,0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0,0,0,0.55) 92%);
}

.spotlight {
  position: fixed;
  width: 720px;
  height: 720px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(94, 229, 214, 0.10), rgba(255, 107, 60, 0.04) 35%, transparent 65%);
  filter: blur(20px);
  transition: opacity 200ms ease;
  opacity: 0;
}

body.has-cursor .spotlight { opacity: 1; }

/* ---------- HARNESS RAIL (left edge) ---------- */

.harness-rail {
  position: fixed;
  left: 18px;
  top: 12vh;
  bottom: 12vh;
  width: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.rail-cap {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-deep);
  flex-shrink: 0;
}
.rail-cap.top { box-shadow: inset 0 0 6px rgba(94,229,214,0.4); }
.rail-cap.bottom { box-shadow: inset 0 0 6px rgba(255,107,60,0.4); }

.rail-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, rgba(94,229,214,0.6), rgba(255,107,60,0.6));
  position: relative;
  margin: 4px 0;
  overflow: hidden;
}

.rail-line i {
  position: absolute;
  left: -2px;
  top: 0;
  width: 5px;
  height: 0%;
  background: linear-gradient(180deg, var(--cyan), var(--ember));
  box-shadow: 0 0 12px rgba(94,229,214,0.6);
  transition: height 600ms cubic-bezier(0.65, 0, 0.35, 1);
}

.rail-label {
  position: absolute;
  left: 22px;
  bottom: -22px;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--faint);
}

/* ---------- HEADER ---------- */

.deck-header,
.deck-footer,
.slide-dots,
.deck-shell {
  position: relative;
  z-index: 3;
}

.deck-header {
  height: 72px;
  width: min(1480px, calc(100% - 80px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding-top: 6px;
}

.deck-header > *,
.slide-grid > * { min-width: 0; }

.brand-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--line);
  background: rgba(8,8,9,0.6);
  transition: all 200ms ease;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1;
}

.brand-name {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-link:hover { border-color: var(--cyan); transform: translateY(-1px); }
.brand-link:hover .brand-name { color: var(--text); }

.deck-status {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: rgba(8,8,9,0.6);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(94,229,214,0.9);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.78); opacity: 0.55; }
  50%      { transform: scale(1.16); opacity: 1; }
}

.join-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--ember);
  background: linear-gradient(135deg, rgba(255,107,60,0.18), rgba(255,107,60,0.04));
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  transition: all 200ms ease;
}

.join-link .join-arrow {
  font-style: normal;
  transition: transform 200ms ease;
}

.join-link:hover {
  background: linear-gradient(135deg, rgba(255,107,60,0.32), rgba(255,107,60,0.10));
  transform: translateY(-1px);
}

.join-link:hover .join-arrow { transform: translateX(3px); }

/* ---------- SLIDE DOTS ---------- */

.slide-dots {
  position: fixed;
  top: 50%;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
  z-index: 4;
}

.slide-dots button {
  width: 24px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(243, 240, 232, 0.15);
  cursor: pointer;
  transition: all 220ms ease;
}

.slide-dots button.is-active {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(94, 229, 214, 0.8);
  width: 36px;
}

.slide-dots button:hover { background: rgba(243, 240, 232, 0.4); }

/* ---------- DECK + SLIDES ---------- */

.deck-shell {
  width: min(1480px, calc(100% - 110px));
  height: calc(100vh - 152px);
  margin: 0 auto;
  outline: none;
  margin-left: max(80px, calc((100vw - 1480px) / 2));
  margin-right: max(30px, calc((100vw - 1480px) / 2));
}

@media (min-width: 1620px) {
  .deck-shell {
    width: 1480px;
    margin-left: auto;
    margin-right: auto;
  }
}

.slide {
  position: absolute;
  inset: 0 56px 0 56px;
  display: none;
  align-items: center;
  pointer-events: none;
}

.slide.is-active {
  display: flex;
  pointer-events: auto;
  animation: slideIn 720ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.985); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);     filter: blur(0); }
}

/* slide meta block (number + slug) — top left of every slide */
.slide-meta {
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.slide-number {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(96px, 14vw, 200px);
  line-height: 0.78;
  color: var(--paper);
  opacity: 0.05;
  letter-spacing: -0.04em;
  position: absolute;
  left: -12px;
  top: -8px;
  pointer-events: none;
  user-select: none;
  transition: opacity 700ms ease;
}

.slide.is-active .slide-number {
  animation: numberFade 1.2s ease forwards;
}

@keyframes numberFade {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 0.08; transform: translateY(0); }
}

.slide-slug {
  position: absolute;
  right: 0;
  top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--faint);
}

.slide-slug::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--line-strong);
  vertical-align: middle;
  margin-right: 10px;
}

.slide-grid {
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-layout       { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); }
.product-layout,
.task-layout,
.module-layout,
.terminal-layout,
.hive-layout,
.curve-layout,
.router-layout,
.codex-layout,
.capital-layout    { grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr); }
.product-loop-layout { grid-template-columns: minmax(0, 0.7fr) minmax(560px, 1.3fr); }

.product-loop-layout h2 { font-size: clamp(28px, 3.1vw, 44px); line-height: 1; }
.product-loop-layout .lead { font-size: 16px; margin-top: 18px; }
.evidence-layout   { grid-template-columns: minmax(0, 0.68fr) minmax(520px, 1.32fr); }

/* ---------- TYPOGRAPHY ---------- */

.kicker {
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker-tick {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid var(--cyan);
  background: linear-gradient(135deg, var(--cyan) 0 50%, transparent 50% 100%);
  transform: rotate(45deg);
}

h1, h2, h3, p { letter-spacing: 0; }
h1, h2, h3 { margin: 0; overflow-wrap: anywhere; }

h1 {
  max-width: 980px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 7.4vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  color: var(--paper);
}

h1 em, h2 em {
  font-style: italic;
  background: linear-gradient(120deg, var(--ember-bright), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

h1 span, h2 span { display: block; }

h2 {
  max-width: 820px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 1;
  letter-spacing: -0.018em;
  color: var(--paper);
}

/* Slides whose left column is narrower need a smaller headline */
.router-layout h2,
.task-layout h2,
.curve-layout h2,
.codex-layout h2,
.module-layout h2,
.terminal-layout h2,
.capital-layout h2,
.product-layout h2,
.evidence-layout h2,
.hive-layout h2 {
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.04;
  max-width: 100%;
  hyphens: auto;
}

/* Hard-bound everything to its grid column */
.slide-grid > * {
  min-width: 0;
  max-width: 100%;
}

.slide-grid h1,
.slide-grid h2,
.slide-grid .lead,
.slide-grid .kicker {
  max-width: 100%;
  overflow-wrap: break-word;
}

h3 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.005em;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
}

/* staggered title reveal */
[data-stagger] span {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22,0.61,0.36,1), filter 700ms ease;
}

.slide.is-active [data-stagger] span {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.slide.is-active [data-stagger] span:nth-child(1) { transition-delay: 220ms; }
.slide.is-active [data-stagger] span:nth-child(2) { transition-delay: 360ms; }
.slide.is-active [data-stagger] span:nth-child(3) { transition-delay: 500ms; }

/* ---------- ACTIONS ---------- */

.action-row,
.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.nav-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 8, 9, 0.78);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 220ms ease;
  position: relative;
  overflow: hidden;
}

.primary-action {
  border-color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(94, 229, 214, 0.22), rgba(94, 229, 214, 0.04)),
    rgba(8, 8, 9, 0.86);
  color: var(--paper);
}

.primary-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 600ms ease;
}

.primary-action:hover::before { transform: translateX(100%); }

.primary-action i,
.join-link i {
  font-style: normal;
  transition: transform 200ms ease;
}

.primary-action:hover { transform: translateY(-1px); border-color: var(--cyan-bright); box-shadow: 0 8px 24px rgba(94,229,214,0.18); }
.primary-action:hover i { transform: translateX(3px); }

.secondary-action { color: var(--muted); }

.secondary-action:hover,
.nav-button:hover {
  border-color: var(--cyan);
  background: rgba(94, 229, 214, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.hero-signature,
.final-credit {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.sig-line {
  display: inline-block;
  flex: 0 0 60px;
  height: 1px;
  background: var(--line-strong);
}

.hero-signature small,
.final-credit small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- HERO MACHINE ---------- */

.hero-machine {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 229, 214, 0.10), transparent 60%),
    rgba(7, 7, 9, 0.88);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 32px 100px rgba(0,0,0,0.5);
}

.machine-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(243,240,232,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,240,232,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 78%);
  pointer-events: none;
}

.machine-halo {
  position: absolute;
  inset: 18% 18%;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, rgba(94,229,214,0.0), rgba(94,229,214,0.4), rgba(255,107,60,0.4), rgba(94,229,214,0.0));
  filter: blur(40px);
  opacity: 0.5;
  animation: halo 18s linear infinite;
}

@keyframes halo {
  to { transform: rotate(360deg); }
}

.machine-core {
  position: relative;
  z-index: 2;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(94, 229, 214, 0.5);
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background:
    radial-gradient(circle, rgba(8,8,9,0.96), rgba(2,2,3,0.92));
  box-shadow:
    inset 0 0 60px rgba(94, 229, 214, 0.12),
    0 0 120px rgba(94, 229, 214, 0.18);
}

.machine-core::before,
.machine-core::after {
  content: "";
  position: absolute;
  inset: -16px;
  border: 1px solid rgba(94, 229, 214, 0.18);
  border-radius: 50%;
  pointer-events: none;
}
.machine-core::after {
  inset: -32px;
  border-style: dashed;
  border-color: rgba(94, 229, 214, 0.10);
  animation: spin 60s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.machine-core span,
.machine-core small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.machine-core strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 38px;
  line-height: 1;
  color: var(--paper);
}

.orbital {
  position: absolute;
  z-index: 3;
  min-width: 110px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 8, 9, 0.92);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  font-weight: 500;
}

.orbital i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.orbital-a { top: 60px;  left: 60px;  animation: float1 8s ease-in-out infinite; }
.orbital-b { top: 100px; right: 56px; animation: float2 9s ease-in-out infinite; }
.orbital-c { bottom: 92px; right: 78px; animation: float3 10s ease-in-out infinite; }
.orbital-d { bottom: 60px; left: 50px; animation: float4 11s ease-in-out infinite; }

@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(8px,-6px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-6px,8px); } }
@keyframes float3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-8px,-6px); } }
@keyframes float4 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(8px,6px); } }

.signal-rings,
.signal-rings::before,
.signal-rings::after {
  position: absolute;
  inset: 80px;
  border: 1px solid rgba(243, 240, 232, 0.06);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.signal-rings::before { inset: 60px; border-color: rgba(94,229,214,0.10); }
.signal-rings::after  { inset: -80px; border-color: rgba(255,107,60,0.10); }

/* ---------- PANEL FRAMES (shared) ---------- */

.hero-copy,
.task-console,
.product-shot,
.module-readout,
.phone-shell,
.product-flow-stage,
.failure-grid article,
.final-panel,
.evidence-wall figure,
.lane-output,
.bandwidth-panel,
.curve-panel,
.router-stage,
.codex-terminal,
.capital-stage,
.board-orbit {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  backdrop-filter: blur(18px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

/* corner ticks */
.curve-panel::before, .curve-panel::after,
.router-stage::before, .router-stage::after,
.codex-terminal::before, .codex-terminal::after,
.capital-stage::before, .capital-stage::after,
.product-flow-stage::before, .product-flow-stage::after,
.board-orbit::before, .board-orbit::after,
.hero-machine::before, .hero-machine::after,
.task-console::before, .task-console::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--line-bright);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  z-index: 4;
}

.curve-panel::before, .router-stage::before, .codex-terminal::before,
.capital-stage::before, .product-flow-stage::before, .board-orbit::before,
.hero-machine::before, .task-console::before {
  top: -1px; left: -1px;
  border-top-width: 1px;
  border-left-width: 1px;
}

.curve-panel::after, .router-stage::after, .codex-terminal::after,
.capital-stage::after, .product-flow-stage::after, .board-orbit::after,
.hero-machine::after, .task-console::after {
  bottom: -1px; right: -1px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

.hero-copy,
.lane-output,
.module-readout,
.product-flow-stage,
.final-panel {
  padding: 36px;
  width: 100%;
  max-width: 100%;
}

.panel-corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  z-index: 4;
  pointer-events: none;
}

.panel-corner.top-left { top: 14px; left: 18px; }
.panel-corner.top-right { top: 14px; right: 18px; }
.panel-corner.bottom-right { bottom: 14px; right: 18px; }

/* ---------- SEGMENTED CONTROLS ---------- */

.segmented-control,
.terminal-controls,
.curve-controls,
.router-controls,
.capital-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.segmented-control button,
.terminal-controls button,
.curve-controls button,
.router-controls button,
.capital-controls button,
.module-grid button,
.life-step,
.product-sequence button {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.6);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 220ms ease;
}

.segmented-control button:hover,
.terminal-controls button:hover,
.curve-controls button:hover,
.router-controls button:hover,
.capital-controls button:hover,
.module-grid button:hover,
.life-step:hover,
.product-sequence button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.segmented-control button.is-selected,
.terminal-controls button.is-selected,
.curve-controls button.is-selected,
.router-controls button.is-selected,
.capital-controls button.is-selected,
.module-grid button.is-selected,
.life-step.is-active,
.product-sequence button.is-selected {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(94, 229, 214, 0.20), rgba(94, 229, 214, 0.04));
  color: var(--paper);
  box-shadow: 0 0 18px rgba(94, 229, 214, 0.18);
}

/* ---------- MODULE/LANE READOUT BADGES ---------- */

.module-readout span,
.lane-output .lane-badge,
.lane-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  margin-bottom: 16px;
  padding: 5px 10px;
  border: 1px solid var(--cyan);
  background: linear-gradient(135deg, rgba(94, 229, 214, 0.16), rgba(94, 229, 214, 0.02));
  color: var(--cyan-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.module-readout p,
.lane-output p,
.failure-grid p,
.product-shot figcaption,
.evidence-wall figcaption,
.product-flow-stage p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

.lane-output h3,
.module-readout h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  color: var(--paper);
}

/* ---------- STACK LIST (Context OS) ---------- */

.stack-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.stack-list span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(94,229,214,0.06), transparent 60%);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stack-list span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  flex-shrink: 0;
}

.stack-list span::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--ember));
}

/* ---------- PRODUCT SHOTS / EVIDENCE ---------- */

.product-shot,
.evidence-wall figure {
  margin: 0;
  overflow: hidden;
  position: relative;
}

.product-shot img,
.evidence-wall img {
  display: block;
  width: 100%;
  height: auto;
  background: #0a0a0b;
  filter: contrast(1.05) saturate(1.05);
}

.product-shot figcaption,
.evidence-wall figcaption {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: rgba(8,8,9,0.86);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compact-shot { margin-bottom: 14px; }

.evidence-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.evidence-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 8px;
  border: 1px solid var(--cyan);
  background: rgba(8,8,9,0.92);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ---------- TASK CONSOLE / LIFECYCLE ---------- */

.task-console {
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 26px;
}

.lane-output {
  min-height: 0;
  border-color: var(--line);
  padding: 24px;
}

.lifecycle {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.life-step {
  position: relative;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  font-size: 9px;
  letter-spacing: 0.14em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-step i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-bright);
  transition: all 200ms ease;
}

.life-step.is-active i {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* ---------- MODULE GRID ---------- */

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* ---------- TERMINAL STAGE (telegram) ---------- */

.terminal-stage {
  display: grid;
  grid-template-columns: 200px minmax(280px, 380px);
  gap: 22px;
  align-items: center;
  justify-content: end;
}

.data-bridge {
  display: grid;
  gap: 12px;
}

.data-bridge span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255,107,60,0.06), transparent 70%);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.data-bridge span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember);
  animation: blink 2.4s ease infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.data-bridge span::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--ember), transparent);
}

.phone-shell {
  position: relative;
  width: min(100%, 380px);
  min-height: 660px;
  border-radius: 36px;
  padding: 16px 14px 14px;
  background:
    linear-gradient(160deg, rgba(42, 171, 238, 0.10), rgba(94, 229, 214, 0.04)),
    #0a0b0c;
  border: 1px solid rgba(243, 240, 232, 0.16);
  box-shadow:
    inset 0 0 0 3px rgba(0,0,0,0.7),
    0 0 0 6px rgba(20, 22, 24, 0.9),
    0 32px 80px rgba(0,0,0,0.5);
  overflow: hidden;
}

.phone-shell::before {
  content: "TELEGRAM";
  position: absolute;
  left: -22px;
  top: 56px;
  transform: rotate(-90deg);
  transform-origin: left top;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.4em;
  color: var(--telegram);
  opacity: 0.6;
}

.phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 22px;
  border-radius: 0 0 14px 14px;
  background: #000;
  z-index: 5;
}

.phone-status {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 22px 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--paper);
}

.phone-status .status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-bars,
.status-wifi,
.status-batt {
  display: inline-block;
  background: var(--paper);
}

.status-bars {
  width: 14px;
  height: 9px;
  -webkit-mask: linear-gradient(180deg, transparent 0 30%, var(--paper) 30% 100%);
          mask: linear-gradient(180deg, transparent 0 30%, var(--paper) 30% 100%);
  background:
    repeating-linear-gradient(90deg,
      var(--paper) 0 2px,
      transparent 2px 4px,
      var(--paper) 4px 6px,
      transparent 6px 8px,
      var(--paper) 8px 10px,
      transparent 10px 12px,
      var(--paper) 12px 14px);
  background: linear-gradient(180deg, var(--paper), var(--paper));
  -webkit-mask: none;
  mask: none;
  position: relative;
}
.status-bars::before {
  content: "";
  position: absolute;
  inset: 0;
}
.status-wifi {
  width: 12px; height: 9px;
  border-radius: 0 0 2px 2px;
  -webkit-mask: radial-gradient(circle at 50% 100%, var(--paper) 0 100%, transparent 0);
          mask: radial-gradient(circle at 50% 100%, var(--paper) 0 100%, transparent 0);
}
.status-batt {
  width: 18px; height: 8px;
  border: 1px solid var(--paper);
  background: transparent;
  border-radius: 1px;
  position: relative;
}
.status-batt::after {
  content: "";
  position: absolute;
  inset: 1px 4px 1px 1px;
  background: var(--paper);
}
.status-batt::before {
  content: "";
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px; height: 4px;
  background: var(--paper);
}

.phone-top {
  position: relative;
  z-index: 3;
  min-height: 56px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 8px;
  border-bottom: 1px solid rgba(243, 240, 232, 0.06);
  background: linear-gradient(180deg, rgba(42, 171, 238, 0.10), rgba(42, 171, 238, 0.0));
}

.tg-back {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--telegram);
  line-height: 1;
  font-weight: 400;
}

.tg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, #5cc6f0, var(--telegram) 70%, var(--telegram-deep));
  box-shadow: 0 4px 12px rgba(42, 171, 238, 0.4);
}

.tg-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.tg-meta span {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--paper);
  text-transform: none;
}

.tg-meta small {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--telegram);
}

.tg-meta small em {
  font-style: normal;
  color: var(--cyan);
}

.tg-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--telegram);
  background: rgba(42, 171, 238, 0.14);
  color: var(--telegram);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tg-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--telegram);
  box-shadow: 0 0 8px var(--telegram);
  animation: pulse 1.6s ease-in-out infinite;
}

.phone-feed {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 8px 4px;
  min-height: 360px;
}

.phone-input {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid rgba(243, 240, 232, 0.08);
  background: rgba(8, 8, 9, 0.6);
}

.phone-input-bar {
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(243, 240, 232, 0.06);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.phone-input-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--telegram);
  color: #fff;
  box-shadow: 0 4px 10px rgba(42, 171, 238, 0.4);
}

.kicker-tg-icon {
  color: var(--telegram);
  vertical-align: middle;
  margin-right: -2px;
}

.kicker code {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--telegram);
  background: rgba(42, 171, 238, 0.10);
  padding: 1px 6px;
  border: 1px solid rgba(42, 171, 238, 0.32);
  letter-spacing: 0.08em;
}

.message {
  max-width: 88%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  line-height: 1.45;
  font-size: 14px;
  animation: messageIn 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(42, 171, 238, 0.32), rgba(42, 171, 238, 0.18));
  border-color: rgba(42, 171, 238, 0.5);
  border-bottom-right-radius: 4px;
  color: var(--paper);
}

.message.bot {
  align-self: flex-start;
  background: rgba(243, 240, 232, 0.06);
  border-bottom-left-radius: 4px;
}

.message small {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- BOARD ORBIT (Hive Mind) ---------- */

.board-orbit {
  position: relative;
  min-height: 580px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 229, 214, 0.08), transparent 60%),
    rgba(7,7,9,0.85);
  overflow: hidden;
}

.board-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(243,240,232,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,240,232,0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 76%);
}

.board-rings::before,
.board-rings::after {
  content: "";
  position: absolute;
  border: 1px dashed rgba(94,229,214,0.18);
  border-radius: 50%;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}

.board-rings::before {
  width: 60%;
  height: 60%;
  animation: spin 90s linear infinite;
}
.board-rings::after {
  width: 80%;
  height: 80%;
  border-color: rgba(255,107,60,0.14);
  animation: spin 120s linear infinite reverse;
}

.board-center,
.board-orbit > span {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(8,8,9,0.92);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  font-weight: 500;
  z-index: 2;
}

.board-center {
  width: 180px;
  height: 180px;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border-color: var(--gold);
  background: radial-gradient(circle, rgba(245,200,95,0.14), rgba(8,8,9,0.95));
  box-shadow: 0 0 60px rgba(245,200,95,0.18), inset 0 0 40px rgba(245,200,95,0.06);
  text-align: center;
  gap: 4px;
}

.board-center span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

.board-center small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.board-orbit > span {
  width: 120px;
  height: 50px;
  transform: translate(-50%, -50%);
  transition: all 300ms ease;
}

.board-orbit > span:hover {
  border-color: var(--cyan);
  background: rgba(94,229,214,0.10);
  color: var(--paper);
}

.board-orbit > span:nth-of-type(1) { left: 50%; top: 12%; }
.board-orbit > span:nth-of-type(2) { left: 76%; top: 22%; }
.board-orbit > span:nth-of-type(3) { left: 88%; top: 50%; }
.board-orbit > span:nth-of-type(4) { left: 76%; top: 78%; }
.board-orbit > span:nth-of-type(5) { left: 50%; top: 88%; }
.board-orbit > span:nth-of-type(6) { left: 24%; top: 78%; }
.board-orbit > span:nth-of-type(7) { left: 12%; top: 50%; }
.board-orbit > span:nth-of-type(8) { left: 24%; top: 22%; }

/* ---------- PRODUCT LOOP ---------- */

.product-sequence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}

.product-sequence button {
  min-height: 78px;
  display: grid;
  gap: 4px;
  align-content: center;
  text-align: left;
  padding: 12px;
}

.product-sequence button span,
.flow-node small {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  font-weight: 500;
  text-transform: uppercase;
}

.product-sequence button strong {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--paper);
  text-transform: none;
}

.product-sequence button small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-flow-stage {
  min-height: 580px;
  overflow: hidden;
  padding: 0;
}

.browser-frame {
  border: 0;
  background:
    linear-gradient(135deg, rgba(94, 229, 214, 0.08), transparent 38%),
    rgba(3, 4, 5, 0.92);
  min-height: 580px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.browser-top {
  min-height: 44px;
  display: grid;
  grid-template-columns: repeat(3, 10px) 1fr;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.browser-top > span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(243, 240, 232, 0.30);
}

.browser-top > span:nth-child(1) { background: var(--red); }
.browser-top > span:nth-child(2) { background: var(--gold); }
.browser-top > span:nth-child(3) { background: var(--green); }

.browser-top code {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-chat-demo {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.flow-node {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.flow-node h3 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  color: var(--paper);
}

.chat-bubble {
  width: min(88%, 580px);
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.chat-bubble strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.chat-bubble p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.chat-bubble.system {
  justify-self: end;
  border-color: rgba(94, 229, 214, 0.26);
  background: linear-gradient(135deg, rgba(94, 229, 214, 0.10), rgba(94, 229, 214, 0.02));
}

.chat-bubble.system strong { color: var(--cyan); }

.artifact-card {
  position: relative;
  padding: 16px 18px;
  border: 1px solid rgba(255, 107, 60, 0.32);
  background: linear-gradient(135deg, rgba(255, 107, 60, 0.10), rgba(255, 107, 60, 0.02));
}

.artifact-card span {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  color: var(--ember-bright);
  border: 1px solid var(--ember);
  background: rgba(255, 107, 60, 0.10);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.artifact-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--paper);
}

.loop-meter {
  display: grid;
  gap: 9px;
  margin-top: 4px;
}

.loop-meter span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.loop-meter i {
  display: block;
  height: 4px;
  overflow: hidden;
  background: rgba(243, 240, 232, 0.06);
  position: relative;
}

.loop-meter i::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--ember));
  transition: width 600ms cubic-bezier(0.65,0,0.35,1);
}

/* ---------- FAILURE / PARTIAL AUTO ---------- */

.failure-wrap,
.partial-wrap {
  width: 100%;
  display: grid;
  gap: 28px;
}

.failure-head,
.partial-head {
  max-width: 1100px;
}

.partial-head h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02;
}

.partial-head h2 em {
  background: linear-gradient(120deg, var(--ember-bright), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.partial-head .lead {
  max-width: 760px;
  margin-top: 16px;
}

.auto-throttle {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 91, 102, 0.06), rgba(94, 229, 214, 0.06)),
    rgba(8, 8, 9, 0.7);
  padding: 18px 32px 22px;
}

.auto-throttle::before {
  content: "HARNESS TENSION";
  position: absolute;
  top: 10px;
  left: 28px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.auto-throttle::after {
  content: "← SLACK   //   TIGHT →";
  position: absolute;
  top: 10px;
  right: 28px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.throttle-ends {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 14px;
}

.throttle-ends .end {
  display: grid;
  gap: 3px;
  align-items: center;
}

.throttle-ends .end.partial {
  color: var(--red);
  text-align: left;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}

.throttle-ends .end.full {
  color: var(--cyan);
  text-align: right;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
}

.throttle-ends .end.partial i {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.throttle-ends .end.full i {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.throttle-ends .end.partial strong { grid-column: 2; }
.throttle-ends .end.partial small  { grid-column: 2; }
.throttle-ends .end.full strong    { grid-column: 1; }
.throttle-ends .end.full small     { grid-column: 1; }

.throttle-ends .end i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  align-self: center;
}

.throttle-ends .end strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
  color: var(--paper);
}

.throttle-ends .end small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.throttle-rail {
  position: relative;
  height: 14px;
  margin-top: 18px;
  margin-bottom: 4px;
}

.throttle-rail::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 91, 102, 0.6) 0%, rgba(245, 200, 95, 0.5) 50%, rgba(94, 229, 214, 0.7) 100%);
  box-shadow: 0 0 10px rgba(94, 229, 214, 0.18);
}

.throttle-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 10px;
  background: rgba(243, 240, 232, 0.4);
}

.failure-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.failure-grid article {
  position: relative;
  min-height: 240px;
  padding: 20px 22px 22px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
}

.excuses-grid article {
  background:
    linear-gradient(180deg, rgba(255, 91, 102, 0.04), transparent 30%),
    var(--bg-raised);
}

.excuses-grid .excuse {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.32;
  color: var(--muted);
  position: relative;
  padding-left: 16px;
}

.excuses-grid .excuse::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--red);
  opacity: 0.5;
}

.excuses-grid h3 {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cyan-bright);
  text-transform: none;
}

.excuses-grid article > p:last-child {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.fail-tag {
  margin: 0;
  padding: 4px 8px;
  align-self: start;
  justify-self: start;
  font-family: var(--mono) !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember-bright) !important;
  border: 1px solid rgba(255, 107, 60, 0.4);
  background: rgba(255, 107, 60, 0.08);
}

.fail-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 56px;
  line-height: 0.9;
  color: var(--paper);
  opacity: 0.18;
}

.failure-grid article h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  color: var(--paper);
}

.failure-grid article p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.failure-grid article::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
}

.failure-grid article:nth-child(1)::before { background: linear-gradient(90deg, var(--red), transparent); }
.failure-grid article:nth-child(2)::before { background: linear-gradient(90deg, var(--gold), transparent); }
.failure-grid article:nth-child(3)::before { background: linear-gradient(90deg, var(--cyan), transparent); }
.failure-grid article:nth-child(4)::before { background: linear-gradient(90deg, var(--green), transparent); }
.failure-grid article:nth-child(5)::before { background: linear-gradient(90deg, var(--ember), transparent); }

/* ---------- CURVE / CAPITAL CANVAS PANELS ---------- */

.curve-panel,
.router-stage,
.codex-terminal,
.capital-stage {
  position: relative;
  min-height: 540px;
  background:
    linear-gradient(145deg, rgba(94, 229, 214, 0.04), rgba(255, 107, 60, 0.04)),
    var(--bg-raised);
  overflow: hidden;
}

.curve-panel canvas,
.capital-stage canvas {
  display: block;
  width: 100%;
  height: 540px;
}

.curve-readout,
.capital-meter {
  position: absolute;
  left: 22px;
  bottom: 22px;
  min-width: 240px;
  border: 1px solid var(--cyan);
  background: linear-gradient(135deg, rgba(8,8,9,0.92), rgba(8,8,9,0.78));
  padding: 16px 18px;
  z-index: 3;
}

.curve-readout span,
.capital-meter span {
  display: block;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.curve-readout strong,
.capital-meter strong {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 42px;
  line-height: 1;
  color: var(--paper);
}

.curve-readout small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.capital-meter strong {
  font-family: var(--sans);
  font-style: normal;
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan-bright);
  letter-spacing: 0;
}

/* ---------- ROUTER STAGE ---------- */

.router-stage {
  display: grid;
  grid-template-columns: minmax(120px, 0.78fr) minmax(220px, 1fr) minmax(180px, 0.78fr);
  gap: 22px;
  align-items: center;
  padding: 28px;
}

.thought-stack {
  display: grid;
  gap: 12px;
}

.thought-stack span {
  position: relative;
  min-height: 60px;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.04);
  padding: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 300ms cubic-bezier(0.22,0.61,0.36,1);
}

.thought-stack span.is-active {
  border-color: var(--ember);
  background: linear-gradient(90deg, rgba(255,107,60,0.18), rgba(255,107,60,0.02));
  color: var(--paper);
  transform: translateX(10px);
  box-shadow: 0 0 24px rgba(255,107,60,0.18);
}

.thought-stack span.is-active::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px var(--ember);
}

.router-core {
  position: relative;
  min-height: 280px;
  border: 1px solid rgba(94, 229, 214, 0.42);
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background:
    radial-gradient(circle, rgba(94, 229, 214, 0.14), transparent 62%),
    rgba(5, 6, 6, 0.8);
  box-shadow: 0 0 90px rgba(94, 229, 214, 0.18);
}

.router-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(94,229,214,0.4);
  animation: corePulse 2.4s ease-out infinite;
}

@keyframes corePulse {
  0%   { transform: scale(0.96); opacity: 0.8; }
  100% { transform: scale(1.18); opacity: 0; }
}

.router-core span,
.router-core small,
.bandwidth-panel span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.router-core strong {
  max-width: 220px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.12;
  color: var(--paper);
  letter-spacing: -0.005em;
}

.bandwidth-panel {
  border: 1px solid var(--line);
  background: rgba(8, 8, 9, 0.86);
  padding: 18px;
}

.bandwidth-panel strong {
  display: block;
  margin: 10px 0 14px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 48px;
  line-height: 1;
  color: var(--cyan-bright);
}

.bandwidth-bar {
  height: 6px;
  border: 0;
  background: rgba(243, 240, 232, 0.06);
  overflow: hidden;
  position: relative;
}

.bandwidth-bar i {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--ember));
  transition: width 600ms cubic-bezier(0.65,0,0.35,1);
}

/* ---------- THROUGHPUT STATS ---------- */

.throughput-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.throughput-stats span {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(94,229,214,0.06), transparent 60%);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.throughput-stats strong {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 42px;
  line-height: 1;
  color: var(--paper);
  letter-spacing: -0.02em;
}

.throughput-stats small {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- CODEX TERMINAL ---------- */

.codex-terminal {
  padding: 18px;
  font-family: var(--mono);
}

.terminal-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 4px 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 500;
  text-transform: uppercase;
}

.terminal-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-bright);
}

.term-dot:nth-child(1) { background: var(--red); }
.term-dot:nth-child(2) { background: var(--gold); }
.term-dot:nth-child(3) { background: var(--green); }

.terminal-bar strong {
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.terminal-bar strong::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.6s ease-in-out infinite;
}

.codex-lines {
  display: grid;
  gap: 8px;
  padding-top: 16px;
}

.codex-line {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(5, 6, 6, 0.72);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12px;
  animation: codexIn 380ms cubic-bezier(0.22,0.61,0.36,1);
}

@keyframes codexIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.codex-line strong {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.codex-line span {
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0;
}

.codex-line small {
  color: var(--ember-bright);
  font-size: 10px;
  letter-spacing: 0.14em;
}

/* ---------- CAPITAL STAGE ---------- */

.capital-stage { min-height: 540px; }

/* ---------- FINAL PANEL ---------- */

.final-panel {
  width: min(1000px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: 60px 40px;
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,107,60,0.10), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(94,229,214,0.10), transparent 40%),
    var(--bg-raised);
}

.final-panel h2,
.final-panel .lead {
  margin-left: auto;
  margin-right: auto;
}

.final-panel h2 {
  font-size: clamp(42px, 6vw, 84px);
  margin-top: 24px;
}

.final-glyph {
  display: inline-flex;
  gap: 12px;
  margin-bottom: 20px;
}

.final-glyph span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper);
  opacity: 0.5;
}

.final-glyph span:nth-child(1) { background: var(--cyan); animation: pulse 1.6s ease-in-out infinite; }
.final-glyph span:nth-child(2) { background: var(--gold); animation: pulse 1.6s ease-in-out infinite 0.3s; }
.final-glyph span:nth-child(3) { background: var(--ember); animation: pulse 1.6s ease-in-out infinite 0.6s; }

.final-mantra {
  position: relative;
  margin: 32px auto 0;
  padding: 26px 40px;
  max-width: 720px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 107, 60, 0.04), rgba(94, 229, 214, 0.04));
}

.final-mantra p {
  margin: 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.18;
  color: var(--paper);
  letter-spacing: -0.005em;
  text-align: center;
}

.final-mantra p em {
  font-style: italic;
  background: linear-gradient(120deg, var(--cyan-bright), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mantra-quote {
  position: absolute;
  font-family: var(--serif);
  font-style: italic;
  font-size: 76px;
  line-height: 0.5;
  color: var(--ember);
  opacity: 0.5;
  user-select: none;
  pointer-events: none;
}

.mantra-quote:not(.close) {
  top: 18px;
  left: 6px;
}

.mantra-quote.close {
  bottom: 4px;
  right: 6px;
  color: var(--cyan);
}

.final-actions { justify-content: center; margin-top: 28px; }

.final-credit {
  margin-top: 48px;
  justify-content: center;
}

/* ---------- FOOTER ---------- */

.deck-footer {
  position: fixed;
  left: 50%;
  bottom: 22px;
  width: min(900px, calc(100% - 60px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  transform: translateX(-50%);
  z-index: 5;
}

.nav-button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.nav-button i { font-style: normal; transition: transform 200ms ease; }
.nav-button:hover i { transform: translateX(2px); }
.nav-button[id="prev-slide"]:hover i { transform: translateX(-2px); }

.footer-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: rgba(8,8,9,0.78);
  backdrop-filter: blur(12px);
}

.footer-slug {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

.progress-track {
  height: 4px;
  background: rgba(243, 240, 232, 0.08);
  overflow: hidden;
  position: relative;
}

#progress-bar {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--ember));
  transition: width 600ms cubic-bezier(0.65,0,0.35,1);
}

.footer-counter {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  white-space: nowrap;
}

.footer-counter strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--paper);
}

.footer-counter small { color: var(--faint); font-size: 11px; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1280px) {
  .harness-rail { left: 10px; }
  .deck-shell {
    margin-left: 50px;
    margin-right: 20px;
  }
}

@media (max-width: 1180px) {
  body { overflow-y: auto; overflow-x: hidden; }

  .harness-rail { display: none; }

  .deck-shell {
    height: auto;
    width: min(940px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 100px;
  }

  .slide {
    position: static;
    min-height: auto;
    display: none;
    padding: 40px 0 110px;
    transform: none;
    overflow: visible;
    inset: auto;
  }

  .slide.is-active { display: block; }

  .slide-number {
    font-size: 96px;
    left: -8px;
    top: -16px;
  }

  .slide-grid,
  .hero-layout, .product-layout, .task-layout, .module-layout, .terminal-layout,
  .hive-layout, .product-loop-layout, .curve-layout, .router-layout, .codex-layout,
  .capital-layout, .evidence-layout {
    grid-template-columns: 1fr;
  }

  .hero-machine { min-height: 460px; }
  .terminal-stage { justify-content: start; grid-template-columns: 160px 1fr; }
  .failure-grid { grid-template-columns: repeat(2, 1fr); }

  .slide-dots { display: none; }
}

@media (max-width: 720px) {
  .deck-header {
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    overflow: hidden;
    height: auto;
    min-height: 60px;
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
  }

  .deck-status { display: none; }
  .brand-name { display: none; }
  .brand-link { padding: 6px; }

  .join-link {
    max-width: 178px;
    text-align: center;
    padding: 8px 12px;
  }

  .join-link span { font-size: 10px; }

  .deck-shell {
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    overflow: hidden;
    margin-left: 10px;
    margin-right: 10px;
  }

  .slide {
    padding: 24px 0 100px;
    width: 100%;
    max-width: calc(100vw - 20px);
  }

  .slide-meta { position: relative; height: 40px; }
  .slide-number { font-size: 76px; left: -4px; top: -10px; }
  .slide-slug { font-size: 9px; }

  .slide-grid,
  .hero-copy,
  .hero-machine,
  .product-shot,
  .task-console,
  .curve-panel,
  .router-stage,
  .codex-terminal,
  .capital-stage,
  .terminal-stage,
  .board-orbit,
  .product-flow-stage,
  .phone-shell,
  .final-panel {
    width: 100%;
    max-width: calc(100vw - 20px);
  }

  h1, h2, .lead {
    width: calc(100vw - 50px);
    max-width: calc(100vw - 50px);
  }

  .hero-copy,
  .lane-output,
  .module-readout,
  .product-flow-stage,
  .final-panel { padding: 24px; }

  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  .lead { font-size: 16px; }

  .lifecycle, .module-grid, .evidence-wall, .router-stage, .throughput-stats,
  .terminal-stage, .failure-grid {
    grid-template-columns: 1fr;
  }

  .hero-machine { min-height: 380px; }
  .machine-core { width: 200px; height: 200px; }
  .machine-core strong { font-size: 28px; }

  .orbital { min-width: 90px; min-height: 36px; font-size: 10px; padding: 0 10px; }
  .orbital-a { top: 28px; left: 16px; }
  .orbital-b { top: 60px; right: 14px; }
  .orbital-c { bottom: 60px; right: 20px; }
  .orbital-d { bottom: 28px; left: 16px; }

  .phone-shell { min-height: 560px; max-width: 320px; margin: 0 auto; }

  .curve-panel, .capital-stage { min-height: 420px; }
  .curve-panel canvas, .capital-stage canvas { height: 420px; }

  .curve-readout, .capital-meter {
    left: 14px; right: 14px; bottom: 14px; min-width: 0;
  }

  .router-core { min-height: 220px; }
  .codex-line { grid-template-columns: 1fr; gap: 6px; }
  .product-flow-stage, .browser-frame { min-height: auto; }

  .product-sequence { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .product-sequence button { min-height: 64px; padding: 8px; }
  .product-sequence button small { display: none; }

  .product-chat-demo { padding: 18px; }
  .chat-bubble { width: 100%; }
  .flow-node h3 { font-size: 24px; }

  .deck-footer {
    bottom: 12px;
    width: calc(100% - 20px);
    grid-template-columns: auto 1fr auto;
  }

  .footer-meta { padding: 8px 10px; gap: 8px; }
  .footer-slug { display: none; }
  .nav-button { min-width: 64px; padding: 10px 12px; }
}

@media (max-width: 480px) {
  h1 { font-size: 34px; line-height: 1.02; }
  h2 { font-size: 28px; }
  .product-sequence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .failure-grid { grid-template-columns: 1fr; }
}

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

  #harness-field, .film-grain, .machine-halo, .router-pulse { display: none; }

  [data-stagger] span { opacity: 1; transform: none; filter: none; }
}
