@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-latin-opsz.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Surfaces and ink — the light palette of the Runway console */
  --paper: #f4f6f8;
  --surface: #ffffff;
  --sunken: #eef2f5;
  --ink: #14212f;
  --ink-2: #3a495b;
  --muted: #5b6a7c;
  --line: #dbe2e9;
  --line-soft: #e8edf2;
  /* Meaning */
  --green: #267245;
  --green-ink: #1f5f39;
  --green-soft: #e6f3e9;
  --red: #b42f3a;
  --red-soft: #fbeaec;
  --blue: #2465a8;
  --blue-soft: #e7f0fa;
  --amber: #9a5f0c;
  --amber-soft: #fbf1e1;
  --violet: #844fba;
  --violet-soft: #f2ecf9;
  --grey-soft: #eef1f4;
  /* Charts */
  --chart-success: #2e7d4f;
  --chart-failed: #c04d57;
  --chart-canceled: #a3adb9;
  --chart-bar: #3e6fa8;

  --font: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --shell: 1320px;
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --shadow: 0 1px 2px rgb(20 33 47 / 5%), 0 4px 12px rgb(20 33 47 / 4%);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: .88em; background: var(--sunken); border-radius: 4px; padding: .08em .35em; }
pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 640; letter-spacing: -.022em; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-s); }
.skip-link:focus { top: 12px; }
.shell { width: min(var(--shell), 100% - 48px); margin-inline: auto; }
[hidden] { display: none !important; }

/* Buttons ---------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 560; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.button:hover { border-color: #c4cdd7; background: #fafbfc; }
.button.primary { background: var(--green); border-color: var(--green); color: #fff; }
.button.primary:hover { background: var(--green-ink); }
.button.ghost { background: transparent; }
.button.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.button:disabled { opacity: .5; cursor: default; }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(244 246 248 / 86%); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 680; font-size: 20px; letter-spacing: -.03em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: #c6f68a; }
.brand-mark path { fill: none; stroke: #172010; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand.small { font-size: 17px; }
.brand.small .brand-mark { width: 26px; height: 26px; }
#navigation { margin-left: auto; display: flex; align-items: center; gap: 4px; }
#navigation a { text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
#navigation a:hover { background: var(--sunken); color: var(--ink); }
#navigation a[aria-current] { color: var(--green-ink); }
#navigation .nav-docs { margin-left: 8px; border: 1px solid var(--line); background: var(--surface); }
.menu-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 44px; height: 44px; align-items: center; justify-content: center; }
.menu-toggle path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Hero ------------------------------------------------------------------- */
.lead { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 54ch; }
.lead.secondary { margin-top: 14px; font-size: 17px; color: var(--muted); }

/* Run panel -------------------------------------------------------------- */
.run-intro { margin-bottom: 28px; }
.run-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.run-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 22px 24px 0; flex-wrap: wrap; }
.run-kicker { color: var(--muted); font-size: 13px; }
.run-kicker code { font-size: 12px; }
.run-title h2 { font-size: 22px; margin-top: 2px; }
.run-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 540; padding: 6px 12px; border-radius: 999px; background: var(--grey-soft); color: var(--ink-2); }
.run-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.run-status[data-state='running'] { background: var(--blue-soft); color: var(--blue); }
.run-status[data-state='running'] i { animation: pulse 1.2s infinite; }
.run-status[data-state='review'] { background: var(--amber-soft); color: var(--amber); }
.run-status[data-state='successful'] { background: var(--green-soft); color: var(--green-ink); }
.run-status[data-state='failed'] { background: var(--red-soft); color: var(--red); }
.run-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 24px 0; flex-wrap: wrap; }
.zoom { margin-left: auto; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.zoom button { border: 0; background: var(--surface); min-width: 36px; height: 34px; padding: 0 10px; font-size: 14px; }
.zoom button:hover { background: var(--sunken); }
.zoom button + button, .zoom span + button { border-left: 1px solid var(--line); }
.zoom span { min-width: 52px; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; border-left: 1px solid var(--line); line-height: 34px; }
.scenario-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; padding: 10px 24px 14px; }
.scenario-summary { color: var(--muted); font-size: 14px; flex: 1 1 360px; }
.edge-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.edge-legend li { display: inline-flex; align-items: center; gap: 7px; }
.edge-legend i { width: 22px; height: 0; border-top: 2px solid var(--green); }
.edge-legend .legend-failure { border-top: 2px dashed var(--red); }
.edge-legend .legend-active { border-top: 2px dashed var(--green); }

