/* DBZuper landing - dark cosmic, brand teal + ball orange */

:root {
  --ink: #05080a;
  --ink-2: #0a1013;
  --surface: rgba(14, 22, 26, 0.72);
  --surface-solid: #0e161a;
  --line: rgba(148, 201, 196, 0.12);
  --line-strong: rgba(148, 201, 196, 0.24);
  --text: #e6f0ef;
  --text-dim: #93a6a5;
  --text-mute: #5f7372;
  --teal: #2dd4bf;
  --teal-deep: #0d9488;
  --orange: #f59e0b;
  --danger: #f87171;
  --c-commerce: #f59e0b;
  --c-catalog: #60a5fa;
  --c-customers: #34d399;
  --c-inventory: #a78bfa;
  --c-marketing: #f472b6;
  --c-support: #2dd4bf;

  --sans: "Geist", ui-sans-serif, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;

  --radius: 16px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { color: var(--teal); }
kbd {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  background: rgba(255,255,255,0.03); color: var(--text); font-size: 0.8em;
}
em { font-style: normal; font-weight: 300; color: var(--teal); }
::selection { background: rgba(45, 212, 191, 0.3); }
.mono { font-family: var(--mono); }
.muted { color: var(--text-mute); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--teal); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* ---------- Background layers ---------- */
#universe {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0;
  transition: opacity 0.6s linear;
}
#labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.lbl {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity;
  font-family: var(--mono); font-size: 11px; color: var(--text-dim);
  transform-origin: 0 50%;
}
.lbl--cluster {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--c); text-shadow: 0 0 18px var(--c);
}
.lbl--table::before { content: ""; display: inline-block; width: 0; }
.colcard {
  position: absolute; left: 0; top: 0; width: 280px; will-change: transform, opacity;
  background: rgba(8, 14, 17, 0.88); border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: 12px;
  box-shadow: 0 20px 60px -20px rgba(245, 158, 11, 0.35), 0 0 0 6px rgba(245, 158, 11, 0.06);
  backdrop-filter: blur(8px);
}
.colcard__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.colcard__head b { font-size: 14px; color: var(--text); }
.colcard__row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 3px 0; color: var(--text-dim); }
.colcard__row .t { color: var(--text-mute); }
.key { font-size: 10px; padding: 0 5px; border-radius: 4px; }
.key--pk { background: rgba(245, 158, 11, 0.16); color: var(--orange); }
.key--fk { background: rgba(45, 212, 191, 0.14); color: var(--teal); }
.key--none { visibility: hidden; }

#node-tip {
  position: fixed; z-index: 30; pointer-events: none; left: 0; top: 0;
  background: rgba(8, 14, 17, 0.92); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 12px; font-family: var(--mono); font-size: 12px; line-height: 1.5;
  box-shadow: 0 12px 40px -12px rgba(0,0,0,0.8); backdrop-filter: blur(8px);
}
#node-tip b { font-size: 13px; color: var(--text); }
#node-tip .over { color: var(--orange); font-weight: 600; display: block; margin-top: 2px; }

.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: 0.05;
  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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(5, 8, 10, 0.72); backdrop-filter: blur(14px) saturate(1.3); border-color: var(--line); }
.nav__brand img { height: 30px; width: auto; }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.nav__links a { text-decoration: none; color: var(--text-dim); transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; gap: 10px; }
@media (max-width: 900px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }
@media (max-width: 520px) { .nav__cta .btn--ghost { display: none; } }

/* ---------- Buttons & chips ---------- */
.btn i { font-size: 1.05em; }
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; gap: 10px; height: var(--h); padding: 0 20px;
  border-radius: 999px; font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; color: var(--text); background: none;
  transition: transform 0.2s var(--ease-out), background 0.2s, border-color 0.2s, box-shadow 0.3s, opacity 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn--sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn--xs { --h: 30px; padding: 0 12px; font-size: 12.5px; }
.btn--primary { background: var(--teal); color: #032220; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 10px 24px -14px rgba(45,212,191,0.55); }
.btn--primary:hover { background: #5eead4; }
.btn--ghost { border-color: var(--line-strong); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: rgba(45,212,191,0.5); background: rgba(45,212,191,0.06); }
.btn--danger { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.4); color: #fecaca; --h: 38px; font-size: 14px; }
.btn--danger:hover:not(:disabled) { background: rgba(248,113,113,0.22); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.copy-inline code { color: var(--text-dim); font-size: 13px; }
.copy-inline__state { display: inline-block; min-width: 4.6em; text-align: left; font-size: 12px; color: var(--teal); font-family: var(--mono); }

.chip {
  font: 500 13px/1 var(--mono); padding: 9px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.02); color: var(--text-dim);
  transition: all 0.2s;
}
.chip:hover, .chip.is-on { color: var(--text); border-color: var(--teal); background: rgba(45,212,191,0.08); }
.chip--sm { padding: 6px 10px; font-size: 12px; }

/* ---------- Chapter zone ---------- */
main { position: relative; z-index: 3; }
.zone { position: relative; }
.chapter {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--gutter) 80px; max-width: 640px; pointer-events: none;
}
.chapter > * { pointer-events: auto; }
.chapter--right { margin-left: auto; }
.chapter--side { min-height: 115vh; }
.chapter--side h2, .section__head h2, .finale h2 {
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; margin: 12px 0 18px;
}
.chapter--side p { color: var(--text-dim); font-size: 18px; max-width: 34em; }
.chapter--side {
  /* soft vignette so copy stays readable over the 3D scene */
  background: radial-gradient(ellipse 70% 45% at 30% 50%, rgba(5,8,10,0.78), transparent 75%);
}
.chapter--right { background: radial-gradient(ellipse 70% 45% at 70% 50%, rgba(5,8,10,0.78), transparent 75%); }

.eyebrow {
  display: inline-flex; align-items: center; align-self: flex-start;
  font: 500 12.5px/1 var(--mono); color: var(--text-dim); padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(5,8,10,0.5); backdrop-filter: blur(6px);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); display: inline-block; flex: none; }

