/*
 * RadioGx v5: one design system on every page. Mega menu, full site-map footer, feature directory,
 * "About this tool" answer blocks, and token bridges that put the Patent, Competitor, Scenario Lab and
 * Supply chain apps on RadioGx fonts and colours. Pixel styling stays inside the game canvas UI only.
 * © 2026 RadioGx™. All rights reserved.
 */

/* ------------------------------------------------------------------ header: one look everywhere */
.rgx-header[data-v5] .rgx-header-in { gap: 14px; }
.rgx-header[data-v5] .rgx-brand { flex: none; }
@media (max-width: 1460px) { .rgx-header[data-v5] .rgx-brand-sub { display: none; } }
.rgx-header[data-v5] .rgx-nav a { font-family: var(--font-ui); font-size: .92rem; padding: 8px 10px; }
@media (max-width: 1240px) and (min-width: 1101px) { .rgx-header[data-v5] .rgx-nav a, .rgx-mega > summary { padding: 8px 7px; font-size: .88rem; } }

/* "All tools" mega menu (details/summary: works without JavaScript, links are crawlable) */
.rgx-mega { position: static; }
.rgx-mega > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 8px 11px; border-radius: var(--r-s); font: 600 .92rem/1.2 var(--font-ui); color: var(--navy); background: var(--orange-wash); border: 1px solid color-mix(in srgb, var(--orange) 35%, transparent); white-space: nowrap; }
.rgx-mega > summary::-webkit-details-marker { display: none; }
.rgx-mega > summary svg { width: 16px; height: 16px; transition: transform .18s var(--ease); }
.rgx-mega[open] > summary svg { transform: rotate(180deg); }
.rgx-mega > summary:hover { background: color-mix(in srgb, var(--orange-wash) 60%, var(--paper)); }
.rgx-mega > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.rgx-mega-panel { position: absolute; left: 0; right: 0; top: calc(100% + 1px); z-index: 60; background: var(--paper); border: 1px solid var(--line); border-radius: 0 0 var(--r-l) var(--r-l); box-shadow: var(--shadow-2); padding: 20px 22px 14px; max-height: calc(100vh - var(--header-h) - 16px); overflow: auto; }
.rgx-mega-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.rgx-mega-h { margin: 0 0 8px; font: 700 .74rem/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); }
.rgx-mega-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rgx-header .rgx-mega-col a { display: grid; gap: 2px; padding: 7px 8px; border-radius: var(--r-s); white-space: normal; color: var(--ink); background: none; font-size: .9rem; }
.rgx-header .rgx-mega-col a b { font-weight: 650; color: var(--navy); }
.rgx-header .rgx-mega-col a span { font-size: .78rem; line-height: 1.35; color: var(--muted); font-weight: 400; }
.rgx-header .rgx-mega-col a:hover, .rgx-header .rgx-mega-col a[aria-current="page"] { background: var(--teal-wash); }
.rgx-mega-foot { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: .9rem; }
.rgx-header .rgx-mega-foot a { color: var(--teal-ink); font-weight: 600; padding: 0; background: none; }
@media (max-width: 1280px) { .rgx-mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .rgx-mega { width: 100%; }
  .rgx-mega > summary { width: 100%; justify-content: space-between; padding: 12px; font-size: 1.02rem; margin-top: 4px; }
  .rgx-mega-panel { position: static; box-shadow: none; border: 0; border-radius: 0; padding: 8px 0 0; max-height: none; background: transparent; }
  .rgx-mega-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 560px) { .rgx-mega-grid { grid-template-columns: 1fr; } .rgx-header .rgx-mega-col a span { display: none; } }
