/* =========================================================
   iFound Hub — API docs
   ========================================================= */
body.docs { background: var(--bg); }

/* ── Public header on the docs page ──────────────────────────
   Mirrors the landing header, but lives in docs.css because the
   docs page deliberately doesn't load landing.css. */
.docs .lp-nav {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 14px;
  padding: 12px max(18px, calc((100% - 1240px) / 2));
  background: var(--glass); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
}
.docs .lp-nav .brand { padding: 0; border: 0; }
.docs .lp-nav-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.docs .lp-nav .brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.docs .lp-nav .brand-name { font-weight: 700; color: var(--text); }
.docs .lp-nav .brand-sub { font-size: 0.72rem; color: var(--text-soft); }
.docs .lp-theme-btn {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  display: grid; place-items: center; position: relative; cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}
.docs .lp-theme-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.docs .lp-theme-btn .material-symbols-outlined { font-size: 1.25rem; line-height: 1; }

.docs-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; max-width: 1240px; margin: 0 auto; padding: 30px 20px 80px; }
.docs-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
.docs-toc-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); font-weight: 700; margin: 18px 10px 8px; }
.docs-toc a {
  display: block; padding: 7px 12px; border-radius: 10px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  border-inline-start: 2px solid transparent;
}
.docs-toc a:hover { color: var(--text); background: var(--surface-2); }
.docs-toc a.is-active { color: var(--brand); background: var(--brand-soft); border-inline-start-color: var(--brand); }

.docs-main { min-width: 0; }
.docs-hero {
  border-radius: var(--radius-xl); padding: 32px; margin-bottom: 30px;
  background: linear-gradient(140deg, rgba(99,102,241,0.16), rgba(34,211,238,0.1)), var(--surface);
  border: 1px solid var(--border);
}
.docs-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 12px 0 8px; }
.docs-hero p { color: var(--text-muted); max-width: 70ch; margin-bottom: 16px; }
.docs-section { margin-bottom: 42px; scroll-margin-top: 90px; }
.docs-section h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.docs-section h2 .material-symbols-outlined { color: var(--brand); }
.docs-section > p { color: var(--text-muted); }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

.endpoint-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong); font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem; direction: ltr;
  max-width: 100%; flex-wrap: wrap; overflow-wrap: anywhere; min-width: 0;
}
.method { font-weight: 800; padding: 2px 8px; border-radius: 7px; font-size: 0.72rem; letter-spacing: 0.04em; }
.method-post { background: var(--success-soft); color: var(--success); }
.method-get { background: var(--info-soft); color: var(--info); }

.docs-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.docs-table th, .docs-table td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.docs-table th { color: var(--text-soft); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; }
.docs-table code { background: var(--surface-3); padding: 1px 7px; border-radius: 6px; color: var(--brand); font-size: 0.82rem; }
.docs-table tbody tr:hover { background: var(--surface-2); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { padding: 5px 12px; border-radius: 99px; font-weight: 600; font-size: 0.8rem; background: var(--surface-2); border: 1px solid var(--border); }
.pill code { color: var(--brand); }

.lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

.callout {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2); margin: 16px 0;
}
.callout .material-symbols-outlined { color: var(--brand); }
.callout.warn { border-color: rgba(245,158,11,0.4); background: var(--warn-soft); }
.callout.warn .material-symbols-outlined { color: var(--warn); }

.prompt-box {
  border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--grad-soft); border-bottom: 1px solid var(--border); }
.prompt-body { padding: 18px; max-height: 420px; overflow: auto; }
.prompt-body pre { margin: 0; white-space: pre-wrap; font-family: "JetBrains Mono", monospace; font-size: 0.82rem; line-height: 1.9; color: var(--text); direction: ltr; text-align: left; }

@media (max-width: 980px) {
  .docs-wrap { grid-template-columns: 1fr; }
  .docs-toc { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-toc-title { width: 100%; }
}
