/* Shared black / lime theme. Viewport size changes layout, never the palette. */
:root, :root body, :root body #main,
:root body #main :is(section, header, .module-card, .module-figure, .tensor-hero-visual, .system-component > button, .architecture-detail, .code-workbench, .code-toolbar, .compile-result) {
  --theme-bg: #000000; --theme-surface: #19191e; --theme-hover: #24242a;
  --theme-ink: #f1f2f3; --theme-muted: #b0b1b8; --theme-line: #303037;
  --theme-accent: #b4ff50; --theme-status: #b4ff50; --theme-secondary: #19191e;
  --secondary-ink: #f1f2f3; --secondary-muted: #b0b1b8; --secondary-accent: #b4ff50;
  --secondary-line: #414637; --secondary-status: #b4ff50; --secondary-scheme: dark;
  --ink: #f1f2f3; --muted: #b0b1b8; --blue: #b4ff50; --blue-dark: #b4ff50;
  --lime: #b4ff50; --line: #303037; --paper: #000000; --surface-fill: #19191e;
  --action-fill: #b4ff50; --action-hover: #cbff86; --action-text: #18200f;
  color: #f1f2f3; color-scheme: dark;
}
:root body, :root body #main,
:root body #main > :is(section, header),
:root body :is(.site-header, .site-footer) {
  background: #000000; border-color: #303037;
}
:root body #main :is(.intro-section, .capability-grid, .workflow-section, .module-gallery) {
  background: #000000; box-shadow: 0 0 0 100vmax #000000; clip-path: inset(0 -100vmax);
}
:root body #main :is(h1, h2, h3, .workflow-copy, .system-layer-title, .qnn-result-slide > header) { color: #f1f2f3; }
:root body #main :is(.hero-intro, .section-lead, .capability-card p, .workflow-copy > p:not(.kicker), .community-section > p:not(.kicker), .module-card-body > p, .system-layer-title p, .system-component > button > small, .architecture-summary > p, .tensor-section-heading p, .vqe-overview-copy > p:last-child) { color: #b0b1b8; }
:root body #main :is(.kicker, .eyebrow, .system-layer-title > span, .system-component-meta, .module-number, .card-number) { color: #b4ff50; }
:root body #main :is(.capability-card, .workflow-copy, .system-layer, .system-compiler-layer, .tensor-resources) { background: transparent; border-color: #303037; }
:root body #main .system-compiler-layer { border-left: 0; }
:root body #main :is(.module-card, .tensor-hero-visual, .module-figure, .system-component > button, .code-workbench) {
  background: #19191e; border: 1px solid #ffffff0e; border-radius: 12px;
}
#architecture .foundation-grid .system-component > button { height: 100%; }
:root body #main .module-card-upcoming { background: transparent; }
:root body #main :is(.capability-card::before, .circuit-icon::before, .circuit-icon::after, .topology-visual i, .mapping-glyph i, .research-mark i::after, .upcoming-figure > span) {
  background: #19191e; border-color: #414637;
}
:root body #main .system-component:is(:hover, :focus-within, .is-open) > button { background: #222329; border-color: #b4ff5060; }
:root body #main .architecture-detail { background: #222329; border-color: #414637; border-radius: 12px; }
:root body #main :is(.acceleration-stack b, .acceleration-stack b:last-child) { color: #b4ff50; background: #19191e; border-color: #303037; }
:root body #main :is(.resource-list, .resource-list > a, .module-keywords span, .workflow-steps, .workflow-steps li, .architecture-facts, .method-flow, .qml-workflow-grid, .vqe-overview-layout) { border-color: #303037; }
:root body #main :is(.capability-card > a, .module-card-body > a, .resource-title-row > a, .resource-list > a, .tensor-resource-links a, .tensor-resource-links button) { color: #d9ded4; }
:root body #main :is(.capability-card > a:hover, .module-card-body > a:hover, .resource-title-row > a:hover, .resource-list > a:hover) { color: #b4ff50; background: transparent; }
:root body #main :is(.button-primary, .button-light), :root body .brand-mark {
  color: #18200f; background: #b4ff50; border-color: #b4ff50;
}
:root body #main :is(.button-primary:hover, .button-light:hover) { color: #18200f; background: #cbff86; }
:root body :is(.primary-nav a[aria-current="page"], .nav-group-current .nav-group-row) { box-shadow: inset 0 -2px #b4ff50; }
:root body .primary-nav .nav-submenu { background: #19191e; border-color: #303037; }
:root body .primary-nav .nav-submenu a[aria-current="page"] { color: #b4ff50; background: #222329; }
:root body .section-rail { background: #000000; border-color: #303037; }
:root body .section-rail a[aria-current="true"] { background: #b4ff50; color: #18200f; }
:root body #main :is(.code-toolbar, .compile-result) { color: #b0b1b8; background: #1b1b21; }
:root body #main .code-workbench pre { background: #141419; }
:root body #main .code-toolbar .code-tabs button[aria-selected="true"] { color: #b4ff50; border-color: #b4ff50; }
:root body #main .compile-result strong { color: #f1f2f3; }
.code-keyword { color: #dce3d5; } .code-number, .code-string { color: #b4ff50; }

/* All chart surfaces share the page black, including expanded figures. */
:root body #main :is(.performance-overview-figure, .performance-chart-button, .metric-carousel-shell, .metric-slide > button, .circuit-display, .circuit-chart-button, .qnn-result-slide, .qnn-chart, .qnn-chart > button, .vqe-overview-figure, .vqe-overview-figure > button),
:root body :is(.lightbox-stage, .lightbox-dialog, .repository-dialog, .repository-dialog-footer) { background: #000000; border-color: #303037; color: #b0b1b8; }
:root body #main :is(.qnn-result-slide > header, .carousel-toolbar, .chart-tab-list, .chart-tab-list button, .qnn-view-switch button, .circuit-arrow-switcher > .chart-tab-list) { color: #b0b1b8; background: #19191e; border-color: #303037; }
:root body #main :is(.chart-tab-list button[aria-selected="true"], .chart-tab-list button[aria-pressed="true"], .qnn-view-switch button[aria-pressed="true"]) { color: #18200f; background: #b4ff50; }
:root body #main :is(.carousel-controls button, .carousel-side-control, .circuit-scene-arrow, .qnn-carousel-arrow) { color: #b4ff50; background: #19191e; border-color: #303037; }
:root body #main :is(.qnn-chart figcaption, .image-expand) { color: #b4ff50; background: #19191e; border-color: #414637; }
:root body #main :is(.benchmark-demo-notice, .study-notice, .study-toolbar span, .study-legend, .study-charts figcaption span, .study-footnote, .carousel-toolbar > p, .qnn-carousel-status, .performance-overview-note) { color: #b0b1b8; border-color: #303037; }
:root body #main :is(.study-toolbar, .study-charts figure + figure) { border-color: #303037; }
:root body #main .study-charts svg text { fill: #b0b1b8; }
:root body #main .hero#top {
  --theme-secondary: #161b13; --secondary-accent: #b4ff50;
  --canvas-line: rgba(180,255,80,.17); --canvas-link: rgba(180,255,80,.5);
}
body:has(.hero#top) #main :is(#resources, #community) { background: #000000; border-color: #303037; }
body:has(.hero#top) :is(.site-header, .site-footer, .section-rail) { background: #000000; border-color: #303037; }
body:has(.hero#top) .brand-mark,
body:has(.hero#top) .section-rail a[aria-current="true"] { background: #b4ff50; color: #18200f; }
:root body #main .capability-grid .circuit-icon::before,
:root body #main .capability-grid .circuit-icon::after,
:root body #main .capability-grid .topology-visual i { background: #19191e; color: #b4ff50; border-color: #b4ff5070; }
:root body #main .module-keywords span,
:root body #main .module-pending { color: #b0b1b8; }
:root body #main .module-gallery .module-card-upcoming { background: transparent; border: 0; border-top: 1px solid #303037; border-radius: 0; }
:root body #main .module-gallery .module-figure { border: 0; border-bottom: 1px solid #ffffff0e; border-radius: 0; }
