



.tri-room-document {
  color-scheme: light;
  --room-page: #f7f8f7;
  --room-front: #fff;
  --room-surface: #fff;
  --room-soft: #f1f3f2;
  --room-ink: #323232;
  --room-muted: #56606a;
  --room-line: #dce2df;
  --room-brand: #508512;
  --room-link: #406b0e;
  --room-button: #508512;
  --room-button-text: #fff;
  --room-hand-ink: #2b2c7c;
  --room-glass: rgb(237 242 245 / .64);
  --room-glass-rim: rgb(255 255 255 / .91);
  --room-glass-edge: rgb(162 183 193 / .36);
  --room-glow: color-mix(in srgb, var(--room-brand) 10%, var(--room-front));
  --room-header: 4.1rem;
  --room-gutter: clamp(1.2rem, 5vw, 5rem);
  --room-sans: "Open Sans", system-ui, sans-serif;
  --room-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.tri-room-document[data-theme="dark"] {
  color-scheme: dark;
  --room-page: #181a20;
  --room-front: #181a20;
  --room-surface: #22252a;
  --room-soft: #1c1e24;
  --room-ink: #f4f5f6;
  --room-muted: #d1d5d8;
  --room-line: #3c4247;
  --room-brand: #82d243;
  --room-link: #82d243;
  --room-button: #82d243;
  --room-button-text: #182313;
  --room-hand-ink: #c7c7f2;
  --room-glass: rgb(43 49 57 / .64);
  --room-glass-rim: rgb(208 224 238 / .23);
  --room-glass-edge: rgb(130 146 161 / .35);
}

*, *::before, *::after { box-sizing: border-box; }
room-html { scroll-behavior: smooth; scroll-padding-top: calc(var(--room-header) + 1rem); }
room-body { margin: 0; color: var(--room-ink); background: var(--room-page); font: 400 1rem/1.65 var(--room-sans); }
h1, h2, h3, p, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--room-link); outline-offset: 4px; }

.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 20; top: .55rem; left: .55rem; padding: .5rem 1rem; background: var(--room-surface); }
.wrap { width: min(100% - 2 * var(--room-gutter), 84rem); margin-inline: auto; }
.section-pad { padding-block: clamp(4rem, 7vw, 7rem); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: var(--room-header);
  background: color-mix(in srgb, var(--room-front) 93%, transparent);
  border-bottom: 1px solid var(--room-line);
  backdrop-filter: blur(16px);
}

.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: var(--room-header); gap: 1.3rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; width: fit-content; font-size: 1.18rem; font-weight: 780; letter-spacing: -.045em; white-space: nowrap; }
.brand b { padding-inline-start: .55rem; border-inline-start: 1px solid var(--room-line); color: var(--room-link); font-size: .8rem; letter-spacing: 0; }
.header-inner nav, .header-actions { display: flex; align-items: center; gap: clamp(.95rem, 2.5vw, 2.6rem); font-size: .875rem; font-weight: 680; }
.header-actions { justify-self: end; gap: .7rem; }
.header-inner nav a:hover, .footer nav a:hover { color: var(--room-link); }
.portal-link { padding: .48rem .9rem; white-space: nowrap; border: 1px solid var(--room-line); border-radius: 99px; }
.portal-link:hover, .theme-switch:hover { border-color: var(--room-brand); }
.theme-switch { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; color: var(--room-ink); border: 1px solid var(--room-line); border-radius: 50%; background: var(--room-soft); font-size: 1.05rem; }