.hero__title {
  font-size: clamp(52px, 8.4vw, 118px); line-height: 0.94; letter-spacing: -0.05em; font-weight: 650;
  margin: 26px 0 26px;
}
.hero__title .line { display: block; white-space: nowrap; }
@media (max-width: 520px) { .hero__title .line { white-space: normal; } }
.hero__title em { font-weight: 250; letter-spacing: -0.045em; }
.hero__lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--text-dim); max-width: 31em; margin: 0 0 34px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__actions.center { justify-content: center; }
.chapter--hero { position: relative; max-width: min(980px, 100%); }

.reveal-load { opacity: 0; transform: translateY(18px); filter: blur(6px); animation: rise 1s var(--ease-out) forwards; animation-delay: calc(0.25s + var(--d) * 0.11s); }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; color: var(--text-dim); font-size: 15.5px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--teal); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 6px var(--teal); }
.kicker { font: 500 12.5px/1.4 var(--mono); color: var(--teal); text-transform: uppercase; letter-spacing: 0.14em; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge-new { color: var(--orange); border: 1px solid rgba(245,158,11,0.45); background: rgba(245,158,11,0.08); padding: 3px 8px; border-radius: 999px; letter-spacing: 0.06em; }
.link-arrow { margin-top: 18px; color: var(--teal); text-decoration: none; font-weight: 500; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(90px, 13vw, 170px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.section__head p { color: var(--text-dim); font-size: 18px; max-width: 36em; }
.section__head.center { text-align: center; margin: 0 auto 56px; }
.section__head.center p { margin-left: auto; margin-right: auto; }
.section__head.center .kicker { justify-content: center; }
.section__head.narrow { max-width: 820px; }
.caption { text-align: center; color: var(--text-mute); font-size: 14px; margin-top: 18px; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2); overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.04);
}
.panel__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); padding: 5px 10px; border-radius: 999px; background: rgba(45,212,191,0.08); color: var(--text); border: 1px solid rgba(45,212,191,0.25); }
.pill .dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); width: 6px; height: 6px; }

/* product shot */
.product { max-width: 1400px; }
.product__stage { position: relative; }
.product__stage img {
  border-radius: var(--radius); border: 1px solid var(--line-strong); width: 100%; height: auto;
  box-shadow: 0 60px 120px -60px rgba(45, 212, 191, 0.3), 0 30px 80px -30px rgba(0,0,0,0.9);
}
.product__glow { position: absolute; inset: 10% 15%; background: radial-gradient(closest-side, rgba(45,212,191,0.25), transparent); filter: blur(60px); z-index: -1; }

