/* Coding Agent Trajectory Visualizer — product website */

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fa;
  --bg-soft: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --surface-3: #e7ecf2;
  --ink: #141b2b;
  --ink-soft: #344054;
  --muted: #687386;
  --faint: #8b95a5;
  --line: #d6dce5;
  --line-strong: #bbc4d1;
  --blue: #5b8def;
  --blue-strong: #2f6fd3;
  --blue-soft: #e8f0fd;
  --green: #65ad7d;
  --green-soft: #e8f4ec;
  --purple: #9276c7;
  --purple-soft: #f0ebf8;
  --gold: #c39236;
  --gold-soft: #f7f0df;
  --red: #c85d6d;
  --shadow: 0 22px 64px rgba(30, 46, 73, 0.13);
  --shadow-small: 0 10px 30px rgba(30, 46, 73, 0.09);
  --nav-bg: rgba(245, 247, 250, 0.84);
  --window-bar: #edf1f6;
  --image-edge: #cfd6e1;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14161a;
  --bg-soft: #191c21;
  --surface: #1e2127;
  --surface-2: #242830;
  --surface-3: #2b3039;
  --ink: #f2f4f8;
  --ink-soft: #d5dae3;
  --muted: #a4adba;
  --faint: #788393;
  --line: #343a45;
  --line-strong: #505968;
  --blue: #7aa7f7;
  --blue-strong: #9bbcf8;
  --blue-soft: #202d43;
  --green: #7ec493;
  --green-soft: #203529;
  --purple: #a68bd4;
  --purple-soft: #302940;
  --gold: #d1aa5d;
  --gold-soft: #3a3222;
  --red: #e27988;
  --shadow: 0 26px 72px rgba(0, 0, 0, 0.34);
  --shadow-small: 0 12px 34px rgba(0, 0, 0, 0.26);
  --nav-bg: rgba(20, 22, 26, 0.86);
  --window-bar: #262a31;
  --image-edge: #3b424d;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --bg: #14161a;
    --bg-soft: #191c21;
    --surface: #1e2127;
    --surface-2: #242830;
    --surface-3: #2b3039;
    --ink: #f2f4f8;
    --ink-soft: #d5dae3;
    --muted: #a4adba;
    --faint: #788393;
    --line: #343a45;
    --line-strong: #505968;
    --blue: #7aa7f7;
    --blue-strong: #9bbcf8;
    --blue-soft: #202d43;
    --green: #7ec493;
    --green-soft: #203529;
    --purple: #a68bd4;
    --purple-soft: #302940;
    --gold: #d1aa5d;
    --gold-soft: #3a3222;
    --red: #e27988;
    --shadow: 0 26px 72px rgba(0, 0, 0, 0.34);
    --shadow-small: 0 12px 34px rgba(0, 0, 0, 0.26);
    --nav-bg: rgba(20, 22, 26, 0.86);
    --window-bar: #262a31;
    --image-edge: #3b424d;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  transition: background-color 0.25s ease, color 0.25s ease;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { color: inherit; }

.shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 112px 0; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

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

