/* Shared styles for the AI knowledge pages (ai.html and its sub-pages).
   Builds on content-refresh.css variables so the pages match the rest of the site. */

/* Diagram figures (inline SVG) */
.ai-figure { margin: 26px auto; text-align: center; }
.ai-figure svg { width: 100%; max-width: 860px; height: auto; display: block; margin: 0 auto;
  background: #fff; border: 1px solid var(--content-line); border-radius: 12px; }
.ai-figure.narrow svg { max-width: 620px; }
.ai-figure figcaption { margin-top: 8px; }
.ai-figure svg text { font-family: "Open Sans", Arial, sans-serif; }

/* Callout boxes */
.ai-box { margin: 20px 0; padding: 14px 18px; border-radius: 10px; border-left: 4px solid; }
.ai-box > :last-child { margin-bottom: 0; }
.ai-box .ai-box-title { display: block; font-weight: 700; margin-bottom: 4px; }
.ai-oneline { background: var(--content-green-soft); border-color: var(--content-green); }
.ai-analogy { background: var(--content-yellow-soft); border-color: #d0b654; }
.ai-warning { background: #fdf0ee; border-color: #c2665a; }
.ai-tip     { background: #eef4fa; border-color: #5b84a8; }

/* Key-terms list */
.ai-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 16px 0 24px; padding: 0; list-style: none; }
.ai-terms li { margin: 0; padding: 10px 12px; background: #fff; border: 1px solid var(--content-line); border-radius: 10px; font-size: 13px; }
.ai-terms li b { display: block; color: var(--content-green-dark); }

/* Token chips (tokenization examples) */
.ai-tokens { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 18px; font-family: "Courier New", monospace; font-size: 14px; }
.ai-tokens span { padding: 3px 6px; border-radius: 5px; white-space: pre; }
.ai-tokens span:nth-child(5n+1) { background: #dcebdc; }
.ai-tokens span:nth-child(5n+2) { background: #f4e7ad; }
.ai-tokens span:nth-child(5n+3) { background: #dbe6f2; }
.ai-tokens span:nth-child(5n+4) { background: #f3dcd8; }
.ai-tokens span:nth-child(5n+5) { background: #e6dff1; }

/* "Where this fits" navigation strip between pages */
.ai-path { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.ai-path li { margin: 0; }
.ai-path a, .ai-path span { display: inline-block; padding: 5px 10px; font-size: 12px; border-radius: 999px;
  border: 1px solid var(--content-line); background: #fff; text-decoration: none; }
.ai-path span.current { background: var(--content-green); border-color: var(--content-green); color: #fff; font-weight: 600; }

/* Hub page: learning path banner */
.ai-hub-intro { max-width: 980px; }
.ai-hub-intro ol { margin-bottom: 0; }

/* Section spacing on long pages */
.ai-page h2 { margin-top: 34px; padding-top: 6px; border-top: 1px solid var(--content-line); }
.ai-page h2:first-of-type { border-top: 0; }
.ai-page h3 { margin-top: 24px; color: var(--content-green-dark); }
.content-list { column-count: 2; column-gap: 30px; }
.content-list li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 768px) { .content-list { column-count: 1; } }
