/* rui — landing page
   Direction: cool neutral page, near-black ink, one cobalt signal.
   Cobalt means one thing: "an agent is composing this". Dashed cobalt outlines,
   the rui cursor and the Agent view overlay all speak that one colour. */

:root {
  --bg: #f5f6f9;
  --bg-2: #eceef4;
  --card: #ffffff;
  --ink: #0b0e17;
  --ink-2: #4a5163;
  --ink-3: #868d9f;
  --line: #e2e5ed;
  --line-2: #d3d8e3;

  --night: #0a0e1f;
  --night-2: #121832;
  --night-line: rgba(255, 255, 255, 0.09);
  --on-night: #f3f5fb;
  --on-night-2: rgba(243, 245, 251, 0.66);
  --on-night-3: rgba(243, 245, 251, 0.42);

  --cobalt: #3a5bff;
  --cobalt-2: #8ea0ff;
  --cobalt-wash: #eaeeff;

  --ok: #0f7a57;
  --ok-wash: #e1f4ec;
  --warn: #9a5a06;
  --warn-wash: #fcf0da;
  --fail: #c0362c;
  --fail-wash: #fce6e3;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-s: 8px;
  --r: 14px;
  --r-l: 24px;
  --gutter: 16px;
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .7 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.86em; }
button { font: inherit; color: inherit; }
::selection { background: var(--cobalt); color: #fff; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 8px; }

/* film grain over gradient surfaces */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background-image: var(--noise); opacity: .22; mix-blend-mode: soft-light;
}

