*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #060607;
  --bg-2: #0b0b0d;
  --surface: #111113;
  --surface-2: #17171a;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f5f5f5;
  --muted: #a2a2a2;
  --dim: #6c6c72;
  --teal: #0aa0b8;
  --teal-hi: #2fd0e6;
  --accent: #fb5419;
  --accent-hi: #ff7d45;
  --gold: #fdcc1e;
  --radius: 22px;
  --max: 1180px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--teal-hi); outline-offset: 3px; }

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 0.78em;
  text-align: center;
  color: var(--text);
}

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-hi);
}

.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.08; }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; line-height: 1.3; }

.lede { margin: 1.1rem 0 0; max-width: 60ch; color: var(--muted); font-size: 1.05rem; }

.grad {
  background: linear-gradient(100deg, #ff9a5c 0%, var(--accent) 45%, #ff3d63 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad-teal {
  background: linear-gradient(100deg, #7ff0ff 0%, var(--teal-hi) 40%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono { font-family: var(--mono); }

.sec { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; }
.sec--tight { padding-top: 0; }
.sec-head { max-width: 760px; margin-bottom: clamp(2rem, 4.5vw, 3.25rem); }
.sec-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head--center .lede { margin-left: auto; margin-right: auto; }

.divider {
  height: 1px;
  max-width: var(--max);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

/* ---------- Buttons ---------- */

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.4rem 0.7rem 1.15rem;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 30px -6px rgba(251, 84, 25, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}

.btn-store:hover {
  transform: translateY(-2px);
  background: #ff6026;
  box-shadow: 0 16px 40px -8px rgba(251, 84, 25, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-store svg { width: 26px; height: 26px; fill: currentColor; }
.btn-store__text { display: flex; flex-direction: column; line-height: 1.15; }
.btn-store__small { font-size: 0.68rem; font-weight: 500; opacity: 0.85; letter-spacing: 0.02em; }
.btn-store__big { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease), opacity 0.2s;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.22); transform: translateY(-1px); }
.btn-ghost .ico { width: 18px; height: 18px; color: var(--teal-hi); }
.btn-ghost--sm { padding: 0.55rem 0.9rem; border-radius: 12px; font-size: 0.88rem; }
.btn-ghost:disabled { opacity: 0.4; cursor: default; transform: none; }

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem;
  border: 0;
  border-radius: 14px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px -8px rgba(10, 160, 184, 0.7);
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}

.btn-play:hover { transform: translateY(-2px); background: #0bb3cd; }
.btn-play .ico { width: 16px; height: 16px; }
.btn-play[aria-pressed="true"] { background: #1b1b1f; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-play--accent { background: var(--accent); box-shadow: 0 10px 30px -8px rgba(251, 84, 25, 0.7); }
.btn-play--accent:hover { background: #ff6026; }

.btn-toggle__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-toggle[aria-pressed="false"] .btn-toggle__dot { background: var(--dim); box-shadow: none; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.nav.is-scrolled {
  background: rgba(6, 6, 7, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 16px rgba(251, 84, 25, 0.3); }

.nav__links { display: flex; gap: 0.15rem; margin: 0 auto; padding: 0; list-style: none; }

.nav__links a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav__links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: var(--text);
  color: #0a0a0a;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s;
}

.nav__cta:hover { transform: translateY(-1px); background: #fff; }
.nav__cta svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Page hero ---------- */

.page-hero {
  position: relative;
  padding: 128px 0 clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
  isolation: isolate;
}

.page-hero__glow { position: absolute; border-radius: 50%; filter: blur(90px); z-index: -1; pointer-events: none; }
.page-hero__glow--a { width: 560px; height: 560px; right: -160px; top: -40px; background: rgba(251, 84, 25, 0.16); }
.page-hero__glow--b { width: 520px; height: 520px; left: -220px; top: 120px; background: rgba(10, 160, 184, 0.16); }

.page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 75%);
}

.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; font-size: 0.82rem; color: var(--dim); }
.crumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.crumbs li + li::before { content: "/"; color: var(--dim); opacity: 0.6; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.page-hero h1 { max-width: 18ch; font-size: clamp(2.4rem, 6vw, 4.3rem); line-height: 1.02; letter-spacing: -0.04em; }
.page-hero .lede { font-size: clamp(1.02rem, 1.6vw, 1.15rem); max-width: 62ch; }

.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  color: var(--muted);
}

.chips .ico { width: 15px; height: 15px; color: var(--teal-hi); stroke-width: 2.2; }

/* ---------- Tool panel ---------- */

.panel {
  position: relative;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  border-radius: 32px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(10, 160, 184, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(251, 84, 25, 0.08), transparent 60%),
    var(--surface);
  box-shadow: 0 40px 120px -60px rgba(0, 0, 0, 0.9);
}

.panel__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.panel__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.panel__sub { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.95rem; }
.panel__controls { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.5rem; }

.hint {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.hint .ico { width: 18px; height: 18px; color: var(--gold); margin-top: 0.1rem; }

.label {
  display: block;
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}

.seg button {
  padding: 0.45rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.field { display: grid; gap: 0.3rem; }
.field + .field { margin-top: 1.1rem; }
.field input[type="number"],
.field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #0c0c0e;
  color: var(--text);
  font-size: 0.92rem;
}
.panel__controls > button:not(.btn-play):not(.btn-ghost),
.pill-links button {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
}
.panel__controls > button:not(.btn-play):not(.btn-ghost):hover,
.pill-links button:hover { color: var(--text); border-color: var(--teal-hi); background: rgba(10, 160, 184, 0.12); }
.it-settings { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; padding-bottom: 1.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.it-q { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-hi); }
.stats-wrap { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.stats-wrap h3 { margin-bottom: 0.8rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 0.5rem; }
.stat.is-good .stat__bar span { background: var(--teal); }

.select, .input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #0c0c0e;
  color: var(--text);
  font-size: 0.92rem;
}

.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }

input[type="range"] { width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--teal) 0 var(--fill, 50%), rgba(255, 255, 255, 0.1) var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--teal); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(47, 208, 230, 0.25), 0 4px 10px rgba(0, 0, 0, 0.5); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(47, 208, 230, 0.25), 0 4px 10px rgba(0, 0, 0, 0.5); }

.status { min-height: 3em; margin: 1rem 0 0; font-size: 0.92rem; color: var(--muted); }
.status b { color: var(--text); font-weight: 600; }

.score-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1.5rem; margin-top: 1.5rem; font-size: 0.84rem; color: var(--muted); }
.score-row b { font-family: var(--mono); font-size: 1.2rem; font-weight: 500; color: var(--text); }

.scope { position: relative; border-radius: 20px; background: #0a0a0b; border: 1px solid var(--line); overflow: hidden; }
.scope canvas { width: 100%; height: 110px; display: block; }
.scope__eq { position: relative; border-top: 1px solid var(--line); }
.scope__eq svg { width: 100%; height: auto; }

.scope__q {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  transition: opacity 0.3s;
}

.scope.is-revealed .scope__q { opacity: 0; }
.scope__axis { display: flex; justify-content: space-between; padding: 0 0.9rem 0.6rem; font-family: var(--mono); font-size: 0.65rem; color: var(--dim); }

.answers { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 0.55rem; margin-top: 1rem; }

.answer {
  position: relative;
  padding: 0.85rem 0.4rem;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s var(--ease), color 0.2s;
}

.answer:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.answer small { display: block; margin-top: 0.15rem; font-family: "Poppins", sans-serif; font-size: 0.68rem; font-weight: 400; color: var(--dim); }
.answer__key { position: absolute; top: 0.35rem; left: 0.5rem; font-size: 0.6rem; color: var(--dim); }
.answer.is-right { background: rgba(10, 160, 184, 0.2); border-color: var(--teal); color: #b8f6ff; }
.answer.is-wrong { background: rgba(251, 84, 25, 0.16); border-color: var(--accent); color: #ffc2a8; }
.answer.is-audition { box-shadow: 0 0 0 2px var(--gold); }

.progress { display: flex; gap: 0.35rem; margin-top: 1.25rem; }
.progress span { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); transition: background 0.3s; }
.progress span.is-right { background: var(--teal); }
.progress span.is-wrong { background: var(--accent); }
.progress span.is-current { background: rgba(255, 255, 255, 0.35); }

/* ---------- Content ---------- */

.prose { max-width: 74ch; }
.prose h2 { margin-bottom: 1rem; }
.prose h3 { margin: 2rem 0 0.6rem; font-size: 1.25rem; }
.prose p, .prose li { color: #c9c9cc; font-size: 1.01rem; }
.prose p { margin: 0 0 1.05rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--teal-hi); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--teal-hi); text-decoration-color: rgba(47, 208, 230, 0.4); text-underline-offset: 3px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split > *, .panel__grid > * { min-width: 0; }

.swipe-hint { display: none; margin: 0 0 0.6rem; font-size: 0.75rem; color: var(--dim); }

@media (max-width: 820px) {
  .swipe-hint { display: block; }
}

@media (hover: none) and (pointer: coarse) {
  .keys { display: none; }
}

.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }

.toc a {
  display: inline-flex;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.toc a:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.04); }

.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 1rem; }

.card {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.card h3 { font-size: 1.08rem; }
.card p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.92rem; }
.card__num { display: block; margin-bottom: 0.9rem; font-family: var(--mono); font-size: 0.75rem; color: var(--teal-hi); }
.card__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem; border-radius: 13px; background: rgba(10, 160, 184, 0.1); border: 1px solid rgba(10, 160, 184, 0.25); color: var(--teal-hi); }
.card__icon .ico { width: 20px; height: 20px; }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data caption { padding: 1rem 1.25rem 0; text-align: left; color: var(--dim); font-size: 0.8rem; caption-side: bottom; padding-bottom: 1rem; }
table.data th, table.data td { padding: 0.85rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data thead th { position: sticky; top: 0; background: #141416; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
table.data tbody th { font-weight: 600; white-space: nowrap; }
table.data td { color: #c4c4c8; }
table.data .num { font-family: var(--mono); white-space: nowrap; color: var(--text); }
table.data .dim { color: var(--dim); }

.note {
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(253, 204, 30, 0.25);
  background: rgba(253, 204, 30, 0.05);
  font-size: 0.9rem;
  color: #d8d2bb;
}

.note .ico { width: 20px; height: 20px; color: var(--gold); margin-top: 0.1rem; }
.note p { margin: 0; }

/* ---------- App CTA ---------- */

.app-cta {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border-radius: 32px;
  border: 1px solid rgba(251, 84, 25, 0.35);
  background:
    radial-gradient(ellipse 70% 90% at 100% 100%, rgba(251, 84, 25, 0.2), transparent 65%),
    radial-gradient(ellipse 50% 60% at 0% 0%, rgba(10, 160, 184, 0.12), transparent 70%),
    var(--bg-2);
  overflow: hidden;
}

.app-cta__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.app-cta__head img { width: 60px; height: 60px; border-radius: 16px; box-shadow: 0 14px 40px rgba(251, 84, 25, 0.35); }
.app-cta__head span { display: block; font-size: 0.8rem; color: var(--muted); }
.app-cta__head strong { display: block; font-size: 1.05rem; }
.app-cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.app-cta .btn-store { margin-top: 1.75rem; }
.app-cta__meta { margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--dim); }

.units { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }

.units li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
}

.units .ico { width: 20px; height: 20px; color: var(--accent-hi); }
.units strong { display: block; font-size: 0.95rem; font-weight: 600; }
.units span { display: block; font-size: 0.8rem; color: var(--muted); }

/* ---------- Related tools ---------- */

.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.related a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.related a:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-3px); }
.related .card__icon { margin-bottom: 0.6rem; }
.related strong { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.related span { font-size: 0.86rem; color: var(--muted); }
.related em { margin-top: auto; padding-top: 0.6rem; font-style: normal; font-size: 0.82rem; color: var(--teal-hi); }

/* ---------- Shared tool & entity components ---------- */

.mini-keys {
  position: relative;
  height: 118px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: #0a0a0c;
  overflow: hidden;
  user-select: none;
}

.mini-keys .key { position: absolute; top: 0; border-radius: 0 0 7px 7px; transition: background 0.15s, box-shadow 0.15s; }
.mini-keys .key--w { width: calc(100% / var(--whites, 15)); height: 100%; background: #ececf0; border-right: 1px solid #18181b; }
.mini-keys .key--w i { position: absolute; bottom: 6px; left: 0; right: 0; font-style: normal; font-family: var(--mono); font-size: 0.62rem; color: #52525b; text-align: center; }
.mini-keys .key--b { z-index: 2; width: calc((100% / var(--whites, 15)) * 0.62); height: 60%; background: #141418; border: 1px solid #000; border-top: 0; }
.mini-keys .key.is-root { background: var(--teal-hi); box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.25); }
.mini-keys .key.is-root i { color: #042f36; font-weight: 700; }
.mini-keys .key.is-top { background: var(--accent); box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.25); }

.keys-legend { display: flex; gap: 1.25rem; margin-top: 0.6rem; font-size: 0.75rem; color: var(--dim); }
.keys-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 0.4rem; border-radius: 3px; vertical-align: -1px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 0.5rem; }
.stat { display: grid; justify-items: center; gap: 0.25rem; padding: 0.7rem 0.35rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); font-family: var(--mono); }
.stat__bar { position: relative; display: block; width: 100%; max-width: 30px; height: 58px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.stat__bar span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--teal); border-radius: 7px; transition: height 0.25s; }
.stat.is-low .stat__bar span { background: var(--accent); }
.stat.is-mid .stat__bar span { background: var(--gold); }
.stat b { font-size: 0.78rem; }
.stat small { font-size: 0.68rem; color: var(--muted); }

