/* Shared module surfaces: white canvas, cool reading panels, and pale sapphire emphasis. */
:root {
  --module-white: #ffffff;
  --module-paper: #fcfdff;
  --module-ice: #fcfdff;
  --module-ice-strong: #f9fbff;
  --module-line: #d5dffa;
  --module-slate: #fcfdfe;
  --module-slate-raised: #f9fbfd;
  --module-ink: #082b78;
  --module-copy: #34465f;
  --module-muted: #52637b;

  --sapphire: #2055ed;
  --sapphire-deep: #1744c4;
  --sapphire-ink: var(--module-ink);
  --sapphire-text: var(--module-copy);
  --sapphire-muted: var(--module-muted);
  --sapphire-paper: var(--module-paper);
  --sapphire-white: var(--module-white);
  --sapphire-ice: var(--module-ice);
  --sapphire-stage: var(--module-ice-strong);
  --sapphire-line: var(--module-line);
  --studio-paper: var(--module-paper);
  --bright-paper: var(--module-paper);
  --chat-paper: var(--module-paper);
  --tw-paper: var(--module-paper);
  --selection-paper: var(--module-paper);
}

body,
body main,
body .lab-main,
body #software-main { background-color: var(--module-white); }

/* Home: dialog, execution, architecture, product, scenarios, engineering. */
body[data-page="home"] #conversation-demo { background: var(--module-white); }
body[data-page="home"] #conversation-demo { padding-bottom:40px; }
body[data-page="home"] #execution-showcase { padding-top:40px; }
@media(max-width:760px) {
  body[data-page="home"] #conversation-demo { padding-bottom:28px; }
  body[data-page="home"] #execution-showcase { padding-top:32px; }
}
body[data-page="home"] #execution-showcase {
  background: var(--module-paper);
}
body[data-page="home"] #gpnpu-advantages {
  background: var(--module-white);
}
body[data-page="home"] #products { background: var(--module-paper); }
body[data-page="home"] #products .tier-card,
body[data-page="products"] #product-range .tier-card { background: var(--module-white); }
body[data-page="home"] #products .tier-entry,
body[data-page="products"] #product-range .tier-entry { background: var(--module-ice); }
body[data-page="home"] #scenarios { background: var(--module-white); }
body[data-page="home"] #damo-advantages { background: var(--module-paper); }
body[data-page="home"] #contact { background: var(--sapphire); }

/* Architecture and inference: alternate quiet fields so each technical story reads as a module. */
body[data-page="architecture"] #lab { background: var(--module-white); }
body[data-page="architecture"] #execution { background: var(--module-paper); }
body[data-page="architecture"] #architecture-scale { background: var(--module-white); }
body[data-page="architecture"] #d100-ledger { background: var(--module-ice); }
body[data-page="architecture"] #parallel-workloads { background: var(--module-white); }
body[data-page="architecture"] .lab-cta { background: var(--sapphire); }
body[data-page="inference"] #simulator { background: var(--module-paper); }
body[data-page="inference"] #token-phases { background: var(--module-white); }
body[data-page="inference"] .lab-cta { background: var(--sapphire); }

/* Products: a soft comparison field, white cards, and a distinct selector surface. */
body[data-page="products"] .product-selection-intro { background: var(--module-white); }
body[data-page="products"] #product-range { background: var(--module-paper); }
body[data-page="products"] #device-scene { background: var(--module-white); }
body[data-page="products"] #selector { background: var(--module-paper); }
body[data-page="products"] #selection-constraints { background: var(--module-white); }
body[data-page="products"] .impact-bridge { background: var(--module-ice); }
body[data-page="products"] .lab-cta { background: var(--sapphire); }
body[data-page="products"] #selector .recommendation { background: var(--module-ice); }

/* Engineering: light modules with white evidence and a single sapphire-tinted delivery stage. */
body[data-page="engineering"] #experience { background: var(--module-white); }
body[data-page="engineering"] #team-details { background: var(--module-paper); }
body[data-page="engineering"] #x100 { background: var(--module-white); }
body[data-page="engineering"] #validation-evidence { background: var(--module-ice); }
body[data-page="engineering"] #roadmap-details { background: var(--module-white); }
body[data-page="engineering"] #delivery { background: var(--module-ice); }
body[data-page="engineering"] #onboarding { background: var(--module-white); }
body[data-page="engineering"] .eng-contact { background: var(--module-ice-strong); }

/* Software: keep workflow, validation, workload, and delivery on the same surface rhythm. */
body[data-page="software"] #software-evolution { background: var(--module-paper); }
body[data-page="software"] #operator-feedback { background: var(--module-white); }
body[data-page="software"] #model-validation { background: var(--module-ice); }
body[data-page="software"] .software-workloads { background: var(--module-white); }
body[data-page="software"] #software-delivery { background: var(--module-paper); }

/* Inner cards use the white tier of the same palette; active states remain sapphire. */
body #scenarios .scene-card,
body #experience .eng-evidence-table,
body #delivery .eng-delivery-chain li,
body #operator-feedback .operator-journey,
body #operator-feedback .operator-journey li { background-color: var(--module-white); }
body #scenarios .scene-card { background: var(--module-paper); }
body #scenarios .scene-primary { background: var(--module-ice-strong); }
body #operator-feedback .operator-journey li { background-color: var(--module-paper); }

body :is(.footer, .lab-footer, .eng-footer, .software-footer) { background: var(--module-white); }