.site-nav {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-nav.is-scrolled {
  border-color: var(--line);
  background: var(--nav-bg);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(18px) saturate(1.3);
}
.nav-inner { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 720; letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark { position: relative; width: 27px; height: 27px; display: inline-block; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow-small); }
.brand-mark i { position: absolute; width: 5px; border-radius: 4px; bottom: 5px; transform: rotate(38deg); transform-origin: bottom; }
.brand-mark i:nth-child(1) { left: 6px; height: 9px; background: var(--blue); }
.brand-mark i:nth-child(2) { left: 11px; height: 15px; background: var(--green); }
.brand-mark i:nth-child(3) { left: 17px; height: 20px; background: var(--purple); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 0.88rem; }
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }
.theme-switch { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.theme-switch button { border: 0; padding: 5px 9px; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.74rem; line-height: 1.2; }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); }
.nav-install { padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 0.82rem; font-weight: 680; transition: transform 0.15s ease, border-color 0.15s ease; }
.nav-install:hover { transform: translateY(-1px); border-color: var(--blue); }

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 128px 0 82px;
  overflow: hidden;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--blue) 8%, transparent), transparent 36%),
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--green) 11%, transparent), transparent 34%),
    var(--bg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.38;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
.hero-glow { position: absolute; width: 600px; height: 600px; right: -250px; top: -260px; border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent); border-radius: 50%; opacity: 0.65; }
.hero-glow::before, .hero-glow::after { content: ""; position: absolute; border: 1px solid color-mix(in srgb, var(--green) 22%, transparent); border-radius: 50%; }
.hero-glow::before { inset: 70px; }
.hero-glow::after { inset: 150px; border-color: color-mix(in srgb, var(--purple) 24%, transparent); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(600px, 1.22fr); align-items: center; gap: 68px; }
.eyebrow { margin: 0 0 18px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 0.72rem; font-weight: 760; letter-spacing: 0.11em; text-transform: uppercase; }
.eyebrow > span { width: 24px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--green)); }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(3.3rem, 5.7vw, 6.2rem); line-height: 0.94; letter-spacing: -0.067em; font-weight: 720; }
.hero h1 em { color: var(--blue-strong); font-style: normal; }
.hero-lede { max-width: 650px; margin: 30px 0 0; color: var(--ink-soft); font-size: clamp(1.02rem, 1.45vw, 1.18rem); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 0 19px; border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 700; font-size: 0.9rem; transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-small); }
.button.primary { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.button.secondary { background: var(--surface); color: var(--ink); }
.hero-facts { margin-top: 23px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 0.77rem; }
.hero-facts span { display: inline-flex; align-items: center; gap: 6px; }
.agent-logo { width: 15px; height: 15px; display: inline-block; flex: 0 0 auto; color: var(--ink-soft); background: currentColor; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; }
.agent-logo.claude-logo { -webkit-mask-image: url("./assets/claudecode.svg"); mask-image: url("./assets/claudecode.svg"); }
.agent-logo.codex-logo { -webkit-mask-image: url("./assets/codex.svg"); mask-image: url("./assets/codex.svg"); }
.local-dot { background: var(--purple); }
.local-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 auto; border-radius: 50%; }

