/* AIoli Labs — component styles, iteration 2. Every value comes from tokens.css. Nothing is rounded. */
*, *::before, *::after { box-sizing: border-box; }
.ai { background: var(--paper); color: var(--ink); font-family: var(--font-term); font-size: 13px; line-height: 22px; -webkit-font-smoothing: antialiased; }
.ai ::selection { background: var(--yellow); color: var(--on-yellow); }
.ai a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.ai a:hover { background: var(--yellow); color: var(--on-yellow); text-decoration: none; }
.ai :focus-visible { outline: var(--stroke-focus) solid var(--focus); outline-offset: 2px; }

/* type helpers */
.ai-label { font-family: var(--font-term); font-size: 11px; line-height: 16px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ai-label--ink { color: var(--ink); }
.ai-data { font-family: var(--font-term); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; }
.ai-prose { font-family: var(--font-voice); font-size: 15px; line-height: 24px; max-width: 52ch; }
.ai-statement { font-family: var(--font-display); font-size: 26px; line-height: 30px; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.ai-display { font-family: var(--font-display); font-size: 64px; line-height: 68px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.ai-hl { background: var(--yellow); color: var(--on-yellow); padding: 0 var(--space-1); }
.ai-ok { color: var(--ok); } .ai-bad { color: var(--bad); }

/* cursor */
.ai-cursor::after { content: ""; display: inline-block; width: 0.55em; height: 1em; background: currentColor; vertical-align: -0.12em; margin-left: 0.1em; animation: ai-blink 1.1s steps(1) infinite; }
@keyframes ai-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ai-cursor::after { animation: none; } }

/* mark */
.ai-mark { display: inline-block; width: 28px; height: 22px; vertical-align: -4px; }

/* nav */
.ai-nav { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: 22px 0; border-bottom: var(--stroke-hair) solid var(--rule); flex-wrap: wrap; }
.ai .ai-nav__brand { font-family: var(--font-voice); font-weight: 700; font-size: 15px; line-height: 20px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-2); }
.ai .ai-nav__brand:hover { background: none; color: var(--ink); }
.ai-nav__links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; align-items: baseline; }
.ai .ai-nav__links a { color: var(--ink); text-decoration: none; }
.ai .ai-nav__links a.ai-hl { color: var(--on-yellow); }
.ai-nav__links a[aria-current] { border-bottom: var(--stroke-hair) solid var(--ink); }
.ai-nav__links a:hover { background: var(--yellow); color: var(--on-yellow); }

/* theme-paired images: a -paper file and a -terminal file, one shown per theme */
.ai .only-term { display: none !important; }
[data-theme="terminal"] .ai .only-term { display: inline-block !important; }
[data-theme="terminal"] .ai .only-paper { display: none !important; }

/* buttons */
.ai-btn { display: inline-block; font-family: var(--font-term); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.06em; padding: var(--space-2) var(--space-3); border: var(--stroke-hair) solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; border-radius: var(--radius-0); }
.ai-btn:hover { background: var(--yellow); color: var(--on-yellow); border-color: var(--on-yellow); }
.ai a.ai-btn, .ai-btn { color: var(--ink); }
.ai a.ai-btn--yellow, .ai-btn--yellow { background: var(--yellow); color: var(--on-yellow); border-color: transparent; }
.ai-btn--yellow:hover { background: var(--ink); color: var(--paper); }
.ai a.ai-btn--quiet, .ai-btn--quiet { border-color: transparent; padding-left: 0; padding-right: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--link); }

/* prompt (sign-off) */
.ai-prompt { font-family: var(--font-voice); font-size: 18px; line-height: 26px; }
.ai-prompt .ai-hl { padding: 0 var(--space-1); }
.ai-prompt--big { font-size: 40px; line-height: 44px; }

/* statement block (page opener) */
.ai-open { display: grid; gap: var(--space-4); padding: var(--space-16) 0 var(--space-12); }
.ai-open .ai-display { max-width: 18ch; }
.ai-open--shape { grid-template-columns: 1.15fr 0.85fr; gap: var(--space-8); align-items: center; }
.ai-open--shape > div { display: grid; gap: var(--space-4); }
.ai-open__shape { width: 100%; max-width: 420px; justify-self: end; display: block; }

