:root {
  color-scheme: light;
  --bg: #0d1b2a;
  --bg-2: #102437;
  --surface: #ffffff;
  --surface-soft: #eef5f3;
  --text: #17211f;
  --muted: #5f706d;
  --light: #f8fbff;
  --light-muted: #b9c9dc;
  --primary: #0f766e;
  --primary-strong: #2dd4bf;
  --border: #d7e3df;
  --danger: #a43d35;
  --ok: #16714f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% 0%, rgba(45, 212, 191, 0.14), transparent 340px),
    linear-gradient(180deg, var(--bg) 0, #0b1324 100%);
  color: var(--light);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 27, 42, 0.94);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 132px;
  height: auto;
}

.brand span {
  color: var(--light-muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a,
.button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.top-nav a {
  color: var(--light-muted);
}

.top-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--light);
}

.button-primary {
  background: var(--primary-strong);
  color: #05211f;
}

.button-muted {
  background: rgba(45, 212, 191, 0.16);
  color: #b6fff5;
}

.content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 30px;
  align-items: center;
  min-height: 390px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--light);
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 64ch;
  margin: 0;
  color: var(--light-muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.package-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 8px;
  background: var(--bg-2);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.24);
}

.package-panel img {
  width: 240px;
  max-width: 100%;
}

.panel-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(185, 201, 220, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.panel-row i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.15);
  color: var(--primary-strong);
}

.panel-row strong {
  display: block;
  color: var(--light);
  font-size: 14px;
}

.panel-row span {
  color: var(--light-muted);
  font-size: 13px;
}

.m-alert {
  margin: 18px 0;
}

.tools {
  max-width: 720px;
  margin: 24px 0;
}

.tools .m-label {
  color: var(--light);
}

.tools .m-field {
  border-color: rgba(185, 201, 220, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--light);
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.side-nav {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 6px;
}

.side-nav p {
  margin: 0 0 8px;
  color: var(--light-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-nav a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--light-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.side-nav a:hover {
  background: rgba(45, 212, 191, 0.14);
  color: var(--primary-strong);
}

.sections {
  display: grid;
  gap: 32px;
}

.doc-section {
  scroll-margin-top: 92px;
  padding-top: 4px;
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  color: var(--light);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: 0;
}

.section-head p:not(.eyebrow) {
  max-width: 78ch;
  margin: 0;
  color: var(--light-muted);
  line-height: 1.65;
}

.product-showcase {
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid rgba(185, 201, 220, 0.24);
  border-radius: 8px;
  background: #101b2f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.product-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(185, 201, 220, 0.18);
  background: #1f314b;
}

.product-toolbar span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.12);
  color: #d8f7f3;
  font-size: 12px;
  font-weight: 900;
}

.flow-preview {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 28px;
}

.flow-preview::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 9%;
  right: 9%;
  height: 2px;
  background: rgba(185, 201, 220, 0.55);
}

.flow-node {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #eef8ff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.flow-node-1 {
  background: #3279e6;
}

.flow-node-2 {
  background: #0f9f7a;
}

.flow-node-3 {
  background: #7c4ddf;
}

.flow-node-4 {
  background: #0b74c7;
}

.flow-node-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.flow-node-head strong {
  overflow: hidden;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.flow-node-head span {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.flow-node pre {
  margin: 0;
  overflow: hidden;
  color: rgba(238, 248, 255, 0.78);
  white-space: pre-wrap;
  font: 12px/1.45 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

.command-grid {
  margin-top: 14px;
}

.info-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.info-card h3 {
  margin: 0;
  font-size: 17px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.code-card {
  overflow: hidden;
  border: 1px solid rgba(185, 201, 220, 0.22);
  border-radius: 8px;
  background: #17211f;
}

.code-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #c5ded7;
}

.code-head button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}

.code-card pre {
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #e7f4ef;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.permission-table {
  display: grid;
  gap: 8px;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(80px, 0.55fr));
  gap: 8px;
}

.permission-row > div {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.permission-head > div {
  background: var(--surface-soft);
  font-weight: 900;
}

.yes {
  color: var(--ok) !important;
  font-weight: 900;
}

.no {
  color: var(--danger) !important;
  font-weight: 900;
}

.empty {
  padding: 28px;
  border: 1px dashed rgba(185, 201, 220, 0.3);
  border-radius: 8px;
  color: var(--light-muted);
  text-align: center;
}

.footer {
  padding: 16px 0;
  color: var(--light-muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .site-header-inner,
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    display: grid;
    align-items: start;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .side-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-preview::before {
    display: none;
  }
}

@media (max-width: 680px) {
  .card-grid,
  .command-grid,
  .permission-row,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .permission-head {
    display: none;
  }

  .brand img {
    width: 116px;
  }

  .hero h1 {
    max-width: 100%;
  }

  .flow-preview {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}
