:root {
  --bg: #faf9f5;
  --sand: #f1efe7;
  --sand-2: #e9e6dc;
  --white: #ffffff;
  --line: #e5e2d8;
  --line-strong: #cfcbb9;

  --ink: #141413;
  --ink-2: #52514c;
  --muted: #84827a;

  --sage: #4b6543;
  --sage-hover: #3b5134;
  --sage-soft: #e7eee3;
  --sage-term: #b5ce9e;
  --sage-term-dim: rgba(181, 206, 158, 0.14);
  --amber: #dfb474;

  --term-bg: #131513;
  --term-bar: #1a1d19;
  --term-panel: #161916;
  --term-line: #2a2f29;
  --term-text: #e6e4db;
  --term-muted: #888c83;

  --display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gh-ink: #faf9f5;
  --pill-bg: rgba(250, 249, 245, 0.8);
  --pill-border: rgba(20, 20, 19, 0.09);
  --pill-shadow: 0 10px 28px rgba(20, 20, 19, 0.07), 0 1px 2px rgba(20, 20, 19, 0.04);
  --frame-border: rgba(20, 20, 19, 0.1);
  --frame-shadow: 0 32px 84px rgba(20, 20, 19, 0.14);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111311;
  --sand: #181b17;
  --sand-2: #20241f;
  --white: #1c201b;
  --line: rgba(244, 242, 234, 0.09);
  --line-strong: rgba(244, 242, 234, 0.16);

  --ink: #f3f1ea;
  --ink-2: #b4b2a8;
  --muted: #7f7e76;

  --sage: #8fb37e;
  --sage-hover: #a5c694;
  --sage-soft: rgba(143, 179, 126, 0.15);

  --term-bg: #0c0e0c;
  --term-bar: #131613;
  --term-panel: #101310;
  --term-line: #242923;

  --gh-ink: #111311;
  --pill-bg: rgba(22, 25, 21, 0.78);
  --pill-border: rgba(244, 242, 234, 0.12);
  --pill-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --frame-border: rgba(244, 242, 234, 0.1);
  --frame-shadow: 0 32px 84px rgba(0, 0, 0, 0.5);
}

