/* Base ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: var(--text-base)/var(--leading-body) var(--font); -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 88px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
code, pre, .mono { font-family: var(--font-mono); }
button, summary { cursor: pointer; }
button { color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* Type scale: three heading levels, one body size, one lede, two small sizes */
h1, h2, h3 { font-weight: 560; letter-spacing: -.035em; line-height: var(--leading-tight); text-wrap: balance; }
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); letter-spacing: -.02em; line-height: var(--leading-snug); }
p { color: var(--muted); }
p + p { margin-top: 16px; }
.lede { font-size: var(--text-lg); line-height: 1.55; max-width: 60ch; }
h1 + .lede, h2 + .lede { margin-top: 16px; }
.eyebrow, .status { display: block; font-size: var(--text-sm); font-weight: 500; letter-spacing: .01em; color: var(--muted); margin-bottom: 18px; }
.small { font-size: var(--text-sm); }
.caption { font-size: var(--text-xs); color: var(--faint); }
.num { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 500; color: var(--accent); letter-spacing: 0; }

.wrap { width: min(calc(100% - 64px), var(--content)); margin-inline: auto; }
/* Two width tiers: .wrap keeps reading copy at a measured line length, .wide lets visual blocks fill the page. */
.wide { width: min(calc(100% - 96px), 1720px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 16px; padding: 10px 16px; color: var(--accent-ink); background: var(--accent); transform: translateY(-180%); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 560; }
.skip-link:focus { transform: none; }

/* Buttons and links ------------------------------------------------------ */
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; padding: 12px 20px; min-height: 46px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-weight: 560; font-size: var(--text-sm); color: var(--fg); background: transparent; text-align: center; white-space: nowrap; transition: background .18s, border-color .18s, color .18s; }
.button:hover { background: var(--surface-raised); border-color: var(--fg); }
.button-primary { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.button-primary:hover { color: var(--accent-ink); background: var(--accent-hover); border-color: var(--accent-hover); }
.button-small { min-height: 40px; padding: 8px 14px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--text-sm); font-weight: 560; color: var(--fg); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 5px; }
.text-link:hover { text-decoration-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }

/* Header ----------------------------------------------------------------- */
.site-header { position: sticky; z-index: 20; top: 0; height: var(--header-height); background: rgb(15 16 18 / .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: var(--text-lg); font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.brand img { width: 26px; height: auto; }
.desktop-nav { display: flex; align-items: center; gap: 4px; }
.desktop-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 500; color: var(--muted); }
.desktop-nav a:hover { color: var(--fg); background: var(--surface); }
.desktop-nav a[aria-current] { color: var(--fg); }
.desktop-nav a[aria-current]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 12px; min-height: 40px; font-size: var(--text-sm); font-weight: 560; }
.mobile-nav { position: absolute; top: calc(var(--header-height) - 1px); inset-inline: 0; padding: 12px; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); background: var(--bg); }
.mobile-nav a { display: block; padding: 10px 12px; min-height: 44px; border-radius: var(--radius-sm); font-weight: 500; }
.mobile-nav a:hover { background: var(--surface); }
.mobile-nav a[aria-current] { color: var(--fg); box-shadow: inset 3px 0 0 var(--accent); background: var(--surface); }
@media (min-width: 761px) { .mobile-nav { display: none; } }
html:not(.js) .menu-toggle { display: none; }

/* Section rhythm --------------------------------------------------------- */
.section { padding-block: var(--space-7); }
.surface { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.section-head .lede { margin: 0; }
.split { display: grid; grid-template-columns: 5fr 7fr; align-items: start; gap: 56px; }
.split > * { min-width: 0; }
.split .lede { margin-top: 0; }
.split h2 + .lede { margin-top: 20px; }
.lede + .text-link, .lede + .actions { margin-top: 20px; }
.section-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: var(--text-sm); }
.subtitle { font-size: var(--text-2xl); }

