/* Aida Labs documentation: shared homepage palette and brand assets. */
:root {
  color-scheme: light;
  --bg: #fff; --paper: #fff; --ink: #222a28; --muted: #65706b;
  --line: #e2e7e4; --soft: #f6f8f6; --accent: #176b4e;
  --accent-dark: #12533d; --accent-light: #edf5e4;
  --warn: #936013; --warn-light: #fff9e8; --danger: #b13f4b; --danger-light: #fff1f2;
  --code-bg: #f6f8f6; --code-header: #edf1ee; --code-text: #222a28;
  --header-height: 76px; --max-content: 760px; --radius: 6px;
  --font-body: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181b1a; --paper: #181b1a; --ink: #e7ece8; --muted: #abb6af;
  --line: #343d37; --soft: #222824; --accent: #b2db8b;
  --accent-dark: #cceaaa; --accent-light: #29362a;
  --warn: #e5bd77; --warn-light: #302a20; --danger: #f2a0a9; --danger-light: #322226;
  --code-bg: #202622; --code-header: #29312b; --code-text: #e7ece8;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 28px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.8 var(--font-body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid #327cdd; outline-offset: 4px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 200; padding: 10px 16px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.app-header { position: sticky; top: 0; z-index: 100; height: var(--header-height); background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1440px; height: 100%; margin: auto; padding: 0 40px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 33px; height: 33px; flex: 0 0 33px; }
.brand-logo img { display: block; width: 33px; height: 33px; }
.brand-text-container { display: flex; align-items: center; gap: 18px; }
.brand-name { font-size: 21px; font-weight: 650; white-space: nowrap; }
.brand-version { padding-left: 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 13px; white-space: nowrap; padding: 26px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.console-link { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); font-size: 13px; white-space: nowrap; }
.icon, .copy-icon { width: 18px; height: 18px; display: block; flex: 0 0 18px; }
[data-theme="dark"] .icon, [data-theme="dark"] .copy-icon { filter: invert(1); }
.theme-switch, .menu-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); }
.theme-switch:hover, .menu-toggle:hover { background: var(--soft); }
.theme-switch .sun-icon { display: none; }
[data-theme="dark"] .theme-switch .sun-icon { display: block; }
[data-theme="dark"] .theme-switch .moon-icon { display: none; }
.menu-toggle { display: none; }
.page-shell { min-height: calc(100dvh - var(--header-height)); }
.hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 38px max(40px, calc((100% - 1200px) / 2)) 30px; }
.hero-inner { max-width: 820px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--accent); font-size: 12px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; background: var(--accent); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; text-wrap: pretty; overflow-wrap: anywhere; }
.hero h1 { font-size: 36px; line-height: 1.35; margin: 0; }
.hero-lede { color: var(--muted); max-width: 800px; font-size: 15px; line-height: 1.85; margin: 14px 0 0; }
.hero-nav { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px; font-size: 13px; }
.truth-bar, .doc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 1200px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.truth-item strong, .doc-card strong { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.truth-item span, .doc-card span { display: block; color: var(--muted); font-size: 12px; line-height: 1.7; }
.layout { display: grid; grid-template-columns: 216px minmax(0, 1fr) 192px; gap: 40px; max-width: 1440px; margin: auto; padding: 40px 40px 72px; }
.sidebar, .toc-container { position: sticky; top: calc(var(--header-height) + 28px); align-self: start; max-height: calc(100dvh - var(--header-height) - 56px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.dir-group { margin-bottom: 28px; }
.dir-title, .toc-title { color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 12px; }
.dir-title { padding-left: 12px; }
.dir-links { margin: 0; padding: 0; list-style: none; }
.dir-links li { margin: 3px 0; }
.dir-links a { display: block; padding: 9px 12px; color: var(--muted); font-size: 13px; border-left: 2px solid transparent; }
.dir-links a.current { color: var(--accent); background: var(--accent-light); border-left-color: var(--accent); font-weight: 600; }
.dir-links a:hover { background: var(--soft); text-decoration: none; }
.toc { border-left: 1px solid var(--line); padding-left: 16px; }
.toc-links { display: flex; flex-direction: column; gap: 3px; }
.toc-links a { color: var(--muted); font-size: 12px; line-height: 1.6; padding: 4px 0 4px 15px; margin-left: -17px; border-left: 2px solid transparent; }
.toc-links a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.mobile-toc { display: none; }
main { min-width: 0; }
.prose-container { max-width: var(--max-content); margin: auto; }
section { padding: 0 0 36px; margin: 0 0 32px; border-bottom: 1px solid var(--line); }
section:last-child { border: 0; margin-bottom: 0; padding-bottom: 0; }
h2 { font-size: 24px; line-height: 1.5; margin: 0 0 18px; }
h3 { font-size: 19px; line-height: 1.5; margin: 26px 0 12px; }
h4 { font-size: 16px; margin: 18px 0 8px; }
p { margin: 0 0 16px; overflow-wrap: anywhere; }
ul, ol { margin: 0 0 20px; padding-left: 23px; }
li { margin: 7px 0; overflow-wrap: anywhere; }
strong { font-weight: 600; }
.step-grid, .grid, .scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.step-card, .item, .scene-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.step-card b, .item strong { display: block; color: var(--accent); margin-bottom: 6px; }
.scene-card h4 { margin-top: 10px; }
.scene-role { color: var(--accent); font: 11px var(--font-mono); }
.route { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.route-step { padding: 12px; background: var(--soft); font-size: 13px; }
.route-step b, .flow b { display: block; color: var(--accent); font: 14px var(--font-mono); margin-bottom: 4px; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.flow div { flex: 1 1 120px; padding: 12px; background: var(--soft); font-size: 13px; }
.formula-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; border-block: 1px solid var(--line); padding-block: 18px; margin: 20px 0; }
.formula-item strong { display: block; color: var(--accent); margin-bottom: 4px; }
.formula-item span { color: var(--muted); font-size: 12px; }
.mode-card { padding: 20px 0; border-bottom: 1px solid var(--line); }
.mode-quote { border-left: 3px solid var(--accent); padding-left: 16px; font-weight: 600; margin-bottom: 12px; }
.mode-effect { font-size: 14px; color: var(--muted); }
.checklist, .combo-steps, .micro-steps { list-style: none; padding: 0; margin: 20px 0; counter-reset: step; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.checklist li, .combo-steps li, .micro-steps li { counter-increment: step; border-bottom: 1px solid var(--line); padding: 12px 0 12px 32px; margin: 0; position: relative; }
.checklist li::before, .combo-steps li::before, .micro-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 17px; font: 11px var(--font-mono); color: var(--accent); }
.badge-list { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.badge-green { color: var(--accent); background: var(--accent-light); }
.badge-blue { color: var(--muted); background: var(--soft); }
.badge-amber { color: var(--warn); background: var(--warn-light); }
.badge-red { color: var(--danger); background: var(--danger-light); }
.notice { border-left: 3px solid var(--accent); background: var(--soft); padding: 16px 20px; margin: 24px 0; }
.notice.warn { border-color: var(--warn); background: var(--warn-light); }
.notice.danger { border-color: var(--danger); background: var(--danger-light); }
.notice strong { display: block; margin-bottom: 5px; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.prompt-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 22px 0; }
.prompt-head { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: var(--code-header); border-bottom: 1px solid var(--line); }
.prompt-head strong { font-size: 13px; margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.prompt-tag { color: var(--accent); font-size: 11px; }
.copy-btn { width: 36px; height: 36px; flex: 0 0 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--paper); }
.copy-btn:hover { border-color: var(--accent); }
.copy-btn img { width: 16px; height: 16px; }
[data-theme="dark"] .copy-btn img { filter: invert(1); }
pre { margin: 0; padding: 20px; background: var(--code-bg); color: var(--code-text); font: 13px/1.8 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto; }
code { font-family: var(--font-mono); font-size: .88em; color: var(--accent); padding: 2px 5px; background: var(--soft); border-radius: 3px; overflow-wrap: anywhere; }
pre code { padding: 0; font-size: inherit; color: inherit; background: none; }
.shot { margin: 24px 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in; }
.shot figcaption { padding: 10px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; min-width: 520px; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { background: var(--soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.sources { color: var(--muted); font-size: 13px; }
.footer { max-width: 1360px; margin: auto; padding: 24px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.lightbox-modal { position: fixed; inset: 0; max-width: 100%; max-height: 100%; width: 100%; height: 100dvh; padding: 64px 24px 24px; margin: 0; border: 0; background: rgba(24,27,26,.94); }
.lightbox-modal[open] { display: flex; align-items: center; justify-content: center; }
.lightbox-modal::backdrop { background: rgba(24,27,26,.8); }
.lightbox-content { object-fit: contain; max-width: 100%; max-height: 100%; }
.lightbox-close { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid #65706b; border-radius: 4px; background: #fff; }
.lightbox-close img { width: 20px; height: 20px; }
.mobile-mask { position: fixed; inset: var(--header-height) 0 0; z-index: 80; background: rgba(24,27,26,.35); }
@media (max-width: 1240px) {
  .header-inner { gap: 20px; padding-inline: 28px; }
  .brand-version { display: none; }
  .nav-links { gap: 20px; }
  .layout { grid-template-columns: 184px minmax(0, 1fr) 176px; gap: 28px; padding-inline: 28px; }
}
@media (max-width: 980px) {
  .nav-links { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 30px 28px 48px; }
  .toc-container { display: none; }
  .sidebar { position: fixed; top: var(--header-height); bottom: 0; left: 0; width: min(300px, calc(100% - 44px)); max-height: none; z-index: 90; padding: 24px 20px; background: var(--paper); border-right: 1px solid var(--line); visibility: hidden; transform: translateX(-100%); transition: transform .2s ease, visibility .2s; }
  .sidebar.active { visibility: visible; transform: translateX(0); }
  .mobile-toc { display: block; margin: 24px 12px; }
  .hero { padding-inline: 28px; }
}
@media (max-width: 600px) {
  :root { --header-height: 64px; }
  .header-inner { padding-inline: 20px; gap: 10px; }
  .brand-name { font-size: 19px; }
  .header-actions { gap: 8px; }
  .console-link { display: none; }
  .hero { padding: 26px 20px 22px; }
  .hero h1 { font-size: 28px; }
  .hero-lede { font-size: 14px; }
  .eyebrow { font-size: 11px; }
  .truth-bar, .doc-cards { grid-template-columns: 1fr; gap: 13px; margin-top: 20px; padding-top: 16px; }
  .truth-item, .doc-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; }
  .layout { padding: 28px 20px 40px; }
  h2 { font-size: 22px; }
  .step-grid, .grid, .scene-grid, .checklist { grid-template-columns: 1fr; }
  .formula-bar, .route { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice { padding: 14px 16px; }
  .prompt-head { padding: 10px 12px; }
  .prompt-tag { display: none; }
  pre { padding: 16px; font-size: 12px; }
  .footer { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
