/* ==========================================================================
   Super Tool — official site
   Design tokens + components
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #05060e;
  --bg-2: #080a16;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0fa;
  --muted: #9aa1bf;
  --muted-2: #6f769a;
  --brand: #5b7cff;
  --brand-2: #35e0ff;
  --amber: #ffb020;
  --green: #4ade80;
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(91, 124, 255, 0.20), transparent 62%),
    radial-gradient(760px 460px at 8% 4%, rgba(53, 224, 255, 0.10), transparent 60%),
    radial-gradient(700px 420px at 50% 108%, rgba(255, 176, 32, 0.06), transparent 65%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p { margin: 0; }

::selection { background: rgba(91, 124, 255, 0.4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- language switching ---------- */
html[data-lang="zh"] [data-l="en"],
html[data-lang="en"] [data-l="zh"] { display: none !important; }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section { padding: 96px 0; position: relative; z-index: 1; }
.section--tight { padding: 64px 0; }

/* Grid children default to min-width:auto, so wide <pre> content can push a
   column past the viewport on small screens. Pin every grid child to 0. */
.hero-grid > *,
.start-grid > *,
.docs > *,
.about-grid > *,
.features > *,
.scenarios > *,
.footer-grid > *,
.stats > * { min-width: 0; }

.code-card { min-width: 0; }
pre { max-width: 100%; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-2));
}

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 40px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 16.5px; }

.lead { color: var(--muted); font-size: 17px; line-height: 1.75; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary {
  background: linear-gradient(135deg, #6a86ff, #4a63e8 55%, #7c5cff);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(91, 124, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px rgba(91, 124, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-amber {
  background: linear-gradient(135deg, #ffc247, #ff9f1a);
  color: #241400;
  box-shadow: 0 12px 34px -12px rgba(255, 176, 32, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-amber:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -14px rgba(255, 176, 32, 1); }

.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-stuck {
  background: rgba(5, 6, 14, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.brand-name b { font-weight: 700; color: var(--brand-2); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 14px; }

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav a.is-active { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.lang {
  display: flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.lang button {
  border: 0;
  background: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang button:hover { color: var(--text); }
.lang button.on { background: rgba(255, 255, 255, 0.1); color: var(--text); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--text);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 15px;
  height: 1.5px;
  background: var(--text);
}

.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* ---------- hero ---------- */
.hero { padding: 76px 0 40px; position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #c8cee8;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #8fa8ff 0%, #35e0ff 46%, #ffc247 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 520px;
}

.hero-sub code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: #cdd6ff;
  background: rgba(91, 124, 255, 0.14);
  padding: 1px 6px;
  border-radius: 5px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted-2);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* hero visual */
.hero-visual { position: relative; }

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -14% -10% -18% -10%;
  background: radial-gradient(closest-side, rgba(91, 124, 255, 0.32), transparent 78%);
  filter: blur(28px);
  z-index: -1;
}

.hero-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0a0b18;
  box-shadow: var(--shadow), 0 0 0 1px rgba(91, 124, 255, 0.12) inset;
  transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
  transition: transform 0.7s var(--ease);
}

.hero-frame:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }

.hero-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(5, 6, 14, 0.55));
  pointer-events: none;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.stat { background: rgba(8, 10, 22, 0.9); padding: 22px 24px; }

.stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-num span { color: var(--brand-2); }
.stat-label { font-size: 12.5px; color: var(--muted-2); margin-top: 2px; letter-spacing: 0.02em; }

/* ---------- feature cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: transform 0.4s var(--ease), border-color 0.3s ease, background 0.3s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 224, 255, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 124, 255, 0.4);
  background: linear-gradient(180deg, rgba(91, 124, 255, 0.09), rgba(255, 255, 255, 0.015));
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(91, 124, 255, 0.12);
  color: var(--brand-2);
  margin-bottom: 16px;
}

.card-icon svg { width: 20px; height: 20px; }

.card h3 { font-size: 16.5px; letter-spacing: -0.01em; }
.card p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted); }

.card p code,
.step-body code,
.about-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: #cdd6ff;
  background: rgba(91, 124, 255, 0.14);
  padding: 1px 5px;
  border-radius: 4px;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #a9b3d6;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- scenarios ---------- */
.scenarios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.scenario {
  display: flex;
  gap: 18px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.scenario-idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  padding-top: 3px;
  flex: none;
}

.scenario h3 { font-size: 16px; }
.scenario p { margin-top: 7px; font-size: 14px; color: var(--muted); line-height: 1.68; }

/* ---------- quick start ---------- */
.start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: start;
}

.steps { display: grid; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }

.step { display: flex; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); transition: background 0.25s ease; }
.step:hover { background: rgba(255, 255, 255, 0.035); }

.step-num {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(91, 124, 255, 0.5);
  background: rgba(91, 124, 255, 0.14);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #b9c6ff;
}

.step-body strong { display: block; font-size: 14.5px; font-weight: 600; }
.step-body span { font-size: 13.5px; color: var(--muted); }

.code-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 5, 12, 0.75);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.code-dots { display: flex; gap: 5px; }
.code-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }

