/* KScript, after the option B glass art: a deep navy night, violet and blue
   glass, and cyan, mint and coral light at the edges. kscript serve compiles
   this to /assets/site.css; the palette is _data/palette.json, which the docs
   theme (docs-theme.ks.css) reads too, so a colour changes in one place. */
@font-face { font-family: 'Nunito Sans Variable'; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(/assets/fonts/nunito-sans-latin-wght-normal.woff2) format('woff2-variations'); }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(/assets/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations'); }
:root {
  color-scheme: dark;
  --night: #070E24;
  --night-2: #0a1535;
  --glass: rgba(120, 110, 255, 0.07);
  --glass-2: rgba(140, 120, 255, 0.12);
  --rim: rgba(178, 158, 255, 0.22);
  --rim-2: rgba(178, 158, 255, 0.36);
  --line: rgba(160, 170, 255, 0.14);
  --ink: #F2F4FF;
  --ink-2: #B9C2E6;
  --ink-3: #8592BD;
  --violet: #8A50FF;
  --violet-2: #B48CFF;
  --blue: #245CFA;
  --cyan: #04BDFC;
  --mint: #30E9C1;
  --coral: #FF6F59;
  --font: 'Nunito Sans Variable', 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: max(5vw, 16px, env(safe-area-inset-left, 0px));
  --max: 1200px;
  --radius: 22px;
  --nav-space: 96px;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-space); }
body { margin: 0; background: var(--night); color: var(--ink); font: 17px/1.6 var(--font); font-optical-sizing: auto; overflow-x: clip; -webkit-font-smoothing: antialiased; }
main { padding-top: var(--nav-space); position: relative; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-weight: 900; letter-spacing: -0.025em; line-height: 1.06; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.2vw, 80px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: 21px; letter-spacing: -0.015em; }
p { margin: 0.7em 0 0; }
code, pre, kbd { font-family: var(--mono); font-size: 0.88em; font-variant-ligatures: none; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--violet); color: #fff; }

.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(60vw 50vh at 85% -10%, rgba(138, 80, 255, 0.28), transparent 70%),
  radial-gradient(50vw 40vh at -10% 20%, rgba(36, 92, 250, 0.22), transparent 70%),
  radial-gradient(40vw 40vh at 100% 90%, rgba(48, 233, 193, 0.08), transparent 70%),
  linear-gradient(180deg, #0A1230, var(--night) 60%); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--mint); color: var(--night); padding: 10px 16px; border-radius: 999px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.band { padding-block: clamp(48px, 7vw, 100px); padding-inline: var(--gutter); }
.wrap { max-width: var(--max); margin-inline: auto; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 44ch; }
.muted { color: var(--ink-3); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; letter-spacing: 0.02em; color: var(--ink-2); padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--rim); text-decoration: none; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); margin-left: 4px; }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-2); font-size: 18px; }

/* Glass */
.glass { background: linear-gradient(160deg, rgba(150, 130, 255, 0.13), rgba(60, 80, 220, 0.05) 60%, rgba(4, 189, 252, 0.04)); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px var(--rim), 0 24px 60px -30px rgba(0, 0, 0, 0.7); border-radius: var(--radius); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; font: 800 16px/1 var(--font); text-decoration: none; border: 0; cursor: pointer; white-space: nowrap; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { color: #0A0626; background: linear-gradient(135deg, #D9C8FF, var(--violet-2) 40%, #7C8CFF); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 30px -8px rgba(138, 80, 255, 0.8); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 40px -6px rgba(138, 80, 255, 1); }
.btn-ghost { color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.13); }
.btn-ghost:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.07)); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.arrow-link { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; text-decoration: none; color: var(--mint); margin-top: 18px; }
.arrow-link span { transition: transform 0.2s ease; }
.arrow-link:hover span { transform: translateX(4px); }

/* Header */
.site-header { position: fixed; z-index: 30; top: 12px; left: var(--gutter); right: var(--gutter); max-width: calc(var(--max) + 48px); margin-inline: auto; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 10px 0 14px; border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)), color-mix(in srgb, var(--night) 40%, transparent); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 18px 40px -20px rgba(0, 0, 0, 0.6); transition: background-color 0.2s ease; }
.site-header.scrolled { background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)), color-mix(in srgb, var(--night) 72%, transparent); }
/* Once the page starts passing under the bar, a shimmer in the KScript colours sweeps round
   its edge and across its glass once (the shimmer every Orimovo site's nav shares). */
