:root {
  color-scheme: dark;
  --bg: #07110d;
  --panel: #101a20;
  --panel-2: #122019;
  --text: #f5fff9;
  --muted: #b5c5bb;
  --line: #2d4437;
  --line-soft: #1c3026;
  --accent: #48e0a2;
  --accent-strong: #10b981;
  --danger: #ffaaa5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(72, 224, 162, 0.08), transparent 360px),
    radial-gradient(circle at top right, rgba(72, 224, 162, 0.14), transparent 420px);
}
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 17, 13, 0.88);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img {
  border: 1px solid var(--line);
  background: #08110d;
}
.brand span { display: grid; line-height: 1.1; }
.brand strong { color: var(--accent); font-size: 1.6rem; }
.brand small { color: var(--muted); font-weight: 800; text-transform: uppercase; }
nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
nav a,
.button {
  border: 1px solid var(--line);
  padding: 10px 13px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 850;
}
nav a:hover,
.button:hover { border-color: var(--accent); color: var(--accent); }
main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.hero {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: 72px 0 64px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}
h2 { margin: 0; font-size: clamp(1.9rem, 3vw, 3.2rem); line-height: 1; }
h3 { margin: 0 0 8px; font-size: 1.05rem; }
.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #06110d; }
.button.ghost { background: transparent; color: var(--text); }
.hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(16, 26, 32, 0.82);
}
.hero-panel div,
.cards article,
.timeline article,
.example-card,
.two-columns article,
.glossary div,
.faq-list details,
.notice {
  border: 1px solid var(--line);
  background: rgba(16, 26, 32, 0.82);
}
.hero-panel div { display: grid; gap: 6px; padding: 16px; }
.hero-panel span { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 0.78rem; }
.hero-panel strong { font-size: 1.3rem; }
.content-section,
.section-grid { padding: 72px 0; border-top: 1px solid var(--line-soft); }
.section-head { margin-bottom: 24px; }
.section-head h2 { max-width: 780px; }
.intro-grid,
.cards,
.two-columns,
.glossary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.intro-grid article,
.cards article,
.two-columns article,
.glossary div,
.faq-list details { padding: 18px; }
article p,
.notice,
dd,
summary + p { color: var(--muted); }
.timeline { display: grid; gap: 12px; }
.timeline article {
  display: grid;
  grid-template-columns: 42px minmax(150px, 220px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 16px;
}
.timeline span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #06110d;
  font-weight: 950;
}
.timeline p { margin: 0; color: var(--muted); }
.notice { margin-top: 16px; padding: 16px; color: var(--muted); }
.notice strong { color: var(--text); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}
.steps { display: grid; gap: 10px; padding-left: 22px; color: var(--muted); }
.example-card strong { display: block; color: var(--accent); margin-top: 18px; font-size: 1.15rem; }
.compliance-cards article { background: rgba(18, 32, 25, 0.9); }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.glossary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
dt { color: var(--accent); font-weight: 900; }
dd { margin: 6px 0 0; }
.faq-list { display: grid; gap: 12px; }
summary { cursor: pointer; font-weight: 900; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer a { color: var(--accent); text-decoration: none; font-weight: 850; }
@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .hero,
  .intro-grid,
  .cards,
  .split,
  .two-columns,
  .glossary { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 48px; }
  .timeline article { grid-template-columns: 42px minmax(0, 1fr); }
  .timeline article p { grid-column: 2; }
}
@media (max-width: 560px) {
  main { width: min(100% - 24px, 1180px); }
  h1 { font-size: 2.5rem; }
  nav a, .button { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; }
}

.doc-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  width: min(1360px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.doc-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 26, 32, 0.82);
}

.doc-sidebar strong {
  margin: 10px 0 2px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.doc-sidebar a {
  padding: 8px 10px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-weight: 820;
}

.doc-sidebar a:hover {
  border-color: var(--line);
  color: var(--accent);
  background: rgba(72, 224, 162, 0.06);
}

.doc-main {
  min-width: 0;
}

.doc-search {
  position: sticky;
  top: 86px;
  z-index: 5;
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 17, 13, 0.94);
  backdrop-filter: blur(12px);
}

.doc-search label {
  display: grid;
  gap: 8px;
}

.doc-search span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.doc-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: #08110d;
  color: var(--text);
  font: inherit;
  font-weight: 760;
  outline: 0;
}

.doc-search input:focus {
  border-color: var(--accent);
}

.search-results {
  display: grid;
  gap: 8px;
}

.search-results:empty {
  display: none;
}

.search-results a,
.search-results p {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  text-decoration: none;
}

.search-results strong {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  text-transform: none;
}

.search-results a span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-transform: none;
}

.doc-hero {
  min-height: 420px;
  display: grid;
  align-content: center;
  padding: 48px 0 56px;
}

.doc-card-grid {
  padding: 0 0 56px;
  border-top: 0;
}

.doc-card-grid a {
  color: var(--accent);
  text-decoration: none;
}

.doc-article {
  max-width: 920px;
  padding-bottom: 72px;
}

.doc-article h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.doc-section {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(16, 26, 32, 0.82);
}

.doc-section h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.doc-section p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 980px) {
  .doc-shell {
    grid-template-columns: 1fr;
  }

  .doc-sidebar,
  .doc-search {
    position: static;
  }

  .doc-sidebar {
    max-height: none;
  }
}

.header-app-link {
  border: 1px solid var(--line);
  padding: 10px 13px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 850;
}

.header-app-link:hover {
  border-color: var(--accent);
  background: rgba(72, 224, 162, 0.08);
}

.doc-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.doc-list li::marker {
  color: var(--accent);
  font-weight: 900;
}

.steps-list {
  counter-reset: doc-step;
}

.doc-callout {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--accent);
  background: rgba(72, 224, 162, 0.08);
  color: var(--text);
  font-weight: 760;
}

.doc-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.doc-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.doc-table th,
.doc-table td {
  border: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  color: var(--accent);
  background: rgba(72, 224, 162, 0.06);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.doc-table td {
  color: var(--muted);
}

.code-block {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: #050b08;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
}

.code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--line);
  background: rgba(8, 14, 11, 0.28);
}

.lang-switcher a {
  min-width: 42px;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 900;
}

.lang-switcher a:last-child {
  border-right: 0;
}

.lang-switcher a.active,
.lang-switcher a:hover {
  color: #06110d;
  background: var(--accent);
}