.hero-product { min-width: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); transform: perspective(1400px) rotateY(-1.8deg) rotateX(0.8deg); }
.window-bar { min-height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--window-bar); color: var(--muted); font-size: 0.67rem; }
.vscode-mark { width: 15px; height: 15px; flex: 0 0 auto; color: #1f9cf0; background: currentColor; -webkit-mask: url("./assets/vscode.svg") center / contain no-repeat; mask: url("./assets/vscode.svg") center / contain no-repeat; }
.vscode-menu { color: var(--faint); font-size: 0.61rem; white-space: nowrap; }
.window-bar strong { min-width: 0; overflow: hidden; color: var(--ink-soft); font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.window-bar small { margin-left: auto; color: var(--faint); }
.window-expand { margin-left: auto; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 0.61rem; line-height: 1.35; }
.window-expand:hover, .window-expand:focus-visible { border-color: var(--line-strong); color: var(--ink); outline: none; }
.hero-product-body { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: 500px; }
.finder-pane { padding: 15px 12px; border-right: 1px solid var(--line); background: var(--surface-2); }
.finder-title { display: flex; align-items: center; justify-content: space-between; padding: 0 5px 12px; color: var(--muted); font-size: 0.61rem; letter-spacing: 0.07em; }
.finder-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.finder-tabs button { border: 0; padding: 5px 3px; border-radius: 5px; background: transparent; color: var(--muted); cursor: default; font-size: 0.65rem; }
.finder-tabs button.is-active { background: var(--blue-soft); color: var(--blue-strong); font-weight: 700; }
.finder-tree { display: none; margin-top: 13px; }
.finder-tree.is-active { display: block; animation: finderFade 0.32s ease; }
@keyframes finderFade { from { opacity: 0; transform: translateX(-5px); } }
.finder-tree p { margin: 5px 2px; display: flex; gap: 6px; align-items: center; color: var(--ink-soft); font-size: 0.67rem; }
.finder-tree p b { color: var(--faint); }
.finder-tree p span { margin-left: auto; color: var(--faint); }
.finder-tree .indent { padding-left: 12px; }
.session-row { width: 100%; display: grid; grid-template-columns: 15px 1fr; gap: 7px; align-items: center; padding: 7px 6px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); text-align: left; }
.session-row span { min-width: 0; display: grid; gap: 3px; }
.session-row strong { overflow: hidden; font-size: 0.65rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.session-row small { color: var(--faint); font-size: 0.58rem; }
.session-row.is-active { border-color: color-mix(in srgb, var(--blue) 48%, var(--line)); background: var(--blue-soft); }
.finder-search { margin-top: 15px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--faint); font-size: 0.61rem; }
.trajectory-preview { min-width: 0; padding: 20px; }
.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.preview-head h3 { margin: 8px 0 0; max-width: 360px; overflow: hidden; font-size: 1.05rem; line-height: 1.28; text-overflow: ellipsis; white-space: nowrap; }
.preview-head > small { padding-top: 5px; color: var(--faint); white-space: nowrap; font-size: 0.61rem; }
.provider-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.61rem; }
.preview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 17px 0; }
.preview-metrics span { padding: 10px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 0.57rem; }
.preview-metrics b { display: block; color: var(--ink); font-size: 0.78rem; }
.context-mini { padding: 12px 12px 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.context-mini-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.59rem; }
.context-mini svg { width: 100%; height: 145px; overflow: visible; }
.grid-lines { fill: none; stroke: var(--line); stroke-width: 0.7; }
.limit-line { fill: none; stroke: var(--faint); stroke-width: 1; stroke-dasharray: 4 4; }
.area-line { fill: color-mix(in srgb, var(--blue) 15%, transparent); }
.curve-line { fill: none; stroke: var(--blue); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.compact-line { fill: none; stroke: var(--purple); stroke-width: 1.2; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.context-mini circle { fill: var(--blue); stroke: var(--surface); stroke-width: 3; vector-effect: non-scaling-stroke; animation: chartPulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes chartPulse { 50% { transform: scale(1.3); } }
.turn-stack { display: grid; gap: 7px; margin-top: 12px; }
.mini-turn { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 0.59rem; transition: background 0.25s ease, border-color 0.25s ease; }
.mini-turn p { margin: 0; overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.mini-turn em { padding: 2px 6px; border-radius: 999px; background: var(--surface-2); color: var(--faint); font-style: normal; }
.mini-turn.is-current { border-color: color-mix(in srgb, var(--blue) 58%, var(--line)); background: var(--blue-soft); }
.hero-product-note { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.65rem; }
.hero-product-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px color-mix(in srgb, var(--blue) 13%, transparent); }
.hero-product-note i { margin-left: auto; color: var(--green); font-style: normal; }
.hero-ribbon { position: absolute; inset: auto 0 0; z-index: 2; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 74%, transparent); backdrop-filter: blur(12px); }
.hero-ribbon .shell { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 0.71rem; font-weight: 650; letter-spacing: 0.02em; }
.hero-ribbon i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

.section-copy h2, .intro-grid h2, .story-copy h2, .library-heading h2, .privacy-grid h2, .cta h2 { margin: 0; font-size: clamp(2.25rem, 4.2vw, 4.3rem); line-height: 1.04; letter-spacing: -0.052em; font-weight: 700; }
.tour { border-bottom: 1px solid var(--line); background: var(--surface); }
.tour-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 58px; align-items: center; }
.tour-copy h2 { font-size: clamp(2.3rem, 3.6vw, 3.8rem); }
.tour-chapters { margin: 34px 0 0; padding: 0; display: grid; list-style: none; }
.tour-chapters li { border-top: 1px solid var(--line); }
.tour-chapters li:last-child { border-bottom: 1px solid var(--line); }
.tour-chapters button { width: 100%; display: grid; grid-template-columns: 32px 1fr; gap: 11px; align-items: center; padding: 12px 4px; border: 0; background: transparent; color: var(--muted); text-align: left; cursor: pointer; transition: color 0.15s ease, padding-left 0.15s ease; }
.tour-chapters button:hover, .tour-chapters li.is-active button { padding-left: 9px; color: var(--ink); }
.tour-chapters button > span { color: var(--faint); font-family: ui-monospace, Consolas, monospace; font-size: 0.66rem; }
.tour-chapters button div { display: grid; }
.tour-chapters strong { font-size: 0.8rem; }
.tour-chapters small { color: var(--faint); font-size: 0.64rem; }
.tour-player, .live-demo { min-width: 0; }
.demo-window { position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.tour-window video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #111318; object-fit: cover; }
.tour-play { position: absolute; left: 50%; top: calc(50% + 18px); z-index: 3; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 50%; background: rgba(18, 22, 29, 0.82); color: white; cursor: pointer; transform: translate(-50%, -50%); backdrop-filter: blur(10px); transition: transform 0.16s ease, opacity 0.2s ease; }
.tour-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.tour-player.is-playing .tour-play { opacity: 0; pointer-events: none; }
.tour-player.is-playing .tour-window:hover .tour-play { opacity: 1; pointer-events: auto; }
.tour-progress { position: absolute; inset: auto 0 0; height: 3px; background: rgba(255, 255, 255, 0.24); }
.tour-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); }
.demo-caption { min-height: 52px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 0 5px; color: var(--muted); font-size: 0.72rem; }
.demo-caption span { color: var(--blue-strong); font-family: ui-monospace, Consolas, monospace; font-size: 0.63rem; font-weight: 700; }
.demo-caption p { margin: 0; color: var(--ink-soft); }
.demo-caption button { min-width: 54px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 0.66rem; }
.demo-caption button:hover, .demo-caption button:focus-visible { border-color: var(--line-strong); color: var(--ink); outline: none; }