.site-header::before, .site-header::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; background: 100% 0 / 300% 100% no-repeat; }
.site-header::before { padding: 1.5px; background-image: linear-gradient(100deg, transparent 30%, var(--violet) 40%, var(--blue) 47%, var(--cyan) 54%, var(--mint) 61%, transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.site-header::after { background-image: linear-gradient(100deg, transparent 35%, rgba(138, 80, 255, 0.16) 43%, rgba(36, 92, 250, 0.18) 48%, rgba(4, 189, 252, 0.16) 53%, rgba(48, 233, 193, 0.12) 58%, transparent 66%); }
.site-header.scrolled::before, .site-header.scrolled::after { animation: bar-shimmer 1.5s 0.12s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes bar-shimmer { 0% { opacity: 0; background-position: 100% 0; } 18%, 70% { opacity: 1; } 100% { opacity: 0; background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .site-header.scrolled::before, .site-header.scrolled::after { animation: none; } }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 21px; letter-spacing: -0.03em; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current='page'] { color: var(--ink); }
.site-nav .gh svg { width: 20px; height: 20px; }
/* The language menu: the page's language in the header, opening a glass list of the others. */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px 0 9px; border-radius: 12px; cursor: pointer; color: var(--ink-2); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--ink); background: rgba(180, 140, 255, 0.12); }
.lang-menu summary:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }
.lang-menu svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lang-globe { width: 20px; height: 20px; stroke-width: 1.6; }
.lang-chevron { width: 16px; height: 16px; stroke-width: 2.2; transition: transform 0.15s ease; }
.lang-menu[open] .lang-chevron { transform: rotate(180deg); }
.lang-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: max-content; min-width: 220px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), var(--night-2); box-shadow: inset 0 0 0 1px var(--rim), 0 24px 48px -16px rgba(0, 0, 0, 0.7); }
.lang-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lang-panel a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 15px; }
.lang-panel a:hover, .lang-panel a:focus-visible { background: rgba(180, 140, 255, 0.14); color: var(--ink); }
.lang-panel a[aria-current='true'] { color: var(--ink); background: rgba(180, 140, 255, 0.2); box-shadow: inset 0 0 0 1px var(--rim-2); }
.lang-head { margin: 2px 12px 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.lang-note { margin: 8px 12px 2px; font-size: 13px; color: var(--ink-3); max-width: 220px; }
/* The menu: below 1080px the header's links fold into one glass list, so they
   never crowd the logo, in any language. Its bars turn into a cross when open. */
.nav-menu { display: none; position: relative; }
.nav-menu summary { list-style: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; cursor: pointer; color: var(--ink-2); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover, .nav-menu[open] summary { color: var(--ink); background: rgba(180, 140, 255, 0.12); }
.nav-menu summary:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }
.nav-menu-icon { position: relative; width: 20px; height: 14px; }
.nav-menu-icon i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; }
.nav-menu-icon i:nth-child(1) { top: 0; }
.nav-menu-icon i:nth-child(2) { top: 6px; }
.nav-menu-icon i:nth-child(3) { top: 12px; }
.nav-menu[open] .nav-menu-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-menu[open] .nav-menu-icon i:nth-child(2) { opacity: 0; }
.nav-menu[open] .nav-menu-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; display: grid; gap: 2px; min-width: 210px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), var(--night-2); box-shadow: inset 0 0 0 1px var(--rim), 0 24px 48px -16px rgba(0, 0, 0, 0.7); animation: nav-panel-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.site-nav .nav-panel a { display: block; padding: 10px 14px; border-radius: 10px; font-size: 16px; }
.site-nav .nav-panel a:hover, .site-nav .nav-panel a:focus-visible { background: rgba(180, 140, 255, 0.14); color: var(--ink); outline: none; }
.site-nav .nav-panel a[aria-current='page'] { background: rgba(180, 140, 255, 0.2); box-shadow: inset 0 0 0 1px var(--rim-2); }
@keyframes nav-panel-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 1080px) {
  .site-nav a.nav-wide { display: none; }
  .nav-menu { display: block; }
  .site-nav { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-panel, .nav-menu-icon i { animation: none; transition: none; }
}
/* Chinese, Japanese and Korean: their own system fonts, and no tightened letter spacing. */
:lang(zh), :lang(ja), :lang(ko) { letter-spacing: 0 !important; }
:lang(zh) h1, :lang(ja) h1, :lang(ko) h1 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.2; }
:lang(zh) h2, :lang(ja) h2, :lang(ko) h2 { line-height: 1.3; }
:lang(ja) { word-break: auto-phrase; }
:lang(ko) { word-break: keep-all; }
:lang(zh-CN) body { font-family: 'Nunito Sans Variable', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif; }
:lang(ja) body { font-family: 'Nunito Sans Variable', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, 'Noto Sans CJK JP', system-ui, sans-serif; }
:lang(ko) body { font-family: 'Nunito Sans Variable', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans CJK KR', system-ui, sans-serif; }

/* Footer */
.site-footer { padding: 48px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); margin-top: 40px; background: linear-gradient(180deg, rgba(10, 18, 48, 0.4), rgba(7, 14, 36, 0.9)); }
.footer-inner { max-width: var(--max); margin-inline: auto; display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 28px 40px; align-items: start; }
.footer-brand p { color: var(--ink-3); margin-top: 10px; font-size: 15px; max-width: 30ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 6px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 15px; }
.footer-links a:hover { color: var(--ink); }
.orimovo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); text-decoration: none; font-weight: 700; font-size: 15px; padding-top: 6px; }
.orimovo:hover { color: var(--ink); }
.footer-badges { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* Code windows */
.window { margin: 0; border-radius: 20px; overflow: hidden; background: linear-gradient(165deg, rgba(76, 60, 200, 0.32), rgba(20, 26, 80, 0.55) 45%, rgba(10, 18, 52, 0.75)); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--rim-2), 0 30px 80px -30px rgba(40, 20, 120, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.2); position: relative; }
.window-bar { display: flex; align-items: center; gap: 14px; padding: 13px 18px; background: linear-gradient(180deg, rgba(180, 140, 255, 0.2), rgba(140, 110, 255, 0.08)); border-bottom: 1px solid rgba(190, 170, 255, 0.16); font: 700 13px/1 var(--mono); color: var(--ink-2); }
.lights { display: inline-flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 10px rgba(255, 111, 89, 0.7); }
.lights i:nth-child(2) { background: var(--mint); box-shadow: 0 0 10px rgba(48, 233, 193, 0.7); }
.lights i:nth-child(3) { background: var(--cyan); box-shadow: 0 0 10px rgba(4, 189, 252, 0.7); }
.window-code pre { margin: 0; padding: 20px 22px 22px; overflow-x: auto; font-size: 14px; line-height: 1.7; background: transparent !important; }
.window-code code { font-size: inherit; }
.window-out { border-top: 1px dashed rgba(190, 170, 255, 0.2); padding: 14px 22px 18px; background: rgba(4, 8, 24, 0.35); }
.window-out pre { margin: 0; font-size: 14px; line-height: 1.6; color: var(--mint); white-space: pre-wrap; }
.window-out pre span { display: block; }
.window-out pre span:first-child::before { content: '› '; color: var(--ink-3); }

/* Copy line */
.copy-line { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 16px; background: rgba(4, 8, 28, 0.55); box-shadow: inset 0 0 0 1px var(--rim); }
.copy-line code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 14.5px; padding: 8px 0; scrollbar-width: none; }
.copy-line .prompt { color: var(--violet-2); margin-right: 10px; user-select: none; }
.copy-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 0; border-radius: 11px; cursor: pointer; font: 800 14px/1 var(--font); color: var(--ink); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.copy-btn:hover { background: rgba(255, 255, 255, 0.14); }
.copy-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --nav-space: 88px; }
  .hide-sm { display: none !important; }
  .site-nav { gap: 12px; }
  .lang-menu summary { padding: 0 6px; }
  .lang-code { display: none; }
  .site-nav a:not(.btn) { font-size: 15px; }
  .site-header .btn-sm { padding: 0 14px; }
  .lang-panel { right: -60px; }
  .lockup { font-size: 19px; }
  .copy-label { display: none; }
  .copy-btn { padding: 0 11px; }
}
@media (max-width: 460px) {
  .site-header .lockup span { display: none; }
}

/* The logo */
.ks-logo { flex: none; overflow: visible; }
.ks-logo .ks-sel, .ks-logo .ks-cur, .ks-logo .ks-gt, .ks-logo .ks-sq { opacity: 0; }
.ks-logo.is-playing .ks-sel { animation: ks-sel 5.06s step-end both; }
.ks-logo.is-playing .ks-bs { animation: ks-bs 5.06s step-end both; }
.ks-logo.is-playing .ks-chev { animation: ks-chev 5.06s step-end both; }
.ks-logo.is-playing .ks-gt { animation: ks-gt 5.06s step-end both; }
.ks-logo.is-playing .ks-sq { animation: ks-sq 5.06s step-end both; }
.ks-logo.is-playing .ks-cur { animation: ks-cur 5.06s step-end both; }
/* A real caret jumps as you type, so every keyframe holds until the next. The mark
   is selected and deleted, then typed again with a syntax error: \> gets a red
   squiggle, the > is backspaced and the < typed in its place. */