/* ---------- pills, buttons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cobalt); background: var(--cobalt-wash);
  border: 1px solid color-mix(in srgb, var(--cobalt) 22%, transparent);
  padding: 7px 10px; border-radius: 6px;
}
.pill--dark { color: var(--on-night); background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.14); }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: #6ee7b7; box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: #e9ecf6; border-color: #e9ecf6; }
.btn--small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- signup ---------- */
.signup { max-width: 460px; display: grid; gap: 12px; }
.signup__field {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 5px 5px 5px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.signup__field:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cobalt) 18%, transparent); }
.signup input {
  flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; color: var(--ink);
  font: 400 16px/1 var(--sans);
}
.signup input:focus { outline: none; }
.signup input::placeholder { color: var(--ink-3); }
.signup__go {
  flex: none; width: 42px; height: 40px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font: 500 18px/1 var(--sans);
  transition: background-color .2s, transform .15s;
}
.signup__go:hover { background: var(--cobalt); }
.signup__go:active { transform: translateY(1px); }
.signup__go:disabled { opacity: .6; cursor: progress; }
.signup__note { font: 500 11.5px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.signup__note[data-state="error"] { color: var(--fail); }
.signup__note[data-state="ok"] { color: var(--ok); text-transform: none; letter-spacing: 0; font: 500 15px/1.45 var(--sans); }
.signup:has(input[aria-invalid="true"]) .signup__field { border-color: var(--fail); }
.signup.is-done .signup__field { display: none; }

.signup--dark .signup__field { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); }
.signup--dark .signup__field:focus-within { border-color: var(--cobalt-2); box-shadow: 0 0 0 4px rgba(142, 160, 255, 0.2); }
.signup--dark input { color: var(--on-night); }
.signup--dark input::placeholder { color: var(--on-night-3); }
.signup--dark .signup__go { background: #fff; color: var(--ink); }
.signup--dark .signup__go:hover { background: var(--cobalt-2); }
.signup--dark .signup__note { color: var(--on-night-3); }
.signup--dark .signup__note[data-state="error"] { color: #ffb4aa; }
.signup--dark .signup__note[data-state="ok"] { color: #8ff0c4; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  color: var(--on-night);
  transition: background-color .3s, color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
  color: var(--ink);
}
.nav__links { display: none; gap: 28px; margin: 0 auto; }
.nav__links a { font-size: 14.5px; text-decoration: none; opacity: .72; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav__end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav.is-stuck .btn--light { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav.is-stuck .btn--light:hover { background: var(--cobalt); border-color: var(--cobalt); }
@media (min-width: 960px) {
  .nav__links { display: flex; }
  .nav__end { margin-left: 0; }
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 22px/1 var(--sans); letter-spacing: -0.04em; text-decoration: none;
}
.mark { width: 20px; height: 20px; flex: none; }
.mark rect { fill: currentColor; }
.mark .mark__gen { fill: var(--cobalt); }
.nav:not(.is-stuck) .mark .mark__gen { fill: var(--cobalt-2); }

.agent-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 9px; min-height: 38px; padding: 0 12px 0 9px; cursor: pointer;
  font: 500 13.5px/1 var(--sans);
}
.agent-toggle:hover { border-color: color-mix(in srgb, currentColor 45%, transparent); }
.agent-toggle__switch {
  width: 26px; height: 16px; border-radius: 99px; position: relative;
  background: color-mix(in srgb, currentColor 22%, transparent); transition: background-color .2s;
}
.agent-toggle__switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: currentColor; transition: transform .2s var(--ease);
}
.agent-toggle[aria-pressed="true"] .agent-toggle__switch { background: var(--cobalt); }
.agent-toggle[aria-pressed="true"] .agent-toggle__switch::after { transform: translateX(10px); background: #fff; }
@media (max-width: 560px) {
  .agent-toggle__label { display: none; }
  .agent-toggle { padding: 0 9px; }
}

/* ---------- hero ---------- */
.hero { padding: 8px; }
.hero__card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-l);
  color: var(--on-night);
  background:
    radial-gradient(900px 520px at 78% 12%, rgba(58, 91, 255, 0.55), transparent 62%),
    radial-gradient(700px 480px at 8% 100%, rgba(38, 170, 190, 0.22), transparent 60%),
    linear-gradient(180deg, #0a0e1f 0%, #0d1330 100%);
  padding: 112px 0 0;
}
.hero__card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--noise); opacity: .12; mix-blend-mode: soft-light;
}
.hero__field {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.25) 40%, #000 75%);
          mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.25) 40%, #000 75%);
}
@media (max-width: 1079px) { .hero__field { opacity: .55; } }
.hero__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1080px) {
  .hero__card { padding-top: 136px; }
  .hero__grid { grid-template-columns: 1fr 1.05fr; gap: 64px; }
}
.hero__copy { display: grid; justify-items: start; gap: 26px; }
.hero__title {
  font-size: clamp(52px, 8.4vw, 104px);
  font-weight: 500; line-height: 0.95; letter-spacing: -0.045em;
}
.hero__accent {
  background: linear-gradient(92deg, #c7d0ff 0%, #8ea0ff 45%, #7fe0e6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede { font-size: 18px; line-height: 1.55; color: var(--on-night-2); max-width: 34em; }
@media (min-width: 720px) { .hero__lede { font-size: 19px; } }

/* stage frame + demo */
.stage-frame {
  padding: 8px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  min-width: 0;
}
.stage {
  background: var(--bg); color: var(--ink);
  border-radius: 15px; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  min-height: 540px;
}
.stage__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); background: var(--card);
}
.stage__dots { display: flex; gap: 6px; }
.stage__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.stage__tabs { display: flex; gap: 2px; background: var(--bg-2); padding: 3px; border-radius: 9px; }
.stage__tabs button {
  border: 0; background: transparent; color: var(--ink-2);
  font: 500 13px/1 var(--sans); padding: 8px 11px; border-radius: 7px; cursor: pointer;
}
.stage__tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(11, 14, 23, .08), 0 0 0 1px var(--line); }

