/* Site styles. Brand accent comes from /assets/brand.css (generated from site.config.json).
   Fonts: Newsreader (display) and IBM Plex Sans / Mono, all SIL Open Font License, self-hosted. */

@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --font: "Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; /* inside app mockups */

  --t-xs: .75rem; --t-sm: .875rem; --t-md: 1.0625rem; --t-lg: 1.25rem;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --r-sm: 4px; --r-md: 6px; --r-lg: 10px;
  --wrap: 1180px;

  /* light: warm paper */
  --bg: #F5F3EE;
  --bg-sunk: #ECE9E2;
  --bg-elev: #FBFAF7;
  --ink: #1A1C1B;
  --ink-2: #464946;
  --ink-3: #686B66;
  --line: #DCD8CE;
  --line-2: #C8C3B7;
  --accent: var(--accent-l);
  --on-accent: var(--on-accent-l);

  /* verdicts (semantic, independent of the accent) */
  --allow: #2C6531; --allow-bg: #E0EAD8;
  --block: #A02F1D; --block-bg: #F4DDD5;
  --ask: #845200;   --ask-bg: #F2E4C4;

  /* demo scene */
  --term-bg: #1D201F; --term-ink: #E7E4DB; --term-dim: #9A9E98; --term-line: #2E3331;
  --term-allow: #93C79C; --term-block: #F09C8A; --term-ask: #E9BA60;
  --app-bg: #FFFFFF; --app-row: #F6F5F2; --app-line: #E6E3DC;
  --shadow-pop: 0 1px 2px rgb(20 22 21 / .08), 0 12px 32px -8px rgb(20 22 21 / .28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111413; --bg-sunk: #0C0E0D; --bg-elev: #171B1A;
    --ink: #ECEAE3; --ink-2: #B9B7AF; --ink-3: #908F88;
    --line: #262B29; --line-2: #353B39;
    --accent: var(--accent-d); --on-accent: var(--on-accent-d);
    --allow: #93C79C; --allow-bg: #1B2A1F;
    --block: #F09C8A; --block-bg: #34191A;
    --ask: #E9BA60;   --ask-bg: #2F2512;
    --term-bg: #0B0D0C; --term-line: #232826;
    --app-bg: #1A1E1D; --app-row: #202524; --app-line: #2B302E;
    --shadow-pop: 0 1px 2px rgb(0 0 0 / .4), 0 16px 40px -8px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111413; --bg-sunk: #0C0E0D; --bg-elev: #171B1A;
  --ink: #ECEAE3; --ink-2: #B9B7AF; --ink-3: #908F88;
  --line: #262B29; --line-2: #353B39;
  --accent: var(--accent-d); --on-accent: var(--on-accent-d);
  --allow: #93C79C; --allow-bg: #1B2A1F;
  --block: #F09C8A; --block-bg: #34191A;
  --ask: #E9BA60;   --ask-bg: #2F2512;
  --term-bg: #0B0D0C; --term-line: #232826;
  --app-bg: #1A1E1D; --app-row: #202524; --app-line: #2B302E;
  --shadow-pop: 0 1px 2px rgb(0 0 0 / .4), 0 16px 40px -8px rgb(0 0 0 / .7);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 420; letter-spacing: -.015em; line-height: 1.08; }
h3 { font-size: var(--t-md); font-weight: 600; line-height: 1.35; }
p { margin: 0 0 var(--s-4); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre { font-family: var(--font-mono); font-size: .88em; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: var(--r-md); }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-6); }
.narrow { max-width: 760px; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }
.fine { font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .01em; }
.center { text-align: center; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border: 1px solid transparent; border-radius: var(--r-md); font: 600 var(--t-sm)/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-lg { padding: 14px 22px; font-size: var(--t-md); }
.btn-sm { padding: 7px 13px; font-size: var(--t-sm); }
.btn-note { font-weight: 400; opacity: .78; padding-left: 10px; border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 40%, transparent); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); margin: var(--s-5) 0 var(--s-4); }
.cta-center { justify-content: center; }
.link-quiet { color: var(--ink-2); font-size: var(--t-sm); text-decoration: underline; text-decoration-color: var(--line-2); }
.link-quiet:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; gap: var(--s-6); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-name { font: 500 1.375rem/1 var(--font-display); letter-spacing: -.01em; }
.logo { width: 28px; height: 28px; }
.logo rect { stroke: var(--line-2); stroke-width: 1.5; }
.nav { display: flex; gap: var(--s-5); margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: var(--s-3); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--line); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-btn .ti { display: none; }
.theme-btn:not([data-choice]) .ti-system, .theme-btn[data-choice="system"] .ti-system, .theme-btn[data-choice="light"] .ti-light, .theme-btn[data-choice="dark"] .ti-dark { display: block; }