.feature-intro { padding-bottom: 74px; }
.intro-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 34px; align-items: end; }
.intro-grid .eyebrow { align-self: start; margin-top: 10px; }
.feature-story { padding: 96px 0 120px; border-top: 1px solid var(--line); }
.feature-story:nth-of-type(even) { background: var(--surface); }
.feature-story > .shell { width: min(1400px, calc(100% - 48px)); }
.story-grid { display: grid; grid-template-columns: minmax(300px, 0.58fr) minmax(0, 1.42fr); gap: 54px; align-items: center; }
.story-grid.reverse { grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr); }
.story-grid.reverse .story-copy { grid-column: 2; }
.story-grid.reverse .live-demo { grid-column: 1; grid-row: 1; }
.story-grid.reverse .api-demo-stack { grid-column: 1; grid-row: 1; }
.story-number { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 0.67rem; }
.story-kicker { margin: 18px 0 10px; color: var(--blue-strong); font-size: 0.73rem; font-weight: 780; letter-spacing: 0.1em; text-transform: uppercase; }
.story-copy h2 { font-size: clamp(2.4rem, 4vw, 4.1rem); }
.story-copy > p:not(.story-kicker) { margin: 24px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.72; }
.story-points { margin: 26px 0 0; padding: 0; display: grid; gap: 10px; list-style: none; color: var(--ink-soft); font-size: 0.85rem; }
.story-points li { position: relative; padding-left: 20px; }
.story-points li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--green)); }
.live-demo .demo-window { box-shadow: var(--shadow-small); }
.live-demo iframe { width: 100%; height: 640px; display: block; border: 0; background: var(--surface); }
.recover-live-body { display: grid; grid-template-columns: 132px minmax(0, 1fr); height: 640px; }
.recover-live-body iframe { height: 640px; }
.recover-side { padding: 12px 10px; border-right: 1px solid var(--line); background: var(--surface-2); font-size: 0.65rem; }
.recover-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 14px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.recover-mode button { border: 0; padding: 4px; border-radius: 4px; background: transparent; color: var(--muted); font-size: 0.58rem; }
.recover-mode button.is-active { background: var(--blue-soft); color: var(--blue-strong); }
.recover-side > strong { display: block; margin: 0 4px 6px; color: var(--muted); font-size: 0.6rem; }
.recover-session { width: 100%; display: grid; grid-template-columns: 15px 1fr; gap: 6px; align-items: center; margin: 4px 0; padding: 7px 5px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--ink); text-align: left; }
.recover-session span { min-width: 0; display: grid; }
.recover-session small { color: var(--faint); font-size: 0.53rem; }
.recover-session.is-active { border-color: color-mix(in srgb, var(--blue) 50%, var(--line)); background: var(--blue-soft); }
.recover-search { margin-top: 14px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--faint); font-size: 0.56rem; }
.api-demo-stack { min-width: 0; display: grid; gap: 24px; }
.capture-toggle-demo { min-width: 0; }
.capture-toggle-window video { width: 100%; aspect-ratio: 16 / 5; object-fit: cover; background: #111318; }
.capture-toggle-window .compact-play { width: 48px; height: 48px; }
.capture-toggle-demo.is-playing .tour-play { opacity: 0; pointer-events: none; }
.capture-toggle-demo.is-playing .capture-toggle-window:hover .tour-play { opacity: 1; pointer-events: auto; }
.harness-visual { position: relative; min-width: 0; padding-bottom: 76px; }
.media-button { position: relative; width: 100%; overflow: hidden; padding: 0; border: 1px solid var(--image-edge); border-radius: 12px; background: var(--surface); cursor: zoom-in; box-shadow: var(--shadow-small); }
.media-button img { width: 100%; height: auto; }
.media-button > span { position: absolute; right: 12px; bottom: 12px; padding: 5px 9px; border-radius: 6px; background: rgba(14, 18, 24, 0.8); color: white; font-size: 0.62rem; opacity: 0; transition: opacity 0.16s ease; }
.media-button:hover > span { opacity: 1; }
.harness-thumb { position: absolute; right: -12px; bottom: 0; width: 52%; overflow: hidden; border: 1px solid var(--image-edge); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.harness-thumb img { width: 100%; max-height: 180px; object-fit: cover; object-position: top; }
.harness-thumb p { margin: 0; padding: 10px 12px; color: var(--muted); font-size: 0.66rem; }
.harness-thumb strong { color: var(--ink-soft); }

.library { border-top: 1px solid var(--line); background: var(--surface); }
.library-heading { margin-bottom: 52px; }
.library-heading h2 { max-width: 800px; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.library-card { min-width: 0; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03); }
.library-card-head { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; margin-bottom: 18px; }
.library-card-head > span { padding-top: 3px; color: var(--faint); font-family: ui-monospace, Consolas, monospace; font-size: 0.65rem; }
.library-card h3 { margin: 0; font-size: 1.12rem; letter-spacing: -0.025em; }
.library-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 0.74rem; }
.library-media, .views-strip button, .workflow-grid button { min-width: 0; overflow: hidden; padding: 0; border: 1px solid var(--image-edge); border-radius: 8px; background: var(--surface); cursor: zoom-in; }
.library-media img, .views-strip img { width: 100%; height: auto; object-fit: contain; }
.library-media-pair { display: grid; grid-template-columns: 1.14fr 0.86fr; gap: 8px; align-items: start; }
.library-media-pair .library-media { max-height: 280px; }
.library-media-pair img { width: 100%; height: 280px; object-fit: cover; object-position: top; }
.memory-media-pair { grid-template-columns: 0.82fr 1.18fr; }
.memory-showcase { min-width: 0; display: grid; grid-template-rows: auto auto auto; gap: 7px; }
.memory-showcase > span { color: var(--blue); font: 700 0.64rem/1 ui-monospace, Consolas, monospace; letter-spacing: 0.04em; text-transform: uppercase; }
.memory-showcase > p { min-height: 2.5em; margin: 0; color: var(--muted); font-size: 0.69rem; line-height: 1.45; }
.memory-media-pair .library-media { width: 100%; max-height: 310px; }
.memory-media-pair img { height: 310px; object-fit: contain; background: var(--surface); }
.natural-media img { height: auto; object-fit: contain; }
.views-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.views-strip button { display: grid; place-items: start; }
.views-strip img { object-position: top; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 16px; }
.feature-chips span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 0.6rem; line-height: 1.1; }
.library-finder-shot { overflow: hidden; border: 1px solid var(--image-edge); border-radius: 8px; background: var(--surface); }
.finder-shot-top { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.finder-shot-top button { border: 0; padding: 5px 8px; border-radius: 5px; background: transparent; color: var(--muted); font-size: 0.63rem; }
.finder-shot-top button.is-active { background: var(--blue-soft); color: var(--blue-strong); }
.finder-shot-top span { margin-left: auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); font-size: 0.61rem; }
.finder-shot-tree { padding: 10px 12px; color: var(--ink-soft); font-size: 0.67rem; }
.finder-shot-tree p { margin: 5px 0; }
.finder-shot-tree p b { float: right; color: var(--faint); }
.finder-shot-file { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; gap: 7px; align-items: center; margin: 4px 0 4px 15px; padding: 7px 8px; border: 1px solid transparent; border-radius: 3px; }
.finder-shot-file.is-active { border-color: color-mix(in srgb, var(--blue) 48%, var(--line)); background: var(--blue-soft); }
.finder-shot-tree small { color: var(--faint); }
.finder-shot-actions { display: flex; align-items: center; gap: 6px; padding: 8px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--faint); font-size: 0.59rem; }
.finder-shot-actions button { margin-left: auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink-soft); font-size: 0.57rem; }
.finder-shot-actions button + button { margin-left: 0; }
.workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.workflow-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.workflow-grid button { position: relative; aspect-ratio: 1.18 / 1; }
.workflow-grid img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.workflow-grid span { position: absolute; left: 7px; bottom: 7px; padding: 4px 7px; border-radius: 5px; background: rgba(12, 15, 20, 0.76); color: white; font-size: 0.59rem; }
.library-note { margin: 22px 0 0; padding: 14px 16px; border-left: 3px solid var(--purple); border-radius: 0 8px 8px 0; background: var(--purple-soft); color: var(--muted); font-size: 0.75rem; }
.library-note strong { color: var(--ink-soft); }