.art-dark { display: none; }
[data-theme="dark"] .art-light { display: none; }
[data-theme="dark"] .art-dark { display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  padding-top: 78px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

section[id] { scroll-margin-top: 84px; }

img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-band {
  border-top: 1px solid var(--line);
}

/* ============================================================
   Header — Open at top, morphs into centered frosted pill on scroll
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: transparent;
  pointer-events: none;
  transition: padding 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.header-inner {
  pointer-events: auto;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

body.is-scrolled .site-header {
  padding: 12px 20px 0;
}
body.is-scrolled .header-inner {
  max-width: 860px;
  height: 56px;
  padding: 0 12px 0 24px;
  background: var(--pill-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-color: var(--pill-border);
  box-shadow: var(--pill-shadow);
}
body.is-scrolled .nav-gh {
  border-radius: 999px;
  padding: 7px 14px;
}
body.is-scrolled .nav-link {
  color: var(--ink);
}
body.is-scrolled .nav-link:hover {
  color: var(--sage);
}
.brand-prompt { color: var(--sage); }

.nav-sep {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
  margin: 0 2px;
}
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.theme-toggle:hover {
  color: var(--ink);
  background: var(--sand);
  border-color: var(--line);
}
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .sh { color: var(--sage); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-link {
  font-size: 14px;
  font-weight: 450;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.16s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-gh {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--gh-ink);
  background: var(--sage);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 9px;
  transition: background 0.15s ease, border-radius 0.25s ease, padding 0.25s ease;
}
.nav-gh:hover { background: var(--sage-hover); }

/* ============================================================
   Hero — Pure Product Focus + Seamless Sculptural Workbench Art
   ============================================================ */
.hero {
  padding: 40px 0 60px;
  text-align: center;
}
.hero-category {
  margin: 0 auto 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--sage);
}
.hero h1.hero-slogan {
  margin: 0 auto 22px;
  max-width: 860px;
  font-family: var(--display);
  font-size: clamp(46px, 6vw, 78px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.024em;
  color: var(--ink);
}
.slogan-top {
  display: block;
}
.brand-lockup {
  display: block;
  white-space: nowrap;
}
.hero-prompt {
  display: inline-block;
  height: 0.6em;
  width: auto;
  color: var(--sage);
  vertical-align: -0.015em;
  margin: 0 0.03em 0 0.07em;
}
.hero-prompt .cursor-bar {
  animation: cursorBlink 1.15s steps(1, end) infinite;
}
@keyframes cursorBlink {
  0%, 54% { opacity: 1; }
  55%, 100% { opacity: 0.14; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-prompt .cursor-bar { animation: none; }
}
.hero h1 .accent { color: var(--sage); }

.hero-lead {
  margin: 0 auto 40px;
  font-family: var(--display);
  font-size: clamp(21px, 2.3vw, 26px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink-2);
}

.cmd-row {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.cmd-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--term-bg);
  color: #faf9f5;
  border: 1px solid var(--term-line);
  border-radius: 11px;
  padding: 11px 13px 11px 18px;
  font-family: var(--mono);
  font-size: 13.5px;
  box-shadow: 0 14px 32px rgba(20, 20, 19, 0.13);
}
[data-theme="dark"] .cmd-pill {
  background: #1a1e19;
  border-color: rgba(244, 242, 234, 0.14);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}
.cmd-pill .s { color: var(--sage-term); font-weight: 600; }
.copy-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: #d7d5cc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 4.5px 9.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-btn:hover { color: var(--sage-term); border-color: rgba(181, 206, 158, 0.55); }

.secondary-link {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  text-decoration: none;
  padding: 11px 15px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  transition: all 0.15s ease;
}
.secondary-link:hover { border-color: var(--sage); color: var(--sage); }

/* Seamless Hero Artwork (Zero visible box edge on #FAF9F5) */
.hero-sculpture {
  margin: 20px auto 0;
  max-width: 860px;
}
.hero-sculpture img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Quiet Product Capabilities Ribbon (No heavy metrics or benchmark bragging) */
.product-ribbon {
  max-width: 880px;
  margin: 18px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: left;
}
.rib-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.rib-item span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ============================================================
   Section 2 — Full-Width Uncropped Vibe Roboting Film
   ============================================================ */
.film-section {
  padding: 84px 0 88px;
}
.sec-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 28px;
}
.sec-row-head.flip h2 {
  order: 2;
  text-align: right;
}
.sec-row-head.flip p {
  order: 1;
  justify-self: start;
}
.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 8px;
}
.sec-row-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.sec-row-head p {
  margin: 0;
  max-width: 500px;
  justify-self: end;
  font-size: 15px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.film-frame {
  border-radius: 18px;
  overflow: hidden;
  background: #0c100d;
  border: 1px solid var(--frame-border);
  box-shadow: var(--frame-shadow);
}
.film-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c100d;
  cursor: pointer;
}
.film-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.film-play-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid rgba(250, 249, 245, 0.28);
  background: rgba(20, 22, 19, 0.72);
  backdrop-filter: blur(12px);
  color: #faf9f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.18s ease;
}
.film-player.is-paused .film-play-overlay {
  opacity: 1;
  pointer-events: auto;
}
.film-play-overlay:hover {
  background: var(--sage);
  transform: translate(-50%, -50%) scale(1.06);
}
.film-scrubber {
  background: var(--sand);
  padding: 10px 20px 0;
  cursor: pointer;
}
.film-scrubber-track {
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
  overflow: hidden;
  transition: height 0.15s ease;
}
.film-scrubber:hover .film-scrubber-track { height: 7px; }
.film-scrubber-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--sage);
  transition: width 0.1s linear;
}
.film-bar {
  padding: 11px 20px 13px;
  background: var(--sand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-2);
}
.film-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.film-time {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
  font-weight: 500;
  min-width: 78px;
}
.film-caption {
  color: var(--muted);
  font-size: 12.5px;
}
.film-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mini-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.mini-btn:hover { border-color: var(--sage); color: var(--sage); }

