:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef6f5;
  --line: #dbe3ea;
  --line-strong: #c7d4dd;
  --text: #16202e;
  --muted: #617084;
  --primary: #0078a8;
  --primary-dark: #005c81;
  --teal: #0f9f8f;
  --green: #22855f;
  --amber: #a96300;
  --red: #bd3f38;
  --shadow: 0 18px 45px rgba(21, 45, 66, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

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

.docs-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  padding: 24px 20px;
}

.brand {
  display: flex;
  align-items: center;
  height: 46px;
  margin-bottom: 26px;
}

.brand img {
  display: block;
  max-width: 190px;
  max-height: 44px;
  object-fit: contain;
}

.nav-groups {
  display: grid;
  gap: 24px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group p {
  margin: 0 0 8px;
  color: #8a97a8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-group a {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 7px 10px;
  color: #445269;
  font-size: 14px;
  font-weight: 600;
}

.nav-group a:hover,
.nav-group a.active {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(260px, 520px) auto;
  gap: 20px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 251, 0.92);
  padding: 16px 36px;
  backdrop-filter: blur(14px);
}

.search {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 14px;
}

.search span {
  width: 15px;
  height: 15px;
  border: 2px solid #8190a3;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search span::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: #8190a3;
  transform: rotate(45deg);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 9px 0 9px 14px;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.top-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px 12px;
  color: #405069;
  font-size: 13px;
  font-weight: 700;
}

.top-actions a:hover {
  border-color: #91c9d8;
  color: var(--primary-dark);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 30px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 246, 245, 0.9)),
    linear-gradient(90deg, rgba(0, 120, 168, 0.09), rgba(15, 159, 143, 0.08));
  padding: 44px 36px 34px;
}

.intro-copy {
  max-width: 820px;
}

.eyebrow,
.breadcrumb {
  margin: 0 0 9px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.intro-copy h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 850;
}

.intro-copy p:last-child {
  max-width: 780px;
  margin: 14px 0 0;
  color: #4e6074;
  font-size: 17px;
}

.release-panel {
  display: grid;
  gap: 5px;
  border: 1px solid #b9dce0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.release-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.release-panel strong {
  font-size: 30px;
  line-height: 1.1;
}

.release-panel small {
  color: var(--muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 36px;
}

.quick-grid a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(32, 56, 78, 0.04);
}

.quick-grid a:hover {
  border-color: #9bcfd7;
  transform: translateY(-1px);
}

.quick-grid strong,
.quick-grid small {
  grid-column: 2;
}

.quick-grid strong {
  font-size: 15px;
}

.quick-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.tile-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e8f4f4;
  position: relative;
}

.user-icon::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  box-shadow: 0 17px 0 -7px var(--teal);
}

.pay-icon::before {
  content: "";
  width: 24px;
  height: 16px;
  border: 2px solid var(--primary);
  border-radius: 4px;
}

.pay-icon::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--primary);
  top: 16px;
}

.net-icon::before {
  content: "";
  width: 24px;
  height: 18px;
  border: 2px solid var(--amber);
  border-radius: 4px;
}

.net-icon::after {
  content: "";
  position: absolute;
  bottom: 9px;
  width: 14px;
  height: 2px;
  background: var(--amber);
}

.api-icon::before {
  content: "{ }";
  color: var(--red);
  font-size: 16px;
  font-weight: 900;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 30px;
  align-items: start;
  padding: 14px 36px 56px;
}

.article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-heading {
  border-bottom: 1px solid var(--line);
  padding: 30px 32px 24px;
}

.article-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.22;
}

.article-heading p:last-child,
.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.flow {
  display: grid;
  gap: 0;
  padding: 4px 32px 18px;
}

.flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.flow-step:last-child {
  border-bottom: 0;
}

.flow-step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e7f2fa;
  color: var(--primary-dark);
  font-weight: 850;
}

.flow-step h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

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

.callout {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  margin: 6px 32px 30px;
  border: 1px solid #aed6cf;
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #f0faf8;
  padding: 18px 20px;
}

.callout h3 {
  margin: 0 0 4px;
}

.callout p {
  margin: 0;
  color: #4c6570;
}

.callout a {
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
}

.section-heading {
  border-top: 1px solid var(--line);
  padding: 30px 32px 18px;
}

.payments-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 32px 34px;
}

.payment-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.payment-card img,
.integration-list img {
  display: block;
  max-width: 82px;
  max-height: 42px;
  object-fit: contain;
}

.payment-card strong,
.integration-list strong {
  display: block;
  color: #1b2839;
  font-size: 15px;
}

.payment-card small,
.integration-list small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.logo-fallback {
  display: grid;
  place-items: center;
  width: 58px;
  min-width: 58px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f5f8;
  color: #48647b;
  font-size: 14px;
  font-weight: 900;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 26px;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.status.ready {
  background: #e7f5ee;
  color: var(--green);
}

.status.check {
  background: #fff2df;
  color: var(--amber);
}

.integration-list {
  display: grid;
  gap: 10px;
  padding: 0 32px 34px;
}

.integration-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}

.integration-list div > img,
.integration-list div > .logo-fallback {
  grid-row: 1 / span 2;
}

.right-rail {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
}

.right-rail section {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.rail-title {
  margin: 0 0 4px;
  color: #8794a5;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.right-rail a {
  color: #42526a;
  font-size: 13px;
  font-weight: 700;
}

.right-rail a:hover {
  color: var(--primary-dark);
}

.metric-panel div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.metric-panel div:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.metric-panel strong {
  font-size: 24px;
}

.metric-panel span,
.tone-panel small {
  color: var(--muted);
  font-size: 13px;
}

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

.tone-panel .rail-title,
.tone-panel small {
  grid-column: 1 / -1;
}

.tone-panel span {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border-radius: 8px;
  background: #eef4f8;
  color: #40546a;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .docs-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .right-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .docs-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .topbar,
  .intro-band {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .quick-grid,
  .payments-grid,
  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .intro-band,
  .quick-grid,
  .content-layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .intro-copy h1 {
    font-size: 34px;
  }

  .nav-groups,
  .quick-grid,
  .payments-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .article-heading,
  .section-heading {
    padding-left: 20px;
    padding-right: 20px;
  }

  .flow,
  .payments-grid,
  .integration-list {
    padding-left: 20px;
    padding-right: 20px;
  }

  .callout {
    align-items: stretch;
    flex-direction: column;
    margin-left: 20px;
    margin-right: 20px;
  }

  .payment-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .payment-card .status {
    grid-column: 2;
    justify-self: start;
  }
}
