/* CleanSignals documentation pages (generated by tools/build-docs.mjs) */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding-top: 32px; padding-bottom: 80px; }
body > .nav { position: sticky; }
[hidden] { display: none !important; }
.side { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; display: grid; gap: 4px; }
.side a { padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 14.5px; }
.side a:hover, .side a.is-active { color: var(--text); background: var(--surface-2); }
.side .small { font-size: 12px; color: var(--faint); padding: 14px 12px 0; }
article { min-width: 0; line-height: 1.7; }
article h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 18px; }
article h2 { font-size: 24px; margin: 40px 0 12px; padding-top: 12px; border-top: 1px solid var(--border); }
article h3 { font-size: 18px; margin: 28px 0 8px; font-family: var(--font-mono); color: var(--accent-2); }
article p, article li { color: #c8d1d8; }
article a { color: var(--accent-2); }
article code { font-family: var(--font-mono); font-size: 13px; background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 5px; }
article pre { background: #070b0f; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
article pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.6; }
article .table-wrap { overflow-x: auto; margin: 12px 0 20px; }
article table { width: 100%; border-collapse: collapse; font-size: 14px; }
article th { text-align: left; color: var(--faint); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--border-2); }
article td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
article blockquote { margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--warm); background: rgba(var(--warm-rgb), 0.06); border-radius: 0 10px 10px 0; }
article hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
/* Code blocks: header with language + copy, colours matching the site's code cards */
.code-wrap { margin: 14px 0 22px; border-radius: 12px; border: 1px solid var(--border); background: #070b0f; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px 7px 14px;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.code-head .dots { display: inline-flex; gap: 5px; margin-right: 10px; }
.code-head .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.code-head .lang { display: inline-flex; align-items: center; }
.copy-btn { font: 500 11.5px var(--font-body); color: var(--muted); background: transparent; border: 1px solid var(--border-2);
  border-radius: 7px; padding: 3px 9px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.done { color: var(--green); border-color: rgba(74,222,128,.5); }
article .code-wrap pre { margin: 0; border: 0; border-radius: 0; background: transparent; }
article pre code { color: #d7dde8; }
.hljs-attr, .tok-key { color: #58b8ff; }
.hljs-string, .tok-val { color: #7af0d8; }
.hljs-number { color: #a99bff; }
.hljs-literal { color: #ff8a5c; }
.hljs-keyword, .hljs-built_in { color: #ff8a5c; }
.hljs-title, .hljs-title.function_ { color: #ffd28a; }
.hljs-comment { color: var(--faint); font-style: italic; }
.hljs-params, .hljs-variable { color: #d7dde8; }
.tok-method { color: #ff8a5c; font-weight: 600; }
.tok-path { color: #ffd28a; }
/* Field names in tables */
article td:first-child code { color: var(--accent-2); background: rgba(25,211,180,0.08); border: 1px solid rgba(25,211,180,0.18); }
article td code { white-space: nowrap; }
article h2 { display: flex; align-items: center; gap: 10px; }
article h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), var(--violet)); }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side { position: static; grid-auto-flow: column; overflow-x: auto; }
  .side .small { display: none; }
  .nav-cta .btn { display: inline-flex; padding: 8px 12px; font-size: 13px; }
}
.anchor { opacity: 0; margin-left: 8px; color: var(--faint); font-weight: 400; text-decoration: none; }
article h2:hover .anchor, article h3:hover .anchor { opacity: 1; }
.doc-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.doc-nav a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.doc-nav a:hover { border-color: var(--accent); }
.doc-nav small { color: var(--faint); font-size: 12px; }
.doc-nav .next { text-align: right; margin-left: auto; }