/* home hero header is dark */
.rgx-home .rgx-header .rgx-mega > summary { color: #fff; background: rgba(242, 107, 29, .18); border-color: rgba(242, 107, 29, .45); }
.rgx-home .rgx-header .rgx-mega-col a { color: var(--ink); }
@media (max-width: 1100px) { .rgx-home .rgx-header .rgx-mega-col a b { color: #fff; } .rgx-home .rgx-header .rgx-mega-col a span { color: #94a9c0; } .rgx-home .rgx-mega-h { color: var(--orange-soft); } .rgx-home .rgx-header .rgx-mega-col a:hover { background: rgba(255,255,255,.07); } }

/* AI chip and research-module chrome use the UI font, not the pixel font */
.rgxai-chip { font: 700 .68rem/1 var(--font-ui, "Instrument Sans", system-ui, sans-serif) !important; letter-spacing: .02em; border-radius: 4px; }

/* ------------------------------------------------------------------ footer: complete site map */
.rgx-footer[data-v5] .rgx-footer-top { display: grid; grid-template-columns: auto 1fr auto; gap: 18px 28px; align-items: center; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.rgx-footer[data-v5] .rgx-footer-top p { margin: 0; max-width: 70ch; }
.rgx-footer-grid.rgx-footer-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.rgx-footer-grid-6 > :first-child { grid-column: auto !important; }
.rgx-footer[data-v5] ul { gap: 4px; }
.rgx-footer[data-v5] li { line-height: 1.35; }
@media (max-width: 1100px) { .rgx-footer-grid.rgx-footer-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rgx-footer[data-v5] .rgx-footer-top { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .rgx-footer-grid.rgx-footer-grid-6 { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ directory (home + /features/) */
.rgx-eyebrow { margin: 0 0 6px; font: 700 .76rem/1.2 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--orange-ink); }
.rgx-directory { padding-top: 56px; }
.rgx-dir-group { margin-top: 30px; }
.rgx-dir-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 12px; }
.rgx-dir-head h2, .rgx-dir-head h3 { margin: 0; font-size: 1.32rem; }
.rgx-dir-head p { margin: 0; color: var(--muted); font-size: .95rem; max-width: 80ch; }
.rgx-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rgx-dir-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); box-shadow: var(--shadow-1); transition: border-color .15s, transform .15s var(--ease); }
.rgx-dir-card:hover { border-color: var(--teal); transform: translateY(-1px); }
.rgx-dir-card h3, .rgx-dir-card h4 { margin: 0; font-size: 1.05rem; }
.rgx-dir-card h3 a, .rgx-dir-card h4 a { color: var(--navy); text-decoration: none; }
.rgx-dir-card h3 a::after, .rgx-dir-card h4 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.rgx-dir-card h3 a:focus-visible::after, .rgx-dir-card h4 a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.rgx-dir-card p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.rgx-dir-card .rgx-check { font-size: .86rem; }
.rgx-runs-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.rgx-runs { font: 600 .7rem/1 var(--font-ui); padding: 4px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--canvas); white-space: nowrap; }
.rgx-runs-browser { color: var(--teal-ink); background: var(--teal-wash); border-color: color-mix(in srgb, var(--teal) 40%, transparent); }
.rgx-runs-byok { color: var(--orange-ink); background: var(--orange-wash); border-color: color-mix(in srgb, var(--orange) 40%, transparent); }
.rgx-runs-service { color: var(--c-gene); background: color-mix(in srgb, var(--c-gene) 10%, var(--paper)); }
.rgx-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.rgx-check li { position: relative; padding-left: 20px; line-height: 1.45; }
.rgx-check li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 9px; height: 5px; border-left: 2px solid var(--teal-ink); border-bottom: 2px solid var(--teal-ink); transform: rotate(-45deg); }
.rgx-keyfacts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 18px 0 8px; }
.rgx-keyfacts > div { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); display: grid; gap: 2px; }
.rgx-keyfacts b { font: 800 1.7rem/1 var(--font-display); color: var(--orange-ink); }
.rgx-keyfacts span { font-size: .84rem; color: var(--muted); }
@media (max-width: 900px) { .rgx-keyfacts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .rgx-keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rgx-toc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 6px; }
.rgx-toc p { margin: 0 6px 0 0; font-weight: 600; color: var(--muted); font-size: .9rem; }
.rgx-toc a { font-size: .88rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-2); background: var(--paper); }
.rgx-toc a:hover { border-color: var(--teal); color: var(--teal-ink); }
.rgx-section-tight { margin-top: 40px; }