@keyframes ks-sel { 0% { opacity: 1; } 12.85%, 100% { opacity: 0; } }
@keyframes ks-bs { 0% { opacity: 1; } 12.85% { opacity: 0; } 33.79%, 100% { opacity: 1; } }
@keyframes ks-chev { 0% { opacity: 1; } 12.85% { opacity: 0; } 68.58%, 100% { opacity: 1; } }
@keyframes ks-gt { 0% { opacity: 0; } 37.15% { opacity: 1; } 63.83%, 100% { opacity: 0; } }
@keyframes ks-sq { 0% { opacity: 0; } 46.05% { opacity: 1; } 63.83%, 100% { opacity: 0; } }
@keyframes ks-cur {
  0% { opacity: 0; transform: translateX(0); }
  12.85% { opacity: 1; transform: translateX(0); }
  23.32% { opacity: 0; transform: translateX(0); }
  33.79% { opacity: 1; transform: translateX(26px); }
  37.15% { opacity: 1; transform: translateX(54px); }
  63.83% { opacity: 1; transform: translateX(26px); }
  68.58% { opacity: 1; transform: translateX(54px); }
  79.05% { opacity: 0; transform: translateX(54px); }
  89.53% { opacity: 1; transform: translateX(54px); }
  100% { opacity: 0; transform: translateX(54px); }
}
/* The glass logo: layers cut from one render, stacked on the same square.
   A plane over the tile's face holds the selection and caret in a 100-unit
   grid (scaled to the tile), so every cut shares the keyframes. The upright
   cuts' tile spans 7.03% to 92.97% of the image; the hero's is tilted 6.2deg. */