.eyebrow { display: flex; align-items: center; gap: .65rem; color: var(--room-link); font-size: .81rem; font-weight: 760; letter-spacing: .115em; line-height: 1.4; text-transform: uppercase; }
.eyebrow::before { content: ""; flex: none; width: 1.35rem; height: 1px; background: var(--room-brand); }
.display { font-weight: 750; text-transform: uppercase; line-height: 1.09; letter-spacing: -.045em; text-wrap: balance; }
.display em { display: block; color: var(--room-brand); font-style: normal; font-weight: 350; }
.handnote { color: var(--room-hand-ink); font: 400 clamp(1.4rem, 2.8vw, 2.2rem)/1.15 Peter, "Segoe Print", cursive; letter-spacing: -.065em; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1.55rem; }
.button, .window-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; padding: .6rem 1.1rem; border-radius: 99px; font-size: .875rem; font-weight: 740; line-height: 1.3; }
.button { color: var(--room-button-text); background: var(--room-button); border: 1px solid var(--room-button); box-shadow: 0 6px 15px color-mix(in srgb, var(--room-brand) 15%, transparent); transition: transform 180ms ease, box-shadow 180ms ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 19px color-mix(in srgb, var(--room-brand) 27%, transparent); }
.text-link { width: fit-content; color: var(--room-link); font-size: .875rem; font-weight: 740; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--room-brand) 55%, transparent); text-underline-offset: .3em; }
.text-link:hover { text-decoration-color: currentColor; }

