/* Kition Showcase: the kition.ai landing look (portal app/styles/landing.css), dark only. */
@font-face { font-family: "Archivo Variable"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(../fonts/archivo-latin-wdth-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-tight-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --ink: #ededf2; --paper: #07070c; --s1: #0d0d14; --s2: #12121b; --term: #0b0b12; --on: #0b0b12;
  --body: #b4b4c4; --mute: #8b8b9e; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --purple: #5645d4; --purple-hi: #6553e6; --accent: #8b7cf0; --pink: #ff64c8; --ok: #4fd17b;
  --gut: clamp(14px, 2.2vw, 32px); --pad: clamp(16px, 4vw, 64px); --navh: 65px;
  --display: "Archivo Variable", "Arial Narrow", "Arial Black", system-ui, sans-serif;
  --sans: "Inter Tight Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sys: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", sans-serif;
  --hd-ink: #f5f5f5; --hd-line: #1f232e; --hd-ring: hsl(222 18% 22%);
  --ease: cubic-bezier(.2, .9, .1, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { background: var(--paper); scroll-padding-top: calc(var(--navh) + 70px); }
body { min-height: 100vh; overflow-x: clip; background: var(--paper); color: var(--ink); font: 400 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Faint film grain over everything, as on kition.ai. */
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
::selection { background: rgba(139,124,240,.4); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--purple); color: #fff; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 var(--pad); }
.label { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.d { font-family: var(--display); font-weight: 900; font-variation-settings: "wght" 900, "wdth" 84; letter-spacing: -.045em; line-height: .88; }
.em { color: var(--accent); }
.mute { color: var(--mute); }
.kbd, kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; font: 600 11px/1 var(--mono); color: var(--mute); background: var(--s2); box-shadow: inset 0 0 0 1px var(--line2), inset 0 -1px 0 rgba(255,255,255,.06); }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 8px; font-weight: 800; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; transition: transform .25s var(--spring), background .2s, color .2s, box-shadow .2s; }
.btn .arr { display: inline-block; transition: transform .3s var(--spring); }
.btn:hover .arr { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(180deg, #6352e0, var(--purple)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 0 0 1px rgba(139,124,240,.55), 0 0 0 1px rgba(7,7,12,.6), 0 8px 30px -6px rgba(86,69,212,.65); }
.btn-primary:hover { background: linear-gradient(180deg, #7262ec, var(--purple-hi)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(139,124,240,.7), 0 0 0 1px rgba(7,7,12,.6), 0 10px 40px -6px rgba(110,92,240,.85); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.btn-ghost:hover { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; gap: 8px; }
.btn-glow { overflow: hidden; }
.btn-glow::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-20deg); animation: sheen 3.6s var(--ease) infinite 1.6s; pointer-events: none; }
@keyframes sheen { 0% { left: -40%; } 45%, 100% { left: 130%; } }
@keyframes blink { 50% { opacity: 0; } }

/* Header: kition.ai's own (portal app/components/marketing/Header.tsx with its tokens, .container-content
   and .btn-download), in the main site's system face and colours, so both read as one site. */
.top { position: sticky; top: 0; z-index: 50; background: rgba(11,15,25,.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hd-line); color: var(--hd-ink); font: 400 16px/1.5 var(--sys); }
.kc { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.hd-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hd-brand .mark { display: block; flex: none; width: 32px; height: 32px; }
.hd-brand span { font-size: 18px; line-height: 1.4; font-weight: 600; }
.hd-nav { display: none; align-items: center; gap: 4px; }
.hd-acts { display: flex; align-items: center; gap: 8px; }
.hd-link, .hd-mlink, .hd-macct { white-space: nowrap; border-radius: 10px; padding: 8px 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: rgba(255,255,255,.6); transition: color .2s ease-out, background-color .2s ease-out, border-color .2s ease-out; }
.hd-link { position: relative; }
.hd-link:hover, .hd-mlink:hover, .hd-burger:hover { background-color: rgba(255,255,255,.1); color: var(--hd-ink); }
/* The current section (Showcase): kition.ai's active item, `text-ink`; in the menu also `bg-white/10`. */
.hd-link.on, .hd-link.on:hover { background-color: transparent; color: var(--hd-ink); }
.hd-mlink.on { background-color: rgba(255,255,255,.1); color: var(--hd-ink); }
.hd-acct { display: none; }
.hd-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: rgba(255,255,255,.7); transition: color .2s ease-out, background-color .2s ease-out; }
.hd-burger span { display: flex; }
.hd-burger .i-close, .hd-burger[aria-expanded="true"] .i-open { display: none; }
.hd-burger[aria-expanded="true"] .i-close { display: flex; }
.hd-menu { border-top: 1px solid var(--hd-line); background: rgb(11,15,25); }
.hd-menu-in, .hd-menu-nav { display: flex; flex-direction: column; gap: 4px; }
.hd-menu-in { padding-top: 12px; padding-bottom: 12px; }
.hd-mlink { padding: 10px 12px; color: rgba(255,255,255,.7); }
.hd-macct { margin-top: 4px; border-top: 1px solid var(--hd-line); padding: 14px 12px 10px; color: rgba(255,255,255,.5); }
.hd-macct:hover { color: var(--hd-ink); }
/* The GitHub badge (portal app/components/marketing/GithubStars.tsx): in the bar from 640px, ringed
   with kition.ai's hairline; its count keeps a 4ch slot so a newer count never shifts the header.
   Under 640px the menu has its row instead. */
.hd-gh { display: none; align-items: center; gap: 8px; white-space: nowrap; border-radius: 10px; padding: 8px 10px; font-size: 14px; line-height: 20px; font-weight: 500; color: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px var(--hd-ring); transition: color .2s ease-out, background-color .2s ease-out; }
.hd-gh:hover { background-color: rgba(255,255,255,.1); color: var(--hd-ink); }
.hd-gh svg, .hd-mgh svg { display: block; flex: none; }
.hd-gh-c { display: inline-flex; align-items: center; gap: 4px; }
.hd-gh-n { min-width: 4ch; text-align: center; }
.hd-gh-c { font-variant-numeric: tabular-nums; }
.hd-mgh { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: rgba(255,255,255,.5); transition: color .2s ease-out; }
.hd-mgh:hover { color: var(--hd-ink); }
.hd-mgh .hd-gh-c { margin-left: auto; }
@media (min-width: 640px) { .kc { padding-left: 24px; padding-right: 24px; } .hd-gh { display: inline-flex; } .hd-mgh { display: none; } }
@media (min-width: 1024px) { .kc { padding-left: 32px; padding-right: 32px; } }
/* The desktop nav from 1200px, as on kition.ai (portal Header.tsx DESKTOP): the seven items, the
   GitHub badge with a five-character count ("12.3k"), "Console" and "Download for Windows" need 1182px. */
@media (min-width: 1200px) {
  .hd-nav { display: flex; }
  .hd-acct { display: inline-flex; }
  .hd-burger, .hd-menu { display: none !important; }
}
/* Without JavaScript the menu cannot open; the footer carries the links. */
html:not(.js) .hd-burger { display: none; }
.btn-download { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: 8px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; color: #fff; background: linear-gradient(180deg, #6352e0, #5645d4); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 0 0 1px rgba(139,124,240,.55), 0 0 0 1px rgba(7,7,12,.6), 0 8px 30px -6px rgba(86,69,212,.65); transition: transform .25s var(--spring), background .2s, box-shadow .2s; }
.btn-download:hover { background: linear-gradient(180deg, #7262ec, #6553e6); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(139,124,240,.7), 0 0 0 1px rgba(7,7,12,.6), 0 10px 40px -6px rgba(110,92,240,.85); }
.btn-download:active { transform: scale(.97); }
.btn-download::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-20deg); animation: sheen 3.6s var(--ease) infinite 1.6s; pointer-events: none; }
.btn-download .arr { display: inline-block; transition: transform .3s var(--spring); }
.btn-download:hover .arr { transform: translateX(4px); }

/* Search, in the filter bar of the home and kit pages */
.search { position: relative; display: flex; align-items: center; flex: none; width: min(280px, 100%); min-width: 0; margin-left: auto; }
.search + .count { margin-left: 0; }
.search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--mute); pointer-events: none; }
.search input { width: 100%; height: 36px; padding: 0 36px 0 33px; border: 0; border-radius: 8px; background: var(--s1); color: var(--ink); font: 500 14px var(--sans); box-shadow: inset 0 0 0 1px var(--line2); transition: box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--mute); }
.search input:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); }
.search input:focus { outline: none; background: var(--s2); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgba(139,124,240,.22); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 9px; pointer-events: none; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { opacity: 0; }
/* Without JavaScript the search cannot filter, so it goes; the rest of the page is all there. */
html:not(.js) .search, html:not(.js) .copy, html:not(.js) .playbtn { display: none; }
.js .preview-note { display: none; }
.filtered #hero, .filtered #stats-wrap, .filtered .khead .hstage { display: none; }

/* Breadcrumbs */
.crumbs { color: var(--mute); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "\203A"; margin: 0 10px; color: rgba(255,255,255,.3); }
.crumbs a { transition: color .2s; border-radius: 4px; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hero: line grid with a radial mask, one purple glow */
.hero { position: relative; isolation: isolate; padding-top: clamp(18px, 2vw, 30px); }
.hero::before { content: ""; position: absolute; inset: calc(var(--navh) * -1) 0 -40px; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 64px 64px; background-position: center top; -webkit-mask-image: radial-gradient(ellipse 72% 64% at 50% 34%, #000 18%, rgba(0,0,0,.4) 50%, transparent 78%); mask-image: radial-gradient(ellipse 72% 64% at 50% 34%, #000 18%, rgba(0,0,0,.4) 50%, transparent 78%); }
.hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; left: 50%; top: -12%; width: min(1100px, 110vw); height: min(640px, 80vw); transform: translateX(-62%); background: radial-gradient(closest-side, rgba(86,69,212,.34), rgba(86,69,212,.12) 55%, transparent); filter: blur(10px); }
.hero-in { display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 40px); align-items: center; }
.hero-copy { min-width: 0; }
.hud { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.hud .ok { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.hud .ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(79,209,123,.18); animation: blink 1.6s steps(2) infinite; }
.headline { font-family: var(--display); font-weight: 900; font-size: clamp(40px, 4.3vw, 80px); line-height: .84; letter-spacing: -.05em; font-variation-settings: "wght" 900, "wdth" 84; margin-top: clamp(14px, 1.6vw, 22px); }
.headline .row1 { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .1em .2em; }
.slot { --c: var(--accent); display: inline-block; height: 1.02em; overflow: hidden; position: relative; background: var(--c); color: var(--on); border-radius: .055em; padding: 0 .07em; box-shadow: inset 0 .02em 0 rgba(255,255,255,.5), 0 0 .5em -.08em color-mix(in srgb, var(--c) 55%, transparent); transition: width .75s var(--ease), background-color .5s, box-shadow .5s; transform-origin: 0 100%; animation: slotIn 1s var(--ease) both .15s; }
@keyframes slotIn { from { clip-path: inset(0 100% 0 0 round .055em); } to { clip-path: inset(0 0 0 0 round .055em); } }
.slot.squash { animation: squash .7s var(--spring); }
@keyframes squash { 0% { transform: scale(1,1); } 25% { transform: scale(1.05,.84); } 55% { transform: scale(.97,1.07); } 100% { transform: scale(1,1); } }
.reel { display: flex; flex-direction: column; align-items: flex-start; transition: transform .75s cubic-bezier(.7,-.3,.25,1.35); will-change: transform; }
.reel span { display: block; width: max-content; height: 1.02em; line-height: 1.02em; margin-bottom: .5em; white-space: nowrap; }
.reel span.hit { animation: hit .9s var(--ease); }
@keyframes hit { 0% { font-variation-settings: "wght" 200, "wdth" 110; } 100% { font-variation-settings: "wght" 900, "wdth" 84; } }
.tick { --c: var(--accent); display: grid; grid-template-columns: auto auto; gap: 2px 10px; align-items: center; align-self: flex-start; margin-top: .3em; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; line-height: 1.35; color: var(--mute); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tick i { grid-row: span 3; width: 34px; height: 34px; border-radius: 6px; background: var(--c); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 18px -4px var(--c); transition: background-color .5s; }
.tick b { color: var(--ink); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.tcur { display: inline-block; width: .55em; height: 1.05em; background: currentColor; vertical-align: -.18em; margin-left: 3px; animation: blink 1s steps(2) infinite; }
.row2 { display: block; margin-top: .06em; }
.row2 .wd { display: inline-block; white-space: nowrap; }
.row2 .ch { display: inline-block; animation: wIn 1.1s var(--ease) both; animation-delay: calc(.35s + var(--i) * .06s); }
@keyframes wIn { from { opacity: 0; transform: translateY(.35em); font-variation-settings: "wght" 100, "wdth" 125; } to { opacity: 1; transform: none; font-variation-settings: "wght" 900, "wdth" 84; } }
.row2 .em { text-shadow: 0 0 .4em rgba(139,124,240,.35); }
.lede { margin-top: clamp(14px, 1.5vw, 22px); max-width: 46ch; font-size: clamp(15px, 1.08vw, 17px); color: var(--body); }
.lede b { color: var(--ink); font-weight: 600; }

/* The featured sample's commands, a compact strip under the copy: the replay's current beat */
.strip { --c: var(--accent); margin-top: clamp(16px, 1.8vw, 22px); max-width: 640px; min-width: 0; }
.strip-h { display: flex; justify-content: space-between; gap: 12px; color: var(--mute); font-size: 11px; }
.strip-h b { font-weight: 400; color: var(--ink); }
.strip-n { font-variant-numeric: tabular-nums; }
.calls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; height: 28px; overflow: hidden; }
.call { display: inline-flex; align-items: center; gap: 7px; height: 28px; max-width: 100%; padding: 0 9px; border-radius: 7px; font-family: var(--mono); font-size: 12px; color: #d4d4de; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.call b { width: 9px; height: 9px; border-radius: 2px; background: var(--c); flex: none; box-shadow: 0 0 10px -2px var(--c); }
.call code { font: inherit; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call code i { font-style: normal; color: var(--mute); }
.call em { font-style: normal; color: var(--c); }
.call.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 0 18px -8px var(--c); animation: callIn .45s var(--spring) both; animation-delay: calc(var(--k, 0) * 60ms); }
.call.more-c { color: var(--mute); }
@keyframes callIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }

/* The hero's stage: the featured sample, built beat by beat by the replay's actors. With the effect
   on (and a replay to play) the status pill sits in the box's foot and the beat's caption under it;
   off, or without the script, the box shows the finished sample and a line of what was built. */
.hstage { --c: var(--accent); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hs-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 34px; }
.hs-k { display: inline-flex; align-items: baseline; gap: 10px; min-width: 0; }
.hs-k b { font-weight: 700; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-open { color: var(--mute); font-size: 12px; white-space: nowrap; transition: color .2s; }
.hs-k:hover b { color: color-mix(in srgb, var(--c) 70%, #fff); }
.hs-k:hover .hs-open { color: var(--ink); }
.hs-panel { position: relative; min-width: 0; }
.hs-box { position: relative; isolation: isolate; display: grid; place-items: center; width: 100%; height: clamp(320px, calc(100vh - 360px), 580px); padding: 14px 18px; border-radius: 16px; overflow: hidden; container-type: size; background: radial-gradient(90% 75% at 50% 45%, color-mix(in srgb, var(--c) 16%, #161622), #0c0c14 80%); box-shadow: inset 0 0 0 1px var(--line2), 0 40px 100px -50px color-mix(in srgb, var(--c) 70%, transparent); transition: box-shadow .3s; }
.hs-box::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 24px 24px; background-position: center; }
.hs-box:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 40px 100px -50px color-mix(in srgb, var(--c) 80%, transparent); }
.hs-box img { max-width: 100%; max-height: 100%; width: min(100cqw, calc(100cqh * var(--r))); height: auto; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 24px 50px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.07); }
.hs-hud { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: none; }
.hs-cap { display: none; min-height: 38px; }
.hs-cap .stg-cap { margin-top: 0; }
.hs-foot { display: flex; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; min-width: 0; color: var(--mute); font-size: 11px; }
.hs-foot .saved { color: var(--ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.js:not([data-fx="off"]) body[data-stage] .hs-box { padding-bottom: 58px; }
html.js:not([data-fx="off"]) body[data-stage] .hs-hud, html.js:not([data-fx="off"]) body[data-stage] .hs-cap { display: block; }
html.js:not([data-fx="off"]) body[data-stage] .hs-foot { display: none; }

/* The replay stage (stage.js): a canvas over the picture, the status pill, the effect setting */
.stg-cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.stg-on > img { visibility: hidden; }
.stg-hud { --c: var(--accent); display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px; background: rgba(13,13,20,.9); box-shadow: inset 0 0 0 1px var(--line2), 0 14px 34px -16px rgba(0,0,0,.9); font: 500 12px/1 var(--mono); color: var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stg-btn { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.07); transition: background .2s; }
.stg-btn:hover { background: rgba(255,255,255,.16); }
.stg-btn svg { width: 12px; height: 12px; fill: currentColor; }
.stg-btn .i-play, .stg-btn.paused .i-pause { display: none; }
.stg-btn.paused .i-play { display: inline; }
.stg-dots { display: flex; padding-left: 4px; }
.stg-dots i { width: 13px; height: 13px; margin-left: -4px; border-radius: 50%; background: var(--d); box-shadow: 0 0 0 2px #0d0d14, 0 0 9px -1px var(--d); }
.stg-agents { color: var(--ink); }
.stg-num b { color: var(--ink); font-weight: 600; }
.stg-page { padding: 3px 7px; border-radius: 5px; color: var(--ink); background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--line2); font-size: 11px; }
.stg-page[hidden] { display: none; }
.stg-track { position: relative; flex: 1; min-width: 50px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.09); }
.stg-fill { position: absolute; inset: 0; border-radius: 3px; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #8b7cf0), var(--c)); box-shadow: 0 0 12px -2px var(--c); transition: transform .5s var(--ease); }
.stg-ticks { position: absolute; inset: -9px 0; }
.stg-tick { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.stg-tick::after { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1.5px; background: rgba(7,7,12,.9); }
.stg-tick:first-child::after { display: none; }
.stg-tick:hover { background: rgba(255,255,255,.08); }
.stg-tick.now::before { content: ""; position: absolute; right: -3px; top: 6px; width: 6px; height: 12px; border-radius: 2px; background: #fff; box-shadow: 0 0 10px var(--c); }
.stg-state { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.stg-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(79,209,123,.18); animation: blink 1.2s steps(2) infinite; }
.stg-hud.done .stg-state { color: var(--ink); }
.stg-hud.done .stg-state::before { animation: none; background: var(--ok); }
.stg-cap { display: flex; align-items: center; gap: 9px; min-width: 0; margin-top: 9px; padding-left: 6px; font: 400 12px/1.3 var(--mono); color: var(--body); }
.stg-capt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stg-tag { flex: none; padding: 3px 6px; border-radius: 4px; font: 600 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); }
.stg-note { margin-top: 5px; padding-left: 6px; font: 400 11px/1.35 var(--mono); color: var(--mute); }
.fx { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fx-l { color: var(--mute); font-size: 11px; }
.fx-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(13,13,20,.85); box-shadow: inset 0 0 0 1px var(--line2); }
.fx-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; font: 600 12.5px var(--sans); color: var(--mute); transition: color .2s, background .2s, box-shadow .2s; }
.fx-tabs [role="tab"]:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.fx-tabs svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.fx-tabs [aria-selected="true"] { color: var(--on); background: var(--c, var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 18px -6px var(--c, var(--accent)); }
.fx-tabs [data-fx="off"][aria-selected="true"] { color: var(--ink); background: var(--s2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }

/* A sample's replay: the bar over the picture and the status under it */
.vcol { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.vbar { --c: var(--accent); display: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; min-height: 34px; }
.js .vbar { display: flex; }
.watchbtn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 11px; border-radius: 8px; font: 700 14px var(--sans); color: var(--on); background: var(--c); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 26px -10px var(--c); transition: transform .25s var(--spring), filter .2s; }
.watchbtn:hover { filter: brightness(1.08); }
.watchbtn:active { transform: scale(.97); }
.watchbtn svg { width: 12px; height: 12px; fill: currentColor; }
.watchbtn[aria-pressed="true"] { color: var(--ink); background: var(--s2); box-shadow: inset 0 0 0 1px var(--line2); }
.watchbtn[aria-pressed="true"] svg path { d: path("M4.5 4h7v8h-7z"); }
html[data-fx="off"] .watchbtn { display: none; }
.vdock { display: none; }
.replaying ~ .vdock { display: block; }
.code pre { position: relative; }
/* Picture-in-picture: a playing replay follows the reader down to the Steps (site.js). */
.view.pip { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 340px; height: 228px; min-height: 0; padding: 8px 8px 40px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line2), 0 24px 60px -12px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.5); animation: pipIn .35s var(--ease) both; }
@keyframes pipIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.view.pip > img, .view.pip .playbtn { display: none; }
.pipbar { display: none; }
.view.pip .pipbar { position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 2; display: flex; align-items: center; gap: 10px; height: 28px; }
.pipbar .stg-btn { width: 26px; height: 26px; }
.pipbar .stg-track { height: 4px; }
.beatband { position: absolute; left: 0; top: 0; min-width: 100%; width: max(100%, var(--sw, 100%)); pointer-events: none; background: color-mix(in srgb, var(--c, var(--accent)) 13%, transparent); box-shadow: inset 3px 0 0 var(--c, var(--accent)); transition: transform .35s var(--ease), height .35s var(--ease); }
.code pre.seekable { cursor: pointer; }
.badge.rp { left: auto; right: 10px; }
.badge.rp::before { border: 0; width: 7px; height: 7px; border-radius: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); }

/* Kit colour cards: the shared Kition kit unit */
.kcard { --c: var(--accent); position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; min-width: 0; height: 100%; padding: 8px; border-radius: 6px; background: var(--c); color: var(--on); overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(255,255,255,.12), 0 8px 26px -12px color-mix(in srgb, var(--c) 55%, transparent); transform-origin: 50% 100%; transition: transform .45s var(--spring), opacity .3s, box-shadow .3s, outline-color .3s; outline: 1px solid transparent; outline-offset: 3px; }
.kcard .top2 { display: flex; justify-content: space-between; gap: 4px; font-family: var(--mono); font-size: 10px; line-height: 1.1; opacity: .82; font-variant-numeric: tabular-nums; }
.kcard .nm { display: block; font-family: var(--display); font-weight: 900; font-variation-settings: "wght" 900, "wdth" 86; font-size: clamp(14px, 1.3vw, 21px); line-height: .88; letter-spacing: -.04em; white-space: nowrap; }
.kcard:hover { transform: translateY(-4px); }
.kcard:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.kcard.on, .kcard[aria-current] { outline: 1px solid color-mix(in srgb, var(--c) 80%, #fff); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 0 0 1px rgba(255,255,255,.22), 0 0 34px -2px color-mix(in srgb, var(--c) 70%, transparent), 0 0 80px -10px color-mix(in srgb, var(--c) 45%, transparent); }
.kcard.on::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34%; background: linear-gradient(180deg, transparent, rgba(255,255,255,.34) 85%, rgba(255,255,255,.85) 100%); border-bottom: 1px solid #fff; animation: scan 1.6s linear infinite; pointer-events: none; }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(300%); } }
.blocks.picked .kcard:not([aria-current]) { opacity: .42; transform: scaleY(.86); }
.blocks.picked .kcard:not([aria-current]):hover { opacity: 1; transform: scaleY(1); }

.kits { padding-top: clamp(18px, 2.2vw, 30px); }
.blocks { display: grid; grid-template-columns: repeat(var(--cols, 16), minmax(0, 1fr)); gap: 4px; height: clamp(70px, 6vw, 96px); }
.blk { min-width: 0; height: 100%; animation: slideIn .9s var(--spring) both; animation-delay: var(--d, .5s); }
@keyframes slideIn { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
.blocks-cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; color: var(--mute); font-variant-numeric: tabular-nums; }
.blocks-cap .ok { color: var(--ok); }
.all { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 8px; border-radius: 6px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); transition: background .2s, box-shadow .2s; }
.all::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: conic-gradient(#8b7cf0 0 25%, #ff9a55 0 50%, #4ccbf0 0 75%, #f57bbd 0); }
.all:hover { background: rgba(255,255,255,.06); }
.all[aria-current] { box-shadow: inset 0 0 0 1px var(--accent); background: rgba(139,124,240,.12); }

/* Kit head (a kit's own list) */
.khead { --c: var(--accent); position: relative; isolation: isolate; padding-top: clamp(22px, 3vw, 44px); }
.khead::after { content: ""; position: absolute; z-index: -1; pointer-events: none; left: -10%; top: -60%; width: min(900px, 90vw); height: min(520px, 70vw); background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 26%, transparent), transparent); filter: blur(10px); }
.khead-copy .label { color: var(--mute); }
.khead .crumbs { margin-bottom: 0; }
.khead h1 { display: flex; align-items: flex-end; gap: .14em; margin-top: 14px; font-size: clamp(56px, 9vw, 150px); }
.khead h1 i { display: inline-block; width: .62em; height: .62em; margin-bottom: .1em; border-radius: .08em; background: var(--c); box-shadow: inset 0 .02em 0 rgba(255,255,255,.5), 0 0 .5em -.1em var(--c); }
.khead-copy > p.label { margin-top: 18px; font-size: clamp(16px, 1.3vw, 19px); color: var(--body); }
/* The kit page's hero: the title on the left, the stage (the kit's replays in turn) on the right and
   the commands strip under the title; in one column the strip goes under the stage. */
.khead-in { display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1fr); grid-template-areas: "copy stage" "strip stage"; gap: clamp(20px, 2.4vw, 40px); align-items: center; }
.khead-copy { grid-area: copy; min-width: 0; align-self: end; }
.khead .hstage { grid-area: stage; margin-top: 10px; }
.khead .strip { grid-area: strip; align-self: start; margin-top: 0; width: 100%; }
.filtered .khead-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy"; }
.filtered .khead .strip { display: none; }
@media (min-width: 1181px) { html:not(.filtered) .khead h1 { font-size: clamp(56px, 7vw, 132px); } }
.hs-n { flex: none; color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.khead-copy > p:not(.label) { margin-top: clamp(14px, 1.6vw, 22px); max-width: 64ch; font-size: clamp(16px, 1.3vw, 19px); color: var(--body); }

/* Embed: a kit's stage alone in a same-origin iframe (kition.ai's home page), filling the frame;
   under it one line of commands, a progress line and a count. The whole frame is one link. */
html.emb-doc, .emb-doc body { height: 100%; overflow: hidden; }
.emb-doc body { min-height: 0; }
.emb-doc body::after { display: none; }
.emb { --c: var(--accent); display: flex; flex-direction: column; width: 100%; height: 100%; }
.emb:focus-visible { outline-offset: -2px; border-radius: 0; }
.emb-box { position: relative; isolation: isolate; flex: 1; min-height: 0; display: grid; place-items: center; padding: clamp(6px, 3.2vmin, 16px); overflow: hidden; container-type: size; background: radial-gradient(90% 75% at 50% 45%, color-mix(in srgb, var(--c) 16%, #161622), #0c0c14 80%); }
.emb-box::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 20px 20px; background-position: center; }
.emb-box img { max-width: 100%; max-height: 100%; width: min(100cqw, calc(100cqh * var(--r))); height: auto; border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 16px 36px -16px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.07); }
.emb-bar { position: relative; flex: none; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; background: var(--s1); box-shadow: inset 0 1px 0 var(--line); }
.emb .calls { flex: 1; min-width: 0; margin: 0; height: 22px; gap: 5px; }
.emb .call { height: 22px; padding: 0 7px; gap: 6px; border-radius: 5px; font-size: 11px; }
.emb .call b { width: 7px; height: 7px; }
.emb-n { flex: none; color: var(--mute); font-size: 10.5px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.emb-prog { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; }
.emb-prog i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--c); box-shadow: 0 0 8px var(--c); transition: transform .5s var(--ease); }
html:not(.js) .emb-prog, html[data-fx="off"] .emb-prog, .emb-doc body:not([data-stage]) .emb-prog { display: none; }
@media (max-width: 380px), (max-height: 220px) {
  .emb-bar { height: 28px; padding: 0 8px; }
  .emb .calls { height: 20px; }
  .emb .call { height: 20px; padding: 0 6px; font-size: 10.5px; }
}

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 var(--gut); margin-top: clamp(18px, 2.2vw, 30px); }
.stat { border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.stat .label { display: block; color: var(--mute); }
.stat dd { display: block; }
.stat b { display: block; margin-top: 8px; font-family: var(--display); font-weight: 900; font-variation-settings: "wght" 900, "wdth" 80; font-size: clamp(32px, 3.1vw, 52px); line-height: .86; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stat:nth-child(1) b { color: var(--accent); }

/* Filter bar: stuck right under the header, its top border under the header's bottom one */
.bar { position: sticky; top: calc(var(--navh) - 1px); z-index: 40; margin-top: clamp(18px, 2.2vw, 32px); background: rgba(7,7,12,.86); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 14px; min-height: 56px; }
.bar-kit { --c: var(--accent); display: flex; align-items: center; gap: 9px; flex: none; }
.bar-kit i { width: 14px; height: 14px; border-radius: 3px; background: var(--c); box-shadow: 0 0 12px -2px var(--c); }
.bar-kit i.all-sq { background: conic-gradient(#8b7cf0 0 25%, #ff9a55 0 50%, #4ccbf0 0 75%, #f57bbd 0); }
.bar-kit b { font-family: var(--display); font-weight: 900; font-variation-settings: "wght" 900, "wdth" 88; font-size: 22px; letter-spacing: -.03em; line-height: 1; }
.chips { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 10px 2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 30px; padding: 0 11px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--body); box-shadow: inset 0 0 0 1px var(--line2); transition: background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.chip small { font: 400 11px var(--mono); color: var(--mute); }
.chip:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.chip[aria-current="true"] { color: var(--on); background: var(--c, var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.chip[aria-current="true"] small { color: var(--on); opacity: .75; }
.query { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--body); font-size: 14px; }
.query q { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; quotes: "\201C" "\201D"; }
.count { flex: none; margin-left: auto; color: var(--mute); font-variant-numeric: tabular-nums; }
.count b { color: var(--ink); font-weight: 600; }
.clear { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 6px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); font-size: 13px; font-weight: 600; }
.clear:hover { background: rgba(255,255,255,.08); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(282px, 100%), 1fr)); gap: clamp(14px, 1.4vw, 22px); padding-top: clamp(18px, 2vw, 28px); }
.card { --c: var(--accent); position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 14px; background: linear-gradient(180deg, var(--s2), var(--s1)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 1px var(--line2); transition: transform .45s var(--spring), box-shadow .3s; }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 24px 60px -26px color-mix(in srgb, var(--c) 65%, transparent); }
.card.rv:not(.in) { opacity: 0; transform: translateY(18px); }
.card.rv.in { transition: transform .45s var(--spring), box-shadow .3s, opacity .6s var(--ease); transition-delay: var(--d, 0ms), 0ms, var(--d, 0ms); }
.card.rv.in:hover { transition-delay: 0ms; }
.stage { position: relative; display: block; margin: 6px 6px 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: radial-gradient(110% 80% at 50% 0%, #1d1d2a, #13131c 70%); box-shadow: inset 0 0 0 1px var(--line); }
.stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 24px 24px; background-position: center; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--c) 22%, transparent), transparent); opacity: 0; transition: opacity .3s; }
.card:hover .stage::after { opacity: 1; }
.fit { position: absolute; inset: 14px; display: grid; place-items: center; container-type: size; }
.fit img { max-width: 100%; max-height: 100%; width: min(100cqw, calc(100cqh * var(--r))); height: auto; border-radius: 4px; background: #1a1a24; box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 30px -12px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.07); transition: transform .6s var(--ease); }
.card:hover .fit img { transform: scale(1.035); }
.badge { position: absolute; left: 10px; top: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 5px; font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: rgba(7,7,12,.82); box-shadow: inset 0 0 0 1px var(--line2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.badge::before { content: ""; width: 0; height: 0; border-left: 7px solid var(--c); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.card.playing .badge::before { border: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blink 1s steps(2) infinite; }
.card-body { display: flex; flex-direction: column; gap: 7px; flex: 1; padding: 13px 16px 16px; min-width: 0; }
.meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.kchip { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--c); font-weight: 600; }
.kchip::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px -1px var(--c); }
.meta .cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card h3 { font-size: 17px; font-weight: 800; line-height: 1.2; letter-spacing: -.015em; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 14px; }
.card h3 a:focus-visible { outline: none; }
.card:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card p { color: var(--body); font-size: 14px; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .st { font-family: var(--mono); font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px; }
.tag { position: relative; z-index: 2; height: 22px; padding: 0 7px; border-radius: 5px; font: 400 11px/22px var(--mono); color: var(--mute); box-shadow: inset 0 0 0 1px var(--line2); transition: color .2s, box-shadow .2s, background .2s; }
.tag:hover { color: var(--ink); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); }

/* A kit's samples, by category */
.cat-sec { padding-top: clamp(26px, 2.8vw, 40px); }
.cat-h { display: flex; align-items: center; gap: 10px; color: var(--body); font-weight: 600; }
.cat-h::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--c, var(--accent)); }
.cat-h small { font-size: 12px; color: var(--mute); font-weight: 400; }
.cat-sec .grid { padding-top: 14px; }

/* Empty state */
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(40px, 7vw, 100px) 0 clamp(20px, 4vw, 60px); }
.empty .label { color: var(--mute); }
.empty h2 { font-size: clamp(44px, 7vw, 112px); }
.empty p { color: var(--body); max-width: 52ch; }
.empty .try { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.empty .try .tag { color: var(--body); }
.nf { padding-top: clamp(40px, 6vw, 90px); }
.nf h1 { font-size: clamp(56px, 9vw, 150px); line-height: .98; }

/* Detail */
.detail { padding-top: clamp(20px, 2.6vw, 36px); }
.dhead { --c: var(--accent); position: relative; margin-top: clamp(18px, 2.4vw, 32px); }
.dhead .meta { font-size: 12px; }
.dhead h1:focus { outline: none; }
.dhead h1 { margin-top: 14px; font-size: clamp(40px, 6vw, 96px); max-width: 18ch; overflow-wrap: break-word; }
.dhead .sum { margin-top: clamp(12px, 1.6vw, 20px); max-width: 64ch; font-size: clamp(17px, 1.35vw, 20px); color: var(--body); }
.dgrid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gut); align-items: start; margin-top: clamp(22px, 3vw, 40px); }
.view { --c: var(--accent); position: relative; isolation: isolate; display: grid; place-items: center; min-height: clamp(260px, 40vw, 560px); padding: clamp(16px, 3vw, 44px); border-radius: 16px; background: radial-gradient(90% 70% at 50% 60%, color-mix(in srgb, var(--c) 18%, #14141e), #0e0e16 75%); box-shadow: inset 0 0 0 1px var(--line2), 0 40px 120px -60px color-mix(in srgb, var(--c) 70%, transparent); overflow: hidden; }
.view::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 32px 32px; background-position: center; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 80%); }
.view img { width: min(100%, var(--w), calc(68vh * var(--r))); height: auto; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 30px 60px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); animation: viewIn .8s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.view .badge { left: 14px; top: 14px; }
.playbtn { cursor: pointer; height: 28px; padding: 0 10px; font-size: 11px; transition: background .2s, box-shadow .2s; }
.playbtn:hover { background: rgba(18,18,27,.95); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent); }
.view.playing .playbtn::before { border: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blink 1s steps(2) infinite; }
.spec { display: flex; flex-direction: column; gap: 0; border-radius: 14px; background: linear-gradient(180deg, var(--s2), var(--s1)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 0 1px var(--line2); padding: 6px 18px 18px; min-width: 0; }
.spec dl > div { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 13px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.spec dt { color: var(--mute); }
.spec dd { color: var(--body); font-size: 14px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.spec dd b { color: var(--ink); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { display: inline-block; padding: 2px 7px; border-radius: 5px; font: 400 11.5px/1.5 var(--mono); color: var(--body); background: var(--term); box-shadow: inset 0 0 0 1px var(--line2); overflow-wrap: anywhere; }
a.pill { cursor: pointer; transition: color .2s, box-shadow .2s; }
a.pill:hover { color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 60%, transparent); }
code, .code-inline { font-family: var(--mono); font-size: .9em; }
.spec .dl { margin-top: 18px; width: 100%; height: 52px; font-size: 16px; }
.spec .dl-meta { margin-top: 8px; color: var(--mute); font-size: 11px; text-align: center; }
.desc + .desc { margin-top: 12px; }
.desc a { text-decoration: underline; text-underline-offset: 3px; }
.grid.rel { padding-top: 0; }
.desc { margin-top: clamp(28px, 3.4vw, 48px); max-width: 72ch; font-size: clamp(16px, 1.2vw, 18px); color: var(--body); }
.sec { margin-top: clamp(36px, 4.4vw, 64px); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: clamp(14px, 1.6vw, 22px); }
.sec-head h2 { font-size: clamp(32px, 3.6vw, 60px); }
.sec-head .label { color: var(--mute); white-space: nowrap; }
.sec-head .label code { text-transform: none; color: var(--body); }
.code { position: relative; background: var(--term); color: #e9e9ee; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line2), 0 30px 80px -40px rgba(86,69,212,.5); overflow: hidden; }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 14px; height: 44px; background: var(--s2); border-bottom: 1px solid var(--line); }
.code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a2a37; flex: none; }
.code-bar .tab { margin-left: 10px; align-self: stretch; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; font: 400 12px var(--mono); color: var(--ink); background: var(--term); box-shadow: inset 1px 0 0 var(--line), inset -1px 0 0 var(--line), inset 0 2px 0 var(--c, var(--accent)); }
.code-bar .lines { margin-left: 12px; color: var(--mute); font: 400 11px var(--mono); }
.copy { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 6px; font: 600 12px var(--mono); color: var(--body); box-shadow: inset 0 0 0 1px var(--line2); transition: background .2s, color .2s; }
.copy:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.copy.ok { color: var(--ok); }
.code pre { max-height: min(640px, 70vh); overflow: auto; padding: 16px 20px 20px; font: 400 12.5px/1.7 var(--mono); white-space: pre; tab-size: 2; scrollbar-color: #2a2a37 transparent; }
.code .k { color: #8fb4ff; } .code .s { color: #b4f07a; } .code .n { color: #ffc46b; } .code .w { color: #ff64c8; } .code .p { color: #77778a; } .code .c { color: #6c6c80; font-style: italic; } .code .cmd { color: #ffc46b; font-weight: 600; }
.checks { border-top: 1px solid var(--line); }
.checks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--body); font-size: 14px; }
.checks li::before { content: ""; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: rgba(79,209,123,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='%234fd17b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: inset 0 0 0 1px rgba(79,209,123,.4); }
.checks code { color: var(--ink); font-size: 12.5px; overflow-wrap: anywhere; }
.checks .v { font-family: var(--mono); font-size: 12px; color: #b4f07a; overflow-wrap: anywhere; }
.nav2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: clamp(40px, 5vw, 80px); }
.nav2 a { --c: var(--accent); display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px; border-radius: 12px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line2), inset 4px 0 0 var(--c); transition: background .2s, transform .3s var(--spring); }
.nav2 a.nx { text-align: right; box-shadow: inset 0 0 0 1px var(--line2), inset -4px 0 0 var(--c); }
.nav2 a:hover { background: var(--s2); transform: translateY(-2px); }
.nav2 .label { color: var(--mute); }
.nav2 b { font-family: var(--display); font-weight: 900; font-variation-settings: "wght" 900, "wdth" 88; font-size: clamp(20px, 2.2vw, 32px); letter-spacing: -.035em; line-height: 1; overflow-wrap: break-word; }

/* Footer */
.foot { margin-top: clamp(70px, 9vw, 140px); background: linear-gradient(180deg, var(--s1), var(--paper)); border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px var(--gut); padding-top: clamp(36px, 4.4vw, 60px); padding-bottom: 28px; }
.foot .brand b { font-size: 18px; }
.foot p { margin-top: 12px; max-width: 52ch; color: rgba(255,255,255,.6); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; gap: 10px 24px; }
.foot nav a { font-size: 14px; color: rgba(255,255,255,.6); transition: color .2s; }
.foot nav a:hover { color: var(--ink); }
.foot-low { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid var(--line); color: rgba(255,255,255,.5); font-size: 12px; }

/* Responsive */
@media (max-width: 1180px) {
  .hero-in, .khead-in { grid-template-columns: 1fr; }
  .khead-in { grid-template-areas: "copy" "stage" "strip"; }
  .khead .strip { max-width: 860px; margin-top: calc(clamp(20px, 2.4vw, 40px) * -.5); }
  .hstage { max-width: 860px; }
  .hs-box { height: auto; aspect-ratio: 16 / 10.5; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
}
@media (max-width: 980px) {
  .dgrid { grid-template-columns: 1fr; }
  .blocks { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 64px; height: auto; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .search { order: 6; flex: 1 1 100%; width: auto; margin: 0 0 10px; }
  .search kbd { display: none; }
  .search input { padding-right: 10px; }
  .headline { font-size: clamp(36px, 12.4vw, 64px); }
  .tick { order: 3; flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: .14em; }
  .tick i { width: 16px; height: 16px; border-radius: 4px; }
  .tick b { font-size: 14px; }
  .bar .query.mute { display: none; }
  .call { height: 26px; font-size: 11px; padding: 0 7px; gap: 6px; }
  .hs-panel { margin: 0 calc(var(--pad) * -1); }
  .hs-box { aspect-ratio: 4 / 3.4; max-height: none; padding: 10px; border-radius: 0; }
  html.js:not([data-fx="off"]) body[data-stage] .hs-box { padding-bottom: 54px; }
  .stg-hud { gap: 8px; padding-right: 10px; }
  .stg-agents, .stg-state { display: none; }
  .fx-tabs [role="tab"] { padding: 0 8px; gap: 5px; font-size: 12px; }
  .blocks { display: flex; overflow-x: auto; scrollbar-width: none; height: 70px; gap: 4px; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scroll-padding: 0 var(--pad); }
  .blocks::-webkit-scrollbar { display: none; }
  .blk { flex: 0 0 74px; }
  .kcard .nm { font-size: 17px; }
  .blocks-cap .sync { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:last-child { display: none; }
  .bar-in { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 8px; }
  .bar-kit b { font-size: 19px; }
  .chips { order: 5; flex-basis: 100%; padding: 8px 0 10px; }
  .grid { grid-template-columns: 1fr; }
  .nav2 { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .brand b { display: none; }
  /* A paged replay's pill (commands and page) leaves no room for the agents' dots at phone width. */
  .stg-dots { display: none; }
}
@media (max-width: 400px) {
  .fx-tabs svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .card.rv:not(.in) { opacity: 1; transform: none; }
  .kcard.on::after { display: none; }
}
