@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent: #008060;
  --accent-hover: #006e52;
  --accent-subtle: #d4f8d4;
  --accent-border: #008060;
  --brand-cyan: #00e8d9;
  --brand-sky: #00b9f2;
  --brand-blue: #1e90ff;
  --brand-navy: #0052cc;
  --brand-gradient: linear-gradient(135deg, #00e8d9 0%, #00b9f2 50%, #1e90ff 100%);
  --alert-bg: linear-gradient(135deg, rgba(0, 232, 217, 0.12) 0%, rgba(0, 185, 242, 0.12) 50%, rgba(30, 144, 255, 0.12) 100%);
  --sidebar-width: 300px;
  --toc-width: 300px;
  --topbar-height: 60px;
  --content-max: 860px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.75;
  color: var(--text-secondary);
  background: var(--bg);
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Top bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  z-index: 100;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.topbar-logo {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #000000;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  letter-spacing: -0.02em;
}

.topbar-logo:hover {
  color: #000000;
  text-decoration: none;
}

.topbar-logo-img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.topbar-logo-text {
  font-weight: 700;
  color: #000000;
  white-space: nowrap;
}

.topbar-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.topbar-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.topbar-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
}

/* Layout */
.docs-layout {
  display: flex;
  padding-top: var(--topbar-height);
  min-height: 100vh;
}

/* Sidebar — Mintlify-style */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
  background: var(--bg);
  padding: 1.5rem 0 3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-section {
  margin-bottom: 0.5rem;
}

.sidebar-section + .sidebar-section {
  margin-top: 1.5rem;
  padding-top: 0;
}

.sidebar-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: #000000;
  padding: 0 1.25rem;
  margin: 0 0 0.375rem;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem;
}

.sidebar-nav li {
  margin-bottom: 0.0625rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.4375rem 0.75rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  border-radius: 10px;
  border-left: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a:hover {
  color: #111827;
  background: #f3f4f6;
  text-decoration: none;
}

.sidebar-nav a.active {
  color: #111827;
  background: #f3f4f6;
  font-weight: 500;
}

/* Main content */
.content {
  margin-left: var(--sidebar-width);
  margin-right: var(--toc-width);
  flex: 1;
  padding: 3.5rem 3rem 5rem;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.content-inner {
  max-width: var(--content-max);
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* Right TOC — On this page */
.toc {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  width: var(--toc-width);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  padding: 2.5rem 1.5rem 2rem 1.75rem;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.toc-inner {
  position: sticky;
  top: 0;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.875rem;
  padding: 0;
}

.toc-title-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.toc-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc-nav li {
  margin: 0;
}

.toc-link {
  display: block;
  padding: 0.4375rem 0 0.4375rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.toc-link.active {
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--accent);
}

/* Typography — bold headings, generous spacing */
.content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 3rem 0 1rem;
  padding-top: 0;
  border-top: none;
  letter-spacing: -0.02em;
  color: var(--text);
  scroll-margin-top: calc(var(--topbar-height) + 1.5rem);
}

.content h2:first-of-type {
  margin-top: 2rem;
}

.content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.content p {
  margin: 0 0 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.content strong {
  font-weight: 700;
  color: var(--text);
}

.content ul,
.content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.625rem;
}

.content li {
  margin-bottom: 0.625rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.content li::marker {
  color: var(--text-muted);
  font-weight: 600;
}

.page-description {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 82, 204, 0.15);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  background: var(--alert-bg);
  border-radius: var(--radius-sm);
  line-height: 1.7;
}

/* Cards — Mintlify CardGroup style */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0 2.5rem;
}

.card {
  display: block;
  padding: 1.375rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.card-icon {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.card-title {
  font-weight: 700;
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.875rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.875rem 1rem;
  text-align: left;
}

th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--text);
}

td {
  color: var(--text-secondary);
}

td.check {
  text-align: center;
  color: var(--accent);
  font-weight: 700;
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.pricing-name {
  font-weight: 800;
  font-size: 1.125rem;
  margin: 0 0 0.375rem;
  color: var(--text);
}

.pricing-price {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 0.625rem;
  letter-spacing: -0.02em;
}

.pricing-price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-orders {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.pricing-card ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.pricing-card li {
  margin-bottom: 0.5rem;
}

/* Resource grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin: 2rem 0;
}

.resource-item {
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

/* Steps */
.steps {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0 0 2rem 3rem;
  counter-increment: step;
  margin-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
}

.steps li strong {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

/* Callout */
.callout {
  padding: 1.125rem 1.375rem;
  border-radius: var(--radius-sm);
  margin: 1.75rem 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.callout strong {
  font-weight: 700;
  color: var(--brand-navy);
}

.callout-info {
  border: 1px solid rgba(0, 82, 204, 0.18);
  background: var(--alert-bg);
  color: var(--text-secondary);
}

/* Doc screenshots */
.doc-screenshot {
  display: block;
  margin: 1.25rem 0 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  background: var(--bg-subtle);
  overflow: hidden;
  line-height: 0;
}

.doc-screenshot img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center top;
}

.doc-screenshots {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.doc-screenshots .doc-screenshot {
  margin: 0;
}

.content ol,
.content ul {
  max-width: 100%;
  min-width: 0;
}

.content ol > li,
.content ul > li {
  min-width: 0;
  max-width: 100%;
}

/* Footer */
.docs-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.docs-footer a {
  color: var(--text-muted);
  font-weight: 500;
}

/* Mobile */
@media (max-width: 1200px) {
  .toc {
    display: none;
  }

  .content {
    margin-right: 0;
  }
}

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

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 90;
    box-shadow: var(--shadow-md);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding: 2rem 1.5rem 3rem;
  }

  .content h1 {
    font-size: 1.875rem;
  }

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

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

@media (max-width: 480px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }
}