.hero { overflow: clip; border-bottom: 1px solid var(--room-line); background: radial-gradient(ellipse at 72% 56%, var(--room-glow), transparent 60%), var(--room-front); }
.hero-inner { display: grid; align-items: center; min-height: clamp(34rem, calc(var(--tri-room-viewport-height, 100vh) * 0.76), 50rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.hero-copy { z-index: 1; padding-block: 3.6rem; }
.hero .display { margin: .78rem 0 1.18rem; font-size: clamp(2.75rem, 5.2vw, 5.3rem); }
.hero .display em { margin-inline-start: .52em; }
.hero-description { max-width: 43ch; color: var(--room-muted); font-size: clamp(1rem, 1.35vw, 1.18rem); }
.hero .actions { margin-top: 1.65rem; }
.hero-visual { isolation: isolate; position: relative; margin-inline-end: clamp(-3rem, -2.8vw, -.75rem); }
.room-image { width: 100%; height: auto; filter: drop-shadow(0 24px 22px #0002); animation: room-arrives 900ms cubic-bezier(.18,.62,.22,1) both; }
.hero-agent { position: absolute; z-index: 1; left: 64%; bottom: 4%; width: 57%; height: auto; translate: -50% 0; filter: drop-shadow(0 12px 15px #0004); animation: room-arrives 900ms ease 170ms both; }
.hero-id { position: absolute; z-index: 2; right: 4%; bottom: 10%; display: flex; align-items: center; gap: .65rem; padding: .58rem .74rem; border: 1px solid var(--room-glass-edge); border-radius: 1rem; background: var(--room-glass); box-shadow: inset 0 1px var(--room-glass-rim), 0 .5rem 1.4rem #0002; backdrop-filter: blur(15px) saturate(1.16); }
.hero-id strong, .hero-id small { display: block; }
.hero-id strong { font-size: clamp(1.15rem, 2vw, 1.7rem); line-height: 1; }
.hero-id small { color: var(--room-muted); margin-top: .18rem; font-size: .76rem; font-weight: 680; }
.hero-note { position: absolute; z-index: 2; left: 6%; bottom: 9%; rotate: -5deg; padding: .23em .42em .34em; background: var(--room-surface); border: 1px solid var(--room-glass-edge); border-radius: .3rem .6rem .6rem; box-shadow: inset 0 1px var(--room-glass-rim), 0 8px 20px #0002; animation: room-arrives 650ms ease 370ms both; }

.case-bridge { padding-block: clamp(3.5rem, 5.5vw, 5.4rem) clamp(1.6rem, 3.7vw, 3.25rem); border-bottom: 1px solid var(--room-line); background: radial-gradient(ellipse at 50% 0%, var(--room-glow), transparent 72%), var(--room-page); }
.section-intro { text-align: center; margin-bottom: 1.7rem; }
.section-intro .eyebrow { justify-content: center; }
.section-intro .display, .next .display { font-size: clamp(2.45rem, 4.6vw, 4.6rem); margin: .65rem 0 .85rem; }
.section-intro .display em { display: inline; }
.section-intro > p:last-child, .next .wrap > p { max-width: 65ch; color: var(--room-muted); margin-inline: auto; }

.case-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--room-glass-edge);
  border-radius: clamp(14px, 2vw, 22px);
  background: var(--room-glass-edge);
  isolation: isolate;
  box-shadow: 0 9px 34px color-mix(in srgb, var(--room-ink) 8%, transparent);
}

.case-picker button { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(8px, 1.08vw, 16px); min-width: 0; min-height: clamp(78px, 9.2vw, 132px); padding: clamp(10px, 1.3vw, 19px); border: 0; background: var(--room-glass); color: var(--room-ink); text-align: left; }
.case-picker button:first-child { border-radius: inherit; border-start-end-radius: 0; border-end-end-radius: 0; }
.case-picker button:last-child { border-radius: inherit; border-start-start-radius: 0; border-end-start-radius: 0; }
.case-picker button:hover { background: color-mix(in srgb, var(--room-surface) 91%, var(--room-brand)); }
.case-picker button[aria-pressed="true"] { background: linear-gradient(145deg, color-mix(in srgb, var(--room-surface) 81%, var(--room-brand)), var(--room-surface)); }
.case-picker button[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto clamp(8px, 1.2vw, 17px) 0; height: 3px; border-radius: 4px 4px 0 0; background: var(--room-brand); pointer-events: none; }
.case-picker button:focus-visible { z-index: 1; outline-offset: -4px; border-radius: 8px; }
.case-option-icon { display: grid; place-items: center; width: clamp(35px, 3.5vw, 48px); aspect-ratio: 1; background: var(--room-surface); border-radius: 50%; border: 1px solid var(--room-glass-edge); box-shadow: inset 0 1px var(--room-glass-rim); }
.case-option-icon img { width: 51%; height: auto; }
.case-option-copy { display: grid; gap: 5px; line-height: 1.24; }
.case-option-copy strong { font-size: clamp(.94rem, 1.23vw, 1.17rem); font-weight: 750; letter-spacing: -.038em; hyphens: manual; }
.case-option-copy > span { color: var(--room-muted); font-size: clamp(.75rem, 1.15vw, .95rem); text-wrap: pretty; }
.case-option-mark { width: 15px; aspect-ratio: 1; border: 1px solid var(--room-muted); border-radius: 50%; opacity: .65; }
.case-picker [aria-pressed="true"] .case-option-mark { opacity: 1; border-color: var(--room-link); background: radial-gradient(circle, var(--room-link) 0 40%, transparent 45%); }
.case-bridge-next { display: grid; justify-items: center; gap: .75rem; margin-top: clamp(1.45rem, 3.2vw, 3rem); text-align: center; }
.case-picker-caption { max-width: 30ch; margin: 0; font-size: clamp(2rem, 4.2vw, 4.1rem); text-wrap: balance; }

.build { overflow: clip; }
.scene { position: relative; border-bottom: 1px solid var(--room-line); background: var(--room-front); }
.scene-inner { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.22fr); align-items: center; gap: clamp(1.5rem, 5.1vw, 5.8rem); min-height: clamp(28rem, calc(var(--tri-room-viewport-height, 100vh) * 0.65), 44rem); padding-block: clamp(3.5rem, 6.1vw, 6.4rem); }
.scene-code { background: radial-gradient(ellipse at 25% 55%, var(--room-glow), transparent 69%), var(--room-page); }
.scene-code .scene-inner, .scene-app .scene-inner { grid-template-columns: minmax(0, 1.22fr) minmax(0, .88fr); }
.scene-code .story-art, .scene-app .story-art { grid-column: 1; grid-row: 1; }
.scene-code .scene-copy, .scene-app .scene-copy { grid-column: 2; grid-row: 1; }
.scene-app { background: radial-gradient(ellipse at 27% 60%, var(--room-glow), transparent 64%), var(--room-front); }
.scene-test { background: var(--room-page); }
.scene-copy { display: grid; justify-items: start; gap: .8rem; }
.scene-note { rotate: -3deg; transform-origin: left; font-size: clamp(1.65rem, 3.15vw, 2.85rem); }
.scene .display { font-size: clamp(2.1rem, 3.9vw, 3.9rem); text-wrap: pretty; }
.scene .display em { margin-inline-start: .16em; }
.scene-body { color: var(--room-muted); max-width: 46ch; }
.story-art { position: relative; min-width: 0; isolation: isolate; }
.story-art.is-in-view .tricoma-frame { animation: panel-arrives 650ms cubic-bezier(.2,.65,.25,1) both; }
.story-art.is-in-view .stage-behind::before { animation: orbit-settle 920ms ease-out both; }
.stage-behind { position: absolute; z-index: -1; inset: -11% -7% -8%; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse, var(--room-glow), transparent 68%); }
.stage-behind::before, .stage-behind::after { content: ""; position: absolute; inset: 10% 2% 14%; border: 1px solid color-mix(in srgb, var(--room-brand) 17%, transparent); border-radius: 50%; transform: rotate(-10deg); }
.stage-behind::after { inset: 15% 7% 18%; transform: rotate(9deg); }
.tricoma-frame { min-width: 0; padding-top: 16px; }
.tricoma-frame .invisible-window.invisible-window--rail { height: auto; min-width: 0; }
.tricoma-frame .invisible-window.invisible-window--rail .invisible-window__body { background: var(--room-surface); color: var(--room-ink); overflow: hidden; }
.rail-avatar { display: block; width: 100%; height: 100%; padding: 3px; object-fit: contain; }
.rail-icons { display: grid; gap: .45rem; justify-items: center; }
.rail-icons span { display: grid; place-items: center; width: 2rem; aspect-ratio: 1; border-radius: .5rem; color: var(--room-muted); }
.rail-icons span.selected { color: var(--room-link); background: color-mix(in srgb, var(--room-brand) 15%, var(--room-surface)); }
.ui-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }

.story-panel { min-width: 0; }
.app-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem .7rem; align-items: center; padding: .76rem clamp(.75rem, 2vw, 1.2rem); border-bottom: 1px solid var(--room-line); background: color-mix(in srgb, var(--room-soft) 45%, var(--room-surface)); }
.app-head img { object-fit: contain; }
.app-head h3 { font-size: clamp(1.02rem, 1.9vw, 1.4rem); line-height: 1.16; letter-spacing: -.035em; }
.app-head p { margin-top: .18rem; color: var(--room-muted); font-size: .77rem; line-height: 1.35; }
.environment { border-radius: 99px; border: 1px solid var(--room-glass-edge); background: var(--room-soft); color: var(--room-muted); font-size: .7rem; font-weight: 720; padding: .23rem .47rem; white-space: nowrap; }
.panel-body { padding: clamp(.8rem, 2vw, 1.2rem); min-width: 0; }
.exchange-message { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .62rem; align-items: start; margin-bottom: .75rem; font-size: .9rem; line-height: 1.48; }
.message-avatar { width: 2.35rem; height: 2.35rem; object-fit: cover; object-position: center top; border-radius: 50%; border: 1px solid var(--room-glass-edge); background: color-mix(in srgb, var(--room-surface) 91%, var(--room-brand)); }
.author-avatar { display: grid; place-items: center; color: var(--room-link); font-size: .75rem; font-weight: 760; }
.message-name { margin-bottom: .22rem; font-size: .82rem; font-weight: 750; }
.message-name span { color: var(--room-muted); font-size: .73rem; font-weight: 570; }
.message-bubble { width: fit-content; padding: .5rem .65rem; border-radius: .3rem .65rem .65rem; background: var(--room-soft); }
.brief-checks, .test-list, .records, .stage-clients { padding: 0; list-style: none; }
.brief-checks { margin: .95rem 0 0 2.98rem; border-top: 1px solid var(--room-line); }
.brief-checks li { display: flex; gap: .5rem; align-items: baseline; padding: .38rem 0; color: var(--room-muted); font-size: .85rem; }
.brief-checks li::before { content: "✓"; color: var(--room-link); font-weight: 750; }
.editor { overflow: hidden; border-radius: .55rem; border: 1px solid color-mix(in srgb, var(--room-line) 55%, #243a58); }
.editor-head { display: flex; gap: .6rem; align-items: center; padding: .46rem .7rem; background: #18304b; color: #f2f5f8; font: 600 .78rem/1.25 var(--room-mono); }
.editor-head small { margin-inline-start: auto; color: #b6c6d9; font: 600 .71rem/1.2 var(--room-sans); }
.file-mark { color: #c7c7f2; font-size: .7rem; }
.editor pre { margin: 0; padding: .6rem .7rem; overflow: auto; color: #f0f4f8; background: #0c1f38; font: 400 clamp(.73rem, 1vw, .9rem)/1.47 var(--room-mono); }
.editor pre:focus-visible { outline-offset: -4px; outline-color: #a9d974; }
.editor code { font: inherit; }
.code-keyword { color: #c9c1ff; }
.code-variable { color: #90b3e9; }
.code-value { color: #bde491; }
.review-message { margin-block: .85rem .7rem; color: var(--room-muted); }
.review-message:first-child { margin-top: 0; }
.review-message .message-name { color: var(--room-ink); }
.window-button { min-height: 2.6rem; padding: .55rem .88rem; border: 1px solid color-mix(in srgb, var(--room-brand) 48%, var(--room-line)); background: color-mix(in srgb, var(--room-surface) 90%, var(--room-brand)); color: var(--room-link); font-size: .82rem; }
.window-button:hover, .window-button:focus-visible { border-color: var(--room-brand); background: color-mix(in srgb, var(--room-surface) 86%, var(--room-brand)); }
.window-button[aria-disabled="true"] { cursor: wait; }
.code-note { margin-top: .65rem; padding: .55rem .7rem; border-left: 2px solid var(--room-brand); background: var(--room-soft); color: var(--room-muted); font-size: .85rem; }
.test-list, .records { margin-block: .58rem .8rem; border-bottom: 1px solid var(--room-line); }
.test-list li, .records li { display: flex; align-items: center; justify-content: space-between; gap: .3rem .8rem; padding: .56rem 0; border-top: 1px solid var(--room-line); font-size: .84rem; line-height: 1.38; }
.test-list li small, .records li small { display: block; color: var(--room-muted); margin-top: .17rem; font-size: .75rem; }
.test-state, .record-state { color: var(--room-muted); font-size: .74rem; font-weight: 740; text-align: end; }
.test-list [data-result="passed"] .test-state, .record-state.done { color: var(--room-link); }
.test-list [data-result="passed"] { animation: row-arrives 700ms ease both; }
.test-list [data-result="failed"] .test-state, .record-state.review { color: #9b501c; }
[data-theme="dark"] .test-list [data-result="failed"] .test-state, [data-theme="dark"] .record-state.review { color: #efbd93; }
.record-state.ready { color: var(--room-hand-ink); }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .48rem .75rem; }
.panel-actions #test-status { color: var(--room-muted); font-size: .79rem; }
.app-intro { color: var(--room-muted); font-size: .89rem; }
.app-result { margin-top: .72rem; padding: .6rem; border-left: 2px solid var(--room-brand); background: color-mix(in srgb, var(--room-surface) 92%, var(--room-brand)); font-size: .86rem; }
.record-updated { animation: row-arrives 700ms ease both; }

.agents { border-block: 1px solid var(--room-line); background: radial-gradient(ellipse at 73% 48%, var(--room-glow), transparent 67%), var(--room-front); }
.agents-layout, .mcp-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: clamp(1.75rem, 5.7vw, 6.5rem); align-items: center; }
.agents-copy .display, .mcp-copy .display { margin: .7rem 0 .9rem; font-size: clamp(2.15rem, 3.8vw, 4rem); text-wrap: pretty; }
.agents-copy > p:not(.eyebrow), .mcp-copy > p:not(.eyebrow) { margin-bottom: .8rem; color: var(--room-muted); max-width: 46ch; }
.stage-route { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, .46fr) minmax(0, 1fr); align-items: center; padding: clamp(.8rem, 3.8vw, 3rem) clamp(.1rem, 2.5vw, 2rem); }
.stage-clients { display: grid; gap: .62rem; }
.stage-clients li { position: relative; display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; font-size: .9rem; font-weight: 720; border-radius: 99px; background: var(--room-surface); border: 1px solid var(--room-glass-edge); box-shadow: inset 0 1px var(--room-glass-rim), 0 7px 22px #0001; }
.stage-clients li::after { position: absolute; left: 100%; width: 12px; height: 1px; content: ""; background: var(--room-brand); opacity: .48; }
.stage-clients li > span { display: grid; place-items: center; flex: 0 0 2.1rem; height: 2.1rem; border-radius: 50%; background: #fff; }
.stage-clients img { width: 64%; height: auto; }
.stage-route-line { position: relative; height: 1px; background: color-mix(in srgb, var(--room-brand) 54%, var(--room-line)); }
.stage-route-line::before { content: ""; position: absolute; inset: -3.85rem auto -3.85rem .72rem; width: 1px; background: color-mix(in srgb, var(--room-brand) 50%, var(--room-line)); }
.stage-route-line i { position: absolute; top: -.2rem; left: 0; width: .4rem; height: .4rem; border-radius: 50%; background: var(--room-brand); box-shadow: 0 0 10px var(--room-brand); opacity: 0; }
.stage-route.is-in-view .stage-route-line i { animation: signal 1100ms ease-out 470ms 2 both; }
.stage-server { position: relative; display: grid; justify-items: center; gap: .2rem; text-align: center; padding: clamp(.8rem, 2vw, 1.6rem) .35rem; border-radius: 1.06rem; border: 1px solid var(--room-glass-edge); background: linear-gradient(140deg, var(--room-surface), color-mix(in srgb, var(--room-surface) 84%, var(--room-brand))); box-shadow: inset 0 1px var(--room-glass-rim), 0 10px 30px #0002; }
.stage-server strong { font-size: clamp(.95rem, 1.6vw, 1.3rem); line-height: 1.25; }
.stage-server span { font-size: .78rem; color: var(--room-muted); }
.stage-server img { margin-bottom: .32rem; }

.mcp { background: radial-gradient(ellipse at 75% 50%, var(--room-glow), transparent 74%); }
.mcp-stage { isolation: isolate; position: relative; min-width: 0; }
.client-picker { display: flex; flex-wrap: wrap; gap: .45rem; }
.client-picker button { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.3rem; padding: .33rem .62rem; border: 1px solid var(--room-line); border-radius: 99px; background: var(--room-soft); color: var(--room-ink); font-size: .81rem; font-weight: 680; }
.client-picker button[aria-pressed="true"] { color: var(--room-link); background: color-mix(in srgb, var(--room-surface) 83%, var(--room-brand)); border-color: var(--room-brand); }
.client-picker button:hover { border-color: var(--room-brand); }
.client-picker img, .client-node img { object-fit: contain; }
[data-theme="dark"] :is(.client-picker img, .client-node img) { background: #fff; border-radius: .2rem; padding: 2px; }
.connection { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, .6fr) minmax(0, .78fr) minmax(0, .6fr) minmax(0, 1fr); padding: 1.2rem 0 1rem; }
.connection-node { display: grid; justify-items: center; min-width: 0; text-align: center; font-size: .8rem; line-height: 1.22; }
.connection-node small { color: var(--room-muted); margin-top: .18rem; font-size: .73rem; hyphens: auto; overflow-wrap: anywhere; }
.node-icon { display: grid; place-items: center; width: 2.9rem; aspect-ratio: 1; margin-bottom: .45rem; border-radius: .72rem; border: 1px solid var(--room-glass-edge); background: var(--room-glass); box-shadow: inset 0 1px var(--room-glass-rim); transition: box-shadow 200ms ease, border-color 200ms ease; }
.code-mark { color: var(--room-hand-ink); font: 700 .95rem/1 var(--room-mono); }
.connection-wire { position: relative; align-self: start; margin-top: 1.45rem; height: 1px; background: color-mix(in srgb, var(--room-brand) 36%, var(--room-line)); }
.connection-wire i { opacity: 0; position: absolute; top: -.16rem; left: 0; width: .32rem; height: .32rem; border-radius: 50%; background: var(--room-brand); box-shadow: 0 0 .58rem .12rem var(--room-brand); }
.connection-demo[data-phase="outbound"] .connection-wire i, .connection-demo[data-phase="return"] .connection-wire i { animation: signal 370ms ease-in-out both; }
.connection-demo[data-phase="outbound"] .connection-wire:nth-child(4) i, .connection-demo[data-phase="return"] .connection-wire:nth-child(2) i { animation-delay: 330ms; }
.connection-demo[data-phase="return"] .connection-wire i { animation-direction: reverse; background: var(--room-hand-ink); box-shadow: 0 0 .58rem .12rem var(--room-hand-ink); }
.connection-demo[data-phase="source"] .erp-node .node-icon, .connection-demo[data-phase="done"] .client-node .node-icon { border-color: var(--room-brand); box-shadow: 0 0 1rem color-mix(in srgb, var(--room-brand) 40%, transparent), inset 0 0 .7rem var(--room-glass-rim); }
.exchange { border: 1px solid var(--room-line); border-radius: .55rem; background: var(--room-soft); overflow: hidden; }
.exchange > div { padding: .6rem .68rem; font-size: .87rem; line-height: 1.47; }
.exchange > div + div { min-height: 4.8rem; border-top: 1px solid var(--room-line); }
.exchange > div > span { display: block; color: var(--room-link); margin-bottom: .15rem; font-size: .75rem; font-weight: 720; }
.exchange .is-new { animation: row-arrives 650ms ease both; }
#sdk-trace { padding: .64rem .68rem; border-top: 1px solid var(--room-line); font-size: .81rem; }
#sdk-trace summary { color: var(--room-link); cursor: pointer; font-weight: 730; }
#sdk-trace p { color: var(--room-muted); margin-top: .25rem; }
#sdk-trace code { color: inherit; font-family: var(--room-mono); }
#sdk-trace pre { margin: .45rem 0 0; padding: .55rem .6rem; overflow: auto; border-radius: .4rem; color: #f0f4f8; background: #0c1f38; font: 400 .76rem/1.5 var(--room-mono); }
.demo-foot { margin-top: .68rem; }
.demo-foot small { flex: 1 1 11rem; color: var(--room-muted); font-size: .75rem; line-height: 1.4; }

.next { text-align: center; background: radial-gradient(ellipse at 50% 100%, var(--room-glow), transparent 68%), var(--room-front); border-top: 1px solid var(--room-line); }
.next .display { margin-top: 0; }
.next .actions { justify-content: center; margin-top: 1.4rem; }
.footer { border-top: 1px solid var(--room-line); }
.footer .wrap, .footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.2rem; }
.footer .wrap { justify-content: space-between; padding-block: 1rem; }
.footer nav { color: var(--room-muted); font-size: .82rem; }
.no-script { margin-block: 1rem; color: var(--room-muted); }

@keyframes room-arrives { from { opacity: 0; transform: translateY(1.2rem); } to { opacity: 1; transform: none; } }
@keyframes panel-arrives { from { opacity: 0; transform: translateY(.42rem); } to { opacity: 1; transform: none; } }
@keyframes orbit-settle { from { opacity: .15; transform: rotate(-18deg) scale(.91); } to { opacity: 1; transform: rotate(-10deg) scale(1); } }
@keyframes row-arrives { from { background-color: color-mix(in srgb, var(--room-brand) 20%, transparent); } to { background-color: transparent; } }
@keyframes signal { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

@media (max-width: 66rem) {
  .case-picker button { grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .28rem; }
  .case-option-copy { grid-column: 1 / -1; grid-row: 2; align-self: start; }
  .case-option-mark { width: 12px; justify-self: end; }
}

@media (max-width: 52rem) {
  .scene .scene-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 3.2rem; max-width: 44rem; }
  .scene .scene-copy, .scene .story-art { grid-column: auto; grid-row: auto; }
  .scene .display { font-size: clamp(1.95rem, 6.7vw, 3.1rem); }
  .scene-body { max-width: 61ch; }
}

@media (max-width: 50rem) {
  .tri-room-document { --room-header: 3.6rem; }
  .header-inner { grid-template-columns: auto 1fr auto; gap: .62rem; }
  .header-inner nav { justify-self: center; gap: .7rem; }
  .brand { font-size: 1.03rem; }
  .brand img { width: 1.55rem; height: auto; }
  .brand b, .portal-link { display: none; }
  .header-inner nav a { white-space: nowrap; font-size: .76rem; }
  .theme-switch { width: 2.1rem; height: 2.1rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .hero-copy { padding: 2.7rem 0 0; }
  .hero .display { font-size: clamp(2.57rem, 9.5vw, 4.6rem); }
  .hero-visual { margin: .15rem -.55rem 1.08rem; }
  .hero-agent { left: 64%; width: 57%; }
  .hero-note { left: 3%; bottom: 4%; font-size: clamp(1.08rem, 4.3vw, 1.75rem); }
  .hero-id { right: 2%; bottom: 4%; gap: .34rem; padding: .4rem .45rem; border-radius: .7rem; }
  .hero-id img { width: 1.15rem; height: auto; }
  .hero-id small { font-size: .62rem; }
  .agents-layout, .mcp-layout { grid-template-columns: minmax(0, 1fr); }
  .agents-copy .display, .mcp-copy .display { font-size: clamp(2rem, 7.2vw, 3.6rem); }
  .stage-route { width: min(100%, 32rem); margin-inline: auto; }
}

@media (max-width: 40rem) {
  .case-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-picker button:first-child { border-radius: inherit; border-start-end-radius: 0; border-end-end-radius: 0; border-end-start-radius: 0; }
  .case-picker button:nth-child(2) { border-start-end-radius: inherit; }
  .case-picker button:nth-child(3) { border-end-start-radius: inherit; }
  .case-picker button:last-child { border-start-end-radius: 0; }
  .tricoma-frame .invisible-window.invisible-window--rail { --window-rail-width: 0px; --window-rail-gap: 0px; }
  .tricoma-frame .invisible-window--rail > .invisible-window__rail { display: none; }
  .app-head { padding: .62rem .63rem; gap: .42rem; }
  .app-head img { width: 1.65rem; height: 1.65rem; }
  .panel-body { padding: .7rem; }
  .message-avatar { width: 1.9rem; height: 1.9rem; }
  .brief-checks { margin-inline-start: 0; }
  .stage-behind { inset: 0; }
  .connection { grid-template-columns: minmax(0, 1fr) minmax(0, .48fr) minmax(0, .78fr) minmax(0, .45fr) minmax(0, 1.25fr); }
}

@media (max-width: 29rem) {
  .case-picker { grid-template-columns: minmax(0, 1fr); }
  .case-picker button { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 66px; padding: 10px 13px; gap: 11px; }
  .case-option-copy { grid-column: auto; grid-row: auto; align-self: center; gap: 3px; }
  .case-picker button:nth-child(2), .case-picker button:nth-child(3) { border-radius: 0; }
  .case-picker button:first-child { border-radius: inherit; border-end-start-radius: 0; border-end-end-radius: 0; }
  .case-picker button:last-child { border-radius: inherit; border-start-start-radius: 0; border-start-end-radius: 0; }
  .case-picker button[aria-pressed="true"]::after { inset: 8px auto 8px 0; width: 3px; height: auto; border-radius: 0 4px 4px 0; }
}

@media (max-width: 23rem) {
  .header-inner { gap: .38rem; }
  .header-inner nav { gap: .37rem; }
  .header-inner nav a { font-size: .7rem; }
  .environment { font-size: .62rem; }
  .test-list li, .records li { gap: .32rem; }
  .editor-head small { display: none; }
  .hero-id small { max-width: 12ch; line-height: 1.15; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