.metro-dots { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.metro-dot { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); font-family: var(--mono); font-size: 0.85rem; color: var(--muted); transition: transform 0.08s, background 0.08s, border-color 0.08s, color 0.08s; }
.metro-dot.is-on { transform: scale(1.08); background: var(--teal); border-color: var(--teal-hi); color: #fff; box-shadow: 0 0 18px rgba(47, 208, 230, 0.55); }
.metro-dot.is-accent.is-on { background: var(--accent); border-color: var(--accent-hi); box-shadow: 0 0 18px rgba(251, 84, 25, 0.65); }

.cell-btn { padding: 0.35rem 0.65rem; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); font-family: var(--mono); font-size: 0.84rem; color: var(--text); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.cell-btn:hover { background: rgba(10, 160, 184, 0.16); border-color: var(--teal-hi); color: #b8f6ff; }

.eq-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 0.6rem; margin-top: 1.1rem; }
.eq-pill { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; padding: 0.85rem 1rem; border-radius: 15px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); text-align: left; cursor: pointer; transition: background 0.18s, border-color 0.18s, transform 0.15s; }
.eq-pill:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.eq-pill.is-active { background: rgba(10, 160, 184, 0.18); border-color: var(--teal-hi); box-shadow: 0 0 0 1px var(--teal-hi); }
.eq-pill b { font-family: var(--mono); font-size: 0.92rem; color: var(--teal-hi); }
.eq-pill strong { font-size: 0.92rem; color: var(--text); }
.eq-pill span { font-size: 0.78rem; color: var(--muted); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; }
.kv { padding: 0.95rem 1.1rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.28); }
.kv .label { margin: 0; }
.kv b { display: block; margin-top: 0.2rem; font-family: var(--mono); font-size: 1.22rem; font-weight: 500; color: var(--text); }
.kv small { display: block; margin-top: 0.15rem; font-size: 0.75rem; color: var(--muted); }