/* ============================================================
   Section 3 — Dual Linked Interactive Studio
   Left: Perception as file I/O  |  Right: Manipulation as coding
   ============================================================ */
.wb-section {
  padding: 84px 0 92px;
}
.inst-bar {
  min-height: 48px;
  padding: 8px 14px 8px 16px;
  background: var(--term-bar);
  border-bottom: 1px solid var(--term-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.inst-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--term-text);
  white-space: nowrap;
}
.inst-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage-term);
}
.inst-dot-amber { background: var(--amber); }

.inst-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.inst-pill {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--term-muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.inst-pill:hover {
  color: var(--term-text);
  background: rgba(255, 255, 255, 0.05);
}
.inst-pill.active {
  color: var(--sage-term);
  background: rgba(181, 206, 158, 0.14);
  border-color: rgba(181, 206, 158, 0.3);
  font-weight: 600;
}
.inst-run {
  color: #111311;
  background: var(--sage-term);
  border: 1px solid transparent;
  font-weight: 600;
  margin-left: 3px;
}
.inst-run:hover {
  color: #111311;
  background: #c8ddb5;
}
.inst-run.is-running {
  background: rgba(255, 255, 255, 0.04);
  color: var(--term-muted);
  border-color: rgba(255, 255, 255, 0.14);
}
.inst-run.is-running:hover {
  background: rgba(227, 154, 133, 0.12);
  color: #e39a85;
  border-color: rgba(227, 154, 133, 0.36);
}

.inst-stage {
  position: relative;
  height: 316px;
  background: #0f120f;
}
.inst-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  touch-action: pan-y;
}
#ctrl-canvas { cursor: pointer; }
.stage-hint {
  position: absolute;
  left: 14px;
  bottom: 11px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #7c8177;
  pointer-events: none;
}
.stage-badge {
  position: absolute;
  right: 14px;
  bottom: 11px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #b7bbb2;
  background: rgba(15, 18, 15, 0.78);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.stage-badge-ok { color: var(--sage-term); }

.inst-code {
  border-top: 1px solid var(--term-line);
  background: var(--term-bg);
  padding: 13px 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--term-text);
  height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
}
.inst-io { justify-content: center; }
.io-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
  transition: opacity 0.16s ease;
}
.io-line.is-hidden,
.io-out.is-hidden { opacity: 0; }
.cmd-caret::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--sage-term);
  animation: ssCaret 0.7s steps(1, end) infinite;
}
.io-line > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.io-line .p {
  color: var(--sage-term);
  font-weight: 600;
  margin-right: 7px;
}
.cmd-dim { color: var(--term-muted); }
.io-live {
  padding: 5px 9px;
  margin: 0 -9px;
  border-radius: 7px;
  background: rgba(181, 206, 158, 0.08);
  border: 1px solid rgba(181, 206, 158, 0.16);
}
.io-out {
  color: var(--amber);
  font-weight: 600;
  white-space: nowrap;
}

