/* Nodal site. Light/dark tokens, docs layout, animated illustrations. */
:root {
  --bg: #f6f6f3; --bg2: #eeede7; --surface: #ffffff; --surface2: #f2f1ec; --border: #dad8cf; --border2: #c7c4b9;
  --text: #16191e; --muted: #535c69; --accent: #8a6410; --accent-bg: #f3e6c3; --accent-ink: #ffffff; --link: #7a5708;
  --code-bg: #ecebe4; --shadow: 0 10px 30px rgba(30, 28, 20, .08);
  --ag1: #c99c3f; --ag2: #2f9e9a; --ag3: #8b6fd6; --ag4: #e0705a; --ag5: #4b8fe0;
  --ac-dot0: #b8860b; --ac-dot1: #1f8f8a; --ac-dot2: #7a5ad0;
  --ok: #1f8a58; --warn: #a86a00; --bad: #c93a3f;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1319; --bg2: #131922; --surface: #1a212b; --surface2: #202936; --border: #2a3441; --border2: #394659;
    --text: #e8ecf1; --muted: #9eabbb; --accent: #d9ac4d; --accent-bg: #2c2410; --accent-ink: #1a1300; --link: #e3bb62;
    --code-bg: #161d27; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --ac-dot0: #e6b94f; --ac-dot1: #4fd1c5; --ac-dot2: #a78bfa;
    --ok: #46c98a; --warn: #e0a43a; --bad: #ef6a6f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1319; --bg2: #131922; --surface: #1a212b; --surface2: #202936; --border: #2a3441; --border2: #394659;
  --text: #e8ecf1; --muted: #9eabbb; --accent: #d9ac4d; --accent-bg: #2c2410; --accent-ink: #1a1300; --link: #e3bb62;
  --code-bg: #161d27; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --ac-dot0: #e6b94f; --ac-dot1: #4fd1c5; --ac-dot2: #a78bfa;
  --ok: #46c98a; --warn: #e0a43a; --bad: #ef6a6f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.7 var(--sans); overflow-x: hidden; }
html.theme-anim body, html.theme-anim body *:not(svg *):not(.msg) { transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease !important; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 20px var(--mono); color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand img { border-radius: 7px; }
.primary { display: flex; gap: 2px; margin-left: 12px; flex: 1; }
.primary a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font: 500 14px var(--sans); white-space: nowrap; }
.primary a:hover, .primary a[aria-current] { color: var(--text); background: var(--surface2); }
.menu { position: relative; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; font: 600 13px var(--mono); padding: 8px 12px; border: 1px solid var(--border2); border-radius: 8px; color: var(--text); background: var(--surface); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " \25BE"; }
.menu[open] summary { background: var(--accent-bg); border-color: var(--accent); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(760px, calc(100vw - 32px)); display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.menu-col h2 { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; }
.menu-col ul { list-style: none; margin: 0; padding: 0; }
.menu-col a { display: block; padding: 4px 0; color: var(--text); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.menu-col a:hover, .menu-col a[aria-current] { color: var(--link); text-decoration: underline; }
.theme-toggle { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden; }
.theme-toggle svg { grid-area: 1/1; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.theme-toggle .i-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="dark"] .theme-toggle .i-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="dark"] .theme-toggle .i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { opacity: 1; transform: none; }
}

/* hero + page head */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; border-bottom: 1px solid var(--border); background:
  radial-gradient(900px 400px at 85% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--bg); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 35%, transparent) 1px, transparent 1.2px); background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); }
html.anim .hero::before { animation: drift 40s linear infinite; }
@keyframes drift { to { background-position: 260px 130px; } }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 12px; }
h1 { font: 800 clamp(34px, 5.2vw, 56px)/1.08 var(--mono); letter-spacing: -.035em; margin: 0 0 18px; }
.lede { font-size: 19.5px; line-height: 1.6; color: var(--muted); max-width: 62ch; margin: 0 0 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; font: 600 14px var(--mono); padding: 11px 18px; border-radius: 10px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s, background .15s; }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.page-head { padding: 38px 0 22px; border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, var(--bg2), var(--bg)); }
.page-head h1 { font-size: clamp(30px, 4.4vw, 46px); }
.crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font: 500 13px var(--mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--muted); }

