:root {
  color-scheme: dark;
  --night: #07100f;
  --night-2: #0a1513;
  --panel: #0d1916;
  --panel-2: #12201c;
  --screen: #080e0d;
  --screen-2: #101816;
  --line: #2c3c37;
  --line-bright: #465c54;
  --text: #e5ede7;
  --strong: #f2f3ea;
  --soft: #b9c5bf;
  --muted: #91a19a;
  --warm: #e3a45f;
  --warm-light: #f0ba7b;
  --green: #8dc4aa;
  --blue: #8ebdca;
  --red: #e09289;
  --violet: #bca2d8;
  --mark: #a970ff;
  --hero-yellow: #f1c75b;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Liberation Mono", Menlo, Consolas, monospace;
  --content: 80rem;
  --frame-bar: 2rem;
  --modeline: 1.55rem;
  --keyline: 2.05rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; background: var(--night); scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  background: var(--night);
  color: var(--text);
  font: 1rem/1.55 var(--sans);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: .08em; }
button { color: inherit; font: inherit; }
code, pre, kbd, samp { font-family: var(--mono); }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }
::selection { background: var(--warm); color: var(--night); }

.shell { width: min(var(--content), calc(100% - 3rem)); min-width: 0; margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: .6rem;
  left: .6rem;
  padding: .75rem 1rem;
  background: var(--strong);
  color: var(--night);
  font: 750 .76rem/1 var(--mono);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header { position: relative; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(7, 16, 15, .97); }
.site-nav { min-height: 4.25rem; flex-wrap: wrap; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.brand { min-height: 2.9rem; display: inline-flex; align-items: center; gap: .62rem; color: var(--strong); font: 760 .94rem/1 var(--mono); text-decoration: none; }
.brand-emblem { position: relative; width: 2.2rem; height: 2.2rem; flex: 0 0 2.2rem; }
.brand-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.header-links { display: flex; align-items: center; gap: 0 clamp(.75rem, 2vw, 1.6rem); margin: 0; padding: 0; list-style: none; color: var(--soft); font: 660 .72rem/1 var(--mono); }
.header-links a { min-height: 2.8rem; display: inline-flex; align-items: center; text-decoration: none; }
.header-links a:hover, .header-links a:focus-visible { color: var(--warm); }

.hero {
  position: relative;
  isolation: isolate;
  padding: 0 0 clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(141, 196, 170, .038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 196, 170, .038) 1px, transparent 1px),
    var(--night);
  background-size: 3rem 3rem;
}
.hero-intro { min-height: clamp(13rem, 22vh, 15.5rem); display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(24rem, .82fr); align-items: center; gap: 2rem clamp(3rem, 7vw, 7rem); padding-block: 2.2rem; }
.hero-intro, .hero-frame-wrap { position: relative; z-index: 1; }
.hero-heading, .hero-side, .hero-frame-wrap, .frame-corners { min-width: 0; }
.hero-frame-wrap { margin-top: clamp(1rem, 1.7vw, 1.5rem); }
.eyebrow, .kicker { margin: 0; color: var(--green); font: 720 .67rem/1.35 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { margin-bottom: .8rem; }
h1 { max-width: 13ch; margin: 0; color: var(--strong); font-size: clamp(3rem, 5.5vw, 5.75rem); font-weight: 620; line-height: .94; letter-spacing: -.06em; text-wrap: balance; }
.hero-title-accent { color: var(--hero-yellow); }
.hero-side { align-self: center; }
.hero-deck { max-width: 36rem; margin: 0; color: var(--soft); font-size: clamp(.95rem, 1.25vw, 1.08rem); line-height: 1.62; }
.hero-deck kbd { color: var(--warm-light); font-size: .82em; }
.hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: .55rem; margin-top: 1.15rem; }
.runtime-action, .install-copy { min-width: 0; min-height: 3.65rem; border: 1px solid var(--line-bright); }
.runtime-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .16rem .9rem; align-items: center; padding: .62rem .75rem; text-decoration: none; }
.runtime-action.primary-action { border-color: var(--warm); background: var(--warm); color: #11130f; }
.runtime-action:hover { border-color: var(--warm-light); background: var(--warm-light); }
.runtime-action .action-label, .install-copy .action-label { font: 780 .61rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.runtime-action strong { grid-column: 1; font-size: .82rem; line-height: 1.25; }
.action-arrow { grid-column: 2; grid-row: 1 / 3; font: 820 1rem/1 var(--mono); }
.install-copy { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .9rem; padding: .58rem .72rem; appearance: none; background: var(--panel); color: var(--strong); text-align: left; cursor: pointer; }
.install-copy:hover { border-color: var(--warm); background: var(--panel-2); }
.install-copy .action-label { color: var(--green); }
.install-copy code { grid-column: 1; min-width: 0; overflow: hidden; font-size: clamp(.64rem, .86vw, .74rem); text-overflow: ellipsis; white-space: nowrap; }
.copy-label { grid-column: 2; grid-row: 1 / 3; align-self: center; padding-left: .72rem; border-left: 1px solid var(--line-bright); color: var(--warm-light); font: 780 .63rem/1 var(--mono); }
.install-copy.copy-failed { grid-template-columns: minmax(0, 1fr); }
.copy-failed .copy-label { grid-column: 1; grid-row: 3; padding: .4rem 0 0; border: 0; }
.secondary-action { min-width: 0; min-height: 2.35rem; display: inline-flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .35rem .12rem; color: var(--soft); font: 720 .68rem/1.2 var(--mono); text-decoration: none; }
.secondary-action span { color: var(--warm); }
.secondary-action:hover { color: var(--warm-light); }
.frame-corners { position: relative; }
.frame-corners::before, .frame-corners::after { position: absolute; z-index: 4; width: 1.35rem; height: 1.35rem; pointer-events: none; content: ""; }
.frame-corners::before { top: -.35rem; left: -.35rem; border-top: 2px solid var(--warm); border-left: 2px solid var(--warm); }
.frame-corners::after { right: -.35rem; bottom: -.35rem; border-right: 2px solid var(--warm); border-bottom: 2px solid var(--warm); }
.hero-emacs { height: clamp(35rem, 66vh, 45rem); }
.frame-underbar { min-height: 2.8rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding: .55rem .15rem 0; color: var(--muted); font: .66rem/1.4 var(--mono); }
.frame-underbar p { margin: 0; }
.frame-underbar kbd { color: var(--warm); font-weight: 800; }
.replay-button { min-height: 2.5rem; display: none; align-items: center; padding: .45rem .75rem; border: 1px solid var(--line); background: var(--night-2); color: var(--soft); font: 690 .64rem/1 var(--mono); cursor: pointer; }
.enhanced .replay-button { display: inline-flex; }
.replay-button:disabled { color: #66736d; cursor: default; }
.replay-button:hover:not(:disabled) { border-color: var(--warm); color: var(--warm-light); }

/* Dither Field: a transparent hero background behind the real content. */
.dither-field {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(27rem, 54svh, 38rem);
  overflow: hidden;
  contain: strict;
  pointer-events: none;
}
.field-static, #field-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.field-static { z-index: 1; opacity: var(--hero-poster-field-gain, .12); transition: opacity 520ms ease; }
.hero-mark-seat { opacity: var(--hero-poster-gain, .24); transition: opacity 520ms ease; }
.field-static-mark { width: 100%; height: 100%; max-width: none; }
#field-canvas { z-index: 2; opacity: 0; pointer-events: none; transition: opacity 520ms ease; }
.hero.field-live #field-canvas { opacity: 1; }
.hero.field-live .field-static, .hero.field-live .hero-mark-seat { opacity: 0; }
.dither-field::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(238,242,232,.045) 0 1px, transparent 1px 4px);
  opacity: .46;
  pointer-events: none;
  content: "";
}

.emacs-frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #020504;
  background: var(--screen);
  box-shadow: .75rem .75rem 0 rgba(10, 21, 19, .76);
  color: #dbe4dd;
  font: clamp(.63rem, .77vw, .74rem)/1.42 var(--mono);
  contain: layout paint;
}
.frame-bar { height: var(--frame-bar); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .75rem; padding: .35rem .72rem; overflow: hidden; border-bottom: 1px solid #35463f; background: #16221e; color: #aab8b1; font-size: .66rem; white-space: nowrap; }
.frame-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.frame-bar > span:nth-child(2) { text-align: center; }
.frame-bar > strong { color: var(--warm-light); font-size: .64rem; font-weight: 730; text-align: right; }
.frame-bar i { width: .42rem; height: .42rem; display: inline-block; margin-right: .45rem; border: 1px solid var(--green); background: var(--green); transform: rotate(45deg); }
.live-layout, .menu-layout, .browser-layout { height: calc(100% - var(--frame-bar)); min-height: 0; }
.live-layout { display: grid; grid-template-rows: minmax(0, 1fr) 8rem var(--keyline); }
.chat-stack { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) var(--modeline); overflow: hidden; }
.chat-buffer { min-height: 0; padding: .72rem .9rem; overflow: auto; scrollbar-color: var(--line-bright) var(--screen); }
.chat-sliver-head { display: none; align-items: center; justify-content: space-between; gap: 1rem; height: 1.65rem; margin-bottom: .2rem; color: var(--muted); font-size: .62rem; }
.turn { overflow: hidden; }
.user-turn { min-height: 3.15rem; }
.assistant-turn { min-height: 4rem; }
.role-label { margin: 0 0 .2rem; font-size: .64rem; font-weight: 800; letter-spacing: .04em; }
.role-you { color: var(--blue); }
.role-assistant { color: var(--warm-light); }
.turn-copy, .menu-chat-copy p { margin: 0; color: #dfe6e1; }
.typed-slot { overflow: hidden; }
.thinking { min-height: 2.9rem; margin: 0; padding: .22rem .1rem .22rem .72rem; overflow: hidden; border-left: 2px solid #64736d; color: #aebbb5; font-style: italic; }
.tool-region { height: 8.6rem; margin: .35rem -.9rem .35rem; padding: .42rem .9rem .5rem; overflow: hidden; border-top: 1px solid #46564f; border-bottom: 1px solid #46564f; background: #12151a; }
.tool-head { height: 1.65rem; display: flex; align-items: center; gap: .65rem; min-width: 0; color: var(--violet); }
.tool-head > span { font-size: .61rem; font-weight: 820; letter-spacing: .08em; }
.tool-head code { min-width: 0; overflow: hidden; color: #d9dee1; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tool-head small { margin-left: auto; color: var(--green); font-size: .62rem; }
.diff-row { min-width: 0; height: 1.48rem; display: grid; grid-template-columns: 1.1rem 2.4rem minmax(0, 1fr); align-items: center; gap: .32rem; padding: 0 .35rem; overflow: hidden; white-space: pre; }
.diff-row > b { color: #84918b; font-weight: 520; text-align: right; user-select: none; }
.diff-row code { min-width: 0; overflow: hidden; text-overflow: clip; }
.diff-row.removed { background: #2b1818; color: var(--red); }
.diff-row.added { grid-template-columns: 1.1rem 2.4rem minmax(0, 1fr) auto; background: #12271a; color: #a2d5b3; box-shadow: inset 3px 0 var(--warm); }
.ret-button { position: relative; min-height: 1.45rem; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .2rem .42rem; border: 1px solid var(--warm); background: var(--warm); color: #17120b; font: 840 .61rem/1 var(--mono); cursor: pointer; white-space: nowrap; }
.ret-button::after { position: absolute; inset: -.18rem; border: 1px solid var(--warm-light); opacity: 0; pointer-events: none; content: ""; }
.ret-button small { font-size: .56rem; }
.ret-button:hover { background: var(--warm-light); border-color: var(--warm-light); }
.ret-button[aria-pressed="true"] { background: var(--mark); border-color: #c59cff; color: #0b0710; }
.ret-button.ret-pulse { animation: ret-bump 430ms ease-out; }
.ret-button.ret-pulse::after { animation: ret-ring 430ms ease-out; }
@keyframes ret-bump { 45% { transform: scale(1.12); } }
@keyframes ret-ring { 35% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
.assistant-result { min-height: 2.35rem; margin: .2rem 0 0; overflow: hidden; color: #afbbb5; }
.type-frame.typing .type-reveal:not(.shown) { visibility: hidden; opacity: 0; }
.type-frame .type-reveal { transition: opacity 140ms ease; }
.modeline { height: var(--modeline); min-width: 0; display: flex; align-items: center; gap: .65rem; padding: .2rem .55rem; overflow: hidden; font-size: .62rem; font-weight: 730; line-height: 1; white-space: nowrap; }
.modeline strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.modeline span:nth-last-child(2) { margin-left: auto; }
.modeline.inactive { background: #74827b; color: #07100d; }
.modeline.active { background: #d7a25f; color: #171209; }
.input-window, .menu-input { min-height: 0; display: grid; grid-template-rows: 1.8rem minmax(0, 1fr) var(--modeline); border-top: 1px solid #050807; }
.input-header { min-width: 0; display: flex; align-items: center; gap: .55rem; padding: .25rem .65rem; overflow: hidden; border-bottom: 1px solid #35443e; background: var(--screen-2); color: #95a39c; font-size: .62rem; white-space: nowrap; }
.input-header strong { min-width: 0; overflow: hidden; color: var(--green); text-overflow: ellipsis; }
.input-header span:nth-last-child(3) { color: var(--warm-light); }
.input-buffer { min-height: 0; padding: .55rem .7rem; overflow: hidden; background: #0b1210; color: #e1e8e2; }
.block-cursor { width: .62em; height: 1.08em; display: inline-block; margin-left: .12em; background: var(--warm); vertical-align: -.2em; animation: cursor-blink 1.2s steps(1, end) infinite; }
.type-frame.typing .block-cursor { animation: none; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.keyline { height: var(--keyline); min-width: 0; display: flex; align-items: center; gap: .35rem 1rem; padding: .36rem .68rem; overflow: hidden; border-top: 1px solid #35443e; background: #111a18; color: #91a099; font-size: .6rem; white-space: nowrap; }
.keyline kbd { color: var(--warm-light); font-weight: 780; }
.keyline-file { display: none; color: var(--warm-light); }
.file-window { display: none; min-height: 0; grid-template-rows: 1.7rem minmax(0, 1fr) var(--modeline); overflow: hidden; border-top: 1px solid var(--line-bright); background: #090f0e; }
.file-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .28rem .62rem; overflow: hidden; background: #131c1a; color: var(--soft); font-size: .61rem; white-space: nowrap; }
.file-head span:last-child { color: var(--warm-light); }
.file-code { min-height: 0; padding: .36rem 0; overflow: auto; font-size: .66rem; line-height: 1.63; scrollbar-color: var(--line-bright) var(--screen); }
.file-code > div { position: relative; min-width: 36rem; display: grid; grid-template-columns: 3.4rem minmax(max-content, 1fr); padding: 0 .65rem; }
.file-code b { padding-right: .85rem; color: #77867f; font-weight: 520; text-align: right; user-select: none; }
.file-code .point-line { background: #1b3524; color: #b8e2c5; box-shadow: inset 3px 0 var(--warm); }
.point-line i { position: absolute; top: .12rem; bottom: .12rem; left: 3.35rem; width: .16rem; background: var(--warm-light); }
.file-open .chat-stack { grid-template-rows: 30% minmax(0, 1fr); }
.file-open .chat-stack > .modeline.inactive { display: none; }
.file-open .file-window { display: grid; animation: file-in 260ms ease-out both; }
@keyframes file-in { from { opacity: 0; transform: translateY(.4rem); } }
.file-open .chat-sliver-head { display: flex; }
.file-open .chat-buffer { padding-block: .35rem; cursor: pointer; }
.file-open .chat-buffer .turn { min-height: 1.65rem; display: flex; align-items: baseline; gap: .55rem; white-space: nowrap; }
.file-open .chat-buffer .role-label { flex: 0 0 auto; margin: 0; }
.file-open .chat-buffer .turn-copy, .file-open .chat-buffer .thinking { min-height: 0; padding: 0; overflow: hidden; border: 0; text-overflow: ellipsis; white-space: nowrap; }
.file-open .chat-buffer .tool-region, .file-open .chat-buffer .assistant-result { display: none; }
.file-open .keyline-default { display: none; }
.file-open .keyline-file { display: inline; }
.file-open .input-window .modeline.active { background: #74827b; color: #07100d; }

.frame-view { position: absolute; inset: var(--frame-bar) 0 0; min-width: 0; overflow: hidden; }
.frame-view:not(.is-active) { display: none; }
.frame-view .live-layout, .frame-view .menu-layout, .frame-view .browser-layout { height: 100%; }
.menu-layout { display: grid; grid-template-rows: 5rem 7rem minmax(0, 1fr) var(--keyline); }
.menu-chat { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) var(--modeline); overflow: hidden; }
.menu-chat-copy { padding: .46rem .72rem; overflow: hidden; }
.menu-chat-copy .role-label { margin-bottom: .12rem; }
.transient-window { min-height: 0; overflow: auto; border-top: 1px solid #50505a; background: #161419; scrollbar-color: var(--line-bright) var(--screen); }
.transient-head { min-height: 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .3rem .68rem; border-bottom: 1px solid #403d45; color: #abb6b0; font-size: .61rem; white-space: nowrap; }
.transient-head span:first-child { color: var(--violet); }
.transient-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem 1.15rem; padding: .55rem .72rem .7rem; }
.transient-grid section { min-width: 0; }
.transient-grid h4 { margin: 0 0 .24rem; color: var(--warm-light); font: 760 .64rem/1.25 var(--mono); }
.transient-grid p { margin: .06rem 0; color: #d1d8d3; font-size: .63rem; line-height: 1.35; white-space: nowrap; }
.transient-grid kbd { min-width: 3.6ch; display: inline-block; color: var(--violet); font-weight: 800; }
.browser-layout { display: grid; grid-template-rows: 2.15rem minmax(0, 1fr) var(--modeline) var(--keyline); }
.browser-header { min-width: 0; padding: .53rem .72rem; overflow: hidden; border-bottom: 1px solid #3c4c46; background: #141e1b; color: var(--green); font-size: .66rem; white-space: nowrap; text-overflow: ellipsis; }
.browser-buffer, .tree-buffer { min-height: 0; padding: .7rem .65rem; overflow: auto; scrollbar-color: var(--line-bright) var(--screen); }
.session-row { min-width: 37rem; height: 2.15rem; display: grid; grid-template-columns: minmax(0, 1fr) 9ch; align-items: center; gap: 1rem; padding: .2rem .65rem; border-left: 3px solid transparent; }
.session-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-row small { color: #93a099; font-size: .62rem; text-align: right; white-space: nowrap; }
.session-row.child { color: #b9c5bf; }
.session-row.child span { padding-left: 2ch; }
.session-row.selected { border-left-color: var(--warm); background: #18271f; color: var(--strong); }
.tree-buffer { padding-inline: .45rem; font-variant-ligatures: none; }
.tree-row { position: relative; width: max-content; min-width: 100%; height: 1.72rem; display: flex; align-items: center; padding: 0 .62rem; border-left: 3px solid transparent; white-space: pre; }
.tree-row.selected { border-left-color: var(--warm); background: #18271f; }
.tree-guide { width: 3ch; flex: 0 0 3ch; color: var(--warm-light); }
.tree-active { width: 2ch; flex: 0 0 2ch; color: var(--warm-light); }
.tree-row b { width: 7ch; flex: 0 0 7ch; color: var(--blue); font-weight: 650; }
.tree-row b:nth-child(3) { text-align: left; }
.tree-row > span:nth-child(4) { color: #d9e1db; }
.tree-row em { margin-left: auto; padding-left: 2ch; color: var(--green); font-style: normal; }
.stage-announcement { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.provider-strip { padding: 1.1rem 0 1.2rem; overflow: hidden; border-bottom: 1px solid var(--line); background: #091210; }
.provider-copy {
  min-height: 2.75rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "title intro compatibility control";
  align-items: center;
  gap: .45rem clamp(.8rem, 2vw, 1.75rem);
  margin-bottom: .68rem;
}
.provider-copy h2 { grid-area: title; margin: 0; color: var(--text); font: 720 .69rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.provider-copy p { grid-area: intro; margin: 0; color: var(--muted); font-size: .76rem; text-align: right; }
.provider-compatibility { grid-area: compatibility; margin: 0; }
.provider-compatibility > div { display: inline-flex; align-items: baseline; gap: .5rem; white-space: nowrap; }
.provider-compatibility dt { color: #8c9993; font: 650 .625rem/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.provider-compatibility dd { margin: 0; color: #adb8b3; font: 650 .625rem/1.3 var(--mono); }
.provider-toggle {
  grid-area: control;
  min-width: 4.25rem;
  min-height: 2.75rem;
  padding: 0 .65rem;
  border: 1px solid #40504a;
  background: #0c1614;
  color: #adb8b3;
  font: 650 .625rem/1 var(--mono);
  cursor: pointer;
}
.provider-toggle:hover, .provider-toggle:focus-visible { border-color: var(--green); color: var(--text); }
.provider-rail { position: relative; width: 100%; min-height: 5.125rem; overflow: visible; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.provider-layer { overflow: visible; }
.provider-track { width: 100%; transform: none; animation: none; will-change: auto; }
.provider-group { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0; padding: .25rem 0; list-style: none; }
.provider-group[data-loop-clone] { display: none; }
.provider-group li {
  min-height: 4.5rem;
  display: grid;
  grid-template-columns: 2.5rem auto;
  align-items: center;
  column-gap: .9375rem;
  padding: .375rem 1.0625rem;
  border: 1px solid #34433e;
  background: #0c1614;
  color: #9ca8a2;
  font: 650 .71875rem/1 var(--mono);
  white-space: nowrap;
}
.provider-mark { position: relative; width: 2.5rem; height: 2.5rem; display: block; }
.provider-mark img { position: absolute; top: 50%; left: 50%; display: block; max-width: none; height: auto; transform: translate(-50%, -50%); }
.mark-anthropic { width: 30px; }
.mark-openai { width: 48px; height: 48px !important; }
.mark-google { width: 69px; height: 69px !important; }
.mark-bedrock { width: 25px; height: 25px !important; }
.mark-openrouter, .mark-deepseek { width: 29px; }
.mark-zai { width: 25px; height: 25px !important; }
.provider-color-layer { display: none; pointer-events: none; }
.enhanced .provider-rail[data-motion-mode="animated"] { height: 5.125rem; overflow: hidden; }
.enhanced .provider-rail[data-motion-mode="animated"] .provider-layer { position: absolute; inset: 0; overflow: hidden; }
.enhanced .provider-rail[data-motion-mode="animated"] .provider-track {
  width: max-content;
  height: 100%;
  display: flex;
  transform: translate3d(0, 0, 0);
  animation: provider-drift var(--provider-duration, 52s) linear infinite;
}
.enhanced .provider-rail[data-motion-mode="animated"] .provider-group { width: auto; height: 100%; flex: 0 0 auto; flex-wrap: nowrap; padding: .25rem .75rem .25rem 0; }
.enhanced .provider-rail[data-motion-mode="animated"] .provider-group[data-loop-clone] { display: flex; }
.enhanced .provider-rail[data-motion-mode="animated"][data-paused="false"] .provider-track { will-change: transform; }
.enhanced .provider-rail[data-motion-mode="animated"][data-paused="true"] .provider-track { animation-play-state: paused; will-change: auto; }
.enhanced .provider-rail[data-motion-mode="animated"] .provider-base-layer img { filter: grayscale(1) saturate(0) contrast(.9) brightness(.82); opacity: .82; }
@supports ((mask-image: linear-gradient(90deg, transparent, #000)) or (-webkit-mask-image: linear-gradient(90deg, transparent, #000))) {
  .enhanced .provider-rail[data-motion-mode="animated"] .provider-color-layer {
    z-index: 2;
    display: block;
    -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - 150px), #000 calc(50% - 84px), #000 calc(50% + 84px), transparent calc(50% + 150px));
    mask-image: linear-gradient(90deg, transparent calc(50% - 150px), #000 calc(50% - 84px), #000 calc(50% + 84px), transparent calc(50% + 150px));
  }
}
@keyframes provider-drift { to { transform: translate3d(var(--provider-travel, -1105.125px), 0, 0); } }

.tour-section, .boundary-section, .install-section { padding: clamp(4.5rem, 8vw, 7.5rem) 0; border-bottom: 1px solid var(--line); }
.tour-section { background: linear-gradient(90deg, transparent calc(50% - .5px), rgba(141,196,170,.04) 50%, transparent calc(50% + .5px)); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, .5fr); align-items: end; gap: 1rem 4rem; margin-bottom: 2.2rem; }
.section-heading h2 { max-width: 18ch; margin: .55rem 0 0; color: var(--strong); font-size: clamp(2.5rem, 5vw, 4.75rem); font-weight: 590; line-height: .98; letter-spacing: -.052em; text-wrap: balance; }
.section-heading > p { margin: 0; padding-top: .8rem; border-top: 1px solid var(--line-bright); color: var(--muted); font: .76rem/1.55 var(--mono); }
.view-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.5rem; border: 1px solid var(--line-bright); background: var(--night-2); }
.view-tabs a { min-width: 0; min-height: 3.4rem; display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; border-right: 1px solid var(--line); color: var(--muted); font: 720 .7rem/1.2 var(--mono); text-decoration: none; }
.view-tabs a:last-child { border-right: 0; }
.view-tabs a span { color: #75847d; font-size: .6rem; }
.view-tabs a:hover { background: var(--panel-2); color: var(--text); }
.view-tabs a[aria-selected="true"] { background: var(--panel); color: var(--strong); box-shadow: inset 0 2px var(--warm); }
.view-tabs a[aria-selected="true"] span { color: var(--warm-light); }
.desktop-stage { display: none; min-width: 0; }
.step-column { min-width: 0; }
.view-step { min-width: 0; margin-bottom: 2.5rem; scroll-margin-top: 5rem; }
.step-copy { position: relative; padding: 1.15rem 1.1rem 1.25rem; border: 1px solid var(--line-bright); border-bottom: 0; background: var(--panel); }
.step-copy > span { color: var(--green); font: 720 .62rem/1.2 var(--mono); letter-spacing: .09em; }
.step-copy h3 { margin: .45rem 0 .1rem; color: var(--strong); font-size: clamp(1.55rem, 4vw, 2.25rem); font-weight: 620; line-height: 1.1; letter-spacing: -.035em; }
.step-copy p { margin: 0; color: var(--soft); }
.step-copy strong { display: block; margin-top: .75rem; color: var(--warm-light); font: 690 .73rem/1.5 var(--mono); }
.step-copy strong kbd { font-weight: 850; }
.mobile-frame { min-width: 0; }
.compact-frame { height: clamp(19rem, 50svh, 30rem); box-shadow: .55rem .55rem 0 rgba(10,21,19,.72); }

.boundary-section { background: #091210; }
.ownership-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-bright); border-left: 1px solid var(--line-bright); }
.ownership-grid > section { min-width: 0; padding: 1.45rem; border-right: 1px solid var(--line-bright); border-bottom: 1px solid var(--line-bright); }
.ownership-grid h3 { display: flex; align-items: baseline; gap: .8rem; margin: 0 0 .75rem; color: var(--strong); font-size: 1rem; }
.ownership-grid h3 span { color: var(--warm-light); font: 780 .64rem/1 var(--mono); letter-spacing: .09em; }
.ownership-grid ul { margin: 0; padding: 0; color: var(--soft); list-style: none; }
.ownership-grid li { padding: .58rem 0; border-top: 1px solid var(--line); font-size: .82rem; }
.ownership-grid li::before { margin-right: .7rem; color: var(--green); content: "/"; }
.boundary-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--line-bright); }
.boundary-notes article { min-width: 0; padding: 1.15rem; border-right: 1px solid var(--line-bright); border-bottom: 1px solid var(--line-bright); }
.boundary-notes h3 { margin: 0 0 .45rem; color: var(--green); font: 740 .66rem/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.boundary-notes p { margin: 0; color: var(--muted); font-size: .73rem; line-height: 1.58; }
.boundary-notes code { color: var(--text); }
.boundary-notes ul { margin: .45rem 0 0; padding: 0; color: var(--muted); font-size: .73rem; line-height: 1.58; list-style: none; }
.boundary-notes li { padding: .5rem 0; border-top: 1px solid var(--line); }
.boundary-notes li:first-child { border-top: 0; padding-top: 0; }
.boundary-notes li:last-child { padding-bottom: 0; }
.boundary-notes li kbd { color: var(--text); font-weight: 700; }

.install-section { background: var(--night-2); }
.install-layout { min-width: 0; display: grid; gap: 1rem; }
.install-main { min-width: 0; }
.install-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--line-bright); border-left: 1px solid var(--line-bright); list-style: none; counter-reset: none; }
.install-steps > li { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; padding: 1.25rem; border-right: 1px solid var(--line-bright); border-bottom: 1px solid var(--line-bright); }
.step-number { color: var(--warm-light); font: 760 .65rem/1.5 var(--mono); }
.install-steps h3 { margin: 0 0 .65rem; color: var(--strong); font-size: 1rem; }
.install-steps pre, .git-aside pre { margin: 0; padding: .85rem; overflow-x: auto; border: 1px solid var(--line); background: var(--night); color: var(--text); font-size: clamp(.68rem, .9vw, .78rem); line-height: 1.55; }
.install-steps p { margin: .65rem 0 0; color: var(--muted); font-size: .75rem; }
.install-steps p code { color: var(--warm-light); }
.install-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1rem 1.2rem; border-right: 1px solid var(--line-bright); border-bottom: 1px solid var(--line-bright); border-left: 1px solid var(--line-bright); background: var(--panel); font: .72rem/1.5 var(--mono); }
.install-meta p { margin: 0; color: var(--soft); }
.install-meta strong { margin-right: .7rem; color: var(--warm-light); }
.demo-link { min-height: 2.75rem; display: inline-flex; align-items: center; color: var(--text); white-space: nowrap; }
.demo-link:hover { color: var(--warm-light); }
.git-aside { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1rem; margin: 0; padding: 1rem 1.2rem; border: 1px solid var(--line); background: #0b1513; }
.git-aside h3 { margin: .35rem 0 0; color: var(--strong); font-size: 1rem; }
.git-aside p { margin: 0 0 .35rem; color: var(--muted); font: .63rem/1.3 var(--mono); }
.git-aside pre + pre { margin-top: .6rem; }
.git-aside .git-lead { margin: .55rem 0 0; font-size: .72rem; line-height: 1.5; }
.git-note { grid-column: 1 / -1; margin: 0; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--muted); font: .63rem/1.5 var(--mono); }
.git-note code { color: var(--warm-light); }

.bottom-nav { padding: clamp(3.5rem, 7vw, 6rem) 0; background: #080f0e; }
.bottom-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-bright); border-left: 1px solid var(--line-bright); }
.bottom-grid nav { min-width: 0; display: flex; flex-direction: column; padding: 1.25rem; border-right: 1px solid var(--line-bright); border-bottom: 1px solid var(--line-bright); }
.bottom-grid h2 { margin: 0 0 1rem; color: var(--green); font: 740 .66rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.bottom-grid a { min-height: 2.75rem; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--strong); font-size: .9rem; text-decoration: none; }
.bottom-grid a::after { color: var(--warm); font: .7rem/1 var(--mono); content: "↗"; }
.bottom-grid a:hover { color: var(--warm-light); }
.site-footer { padding: 1.35rem 0; border-top: 1px solid var(--line); background: #050b0a; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; color: var(--muted); font: .68rem/1.5 var(--mono); }
.footer-row p { margin: 0; }
.footer-brand { color: var(--strong); font-weight: 780; text-decoration: none; }
.footer-row a:hover { color: var(--warm-light); }

@media (max-width: 69.99rem) {
  #view-menu .compact-frame { height: clamp(31rem, 64svh, 34rem); }
  .install-steps pre, .git-aside pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}

@media (min-width: 64rem) {
  /* Preserve the four-line desktop deck footprint. */
  .hero-deck { min-height: 4lh; }
  .boundary-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boundary-notes article:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(10rem, .26fr) minmax(0, 1fr); align-items: start; gap: 1rem 2rem; }
  .boundary-notes article:last-child h3 { margin: 0; }
}

@media (min-width: 70rem) {
  .install-layout { grid-template-columns: minmax(0, .94fr) minmax(32rem, 1.06fr); align-items: stretch; }
  .install-steps { grid-template-columns: minmax(0, 1fr); }
  .git-aside { height: 100%; }
}

@media (min-width: 64rem) and (min-height: 40rem) {
  .enhanced .view-tabs { position: sticky; z-index: 20; top: 0; }
  .enhanced .unfold-grid { display: grid; grid-template-columns: minmax(0, 58fr) minmax(20rem, 42fr); align-items: start; gap: clamp(2rem, 4vw, 4rem); }
  .enhanced .desktop-stage { position: sticky; top: 5rem; display: block; }
  .enhanced .stage-frame { height: clamp(31rem, calc(100svh - 6rem), 42rem); }
  .enhanced .mobile-frame { display: none; }
  .enhanced .view-step { min-height: 72svh; display: flex; align-items: center; margin: 0; }
  .enhanced .step-copy { width: 100%; padding: 1.4rem 1.35rem 1.5rem; border-bottom: 1px solid var(--line-bright); background: rgba(13,25,22,.72); transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
  .enhanced .view-step.is-active .step-copy { border-color: var(--warm); background: var(--panel-2); transform: translateX(-.35rem); box-shadow: inset 3px 0 var(--warm); }
  .enhanced .step-copy h3 { font-size: clamp(1.8rem, 2.8vw, 2.65rem); }
}

@media (max-width: 63.99rem) {
  .hero-intro { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 1.4rem; padding-block: 2.7rem 2.2rem; }
  h1 { max-width: 13ch; font-size: clamp(3.35rem, 8vw, 5.4rem); }
  .hero-side { max-width: 45rem; }
  .hero-emacs { height: clamp(30rem, 62svh, 38rem); }
  .section-heading { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .section-heading > p { max-width: 34rem; }
  .boundary-notes { grid-template-columns: minmax(0, 1fr); }
  .install-steps { grid-template-columns: minmax(0, 1fr); }
  .view-step { margin-bottom: 2.5rem; }
}

@media (min-width: 47.01rem) and (max-width: 56rem) {
  .provider-copy {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "title intro control"
      "title compatibility control";
    gap: .15rem 1rem;
  }
  .provider-compatibility { justify-self: end; }
}

@media (max-width: 47rem) {
  .shell { width: min(var(--content), calc(100% - 2rem)); }
  .site-nav { min-height: 4rem; }
  .header-links { gap: 0 .8rem; font-size: .68rem; }
  .header-links li:first-child { display: none; }
  .hero-intro { padding-top: 2.25rem; }
  h1 { font-size: clamp(3rem, 12vw, 4.6rem); }
  .secondary-action { justify-content: space-between; min-height: 3rem; }
  .hero-emacs { height: clamp(28rem, 61svh, 34rem); }
  .dither-field { height: clamp(21rem, 46svh, 27rem); }
  .frame-underbar { align-items: flex-start; }
  .frame-underbar p { max-width: 28rem; }
  .emacs-frame { font-size: .65rem; box-shadow: .45rem .45rem 0 rgba(10,21,19,.72); }
  .frame-bar { font-size: .61rem; }
  .frame-bar > span:nth-child(2) { display: none; }
  .frame-bar { grid-template-columns: minmax(0,1fr) auto; }
  .live-layout { grid-template-rows: minmax(0, 1fr) 7.4rem var(--keyline); }
  .chat-buffer { padding-inline: .65rem; }
  .tool-region { margin-inline: -.65rem; padding-inline: .65rem; }
  .diff-row { gap: .2rem; padding-inline: .22rem; }
  .diff-row, .diff-row.added { grid-template-columns: .8rem 2rem minmax(0,1fr); }
  .diff-row.added { grid-template-columns: .8rem 2rem minmax(0,1fr) auto; }
  .ret-button { padding-inline: .32rem; }
  .ret-button small { display: none; }
  .input-header { gap: .38rem; font-size: .58rem; }
  .modeline { gap: .4rem; font-size: .58rem; }
  .keyline { font-size: .56rem; }
  .menu-layout { grid-template-rows: 4.7rem 6.6rem minmax(0,1fr) var(--keyline); }
  .transient-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem .8rem; }
  .transient-head span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .provider-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title control"
      "intro intro"
      "compatibility compatibility";
    gap: .3rem .75rem;
  }
  .provider-copy p { margin-top: .05rem; text-align: left; }
  .provider-compatibility { margin-top: .08rem; }
  @supports ((mask-image: linear-gradient(90deg, transparent, #000)) or (-webkit-mask-image: linear-gradient(90deg, transparent, #000))) {
    .enhanced .provider-rail[data-motion-mode="animated"] .provider-color-layer {
      -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - 104px), #000 calc(50% - 54px), #000 calc(50% + 54px), transparent calc(50% + 104px));
      mask-image: linear-gradient(90deg, transparent calc(50% - 104px), #000 calc(50% - 54px), #000 calc(50% + 54px), transparent calc(50% + 104px));
    }
  }
  .view-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .view-tabs a:nth-child(2) { border-right: 0; }
  .view-tabs a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .view-tabs a { min-height: 3.1rem; }
  .tour-section, .boundary-section, .install-section { padding-block: 4rem; }
  .section-heading h2 { font-size: clamp(2.55rem, 11vw, 4rem); }
  .ownership-grid, .install-steps, .bottom-grid { grid-template-columns: minmax(0,1fr); }
  .install-meta { align-items: flex-start; flex-direction: column; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 31rem) {
  .shell { width: min(var(--content), calc(100% - 1.5rem)); }
  .brand { font-size: .84rem; }
  .brand-emblem { width: 2rem; height: 2rem; flex-basis: 2rem; }
  .header-links { gap: 0 .6rem; font-size: .64rem; }
  .header-links li:nth-child(3) { display: none; }
  h1 { font-size: clamp(2.7rem, 14vw, 3.6rem); }
  .hero-deck { font-size: .92rem; }
  .install-copy code { font-size: .59rem; }
  .hero-emacs { height: clamp(26rem, 59svh, 31rem); }
  .frame-underbar p { font-size: .6rem; }
  .emacs-frame { font-size: .6rem; }
  .frame-bar { padding-inline: .5rem; }
  .user-turn { min-height: 2.8rem; }
  .assistant-turn { min-height: 3.6rem; }
  .thinking { min-height: 2.5rem; }
  .tool-region { height: 8rem; }
  .tool-head { gap: .4rem; }
  .tool-head small { display: none; }
  .diff-row { font-size: .56rem; }
  .modeline span:nth-last-child(2) { display: none; }
  .input-header span:nth-last-child(1), .input-header span:nth-last-child(2) { display: none; }
  .keyline { padding-inline: .45rem; text-overflow: ellipsis; }
  .transient-grid { gap: .5rem .45rem; padding-inline: .5rem; }
  .transient-grid p { font-size: .61rem; line-height: 1.4; }
  .browser-header { font-size: .59rem; }
  .session-row { min-width: 0; grid-template-columns: minmax(0, 1fr) 7ch; gap: .45rem; padding-inline: .45rem; }
  .session-row.child span { padding-left: 1ch; }
  .tree-row { width: 100%; min-width: 0; padding-inline: .35rem; }
  .tree-row > span:nth-child(4) { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .tree-row em { flex: 0 0 auto; margin-left: .5rem; padding-left: 0; }
  .ownership-grid > section, .install-steps > li, .bottom-grid nav { padding: 1rem; }
}

@media (max-height: 39.99rem) {
  .hero-emacs { height: min(30rem, 72svh); }
  .compact-frame { height: min(27rem, 50svh); }
}

@media (max-width: 63.99rem) {
  .file-open .live-layout { grid-template-rows: minmax(0,1fr) var(--keyline); }
  .file-open .input-window { display: none; }
  .file-open .chat-stack { grid-template-rows: minmax(0,1fr); }
  .file-open .chat-buffer, .file-open .chat-stack > .modeline.inactive { display: none; }
  .file-open .file-window { grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  #field-canvas, .replay-button { display: none !important; }
  .dither-field { cursor: default; }
  .dither-field .field-static { opacity: var(--hero-poster-field-gain, .12) !important; transition: none !important; }
  .hero-mark-seat { opacity: var(--hero-poster-gain, .24) !important; transition: none !important; }
  .dither-field::after { opacity: .24; }
  .provider-rail { height: auto !important; overflow: visible !important; }
  .provider-layer { position: static !important; display: block; overflow: visible; }
  .provider-color-layer, .provider-toggle { display: none !important; }
  .provider-track { width: 100%; height: auto; display: block; transform: none; animation: none !important; will-change: auto; }
  .provider-group { width: 100%; height: auto; flex-wrap: wrap; padding-right: 0; }
  .provider-group[data-loop-clone] { display: none !important; }
  .provider-base-layer img { filter: none !important; opacity: 1 !important; }
  .type-frame .type-reveal { visibility: visible !important; opacity: 1 !important; }
  .block-cursor { opacity: 1; animation: none !important; }
  .ret-button { transform: none !important; box-shadow: none !important; }
}

@media (prefers-contrast: more) {
  :root { --muted: #b0bdb7; --line: #536860; --line-bright: #788d85; }
  .emacs-frame, .view-tabs, .ownership-grid, .bottom-grid { border-width: 2px; }
}

@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .emacs-frame, .view-tabs, .ownership-grid, .install-steps, .bottom-grid { border: 1px solid CanvasText; box-shadow: none; }
  .ret-button, .view-tabs a[aria-selected="true"], .view-step.is-active .step-copy, .point-line { border: 2px solid Highlight; box-shadow: none; }
  .block-cursor, .point-line i { background: CanvasText; }
  .provider-color-layer { display: none !important; }
  .provider-base-layer img { filter: none !important; opacity: 1 !important; }
}