.inst-py { gap: 2px; justify-content: flex-start; padding-top: 11px; }
.code-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  color: #7c8277;
  font-size: 11.2px;
  font-style: italic;
}
.code-ghost[hidden] { display: none; }
.code-ghost::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage-term);
  opacity: 0.7;
  animation: chipPulse 1.4s ease-in-out infinite;
}
.py-line.is-hidden { display: none; }
.py-line.is-writing {
  background: rgba(181, 206, 158, 0.06);
  border-color: rgba(181, 206, 158, 0.16);
}
.py-line.is-writing > span:last-child {
  display: inline-block;
  animation: codeReveal 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.py-line.is-writing > span:last-child::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--sage-term);
}
@keyframes codeReveal {
  0% { clip-path: inset(0 100% 0 0); opacity: 0.55; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}
.py-line {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #c8c7be;
  font-family: var(--mono);
  font-size: 11.2px;
  line-height: 1.6;
  padding: 4px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.py-line > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.py-line:hover { background: rgba(255, 255, 255, 0.04); }
.py-line.active {
  background: rgba(181, 206, 158, 0.11);
  border-color: rgba(181, 206, 158, 0.24);
  color: #faf9f5;
}
.py-line.active.is-fail {
  background: rgba(227, 154, 133, 0.13);
  border-color: rgba(227, 154, 133, 0.36);
  color: #f4d6cd;
}
.py-line.active.is-fail .ln { color: #e39a85; }
.py-line .ln { color: #5b6157; font-size: 10.5px; user-select: none; }
.py-line.active .ln { color: var(--sage-term); }
.py-line .fn { color: var(--sage-term); }
.py-line .arg { color: var(--amber); font-weight: 500; border-radius: 3px; padding: 0 2px; }
.py-line .arg.flash { animation: argFlash 1.4s ease; }
@keyframes argFlash { 0% { background: rgba(223, 180, 116, 0.4); } 100% { background: transparent; } }
.py-line .arg-old { color: #6c7267; text-decoration: line-through; margin-right: 6px; }
.py-line .str { color: #d6b68a; }
.py-line .ros { color: #9fc7b5; }
.py-line .kw { color: #c7b8d8; }
.py-line .num { color: #e2c58f; }
.py-line .cm { color: #6c7267; }

/* Editable numbers inside the program (drag to scrub, click to type) */
.scrub {
  color: #e2c58f;
  border-bottom: 1px dotted rgba(226, 197, 143, 0.75);
  border-radius: 3px;
  padding: 0 1px;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
  transition: background 0.15s ease;
}
.scrub:hover,
.scrub.is-scrubbing { background: rgba(223, 180, 116, 0.18); }
.scrub.is-editing {
  cursor: text;
  user-select: text;
  outline: 1px solid rgba(223, 180, 116, 0.6);
  background: rgba(223, 180, 116, 0.12);
}
.stage-badge.is-fail {
  color: #e39a85;
  border-color: rgba(227, 154, 133, 0.38);
}

/* Shared agent log line beneath both canvases */
.studio-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 10px 14px 10px 18px;
  border-radius: 12px;
  background: var(--term-bg);
  border: 1px solid var(--term-line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--term-text);
}
.ss-time {
  flex-shrink: 0;
  font-size: 11px;
  color: #6c7267;
  font-variant-numeric: tabular-nums;
}
.ss-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-text::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--sage-term);
  animation: ssCaret 1.1s steps(1, end) infinite;
}
.ss-text.ss-ok { color: var(--sage-term); }
.ss-text.ss-fail { color: #e39a85; }
.ss-text.ss-event { color: var(--amber); }
.ss-text.ss-thought { color: #a7b89c; font-style: italic; }
.ss-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--term-muted);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--term-line);
  transition: all 0.2s ease;
}
.ss-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5b6157;
}
.ss-chip.is-agent {
  color: var(--sage-term);
  border-color: rgba(181, 206, 158, 0.35);
  background: rgba(181, 206, 158, 0.08);
}
.ss-chip.is-agent i {
  background: var(--sage-term);
  animation: chipPulse 1.6s ease-in-out infinite;
}
/* One window, two panes: the same agent loop seen as perception and as code */
.studio-win {
  border-radius: 16px;
  overflow: hidden;
  background: var(--term-bg);
  border: 1px solid var(--term-line);
  box-shadow: var(--frame-shadow);
}
.win-bar {
  height: 52px;
  padding: 0 14px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--term-bar);
  border-bottom: 1px solid var(--term-line);
}
.win-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11.5px;
}
.win-dots { display: flex; gap: 6px; }
.win-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f352e;
}
.win-dots span:first-child { background: #5a7851; }
.win-title { color: var(--term-text); white-space: nowrap; }
.loop-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
}
.loop-step {
  position: relative;
  color: #6c7267;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.loop-step + .loop-step { margin-left: 20px; }
.loop-step + .loop-step::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 50%;
  width: 14px;
  height: 1px;
  background: #3a4038;
}
.loop-step.active {
  color: var(--sage-term);
  background: rgba(181, 206, 158, 0.12);
  border-color: rgba(181, 206, 158, 0.34);
}
.loop-step.active.is-fail {
  color: #e39a85;
  background: rgba(227, 154, 133, 0.12);
  border-color: rgba(227, 154, 133, 0.36);
}
.win-right { display: flex; align-items: center; gap: 10px; }
.win-right .inst-run { margin-left: 0; }
.win-panes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  transition: opacity 0.14s ease;
}
.win-panes.is-switching { opacity: 0.45; }
.pane { display: flex; flex-direction: column; min-width: 0; }
.pane-perc { border-right: 1px solid var(--term-line); }
.pane .inst-bar { background: transparent; min-height: 44px; }
.pane-file {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--term-muted);
}
#flow-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
.studio-win .studio-status {
  border: none;
  border-top: 1px solid var(--term-line);
  border-radius: 0;
}
.io-out.flash { animation: argFlash 1.2s ease; border-radius: 3px; }

