/* Public landing page. Self-contained: the app CSP allows only same-origin styles and fonts. */

:root {
  --ink-950: #06090f;
  --ink-900: #0a0e16;
  --ink-850: #0e131d;
  --ink-800: #131a26;
  --ink-700: #1c2533;
  --ink-600: #2a3445;
  --edge-dark: rgb(255 255 255 / 8%);
  --edge-dark-strong: rgb(255 255 255 / 14%);
  --text-on-dark: #e9eef6;
  --muted-on-dark: #8d98ab;
  --faint-on-dark: #5c6779;
  --ink: #0d121b;
  --ink-soft: #3a4352;
  --muted: #5d6676;
  --line: #e2e6ed;
  --line-soft: #eef1f5;
  --paper: #f5f7fa;
  --white: #ffffff;
  --blue: #2f6bff;
  --blue-bright: #5b8dff;
  --blue-soft: #e8efff;
  --signal: #2fd191;
  --signal-deep: #139a64;
  --amber: #f2a93b;
  --red: #ef5b50;
  --violet: #a78bfa;
  --font-sans: "Inter var", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-lg: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body.site-body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

p {
  margin: 0;
}

.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), background-color 0.2s, border-color 0.2s, box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--small {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 1px 0 rgb(255 255 255 / 20%) inset, 0 8px 24px -8px rgb(47 107 255 / 70%);
}

.btn--primary:hover {
  background: #255ff2;
  box-shadow: 0 1px 0 rgb(255 255 255 / 20%) inset, 0 14px 32px -10px rgb(47 107 255 / 85%);
}

.btn--ghost {
  border-color: var(--edge-dark-strong);
  background: rgb(255 255 255 / 4%);
  color: var(--text-on-dark);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: rgb(255 255 255 / 26%);
  background: rgb(255 255 255 / 8%);
}

/* Navigation */

.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  color: var(--text-on-dark);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.nav.is-solid {
  border-bottom-color: var(--line);
  background: rgb(255 255 255 / 82%);
  color: var(--ink);
  backdrop-filter: saturate(1.6) blur(14px);
}

.nav.is-dark {
  border-bottom-color: var(--edge-dark);
  background: rgb(10 14 22 / 72%);
  backdrop-filter: saturate(1.4) blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  height: 64px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-mark {
  width: 26px;
  height: 24px;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.72;
  transition: opacity 0.2s, background-color 0.2s;
}

.nav-links a:hover {
  background: rgb(127 127 127 / 12%);
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-signin {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.82;
}

.nav-signin:hover {
  opacity: 1;
}

/* Hero */

.hero {
  position: relative;
  padding: 148px var(--gutter) 0;
  background: var(--ink-900);
  color: var(--text-on-dark);
  overflow: hidden;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 4.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 4.5%) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 78%);
}

.hero-glow {
  position: absolute;
  top: -260px;
  left: 50%;
  width: 1100px;
  height: 760px;
  background:
    radial-gradient(closest-side, rgb(47 107 255 / 38%), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgb(47 209 145 / 12%), transparent 70%);
  transform: translateX(-50%);
  filter: blur(10px);
}

.hero-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.trace {
  fill: none;
  stroke: rgb(91 141 255 / 55%);
  stroke-width: 1.2;
  stroke-dasharray: 90 900;
  stroke-dashoffset: 990;
  animation: trace-run 7s linear infinite;
}

.trace--2 {
  stroke: rgb(47 209 145 / 45%);
  animation-delay: -2.4s;
  animation-duration: 8.5s;
}

.trace--3 {
  animation-delay: -4.1s;
  animation-duration: 7.8s;
}

.trace--4 {
  stroke: rgb(242 169 59 / 40%);
  animation-delay: -1.2s;
  animation-duration: 9.2s;
}

.trace-node {
  fill: var(--ink-900);
  stroke: rgb(91 141 255 / 45%);
  stroke-width: 1.2;
}

@keyframes trace-run {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-copy {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: var(--blue-bright);
}

.pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-bright);
  flex: none;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid currentColor;
  color: var(--blue-bright);
  animation: pulse 2.2s var(--ease-out) infinite;
}

.pulse-dot--green {
  background: var(--signal);
}

.pulse-dot--green::after {
  color: var(--signal);
}