.privacy-band { padding: 72px 0; border-block: 1px solid var(--line); background: var(--bg-soft); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 70px; align-items: center; }
.privacy-grid > div { display: flex; align-items: center; gap: 22px; }
.privacy-mark { width: 68px; height: 68px; flex: 0 0 68px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--green) 55%, var(--line)); border-radius: 18px; background: var(--green-soft); color: var(--green); font-size: 2rem; }
.privacy-grid h2 { font-size: clamp(2rem, 3.2vw, 3.3rem); }
.privacy-grid > p { margin: 0; color: var(--muted); }
.cta { background: var(--bg); }
.cta-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 60px; align-items: center; padding: 54px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.cta-card > div:first-child > p:last-child { margin: 20px 0 0; color: var(--muted); }
.cta-actions { min-width: 280px; display: grid; gap: 10px; }
.cta-actions code { padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 0.68rem; text-align: center; }
.site-footer { padding: 32px 0; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .shell { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.site-footer p { margin: 0; color: var(--faint); font-size: 0.69rem; text-align: center; }
.site-footer nav { display: flex; gap: 16px; color: var(--muted); font-size: 0.7rem; }

.lightbox { width: min(1420px, calc(100vw - 34px)); max-width: none; height: min(92vh, 1000px); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface); color: var(--ink); box-shadow: 0 35px 100px rgba(0, 0, 0, 0.45); }
.lightbox::backdrop { background: rgba(8, 10, 14, 0.78); backdrop-filter: blur(8px); }
.lightbox-bar { min-height: 44px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 34px 34px; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; }
.lightbox-bar > #lightbox-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-count { color: var(--faint); font-family: ui-monospace, Consolas, monospace; font-size: 0.64rem; white-space: nowrap; }
.lightbox-bar button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.lightbox-bar button:disabled { cursor: default; opacity: 0.32; }
.lightbox-nav { font-size: 0.9rem !important; }
.lightbox-body { height: calc(100% - 44px); overflow: auto; padding: 16px; background: var(--bg-soft); }
.lightbox-body img { width: max-content; min-width: min(100%, 900px); height: auto; margin: 0 auto; border: 1px solid var(--image-edge); background: var(--surface); }
.lightbox-body video, .lightbox-body iframe { width: 100%; height: 100%; min-height: 560px; border: 1px solid var(--image-edge); background: #111318; }
.lightbox-body [hidden] { display: none; }

@media (max-width: 1120px) {
  .shell { width: min(100% - 36px, 1060px); }
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { max-width: 830px; }
  .hero-product { width: min(900px, 100%); justify-self: center; transform: none; }
  .tour-layout { grid-template-columns: 1fr; }
  .tour-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr); gap: 0 45px; align-items: start; }
  .tour-copy .eyebrow, .tour-copy h2, .tour-copy > p { grid-column: 1; }
  .tour-chapters { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .intro-grid { grid-template-columns: 140px minmax(0, 1fr); }
  .intro-grid > p:last-child { grid-column: 2; }
  .story-grid, .story-grid.reverse { grid-template-columns: 1fr; gap: 48px; }
  .story-grid.reverse .story-copy, .story-grid.reverse .live-demo { grid-column: 1; grid-row: auto; }
  .story-copy { max-width: 780px; }
  .library-heading { grid-template-columns: 1fr; gap: 20px; }
  .privacy-grid { grid-template-columns: 1fr 360px; gap: 38px; }
}

@media (max-width: 820px) {
  .section { padding: 84px 0; }
  .shell { width: min(100% - 28px, 760px); }
  .nav-inner { min-height: 62px; gap: 12px; }
  .brand { font-size: 0.88rem; }
  .theme-switch { margin-left: auto; }
  .theme-switch button { padding-inline: 8px; }
  .nav-install { display: none; }
  .hero { padding-top: 108px; }
  .hero h1 { font-size: clamp(3.1rem, 12vw, 5.2rem); }
  .hero-product-body { grid-template-columns: 185px minmax(0, 1fr); }
  .preview-head > small { display: none; }
  .hero-ribbon .shell { justify-content: center; flex-wrap: wrap; padding-block: 13px; }
  .hero-ribbon span:nth-of-type(n + 4), .hero-ribbon i:nth-of-type(n + 4) { display: none; }
  .tour-copy { display: block; }
  .tour-chapters { margin-top: 28px; grid-template-columns: repeat(2, 1fr); }
  .tour-chapters li:nth-child(2n) { border-left: 1px solid var(--line); }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-grid > p:last-child { grid-column: 1; }
  .feature-story { padding: 82px 0 98px; }
  .live-demo iframe { height: 535px; }
  .recover-live-body { grid-template-columns: 135px minmax(0, 1fr); height: 535px; }
  .recover-live-body iframe { height: 535px; }
  .library-grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; padding: 38px; }
  .site-footer .shell { grid-template-columns: 1fr; justify-items: center; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 22px, 520px); }
  .theme-switch button { width: 30px; overflow: hidden; padding-inline: 0; font-size: 0; }
  .theme-switch button[data-theme-choice="auto"]::after { content: "A"; font-size: 0.67rem; }
  .theme-switch button[data-theme-choice="light"]::after { content: "L"; font-size: 0.67rem; }
  .theme-switch button[data-theme-choice="dark"]::after { content: "D"; font-size: 0.67rem; }
  .hero { min-height: auto; padding: 105px 0 112px; }
  .hero h1 { font-size: clamp(2.9rem, 15vw, 4.5rem); }
  .hero-lede { font-size: 0.96rem; }
  .button { width: 100%; }
  .hero-product-body { grid-template-columns: 1fr; min-height: auto; }
  .finder-pane { min-height: 245px; border-right: 0; border-bottom: 1px solid var(--line); }
  .trajectory-preview { padding: 14px; }
  .preview-metrics { grid-template-columns: 1fr 1fr 1fr; }
  .preview-metrics span { padding: 7px; }
  .context-mini svg { height: 112px; }
  .hero-ribbon { display: none; }
  .tour-chapters { grid-template-columns: 1fr; }
  .tour-chapters li:nth-child(2n) { border-left: 0; }
  .tour-play { width: 48px; height: 48px; }
  .demo-caption { grid-template-columns: auto 1fr; padding: 6px 2px; }
  .demo-caption button { grid-column: 2; justify-self: start; }
  .story-copy h2 { font-size: 2.55rem; }
  .live-demo iframe { height: 480px; }
  .recover-live-body { display: block; height: auto; }
  .recover-side { display: none; }
  .recover-live-body iframe { height: 480px; }
  .harness-visual { padding-bottom: 0; }
  .harness-thumb { position: relative; right: auto; bottom: auto; width: 82%; margin: -18px 0 0 auto; }
  .library-card { padding: 16px; }
  .library-media-pair { grid-template-columns: 1fr; }
  .library-media-pair .library-media { max-height: none; }
  .library-media-pair img { height: auto; max-height: 330px; object-fit: cover; }
  .memory-showcase > p { min-height: 0; }
  .views-strip { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: 1fr 1fr; }
  .finder-shot-actions > span { display: none; }
  .privacy-grid > div { align-items: flex-start; }
  .privacy-mark { width: 52px; height: 52px; flex-basis: 52px; border-radius: 13px; font-size: 1.4rem; }
  .cta-card { padding: 28px 22px; }
}

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