.segmented { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: 9px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 7px 13px; border-radius: 7px; font-size: 14px; font-weight: 520; color: var(--ink-2); }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(20 33 47 / 12%); }

.run-canvas { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background-color: #f7f9fb; background-image: radial-gradient(#d5dde5 1px, transparent 1.2px); background-size: 18px 18px; }
.canvas-viewport { overflow-x: auto; overflow-y: hidden; padding: 6px 0; overscroll-behavior-x: contain; }
.canvas-extent { position: relative; margin-inline: auto; }
.canvas-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.canvas-edges { position: absolute; inset: 0; overflow: visible; }

.edge { fill: none; stroke: #b9c4cf; stroke-width: 1.6; transition: stroke .3s; }
.edge.is-done.when-on_success, .edge.is-active.when-on_success { stroke: var(--green); }
.edge.is-done.when-on_failure, .edge.is-active.when-on_failure { stroke: var(--red); }
.edge.is-active { stroke-dasharray: 6 5; animation: flow .6s linear infinite; stroke-width: 2; }
.edge.is-skipped { stroke-dasharray: 3 5; stroke: #ccd4dd; }
.edge.when-on_failure:not(.is-done):not(.is-active) { stroke-dasharray: 5 4; }
.edge-label rect { fill: #f7f9fb; }
.edge-label text { font: 600 11px var(--font); fill: var(--muted); }
.edge-label.when-on_success.is-done text, .edge-label.when-on_success.is-active text { fill: var(--green-ink); }
.edge-label.when-on_failure text { fill: var(--red); }
.edge-label.is-skipped text { fill: #9aa6b3; }

.node { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 2px 6px rgb(20 37 26 / 5%); transition: border-color .25s, box-shadow .25s, opacity .25s; }
.node-select { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 3px; width: 100%; padding: 13px 15px 14px; border-radius: 13px; cursor: pointer; }
.node-select strong, .node-select small { grid-column: 1 / -1; }
.node-select strong { margin-top: 5px; }
.node-select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.node strong { font-size: 14px; font-weight: 620; line-height: 1.3; }
.node small { font-size: 12px; color: var(--muted); }
.node[data-state='running'], .node[data-state='applying'] { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.node[data-state='review'] { border-color: #d9a650; box-shadow: 0 0 0 3px var(--amber-soft); }
.node[data-state='successful'] { border-color: #7fb593; }
.node[data-state='failed'] { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.node[data-state='skipped'] { opacity: .62; border-style: dashed; }
.node.selected { box-shadow: 0 0 0 2px var(--ink); border-color: var(--ink); }
.node-approve { position: absolute; left: 15px; bottom: 11px; border: 1px solid var(--amber); background: var(--amber); color: #fff; border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 600; line-height: 18px; }
.node[data-state='review'] small { visibility: hidden; }
.node-approve:hover { background: #7f4e09; }

.type-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.type-chip img, .type-chip svg { flex: none; }
.type-terraform { color: var(--violet); }
.type-build_inventory { color: var(--blue); }
.type-bash { color: var(--ink-2); }
.type-ansible .brand-icon { filter: brightness(0) saturate(100%); }

.state-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 8px; border-radius: 6px; background: var(--grey-soft); color: var(--muted); }
.state-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-badge[data-state='running'], .state-badge[data-state='applying'] { background: var(--blue-soft); color: var(--blue); }
.state-badge[data-state='running'] i, .state-badge[data-state='applying'] i { animation: pulse 1s infinite; }
.state-badge[data-state='review'] { background: var(--amber-soft); color: var(--amber); }
.state-badge[data-state='successful'] { background: var(--green-soft); color: var(--green-ink); }
.state-badge[data-state='failed'] { background: var(--red-soft); color: var(--red); }
.state-badge[data-state='skipped'] { background: transparent; color: #8a96a3; box-shadow: inset 0 0 0 1px var(--line); }

.inspector { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); min-height: 260px; }
.inspector-main { padding: 20px 24px 24px; display: grid; align-content: start; gap: 10px; justify-items: start; border-right: 1px solid var(--line); }
.inspector-main h3 { font-size: 19px; }
.facts { margin: 6px 0 0; display: grid; gap: 10px; width: 100%; }
.facts div { display: grid; grid-template-columns: 82px 1fr; gap: 12px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.inspector-log { min-width: 0; display: flex; flex-direction: column; background: #fbfcfd; }
.log-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
.log-head span:first-child { color: var(--ink); font-weight: 560; }
#inspector-log { margin: 0; padding: 14px 20px 18px; font: 13px/1.75 var(--mono); color: #2a3a4c; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; flex: 1; }

/* Sections --------------------------------------------------------------- */
.section { padding: 112px 0 0; }
.section-title, .section-copy h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -.034em; max-width: 22ch; }
.section-copy p, .section-head p { margin-top: 18px; color: var(--ink-2); font-size: 17px; max-width: 58ch; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: 32px; }
.section-head p { margin: 0; }
.hero { position: relative; isolation: isolate; color: #fff; background: #1b2a2e url("../assets/images/runway-hero.jpg") 50% 58% / cover no-repeat; min-height: min(820px, calc(100svh - 64px)); display: grid; align-items: end; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(9 18 24 / 82%) 0%, rgb(9 18 24 / 55%) 45%, rgb(9 18 24 / 5%) 75%), linear-gradient(0deg, rgb(9 18 24 / 70%) 0%, transparent 45%); }
.hero-inner { padding: 120px 0 56px; }
.hero-copy { max-width: none; }
.hero h1 { font-size: clamp(40px, 5vw, 68px); line-height: 1.02; letter-spacing: -.042em; font-weight: 680; max-width: 14ch; color: #fff; }
.hero .lead { color: rgb(255 255 255 / 92%); }
.hero .lead.secondary { color: rgb(255 255 255 / 74%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .button.ghost { color: #fff; border-color: rgb(255 255 255 / 45%); background: rgb(255 255 255 / 6%); backdrop-filter: blur(6px); }
.hero .button.ghost:hover { background: rgb(255 255 255 / 16%); }
.hero-facts { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; max-width: 1040px; }
.hero-facts li { padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 30%); display: grid; gap: 4px; align-content: start; }
.hero-facts strong { font-weight: 620; font-size: 15px; }
.hero-facts span { color: rgb(255 255 255 / 72%); font-size: 14px; line-height: 1.45; }
.hero-credit { position: absolute; right: 16px; bottom: 10px; margin: 0; font-size: 11px; color: rgb(255 255 255 / 55%); }
.host-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.host-card figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.host-card figcaption strong { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.host-summary { margin-left: auto; color: var(--muted); font-size: 13px; }
.type-ansible { color: var(--ink); }
.host-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.host-grid th, .host-grid td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.host-grid thead th { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--muted); background: var(--sunken); }
.host-grid thead th:first-child { font-family: inherit; }
.host-grid tbody th { font-weight: 560; color: var(--ink-2); }
.st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.st-ok { background: var(--green-soft); color: var(--green-ink); }
.st-changed { background: #fdf1dc; color: var(--amber); }
.st-failed { background: var(--red-soft); color: var(--red); }
.st-skipped { background: var(--blue-soft); color: var(--blue); }
.st-none { color: var(--muted); font-weight: 500; }
.host-note { margin: 0; padding: 14px 20px 16px; font-size: 14px; color: var(--ink-2); background: var(--red-soft); }
.host-note code { font-size: 12.5px; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: 15px; }
.checks li::before { content: ''; position: absolute; left: 2px; top: 6px; width: 14px; height: 8px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }

/* Inventory transform */
.transform { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; align-items: stretch; }
.code-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.code-card figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; font-weight: 560; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.code-card figcaption img[src*='ansible'] { filter: brightness(0); }
.code-card pre { margin: 0; padding: 14px 16px; font: 12.5px/1.7 var(--mono); color: #2a3a4c; overflow-x: auto; }
.transform-step { display: grid; place-items: center; position: relative; width: 56px; }
.transform-step::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.6px solid var(--blue); }
.transform-step::after { content: ''; position: absolute; right: 2px; top: calc(50% - 4.5px); width: 8px; height: 8px; border-top: 1.6px solid var(--blue); border-right: 1.6px solid var(--blue); transform: rotate(45deg); }
.transform-step span { position: relative; z-index: 1; writing-mode: vertical-rl; transform: rotate(180deg); background: var(--paper); padding: 8px 2px; font-size: 12px; font-weight: 600; color: var(--blue); }

/* Plan card */
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.plan-head strong { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.plan-summary { margin-left: auto; color: var(--muted); font-size: 13px; }
.plan-rows { list-style: none; margin: 0; padding: 6px 0; }
.plan-row { display: grid; grid-template-columns: 18px 70px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; padding: 9px 20px; align-items: baseline; }
.plan-row + .plan-row { border-top: 1px solid var(--line-soft); }
.plan-symbol { font: 600 15px var(--mono); text-align: center; }
.plan-action { font-size: 13px; font-weight: 600; }
.plan-address { background: none; padding: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.plan-detail { grid-column: 3; color: var(--muted); font: 12px/1.5 var(--mono); }
.action-create .plan-symbol, .action-create .plan-action { color: var(--green); }
.action-update .plan-symbol, .action-update .plan-action { color: var(--amber); }
.action-replace .plan-symbol, .action-replace .plan-action { color: var(--violet); }
.action-delete .plan-symbol, .action-delete .plan-action { color: var(--red); }
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfcfd; }
.plan-note { margin-left: auto; color: var(--muted); font-size: 13px; }
.plan-outcome { list-style: none; margin: 0; padding: 0 20px; font: 13px/1.6 var(--mono); color: var(--ink-2); }
.plan-outcome:not(:empty) { padding: 14px 20px 4px; border-top: 1px solid var(--line-soft); }
.plan-outcome li { padding: 2px 0 2px 18px; position: relative; animation: appear .3s var(--ease); }
.plan-outcome li::before { content: '›'; position: absolute; left: 2px; color: var(--muted); }
.plan-card[data-decision='approved'] .plan-outcome li:first-child { color: var(--green-ink); }
.plan-card[data-decision='rejected'] .plan-outcome li:first-child { color: var(--red); }
.plan-outcome + .button { margin: 6px 20px 16px; }

/* Capabilities */
.capabilities { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.capabilities > div { padding: 28px 32px 32px 0; border-bottom: 1px solid var(--line); }
.capabilities > div:not(:nth-child(3n + 1)) { padding-left: 32px; border-left: 1px solid var(--line); }
.capabilities dt { display: flex; align-items: center; gap: 10px; font-weight: 640; font-size: 18px; letter-spacing: -.015em; }
.capabilities dt img[src*='ansible'] { filter: brightness(0); }
.capabilities dd { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.dt-icon { color: var(--green); display: inline-flex; }

/* Architecture */
.arch-section { padding-bottom: 8px; }
.flow-picker { margin-bottom: 18px; }
.arch-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); }
.arch-canvas { min-width: 0; border-bottom: 1px solid var(--line); }
.arch-extent { margin-inline: auto; }
.arch-viewport { overflow-x: auto; }
.arch-extent { position: relative; }
.arch-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.arch-edges { position: absolute; inset: 0; overflow: visible; }
.lane { fill: #ffffff; }
.lane.odd { fill: #f8fafb; }
.lane-label { font: 600 13px var(--font); fill: var(--muted); }
.edge-halo { fill: none; stroke: #fff; stroke-width: 7; }
.arch-edge { fill: none; stroke: #c3ccd6; stroke-width: 1.6; transition: stroke .3s, opacity .3s; }
.arch-edge.off { opacity: .55; }
.arch-edge.on { stroke: var(--green); stroke-width: 2; stroke-dasharray: 6 5; animation: flow .7s linear infinite; }
.step-badge { opacity: 0; transition: opacity .25s; }
.step-badge.on { opacity: 1; }
.step-badge circle { fill: var(--green); stroke: #fff; stroke-width: 2; }
.step-badge text { font: 700 11px var(--font); fill: #fff; }
.arch-node { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgb(20 33 47 / 6%); transition: opacity .3s, border-color .3s; }
.arch-node.core { border-color: #9ac2a8; background: #fbfefc; }
.arch-node.dim { opacity: .38; }
.arch-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--sunken); color: var(--ink-2); }
.arch-node.core .arch-icon { background: var(--green-soft); color: var(--green); }
.arch-icon img { max-width: 24px; max-height: 24px; object-fit: contain; }
.arch-text { display: grid; gap: 1px; min-width: 0; }
.arch-text strong { font-size: 14.5px; font-weight: 620; line-height: 1.25; }
.arch-text small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.flow-steps { margin: 0; padding: 22px 24px 24px; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 28px; background: #fbfcfd; min-height: 118px; }
.flow-steps li { counter-increment: step; position: relative; padding-left: 36px; font-size: 14px; line-height: 1.55; color: var(--ink-2); animation: appear .3s var(--ease) both; }
.flow-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* Charts */
.charts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.chart-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 22px 24px 20px; min-width: 0; }
.chart-card figcaption { display: grid; gap: 2px; margin-bottom: 14px; }
.chart-card figcaption strong { font-size: 16px; font-weight: 620; }
.chart-card figcaption span { font-size: 14px; color: var(--muted); }
.chart { display: grid; gap: 12px; }
.chart-plot { position: relative; min-width: 0; }
.chart-plot svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.chart-legend li { display: inline-flex; align-items: center; gap: 7px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.swatch-successful { background: var(--chart-success); }
.swatch-failed { background: repeating-linear-gradient(45deg, var(--chart-failed) 0 2px, #e5a2a9 2px 4px); }
.swatch-canceled { background: var(--chart-canceled); }
.grid { stroke: var(--line-soft); stroke-width: 1; }
.baseline { stroke: #c9d2db; stroke-width: 1; }
.tick { font: 500 11px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.seg-successful { fill: var(--chart-success); }
.seg-failed { fill: var(--chart-failed); }
.seg-canceled { fill: var(--chart-canceled); }
.hatch-bg { fill: transparent; }
.hatch-line { stroke: rgb(255 255 255 / 45%); stroke-width: 2; }
.hit { fill: transparent; cursor: default; outline: none; }
.hit.active { fill: rgb(20 33 47 / 4%); }
.chart-tip { position: absolute; z-index: 2; min-width: 160px; pointer-events: none; background: var(--ink); color: #fff; border-radius: 8px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; box-shadow: 0 8px 24px rgb(20 33 47 / 18%); }
.chart-tip strong { font-weight: 600; margin-bottom: 2px; }
.chart-tip span { display: flex; align-items: center; gap: 7px; color: #cfd7e0; }
.chart-tip b { margin-left: auto; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip .tip-total { border-top: 1px solid rgb(255 255 255 / 16%); padding-top: 4px; margin-top: 2px; }
.bar-label { font: 500 13px var(--font); fill: var(--ink-2); }
.bar-value { font: 600 13px var(--font); fill: var(--ink); font-variant-numeric: tabular-nums; }
.bar { fill: var(--chart-bar); }
.bar-track { fill: var(--sunken); }
.table-toggle { margin-top: 14px; font-size: 14px; }
.table-toggle summary { cursor: pointer; color: var(--blue); width: max-content; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line-soft); }
.data-table th:first-child { text-align: left; font-weight: 500; }
.data-table thead th { color: var(--muted); font-weight: 600; }

/* Start */
.start-section { padding-bottom: 0; }
.path { list-style: none; counter-reset: path; margin: 32px 0 0; padding: 0; display: grid; gap: 0; }
.path li { counter-increment: path; position: relative; padding: 16px 0 16px 48px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.path li:last-child { border-bottom: 1px solid var(--line); }
.path li::before { content: counter(path); position: absolute; left: 0; top: 15px; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--green); color: var(--green); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.path strong { color: var(--ink); font-weight: 620; }
.path a { color: var(--blue); }
.terminal { background: #13202c; color: #dbe5ee; border-radius: var(--radius-l); overflow: hidden; box-shadow: 0 18px 40px rgb(20 33 47 / 16%); }
.terminal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.terminal-bar [role='tablist'] { display: flex; gap: 4px; }
.terminal-bar [role='tab'] { border: 0; background: transparent; color: #9fb0c1; padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 520; }
.terminal-bar [role='tab'][aria-selected='true'] { background: rgb(255 255 255 / 10%); color: #fff; }
.copy { border: 1px solid rgb(255 255 255 / 16%); background: transparent; color: #dbe5ee; border-radius: 6px; padding: 6px 12px; font-size: 13px; }
.copy:hover { background: rgb(255 255 255 / 8%); }
.terminal pre { margin: 0; padding: 22px 22px 8px; font: 14px/1.8 var(--mono); }
.terminal pre code { color: #e6eef6; }
.terminal-note { padding: 8px 22px 22px; color: #9fb0c1; font-size: 14px; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 17px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ''; position: absolute; right: 6px; top: 26px; width: 9px; height: 9px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq-list p { padding: 0 40px 22px 0; color: var(--ink-2); font-size: 15px; max-width: 68ch; }

/* Footer */
.site-footer { margin-top: 120px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 32px; align-items: center; padding: 28px 0; }
.footer-inner p { color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 20px; font-size: 14px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-inner small { grid-column: 1 / -1; color: #8a96a3; font-size: 12px; }
.noscript { position: fixed; bottom: 16px; left: 16px; right: 16px; background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 10px; }

/* Motion */
@keyframes flow { to { stroke-dashoffset: -22; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes appear { from { opacity: 0; transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .faq, .section-head { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse > :first-child { order: 0; }
  .capabilities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capabilities > div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .capabilities > div:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); }
  .charts { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  #navigation { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgb(20 33 47 / 8%); }
  #navigation.open { display: flex; }
  #navigation a { padding: 12px; font-size: 16px; }
  #navigation .nav-docs { margin: 8px 0 0; text-align: center; }
  .inspector { grid-template-columns: 1fr; }
  .inspector-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .zoom { margin-left: 0; }
}
@media (max-width: 640px) {
  .shell { width: min(var(--shell), 100% - 32px); }
  body { font-size: 15px; }
  .hero-inner { padding: 72px 0 48px; }
  .hero::before { background: linear-gradient(0deg, rgb(9 18 24 / 88%) 0%, rgb(9 18 24 / 60%) 60%, rgb(9 18 24 / 35%) 100%); }
  .host-grid th, .host-grid td { padding: 9px 8px; }
  .host-card { overflow-x: auto; }
  .hero-facts { grid-template-columns: 1fr; gap: 14px; }
  .lead { font-size: 17px; }
  .section { padding-top: 80px; }
  .run-head, .run-toolbar { padding-inline: 16px; }
  .scenario-line { padding-inline: 16px; }
  .run-section .run-panel { margin-inline: -16px; }
  .run-panel { border-radius: 0; border-inline: 0; }
  .segmented { width: 100%; }
  .segmented button { flex: 1 1 auto; padding: 8px 10px; }
  .transform { grid-template-columns: 1fr; }
  .transform-step { width: auto; height: 48px; }
  .transform-step::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1.6px solid var(--blue); }
  .transform-step::after { right: auto; left: calc(50% - 4px); top: auto; bottom: 3px; transform: rotate(135deg); }
  .transform-step span { writing-mode: horizontal-tb; transform: none; padding: 2px 8px; }
  .capabilities { grid-template-columns: 1fr; }
  .capabilities > div, .capabilities > div:nth-child(even) { padding: 22px 0; border-left: 0; }
  .plan-row { grid-template-columns: 16px minmax(0, 1fr); }
  .plan-action { display: none; }
  .plan-detail { grid-column: 2; }
  .plan-note { margin-left: 0; width: 100%; }
  .flow-steps { padding: 20px 16px; }
  #inspector-log { white-space: pre; overflow-wrap: normal; font-size: 12px; }
  .footer-inner { grid-template-columns: 1fr; }
}
.button.review { background: var(--amber); border-color: var(--amber); color: #fff; }
.button.review:hover { background: #7f4e09; }

/* Request a demo --------------------------------------------------------- */
#navigation .nav-demo { margin-left: 8px; background: var(--green); color: #fff; }
#navigation .nav-demo:hover { background: var(--green-ink); color: #fff; }
#navigation .nav-docs + .nav-demo, #navigation .nav-demo + .nav-docs { margin-left: 6px; }
.demo-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 72px; align-items: start; padding: 72px 0 96px; }
.demo-intro h1 { font-size: clamp(36px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -.04em; font-weight: 680; max-width: 15ch; }
.demo-steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; gap: 22px; }
.demo-steps li { counter-increment: step; position: relative; padding-left: 48px; color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 52ch; }
.demo-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); font-weight: 650; font-size: 14px; }
.demo-steps strong { display: block; color: var(--ink); font-weight: 620; margin-bottom: 2px; }
.demo-facts { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.demo-facts div { border-top: 1px solid var(--line); padding-top: 12px; }
.demo-facts dt { color: var(--muted); font-size: 13px; }
.demo-facts dd { margin: 4px 0 0; font-weight: 560; font-size: 15px; }
.demo-card { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: 0 30px 60px -36px rgb(20 33 47 / 30%), var(--shadow); padding: 32px; }
.demo-card h2 { font-size: 24px; letter-spacing: -.02em; }
.form-note { margin: 6px 0 24px; color: var(--muted); font-size: 14px; }
#demo-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-size: 14px; font-weight: 560; color: var(--ink); padding: 0; }
.field label span[aria-hidden], .form-note span[aria-hidden] { color: var(--red); }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid #cdd6df; border-radius: var(--radius-s); padding: 10px 12px; min-height: 44px; width: 100%; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.field [aria-invalid] { border-color: var(--red); background: #fffafa; }
.field-error { margin: 0; color: var(--red); font-size: 13px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 4px; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: 14px !important; font-weight: 450 !important; color: var(--ink-2) !important; line-height: 1.4; cursor: pointer; }
.choice input { width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; accent-color: var(--green); flex: none; padding: 0; }
.form-error { padding: 12px 14px; border-radius: var(--radius-s); background: var(--red-soft); color: var(--red); font-size: 14px; }
.demo-submit { width: 100%; min-height: 48px; font-size: 16px; }
.form-privacy { margin: -6px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.form-done { padding: 8px 0; outline: none; }
.form-done h3 { font-size: 22px; letter-spacing: -.02em; }
.form-done p { color: var(--ink-2); margin-top: 10px; }
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-fallback { font-size: 14px; color: var(--muted) !important; }
@media (max-width: 1100px) {
  .demo-layout { grid-template-columns: 1fr; gap: 48px; }
  .demo-card { position: static; }
}
@media (max-width: 860px) {
  #navigation .nav-demo { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 640px) {
  .demo-layout { padding: 48px 0 72px; }
  .demo-card { padding: 22px 18px; margin-inline: -4px; }
  .field-row, .choice-grid { grid-template-columns: 1fr; }
  .demo-facts { grid-template-columns: 1fr; gap: 12px; }
}