/* Scenario switcher dock beneath the studio window */
.scenario-dock {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sd-nav {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.sd-nav:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--sand);
  transform: translateY(-1px);
}
.sd-rail {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.sd-card {
  position: relative;
  appearance: none;
  text-align: left;
  padding: 12px 13px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sd-card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.sd-card:hover {
  border-color: var(--line-strong);
  background: var(--sand);
  transform: translateY(-1px);
}
.sd-card.active {
  border-color: var(--sage);
  background: var(--white);
  box-shadow: 0 6px 20px rgba(75, 101, 67, 0.08);
}
[data-theme="dark"] .sd-card.active {
  background: var(--sand);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}
.sd-card.active::before {
  transform: scaleX(1);
}
.sd-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}
.sd-idx {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}
.sd-card.active .sd-idx {
  color: var(--sage);
}
.sd-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--sand);
  padding: 1.5px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.sd-card.active .sd-tag {
  color: var(--sage);
  background: var(--sage-soft);
}
.sd-name {
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
}
.sd-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 960px) {
  .pane-perc { border-right: none; border-bottom: 1px solid var(--term-line); }
  .loop-track { display: none; }
  .sd-rail {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .sd-rail::-webkit-scrollbar { display: none; }
  .sd-card {
    flex: 0 0 185px;
    scroll-snap-align: center;
  }
}
@keyframes ssCaret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181, 206, 158, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(181, 206, 158, 0); }
}
@media (max-width: 600px) {
  .ss-text { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .ss-text::after, .ss-chip.is-agent i, .py-line .arg.flash { animation: none; }
}

/* ============================================================
   Section 4 — Supported Ecosystem (4-Layer Dependency Matrix)
   ============================================================ */
.eco-section {
  padding: 84px 0 92px;
}
.matrix-real-note code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 1.5px 5.5px;
  border-radius: 5px;
  white-space: nowrap;
}
.matrix-board {
  display: grid;
  grid-template-columns: 0.92fr 1.24fr 0.96fr 1.18fr;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.matrix-col {
  padding: 20px 18px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.matrix-col:first-child { padding-left: 0; }
.matrix-col:last-child { border-right: none; padding-right: 0; }
.matrix-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.matrix-col-head span {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.matrix-col-head strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--sage);
}
.matrix-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mx-item {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.18s ease;
}
.mx-item strong {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 550;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.mx-item span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.mx-item:hover {
  background: var(--sand);
}
.mx-item.active {
  background: var(--sage-soft);
  border-color: rgba(75, 101, 67, 0.25);
}
[data-theme="dark"] .mx-item.active {
  border-color: rgba(143, 179, 126, 0.3);
}
.mx-item.active strong {
  color: var(--sage);
  font-weight: 650;
}
.mx-item.is-compat {
  background: var(--sand);
}
.mx-item.is-dim {
  opacity: 0.32;
}
.mx-item.is-dim:hover {
  opacity: 0.72;
}

.matrix-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
}
.mx-tag {
  appearance: none;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 9.5px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.mx-tag:hover { border-color: var(--sage); color: var(--ink); }
.mx-tag.is-compat {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--white);
}
.mx-tag.active {
  color: var(--sage);
  background: var(--sage-soft);
  border-color: var(--sage);
  font-weight: 600;
}
.mx-tag.is-dim {
  opacity: 0.24;
}
.matrix-real-note {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--sand);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.matrix-real-note.visible { display: block; }

.matrix-cmd-bar {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 11px;
  background: var(--sand);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.matrix-cmd-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  overflow-x: auto;
}
.matrix-cmd-p { color: var(--sage); font-weight: 600; }
.matrix-cmd-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.matrix-summary {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

/* ============================================================
   Section 5 — Real Hardware Spread (Seamless Studio Artwork)
   ============================================================ */
.hw-section {
  padding: 88px 0 92px;
}
.hw-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 56px;
  align-items: center;
}
.hw-grid.flip {
  grid-template-columns: 1.08fr 0.92fr;
}
.hw-grid.flip .hw-art { order: -1; }
.hw-copy h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hw-copy p {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}
.hw-copy code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 2px 6px;
  border-radius: 5px;
}
.hw-shell {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 22px;
}
.hw-shell .p { color: var(--sage); font-weight: 600; margin-right: 8px; }
.paper-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.paper-meta a {
  color: inherit;
  text-decoration: none;
}
.paper-meta a:hover {
  color: var(--sage);
  text-decoration: underline;
}
.sec-row-head p code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.hw-art img {
  width: 100%;
  height: auto;
}
.hw-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.text-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--sage);
  text-decoration: none;
}
.text-arrow.muted-arrow {
  color: var(--ink-2);
  font-weight: 500;
}
.text-arrow:hover { text-decoration: underline; }

