/* /ai/: code blocks, the tool table and the citation list. Tokens only; the page reads fully without any script. */
.ai-code { margin: var(--space-3) 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-1); overflow-x: auto; max-width: 100%; }
.ai-code:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-code pre { margin: 0; padding: var(--space-3) var(--space-4); font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.5; color: var(--text); white-space: pre; }
.ai-code code { padding: 0; background: none; font-size: inherit; }

/* Wide tables scroll sideways inside their focusable wrapper, as the weapon tables do, instead of crushing each cell. */
.ai-table { min-width: 46rem; }
.ai-table th[scope="row"] { min-width: 11rem; }
.ai-table td:nth-child(2) { min-width: 18rem; }
.ai-table code { overflow-wrap: break-word; }
.ai-args { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-1); }
.ai-args li { margin: 0; }

.ai-defs { display: grid; gap: var(--space-3); max-width: 58ch; margin: var(--space-3) 0; }
.ai-defs > div { display: grid; gap: var(--space-1); }
.ai-defs dt { font-weight: 700; color: var(--text); }
.ai-defs dd { margin: 0; color: var(--text-muted); }

.section h3 { margin-top: var(--space-4); }
.section > .ai-code, .section > .note { max-width: 100%; }
@media (min-width: 720px) {
  .ai-defs > div { grid-template-columns: 8rem 1fr; gap: var(--space-3); }
}
