/* cadb project homepage — dependency-free responsive styles */
:root {
  color-scheme: dark;
  --bg: #0b1016;
  --bg-raised: #101720;
  --bg-panel: #111a24;
  --bg-code: #0a0f14;
  --line: #23303b;
  --line-strong: #334452;
  --text: #e8edf2;
  --text-soft: #b4c0cc;
  --muted: #7f909f;
  --cyan: #62dddb;
  --cyan-dim: #1a7778;
  --amber: #f1b96b;
  --green: #8ed3aa;
  --content: 1160px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); line-height: 1.65; }
button, a { font: inherit; }
a { color: inherit; text-decoration-color: rgba(98, 221, 219, .45); text-underline-offset: .22em; }
a:hover { color: var(--cyan); }
a:focus-visible, button:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 3px; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { color: #c1e8e6; font-size: .92em; }
.container { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 10; padding: 9px 13px; color: var(--bg); background: var(--cyan); border-radius: 4px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 5; background: rgba(11, 16, 22, .94); border-bottom: 1px solid rgba(70, 91, 106, .32); backdrop-filter: blur(14px); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; color: var(--text); text-decoration: none; }
.brand-logo { display: block; width: 54px; height: 54px; flex: 0 0 auto; }
.brand-name { font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.brand-meta { padding-left: 9px; border-left: 1px solid var(--line-strong); color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; letter-spacing: .04em; }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 2.1vw, 28px); }
.main-nav a { color: var(--text-soft); font-size: 14px; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { color: var(--cyan); }
.main-nav .nav-github { margin-left: 2px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--text); }
.nav-github span { color: var(--cyan); }