/* White and pale sky content fields retain the original sapphire brand bands. */
:root {
  --sapphire-frost: var(--module-paper);
  --sapphire-refresh: var(--module-ice-strong);
  --bright-hero-edge: var(--module-paper);
  --color-paper-3: var(--module-ice-strong);
  --technical-hover: var(--module-paper);
  --technical-memory: var(--module-ice-strong);
  --technical-track: var(--module-ice-strong);
  --chat-wash: var(--module-ice-strong);
}
body[data-page="home"] .hero,
body :is(.lab-hero-band, .software-hero, .eng-hero) {
  background-color: var(--module-white);
  background-image: none;
}
body[data-page="home"] .metrics {
  background: var(--sapphire);
  color: #fff;
  padding-block: 26px;
}
body[data-page="home"] .metrics .metric b { color: #fff; }
body[data-page="home"] .metrics .metric span { color: #dce7ff; }
body[data-page="home"] .metrics .section-jumps a { color: #fff; }
body[data-page="home"] #products .tier-entry,
body[data-page="products"] #product-range .tier-entry { background: var(--module-ice-strong); }
body[data-page="home"] #products .tier-shared { background: var(--module-white); }
body[data-page="products"] #selector .config-field button { background: var(--module-white); }
body[data-page="products"] #selector .recommendation { background: var(--module-white); }
body[data-page="products"] #selector :is(.recommendation-capacity, .recommendation-caution) {
  background: var(--module-paper);
}
body .conversation-workbench { background: var(--module-paper); }
body .conversation-dialogue { background: var(--module-paper); }
body .conversation-diagram { background: var(--module-ice-strong); }
body :is(.cta, .lab-cta) :is(h2, h3) { color: #fff; }
body :is(.cta, .lab-cta) p { color: #e8eeff; }
body :is(.cta, .lab-cta) .btn-primary {
  background: #fff;
  color: var(--sapphire-deep);
}
body :is(.cta, .lab-cta) .btn-primary:hover { background: var(--module-paper); color: var(--module-ink); }
body :is(.cta, .lab-cta) .btn-ghost { background: transparent; color: #fff; }
body :is(.cta, .lab-cta) :focus-visible { outline-color: #fff; }

/* Technical modules share one blue-gray family instead of stacked cyan and violet fields. */
body[data-page="architecture"] #execution,
body[data-page="inference"] #simulator { background: var(--module-slate); }
body .compute-scene {
  --cs-ink: transparent;
  --cs-panel: var(--module-white);
  --cs-raised: var(--module-slate-raised);
  --cs-grid: rgb(79 108 148 / .08);
  --cs-line: #d4deeb;
  --cs-route: var(--sapphire);
  --cs-text: var(--module-ink);
  --cs-muted: var(--module-muted);
  background: transparent;
}
body .compute-scene :is(.cs-pe-cluster, .cs-pe-depth) {
  background: transparent;
  background-image: none;
}
body .compute-scene .cs-local-store,
body .compute-scene .cs-step[aria-pressed="true"] { background: var(--module-slate-raised); }
body :is(.tw-map, .ti-parallel-map, .ti-phase-map, .constraint-map) {
  background: var(--module-slate);
}
body :is(.tw-map, .ti-parallel-map, .ti-phase-map, .constraint-map)
  :is(.tw-node, .tw-evidence-node, .ti-phase-node, .ti-parallel-core, .constraint-node) {
  background: var(--module-white);
}
body :is(.tw-map, .ti-parallel-map, .ti-phase-map, .constraint-map)
  :is([data-current="true"], .ti-phase-core, .ti-phase-cache, .constraint-node:last-child) {
  background: var(--module-slate-raised);
}
body :is(.ws-webgl, .ws-stage, .device-scene-figure, .d100-product-visual, .sim-stage, .pipe-viz) {
  background: transparent;
  background-image: none;
}

/* Assembly annotations float directly over the transparent 3D scene. */
body #delivery-assembly-scene .ws-three-label {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* Home hero uses the page canvas without a tinted grid behind the chip. */
body[data-page="home"] #hero :is(.sm-hero-plane, .sm-hero-depth) { display: none !important; }
body[data-page="home"] #hero::before { content: none !important; }
body[data-page="home"] :is(#heroVisual, #chipStage) { background: transparent !important; background-image: none !important; }

/* These two modules sit directly on a continuous white canvas. */
body[data-page="engineering"] #engineering-overview .eng-history { background: transparent; }
body[data-page="engineering"] #engineering-overview > .site-motion-field,
body[data-page="engineering"] #engineering-overview :is(.sm-hero-plane, .sm-hero-depth) { display: none !important; }
body[data-page="inference"] #simulator,
body[data-page="inference"] #simulator :is(.inference-simulator, .sim-stage, .sim-side) {
  background: #fff;
  background-image: none;
}
body[data-page="inference"] #simulator .site-motion-field { display: none !important; }

/* Anchor the inference hero backdrop to all three flow nodes. */
body[data-page="inference"] .lab-hero-band :is(.sm-hero-plane, .sm-hero-depth) { display:none !important; }
body[data-page="inference"] .inference-flow-art { isolation:isolate; }
body[data-page="inference"] .inference-flow-art::before {
  content:"";
  position:absolute;
  inset:-28px -20px;
  z-index:-1;
  pointer-events:none;
  background-color:var(--module-paper);
  background-image:linear-gradient(rgb(23 68 196 / .012) 1px,transparent 1px),linear-gradient(90deg,rgb(23 68 196 / .012) 1px,transparent 1px);
  background-size:40px 40px;
}
@media(max-width:760px) {
  body[data-page="inference"] .inference-flow-art { margin-inline:0; }
  body[data-page="inference"] .inference-flow-art::before { inset:-16px -8px; }
}
