:root {
  --bg: #080b10;
  --bg-soft: #0c1118;
  --panel: #0f151e;
  --panel-2: #121a25;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e9eef6;
  --muted: #9aa6b8;
  --muted-2: #6f7c8f;
  --accent: #8b7bff;
  --accent-strong: #6f5cff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --teal: #2bb8a6;
  --teal-soft: rgba(43, 184, 166, 0.12);
  --amber: #f0a35e;
  --amber-soft: rgba(240, 163, 94, 0.12);
  --blue: #5aa9ff;
  --blue-soft: rgba(90, 169, 255, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #c3b7ff;
  text-decoration-color: rgba(195, 183, 255, 0.45);
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent-strong);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 16, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.brand small {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  padding: 7px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

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

.site-nav a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.lang-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lang-switch:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Layout */
main {
  min-height: 60vh;
}

.section,
.page-head,
.hero,
.breadcrumbs,
.article {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.breadcrumbs {
  padding-top: 26px;
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted-2);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  padding-top: 76px;
  padding-bottom: 34px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -120px -40vw 0;
  z-index: -1;
  background:
    radial-gradient(720px 420px at 78% 0%, rgba(124, 92, 255, 0.28), transparent 62%),
    radial-gradient(620px 360px at 6% 88%, rgba(43, 184, 166, 0.14), transparent 64%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: #b9a8ff;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.35rem, 5.4vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-wrap: balance;
}

.lead {
  margin: 0 0 28px;
  max-width: 800px;
  color: #b4bfd0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
}

.btn:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-primary {
  background: linear-gradient(180deg, #816dff, #6a55f0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 30px rgba(111, 92, 255, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #8f7dff, #735ff5);
  border-color: transparent;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #c4cedd;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13.5px;
}

/* Sections */
.section {
  padding-top: 46px;
  padding-bottom: 18px;
}

.section.tight {
  padding-top: 28px;
}

.section h2,
.article h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section h3,
.article h3 {
  margin: 30px 0 10px;
  font-size: 1.22rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.section > p,
.article > p {
  max-width: 820px;
  color: #b8c2d1;
}

.section > p:first-of-type {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 14px;
}

/* Page head (non-home) */
.page-head {
  padding-top: 18px;
  padding-bottom: 18px;
}

.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}

.page-head .lead {
  margin-bottom: 10px;
}

/* Cards */
.grid {
  display: grid;
  gap: 16px;
  margin: 24px 0 10px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.card a {
  font-weight: 600;
}

.card .kicker {
  display: block;
  margin-bottom: 8px;
  color: #b9a8ff;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Callouts */
.callout {
  margin: 22px 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: #d5dce8;
  font-size: 15.5px;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 8px;
}

.callout strong {
  color: #fff;
}

.callout.note {
  border-left-color: var(--blue);
  background: var(--blue-soft);
}

.callout.tip {
  border-left-color: var(--teal);
  background: var(--teal-soft);
}

.callout.warn {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

/* Tables */
.table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: #dbe3ee;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td {
  color: #b8c2d1;
}

td strong {
  color: var(--text);
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 22px 0;
  padding: 0;
}

.steps > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 22px 52px;
  border-left: 1px solid var(--line);
  margin-left: 16px;
}

.steps > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: -2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: #d9d2ff;
  font-family: var(--mono);
  font-size: 13px;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15.5px;
}

/* Code */
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: #e2dcff;
}

pre {
  margin: 16px 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: #0a0f15;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  color: #cfd8e6;
  font-size: 14px;
}

/* Lists */
.article ul,
.article ol,
.section ul,
.section ol {
  padding-left: 22px;
}

.article li,
.section li {
  margin: 6px 0;
  color: #b8c2d1;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 28px;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-weight: 700;
}

/* Article */
.article {
  padding-top: 10px;
  padding-bottom: 30px;
}

.article h2 {
  margin-top: 38px;
  padding-top: 6px;
}

.article h3 {
  margin-top: 26px;
}

.article > h2:first-child {
  margin-top: 8px;
}

.article .lead {
  margin-bottom: 24px;
}

.article hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 34px 0;
}

/* FAQ */
.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.faq-item:first-of-type {
  border-top: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.faq-item p {
  margin: 0;
  color: #b8c2d1;
  font-size: 15.5px;
}

/* Footer */
.site-footer {
  margin-top: 54px;
  border-top: 1px solid var(--line);
  background: #070a0e;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-copy {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 14.5px;
}

.site-footer h2 {
  margin: 0 0 10px;
  color: #dbe3ee;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 6px 0;
}

.site-footer li a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
}

.site-footer li a:hover {
  color: var(--text);
}

.disclaimer {
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.6;
}

.footer-meta {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 18px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .site-nav a {
    font-size: 13.5px;
    padding: 6px 8px;
  }

  .lang-switch {
    margin-left: auto;
  }

  .hero {
    padding-top: 52px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .section,
  .page-head,
  .hero,
  .breadcrumbs,
  .article {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding-top: 40px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-inner {
    padding: 32px 18px 26px;
  }

  table {
    min-width: 520px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
