/* docs.css — shared styles for /docs pages */
/* All values use tokens from landing.css — no hardcoded colors or raw px outside the token system. */

/* ---- DOC PAGE HEADER ---- */
.doc-hero {
  background: linear-gradient(135deg, #08104d 0%, #1a3a8f 50%, #2960dd 100%);
  padding: 40px 40px 36px;
}
.doc-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.doc-breadcrumb {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.doc-breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.doc-breadcrumb a:hover {
  color: rgba(255,255,255,0.85);
}
.doc-breadcrumb-sep {
  margin: 0 8px;
  opacity: 0.4;
}
.doc-hero h1 {
  color: #ffffff;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 200;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.doc-hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  max-width: 520px;
}

/* ---- DOC NAV ACTIVE STATE ---- */
nav .btn-ghost.active {
  background: var(--bg);
  border-color: #9ca3af;
  color: var(--text);
}

/* ---- DOC LAYOUT ---- */
.doc-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 40px 64px;
}

/* ---- GETTING STARTED PAGE ---- */
.doc-section {
  margin-bottom: 48px;
}
.doc-section:last-child {
  margin-bottom: 0;
}
.doc-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.doc-section p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 14px;
}
.doc-section p:last-child {
  margin-bottom: 0;
}

/* Quick reference table */
.doc-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 14px;
}
.doc-ref-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 8px 12px;
  background: var(--border-2);
  border: 1px solid var(--border);
}
.doc-ref-table td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}
.doc-ref-table tr:nth-child(even) td {
  background: var(--bg);
}

/* Auth flow steps */
.doc-steps {
  list-style: none;
  margin: 0 0 14px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.doc-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.doc-step-body {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
  padding-top: 2px;
}
.doc-step-body strong {
  color: var(--text);
}

/* Requirements list */
.doc-req-list {
  list-style: none;
  margin: 0 0 14px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.doc-req-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
}
.doc-req-item::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 7px;
}

/* Client setup cards */
.doc-clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.doc-client-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px 20px;
}
.doc-client-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.doc-client-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.doc-client-card .setup-code-block {
  font-size: 11px;
  margin-bottom: 10px;
}
.doc-client-card .setup-directory-link {
  font-size: 12px;
}

/* Schema card in sidebar */
.sidebar-schema-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px 14px;
  margin-bottom: 20px;
}
.sidebar-schema-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 5px;
}
.sidebar-schema-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
}
.sidebar-schema-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  background: var(--blue);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  transition: background .15s;
}
.sidebar-schema-link:hover {
  background: var(--blue-dark);
}

/* ---- TOOLS PAGE ---- */
.tools-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
.tools-sidebar {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding-bottom: 24px;
}
.sidebar-group {
  margin-bottom: 20px;
}
.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
  padding: 0 4px;
}
.sidebar-link {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: var(--r-pill);
  line-height: 1.4;
  transition: background .1s, color .1s;
}
.sidebar-link:hover {
  background: var(--bg);
  color: var(--text);
}
.sidebar-link.active {
  background: var(--border-2);
  color: var(--blue);
  font-weight: 600;
}

/* Tool cards */
.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 24px;
  overflow: hidden;
}
.tool-card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg);
}
.tool-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Monaco', 'Menlo', monospace;
  margin-bottom: 6px;
}
.tool-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.tool-card-body {
  padding: 16px 20px;
}
.tool-schema-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
  margin-top: 16px;
}
.tool-schema-label:first-child {
  margin-top: 0;
}

/* Schema tables */
.tool-schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.tool-schema-table th {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 7px 10px;
  background: var(--border-2);
  border: 1px solid var(--border);
}
.tool-schema-table td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.5;
}
.tool-schema-table tr:nth-child(even) td {
  background: var(--bg);
}
.tool-param-name {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 11.5px;
  color: var(--text);
  white-space: nowrap;
}
.tool-param-required {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
}
.tool-param-type {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 11px;
  color: var(--blue);
}
.tool-param-default {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* Category group header */
.tool-category-header {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.tool-category-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.tool-category-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---- ERRORS PAGE ---- */
.error-code-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.error-code-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px 18px;
}
.error-code-badge {
  display: inline-block;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  font-weight: 600;
  background: var(--dark);
  color: #7dd3fc;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 8px;
}
.error-code-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
}

.error-field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
.error-field-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 8px 12px;
  background: var(--border-2);
  border: 1px solid var(--border);
}
.error-field-table td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.6;
}
.error-field-table tr:nth-child(even) td {
  background: var(--bg);
}
.error-field-name {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}
.error-field-type {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 11.5px;
  color: var(--blue);
  white-space: nowrap;
}

.notice-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--r);
  padding: 14px 16px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.65;
  margin-bottom: 24px;
}
.notice-box strong {
  font-weight: 700;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .doc-body {
    padding: 24px 20px 48px;
  }
  .doc-hero {
    padding: 32px 20px 28px;
  }
  .tools-layout {
    grid-template-columns: 1fr;
  }
  .tools-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .doc-clients-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .doc-ref-table th,
  .doc-ref-table td,
  .error-field-table th,
  .error-field-table td,
  .tool-schema-table th,
  .tool-schema-table td {
    padding: 6px 8px;
  }
}