.section-shell { position: relative; overflow: hidden; }
.hero { min-height: 580px; display: grid; align-items: center; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 76% 48%, rgba(23, 95, 101, .17), transparent 39%), linear-gradient(180deg, #0d141b 0%, #0b1016 100%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 64px; padding-block: 78px 86px; }
.hero-gridline { position: absolute; inset: 0; opacity: .17; pointer-events: none; background-image: linear-gradient(rgba(99, 133, 152, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 133, 152, .12) 1px, transparent 1px); background-size: 70px 70px; mask-image: linear-gradient(90deg, transparent 35%, #000 100%); }
.eyebrow { margin: 0 0 14px; color: var(--cyan); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { display: flex; align-items: center; gap: 9px; color: #a4b5bf; letter-spacing: .08em; }
.status-dot, .caption-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(98, 221, 219, .56); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(64px, 8vw, 100px); line-height: .98; letter-spacing: -.055em; font-weight: 650; }
.accent { color: var(--cyan); }
.hero-lede { max-width: 535px; margin-bottom: 25px; color: var(--text-soft); font-size: clamp(17px, 2.2vw, 21px); line-height: 1.55; }
.hero-lede code { color: var(--cyan); }
.badge-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.badge-list li { padding: 4px 9px; border: 1px solid #2a3945; border-radius: 3px; color: #b8c6cf; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 12px; padding: 9px 15px; border: 1px solid transparent; border-radius: 4px; font-size: 14px; font-weight: 650; text-decoration: none; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #061315; background: var(--cyan); }
.button-primary:hover { color: #061315; background: #84efeb; }
.button-secondary { border-color: #364653; color: var(--text); background: rgba(16, 23, 32, .52); }
.button-secondary:hover { border-color: var(--cyan-dim); color: var(--text); }
.hero-footnote { margin: 22px 0 0; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.hero-footnote a { color: var(--text-soft); }
.hero-footnote span { padding-inline: 5px; color: #4c5b66; }

.hero-console { max-width: 510px; justify-self: end; width: 100%; border: 1px solid #2b3b47; border-radius: 7px; background: rgba(10, 15, 20, .92); box-shadow: 0 26px 70px rgba(0, 0, 0, .28), 0 0 0 8px rgba(29, 50, 62, .14); }
.console-bar, .console-footer { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; color: #82939f; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.console-bar { border-bottom: 1px solid #202d37; }
.console-dots { display: inline-flex; gap: 5px; }
.console-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #3e4b55; }
.console-dots i:first-child { background: #d9896a; }
.console-dots i:nth-child(2) { background: #d4ad68; }
.console-dots i:nth-child(3) { background: #68b98c; }
.console-state { color: var(--green); font-size: 10px; letter-spacing: .12em; }
.console-body { padding: 28px 22px 24px; }
.console-line { display: grid; grid-template-columns: 34px 1fr; margin: 8px 0; color: #d2dce2; font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(11px, 1.3vw, 13px); }
.line-no { grid-row: 1; color: #53636f; }
.line-content { grid-column: 2; white-space: nowrap; }
.code-muted { color: #c7d2dc; }
.code-punct { color: #7f929f; }
.code-cyan { color: var(--cyan); }
.code-amber { color: var(--amber); }
.console-divider { height: 1px; margin: 25px 0 17px 34px; background: #1d2a34; }
.console-result { display: flex; align-items: center; gap: 9px; padding-left: 34px; color: var(--green); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.result-arrow { color: var(--cyan); }
.result-ms { margin-left: auto; color: #70818e; font-size: 9px; }
.console-footer { border-top: 1px solid #202d37; font-size: 11px; }

.section { padding-block: 94px; }
.section-contrast { border-block: 1px solid rgba(60, 79, 94, .5); background: #0e151d; }
.section-heading { max-width: 710px; margin-bottom: 36px; }
.section-heading h2 { margin-bottom: 13px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -.05em; font-weight: 620; }
.section-heading > p:last-child { margin-bottom: 0; color: var(--text-soft); font-size: 15px; }
.section-heading-wide { max-width: 780px; }
.architecture-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.architecture-panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg-raised); }
.architecture-primary { border-color: #28666b; background: linear-gradient(145deg, rgba(18, 45, 52, .55), rgba(16, 23, 32, .95) 58%); }
.panel-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.panel-index { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #3a4c58; border-radius: 3px; color: #97a7b1; font-family: monospace; font-size: 11px; }
.architecture-primary .panel-index { border-color: var(--cyan-dim); color: var(--cyan); }
.panel-heading h3 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-label { margin-left: auto; color: var(--muted); font-family: monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.flow { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 7px; }
.flow-node { display: grid; min-width: 57px; min-height: 52px; flex: 1 1 0; align-content: center; padding: 5px; border: 1px solid #35434e; border-radius: 3px; color: #c4cdd4; text-align: center; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; line-height: 1.45; }
.flow-node span { color: #91a3ae; font-size: 8px; }
.flow-app { border-color: #2a7678; color: var(--cyan); }
.flow-transport { border-color: #806642; color: var(--amber); }
.flow-device { border-color: #426b53; color: var(--green); }
.flow-arrow { flex: 0 0 auto; color: #647783; font-size: 13px; }
.flow-arrow-accent { color: var(--cyan); }
.panel-note { margin: 18px 0 0; color: #96a5af; font-size: 13px; line-height: 1.6; }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; padding-top: 31px; }
.benefit { position: relative; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.benefit-number { display: block; margin-bottom: 12px; color: var(--cyan); font-family: monospace; font-size: 10px; }
.benefit h3 { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.benefit p { margin-bottom: 0; color: #94a2ad; font-size: 14px; }

.code-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: start; gap: 16px; }
.code-panel { min-width: 0; overflow: hidden; border: 1px solid #2c3a45; border-radius: 5px; background: var(--bg-code); }
.code-header { display: flex; align-items: center; justify-content: space-between; min-height: 59px; padding: 10px 16px; border-bottom: 1px solid #202c35; }
.code-header > div { display: flex; align-items: center; gap: 11px; }
.code-kind { padding: 3px 6px; border: 1px solid #1a7473; border-radius: 3px; color: var(--cyan); font-family: monospace; font-size: 9px; letter-spacing: .06em; }
.code-kind-amber { border-color: #76562f; color: var(--amber); }
.code-header h3 { margin: 0; font-size: 12px; font-weight: 600; }
.copy-button { min-width: 55px; padding: 5px 8px; border: 1px solid #34434d; border-radius: 3px; background: #121a22; color: #c6d0d7; cursor: pointer; font-family: monospace; font-size: 10px; }
.copy-button:hover { border-color: var(--cyan-dim); color: var(--cyan); }
.code-panel pre { overflow-x: auto; margin: 0; padding: 19px 18px 16px; color: #c8d3dc; font-size: 12px; line-height: 1.7; tab-size: 4; }
.code-panel pre code { color: inherit; font-size: inherit; white-space: pre; }
.syntax-keyword { color: #c792ea; }
.syntax-function, .syntax-command { color: var(--cyan); }
.syntax-preprocessor { color: #f1b96b; }
.syntax-string { color: var(--green); }
.syntax-number, .syntax-constant { color: var(--amber); }
.syntax-comment { color: #71818d; font-style: italic; }
.syntax-flag { color: #e4a8c4; }
.code-caption { display: flex; align-items: center; gap: 8px; margin: 0; padding: 11px 16px; border-top: 1px solid #202c35; color: #8c9ba6; font-size: 10px; }
.caption-dot { width: 6px; height: 6px; flex: 0 0 auto; }
.caption-dot-amber { background: var(--amber); box-shadow: 0 0 10px rgba(241, 185, 107, .42); }
.copy-status { min-height: 0; margin: 0; color: var(--green); font-size: 10px; }
.copy-status:not(:empty) { padding: 7px 16px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 17px; }
.quick-links a { color: #9baab4; font-size: 11px; }
.quick-links a span { color: var(--cyan); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; }
th, td { padding: 14px 16px; border-bottom: 1px solid #202c35; font-size: 13px; }
thead th { background: #111922; color: #8fa0ac; font-family: monospace; font-size: 9px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { color: var(--text); font-weight: 600; white-space: nowrap; }
tbody th a { text-decoration: none; }
tbody td { color: #aebbc5; }
tbody code { font-size: 10px; }
.table-highlight { background: rgba(29, 73, 77, .18); }
.you-label { display: block; margin-top: 3px; color: var(--cyan); font-family: monospace; font-size: 8px; letter-spacing: .08em; }
.answer-no { color: var(--green); }
.answer-yes { color: var(--amber); }
.table-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.scope-panel { padding: 22px 24px; border: 1px solid var(--line); border-radius: 5px; background: rgba(16, 23, 32, .7); }
.scope-in { border-top: 2px solid var(--cyan-dim); }
.scope-out { border-top: 2px solid #76562f; }
.scope-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.scope-symbol { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--cyan-dim); border-radius: 3px; color: var(--cyan); font-family: monospace; font-size: 14px; }
.scope-out .scope-symbol { border-color: #76562f; color: var(--amber); }
.scope-heading h3 { margin: 0; font-size: 15px; }
.scope-panel ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.scope-panel li { position: relative; padding-left: 17px; color: #afbbc4; font-size: 14px; }
.scope-panel li::before { position: absolute; left: 0; color: var(--cyan); content: "—"; }
.scope-out li::before { color: var(--amber); }
.scope-footnote { max-width: 780px; margin: 17px 0 0; color: var(--muted); font-size: 11px; }

.ecosystem-section { padding-bottom: 75px; }
.ecosystem-grid { border-top: 1px solid var(--line); }
.ecosystem-item { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 17px; padding: 19px 8px; border-bottom: 1px solid var(--line); }
.eco-index { align-self: start; padding-top: 3px; color: var(--cyan); font-family: monospace; font-size: 10px; }
.ecosystem-item h3 { margin-bottom: 3px; font-size: 13px; font-weight: 600; }
.ecosystem-item p { margin: 0; color: #94a2ad; font-size: 14px; }
.eco-tag { padding: 4px 8px; border: 1px solid #34434d; border-radius: 3px; color: #91a1ac; font-family: monospace; font-size: 9px; white-space: nowrap; }
.ecosystem-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 32px; padding: 22px 24px; border: 1px solid #315b61; border-radius: 5px; background: linear-gradient(100deg, rgba(27, 78, 82, .26), rgba(17, 25, 34, .62)); }
.ecosystem-cta .eyebrow { margin-bottom: 5px; font-size: 9px; }
.ecosystem-cta h3 { margin: 0; font-size: 17px; font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); background: #080d12; }
.footer-main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding-block: 23px; }
.footer-brand .brand-logo { width: 36px; height: 36px; }
.footer-main > p { margin: 0; color: #82919c; font-size: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: #a0adb7; font-size: 10px; text-decoration: none; }
.footer-nav a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding-block: 12px 16px; border-top: 1px solid #18232c; color: #697985; font-family: monospace; font-size: 9px; }
.footer-bottom span span { padding-inline: 4px; color: #44535e; }

/* Standalone Quick Start article and its sticky table of contents */
.teaser-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.teaser-inner > div { max-width: 680px; }
.teaser-inner .eyebrow { margin-bottom: 7px; }
.teaser-inner h2 { margin: 0 0 6px; font-size: clamp(21px, 3vw, 27px); line-height: 1.2; letter-spacing: -.04em; }
.teaser-inner p:last-child { margin: 0; color: #9baab4; font-size: 12px; }
.guide-hero { padding-block: 45px 48px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 76% 42%, rgba(23, 95, 101, .16), transparent 42%), #0d141b; }
.guide-hero .eyebrow { margin-bottom: 12px; }
.guide-hero h1 { margin-bottom: 13px; font-size: clamp(43px, 6vw, 64px); line-height: 1.02; letter-spacing: -.06em; }
.guide-lede { max-width: 690px; margin-bottom: 20px; color: var(--text-soft); font-size: 17px; line-height: 1.6; }
.guide-facts { display: flex; flex-wrap: wrap; gap: 9px; }
.guide-facts span { display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px; border: 1px solid #2a3945; border-radius: 3px; color: #aebbc5; font-family: monospace; font-size: 11px; }
.guide-facts .status-dot { width: 6px; height: 6px; }
.quick-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); align-items: start; gap: clamp(35px, 6vw, 74px); padding-block: 48px 90px; }
.quick-sidebar { position: sticky; top: 96px; align-self: start; padding-right: 19px; border-right: 1px solid var(--line); }
.sidebar-heading { margin: 0 0 12px; color: var(--text); font-size: 13px; font-weight: 650; }
.toc-list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.toc-list a { display: grid; grid-template-columns: 24px 1fr; gap: 6px; padding: 6px 7px; border-left: 2px solid transparent; color: #97a6b1; font-size: 12px; line-height: 1.4; text-decoration: none; }
.toc-list a span { color: #596a76; font-family: monospace; font-size: 9px; }
.toc-list a:hover, .toc-list a[aria-current="location"] { border-left-color: var(--cyan); color: var(--text); background: rgba(33, 80, 84, .18); }
.toc-list a:hover span { color: var(--cyan); }
.guide-content { min-width: 0; max-width: 780px; }
.guide-section { padding: 0 0 37px; margin: 0 0 38px; border-bottom: 1px solid var(--line); scroll-margin-top: 105px; }
.guide-section .eyebrow { margin-bottom: 8px; font-size: 9px; }
.guide-section h2 { margin: 0 0 14px; font-size: clamp(23px, 3vw, 30px); font-weight: 620; line-height: 1.2; letter-spacing: -.045em; }
.guide-section h3 { font-size: 14px; }
.guide-section > p:not(.eyebrow) { color: #b1bdc6; font-size: 15px; line-height: 1.75; }
.guide-section p a, .guide-section li a { color: var(--cyan); }
.guide-section code { font-size: .91em; }
.guide-callout { display: flex; align-items: flex-start; gap: 12px; margin: 19px 0; padding: 14px 15px; border: 1px solid #28585d; border-left: 2px solid var(--cyan); border-radius: 3px; background: rgba(20, 53, 58, .24); }
.callout-mark { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; border: 1px solid var(--cyan-dim); border-radius: 50%; color: var(--cyan); font-family: monospace; font-size: 10px; }
.guide-callout p { margin: 0; color: #b6c3cc; font-size: 14px; line-height: 1.7; }
.guide-callout strong { color: var(--text); }
.callout-amber { border-color: #685033; border-left-color: var(--amber); background: rgba(74, 52, 25, .18); }
.callout-amber .callout-mark { border-color: #806642; color: var(--amber); }
.check-list, .detail-list { display: grid; gap: 8px; margin: 17px 0; padding: 0; list-style: none; }
.check-list li, .detail-list li { position: relative; padding-left: 19px; color: #aebbc5; font-size: 14px; line-height: 1.65; }
.check-list li::before { position: absolute; left: 0; color: var(--green); content: "✓"; font-family: monospace; }
.detail-list li::before { position: absolute; left: 1px; color: var(--cyan); content: "—"; }
.detail-list strong { color: var(--text); }
.guide-code { margin: 16px 0; }
.guide-code pre { max-height: 620px; font-size: 12px; }
.guide-code .code-caption { border-top: 1px solid #202c35; }
.language-examples { margin: 16px 0 24px; overflow: hidden; border: 1px solid #2a3945; border-radius: 5px; background: #0a1016; }
.language-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid #2a3945; background: #101820; scrollbar-width: thin; }
.language-examples:not(.tabs-enabled) .language-tabs { display: none; }
.language-tab { position: relative; flex: 0 0 auto; min-height: 44px; padding: 0 15px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #93a3af; cursor: pointer; font: 12px/1.2 var(--mono); white-space: nowrap; }
.language-tab:hover { color: var(--text); background: rgba(255,255,255,.025); }
.language-tab[aria-selected="true"] { border-bottom-color: var(--cyan); color: var(--cyan); background: rgba(54,203,198,.06); }
.language-tab:focus-visible { z-index: 1; outline: 2px solid var(--cyan); outline-offset: -3px; }
.language-sample { padding: 16px 18px 18px; }
.language-sample + .language-sample { border-top: 1px solid #202c35; }
.tabs-enabled .language-sample { border-top: 0; }
.language-sample[hidden] { display: none; }
.language-sample-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.language-sample-heading .code-kind { color: var(--cyan); font: 10px/1.4 var(--mono); letter-spacing: .08em; }
.language-sample-heading a { color: #81929f; font-size: 11px; text-decoration: none; }
.language-sample-heading a:hover { color: var(--cyan); }
.language-sample-note { margin: 0 0 12px; color: #9baab4; font-size: 13px; line-height: 1.6; }
.language-sample pre { max-width: 100%; margin: 0; overflow: auto; padding: 14px 15px; border: 1px solid #202c35; border-radius: 3px; background: #080d12; color: #c5d0d8; font: 12px/1.7 var(--mono); tab-size: 4; }
.subheading { margin: 30px 0 8px; color: var(--text); font-size: 15px !important; font-weight: 600; }
.guide-last { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.troubleshoot-list { border-top: 1px solid var(--line); }
.troubleshoot-list details { border-bottom: 1px solid var(--line); }
.troubleshoot-list summary { position: relative; padding: 13px 28px 13px 2px; color: #d4dde3; cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.troubleshoot-list summary::-webkit-details-marker { display: none; }
.troubleshoot-list summary::after { position: absolute; right: 5px; color: var(--cyan); content: "+"; font-family: monospace; font-size: 16px; }
.troubleshoot-list details[open] summary::after { content: "−"; }
.troubleshoot-list details p { max-width: 660px; margin: 0; padding: 0 20px 14px 2px; color: #9eacb6; font-size: 14px; line-height: 1.7; }
.next-links { border-top: 1px solid var(--line); }
.next-links a { display: grid; grid-template-columns: 28px 1fr 18px; align-items: center; gap: 9px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: #b6c2cb; font-size: 14px; text-decoration: none; }
.next-links a > span:first-child { color: var(--cyan); font-family: monospace; font-size: 9px; }
.next-links a strong { font-weight: 550; }
.next-links a > span:last-child { color: var(--cyan); text-align: right; }
.next-links a:hover strong { color: var(--cyan); }

@media (max-width: 900px) {
  .main-nav { gap: 13px; }
  .main-nav a { font-size: 13px; }
  .brand-meta { display: none; }
  .hero-grid { gap: 35px; }
  .flow { gap: 5px; }
  .flow-node { min-width: 47px; font-size: 9px; }
  .footer-main { grid-template-columns: auto 1fr; }
  .footer-nav { grid-column: 1 / -1; }
  .quick-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
  .quick-sidebar { padding-right: 12px; }
  .toc-list a { grid-template-columns: 21px 1fr; gap: 4px; padding-inline: 4px; font-size: 11px; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 70px; }
  .container { width: min(var(--content), calc(100% - 34px)); }
  .header-inner { min-height: 64px; align-items: flex-start; flex-direction: column; gap: 7px; padding-block: 10px; }
  .brand-name { font-size: 24px; }
  .brand-meta { display: inline; }
  .main-nav { width: 100%; flex-wrap: wrap; gap: 6px 16px; overflow: visible; padding: 1px 1px 4px; }
  .main-nav a { font-size: 12px; }
  .main-nav .nav-github { margin-left: 0; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; padding-block: 70px 60px; }
  .hero-console { max-width: none; justify-self: stretch; }
  .hero-gridline { background-size: 48px 48px; }
  .section { padding-block: 70px; }
  .architecture-grid, .scope-grid, .code-grid { grid-template-columns: 1fr; }
  .architecture-panel { padding: 17px; }
  .benefits-grid { grid-template-columns: 1fr; gap: 19px; }
  .benefit { padding-top: 12px; }
  .section-heading { margin-bottom: 28px; }
  .code-panel pre { font-size: 11px; }
  .ecosystem-item { grid-template-columns: 28px 1fr; gap: 9px; }
  .eco-tag { grid-column: 2; justify-self: start; }
  .ecosystem-cta { align-items: flex-start; flex-direction: column; }
  .teaser-inner { align-items: flex-start; flex-direction: column; }
  .teaser-inner .button { flex: 0 0 auto; }
  .guide-hero { padding-block: 28px 34px; }
  .guide-lede { font-size: 15px; }
  .quick-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 0; }
  .quick-sidebar { position: static; top: auto; z-index: auto; margin-inline: 0; padding: 10px 0 11px; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
  .sidebar-heading { margin-bottom: 5px; font-size: 11px; }
  .toc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 7px; overflow: visible; padding: 1px 1px 3px; }
  .toc-list li { min-width: 0; }
  .toc-list a { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px; min-height: 30px; align-items: center; padding: 4px 5px; border-left: 2px solid transparent; border-bottom: 0; border-radius: 2px; font-size: 11px; line-height: 1.3; }
  .toc-list a:hover, .toc-list a[aria-current="location"] { border-bottom: 0; border-left-color: var(--cyan); }
  .guide-section { padding-bottom: 29px; margin-bottom: 30px; scroll-margin-top: 170px; }
  .guide-code pre { font-size: 10.5px; }
  .language-sample { padding: 13px 12px 14px; }
  .language-tab { min-height: 41px; padding-inline: 12px; font-size: 11px; }
  .language-sample pre { font-size: 10.5px; }
}

@media (max-width: 420px) {
  .container { width: calc(100% - 28px); }
  h1 { font-size: 55px; }
  .flow { gap: 4px; }
  .flow-node { min-width: 42px; min-height: 48px; padding-inline: 2px; font-size: 8px; }
  .flow-arrow { font-size: 10px; }
  .panel-heading { gap: 8px; }
  .panel-label { font-size: 8px; }
  .console-footer { gap: 8px; font-size: 8px; }
  .footer-main { grid-template-columns: 1fr; gap: 11px; }
  .footer-nav { gap: 11px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* API reference: definitions stay readable as complete, wrapping C declarations. */
.api-list { display: grid; gap: 0; margin: 14px 0 24px; }
.api-entry { min-width: 0; padding: 17px 0 18px; border-bottom: 1px solid var(--line); }
.api-entry:first-child { border-top: 1px solid var(--line); }
.api-entry > :last-child { margin-bottom: 0; }
.api-signature, .api-definition { margin: 0 0 11px; color: var(--text); font-size: 14px; line-height: 1.75; font-weight: 650; }
.api-signature code, .api-definition code { color: var(--cyan); font-size: .94em; font-weight: 650; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.api-definition { font-size: 15px; }
.api-details { display: grid; gap: 7px; margin: 11px 0 0; }
.api-details > div { display: grid; grid-template-columns: minmax(88px, 115px) minmax(0, 1fr); gap: 12px; }
.api-details dt { color: #8fa0ac; font-family: monospace; font-size: 11px; }
.api-details dd { min-width: 0; margin: 0; color: #aebbc5; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.api-entry > p:not(.api-signature) { color: #aebbc5; }
@media (max-width: 560px) {
  .api-details > div { grid-template-columns: 1fr; gap: 2px; }
}