.pill-links { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.pill-links a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.42rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); font-size: 0.82rem; color: var(--muted); text-decoration: none; transition: color 0.18s, border-color 0.18s, background 0.18s; }
.pill-links a:hover, .pill-links a[aria-current="page"] { color: var(--text); border-color: var(--teal-hi); background: rgba(10, 160, 184, 0.12); }
.pill-links b { font-family: var(--mono); font-weight: 500; color: var(--text); }

.gr-meter { margin-top: 1.1rem; padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: #09090b; }
.gr-meter__head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 0.45rem; }
.gr-meter__track { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.gr-meter__fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--teal-hi), var(--accent)); border-radius: 99px; transition: width 0.08s; }

.oct-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.5rem; margin-top: 1rem; }
.oct-chip { display: flex; flex-direction: column; justify-content: space-between; gap: 0.35rem; padding: 0.65rem 0.75rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.oct-chip.is-current { border-color: var(--teal-hi); background: rgba(10, 160, 184, 0.12); }
.oct-chip button { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.oct-chip b { display: block; font-family: var(--mono); font-size: 0.92rem; color: var(--text); }
.oct-chip span { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.oct-chip a { font-size: 0.72rem; color: var(--teal-hi); text-decoration: none; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 0.75rem; }
.faq details { border-radius: 18px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.3s, background 0.3s; }
.faq details[open] { border-color: var(--line-2); background: #141416; }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { margin: 0; padding: 0 1.4rem 1.3rem; color: var(--muted); font-size: 0.95rem; }
.faq details p + p { margin-top: -0.6rem; }
.faq a { color: var(--teal-hi); }

/* ---------- Footer ---------- */

footer { padding: 4rem 0 3rem; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.footer__about { margin: 1rem 0 0; max-width: 34ch; font-size: 0.86rem; color: var(--muted); }
.footer__col h2 { margin: 0 0 0.9rem; font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.footer__col ul { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.footer__col a { font-size: 0.88rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer__col a:hover { color: var(--text); }
.footer__copy { margin: 2.5rem 0 0; font-size: 0.8rem; color: var(--dim); }

/* ---------- Spectrum ---------- */

.spectrum {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 4px;
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
  mask-image: linear-gradient(to top, #000 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
}

.spectrum span {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, rgba(10, 160, 184, 0.05), rgba(10, 160, 184, 0.55));
  transform-origin: bottom;
  animation: eq-bounce var(--t, 1.4s) ease-in-out var(--d, 0s) infinite alternate;
}

.spectrum span.is-accent { background: linear-gradient(to top, rgba(251, 84, 25, 0.05), rgba(251, 84, 25, 0.75)); }

@keyframes eq-bounce {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .related { grid-template-columns: repeat(2, 1fr); }
  .nav__links a { padding: 0.45rem 0.6rem; font-size: 0.84rem; }
}

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .panel__grid, .split, .app-cta { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 1.1rem; }
  .page-hero { padding-top: 108px; }
  .panel { border-radius: 24px; }
  .cards, .related { grid-template-columns: 1fr; }
  .answers { grid-template-columns: repeat(var(--cols-sm, 3), 1fr); }
  table.data th, table.data td { padding: 0.7rem 0.85rem; }
  .app-cta { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  body { background: #fff; color: #111; }
  body::after, .nav, .page-hero__glow, .page-hero__grid, .spectrum, .no-print, .app-cta, .related, footer { display: none !important; }
  .page-hero { padding-top: 0; }
  .lede, .prose p, .prose li, .card p, table.data td { color: #333; }
  .grad, .grad-teal { color: #111; background: none; }
  .card, .table-wrap, .panel { background: #fff; border-color: #ccc; box-shadow: none; }
  table.data thead th { background: #f2f2f2; color: #555; }
  .js .reveal { opacity: 1; transform: none; }
  .faq details { break-inside: avoid; }
}
