:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0d1a2b;
  --surface-2: #12243a;
  --surface-3: #17304c;
  --text: #edf6ff;
  --muted: #9fb2c8;
  --line: #25415f;
  --brand: #61d5ff;
  --brand-2: #8b7dff;
  --good: #6ee7b7;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 24px 60px rgba(0, 0, 0, .28);
  --radius: 18px;
  --content: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% -10%, rgba(97, 213, 255, .14), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(139, 125, 255, .12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: #a9ecff; }
img { max-width: 100%; }
code, pre { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(97, 213, 255, .13);
  background: rgba(7, 17, 31, .88);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(var(--content), calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 213, 255, .45);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(97, 213, 255, .25), rgba(139, 125, 255, .22));
  color: #fff;
  font-size: 13px;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--text); }

.lang-switch {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
}

.container {
  width: min(var(--content), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 82px 0 54px;
}
.home-hero { padding-bottom: 34px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.22; letter-spacing: -.025em; }
h1 { margin: 0; max-width: 930px; font-size: clamp(38px, 6vw, 70px); }
h2 { margin: 0 0 18px; font-size: clamp(28px, 4vw, 42px); }
h3 { margin: 0 0 10px; font-size: 21px; }
p { margin: 0 0 16px; }

.hero-copy {
  max-width: 840px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .035);
  font-weight: 750;
  text-decoration: none;
}
.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #1f9ed0, #6b5ee7);
  box-shadow: 0 12px 28px rgba(58, 129, 219, .24);
}
.button:hover { color: #fff; transform: translateY(-1px); }

.section { padding: 58px 0; }
.section.compact { padding: 36px 0; }
.section-lead { max-width: 800px; color: var(--muted); font-size: 18px; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.route-card {
  min-height: 390px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(18, 36, 58, .95), rgba(9, 22, 38, .96));
  box-shadow: var(--shadow);
}
.route-card.primary-route {
  border-color: rgba(97, 213, 255, .62);
  background:
    radial-gradient(circle at 100% 0, rgba(97, 213, 255, .17), transparent 22rem),
    linear-gradient(160deg, rgba(18, 45, 70, .98), rgba(9, 22, 38, .96));
}
.route-card h2 { margin-bottom: 14px; }
.route-card > p:not(.route-label):not(.route-meta) { color: var(--muted); font-size: 18px; }
.route-label {
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.route-meta { color: var(--good); font-size: 14px; font-weight: 750; }
.route-card .button { margin-top: auto; }
.route-links {
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.route-links li { border-bottom: 1px solid rgba(37, 65, 95, .72); }
.route-links li:last-child { border-bottom: 0; }
.route-links a { display: block; padding: 8px 0; color: var(--muted); text-decoration: none; }
.route-links a:hover { color: var(--brand); }
.narrow-section { max-width: 980px; }

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 36, 58, .92), rgba(11, 25, 42, .92));
  box-shadow: var(--shadow);
}
.card p:last-child, .callout p:last-child { margin-bottom: 0; }
.card .kicker { color: var(--brand); font-size: 13px; font-weight: 800; }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover .card { border-color: rgba(97, 213, 255, .65); }

.choice-card { position: relative; min-height: 210px; }
.choice-card .number {
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(97, 213, 255, .12);
  color: var(--brand);
  font-weight: 850;
}
.choice-card .answer { color: var(--good); font-weight: 800; }

.tree {
  margin: 28px 0 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #081522;
  color: #d9ebff;
  font-size: 15px;
  line-height: 1.9;
  overflow-x: auto;
  white-space: pre;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto;
  background: rgba(12, 27, 45, .8);
}