.site-footer { border-top: 1px solid var(--line); margin-top: var(--s-9); padding: var(--s-7) 0 var(--s-6); font-size: var(--t-sm); color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-6); }
.footer-brand p { margin-top: var(--s-3); max-width: 34ch; }
.footer-brand p a { color: inherit; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); align-content: start; }
.footer-nav a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.footer-base::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: var(--s-3); }
.footer-base { margin-top: var(--s-7); display: grid; gap: var(--s-2); font-size: var(--t-xs); color: var(--ink-3); }
.footer-base p { margin: 0; max-width: 90ch; }

/* ---------------------------------------------------------------- home: hero */
.hero { padding: var(--s-8) 0 var(--s-7); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-7) var(--s-8); align-items: end; }
.hero h1 { font-size: clamp(2.6rem, 1.5rem + 3.9vw, 4.5rem); line-height: 1.02; letter-spacing: -.022em; max-width: 13ch; }
.hero .lede { font-size: var(--t-md); color: var(--ink-2); max-width: 46ch; margin: 0; }
.hero .cta-row { margin: var(--s-6) 0 var(--s-3); }
.hero .fine { margin: 0; }

/* ---------------------------------------------------------------- home: sections */
.demo-wrap { padding-bottom: var(--s-8); }
.block { border-top: 1px solid var(--line); padding: var(--s-8) 0; }
.block-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-5) var(--s-7); }
.block h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.35rem); }
.block-note { margin-top: var(--s-4); color: var(--ink-3); font-size: var(--t-sm); max-width: 30ch; }
.block-foot { margin: var(--s-5) 0 0; font-size: var(--t-sm); color: var(--ink-3); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.steps li:first-child { padding-top: 6px; }
.steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font: 400 var(--t-sm)/1.7 var(--font-mono); color: var(--ink-3); }
.steps h3 { margin-bottom: var(--s-2); }
.steps p { margin: 0; color: var(--ink-2); max-width: 60ch; }

.catch { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.catch th, .catch td { text-align: left; vertical-align: baseline; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.catch thead th { font: 500 var(--t-xs)/1.2 var(--font-mono); color: var(--ink-3); padding-top: 0; padding-bottom: 10px; }
.catch tbody th { font-weight: 600; color: var(--ink); width: 30%; }
.catch td:last-child { width: 1%; white-space: nowrap; padding-right: 0; }
.catch td { color: var(--ink-2); }
.catch code { font-size: .8125rem; color: var(--ink); margin-right: .55em; white-space: nowrap; }

.chip { display: inline-block; padding: 3px 8px; border-radius: var(--r-sm); font: 500 11.5px/1.25 var(--font-mono); letter-spacing: .01em; white-space: nowrap; }
.v-allow { color: var(--allow); background: var(--allow-bg); }
.v-block { color: var(--block); background: var(--block-bg); }
.v-ask { color: var(--ask); background: var(--ask-bg); }

.agents { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.agents li { padding: var(--s-4) var(--s-4) var(--s-4) 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.agents b { font: 420 1.375rem/1.2 var(--font-display); letter-spacing: -.01em; }
.agents span { font-size: var(--t-sm); color: var(--ink-3); }
.agents code { font-size: .8125rem; }

.block-quiet { background: var(--bg-sunk); border-top-color: transparent; }
.block-quiet + .block { border-top-color: transparent; }
.privacy-line { font: 420 clamp(1.35rem, 1.1rem + .9vw, 1.75rem)/1.3 var(--font-display); letter-spacing: -.01em; color: var(--ink); max-width: 30ch; margin-bottom: var(--s-4); }
.privacy p:not(.privacy-line) { color: var(--ink-2); max-width: 62ch; margin: 0; }
.privacy code { font-size: .8125rem; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: 8px 4px 0 0; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 12px; }
.faq summary:hover { color: var(--accent); }
.faq details > div { padding: 0 var(--s-6) var(--s-4) 0; color: var(--ink-2); max-width: 66ch; }
.faq details > div p { margin: 0 0 var(--s-3); }

.closing { border-top: 1px solid var(--line); padding: var(--s-8) 0 0; }
.closing-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5); }
.closing h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.35rem); }
.closing .cta-row { margin: 0; }
.home .site-footer { margin-top: var(--s-8); }