/* content */
.content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 44px 0 20px; }
.content.has-toc { grid-template-columns: minmax(0, 780px) 250px; justify-content: center; }
.prose { min-width: 0; }
.prose h2 { font: 800 clamp(24px, 3vw, 31px)/1.2 var(--mono); letter-spacing: -.025em; margin: 56px 0 14px; padding-top: 6px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font: 700 19px/1.3 var(--mono); margin: 32px 0 8px; letter-spacing: -.01em; }
.prose p, .prose li { max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 5px 0; }
.prose strong { font-weight: 600; }
.anchor { margin-left: 8px; text-decoration: none; opacity: 0; font-size: .7em; color: var(--muted); }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
code { font: 500 .88em var(--mono); background: var(--code-bg); padding: .12em .4em; border-radius: 6px; border: 1px solid var(--border); }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; font: 500 14px/1.6 var(--mono); }
pre code { border: 0; background: none; padding: 0; }
.toc { position: sticky; top: 84px; align-self: start; font-size: 14px; border-left: 2px solid var(--border); padding-left: 16px; }
.toc h2 { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 6px 0; line-height: 1.35; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.on { color: var(--link); }
table { border-collapse: collapse; width: 100%; margin: 20px 0; font-size: 15px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface2); white-space: nowrap; }
.callout { border: 1px solid var(--border2); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 12px; padding: 14px 18px; margin: 24px 0; }
.callout p { margin: 6px 0; }
.callout strong:first-child { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.cards li { margin: 0; max-width: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.cards li:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.cards h3 { margin: 0 0 6px; font-size: 16.5px; }
.cards p { margin: 0; font-size: 15px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; padding: 0; list-style: none; }
.stats li { margin: 0; max-width: none; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.stats b { display: block; font: 800 26px var(--mono); color: var(--accent); letter-spacing: -.03em; }
.stats span { font-size: 13.5px; color: var(--muted); line-height: 1.4; display: block; }
.timeline { list-style: none; padding: 0 0 0 22px; margin: 24px 0; border-left: 2px solid var(--border2); }
.timeline li { position: relative; margin: 0 0 22px; max-width: none; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.timeline time { display: block; font: 700 12.5px var(--mono); color: var(--accent); letter-spacing: .04em; }
.shot { margin: 28px 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border2); box-shadow: var(--shadow); background: var(--surface); }
.shot img.narrow { width: auto; max-width: min(100%, 420px); }
.shot figcaption, .demo figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pair .shot { margin: 20px 0; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: 10px 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font: 700 16px var(--mono); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 18px 12px; }
.related { margin: 40px 0 60px; }
.related h2 { font: 800 22px var(--mono); margin: 0 0 14px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.rel-card { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; color: var(--text); transition: transform .2s, border-color .2s; }
.rel-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.rel-card strong { display: block; font: 700 15px var(--mono); margin-bottom: 4px; color: var(--link); }
.rel-card span { font-size: 14px; color: var(--muted); line-height: 1.45; display: block; }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg2); padding: 40px 0 30px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.foot-grid h2 { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 5px 0; }
.foot-grid a { color: var(--text); text-decoration: none; }
.foot-grid a:hover { color: var(--link); text-decoration: underline; }
.foot-note { margin: 30px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; max-width: 110ch; }

/* ---------- avatars ---------- */
.bot { overflow: visible; display: block; color: var(--text); }
.bot .body { transform-box: view-box; transform-origin: 32px 58px; }
.bot .eye { transform-box: fill-box; transform-origin: center; }
.bot .pupil { transform: translate(calc(var(--lx, 0) * 1px), calc(var(--ly, 0) * 1px)); transition: transform .12s ease-out; }
.bot .happy, .bot .spinner, .bot .badge { opacity: 0; }
.bot .spinner { transform-box: view-box; transform-origin: 32px 36px; }
.bot[data-state="working"] .spinner { opacity: .95; }
.bot[data-state="needs"] .bang { opacity: 1; }
.bot[data-state="done"] .tick { opacity: 1; }
.bot[data-state="done"] .eye { opacity: 0; }
.bot[data-state="done"] .happy { opacity: 1; }
.bot[data-state="needs"] .eye { transform: scale(1.22); }
.bot[data-state="needs"] .mouth { d: path("M29 45.5H35"); }
.bot[data-state="working"] .mouth { opacity: .35; }
html.anim .bot .eye { animation: blink 5.2s infinite; animation-delay: var(--bd, 0s); }
html.anim .bot[data-state="needs"] .eye { animation: blink-wide 3.4s infinite; animation-delay: var(--bd, 0s); }
html.anim .bot[data-state="done"] .eye { animation: none; }
html.anim .bot[data-state="working"] .pupil { animation: scan 1.5s ease-in-out infinite; }
html.anim .bot[data-state="working"] .spinner { animation: spin 1.1s linear infinite; }
html.anim .bot[data-state="needs"] .body { animation: bounce 1s cubic-bezier(.3, 0, .3, 1) infinite; }
html.anim .bot[data-state="needs"] .bang { animation: pulse 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
html.anim .bot[data-state="done"] .tick { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
html.anim .bot .tip { animation: tipglow 2.6s ease-in-out infinite; }
.bot[data-state="needs"] .eye { transform: scale(1.22); }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes blink-wide { 0%, 93%, 100% { transform: scale(1.22); } 96% { transform: scale(1.22, .1); } }
@keyframes scan { 0%, 100% { transform: translateX(-2.6px); } 50% { transform: translateX(2.6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 55% { transform: translateY(0) scale(1.03, .96); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes tipglow { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.hero-bots { list-style: none; margin: 0; padding: 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--border2); border-radius: 22px; box-shadow: var(--shadow); max-width: 460px; margin-inline: auto; }
.bot-card { margin: 0; max-width: none; display: grid; justify-items: center; gap: 4px; padding: 10px 6px 12px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.bot-card svg { width: 92px; height: 92px; }
.bot-name { font: 700 14px var(--mono); }
.bot-state { font: 600 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; min-width: 8ch; text-align: center; }
.state-grid, .roster { list-style: none; padding: 0; display: grid; gap: 14px; margin: 24px 0; }
.state-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.state-card { margin: 0; max-width: none; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 14px; }
.state-card svg { margin: 0 auto; }
.state-card h3 { margin: 10px 0 4px; font-size: 16px; }
.state-card p { font-size: 14.5px; color: var(--muted); margin: 0 auto; }
.roster { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.roster li { margin: 0; max-width: none; text-align: center; font: 700 13px var(--mono); }
.roster svg { margin: 0 auto 4px; }

/* ---------- demos ---------- */
.demo { margin: 30px 0; background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 0 0 12px; box-shadow: var(--shadow); overflow: hidden; }
.demo figcaption { padding: 0 18px; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface2); border-bottom: 1px solid var(--border); font: 700 13px var(--mono); }
.pill { font: 600 11px var(--mono); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border2); color: var(--muted); background: var(--bg); }
/* notification demo */
.notif-body { padding: 16px; display: grid; gap: 12px; min-height: 330px; align-content: start; }
.ncard { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--border2); border-left: 4px solid var(--bad); border-radius: 12px; background: var(--bg); }
.ncard svg { flex: none; }
.ncard-text strong { font: 700 15px var(--mono); }
.ncard-text p { margin: 4px 0 10px; font-size: 15px; }
.nbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.nbtn { font: 600 12px var(--mono); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface); }
.nbtn-primary { background: var(--ok); border-color: var(--ok); color: #fff; }
.mic-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px dashed var(--border2); border-radius: 12px; }
.mic-ico { color: var(--accent); display: grid; }
.wave { display: flex; align-items: center; gap: 3px; height: 28px; flex: 1; }
.wave i { display: block; width: 4px; height: 100%; border-radius: 3px; background: var(--accent); transform: scaleY(.25); transform-origin: center; opacity: .8; }
.mic-label { font: 600 12px var(--mono); color: var(--muted); }
.dictated { margin: 0; font: 500 15px/1.5 var(--mono); padding: 10px 14px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--border); }
.reply-line { margin: 0; font: 600 14px var(--mono); color: var(--ok); }
.reply-line .check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 12px; margin-right: 6px; }
html.anim .notif .wave i { animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * -.09s); }
@keyframes wave { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
.notif[data-play] .ncard { animation: slidein .6s cubic-bezier(.2, .9, .3, 1) both; }
.notif[data-play] .mic-row { animation: fadeup .4s .5s both; }
.notif[data-play] .dictated { animation: fadeup .4s .9s both; }
.notif[data-play] .reply-line { opacity: 0; }
.notif[data-play][data-stage="done"] .reply-line { animation: fadeup .5s both; }
.notif[data-play] .wave i { animation-play-state: running; }
.notif[data-stage="done"] .wave i { animation: none; transform: scaleY(.18); }
@keyframes slidein { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* typed text */
.typer.typing .c:not(.on), .tl.typing .c:not(.on), .tl.pending .c { visibility: hidden; }
.typer.typing::after, .tl.typing::after { content: "\2588"; color: var(--accent); animation: caret .8s steps(1) infinite; margin-left: 1px; }
@keyframes caret { 50% { opacity: 0; } }
/* tab demo */
.tab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; }
.pane { border: 1px solid var(--border2); border-radius: 10px; overflow: hidden; background: #0d1218; min-width: 0; }
.pane-head { display: flex; gap: 8px; align-items: center; padding: 7px 12px; font: 600 12px var(--mono); color: #c6d0dc; background: #18202a; border-bottom: 1px solid #2a3441; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #7d8a99; }
.dot-work { background: #46c98a; } .dot-need { background: #ef6a6f; }
html.anim .dot-work { animation: dotp 1.2s ease-in-out infinite; }
html.anim .dot-need { animation: dotp .8s ease-in-out infinite; }
@keyframes dotp { 50% { transform: scale(1.5); opacity: .6; } }
.term { margin: 0; border: 0; border-radius: 0; background: #0d1218; color: #d7dee7; font: 500 12.5px/1.65 var(--mono); padding: 12px; min-height: 168px; white-space: pre-wrap; word-break: break-word; }
.term .tl { display: block; min-height: 1.65em; }
.term b { color: #7fb7ff; font-weight: 600; }
.term .dim { color: #8c99a8; } .term .ok { color: #46c98a; } .term .warn { color: #e8b04a; }
/* agent demo */
.chat { padding: 16px; display: grid; gap: 14px; min-height: 250px; align-content: start; }
.bubble.user { justify-self: end; background: color-mix(in srgb, var(--ag5) 38%, var(--surface)); border: 1px solid var(--border2); border-radius: 14px; padding: 10px 14px; max-width: 80%; font-size: 15px; }
.reply p { margin: 0 0 10px; font-size: 15.5px; }
.turn-line { font: 500 13px var(--mono); color: var(--muted); display: flex; gap: 8px; align-items: center; min-height: 22px; }
.spin-dot { display: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; }
.turn-working { display: none; }
.composer-mock { margin: 0 16px; padding: 12px 14px; border: 1px solid var(--border2); border-radius: 12px; display: flex; justify-content: space-between; color: var(--muted); font: 500 13px var(--mono); background: var(--bg); }
.agentdemo[data-stage="working"] .spin-dot { display: inline-block; animation: spin .8s linear infinite; }
.agentdemo[data-stage="working"] .turn-working { display: inline; }
.agentdemo[data-stage="working"] .turn-done { display: none; }
/* graph */
.graph-svg { width: 100%; height: auto; display: block; background: radial-gradient(60% 60% at 50% 50%, color-mix(in srgb, var(--accent) 8%, transparent), transparent); }
.graph .link { stroke: var(--border2); stroke-width: 2; stroke-dasharray: 5 6; }
html.anim .graph .link { animation: dash 14s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -220; } }
.graph .hub rect { fill: var(--accent-bg); stroke: var(--accent); stroke-width: 2; }
.graph .hub text { fill: var(--text); font: 700 14px var(--mono); }
.graph .node-label { fill: var(--text); font: 700 12px var(--mono); }
.graph .msg { filter: drop-shadow(0 0 4px currentColor); }
html:not(.anim) .graph .msg { display: none; }
.graph.static-msgs .msg { display: none; }

/* scroll reveal (progressive enhancement) */
html.anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
html.anim .reveal.in { opacity: 1; transform: none; }

/* print / responsive */
@media (max-width: 1100px) {
  .content.has-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .primary { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .menu-panel { grid-template-columns: repeat(2, 1fr); }
  .pair, .tab-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .ncard { flex-direction: column; }
  .bar { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .graph .msg { display: none; }
  .wave i { transform: scaleY(.55); }
}
