/* Notchi site
   Layout: a MacBook stage. Deep navy around the hardware, ice-blue daylight inside the screen,
   frosted glass over drifting colour, and the nav is the notch itself (in Liquid Glass).
   One committed look (no light/dark switch), built on Notchi's own Ocean theme. */
:root {
  --night: #060B18;
  --deep: #0A1426;
  --panel: #101D36;
  --raised: #1A2B4D;
  --ice: #EDF3FC;
  --frost: #F7FAFF;
  --mist: #DFE8F6;
  --navy: #0E1B34;
  --slate: #4E6182;
  --accent: #2F6FEB;
  --accent-hi: #7FB0FF;
  --glow: #5B97FF;
  --iris: #6FC3FF;
  --violet: #B79CFF;
  --leaf: #5ED89A;
  --sun: #F2B544;
  --berry: #EF6F7E;
  --warn: #FFA15A;
  --rose: #FF7AA8;
  --teal: #45D6C0;
  --lime: #B8E35A;
  --baseline: #5F6678;
  --ink: #F3F7FF;
  --ink-2: rgba(243, 247, 255, .70);
  --ink-3: rgba(243, 247, 255, .46);
  --line-d: rgba(200, 220, 255, .12);
  --line-l: rgba(14, 27, 52, .12);
  --glass-d: linear-gradient(160deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .025));
  --glass-d-edge: rgba(200, 220, 255, .15);
  --glass-l: linear-gradient(160deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .5));
  --glass-l-edge: rgba(255, 255, 255, .85);
  --blur: blur(18px) saturate(1.6);
  --island-acc: #4FC3F7;
  --ib: 6 20 28;
  --iop: 1;
  --fd: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fb: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fm: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fsys: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ice);
  color: var(--navy);
  font: 400 17px/1.6 var(--fb);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s;
}
body.is-engine { background: var(--night); color: var(--ink); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
kbd {
  font: 600 .78em/1 var(--fsys);
  display: inline-grid; place-items: center;
  min-width: 1.7em; height: 1.7em; padding: 0 .35em; margin: 0 .1em;
  border-radius: .4em;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  vertical-align: .1em;
}
code { font-family: var(--fm); font-size: .9em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
@media (min-width: 760px) {
  .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
}

.grain {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 18px;
  font: 600 12.5px/1 var(--fb);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(91, 151, 255, .22); }
.eyebrow-dark { color: var(--accent-hi); }
.eyebrow-dark .dot { background: var(--accent-hi); box-shadow: 0 0 0 4px rgba(127, 176, 255, .22), 0 0 14px var(--glow); }
.h2 {
  margin: 0 0 20px;
  font: 700 clamp(34px, 5.4vw, 68px)/1.02 var(--fd);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.lede { margin: 0; font-size: clamp(16.5px, 1.5vw, 19px); line-height: 1.62; max-width: 62ch; color: var(--slate); text-wrap: pretty; }
.is-engine .lede, .cli .lede { color: var(--ink-2); }
.lede code, .lede b { color: inherit; }
.lede b { font-weight: 600; }
.split .w { display: inline-block; overflow: clip; overflow-clip-margin: .14em; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--fb); text-decoration: none;
  transition: transform .3s var(--ease), background-color .3s, box-shadow .3s;
}
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--frost); color: var(--navy); box-shadow: 0 10px 30px -10px rgba(91, 151, 255, .6); }
.btn-light:hover { box-shadow: 0 16px 40px -10px rgba(91, 151, 255, .8); }
.btn-ghost { color: var(--ink); border: 1px solid rgba(200, 220, 255, .22); }
.btn-ghost:hover { background: rgba(200, 220, 255, .08); }

