/* AI KB Internals pages, on top of /products/product.css. product.css styles
   h2 as a small caps label for product pages; an article needs real section
   headings, tables, code and diagrams, so those are scoped to .kb-article. */

.kb-meta{
  font-size:11px;letter-spacing:var(--track-caps);text-transform:uppercase;
  color:var(--ink-faint);margin:10px 0 0;
}

/* ---- index ---- */
.kb-list{list-style:none;margin:0 0 clamp(30px,6vh,56px);padding:0;display:grid;gap:clamp(26px,4vh,40px)}
.kb-list .kb-meta{margin:0 0 8px}
.kb-list h3 a{text-decoration:underline;text-decoration-color:rgba(154,52,18,.35);text-underline-offset:6px;transition:text-decoration-color .2s}
.kb-list h3 a:hover{text-decoration-color:var(--accent)}

/* ---- article ---- */
.kb-article{margin-top:clamp(26px,5vh,44px)}
.kb-article > p:first-child{font-size:clamp(17px,2.1vw,20px);line-height:1.6;color:var(--ink-soft)}
.kb-article h2{
  font-family:var(--display);font-weight:400;text-transform:none;letter-spacing:.005em;
  font-size:clamp(26px,4vw,36px);line-height:1.15;color:var(--ink);
  margin:clamp(40px,7vh,64px) 0 14px;padding-top:clamp(18px,3vh,26px);border-top:1px solid var(--hairline);
}
.kb-article p,.kb-article li{font-size:clamp(14.5px,1.8vw,16.5px);line-height:1.72;color:var(--ink-soft)}
.kb-article p{max-width:70ch}
.kb-article ul,.kb-article ol{margin:0 0 16px;padding-left:1.3em;max-width:70ch}
.kb-article li{margin-bottom:6px}
.kb-article li::marker{color:#c2673a}
.kb-article a{text-decoration:underline;text-decoration-color:rgba(154,52,18,.45);text-underline-offset:4px;overflow-wrap:anywhere}
.kb-article a:hover{text-decoration-color:var(--accent)}

.kb-article code{
  font:.86em/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  background:rgba(43,39,33,.07);padding:1px 5px;border-radius:3px;overflow-wrap:anywhere;color:var(--ink);
}
.kb-article pre{
  margin:12px 0 18px;padding:14px 16px;border:1px solid var(--hairline);border-radius:4px;
  background:rgba(253,250,245,.65);overflow-x:auto;max-width:100%;
}
.kb-article pre code{background:none;padding:0;font-size:12.5px;line-height:1.55;overflow-wrap:normal;white-space:pre}

.table-wrap{overflow-x:auto;margin:10px 0 20px;max-width:100%}
.kb-article table{border-collapse:collapse;min-width:100%;font-size:14px}
.kb-article th,.kb-article td{
  text-align:left;vertical-align:top;padding:8px 12px;border-bottom:1px solid var(--hairline);
  line-height:1.5;color:var(--ink-soft);
}
.kb-article th{font-weight:600;color:var(--ink);border-bottom-color:rgba(43,39,33,.3)}

/* ---- diagrams (inline SVG in the Markdown) ---- */
.diagram{margin:14px 0 22px;overflow-x:auto}
.diagram-svg{display:block;min-width:680px;width:100%;height:auto}
.diagram figcaption{font-size:13px;line-height:1.5;color:var(--ink-faint);margin-top:8px;max-width:70ch}
.diagram rect{fill:rgba(253,250,245,.85);stroke:rgba(43,39,33,.22)}
.diagram .band{fill:none;stroke:rgba(43,39,33,.4);stroke-dasharray:4 4}
.diagram .hl{stroke:var(--accent);stroke-width:1.5}
.diagram text{fill:var(--ink);font:13px var(--font)}
.diagram .sub{fill:var(--ink-faint);font-size:11.5px}
.diagram .lbl{fill:var(--ink-faint);font-size:11px;font-weight:600;letter-spacing:.06em}
.diagram line,.diagram polyline{stroke:var(--accent);stroke-width:1.5;fill:none}
.diagram .head{fill:var(--accent)}
