/* Light palette for the current Aura-inspired layout. Existing HTML and demo
 * logic remain authoritative for all copy, data, examples and interactions. */
:root, :root[data-theme="light"] {
  --page: #f7f8fb; --band: #f0f2f7;
  --surface: #ffffff; --surface-2: #f1f3f8; --surface-3: #e7ebf3;
  --border: #252e4212; --border-strong: #252e4226;
  --fg: #20232d; --fg-2: #596273; --fg-3: #687183;
  --accent: #5766b9; --accent-fg: #ffffff; --accent-soft: #eef1fc; --accent-line: #c7cfef;
  --good: #2a745a; --good-soft: #eaf5ee; --warn: #89632a; --warn-soft: #fbf3e5;
  --k-model: #7d87c7; --k-tool: #b28d51; --k-sub: #9c7fc0; --k-harness: #6097a3; --k-verify: #6c9d83;
  --code-bg: #ffffff; --code-bar: #f3f4f8; --code-border: #252e4212;
  --code-fg: #3d4658; --code-dim: #6a7486; --code-accent: #5869b0; --code-green: #2a745a; --code-string: #4d785b;
  --grid-line: #252e4209;
  --shadow: 0 1px 0 #ffffffcc inset, 0 8px 24px #242b4008;
  --shadow-lg: 0 1px 0 #ffffffdd inset, 0 24px 64px #242b400d;
  --radius: 12px; --radius-sm: 8px; --wrap: 1360px; --gutter: 40px;
  --bui-control-radius: 8px; --bui-window-radius: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1); color-scheme: light;
}
html { scroll-padding-top: 112px; }
body { background: var(--page); font-size: 15px; line-height: 1.65; isolation: isolate; }
/* The viewport stays in place while the page scrolls over the line field. */
body::before {
  content: ""; position: fixed; inset: -12%; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 52% 60% at 8% 20%, #dce4f399, transparent 75%), radial-gradient(ellipse 48% 52% at 88% 72%, #cde7ed80, transparent 76%), radial-gradient(ellipse 36% 40% at 70% 12%, #e4e4f780, transparent 80%);
  animation: background-drift 36s ease-in-out infinite alternate;
}
@keyframes background-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); }
.mono, .term-title, .sp-name, .sp-dur, .metric-bar { font-variant-numeric: tabular-nums; }