/* ---------- the notch nav ---------- */
.notchbar {
  position: fixed; z-index: 100; top: 0; left: 50%;
  transform: translateX(-50%);
  display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 6px;
  padding: calc(env(safe-area-inset-top, 0px) + 7px) 7px 7px 14px;
  background: #000; color: #fff;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .55);
  transition: padding .45s var(--ease), border-radius .45s var(--ease), box-shadow .45s;
  max-width: calc(100vw - 24px);
}
.notchbar.compact { padding-top: calc(env(safe-area-inset-top, 0px) + 5px); padding-bottom: 5px; }
.nb-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; padding-right: 6px; }
.nb-paw { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--accent); }
.nb-paw svg { width: 15px; height: 15px; fill: #fff; }
.nb-name { font: 700 17px/1 var(--fd); letter-spacing: -.02em; }
.nb-tabs { position: relative; display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.nb-ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 0; border-radius: 999px; background: #fff; transition: none; }
.nb-tab { position: relative; z-index: 1; padding: 7px 14px; border-radius: 999px; font: 600 13.5px/1 var(--fb); text-decoration: none; color: rgba(255, 255, 255, .72); transition: color .35s; white-space: nowrap; }
.nb-tab[aria-selected="true"] { color: #000; }
.nb-tab-sub { opacity: .55; }
.nb-dl { display: inline-flex; align-items: center; gap: 6px; height: 33px; padding: 0 13px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font: 600 13.5px/1 var(--fb); transition: background-color .25s; }
.nb-dl:hover { background: var(--accent-hi); }
.nb-dl svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nb-secret { grid-column: 1 / -1; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; height: 0; overflow: hidden; opacity: 0; transition: height .5s var(--ease), opacity .3s; }
.nb-secret p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .8); max-width: 34ch; }
.nb-secret b { color: #fff; }
.nb-secret-cat { width: 64px; height: 49px; background: url(../assets/pets/peek-wave-loop.webp) 0 0 / 1000% 100% no-repeat; animation: wave10 .6s steps(1) infinite; }
.notchbar.open { border-radius: 0 0 30px 30px; padding-bottom: 14px; }
.notchbar.open .nb-secret { height: 76px; opacity: 1; }
@media (max-width: 560px) {
  .nb-tab-sub, .nb-dl span { display: none; }
  .nb-dl { width: 33px; padding: 0; justify-content: center; }
  .nb-name { display: none; }
  .nb-brand { padding-right: 2px; }
  .nb-tab { padding: 7px 12px; }
}

@keyframes wave10 { 0% { background-position-x: 0%; } 10% { background-position-x: 11.111%; } 20% { background-position-x: 22.222%; } 30% { background-position-x: 33.333%; } 40% { background-position-x: 44.444%; } 50% { background-position-x: 55.555%; } 60% { background-position-x: 66.666%; } 70% { background-position-x: 77.777%; } 80% { background-position-x: 88.888%; } 90% { background-position-x: 100%; } }

/* ---------- curtain (tab transition) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 95;
  background: radial-gradient(70% 60% at 50% 40%, #0d1d3d, #02050d 75%); color: #fff;
  visibility: hidden; pointer-events: none;
  clip-path: inset(0 50% 100% 50% round 0 0 22px 22px);
  display: grid; place-items: center;
}
.curtain-inner { display: grid; justify-items: center; gap: 4px; }
.curtain-cat { width: 152px; height: 116px; background: url(../assets/pets/peek-wave-loop.webp) 0 0 / 1000% 100% no-repeat; animation: wave10 .6s steps(1) infinite; }
.curtain-label { margin: 0; font: 700 clamp(30px, 6vw, 64px)/1 var(--fd); letter-spacing: -.03em; border-top: 2px solid #fff; padding-top: 14px; }

/* ---------- HERO ---------- */
.hero { position: relative; height: 380vh; background: var(--night); color: var(--ink); }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -10%;
  background:
    radial-gradient(48% 42% at 68% 52%, rgba(91, 151, 255, .34), transparent 70%),
    radial-gradient(40% 40% at 18% 80%, rgba(183, 156, 255, .16), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(111, 195, 255, .14), transparent 70%);
  filter: blur(10px);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hero-copy {
  position: absolute; z-index: 2;
  left: max(24px, 6vw, env(safe-area-inset-left, 0px)); top: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: center; padding-top: 30px;
  width: min(560px, 46vw);
}
.hero-title {
  margin: 0 0 24px;
  font: 800 clamp(52px, 7.6vw, 118px)/.92 var(--fd);
  letter-spacing: -.05em;
}
.hero-title em { font-style: normal; color: var(--accent-hi); text-shadow: 0 0 48px rgba(91, 151, 255, .55); }
.hero-sub { margin: 0 0 30px; font-size: clamp(16px, 1.45vw, 19.5px); line-height: 1.58; color: var(--ink-2); max-width: 44ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-meta { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.hero-captions { list-style: none; margin: 0; padding: 0; position: absolute; z-index: 2; left: 50%; bottom: max(9vh, 64px); transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); text-align: center; }
.hcap { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .6s var(--ease); }
.hcap.on { opacity: 1; transform: none; }
.hcap b { display: block; font: 700 clamp(26px, 3.2vw, 40px)/1.1 var(--fd); letter-spacing: -.03em; margin-bottom: 8px; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.hcap span { display: inline-block; font-size: 16px; color: var(--ink); background: rgba(6, 11, 24, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line-d); padding: 8px 16px; border-radius: 999px; }
.hero-progress { position: absolute; z-index: 3; right: max(22px, env(safe-area-inset-right, 0px)); top: 50%; width: 2px; height: 120px; transform: translateY(-50%); background: rgba(200, 220, 255, .12); border-radius: 2px; }
.hero-progress span { position: absolute; inset: 0 0 auto; height: 0; background: var(--accent); border-radius: 2px; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font: 600 11px/1 var(--fb); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.scroll-cue span { width: 22px; height: 34px; border: 1.5px solid var(--ink-3); border-radius: 12px; position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }
.hero-wash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(60% 50% at 50% 30%, #0d1a33, #01040b 80%); }

@media (max-width: 820px) {
  .hero-copy { left: var(--gutter); right: var(--gutter-r); width: auto; top: calc(env(safe-area-inset-top, 0px) + 74px); bottom: auto; justify-content: flex-start; padding-top: 0; }
  .hero-title { font-size: clamp(46px, 13vw, 72px); margin-bottom: 16px; }
  .hero-sub { font-size: 16px; margin-bottom: 20px; }
  .hero-meta { display: none; }
  .hero-progress { display: none; }
  .btn { height: 46px; padding: 0 18px; font-size: 15px; }
}

/* ---------- wallpaper ---------- */
.wallpaper, .wallpaper-soft, .wallpaper-vivid { background: linear-gradient(180deg, #16324A 0%, #2C5870 34%, #6F98A0 58%, #DDB08C 82%, #F0CCA6 100%); }
.wallpaper-soft { background: linear-gradient(170deg, #1C3A50 0%, #3D6A7B 42%, #9DB2A6 70%, #E9C29E 100%); }
.wallpaper-vivid {
  background:
    radial-gradient(60% 70% at 80% 85%, rgba(242, 181, 68, .65), transparent 70%),
    radial-gradient(60% 70% at 12% 20%, rgba(141, 184, 232, .8), transparent 70%),
    radial-gradient(50% 60% at 55% 40%, rgba(91, 151, 255, .55), transparent 70%),
    linear-gradient(160deg, #24506A, #6F98A0 55%, #E7B590);
}
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; }
.hills .h1 { fill: #3F6E62; opacity: .65; }
.hills .h2 { fill: #2C5246; opacity: .85; }
.hills .h3 { fill: #1F3B32; }

/* ---------- MEET ---------- */
.meet { position: relative; background: var(--ice); padding-top: var(--bezel); }
.meet::before { content: ""; position: absolute; inset: 0 0 auto; height: var(--bezel); background: #000; }
.meet > .wallpaper { position: absolute; inset: var(--bezel) 0 auto; height: var(--stage-h); overflow: hidden; }
.meet { --u: 2.5; --bezel: 70px; --mbh: calc(var(--u) * 32px); --stage-h: calc(var(--mbh) + 280px); }
@media (max-width: 1100px) { .meet { --u: 2; --stage-h: calc(var(--mbh) + 260px); } }
@media (max-width: 720px) { .meet { --u: 1.35; --stage-h: calc(var(--mbh) + 250px); } }
.cat-stage { position: relative; height: var(--stage-h); user-select: none; -webkit-user-select: none; }
.mb {
  position: absolute; inset: 0 0 auto; height: var(--mbh);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 calc(var(--u) * 10px);
  background: rgba(10, 18, 26, .28);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  color: #fff; font: 500 calc(var(--u) * 6.4px)/1 var(--fsys);
}
.mb-left, .mb-right { display: flex; align-items: center; gap: calc(var(--u) * 9px); }
.mb-left b { font-weight: 700; }
.mb-logo, .mb-paw { width: calc(var(--u) * 7px); height: calc(var(--u) * 7px); border-radius: 30%; background: rgba(255, 255, 255, .9); }
.mb-paw { background: var(--accent); border-radius: 50%; }
.mb-batt { width: calc(var(--u) * 11px); height: calc(var(--u) * 5.5px); border: 1.5px solid rgba(255, 255, 255, .85); border-radius: 3px; padding: 1px; }
.mb-batt i { display: block; height: 100%; width: 82%; background: #fff; border-radius: 1px; }
@media (max-width: 720px) { .mb-hide-s { display: none; } .mb { font-size: 10px; } .mb-left, .mb-right { gap: 9px; } }

.stage-island {
  --w: calc(var(--u) * 190px);
  position: absolute; z-index: 3; top: 0; left: 50%;
  width: var(--w); height: var(--mbh);
  transform: translateX(-50%);
  background: #000; color: #fff;
  border-radius: 0 0 calc(var(--u) * 9px) calc(var(--u) * 9px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  overflow: hidden;
}
.stage-island::before { content: ""; position: absolute; top: calc(var(--mbh) * .32); left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a3550, #07080c 70%); }
.si-wing { position: absolute; top: 0; height: var(--mbh); width: calc(var(--u) * 40px); display: grid; place-items: center; opacity: 0; }
.si-wing-l { left: 0; } .si-wing-r { right: 0; }
.si-art { width: calc(var(--mbh) * .56); height: calc(var(--mbh) * .56); border-radius: 22%; background: conic-gradient(from 210deg, #F2B544, #D97757, #8F3E52, #2C5870, #F2B544); }
.si-art.big { width: 64px; height: 64px; border-radius: 12px; flex: none; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--island-acc); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.35s; } .eq i:nth-child(3) { animation-delay: -.7s; } .eq i:nth-child(4) { animation-delay: -.2s; } .eq i:nth-child(5) { animation-delay: -.55s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.si-open { position: absolute; inset: 0; padding: 0 22px 20px; opacity: 0; visibility: hidden; }
.si-head { height: 52px; display: flex; justify-content: flex-end; align-items: center; font: 600 13px/1 var(--fsys); color: rgba(255, 255, 255, .7); }
.si-peek { position: absolute; left: 26px; top: 0; width: 92px; height: 70px; background: url(../assets/pets/peek-wave-loop.webp) 0 0 / 1000% 100% no-repeat; animation: wave10 .6s steps(1) infinite; }
.si-cards { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.si-card { background: rgba(255, 255, 255, .07); border-radius: 16px; padding: 12px; font: 500 13px/1.35 var(--fsys); min-width: 0; }
.si-np { display: flex; gap: 12px; align-items: center; }
.si-np b { display: block; font-size: 14.5px; }
.si-np span { color: rgba(255, 255, 255, .6); }
.si-bar { display: block; margin-top: 10px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.si-bar i { display: block; height: 100%; width: 38%; background: #fff; border-radius: 2px; }
.si-live small { font: 700 10px/1 var(--fsys); letter-spacing: .14em; color: rgba(255, 255, 255, .5); }
.si-live p { margin: 8px 0 0; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.st-run { border: 2px solid rgba(255, 255, 255, .18); border-top-color: var(--iris); animation: spin 1s linear infinite; }
.st-ok { background: var(--leaf); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) { .si-cards { grid-template-columns: 1fr; } .si-live { display: none; } .si-open { padding: 0 14px 14px; } .si-peek { left: 14px; } }

.pet { position: absolute; z-index: 4; left: 0; top: 0; width: var(--pw, 120px); height: var(--ph, 100px); cursor: pointer; will-change: transform; }
.pet-sprite { width: 100%; height: 100%; background-repeat: no-repeat; }
.pet-say { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 6px); white-space: nowrap; font: 600 12.5px/1 var(--fb); padding: 7px 11px; border-radius: 999px; background: #fff; color: var(--navy); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .25s, transform .35s var(--ease); pointer-events: none; }
.pet-say.on { opacity: 1; transform: translate(-50%, -4px); }

.meet-copy { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding-block: 64px 120px; align-items: start; }
.meet-copy::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; }
.ctl-label { margin: 6px 0 14px; font: 600 12.5px/1 var(--fb); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line-l); background: var(--frost);
  padding: 11px 18px; border-radius: 999px; cursor: pointer;
  font: 600 15px/1 var(--fb); color: var(--navy);
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, box-shadow .25s;
}
.chip:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(14, 27, 52, .3); }
.chip:active { transform: translateY(0) scale(.97); }
.chip[aria-pressed="true"], .chip.on { background: var(--navy); color: var(--frost); border-color: var(--navy); }
.chip-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.hint { margin: 18px 0 0; font-size: 14.5px; color: var(--slate); max-width: 46ch; }
@media (max-width: 860px) { .meet-copy { grid-template-columns: 1fr; gap: 28px; padding-block: 44px 80px; } }

/* ---------- TOUR ---------- */
.tour { background: var(--ice); padding-block: 40px 60px; }
.tour-head { margin-bottom: 30px; }
.tour-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }
.tour-stage-col { position: sticky; top: 12vh; align-self: start; height: 76vh; min-height: 440px; }
.tour-stage { height: 100%; border-radius: 28px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(14, 27, 52, .45), 0 0 0 1px rgba(14, 27, 52, .06); }
.tour-screen { position: relative; height: 100%; }
.tour-screen::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 0%, rgba(255, 255, 255, .0), rgba(6, 11, 24, .25)); pointer-events: none; }
.tour-word { position: absolute; left: 0; right: 0; bottom: 92px; margin: 0; text-align: center; font: 800 clamp(48px, 7vw, 104px)/1 var(--fd); letter-spacing: -.05em; color: rgba(255, 255, 255, .16); white-space: nowrap; pointer-events: none; }
.tour-dock { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 9px; padding: 9px; border-radius: 18px; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tour-dock i { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(145deg, var(--a, #5BA8F5), var(--b, #2C5870)); }
.tour-dock i:nth-child(2) { --a: #F2B544; --b: #C9861A; } .tour-dock i:nth-child(3) { --a: #5ED89A; --b: #1F8A57; } .tour-dock i:nth-child(4) { --a: #D97757; --b: #8F3E52; }
.tour-dock i:nth-child(5) { --a: #B79CFF; --b: #6A44D6; } .tour-dock i:nth-child(6) { --a: #FF7AA8; --b: #C0335E; } .tour-dock i:nth-child(7) { --a: #E6E6EB; --b: #9a9aa2; }
@media (max-width: 900px) { .tour-dock { display: none; } .tour-word { bottom: 18px; font-size: 44px; } }
.tour-fit { position: absolute; z-index: 1; top: 0; left: 50%; width: 760px; margin-left: -380px; transform-origin: top center; display: flex; justify-content: center; }
.tisland {
  position: relative; width: 520px; height: 196px;
  background: rgb(var(--ib)); color: #fff;
  border-radius: 0 0 36px 36px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
  overflow: hidden;
  font-family: var(--fsys);
}
.tisland::before { content: ""; position: absolute; top: 12px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a3550, #07080c 70%); }
.tpanel { position: absolute; inset: 0; padding: 44px 26px 24px; opacity: 0; visibility: hidden; }
.tpanel.on { opacity: 1; visibility: visible; }
.tour-steps { list-style: none; margin: 0; padding: 0; }
.tstep { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding-block: 40px; opacity: .28; transition: opacity .5s; }
.tstep.on { opacity: 1; }
.tstep .tnum { margin: 0 0 14px; font-size: 12.5px; color: var(--accent); font: 600 12.5px/1 var(--fb); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.tstep h3 { margin: 0 0 14px; font: 700 clamp(28px, 3.2vw, 42px)/1.06 var(--fd); letter-spacing: -.03em; text-wrap: balance; }
.tstep p { margin: 0; color: var(--slate); font-size: 17.5px; max-width: 42ch; }
@media (max-width: 900px) {
  .tour-grid { display: block; }
  .tour-stage-col { top: calc(env(safe-area-inset-top, 0px) + 56px); height: 330px; min-height: 0; z-index: 2; }
  .tour-stage { border-radius: 20px; }
  .tstep { min-height: 62vh; padding-block: 24px; }
  .tstep:first-child { padding-top: 36px; }
  .tstep > * { background: var(--ice); }
}

/* tour: now playing */
.tp-np { display: grid; grid-template-columns: 118px 1fr auto; gap: 22px; align-items: center; }
.np-art { width: 118px; height: 118px; border-radius: 18px; background: conic-gradient(from 200deg at 60% 40%, #F2B544, #D97757, #8F3E52, #2C5870, #6F98A0, #F2B544); position: relative; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(91, 151, 255, .7); }
.np-disc { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, #000 0 12%, transparent 13%), repeating-radial-gradient(circle, rgba(0, 0, 0, .55) 0 2px, rgba(0, 0, 0, .35) 2px 4px); animation: spin 4s linear infinite; }
.np-meta small { font: 600 11px/1 var(--fsys); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.np-meta b { display: block; margin-top: 8px; font: 700 22px/1.15 var(--fsys); }
.np-meta > span { color: rgba(255, 255, 255, .6); font-size: 15px; }
.np-scrub { position: relative; height: 5px; margin-top: 16px; background: rgba(255, 255, 255, .16); border-radius: 3px; }
.np-fill { position: absolute; inset: 0 auto 0 0; width: 32%; background: #fff; border-radius: 3px; }
.np-knob { position: absolute; top: 50%; left: 32%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15); }
.np-time { display: flex; justify-content: space-between; margin-top: 7px; font: 500 12px/1 var(--fsys); color: rgba(255, 255, 255, .45); font-variant-numeric: tabular-nums; }
.np-ctl { display: flex; align-items: center; gap: 14px; }
.np-ctl svg { width: 24px; height: 24px; fill: #fff; stroke: #fff; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.np-ctl svg.big { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, .14); fill: none; }
.eq-lg { position: absolute; right: 30px; top: 16px; height: 14px; }

/* tour: live */
.live-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.live-head small { font: 700 11px/1 var(--fsys); letter-spacing: .16em; color: rgba(255, 255, 255, .5); }
.tag { font: 600 10px/1 var(--fm); letter-spacing: .08em; color: var(--island-acc); border: 1px solid var(--island-acc); padding: 4px 7px; border-radius: 6px; }
.live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.live-list li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.live-list li b { font-weight: 600; display: block; line-height: 1.2; }
.live-list li span.sub { font-size: 12px; color: rgba(255, 255, 255, .5); }
.live-list li em { font-style: normal; font-size: 12.5px; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.li-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 13px/1 var(--fsys); }
.li-ic.att { background: var(--warn); color: #000; animation: pulse 1.4s ease-in-out infinite; }
.li-ic.run { border: 2.5px solid rgba(255, 255, 255, .15); border-top-color: var(--iris); animation: spin 1s linear infinite; }
.li-ic.fail { background: var(--berry); color: #000; }
.li-ic.done { background: var(--leaf); color: #000; }
.li-prog { width: 70px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.li-prog i { display: block; height: 100%; background: var(--iris); border-radius: 2px; transition: width .6s var(--ease); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 161, 90, .55); } 50% { box-shadow: 0 0 0 7px rgba(255, 161, 90, 0); } }

/* tour: apps */
.apps-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; }
.app { display: grid; justify-items: center; gap: 8px; }
.app-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; transition: transform .3s var(--ease); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.app-ic svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app.hit .app-ic { transform: scale(1.18) translateY(-4px); box-shadow: 0 0 0 3px var(--island-acc), 0 12px 24px -6px var(--island-acc); }
.app small { font: 600 10.5px/1 var(--fsys); color: rgba(255, 255, 255, .5); }
.app.hit small { color: #fff; }
.apps-hint { margin-top: 16px; text-align: center; font-size: 13.5px; color: rgba(255, 255, 255, .6); }

/* tour: ask */
.ask-bar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px; border-radius: 14px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--island-acc); font-size: 15px; }
.spark { color: var(--island-acc); font-size: 16px; }
.ask-q { font-family: var(--fm); font-size: 14px; white-space: nowrap; overflow: hidden; }
.caret { width: 2px; height: 18px; background: var(--island-acc); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ask-src { margin-left: auto; font: 600 11.5px/1 var(--fsys); padding: 6px 9px; border-radius: 8px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7); white-space: nowrap; }
.ask-a { margin-top: 16px; font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, .88); min-height: 120px; }
.ask-a code { color: var(--island-acc); }

/* tour: terminals */
.tp-term { display: grid; grid-template-columns: 170px 1fr; gap: 14px; }
.rail { background: rgba(255, 255, 255, .05); border-radius: 16px; padding: 10px; display: grid; align-content: start; gap: 6px; }
.rail small { font: 700 10px/1 var(--fsys); letter-spacing: .14em; color: rgba(255, 255, 255, .45); padding: 4px 4px 4px; }
.rtab { display: grid; grid-template-columns: 18px 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; padding: 7px 9px; border-radius: 11px; font: 600 13.5px/1.2 var(--fsys); color: #fff; position: relative; }
.rtab::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--tc); }
.rtab em { grid-column: 2; font: 500 11.5px/1.2 var(--fsys); font-style: normal; color: rgba(255, 255, 255, .5); font-variant-numeric: tabular-nums; }
.rtab.sel { background: rgba(255, 255, 255, .1); }
.rtab > span { grid-row: 1 / 3; }
.ring { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .15); border-top-color: var(--island-acc); animation: spin .9s linear infinite; }
.okc { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: #000; font: 900 10px/1 var(--fsys); }
.bang { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #000; font: 900 11px/1 var(--fsys); animation: pulse 1.4s infinite; }
.idle { width: 9px; height: 9px; margin: 4px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.convo { font-size: 13.5px; line-height: 1.5; display: grid; align-content: start; gap: 8px; overflow: hidden; }
.convo p { margin: 0; }
.convo .me { justify-self: end; max-width: 80%; background: var(--island-acc); color: #1a0e08; padding: 7px 12px; border-radius: 14px 14px 4px 14px; font-weight: 500; }
.convo .cl { color: rgba(255, 255, 255, .85); }
.convo .tool { font-family: var(--fm); font-size: 12px; color: rgba(255, 255, 255, .5); border-left: 2px solid rgba(255, 255, 255, .2); padding-left: 9px; }
.banner { position: absolute; left: 50%; bottom: 16px; display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; background: #111; box-shadow: 0 0 0 1px rgba(94, 216, 154, .45), 0 10px 30px rgba(0, 0, 0, .5); font-size: 13.5px; white-space: nowrap; transform: translate(-50%, 90px); }
.banner b { font-weight: 700; }

/* ---------- CUSTOMIZER ---------- */
.custom { background: var(--mist); padding-block: 110px; }
.custom-head { margin-bottom: 40px; }
.custom-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: start; }
.cz-preview { position: sticky; top: 90px; border-radius: 26px; padding: 12px; background: #060b16; box-shadow: 0 40px 80px -40px rgba(14, 27, 52, .6); }
.cz-screen { position: relative; aspect-ratio: 16 / 10.5; border-radius: 16px; overflow: hidden; }
.cz-orb { position: absolute; z-index: 1; top: 18%; left: 30%; width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6, transparent 40%), conic-gradient(from 90deg, #F2B544, #D97757, #B79CFF, #4FC3F7, #F2B544); filter: saturate(1.2); animation: orb 9s ease-in-out infinite alternate; }
@keyframes orb { 0% { transform: translate(-30%, 10%) rotate(0); } 100% { transform: translate(60%, -10%) rotate(180deg); } }
.cz-mb { position: absolute; inset: 0 0 auto; height: 22px; background: rgba(10, 18, 26, .25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; gap: 10px; align-items: center; padding: 0 12px; }
.cz-mb span { width: 26px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .7); }
.cz-mb span:first-child { width: 10px; }
.cz-island {
  --pad: 14px;
  position: absolute; z-index: 2; top: 0; left: 50%; width: 76%; margin-left: -38%;
  padding: 40px var(--pad) var(--pad);
  border-radius: 0 0 26px 26px;
  background: rgb(var(--ib) / var(--iop));
  color: #fff; font-family: var(--fsys);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .5);
}
.cz-preview[data-surface="frosted"] .cz-island { background: rgb(var(--ib) / calc(.25 + .6 * var(--iop))); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 50px -20px rgba(0, 0, 0, .5); }
.cz-preview[data-surface="glass"] .cz-island {
  background: linear-gradient(140deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .03) 45%, rgba(255, 255, 255, .1)), rgb(var(--ib) / calc(.15 + .7 * var(--iop)));
  backdrop-filter: blur(8px) saturate(1.9) brightness(1.08); -webkit-backdrop-filter: blur(8px) saturate(1.9) brightness(1.08);
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, .55), inset -1px -1px 0 rgba(255, 255, 255, .2), inset 0 0 24px rgba(255, 255, 255, .12), 0 24px 50px -20px rgba(0, 0, 0, .45);
}
.cz-preview[data-dock="left"] .cz-island { top: 13%; left: 10px; margin-left: 0; width: 36%; border-radius: 22px; padding-top: 52px; }
.cz-pet { position: absolute; left: 18px; top: 3px; width: 62px; height: auto; pointer-events: none; }
.cz-preview[data-dock="left"] .cz-pet { top: -50px; left: 10px; width: 70px; }
.cz-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.cz-preview[data-dock="left"] .cz-row { grid-template-columns: 1fr; }
.cz-card { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 9px; font-size: 11.5px; min-width: 0; }
.cz-np { display: flex; gap: 9px; align-items: center; }
.cz-np b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-np small { color: rgba(255, 255, 255, .55); }
.cz-np > div { min-width: 0; flex: 1; }
.cz-art { width: 38px; height: 38px; flex: none; border-radius: 9px; background: conic-gradient(from 210deg, #F2B544, #D97757, #8F3E52, #2C5870, #F2B544); }
.cz-bar { display: block; margin-top: 6px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.cz-bar i { display: block; height: 100%; width: 45%; border-radius: 2px; background: var(--island-acc); }
.cz-live small { font: 700 8.5px/1 var(--fsys); letter-spacing: .14em; color: rgba(255, 255, 255, .5); }
.cz-live p { margin: 7px 0 0; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.cz-ring { width: 11px; height: 11px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .18); border-top-color: var(--island-acc); animation: spin 1s linear infinite; }
.cz-apps { display: flex; gap: 6px; margin: 9px 0; flex-wrap: wrap; }
.cz-apps i { width: 24px; height: 24px; border-radius: 7px; background: rgba(255, 255, 255, .14); }
.cz-apps i:nth-child(1) { background: linear-gradient(135deg, #5BA8F5, #2C5870); }
.cz-apps i:nth-child(2) { background: linear-gradient(135deg, #5ED89A, #1F6B4A); }
.cz-apps i:nth-child(3) { background: linear-gradient(135deg, #F2B544, #C46B2A); }
.cz-apps i:nth-child(4) { background: linear-gradient(135deg, #B79CFF, #5A3FA0); }
.cz-ask { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--island-acc); font-size: 11px; color: rgba(255, 255, 255, .6); }
.cz-ask span { color: var(--island-acc); }
.cz-ask em { margin-left: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--island-acc); }
.cz-controls { display: grid; gap: 26px; }
.cz-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.cz-set legend { padding: 0; margin-bottom: 12px; font: 600 12.5px/1 var(--fb); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.cz-split { display: grid; grid-template-columns: 1fr auto; gap: 22px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--b); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .3s var(--ease); }
.sw::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--a); }
.sw:hover { transform: scale(1.08); }
.sw[aria-checked="true"] { box-shadow: 0 0 0 3px var(--mist), 0 0 0 5px var(--navy); }
.sw-name { display: block; margin-top: 10px; font-size: 14px; color: var(--slate); min-height: 1.4em; }
.pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.petb { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line-l); background: var(--frost); cursor: pointer; padding: 2px; display: grid; place-items: center; transition: transform .25s var(--ease), border-color .25s; }
.petb img { width: 108%; max-width: none; margin-top: -10%; }
.petb:hover { transform: translateY(-2px); }
.petb[aria-checked="true"] { border: 2px solid var(--navy); background: #fff; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(14, 27, 52, .08); }
.seg button { border: 0; background: transparent; padding: 9px 14px; border-radius: 10px; font: 600 14px/1 var(--fb); cursor: pointer; color: var(--slate); transition: background-color .25s, color .25s, box-shadow .25s; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--frost); color: var(--navy); box-shadow: 0 2px 6px rgba(14, 27, 52, .14); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
@media (max-width: 900px) { .custom-grid { grid-template-columns: 1fr; } .cz-preview { position: relative; top: 0; } .cz-split { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cz-island { width: 92%; margin-left: -46%; padding-top: 34px; } .cz-row { grid-template-columns: 1fr; } .cz-live { display: none; } .cz-pet { width: 50px; } .custom { padding-block: 80px; } }

/* ---------- CLI ---------- */
.cli { background: var(--night); color: var(--ink); padding-block: 120px; overflow: hidden; }
.cli-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.cli .lede code { color: var(--accent-hi); }
.cli-cmds { margin-top: 30px; display: grid; gap: 10px; }
.cmd { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--line-d); background: var(--deep); border-radius: 14px; padding: 12px 12px 12px 16px; cursor: pointer; color: var(--ink); transition: border-color .25s, background-color .25s, transform .25s var(--ease); }
.cmd:hover { border-color: rgba(91, 151, 255, .5); transform: translateX(4px); }
.cmd.on { border-color: var(--accent); background: #0f1d3a; }
.cmd code { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.cmd code b { color: var(--accent-hi); font-weight: 500; }
.cmd span { font: 600 12px/1 var(--fb); padding: 7px 10px; border-radius: 8px; background: rgba(200, 220, 255, .08); color: var(--ink-2); white-space: nowrap; }
.cli-demo { min-width: 0; }
.mini-notch { position: relative; height: 150px; border-radius: 22px 22px 0 0; overflow: hidden; background: linear-gradient(180deg, #16324A, #2C5870 60%, #6F98A0); display: flex; justify-content: center; }
.mn-pill { position: relative; z-index: 2; margin-top: 0; height: 44px; min-width: 210px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 0 0 22px 22px; background: rgb(var(--ib)); color: #fff; font: 600 14px/1 var(--fsys); white-space: nowrap; overflow: hidden; }
.mn-icon { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 900 11px/1 var(--fsys); color: #000; }
.mn-icon.run { border: 2.5px solid rgba(255, 255, 255, .15); border-top-color: var(--tint, var(--iris)); animation: spin .9s linear infinite; }
.mn-icon.done { background: var(--leaf); }
.mn-icon.att { background: var(--warn); animation: pulse 1.4s infinite; }
.mn-icon.quiet { background: rgba(255, 255, 255, .25); width: 9px; height: 9px; }
.mn-right { margin-left: auto; padding-left: 14px; color: rgba(255, 255, 255, .55); font-weight: 500; font-variant-numeric: tabular-nums; }
.mn-prog { position: absolute; left: 16px; right: 16px; bottom: 5px; height: 3px; border-radius: 2px; background: var(--tint, var(--iris)); transform-origin: left; transform: scaleX(0); opacity: 0; }
.mn-ripple { position: absolute; top: 22px; left: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; border: 2px solid var(--leaf); opacity: 0; }
.term { background: #050A15; border: 1px solid var(--line-d); border-top: 0; border-radius: 0 0 22px 22px; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line-d); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #26324a; }
.term-bar span { margin-left: 10px; font: 500 12px/1 var(--fm); color: var(--ink-3); }
.term-body { margin: 0; height: 300px; overflow: auto; padding: 18px; font: 400 13.5px/1.65 var(--fm); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.term-body .p { color: var(--leaf); }
.term-body .c { color: var(--ink); }
.term-body .o { color: var(--ink-3); }
.term-body .ok { color: var(--leaf); }
.term-body .cur { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@media (max-width: 900px) { .cli-grid { grid-template-columns: 1fr; } .cli { padding-block: 90px; } }

/* ---------- KEYS ---------- */
.keys { background: var(--ice); padding-block: 120px; }
.key-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kcard { background: var(--frost); border-radius: 22px; padding: 26px 22px 24px; border: 1px solid var(--line-l); }
.kcard h3 { margin: 22px 0 8px; font: 700 20px/1.2 var(--fd); letter-spacing: -.02em; }
.kcard p { margin: 0; font-size: 15px; color: var(--slate); }
.kcard kbd { background: var(--mist); border-color: var(--line-l); color: var(--navy); }
.caps { display: flex; align-items: center; gap: 8px; height: 64px; }
.cap {
  display: inline-grid; place-items: center; width: 56px; height: 54px; border-radius: 12px;
  font: 500 22px/1 var(--fsys); color: var(--navy);
  background: linear-gradient(180deg, #fff, #E8EEF8);
  box-shadow: 0 5px 0 #C3D0E6, 0 8px 16px -4px rgba(14, 27, 52, .25), inset 0 1px 0 #fff;
  transform: translateY(-3px);
  transition: transform .09s, box-shadow .09s, background-color .2s;
}
.cap.wide { width: 86px; font-size: 16px; }
.cap.down { transform: translateY(2px); box-shadow: 0 0 0 #C3D0E6, 0 2px 6px -2px rgba(14, 27, 52, .25), inset 0 1px 0 #fff; background: linear-gradient(180deg, #E3EEFF, #CFE0FF); color: var(--accent); }
.plus, .dots { color: var(--slate); font-weight: 600; }
@media (max-width: 1000px) { .key-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .key-grid { grid-template-columns: 1fr; } .keys { padding-block: 90px; } }

/* ---------- GET ---------- */
.get { position: relative; overflow: hidden; padding-block: 140px 120px; background: #E4ECFA; }
.get-glow { position: absolute; inset: -20%; background: radial-gradient(40% 40% at 60% 30%, rgba(91, 151, 255, .45), transparent 70%), radial-gradient(40% 50% at 10% 90%, rgba(111, 195, 255, .5), transparent 70%), radial-gradient(50% 50% at 90% 80%, rgba(183, 156, 255, .45), transparent 70%); filter: blur(30px); }
.get-inner { position: relative; display: grid; justify-items: center; text-align: center; }
.poster { position: relative; margin-top: 70px; }
.poster-cat { position: absolute; z-index: 2; left: 8%; bottom: calc(100% - 26px); width: 190px; height: 145px; background: url(../assets/pets/peek-wave-loop.webp) 0 0 / 1000% 100% no-repeat; animation: wave10 .6s steps(1) infinite; pointer-events: none; }
.poster-pill { position: relative; display: grid; justify-items: center; gap: 14px; padding: 46px clamp(40px, 9vw, 120px) 34px; border-radius: 0 0 56px 56px; background: #0A0A0A; color: var(--frost); text-decoration: none; box-shadow: 0 50px 90px -40px rgba(14, 27, 52, .7); transition: transform .5s var(--ease), box-shadow .5s; }
.poster-pill:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 60px 100px -40px rgba(91, 151, 255, .7); }
.pp-name { font: 800 clamp(64px, 11vw, 140px)/.9 var(--fd); letter-spacing: -.05em; }
.pp-dl { display: inline-flex; align-items: center; gap: 9px; font: 600 16px/1 var(--fb); padding: 12px 20px; border-radius: 999px; background: var(--accent); color: #fff; }
.pp-dl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.get-meta { margin: 26px 0 50px; color: var(--slate); font-size: 15px; }
.install { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; width: 100%; max-width: 1080px; }
.install li { counter-increment: s; position: relative; background: rgba(255, 255, 255, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-l); border-radius: 20px; padding: 56px 22px 22px; font-size: 15.5px; color: var(--slate); min-width: 0; }
.install li::before { content: counter(s); position: absolute; top: 18px; left: 22px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--frost); font: 700 13px/1 var(--fd); }
.install b { color: var(--navy); }
.copyline { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--navy); color: var(--frost); min-width: 0; }
.copyline code { font-size: 12px; overflow-x: auto; white-space: nowrap; flex: 1; min-width: 0; }
.copy { border: 0; padding: 7px 11px; border-radius: 8px; background: rgba(255, 255, 255, .14); cursor: pointer; font: 600 12px/1 var(--fb); }
.get-src { margin: 36px 0 0; font-size: 15px; color: var(--slate); }
.get-src a { color: var(--navy); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 3px; }
@media (max-width: 900px) { .install { grid-template-columns: 1fr; } .poster-cat { width: 130px; height: 99px; bottom: calc(100% - 18px); } .get { padding-block: 100px 90px; } }

/* ---------- FOOTER ---------- */
.foot { background: #03070F; color: var(--ink-2); padding-block: 44px calc(44px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.foot-inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 30px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand b { color: var(--ink); font: 700 17px/1 var(--fd); }
.foot-links { display: flex; gap: 22px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-note { grid-column: 1 / -1; margin: 0; color: var(--ink-3); font-size: 13px; }
@media (max-width: 600px) { .foot-inner { grid-template-columns: 1fr; } }

/* =================================================== ENGINE */
.view-engine { background: var(--night); color: var(--ink); }
.ehero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; padding-bottom: 70px; }
.bits-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ehero-fade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 11, 24, .92) 0%, rgba(6, 11, 24, .55) 45%, rgba(6, 11, 24, 0) 75%), linear-gradient(0deg, var(--night) 0%, rgba(6, 11, 24, 0) 35%); pointer-events: none; }
.ehero-copy { position: relative; z-index: 2; padding-top: 140px; }
.ehero-title { margin: 0 0 22px; max-width: 14ch; font: 800 clamp(44px, 6.6vw, 96px)/.95 var(--fd); letter-spacing: -.045em; text-wrap: balance; }
.ehero-sub { margin: 0 0 34px; max-width: 54ch; font-size: clamp(16.5px, 1.5vw, 19px); color: var(--ink-2); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { display: grid; gap: 4px; padding: 14px 18px; border-radius: 16px; background: rgba(16, 29, 54, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line-d); }
.facts b { font: 700 22px/1 var(--fd); color: var(--ink); }
.facts span { font-size: 12.5px; color: var(--ink-3); }
.bits-hud { margin: 22px 0 0; font: 500 12px/1.5 var(--fm); color: var(--ink-3); min-height: 1.5em; font-variant-numeric: tabular-nums; }

.algo-nav { position: sticky; z-index: 50; top: calc(env(safe-area-inset-top, 0px) + 54px); padding-block: 10px; pointer-events: none; }
.algo-nav-inner { display: flex; justify-content: safe center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.algo-nav-inner::-webkit-scrollbar { display: none; }
.algo-nav a { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; font: 600 13px/1 var(--fb); text-decoration: none; color: var(--ink-2); background: rgba(10, 20, 38, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-d); transition: color .25s, border-color .25s; white-space: nowrap; }
.algo-nav a:hover, .algo-nav a.on { color: var(--ink); border-color: rgba(200, 220, 255, .3); }
.algo-nav a i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
@media (max-width: 700px) { .algo-nav-inner { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; } .algo-nav-inner::-webkit-scrollbar { display: none; } }

.sec-head { margin-bottom: 40px; }
.arch { padding-block: 90px 60px; }
.arch-grid { display: grid; grid-template-columns: 1fr 210px 1.35fr; align-items: center; }
.arch-node { padding: 26px; border-radius: 22px; background: var(--deep); border: 1px solid var(--line-d); }
.arch-node small, .arch-mod code { font: 500 11.5px/1.3 var(--fm); color: var(--ink-3); }
.arch-node b { display: block; margin: 8px 0 4px; font: 700 28px/1.1 var(--fd); letter-spacing: -.02em; }
.arch-node > span { color: var(--ink-2); font-size: 14.5px; }
.arch-node ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.arch-node li { font-size: 14px; padding: 9px 12px; border-radius: 10px; background: rgba(200, 220, 255, .05); }
.arch-wire { position: relative; height: 160px; display: grid; place-items: center; }
.arch-wire i { position: absolute; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, rgba(91, 151, 255, .8) 0 8px, transparent 8px 16px); background-size: 32px 2px; animation: wire 1.2s linear infinite; }
.arch-wire i:nth-child(1) { top: 46px; } .arch-wire i:nth-child(2) { top: 79px; animation-direction: reverse; background-image: repeating-linear-gradient(90deg, rgba(141, 184, 232, .8) 0 8px, transparent 8px 16px); } .arch-wire i:nth-child(3) { top: 112px; }
.arch-wire span { position: relative; z-index: 1; padding: 9px 12px; border-radius: 10px; background: var(--night); border: 1px solid var(--line-d); font: 500 12px/1.4 var(--fm); text-align: center; color: var(--ink-2); }
@keyframes wire { to { background-position-x: 32px; } }
.arch-mods { display: grid; gap: 10px; }
.arch-mod { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 15px 18px; border-radius: 16px; background: var(--deep); border: 1px solid var(--line-d); border-left: 3px solid var(--c); }
.arch-mod b { font: 700 18px/1.2 var(--fd); }
.arch-mod span { font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 900px) {
  .arch-grid { grid-template-columns: 1fr; }
  .arch-wire { height: 110px; }
  .arch-wire i { top: 0 !important; bottom: 0; left: 50%; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, rgba(91, 151, 255, .8) 0 8px, transparent 8px 16px); background-size: 2px 32px; animation-name: wirev; }
  .arch-wire i:nth-child(1) { margin-left: -24px; } .arch-wire i:nth-child(2) { margin-left: 0; background-image: repeating-linear-gradient(180deg, rgba(141, 184, 232, .8) 0 8px, transparent 8px 16px); } .arch-wire i:nth-child(3) { margin-left: 24px; }
}
@keyframes wirev { to { background-position-y: 32px; } }

.algo { padding-block: 100px 40px; border-top: 1px solid var(--line-d); scroll-margin-top: 90px; }
.algo-head { margin-bottom: 40px; }
.algo-tag { margin: 0 0 16px; display: inline-flex; align-items: center; gap: 9px; font: 600 12.5px/1 var(--fb); letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.algo-tag i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); box-shadow: 0 0 14px var(--c); }
.algo .h2 { margin-bottom: 18px; }
.cx { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cx li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line-d); font-size: 13.5px; }
.cx code { color: var(--ink-2); font-size: 12.5px; }
.cx b { font: 600 13.5px/1 var(--fm); color: var(--c); }
.cx b.bad { color: var(--ink-3); }

.lab { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.lab-main, .lab-side > div { background: var(--deep); border: 1px solid var(--line-d); border-radius: 22px; }
.lab-main { padding: 20px; min-width: 0; }
.lab-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.lab-side > div { padding: 18px; }
.lab-side small { display: block; margin-bottom: 12px; font: 600 11.5px/1.3 var(--fb); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.lab-side small code { text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.lab-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.lab-sep { flex: 1; }
.lbtn { border: 1px solid transparent; background: var(--c, var(--accent)); color: #06101F; padding: 10px 15px; border-radius: 11px; font: 600 14px/1 var(--fb); cursor: pointer; transition: transform .2s var(--ease), filter .2s, background-color .2s; }
.lbtn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.lbtn:active { transform: scale(.97); }
.lbtn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.lbtn.ghost { background: rgba(200, 220, 255, .06); color: var(--ink); border-color: var(--line-d); font-family: var(--fm); font-weight: 500; font-size: 13px; }
.lab-log { margin: 14px 0 0; font: 500 13px/1.5 var(--fm); color: var(--ink-2); min-height: 3em; }
.lab-log b { color: var(--c); font-weight: 600; }
.seg-sm { background: rgba(200, 220, 255, .06); border-radius: 11px; }
.seg-sm button { color: var(--ink-2); padding: 8px 11px; font-size: 13px; border-radius: 8px; }
.seg-sm button[aria-checked="true"] { background: var(--raised); color: var(--ink); box-shadow: none; }
@media (max-width: 960px) { .lab { grid-template-columns: 1fr; } .lab-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }

/* heap */
.heap-viz { overflow-x: auto; }
#heap-svg { width: 100%; min-width: 560px; height: auto; display: block; }
#heap-svg .edge { stroke: rgba(200, 220, 255, .14); stroke-width: 2; }
#heap-svg .edge.hot { stroke: var(--accent); }
#heap-svg .node rect { fill: var(--panel); stroke: rgba(200, 220, 255, .14); stroke-width: 1.5; }
#heap-svg .node.cmp rect { stroke: var(--sun); stroke-width: 2.5; }
#heap-svg .node.new rect { stroke: var(--accent); stroke-width: 2.5; }
#heap-svg .node text { fill: var(--ink); font: 600 12px var(--fb); }
#heap-svg .node text.ix { fill: var(--ink-3); font: 500 10px var(--fm); }
#heap-svg .slot { fill: none; stroke: rgba(200, 220, 255, .07); stroke-dasharray: 3 4; }
.heap-arr { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.heap-arr div { position: relative; height: 40px; border-radius: 8px; background: rgba(200, 220, 255, .04); border: 1px dashed rgba(200, 220, 255, .1); font: 500 10px/1 var(--fm); color: var(--ink-3); display: grid; place-items: center; }
.heap-arr div.f { border-style: solid; background: var(--panel); }
.heap-arr div i { position: absolute; top: 4px; left: 5px; font-style: normal; font-size: 9px; }
.heap-arr div span { width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; }
.s-att { background: var(--warn); } .s-run { background: var(--iris); } .s-fail { background: var(--berry); } .s-done { background: var(--leaf); }
.mini-live ul { list-style: none; margin: 0; padding: 10px; display: grid; gap: 6px; background: #000; border-radius: 0 0 18px 18px; min-height: 160px; }
.mini-live li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: rgba(255, 255, 255, .07); font: 600 13px/1.2 var(--fsys); }
.mini-live li i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mini-live li em { margin-left: auto; font: 500 11px/1 var(--fm); font-style: normal; color: var(--ink-3); }
#heap-pos { display: flex; flex-wrap: wrap; gap: 5px; font: 500 11.5px/1 var(--fm); }
#heap-pos span { padding: 6px 7px; border-radius: 7px; background: rgba(200, 220, 255, .06); color: var(--ink-2); }
#heap-pos span b { color: var(--accent); font-weight: 600; }
.legend-states { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend-states span { display: inline-flex; align-items: center; gap: 6px; }
.legend-states i { width: 10px; height: 10px; border-radius: 50%; }
.lab-side > .legend-states { background: none; border: 0; padding: 4px 2px; }

/* bloom */
.bloom-form { display: flex; gap: 8px; margin-bottom: 12px; }
.bloom-form input, .trie-bar input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-d); background: var(--night); color: var(--ink); font: 500 15px/1 var(--fm); }
.bloom-form input:focus, .trie-bar input:focus { outline: none; border-color: var(--c); }
.bloom-hashes { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-bottom: 12px; font: 500 12px/1 var(--fm); }
.bloom-hashes span { padding: 8px 10px; border-radius: 8px; background: rgba(183, 156, 255, .12); color: var(--violet); }
.bloom-hashes span.h { background: rgba(200, 220, 255, .05); color: var(--ink-2); }
.bloom-bits { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 5px; }
.bit { position: relative; aspect-ratio: 1; border-radius: 7px; background: rgba(200, 220, 255, .05); border: 1px solid rgba(200, 220, 255, .06); display: grid; place-items: center; font: 500 9px/1 var(--fm); color: var(--ink-3); transition: background-color .35s, color .35s, border-color .35s; }
.bit.on { background: rgba(183, 156, 255, .28); border-color: rgba(183, 156, 255, .5); color: var(--ink); }
.bit.probe { border-color: var(--sun); box-shadow: 0 0 0 2px rgba(242, 181, 68, .35), 0 0 18px rgba(242, 181, 68, .4); }
.bit.zero { border-color: var(--leaf); box-shadow: 0 0 0 2px rgba(94, 216, 154, .35); }
@media (max-width: 640px) { .bloom-bits { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.bloom-verdict { margin-top: 16px; min-height: 64px; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(200, 220, 255, .04); font-size: 14.5px; color: var(--ink-2); }
.bloom-verdict b { font: 700 12px/1 var(--fm); letter-spacing: .06em; padding: 7px 9px; border-radius: 7px; color: #06101F; flex: none; }
.v-new { background: var(--leaf); } .v-dup { background: var(--warn); } .v-fp { background: var(--sun); }
.bloom-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bloom-stats div { display: grid; gap: 4px; }
.bloom-stats b { font: 700 24px/1 var(--fd); font-variant-numeric: tabular-nums; }
.bloom-stats span { font-size: 12px; color: var(--ink-3); }
.bloom-log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font: 500 12px/1.3 var(--fm); max-height: 230px; overflow: auto; }
.bloom-log li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 8px; background: rgba(200, 220, 255, .04); }
.bloom-log li span { color: var(--ink-3); }
.sizer { margin-top: 16px; padding: 22px; border-radius: 22px; background: var(--deep); border: 1px solid var(--line-d); }
.sizer h4, .bench h4 { margin: 0 0 14px; font: 600 15px/1.35 var(--fb); color: var(--ink); }
.sizer-row { display: flex; flex-wrap: wrap; gap: 16px; }
.sizer-row label { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.sizer-row input, .sizer-row select { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-d); background: var(--night); color: var(--ink); font: 500 14px/1 var(--fm); min-width: 150px; }
.sizer-out { margin: 16px 0 6px; font: 500 15px/1.5 var(--fm); color: var(--ink); }
.sizer-out b { color: var(--violet); font-weight: 600; }
.formula { margin: 0; font: 400 12.5px/1.6 var(--fm); color: var(--ink-3); }

/* trie */
.trie-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 0 0 0 14px; border-radius: 14px; background: #000; box-shadow: inset 0 0 0 1px rgba(94, 216, 154, .45); }
.trie-bar input { border: 0; background: transparent; height: 50px; padding-left: 0; font-size: 16px; }
.trie-bar .spark { color: var(--leaf); }
.trie-time { padding-right: 14px; font: 500 12px/1 var(--fm); color: var(--ink-3); white-space: nowrap; }
.trie-viz { min-height: 220px; padding: 18px; border-radius: 16px; background: var(--night); overflow-x: auto; display: flex; align-items: center; gap: 0; }
.tnode { flex: none; display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 11px; font: 600 15px/1 var(--fm); background: var(--panel); border: 1px solid var(--line-d); color: var(--ink); position: relative; }
.tnode.root { border-radius: 50%; width: 38px; min-width: 0; padding: 0; font-size: 11px; color: var(--ink-3); }
.tnode.path { background: rgba(94, 216, 154, .16); border-color: rgba(94, 216, 154, .55); color: var(--leaf); }
.tnode.sp { font-size: 10px; color: var(--ink-3); }
.tlink { flex: none; width: 22px; height: 2px; background: rgba(94, 216, 154, .5); }
.tfan { flex: none; display: grid; gap: 6px; padding-left: 26px; position: relative; }
.tfan::before { content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 2px; background: rgba(200, 220, 255, .2); }
.tfan::after { content: ""; position: absolute; left: 14px; top: 19px; bottom: 19px; width: 2px; background: rgba(200, 220, 255, .14); }
.tchild { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--fm); color: var(--ink-3); }
.tchild .tnode { height: 30px; min-width: 30px; font-size: 13px; }
.tchild .tnode::before { content: ""; position: absolute; left: -12px; top: 50%; width: 12px; height: 2px; background: rgba(200, 220, 255, .14); }
.tempty { color: var(--ink-3); font: 500 13px/1.5 var(--fm); }
.trie-results ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: r; }
.trie-results li { counter-increment: r; }
.trie-results button { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line-d); background: rgba(200, 220, 255, .03); color: var(--ink); cursor: pointer; transition: border-color .2s, background-color .2s; }
.trie-results button:hover { border-color: rgba(94, 216, 154, .5); background: rgba(94, 216, 154, .06); }
.trie-results .k { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 700 12px/1 var(--fsys); color: #fff; }
.trie-results .lbl { font: 600 14px/1.2 var(--fb); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trie-results .lbl mark { background: rgba(94, 216, 154, .25); color: var(--leaf); border-radius: 3px; }
.trie-results .lbl small { display: block; margin: 3px 0 0; font: 500 11px/1 var(--fm); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.trie-results .cnt { font: 500 11.5px/1 var(--fm); color: var(--ink-3); text-align: right; }
.trie-results .cnt kbd { background: rgba(200, 220, 255, .08); border-color: var(--line-d); font-size: 10.5px; }
.trie-results .none { color: var(--ink-3); font-size: 14px; padding: 8px; }

/* quickselect */
.qs-viz { position: relative; height: 240px; margin-top: 6px; border-radius: 16px; background: var(--night); overflow: hidden; }
.qs-bar { position: absolute; bottom: 26px; border-radius: 4px 4px 0 0; background: rgba(200, 220, 255, .28); transition: background-color .3s, opacity .3s; }
.qs-bar.dim { opacity: .18; }
.qs-bar.lt { background: rgba(141, 184, 232, .6); }
.qs-bar.gt { background: rgba(91, 151, 255, .55); }
.qs-bar.pv { background: var(--sun); box-shadow: 0 0 18px rgba(242, 181, 68, .6); }
.qs-bar.hit { background: var(--sun); }
.qs-bar span { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); font: 600 11px/1 var(--fm); color: var(--sun); white-space: nowrap; }
.qs-range { position: absolute; bottom: 8px; height: 10px; border: 2px solid var(--sun); border-top: 0; border-radius: 0 0 6px 6px; transition: left .4s var(--ease), width .4s var(--ease); }
.qs-tab .rtab { background: #000; padding: 12px 14px; font-size: 15px; border-radius: 14px; }
.qs-tab .rtab em { font-size: 13px; }
.qs-tip { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.qs-count b { font: 700 40px/1 var(--fd); font-variant-numeric: tabular-nums; color: var(--sun); }
.qs-count span { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* bench + charts */
.bench { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.bench > div { padding: 22px; border-radius: 22px; background: var(--deep); border: 1px solid var(--line-d); min-width: 0; }
.bench-live p { margin: 0 0 16px; font-size: 14.5px; color: var(--ink-2); }
.race-out { margin-top: 16px; font: 500 13px/1.6 var(--fm); color: var(--ink-2); }
.race-out table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.race-out td, .race-out th { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--line-d); }
.race-out th { font-weight: 500; color: var(--ink-3); }
.race-out td:first-child, .race-out th:first-child { text-align: left; }
.race-out .win { color: var(--c); font-weight: 600; }
@media (max-width: 960px) { .bench { grid-template-columns: 1fr; } }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: rgba(200, 220, 255, .08); }
.chart .axis text, .chart .lab text { fill: var(--ink-3); font: 500 11px var(--fm); }
.chart .val { fill: var(--ink); font: 600 11.5px var(--fm); }
.chart .grp { fill: var(--ink-2); font: 600 12px var(--fb); }
.chart .hit { fill: transparent; cursor: default; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; }
.chart-tip { position: absolute; pointer-events: none; z-index: 3; padding: 8px 10px; border-radius: 10px; background: var(--frost); color: var(--navy); font: 500 12px/1.4 var(--fb); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.chart-tip b { font-family: var(--fm); }
.chart-table { margin-top: 10px; }
.chart-table summary { cursor: pointer; font-size: 12.5px; color: var(--ink-3); }
.chart-table table { margin-top: 8px; width: 100%; border-collapse: collapse; font: 500 12px/1.5 var(--fm); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart-table td, .chart-table th { padding: 5px 6px; border-bottom: 1px solid var(--line-d); text-align: right; }
.chart-table td:first-child, .chart-table th:first-child { text-align: left; }
.pseudo { margin-top: 16px; border-radius: 18px; background: var(--deep); border: 1px solid var(--line-d); }
.pseudo summary { cursor: pointer; padding: 16px 20px; font: 600 14px/1 var(--fb); color: var(--ink-2); }
.pseudo pre { margin: 0; padding: 0 20px 20px; overflow-x: auto; font: 400 13px/1.65 var(--fm); color: var(--ink-2); }

/* results */
.results { padding-block: 110px 120px; border-top: 1px solid var(--line-d); scroll-margin-top: 90px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { padding: 26px 22px; border-radius: 22px; background: var(--deep); border: 1px solid var(--line-d); position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.tile b { display: block; font: 800 clamp(34px, 3.6vw, 50px)/1 var(--fd); letter-spacing: -.03em; color: var(--c); font-variant-numeric: tabular-nums; }
.tile span { display: block; margin-top: 14px; font-size: 15px; color: var(--ink); }
.tile small { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.guard { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.guard h3 { margin: 0 0 10px; font: 700 21px/1.2 var(--fd); }
.guard p { margin: 0; font-size: 15px; color: var(--ink-2); }
.guard code { color: var(--accent-hi); }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } .guard { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero { height: auto; }
  .hero-sticky { position: relative; }
}


/* =================================================== blue glass layer */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); opacity: .42; animation: drift 26s ease-in-out infinite alternate; }
.ambient i:nth-child(1) { left: -12vmax; top: -10vmax; background: #2F6FEB; }
.ambient i:nth-child(2) { right: -14vmax; top: 18vh; background: #7B5CFF; opacity: .32; animation-duration: 32s; animation-delay: -8s; }
.ambient i:nth-child(3) { left: 24vw; bottom: -18vmax; background: #1FB6FF; opacity: .26; animation-duration: 38s; animation-delay: -16s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.12); } 100% { transform: translate(-6vw, 10vh) scale(.94); } }
.view-engine > :not(.ambient) { position: relative; z-index: 1; }
.algo-nav { z-index: 50; }

/* the notch nav in Liquid Glass */
.notchbar {
  background: linear-gradient(180deg, rgba(4, 9, 20, .72), rgba(10, 20, 42, .58));
  backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 -1px 0 rgba(200, 220, 255, .18), inset 1px 0 0 rgba(200, 220, 255, .08), inset -1px 0 0 rgba(200, 220, 255, .08), 0 12px 40px -12px rgba(0, 0, 0, .6);
}
.nb-tabs { background: rgba(200, 220, 255, .09); box-shadow: inset 0 0 0 1px rgba(200, 220, 255, .08); }
.nb-dl, .nb-paw { background: linear-gradient(135deg, #5B97FF, #2F6FEB); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.nb-dl:hover { background: linear-gradient(135deg, #7FB0FF, #3D7BFF); }
.btn-light { background: var(--glass-l); color: var(--navy); box-shadow: inset 0 1px 0 #fff, 0 10px 34px -10px rgba(91, 151, 255, .8); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.btn-ghost { background: rgba(200, 220, 255, .06); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-color: rgba(200, 220, 255, .22); }

/* dark glass panels */
.lab-main, .lab-side > div, .bench > div, .sizer, .pseudo, .tile, .arch-node, .arch-mod, .facts li, .cx li, .cmd, .term, .race-out table {
  background: var(--glass-d);
  border-color: var(--glass-d-edge);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 24px 60px -36px rgba(0, 0, 0, .8);
}
.race-out table { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.lab-side > .legend-states { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.arch-mod { border-left: 3px solid var(--c); }
.cmd.on { background: linear-gradient(160deg, rgba(91, 151, 255, .22), rgba(91, 151, 255, .06)); border-color: var(--glow); }
.term { background: linear-gradient(160deg, rgba(8, 16, 34, .82), rgba(5, 10, 21, .9)); }
.heap-viz, .trie-viz, .qs-viz { background: rgba(3, 8, 18, .55); border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(200, 220, 255, .07); }
.bloom-form input, .trie-bar input, .sizer-row input, .sizer-row select { background: rgba(3, 8, 18, .6); }
.tile::before { box-shadow: 0 0 18px var(--c); }

/* light glass on the ice sections */
.kcard, .install li, .chip, .petb, .seg, .copyline { backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.kcard, .install li, .chip, .petb { background: var(--glass-l); border: 1px solid var(--glass-l-edge); box-shadow: inset 0 1px 0 #fff, 0 18px 40px -26px rgba(14, 27, 52, .45); }
.chip[aria-pressed="true"], .chip.on { background: var(--navy); color: var(--frost); border-color: var(--navy); }
.chip-accent { background: linear-gradient(135deg, #5B97FF, #2F6FEB); color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 26px -12px rgba(47, 111, 235, .8); }
.petb[aria-checked="true"] { border: 2px solid var(--accent); background: #fff; }
.seg { background: rgba(255, 255, 255, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.seg-sm { background: rgba(200, 220, 255, .07); box-shadow: inset 0 0 0 1px rgba(200, 220, 255, .08); }
.copyline { background: rgba(14, 27, 52, .88); }
.kcard kbd { background: rgba(255, 255, 255, .7); }
.cap { background: linear-gradient(180deg, #fff, #E8EEF8); box-shadow: 0 5px 0 #C3D0E6, 0 8px 16px -4px rgba(14, 27, 52, .25), inset 0 1px 0 #fff; }
.cap.down { color: var(--accent); box-shadow: 0 0 0 #C3D0E6, 0 2px 6px -2px rgba(14, 27, 52, .25), inset 0 1px 0 #fff; }

/* section grounds: soft colour behind the glass */
.meet { background: radial-gradient(42% 60% at 88% 70%, rgba(123, 160, 255, .32), transparent 70%), radial-gradient(36% 50% at 8% 95%, rgba(183, 156, 255, .24), transparent 70%), var(--ice); }
.tour { background: radial-gradient(40% 40% at 92% 30%, rgba(111, 195, 255, .3), transparent 70%), radial-gradient(45% 45% at 5% 75%, rgba(123, 92, 255, .16), transparent 70%), var(--ice); }
.custom { background: radial-gradient(45% 55% at 85% 25%, rgba(91, 151, 255, .3), transparent 70%), radial-gradient(40% 50% at 10% 85%, rgba(111, 195, 255, .28), transparent 70%), var(--mist); }
.cli { background: radial-gradient(45% 60% at 85% 40%, rgba(47, 111, 235, .35), transparent 70%), radial-gradient(40% 50% at 5% 90%, rgba(123, 92, 255, .22), transparent 70%), var(--night); }
.keys { background: radial-gradient(40% 50% at 10% 20%, rgba(111, 195, 255, .26), transparent 70%), radial-gradient(40% 55% at 95% 85%, rgba(183, 156, 255, .26), transparent 70%), var(--ice); }
.get { background: #E4ECFA; }
.poster-pill { background: linear-gradient(180deg, #050a16, #0b1730); box-shadow: inset 0 -1px 0 rgba(200, 220, 255, .2), 0 50px 90px -40px rgba(14, 27, 52, .7); }
.poster-pill:hover { box-shadow: inset 0 -1px 0 rgba(200, 220, 255, .25), 0 60px 100px -40px rgba(47, 111, 235, .8); }
.pp-dl { background: linear-gradient(135deg, #5B97FF, #2F6FEB); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.ehero-fade { background: linear-gradient(90deg, rgba(6, 11, 24, .9) 0%, rgba(6, 11, 24, .5) 45%, rgba(6, 11, 24, 0) 75%), linear-gradient(0deg, var(--night) 0%, rgba(6, 11, 24, 0) 35%); }
@media (prefers-reduced-motion: reduce) { .ambient i { animation: none; } }


/* =================================================== three pages (Notes, Clipboard, Activity) */
.pages { background: radial-gradient(45% 50% at 90% 40%, rgba(183, 156, 255, .28), transparent 70%), radial-gradient(40% 45% at 5% 80%, rgba(111, 195, 255, .26), transparent 70%), var(--ice); padding-block: 110px; }
.pages-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.page-list { display: grid; gap: 10px; margin-top: 28px; }
.page-item { display: grid; gap: 4px; text-align: left; padding: 16px 18px; border-radius: 18px; cursor: pointer; border: 1px solid var(--glass-l-edge); background: var(--glass-l); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 #fff, 0 14px 34px -26px rgba(14, 27, 52, .5); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.page-item b { font: 700 18px/1.2 var(--fd); color: var(--navy); }
.page-item span { font-size: 14.5px; color: var(--slate); }
.page-item:hover { transform: translateX(4px); }
.page-item[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(47, 111, 235, .16), 0 18px 40px -24px rgba(47, 111, 235, .6); }
.pages-stage { position: relative; height: 560px; border-radius: 28px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(14, 27, 52, .5); }
.pages-fit { position: absolute; top: 0; left: 50%; width: 640px; margin-left: -320px; transform-origin: top center; }
.pisland { position: relative; width: 640px; height: 520px; background: rgb(var(--ib)); color: #fff; border-radius: 0 0 38px 38px; font-family: var(--fsys); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); overflow: hidden; }
.pisland::before { content: ""; position: absolute; top: 12px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a3550, #07080c 70%); }
.pp { position: absolute; inset: 0; padding: 42px 24px 70px; display: none; flex-direction: column; gap: 12px; }
.pp.on { display: flex; }
.pbar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--island-acc); flex: none; }
.pbar input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: 500 15px/1 var(--fsys); outline: none; }
.pbar-go { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--island-acc); color: #001018; font: 700 16px/1 var(--fsys); cursor: pointer; }
.pbar-meta { padding-right: 8px; font: 500 11px/1 var(--fm); color: rgba(255, 255, 255, .5); white-space: nowrap; }
.note-presets { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.note-presets button { border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .8); padding: 6px 10px; border-radius: 999px; font: 500 12px/1 var(--fsys); cursor: pointer; }
.note-presets button:hover { border-color: var(--island-acc); }
.note-card { flex: none; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); min-height: 128px; }
.nc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nc-cat { padding: 5px 10px; border-radius: 999px; font: 700 12px/1 var(--fsys); color: #001018; }
.nc-conf { font: 500 11.5px/1 var(--fm); color: rgba(255, 255, 255, .55); }
.nc-due { margin-left: auto; font: 600 12px/1 var(--fsys); color: var(--warn); }
.nc-text { margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
.nc-text mark { background: rgba(255, 255, 255, .14); color: inherit; border-radius: 4px; padding: 0 2px; }
.nc-reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; font: 500 11.5px/1.3 var(--fm); color: rgba(255, 255, 255, .6); }
.nc-reasons li { padding: 4px 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); }
.note-list { flex: 1; min-height: 0; overflow: hidden; }
.note-list small, .act-ws small, .act-head small { display: block; font: 700 10px/1 var(--fsys); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin-bottom: 8px; }
.note-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.note-list li { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 11px; background: rgba(255, 255, 255, .05); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-list li i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.note-list li em { margin-left: auto; font-style: normal; font: 600 10.5px/1 var(--fsys); color: rgba(255, 255, 255, .45); }
.clip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; overflow: hidden; flex: 1; align-content: start; }
.clip-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, .06); font: 500 13px/1.3 var(--fm); }
.clip-list li.dim { opacity: .28; }
.clip-list li > span:first-child { font: 600 11px/1 var(--fsys); color: rgba(255, 255, 255, .45); text-align: center; }
.clip-list li code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; font-size: inherit; }
.clip-list li mark { background: var(--island-acc); color: #001018; border-radius: 3px; padding: 0 1px; }
.clip-list li em { font-style: normal; font: 500 11px/1 var(--fsys); color: rgba(255, 255, 255, .4); }
.clip-skip { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .45); flex: none; }
.act-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: none; }
.act-head > div { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.act-head b { font: 700 17px/1.1 var(--fsys); }
.act-bars { position: relative; display: grid; grid-template-columns: repeat(18, 1fr); gap: 4px; align-items: end; height: 120px; padding: 10px 10px 22px; border-radius: 14px; background: rgba(255, 255, 255, .05); flex: none; }
.act-bars i { position: relative; display: block; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--island-acc), rgba(255, 255, 255, .25)); min-height: 3px; transform-origin: bottom; }
.act-bars i.busy { background: linear-gradient(180deg, #fff, var(--island-acc)); box-shadow: 0 0 14px var(--island-acc); }
.act-bars i span { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 5px; font: 500 9px/1 var(--fm); color: rgba(255, 255, 255, .4); }
.act-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; min-height: 0; }
.act-apps { list-style: none; margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); display: grid; gap: 7px; align-content: start; }
.act-apps li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12.5px; }
.act-apps li em { font-style: normal; color: rgba(255, 255, 255, .5); font-variant-numeric: tabular-nums; }
.act-apps li i { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.act-apps li i b { display: block; height: 100%; border-radius: 2px; background: var(--island-acc); }
.act-ws { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.ws { display: grid; gap: 6px; padding: 9px; border-radius: 12px; background: rgba(255, 255, 255, .06); margin-bottom: 8px; }
.ws b { font-size: 13px; }
.ws-icons { display: flex; gap: 5px; align-items: center; }
.ws-icons i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font: 700 10px/1 var(--fsys); color: #fff; }
.ws button { margin-left: auto; border: 0; border-radius: 8px; padding: 5px 9px; background: var(--island-acc); color: #001018; font: 700 11px/1 var(--fsys); cursor: pointer; }
.pswitch { position: absolute; left: 20px; bottom: 16px; display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.pswitch button { width: 38px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .6); cursor: pointer; display: grid; place-items: center; }
.pswitch button.on { background: rgba(255, 255, 255, .16); color: #fff; }
.pswitch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 960px) { .pages-grid { grid-template-columns: 1fr; } .pages-stage { height: 520px; } }

/* =================================================== engine: Aho–Corasick */
.aho-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.aho-inputs label, .seg-controls label { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.aho-inputs input { height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-d); background: rgba(3, 8, 18, .6); color: var(--ink); font: 500 14px/1 var(--fm); }
.aho-inputs input:focus { outline: none; border-color: var(--c); }
.aho-legend { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); }
.aho-legend i { width: 22px; height: 0; border-top: 2px solid rgba(200, 220, 255, .45); margin-left: 6px; }
.aho-legend i.f { border-top: 2px dashed var(--c); }
.aho-strip { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.aho-strip span { width: 30px; height: 34px; border-radius: 8px; display: grid; place-items: center; font: 600 15px/1 var(--fm); background: rgba(200, 220, 255, .06); color: var(--ink-2); position: relative; }
.aho-strip span.cur { background: var(--c); color: #06101F; }
.aho-strip span.done { color: var(--ink-3); }
.aho-strip span.hit { box-shadow: inset 0 -3px 0 var(--c); color: var(--ink); }
.aho-viz { overflow-x: auto; border-radius: 16px; background: rgba(3, 8, 18, .55); box-shadow: inset 0 0 0 1px rgba(200, 220, 255, .07); }
#aho-svg { display: block; min-width: 100%; }
#aho-svg .edge { stroke: rgba(200, 220, 255, .35); stroke-width: 2; fill: none; }
#aho-svg .elab { fill: var(--ink-3); font: 600 11px var(--fm); }
#aho-svg .fail { stroke: var(--c); stroke-width: 1.6; stroke-dasharray: 5 4; fill: none; opacity: .55; }
#aho-svg .fail.hot { opacity: 1; stroke-width: 2.6; }
#aho-svg .node circle { fill: var(--panel); stroke: rgba(200, 220, 255, .3); stroke-width: 1.5; }
#aho-svg .node.end circle.ring { fill: none; stroke: var(--c); stroke-width: 1.5; }
#aho-svg .node text { fill: var(--ink); font: 600 13px var(--fm); }
#aho-svg .node.cur circle:not(.ring) { fill: var(--c); stroke: #fff; }
#aho-svg .node.cur text { fill: #06101F; }
#aho-svg .node.found circle:not(.ring) { stroke: var(--leaf); stroke-width: 3; }
.aho-found { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 500 13px/1.3 var(--fm); }
.aho-found li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 9px; background: rgba(200, 220, 255, .05); }
.aho-found li b { color: var(--c); }
.aho-found li span { color: var(--ink-3); }
.aho-passes { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.aho-passes b { font: 700 28px/1 var(--fd); color: var(--c); display: block; margin-bottom: 4px; }

/* =================================================== engine: suffix array */
.sa-bar { box-shadow: inset 0 0 0 1px rgba(111, 195, 255, .5); }
.sa-bar .spark { color: var(--iris); }
.sa-list { height: 300px; overflow: auto; border-radius: 16px; background: rgba(3, 8, 18, .55); box-shadow: inset 0 0 0 1px rgba(200, 220, 255, .07); padding: 8px; font: 500 12.5px/1 var(--fm); }
.sa-row { display: grid; grid-template-columns: 44px 40px 1fr; gap: 8px; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.sa-row b { color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.sa-row b i { font-style: normal; color: var(--berry); }
.sa-row.probe { background: rgba(242, 181, 68, .18); color: var(--sun); }
.sa-row.hit { background: rgba(111, 195, 255, .16); color: var(--iris); }
.sa-row.hit b { color: var(--ink); }
.sa-row.hit b u { text-decoration: none; background: var(--iris); color: #06101F; border-radius: 3px; }
.sa-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 500 12.5px/1.4 var(--fm); }
.sa-docs li { padding: 8px 10px; border-radius: 9px; background: rgba(200, 220, 255, .05); color: var(--ink-3); overflow-wrap: anywhere; transition: color .3s, background-color .3s; }
.sa-docs li.on { color: var(--ink); background: rgba(111, 195, 255, .12); }
.sa-docs li mark { background: var(--iris); color: #06101F; border-radius: 3px; }

/* =================================================== engine: segment tree */
.seg-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.seg-controls label { grid-template-columns: auto 1fr auto; align-items: center; }
.seg-controls input { accent-color: var(--teal); }
.seg-controls output { font: 600 12.5px/1 var(--fm); color: var(--ink); min-width: 44px; text-align: right; }
.seg-viz { overflow-x: auto; border-radius: 16px; background: rgba(3, 8, 18, .55); box-shadow: inset 0 0 0 1px rgba(200, 220, 255, .07); }
#seg-svg { display: block; width: 100%; min-width: 560px; height: auto; }
#seg-svg .edge { stroke: rgba(200, 220, 255, .12); stroke-width: 1.5; }
#seg-svg .sn rect { fill: var(--panel); stroke: rgba(200, 220, 255, .16); stroke-width: 1.2; transition: fill .25s, stroke .25s; }
#seg-svg .sn text { fill: var(--ink-2); font: 600 11px var(--fm); text-anchor: middle; }
#seg-svg .sn text.mx { fill: var(--ink-3); font-size: 9px; }
#seg-svg .sn.in rect { fill: rgba(69, 214, 192, .12); }
#seg-svg .sn.take rect { fill: var(--teal); stroke: #fff; }
#seg-svg .sn.take text { fill: #06101F; }
#seg-svg .sn.path rect { stroke: var(--sun); stroke-width: 2.4; }
#seg-svg .bar { fill: rgba(69, 214, 192, .35); }
#seg-svg .bar.in { fill: var(--teal); }
#seg-svg .tick { fill: var(--ink-3); font: 500 9.5px var(--fm); text-anchor: middle; }
.seg-stat b { display: block; font: 700 34px/1 var(--fd); color: var(--c); font-variant-numeric: tabular-nums; }
.seg-stat span { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* =================================================== engine: union–find */
.dsu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.dsu-viz { border-radius: 16px; background: rgba(3, 8, 18, .55); box-shadow: inset 0 0 0 1px rgba(200, 220, 255, .07); }
#dsu-svg { display: block; width: 100%; height: auto; }
#dsu-svg .ptr { stroke: var(--c); stroke-width: 2; fill: none; }
#dsu-svg .app circle { fill: var(--panel); stroke: rgba(200, 220, 255, .3); stroke-width: 1.5; }
#dsu-svg .app.root circle { stroke: var(--c); stroke-width: 3; }
#dsu-svg .app.hot circle { fill: var(--c); }
#dsu-svg .app.hot text { fill: #06101F; }
#dsu-svg .app text { fill: var(--ink); font: 600 11px var(--fb); text-anchor: middle; }
#dsu-svg .app text.ab { font: 700 13px var(--fd); }
.dsu-pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; align-content: start; font: 500 12px/1.3 var(--fm); max-height: 340px; overflow: auto; }
.dsu-pairs li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 10px; border-radius: 9px; background: rgba(200, 220, 255, .04); color: var(--ink-3); border: 1px solid transparent; }
.dsu-pairs li b { color: var(--ink-2); font-weight: 600; }
.dsu-pairs li em { font-style: normal; }
.dsu-pairs li.cur { border-color: var(--c); color: var(--ink-2); }
.dsu-pairs li.yes em { color: var(--leaf); }
.dsu-pairs li.no em { color: var(--berry); }
.dsu-ws { display: grid; gap: 8px; }
.dsu-ws div { padding: 10px; border-radius: 11px; background: rgba(184, 227, 90, .08); border: 1px solid rgba(184, 227, 90, .25); font-size: 13.5px; }
.dsu-ws div b { display: block; font: 700 12px/1 var(--fb); letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: 6px; }
.dsu-ws p { margin: 0; color: var(--ink-3); font-size: 13px; }
.dsu-arr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; font: 500 11px/1.3 var(--fm); }
.dsu-arr span { padding: 6px; border-radius: 7px; background: rgba(200, 220, 255, .05); color: var(--ink-3); text-align: center; }
.dsu-arr span b { display: block; color: var(--ink); }
@media (max-width: 760px) { .dsu-grid, .aho-inputs, .seg-controls { grid-template-columns: 1fr; } }
