/* Light companion for the existing case layouts. Load after their original CSS.
   Every rule is opt-in; dark layouts and original media keep their source colors. */
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] body.cv-case-gallery {
  --bg: #f8f9fb;
  --bg-2: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #e9edf2;
  --fg: #171b23;
  --fg-soft: #48515f;
  --fg-faint: #66717f;
  --line: #cfd5dd;
  --line-soft: #e2e6ec;
  --accent: #176b50;
  --accent-soft: #176b505c;
  --gold: #176b50;
  --case-paper: #ffffff;
  --case-ink: #171b23;
  --case-muted: #66717f;
  --muted: #66717f;
  color-scheme: light;
  background: var(--bg);
  color: var(--fg);
}
html[data-theme="light"] body ::selection { background: #ccebdd; color: #10291f; }

/* Reading chrome and evidence details. Image colors are not theme transforms. */
html[data-theme="light"] :is(.cv-nav, .cv-outline) { background: var(--bg); }
html[data-theme="light"] :is(.ce-facts, .ce-stage__meta, .ce-stage__meta span:last-child) { color: var(--fg-faint); }
html[data-theme="light"] :is(.ce-hero-media > a, .ce-stage, .ce-lightbox__view) { background: var(--surface); border-color: var(--line); }
html[data-theme="light"] .ce-tab:hover { background: #edf0f4; }
html[data-theme="light"] .ce-tab[aria-selected="true"] { background: var(--surface-2); color: var(--fg); }
html[data-theme="light"] .ce-zoom::after { background: #ffffffed; color: var(--fg); border-color: #a1acba; }
html[data-theme="light"] .ce-lightbox::backdrop { background: #151c2aa8; }
html[data-theme="light"] :is(.ce-brand-mark, .ce-toolkit img, .ce-archive .ce-toolkit img) { background: #eef1f5; }
html[data-theme="light"] .cv-stack__item img[src$=".svg"] { filter: none; }
/* The source OpenAI mark is white: preserve it on a small dark tray. */
html[data-theme="light"] .cv-stack__item img[src$="/openai.png"] { background: #171b23; padding: 3px; border-radius: 4px; }

/* Shared spatial stage keeps the same arrangement, drag and handoff behavior. */
html[data-theme="light"] .cs-modes button { color: var(--fg-faint); }
html[data-theme="light"] .cs-modes button[aria-pressed="true"] { color: var(--fg); }
html[data-theme="light"] .cs-card { color: var(--fg-soft); }
html[data-theme="light"] .cs-card__frame { background: #edf0f4; border-color: #ffffff; box-shadow: 0 12px 30px #24344a26; }
html[data-theme="light"] .cs-scene[data-layout="open"] .cs-card__frame { border-color: #c5cdd8; box-shadow: none; }
html[data-theme="light"] :is(.cs-space::before, .cs-space::after) { border-color: #26364b0d; }
html[data-theme="light"] .cs-handoff { background: var(--surface); border-color: var(--line); box-shadow: 0 15px 70px #24344a33; }
html[data-theme="light"] .cs-evidence-target { outline-color: #176b5070; }

/* MiniMax workflow and community connections. */
html[data-theme="light"] .cg-step-no { background: #eef1f5; color: #596779; border-color: #a9b5c4; }
html[data-theme="light"] .cg-workflow__shot { background: #ffffff; }
html[data-theme="light"] .cg-workflow__shot .cg-brand-stamp { background: #ffffff; border-color: #c7cfda; }
html[data-theme="light"] :is(.cg-workflow__line path, .cg-channels__map path, .ce-measured-lines path) { stroke: #9aa7b8; }
html[data-theme="light"] :is(.cg-channels__map path.is-active, .ce-measured-lines path.is-active) { stroke: var(--accent); }
html[data-theme="light"] .cg-channels__core { border-color: #9aa7b8; background: var(--bg); }
html[data-theme="light"] .cg-channel { background: var(--bg); }
html[data-theme="light"] .cg-channel img { background: #ffffff; box-shadow: 0 0 0 1px #d1d8e2; }
html[data-theme="light"] .cg-channel.is-active img { box-shadow: 0 0 0 2px var(--accent); }
html[data-theme="light"] .cg-quality__bar { background: #dce3ea; }

/* The rating marks need deeper pigments on white; records/counts are unchanged. */
html[data-theme="light"] .cg-quality {
  --cr-s: #176b50;
  --cr-a: #285d8d;
  --cr-b: #596b7b;
  --cr-c: #697482;
  --cr-d: #676f7b;
}
html[data-theme="light"] [data-grade-arc="S"] { stroke: #176b50; }
html[data-theme="light"] [data-grade-arc="A"] { stroke: #285d8d; }
html[data-theme="light"] [data-grade-arc="B"] { stroke: #596b7b; }
html[data-theme="light"] [data-grade-arc="C"] { stroke: #697482; }
html[data-theme="light"] [data-grade-arc="D"] { stroke: #676f7b; }
html[data-theme="light"] body.cv-case-gallery [data-grade-button="S"] { --grade-color: #176b50 !important; }
html[data-theme="light"] body.cv-case-gallery [data-grade-button="A"] { --grade-color: #285d8d !important; }
html[data-theme="light"] body.cv-case-gallery [data-grade-button="B"] { --grade-color: #596b7b !important; }
html[data-theme="light"] body.cv-case-gallery [data-grade-button="C"] { --grade-color: #697482 !important; }
html[data-theme="light"] body.cv-case-gallery [data-grade-button="D"] { --grade-color: #676f7b !important; }
html[data-theme="light"] .cg-quality.cr-enhanced { background: var(--surface); color: var(--fg); border-color: var(--line); }
html[data-theme="light"] .cg-quality.cr-enhanced :is(.cg-caption h2, .cg-quality__total b) { color: var(--fg); }
html[data-theme="light"] .cg-quality.cr-enhanced :is(.cg-caption > span, .cg-caption p, .cg-quality__total small, .cg-quality__legend small, .cr-note) { color: var(--fg-faint); }
html[data-theme="light"] .cg-quality.cr-enhanced :is(.cg-quality__total span, .cg-quality__legend > button:not(.cg-quality__reset), .cg-quality__reset, .cr-selection) { color: var(--fg-soft); }
html[data-theme="light"] .cr-views { background: #f3f5f8; border-color: var(--line); }
html[data-theme="light"] .cg-quality.cr-enhanced .cr-view { color: var(--fg-faint); }
html[data-theme="light"] .cg-quality.cr-enhanced .cr-view[aria-pressed="true"] { background: #dde5ee; color: #24344a; }
html[data-theme="light"] .cg-quality.cr-enhanced .cg-quality__bar { background: #dce3ea; }
html[data-theme="light"] .cg-quality.cr-enhanced .cg-quality__legend button[aria-pressed="true"] > span:last-child { color: var(--fg); }
html[data-theme="light"] .cg-quality.cr-enhanced button:focus-visible { outline-color: #285d8d; }
html[data-theme="light"] :is(.cr-point--S, .cr-point--A) { box-shadow: none; }

/* Tencent graphics: original character/cover images remain untouched. */
html[data-theme="light"] body.cv-case-gallery .tg-graphic { background: var(--surface); border-color: var(--line); }
html[data-theme="light"] body.cv-case-gallery .tg-personas { background: #f0f3f7; color: var(--fg); border-color: #e3e8ef; }
html[data-theme="light"] .tg-personas :is(.tg-graphic__hint, .tg-persona span, .tg-personas__note) { color: var(--fg-faint); }
html[data-theme="light"] .tg-persona:hover span,
html[data-theme="light"] .tg-persona.is-active span { color: var(--fg); }
html[data-theme="light"] .tg-review__disc { background: #eef2f6; border-color: #9faebe; }
html[data-theme="light"] .tg-review__node:is(:hover, :focus-visible, .is-active) .tg-review__disc { box-shadow: 0 0 0 5px #176b5012; }
html[data-theme="light"] .tg-effort__track { background: #e0e6ed; }
html[data-theme="light"] .tg-effort__bar--before { background: #8393a7; }
html[data-theme="light"] .tg-cover-fan::before { background: #9faebe; }
html[data-theme="light"] .tg-cover img { box-shadow: 0 9px 22px #24344a26; }
html[data-theme="light"] .tg-distribution__action { border-color: #9aa7b8; }
html[data-theme="light"] body.cv-case-gallery.cs-ready .tg-redpack { background: transparent; }

/* AMMO graphics inherit the same light surfaces and readable accents. */
html[data-theme="light"] body.cv-case-gallery .ag-graphic {
  --ag-ink: #171b23;
  --ag-muted: #66717f;
  --ag-line: #9aa7b8;
  --ag-accent: #176b50;
  background: var(--surface);
  border-color: var(--line);
}
html[data-theme="light"] :is(.ag-tick, .ag-journey__no) { background: #edf1f5; border-color: #9faebe; color: #526174; }
html[data-theme="light"] :is(.ag-release-result .ag-tick, .ag-journey__step.is-active .ag-journey__no) { background: #176b50; color: #ffffff; border-color: #176b50; }
html[data-theme="light"] .ag-capabilities__origin { background: #edf1f5; border-color: #9faebe; color: #48515f; }
html[data-theme="light"] .ag-capability { border-color: #c6ced9; }
html[data-theme="light"] :is(.ag-capability__example, .ag-capability__example em) { color: #66717f; }
html[data-theme="light"] .ag-capability:is(:hover, .is-active) { background: #176b5008; }
html[data-theme="light"] .ag-capability img.ag-capability__symbol { background: #edf1f5; }
html[data-theme="light"] .ag-journey__preview { background: #edf1f5; border-color: #a1aebe; }
html[data-theme="light"] :is(.ag-release-result:is(:hover, .is-active) img, .ag-journey__step:is(:hover, .is-active) .ag-journey__preview) { box-shadow: 0 9px 18px #24344a24; }
html[data-theme="light"] .ag-text-link:is(:hover, .is-active) { color: var(--fg); border-color: var(--fg); }
html[data-theme="light"] .ag-journey-scroll { scrollbar-color: #9aa7b8 #edf1f5; }

/* Archived evidence and the independent Discord community case. */
html[data-theme="light"] :is(.cv-cardfig .cv-shot, .cv-work__frame) { background: #edf0f4; }
html[data-theme="light"] :is(.cv-scrollshot, .cv-portrait-shot .cv-shot, .cv-cardfig .cv-shot, .cv-side-shot .cv-shot, .cv-collage figure) { box-shadow: 0 20px 48px -28px #24344a40; }
html[data-theme="light"] :is(.cv-cardfig .cv-shot:hover, .cv-work:hover) { box-shadow: 0 24px 58px -28px #24344a40; }
html[data-theme="light"] :is(.cv-hero__media figcaption, .cv-scrollshot__hint span, .cv-collage figcaption, .cv-cover__card figcaption) { color: #24344a; background: #fffffff0; }
html[data-theme="light"] :is(.cv-phone img, .cv-ip__card, .cv-roll__slide.on img, .cv-ip-hero .cv-shot__frame img, .cv-ip-strip img, .cv-shot__frame img, .cv-work__frame img) { filter: none; }
html[data-theme="light"] .cv-figure-char::before { background: radial-gradient(closest-side, #176b5012, transparent 72%); }
html[data-theme="light"] .cv-flow__stage { background: var(--bg-2); }
html[data-theme="light"] .cv-tools li { color: var(--fg-soft); }
html[data-theme="light"] :is(.cv-vs__col--after, .cv-stat--accent) { background: var(--surface); }
html[data-theme="light"] :is(.cv-vs__tag, .cv-vs__bubble) { background: #edf1f5; }
html[data-theme="light"] .cv-vs__col--after .cv-vs__tag { background: #176b50; color: #ffffff; }
html[data-theme="light"] .cv-ip-hero .cv-shot__frame { box-shadow: 0 20px 48px -28px #24344a40; }
html[data-theme="light"] .cv-work__grade[data-g="A"] { background: #285d8d; color: #ffffff; }
html[data-theme="light"] .cv-bar--muted .cv-bar__fill { background: #8496aa; }

/* Five industrial-design halls retain their waterwheel; only the room changes.
   Scoped surfaces also prevent historical inline panel colors darkening the room. */
html[data-theme="light"] .lab-app,
html[data-theme="light"] .hall-viewer {
  --bg: #f8f9fb;
  --panel: #f3f5f8;
  --ink: #171b23;
  --soft: #48515f;
  --faint: #66717f;
  --line: #cfd5dd;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 20px #24344a08;
  --item-bg: #ffffff;
  --item-line: #cfd5dd;
  --item-shadow: 0 26px 70px #24344a26;
  --shade-rgb: 242, 245, 249;
  --fog-rgb: 243, 245, 248;
  --btn-ink: #ffffff;
  --btn-ink-soft: #ffffffcc;
  --hover-wash: #24344a08;
  --hint-bg: #ffffffeb;
  --contain-bg: #ffffff;
  --accent: #176b50;
  --accent-ink: #ffffff;
  --legible: none;
  background: var(--panel);
  color: var(--ink);
}
html[data-theme="light"] .lab-app .ascii-bg { opacity: .1; }
html[data-theme="light"] .lab-app { background: var(--panel) !important; }
html[data-theme="light"] .lab-sidebar { background: #f8f9fbf5; border-color: var(--line); }
html[data-theme="light"] .lab-app .story { --legible: none; }
html[data-theme="light"] .lab-app .story-group i { box-shadow: none; }
html[data-theme="light"] .lab-app .story-meta { color: #48515f; }
html[data-theme="light"] .lab-app :is(.hall-jump, .hall-fact) { background: #ffffff; }
html[data-theme="light"] .lab-app .hall-jump:hover { background: var(--accent); color: #ffffff; }
html[data-theme="light"] .lab-app .section-tab.is-active { background: #e5ece9; }
html[data-theme="light"] .lab-app .sound-toggle { box-shadow: 0 8px 24px #24344a26; }
html[data-theme="light"] .hall-viewer { background: #f8f9fb; }
html[data-theme="light"] .hall-viewer::backdrop { background: #151c2aa8; }
