



.tri-room-document {
  color-scheme: light;
  --paper: #fff;
  --front: #fbfcfb;
  --surface: #fff;
  --soft: #f1f3f2;
  --ink: #323232;
  --muted: #56606a;
  --line: #dce2df;
  --control-line: #87958b;
  --green: #497616;
  --button: #4e7e12;
  --button-hover: #3c650a;
  --button-ink: #fff;
  --glow: #f0f3f2;
  --trigger-glow: #e8f0e4;
  --glass: #f7fafbea;
  --rim: #fff;
  --edge: #b9c7cc90;
  --asset-shadow: #41596730;
  --shadow: 0 12px 32px #2a42531f;
  --hand-ink: #2b2c7c;
  --warning: #855515;
  --warning-fill: #e4b96f;
  --header: 70px;
}

.tri-room-document[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111b1c;
  --front: #181a20;
  --surface: #22252a;
  --soft: #2a3036;
  --ink: #f4f5f6;
  --muted: #c4cbd2;
  --line: #3e454d;
  --control-line: #7c8a94;
  --green: #a9d974;
  --button: #a9d974;
  --button-hover: #c0e68e;
  --button-ink: #192610;
  --glow: #252930;
  --trigger-glow: #26342f;
  --glass: #252a33eb;
  --rim: #e1f2ef24;
  --edge: #92a0b26b;
  --asset-shadow: #07090e60;
  --shadow: 0 12px 32px #0005;
  --hand-ink: #c4c4ef;
  --warning: #f1d296;
  --warning-fill: #d5b676;
}

*, *::before, *::after { box-sizing: border-box; }
room-html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 20px); }
room-body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 "Open Sans", Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
img { display: block; }
h1, h2, h3, h4, p, dl, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.05; letter-spacing: -.058em; }
h1 em, h2 em, h3 em { color: var(--green); font-style: normal; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 10px; padding: 9px 15px; background: var(--paper); z-index: 20; transform: translateY(-150%); }
.skip:focus { transform: none; }
.wrap { width: min(100% - clamp(40px, 10vw, 144px), 1320px); margin-inline: auto; }