/* ---------- Path finder ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.hint { font-size: 15px !important; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hint__dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hint__dot--from { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.hint__dot--to { background: var(--orange); box-shadow: 0 0 10px var(--orange); margin-left: 6px; }
.pf-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pf { display: grid; gap: 14px; }
#pf-svg { display: block; width: 100%; height: auto; }
#pf-svg .edge { stroke: rgba(148, 201, 196, 0.22); stroke-width: 1.4; fill: none; transition: stroke 0.3s, opacity 0.3s; }
#pf-svg .edge.inferred { stroke-dasharray: 5 5; }
#pf-svg.has-path .edge { opacity: 0.35; }
#pf-svg .edge-hot { fill: none; stroke: url(#pf-grad); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(45,212,191,0.7)); }
#pf-svg .edge-hot.inferred { stroke-dasharray: 7 6; }
#pf-svg .node { cursor: pointer; }
#pf-svg .node rect { fill: rgba(14, 22, 26, 0.95); stroke: var(--line-strong); stroke-width: 1; transition: stroke 0.25s, fill 0.25s; }
#pf-svg .node text { font: 500 13px var(--mono); fill: var(--text-dim); transition: fill 0.25s; pointer-events: none; }
#pf-svg .node circle { transition: r 0.3s; }
#pf-svg .node:hover rect { stroke: var(--teal); }
#pf-svg .node.on-path rect { stroke: rgba(45,212,191,0.7); fill: rgba(45,212,191,0.08); }
#pf-svg .node.on-path text { fill: var(--text); }
#pf-svg .node.is-from rect { stroke: var(--teal); stroke-width: 2; fill: rgba(45,212,191,0.16); }
#pf-svg .node.is-to rect { stroke: var(--orange); stroke-width: 2; fill: rgba(245,158,11,0.14); }
#pf-svg .node.is-from text, #pf-svg .node.is-to text { fill: #fff; }
#pf-svg .node:focus { outline: none; }
#pf-svg .node:focus-visible rect { stroke: var(--teal); stroke-width: 2.5; }

.code { margin: 0; padding: 16px 18px; font: 13.5px/1.75 var(--mono); color: var(--text); overflow: auto; white-space: pre; }
#pf-code { height: 236px; }
.code .k { color: #7dd3fc; }
.code .t { color: var(--teal); }
.code .c { color: var(--text-mute); font-style: italic; }
.code .n { color: var(--orange); }
.code .s { color: #fcd34d; }

/* ---------- Record explorer ---------- */
.rx { position: relative; }
.rx__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rx__url { font-size: 12.5px; padding: 7px 12px; border-radius: 8px; background: rgba(0,0,0,0.35); border: 1px solid var(--line); min-width: 0; flex: 1; overflow-x: auto; white-space: nowrap; }
.rx__url #rx-url { color: var(--teal); }
.rx__actions { display: flex; gap: 8px; }
.rx__canvas {
  position: relative; overflow-x: hidden; overflow-y: auto; height: 520px; padding: 28px; overscroll-behavior: contain;
  transition: -webkit-mask-image 0.3s, mask-image 0.3s;
  background-image: radial-gradient(rgba(148,201,196,0.09) 1px, transparent 1px); background-size: 22px 22px;
}
.rx__wires { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.rx__wires path { fill: none; stroke: rgba(45, 212, 191, 0.55); stroke-width: 1.5; }
.rx__wires path.inferred { stroke-dasharray: 5 5; stroke: rgba(45,212,191,0.4); }
.rx__wires path.trail { stroke: var(--orange); stroke-width: 2.2; filter: drop-shadow(0 0 5px rgba(245,158,11,0.6)); }
.rx__cols { display: flex; gap: 80px; align-items: flex-start; position: relative; min-width: max-content; }
.rx__col { display: flex; flex-direction: column; gap: 14px; }
.rcard {
  width: 248px; border-radius: 12px; background: rgba(10, 16, 19, 0.96); border: 1px solid var(--line-strong);
  font-size: 12.5px; animation: pop 0.5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms);
  transition: border-color 0.2s, box-shadow 0.3s;
}
.rcard.is-sel { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(245,158,11,0.12); }
@keyframes pop { from { opacity: 0; transform: translateX(-16px) scale(0.96); } }
.rcard__head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rcard__title { font-weight: 600; font-size: 13.5px; }
.rcard__tbl { font: 11px var(--mono); color: var(--rc, var(--teal)); }
.rcard__fields { padding: 8px 12px; display: grid; gap: 2px; font-family: var(--mono); font-size: 11.5px; }
.rcard__fields div { display: flex; justify-content: space-between; gap: 10px; }
.rcard__fields span:first-child { color: var(--text-mute); }
.rcard__fields span:last-child { color: var(--text-dim); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard__ports { border-top: 1px solid var(--line); padding: 6px; display: grid; gap: 4px; }
.port {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 6px 8px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--text-dim);
  font: 12px var(--mono); cursor: pointer; text-align: left; position: relative; transition: all 0.18s;
}
.port:hover:not(:disabled) { background: rgba(45,212,191,0.08); color: var(--text); border-color: rgba(45,212,191,0.25); }
.port.is-open { color: var(--text); background: rgba(45,212,191,0.12); border-color: rgba(45,212,191,0.4); }
.port.inferred { border-style: dashed; border-color: var(--line-strong); }
.port__kind { font-size: 10px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.06em; }
.port__n { font-size: 11px; color: var(--teal); }
.port::after { content: ""; position: absolute; right: -13px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--ink); border: 1.5px solid var(--teal); }
.port.is-open::after { background: var(--teal); }
.more { font: 12px var(--mono); color: var(--text-mute); padding: 8px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; width: 248px; }
/* the query drawer slides up over the bottom of the explorer: no reserved space, no layout jump */
.rx__out {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: rgba(7, 12, 14, 0.97); border-top: 1px solid rgba(45,212,191,0.35);
  box-shadow: 0 -20px 40px -20px rgba(0,0,0,0.8); backdrop-filter: blur(10px);
  transform: translateY(105%); transition: transform 0.45s var(--ease-out);
}
.rx__out.is-on { transform: none; }
.rx__outbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 0 18px; font-size: 12.5px; }
.rx__outbar .btn--xs { width: 30px; padding: 0; justify-content: center; }
.rx__out .code { height: 214px; padding-top: 10px; }