@keyframes pulse {
  0% {
    opacity: 0.9;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.1rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.hero-accent {
  background: linear-gradient(92deg, #ffffff 0%, #b9ccff 45%, #7fa5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  max-width: 680px;
  margin: 26px auto 0;
  color: var(--muted-on-dark);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.hero-stage {
  position: relative;
  max-width: 1240px;
  margin: 72px auto 0;
  perspective: 1800px;
}

.hero-stage::before {
  content: "";
  position: absolute;
  top: 8%;
  right: 8%;
  left: 8%;
  height: 60%;
  background: radial-gradient(closest-side, rgb(47 107 255 / 40%), transparent);
  filter: blur(40px);
  z-index: -1;
}

/* Capability strip */

.strip {
  position: relative;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.strip-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.strip-set {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strip-set li {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.strip-set li::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--blue);
  opacity: 0.6;
  transform: rotate(45deg);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* Sections */

.section {
  padding: clamp(88px, 11vw, 148px) var(--gutter);
}

.section--tight {
  padding-top: clamp(64px, 8vw, 104px);
}

.section--paper {
  background: var(--paper);
}

.section--dark,
.section--ink {
  background: var(--ink-900);
  color: var(--text-on-dark);
}

.section--ink {
  background:
    radial-gradient(ellipse 60% 50% at 85% 30%, rgb(47 107 255 / 16%), transparent),
    var(--ink-950);
}

.section--dark {
  background:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px) 0 0 / 100% 56px,
    radial-gradient(ellipse 50% 60% at 20% 40%, rgb(47 209 145 / 9%), transparent),
    var(--ink-900);
}

.section-head {
  max-width: 760px;
  margin: 0 auto 64px;
  text-align: center;
}

.section h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}

.section-head > p:last-child,
.split-copy > p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.section--dark .split-copy > p,
.section--ink .split-copy > p {
  color: var(--muted-on-dark);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
}

.split--flip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.ticks {
  display: grid;
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
}

.section--dark .ticks li {
  color: #c6cfdc;
}

.ticks li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: rgb(47 107 255 / 14%);
}

.ticks li::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 5px;
  width: 6px;
  height: 3.5px;
  border-bottom: 1.8px solid var(--blue);
  border-left: 1.8px solid var(--blue);
  transform: rotate(-45deg);
}

.section--dark .ticks li::before {
  background: rgb(47 209 145 / 16%);
}

.section--dark .ticks li::after {
  border-color: var(--signal);
}

/* Reveal */

.has-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.principles .reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.principles .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.principles .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

/* Workspace views */

.views {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
}

.views-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.views-tabs button {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.views-tabs button:hover {
  border-color: #cfd6e2;
}

.views-tabs button[aria-selected="true"] {
  border-color: rgb(47 107 255 / 35%);
  background: linear-gradient(180deg, #fbfcff, var(--white));
  box-shadow: 0 12px 32px -18px rgb(47 107 255 / 45%);
}

.views-index {
  padding-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.views-tabs button[aria-selected="true"] .views-index {
  color: var(--blue);
}

.views-copy strong {
  display: block;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.views-copy small {
  display: block;
  max-height: 0;
  margin-top: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out), opacity 0.4s, margin-top 0.4s;
}

.views-tabs button[aria-selected="true"] small {
  max-height: 120px;
  margin-top: 6px;
  opacity: 1;
}

.views-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
}

.views-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
}

.views-tabs button[aria-selected="true"] .views-progress span {
  animation: views-progress var(--view-duration, 7s) linear forwards;
}

.views.is-manual .views-progress {
  display: none;
}

@keyframes views-progress {
  to {
    transform: scaleX(1);
  }
}

.views-stage {
  position: relative;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 1px 1px, #dfe4ec 1px, transparent 0) 0 0 / 20px 20px,
    var(--paper);
  overflow: hidden;
}

.view-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 3vw, 36px);
  animation: panel-in 0.7s var(--ease-out);
}

.view-panel[hidden] {
  display: none;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

/* Structured Text panel */

.st {
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--edge-dark-strong);
  border-radius: var(--radius);
  background: var(--ink-850);
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 30px 70px -30px rgb(13 18 27 / 55%);
  overflow: hidden;
}

.st-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--edge-dark);
  background: var(--ink-800);
  font-family: var(--font-sans);
  font-size: 12.5px;
}

.st-file em {
  margin-left: 8px;
  color: var(--faint-on-dark);
  font-style: normal;
}

