:root {
  color-scheme: light;
  --bg-a: #f5f8ff;
  --bg-b: #eefaf6;
  --bg-c: #fff7e9;
  --text: #1d2433;
  --muted: #667185;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(67, 92, 123, 0.18);
  --primary: #4768e8;
  --primary-strong: #2f52d6;
  --green: #10a879;
  --amber: #d59219;
  --rose: #d95770;
  --code-bg: #111827;
  --code-text: #d1fae5;
  --shadow: 0 24px 70px rgba(55, 73, 104, 0.18);
}

:root.dark {
  color-scheme: dark;
  --bg-a: #111827;
  --bg-b: #10231f;
  --bg-c: #281f12;
  --text: #eef3ff;
  --muted: #a9b4c7;
  --surface: rgba(21, 29, 43, 0.78);
  --surface-strong: rgba(24, 34, 50, 0.94);
  --border: rgba(169, 187, 213, 0.18);
  --primary: #7c9bff;
  --primary-strong: #9db2ff;
  --green: #52d7ad;
  --amber: #f0b849;
  --rose: #ff8397;
  --code-bg: #090f1d;
  --code-text: #c8facc;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 16% 18%, rgba(71, 104, 232, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 16%, rgba(16, 168, 121, 0.15), transparent 24rem),
    linear-gradient(135deg, var(--bg-a), var(--bg-b) 48%, var(--bg-c));
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.topbar,
.promise-panel,
.info-card,
.tutorial-shell,
.step-card,
.endpoint-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  padding: 12px 16px;
}

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

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(71, 104, 232, 0.18), rgba(16, 168, 121, 0.2));
}

.brand-mark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-link,
.icon-button,
.copy-button,
.copy-snippet,
.primary-action,
.secondary-action,
.tab-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.ghost-link,
.icon-button,
.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.32);
  padding: 0 14px;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.admin-entry span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.42;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
  min-height: clamp(560px, 76vh, 740px);
  padding: 44px 0 28px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-title p {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 7.4vw, 6.3rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 800;
}

.primary-action {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: #fff;
  box-shadow: 0 16px 34px rgba(71, 104, 232, 0.24);
}

.secondary-action {
  background: var(--surface-strong);
}

.promise-panel {
  border-radius: 24px;
  padding: 24px;
}

.panel-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-weight: 800;
}

.pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(16, 168, 121, 0.12);
}

.promise-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.promise-list article,
.metric-row article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
}

.promise-list strong,
.promise-list span {
  display: block;
}

.promise-list span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.62;
}

.endpoint-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: none;
}

.endpoint-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.endpoint-card code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--primary-strong);
  font-size: 0.96rem;
}

.copy-button,
.copy-snippet {
  background: rgba(71, 104, 232, 0.1);
  color: var(--primary-strong);
  padding: 0 14px;
  font-weight: 800;
}

.assurance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px 0 52px;
}

.info-card {
  min-height: 214px;
  border-radius: 22px;
  padding: 24px;
}

.card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
}

.accent-blue .card-icon {
  background: linear-gradient(135deg, var(--primary), #5aa1ff);
}

.accent-green .card-icon {
  background: linear-gradient(135deg, var(--green), #72c78f);
}

.accent-amber .card-icon {
  background: linear-gradient(135deg, var(--amber), #efc45d);
}

.accent-rose .card-icon {
  background: linear-gradient(135deg, var(--rose), #ef8aa0);
}

.info-card h3 {
  margin: 22px 0 10px;
  font-size: 1.26rem;
}

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

.tutorial-section {
  padding: 24px 0 10px;
}

.section-title {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: 0;
}

.section-title span {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.72;
}

.tutorial-shell {
  border-radius: 26px;
  padding: 18px;
}

.tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.25);
}

.tool-tabs {
  margin-top: 12px;
}

.tab-button {
  flex: 0 1 auto;
  font-weight: 800;
}

.tab-button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: #fff;
  box-shadow: 0 10px 24px rgba(71, 104, 232, 0.18);
}

.tutorial-content {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.tutorial-head {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}

.tutorial-head h3 {
  margin-bottom: 0;
  font-size: 1.38rem;
}

.tutorial-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.68;
}

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

.step-card {
  min-width: 0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: none;
}

.step-card.full {
  grid-column: 1 / -1;
}

.step-label {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: rgba(71, 104, 232, 0.1);
  color: var(--primary-strong);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.step-card h4 {
  margin: 14px 0 10px;
  font-size: 1.08rem;
}

.step-card p,
.step-card li {
  color: var(--muted);
  line-height: 1.66;
}

.step-card ul,
.step-card ol {
  margin: 0;
  padding-left: 1.25rem;
}

.step-card h5 {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 0.98rem;
}

.muted-text {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--muted);
}

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

.substep {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.28);
  padding: 14px;
}

.substep h5 {
  margin-top: 0;
}

.substep p:last-child,
.note-box p:last-child {
  margin-bottom: 0;
}

.code-block {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-block pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
}

.code-block code {
  color: var(--code-text);
  font-family:
    "Cascadia Code",
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.88rem;
  line-height: 1.72;
}

.copy-snippet {
  position: absolute;
  right: 12px;
  top: 12px;
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.note-box {
  margin-top: 14px;
  border: 1px solid rgba(16, 168, 121, 0.3);
  border-radius: 16px;
  background: rgba(16, 168, 121, 0.08);
  color: var(--muted);
  padding: 14px;
  line-height: 1.68;
}

.note-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.priority-step {
  border-color: rgba(71, 104, 232, 0.28);
  background: var(--surface-strong);
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.26);
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  padding: 14px;
}

.faq-list details > p,
.faq-list .code-block {
  margin: 0 14px 14px;
}

footer {
  display: block;
  padding: 34px 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.ghost-link:hover,
.icon-button:hover,
.copy-button:hover,
.copy-snippet:hover,
.primary-action:hover,
.secondary-action:hover,
.tab-button:hover {
  transform: translateY(-1px);
  border-color: rgba(71, 104, 232, 0.45);
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 42px;
  }

  .assurance-grid,
  .step-grid,
  .substep-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .ghost-link {
    flex: 1 1 auto;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .promise-panel,
  .info-card,
  .tutorial-shell,
  .step-card {
    border-radius: 18px;
    padding: 18px;
  }

  .endpoint-card {
    grid-template-columns: 1fr;
  }

  .tab-button {
    flex: 1 1 auto;
  }
}
