/* Signals API docs (/api/). Page-local like /affiliates/affiliates.css so the shared marketing
   shell is unchanged. DM Sans is the only font on the site (founder 2026-09-19): code blocks use
   --font-mono, which aliases --font-sans; no monospace stack, no second family. */
@layer layout {
  .docs { max-width: var(--maxw); margin-inline: auto; padding: 88px var(--gutter) 112px; }
  .docs__hero { max-width: 760px; margin-bottom: 72px; }
  .docs__hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -.035em; }
  .docs__lead { max-width: 640px; margin-top: 22px; color: var(--muted); font-size: 1.2rem; line-height: 1.55; }
  .docs__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
  .docs__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; padding: 0; list-style: none; color: var(--muted); font-size: .9375rem; }
  .docs__facts li { display: flex; align-items: center; gap: 8px; }
  .docs__facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

  .docs__body { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 72px; align-items: start; }
  .docs__toc { position: sticky; top: calc(var(--nav-height) + 28px); }
  .docs__toc h2 { font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
  .docs__toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .docs__toc a { display: block; padding: 10px 0 10px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); font-size: .9375rem; line-height: 1.4; }
  .docs__toc a:hover, .docs__toc a:focus-visible { color: var(--text); border-left-color: var(--line-strong); }
  @media (min-width: 1024px) { .docs__toc a[aria-current="true"] { color: var(--text); border-left-color: var(--accent); } } /* desktop rail only; the phone pill row stays unstyled */

  .docs__section + .docs__section { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
  .docs__section h2 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 18px; }
  .docs__section h3 { font-size: 1.125rem; line-height: 1.3; margin: 30px 0 10px; }
  .docs__section p, .docs__section li, .docs__section dd { color: var(--muted); font-size: 1.0625rem; line-height: 1.7; }
  .docs__section p { margin-bottom: 16px; }
  .docs__section ul { margin: 0 0 16px; padding-left: 22px; }
  .docs__section li { margin-bottom: 8px; }
  .docs__section li::marker { color: var(--faint); }
  .docs__section strong { color: var(--text); font-weight: 600; }
  .docs__section dl { margin: 0 0 16px; }
  .docs__section dt { color: var(--text); margin-top: 16px; }
  .docs__section dd { margin: 4px 0 0; }

  .docs code { font-family: var(--font-mono); font-size: .9375em; color: var(--text); background: #ffffff0f; border-radius: 6px; padding: 1px 7px; overflow-wrap: anywhere; }
  .code { margin: 18px 0 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
  .code__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 18px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: .8125rem; }
  .code pre { margin: 0; padding: 18px 20px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.6; color: var(--text); tab-size: 2; }
  .code pre code { background: none; border: 0; padding: 0; font-size: inherit; }
  .code .k { color: var(--accent-2); }
  .code .s { color: var(--accent); }
  .code .c { color: var(--faint); }

  .params { width: 100%; border-collapse: collapse; margin: 18px 0 24px; }
  .params th { text-align: left; font-weight: 500; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 20px 12px 0; border-bottom: 1px solid var(--line-strong); }
  .params td { vertical-align: top; padding: 14px 20px 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 1rem; line-height: 1.6; }
  .params th:last-child, .params td:last-child { padding-right: 0; }
  .params td:first-child { color: var(--text); white-space: nowrap; }
  .params tr:last-child td { border-bottom: 0; }

  .docs__note { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--grad-soft); }
  .docs__note p:last-child { margin-bottom: 0; }

  @media (max-width: 1023px) {
    .docs { padding-block: 64px 80px; }
    .docs__hero { margin-bottom: 48px; }
    .docs__body { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .docs__toc { position: static; }
    .docs__toc ol { display: flex; flex-wrap: wrap; gap: 8px; border: 0; }
    .docs__toc a { padding: 10px 14px; margin: 0; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; }
    .docs__toc a:hover, .docs__toc a:focus-visible { border-color: var(--line-strong); }
  }
  @media (max-width: 639px) {
    .docs__hero h1 { font-size: 2.25rem; }
    .docs__lead { font-size: 1.0625rem; }
    .docs__actions .btn { width: 100%; }
    .code pre { padding: 16px; font-size: .875rem; }
  }
}