/* ------------------------------------------------------------------ About this tool (AEO / GEO answer block) */
.rgx-about-tool { margin-top: 48px; padding: 40px 0 8px; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--canvas-2), transparent 240px); font-family: var(--font-ui); color: var(--ink); }
.rgx-about-tool h2 { font: 800 clamp(1.4rem, 2.4vw, 1.9rem)/1.15 var(--font-display); color: var(--navy); margin: 0; letter-spacing: -.01em; }
.rgx-about-tool h3 { font: 700 1.08rem/1.25 var(--font-display); color: var(--navy); margin: 0 0 10px; }
.rgx-about-head { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 18px; }
.rgx-about-head .rgx-eyebrow { flex-basis: 100%; }
.rgx-tldr { margin: 14px 0 22px; padding: 14px 18px; border-left: 4px solid var(--orange); background: var(--paper); border-radius: 0 var(--r-m) var(--r-m) 0; font-size: 1.06rem; line-height: 1.6; max-width: 92ch; box-shadow: var(--shadow-1); }
.rgx-about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.rgx-about-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.rgx-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 8px; }
.rgx-steps li { counter-increment: step; position: relative; padding-left: 34px; line-height: 1.45; min-height: 24px; }
.rgx-steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 .78rem/1 var(--font-ui); color: #fff; background: var(--navy-2, #13315c); }
.rgx-about-faq, .rgx-about-related { margin-top: 24px; }
.rgx-about-tool .rgx-faq details { background: var(--paper); }
.rgx-dir-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rgx-dir-mini a { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--paper); text-decoration: none; color: var(--ink-2); font-size: .86rem; }
.rgx-dir-mini a b { color: var(--navy); font-size: .96rem; }
.rgx-dir-mini a:hover { border-color: var(--teal); }

/* ------------------------------------------------------------------ module pages on the shared system */
.rgx .research-hero h1, .rgx .discovery h1, .rgx .sc-wrap h1 { font-family: var(--font-display); }
.rgx .research-eyebrow { font-family: var(--font-ui); }
.rgx-page-head-tight { padding-top: 18px; }