/* Floating navigation with rounded rectangular corners. */
.nav { top: 20px; width: calc(100% - 48px); max-width: 1392px; margin: 32px auto 0; border: 1px solid #252e4218; border-radius: 16px; background: linear-gradient(100deg, #ffffffdb, #f8f9fce6 58%); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 1px 0 #ffffffb3 inset, 0 8px 32px #242b400a; }
.nav-row { height: 62px; padding: 0 10px 0 24px; gap: 28px; }
.brand { gap: 10px; }
.nav .brand-logo { height: 22px; }
.nav-links { justify-content: flex-end; gap: 2px; }
.nav-links a { padding: 8px 12px; font-size: 13px; color: #596273; border-radius: 8px; }
.nav-actions { gap: 8px; }
.nav-actions .btn { min-height: 42px; padding: 12px 20px; font-size: 12px; }
.nav-actions .nav-signin { padding-inline: 12px; color: #596273; }
.menu summary { background: transparent; border: 0; border-radius: 8px; }
.menu-panel { border-radius: 12px; padding: 8px; background: #ffffff; }
.btn, [data-bui-component="Button"] { border-radius: 8px; min-height: 38px; }
.btn.lg, [data-bui-component="Button"].lg { min-height: 48px; padding: 16px 22px; font-size: 13px; }
[data-bui-component="Button"] { transition: background-color 180ms ease, transform 180ms ease, opacity 180ms ease; }
[data-bui-component="Button"]:hover { transform: translateY(-2px); }
[data-bui-component="Button"][data-bui-variant="primary"] { background: #252733; color: #ffffff; box-shadow: 0 1px 0 #ffffff1a inset; }
[data-bui-component="Button"][data-bui-variant="primary"]:hover { background: #3b3e4c; opacity: 1; }
[data-bui-component="Button"].cue { min-height: 0; }

/* The complete hero sits in one large rounded panel. */
.hero { padding: 32px 24px 0; overflow: clip; }
.hero::before, .hero::after { content: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1392px; padding: 48px 40px 32px; gap: 40px; border: 1px solid #252e4212; border-radius: 16px; background: radial-gradient(ellipse 48% 36% at 74% 45%, #dce2fb33, transparent 85%), linear-gradient(145deg, #f3f4f8b3, #ffffffb3 65%); box-shadow: 0 1px 0 #ffffffcc inset; isolation: isolate; overflow: hidden; }
.hero-intro { display: grid; gap: 16px; min-width: 0; position: relative; z-index: 2; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); grid-template-rows: max-content 1fr; align-items: start; gap: 24px 72px; max-width: none; position: relative; z-index: 2; }
h1 { font-size: var(--type-h1, 60px); font-weight: 450; line-height: 1.035; letter-spacing: -.065em; text-wrap: initial; }
.hero-heading { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
.hero-tag { display: flex; align-items: center; gap: 8px; width: fit-content; padding: 5px 8px; border: 1px solid #d0c9c1; background: #eeebe7; color: #73695e; font-family: var(--font-mono); font-size: 11px; font-weight: 400; line-height: 1.2; letter-spacing: .08em; }
.hero-tag svg { flex: none; }
.h1-soft { display: block; margin-top: 10px; color: #687081; font-family: var(--font-ui); font-size: 1em; font-style: normal; font-weight: inherit; line-height: inherit; letter-spacing: inherit; }
.hero .lead { grid-column: 2; align-self: start; max-width: 440px; padding-top: var(--hero-lead-pad-top, 16px); font-size: 15px; line-height: 1.6; color: #626b7b; text-wrap: pretty; }
.hero .cta-row { grid-column: 2; align-self: start; gap: 10px; padding-top: 24px; border-top: 1px solid var(--border-strong); }
.ring-scene { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; opacity: .95; z-index: -1; pointer-events: none; overflow: hidden; contain: strict; mask-image: linear-gradient(90deg, #0006, #000b 40%, #000 72%); }
.ring-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 800ms ease; }
.ring-scene.ring-ready canvas { opacity: 1; }
.ring-fallback { position: absolute; top: 4%; right: 2%; width: min(40vw, 550px); aspect-ratio: 1; transform: none; transition: opacity 500ms; }
.ring-fallback i { position: absolute; inset: 0; border: 1px solid #8096b72b; border-radius: 50%; }
.ring-fallback i:nth-child(2) { inset: 15%; border-color: #8096b74d; }
.ring-fallback::before, .ring-fallback::after { content: ""; position: absolute; border: 1px solid #8096b780; border-radius: 50%; }
.ring-fallback::before { width: 22px; height: 22px; left: calc(50% - 11px); top: calc(50% - 11px); }
.ring-fallback::after { width: 10px; height: 10px; left: 75%; top: 25%; }
.ring-ready .ring-fallback { opacity: 0; }

/* Every existing example has its own non-overlapping space. */
.hero-visual { position: relative; z-index: 1; padding: 0; }
.demo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: minmax(0, 1fr) auto; gap: 16px; max-width: none; padding: 0; }
.demo-app { grid-column: 1; grid-row: 1 / span 2; }
.demo-chat { grid-column: 2; grid-row: 1; }
.demo-toast { grid-column: 2; grid-row: 2; }
.demo-chat, .demo-toast { position: relative; inset: auto; width: 100%; margin: 0; }
.js [data-demo]:not([data-state]) :is([data-at], [data-type]) { visibility: hidden; }
/* Keep the upcoming windows present as empty, soft previews until their cue. */
.js .hero [data-demo] > :is(.demo-chat, .demo-toast) {
  opacity: 1; visibility: visible; filter: blur(0); transform: none;
  transition: opacity 600ms ease, filter 600ms ease, border-color 600ms ease, box-shadow 600ms ease;
}
.js .hero [data-demo] > :is(.demo-chat, .demo-toast):not(.shown) {
  opacity: .65; filter: blur(5px); transform: none; pointer-events: none; user-select: none;
  border-color: transparent;
  box-shadow: none;
}
.js .hero [data-demo] > :is(.demo-chat, .demo-toast):not(.shown) > * {
  opacity: 0; visibility: hidden;
}
.demo-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; min-width: 0; margin-top: 8px; }
.demo-progress-track { --demo-progress: 100%; position: relative; flex: 1; min-width: 0; height: 4px; }
.demo-progress { display: block; width: 100%; height: 4px; appearance: none; border: 0; border-radius: 2px; overflow: hidden; background: var(--border); color: #d3c1af; }
.demo-progress::-webkit-progress-bar { background: var(--border); }
.demo-progress::-webkit-progress-value { background: #d3c1af; }
.demo-progress::-moz-progress-bar { background: #d3c1af; }
.demo-progress-head { position: absolute; left: var(--demo-progress); top: 50%; width: 9px; height: 9px; border: 1px solid #d3c1af; border-radius: 50%; background: #fff8ef; box-shadow: 0 0 8px 3px #d3c1afcc, 0 0 20px 8px #d3c1af66; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; visibility: hidden; }
[data-demo][data-state="typing"] .demo-progress-head,
[data-demo][data-state="playing"] .demo-progress-head { opacity: 1; visibility: visible; }
/* Reserve the control's space while hidden, so the track never changes width. */
.demo-controls .replay { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; min-height: 32px; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: var(--fg-2); line-height: 1; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 600ms ease-out, transform 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out; }
[data-demo][data-state="done"] .demo-controls .replay { visibility: visible; opacity: 1; pointer-events: auto; }
.demo-controls .replay:hover { border-color: var(--border-strong); color: var(--fg); }
.demo-controls .replay svg { flex: none; }
.demo-controls .replay::after { content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 2; padding: 5px 8px; border-radius: 4px; background: var(--fg); color: var(--surface); font-family: var(--font-ui); font-size: 11px; font-weight: 400; line-height: 1.4; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .demo-controls .replay:hover::after { opacity: 1; visibility: visible; }
}
@media (max-width: 600px) {
  .demo-controls { gap: 12px; }
  .demo-controls .replay { width: 44px; height: 44px; min-height: 44px; }
}
.term, .tabs-window, .chat, .toast, .card, .trace { border-radius: 12px; box-shadow: var(--shadow); }
.term-bar { padding: 16px 22px; gap: 12px; background: #f3f4f8; }
.demo-app > .term-bar { height: 51px; padding-block: 0; }
.term-title { font-size: 11px; }
.term-title b { font-weight: 500; color: #323a4b; }
.lights { gap: 5px; }
.lights i { width: 7px; height: 7px; background: #c9cedb; }
.demo-body { min-height: 232px; padding: 24px 24px 0; }
.bubble { padding: 9px 13px; border: 1px solid #c7d1ef80; background: #eef1fa; color: #465174; border-radius: 14px 14px 4px 14px; font-size: 12px; }
.demo-steps { gap: 10px; font-size: 12px; line-height: 1.7; }
.demo-live { font-size: 10px; padding-top: 16px; margin-top: 20px; overflow-wrap: anywhere; }
.demo-composer { margin: 20px; padding: 12px 14px; border-radius: 12px; color: var(--fg-3); font-size: 11px; background: #f8f9fc; }
.replay { padding: 3px 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--fg-3); font-size: 10px; }
.replay:hover { border-color: var(--border-strong); color: var(--fg); }
.chat-head { padding: 13px 20px; font-size: 12px; background: #f3f4f8; }
.chat-body { padding: 16px 20px; font-size: 12px; }
/* Keep the reply's space throughout playback. The typing dots share its row
 * instead of briefly adding another row and moving every following slide. */
.hero .demo-chat .chat-body { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.hero .demo-chat .msg.me { grid-area: 1 / 1; justify-self: end; }
.hero .demo-chat .msg.bot { grid-area: 2 / 1; justify-self: start; align-self: start; }
.msg { border-radius: 12px; }
.msg.me { background: #e9edf9; color: #3d4771; }
.msg.bot { background: #f3f4f7; border-color: var(--border); color: #4e586b; }
.toast { padding: 20px 24px; gap: 14px; font-size: 12px; line-height: 1.6; background: linear-gradient(120deg, #ffffff, #f5f6fa); }
.demo-toast { padding: 20px; }
.toast-icon { width: 30px; height: 30px; border-radius: 10px; }
.toast b { margin-bottom: 1px; font-size: 13px; font-weight: 500; }
.gains { margin-top: 10px; gap: 4px 24px; font-size: 11px; }
.gains .to { color: var(--good); }
.toast-swap { margin-top: 10px; }
.toast-swap .btn { border-radius: 8px; font-size: 11px; padding: 6px 12px; }

/* Code surfaces share a dark theme; their surrounding cards remain light. */
.term, .mini-code, .tabs-window, .improve-diff {
  --code-bg: #131722;
  --code-bar: #1c2230;
  --code-border: #2c3445;
  --code-fg: #e5eaf4;
  --code-dim: #9da9bd;
  --code-accent: #a7b5ff;
  --code-green: #7edab4;
  --code-string: #9dd6b0;
  --surface: var(--code-bg);
  --surface-2: var(--code-bar);
  --surface-3: #30394c;
  --fg: var(--code-fg);
  --fg-2: var(--code-dim);
  --fg-3: var(--code-dim);
  --border: var(--code-border);
  --border-strong: #526077;
  --good: var(--code-green);
  --good-soft: #17372e;
  --shadow: 0 1px 0 #ffffff08 inset, 0 8px 24px #242b4012;
  background: var(--code-bg);
  color: var(--code-fg);
  border-color: var(--code-border);
  color-scheme: dark;
}
.term .term-bar { background: var(--code-bar); }
.term .term-title b { color: var(--code-fg); }
.term .lights i { background: #566174; }
.demo-app .bubble { background: #282f42; border-color: #414b67; color: var(--code-fg); }
.demo-app .demo-composer { background: #191f2c; color: var(--code-dim); }
.demo-app .replay { border-color: var(--code-border); color: var(--code-dim); }
.demo-app .replay:hover { border-color: #526077; color: var(--code-fg); }

/* Framed sections alternate with open canvas without adding section labels. */
.section { padding: 88px 0; }
.band { background: transparent; border: 0; }
h2 { font-size: var(--type-h2, 40px); font-weight: 450; line-height: 1.12; letter-spacing: -.055em; text-wrap: pretty; }
h2 .line { display: block; margin-top: 10px; font-family: var(--font-ui); font-size: 1em; font-style: normal; font-weight: inherit; letter-spacing: inherit; line-height: inherit; color: #6d7586; }
h3 { font-size: 19px; font-weight: 450; letter-spacing: -.035em; }
.section-head { display: block; text-align: left; margin: 0 0 36px; max-width: none; }
.section-head h2 { max-width: 780px; }
.section-head .lead { max-width: 620px; margin: 24px 0 0; font-size: 14px; line-height: 1.9; }
#improve .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); align-items: center; gap: 64px; }
#improve .section-head { margin: 0; }
.improve-demo { min-width: 0; }
.improve { max-width: none; overflow: hidden; }
.card-head { padding: 16px 22px; background: #ffffff; font-size: 12px; }
.loop-row { padding-right: 18px; background: #ffffff; }
.loop { padding: 18px 20px; gap: 18px; font-size: 11px; }
.loop li { gap: 6px; }
.loop li::before { width: 5px; height: 5px; }
.improve-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.improve-fix, .improve-compare { padding: 24px 20px; }
.improve-compare { background: #ffffff; gap: 22px; }
.improve-label { margin-bottom: 14px; font-size: 10px; color: var(--fg-3); }
.spans.mini .span { height: 25px; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.spans.mini .sp-name { font-size: 9px; }
.spans.mini .sp-track i { height: 6px; }
.finding { margin-top: 14px; font-size: 11px; }
.improve-change h3 { font-size: 14px; }
.improve-diff { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 10px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.metric { grid-template-columns: 78px minmax(0, 1fr); gap: 5px 12px; }
.metric-name { font-size: 11px; }
.metric-bar { font-size: 10px; }
.metric-bar i { height: 6px; border-radius: 999px; }
.improve-actions { padding: 18px 22px; min-height: 72px; }
.canary { font-size: 11px; gap: 14px; }
.canary-bar { flex-basis: 100px; height: 5px; border: 0; }

#secrets { padding-top: 0; }
#secrets .wrap { max-width: 1392px; width: calc(100% - 48px); padding: 48px 40px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(120deg, #f5f6fad9, #ffffffd9); }
#secrets .section-head { max-width: 850px; }
.carry { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); gap: 20px; max-width: none; align-items: stretch; }
.carry > .term, .carry > .card { align-self: stretch; }
.carry > .card { overflow: hidden; }
.carry-arrow { width: 40px; height: 40px; align-self: center; justify-self: center; background: #e9ecf4; border-color: var(--border-strong); color: #525e73; box-shadow: none; }
.carry .term-body { min-height: 280px; padding: 26px 24px; font-size: 12px; line-height: 2.3; }
.rows { padding: 4px 24px 12px; }
.rows div { grid-template-columns: 110px minmax(0, 1fr); padding: 10px 0; font-size: 12px; }
.rows dd { font-size: 11px; }

/* The three-card rhythm contains only the original usage examples. */
#deploy, #how, #pricing { padding-top: 0; }
.uses { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: none; margin: 0; }
.use { padding: 24px; gap: 24px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(145deg, #ffffff, #f6f7fb); }
.use h3 { font-size: 20px; }
.mini-code { padding: 20px 16px; min-height: 252px; border-radius: 8px; font-size: 11px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.mini-site, .sched { min-height: 252px; border-radius: 8px; background: #ffffff; }
.mini-bar { padding: 10px 12px; background: #eef0f5; }
.mini-url { border-radius: 999px; background: #f6f7fb; font-size: 10px; margin-right: 28px; }
.mini-page { background: radial-gradient(ellipse at top left, #dce3fb88, #ffffff 80%); padding: 16px; }
.mini-page .chat { width: 100%; border-radius: 8px; }
.mini-page .chat-head { padding: 11px 14px; font-size: 11px; }
.mini-page .chat-body { padding: 14px; font-size: 11px; }
.sched-head { padding: 24px 16px; gap: 8px; flex-wrap: wrap; font-size: 11px; background: #eef0f5; }
.sched-head .mono { font-size: 10px; }
.sched-runs li { padding: 18px 16px; font-size: 11px; }
.sched-runs .mono { font-size: 10px; }

/* All waterfall data remains visible. */
.trace { padding: 24px 30px; background: linear-gradient(150deg, #ffffff, #ffffff); }
.trace-head { padding: 0 0 22px; }
.trace-id { font-size: 12px; }
.trace-meta { font-family: var(--font-mono); font-size: 11px; }
.spans { padding-top: 14px; }
.span { height: 32px; grid-template-columns: 184px minmax(0, 1fr) 52px; gap: 24px; font-size: 11px; }
.sp-track::before { border-top-style: solid; opacity: .5; }
.sp-track i { height: 8px; border-radius: 999px; }
.sp-name { overflow: visible; text-overflow: clip; }
.trace-axis { grid-template-columns: 184px minmax(0, 1fr) 52px; gap: 24px; margin-top: 10px; }
.trace-axis i { font-size: 10px; }
.legend { margin-top: 16px; padding-top: 22px; gap: 12px 24px; font-size: 11px; }
.legend-note { font-size: 11px; }

/* The two existing price entries become inset metric panels. */
#pricing .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px 64px; align-items: center; }
#pricing .section-head { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
#pricing h2 { max-width: 320px; font-size: 56px; }
.prices { grid-column: 2; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 16px; max-width: none; width: 100%; margin: 0; }
.price { padding: 28px; gap: 32px; border-radius: 12px; background: linear-gradient(145deg, #e9ecf4, #ffffff); box-shadow: 0 1px 0 #ffffffb3 inset; }
.price h3 { font-size: 12px; font-weight: 400; }
.price-num { gap: 10px; }
.price-num b { font-size: 64px; font-weight: 450; line-height: 1; letter-spacing: -.065em; }
.price-num span { font-size: 11px; }
.price-num .from { width: 100%; font-size: 11px; }
.price-note { grid-column: 2; margin-top: 0; font-size: 12px; text-align: left; }

/* The final panel contains the exact installation commands and existing CTAs. */
#install { padding: 0 24px 64px; }
#install .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr); gap: 24px 64px; align-items: center; max-width: 1392px; padding: 48px 40px; border: 1px solid var(--border); border-radius: 16px; background: radial-gradient(ellipse at 6% 100%, #d8ddf533, transparent 60%), #f1f3f8d9; }
#install .section-head { grid-column: 1; margin: 0; align-self: end; }
#install h2 { font-size: 48px; max-width: 380px; }
.tabs-window, .tabs-window[data-bui-component="CodeBlock"] { grid-column: 2; grid-row: 1 / span 2; width: 100%; max-width: none; border-radius: 12px; background: var(--code-bg); box-shadow: 0 0 0 1px var(--code-border); }
.tab-bar[data-bui-component="SegmentedControl"] { display: grid; width: calc(100% - 32px); height: 40px; margin: 16px 16px 0; padding: 3px; border-radius: 10px; background: var(--code-bar); }
.tab-bar[data-bui-component="SegmentedControl"] > .bui-segment-thumb { top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--bui-segment-count)); border-radius: 8px; background: var(--surface-3); box-shadow: none; }
.tab-bar[data-bui-component="SegmentedControl"] > [role="tab"] { margin: 0; padding: 0 12px; font-size: 11px; color: var(--code-dim); border-bottom: 0; }
.tab-bar[data-bui-component="SegmentedControl"] > [role="tab"][aria-selected="true"] { color: var(--code-fg); }
.tabs-window[data-bui-component="CodeBlock"] > [role="tabpanel"] { padding: 0; background: var(--code-bg); }
.tabs-window pre, .tabs-window[data-bui-component="CodeBlock"] > [role="tabpanel"] pre { padding: 24px 52px 24px 24px; font-size: 11px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.tab-panel .copy { top: 20px; right: 16px; width: 28px; height: 28px; border-radius: 9px; background: var(--code-bar); border-color: var(--code-border); }
#install .cta-row.center { grid-column: 1; align-self: start; justify-content: flex-start; margin: 0; gap: 12px; }
.foot { padding: 0 0 40px; border: 0; background: transparent; font-size: 11px; }
.foot-row { border-top: 1px solid var(--border); padding-top: 28px; }
.foot .brand-logo { height: 22px; }
.foot-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { color: var(--fg-3); font-size: inherit; white-space: nowrap; }
.foot-links a:hover { color: var(--fg); }

@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page-ready .hero-tag { animation: arrive 800ms var(--ease) both; }
.page-ready .hero-copy > * { animation: arrive 800ms var(--ease) both; }
.page-ready .hero-copy > :nth-child(2) { animation-delay: 100ms; }
.page-ready .hero-copy > :nth-child(3) { animation-delay: 180ms; }
/* Reveal in place at every width: a second spatial animation makes content
 * keep settling after scrolling stops, and only plays on the way down. */
.reveal-pending { opacity: 0; }
.reveal-pending.reveal-visible { opacity: 1; transition: opacity 700ms var(--ease); }
@media print, (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
  [data-demo] [data-at], [data-demo] [data-at] > *, [data-demo] [data-type], .trace-demo .sp-track i {
    opacity: 1 !important; visibility: visible !important; filter: none !important; transform: none !important;
  }
  [data-demo] .swap > :not(:last-child), .msg.dots, .demo-controls, .caret { display: none !important; }
}
@media (max-width: 1200px) {
  :root, :root[data-theme="light"] { --gutter: 32px; }
  .nav-row { gap: 16px; }
  .nav-links a { padding-inline: 9px; }
  .nav-actions .btn { padding-inline: 16px; }
  .hero-grid { padding: 40px 32px 28px; }
  .hero-copy { gap: 24px 40px; }
  h1 { font-size: var(--type-h1); }
  .hero .lead { font-size: 14px; }
  .hero .cta-row { flex-direction: column; align-items: flex-start; }
  #improve .wrap { gap: 32px; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
  #improve h2 { font-size: var(--type-h2); }
  .improve-body { grid-template-columns: 1fr; }
  .improve-compare { border-left: 0; border-top: 1px solid var(--border); }
  .spans.mini .span { grid-template-columns: 108px minmax(0, 1fr); }
  .metric { grid-template-columns: 100px minmax(0, 1fr); }
  #secrets .wrap, #install .wrap { padding: 40px 32px; }
  .carry { gap: 16px; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); }
  .carry .term-body { font-size: 11px; padding-inline: 20px; }
  .rows { padding-inline: 20px; }
  .rows div { grid-template-columns: 86px minmax(0, 1fr); }
  .rows dd { font-size: 10px; }
  .use { padding: 20px; }
  #pricing .wrap, #install .wrap { gap: 20px 40px; }
  .price { padding: 24px; }
  .price-num b { font-size: 56px; }
  #pricing h2 { font-size: 48px; }
  #install h2 { font-size: 42px; }
}
@media (min-width: 1041px) and (max-width: 1120px) {
  .nav-links { display: flex; }
  .menu { display: none; }
}
@media (max-width: 1040px) {
  .nav-links { display: none; }
  .menu { display: block; }
  .nav-actions { margin-left: auto; }
  .hero-copy { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 24px; }
  h1 { font-size: var(--type-h1); }
  .hero .lead { font-size: 13px; }
  .hero .cta-row { padding-top: 20px; }
  .demo { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .demo-body { padding-inline: 20px; }
  .demo-steps { font-size: 11px; }
  .demo-live { font-size: 9px; }
  .toast { padding: 20px; gap: 10px; }
  .gains { gap: 4px 14px; }
  .section { padding-block: 72px; }
  #improve .wrap { grid-template-columns: minmax(0, 1fr); }
  #improve .section-head { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; }
  #improve .lead { margin: 0; }
  .improve-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .improve-compare { border-left: 1px solid var(--border); border-top: 0; }
  .carry { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .carry-arrow { transform: rotate(90deg); }
  .carry .term-body { min-height: 0; padding: 24px; font-size: 12px; }
  .rows div { grid-template-columns: 112px minmax(0, 1fr); }
  .rows dd { font-size: 12px; }
  .uses { gap: 14px; }
  .use { padding: 18px; }
  .mini-code { font-size: 10px; padding-inline: 12px; }
  .mini-page { padding: 10px; }
  .sched-runs li { padding-inline: 12px; gap: 6px; font-size: 10px; }
  #pricing .wrap { grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); gap: 20px 32px; }
  #pricing h2 { font-size: 40px; }
  .price { padding: 20px; }
  .price-num b { font-size: 48px; }
  #install .wrap { grid-template-columns: 1fr; gap: 28px; }
  #install .section-head, #install .cta-row.center, .tabs-window, .tabs-window[data-bui-component="CodeBlock"] { grid-column: 1; grid-row: auto; }
  #install h2 { max-width: none; }
  #install .cta-row.center { justify-content: flex-start; }
}
@media (max-width: 760px) {
  :root, :root[data-theme="light"] { --gutter: 24px; }
  html { scroll-padding-top: 100px; }
  .nav { top: 12px; width: calc(100% - 24px); margin-top: 16px; }
  .nav-row { height: 58px; padding: 0 8px 0 16px; gap: 8px; }
  .nav .brand-logo { height: 20px; }
  .nav-signin { display: none; }
  .nav-actions { gap: 4px; }
  .nav-actions .btn { min-height: 38px; padding: 11px 15px; font-size: 11px; }
  .hero { padding: 24px 12px 0; }
  .hero-grid { border-radius: 16px; padding: 32px 24px 24px; gap: 40px; }
  .hero-copy { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 24px; }
  .hero-heading, .hero .lead, .hero .cta-row { grid-column: 1; grid-row: auto; }
  h1 { font-size: var(--type-h1); line-height: 1.06; letter-spacing: -.06em; }
  .h1-soft { margin-top: 8px; }
  .hero .lead { font-size: 14px; max-width: 560px; }
  .hero .cta-row { flex-direction: row; padding-top: 24px; width: 100%; }
  .hero .cta-row .btn { padding-inline: 18px; font-size: 12px; }
  .ring-scene { opacity: .85; }
  .ring-fallback { top: 22%; right: -5%; width: 72vw; }
  .demo { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 14px; }
  .demo-app, .demo-chat, .demo-toast { grid-column: 1; grid-row: auto; width: 100%; inset: auto; margin: 0; }
  .term, .chat, .toast { border-radius: 12px; }
  .term-bar { padding: 14px 16px; gap: 8px; }
  .term-title { font-size: 10px; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .demo-body { min-height: 0; padding: 20px 16px 0; }
  .demo-steps { font-size: 11px; gap: 9px; }
  .demo-live { font-size: 9px; }
  .demo-composer { margin: 16px; }
  .bubble { font-size: 11px; }
  .chat-body { padding: 18px; }
  .toast { padding: 20px; font-size: 12px; }
  .toast b { font-size: 13px; }
  .gains { gap: 5px 22px; }
  .section { padding-block: 56px; }
  .section-head { margin-bottom: 28px; }
  h2, #improve h2 { font-size: var(--type-h2); }
  #improve .wrap { gap: 28px; }
  #improve .section-head { display: block; }
  #improve .lead { margin-top: 24px; font-size: 13px; }
  .loop-row { padding-right: 14px; align-items: flex-start; }
  .loop { padding: 16px; gap: 12px 16px; font-size: 10px; }
  .loop-row .replay { margin-top: 16px; }
  .card-head { padding: 16px; }
  .improve-body { grid-template-columns: minmax(0, 1fr); }
  .improve-fix, .improve-compare { padding: 24px 20px; }
  .improve-compare { border-left: 0; border-top: 1px solid var(--border); gap: 22px; }
  .spans.mini .sp-name { font-size: 10px; }
  .improve-label { font-size: 11px; }
  .finding { font-size: 12px; }
  .metric { grid-template-columns: 100px minmax(0, 1fr); }
  .metric-name { font-size: 12px; }
  .improve-actions { padding: 18px 20px; }
  .canary { align-items: flex-start; font-size: 11px; }
  .canary-bar { flex-basis: 72px; margin-top: 7px; }
  #secrets .wrap { width: calc(100% - 24px); padding: 32px 24px; border-radius: 16px; }
  #secrets .section-head { margin-bottom: 28px; }
  .carry { gap: 14px; }
  .carry .term-body { padding: 20px 16px; font-size: 10px; line-height: 2.3; white-space: pre-wrap; overflow-wrap: anywhere; }
  .carry-arrow { width: 32px; height: 32px; }
  .rows { padding: 4px 16px 12px; }
  .rows div { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; font-size: 11px; }
  .rows dd { font-size: 10px; }
  .uses { grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: none; }
  .use { padding: 22px; gap: 20px; }
  .mini-code, .mini-site, .sched { min-height: 0; }
  .mini-code { padding: 22px 18px; font-size: 11px; }
  .mini-page { padding: 24px; }
  .mini-page .chat { max-width: 360px; }
  .mini-page .chat-body { font-size: 12px; }
  .sched-head { padding: 20px; font-size: 12px; }
  .sched-runs li { padding: 18px 20px; font-size: 12px; }
  .trace { padding: 20px 16px; border-radius: 12px; }
  .trace-id { font-size: 10px; gap: 8px; }
  .trace-meta { font-size: 10px; }
  .span, .trace-axis { grid-template-columns: 128px minmax(0, 1fr) 35px; gap: 8px; }
  .span { height: 30px; }
  .sp-name, .sp-dur { font-size: 10px; }
  .span.nested .sp-name { padding-left: 10px; }
  .trace-axis i { font-size: 9px; }
  .trace-axis i:nth-child(even) { visibility: visible; }
  .legend { gap: 12px 18px; font-size: 10px; padding-top: 18px; }
  .legend-note { width: 100%; margin-left: 0; }
  #pricing .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  #pricing .section-head { grid-column: 1; grid-row: auto; }
  #pricing h2 { max-width: none; font-size: 38px; }
  .prices, .price-note { grid-column: 1; }
  .prices { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 12px; }
  .price { padding: 22px 18px; gap: 24px; }
  .price h3 { font-size: 11px; }
  .price-num b { font-size: 46px; }
  .price-num span { font-size: 10px; }
  .price-note { font-size: 11px; margin-top: -8px; }
  #install { padding: 0 12px 40px; }
  #install .wrap { padding: 32px 24px; border-radius: 16px; gap: 28px; }
  #install h2 { font-size: 38px; }
  .tabs-window, .tabs-window[data-bui-component="CodeBlock"] { border-radius: 12px; }
  .tab-bar[data-bui-component="SegmentedControl"] { width: calc(100% - 24px); margin: 12px 12px 0; }
  .tab-bar[data-bui-component="SegmentedControl"] > [role="tab"] { font-size: 10px; padding-inline: 6px; }
  .tabs-window pre, .tabs-window[data-bui-component="CodeBlock"] > [role="tabpanel"] pre { padding: 20px 40px 20px 16px; font-size: 10px; }
  .tab-panel .copy { top: 18px; right: 10px; width: 25px; height: 25px; }
  .foot { padding-bottom: 28px; }
  .foot-row { padding-top: 24px; font-size: 10px; }
  .foot-links { order: 1; flex-basis: 100%; justify-content: flex-start; gap: 8px 16px; }
  .foot .brand-logo { height: 20px; }
}
@media (max-width: 380px) {
  .nav-actions .btn.primary { padding-inline: 12px; }
  .hero-grid { padding-inline: 20px; }
  .hero .cta-row { flex-direction: column; align-items: stretch; }
  h1 { font-size: var(--type-h1); }
  .prices { grid-template-columns: minmax(0, 1fr); }
  .price-num b { font-size: 56px; }
  .span, .trace-axis { grid-template-columns: 120px minmax(0, 1fr) 32px; gap: 6px; }
}
