:root {
  color-scheme: dark;
  --bg: #07110f;
  --bg-deep: #040a09;
  --panel: #0a1714;
  --panel-2: #0d1d19;
  --panel-3: #11251f;
  --line: rgba(168, 255, 223, 0.12);
  --line-strong: rgba(79, 240, 183, 0.32);
  --accent: #4ff0b7;
  --accent-soft: #a8ffdf;
  --text: #e9fff9;
  --muted: #8fb9ad;
  --warning: #ffcf70;
  --danger: #ff7d86;
  --blue: #83c9ff;
  --radius: 16px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% -8%, rgba(79, 240, 183, 0.16), transparent 38%),
    radial-gradient(circle at 96% 6%, rgba(131, 201, 255, 0.07), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-soft); }
code, kbd, samp {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent-soft);
  background: rgba(79, 240, 183, 0.08);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 12px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 6px 0; }
strong { color: #f4fffc; }
::selection { background: rgba(79, 240, 183, 0.28); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #04100c;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 17, 15, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 8px;
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: var(--text);
  background: rgba(79, 240, 183, 0.09);
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: var(--panel);
}
.lang-switch a, .lang-switch span {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch [aria-current="page"] {
  background: var(--accent);
  color: #04100c;
}
.lang-switch a:hover { color: var(--text); background: rgba(79, 240, 183, 0.12); }
.lang-switch [aria-current="page"]:hover { color: #04100c; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 64px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: #c9e9df; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 750;
  font-size: 15px;
  text-decoration: none;
  line-height: 1.2;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: #04100c; }
.btn-primary:hover { background: #6ef7c6; color: #04100c; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(79, 240, 183, 0.09); color: var(--text); }
.hero-meta { font-size: 13px; color: var(--muted); }

.fact-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.fact-card h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list span:first-child { color: var(--muted); }
.fact-list span:last-child { text-align: right; font-weight: 650; }

.toc {
  margin: 26px 0 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.toc h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; }
.toc ol {
  columns: 3;
  column-gap: 28px;
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}
.toc li { break-inside: avoid; margin: 4px 0; }
.toc a { color: #cfe9e1; text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

main { padding-bottom: 40px; }
.section { padding: 46px 0 8px; scroll-margin-top: 84px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.section-num {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 3px 8px;
  background: rgba(79, 240, 183, 0.07);
}
.section h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.01em; margin: 0; }
.section h3 { font-size: 19px; margin-top: 26px; color: #f2fffb; }
.section p, .section li { color: #d3ebe3; }
.muted { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card h3, .card h4 { margin: 0 0 8px; font-size: 17px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.note, .warn, .ok, .danger {
  border-left: 3px solid var(--line-strong);
  background: rgba(79, 240, 183, 0.06);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 15px;
}
.warn { border-left-color: var(--warning); background: rgba(255, 207, 112, 0.08); }
.ok { border-left-color: var(--accent); background: rgba(79, 240, 183, 0.09); }
.danger { border-left-color: var(--danger); background: rgba(255, 125, 134, 0.08); }
.note strong, .warn strong, .ok strong, .danger strong { display: block; margin-bottom: 3px; }
.note p:last-child, .warn p:last-child, .ok p:last-child, .danger p:last-child { margin-bottom: 0; }

.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 24px 0; }
.figure-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 940px; }
figure.shot {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
figure.shot img {
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}
figure.shot figcaption { padding: 13px 16px 15px; font-size: 14px; color: var(--muted); }
figure.shot figcaption strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 18px 0 24px;
  background: var(--panel);
}
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); color: var(--accent-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  border: 1px solid var(--line-strong);
  color: var(--accent-soft);
  background: rgba(79, 240, 183, 0.09);
  white-space: nowrap;
}
.badge.blue { color: var(--blue); border-color: rgba(131, 201, 255, 0.4); background: rgba(131, 201, 255, 0.09); }
.badge.warn { color: var(--warning); border-color: rgba(255, 207, 112, 0.4); background: rgba(255, 207, 112, 0.1); }
.badge.danger { color: var(--danger); border-color: rgba(255, 125, 134, 0.4); background: rgba(255, 125, 134, 0.1); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 22px 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 24px 58px;
  margin: 0;
  border-left: 2px solid var(--line);
  margin-left: 18px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -19px;
  top: -2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
}
.steps > li h3 { margin-top: 0; font-size: 18px; }
.steps > li p:last-child { margin-bottom: 0; }

details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 18px;
  margin: 10px 0;
}
details summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
  color: #eafff9;
}
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details p:last-child { margin-bottom: 14px; }

.download-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(79, 240, 183, 0.12), rgba(13, 29, 25, 0.9));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 18px 0;
}
.download-box p { margin: 0; font-size: 14px; color: var(--muted); }
.download-box strong { display: block; font-size: 17px; color: var(--text); margin-bottom: 2px; }
.download-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hash {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--accent-soft);
  overflow-wrap: anywhere;
  user-select: all;
}
pre {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  color: #c9f5e6;
  line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }

.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 14px;
}
.tile strong { display: block; font-size: 15px; margin-bottom: 3px; }
.tile span { color: var(--muted); font-size: 13px; }

.footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.footer a { color: #cfe9e1; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc ol { columns: 2; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .header-inner { padding: 10px 16px; gap: 10px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 2px; }
  .site-nav a { padding: 6px 9px; font-size: 13px; }
  .lang-switch { margin-left: auto; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 16px; }
  .grid-2, .grid-3, .figure-grid { grid-template-columns: minmax(0, 1fr); }
  .toc ol { columns: 1; }
  .steps > li { padding-left: 48px; margin-left: 14px; }
  .steps > li::before { left: -17px; width: 32px; height: 32px; font-size: 14px; }
  .download-box { flex-direction: column; align-items: flex-start; }
  .section { padding-top: 38px; }
  table { font-size: 13.5px; }
}

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