/* Scenario Lab: lab.css is a plain stylesheet; align type, colour and width with RadioGx */
.rgx.rgx-scenario body, .rgx.rgx-scenario { background: var(--canvas); }
.rgx.rgx-scenario main#main { max-width: 1280px; font-family: var(--font-ui); }
.rgx.rgx-scenario main#main h1 { font: 800 clamp(2rem, 4vw, 2.8rem)/1.08 var(--font-display); letter-spacing: -.015em; color: var(--navy); }
.rgx.rgx-scenario main#main h2, .rgx.rgx-scenario main#main h3 { font-family: var(--font-display); color: var(--navy); }
.rgx.rgx-scenario main#main .eyebrow { font-family: var(--font-ui); color: var(--orange-ink); }
.rgx.rgx-scenario main#main button:not(.rgx-btn) { font-family: var(--font-ui); border-radius: var(--r-s); }
.rgx.rgx-scenario main#main .primary { background: var(--navy-2, #13315c); }
@media (prefers-color-scheme: dark) { .rgx.rgx-scenario:not([data-theme="light"]) main#main .primary { background: var(--orange-ink); color: #1c0b02; } }
.rgx.rgx-scenario .lab-notes-foot { max-width: 1280px; margin: 0 auto; padding: 0 24px; font-size: .85rem; color: var(--muted); }

/* ------------------------------------------------------------------ app shells (Patents, Competitors): bridge their --k tokens */
html.rgx-app { --k-head: "Bricolage Grotesque", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --k-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html.rgx-app:not([data-theme="dark"]) { --k-primary: #0b2545; --k-primary-soft: #e6f7f5; --k-primary-ink: #ffffff; --k-accent: #c2410c; --k-accent-soft: #fff1e6; --k-focus: #0f766e; --k-paper: #f4f7fa; --k-surface: #ffffff; --k-raised: #ffffff; --k-ink: #0b2545; --k-ink-2: #33475e; --k-ink-3: #56687c; --k-rule: #d6dee7; --k-rule-2: #c3cfdb; }
@media (prefers-color-scheme: dark) {
  html.rgx-app:not([data-theme="light"]) { --k-primary: #2dd4bf; --k-primary-soft: #0e2f33; --k-primary-ink: #061629; --k-accent: #fb923c; --k-accent-soft: #2b170c; --k-focus: #2dd4bf; --k-paper: #091524; --k-surface: #0f1d2f; --k-raised: #12243a; --k-ink: #e8eef5; --k-ink-2: #c3d0de; --k-ink-3: #95a8bd; --k-rule: #24384f; --k-rule-2: #2f4a66; }
}
html.rgx-app body { font-family: var(--k-sans); }
html.rgx-app h1, html.rgx-app h2, html.rgx-app h3 { font-family: var(--k-head); letter-spacing: -.01em; }
html.rgx-app #k-app { min-height: calc(100vh - var(--header-h, 60px)); }
/* the shared header/footer on app shells sit in .rgx wrappers so they render on the RadioGx base tokens */
.rgx.rgx-chrome { min-height: 0; background: transparent; overflow: visible; }
html.rgx-app .rgx-chrome .rgx-header { position: relative; }
html.rgx-app .rgx-chrome .rgx-footer { margin-top: 0; }
html.rgx-app .rgx-chrome .rgx-about-tool { margin-top: 0; background: var(--canvas); }
html.rgx-app .rgx-chrome-head { position: relative; z-index: 1000; }

/* ------------------------------------------------------------------ print */
@media print { .rgx-mega, .rgx-about-related, .rgx-toc { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .rgx-dir-card, .rgx-mega > summary svg { transition: none; } }

/* compact mega menu: sub-pages show their name only */
.rgx-header .rgx-mega-col li.is-sub a { padding: 4px 8px; }
.rgx-header .rgx-mega-col li.is-sub a span { display: none; }
.rgx-header .rgx-mega-col li.is-sub a b { font-weight: 550; font-size: .86rem; color: var(--ink-2); }
.rgx-header .rgx-mega-col a b { font-size: .9rem; }
/* app shells: keep bundle element styles from leaking into the shared blocks */
.rgx-chrome .rgx-about-tool h2, .rgx-chrome .rgx-about-tool h3, .rgx-chrome .rgx-about-tool p, .rgx-chrome .rgx-footer h4 { text-align: left; }
.rgx-chrome .rgx-about-tool summary { font-family: var(--font-ui); }

/* app shells, part 2: beat the bundles' :root[data-domain] token selectors */
html.rgx-app.rgx-app[data-domain] { --k-head: "Bricolage Grotesque", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --k-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html.rgx-app.rgx-app[data-domain]:not([data-theme="dark"]) { --k-primary: #0b2545; --k-primary-soft: #e6f7f5; --k-primary-ink: #ffffff; --k-accent: #c2410c; --k-accent-soft: #fff1e6; --k-focus: #0f766e; --k-paper: #f4f7fa; --k-surface: #ffffff; --k-raised: #ffffff; --k-ink: #0b2545; --k-ink-2: #33475e; --k-ink-3: #56687c; --k-rule: #d6dee7; --k-rule-2: #c3cfdb; }
@media (prefers-color-scheme: dark) {
  html.rgx-app.rgx-app[data-domain]:not([data-theme="light"]) { --k-primary: #2dd4bf; --k-primary-soft: #0e2f33; --k-primary-ink: #061629; --k-accent: #fb923c; --k-accent-soft: #2b170c; --k-focus: #2dd4bf; --k-paper: #091524; --k-surface: #0f1d2f; --k-raised: #12243a; --k-ink: #e8eef5; --k-ink-2: #c3d0de; --k-ink-3: #95a8bd; --k-rule: #24384f; --k-rule-2: #2f4a66; }
}
html.rgx-app .rgx-chrome h1, html.rgx-app .rgx-chrome h2, html.rgx-app .rgx-chrome h3, html.rgx-app .rgx-chrome h4 { font-family: var(--font-display); color: var(--navy); }
html.rgx-app .rgx-chrome p { max-width: none; }
html.rgx-app .rgx-chrome .rgx-tldr { max-width: 92ch; }
.rgx-about-head .rgx-eyebrow { width: 100%; max-width: none; }

/* ------------------------------------------------------------------ Isotope Logistics v5 (the game keeps its pixel look) */
.rgx-game-shell { scroll-margin-top: calc(var(--header-h) + 12px); }
.rgx-game-title { font: 700 .8rem/1 var(--pixel, "Silkscreen", monospace); color: #1d160c; padding: 7px 6px; }
.rgx-game-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 12px; background: #13315c; }
.rgx-game-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #efe2c2; color: #1d160c; border: 3px solid; border-color: #fff6df #5b4c33 #5b4c33 #fff6df; box-shadow: 4px 4px 0 rgba(6, 22, 41, .45); }
.rgx-game-card h3 { margin: 0; font: 700 .95rem/1.25 var(--pixel, "Silkscreen", monospace); color: #1d160c; letter-spacing: .01em; }
.rgx-game-card p { margin: 0; font-size: .86rem; line-height: 1.45; color: #3d3324; }
.rgx-game-card .rgx-small { font-size: .8rem; }
.rgx-game-card-top { display: flex; justify-content: space-between; align-items: center; }
.rgx-game-level { font: 700 .66rem/1 var(--pixel, "Silkscreen", monospace); padding: 5px 7px; color: #fff; background: #0f766e; border: 2px solid #061629; }
.rgx-game-level.is-medium { background: #1d4ed8; } .rgx-game-level.is-hard { background: #c2410c; } .rgx-game-level.is-expert { background: #7e22ce; } .rgx-game-level.is-sandbox { background: #57534e; }
.rgx-game-stars { font-size: 1rem; letter-spacing: 2px; color: #b45309; }
.rgx-game-stars-lg { font-size: 2.2rem; text-align: center; margin: 4px 0 8px; }
.rgx-game-play { margin-top: auto; align-self: flex-start; }
.rgx-game-goal { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 6px 8px; background: #061629; color: #e8eef5; font: 700 .7rem/1.2 var(--pixel, "Silkscreen", monospace); }
.rgx-game-goal > span { display: inline-grid; gap: 3px; min-width: 150px; }
.rgx-game-goal i { display: block; height: 6px; background: #2d5b8c; position: relative; }
.rgx-game-goal i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: #ffd400; }
.rgx-game-alerts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; background: #061629; }
.rgx-game-alerts:empty { display: none; }
.rgx-game-alert { font: 700 .68rem/1 var(--pixel, "Silkscreen", monospace); color: #fff; background: #b42318; border: 2px solid #ff8a80; padding: 5px 8px; margin: 0 0 6px; }
.rgx-game-brief { padding: 8px 10px; background: #efe2c2; color: #1d160c; border-bottom: 3px solid #3d3324; font-size: .88rem; }
.rgx-game-brief p { margin: 0 0 4px; }
.rgx-game-news li.is-warn { color: #9a4a07; }
.rgx-game-fleet li { position: relative; padding-right: 64px; }
.rgx-game-mini { position: absolute; right: 0; top: 2px; font: 700 .6rem/1 var(--pixel, "Silkscreen", monospace); padding: 4px 6px; background: #c9b48a; color: #1d160c; border: 2px solid; border-color: #efe2c2 #5b4c33 #5b4c33 #efe2c2; cursor: pointer; }
.rgx-game-tool:focus-visible, .rgx-game-mini:focus-visible { outline: 3px solid #14b8a6; outline-offset: 2px; }
.rgx-game-result .rgx-table { margin: 8px 0; }
@media (max-width: 560px) { .rgx-game-picker { grid-template-columns: 1fr; padding: 8px; } .rgx-game-goal > span { min-width: 0; } }
html.rgx-app #k-app { overflow-x: clip; }

/* Scenario Lab dark mode: lab.css is light-only, so map its surfaces onto RadioGx dark tokens */
@media (prefers-color-scheme: dark) {
  .rgx.rgx-scenario:not([data-theme="light"]) { --surface: var(--paper); --border: var(--line); --muted: #95a8bd; color-scheme: dark; }
  .rgx.rgx-scenario:not([data-theme="light"]) main#main :is(.card, .safeguard, .model-card, .inference-card, .development-card, .flow-step, .empty, .lab-stages li, pre) { background: var(--paper); color: var(--ink); border-color: var(--line); }
  .rgx.rgx-scenario:not([data-theme="light"]) main#main :is(input:not([type=checkbox]):not([type=radio]), textarea, select) { background: var(--canvas-2); color: var(--ink); border-color: var(--line); }
  .rgx.rgx-scenario:not([data-theme="light"]) main#main button:not(.rgx-btn):not(.primary) { background: var(--canvas-2); color: var(--ink); border-color: var(--line); }
  .rgx.rgx-scenario:not([data-theme="light"]) main#main button:not(.rgx-btn):not(.primary):hover { background: var(--line-2); }
  .rgx.rgx-scenario:not([data-theme="light"]) main#main :is(p, li, label, h2, h3, small, span:not(.badge)) { color: inherit; }
  .rgx.rgx-scenario:not([data-theme="light"]) main#main :is(aside, .notice, [role=note]) { background: var(--teal-wash); color: var(--ink); border-color: color-mix(in srgb, var(--teal) 40%, transparent); }
}
.rgx.rgx-scenario[data-theme="dark"] { --surface: var(--paper); --border: var(--line); color-scheme: dark; }
.rgx.rgx-scenario[data-theme="dark"] main#main :is(.card, .safeguard, .model-card, .inference-card, .development-card, .flow-step, .empty, .lab-stages li, pre, input:not([type=checkbox]):not([type=radio]), textarea, select, button:not(.rgx-btn):not(.primary)) { background: var(--paper); color: var(--ink); border-color: var(--line); }
