:root {
  --bg: #f7f8fb;
  --text: #172033;
  --muted: #647085;
  --line: #dde3ec;
  --brand: #1267d8;
  --brand-dark: #0f4fa5;
  --accent: #139a72;
  --card: #ffffff;
  --danger: #b3261e;
  --success: #137333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--brand);
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  background: linear-gradient(135deg, #09213f 0%, #1267d8 55%, #13a67b 100%);
  color: white;
  border-radius: 8px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 1.02;
  margin: 8px 0 18px;
  max-width: 900px;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
  color: var(--accent);
  font-size: 0.82rem;
}

.hero .eyebrow {
  color: #bff7e7;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.btn:hover {
  background: var(--brand-dark);
}

.btn.ghost {
  background: white;
  color: var(--brand);
}

.btn.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.9rem;
}

.hero-panel,
.card,
.metric,
.features article,
.provider {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero .metric span {
  color: #5b6878;
}

.metric strong,
.big {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.1;
  margin-top: 6px;
}

.features,
.stats,
.provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.features article,
.card,
.provider {
  padding: 20px;
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.16;
}

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

.form-wrap {
  min-height: 65vh;
  display: grid;
  place-items: center;
}

.form-card {
  width: min(100%, 460px);
}

label {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  color: #344054;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  background: white;
  color: var(--text);
}

textarea {
  resize: vertical;
}

.flash {
  margin: 0 auto 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #e8f0fe;
  color: var(--brand-dark);
}

.flash.danger {
  background: #fce8e6;
  color: var(--danger);
}

.flash.success {
  background: #e6f4ea;
  color: var(--success);
}

.dashboard-head,
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.dashboard-head {
  align-items: center;
}

.stack {
  display: grid;
  gap: 10px;
}

.api-key,
pre {
  display: block;
  width: 100%;
  overflow-x: auto;
  background: #101828;
  color: #d1fadf;
  border-radius: 8px;
  padding: 14px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  color: #475467;
  font-size: 0.9rem;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
  width: auto;
  min-width: 120px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

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

.provider-form {
  display: grid;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  padding: 4px 9px;
  font-size: 0.86rem;
  font-weight: 700;
}

.docs {
  max-width: 820px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 48px);
}

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

  .hero,
  .dashboard-head,
  .grid-two,
  .features,
  .stats,
  .provider-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 28px 20px;
  }

  .nav {
    width: 100%;
  }
}