/* ============================================================
   Section 6 — Quiet Open Research Closing Band
   ============================================================ */
.closing-section {
  padding: 60px 0 68px;
}
.paper-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 36px;
  flex-wrap: wrap;
}
.paper-note {
  max-width: 720px;
  min-width: 0;
}
.paper-note-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.paper-authors {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.paper-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  flex-shrink: 0;
}
.paper-links a {
  color: var(--sage);
  text-decoration: none;
  font-weight: 600;
}
.paper-links a:hover { text-decoration: underline; }
.cite-toggle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.cite-toggle:hover { border-color: var(--sage); color: var(--sage); }

.bibtex-box {
  position: relative;
  display: none;
  margin-top: 18px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 76px 15px 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  overflow-x: auto;
  line-height: 1.6;
}
.bibtex-box.open { display: block; }
.bibtex-box pre { margin: 0; }
.bib-copy {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* Minimal Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 42px;
  font-size: 13px;
  color: var(--muted);
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.foot-brand {
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.foot-brand strong { color: var(--ink); }
.foot-links { display: flex; gap: 22px; }
.foot-links a { text-decoration: none; color: var(--ink-2); }
.foot-links a:hover { color: var(--sage); }

@media (max-width: 960px) {
  .win-panes, .hw-grid, .hw-grid.flip, .sec-row-head { grid-template-columns: 1fr; }
  .sec-row-head { gap: 14px; }
  .sec-row-head p { justify-self: start; }
  .sec-row-head.flip h2 { order: 0; text-align: left; }
  .sec-row-head.flip p { order: 0; }
  .hw-grid.flip .hw-art { order: 0; }
  .matrix-board { grid-template-columns: repeat(2, 1fr); }
  .matrix-col { padding: 18px 14px; border-bottom: 1px solid var(--line); }
  .matrix-col:nth-child(2n) { border-right: none; }
}
@media (max-width: 600px) {
  .wrap, .header-inner { padding-left: 20px; padding-right: 20px; }
  .matrix-board { grid-template-columns: 1fr; }
  .matrix-col { border-right: none; padding: 16px 0; }
  .wb-status-pill { display: none; }
}