/* Home: full-viewport hero over the arc background --------------------- */
.hero { position: relative; display: grid; align-items: center; min-height: calc(100svh - var(--header-height)); padding-block: 72px 96px; overflow: clip; text-align: center; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: var(--bg) radial-gradient(90% 70% at 50% 100%, rgb(244 245 246 / .14), transparent 62%); will-change: transform; }
.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.hero-bg.is-live { background: var(--bg); }
.hero-bg.is-live canvas { display: block; }
.hero-bg::before { content: ''; position: absolute; inset: 0; background: radial-gradient(55% 42% at 50% 56%, rgb(15 16 18 / .82), transparent 72%); }
.hero-copy { position: relative; will-change: transform, opacity; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hero-bg, .hero-copy { animation: linear both; animation-timeline: view(); animation-range: exit; }
    .hero-bg { animation-name: hero-bg-drift; }
    .hero-copy { animation-name: hero-copy-drift; }
  }
}
@keyframes hero-bg-drift { to { transform: translate3d(0, 35%, 0); } }
@keyframes hero-copy-drift { 62.5% { opacity: 0; } to { transform: translate3d(0, 18svh, 0); opacity: 0; } }
.hero h1 { max-width: 32ch; margin-inline: auto; font-size: clamp(44px, 6vw, 84px); line-height: 1.02; letter-spacing: -.03em; }
.hero .lede { margin: 32px auto 0; max-width: 54ch; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.5; color: var(--fg); opacity: .78; }
.hero .actions { justify-content: center; margin-top: 44px; }
.demo-screen { padding-block: 24px var(--space-7); }
.demo-screen.wide { width: min(calc(100% - 200px), 1440px); }
/* Expanding arrow button, after beui.dev's motion component, in plain CSS: an accent tile that grows into a dotted trail on hover or focus. */
.arrow-button { position: relative; display: inline-flex; align-items: center; height: 64px; min-width: 288px; padding: 6px; border-radius: 22px; background: var(--fg); color: var(--bg); overflow: hidden; user-select: none; text-decoration: none; transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.arrow-button:active { transform: scale(.97); }
.arrow-button-tile { position: absolute; top: 6px; bottom: 6px; left: 6px; width: 52px; border-radius: 16px; overflow: hidden; background: var(--bg); color: var(--fg); transition: width .5s cubic-bezier(.2, 1.15, .35, 1); }
.arrow-button-idle { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .1s cubic-bezier(.16, 1, .3, 1); }
.arrow-button-trail { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-around; padding: 0 12px; }
.arrow-button svg { width: 20px; height: 28px; }
.arrow-button-trail svg { opacity: 0; transform: translateX(-6px); transition: opacity .18s cubic-bezier(.16, 1, .3, 1), transform .18s cubic-bezier(.16, 1, .3, 1); }
.arrow-button-trail svg:nth-child(1) { --o: 1; transition-delay: .04s; } .arrow-button-trail svg:nth-child(2) { --o: .78; transition-delay: .065s; } .arrow-button-trail svg:nth-child(3) { --o: .54; transition-delay: .09s; } .arrow-button-trail svg:nth-child(4) { --o: .32; transition-delay: .115s; } .arrow-button-trail svg:nth-child(5) { --o: .16; transition-delay: .14s; }
.arrow-button-label { position: relative; margin: 0 20px 0 76px; font-size: var(--text-lg); font-weight: 500; letter-spacing: -.02em; white-space: nowrap; transition: opacity .12s cubic-bezier(.16, 1, .3, 1), transform .12s cubic-bezier(.16, 1, .3, 1); }
.arrow-button:focus-visible .arrow-button-tile { width: calc(100% - 12px); }
.arrow-button:focus-visible .arrow-button-idle { opacity: 0; }
.arrow-button:focus-visible .arrow-button-trail svg { opacity: var(--o); transform: none; }
.arrow-button:focus-visible .arrow-button-label { opacity: 0; transform: translateX(6px); }
@media (hover: hover) {
  .arrow-button:hover .arrow-button-tile { width: calc(100% - 12px); }
  .arrow-button:hover .arrow-button-idle { opacity: 0; }
  .arrow-button:hover .arrow-button-trail svg { opacity: var(--o); transform: none; }
  .arrow-button:hover .arrow-button-label { opacity: 0; transform: translateX(6px); }
}
/* Home: Team mode rebuilt in HTML on a fixed canvas that team-demo.js scales to the column and plays through. Sizes and colors follow the desktop client's light theme (Radix gray scale, monochrome accent, purple only for work). */
.team-demo { --td-bg: #fcfcfc; --td-surface: #f9f9f9; --td-alt: #f0f0f0; --td-nav: #f4f4f3; --td-fg: #202020; --td-muted: #646464; --td-subtle: #838383; --td-border: #d9d9d9; --td-border-strong: #cecece; --td-border-soft: #e8e8e8; --td-accent: #6d4aff; --td-accent-strong: #5f3fe6; --td-accent-soft: rgb(109 74 255 / .1); --td-review: #4f46e5; --td-review-bg: rgb(99 102 241 / .16); --td-blocked: #dc2626; --td-blocked-bg: rgb(239 68 68 / .16); --td-online: #10b981; }
.td-stage { position: relative; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--td-bg); box-shadow: 0 30px 80px -40px rgb(0 0 0 / .8); }
.td-stage img { width: 100%; }
.td-canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; background: var(--td-bg); color: var(--td-fg); font: 13px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif; letter-spacing: -.01em; text-align: left; }
.td-canvas p { margin: 0; color: inherit; }
.td-canvas strong { font-weight: 600; }
.td-canvas svg { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.td-canvas code { font: 12px/1 "SF Mono", "JetBrains Mono", ui-monospace, monospace; padding: 1px 5px; border: 1px solid var(--td-border-soft); border-radius: 5px; background: var(--td-alt); white-space: nowrap; }
.td-app { position: relative; display: grid; grid-template-columns: 272px minmax(0, 1fr); width: 100%; height: 100%; overflow: hidden; }
.td-caption { min-height: 24px; margin-top: 20px; font-size: var(--text-sm); color: var(--muted); text-align: center; }
.td-switch { display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 auto 20px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: rgb(255 255 255 / .04); }
.td-switch button { min-width: 96px; min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: var(--text-sm); font-weight: 550; color: var(--muted); cursor: pointer; transition: background .18s, color .18s; }
.td-switch button:hover { color: var(--fg); }
.td-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.td-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.td-modes span[data-mode] { cursor: pointer; }
.td-plan { flex: none; margin: 12px 20px 0; padding: 4px 12px 6px; border: 1px solid var(--td-border-soft); border-radius: 12px; background: var(--td-surface); }
.td-plan-head { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 12px; color: var(--td-muted); }
.td-plan-head strong { color: var(--td-fg); }
.td-plan-head span { display: inline-flex; align-items: center; gap: 5px; }
.td-plan-head small { margin-left: auto; font-size: 11px; color: var(--td-subtle); }
.td-plan-row { display: flex; align-items: center; gap: 8px; min-height: 27px; border-top: 1px solid var(--td-border-soft); font-size: 12px; }
.td-plan-row > i { width: 12px; font-style: normal; font-size: 11px; color: var(--td-subtle); text-align: center; }
.td-plan-row b { flex: none; width: 44px; font-weight: 600; }
.td-plan-row .td-plan-t { flex: 1; min-width: 0; overflow: hidden; color: var(--td-muted); white-space: nowrap; text-overflow: ellipsis; }
.td-plan-row em { flex: none; font-style: normal; font-size: 11px; color: var(--td-subtle); }
.td-plan-row.is-done .td-plan-t { color: var(--td-subtle); }
.td-plan-row.is-in_progress b, .td-plan-row.is-in_review b { color: var(--td-accent-strong); }
.is-narrow .td-plan-row { display: none; }
.td-fresh { animation: td-in .32s cubic-bezier(.22, .8, .2, 1) both; }
@keyframes td-in { from { opacity: 0; transform: translateY(6px); } }
[data-t].is-pressed { filter: brightness(.94); }
.td-cursor { position: absolute; top: 0; left: 0; z-index: 5; width: 20px; height: 24px; pointer-events: none; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .35)); transition: transform .5s cubic-bezier(.3, .8, .3, 1); }
.td-cursor svg { width: 20px; height: 24px; stroke-width: 1.5; }
.td-cursor svg { transition: transform .12s; }
.td-cursor.is-down svg { transform: scale(.85); }
/* Avatars: rounded-square package art with a presence dot; local coding agents are a dark logo tile; groups are a member cluster */
.td-av { position: relative; display: inline-block; flex: none; }
.td-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.td-av-local { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 22%; background: #18181b; }
.td-av-local img { filter: brightness(0) invert(1); }
.td-av-user { display: grid; place-items: center; width: 100%; height: 100%; padding: 24%; border-radius: 50%; background: #18181b; }
.td-av-user img { width: 100%; height: auto; }
.td-dot { position: absolute; right: -2px; bottom: -2px; border: 2px solid var(--td-bg); border-radius: 50%; background: var(--td-online); }
.td-dot.is-busy { background: #fbbf24; }
.td-gav { position: relative; display: inline-block; flex: none; }
.td-gav img { position: absolute; width: 60%; height: 60%; border: 2px solid var(--td-nav); border-radius: 9px; object-fit: cover; }
.td-gav[data-count="2"] img:nth-child(1) { top: 0; left: 0; } .td-gav[data-count="2"] img:nth-child(2) { right: 0; bottom: 0; }
.td-gav[data-count="3"] img:nth-child(1) { top: 0; left: 20%; } .td-gav[data-count="3"] img:nth-child(2) { bottom: 0; left: 0; } .td-gav[data-count="3"] img:nth-child(3) { right: 0; bottom: 0; }
.td-gav[data-count="4"] img { width: 56%; height: 56%; } .td-gav[data-count="4"] img:nth-child(1) { top: 0; left: 0; } .td-gav[data-count="4"] img:nth-child(2) { top: 0; right: 0; } .td-gav[data-count="4"] img:nth-child(3) { bottom: 0; left: 0; } .td-gav[data-count="4"] img:nth-child(4) { right: 0; bottom: 0; }
.td-stack { display: inline-flex; }
.td-stack .td-av { box-shadow: 0 0 0 2px var(--td-bg); }
.td-stack .td-av + .td-av { margin-left: -6px; }
.td-ib { display: inline-grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--td-muted); }
.td-ib svg { width: 15px; height: 15px; }
/* Sidebar */
.td-sidebar { display: flex; flex-direction: column; min-height: 0; padding: 0 12px; border-right: 1px solid var(--td-border-soft); background: var(--td-nav); }
.td-lights { display: flex; align-items: center; gap: 8px; height: 38px; padding-left: 8px; }
.td-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.td-lights i:nth-child(2) { background: #febc2e; } .td-lights i:nth-child(3) { background: #28c840; }
.td-brand { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px; margin-bottom: 10px; }
.td-brand img { width: 22px; height: 16px; object-fit: contain; }
.td-brand strong { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.td-brand .td-ib { margin-left: auto; }
.td-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; height: 32px; padding: 3px; border-radius: 10px; background: #e9e9e8; }
.td-modes span { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--td-muted); }
.td-modes span.is-active { background: var(--td-bg); color: var(--td-fg); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.td-modes svg { width: 14px; height: 14px; }
.td-navbtn { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 13px; }
.td-navbtn:first-of-type { margin-top: 8px; }
.td-navbtn svg { width: 15px; height: 15px; color: var(--td-muted); }
.td-search { display: flex; align-items: center; gap: 8px; height: 35px; margin: 0 0 8px; padding: 0 10px; border: 1px solid var(--td-border-soft); border-radius: 8px; background: var(--td-alt); font-size: 13px; color: var(--td-subtle); }
.td-search svg { width: 14px; height: 14px; }
.td-sec { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 4px; font: 11.5px/1 "SF Mono", "JetBrains Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: .045em; color: var(--td-muted); }
.td-sec svg { width: 14px; height: 14px; color: var(--td-subtle); }
.td-secbadges { display: inline-flex; gap: 4px; margin-left: auto; }
.td-b { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; font: 10px/1.5 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-weight: 600; letter-spacing: 0; }
.td-b svg { width: 11px; height: 11px; color: inherit; }
.td-b-review { background: var(--td-review-bg); color: var(--td-review); }
.td-b-blocked { background: var(--td-blocked-bg); color: var(--td-blocked); }
.td-scroll { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.td-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 10px; min-height: 56px; margin-bottom: 2px; padding: 7px 8px; border: 1px solid transparent; border-radius: 12px; }
.td-row .td-av { margin-top: 1px; }
.td-row.is-active { border-color: var(--td-border-strong); background: var(--td-bg); box-shadow: 0 1px 3px rgb(32 32 32 / .08); }
.td-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.td-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.td-row-head strong { overflow: hidden; font-size: 13px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.td-row-head small { flex: none; font-size: 11px; color: var(--td-subtle); }
.td-row-flag { font-size: 12px; color: var(--td-fg); }
.td-row-line { overflow: hidden; font-size: 12px; color: var(--td-subtle); white-space: nowrap; text-overflow: ellipsis; }
.td-foot { display: flex; flex: none; align-items: center; gap: 8px; height: 56px; margin-top: auto; padding: 0 8px; border-top: 1px solid var(--td-border-soft); font-size: 13px; font-weight: 500; }
.td-foot .td-ib { margin-left: auto; }
/* Conversation pane */
.td-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--td-bg); }
.td-head { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; }
.td-head-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-head-id strong { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; }
.td-head-id small { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--td-subtle); white-space: nowrap; }
.td-star svg { width: 13px; height: 13px; color: var(--td-subtle); }
.td-head-right { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
.td-tagline { overflow: hidden; font-size: 12px; color: var(--td-muted); white-space: nowrap; text-overflow: ellipsis; }
.td-tabs { display: flex; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--td-border-soft); }
.td-tabs span { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 12px; font-weight: 550; color: var(--td-muted); }
.td-tabs span::after { content: ''; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--td-accent); opacity: 0; }
.td-tabs span.is-active { color: var(--td-fg); }
.td-tabs span.is-active::after { opacity: 1; }
.td-tabs svg { width: 14px; height: 14px; }
.td-tabbadge { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--td-accent); color: #fff; font-size: 10px; font-style: normal; font-weight: 650; }
.td-stream { display: flex; flex: 1; flex-direction: column; gap: 16px; min-height: 0; padding: 16px 20px 8px; overflow: hidden; }
.td-hint { font-size: 12px; color: var(--td-subtle); text-align: center; }
.td-msg { display: flex; align-items: flex-start; gap: 10px; }
.td-msg.is-own { flex-direction: row-reverse; }
.td-msg-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(88%, 920px); }
.td-msg.is-own .td-msg-body { align-items: flex-end; max-width: min(72%, 760px); }
.td-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; padding: 0 2px; }
.td-msg.is-own .td-meta { flex-direction: row-reverse; }
.td-meta strong { font-size: 12px; font-weight: 500; }
.td-meta small { font-size: 10px; color: var(--td-subtle); }
.td-addr { font-size: 10px; font-weight: 500; color: var(--td-muted); }
.td-summary-tag { padding: 1px 6px; border-radius: 999px; background: rgb(245 158 11 / .16); color: #b45309; font-size: 10px; font-weight: 650; }
.td-bubble { min-width: 0; max-width: 72ch; font-size: 14px; line-height: 1.68; overflow-wrap: anywhere; }
.td-bubble-own { padding: 9px 12px; border-radius: 14px 4px 14px 14px; background: var(--td-fg); color: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.td-bubble-own code { border-color: rgb(255 255 255 / .2); background: rgb(255 255 255 / .12); color: #fff; }
.td-mention { font-weight: 600; color: var(--td-accent-strong); }
.td-bubble-own .td-mention { color: #c9bdff; }
.td-quote { display: flex; flex-direction: column; max-width: 440px; margin-bottom: 6px; padding: 2px 8px; border-left: 2px solid rgb(109 74 255 / .55); font-size: 11px; line-height: 1.5; }
.td-quote span:first-child { font-weight: 620; color: var(--td-accent-strong); }
.td-quote span:last-child { overflow: hidden; color: var(--td-muted); white-space: nowrap; text-overflow: ellipsis; }
.td-run { min-height: 24px; font-size: 12px; line-height: 24px; color: var(--td-muted); }
.td-tools { display: flex; align-items: center; gap: 6px; padding: 0 2px 6px; font-size: 11px; color: var(--td-muted); }
.td-tools svg { width: 11px; height: 11px; }
.td-text p + p, .td-text p + ol { margin-top: 8px; }
.td-text ol { margin: 0; padding-left: 20px; }
.td-text li + li { margin-top: 4px; }
.td-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 9px; border: 1px solid var(--td-border); border-radius: 8px; background: var(--td-surface); font-size: 12px; }
.td-file svg { width: 14px; height: 14px; color: var(--td-muted); }
.td-file small { font-size: 11px; color: var(--td-subtle); }
.td-claim { display: flex; align-items: center; gap: 8px; width: fit-content; padding: 7px 12px; border: 1px solid var(--td-border-soft); border-radius: 10px; background: var(--td-surface); font-size: 12px; color: var(--td-muted); }
.td-claim > svg { width: 14px; height: 14px; color: var(--td-accent); }
.td-claim small { font-size: 11px; color: var(--td-subtle); }
.td-presence { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; padding: 5px 12px 5px 46px; font-size: 11px; color: var(--td-muted); }
.td-presence i { width: 5px; height: 5px; border-radius: 50%; background: var(--td-accent); }
.td-typing { display: inline-flex; gap: 3px; padding: 4px 6px; border: 1px solid var(--td-border-soft); border-radius: 999px; }
.td-typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--td-subtle); animation: td-dot 1s ease-in-out infinite; }
.td-typing i:nth-child(2) { animation-delay: .15s; } .td-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes td-dot { 50% { opacity: .25; transform: translateY(-2px); } }
/* Work card in the thread */
.td-card { width: min(100%, 620px); margin-top: 10px; padding: 10px 12px 11px; border: 1px solid var(--td-border); border-radius: 11px; background: var(--td-surface); font-size: 12px; }
.td-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.td-card-head > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--td-muted); }
.td-card-head svg { width: 13px; height: 13px; }
.td-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--td-alt); font-size: 10px; font-weight: 620; color: var(--td-muted); white-space: nowrap; }
.td-pill.is-in_progress, .td-pill.is-in_review { background: var(--td-accent-soft); color: var(--td-accent-strong); }
.td-pill.is-done { background: rgb(32 32 32 / .1); color: var(--td-fg); }
.td-card-sum { font-size: 13px; line-height: 1.45; color: var(--td-fg); }
.td-card-roster { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--td-muted); }
.td-card-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.td-btn { display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 10px; border: 1px solid var(--td-border); border-radius: 8px; background: var(--td-bg); font-size: 12px; font-weight: 500; white-space: nowrap; }
.td-btn-ghost { border-color: transparent; background: transparent; color: var(--td-muted); }
.td-btn-primary { border-color: var(--td-fg); font-weight: 600; }
/* Composer */
.td-composer { margin: 8px 16px 14px; padding: 10px 12px 8px; border: 1px solid var(--td-border-strong); border-radius: 14px; background: var(--td-surface); box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 10px 28px rgb(0 0 0 / .075); }
.td-composer-hint { margin: -8px 16px 14px; font-size: 11px; color: var(--td-subtle); }
.td-input { min-height: 44px; padding: 2px 2px 6px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.td-ph { color: var(--td-subtle); }
.td-caret { display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--td-fg); animation: td-blink 1s steps(2) infinite; }
@keyframes td-blink { to { opacity: 0; } }
.td-composer-bar { display: flex; align-items: center; gap: 4px; }
.td-intent { display: inline-flex; gap: 2px; margin-right: 6px; padding: 2px; border-radius: 8px; background: rgb(0 0 0 / .06); }
.td-intent span { padding: 3px 10px; border-radius: 6px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--td-muted); }
.td-intent span.is-active { background: var(--td-accent-soft); color: var(--td-accent-strong); box-shadow: inset 0 0 0 1px rgb(109 74 255 / .25); }
.td-send { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border: 1px solid var(--td-border); border-radius: 50%; color: var(--td-subtle); }
.td-send svg { width: 14px; height: 14px; stroke-width: 1.8; }
.td-send.is-ready { border-color: var(--td-accent); background: var(--td-accent); color: #fff; }
/* Work and Files projections */
.td-panel { flex: 1; min-height: 0; overflow: hidden; }
.td-work { padding: 14px 20px; }
.td-panel-top { display: flex; align-items: baseline; gap: 10px; min-height: 32px; }
.td-panel-top strong { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; }
.td-panel-top small { font-size: 11px; color: var(--td-subtle); }
.td-more { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 12px; color: var(--td-muted); }
.td-filter { display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; font-size: 12px; color: var(--td-muted); }
.td-select { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--td-border); border-radius: 8px; background: var(--td-bg); color: var(--td-fg); }
.td-gtitle { margin-bottom: 8px; font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--td-subtle); }
.td-gtitle b { margin-left: 4px; color: var(--td-fg); }
.td-work-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px; border: 1px solid var(--td-border-soft); border-radius: 12px; background: var(--td-surface); }
.td-work-row strong { display: block; overflow: hidden; font-size: 13px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }
.td-work-row .td-owner { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--td-muted); }
.td-work-row .td-owner small { font-size: 11px; color: var(--td-subtle); }
.td-work-row > svg { color: var(--td-subtle); }
.td-diag { display: flex; align-items: center; gap: 2px; margin-top: 18px; font-size: 12px; color: var(--td-muted); }
.td-empty { padding: 24px 0; font-size: 12px; color: var(--td-subtle); text-align: center; }
.td-files { display: flex; flex-direction: column; }
.td-files-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--td-border-soft); font-size: 12px; color: var(--td-subtle); }
.td-files-search { display: inline-flex; flex: 1; align-items: center; gap: 8px; }
.td-files-bar small { font-size: 11px; }
.td-files-grid { display: grid; flex: 1; grid-template-columns: minmax(210px, .6fr) minmax(0, 1.4fr); min-height: 0; }
.td-files-list { padding: 14px 12px; border-right: 1px solid var(--td-border-soft); background: rgb(240 240 240 / .42); }
.td-files-list .td-gtitle { font-size: 9px; padding: 0 6px; }
.td-file-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.td-file-row.is-active { background: var(--td-accent-soft); }
.td-file-row svg { width: 14px; height: 14px; color: var(--td-muted); }
.td-file-row span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.td-file-row small { font-size: 11px; color: var(--td-subtle); }
.td-files-preview { min-width: 0; padding: 14px 20px; }
.td-preview-head { display: flex; align-items: center; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--td-border-soft); font-size: 12px; }
.td-preview-head strong { flex: 1; font-weight: 600; }
.td-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 7px; background: rgb(0 0 0 / .06); }
.td-seg span { padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 600; color: var(--td-muted); }
.td-seg span.is-active { background: var(--td-bg); color: var(--td-fg); }
.td-preview-body { padding-top: 16px; font-size: 13px; line-height: 1.6; }
.td-preview-body p + p { margin-top: 10px; }
/* Local agent input request */
.td-scrim { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgb(0 0 0 / .32); }
.td-dialog { width: min(512px, calc(100% - 32px)); padding: 22px 24px 18px; border-radius: 14px; background: var(--td-bg); box-shadow: 0 24px 64px rgb(0 0 0 / .24); }
.td-dialog-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.td-dialog-desc { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--td-muted); }
.td-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.td-dialog-foot .td-btn { height: 32px; padding: 0 12px; }
.td-dialog-hint { margin-top: 12px; font-size: 11px; color: var(--td-subtle); }
/* Narrow columns show the conversation pane alone */
/* Chats and Coding: one assistant, no avatars; the reply is thought, tool calls, blocks, then prose. */
.td-sec-plain { height: 30px; padding-left: 8px; font: 600 11px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; letter-spacing: 0; color: var(--td-subtle); }
.td-srow { display: flex; align-items: center; gap: 8px; min-height: 31px; padding: 0 8px; border-radius: 8px; font-size: 13px; }
.td-srow span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.td-srow small { flex: none; font-size: 11px; color: var(--td-subtle); }
.td-srow.is-active { background: #e9e9e8; font-weight: 500; }
.td-crumb { display: flex; flex: none; align-items: center; gap: 6px; height: 48px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--td-border-soft); font-size: 13px; color: var(--td-muted); }
.td-crumb > svg { width: 12px; height: 12px; color: var(--td-subtle); }
.td-crumb strong { overflow: hidden; font-weight: 600; color: var(--td-fg); white-space: nowrap; text-overflow: ellipsis; }
.td-crumb small { display: inline-flex; flex: none; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 8px; border: 1px solid var(--td-border-soft); border-radius: 999px; font: 11px/1.5 "SF Mono", "JetBrains Mono", ui-monospace, monospace; color: var(--td-muted); }
.td-crumb small svg { width: 12px; height: 12px; }
.td-crumb .td-ib { margin-left: auto; }
.td-solo-body { display: grid; flex: 1; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.td-solo.has-side .td-solo-body { grid-template-columns: minmax(0, 1fr) 320px; }
.td-solo-col { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 0; }
.td-solo .td-stream, .td-solo .td-composer { width: min(100% - 40px, 800px); }
.td-solo .td-stream { gap: 12px; padding: 20px 0 8px; }
.td-solo .td-stream > * { flex: none; }
.td-side-count { margin-bottom: 8px !important; font-size: 11px; color: var(--td-subtle); }
.td-solo .td-composer { margin: 8px 0 16px; border-radius: 20px; background: var(--td-bg); }
.td-solo .td-presence { padding-left: 2px; }
.td-user { align-self: flex-end; max-width: 82%; padding: 11px 16px; border: 1px solid var(--td-border-soft); border-radius: 18px 6px 18px 18px; background: var(--td-alt); font-size: 14px; line-height: 1.6; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.td-step { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 13px; color: var(--td-muted); }
.td-step svg { width: 15px; height: 15px; }
.td-step small { font-size: 11px; color: var(--td-subtle); }
.td-step > svg:last-child { width: 13px; height: 13px; margin-left: auto; color: var(--td-subtle); }
.td-toolgroup { display: flex; flex-direction: column; gap: 2px; }
.td-call { display: flex; align-items: center; gap: 8px; min-height: 28px; margin-left: 7px; padding-left: 15px; border-left: 1px solid var(--td-border-soft); font-size: 12px; color: var(--td-muted); }
.td-call svg { width: 13px; height: 13px; }
.td-call > span { flex: none; color: var(--td-fg); }
.td-call code { overflow: hidden; min-width: 0; padding: 3px 6px; border: 0; font-size: 11px; line-height: 1.3; color: var(--td-muted); white-space: nowrap; text-overflow: ellipsis; }
.td-call b { flex: none; font: 600 11px/1 "SF Mono", ui-monospace, monospace; color: var(--td-online); }
.td-call small { flex: none; margin-left: auto; font: 11px/1 "SF Mono", "JetBrains Mono", ui-monospace, monospace; color: var(--td-subtle); }
.td-sources em { padding: 1px 7px; border: 1px solid var(--td-border-soft); border-radius: 999px; font-size: 11px; font-style: normal; }
.td-prose { font-size: 14px; line-height: 1.68; }
.td-prose ul { margin: 8px 0 0; padding-left: 20px; list-style: disc; }
.td-prose ul + p, .td-prose table + p { margin-top: 10px; }
.td-prose table { width: 100%; margin-top: 10px; border: 1px solid var(--td-border-soft); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 12.5px; line-height: 1.45; }
.td-prose th, .td-prose td { width: auto; padding: 7px 10px; border-bottom: 1px solid var(--td-border-soft); color: var(--td-fg); text-align: left; vertical-align: top; }
.td-prose thead th, .td-prose thead th:last-child { background: var(--td-surface); font-size: 11.5px; font-weight: 600; color: var(--td-muted); }
.td-prose tr:last-child td { border-bottom: 0; }
.td-block { border: 1px solid var(--td-border-soft); border-radius: 10px; background: var(--td-surface); overflow: hidden; }
.td-block-head { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; font-size: 12px; color: var(--td-muted); }
.td-block-head svg { width: 14px; height: 14px; }
.td-block-head span { overflow: hidden; font: 12px/1.4 "SF Mono", "JetBrains Mono", ui-monospace, monospace; color: var(--td-fg); white-space: nowrap; text-overflow: ellipsis; }
.td-todo .td-block-head span, .td-approval .td-block-head span { font: 600 12px/1.4 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
.td-block-head small { flex: none; margin-left: auto; font-size: 11px; color: var(--td-subtle); }
.td-add, .td-del { flex: none; font: 600 11px/1 "SF Mono", ui-monospace, monospace; }
.td-add { color: #18794e; } .td-del { color: #cd2b31; }
.td-block-head .td-add { margin-left: auto; }
.td-block pre { margin: 0; padding: 8px 0; border-top: 1px solid var(--td-border-soft); background: var(--td-bg); font: 11.5px/1.7 "SF Mono", "JetBrains Mono", ui-monospace, monospace; white-space: pre; overflow: hidden; }
.td-block pre span { display: block; padding: 0 12px; }
.td-block pre .is-add { background: rgb(48 164 108 / .12); color: #18794e; }
.td-block pre .is-del { background: rgb(229 72 77 / .1); color: #cd2b31; }
.td-bash pre span { background: none !important; }
.td-todo { padding-bottom: 8px; }
.td-todo-row { display: flex; align-items: center; gap: 8px; min-height: 24px; padding: 0 12px; font-size: 12.5px; color: var(--td-muted); }
.td-todo-row i { display: inline-grid; flex: none; place-items: center; width: 14px; height: 14px; border: 1.5px solid var(--td-border-strong); border-radius: 50%; }
.td-todo-row i svg { width: 9px; height: 9px; stroke-width: 2.4; }
.td-todo-row.is-done { color: var(--td-subtle); text-decoration: line-through; }
.td-todo-row.is-done i { border-color: var(--td-fg); background: var(--td-fg); color: #fff; }
.td-todo-row.is-active { font-weight: 500; color: var(--td-fg); }
.td-todo-row.is-active i { border-color: var(--td-fg); }
.td-approval { padding-bottom: 10px; border-color: var(--td-border-strong); background: var(--td-bg); box-shadow: 0 6px 20px rgb(0 0 0 / .06); }
.td-approval-text { padding: 0 12px; font-size: 13px; line-height: 1.5; }
.td-approval-cmd { padding: 8px 12px 0; }
.td-approval .td-card-actions { padding: 0 12px; }
.td-approval .td-btn-primary { background: var(--td-fg); color: #fff; }
.td-composer-solo { position: relative; }
.td-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--td-border-soft); border-radius: 8px; font-size: 12px; color: var(--td-muted); }
.td-chip svg { width: 13px; height: 13px; }
.td-model { display: inline-flex; align-items: center; gap: 6px; height: 28px; margin-left: auto; padding: 0 8px; border-radius: 8px; font: 12px/1 "SF Mono", "JetBrains Mono", ui-monospace, monospace; }
.td-model small { font-size: 11px; color: var(--td-subtle); }
.td-model svg { width: 12px; height: 12px; color: var(--td-subtle); }
.td-model.is-pressed { background: var(--td-alt); }
.td-ring { flex: none; width: 16px; height: 16px; margin: 0 6px; border: 2px solid var(--td-border); border-top-color: var(--td-muted); border-radius: 50%; }
.td-composer-solo .td-send { margin-left: 4px; }
.td-composer-solo .td-send.is-ready { border-color: var(--td-fg); background: var(--td-fg); }
.td-picker { position: absolute; right: 52px; bottom: 46px; z-index: 2; width: 264px; padding: 6px; border: 1px solid var(--td-border); border-radius: 12px; background: var(--td-bg); box-shadow: 0 16px 40px rgb(0 0 0 / .16); }
.td-picker-row { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border-radius: 8px; }
.td-picker-row span { display: flex; flex: 1; align-items: baseline; gap: 8px; }
.td-picker-row strong { font: 500 12px/1 "SF Mono", "JetBrains Mono", ui-monospace, monospace; }
.td-picker-row small { font-size: 11px; color: var(--td-subtle); }
.td-picker-row.is-active, .td-picker-row.is-pressed { background: var(--td-alt); }
.td-picker-row svg { width: 13px; height: 13px; }
.td-side { min-height: 0; padding: 0 14px; border-left: 1px solid var(--td-border-soft); background: var(--td-surface); overflow: hidden; }
.td-side-tabs { display: flex; gap: 16px; height: 40px; margin: 0 -14px 14px !important; padding: 0 14px; border-bottom: 1px solid var(--td-border-soft); }
.td-side-tabs span { display: inline-flex; align-items: center; font-size: 12px; font-weight: 550; color: var(--td-muted); box-shadow: none; }
.td-side-tabs span.is-active { color: var(--td-fg); box-shadow: inset 0 -2px var(--td-fg); }
.td-change { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px; margin-bottom: 4px !important; border: 1px solid var(--td-border-soft); border-radius: 8px; background: var(--td-bg); font-size: 11.5px; }
.td-change svg { width: 13px; height: 13px; color: var(--td-muted); }
.td-change span { flex: 1; overflow: hidden; direction: rtl; font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace; text-align: left; white-space: nowrap; text-overflow: ellipsis; }
.td-change small { flex: none; font-size: 10px; color: var(--td-subtle); }
.team-demo.is-narrow .td-solo.has-side .td-solo-body { grid-template-columns: minmax(0, 1fr); }
.team-demo.is-narrow .td-side, .team-demo.is-narrow .td-crumb small { display: none; }
.team-demo.is-narrow .td-solo .td-stream, .team-demo.is-narrow .td-solo .td-composer { width: calc(100% - 32px); }
.team-demo.is-narrow .td-user { max-width: 92%; }
/* Workbench: the same client as a figure; the caption under it names the running scene. */
.demo-figure { min-width: 0; margin: 0; }
.page-hero .demo-figure { margin-top: 40px; }
.demo-figure .td-caption { min-height: 44px; margin-top: 12px; text-align: left; }
.team-demo.is-narrow .td-app { grid-template-columns: minmax(0, 1fr); }
.team-demo.is-narrow .td-sidebar, .team-demo.is-narrow .td-tagline, .team-demo.is-narrow .td-head-right .td-stack { display: none; }
.team-demo.is-narrow .td-files-grid { grid-template-columns: 1fr; }
.team-demo.is-narrow .td-files-list { border-right: 0; }
.team-demo.is-narrow .td-msg-body, .team-demo.is-narrow .td-msg.is-own .td-msg-body { max-width: 92%; }
html:not(.js) .td-caption { display: none; }

/* Home: the path from private work to a defined service, three steps across the page */
.path-section { padding-top: var(--space-6); }
/* The head shares the cards' three-column grid so the lede starts on the third card's edge. */
.path-section .section-head { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; align-items: start; }
.path-section .section-head > :first-child { grid-column: span 2; }
.path-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.path-step { position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 28px 28px 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .6s, box-shadow .6s; }
.path-step .num { display: block; margin-bottom: 56px; }
.path-step h3 { font-size: var(--text-2xl); }
.path-step p { margin-top: 14px; max-width: 34ch; }
.path-tag { margin-top: auto; padding-top: 32px; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.path-step:not(:last-child)::after { content: ''; position: absolute; top: 50%; right: -16px; z-index: 1; width: 12px; height: 12px; margin-top: -6px; border-top: 2px solid var(--border-strong); border-right: 2px solid var(--border-strong); transform: rotate(45deg); }
.path-step.is-in { border-color: var(--border-strong); box-shadow: inset 0 1px 0 rgb(244 245 246 / .3); }

/* Home: Ghast Protocol. The head introduces the commerce layer; below it the Capability render sits
   beside the Capability copy, framed like the cards around it. */
.capability-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; margin-top: 56px; }
.capability-figure { margin: 0; }
.capability-surface { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #090b0a; }
.cap-art { --cap-green: #52cf9f; display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; }
.cap-grid path { fill: none; stroke: #ffffff; stroke-opacity: .05; }
.cap-wire path { fill: none; stroke: #5b6660; stroke-width: 2; stroke-linejoin: round; }
.cap-lane path { stroke: #35403a; stroke-dasharray: 2 8; stroke-linecap: round; }
.cap-pulse { fill: var(--cap-green); filter: drop-shadow(0 0 6px var(--cap-green)); }
.cap-node polygon, .cap-pad polygon { stroke: #090b0a; stroke-width: 1; stroke-linejoin: round; }
.cap-node .f-t { fill: #4a544e; } .cap-node .f-l { fill: #2c342f; } .cap-node .f-r { fill: #1f2622; }
.cap-node.is-hot .f-t { fill: var(--cap-green); } .cap-node.is-hot .f-l { fill: #2f8f6b; } .cap-node.is-hot .f-r { fill: #226b50; }
.cap-pad .f-t { fill: #262d29; } .cap-pad .f-l { fill: #1a201d; } .cap-pad .f-r { fill: #141917; }
.cap-pad.is-hot .f-t { fill: #1f5d46; } .cap-pad.is-hot .f-l { fill: #17422f; } .cap-pad.is-hot .f-r { fill: #123527; }
.cap-person circle, .cap-person path { fill: #d9dedb; }
.cap-shadow { fill: #000; opacity: .5; filter: blur(14px); }
.k-t { fill: #3a443e; } .k-l { fill: #252d28; } .k-r { fill: #171d1a; }
.cap-inner path { fill: none; stroke: var(--cap-green); stroke-width: 2; }
.cap-inner circle { fill: var(--cap-green); }
.cap-vent { fill: none; stroke: #121714; stroke-width: 5; stroke-linecap: round; }
.cap-slot { fill: #060807; stroke: var(--cap-green); stroke-width: 1.5; }
.cap-lock .l-body { fill: var(--cap-green); }
.cap-lock path { fill: none; stroke: var(--cap-green); stroke-width: 5; stroke-linejoin: round; }
.cap-edge { fill: none; stroke: var(--cap-green); stroke-width: 2.5; stroke-linejoin: round; }
.cap-token .t-top { fill: var(--cap-green); } .cap-token .t-side { fill: #226b50; }
.cap-token path { fill: none; stroke: #07130e; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cap-coin .c-top { fill: #f4f5f6; } .cap-coin .c-side { fill: #8d939b; }
.capability-copy { max-width: 44ch; }
.capability-copy h3 { font-size: var(--text-2xl); }
.capability-copy p { margin-top: 14px; }

/* Home: news. --------------------------------------------------------- */
.news-grid { display: grid; gap: 20px; }
.news-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.news-row-lead { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.news-row > div { display: grid; min-width: 0; }
.news-card { display: flex; flex-direction: column; min-width: 0; height: 100%; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--fg); transition: border-color .6s, background .18s; }
.news-card:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.news-kicker { display: block; margin-bottom: 40px; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.news-card h3 { max-width: 24ch; font-size: var(--text-xl); }
.news-card p { max-width: 44ch; margin-top: 12px; font-size: var(--text-sm); color: var(--muted); }
.news-source { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: auto; padding-top: 40px; font-size: var(--text-sm); }
.news-mark { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 32px; height: 32px; border: 1px solid var(--border-strong); border-radius: 50%; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.news-mark[data-site-icon] { background-position: center; background-repeat: no-repeat; background-size: 22px 22px; }
.news-logo { display: block; flex: none; width: auto; height: 22px; }
.news-logo-0g { height: 18px; }
.news-logo-ghast { filter: invert(1); }
.news-card-lead .news-logo-ghast { filter: none; }
.news-source-name { font-weight: 560; }
.news-source time { color: var(--faint); }
.news-card-lead .news-card { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.news-card-lead .news-card:hover { background: var(--accent-hover); }
.news-card-lead .news-kicker { color: var(--faint); }
.news-card-lead h3 { max-width: 16ch; font-size: var(--text-3xl); }
.news-card-lead p { max-width: 48ch; margin-top: 20px; font-size: var(--text-base); color: #4b4f57; }
.news-card-lead .news-mark { border-color: #b3b6bc; }
.news-card-lead time { color: #6b6f78; }
.news-row-lead .news-card h3 { font-size: var(--text-2xl); }
.news-row-lead .news-card-lead .news-card h3 { font-size: var(--text-3xl); }
.news-all { margin-top: 28px; text-align: right; }

/* Updates page. */
.news-index { padding-bottom: var(--space-7); }
.news-index .news-row + .news-row { margin-top: 20px; }

/* Home: Build on 0G. The head pairs the 0G mark with the title; a large 0G Compute card carries the
   ring of model coins (canvas behind the copy); Storage (with its sync animation) and Agentic ID
   stack beside it. */
.og-head { display: flex; align-items: center; gap: 32px; }
.og-logo { flex: none; display: block; width: auto; height: 60px; }
.og-divider { flex: none; width: 1px; height: 72px; background: var(--border-strong); }
.og-lede { max-width: 64ch; margin-top: 24px; }
.og-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 20px; margin-top: 40px; }
.og-card { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); transition: border-color .6s; }
.og-card:hover { border-color: var(--border-strong); }
.og-tag { display: block; margin-bottom: 56px; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.og-card h3 { font-size: var(--text-2xl); }
.og-card p { margin-top: 14px; max-width: 34ch; }
.og-card:not(.og-card-compute) { justify-content: flex-end; }
.og-card:not(.og-card-compute) .og-tag { position: absolute; top: 28px; left: 28px; margin-bottom: 0; }
.og-card-art { justify-content: space-between; gap: 16px; }
.og-card-art .og-tag { position: static; }
.og-art { display: block; width: min(100%, 320px); height: auto; margin: 0 auto; color: var(--fg); overflow: visible; }
.og-id { width: min(100%, 230px); }
.og-sync-device, .og-sync-line { opacity: .55; }
.og-sync-os { opacity: .7; }
.og-sync-cloud { fill: var(--bg); }
.og-sync-flow { offset-path: path('M96 118L200 60L304 118'); offset-rotate: 0deg; opacity: 0; animation: og-flow 4s linear infinite; }
.og-sync-flow-b { offset-path: path('M304 118L200 60L96 118'); }
@keyframes og-flow { from { offset-distance: 0%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } to { offset-distance: 100%; opacity: 0; } }
.og-id-slab { opacity: .5; animation: og-id-pulse 7.8s ease-in-out infinite; animation-delay: calc(var(--i) * .6s); }
.og-id-slab polygon { fill: var(--bg); stroke: currentColor; stroke-width: .75; stroke-dasharray: 1.5 4; stroke-linejoin: round; }
@keyframes og-id-pulse { 0%, 14%, 100% { opacity: .5; } 6% { opacity: 1; } }
.og-card-compute { grid-row: 1 / 3; min-height: 560px; overflow: clip; background: radial-gradient(120% 90% at 70% 100%, rgb(244 245 246 / .07), transparent 60%), var(--bg); }
.og-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s; pointer-events: none; }
.og-card-compute.is-live .og-canvas { opacity: 1; }
.og-card-copy { position: relative; z-index: 1; max-width: 40ch; pointer-events: none; }
.og-card-copy .og-tag { margin-bottom: 20px; }
.og-card-copy h3 { font-size: var(--text-3xl); letter-spacing: -.02em; }
.og-models { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 32px; }
.og-models li { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg); }
.og-card-compute.is-live .og-models { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Home: download. */
.download-section { text-align: center; }
.download-stage { max-width: 800px; }
.download-stage .lede { margin: 20px auto 0; max-width: 40ch; }
.download-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 36px; }
.download-main { min-height: 56px; padding: 0 32px; font-size: var(--text-base); }

/* Scroll motion: blocks marked data-reveal rise into place once; steps light up in sequence. */
.motion-ready [data-reveal] { opacity: 0; transform: translate3d(0, 32px, 0); }
.motion-ready [data-reveal="rise"] { transform: translate3d(0, 48px, 0) scale(.985); }
.motion-ready [data-reveal].is-in { opacity: 1; transform: none; }
.motion-live [data-reveal] { transition: opacity .9s cubic-bezier(.22, .8, .2, 1), transform .9s cubic-bezier(.22, .8, .2, 1); transition-delay: calc(var(--i, 0) * .14s); }

/* Page heroes and product figures ---------------------------------------- */
.page-hero { padding-top: 64px; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: 24px; }
.page-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.page-toc a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; font-size: var(--text-sm); font-weight: 500; color: var(--muted); }
.page-toc a:hover { color: var(--fg); border-color: var(--border-strong); background: var(--surface); }
.feature-section { align-items: start; }

/* Workbench details */
.domain-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 48px; }
/* Five domains: three on the first row, two wider ones below, so no cell is left empty. */
.domain-list div { grid-column: span 2; }
.domain-list div:nth-child(n+4) { grid-column: span 3; }
.domain-list div { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.domain-list dt { font-size: var(--text-base); font-weight: 560; margin-bottom: 8px; }
.domain-list dd { color: var(--muted); font-size: var(--text-sm); }
.categories { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 8px; }
summary { min-height: 44px; display: flex; align-items: center; font-size: var(--text-sm); font-weight: 560; }
.categories ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-bottom: 8px; }
.categories li { border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 10px; font-size: var(--text-xs); color: var(--muted); }
.memory-actions { margin-top: 24px; border-top: 1px solid var(--border); }
.memory-actions div { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.memory-actions dt { font-weight: 560; font-size: var(--text-sm); }
.memory-actions dd { font-size: var(--text-sm); color: var(--muted); }
/* Illustrated memory panel in the app's own light palette */
.memory-panel { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); padding: 4px; }
.memory-shell { background: var(--shot-bg); color: #1c1d21; border-radius: calc(var(--radius) - 4px); padding: 18px 20px 12px; font-size: var(--text-sm); }
.memory-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #e3e4e8; }
.memory-head strong { font-weight: 600; }
.memory-head span { color: #6b6f7a; font-size: var(--text-xs); }
.memory-rows li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid #e3e4e8; }
.memory-rows li:last-child { border-bottom: 0; }
.memory-tag { grid-column: 1 / -1; width: max-content; font-size: var(--text-xs); font-weight: 600; color: #4a4f5c; background: #eceef2; border-radius: 4px; padding: 2px 8px; }
.memory-rows p { color: #1c1d21; line-height: 1.5; }
.memory-rows small { display: flex; gap: 12px; align-self: start; font-size: var(--text-xs); color: #6b6f7a; }
.memory-rows small span { text-decoration: underline; text-underline-offset: 3px; }
.memory-rows .memory-meta { grid-column: 1; font-size: var(--text-xs); color: #6b6f7a; }
.memory-panel figcaption { padding: 12px 12px 8px; font-size: var(--text-sm); color: var(--muted); }

/* Protocol: property cards, flow diagram, comparison table ---------------- */
.property-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.property-grid article { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.property-grid .num { display: block; margin-bottom: 36px; }
.property-grid p { margin-top: 10px; font-size: var(--text-sm); }
.property-grid .text-link { margin-top: 12px; }
.flow-diagram { margin-top: 48px; }
.flow-parties { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; font-size: var(--text-sm); color: var(--muted); }
.flow-parties span:first-child, .flow-parties span:last-child { font-weight: 560; color: var(--fg); }
.flow-capability { padding: 4px 12px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-family: var(--font-mono); font-size: var(--text-xs); }
.flow-list { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; counter-reset: flow; }
.flow-list::before { content: ''; position: absolute; top: 15px; left: 15px; right: 15px; height: 1px; background: var(--border-strong); }
.flow-list div { position: relative; counter-increment: flow; padding-top: 44px; }
.flow-list div::before { content: counter(flow, decimal-leading-zero); position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font-family: var(--font-mono); font-size: var(--text-xs); }
.flow-list dt { font-size: var(--text-base); font-weight: 560; }
.flow-list dd { margin-top: 6px; color: var(--muted); font-size: var(--text-sm); }
.comparison { margin-top: 56px; }
.comparison > p { margin-top: 8px; font-size: var(--text-sm); }
.table-scroll { margin-top: 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.55; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); padding: 16px 20px; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
thead th { background: var(--surface-raised); font-weight: 560; }
thead th:last-child { color: var(--accent); }
tbody th { width: 20%; font-weight: 560; background: var(--surface); }
td { width: 40%; color: var(--muted); }
.closing { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.closing h2 { font-size: var(--text-2xl); }
.closing .actions { margin: 0; }

/* Reading pages ---------------------------------------------------------- */
.reading-hero { padding-block: 64px 48px; }
.reading-hero h1 { max-width: 18ch; }
.reading-hero .lede { margin-top: 20px; }
.reading-hero .status { margin-top: 20px; margin-bottom: 0; }
.reading-columns { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; border-top: 1px solid var(--border); padding-top: 40px; padding-bottom: var(--space-7); }
.article-meta { position: sticky; top: calc(var(--header-height) + 24px); font-size: var(--text-sm); }
.article-meta dl { display: grid; gap: 18px; }
.article-meta dt { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.article-meta dd { margin-top: 4px; color: var(--muted); }
.article-meta a { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border-strong); }
.article-meta a:hover { text-decoration-color: var(--accent); }
/* Official articles retain the original media and readable document structure. */
.official-article .article-meta { align-self: start; }
.article-history { margin-top: 24px; color: var(--muted); line-height: 1.6; }
.article-figure { margin: 32px 0; }
.article-cover { margin-top: 0; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius-sm); }
.article-figure figcaption { margin-top: 12px; font-size: var(--text-sm); line-height: 1.6; color: var(--muted); }
.article-original h2 { margin-top: 40px; }
.article-original hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.article-original { overflow-wrap: anywhere; }
.article-notice { padding: 20px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.article-body .actions { margin-top: 28px; }
.reading-toc { position: sticky; top: calc(var(--header-height) + 24px); max-height: calc(100svh - 120px); overflow-y: auto; font-size: var(--text-sm); }
.reading-toc summary { font-weight: 560; }
.reading-toc nav { display: grid; gap: 2px; margin-top: 8px; padding-right: 16px; }
.reading-toc a { min-height: 40px; display: flex; align-items: center; color: var(--muted); padding: 6px 10px; margin-left: -10px; border-radius: var(--radius-sm); line-height: 1.4; }
.reading-toc a:hover { color: var(--fg); background: var(--surface); }
.article-body { max-width: var(--reading); font-size: var(--text-lg); line-height: 1.7; min-width: 0; }
.article-body section { margin-bottom: 56px; }
.article-body > p + section { margin-top: 40px; }
.article-body h2 { font-size: var(--text-2xl); margin-bottom: 20px; }
.article-body a:not(.text-link) { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border-strong); }
.article-body a:not(.text-link):hover { text-decoration-color: var(--accent); }
.article-body ul { list-style: disc; padding-left: 22px; }
.article-body li { color: var(--muted); margin-block: 10px; }
.article-body strong { color: var(--fg); font-weight: 560; }
.article-body h3 { font-size: var(--text-xl); margin: 36px 0 14px; }
.article-body h4 { font-size: var(--text-lg); margin: 28px 0 10px; }
.article-body p + p, .article-body p + ul, .article-body ul + p, .article-body ol + p, .article-body p + ol { margin-top: 16px; }
.article-body ol { list-style: decimal; padding-left: 22px; }
.article-body blockquote { margin: 24px 0; border-left: 2px solid var(--border-strong); padding-left: 20px; color: var(--muted); }
.article-body code { font-family: var(--font-mono); font-size: .88em; }
.table-scroll { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.55; }
.table-scroll th, .table-scroll td { min-width: 120px; padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--muted); }
.table-scroll th { background: var(--surface); color: var(--fg); font-weight: 560; }
.table-scroll tr:last-child td { border-bottom: 0; }
.legal-body .highlight, .legal-body .warning { margin: 24px 0; padding: 16px 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--text-base); }
.reading-toc-grouped nav p { margin: 16px 0 4px; color: var(--faint); font-size: var(--text-xs); }
.reading-toc-grouped nav p:first-child { margin-top: 0; }
.reading-toc-grouped a { min-height: 32px; padding-block: 4px; }
.whitepaper-article section[data-chapter] { margin-bottom: 72px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.whitepaper-article section[data-chapter]:last-child { border-bottom: 0; }
.flow-diagram { margin: 24px 0; }
.diagram-scroll { overflow-x: auto; padding: 20px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.diagram-scroll svg { display: block; width: max(min(100%, var(--diagram-natural-width, 100%)), calc(var(--diagram-natural-width, 100%) * .8)); max-width: none; height: auto; margin: auto; }
.diagram-node rect { fill: var(--surface); stroke: var(--border-strong); }
.diagram-edge { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.diagram-arrow { fill: var(--muted); }
.diagram-node-label { height: 100%; display: flex; flex-direction: column; justify-content: center; text-align: center; color: var(--fg); font-size: 11px; line-height: 1.3; }
.diagram-node-label span:first-child { font-weight: 600; }
.diagram-edge-label { font-size: 11px; fill: var(--fg); stroke: var(--bg); stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }
.release-list { border-top: 1px solid var(--border); padding-bottom: var(--space-7); }
.release { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-block: 36px; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-height) + 16px); }
.release:last-child { border-bottom: 0; }
.release-head { display: flex; flex-direction: column; gap: 4px; }
.release h2 { font-size: var(--text-xl); }
.release time { font-size: var(--text-sm); color: var(--faint); }
.release ul { max-width: var(--reading); list-style: disc; padding-left: 22px; }
.release li { color: var(--muted); margin-block: 8px; line-height: 1.6; }
.release li:first-child { margin-top: 0; }
.brand-marks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.brand-mark { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.brand-mark-stage { height: 200px; display: grid; place-items: center; }
.brand-mark-stage img { width: 120px; height: auto; }
.brand-mark-dark .brand-mark-stage { background: var(--bg); }
.brand-mark-light .brand-mark-stage { background: var(--fg); }
.brand-mark figcaption { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: var(--text-sm); }
.brand-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-block: 24px; }
.brand-swatch { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); }
.brand-swatch span { height: 72px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); margin-bottom: 6px; }
.brand-swatch code { color: var(--faint); }
.reading-source { border-top: 1px solid var(--border); padding-top: 20px; font-size: var(--text-sm); }
.article-body > .text-link { margin-top: 20px; }
.definition-group + .definition-group { margin-top: 56px; }
.definition-group h2 { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.definition-group dl > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 32px; padding-block: 24px; border-bottom: 1px solid var(--border); }
.definition-group dt { font-size: var(--text-lg); font-weight: 560; letter-spacing: -.01em; }
.definition-group dd { max-width: 60ch; color: var(--muted); }
.definition-group dd a { display: inline-block; font-size: var(--text-sm); color: var(--fg); margin-top: 8px; text-decoration: underline; text-underline-offset: 4px; }
.definitions-body > div > .text-link { margin-top: 32px; }

/* Footer ----------------------------------------------------------------- */
.site-footer { position: relative; border-top: 1px solid var(--border); padding-top: 56px; overflow: clip; --hand-ink: var(--fg); --hand-shade: #2c2f35; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 40px; align-items: start; }
.footer-lead { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-lead p { font-size: var(--text-sm); color: var(--muted); max-width: 24ch; }
.footer-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.footer-nav div { display: flex; flex-direction: column; align-items: flex-start; }
.footer-heading { margin-bottom: 12px; font-size: var(--text-sm); font-weight: 560; color: var(--fg); }
.footer-nav a, .footer-top-link { display: inline-flex; align-items: center; min-height: 36px; font-size: var(--text-sm); color: var(--muted); }
.footer-nav a:hover, .footer-top-link:hover { color: var(--fg); }
.footer-center { position: relative; margin-top: 104px; text-align: center; }
.footer-copy, .footer-tagline { font-size: var(--text-sm); color: var(--muted); }
.footer-copy { margin-top: 10px; color: var(--faint); }
.footer-atmosphere { position: relative; height: 35.5vw; margin-top: 4px; pointer-events: none; }
.footer-hand { position: absolute; display: block; width: 49%; height: auto; opacity: 0; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.footer-hand.is-drawn { opacity: 1; }
.footer-hand-machine { left: 0; top: 19.3%; --hand-overhang: .45; }
.footer-hand-human { right: 0; top: 0; --hand-overhang: .9; }
.footer-signature { display: flex; justify-content: center; height: .6em; margin-top: -1.5vw; overflow: hidden; font-size: clamp(64px, 19.5vw, 300px); }
.footer-wordmark { display: block; width: max-content; font-size: 1em; font-weight: 600; line-height: 1; letter-spacing: -.05em; color: var(--border-strong); }
.footer-motion-ready .footer-wordmark { opacity: 0; transform: translateY(12px); }
.footer-motion-ready.is-visible .footer-wordmark { opacity: 1; transform: none; }

/* Dialogs ---------------------------------------------------------------- */
dialog { color: var(--fg); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; max-height: calc(100svh - 32px); overflow: auto; padding: 28px; }
dialog::backdrop { background: rgb(0 0 0 / .78); }
.download-dialog { width: min(560px, calc(100% - 32px)); }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.dialog-heading h2 { font-size: var(--text-xl); }
.close-button { flex-shrink: 0; background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); width: 40px; height: 40px; font-size: var(--text-xl); line-height: 1; }
.close-button:hover { background: var(--surface-raised); }
dialog > p { font-size: var(--text-sm); margin-top: 12px; }
.download-list { margin-top: 20px; }
.download-list a { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--border); min-height: 72px; padding: 12px 6px; font-size: var(--text-sm); border-radius: var(--radius-sm); }
.download-list a:hover { background: var(--surface-raised); }
.download-list a.is-recommended strong::after { content: "Recommended"; margin-left: 10px; font-size: var(--text-xs); font-weight: 500; color: var(--muted); }
.download-list a > span:last-child { color: var(--accent); font-weight: 560; }
.download-list strong, .download-list small { display: block; }
.download-list strong { font-size: var(--text-base); font-weight: 560; }
.download-list small { color: var(--muted); font-size: var(--text-xs); }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .split { gap: 40px; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .path-section .section-head { grid-template-columns: 1fr; }
  .path-section .section-head > :first-child { grid-column: auto; }
  .reading-columns,   .capability-layout { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .article-meta, .reading-toc { position: static; max-height: none; }
  .news-row { grid-template-columns: 1fr; gap: 16px; }
  .news-row-lead { grid-template-columns: 1fr; }
  .news-grid { gap: 16px; }
  .news-index .news-row + .news-row { margin-top: 16px; }
  .og-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .og-card-compute { min-height: 520px; }
  .domain-list { grid-template-columns: repeat(2, 1fr); }
  .domain-list div, .domain-list div:nth-child(n+4) { grid-column: auto; }
  .domain-list div:last-child { grid-column: 1 / -1; }
  .path-steps { grid-template-columns: 1fr; gap: 16px; }
  .path-step { min-height: 0; }
  .path-step .num { margin-bottom: 28px; }
  .path-step:not(:last-child)::after { top: auto; right: 32px; bottom: -14px; transform: rotate(135deg); }
  .wide, .demo-screen.wide { width: calc(100% - 64px); }
  .definition-group dl > div { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .download-main { width: 100%; }
  .wrap { width: calc(100% - 40px); }
  :root { --header-height: 60px; }
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .header-inner { gap: 12px; }
  .header-actions { gap: 8px; }
  .brand { font-size: var(--text-base); gap: 8px; }
  .brand img { width: 22px; }
  .button-small { font-size: var(--text-xs); padding: 8px 12px; }
  html:not(.js) .site-header { height: auto; position: relative; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .mobile-nav { position: static; width: 100%; margin-top: 8px; border-radius: var(--radius); }
  .page-hero { padding-top: 40px; }
  .hero { min-height: calc(100svh - var(--header-height)); padding-block: 48px 72px; text-align: left; }
  .wide, .demo-screen.wide { width: calc(100% - 40px); }
  .hero .eyebrow { justify-content: flex-start; }
  .hero h1, .hero .lede { margin-inline: 0; }
  .hero .actions { justify-content: flex-start; margin-top: 24px; }
  .demo-screen { padding-top: 8px; }
  .hero .lede { font-size: var(--text-lg); margin-top: 20px; }
  .arrow-button { height: 56px; min-width: 0; width: 100%; max-width: 360px; border-radius: 18px; }
  .arrow-button-tile { width: 44px; border-radius: 12px; }
  .arrow-button-label { margin-left: 62px; font-size: var(--text-base); }
  .td-caption { text-align: left; }
  .td-caption { margin-top: 14px; font-size: var(--text-xs); }
  .section { padding-block: 56px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .lede { font-size: var(--text-base); }
  .hero .lede, .page-hero .lede, .reading-hero .lede { font-size: var(--text-lg); }
  .actions { gap: 12px 16px; }
  .button { padding: 12px 16px; }
  .og-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 12px; margin-top: 32px; }
  .og-card { padding: 20px; }
  .og-card:not(.og-card-compute) { justify-content: flex-start; }
  .og-card:not(.og-card-compute) .og-tag { position: static; margin-bottom: 20px; }
  .og-card-art { gap: 8px; }
  .news-card { padding: 20px; }
  .news-kicker { margin-bottom: 28px; }
  .news-source { padding-top: 28px; }
  .news-card-lead h3, .news-row-lead .news-card-lead .news-card h3 { font-size: var(--text-2xl); }
  .og-head { gap: 20px; }
  .og-logo { height: 40px; }
  .og-divider { height: 48px; }
  .og-lede { margin-top: 24px; }
  .og-card-compute { grid-row: auto; min-height: 560px; }
  .og-card-copy h3 { font-size: var(--text-2xl); }
  .page-toc { margin-top: 32px; }
  .domain-list { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
  .domain-list div:last-child { grid-column: auto; }
  .property-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
  .property-grid .num { margin-bottom: 20px; }
  .flow-list { grid-template-columns: 1fr; gap: 20px; }
  .flow-list::before { top: 15px; bottom: 15px; left: 15px; right: auto; width: 1px; height: auto; }
  .flow-list div { padding-top: 0; padding-left: 48px; }
  .flow-parties { flex-wrap: wrap; }
  table { font-size: var(--text-xs); }
  th, td { padding: 12px 10px; }
  tbody th { width: 26%; }
  td { width: 37%; }
  .closing h2 { font-size: var(--text-xl); }
  .reading-hero { padding-block: 40px 32px; }
  .reading-columns { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; padding-bottom: 56px; }
  .reading-toc { position: static; max-height: none; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
  .reading-toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; }
  .reading-toc-grouped nav { grid-template-columns: 1fr; }
  .release { grid-template-columns: 1fr; gap: 16px; padding-block: 28px; }
  .brand-marks, .brand-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-body { font-size: var(--text-base); }
  .article-body section { margin-bottom: 40px; }
  .definition-group + .definition-group { margin-top: 40px; }
    .site-footer { padding-top: 40px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .footer-center { margin-top: 48px; }
  .footer-atmosphere { height: 60vw; }
  .footer-hand-machine { --hand-overhang: 1.45; }
  .footer-hand-human { --hand-overhang: 2.2; }
  .footer-signature { height: .62em; margin-top: 0; }
  dialog { padding: 20px; }
}
@media (max-width: 400px) {
  .wrap, .wide, .demo-screen.wide { width: calc(100% - 32px); }
  .header-actions .button-small { padding-inline: 10px; }
  .actions > .button { width: 100%; }
  .reading-toc nav { grid-template-columns: 1fr; }
}
/* 404: glitch block after beui.dev, in plain CSS. The code scrambles on load (not-found.js) and splits into red/cyan ghosts on hover. */
.not-found { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; min-height: min(70vh, 640px); padding-block: 64px; text-align: center; }
.nf-code { position: relative; font-family: var(--font-mono); font-size: clamp(5rem, 18vw, 11rem); font-weight: 700; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; user-select: none; }
.nf-code h1 { position: relative; margin: 0; font: inherit; letter-spacing: inherit; }
.nf-ghost { position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen; transition: transform .15s ease-out, opacity .15s ease-out; }
.nf-ghost-red { color: #ff0040; } .nf-ghost-cyan { color: #00e5ff; }
.nf-text { display: flex; flex-direction: column; gap: 8px; }
.nf-title { font-size: var(--text-lg); font-weight: 600; color: var(--fg); }
.nf-desc { max-width: 24rem; font-size: var(--text-sm); color: var(--muted); }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (hover: hover) {
  .nf-code:hover .nf-ghost-red { transform: translateX(3px); opacity: .7; }
  .nf-code:hover .nf-ghost-cyan { transform: translateX(-3px); opacity: .7; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .footer-motion-ready .footer-wordmark { opacity: 1; transform: none; }
  .nf-ghost { display: none; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
  .og-sync-flow:not(.og-sync-flow-still) { display: none; }
  .og-sync-flow-still { offset-distance: 30%; opacity: 1; }
  .og-id-slab { opacity: .6; }
}

/* Protocol page layout */
.protocol-page .page-hero { padding-bottom: 56px; }
.protocol-page .page-hero h1 { max-width: none; }
.protocol-page .page-hero .lede { max-width: 56ch; }
.protocol-page .page-toc { margin-top: 56px; }
.protocol-page .split, .protocol-page .section-head { grid-template-columns: 5fr 7fr; gap: 24px 64px; align-items: start; }
.protocol-page .split > :last-child, .protocol-page .section-head > .lede { padding-top: 39px; }
.protocol-page .split .lede + p { margin-top: 16px; max-width: 60ch; }
.protocol-page .property-grid { margin-top: 64px; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.protocol-page .property-grid article { display: flex; flex-direction: column; padding: 28px 28px 32px; border: 0; border-radius: 0; background: none; }
.protocol-page .property-grid article + article { border-left: 1px solid var(--border); }
.protocol-page .property-grid .num { margin-bottom: 48px; color: var(--muted); }
.protocol-page .property-grid p { margin-bottom: 24px; }
.protocol-page .property-grid .text-link { margin-top: auto; align-self: flex-start; }
.protocol-page .section-note { margin-top: 24px; padding-top: 0; border-top: 0; color: var(--muted); }
.protocol-page .flow-diagram { margin: 64px 0 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.protocol-page .flow-parties { margin: 0; padding: 16px 28px; border-bottom: 1px solid var(--border); }
.protocol-page .flow-parties::before, .protocol-page .flow-parties::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.protocol-page .flow-parties::before { order: 1; }
.protocol-page .flow-parties::after { order: 3; }
.protocol-page .flow-parties span:first-child { order: 0; }
.protocol-page .flow-capability { order: 2; border-color: var(--border-strong); font-family: inherit; font-weight: 500; }
.protocol-page .flow-parties span:last-child { order: 4; }
.protocol-page .flow-list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.protocol-page .flow-list::before { content: none; }
.protocol-page .flow-list div { padding: 28px 24px 32px 28px; }
.protocol-page .flow-list div + div { border-left: 1px solid var(--border); }
.protocol-page .flow-list div::before { position: static; display: block; width: auto; height: auto; margin-bottom: 40px; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: var(--text-sm); }
.protocol-page .flow-list dd { margin-top: 8px; }
.protocol-page .comparison { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--border); }
.protocol-page th, .protocol-page td { padding-inline: 28px; }
.protocol-page tbody th { width: 22%; }
.protocol-page td { width: 39%; }
.protocol-page tbody td:last-child { color: var(--fg); }
@media (max-width: 1024px) {
  .protocol-page .split, .protocol-page .section-head { gap: 24px 40px; }
  .protocol-page .flow-list { grid-template-columns: 1fr; }
  .protocol-page .flow-list div { display: grid; grid-template-columns: 48px minmax(0, 200px) minmax(0, 1fr); align-items: baseline; gap: 0 16px; padding: 20px 28px; }
  .protocol-page .flow-list div + div { border-left: 0; border-top: 1px solid var(--border); }
  .protocol-page .flow-list div::before { margin: 0; }
  .protocol-page .flow-list dd { margin: 0; }
}
@media (max-width: 760px) {
  .protocol-page .page-hero { padding-bottom: 40px; }
  .protocol-page .page-toc { margin-top: 40px; }
  .protocol-page .split, .protocol-page .section-head { grid-template-columns: 1fr; gap: 24px; }
  .protocol-page .split > :last-child, .protocol-page .section-head > .lede { padding-top: 0; }
  .protocol-page .property-grid { margin-top: 40px; }
  .protocol-page .property-grid article { padding: 22px 20px 24px; }
  .protocol-page .property-grid article + article { border-left: 0; border-top: 1px solid var(--border); }
  .protocol-page .property-grid .num { margin-bottom: 20px; }
  .protocol-page .flow-diagram { margin-top: 40px; }
  .protocol-page .flow-parties { padding: 14px 20px; flex-wrap: nowrap; }
  .protocol-page .flow-list div { grid-template-columns: 32px minmax(0, 1fr); padding: 18px 20px; }
  .protocol-page .flow-list dd { grid-column: 2; margin-top: 4px; }
  .protocol-page .comparison { margin-top: 56px; padding-top: 32px; }
  .protocol-page .table-scroll { border: 0; border-radius: 0; overflow: visible; }
  .protocol-page table, .protocol-page tbody, .protocol-page tr, .protocol-page tbody th, .protocol-page td { display: block; width: auto; }
  .protocol-page table { font-size: var(--text-sm); }
  .protocol-page thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .protocol-page tbody tr { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .protocol-page tbody tr + tr { margin-top: 12px; }
  .protocol-page tbody th { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .protocol-page td { padding: 12px 16px; }
  .protocol-page tbody th { padding-inline: 16px; }
  .protocol-page tr:last-child th { border-bottom: 1px solid var(--border); }
  .protocol-page tr:last-child td:nth-child(2) { border-bottom: 1px solid var(--border); }
  .protocol-page td::before { display: block; margin-bottom: 2px; font-size: var(--text-xs); color: var(--faint); }
  .protocol-page td:nth-child(2)::before { content: 'Agent or platform access'; }
  .protocol-page td:nth-child(3)::before { content: 'A Capability'; }
}

/* Homepage copy revision: the missing unit, five demo scenes and FAQ. */
.header-actions .nav-download { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 18px; border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--bg); background: var(--fg); font-weight: 560; }
.header-actions .nav-download:hover { background: var(--accent-hover); color: var(--bg); }
.hero-statement { margin-top: 20px; font-size: var(--text-xl); color: var(--fg); }
.unit-cards .path-step::after { display: none; }
.unit-answer { display: grid; grid-template-columns: 1fr 2fr; gap: 32px 64px; margin-top: 32px; padding: 32px; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.unit-answer h3 { font-size: var(--text-2xl); }
.unit-answer p { font-size: var(--text-lg); }
.unit-answer .unit-principles { margin-top: 20px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg); }
.capability-figure figcaption { margin-top: 16px; color: var(--muted); font-size: var(--text-sm); }
.path-section .demo-screen { width: min(calc(100% - 160px), 1600px); padding: 0; margin-top: 64px; }
.demo-intro { margin-bottom: 24px; font-size: var(--text-xl); text-align: center; color: var(--fg); }
#team-demo .td-switch { flex-wrap: wrap; justify-content: center; border-radius: var(--radius); }
#team-demo .td-switch button { min-width: 0; padding-inline: 14px; border-radius: var(--radius-sm); }
.faq-section { border-top: 1px solid var(--border); }
.faq-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 40px 64px; }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; cursor: pointer; padding: 24px 28px 24px 0; font-size: var(--text-lg); font-weight: 560; }
.faq-list details p { padding: 0 0 24px; line-height: 1.7; }
@media (max-width: 1024px) { .path-section .demo-screen { width: calc(100% - 64px); } }
@media (max-width: 760px) { .unit-answer, .faq-layout { grid-template-columns: 1fr; gap: 24px; } .unit-answer { padding: 24px; } .path-section .demo-screen { width: calc(100% - 40px); } }
@media (max-width: 520px) { .path-section .demo-screen { width: calc(100% - 32px); } }

.faq-list summary::after { content: "+"; flex: none; color: var(--muted); }
.faq-list details[open] summary::after { content: "−"; }

.path-section > .actions { justify-content: center; }

@media (max-width: 760px) { .header-actions .nav-download { display: none; } }

/* Protocol dispute outcomes share the existing card layout. */
.protocol-page #disputes .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .protocol-page #disputes .property-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1025px) {
  .protocol-page .flow-diagram { display: grid; grid-template-columns: 120px minmax(0, 1fr); }
  .protocol-page .flow-parties { flex-direction: column; justify-content: space-between; padding: 28px 12px; border-bottom: 0; border-right: 1px solid var(--border); }
  .protocol-page .flow-parties::before, .protocol-page .flow-parties::after { width: 1px; min-height: 16px; }
  .protocol-page .flow-list div { padding-inline: 16px; }
}

/* Evergreen announcement stays above the chronological news rows. */
.news-featured { margin-bottom: 32px; }
.news-featured .news-card h3 { max-width: 32ch; font-size: var(--text-3xl); }

.term-link { text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--border-strong); }
.term-link:hover { text-decoration-color: currentColor; }
.demo-fallback dt { margin-top: 24px; font-weight: 600; }
.demo-fallback dd { margin-top: 8px; color: var(--muted); }

/* Whitepaper: Markdown-backed chapter reader. */
.book-layout { display: grid; grid-template-columns: 230px minmax(0, 760px) 180px; gap: 48px; max-width: 1480px; padding: 48px 40px 96px; margin: 0 auto; align-items: start; }
.book-sidebar, .book-outline { position: sticky; top: 100px; max-height: calc(100vh - 125px); overflow-y: auto; scrollbar-width: thin; }
.book-name { display: block; font-size: 16px; font-weight: 600; margin-bottom: 24px; }
.book-menu { border: 0; }
.book-menu summary { display: none; }
.book-search label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.book-search input { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--fg); padding: 10px 12px; font: inherit; font-size: 14px; }
.book-search-status { font-size: 12px; color: var(--muted); }
.book-nav-group { margin-top: 24px; }
.book-nav-group > p, .book-outline-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.book-nav-group a { display: block; padding: 7px 10px; margin-left: -10px; border-radius: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.book-nav-group a:hover { color: var(--fg); background: var(--surface); }
.book-nav-group a[aria-current] { color: var(--accent); background: var(--surface); }
.book-content { min-width: 0; width: 100%; max-width: none; font-size: 16px; line-height: 1.85; }
.book-content .book-breadcrumb { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.book-breadcrumb span { padding: 0 8px; color: var(--faint); }
.book-content h1 { font-size: clamp(32px, 3.2vw, 48px); line-height: 1.13; letter-spacing: -.04em; margin: 0 0 28px; }
.book-content h2 { font-size: 26px; line-height: 1.3; margin-top: 52px; }
.book-content h3 { font-size: 20px; line-height: 1.4; margin-top: 32px; }
.book-content h4 { font-size: 17px; margin-top: 28px; }
.book-content .flow-diagram { margin: 32px 0; }
.book-content .table-scroll { max-width: 100%; }
.book-content table { min-width: 480px; font-size: 14px; }
.book-content .book-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); }
.book-content .book-pager a { border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-decoration: none; }
.book-pager a:hover { background: var(--surface); }
.book-pager small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.book-pager span { font-size: 14px; }
.book-outline nav { border-left: 1px solid var(--border); padding-left: 16px; }
.book-outline a { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.book-outline a:hover { color: var(--fg); }
.book-nav-group[hidden], .book-nav-group a[hidden], .book-search[hidden] { display: none; }
.book-page .site-footer { margin-top: 0; }
@media(max-width:1200px) { .book-layout { grid-template-columns: 210px minmax(0,1fr); gap: 36px; } .book-outline { display: none; } }
@media(max-width:900px) {
 .book-layout { display: block; padding: 24px 24px 64px; }
 .book-sidebar { position: static; max-height: none; overflow: visible; margin-bottom: 32px; }
 .book-name { margin-bottom: 12px; }
 .book-menu summary { display: block; cursor: pointer; font-size: 14px; padding: 12px 0; border-block: 1px solid var(--border); }
 .book-menu[open] summary { margin-bottom: 16px; }
 .book-menu nav { max-height: 50vh; overflow-y: auto; padding-left: 10px; }
 .book-content .book-pager { gap: 8px; }
 .book-content .book-pager a { padding: 12px; }
}
@media(max-width:520px) { .book-layout { padding-inline: 20px; } .book-content { font-size: 15px; } .book-content h2 { font-size: 24px; } }