.stage__body { position: relative; padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.ask {
  align-self: flex-end; max-width: 86%;
  background: var(--ink); color: #fff;
  padding: 10px 14px; border-radius: 14px 14px 4px 14px;
  font-size: 15px; line-height: 1.4; min-height: 41px;
}
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; opacity: 0; }
.ask.is-typing .caret { opacity: 1; animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.surface { display: grid; gap: 10px; min-height: 260px; align-content: start; }

/* the rui cursor that travels to whatever is being composed */
.agent-cursor {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  display: flex; align-items: flex-start; gap: 2px;
  opacity: 0; transform: translate(60%, 40px);
  transition: transform .55s var(--ease), opacity .3s;
}
.agent-cursor.is-on { opacity: 1; }
.agent-cursor svg { width: 16px; height: 16px; fill: var(--cobalt); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.agent-cursor span {
  margin-top: 12px; background: var(--cobalt); color: #fff;
  font: 600 11px/1 var(--sans); padding: 4px 7px; border-radius: 5px 5px 5px 2px;
}

/* generated blocks */
.blk {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px;
  opacity: 0; transform: translateY(6px) scale(.99);
  transition: opacity .35s var(--ease), transform .35s var(--ease), outline-color .5s;
  outline: 1.5px dashed transparent; outline-offset: 3px;
  box-shadow: 0 1px 2px rgba(11, 14, 23, .04);
}
.blk.is-in { opacity: 1; transform: none; }
.blk.is-composing { outline-color: var(--cobalt); }
.blk__tag {
  position: absolute; top: -9px; left: 12px;
  font: 500 10px/1 var(--mono); letter-spacing: 0.04em;
  background: var(--cobalt); color: #fff; padding: 3px 6px; border-radius: 4px;
  opacity: 0; transition: opacity .3s;
}
.blk.is-composing .blk__tag { opacity: 1; }
.blk__label { font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stat { font: 500 38px/1 var(--sans); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.delta { font: 500 12.5px/1 var(--mono); color: var(--ok); background: var(--ok-wash); padding: 4px 6px; border-radius: 4px; }

.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 92px; }
.bar { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; }
.bar > i {
  align-self: end; justify-self: center; width: 62%; display: block;
  background: linear-gradient(180deg, var(--cobalt), #6f86ff); border-radius: 4px 4px 1px 1px;
  transition: height .45s var(--ease);
}
.bar > span { font: 400 11px/1 var(--mono); color: var(--ink-3); text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2);
  font: 500 13px/1 var(--sans); padding: 8px 11px; border-radius: 999px; cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.callout { font-size: 14px; color: var(--ink-2); border-left: 2px solid var(--cobalt); padding-left: 10px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ui-btn {
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  font: 500 13px/1 var(--sans); padding: 10px 12px; border-radius: 8px; cursor: default;
}
.ui-btn--danger { border-color: color-mix(in srgb, var(--fail) 40%, transparent); color: var(--fail); }
.ui-btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }

.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slot-day { font: 500 11px/1 var(--mono); color: var(--ink-3); text-align: center; margin-bottom: 4px; }
.slot {
  display: block; width: 100%; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink-3); font: 400 12px/1 var(--mono); padding: 9px 0; border-radius: 6px; text-align: center;
}
.slot--free { color: var(--ink); background: var(--card); border-color: var(--ink-3); cursor: pointer; }
.slot--free[aria-pressed="true"] { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.slot + .slot { margin-top: 5px; }
.faces { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.faces span { display: flex; }
.faces b {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card);
  display: grid; place-items: center; font: 600 10px/1 var(--sans); color: #fff; background: var(--ink-2);
}
.faces b:nth-child(2) { background: #2a8c93; }
.faces b:nth-child(3) { background: #6b56c9; }
.faces b:last-child { background: var(--cobalt); }
.faces b + b { margin-left: -7px; }

.regen {
  display: flex; align-items: center; gap: 8px;
  font: 500 12px/1.3 var(--mono); color: var(--cobalt);
  opacity: 0; transition: opacity .3s;
}
.regen.is-in { opacity: 1; }
.regen::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* trace: the console under the stage */
.trace {
  list-style: none; margin: 0; padding: 12px 16px 14px;
  background: var(--night); color: var(--on-night-2);
  font: 400 12px/1.6 var(--mono);
  min-height: 136px;
}
.trace li {
  display: grid; grid-template-columns: 78px 1fr; gap: 8px; align-items: baseline;
  opacity: 0; transform: translateX(-4px); transition: opacity .25s, transform .25s;
}
.trace li.is-in { opacity: 1; transform: none; }
.trace li > span:first-child { color: var(--cobalt-2); }
.trace .v { margin-right: 6px; }

/* verdict chips (shared) */
.v {
  display: inline-block; font: 600 10.5px/1 var(--mono); letter-spacing: 0.1em;
  padding: 4px 7px; border-radius: 4px;
}
.v--pass { color: var(--ok); background: var(--ok-wash); }
.v--review { color: var(--warn); background: var(--warn-wash); }
.v--block { color: var(--fail); background: var(--fail-wash); }

/* protocol strip */
.protocols {
  margin-top: 72px; padding: 26px 0 30px;
  border-top: 1px solid var(--night-line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px;
}
.protocols__label { font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night-3); }
.protocols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 40px; }
.protocols li { font: 600 19px/1 var(--sans); letter-spacing: -0.02em; color: var(--on-night-2); }
@media (min-width: 1080px) { .protocols ul { margin-left: auto; gap: 56px; } }

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section--tight-top { padding-top: 40px; }
@media (min-width: 1000px) { .section { padding: 136px 0; } .section--tight-top { padding-top: 56px; } }

.head {
  position: relative;
  display: grid; justify-items: center; text-align: center; gap: 20px;
  max-width: 820px; margin: 0 auto 64px;
}
.head h2 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500; line-height: 1.04; letter-spacing: -0.04em;
  text-wrap: balance;
}
.head__lede { font-size: 18px; color: var(--ink-2); max-width: 38em; text-wrap: pretty; }
.head--left { justify-items: start; text-align: left; margin-left: 0; }
.head--dark .head__lede { color: var(--on-night-2); }

/* floating multiplayer-style flags beside headings */
.flag {
  position: absolute; top: 8px;
  display: none;
  font: 600 12px/1 var(--sans); color: #fff; background: var(--cobalt);
  padding: 6px 9px; border-radius: 6px 6px 6px 2px;
  animation: drift 7s ease-in-out infinite;
}
.flag::before {
  content: ""; position: absolute; left: -10px; top: -10px; width: 14px; height: 14px;
  background: var(--cobalt); clip-path: polygon(0 0, 100% 45%, 45% 55%, 35% 100%);
}
.flag--left { left: -40px; }
.flag--right { right: -30px; top: 60px; background: var(--ink); animation-delay: -3s; }
.flag--right::before { background: var(--ink); }
@media (min-width: 1080px) { .flag { display: block; } }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  35% { transform: translate(14px, -8px); }
  70% { transform: translate(-6px, 10px); }
}
@media (prefers-reduced-motion: reduce) { .flag { animation: none; } }

/* ---------- the shift: stepper ---------- */
.stepper__visual {
  position: relative; overflow: hidden;
  border-radius: var(--r-l);
  min-height: 380px;
  display: grid; place-items: center;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(142, 160, 255, 0.55), transparent 70%),
    radial-gradient(600px 360px at 90% 100%, rgba(127, 224, 230, 0.45), transparent 70%),
    linear-gradient(135deg, #dfe4f7, #eef0f8);
  border: 1px solid var(--line);
}
@media (min-width: 900px) { .stepper__visual { min-height: 440px; } }
.scene {
  grid-area: 1 / 1; padding: 32px 20px;
  display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap;
  animation: sceneIn .5s var(--ease);
}
.scene[hidden] { display: none; }
@keyframes sceneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sc-dialog {
  background: var(--card); border-radius: 14px; padding: 22px; width: min(320px, 100%);
  box-shadow: 0 30px 60px -24px rgba(24, 34, 80, .35), 0 0 0 1px rgba(11, 14, 23, .05);
  display: grid; gap: 6px;
}
.sc-dialog__title { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.sc-dialog__body { color: var(--ink-2); font-size: 14px; }
.sc-dialog__row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.sc-btn { font: 500 13.5px/1 var(--sans); padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line-2); }
.sc-btn--ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.sc-btn--probe { outline: 1.5px dashed var(--fail); outline-offset: 4px; }
.sc-xray {
  display: grid; gap: 6px; padding: 16px 18px; border-radius: 12px;
  background: var(--night); color: var(--on-night);
  box-shadow: 0 30px 60px -24px rgba(10, 14, 31, .6);
}
.sc-xray__k { font: 500 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-night-3); }
.sc-xray code { font-size: 16px; color: #ffb4aa; }
.sc-xray__note { font-size: 13px; color: var(--on-night-2); }

.sc-clones { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.sc-clone {
  width: 170px; background: var(--card); border-radius: 12px; padding: 16px;
  display: grid; gap: 8px;
  box-shadow: 0 24px 48px -24px rgba(24, 34, 80, .35), 0 0 0 1px rgba(11, 14, 23, .05);
}
.sc-clone:nth-child(2) { transform: translateY(-14px); }
.sc-clone__who { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.sc-clone i { display: block; height: 8px; border-radius: 3px; background: var(--bg-2); }
.sc-clone i.w70 { width: 70%; }
.sc-clone b { margin-top: 6px; font: 500 13px/1 var(--sans); background: #6b7280; color: #fff; padding: 10px; border-radius: 8px; text-align: center; }

.sc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(560px, 100%); }
.sc-human, .sc-agent {
  border-radius: 12px; padding: 18px; display: grid; gap: 10px; align-content: start;
  box-shadow: 0 24px 48px -24px rgba(24, 34, 80, .35);
}
.sc-human { background: var(--card); }
.sc-human p { font-size: 13.5px; color: var(--ink-2); }
.sc-agent { background: var(--night); color: var(--on-night); }
.sc-cap { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.sc-agent .sc-cap { color: var(--on-night-3); }
.sc-toolbar { display: flex; gap: 8px; }
.sc-toolbar span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-2); font-size: 16px; }
.sc-agent code { font-size: 12.5px; color: var(--on-night-2); }
.sc-agent code span { color: var(--cobalt-2); }
.sc-agent em { font-style: normal; color: #ffd08a; margin-left: 4px; }
@media (max-width: 520px) { .sc-split { grid-template-columns: 1fr; } }

.stepper__tabs { display: grid; gap: 0; margin-top: 28px; }
@media (min-width: 860px) { .stepper__tabs { grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 40px; } }
.step {
  display: grid; gap: 10px; text-align: left; align-content: start;
  background: none; border: 0; padding: 0 0 22px; cursor: pointer;
}
.step__bar { display: block; height: 2px; background: var(--line-2); border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.step__bar i { display: block; height: 100%; width: 0; background: var(--cobalt); }
.step[aria-selected="true"] .step__bar i { animation: fill 7s linear forwards; }
.stepper.is-manual .step[aria-selected="true"] .step__bar i,
.stepper.is-still .step[aria-selected="true"] .step__bar i { animation: none; width: 100%; }
@keyframes fill { to { width: 100%; } }
.step__title { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink-3); transition: color .3s; }
.step__text { font-size: 15.5px; color: var(--ink-3); opacity: .8; transition: color .3s, opacity .3s; }
.step[aria-selected="true"] .step__title { color: var(--ink); }
.step[aria-selected="true"] .step__text { color: var(--ink-2); opacity: 1; }
.step:hover .step__title { color: var(--ink); }

/* ---------- platform ---------- */
.loop {
  list-style: none; margin: -24px auto 40px; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
}
.loop li { position: relative; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); }
.loop li + li { margin-left: 22px; }
.loop li + li::before { content: "→"; position: absolute; left: -23px; top: 50%; transform: translateY(-50%); color: var(--ink-3); letter-spacing: 0; }

.bento { display: grid; gap: 16px; }
@media (min-width: 960px) {
  .bento { grid-template-columns: repeat(12, 1fr); gap: 20px; }
  .bento > :nth-child(1) { grid-column: span 7; }
  .bento > :nth-child(2) { grid-column: span 5; }
  .bento > :nth-child(3) { grid-column: span 5; }
  .bento > :nth-child(4) { grid-column: span 7; }
}
.card {
  border-radius: var(--r-l); padding: 28px 26px 26px;
  display: flex; flex-direction: column; gap: 22px;
  min-height: 520px; overflow: hidden;
  color: #fff;
}
@media (min-width: 720px) { .card { padding: 34px 34px 30px; } }
.card--cobalt { background: radial-gradient(500px 380px at 100% 100%, #8ea0ff, transparent 70%), linear-gradient(150deg, #2440e0, #4a67ff 60%, #6f86ff); }
.card--sea { background: radial-gradient(420px 320px at 0% 100%, #9fe3dc, transparent 70%), linear-gradient(160deg, #0e5f6a, #2a8c93 55%, #5bb5b4); }
.card--night {
  background:
    linear-gradient(var(--night-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--night-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--night);
}
.card--slate { background: radial-gradient(520px 360px at 100% 0%, #b9c4dc, transparent 70%), linear-gradient(150deg, #3b465e, #5d6b88 60%, #8793ad); }

.card__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card__label { font: 500 11.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; display: inline-flex; gap: 10px; }
.card__label span { opacity: .6; }
.status {
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 5px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
}
.status--soft { background: transparent; color: rgba(255, 255, 255, .72); }
.card__title { font-size: clamp(20px, 2vw, 24px); line-height: 1.3; font-weight: 500; letter-spacing: -0.02em; max-width: 26em; }
.card__title span { color: rgba(255, 255, 255, .64); }
.card figure { margin: 0; flex: 1; display: grid; place-items: center; min-height: 200px; }
.card__dev {
  font-size: 14px; color: rgba(255, 255, 255, .8);
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
}
.card__dev span {
  display: block; font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .56); margin-bottom: 7px;
}

/* compose figure */
.fig-compose { grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .fig-compose { grid-template-columns: 1.3fr auto 1fr; gap: 0; } }
.fc-table {
  background: #fff; color: var(--ink); border-radius: 12px; padding: 14px; width: 100%;
  box-shadow: 0 30px 50px -20px rgba(10, 20, 80, .45);
  font-size: 13px;
}
.fc-table__head { display: flex; justify-content: space-between; margin-bottom: 10px; }
.fc-table__head span { color: var(--ink-3); font-size: 12px; border: 1px solid var(--line); padding: 3px 7px; border-radius: 6px; }
.fc-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.fc-row > span:first-child { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.fc-pill { font-size: 11px; padding: 3px 7px; border-radius: 99px; background: var(--ok-wash); color: var(--ok); }
.fc-pill--warn { background: var(--warn-wash); color: var(--warn); }
.fc-link { width: 2px; height: 28px; margin: 0 auto; background: repeating-linear-gradient(180deg, #fff 0 4px, transparent 4px 8px); opacity: .8; }
@media (min-width: 620px) { .fc-link { width: 36px; height: 2px; background: repeating-linear-gradient(90deg, #fff 0 4px, transparent 4px 8px); } }
.fc-tool {
  border-radius: 12px; padding: 14px; width: 100%;
  background: rgba(10, 14, 31, .35); border: 1.5px dashed rgba(255, 255, 255, .7);
  display: grid; gap: 8px;
}
.fc-tool__k { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.fc-tool code { font-size: 12.5px; line-height: 1.55; color: #fff; }

/* generate figure */
.fig-generate { gap: 14px; align-content: center; }
.fg-prompt {
  display: inline-flex; align-items: center; gap: 8px; justify-self: center;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  padding: 9px 14px; border-radius: 99px; font-size: 14px;
}
.fg-spark { color: #c9fff6; }
.fg-ui {
  width: min(280px, 100%); background: #fff; color: var(--ink); border-radius: 12px; padding: 14px;
  box-shadow: 0 30px 50px -20px rgba(4, 40, 44, .5);
  outline: 1.5px dashed rgba(255, 255, 255, .8); outline-offset: 6px;
  display: grid; gap: 2px; font-size: 13.5px;
}
.fg-ui__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fg-ui__head span { font-size: 12px; color: var(--ink-3); }
.fg-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.fg-item span { font: 400 11.5px/1 var(--mono); color: var(--ink-3); }
.fg-check { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-2); }
.fg-check.is-on { background: #2a8c93; border-color: #2a8c93; box-shadow: inset 0 0 0 3px #fff; }

/* prove figure */
.fig-prove { gap: 16px; align-content: center; }
.fp-log {
  width: 100%; border-radius: 12px; padding: 14px 16px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--night-line);
  font: 400 12.5px/1.8 var(--mono); color: var(--on-night-2);
}
.fp-log span { display: inline-block; width: 84px; color: var(--cobalt-2); }
.fp-verdicts { display: flex; gap: 8px; justify-self: start; }
.fp-verdicts .v { font-size: 12px; padding: 7px 10px; }

/* connect figure */
.orbit { --r: 112px; position: relative; width: calc(var(--r) * 2 + 60px); height: calc(var(--r) * 2 + 40px); display: grid; place-items: center; }
.orbit__ring { position: absolute; width: calc(var(--r) * 2); height: calc(var(--r) * 2); border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); }
.orbit__core { width: 64px; height: 64px; border-radius: 16px; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 20px 40px -12px rgba(10, 14, 31, .5); }
.orbit__core .mark { width: 28px; height: 28px; }
.orbit__chip {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(var(--a)) translate(var(--r)) rotate(calc(-1 * var(--a)));
  font: 500 12.5px/1 var(--sans); white-space: nowrap;
  background: #fff; color: var(--ink); padding: 7px 11px; border-radius: 99px;
  box-shadow: 0 8px 20px -8px rgba(10, 14, 31, .5);
}
@media (prefers-reduced-motion: no-preference) {
  .orbit__ring { animation: spin 60s linear infinite; }
}

/* ---------- proof ---------- */
.split { display: grid; gap: 16px; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 20px; } }
.split__side { border-radius: var(--r-l); padding: 28px 24px; display: grid; gap: 24px; align-content: start; }
@media (min-width: 720px) { .split__side { padding: 36px; } }
.split__side--light { background: var(--card); border: 1px solid var(--line); }
.split__side--dark {
  color: var(--on-night);
  background:
    linear-gradient(var(--night-line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--night-line) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(600px 300px at 80% 0%, rgba(58, 91, 255, .35), transparent 70%),
    var(--night);
}
.split__cap { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.split__foot { font-size: 14.5px; color: var(--ink-3); }
.split__side--dark .split__foot { color: var(--on-night-3); }

.twins { display: grid; gap: 10px; }
.twins__eq { text-align: center; font: 300 28px/1 var(--sans); color: var(--ink-3); }
.dialog {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; display: grid; gap: 16px;
}
.dialog p { font-size: 15.5px; font-weight: 500; }
.dialog > div { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dialog__btn { font: 500 13.5px/1 var(--sans); padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); }
.dialog__btn--danger { background: var(--fail); border-color: var(--fail); color: #fff; }

.effects { display: grid; gap: 12px; }
.effect {
  border-radius: 14px; padding: 18px; display: grid; gap: 10px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--night-line);
}
.effect__top { display: grid; gap: 6px; }
.effect__k { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-night-3); }
.effect code { font-size: 16px; color: #fff; }
.effect p { font-size: 14.5px; color: var(--on-night-2); }
.verdict { display: flex; align-items: center; gap: 10px; }
.verdict .v { font-size: 11.5px; padding: 6px 9px; }

.facts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 860px) { .facts { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; } }
.facts li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 6px; }
.facts b { font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.facts span { color: var(--ink-2); font-size: 15px; }

/* ---------- who ---------- */
.who { display: grid; gap: 16px; }
@media (min-width: 860px) { .who { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.who__card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 28px; display: grid; gap: 14px; align-content: start;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.who__card:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -28px rgba(24, 34, 80, .35); }
.who__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--cobalt-wash); color: var(--cobalt); }
.who__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.who h3 { font-size: 20px; letter-spacing: -0.02em; margin-top: 8px; }
.who p { color: var(--ink-2); }

/* ---------- lab ---------- */
.lab {
  border-radius: var(--r-l); color: var(--on-night);
  padding: 72px 20px 40px;
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(58, 91, 255, .32), transparent 70%),
    linear-gradient(var(--night-line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--night-line) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--night);
}
@media (min-width: 720px) { .lab { padding: 96px 48px 48px; } }
.lab__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--night-line);
  border: 1px solid var(--night-line); border-radius: var(--r); overflow: hidden;
}
@media (min-width: 720px) { .lab__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .lab__grid { grid-template-columns: repeat(3, 1fr); } }
.exp { background: #0d1227; padding: 26px 24px 30px; display: grid; gap: 12px; align-content: start; transition: background-color .3s; }
.exp:hover { background: #111836; }
.exp__meta { display: flex; justify-content: space-between; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; color: var(--on-night-3); }
.exp__status { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; }
.exp__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; }
.exp__status--done { color: #8ff0c4; }
.exp__status--done::before { background: currentColor; }
.exp__status--run { color: var(--cobalt-2); }
.exp__status--run::before { background: currentColor; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .exp__status--run::before { animation: none; } }
.exp h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; }
.exp p { color: var(--on-night-2); font-size: 15px; }
.exp__try {
  display: inline; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--cobalt-2); text-decoration: underline; text-underline-offset: 4px; font-size: inherit;
}
.lab__foot { margin-top: 28px; text-align: center; font: 500 11.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-night-3); }

/* ---------- principles ---------- */
.principles { display: grid; gap: 8px; }
@media (min-width: 1000px) {
  .principles { grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: start; }
  .principles .head { position: sticky; top: 120px; margin-bottom: 0; }
}
.tenets { list-style: none; counter-reset: t; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.tenets li {
  counter-increment: t; display: grid; grid-template-columns: 52px 1fr; gap: 12px;
  padding: 26px 0; border-bottom: 1px solid var(--line-2);
  font-size: clamp(19px, 2.1vw, 24px); line-height: 1.35; letter-spacing: -0.02em; color: var(--ink-3);
}
.tenets li::before { content: "0" counter(t); font: 500 12px/2.2 var(--mono); color: var(--cobalt); letter-spacing: 0.1em; }
.tenets b { font-weight: 500; color: var(--ink); }

/* ---------- faq ---------- */
.faq { display: grid; gap: 8px; }
@media (min-width: 1000px) { .faq { grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: start; } .faq__head { margin-bottom: 0; } }
.faq__list { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; position: relative;
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 6px; background: var(--bg-2);
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 10px 1.5px, 1.5px 10px; background-position: center; background-repeat: no-repeat;
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 22px; color: var(--ink-2); max-width: 44em; }

/* ---------- final ---------- */
.final__card {
  border-radius: var(--r-l); color: #fff;
  padding: 72px 24px;
  display: grid; justify-items: center; text-align: center; gap: 28px;
  background:
    radial-gradient(700px 420px at 15% 0%, rgba(142, 160, 255, .9), transparent 65%),
    radial-gradient(700px 420px at 100% 100%, rgba(91, 181, 180, .85), transparent 65%),
    linear-gradient(135deg, #2440e0, #3a5bff 50%, #2a8c93);
}
@media (min-width: 720px) { .final__card { padding: 112px 48px; } }
.final__card h2 {
  font-size: clamp(34px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -0.045em;
  max-width: 15em; text-wrap: balance;
}
.final__card h2 span { color: rgba(255, 255, 255, .66); }
.final__card .signup { width: 100%; }
.final__card .signup__field { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); }
.final__card .signup__note { color: rgba(255, 255, 255, .7); }
.final__card .signup__go:hover { background: var(--night); color: #fff; }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--on-night); padding: 72px 0 32px; }
.final { padding-bottom: 72px; }
.foot__grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .foot__grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot__brand { display: grid; gap: 16px; align-content: start; }
.foot__brand p { color: var(--on-night-2); max-width: 22em; font-size: 16px; }
.wordmark--foot { font-size: 26px; }
.wordmark--foot .mark { width: 24px; height: 24px; }
.wordmark--foot .mark__gen { fill: var(--cobalt-2); }
.foot__col { display: grid; gap: 12px; align-content: start; }
.foot__col p { font-weight: 500; margin-bottom: 4px; }
.foot__col a { color: var(--on-night-2); text-decoration: none; font-size: 15px; }
.foot__col a:hover { color: #fff; }
.foot__base {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--night-line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--on-night-3);
}
.foot__agent { background: none; border: 0; padding: 0; color: var(--cobalt-2); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- reveal + "compose in" ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.head.is-composing h2 { outline: 1.5px dashed var(--cobalt); outline-offset: 8px; border-radius: 6px; transition: outline-color .6s; }
.head h2 { outline: 1.5px dashed transparent; outline-offset: 8px; transition: outline-color .8s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .blk, .trace li, .regen, .bar > i, .agent-cursor { transition: none !important; }
  .ask.is-typing .caret, .regen::before, .scene { animation: none; }
}

/* ---------- Agent view: the page as an agent reads it ---------- */
html[data-agent-view] [data-ui]:not(.nav) { position: relative; }
html[data-agent-view] [data-ui] {
  outline: 1.5px dashed var(--cobalt) !important; outline-offset: 4px;
  border-radius: 6px;
}
html[data-agent-view] [data-ui]::after {
  content: "<" attr(data-ui) " />";
  position: absolute; top: -12px; left: 8px; z-index: 5;
  font: 500 10.5px/1 var(--mono); letter-spacing: .02em; white-space: nowrap;
  background: var(--cobalt); color: #fff; padding: 4px 6px; border-radius: 4px;
  pointer-events: none;
}
html[data-agent-view] [data-tool]::after {
  content: "tool · " attr(data-tool);
  background: var(--ink); box-shadow: 0 0 0 1px var(--cobalt-2);
}
html[data-agent-view] .nav[data-ui]::after { top: auto; bottom: -10px; }
html[data-agent-view] :is(.stage, .stepper__visual, .card, .final__card, .lab__grid)::after { top: 10px; left: 10px; }
html[data-agent-view] main,
html[data-agent-view] .foot { filter: saturate(.55); }
html[data-agent-view] [data-ui] { filter: none; }
/* stepper and cards already have ::before grain; ::after is free for the tag */

.agent-hud {
  position: fixed; left: 50%; bottom: 20px; z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  background: var(--night); color: var(--on-night);
  padding: 10px 10px 10px 16px; border-radius: 12px;
  font: 500 13px/1 var(--sans); white-space: nowrap;
  box-shadow: 0 20px 40px -12px rgba(10, 14, 31, .55), 0 0 0 1px rgba(142, 160, 255, .35);
}
.agent-hud[hidden] { display: none; }
.agent-hud__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt-2); animation: pulse 1.6s ease-in-out infinite; }
.agent-hud b { font-weight: 500; color: var(--cobalt-2); }
.agent-hud button { background: rgba(255, 255, 255, .1); border: 0; color: #fff; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.agent-hud button:hover { background: rgba(255, 255, 255, .2); }