.st-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-on-dark);
}

.st-ok span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.st-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
}

.st-code {
  margin: 0;
  padding: 16px 0;
  counter-reset: line;
  list-style: none;
  line-height: 1.75;
  overflow: hidden;
}

.st-code li {
  padding-right: 16px;
  white-space: pre;
  counter-increment: line;
}

.st-code li::before {
  content: counter(line);
  display: inline-block;
  width: 44px;
  padding-right: 16px;
  color: var(--faint-on-dark);
  text-align: right;
}

.st-code .i1 {
  padding-left: 28px;
}

.st-code .i1::before {
  margin-left: -28px;
  margin-right: 28px;
}

.st-code .c {
  color: #6f8a74;
}

.st-code .k {
  color: #8fb0ff;
}

.st-code .b {
  color: var(--amber);
}

.st-code .n {
  color: #f0b27a;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  background: var(--blue-bright);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.st-outline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-left: 1px solid var(--edge-dark);
  font-size: 11.5px;
}

.st-outline p {
  margin: 8px 0 4px;
  color: var(--faint-on-dark);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.st-outline p:first-child {
  margin-top: 0;
}

.st-outline span {
  color: var(--muted-on-dark);
}

.st-outline .o2 {
  padding-left: 12px;
}

.st-outline .t em {
  display: block;
  color: var(--faint-on-dark);
  font-style: normal;
}

/* Canvas panel */

.graph {
  width: 100%;
  max-width: 680px;
  height: auto;
  font-family: var(--font-sans);
}

.graph-edge {
  fill: none;
  stroke: #b8c2d3;
  stroke-width: 1.6;
}

.graph-edge--live {
  stroke: var(--blue);
  stroke-dasharray: 5 6;
  animation: dash 1.2s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -22;
  }
}

.gnode rect {
  fill: var(--white);
  stroke: var(--line);
  stroke-width: 1.2;
  filter: drop-shadow(0 6px 14px rgb(13 18 27 / 8%));
}

.gnode text {
  fill: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.gnode .gsub {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
}

.gnode--root rect {
  fill: var(--ink-850);
  stroke: var(--ink-850);
}

.gnode--root text {
  fill: var(--white);
}

.gnode--root .gsub {
  fill: var(--muted-on-dark);
}

.gnode--changed rect {
  stroke: var(--amber);
  stroke-width: 1.6;
}

.gnode--changed .gsub {
  fill: #b26d12;
}

.graph-dot {
  fill: var(--blue);
}

.graph-dot--amber {
  fill: var(--amber);
}

/* Machine panel */

.machine-shot {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -34px rgb(13 18 27 / 50%);
  overflow: hidden;
}

.machine-shot img {
  width: 100%;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
}

.hud {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 9px;
  background: rgb(255 255 255 / 78%);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  box-shadow: 0 8px 22px -10px rgb(13 18 27 / 40%);
  backdrop-filter: blur(10px);
  animation: hud-float 5s ease-in-out infinite;
}

.hud b {
  color: var(--blue);
  font-weight: 600;
}

.hud--belt {
  top: 64%;
  left: 18%;
}

.hud--eye {
  top: 18%;
  left: 44%;
  animation-delay: -1.6s;
}

.hud--robot {
  top: 8%;
  right: 6%;
  animation-delay: -3.1s;
}

@keyframes hud-float {
  50% {
    transform: translateY(-5px);
  }
}

.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b6bfcc;
  transition: background-color 0.15s, box-shadow 0.15s;
}

.hud-dot.is-on,
.hud-dot--on {
  background: var(--signal);
  box-shadow: 0 0 0 3px rgb(47 209 145 / 25%);
}

.machine-bar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgb(10 14 22 / 78%);
  color: var(--muted-on-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  backdrop-filter: blur(10px);
}

.machine-bar b {
  color: var(--white);
  font-weight: 500;
}

/* Simulation scope */

.scope {
  border: 1px solid var(--edge-dark-strong);
  border-radius: var(--radius-lg);
  background: var(--ink-850);
  box-shadow: 0 40px 100px -40px rgb(0 0 0 / 80%);
  overflow: hidden;
}

.scope-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--edge-dark);
  color: var(--muted-on-dark);
  font-family: var(--font-mono);
  font-size: 12px;
}