/* ---------------------------------------------------------------- demo (signature animation) */
.demo { margin: 0; }
.demo-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1.12fr); height: 404px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg-elev); overflow: hidden; }
.pane { display: flex; flex-direction: column; min-width: 0; }
.pane-bar { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 var(--s-4); font: 500 12px/1 var(--font-mono); flex: none; }
.pane-title { font-weight: 500; }
.pane-sub { margin-left: auto; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-dot { width: 7px; height: 7px; border-radius: 50%; background: #D97757; flex: none; }

.pane-agent { background: var(--term-bg); color: var(--term-ink); }
.pane-agent .pane-bar { border-bottom: 1px solid var(--term-line); color: var(--term-ink); }
.term { list-style: none; margin: 0; padding: var(--s-4) var(--s-4) 0; font: 400 13px/1.55 var(--font-mono); overflow: hidden; }
.term li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.55em; }
.t-call { position: relative; padding-left: 18px; margin-top: 10px; }
.t-call:first-child { margin-top: 0; }
.t-call::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--term-dim); }
.t-call.is-allow::before { background: var(--term-allow); }
.t-call.is-block::before { background: var(--term-block); }
.t-call.is-ask::before { background: var(--term-ask); }
.t-call b { font-weight: 500; }
.t-call span { color: var(--term-ink); }
.t-out { position: relative; padding-left: 36px; color: var(--term-dim); }
.t-out::before { content: ""; position: absolute; left: 20px; top: .1em; width: 8px; height: .65em; border-left: 1px solid var(--term-dim); border-bottom: 1px solid var(--term-dim); }
.t-out.is-block { color: var(--term-block); }
.t-out.is-ask { color: var(--term-ask); }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 1px; vertical-align: -.17em; background: var(--term-ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.gate { position: relative; display: grid; place-items: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.gate-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--line-2); }
.gate-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg-elev); color: var(--ink-2); transition: color .2s, border-color .2s, background-color .2s; }
.gate-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.gate-mark.is-allow { color: var(--allow); border-color: var(--allow); background: var(--allow-bg); }
.gate-mark.is-block { color: var(--block); border-color: var(--block); background: var(--block-bg); }
.gate-mark.is-ask { color: var(--ask); border-color: var(--ask); background: var(--ask-bg); }
.gate-mark.is-busy { border-color: var(--ink-3); color: var(--ink); }
.gate-label { position: absolute; left: 50%; top: calc(50% + 30px); transform: translateX(-50%); font: 500 10.5px/1 var(--font-mono); color: var(--ink-3); background: var(--bg-elev); padding: 3px 4px; letter-spacing: .02em; }

.pane-log { background: var(--app-bg); color: var(--ink); }
.pane-log .pane-bar { border-bottom: 1px solid var(--app-line); font-family: var(--font-ui); font-size: 13px; }
.pane-log .pane-title { font-weight: 600; }
.log-head, .log li { display: grid; grid-template-columns: 64px 70px minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 0 var(--s-4); }
.log-head { height: 32px; font: 500 11px/1 var(--font-ui); color: var(--ink-3); border-bottom: 1px solid var(--app-line); flex: none; }
.log { list-style: none; margin: 0; padding: 6px 8px; overflow: hidden; }
.log li { height: 40px; padding: 0 8px; border-radius: 5px; font: 400 12.5px/1.2 var(--font-ui); }
.log li:nth-child(even) { background: var(--app-row); }
.log time { font: 400 11.5px/1 var(--font-mono); color: var(--ink-3); }
.log code { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.log .rule { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log .rule em { font-style: normal; color: var(--ink-3); }
.log .chip { justify-self: start; font-size: 11px; padding: 3px 7px; }
.log li.is-new { animation: row-in .42s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(-10px); background: color-mix(in srgb, var(--accent) 12%, transparent); } }
.chip.is-swap { animation: chip-swap .35s ease both; }
@keyframes chip-swap { from { opacity: .2; transform: scale(.9); } }

.packet { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink-2) 18%, transparent); opacity: 0; pointer-events: none; z-index: 3; }
.packet.is-allow { background: var(--allow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--allow) 22%, transparent); }
.packet.is-block { background: var(--block); box-shadow: 0 0 0 4px color-mix(in srgb, var(--block) 22%, transparent); }
.packet.is-ask { background: var(--ask); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ask) 22%, transparent); }

