:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --surface: #151513;
  --surface-raised: #1b1b18;
  --ink: #f2f1ec;
  --muted: #92928a;
  --faint: #5e5e58;
  --accent: #c7f36b;
  --accent-ink: #11150a;
  --danger: #ff8d86;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.2, 1.35, .35, 1);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "SF Pro Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.diagram-open { overflow: hidden; }
button, textarea, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ambient span { position: absolute; border-radius: 999px; filter: blur(100px); opacity: .1; will-change: transform; }
.ambient span:first-child { width: 42vw; height: 42vw; min-width: 420px; min-height: 420px; right: -14vw; top: -22vw; background: #b7f154; animation: drift-one 18s ease-in-out infinite alternate; }
.ambient span:last-child { width: 30vw; height: 30vw; min-width: 300px; min-height: 300px; left: -18vw; bottom: -17vw; background: #839bff; opacity: .055; animation: drift-two 22s ease-in-out infinite alternate; }

.shell { position: relative; z-index: 1; width: min(960px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; animation: reveal-down .8s .05s var(--ease-out) both; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); transform: rotate(-2deg); transition: transform .5s var(--ease-spring), border-radius .5s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(8deg) scale(1.08); border-radius: 50%; }
.brand-mark i { width: 8px; height: 8px; border: 2px solid var(--bg); border-top-color: transparent; border-radius: 50%; animation: mark-spin 8s linear infinite; }
.availability { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.availability span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(199,243,107,.35); animation: status-ping 2.8s ease-out infinite; }

.hero { padding: clamp(72px, 10vh, 116px) 0 220px; }
.hero.is-leaving { animation: hero-out .52s var(--ease-out) both; pointer-events: none; }
.hero-copy { max-width: 810px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 24px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; animation: reveal-up .8s .12s var(--ease-out) both; }
.eyebrow span { display: block; width: 18px; height: 1px; background: var(--accent); transform-origin: left; animation: line-grow .8s .45s var(--ease-out) both; }
h1 { margin: 0; max-width: 860px; font-size: clamp(48px, 7.1vw, 78px); line-height: .96; letter-spacing: -.065em; font-weight: 570; animation: reveal-up .95s .18s var(--ease-out) both; }
h1 em { color: var(--accent); font-style: normal; font-weight: 520; }
.lede { max-width: 590px; margin: 28px 0 0; color: var(--muted); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.62; letter-spacing: -.015em; animation: reveal-up .95s .28s var(--ease-out) both; }
.question-explorer { margin-top: clamp(72px, 10vh, 108px); animation: reveal-up .95s .34s var(--ease-out) both; }
.explorer-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .55fr); gap: 36px; align-items: end; margin-bottom: 30px; }
.section-index { margin: 0 0 12px; color: var(--accent); font-size: 9px; font-weight: 720; letter-spacing: .13em; text-transform: uppercase; }
.explorer-heading h2 { margin: 0; font-size: clamp(29px, 4vw, 43px); line-height: 1.03; letter-spacing: -.05em; font-weight: 580; }
.explorer-heading > p { max-width: 360px; margin: 0 0 2px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.category-list { border-top: 1px solid rgba(255,255,255,.11); }
.category { --panel-pad: 72px; position: relative; border-bottom: 1px solid rgba(255,255,255,.09); animation: category-enter .72s calc(.4s + var(--category-index) * .07s) var(--ease-out) both; }
.category::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(199,243,107,.055), transparent 62%); opacity: 0; transform: scaleX(.9); transform-origin: left; transition: opacity .35s, transform .55s var(--ease-out); pointer-events: none; }
.category:hover::before, .category.is-open::before { opacity: 1; transform: scaleX(1); }
.category-trigger { position: relative; z-index: 1; display: grid; grid-template-columns: 46px minmax(210px, .85fr) minmax(220px, 1fr) 28px; gap: 24px; align-items: center; width: 100%; min-height: 82px; padding: 18px 8px; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.category-trigger:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
.category-number { color: var(--faint); font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; transition: color .3s; }
.category-title { font-size: 17px; font-weight: 590; letter-spacing: -.025em; transition: transform .45s var(--ease-out), color .25s; }
.category-summary { color: var(--muted); font-size: 12px; line-height: 1.4; transition: color .25s; }
.category-trigger i { position: relative; width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; transition: border-color .3s, background .3s, transform .5s var(--ease-spring); }
.category-trigger i::before, .category-trigger i::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 1px; background: currentColor; transition: transform .45s var(--ease-spring); }
.category-trigger i::after { transform: rotate(90deg); }
.category-trigger:hover .category-title { transform: translateX(5px); }
.category-trigger:hover .category-summary { color: #b6b6ae; }
.category.is-open .category-number { color: var(--accent); }
.category.is-open .category-trigger i { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); transform: rotate(180deg); }
.category.is-open .category-trigger i::after { transform: rotate(0); }
.category-panel { position: relative; z-index: 1; max-height: 0; padding: 0 var(--panel-pad); overflow: hidden; opacity: 0; transform: translateY(-10px); transition: max-height .55s var(--ease-out), opacity .3s ease, transform .5s var(--ease-out), padding .5s var(--ease-out); }
.category.is-open .category-panel { max-height: 430px; padding-top: 1px; padding-bottom: 28px; opacity: 1; transform: none; }
.category-hint { max-width: 690px; margin: 0 0 15px; color: var(--faint); font-size: 10px; line-height: 1.45; }
.question-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.question-chips button { padding: 10px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: #bcbcb5; background: rgba(19,19,17,.58); font-size: 11px; line-height: 1.2; cursor: pointer; opacity: 0; transform: translateY(9px); transition: color .25s, border-color .25s, background .25s, transform .35s var(--ease-spring), opacity .35s; }
.category.is-open .question-chips button { opacity: 1; transform: none; }
.category.is-open .question-chips button:nth-child(1) { transition-delay: .08s; }
.category.is-open .question-chips button:nth-child(2) { transition-delay: .12s; }
.category.is-open .question-chips button:nth-child(3) { transition-delay: .16s; }
.category.is-open .question-chips button:nth-child(4) { transition-delay: .2s; }
.question-chips button:hover, .question-chips button:focus-visible { border-color: rgba(199,243,107,.55); color: var(--ink); background: rgba(199,243,107,.08); outline: 0; transform: translateY(-2px); }
.question-chips button::after { content: "↗"; display: inline-block; margin-left: 7px; color: var(--accent); transition: transform .35s var(--ease-spring); }
.question-chips button:hover::after { transform: translate(2px, -2px); }
.agent-connect { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-top: 44px; padding: 20px 21px; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; background: linear-gradient(110deg, rgba(28,28,24,.82), rgba(18,18,16,.58)); animation: reveal-up .95s .65s var(--ease-out) both; }
.agent-connect-kicker { display: block; margin-bottom: 6px; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.agent-connect h2 { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.35; letter-spacing: -.015em; }
.agent-connect p { max-width: 470px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.agent-connect a { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; padding: 11px 13px; border-radius: 10px; color: var(--accent-ink); background: var(--accent); font-size: 10px; font-weight: 750; text-decoration: none; transition: transform .3s var(--ease-spring), background .2s; }
.agent-connect a:hover { transform: translateY(-2px); }
.agent-connect a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.agent-connect a i { font-style: normal; font-size: 13px; }

.messages { display: flex; flex-direction: column; gap: 42px; padding: 54px 0 230px; }
.messages:empty { display: none; }
.message { width: 100%; scroll-margin-bottom: 190px; animation: message-in .62s var(--ease-spring) both; }
.message.user { align-self: flex-end; width: auto; max-width: min(72%, 620px); padding: 13px 17px; border-radius: 18px 18px 5px 18px; color: #d8d8d1; background: var(--surface-raised); }
.message.user .content { white-space: pre-wrap; line-height: 1.5; }
.message.assistant { max-width: 760px; }
.assistant-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.assistant-orb { position: relative; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-raised); overflow: hidden; }
.assistant-orb::before { content: ""; position: absolute; width: 12px; height: 12px; left: 6px; top: 6px; border-radius: 50%; background: var(--accent); transform: scale(.42); transition: transform .5s var(--ease-spring); }
.assistant .content { position: relative; color: #deded8; font-size: 16px; line-height: 1.72; letter-spacing: -.01em; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant .content:has(> :not(.thinking-state)) { white-space: normal; }
.assistant .content > :first-child { margin-top: 0; }
.assistant .content > :last-child { margin-bottom: 0; }
.assistant .content h2, .assistant .content h3, .assistant .content h4 { margin: 1.65em 0 .55em; color: var(--ink); line-height: 1.22; letter-spacing: -.035em; }
.assistant .content h2 { font-size: 23px; font-weight: 610; }
.assistant .content h3 { font-size: 18px; font-weight: 620; }
.assistant .content h4 { font-size: 15px; font-weight: 650; }
.assistant .content p { margin: 0 0 1em; }
.assistant .content strong { color: var(--ink); font-weight: 650; }
.assistant .content ul, .assistant .content ol { margin: .7em 0 1.2em; padding-left: 1.35em; }
.assistant .content li { margin: .35em 0; padding-left: .25em; }
.assistant .content li::marker { color: var(--accent); }
.assistant .content blockquote { margin: 1.25em 0; padding: 1px 0 1px 17px; border-left: 2px solid var(--accent); color: var(--muted); }
.assistant .content code { padding: .16em .38em; border-radius: 5px; background: var(--surface-raised); color: #dff6ac; font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.assistant .content pre { margin: 1.2em 0; padding: 17px; overflow: auto; border-radius: 12px; background: #11110f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.assistant .content pre code { padding: 0; background: none; color: #d7d7cf; }
.assistant .content a { color: var(--accent); text-decoration-color: rgba(199,243,107,.35); text-underline-offset: 3px; }
.assistant .content a.citation-ref { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 0 4px; border-radius: 5px; font-size: 11px; line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; text-decoration: none; vertical-align: baseline; }
.assistant .content a.citation-ref:hover { background: rgba(199,243,107,.1); }
.assistant .content a.citation-ref:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (pointer: coarse), (max-width: 760px) {
  .assistant .content a.citation-ref { min-width: 44px; min-height: 44px; }
}
.assistant .content hr { height: 1px; margin: 1.8em 0; border: 0; background: rgba(255,255,255,.1); }
.assistant .content table { width: 100%; margin: 1.3em 0; border-collapse: collapse; font-size: 13px; }
.assistant .content th, .assistant .content td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.09); text-align: left; vertical-align: top; }
.assistant .content th { color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

.architecture-card { position: relative; margin: 24px 0 28px; border-radius: 5px; overflow: hidden; background: #fff; color: #393936; box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 16px 44px rgba(0,0,0,.22); animation: diagram-card-in .55s var(--ease-out) both; }
.architecture-card figcaption { position: absolute; z-index: 2; right: 8px; top: 8px; }
.diagram-expand { width: 26px; height: 26px; border: 0; border-radius: 6px; color: #77766f; background: #f4f3ef; cursor: pointer; transition: background .2s, transform .3s var(--ease-spring); }
.diagram-expand:hover { background: #ebeae5; transform: scale(1.06); }
.architecture-viewport { width: 100%; overflow: auto; overscroll-behavior-inline: contain; background: #fff; }
.architecture-viewport svg { display: block; width: max(100%, var(--diagram-width, 720px)); height: auto; min-height: 360px; font-family: Arial, Helvetica, sans-serif; }
.diagram-zone { fill: none; stroke: #aaa9a3; stroke-width: 1; stroke-dasharray: 6 5; }
.diagram-zone-label { fill: #55544f; font-size: 11px; }
.diagram-title { fill: #45443f; font-size: 12px; font-weight: 500; }
.diagram-edge { fill: none; stroke: #8e8d87; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: diagram-line 1s var(--ease-out) forwards; }
.diagram-node { opacity: 0; animation: diagram-node-in .46s var(--ease-out) forwards; }
.diagram-node rect { stroke-width: 1; }
.diagram-node-label { font-size: 12px; font-weight: 650; }
.diagram-node-detail { font-size: 10px; font-weight: 400; opacity: .82; }
.architecture-card.is-expanded { position: fixed; z-index: 50; inset: 18px; margin: 0; display: flex; flex-direction: column; border-radius: 8px; background: #fff; opacity: 1; transform: none; animation: none; isolation: isolate; box-shadow: 0 0 0 9999px rgba(0,0,0,.92); }
.architecture-card.is-expanded .architecture-viewport { flex: 1; display: grid; place-items: center; }
.architecture-card.is-expanded svg { width: max(100%, var(--diagram-width, 720px)); min-height: 0; }
.assistant.is-streaming .assistant-orb::before { transform: scale(.65); animation: orb-breathe 1.5s ease-in-out infinite; }
.assistant.is-streaming .content::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 4px; vertical-align: -.13em; background: var(--accent); animation: caret 1s steps(2, jump-none) infinite; }
.assistant.is-provisional .assistant-head::after { content: "Draft · validation pending"; margin-left: 8px; color: var(--faint); font-size: 9px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }

.thinking-state { display: flex; align-items: center; gap: 12px; min-height: 29px; color: var(--muted); font-size: 13px; }
.thinking-state span:first-child { position: relative; width: 30px; height: 14px; }
.thinking-state i { position: absolute; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: thinking-wave 1.2s var(--ease-out) infinite; }
.thinking-state i:nth-child(1) { left: 0; }
.thinking-state i:nth-child(2) { left: 11px; animation-delay: .12s; }
.thinking-state i:nth-child(3) { left: 22px; animation-delay: .24s; }
.thinking-copy { animation: soft-pulse 2s ease-in-out infinite; }
.message.error .content { color: var(--danger); }
.message.error .assistant-orb::before { background: var(--danger); transform: scale(.55); }

.sources { margin-top: 24px; color: var(--muted); }
.sources summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; color: var(--faint); font-size: 11px; cursor: pointer; transition: color .25s; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary::before { content: "+"; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-raised); color: var(--muted); font-size: 14px; transition: transform .45s var(--ease-spring), background .25s; }
.sources summary:hover { color: var(--ink); }
.sources[open] summary::before { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); }
.source-list { display: grid; gap: 2px; margin-top: 11px; animation: source-reveal .38s var(--ease-out) both; }
.source-list a, .source-list span { display: flex; gap: 10px; padding: 8px 0 8px 28px; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.35; transition: color .2s, transform .35s var(--ease-out); }
.source-list a::before, .source-list span::before { content: attr(data-index); color: var(--faint); font-variant-numeric: tabular-nums; }
.source-list a:hover { color: var(--ink); transform: translateX(4px); }

.composer-dock { position: fixed; z-index: 10; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); width: min(760px, calc(100% - 32px)); transform: translateX(-50%); animation: composer-up .9s .52s var(--ease-out) both; }
.composer { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; padding: 11px 11px 9px 19px; border-radius: 22px; background: rgba(28,28,25,.9); box-shadow: 0 18px 65px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.075); backdrop-filter: blur(22px) saturate(1.25); transition: box-shadow .38s, transform .38s var(--ease-out), background .38s; }
.composer:focus-within { background: rgba(31,31,27,.95); box-shadow: 0 22px 75px rgba(0,0,0,.5), 0 0 0 1px rgba(199,243,107,.35); transform: translateY(-2px); }
.composer.is-primed { animation: composer-prime .72s var(--ease-spring); }
textarea { grid-column: 1; width: 100%; min-height: 34px; max-height: 180px; padding: 7px 0 3px; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; line-height: 1.45; }
textarea::placeholder { color: #777770; }
.composer-meta { grid-column: 1; min-height: 14px; display: flex; justify-content: space-between; gap: 14px; color: var(--faint); font-size: 9px; letter-spacing: .02em; transition: opacity .25s; }
#charCount { font-variant-numeric: tabular-nums; }
.composer button { grid-column: 2; grid-row: 1 / span 2; width: 45px; height: 45px; display: grid; place-items: center; border: 0; border-radius: 15px; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform .35s var(--ease-spring), border-radius .35s, opacity .25s, background .25s; }
.composer button:hover:not(:disabled) { transform: scale(1.06) rotate(-2deg); border-radius: 50%; }
.composer button:active:not(:disabled) { transform: scale(.93); }
.composer button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.composer button:disabled { cursor: wait; background: #41413b; }
.send-arrow { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease-spring), opacity .2s; }
.send-loader { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--ink); border-radius: 50%; animation: spin .75s linear infinite; }
.composer.is-sending .send-arrow { display: none; }
.composer.is-sending .send-loader { display: block; }
.disclaimer { margin: 9px 0 0; color: #606059; font-size: 9px; text-align: center; letter-spacing: .025em; }

.access-dialog { width: min(400px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: #1b1b18; box-shadow: 0 30px 100px #000c; }
.access-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(10px); animation: backdrop-in .35s ease both; }
.access-dialog[open] { animation: dialog-in .48s var(--ease-spring) both; }
.access-dialog form { position: relative; padding: 34px; }
.dialog-close { position: absolute; right: 18px; top: 15px; padding: 4px 8px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.dialog-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 23px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 21px; }
.access-dialog h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.access-dialog p { margin: 9px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.access-dialog label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.access-dialog input { width: 100%; padding: 13px 14px; border: 0; border-radius: 12px; outline: 1px solid rgba(255,255,255,.1); background: #10100f; color: var(--ink); }
.access-dialog input:focus { outline-color: var(--accent); }
.dialog-submit { width: 100%; margin-top: 12px; padding: 13px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }

@keyframes reveal-up { from { opacity: 0; transform: translateY(24px); filter: blur(7px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes reveal-down { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes category-enter { from { opacity: 0; transform: translateY(15px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes composer-up { from { opacity: 0; transform: translate(-50%, 25px) scale(.97); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes composer-prime { 0%, 100% { transform: none; } 42% { transform: translateY(-5px) scale(1.012); box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 0 2px rgba(199,243,107,.48); } }
@keyframes line-grow { from { transform: scaleX(0); } }
@keyframes hero-out { to { opacity: 0; transform: translateY(-30px) scale(.985); filter: blur(9px); } }
@keyframes message-in { from { opacity: 0; transform: translateY(20px) scale(.985); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes thinking-wave { 0%, 70%, 100% { transform: translateY(0) scale(.75); opacity: .35; } 35% { transform: translateY(-4px) scale(1); opacity: 1; } }
@keyframes soft-pulse { 50% { opacity: .48; } }
@keyframes orb-breathe { 50% { transform: scale(.9); box-shadow: 0 0 14px rgba(199,243,107,.55); } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes source-reveal { from { opacity: 0; transform: translateY(-7px); } }
@keyframes status-ping { 60%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes mark-spin { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift-one { to { transform: translate(-6vw, 8vh) scale(1.15); } }
@keyframes drift-two { to { transform: translate(9vw, -5vh) scale(.88); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes diagram-card-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes diagram-line { to { stroke-dashoffset: 0; } }
@keyframes diagram-node-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 620px); }
  .topbar { height: 72px; }
  .availability { font-size: 9px; }
  .hero { padding: 62px 0 180px; }
  h1 { font-size: clamp(46px, 14vw, 66px); }
  .lede { font-size: 15px; }
  .agent-connect { grid-template-columns: 1fr; align-items: start; }
  .agent-connect a { width: 100%; }
  .question-explorer { margin-top: 64px; }
  .explorer-heading { grid-template-columns: 1fr; gap: 13px; margin-bottom: 22px; }
  .explorer-heading > p { font-size: 12px; }
  .category { --panel-pad: 0px; }
  .category-trigger { grid-template-columns: 31px minmax(0, 1fr) 26px; gap: 12px; min-height: 72px; padding: 15px 2px; }
  .category-summary { grid-column: 2; margin-top: -10px; font-size: 10px; }
  .category-trigger i { grid-column: 3; grid-row: 1 / span 2; }
  .category-title { font-size: 15px; }
  .category.is-open .category-panel { max-height: 520px; padding-bottom: 24px; }
  .category-hint { margin-top: 2px; padding-left: 43px; font-size: 9px; }
  .question-chips { display: grid; padding-left: 43px; }
  .question-chips button { width: 100%; padding: 11px 12px; border-radius: 10px; text-align: left; }
  .messages { padding-top: 35px; gap: 34px; }
  .message.user { max-width: 88%; }
  .assistant .content { font-size: 15px; line-height: 1.66; }
  .architecture-card { margin-left: -2px; margin-right: -2px; }
  .architecture-card figcaption { position: sticky; left: 0; }
  .composer-dock { bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); }
  .composer { padding-left: 15px; border-radius: 19px; }
  .composer-meta { display: none; }
  .composer button { grid-row: 1; width: 42px; height: 42px; border-radius: 13px; }
  .disclaimer { margin-top: 7px; }
}

@media (max-width: 420px) {
  .availability { font-size: 0; gap: 0; }
  .availability span { display: block; }
  .hero { padding-top: 38px; align-content: start; }
  h1 { font-size: 47px; }
  .lede { margin-top: 22px; }
  .question-explorer { margin-top: 54px; }
  .category-hint, .question-chips { padding-left: 0; }
  .access-dialog form { padding: 28px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ambient { display: none; }
}