/* index */
.ai-index { border-top: var(--stroke-hair) solid var(--rule); margin: 0; padding: 0; list-style: none; }
.ai-index li { display: grid; grid-template-columns: 40px 1fr auto; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: var(--stroke-hair) solid var(--rule); align-items: baseline; }
.ai-index li > span:first-child { font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
.ai-index li > span:last-child { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-index a { color: var(--ink); text-decoration: none; }
.ai-index a:hover { background: var(--yellow); color: var(--on-yellow); }
.ai-index .ai-ok, .ai-index .ai-bad { margin-left: var(--space-2); }

/* case */
.ai-case { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }
.ai-case__text { display: grid; gap: var(--space-3); }
.ai-readout { border-top: var(--stroke-hair) solid var(--rule); padding-top: var(--space-2); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; display: grid; }
.ai-readout span:first-child { color: var(--muted); }
.ai-readout div { display: grid; grid-template-columns: 9ch 1fr; gap: var(--space-3); }

/* figure */
.ai-figure { margin: 0; display: grid; gap: var(--space-2); }
.ai-figure__frame { background: var(--well); border: var(--stroke-hair) solid var(--rule); padding: var(--space-6); display: grid; place-items: center; min-height: 160px; }
.ai-figure__frame img { max-width: 100%; display: block; }
.ai-figure figcaption { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* table */
.ai-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 22px; }
.ai-table th { text-align: left; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 400; background: var(--well); padding: var(--space-2) var(--space-3); }
.ai-table td { padding: var(--space-2) var(--space-3); border-bottom: var(--stroke-hair) solid var(--rule); vertical-align: top; }
.ai-table td.ai-data { font-size: 12px; }
.ai-table tr.ai-pick td { background: var(--yellow); color: var(--on-yellow); }

/* code */
.ai-code { font-family: var(--font-term); font-size: 12.5px; line-height: 20px; background: var(--well); border: var(--stroke-hair) solid var(--rule); padding: var(--space-3) var(--space-4); margin: 0; overflow: auto; }

/* footer */
.ai-footer { border-top: var(--stroke-hair) solid var(--rule); padding: var(--space-6) 0 var(--space-8); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ai-footer a { color: var(--link); text-transform: none; letter-spacing: 0; }

/* section head */
.ai-sec { display: grid; grid-template-columns: 72px 1fr; gap: var(--space-4); align-items: baseline; }
.ai-sec .ai-label { padding-top: 6px; }

/* slides (1920×1080, scaled by the preview to 960) */
.ai-slide-wrap { width: 960px; height: 540px; overflow: hidden; }
.ai-slide { width: 1920px; height: 1080px; transform: scale(0.5); transform-origin: 0 0; background: var(--paper); color: var(--ink); position: relative; padding: 64px; font-family: var(--font-term); }
.ai-slide .ai-label { font-size: 20px; line-height: 28px; }
.ai-slide__title { font-family: var(--font-voice); font-weight: 700; font-size: 48px; line-height: 56px; margin: 16px 0 40px; }
.ai-slide__lines { font-size: 22px; line-height: 34px; margin: 0; padding: 0; list-style: none; max-width: 56ch; }
.ai-slide__lines li::before { content: "- "; color: var(--muted); }
.ai-slide__cols { display: grid; grid-template-columns: 48fr 52fr; gap: 48px; }
.ai-slide__frame { background: var(--well); border: var(--stroke-hair) solid var(--rule); height: 640px; display: grid; place-items: center; color: var(--muted); font-size: 18px; letter-spacing: 0.14em; text-transform: uppercase; }
.ai-slide__foot { position: absolute; left: 64px; right: 64px; bottom: 36px; display: flex; justify-content: space-between; align-items: center; font-size: 20px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ai-slide__foot img { height: 28px; }
.ai-slide--title .ai-display { font-size: 96px; line-height: 100px; margin-top: 200px; max-width: 16ch; }
.ai-slide__title { font-family: var(--font-display); letter-spacing: -0.015em; }
.ai-slide--title .ai-prose { font-size: 28px; line-height: 40px; max-width: 48ch; margin-top: 24px; }
.ai-slide--closing { display: grid; place-content: center; justify-items: center; gap: 40px; text-align: center; }
.ai-slide--closing .ai-prompt { font-size: 96px; line-height: 104px; }
.ai-slide--closing .ai-label { font-size: 22px; }
.ai-slide .ai-index li { grid-template-columns: 80px 1fr auto; padding: 14px 0; font-size: 22px; line-height: 34px; }
.ai-slide .ai-index li > span:first-child { font-size: 20px; }
.ai-slide .ai-index li > span:last-child { font-size: 20px; }

/* toggle */
.ai-toggle { display: inline-flex; border: var(--stroke-hair) solid var(--ink); font-family: var(--font-term); font-size: 11px; line-height: 16px; letter-spacing: 0.14em; text-transform: uppercase; }
.ai-toggle button { all: unset; cursor: pointer; padding: var(--space-1) var(--space-2); color: var(--ink); }
.ai-toggle button[aria-pressed="true"] { background: var(--yellow); color: var(--on-yellow); }
.ai-toggle button:hover:not([aria-pressed="true"]) { text-decoration: underline; text-underline-offset: 3px; }
.ai-toggle button:focus-visible { outline: var(--stroke-focus) solid var(--focus); outline-offset: -2px; }

/* partners + history (Index variants) */
.ai-partners { font-size: 11px; line-height: 16px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: flex; gap: var(--space-3); flex-wrap: wrap; }
.ai-partners a { color: var(--link); }
.ai-index--history li { grid-template-columns: 56px 1fr auto; }
.ai-index--history li > span:first-child { font-size: 12px; letter-spacing: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
/* whitepaper */
.ai-paper { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }
.ai-paper__text { display: grid; gap: var(--space-3); }
.ai-paper__status { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); border-top: var(--stroke-hair) solid var(--rule); padding-top: var(--space-2); }
