/* Public developer API reference — layers on landing.css so the docs read as
   the same product as the marketing site: identical tokens, header, footer
   and type scale, plus a docs-only sidebar/endpoint vocabulary. */

.landing-docs-hero {
  max-width: var(--page-max, 1120px);
  margin: 0 auto;
  padding: clamp(2.25rem, 5vh, 3.25rem) var(--page-pad, 1.5rem) 1.5rem;
  animation: landing-rise 0.7s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .landing-docs-hero { animation: none; }
}

.landing-docs-hero h1 {
  margin: 0.55rem 0 0;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.landing-docs-hero .landing-tagline {
  margin-top: 0.75rem;
}

.docs-facts {
  margin: 1.6rem 0 0;
  max-width: 46rem;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  border: 1px solid var(--border-subtle, #1e1c1a);
  border-radius: calc(var(--radius) + 4px);
  background: var(--border-subtle, #1e1c1a);
  overflow: hidden;
}

.docs-fact {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  padding: 0.8rem 0.95rem;
  background: var(--surface, #161412);
}

.docs-fact dt {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-tertiary, #686560);
}

.docs-fact dd {
  margin: 0;
  min-width: 0;
}

.docs-fact code {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text, #edeae4);
  overflow-wrap: anywhere;
}

/* The manifest value is the one link in this block — without an explicit
   colour it falls back to the UA default, which is unreadable on the dark
   surface. */
.docs-fact a {
  color: var(--spot-gold, #e8c04a);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--spot-gold, #e8c04a) 40%, transparent);
  text-underline-offset: 0.2em;
}

.docs-fact a:hover {
  text-decoration-color: currentColor;
}

.docs-fact a code {
  color: inherit;
}

/* ---------- Two-column shell ---------- */

.docs-shell {
  max-width: var(--page-max, 1120px);
  margin: 0 auto;
  padding: 0 var(--page-pad, 1.5rem) 3.5rem;
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 940px) {
  .docs-shell {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 3rem;
  }
}

.docs-toc {
  position: sticky;
  top: 1.25rem;
  align-self: start;
  font-size: 0.86rem;
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
}

@media (max-width: 939px) {
  .docs-toc {
    position: static;
    max-height: none;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--border-subtle, #1e1c1a);
    border-radius: calc(var(--radius) + 4px);
    background: var(--surface, #161412);
  }
}

.docs-toc-title {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-tertiary, #686560);
}

.docs-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.docs-toc a {
  display: block;
  padding: 0.3rem 0.55rem;
  border-left: 2px solid transparent;
  color: var(--text-secondary, #9c9890);
  text-decoration: none;
  line-height: 1.35;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.docs-toc a:hover {
  color: var(--text, #edeae4);
  border-left-color: var(--border, #2a2824);
}

.docs-toc a.is-active {
  color: var(--spot-gold, #e8c04a);
  border-left-color: var(--spot-gold, #e8c04a);
}

/* ---------- Content sections ---------- */

.docs-body {
  min-width: 0;
  display: grid;
  gap: 3rem;
}

.docs-section {
  scroll-margin-top: 1.5rem;
}

.docs-section > h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.docs-section > p {
  margin: 0.65rem 0 0;
  max-width: 42rem;
  color: var(--text-secondary, #9c9890);
  font-size: 0.95rem;
  line-height: 1.6;
}

.docs-section a {
  color: var(--spot-gold, #e8c04a);
}

.docs-section h3 {
  margin: 2rem 0 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.docs-note {
  margin-top: 1.35rem;
  padding: 0.9rem 1.1rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border-subtle, #1e1c1a);
  border-left: 2px solid var(--spot-slate, #5eb8a8);
  background: var(--bg-elevated, #10100e);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary, #9c9890);
}

.docs-note strong { color: var(--text, #edeae4); }

.docs-note-warn {
  border-left-color: var(--spot-rust, #e85a38);
}

/* ---------- Code blocks ---------- */

.docs-code {
  position: relative;
  margin: 1.1rem 0 0;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border-subtle, #1e1c1a);
  background: var(--bg-elevated, #10100e);
  overflow: hidden;
}

.docs-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem 0.5rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle, #1e1c1a);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary, #686560);
}

.docs-copy {
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle, #1e1c1a);
  background: var(--surface, #161412);
  color: var(--text-secondary, #9c9890);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.docs-copy:hover {
  color: var(--spot-gold, #e8c04a);
  border-color: var(--border, #2a2824);
}

.docs-code pre {
  margin: 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text, #edeae4);
  tab-size: 2;
}

.docs-section p code,
.docs-table code,
.docs-note code,
.docs-endpoint-desc code {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.85em;
  padding: 0.1rem 0.32rem;
  border-radius: 3px;
  background: var(--surface-hover, #1c1a18);
  color: var(--text, #edeae4);
}

/* ---------- Endpoint cards ---------- */

.docs-endpoints {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.docs-endpoint {
  padding: 1.1rem 1.25rem 1.25rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border-subtle, #1e1c1a);
  background: var(--surface, #161412);
  transition: border-color 0.15s ease;
}

.docs-endpoint:hover {
  border-color: var(--border, #2a2824);
}

.docs-endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.docs-method {
  flex: none;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  border: 1px solid currentColor;
}

.docs-method-get { color: var(--spot-slate, #5eb8a8); background: var(--spot-slate-soft, rgba(94, 184, 168, 0.12)); }
.docs-method-post { color: var(--spot-gold, #e8c04a); background: var(--spot-gold-soft, rgba(232, 192, 74, 0.1)); }
.docs-method-put { color: var(--spot-rust, #e85a38); background: var(--spot-rust-soft, rgba(232, 90, 56, 0.12)); }

.docs-path {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.88rem;
  color: var(--text, #edeae4);
  word-break: break-all;
}

.docs-tag {
  margin-left: auto;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary, #686560);
  white-space: nowrap;
}

.docs-tag-public { color: var(--spot-slate, #5eb8a8); }
.docs-tag-async { color: var(--spot-gold, #e8c04a); }

.docs-endpoint-desc {
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary, #9c9890);
}

/* ---------- Parameter tables ---------- */

.docs-table-wrap {
  margin-top: 0.9rem;
  overflow-x: auto;
  border: 1px solid var(--border-subtle, #1e1c1a);
  border-radius: calc(var(--radius) + 2px);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 26rem;
}

.docs-table th,
.docs-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle, #1e1c1a);
}

.docs-table tr:last-child td { border-bottom: none; }

.docs-table th {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary, #686560);
  background: var(--bg-elevated, #10100e);
}

.docs-table td { color: var(--text-secondary, #9c9890); line-height: 1.5; }

.docs-req {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.72rem;
  color: var(--spot-rust, #e85a38);
}

.docs-opt {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.72rem;
  color: var(--text-tertiary, #686560);
}

/* ---------- Status / error list ---------- */

.docs-statuses {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.docs-statuses li {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle, #1e1c1a);
  background: var(--surface, #161412);
  font-size: 0.9rem;
  color: var(--text-secondary, #9c9890);
  line-height: 1.5;
}

.docs-statuses b {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.85rem;
  color: var(--spot-gold, #e8c04a);
}