.code-title {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted-2);
  margin-left: 4px;
}

.code-copy {
  margin-left: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.code-copy:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.75;
  color: #c9d2f0;
}

pre .k { color: #8fa8ff; }
pre .s { color: #7ee0b8; }
pre .c { color: #5c6486; }
pre .b { color: #ffc247; }

/* ---------- faq ---------- */
.faq-list { display: grid; gap: 10px; max-width: 880px; }

details.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.25s ease, background 0.25s ease;
}

details.faq[open] { border-color: rgba(91, 124, 255, 0.35); background: rgba(91, 124, 255, 0.055); }

details.faq summary {
  cursor: pointer;
  padding: 17px 50px 17px 20px;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  list-style: none;
  letter-spacing: -0.005em;
}

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

details.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}

details.faq[open] summary::after { transform: translateY(-30%) rotate(225deg); }

.faq-body { padding: 0 20px 20px; color: var(--muted); font-size: 14.5px; line-height: 1.75; }
/* Inline code only — never match `code` inside `pre`, or the nowrap would
   collapse every newline in code blocks. */
.faq-body code,
.doc-body p code,
.doc-body li code,
.doc-body td code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: #cdd6ff;
  background: rgba(91, 124, 255, 0.14);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

pre code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: pre;
}

.faq-body p + p { margin-top: 10px; }

kbd {
  font-family: var(--mono);
  font-size: 0.84em;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: #dfe4f7;
  white-space: nowrap;
}

/* ---------- cta band ---------- */
.cta-band {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(91, 124, 255, 0.32);
  padding: 52px 48px;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 82% 10%, rgba(91, 124, 255, 0.28), transparent 70%),
    radial-gradient(520px 280px at 12% 92%, rgba(255, 176, 32, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
}

.cta-band h2 { font-size: clamp(24px, 3vw, 34px); max-width: 620px; }
.cta-band p { margin-top: 12px; color: var(--muted); max-width: 560px; font-size: 15.5px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.cta-meta {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 56px 0 34px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 44px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-brand span { font-weight: 700; font-size: 16px; }
.footer-desc { color: var(--muted-2); font-size: 13.5px; line-height: 1.7; max-width: 300px; }

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-col > a {
  display: block;
  font-size: 13.8px;
  color: var(--muted);
  padding: 5px 0;
  transition: color 0.2s ease;
}

.footer-col > a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted-2);
}

.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }

/* ---------- docs layout ---------- */
.page-head {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.page-head h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.03em; }
.page-head p { margin-top: 14px; color: var(--muted); max-width: 640px; font-size: 16px; }

.docs {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 80px;
  position: relative;
  z-index: 1;
}

.docs-nav {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 6px;
}

.docs-nav h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
  font-weight: 600;
}

.docs-nav a {
  display: block;
  padding: 6px 10px;
  border-left: 1px solid var(--line);
  font-size: 13.6px;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.docs-nav a:hover { color: var(--text); border-color: var(--line-strong); }
.docs-nav a.is-active {
  color: #cfd8ff;
  border-color: var(--brand);
  background: linear-gradient(90deg, rgba(91, 124, 255, 0.12), transparent);
}

.docs-nav .sep { height: 18px; }

.doc-body { max-width: 820px; }

.doc-body section { scroll-margin-top: 96px; margin-bottom: 56px; }
.doc-body section:last-child { margin-bottom: 0; }

.doc-body h2 {
  font-size: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.doc-body h2 .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand);
  font-weight: 500;
}

.doc-body h3 { font-size: 16.5px; margin: 30px 0 12px; color: #dfe4f7; }
.doc-body p { color: var(--muted); font-size: 14.8px; line-height: 1.78; margin-bottom: 14px; }
.doc-body p strong { color: #dfe4f7; font-weight: 600; }

.doc-body ol, .doc-body ul { color: var(--muted); font-size: 14.6px; line-height: 1.8; padding-left: 22px; margin: 0 0 16px; }
.doc-body li { margin-bottom: 7px; }
.doc-body li::marker { color: var(--brand); }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 16px 0 20px;
  background: rgba(255, 255, 255, 0.018);
}

table { width: 100%; border-collapse: collapse; font-size: 13.8px; min-width: 520px; }

th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--muted);
  vertical-align: top;
  line-height: 1.6;
}

tr:last-child td { border-bottom: 0; }
td:first-child { color: #cfd8ff; width: 38%; }
table code {
  font-family: var(--mono);
  font-size: 12.4px;
  color: #cfd8ff;
  background: transparent;
  padding: 0;
  white-space: normal;
}

.note {
  display: flex;
  gap: 12px;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 176, 32, 0.3);
  background: rgba(255, 176, 32, 0.06);
  font-size: 13.8px;
  line-height: 1.72;
  color: #e8d6b0;
  margin: 16px 0;
}

.note::before {
  content: "!";
  flex: none;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 176, 32, 0.2);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