.popup { position: absolute; z-index: 4; right: 28px; top: 92px; width: min(388px, calc(100% - 32px)); padding: 18px 18px 16px; border-radius: 12px; background: var(--app-bg); border: 1px solid var(--app-line); box-shadow: var(--shadow-pop); font: 400 13px/1.35 var(--font-ui); color: var(--ink); transform-origin: 70% 30%; }
.popup[hidden] { display: none; }
.popup.is-in { animation: pop-in .26s cubic-bezier(.2, .8, .2, 1) both; }
.popup.is-out { animation: pop-out .22s ease both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.98); } }
.popup-top { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; }
.popup-icon { width: 24px; height: 24px; }
.popup-icon path:first-child { fill: #B4322A; }
.popup-icon .pi-mark { stroke: #fff; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.popup-title { margin: 0; font-weight: 600; }
.popup-sub { margin: 1px 0 0; font-size: 11.5px; color: var(--ink-3); }
.popup-sev { font: 700 10px/1 var(--font-ui); letter-spacing: .04em; color: var(--block); background: var(--block-bg); padding: 4px 6px; border-radius: 4px; }
.popup-cmd { margin: 12px 0 10px; padding: 9px 11px; border-radius: 6px; background: var(--app-row); border: 1px solid var(--app-line); font: 400 12.5px/1.3 var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popup-why { margin: 0 0 6px; font-size: 12px; color: var(--ink-2); }
.popup-why b { color: var(--ink); }
.popup-timer { margin: 0 0 12px; font-size: 11px; color: var(--ink-3); }
.popup-btns { display: flex; justify-content: space-between; gap: 8px; }
.pb { padding: 6px 14px; border-radius: 6px; font-size: 12.5px; background: var(--app-row); border: 1px solid var(--app-line); transition: transform .08s, filter .08s; }
.pb-block { background: #2E6B66; color: #fff; border-color: #2E6B66; font-weight: 500; }
.pb.is-press { transform: scale(.95); filter: brightness(.88); }

.cursor { position: absolute; left: 0; top: 0; width: 18px; height: 22px; z-index: 5; opacity: 0; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / .35)); }
.cursor path { fill: #111; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }

.demo figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-5); margin-top: var(--s-4); }
.demo figcaption p { margin: 0; font-size: var(--t-sm); color: var(--ink-3); max-width: 78ch; }
.demo figcaption code { font-size: .8125rem; color: var(--ink-2); }
.demo-toggle { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: transparent; color: var(--ink-2); font: 500 var(--t-xs)/1 var(--font-mono); cursor: pointer; }
.demo-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.demo-toggle svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.demo-toggle .i-play { fill: currentColor; stroke: none; }
.demo-toggle .i-play, .demo-toggle[aria-pressed="true"] .i-pause { display: none; }
.demo-toggle[aria-pressed="true"] .i-play { display: block; }

/* ---------------------------------------------------------------- inner pages */
.page-head { padding: var(--s-8) 0 var(--s-6); }
.page-head h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); line-height: 1.05; }
.page-head p { color: var(--ink-2); max-width: 60ch; }
.page-head h1 + p, .page-head h1 + .lede { margin-top: var(--s-4); }
.kicker { font: 500 var(--t-xs)/1.4 var(--font-mono); color: var(--ink-3); margin: 0 0 var(--s-4); }
.lede { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); }