.scope-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.scope-legend i {
  width: 14px;
  height: 3px;
  margin-left: 8px;
  border-radius: 2px;
}

.lg-blue {
  background: var(--blue-bright);
}

.lg-green {
  background: var(--signal);
}

.lg-amber {
  background: var(--amber);
}

.lg-violet {
  background: var(--violet);
}

.scope-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 300;
}

.scope-foot {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px;
  border-top: 1px solid var(--edge-dark);
}

.scan-ring {
  position: relative;
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--edge-dark);
  border-radius: 999px;
  background: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 11px;
}

.scan-ring span {
  position: relative;
  z-index: 1;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--faint-on-dark);
  transition: color 0.2s, background-color 0.2s;
}

.scan-ring span.is-active {
  background: rgb(47 107 255 / 22%);
  color: var(--text-on-dark);
}

.scope-stats {
  display: flex;
  gap: 28px;
  margin: 0 0 0 auto;
}

.scope-stats div {
  text-align: right;
}

.scope-stats dt {
  color: var(--faint-on-dark);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scope-stats dd {
  margin: 2px 0 0;
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* Library */

.library {
  display: grid;
  gap: 18px;
  margin-top: calc(clamp(88px, 11vw, 148px) * -0.55);
  padding-bottom: 20px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.library-row {
  display: flex;
  width: max-content;
  animation: marquee 70s linear infinite;
}

.library-row--reverse {
  animation-direction: reverse;
  animation-duration: 80s;
}

.library:hover .library-row {
  animation-play-state: paused;
}

.library-set {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0 18px 0 0;
  list-style: none;
}

.library-card {
  width: 250px;
  padding: 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfcfe, var(--white));
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}

.library-card:hover {
  border-color: #cfd8e6;
  box-shadow: 0 18px 40px -22px rgb(13 18 27 / 35%);
  transform: translateY(-4px);
}

.library-card img {
  width: 100%;
  aspect-ratio: 320 / 190;
  object-fit: contain;
}

.library-card span {
  display: block;
  margin-top: 6px;
  padding: 0 4px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 550;
}

/* Electrical cabinet */

.cabinet {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -40px rgb(13 30 60 / 70%);
  overflow: hidden;
}

.cabinet-scene {
  position: relative;
  transform: scale(1.28);
  transform-origin: 48% 44%;
}

.cabinet img {
  width: 100%;
  aspect-ratio: 1200 / 1500;
}

.probe {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  padding: 0;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  background: rgb(47 107 255 / 55%);
  box-shadow: 0 4px 12px rgb(0 0 0 / 35%);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}

.probe::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1.5px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  opacity: 0;
}

.probe:hover {
  transform: scale(1.12);
}

.probe.is-active {
  background: var(--amber);
}

.probe.is-active::after {
  animation: probe-ping 1.8s var(--ease-out) infinite;
}

@keyframes probe-ping {
  0% {
    opacity: 1;
    transform: scale(0.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

.probe--psu {
  top: 30%;
  left: 68.5%;
}

.probe--do {
  top: 37.5%;
  left: 61.5%;
}

.probe--ai {
  top: 40.5%;
  left: 66.5%;
}

.probe--term {
  top: 64%;
  left: 58.5%;
}

.meter {
  position: absolute;
  bottom: 18px;
  left: 18px;
  width: 200px;
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 14px;
  background: #151b22;
  box-shadow: 0 16px 36px rgb(0 0 0 / 45%);
}

.meter::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 16px;
  left: 16px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--amber);
}

.meter-screen {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: #c9d4bf;
  color: #1b2418;
  font-family: var(--font-mono);
  box-shadow: 0 2px 6px rgb(0 0 0 / 30%) inset;
}

.meter-value {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.meter-unit {
  font-size: 12px;
  font-weight: 600;
}

.meter-point {
  margin-top: 9px;
  color: #aab4c3;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Agent */

.guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.guarantees span {
  padding: 7px 13px;
  border: 1px solid var(--edge-dark-strong);
  border-radius: 999px;
  background: rgb(255 255 255 / 3%);
  color: #c6cfdc;
  font-size: 13.5px;
}

.agent {
  padding: 18px;
  border: 1px solid var(--edge-dark-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  box-shadow: 0 40px 100px -40px rgb(0 0 0 / 85%);
}

.agent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.agent-mode {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--edge-dark);
  border-radius: 9px;
  background: var(--ink-900);
  font-size: 12.5px;
}

.agent-mode > * {
  padding: 4px 12px;
  border-radius: 6px;
  color: var(--faint-on-dark);
  font-weight: 600;
}

.agent-mode b {
  background: var(--blue);
  color: var(--white);
}

.agent-ctx {
  color: var(--muted-on-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.bubble {
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.55;
}

.bubble--user {
  width: fit-content;
  max-width: 82%;
  margin: 0 0 14px auto;
  padding: 11px 15px;
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.bubble--agent {
  padding: 15px;
  border: 1px solid var(--edge-dark);
  background: rgb(255 255 255 / 3%);
  color: #d5dce7;
}

.bubble code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgb(255 255 255 / 8%);
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.diff {
  margin-top: 14px;
  border: 1px solid var(--edge-dark);
  border-radius: 10px;
  background: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 11.8px;
  overflow: hidden;
}

.diff-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--edge-dark);
  color: var(--muted-on-dark);
}

.diff-head span {
  color: var(--faint-on-dark);
}

.diff-line {
  display: flex;
  gap: 10px;
  padding: 6px 12px;
  color: #c6cfdc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diff-line i {
  width: 10px;
  font-style: normal;
  flex: none;
}

.diff-n {
  width: 14px;
  color: var(--faint-on-dark);
  flex: none;
}

.diff-line--add {
  background: rgb(47 209 145 / 10%);
}

.diff-line--add i {
  color: var(--signal);
}

.diff-line--del {
  background: rgb(239 91 80 / 10%);
  color: #d5a3a0;
  text-decoration: line-through;
  text-decoration-color: rgb(239 91 80 / 50%);
}

.diff-line--del i {
  color: var(--red);
}

.agent-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.agent-actions span {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
}

.agent-confirm {
  background: var(--white);
  color: var(--ink);
}

.agent-discard {
  border: 1px solid var(--edge-dark-strong);
  color: var(--muted-on-dark);
}

/* Commissioning */

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
}

.plan,
.check {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 50px -36px rgb(13 18 27 / 35%);
}

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.plan-head strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.plan-head small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.plan-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.phases {
  display: grid;
  gap: 4px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.phases li {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  color: var(--muted);
  font-size: 14px;
}

.phases li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  bottom: -12px;
  left: 14px;
  width: 1.5px;
  background: var(--line);
}

.phases em {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: normal;
}

.phase-mark {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border: 1.5px solid #cbd2dd;
  border-radius: 50%;
  background: var(--white);
}

.phases .is-done {
  color: var(--ink);
}

.phases .is-done .phase-mark {
  border-color: var(--signal-deep);
  background: var(--signal-deep);
}

.phases .is-done .phase-mark::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 4.5px;
  width: 8px;
  height: 4px;
  border-bottom: 1.8px solid var(--white);
  border-left: 1.8px solid var(--white);
  transform: rotate(-45deg);
}

.phases .is-done::after {
  background: var(--signal-deep);
}

.phases .is-active {
  color: var(--ink);
  font-weight: 600;
}

.phases .is-active .phase-mark {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(47 107 255 / 15%);
}

.phases .is-active .phase-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--blue);
}

.phases .is-active em {
  color: var(--blue);
}

.phase-bar {
  grid-column: 2 / 4;
  height: 4px;
  border-radius: 4px;
  background: var(--line-soft);
  overflow: hidden;
}

.phase-bar span {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: 4px;
  background: var(--blue);
}

.phases .is-hold em {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4e2;
  color: #a4600c;
}

.phases .is-hold .phase-mark {
  border-color: var(--amber);
  border-style: dashed;
}

.check-kicker {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.check h3 {
  margin-top: 8px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.check-proc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.attempts {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.attempt {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 4px 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13.5px;
}

.attempt span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.attempt b {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.attempt small {
  color: var(--muted);
  font-size: 12.5px;
  text-align: right;
}

.attempt--fail b {
  background: #fdecea;
  color: #b93a31;
}

.attempt--pass {
  border-color: rgb(19 154 100 / 30%);
  background: #f3fbf7;
}

.attempt--pass b {
  background: var(--signal-deep);
  color: var(--white);
}

.evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.file i {
  width: 16px;
  height: 18px;
  border-radius: 3px;
}

.file-img {
  background: linear-gradient(135deg, #7aa2ff, #2f6bff);
}

.file-csv {
  background: linear-gradient(135deg, #52d6a2, #139a64);
}

.field-notes {
  display: grid;
  gap: 22px;
  align-content: center;
  padding: 6px 4px;
}

.note {
  display: flex;
  gap: 16px;
}

.note-num {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding-top: 2px;
}

.note strong {
  display: block;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.note p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

/* Principles */

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
}

.principle {
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}

.principle:hover {
  box-shadow: 0 22px 44px -30px rgb(13 18 27 / 40%);
  transform: translateY(-3px);
}

.principle h3 {
  margin-top: 22px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.principle p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
}

.principle-icon {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-soft);
}

.principle-icon::before,
.principle-icon::after {
  content: "";
  position: absolute;
}

.principle-icon--source::before {
  top: 11px;
  left: 13px;
  width: 18px;
  height: 22px;
  border: 2px solid var(--blue);
  border-radius: 3px;
}

.principle-icon--source::after {
  top: 18px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
}

.principle-icon--rev::before {
  top: 11px;
  left: 11px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}

.principle-icon--rev::after {
  top: 16px;
  left: 21px;
  width: 6px;
  height: 7px;
  border-bottom: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
}

.principle-icon--offline::before {
  top: 13px;
  left: 10px;
  width: 24px;
  height: 18px;
  border: 2px solid var(--blue);
  border-radius: 4px;
}

.principle-icon--offline::after {
  top: 20px;
  left: 17px;
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: var(--blue);
}

.principle-icon--org::before {
  top: 11px;
  left: 15px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}

.principle-icon--org::after {
  top: 26px;
  left: 11px;
  width: 22px;
  height: 9px;
  border: 2px solid var(--blue);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
}

/* Closing call to action */

.cta {
  position: relative;
  padding: clamp(96px, 12vw, 160px) var(--gutter);
  background:
    radial-gradient(ellipse 55% 70% at 50% 0%, rgb(47 107 255 / 28%), transparent 70%),
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--ink-950);
  color: var(--text-on-dark);
  text-align: center;
  overflow: hidden;
}

.cta-inner {
  max-width: 760px;
  margin: 0 auto;
}

.cta-mark {
  width: 56px;
  height: 50px;
  margin: 0 auto 30px;
  color: var(--white);
}

.cta h2 {
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  letter-spacing: -0.04em;
}

.cta p {
  margin-top: 20px;
  color: var(--muted-on-dark);
  font-size: 1.1rem;
}

/* Footer */

.footer {
  padding: 36px var(--gutter);
  border-top: 1px solid var(--edge-dark);
  background: var(--ink-950);
  color: var(--faint-on-dark);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  max-width: var(--max);
  margin: 0 auto;
}

.nav-brand--footer {
  color: var(--text-on-dark);
}

.footer p {
  flex: 1 1 320px;
  max-width: 560px;
}

.footer-inner > span {
  margin-left: auto;
}

/* Responsive */

@media (max-width: 1100px) {
  .views {
    grid-template-columns: minmax(0, 1fr);
  }

  .views-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .views-copy small {
    display: none;
  }

  .field {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .field-notes {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 120px;
  }

  .split,
  .split--flip {
    grid-template-columns: minmax(0, 1fr);
  }

  .split--flip .cabinet {
    order: 2;
  }

  .views-stage {
    min-height: 0;
  }

  .view-panel {
    position: relative;
    inset: auto;
  }

  .st-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .st-outline {
    display: none;
  }

  .scope-foot {
    flex-wrap: wrap;
  }

  .scope-stats {
    margin-left: 0;
  }

  .field {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .nav-signin {
    display: none;
  }

  .st {
    font-size: 11.5px;
  }

  .st-code li::before {
    width: 34px;
    padding-right: 12px;
  }

  .views-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .views-tabs button {
    padding: 14px 16px 16px;
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .hud--robot {
    display: none;
  }

  .machine-bar span:last-child {
    display: none;
  }

  .meter {
    bottom: 12px;
    left: 12px;
    width: 170px;
  }

  .meter-value {
    font-size: 24px;
  }

  .scope-stats {
    gap: 18px;
  }

  .library-card {
    width: 200px;
  }

  .footer-inner > span {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .has-js .reveal {
    opacity: 1;
    transform: none;
  }

}