/* ---------- Data explorer ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.data-head { margin-bottom: 40px; max-width: 760px; }
.dx__bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dx__title { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.dx__title i { color: var(--teal); font-size: 18px; }
.tag { font-size: 11px; color: var(--text-mute); border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 6px; }
.dx__tabs { display: flex; gap: 2px; font-size: 12.5px; padding: 3px; border-radius: 8px; border: 1px solid var(--line); }
.dx__tabs span { padding: 4px 10px; border-radius: 6px; color: var(--text-mute); }
.dx__tabs .is-on { background: rgba(255,255,255,0.05); color: var(--text); }
.dx__sqlbtn { margin-left: auto; }
.dx__sqlbtn[aria-expanded="true"] { border-color: rgba(45,212,191,0.5); color: var(--teal); }
.dx__filter { display: flex; gap: 8px; padding: 12px 16px 0; flex-wrap: wrap; align-items: center; }
.dx__filter select, .dx__filter input {
  height: 32px; border-radius: 8px; border: 1px solid var(--line-strong); background: rgba(0,0,0,0.35);
  color: var(--text); font-size: 12.5px; padding: 0 10px;
}
.dx__filter select { padding-right: 6px; cursor: pointer; }
.dx__filter input { width: 150px; }
.dx__filter input::placeholder { color: var(--text-mute); }
.dx__filter select:focus, .dx__filter input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,212,191,0.15); }
.dx__err { font-size: 12px; color: var(--danger); }
.dx__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 12px; min-height: 52px; align-content: flex-start; }
.dx__chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 999px;
  font: 12px var(--mono); background: rgba(45,212,191,0.08); border: 1px solid rgba(45,212,191,0.3); color: var(--text);
  animation: acin 0.2s var(--ease-out);
}
.dx__chip .op { color: var(--teal); }
.dx__chip button { width: 18px; height: 18px; border-radius: 50%; border: 0; background: none; color: var(--text-dim); cursor: pointer; display: grid; place-items: center; }
.dx__chip button:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.dx__hint { font: 12px var(--mono); color: var(--text-mute); line-height: 28px; }
.dx__scroll { overflow-x: auto; border-top: 1px solid var(--line); }
.dx__table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.dx__table th { text-align: left; font-weight: 500; color: var(--text-dim); padding: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.dx__table th button {
  all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  cursor: pointer; white-space: nowrap;
}
.dx__table th button:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.dx__table th button:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.dx__table th .ti { color: var(--text-mute); font-size: 14px; }
.dx__table th .sort { margin-left: auto; color: var(--teal); font-size: 12px; opacity: 0; }
.dx__table th[aria-sort] .sort { opacity: 1; }
.dx__table th.num button { justify-content: flex-end; }
.dx__table th.num .sort { margin-left: 0; }
.dx__table td { padding: 0 14px; height: 40px; border-bottom: 1px solid rgba(148,201,196,0.06); color: var(--text-dim); white-space: nowrap; }
.dx__table td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.dx__table tbody tr { animation: rowin 0.3s var(--ease-out) backwards; animation-delay: calc(var(--i) * 25ms); }
.dx__table tbody tr:hover td { background: rgba(255,255,255,0.025); }
@keyframes rowin { from { opacity: 0; transform: translateY(4px); } }
.dx__table tbody { height: calc(40px * 8); }
.fk, .fk-sample { color: var(--teal); text-decoration: underline; text-decoration-color: rgba(45,212,191,0.35); text-underline-offset: 3px; }
.fk { all: unset; cursor: pointer; color: var(--teal); text-decoration: underline; text-decoration-color: rgba(45,212,191,0.35); text-underline-offset: 3px; font-variant-numeric: tabular-nums; }
.fk:hover { text-decoration-color: var(--teal); }
.fk:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }
.dx__empty td { height: calc(40px * 8); text-align: center; color: var(--text-mute); white-space: normal; }
.dx__empty i { display: block; font-size: 26px; margin-bottom: 8px; color: var(--text-mute); }
.dx__filler td { border-bottom-color: transparent; }
.dx__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 12.5px; color: var(--text-mute); }
.dx__pager { display: flex; align-items: center; gap: 8px; }
.dx__pager .btn--xs { width: 30px; padding: 0; justify-content: center; }
.dx__sql { border-top: 1px solid var(--line); background: rgba(0,0,0,0.3); height: 204px; }
.dx__sql[hidden] { display: none; }

/* ---------- SQL ---------- */
.sql-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 980px) { .sql-grid { grid-template-columns: 1fr; } }
.editor { display: flex; flex-direction: column; }
.editor__btns { display: flex; gap: 6px; }
.ebtn { font: 500 12px var(--mono); padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line-strong); color: var(--text-dim); }
.ebtn--run { background: var(--teal); color: #032220; border-color: var(--teal); }
.editor__body { position: relative; display: flex; padding: 14px 0; height: 128px; overflow: hidden; background: rgba(0,0,0,0.22); }
.editor__body--short { height: 52px; }
.editor__gutter { list-style: none; margin: 0; padding: 0 14px 0 16px; color: var(--text-mute); font-size: 13.5px; line-height: 1.75; text-align: right; user-select: none; }
.editor__code { margin: 0; font-size: 13.5px; line-height: 1.75; white-space: pre; overflow: hidden; flex: 1; padding-right: 16px; color: var(--text); }
.editor__code .k { color: #7dd3fc; }
.editor__code .t { color: var(--teal); }
.editor__code .s { color: #fcd34d; }
.cursor { display: inline-block; width: 2px; height: 1.15em; background: var(--teal); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ac-pop {
  position: absolute; left: 112px; top: 92px; z-index: 2; min-width: 360px; max-width: calc(100% - 120px);
  background: #0c1417; border: 1px solid var(--line-strong); border-radius: 9px; padding: 4px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.9); font: 12.5px var(--mono);
  transform-origin: top left; animation: acin 0.18s var(--ease-out);
}
@keyframes acin { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--text-dim); white-space: nowrap; }
.ac-item.is-active { background: rgba(45,212,191,0.12); color: var(--text); }
.ac-item b { color: var(--teal); font-weight: 600; }
.ac-ico { width: 18px; text-align: center; color: var(--text-mute); font-size: 15px; }
.ac-ico--fk { color: var(--orange); }
.ac-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ac-tag { font-size: 11px; color: var(--text-mute); }
@media (max-width: 600px) { .ac-pop { left: 16px; min-width: 0; max-width: calc(100% - 32px); } .ac-tag { display: none; } }
.editor__results { border-top: 1px solid var(--line); opacity: 0.25; transition: opacity 0.5s; }
.editor__results.is-on { opacity: 1; }
.res-head { display: flex; justify-content: space-between; padding: 8px 14px; font-size: 12px; }
.res { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.res th, .res td { text-align: left; padding: 7px 14px; border-top: 1px solid var(--line); }
.res th { color: var(--text-mute); font-weight: 500; }
.res td:last-child, .res th:last-child { text-align: right; }
.st { padding: 2px 7px; border-radius: 999px; font-size: 11px; }
.st--ok { background: rgba(52,211,153,0.12); color: #6ee7b7; }
.st--ship { background: rgba(96,165,250,0.12); color: #93c5fd; }
.st--paid { background: rgba(245,158,11,0.12); color: #fcd34d; }
.st--pend { background: rgba(148,163,184,0.12); color: #cbd5e1; }
.st--ref { background: rgba(248,113,113,0.12); color: #fca5a5; }
.editor__foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); margin-top: auto; }
.editor__foot h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.02em; }
.editor__foot p { margin: 0; color: var(--text-dim); font-size: 15px; }

.safety__stmts { display: flex; gap: 6px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-dim); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__track { width: 32px; height: 18px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--line-strong); position: relative; transition: background 0.2s; }
.toggle__track span { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-dim); transition: transform 0.25s var(--ease-out), background 0.2s; }
.toggle input:checked + .toggle__track { background: rgba(45,212,191,0.25); border-color: var(--teal); }
.toggle input:checked + .toggle__track span { transform: translateX(14px); background: var(--teal); }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--teal); outline-offset: 2px; }
.safety__zone { padding: 18px 20px; display: grid; gap: 14px; height: 268px; align-content: start; overflow: hidden; }
.safety__zone > .btn { justify-self: start; }
.confirm { border: 1px solid rgba(248,113,113,0.35); background: rgba(248,113,113,0.06); border-radius: 12px; padding: 14px 16px; animation: acin 0.25s var(--ease-out); }
.confirm__title { margin: 0 0 10px; font-weight: 600; font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.warn { flex: none; color: var(--danger); font-size: 20px; line-height: 1; }
.confirm__label { font-size: 14px; color: var(--text-dim); display: block; margin-bottom: 8px; }
.confirm__row { display: flex; gap: 8px; flex-wrap: wrap; }
.confirm__row input {
  flex: 1; min-width: 140px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: rgba(0,0,0,0.4); color: var(--text); font-size: 14px;
}
.confirm__row input:focus { outline: none; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248,113,113,0.15); }
.confirm.is-shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.safety__msg { font-size: 13px; line-height: 1.6; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0,0,0,0.3); animation: acin 0.25s var(--ease-out); }
.safety__msg.is-err { border-color: rgba(248,113,113,0.4); color: #fecaca; }
.safety__msg.is-ok { border-color: rgba(45,212,191,0.4); color: #ccfbf1; }

/* ---------- Versus ---------- */
.vs { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(10,16,19,0.6); backdrop-filter: blur(10px); }
.vs__row { display: grid; grid-template-columns: 1fr 1fr 1.15fr; border-top: 1px solid var(--line); transition: background 0.25s; }
.vs__row:first-child { border-top: 0; }
.vs__row > span { padding: 18px 22px; font-size: 15.5px; }
.vs__row > span:nth-child(1) { color: var(--text); font-weight: 500; }
.vs__row > span:nth-child(2) { color: var(--text-mute); text-decoration: line-through; text-decoration-color: rgba(248,113,113,0.45); text-decoration-thickness: 1px; }
.vs__row > span:nth-child(3) { color: var(--text); background: linear-gradient(90deg, rgba(45,212,191,0.07), rgba(45,212,191,0.02)); border-left: 1px solid rgba(45,212,191,0.2); }
.vs__row:not(.vs__row--head):hover { background: rgba(255,255,255,0.02); }
.vs__row--head > span { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mute) !important; text-decoration: none !important; padding-top: 16px; padding-bottom: 16px; }
.vs__us { display: flex; align-items: center; gap: 8px; color: var(--teal) !important; }
@media (max-width: 760px) {
  .vs__row { grid-template-columns: 1fr; }
  .vs__row--head { display: none; }
  .vs__row > span { padding: 6px 18px; }
  .vs__row > span:nth-child(1) { padding-top: 18px; }
  .vs__row > span:nth-child(3) { padding-bottom: 18px; padding-top: 10px; background: none; border-left: 0; }
}

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 40px; }
.cell {
  grid-column: span 4; border-radius: var(--radius); border: 1px solid var(--line); padding: 26px;
  background: linear-gradient(180deg, rgba(16,26,30,0.75), rgba(8,13,15,0.75)); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 280px; position: relative; overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease-out);
}
.cell:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.cell h3 { margin: 18px 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.cell p { margin: 0; color: var(--text-dim); font-size: 15px; }
.cell--palette { grid-column: span 5; order: 1; }
.cell--history { grid-column: span 4; order: 2; }
.cell--self { grid-column: span 3; order: 3; }
.cell--server { order: 4; } .cell--engines { order: 5; } .cell--themes { order: 6; }
@media (max-width: 980px) { .bento { grid-template-columns: repeat(2, 1fr); } .cell, .cell--palette, .cell--history, .cell--self { grid-column: span 1; } .cell--palette { grid-column: 1 / -1; } }
@media (max-width: 620px) { .cell--palette { grid-column: auto; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } }

.palette { border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(0,0,0,0.4); font-size: 13px; margin-bottom: auto; }
.palette__input { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; min-height: 46px; }
.caret { width: 2px; height: 16px; background: var(--teal); animation: blink 1s steps(1) infinite; }
.palette__list { list-style: none; margin: 0; padding: 6px; height: 112px; overflow: hidden; }
.palette__list li { padding: 6px 10px; border-radius: 7px; color: var(--text-dim); display: flex; justify-content: space-between; animation: acin 0.2s var(--ease-out) backwards; }
.palette__list li:first-child { background: rgba(45,212,191,0.1); color: var(--text); }
.palette__list li span:last-child { color: var(--text-mute); font-size: 11px; }
.dblist { list-style: none; margin: 0 0 auto; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.dblist li i { color: var(--teal); font-size: 15px; }
.dblist li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(0,0,0,0.25); }
.dblist li:first-child { border-color: rgba(45,212,191,0.4); }
.engines { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: auto; }
.engines span { font: 500 14px var(--mono); padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0,0,0,0.25); }
.engines span:nth-child(1) { color: #7dd3fc; } .engines span:nth-child(2) { color: #fcd34d; } .engines span:nth-child(3) { color: #a5b4fc; } .engines span:nth-child(4) { color: #6ee7b7; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: auto; }
.sw { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line-strong); cursor: pointer; padding: 8px; display: grid; grid-template-rows: 1fr 1fr 1fr; gap: 4px; background: var(--bg); transition: transform 0.2s var(--ease-out), border-color 0.2s; }
.sw i { border-radius: 4px; background: var(--a); }
.sw i:nth-child(2) { background: var(--b); width: 70%; }
.sw i:nth-child(3) { background: var(--c); width: 45%; }
.sw.is-on { border-color: var(--teal); transform: scale(1.06); box-shadow: 0 0 0 3px rgba(45,212,191,0.15); }
.sw[data-theme="classic"] { --bg: #0b1114; --a: #1c2a30; --b: #2dd4bf; --c: #f59e0b; }
.sw[data-theme="layered"] { --bg: #121a1f; --a: #26343b; --b: #5eead4; --c: #94a3b8; }
.sw[data-theme="graphite"] { --bg: #141414; --a: #2a2a2a; --b: #d4d4d4; --c: #737373; }
.sw[data-theme="radar"] { --bg: #04110c; --a: #0b2a1e; --b: #34d399; --c: #f59e0b; }
.cell--themes { transition: background 0.5s; }
.hist { margin: 0 0 auto; font-size: 12.5px; line-height: 1.9; color: var(--text-dim); white-space: pre-wrap; }
.redact { color: var(--orange); background: rgba(245,158,11,0.12); border-radius: 4px; padding: 0 4px; }
.lock { color: var(--teal); font-size: 38px; margin-bottom: auto; width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; border: 1px solid rgba(45,212,191,0.3); background: radial-gradient(circle at 50% 30%, rgba(45,212,191,0.18), transparent 70%); }

/* ---------- Power level ---------- */
.power__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
@media (max-width: 900px) { .power__inner { grid-template-columns: 1fr; } }
.power h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.035em; margin: 12px 0 18px; }
.power p { color: var(--text-dim); font-size: 18px; }
.pins { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.pin {
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; border: 1.5px dashed var(--line-strong);
  background: rgba(255,255,255,0.02); color: var(--text-mute); font: 600 13px var(--mono);
  transition: all 0.35s var(--ease-out); position: relative;
}
.pin:hover { border-color: var(--orange); color: var(--orange); }
.pin.is-on {
  border: 0; color: #4a2a00;
  background: radial-gradient(circle at 35% 30%, #fff3c4 0%, #fbbf24 30%, #f59e0b 60%, #b45309 100%);
  box-shadow: 0 0 24px rgba(245,158,11,0.6), inset -4px -6px 10px rgba(120,53,15,0.5);
  transform: scale(1.08);
}
.pin.is-on::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; color: #c2410c; font-size: 14px; }
.pin.is-on span { opacity: 0; }
.pins__msg { min-height: 3.4em; font-size: 13px; color: var(--text-mute) !important; margin-top: 14px; }
.pins__msg.is-wish { color: var(--orange) !important; }
.scouter { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin: 0 auto; display: grid; place-content: center; text-align: center; }
.scouter__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(45,212,191,0.25);
  background:
    radial-gradient(circle, transparent 54%, rgba(45,212,191,0.06) 55%, transparent 56%),
    radial-gradient(circle, transparent 74%, rgba(45,212,191,0.08) 75%, transparent 76%),
    conic-gradient(from 0deg, rgba(45,212,191,0.0), rgba(45,212,191,0.22) 12%, transparent 13%);
  animation: spin 5s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scouter p { margin: 0; position: relative; }
.scouter__label { font-size: 12px; color: var(--text-mute) !important; text-transform: uppercase; letter-spacing: 0.12em; }
.scouter .scouter__num { font: 600 clamp(48px, 7vw, 92px)/1 var(--mono); letter-spacing: -0.04em; color: var(--text) !important; margin: 12px 0 !important; font-variant-numeric: tabular-nums; }
.scouter__quip { font-weight: 500; font-size: clamp(22px, 2.4vw, 30px) !important; color: var(--orange) !important; opacity: 0; transform: scale(0.6); transition: all 0.6s var(--ease-out); }
.scouter.is-over .scouter__quip { opacity: 1; transform: none; }
.scouter.is-over .scouter__num { color: var(--orange) !important; text-shadow: 0 0 30px rgba(245,158,11,0.5); }

/* ---------- Install ---------- */
.split--install { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.2fr); }
@media (max-width: 980px) { .split--install { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; position: relative; padding-left: 50px; color: var(--text-dim); font-size: 16.5px; }
.steps li b { color: var(--text); font-weight: 600; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--mono); color: var(--orange); border: 1px solid rgba(245,158,11,0.45); background: rgba(245,158,11,0.08); }
.term { background: rgba(5, 9, 11, 0.9); }
.term__bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #23302f; }
.term__tabs { display: flex; gap: 4px; margin-right: auto; }
.term__tabs button { font: 500 12.5px var(--mono); padding: 6px 12px; border-radius: 7px; background: none; border: 1px solid transparent; color: var(--text-mute); cursor: pointer; }
.term__tabs button.is-on { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,0.03); }
.term__body { margin: 0; padding: 22px 22px 26px; font-size: 13.5px; line-height: 1.8; overflow-x: auto; color: var(--text); min-height: 300px; }
.term__body .pr { color: var(--teal); user-select: none; }
.term__body .cm { color: var(--text-mute); }
.term__body .out { color: var(--text-dim); }
.term__body .hl { color: var(--orange); }

/* ---------- Finale & footer ---------- */
.finale { position: relative; text-align: center; padding: clamp(100px, 14vw, 180px) var(--gutter); overflow: hidden; }
.finale::before { content: ""; position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; margin: -450px; border-radius: 50%; background: radial-gradient(closest-side, rgba(13,148,136,0.22), transparent); z-index: -1; }
.finale__mark { margin: 0 auto 26px; filter: drop-shadow(0 0 30px rgba(45,212,191,0.4)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(6deg); } }
.finale h2 { font-size: clamp(40px, 6.6vw, 92px); margin-bottom: 36px; }
.finale__psst { margin-top: 48px; color: var(--text-mute); font-size: 13px; }

.foot { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; padding: 32px var(--gutter) 40px; border-top: 1px solid var(--line); color: var(--text-mute); font-size: 13.5px; background: var(--ink); }
.foot img { height: 26px; width: auto; }
.foot p { margin: 0; flex: 1; min-width: 240px; }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; color: var(--text-dim); }
.foot a:hover { color: var(--teal); }

/* ---------- Wish burst & toast ---------- */
.wish { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.wish.is-on { opacity: 1; }
.wish canvas { width: 100%; height: 100%; display: block; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 70; transform: translate(-50%, 140%); opacity: 0;
  padding: 12px 18px; border-radius: 12px; background: rgba(10,16,19,0.95); border: 1px solid rgba(245,158,11,0.45);
  font-size: 14.5px; box-shadow: 0 20px 50px -10px rgba(0,0,0,0.9); transition: transform 0.5s var(--ease-out), opacity 0.4s;
  max-width: calc(100vw - 32px);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .chapter { padding-top: 110px; }
  .chapter--side, .chapter--right { background: radial-gradient(ellipse 120% 50% at 50% 50%, rgba(5,8,10,0.85), transparent 80%); }
  .chapter--hero { justify-content: flex-end; padding-bottom: 48px; background: linear-gradient(transparent 38%, rgba(5,8,10,0.86) 62%); }
  .copy-inline { display: none; }
  .rx__canvas { padding: 20px 16px; }
  .rx__cols { gap: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Easter-egg trigger (works without a keyboard) ---------- */
.wish-btn {
  font: inherit; color: var(--orange); background: rgba(245,158,11,0.08); cursor: pointer;
  border: 1px solid rgba(245,158,11,0.45); border-radius: 999px; padding: 2px 10px; margin-left: 4px;
}
.wish-btn:hover { background: rgba(245,158,11,0.16); }

/* ---------- Phones ---------- */
html { overflow-x: clip; }
.power__inner > *, .split > * { min-width: 0; }

@media (max-width: 760px) {
  .section { padding-top: 88px; padding-bottom: 88px; }
  .section__head.center { margin-bottom: 36px; }
  .section__head p, .chapter--side p, .power p { font-size: 16px; }

  /* universe chapters: the subject sits in the top half, copy on a scrim below it */
  .chapter--side, .chapter--right {
    justify-content: flex-end; padding-bottom: 64px;
    background: linear-gradient(transparent 32%, rgba(5,8,10,0.9) 58%);
  }
  .colcard { width: 280px; font-size: 11px; padding: 10px 12px; background: rgba(8, 14, 17, 0.97); }

  /* product shot: readable size, swipe sideways */
  .product__stage {
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 12px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .product__stage::-webkit-scrollbar { display: none; }
  .product__stage img { width: 760px; max-width: none; }
  .product__glow { display: none; }

  /* code blocks */
  .code { font-size: 12px; padding: 14px; }
  #pf-code { height: 220px; }
  .editor__gutter, .editor__code { font-size: 11px; }
  .editor__gutter { padding: 0 10px 0 12px; }
  .editor__body { height: 112px; }
  .editor__body--short { height: 48px; }
  .ac-pop { top: 78px; }
  .term__body { font-size: 12px; padding: 18px 16px 20px; min-height: 0; }
  .panel__bar { flex-wrap: wrap; }

  /* record explorer: levels stack vertically, cards in a level swipe sideways */
  .rx__canvas { height: 560px; overflow-x: hidden; padding: 16px; }
  .rx__cols { flex-direction: column; gap: 40px; min-width: 0; }
  .rx__col { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 0 2px 6px; scrollbar-width: none; }
  .rx__col::-webkit-scrollbar { display: none; }
  .rcard, .more { flex: none; width: 236px; scroll-snap-align: start; }
  .rx__wires { overflow: hidden; }
  .rx__url { scrollbar-width: none; }
  .rx__url::-webkit-scrollbar { display: none; }
  .rx__actions { width: 100%; }
  .rx__actions .btn { flex: 1; justify-content: center; }

  /* data explorer: filter controls share the row, grid scrolls sideways */
  .dx__filter select, .dx__filter input { flex: 1 1 28%; min-width: 0; width: auto; }
  .dx__filter .btn { flex: 1 1 100%; justify-content: center; }
  .dx__tabs { display: none; }
  .dx__foot { flex-wrap: wrap; }

  /* bento: cards size to their content */
  .cell { min-height: 0; padding: 22px; }
  .cell h3 { margin-top: 20px; }

  /* power level */
  .pins { gap: 8px; flex-wrap: nowrap; }
  .pin { width: 40px; height: 40px; font-size: 12px; }
  .scouter { max-width: 300px; }

  .finale__psst { line-height: 2; }
}

/* ---------- Scrollbars: thin and quiet (the OS default greys clash with the dark panels) ---------- */
.rx__canvas, .code, .term__body, .dx__scroll, .rx__url, .editor__code, .product__stage {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 201, 196, 0.22) transparent;
}
.rx__canvas:hover, .code:hover, .term__body:hover, .dx__scroll:hover { scrollbar-color: rgba(45, 212, 191, 0.45) transparent; }

/* record explorer track: cards + wires glide together; earlier levels fade at the left edge */
.rx__track { position: relative; width: max-content; transition: transform 0.55s var(--ease-out); }
.rx__canvas.is-panned { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 72px); mask-image: linear-gradient(90deg, transparent 0, #000 72px); }
@media (max-width: 760px) { .rx__track { width: auto; } }
