:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #475569;
  --line: #cbd5e1;
  --surface: #ffffff;
  --page: #f6f8fb;
  --teal: #0f766e;
  --blue: #2563eb;
  --amber: #d97706;
  --red: #b91c1c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  text-decoration: none;
}

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

.overview {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: 40px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 32px 28px;
}

.overview-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 18px;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.button.secondary {
  background: #ffffff;
  color: var(--ink);
}

.architecture {
  margin: 0;
  min-width: 0;
}

.architecture img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.architecture figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 28px;
}

.status-band div {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.status-band strong,
.status-band span {
  display: block;
}

.status-band strong {
  margin-bottom: 4px;
}

.status-band span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 14px;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 32px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-note {
  max-width: 780px;
  color: var(--muted);
}

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

.contract-grid {
  grid-template-columns: 1fr;
}

.capability-card,
.example-card,
.guide-card,
.deploy-item {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.capability-card p,
.example-card p,
.guide-card p,
.deploy-item p,
.split p {
  color: var(--muted);
}

.guide-grid,
.example-grid,
.ownership-grid {
  display: grid;
  gap: 18px;
}

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

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

.step-badge {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.info-panel {
  min-width: 0;
  margin-top: 22px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.endpoint-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.endpoint-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

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

.endpoint-table th {
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
}

.endpoint-table td {
  color: var(--muted);
  font-size: 14px;
}

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

.guide-split {
  margin-top: 22px;
}

.example-card .code-block,
.guide-card .code-block {
  margin-top: 14px;
}

.capability-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.capability-title code {
  flex: 0 1 auto;
  margin-top: 4px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contract-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0 22px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.contract-meta div {
  min-width: 0;
  padding: 12px 14px;
  background: #f8fafc;
}

.contract-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contract-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
}

.schema-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.schema-section {
  min-width: 0;
}

.schema-section h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0;
}

.schema-block {
  max-height: 430px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #111827;
  border-radius: 8px;
  white-space: pre;
}

.schema-block code {
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.55;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-bottom: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.tag.sms {
  background: var(--blue);
}

.tag.weather {
  background: var(--amber);
}

code {
  overflow-wrap: anywhere;
  color: #111827;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.check-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  margin: 0 0 10px;
  padding-left: 22px;
  color: var(--ink);
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.code-block {
  min-width: 0;
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  white-space: pre;
  background: #111827;
  border-radius: 8px;
}

.code-block.compact {
  padding: 14px;
}

.code-block code {
  color: #e5e7eb;
}

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 70px;
}

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

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .overview,
  .split,
  .deploy-grid,
  .capability-grid,
  .capability-title,
  .contract-meta,
  .example-grid,
  .guide-grid,
  .ownership-grid,
  .schema-grid,
  .status-band {
    grid-template-columns: 1fr;
  }

  .capability-title {
    display: grid;
  }

  .overview {
    padding: 36px 20px 20px;
  }

  .section,
  .status-band {
    padding-left: 20px;
    padding-right: 20px;
  }

  .capability-card,
  .example-card,
  .guide-card,
  .info-panel,
  .deploy-item {
    padding: 18px;
  }

  .endpoint-table {
    min-width: 680px;
  }

  .code-block,
  .schema-block {
    padding: 14px;
  }

  h1 {
    font-size: 36px;
  }

  .lede {
    font-size: 17px;
  }
}