.note.info { border-color: rgba(91, 124, 255, 0.32); background: rgba(91, 124, 255, 0.07); color: #c6d0f5; }
.note.info::before { content: "i"; background: rgba(91, 124, 255, 0.25); color: #9cb0ff; }

.doc-body pre { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(4, 5, 12, 0.7); margin: 14px 0 20px; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 56px 0 80px;
  position: relative;
  z-index: 1;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  position: sticky;
  top: 92px;
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: rgba(91, 124, 255, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  overflow: hidden;
}

.profile-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.profile-role { font-size: 13px; color: var(--brand-2); font-family: var(--mono); margin-top: 4px; }
.profile-loc { font-size: 13px; color: var(--muted-2); margin-top: 10px; }

.profile-links { display: grid; gap: 2px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

.profile-links a {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.2px;
  color: var(--muted);
  padding: 7px 0;
  transition: color 0.2s ease;
}

.profile-links a:hover { color: var(--text); }
.profile-links svg { width: 14px; height: 14px; opacity: 0.65; flex: none; }

.about-body h2 { font-size: 22px; margin-bottom: 14px; margin-top: 36px; }
.about-body h2:first-child { margin-top: 0; }
.about-body p { color: var(--muted); font-size: 15.2px; line-height: 1.85; margin-bottom: 16px; }
.about-body p strong { color: #dfe4f7; font-weight: 600; }

.skill-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }

.skill {
  font-size: 12.8px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #b9c1de;
}

/* ---------- dev log / timeline ---------- */
.log-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
  padding: 56px 0 80px;
  position: relative;
  z-index: 1;
}

.timeline { position: relative; padding-left: 30px; max-width: 700px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg,
    rgba(53, 224, 255, 0.55) 0%,
    rgba(91, 124, 255, 0.3) 18%,
    rgba(255, 255, 255, 0.07) 60%);
}

.tl-item { position: relative; padding-bottom: 44px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #0a0c1a;
  border: 1.5px solid rgba(91, 124, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(91, 124, 255, 0.1);
}

.tl-item.is-new::before {
  background: var(--brand-2);
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(53, 224, 255, 0.16), 0 0 14px rgba(53, 224, 255, 0.6);
}

.tl-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  color: var(--muted-2);
}

.tl-title {
  font-size: 19px;
  margin: 7px 0 12px;
  letter-spacing: -0.01em;
}

.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.tl-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid transparent;
}

.tl-tag.new { color: #7ef0c4; background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.28); }
.tl-tag.imp { color: #9fb4ff; background: rgba(91, 124, 255, 0.12); border-color: rgba(91, 124, 255, 0.3); }
.tl-tag.fix { color: #ffc86b; background: rgba(255, 176, 32, 0.1); border-color: rgba(255, 176, 32, 0.3); }
.tl-tag.rel { color: #d7b8ff; background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.32); }

.tl-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14.4px;
  line-height: 1.78;
}

.tl-list li { margin-bottom: 8px; }
.tl-list li:last-child { margin-bottom: 0; }
.tl-list li::marker { color: rgba(91, 124, 255, 0.8); }

.tl-list code {
  font-family: var(--mono);
  font-size: 0.87em;
  color: #cdd6ff;
  background: rgba(91, 124, 255, 0.13);
  padding: 1px 5px;
  border-radius: 4px;
}

.log-aside { position: sticky; top: 92px; display: grid; gap: 14px; }

.aside-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}

.aside-card h3 { font-size: 14px; margin-bottom: 8px; color: #dfe4f7; }
.aside-card p { font-size: 13.2px; line-height: 1.72; color: var(--muted-2); }

.aside-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-2);
}

.aside-link svg { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }
.aside-link:hover svg { transform: translateX(3px); }

/* ---------- 404 ---------- */
.err-wrap { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 80px 24px; position: relative; z-index: 1; }
.err-wrap .code-big { font-family: var(--mono); font-size: clamp(60px, 12vw, 110px); font-weight: 700; letter-spacing: -0.04em; background: linear-gradient(100deg, #8fa8ff, #35e0ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }

/* ---------- reveal ---------- */
/* Only hide when JS is running, so a blocked/failed script never blanks the page. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-sub { max-width: none; }
  .hero-frame { transform: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-nav { display: none; }
  .log-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .log-aside { position: static; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .profile-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 780px) {
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    margin: 0;
    background: rgba(6, 7, 16, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .nav.is-open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 15px; }
  .nav-toggle { display: flex; order: 3; margin-left: 4px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }
  .site-header .wrap { position: relative; }

  .section { padding: 68px 0; }
  .hero { padding: 44px 0 20px; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 44px; }
  .stat { padding: 18px 20px; }
  .stat-num { font-size: 24px; }
  .scenarios { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .doc-body h2 { font-size: 21px; }
  .page-head { padding: 40px 0 30px; }
}

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero-badges { gap: 6px; }
  .badge { font-size: 10.5px; padding: 4px 9px; }
  .hero-note { font-size: 11.5px; }
  .hero-cta .btn { width: 100%; }
  .cta-actions .btn { width: 100%; }
  .wrap { padding: 0 18px; }
}

@media (max-width: 620px) {
  table { min-width: 0; font-size: 13px; }
  th, td { padding: 9px 12px; }
  td:first-child { width: 44%; }
}

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