:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-2: #0d1728;
  --panel: #111c2f;
  --line: #22304a;
  --text: #f4f7fb;
  --muted: #a8b4c6;
  --soft: #718096;
  --accent: #22c8b8;
  --accent-2: #3b82f6;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7fafc;
  --bg-2: #eef4f9;
  --panel: #ffffff;
  --line: #d8e0ea;
  --text: #172033;
  --muted: #536175;
  --soft: #718096;
  --accent: #0f9f91;
  --accent-2: #2563eb;
  --warn: #b7791f;
  --danger: #c53030;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 200, 184, 0.12), transparent 32rem),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
pre {
  font-family: Consolas, "Courier New", monospace;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 17, 31, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

[data-theme="light"] .topbar {
  background: rgba(247, 250, 252, 0.9);
  border-bottom-color: rgba(23, 32, 51, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #178f83);
  box-shadow: 0 12px 28px rgba(34, 200, 184, 0.22);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

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

.nav-links a[aria-current="true"] {
  color: var(--accent);
}

.theme-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  align-items: center;
  gap: 70px;
  min-height: calc(100vh - 72px);
  padding: 76px 0 88px;
}

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

h1 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 740px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 21px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  border-color: transparent;
  background: var(--accent);
  color: white;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.02);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 54px;
  max-width: 760px;
}

.metric,
.card,
.mini-card,
.code-card {
  border: 1px solid var(--line);
  background: rgba(17, 28, 47, 0.72);
  border-radius: 10px;
}

[data-theme="light"] .metric,
[data-theme="light"] .card,
[data-theme="light"] .mini-card,
[data-theme="light"] .code-card {
  background: rgba(255, 255, 255, 0.9);
}

.metric {
  padding: 22px;
}

.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.hero-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 28, 47, 0.72);
  box-shadow: var(--shadow);
}

[data-theme="light"] .hero-panel {
  background: rgba(255, 255, 255, 0.86);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(34, 200, 184, 0.12);
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.mini-card {
  padding: 18px;
}

.mini-card svg {
  width: 23px;
  height: 23px;
  margin-bottom: 18px;
  stroke: var(--accent);
}

.mini-card span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mini-card strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.activity {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.activity-title {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.activity-title strong {
  color: var(--text);
  font-size: 16px;
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .activity-row {
  background: #f4f8fb;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.dot-warn {
  background: var(--warn);
}

.dot-blue {
  background: var(--accent-2);
}

.activity-main {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.activity-row code {
  color: var(--muted);
  font-weight: 700;
}

.page-section {
  padding: 86px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .page-section {
  border-top-color: rgba(23, 32, 51, 0.08);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cards.two {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  padding: 24px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.card p,
.card li {
  color: var(--muted);
}

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.flow-step {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.flow-step span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(34, 200, 184, 0.13);
  color: var(--accent);
  font-weight: 900;
}

.flow-step h3 {
  margin: 22px 0 6px;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
}

.api-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.endpoint {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.endpoint:last-child {
  border-bottom: 0;
}

.method {
  display: inline-flex;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent-2);
  font-weight: 900;
  font-size: 12px;
}

.method.post {
  background: rgba(34, 200, 184, 0.14);
  color: var(--accent);
}

.method.put {
  background: rgba(245, 158, 11, 0.14);
  color: var(--warn);
}

.method.delete {
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #070d18;
  color: #dbeafe;
}

[data-theme="light"] pre {
  background: #172033;
}

.footer {
  padding: 36px 0 60px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer .shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer a {
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 920px) {
  .hero,
  .api-grid {
    grid-template-columns: 1fr;
  }

  .cards,
  .cards.two,
  .flow,
  .metrics,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: 46px;
  }

  .lead {
    font-size: 18px;
  }

  .section-head,
  .footer .shell {
    display: block;
  }

  .section-head p,
  .footer a {
    display: block;
    margin-top: 14px;
  }
}