table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #cbeeff; background: rgba(97, 213, 255, .06); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
td { color: var(--muted); }
td strong { color: var(--text); }

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--brand);
  border-radius: 4px 14px 14px 4px;
  background: rgba(97, 213, 255, .08);
}
.callout.good { border-color: var(--good); background: rgba(110, 231, 183, .07); }
.callout.warn { border-color: var(--warn); background: rgba(251, 191, 36, .08); }
.callout.danger { border-color: var(--danger); background: rgba(251, 113, 133, .08); }
.callout strong { color: var(--text); }

.pill {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.docs-layout {
  width: min(var(--content), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 80px;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 26, 43, .78);
}
.toc-title { margin: 0 0 10px; color: var(--text); font-size: 13px; font-weight: 850; }
.toc a { display: block; padding: 6px 0; color: var(--muted); font-size: 14px; text-decoration: none; }
.toc a:hover { color: var(--brand); }

.article { min-width: 0; }
.article-header { margin-bottom: 44px; }
.article h1 { font-size: clamp(36px, 5vw, 58px); }
.article h2 { margin-top: 58px; padding-top: 6px; font-size: 32px; }
.article h3 { margin-top: 32px; }
.article > p, .article section > p, .article li { color: var(--muted); }
.article ul, .article ol { padding-left: 24px; }
.article li + li { margin-top: 8px; }

.step {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 26, 43, .78);
}
.step-head { display: flex; gap: 14px; align-items: flex-start; }
.step-number {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(97, 213, 255, .22), rgba(139, 125, 255, .25));
  color: #fff;
  font-weight: 850;
}
.step h3 { margin-top: 4px; }

.phase {
  margin-top: 70px;
  padding-top: 2px;
}
.phase-kicker {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.article .phase > h2 { margin-top: 10px; }
.atomic-step {
  padding: 20px;
  scroll-margin-top: 92px;
}
.atomic-step .step-head { align-items: center; }
.atomic-step .step-number {
  flex-basis: 42px;
  width: 42px;
  height: 42px;
  font-variant-numeric: tabular-nums;
}
.atomic-step h3 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.4;
}
.atomic-step figure { margin: 18px 0 0; }
.shot-link {
  display: block;
  color: inherit;
  cursor: zoom-in;
}
.focus-shot .shot-link {
  display: flex;
  justify-content: center;
}

figure {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #050a12;
  overflow: hidden;
  box-shadow: var(--shadow);
}
figure img { display: block; width: 100%; height: auto; }
figcaption { padding: 12px 16px; color: var(--muted); background: rgba(13, 26, 43, .92); font-size: 14px; }
.focus-shot img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
.completion-card {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid rgba(110, 231, 183, .42);
  border-radius: var(--radius);
  background: rgba(110, 231, 183, .07);
}
.completion-card h3 { font-size: 25px; }

pre {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #040c16;
  color: #d8edff;
  line-height: 1.6;
  overflow-x: auto;
}
code { color: #b9e9ff; }
p code, li code, td code {
  padding: 2px 6px;
  border: 1px solid rgba(97, 213, 255, .15);
  border-radius: 6px;
  background: rgba(97, 213, 255, .07);
  font-size: .92em;
}

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: "✓"; position: absolute; left: 2px; color: var(--good); font-weight: 900; }

.next-links {
  margin-top: 58px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.next-links a {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(18, 36, 58, .7);
  font-weight: 750;
  text-decoration: none;
}
.next-links a:hover { border-color: var(--brand); }
.next-links.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.site-footer {
  padding: 34px 0 50px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .next-links.three { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .nav { padding: 12px 0; align-items: flex-start; }
  .nav-links { gap: 12px; justify-content: flex-end; }
  .nav-links a:not(.lang-switch) { display: none; }
  .hero { padding-top: 54px; }
  .grid.two, .grid.three, .grid.four, .next-links { grid-template-columns: 1fr; }
  .route-card { min-height: 0; padding: 24px; }
  .card, .step { padding: 20px; }
  .tree { padding: 20px; font-size: 13px; }
  .docs-layout { padding-top: 34px; gap: 28px; }
  .article h2 { margin-top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
