:root {
  color-scheme: light;
  --surface: #ffffff;
  --soft: #edf0e8;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151c19;
  --ink: #e5ece3;
  --muted: #afb9ac;
  --line: #354037;
  --blue: #a4b5ff;
  --surface: #1c2720;
  --soft: #202c24;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #151c19;
    --ink: #e5ece3;
    --muted: #afb9ac;
    --line: #354037;
    --blue: #a4b5ff;
    --surface: #1c2720;
    --soft: #202c24;
  }
}
body { background: var(--bg); color: var(--ink); }
.brand img { border-radius: 9px; }
.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
nav { align-items: center; gap: 22px; }
.eyebrow, .requirements, .caption, .setup-note, footer>span,
.spec-strip span, .spec-strip strong, .brand-note { color: var(--muted); }
.eyebrow, .requirements, .caption { font-size: 11px; }
.caption { line-height: 1.7; letter-spacing: 1px; }
h1 span, h2 span { color: var(--muted); }
.primary { color: white; background: #3a57df; }
.secondary, .code-box, .tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); }
.under-hood, .tabs, .code-title { background: var(--soft); border-color: var(--line); }
.architecture p:not(.eyebrow), .code-title, .code-note, .tabs button { color: var(--muted); }
.layers>div, .guest-layer span { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.layers .cube-layer { background: #34473a; color: #fff; }
.layers small { color: var(--muted); }
.cube-layer small { color: #d4dfcf; }
pre { color: var(--ink); font-size: 12px; }
.start .setup-note, .code-note { font-size: 12px !important; }
.feature-grid a, .architecture a, .start>div>a, footer>a:last-child { font-size: 13px; }
.floating-command { color: #263b2b; }
.docs-promo { display: grid; grid-template-columns: 1fr 1.05fr; gap: 80px; padding-block: 20px 90px; }
.guide-links>a { display: flex; gap: 18px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); }
.guide-links>a>span { font: 12px ui-monospace, monospace; color: var(--muted); }
.guide-links>a>div { flex: 1; }
.guide-links strong { font-size: 16px; font-weight: 550; }
.guide-links p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 0; }
.all-faq { display: inline-block; margin-top: 25px; font-size: 14px; color: var(--blue); }
.doc-shell { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 60px; padding-block: 48px 100px; }
.doc-sidebar { align-self: start; position: sticky; top: 32px; }
.doc-sidebar p { font-size: 11px; color: var(--muted); letter-spacing: 1.3px; margin-bottom: 18px; }
.doc-sidebar a { display: block; padding: 11px 12px; font-size: 13px; border-radius: 6px; margin: 2px 0; }
.doc-sidebar a[aria-current=page] { background: var(--soft); color: var(--blue); font-weight: 600; }
.doc-body { min-width: 0; max-width: 760px; }
.doc-body h1 { font-size: clamp(35px,4vw,52px); line-height: 1.1; letter-spacing: -2px; margin-block: 12px 22px; }
.doc-body .lede { font-size: 18px; line-height: 1.7; color: var(--muted); }
.doc-body h2 { font-size: 26px; letter-spacing: -.7px; margin: 42px 0 18px; scroll-margin-top: 24px; }
.doc-body p, .doc-body li { font-size: 15px; line-height: 1.85; }
.doc-body p { color: var(--muted); }
.doc-body a:not(.doc-card) { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.doc-body code { font: .88em ui-monospace, SFMono-Regular, monospace; overflow-wrap: anywhere; }
.doc-body pre { position: relative; padding: 52px 20px 20px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; overflow: auto; line-height: 1.8; }
.doc-body pre code { font-size: 12px; overflow-wrap: normal; }
.doc-copy { position: absolute; right: 12px; top: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; color: var(--ink); padding: 5px 9px; font-size: 11px; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.doc-card { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 24px; transition: border-color .2s; }
.doc-card:hover { border-color: var(--blue); }
.doc-card h2 { font-size: 19px; margin: 0 0 12px; }
.doc-card p { font-size: 13px; margin: 0; }
.doc-meta { border-top: 1px solid var(--line); margin-top: 45px; padding-top: 20px; font-size: 12px !important; }
.search-label { display: block; font-size: 13px; margin: 28px 0 10px; }
#faq-search { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 15px; font: inherit; }
#faq-search:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
#faq-count { font-size: 12px; }
.doc-body summary { font-size: 15px; line-height: 1.5; gap: 20px; }
.doc-body details p { font-size: 14px; }
.doc-body details[hidden] { display: none; }
@media(max-width:850px) {
  .doc-shell { gap: 28px; grid-template-columns: 175px minmax(0,1fr); }
  .docs-promo { gap: 35px; }
  header nav { gap: 14px; }
}
@media(max-width:600px) {
  header.wrap { height: auto; min-height: 85px; padding-block: 16px; flex-wrap: wrap; gap: 16px; }
  header .brand { font-size: 24px; }
  header nav { gap: 14px; font-size: 12px; flex-wrap: wrap; }
  header nav>a:first-child { display: inline; }
  header nav>a[href="#features"], header .nav-github { display: none; }
  .docs-promo, .doc-shell { grid-template-columns: 1fr; gap: 28px; }
  .docs-promo { padding-bottom: 60px; }
  .doc-shell { padding-top: 20px; }
  .doc-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .doc-sidebar p { width: 100%; margin-bottom: 8px; }
  .doc-sidebar a { font-size: 12px; padding: 8px; }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-body h1 { letter-spacing: -1.4px; }
  .terminal-body { font-size: 9px; }
  .caption, .requirements, .eyebrow { font-size: 11px; }
}
@media print {
  header, footer, .doc-sidebar, .theme-toggle, .doc-copy, .search-label, #faq-search, #faq-count { display: none; }
  .doc-shell { display: block; padding: 0; }
  .doc-body { max-width: none; }
  body { background: white; color: black; }
  .doc-body p { color: #333; }
  pre { white-space: pre-wrap; }
}
.code-title button, .feature-icon { color: var(--muted); }
.doc-body .lede { color: var(--muted); }
@media(prefers-reduced-motion:reduce) {
  .doc-card { transition: none; }
}
/* Terminal presentation adapted from the website/ prototype. */
.terminal-section { grid-template-columns: .85fr 1.25fr; gap: 52px; align-items: center; }
.terminal-highlights { list-style: none; padding: 0; margin: 24px 0; }
.terminal-highlights li { font-size: 14px; line-height: 1.6; margin: 12px 0; color: var(--muted); }
.terminal-highlights li::before { content: '✓'; color: #598460; margin-right: 12px; }
.workflow-terminal { min-width: 0; background: #090d16; color: #e2e8f0; border: 1px solid #293245; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px #0002; }
.workflow-terminal-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 14px 16px; background: #ffffff08; border-bottom: 1px solid #ffffff12; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.window-dots i:nth-child(2) { background: #f59e0b; }
.window-dots i:nth-child(3) { background: #10b981; }
.terminal-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.terminal-tabs button { font: 12px ui-monospace, monospace; padding: 7px 9px; border: 0; border-radius: 5px; color: #a0aec2; background: transparent; }
.terminal-tabs button[aria-selected=true] { background: #3b82f626; color: #8dbaff; }
.example-panel pre { margin: 0; padding: 24px 22px 18px; font: 12px/1.9 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e2e8f0; overflow-x: auto; }
.term-prompt { color: #60a5fa; user-select: none; }
.term-cmd { color: #f8fafc; }
.term-comment { color: #94a3b8; }
.term-success { color: #34d399; }
.start .example-note { margin: 0; padding: 0 22px 22px; font-size: 12px; color: #a6b4c8; line-height: 1.8; }
.example-note a { color: #8dbaff; text-decoration: underline; text-underline-offset: 3px; }
.terminal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid #ffffff12; font-size: 10px; letter-spacing: 1px; color: #94a3b8; }
.terminal-footer button { background: #182236; color: #c7d9f5; border: 1px solid #33435c; border-radius: 5px; padding: 7px 10px; font-size: 12px; }
.workflow-terminal :focus-visible { outline-color: #8dbaff; }
.example-panel[hidden] { display: none; }
@media(max-width:850px) {
  .terminal-section { grid-template-columns: 1fr; gap: 30px; }
}
@media(max-width:400px) {
  .workflow-terminal-header { padding: 12px; }
  .terminal-tabs button { font-size: 11px; padding: 7px; }
  .example-panel pre { padding-inline: 14px; font-size: 11px; }
}