.prose { padding-bottom: var(--s-6); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.5rem, 1.25rem + .8vw, 1.9rem); margin: var(--s-7) 0 var(--s-4); scroll-margin-top: 24px; }
.prose h3 { margin: var(--s-6) 0 var(--s-3); }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 var(--s-4); }
.prose li { margin-bottom: var(--s-2); }
.prose li::marker { color: var(--ink-3); }
.prose code { background: var(--bg-sunk); padding: .1em .35em; border-radius: 3px; color: var(--ink); }
.prose pre, .code-block { background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); overflow-x: auto; line-height: 1.55; margin: 0 0 var(--s-4); }
.prose pre code, .code-block code { background: none; padding: 0; }
.callout { border-left: 2px solid var(--accent); background: var(--bg-elev); padding: var(--s-4) var(--s-5); margin: 0 0 var(--s-5); }
.callout p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 var(--s-4); border-top: 1px solid var(--line); }
.matrix { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.matrix th, .matrix td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.matrix thead th { font: 500 var(--t-xs)/1.3 var(--font-mono); color: var(--ink-3); }
.matrix tbody th { font-weight: 600; white-space: nowrap; }
.matrix td { color: var(--ink-2); }

.release { display: grid; grid-template-columns: 160px 1fr; gap: var(--s-5); padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.release-meta h2 { margin: 0 !important; font-size: 1.75rem; }
.release-meta time { display: block; margin-top: var(--s-2); font: 400 var(--t-xs)/1.4 var(--font-mono); color: var(--ink-3); }
.tag { display: inline-block; margin-top: var(--s-2); font: 500 11px/1 var(--font-mono); padding: 4px 7px; border-radius: var(--r-sm); background: var(--bg-sunk); color: var(--ink-2); }
.release h3 { margin-top: 0; }

.steps-install { list-style: none; counter-reset: step; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.steps-install > li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.steps-install > li::before { content: counter(step, decimal-leading-zero); grid-row: span 3; font: 400 var(--t-sm)/1.6 var(--font-mono); color: var(--ink-3); }
.steps-install h3 { margin: 0 0 var(--s-2); }
.steps-install p { margin: 0 0 var(--s-2); color: var(--ink-2); }
.dl-meta { list-style: none; padding: 0; margin: var(--s-4) 0 0; font: 400 var(--t-xs)/1.7 var(--font-mono); color: var(--ink-3); }
.hash { overflow-wrap: anywhere; }

.notfound { padding: var(--s-9) 0 var(--s-6); }
.nf-term { display: inline-block; margin: 0 0 var(--s-6); padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--term-bg); color: var(--term-ink); font-size: var(--t-sm); line-height: 1.7; }
.t-block { color: var(--term-block); }
.notfound h1 { font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); margin-bottom: var(--s-3); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero h1 { max-width: 16ch; }
  .block-grid { grid-template-columns: 1fr; }
  .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .demo-stage { grid-template-columns: 1fr; grid-template-rows: 272px 46px 300px; height: auto; }
  .gate { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .gate-line { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 0; border-left: 0; border-top: 1px dashed var(--line-2); }
  .gate-mark { width: 34px; height: 34px; }
  .gate-label { top: 50%; left: calc(50% + 28px); transform: translateY(-50%); }
  .term { font-size: 12px; padding-top: var(--s-3); }
  .t-call { margin-top: 6px; }
  .log-head, .log li { grid-template-columns: 62px minmax(0, 1fr) minmax(0, .9fr); }
  .log-head span:first-child, .log time { display: none; }
  .popup { left: 12px; right: 12px; width: auto; top: auto; bottom: 14px; }
  .demo figcaption { flex-direction: column; gap: var(--s-3); }
  .release { grid-template-columns: 1fr; gap: var(--s-3); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 var(--s-4); }
  .hero { padding: var(--s-7) 0 var(--s-6); }
  .block { padding: var(--s-7) 0; }
  .catch thead { display: none; }
  .catch tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
  .catch th, .catch td { border: 0; padding: 0; width: auto !important; }
  .catch td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .catch td:last-child { grid-row: 1; grid-column: 2; }
  .agents { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .closing-inner { display: block; }
  .closing .cta-row { margin-top: var(--s-5); }
  .btn-lg { padding: 13px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.demo-stage.is-paused *, .demo-stage.is-paused { animation-play-state: paused !important; }
/* GitHub mark (filled icon) in header icon button and buttons */
.icon-btn svg.gh, .btn svg.gh { fill: currentColor; stroke: none; }