.site-header { height: var(--header); position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 95%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.header-inner, .footer-inner { height: 100%; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
.brand { display: inline-flex; gap: 8px; align-items: center; font-size: 1.55rem; font-weight: 800; line-height: 1; letter-spacing: -.065em; white-space: nowrap; }
.brand img { flex: none; }
.brand b { padding: 3px 0 3px 11px; margin-left: 2px; border-left: 1px solid var(--line); color: var(--green); font-size: .9rem; letter-spacing: -.025em; }
.site-header nav { display: flex; gap: clamp(16px, 3vw, 48px); color: var(--ink); font-size: .88rem; font-weight: 700; }
.site-header nav a:hover { color: var(--green); }
.theme-switch { justify-self: end; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px; background: var(--soft); color: var(--ink); font-size: .875rem; font-weight: 700; white-space: nowrap; }
.theme-switch:hover { border-color: var(--green); }
.theme-symbol { width: 1em; text-align: center; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin-bottom: 21px; color: var(--green); font-size: .875rem; letter-spacing: .105em; line-height: 1.35; text-transform: uppercase; font-weight: 800; }
.eyebrow::before { content: ""; width: 19px; height: 1px; flex: none; background: currentColor; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 1px solid transparent; border-radius: 100px; padding: 11px 22px; font-size: .9rem; line-height: 1.3; font-weight: 800; text-align: center; transition: background .2s, color .2s, border-color .2s; }
.button-bright { background: var(--button); color: var(--button-ink); }
.button-bright:hover { background: var(--button-hover); }
.button-outline { border-color: var(--green); color: var(--ink); }
.button-outline:hover { background: var(--soft); }

.hero { position: relative; isolation: isolate; background: radial-gradient(ellipse at 72% 48%, var(--glow), transparent 68%), var(--front); overflow: clip; }
.hero-inner { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); align-items: center; min-height: clamp(590px, calc(var(--tri-room-viewport-height, 100vh) * 0.73), 760px); }
.hero-copy { position: relative; z-index: 2; padding: 61px 20px 78px 0; }
.hero .eyebrow { color: var(--ink); text-transform: none; font-weight: 500; letter-spacing: 0; }
.hero .eyebrow::before { background: var(--green); }
.hero h1 { font-size: clamp(2.6rem, 4.5vw, 5.3rem); line-height: 1.07; text-transform: uppercase; letter-spacing: -.054em; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em, .trigger h2 em { font-weight: 300; }
.hero-quote { margin-top: 25px; max-width: 31ch; font-size: clamp(1.15rem, 2.14vw, 1.79rem); line-height: 1.3; font-weight: 620; letter-spacing: -.03em; text-wrap: pretty; }
.hero-description { margin-block: 16px 26px; max-width: 42ch; color: var(--muted); font-size: clamp(1rem, 1.32vw, 1.1rem); }
.hero-visual { position: relative; min-width: 0; align-self: stretch; isolation: isolate; }
.room-world { position: absolute; inset: 0; }
.room-halo { position: absolute; z-index: -1; inset: 19% -14% 3% -9%; background: radial-gradient(ellipse at center, var(--glow), transparent 67%); }
.room-image { position: absolute; width: 104%; height: 91%; left: 1%; top: 1%; object-fit: contain; filter: drop-shadow(0 19px 26px var(--asset-shadow)); }
.room-agent { position: absolute; width: min(86%, 660px); height: 92%; right: -13%; bottom: -1%; object-fit: contain; object-position: right bottom; filter: drop-shadow(-18px 14px 22px var(--asset-shadow)); mask-image: linear-gradient(#000 88%, transparent 99%); animation: agent-enter .85s ease-out both; }
@keyframes agent-enter { from { opacity: .4; transform: translateY(14px); } }
@keyframes caption-arrive { from { opacity: 0; transform: translate3d(-12px, 12px, 0) scale(.96); } }
.room-id { position: absolute; z-index: 2; right: -2%; bottom: 7.5%; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--edge); border-radius: 16px; background: var(--glass); box-shadow: inset 0 1px var(--rim), var(--shadow); backdrop-filter: blur(16px); line-height: 1.2; }
.room-id strong { display: block; font-size: clamp(1.5rem, 3vw, 2.45rem); letter-spacing: -.06em; }
.room-id small { color: var(--muted); font-size: .83rem; }

.story, .trigger, .closing { padding-block: clamp(63px, 7.4vw, 106px); }
.story { background: var(--paper); }
.section-intro { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(25px, 6vw, 90px); align-items: end; margin-bottom: clamp(38px, 6vw, 83px); }
h2 { font-size: clamp(2.35rem, 4.26vw, 4.55rem); line-height: 1.1; text-wrap: balance; }
.section-intro > p { padding-bottom: .25rem; max-width: 43ch; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.story-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.story-tabs button { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 11px; row-gap: 2px; align-items: center; justify-items: start; align-content: center; background: none; color: var(--muted); border: 0; padding: 14px clamp(7px, 1.6vw, 24px); text-align: left; line-height: 1.3; }
.story-tabs img { grid-row: span 2; }
.story-tabs button:first-child { padding-left: 0; }
.story-tabs button:hover, .story-tabs button[aria-selected="true"] { color: var(--ink); }
.story-tabs button::after { position: absolute; content: ""; inset: auto 0 -1px; height: 2px; transform: scaleX(0); transform-origin: left; background: var(--green); transition: transform .32s ease; }
.story-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.story-tabs time { font-size: .875rem; font-variant-numeric: tabular-nums; }
.story-tabs button span { font-size: clamp(.875rem, 1.3vw, 1.04rem); font-weight: 750; overflow-wrap: anywhere; }
.story-scene { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: clamp(24px, 7vw, 104px); align-items: start; padding-top: clamp(32px, 5vw, 76px); animation: scene-arrive .44s ease both; }
@keyframes scene-arrive { from { opacity: .15; transform: translateY(9px); } }
.scene-copy h3 { font-size: clamp(2.05rem, 3.7vw, 3.9rem); margin-bottom: 20px; }
.scene-copy > p { color: var(--muted); max-width: 46ch; }
.scene-copy blockquote { margin: 28px 0 0; padding-left: 16px; border-left: 2px solid var(--green); line-height: 1.45; font-size: clamp(1.02rem, 1.5vw, 1.25rem); font-weight: 700; }
.scene-copy cite { display: block; margin-top: 6px; color: var(--muted); font-weight: 500; font-size: .875rem; font-style: normal; }
.text-link { display: inline-block; margin-top: 22px; color: var(--green); font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }

.workbench { min-width: 0; background: var(--surface); border: 1px solid var(--edge); border-radius: 15px; box-shadow: var(--shadow), inset 0 1px var(--rim); }
.workbench-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 11px; padding: 12px clamp(14px, 2.5vw, 32px); background: var(--soft); border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.workbench-bar strong { font-size: .95rem; }
.workbench-bar small { margin-left: auto; color: var(--muted); font-size: .82rem; }
.draft-content { padding: 20px clamp(14px, 2.5vw, 32px); min-height: 202px; }
.draft-subject { margin-bottom: 9px; font-size: .96rem; font-weight: 750; }
.draft-body { white-space: pre-line; font-size: .94rem; line-height: 1.55; }
.draft-body.revising { animation: revise .55s ease both; }
@keyframes revise { from { opacity: .35; color: var(--green); } }
.agent-conversation { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; border-top: 1px solid var(--line); padding: 11px clamp(14px, 2.5vw, 32px) 2px; }
.chat-avatar { width: 30px; height: 30px; overflow: hidden; border-radius: 50%; background: var(--soft); }
.chat-avatar img { max-width: none; transform: translate(-12px, 0); }
.agent-thread { min-height: 2.2rem; max-height: 120px; overflow: auto; overflow-wrap: anywhere; }
.agent-line { font-size: .875rem; margin-bottom: 6px; color: var(--muted); }
.agent-line strong { display: inline-block; margin-right: 5px; color: var(--green); }
.user-line strong { color: var(--ink); }
.suggestions { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 16px; padding: 0 clamp(14px, 2.5vw, 32px) 8px; }
.suggestions button { border: 0; padding: 4px 0; background: none; color: var(--green); font-weight: 750; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }
.suggestions button:hover { color: var(--ink); }
.composer { display: flex; gap: 6px; padding: 10px clamp(14px, 2.5vw, 32px); background: var(--soft); border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.composer input { flex: 1; min-width: 0; padding: 6px 8px; color: var(--ink); border: 1px solid var(--control-line); background: var(--surface); border-radius: 5px; font-size: 1rem; }
.composer input::placeholder { color: var(--muted); }
.composer button { background: var(--button); color: var(--button-ink); border: 1px solid transparent; padding: 6px 11px; border-radius: 5px; font-weight: 750; font-size: .875rem; }
.composer button:hover { background: var(--button-hover); }
.sample-chat, .customer-record { padding: 14px clamp(14px, 2.5vw, 32px); }
.sample-chat > div { padding: 13px 0; }
.sample-chat > div + div { border-top: 1px solid var(--line); }
.sample-chat span { color: var(--green); font-weight: 750; font-size: .875rem; }
.sample-chat p { margin-top: 3px; }
.customer-record h4 { font-size: 1.75rem; margin: 10px 0 14px; }
.customer-record dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.customer-record dt { font-weight: 750; }
.customer-record dd { margin: 0; color: var(--muted); }

.trigger { background: radial-gradient(ellipse at 75% 39%, var(--trigger-glow), transparent 62%), var(--front); overflow: clip; border-block: 1px solid var(--line); }
.trigger-intro { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: clamp(20px, 5.5vw, 80px); margin-bottom: clamp(26px, 5vw, 70px); }
.trigger-intro > div > p:last-child { color: var(--muted); max-width: 54ch; margin-top: 20px; }
.trigger-scene { position: relative; min-height: clamp(285px, 31vw, 425px); isolation: isolate; }
.trigger-room { position: absolute; top: 0; left: -2%; width: 96%; height: 92%; object-fit: contain; opacity: .65; mask-image: linear-gradient(95deg, #000 58%, #0005); }
.trigger-agent { position: absolute; bottom: 0; right: -10%; width: 87%; height: 108%; object-fit: contain; object-position: bottom right; mask-image: linear-gradient(#000 68%, transparent 99%); }
.trigger-scene figcaption { position: absolute; left: 0; bottom: 9%; width: min(70%, 295px); display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; border-left: 2px solid var(--green); padding: 10px 13px; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.trigger-scene figcaption img { grid-row: span 2; }
.trigger-scene figcaption span { color: var(--green); font-weight: 650; font-size: .85rem; }
.trigger-scene figcaption strong { font-size: clamp(.93rem, 1.28vw, 1.09rem); line-height: 1.36; }
.trigger-scene figcaption.is-changing { animation: caption-arrive .48s ease both; }
.trigger-demo { display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr); border-block: 1px solid var(--line); }
.rule { padding: clamp(20px, 3.4vw, 50px) clamp(20px, 4vw, 60px) clamp(20px, 3.4vw, 50px) 0; border-right: 1px solid var(--line); }
.rule-head { display: flex; align-items: start; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; }
.rule-head h3 { font-size: clamp(1.3rem, 2.15vw, 2.1rem); letter-spacing: -.048em; }
.rule-head span { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.rule-definition { margin-block: 22px 15px; }
.rule-definition > div { display: grid; grid-template-columns: minmax(49px, .24fr) minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rule-definition dt { color: var(--green); font-weight: 750; }
.rule-definition dd { margin: 0; }
.rule-note { color: var(--muted); font-size: .94rem; }
.execution { min-width: 0; padding: clamp(20px, 3.4vw, 50px) 0 clamp(20px, 3.4vw, 50px) clamp(20px, 4vw, 60px); }
.trigger-form label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.trigger-fields { display: flex; gap: 10px; position: relative; }
.trigger-fields select { flex: 1; min-width: 0; padding: 8px 35px 8px 12px; border: 1px solid var(--control-line); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: .95rem; appearance: none; }
.trigger-fields::before { content: ""; position: absolute; pointer-events: none; right: 196px; top: calc(50% - 5px); width: 8px; height: 8px; border-right: 1px solid var(--green); border-bottom: 1px solid var(--green); transform: rotate(45deg); }
.trigger-fields button { flex: 0 0 170px; }
.trigger-fields button[aria-disabled="true"] { cursor: wait; opacity: .7; }
.run-track { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin: 31px 0 24px; list-style: none; }
.run-track li { position: relative; display: grid; grid-template-rows: 13px auto; justify-items: start; gap: 11px; padding-right: 7px; color: var(--muted); font-size: .875rem; line-height: 1.3; }
.run-track li:not(:last-child)::before { position: absolute; content: ""; left: 12px; right: 0; top: 6px; height: 1px; background: var(--control-line); }
.run-track li span { z-index: 1; position: relative; width: 13px; height: 13px; border: 1px solid var(--control-line); border-radius: 50%; background: var(--surface); }
.run-track li.done { color: var(--ink); }
.run-track li.done span { background: var(--green); border-color: var(--green); animation: activate .65s ease-out both; }
@keyframes activate { from { transform: scale(.6); } 45% { transform: scale(1.35); } }
.run-track li.done:not(:last-child)::before { background: linear-gradient(90deg, var(--green) 50%, var(--control-line)); }
.run-track li.mismatch span { border-color: var(--warning); background: var(--warning-fill); }
.run-result { min-height: 104px; border-top: 1px solid var(--line); padding-top: 14px; }
.run-title { font-weight: 750; color: var(--green); }
.run-message { margin-top: 5px; color: var(--muted); }
.execution[data-state="miss"] .run-title { color: var(--warning); }

.closing { background: radial-gradient(ellipse at 67% 100%, var(--glow), transparent 68%), var(--paper); }
.closing-inner { display: flex; justify-content: space-between; gap: 25px; align-items: end; }
.closing h2 + p { margin-top: 15px; color: var(--hand-ink); font: 1.45rem/1.4 Peter, "Segoe Print", cursive; }
.closing .button { flex: none; margin-bottom: 5px; }
.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { min-height: 72px; color: var(--muted); font-size: .875rem; }
.footer-inner .brand { color: var(--ink); font-size: 1.3rem; }
.footer-inner .brand b { color: var(--green); border-color: var(--line); }

@media (max-width: 950px) {
  .hero-inner { min-height: 560px; }
  .room-agent { width: 101%; right: -20%; }
  .room-id { right: 0; }
  .section-intro { grid-template-columns: 1fr; gap: 19px; }
  .section-intro > p { max-width: 65ch; }
  .trigger-fields { flex-wrap: wrap; }
  .trigger-fields select { flex: 1 0 100%; }
  .trigger-fields::before { right: 16px; top: 16px; }
  .trigger-fields button { flex-basis: auto; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding: 40px 0 0; }
  .hero h1 { font-size: clamp(1.85rem, 9.5vw, 3.8rem); }
  .hero-quote { margin-top: 16px; }
  .hero-description { margin-block: 11px 16px; }
  .hero-visual { min-height: clamp(295px, 95vw, 485px); width: min(100%, 640px); justify-self: center; margin-top: 3px; }
  .room-image { left: -9%; width: 115%; height: 91%; top: 0; }
  .room-agent { width: 88%; height: 95%; right: -13%; bottom: -1%; }
  .room-id { right: 0; bottom: 6%; gap: 7px; padding: 6px 9px; border-radius: 11px; }
  .room-id img { width: 19px; height: 19px; }
  .room-id small { font-size: .71rem; }
}

@media (max-width: 680px) {
  .tri-room-document { --header: 62px; }
  .site-header nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .brand { font-size: 1.38rem; }
  .brand img { width: 29px; height: 29px; }
  .theme-switch { padding-inline: 10px; }
  .story-tabs { grid-template-columns: 1fr 1fr; }
  .story-tabs button { padding-left: 7px; column-gap: 6px; }
  .story-tabs button img { width: 20px; height: 20px; }
  .story-tabs button span, .story-tabs time { font-size: .78rem; }
  .story-tabs button:nth-child(odd) { padding-left: 0; }
  .story-tabs button:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .story-scene, .trigger-demo, .trigger-intro { grid-template-columns: minmax(0, 1fr); }
  .trigger-intro { gap: 5px; }
  .trigger-scene { min-height: clamp(230px, 70vw, 350px); }
  .trigger-scene figcaption { bottom: 7%; }
  .rule { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
  .execution { padding-inline: 0; }
  .trigger-fields button { min-height: 42px; }
  .closing-inner { align-items: start; flex-direction: column; }
  .footer-inner > span { text-align: right; }
}

@media (max-width: 370px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { gap: 10px; }
  .brand { gap: 5px; font-size: 1.26rem; }
  .brand b { padding-left: 7px; font-size: .83rem; }
  .theme-switch { padding-inline: 8px; font-size: .82rem; }
  .story-tabs button { column-gap: 4px; }
  .room-id small { max-width: 17ch; display: block; }
  .footer-inner { flex-direction: column; align-items: start; justify-content: center; gap: 9px; padding-block: 13px; }
  .footer-inner > span { text-align: left; }
}

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