.glass-logo { --s: 40; position: relative; display: block; flex: none; width: calc(var(--s) * 1px); height: calc(var(--s) * 1px); }
.gl-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.gl-plane { position: absolute; left: 7.03%; top: 7.03%; width: 100px; height: 100px; transform-origin: 0 0; transform: scale(calc(var(--s) * 0.008584)); pointer-events: none; }
.gl-frost { border-radius: 25px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(7, 14, 36, 0.35); }
.glass-logo .ks-sel { position: absolute; left: 12px; top: 15px; width: 76px; height: 72px; border-radius: 6px; background: rgba(4, 189, 252, 0.28); box-shadow: inset 0 0 0 0.6px rgba(120, 220, 255, 0.5); }
.glass-logo .ks-cur { position: absolute; left: 16px; top: 88px; width: 14px; height: auto; }
/* The typo: the < turned round and tinted coral, underlined in red. */
.glass-logo .ks-gt { transform: scaleX(-1); transform-origin: 62.4% 50%; filter: hue-rotate(110deg) saturate(1.05); }
.glass-logo .ks-sq { position: absolute; left: 46px; top: 81px; width: 32px; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 6'%3E%3Cpath d='M1 4 4 1.5 7.5 4.5 11 1.5 14.5 4.5 18 1.5 21.5 4.5 25 1.5 28.5 4.5 32 1.5' fill='none' stroke='%23FF5A6E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.gl-large .ks-cur { top: 84.5px; }
.gl-hero { --s: 176; }
.gl-hero .gl-plane { left: 15.04%; top: 7.91%; transform: rotate(6.2deg) scale(calc(var(--s) * 0.007662)); }
.gl-hero .gl-frost { border-radius: 19px; }
.gl-hero .ks-sel { top: 17px; width: 74px; height: 63px; }
.gl-hero .ks-cur { top: 83.5px; }
.gl-hero .ks-gt { transform-origin: 61.2% 50%; }
.gl-hero .ks-sq { top: 78px; }
@media (prefers-reduced-motion: reduce) {
  .ks-logo.is-playing * { animation: none; }
}

/* Highlighted code (->highlight, the editor's own colouring) */
.window-code pre { color: #E8EEFF; }
.hl-ink { color: #E8EEFF; }
.hl-kw { color: #C6A6FF; }
.hl-str { color: #4FEBC8; }
.hl-re { color: #FF9FD0; }
.hl-num { color: #FF8D7A; }
.hl-var { color: #8DB2FF; }
.hl-fn { color: #5FD4FF; }
.hl-type { color: #FFC27A; }
.hl-op { color: #A98BFF; }
.hl-com { color: #7F93BC; }
.hl-tag { color: #8DB2FF; }
.hl-attr { color: #C6A6FF; }
.hl-expr { color: #FF8D7A; }
.hl-com { font-style: italic; }

/* Home */
.hero { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(24px, 4vw, 56px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-top: 22px; }
.glow { background: linear-gradient(100deg, #D2BCFF, var(--violet-2) 35%, var(--cyan) 75%, var(--mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-art { position: relative; padding-top: 60px; }
.hero-logo { position: absolute; top: -34px; right: 4%; z-index: 2; }
.hero-window { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--rim-2), 0 40px 120px -20px rgba(138, 80, 255, 0.55), 0 0 90px -30px rgba(48, 233, 193, 0.5); }
.hero-window pre { font-size: 15px; }

.install-card { display: grid; grid-template-columns: 1fr 1.8fr; gap: 24px 48px; padding: clamp(24px, 4vw, 44px); align-items: center; }
.install-copy p { max-width: 34ch; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(4, 8, 28, 0.45); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; color: var(--ink-2); font: 800 14px/1 var(--font); padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.tabs button[aria-selected='true'] { background: rgba(180, 140, 255, 0.2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rim-2); }
.install-next { color: var(--ink-3); font-size: 15px; margin-top: 14px; }
.install-next a { color: var(--mint); font-weight: 700; }

.show { padding-block: clamp(40px, 5vw, 72px); }
.show-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.show-flip .show-grid { grid-template-columns: 1.1fr 0.9fr; }
.show-flip .show-copy { order: 2; }
.kicker { margin: 0 0 12px; font-weight: 900; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet-2); }
.show-scripts .kicker { color: var(--mint); }
.show-data .kicker { color: var(--cyan); }
.show-web .kicker { color: var(--coral); }
/* The illustrations and nudged windows: each showcase entry in _data/site.json
   places its picture (% of the code window), the window and the text. */
.show-media { position: relative; }
/* --room is how far a picture may reach past its window before it would leave
   the page (the band's gutter, less 16px); --shift is the window's own nudge. */
.show-media, .show-copy { --room: calc(max(var(--gutter), (100vw - var(--max)) / 2) - 16px); --shift: 0px; }
.show-art { position: absolute; z-index: 2; left: clamp(calc(-1 * (var(--room) + var(--shift))), var(--left), calc(100% - var(--size) + var(--room) - var(--shift))); top: var(--top); width: var(--size); pointer-events: none; transition: opacity 0.35s, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s; }
.show-art img { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(20, 10, 70, 0.7)); }
.show-art-fade::before { content: ''; position: absolute; inset: calc(var(--spread) * -1); border-radius: 50%; background: radial-gradient(closest-side, rgba(7, 14, 36, var(--fade)) 55%, rgba(7, 14, 36, 0) 100%); }
.show-media .window { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s; }
.show-lift:hover .window { z-index: 3; transform: translateY(-6px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--rim-2), 0 40px 90px -30px rgba(60, 30, 160, 1); }
.show-lift:hover .show-art { opacity: 0.45; transform: scale(0.94); filter: blur(1px); }
@media (min-width: 1240px) {
  .show-copy, .show .show-media { --shift: clamp(-1 * var(--room), var(--x, 0px), var(--room)); transform: translate(var(--shift), var(--y, 0px)); }
  .show-copy { width: min(var(--w, 100%), 100%); }
  .show .show-media { width: min(var(--w, 100%), 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .show-art, .show-media .window, .pkg, .pkg::after, .pkg code { transition: none; }
}
.show-body { color: var(--ink-2); font-size: 18px; max-width: 44ch; }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.why-card { padding: 26px; }
.why-num { font: 800 13px/1 var(--mono); color: var(--violet-2); }
.why-card h3 { margin-top: 14px; }
.why-card p { color: var(--ink-2); font-size: 16px; }

.pkg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-radius: var(--radius); overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.pkg-grid > li { display: flex; }
.pkg { position: relative; flex: 1; padding: 18px 20px; background: color-mix(in srgb, var(--night) 88%, var(--violet)); display: grid; gap: 4px; align-content: start; color: inherit; text-decoration: none; transition: background 0.25s, box-shadow 0.25s; }
.pkg::after { content: '→'; position: absolute; top: 16px; right: 18px; color: var(--mint); opacity: 0; transform: translateX(-6px); transition: opacity 0.25s, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pkg code { transition: color 0.25s, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); display: inline-block; }
.pkg:hover, .pkg:focus-visible { background: color-mix(in srgb, var(--night) 74%, var(--violet)); box-shadow: inset 0 0 0 1px var(--rim-2); outline: none; }
.pkg:hover::after, .pkg:focus-visible::after { opacity: 1; transform: none; }
.pkg:hover code, .pkg:focus-visible code { color: var(--mint); transform: translateX(3px); }
.pkg code { color: var(--ink); font-weight: 600; font-size: 14px; }
.pkg span { color: var(--ink-3); font-size: 15px; line-height: 1.45; }

.tools-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.cmds { margin: 0; padding: 12px 0 14px; }
.cmds div { padding: 9px 22px; }
.cmds dt code { font-size: 14px; color: var(--ink); }
.cmds dt span { color: var(--violet-2); }
.cmds dd { margin: 2px 0 0; color: var(--ink-3); font-size: 15px; }

.cta-card { display: grid; justify-items: center; text-align: center; padding: clamp(32px, 6vw, 64px) 24px; }
.cta-card h2 { margin-top: 18px; }

@media (max-width: 960px) {
  .hero-grid, .show-grid, .tools-grid, .install-card { grid-template-columns: 1fr; }
  .show-flip .show-grid { grid-template-columns: 1fr; }
  .show-flip .show-copy { order: 0; }
  .show-art { left: auto; right: -8px; top: -64px; width: 130px; }
  .show-art-fade::before { display: none; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .pkg-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-logo { right: 2%; }
  .hero-logo .glass-logo { --s: 124; }
  .hero-art { padding-top: 48px; }
  .why-grid, .pkg-grid { grid-template-columns: 1fr; }
  .window-code pre { font-size: 13px; }
}

/* Download */
.dl h1 { font-size: clamp(38px, 5vw, 64px); }
.dl-install { display: grid; gap: 10px; margin-top: 28px; max-width: 860px; }
.dl-h { font-size: clamp(24px, 2.6vw, 30px); margin-top: 56px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dl-version { font: 700 16px/1 var(--mono); color: var(--mint); }
.dl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 18px; }
.dl-card { display: grid; gap: 4px; padding: 20px; text-decoration: none; transition: transform 0.15s ease; }
.dl-card:hover { transform: translateY(-2px); }
.dl-card b { font-size: 19px; }
.dl-card span { color: var(--ink-2); }
.dl-card code { margin-top: 10px; font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.dl-note { font-size: 15px; margin-top: 16px; max-width: 70ch; }
.dl-note a { color: var(--mint); }
.dl-versions { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dl-versions a { display: inline-block; padding: 7px 12px; border-radius: 10px; font: 600 14px/1 var(--mono); text-decoration: none; color: var(--ink-2); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.dl-versions a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--rim-2); }
@media (max-width: 960px) { .dl-grid { grid-template-columns: repeat(2, 1fr); } }

/* Releases */
.rel-page h1 { font-size: clamp(38px, 5vw, 64px); }
.rel-page .lede { max-width: 60ch; }
.rel-list { display: grid; gap: 14px; margin-top: 40px; }
.rel { padding: 0; overflow: hidden; }
.rel-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 20px 26px; cursor: pointer; list-style: none; }
.rel-head::-webkit-details-marker { display: none; }
.rel-head::before { content: ''; align-self: center; width: 9px; height: 9px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform 0.15s ease; margin-right: 4px; }
.rel[open] > .rel-head::before { transform: rotate(45deg); }
.rel-head:hover .rel-version { color: var(--mint); }
.rel-version { font: 800 clamp(20px, 2.2vw, 26px)/1.2 var(--mono); letter-spacing: -0.01em; }
.rel-tag { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; color: var(--night); background: var(--mint); }
.rel-pre { background: var(--coral); }
.rel-date { margin-left: auto; color: var(--ink-3); font-size: 15px; }
.rel-body { padding: 0 26px 24px; border-top: 1px solid var(--line); }
.rel-notes { max-width: 78ch; color: var(--ink-2); }
.rel-notes h3, .rel-notes h4, .rel-notes h5 { color: var(--ink); margin-top: 1.4em; }
.rel-notes h4 { font-size: 18px; }
.rel-notes ul, .rel-notes ol { padding-left: 1.3em; margin: 0.6em 0 0; }
.rel-notes li + li { margin-top: 0.35em; }
.rel-notes strong { color: var(--ink); }
.rel-notes a, .rel-more a { color: var(--mint); }
.rel-notes code { padding: 1px 5px; border-radius: 6px; background: var(--glass-2); overflow-wrap: anywhere; }
.rel-notes pre { padding: 14px 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); overflow-x: auto; }
.rel-notes pre code { padding: 0; background: none; }
.rel-notes table { border-collapse: collapse; margin-top: 0.8em; display: block; overflow-x: auto; }
.rel-notes th, .rel-notes td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.rel-dl-h { margin-top: 28px; font-size: 19px; }
.rel-files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rel-files a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; text-decoration: none; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.15s ease; }
.rel-files a:hover { box-shadow: inset 0 0 0 1px var(--rim-2); }
.rel-files b { font-size: 15px; }
.rel-files code { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.rel-files span { font-size: 13px; color: var(--ink-3); }
.rel-more { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
@media (max-width: 600px) {
  .rel-head { padding: 16px 18px; }
  .rel-body { padding: 0 18px 20px; }
  .rel-date { margin-left: 0; width: 100%; }
}

/* Not found */
.nf { min-height: 60vh; display: grid; align-items: center; }
.nf h1 { margin-top: 24px; font-size: clamp(36px, 5vw, 60px); }

/* Components: one recipe card morphing between a web page, a desktop app, the
   terminal and a document, with the render that draws it lit up in the code.
   m-web, m-app, m-term or m-doc picks the surface; the open row's IDE window shows its
   render and the other rows fold to one line. Play ticks the surface on the server every
   4s, so a click and a tour step both run the same transitions. */
.surfaces-head { position: relative; margin-bottom: 28px; min-height: 260px; }
.surfaces-art { position: absolute; right: 2%; top: 50%; width: min(400px, 34%); transform: translateY(-50%); pointer-events: none; }
.surfaces-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(20, 10, 70, 0.7)); }
@media (max-width: 960px) {
  .surfaces-head { min-height: 0; }
  .surfaces-art { position: static; display: block; width: 220px; margin: 18px auto 0; transform: none; }
}
.surfaces .kicker { color: var(--mint); }
.morph { display: grid; gap: 22px; }
.morph .tab-play { font: 800 15px/1 var(--font); color: var(--ink-2); background: var(--glass); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 0 18px; min-height: 44px; cursor: pointer; transition: background 0.3s, color 0.3s; }
.morph .tab-play { display: inline-flex; align-items: center; gap: 8px; }
.morph .tab-play svg { width: 12px; height: 12px; fill: currentColor; }
.morph .tab-play:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--rim-2); }
.morph-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(22px, 3vw, 36px); align-items: start; }
/* The renders as a list: the picked one opens into a short editor window, the rest fold to one line above and below. */
.morph-list { display: grid; align-content: start; gap: 12px; min-height: calc(var(--hmax) * 13px * 1.65 + 4 * 56px + 3 * 8px + 170px); }
.morph-list [role=tablist] { display: grid; gap: 8px; }
.morph-top { display: flex; align-items: center; gap: 12px; }
.morph-top .tab-play { margin-left: auto; }
.item { border-radius: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.4s, box-shadow 0.4s; }
.item-head { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 18px; border: 0; background: rgba(10, 14, 40, 0); transition: background 0.4s, border-radius 0.4s; color: var(--ink-2); font: 800 15px/1.2 var(--font); text-align: left; cursor: pointer; border-radius: 16px; }
.item-head:hover { color: var(--ink); }
.item-head:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.item-head::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); transition: background 0.4s, width 0.4s, margin 0.4s; }
.item-name { flex: none; }
.item-sig { margin-left: auto; font: 13px/1.2 var(--mono); opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s; }
.item-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s cubic-bezier(0.6, 0, 0.2, 1); }
.item-window { min-height: 0; overflow: hidden; }
/* The open row is the editor: its head turns into the title bar (window controls, file name), then line numbers, code and a status bar. */
.item { overflow: hidden; }
.item-head .lights { display: inline-flex; width: 0; margin-right: -14px; gap: 7px; overflow: hidden; opacity: 0; transition: width 0.4s, margin 0.4s, opacity 0.3s; }
.item-file { font: 700 12px/1 var(--mono); color: var(--ink-3); opacity: 0; max-width: 0; overflow: hidden; white-space: nowrap; transition: opacity 0.3s, max-width 0.4s; }
.ide-code { display: flex; }
.ide-code pre, .ide-code code { font-size: 13px; line-height: 1.65; }
.ide-gutter span { display: block; }
.ide-code pre { margin: 0; padding: 14px 16px 14px 12px; overflow-x: auto; flex: 1; color: #E8EEFF; }
.ide-code .ide-gutter { flex: none; padding-inline: 14px 10px; text-align: right; color: var(--ink-3); opacity: 0.6; border-right: 1px solid rgba(190, 170, 255, 0.12); user-select: none; }
.ide-status { display: flex; gap: 18px; padding: 6px 18px; background: rgba(138, 80, 255, 0.22); font: 11px/1.4 var(--mono); color: var(--ink-2); }
.ide-status span:first-child { margin-right: auto; color: var(--ink); }
.m-web .item-web, .m-app .item-app, .m-term .item-term, .m-doc .item-doc { background: linear-gradient(165deg, rgba(76, 60, 200, 0.32), rgba(20, 26, 80, 0.55) 45%, rgba(10, 18, 52, 0.75)); box-shadow: inset 0 0 0 1px var(--rim-2), 0 24px 60px -30px rgba(40, 20, 120, 0.9); }
.m-web .item-web .item-fold, .m-app .item-app .item-fold, .m-term .item-term .item-fold, .m-doc .item-doc .item-fold { grid-template-rows: 1fr; }
.m-web .item-web .item-head, .m-app .item-app .item-head, .m-term .item-term .item-head, .m-doc .item-doc .item-head { color: var(--ink); }
.m-web .item-web .item-head::before, .m-app .item-app .item-head::before, .m-term .item-term .item-head::before, .m-doc .item-doc .item-head::before { background: var(--mint); }
.m-web .item-web .item-head, .m-app .item-app .item-head, .m-term .item-term .item-head, .m-doc .item-doc .item-head { border-radius: 16px 16px 0 0; box-shadow: inset 0 -1px 0 rgba(190, 170, 255, 0.12); background: rgba(10, 14, 40, 0.35); }
.m-web .item-web .item-head::before, .m-app .item-app .item-head::before, .m-term .item-term .item-head::before, .m-doc .item-doc .item-head::before { width: 0; margin-right: -14px; }
.m-web .item-web .lights, .m-app .item-app .lights, .m-term .item-term .lights, .m-doc .item-doc .lights { width: 47px; margin-right: 0; opacity: 1; }
.m-web .item-web .item-file, .m-app .item-app .item-file, .m-term .item-term .item-file, .m-doc .item-doc .item-file { opacity: 1; max-width: 240px; }
.m-web .item-web .item-name, .m-app .item-app .item-name, .m-term .item-term .item-name, .m-doc .item-doc .item-name { order: 3; margin-left: auto; font-size: 13px; color: var(--ink-2); }
.m-web .item-web .item-sig, .m-app .item-app .item-sig, .m-term .item-term .item-sig, .m-doc .item-doc .item-sig { opacity: 0; max-width: 0; }
.m-web .item-web .item-sig, .m-app .item-app .item-sig, .m-term .item-term .item-sig, .m-doc .item-doc .item-sig { opacity: 0; }
/* Beside the list, one spot takes turns: an editor types the call that draws the card (with a
   suggestion popup on the component's name), the pointer clicks Run, then the editor gives way to
   the render. Picking the next surface brings the editor back. Each call has its own editor, so its
   animations start over whenever it becomes the current one; --typed is when its typing ends. */
.morph-side { display: grid; place-items: center; min-height: 600px; }
.morph-side > * { grid-area: 1 / 1; }
.morph-stage { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.morph .morph-stage .frame { zoom: 1.2; max-width: calc(100% - 28px); }
.run { position: relative; z-index: 2; display: grid; width: min(100%, 500px); container-type: inline-size; pointer-events: none; }
.run .call { grid-area: 1 / 1; position: relative; border-radius: 16px; background: linear-gradient(165deg, #2A2470, #121A4A 45%, #0A1234); box-shadow: inset 0 0 0 1px var(--rim-2), 0 30px 70px -24px rgba(0, 0, 0, 0.8); opacity: 0; }
.m-web .call-web, .m-app .call-app, .m-term .call-term, .m-doc .call-doc { animation: ide-in 0.4s ease-out both, ide-out 0.45s ease-in calc(var(--typed) + 1.45s) forwards; }
@keyframes ide-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes ide-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(1.03); } }
.run-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid rgba(190, 170, 255, 0.12); }
.run-file { font: 700 12px/1 var(--mono); color: var(--ink-3); }
.run-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font: 800 12px/1 var(--font); color: var(--night); background: var(--mint); }
.run-btn svg { width: 9px; height: 9px; fill: currentColor; }
.run-editor { position: relative; padding: 14px 18px; min-height: calc(3 * 1.65em + 28px); font: min(13px, (100cqi - 40px) / 31) / 1.65 var(--mono); color: #E8EEFF; }
.run .ln { display: block; box-sizing: content-box; width: 0; overflow: hidden; white-space: pre; font: inherit; border-right: 2px solid transparent; }
.m-web .call-web .ln, .m-app .call-app .ln, .m-term .call-term .ln, .m-doc .call-doc .ln { animation: type-1 calc(var(--split) * 26ms) steps(var(--s1), end) var(--at) both, type-2 calc((var(--mid) - var(--split)) * 26ms) steps(var(--s2), end) var(--resume) forwards, type-3 calc((var(--chars) - var(--mid)) * 26ms) steps(var(--s3), end) var(--back) forwards, caret calc(var(--resume) + (var(--mid) - var(--split)) * 26ms - var(--at)) var(--at), caret calc(var(--end) - var(--back)) var(--back); }
.m-web .call-web .ln:last-of-type, .m-app .call-app .ln:last-of-type, .m-term .call-term .ln:last-of-type, .m-doc .call-doc .ln:last-of-type { animation: type-1 calc(var(--split) * 26ms) steps(var(--s1), end) var(--at) both, type-2 calc((var(--mid) - var(--split)) * 26ms) steps(var(--s2), end) var(--resume) forwards, type-3 calc((var(--chars) - var(--mid)) * 26ms) steps(var(--s3), end) var(--back) forwards, caret calc(var(--resume) + (var(--mid) - var(--split)) * 26ms - var(--at)) var(--at), caret calc(var(--end) - var(--back)) var(--back), blink 1s step-end var(--end) infinite; }
@keyframes type-1 { from { width: 0; } to { width: calc(var(--split) * 1ch); } }
@keyframes type-2 { from { width: calc(var(--split) * 1ch); } to { width: calc(var(--mid) * 1ch); } }
@keyframes type-3 { from { width: calc(var(--mid) * 1ch); } to { width: calc(var(--chars) * 1ch); } }
/* The typo: three wrong letters after $panca, the checker underlines $pancaeks and says what it
   meant, then the letters are deleted and the line goes on. Times count from --at (1950ms in all). */
.run .typo { position: absolute; z-index: 2; left: calc(18px + var(--column) * 1ch); top: calc(14px + var(--row) * 1.65em); height: 1.65em; pointer-events: none; }
.typo-text { display: inline-block; width: 0; overflow: hidden; white-space: pre; vertical-align: top; color: #8DB2FF; box-sizing: content-box; border-right: 2px solid transparent; }
.typo-line { position: absolute; left: calc((var(--start) - var(--column)) * 1ch); bottom: -2px; width: 9ch; height: 4px; opacity: 0; background: radial-gradient(circle at 50% 100%, transparent 1.4px, var(--coral) 1.6px, var(--coral) 2.2px, transparent 2.4px) 0 0 / 6px 4px repeat-x; }
.run .typo-tip { --wide: min(320px, 100% - 36px); position: absolute; z-index: 3; left: clamp(18px, 18px + var(--start) * 1ch, 100% - 18px - var(--wide)); bottom: calc(100% - 14px - var(--row) * 1.65em + 6px); width: var(--wide); box-sizing: border-box; padding: 7px 10px; border-radius: 8px; background: #2A1430; box-shadow: 0 0 0 1px rgba(255, 111, 89, 0.55), 0 12px 24px -10px rgba(0, 0, 0, 0.7); color: var(--ink); opacity: 0; pointer-events: none; }
.run .typo-tip span { display: block; font: 600 12px/1.4 var(--font); }
.run .typo-tip.tip-below { bottom: auto; top: calc(14px + (var(--row) + 1) * 1.65em + 8px); }
.typo-tip span::before { content: '\2715'; margin-right: 6px; color: var(--coral); }
.m-web .call-web .typo-text, .m-app .call-app .typo-text, .m-term .call-term .typo-text, .m-doc .call-doc .typo-text { animation: typo-type 270ms steps(3, end) var(--at) forwards, caret 1700ms var(--at), typo-erase 210ms steps(3, end) calc(var(--at) + 1700ms) forwards; }
.m-web .call-web .typo-line, .m-app .call-app .typo-line, .m-term .call-term .typo-line, .m-doc .call-doc .typo-line, .m-web .call-web .typo-tip, .m-app .call-app .typo-tip, .m-term .call-term .typo-tip, .m-doc .call-doc .typo-tip { animation: typo-show 1200ms calc(var(--at) + 500ms); }
@keyframes typo-type { from { width: 0; } to { width: 3ch; } }
@keyframes typo-erase { from { width: 3ch; } to { width: 0; } }
@keyframes typo-show { 0% { opacity: 0; transform: translateY(-3px); } 12%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes caret { from, to { border-right-color: var(--mint); } }
@keyframes blink { 0% { border-right-color: var(--mint); } 50% { border-right-color: transparent; } }
.run .pop { position: absolute; z-index: 2; left: calc(18px + var(--column) * 1ch); top: calc(14px + (var(--row) + 1) * 1.65em); display: grid; min-width: 200px; padding: 4px; border-radius: 8px; background: #141A3A; box-shadow: 0 0 0 1px var(--rim-2), 0 16px 30px -10px rgba(0, 0, 0, 0.7); opacity: 0; pointer-events: none; }
.pop-item { display: flex; align-items: baseline; gap: 2px; padding: 3px 8px; border-radius: 5px; color: var(--ink-2); }
.pop-item:first-child { background: rgba(138, 80, 255, 0.35); color: var(--ink); }
.pop-item b { color: var(--mint); font-weight: 700; }
.pop-item small { margin-left: auto; padding-left: 16px; font: 11px/1 var(--font); color: var(--ink-3); }
.m-web .call-web .pop, .m-app .call-app .pop, .m-term .call-term .pop, .m-doc .call-doc .pop { animation: pop 600ms var(--at) ease-out; }
@keyframes pop { 0% { opacity: 0; transform: translateY(-4px); } 20%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.run .pointer { position: absolute; z-index: 3; left: 50%; top: 80%; width: 22px; height: 22px; fill: #fff; stroke: var(--night); stroke-width: 1.5; opacity: 0; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.m-web .call-web .pointer, .m-app .call-app .pointer, .m-term .call-term .pointer, .m-doc .call-doc .pointer { animation: pointer 1.6s calc(var(--typed) + 150ms) both; }
@keyframes pointer {
  0% { left: 46%; top: 82%; opacity: 0; }
  12% { opacity: 1; }
  55% { left: calc(100% - 48px); top: -27px; transform: none; }
  62% { transform: scale(0.82); }
  70%, 85% { left: calc(100% - 48px); top: -27px; transform: none; opacity: 1; }
  100% { left: calc(100% - 48px); top: -27px; opacity: 0; }
}
.run .ring { position: absolute; z-index: 1; right: 12px; top: -37px; width: 62px; height: 26px; border-radius: 10px; box-shadow: 0 0 0 2px var(--mint); opacity: 0; pointer-events: none; }
.m-web .call-web .ring, .m-app .call-app .ring, .m-term .call-term .ring, .m-doc .call-doc .ring { animation: ring 0.5s calc(var(--typed) + 1.1s) ease-out; }
@keyframes ring { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.5); } }

.morph .frame { position: relative; overflow: hidden; max-width: calc(100% - 32px); transition: width 0.6s cubic-bezier(0.6, 0, 0.2, 1), height 0.6s cubic-bezier(0.6, 0, 0.2, 1), border-radius 0.6s, background 0.6s, box-shadow 0.6s, transform 0.6s; }
.m-web .frame { width: 330px; height: 330px; border-radius: 20px; background: #F7F7FC; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); }
.m-app .frame { width: 360px; height: 310px; border-radius: 12px; background: #151C38; box-shadow: 0 0 0 1px var(--rim-2), 0 30px 60px -20px rgba(0, 0, 0, 0.8); }
.m-term .frame { width: 420px; height: 200px; border-radius: 8px; background: #02050D; box-shadow: 0 0 0 1px var(--line); }
.m-doc .frame { width: 290px; height: 380px; border-radius: 2px; background: #FFFFFF; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7); transform: rotate(-1.5deg); }
/* The render fades out as the editor comes in and back once Run is clicked; each surface has its own
   keyframes, so the wait starts over when the surface changes. */
.m-web .frame { animation: stage-web 0.5s ease-out calc(var(--typed) + 1.6s) backwards, leave-web 0.3s ease-in; }
.m-app .frame { animation: stage-app 0.5s ease-out calc(var(--typed) + 1.6s) backwards, leave-app 0.3s ease-in; }
.m-term .frame { animation: stage-term 0.5s ease-out calc(var(--typed) + 1.6s) backwards, leave-term 0.3s ease-in; }
.m-doc .frame { animation: stage-doc 0.5s ease-out calc(var(--typed) + 1.6s) backwards, leave-doc 0.3s ease-in; }
@keyframes stage-web { from { opacity: 0; transform: scale(0.94); } }
@keyframes leave-web { from { opacity: 1; } to { opacity: 0; } }
@keyframes stage-app { from { opacity: 0; transform: scale(0.94); } }
@keyframes leave-app { from { opacity: 1; } to { opacity: 0; } }
@keyframes stage-term { from { opacity: 0; transform: scale(0.94); } }
@keyframes leave-term { from { opacity: 1; } to { opacity: 0; } }
@keyframes stage-doc { from { opacity: 0; transform: scale(0.94); } }
@keyframes leave-doc { from { opacity: 1; } to { opacity: 0; } }
.morph .face { position: absolute; inset: 0; opacity: 0; transform: scale(0.96); transition: opacity 0.35s, transform 0.5s; }
.m-web .face-web, .m-app .face-app, .m-term .face-term, .m-doc .face-doc { opacity: 1; transform: none; }
.face h3 { margin: 0; }
.face ol { margin: 0; padding-left: 20px; }
.face-btn { display: inline-flex; align-items: center; align-self: flex-start; min-height: 40px; padding: 0 16px; font-weight: 700; font-size: 14px; }
.face-web { padding: 26px; display: flex; flex-direction: column; gap: 10px; color: #141833; }
.face-web .pill { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8A3B2C; background: #FFE1DA; border-radius: 999px; padding: 4px 10px; }
.face-web h3 { font-size: 26px; }
.face-web p { margin: 0; color: #4A5072; font-size: 15px; }
.face-web .face-btn { border-radius: 12px; background: var(--blue); color: #fff; }
.face-web ol { font-size: 14px; line-height: 1.7; color: #2B3052; }
.face-app { display: flex; flex-direction: column; color: #E2E8F0; }
.face-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #0E1430; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.face-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--coral); }
.face-bar i:nth-child(2) { background: #FFC27A; }
.face-bar i:nth-child(3) { background: var(--mint); }
.face-bar span { margin-left: 8px; }
.face-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.face-body strong { font-size: 18px; }
.face-body .face-btn { margin: 6px 0; border-radius: 8px; background: #222B52; box-shadow: inset 0 0 0 1px var(--rim-2); }
.face-body p { margin: 0; font-size: 14px; color: var(--ink-2); }
.face-term { padding: 16px 18px; font: 12px/1.7 var(--mono); color: #E8EEFF; }
.face-term p { margin: 0; }
.face-term .step { padding-left: 2ch; color: var(--ink-2); }
.face-term b { color: var(--mint); font-weight: 400; }
.face-doc { padding: 32px 28px; font-family: Georgia, 'Times New Roman', serif; color: #1A1A1A; }
.face-doc small { display: block; margin-bottom: 18px; font: 11px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: #6B6B6B; }
.face-doc h3 { font-size: 22px; font-weight: 600; letter-spacing: 0; margin-bottom: 14px; }
.face-doc p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; }
.face-doc .page-no { position: absolute; bottom: 16px; left: 0; right: 0; margin: 0; text-align: center; letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
  .morph .frame, .morph .face, .morph .item, .morph .item-head *, .morph .item-fold { transition: none; }
  .morph .run { display: none; }
  .morph .frame { animation: none; }
}
@media (max-width: 960px) {
  .morph-grid { grid-template-columns: 1fr; }
  .morph-side { min-height: 0; padding-block: 12px; }
  .morph-stage .frame { zoom: 1; }
}

/* Light mode. The page follows the device and switches live when it does: a daylight
   sky, frosted white glass and navy ink. Code windows, terminals and the editor stay
   dark islands, as an editor would, so the code colours read the same in both. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --night: #F1F3FC;
    --night-2: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.66);
    --glass-2: rgba(110, 90, 230, 0.1);
    --rim: rgba(60, 50, 150, 0.14);
    --rim-2: rgba(110, 80, 230, 0.32);
    --line: rgba(40, 40, 110, 0.12);
    --ink: #10143A;
    --ink-2: #3E4672;
    --ink-3: #5F6896;
  }
  .window, .copy-line, .run .call, .run .pop, .run .typo-tip, .rel-notes pre,
  :is(.m-web .item-web, .m-app .item-app, .m-term .item-term, .m-doc .item-doc) {
    color-scheme: dark;
    --night: #070E24;
    --glass: rgba(120, 110, 255, 0.07);
    --rim: rgba(178, 158, 255, 0.22);
    --rim-2: rgba(178, 158, 255, 0.36);
    --line: rgba(160, 170, 255, 0.14);
    --ink: #F2F4FF;
    --ink-2: #B9C2E6;
    --ink-3: #8592BD;
    color: var(--ink);
  }
  .window, :is(.m-web .item-web, .m-app .item-app, .m-term .item-term, .m-doc .item-doc) { background: linear-gradient(165deg, #2B2478, #151C55 45%, #0C1438); }
  .copy-line { background: #0C1438; }
  .rel-notes pre { background: #0C1438; }

  .sky { background:
    radial-gradient(60vw 50vh at 85% -10%, rgba(138, 80, 255, 0.16), transparent 70%),
    radial-gradient(50vw 40vh at -10% 20%, rgba(36, 92, 250, 0.12), transparent 70%),
    radial-gradient(40vw 40vh at 100% 90%, rgba(48, 233, 193, 0.1), transparent 70%),
    linear-gradient(180deg, #E9E8FB, var(--night) 60%); }
  .glass { background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(240, 238, 255, 0.6)); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px var(--rim), 0 24px 50px -32px rgba(40, 30, 120, 0.4); }
  .btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 26px -10px rgba(138, 80, 255, 0.6); }
  .btn-ghost { background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.7)); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px var(--rim), 0 6px 16px -10px rgba(40, 30, 120, 0.3); }
  .btn-ghost:hover { background: #fff; }
  .arrow-link { color: #5B2BD9; }
  .eyebrow .dot { background: #12B892; box-shadow: 0 0 10px rgba(18, 184, 146, 0.6); }
  .glow { background: linear-gradient(100deg, #7A3CF0, #5B4BFF 35%, #0E8FD8 75%, #0FA584); -webkit-background-clip: text; background-clip: text; }
  .site-header, .site-header.scrolled { background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62)); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px var(--rim), 0 18px 40px -22px rgba(40, 30, 120, 0.35); }
  .lang-panel, .nav-panel { background: #fff; box-shadow: inset 0 0 0 1px var(--rim), 0 24px 48px -16px rgba(40, 30, 120, 0.35); }
  .lang-menu summary:hover, .lang-menu[open] summary, .nav-menu summary:hover, .nav-menu[open] summary,
  .lang-panel a:hover, .lang-panel a:focus-visible, .site-nav .nav-panel a:hover, .site-nav .nav-panel a:focus-visible { background: rgba(110, 80, 230, 0.09); }
  .lang-panel a[aria-current='true'], .site-nav .nav-panel a[aria-current='page'], .tabs button[aria-selected='true'] { background: rgba(110, 80, 230, 0.12); }
  .site-footer { background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(232, 234, 250, 0.9)); }
  .hero-window { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--rim-2), 0 40px 100px -30px rgba(138, 80, 255, 0.5), 0 0 80px -30px rgba(48, 233, 193, 0.4); }
  .show-lift:hover .window { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--rim-2), 0 40px 80px -34px rgba(60, 30, 160, 0.6); }
  .tabs { background: rgba(255, 255, 255, 0.7); }
  .show-art img, .surfaces-art img { filter: drop-shadow(0 18px 30px rgba(60, 40, 150, 0.3)); }
  .show-art-fade::before { background: radial-gradient(closest-side, rgba(241, 243, 252, var(--fade)) 55%, rgba(241, 243, 252, 0) 100%); }
  .pkg { background: color-mix(in srgb, #fff 92%, var(--violet)); }
  .pkg:hover, .pkg:focus-visible { background: color-mix(in srgb, #fff 82%, var(--violet)); }
  .rel-tag, .run-btn { color: #04121F; }
  .item-head { color: var(--ink-2); }
  .kicker, .why-num, .cmds dt span { color: #6A35E8; }
  .show-scripts .kicker, .surfaces .kicker { color: #0C8F73; }
  .show-data .kicker { color: #0B7FBF; }
  .install-next a, .dl-version, .dl-note a, .rel-notes a, .rel-more a, .rel-head:hover .rel-version,
  .pkg::after, .pkg:hover code, .pkg:focus-visible code { color: #0C8F73; }
  .item-sig { filter: brightness(0.6) saturate(1.4); }
}
