/*
 * Visual reference pass, 2026-10-09.
 * Brand: SiteNova's pale blue paper, cobalt accent and soft white surfaces.
 * AI: Feishu AI's midnight backdrop, blue/violet light and luminous edges.
 * Paint properties only: existing typography, spacing, grids, image sizes,
 * document order, interaction and reduced-motion rules remain authoritative.
 */

body[data-visual-theme] {
  --paper: #f6f8ff;
  --ink: #151c32;
  --muted: #535f79;
  --accent: #3155dc;
  --dark: #080b18;
  --line: #22396c24;
  --skin-surface: #ffffff;
  --skin-soft: #eaf0ff;
  --skin-edge: #cfdaf1;
  --skin-shadow: 0 16px 48px #2149880f, 0 2px 6px #21498806;
  background: radial-gradient(ellipse at 80% 0, #e5ecff 0, transparent 38%), #f6f8ff;
  color: var(--ink);
}

body[data-visual-theme]::selection { background: #cddcff; color: #14234b; }
body[data-visual-theme] .site-header,
body[data-visual-theme] .case-topbar {
  background: #f6f8fff2;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 1px 0 #ffffff80;
}
body[data-visual-theme] .wordmark span,
body[data-visual-theme] .case-wordmark > span { color: var(--accent); }
body[data-visual-theme] .header-note,
body[data-visual-theme] .case-topbar > span { color: var(--muted); }
body[data-visual-theme] .contact-link { background: #ffffff8c; border-color: var(--skin-edge); }
body[data-visual-theme] .contact-link:hover { background: #eaf0ff; border-color: #9cafe8; }
body[data-visual-theme] .reading-progress { background: linear-gradient(90deg, #3b65ed, #9c96ff, #eabdb3); }
body[data-visual-theme] .display .soft { color: var(--muted); }
body[data-visual-theme] .pill { background: #ffffff80; border-color: var(--skin-edge); }
body[data-visual-theme] .pill.primary {
  background: linear-gradient(125deg, #3155dc, #335ee7);
  border-color: #3155dc;
  color: #fff;
  box-shadow: 0 7px 20px #3155dc22;
}
body[data-visual-theme] .pill:hover { border-color: var(--accent); box-shadow: 0 6px 22px #3155dc13; }
body[data-visual-theme] .tag { background: #ffffff80; border-color: var(--skin-edge); color: var(--muted); }
body[data-visual-theme] .text-link:hover { color: var(--accent); }
body[data-visual-theme] .filter-bar button { background: #ffffff90; border-color: var(--skin-edge); }
body[data-visual-theme] .filter-bar button[aria-pressed=true] { background: #3155dc; border-color: #3155dc; color: #fff; }
body[data-visual-theme] .hero {
  background: radial-gradient(ellipse at 71% 34%, #cedcffb3, transparent 46%),
              radial-gradient(ellipse at 10% 12%, #e7edff, transparent 43%), #f6f8ff;
}
body[data-visual-theme] .hero-title .second { color: #3155dc; }
body[data-visual-theme] .hero-intro { color: var(--muted); }
body[data-visual-theme] .hero-art::before { border-color: #7995e326; box-shadow: 0 0 0 32px #4672e805; }
body[data-visual-theme] .hero-art img { filter: drop-shadow(0 22px 30px #4566bd16); }
body[data-visual-theme] .hero-art .orbit-label { color: #536386; }
body[data-visual-theme] .gallery-work { box-shadow: 0 8px 26px #1835731c; }
body[data-visual-theme] .gallery-controls button { background: #ffffffb3; border-color: var(--skin-edge); }
body[data-visual-theme] .dual {
  background: radial-gradient(ellipse at 50% 0, #e3ebff, transparent 65%), #edf2ff;
}
body[data-visual-theme] .engine { border-radius: 22px; box-shadow: var(--skin-shadow); }
body[data-visual-theme] .engine.brand {
  background: radial-gradient(ellipse at 100% 5%, #d9e5ff, transparent 65%), #fff;
  color: #172243;
  box-shadow: inset 0 0 0 1px #d3def5, var(--skin-shadow);
}
body[data-visual-theme] .engine.brand .engine-art { border-color: #6689e957; box-shadow: 0 0 0 25px #5980e809, 0 0 0 51px #5980e805; }
body[data-visual-theme] .engine.brand .engine-bottom { border-color: #22396c24; }
body[data-visual-theme] .engine.ai {
  background: radial-gradient(ellipse at 96% 0, #554ba652, transparent 64%),
              radial-gradient(ellipse at 0 100%, #234e8138, transparent 70%), #0d132a;
  color: #f3f5ff;
  box-shadow: inset 0 0 0 1px #a6b7ff38, 0 18px 50px #1d285a24;
}
body[data-visual-theme] .engine.ai .engine-art { border-color: #b6bcff80; box-shadow: 0 0 28px #9894ff20, 0 0 0 28px #a0a5ff08, 0 0 0 57px #a0a5ff05; }
body[data-visual-theme] .engine.ai .engine-code,
body[data-visual-theme] .engine.ai .engine-bottom { color: #ced6ef; }
body[data-visual-theme] .feature-visual,
body[data-visual-theme] .project-card-media,
body[data-visual-theme] .brand-plate > img {
  border-radius: 18px;
  background: #eaf0ff;
  box-shadow: inset 0 0 0 1px #cfdaf1, var(--skin-shadow);
}
body[data-visual-theme] .feature-visual.contain img,
body[data-visual-theme] .project-card-media.portrait img { background: #eaf0ff; }
body[data-visual-theme] .visual-label { background: #ffffffed; color: #3d4d70; border-radius: 10px; box-shadow: 0 3px 12px #16346a0d; }
body[data-visual-theme] .feature-result strong { color: #3155dc; }
body[data-visual-theme] .impact { background: radial-gradient(ellipse at 90% 50%, #dce6ff, transparent 64%), #edf2ff; }
body[data-visual-theme] .metric strong { color: #274dc8; }
body[data-visual-theme] .comparison { background: #edf2ff; border-radius: 22px; box-shadow: inset 0 0 0 1px #d4dff5, var(--skin-shadow); }
body[data-visual-theme] .contact-panel { background: linear-gradient(140deg, #ffffff, #e7eeff); border-radius: 22px; box-shadow: inset 0 0 0 1px #d4dff5, var(--skin-shadow); }
body[data-visual-theme] .notice { background: #eaf0ff; color: #465779; border-color: #6682de; border-radius: 0 12px 12px 0; }
body[data-visual-theme] .review-field { background: #eaf0ff; color: #465779; border-color: #7d97df; }
body[data-visual-theme] .fill-table input,
body[data-visual-theme] .fill-table textarea { border-color: #cad7f2; border-radius: 12px; }
body[data-visual-theme] .fill-table code { color: #53688b; }
body[data-visual-theme] .career-project p.career-problem { color: #5b6a85; }

/* Shared dark chapters also appear inside the light homepage. */
body[data-visual-theme] .lab-section,
body[data-visual-theme] .footer,
body[data-visual-theme] .case-bottom,
body[data-visual-theme] .dark-section {
  --ink: #f2f5ff;
  --muted: #bec9e3;
  --accent: #bac9ff;
  --line: #b4c7ff2e;
  background: radial-gradient(ellipse at 88% 0, #3233674d, transparent 60%), #080b18;
  color: #f2f5ff;
}
body[data-visual-theme] .lab-section .copy,
body[data-visual-theme] .lab-section .chapter-index,
body[data-visual-theme] .footer .kicker,
body[data-visual-theme] .footer-bottom,
body[data-visual-theme] .case-bottom-links { color: #bec9e3; border-color: #b4c7ff2e; }
body[data-visual-theme] .footer h2 span { color: #b7c5ff; }
body[data-visual-theme] .footer .pill { background: #141b30; color: #edf1ff; border-color: #a4b5eb59; }
body[data-visual-theme] .footer .pill:hover { background: #202947; border-color: #b7c5ff; }
body[data-visual-theme] .lab-card {
  background: linear-gradient(145deg, #222942, #12182c);
  border-color: #a6b7e938;
  border-radius: 20px;
  box-shadow: 0 15px 44px #00000022;
}
body[data-visual-theme] .lab-card p,
body[data-visual-theme] .lab-card .status,
body[data-visual-theme] .lab-card-body > small { color: #c7d1eb; }
body[data-visual-theme] .lab-card .text-link { border-color: #b4c7ff61; }
body[data-visual-theme] .lab-thumb.recruit { background: linear-gradient(140deg, #dce8ff, #eeedff); }
body[data-visual-theme] .lab-thumb.poster { background: linear-gradient(140deg, #d8e2fa, #e9e8fa); }
body[data-visual-theme] .lab-count { background: #ffffffed; color: #354a80; border-color: #c8d6f5; }
body[data-visual-theme] .back-to-top { background: #1b2d69; border-color: #a9c0ff5e; box-shadow: 0 8px 26px #101b4933; }
body[data-visual-theme] .back-to-top:hover { background: #3155b0; }

/* Brand pages: light throughout; the works carry the visual variation. */
body[data-visual-theme="brand"] {
  --case-accent: #3155dc;
  --case-ink: #1a2d57;
  --case-soft: #526484;
  --case-surface: #eaf0ff;
  background: radial-gradient(ellipse at 28% 2%, #e2eaff, transparent 35%), #f6f8ff;
}
body[data-visual-theme="integration"] {
  --case-accent: #3155dc;
  --case-ink: #1a2d57;
  --case-soft: #526484;
  --case-surface: #eaf0ff;
}
body[data-visual-theme="brand"] .brand-entry,
body[data-visual-theme="brand"] .communication-intro {
  background: radial-gradient(ellipse at 36% 28%, #dce7ffa8, transparent 66%);
}
body[data-visual-theme="brand"] .case-hero,
body[data-visual-theme="integration"] .case-hero {
  background: radial-gradient(ellipse at 70% 10%, #d1e1ffc2, transparent 58%),
              linear-gradient(120deg, #f7f9ff, #eaf0ff);
  color: #1a2d57;
}
body[data-visual-theme="brand"] .case-hero::before { border-color: #759be526; box-shadow: 0 0 0 52px #759be507, 0 0 0 104px #759be504; }
body[data-visual-theme="brand"] .case-copy,
body[data-visual-theme="brand"] .case-summary,
body[data-visual-theme="brand"] .case-english-title,
body[data-visual-theme="brand"] .case-eyebrow,
body[data-visual-theme="brand"] .case-facts dt,
body[data-visual-theme="brand"] .case-results span,
body[data-visual-theme="brand"] .case-data-note,
body[data-visual-theme="brand"] .case-media figcaption,
body[data-visual-theme="brand"] .case-section-label > p { color: #526484; }
body[data-visual-theme="brand"] .case-results strong { color: #3155dc; }
body[data-visual-theme="brand"] .brand-responsibility,
body[data-visual-theme="brand"] .media-placeholder,
body[data-visual-theme="brand"] .media-study {
  background: linear-gradient(125deg, #ffffff, #eaf0ff);
  border-color: #cbd8ef;
  border-radius: 18px;
  color: #1a2d57;
  box-shadow: var(--skin-shadow);
}
body[data-visual-theme="brand"] .media-study strong { color: #263c68; }
body[data-visual-theme="brand"] .media-study small,
body[data-visual-theme="brand"] .study-spec,
body[data-visual-theme="brand"] .media-study > div:last-child > span { color: #526484; }
body[data-visual-theme="brand"] .case-media .media-frame { border-radius: 16px; background: #eaf0ff; box-shadow: var(--skin-shadow); }
body[data-visual-theme="integration"] .case-hero :is(.case-eyebrow, .case-summary, .case-english-title, .case-facts dt, .case-results span, .case-data-note, .case-media figcaption) { color: #526484; }
body[data-visual-theme="integration"] .case-results strong { color: #3155dc; }
body[data-visual-theme="integration"] .case-media .media-frame { background: #eaf0ff; border-radius: 16px; box-shadow: var(--skin-shadow); }
body[data-visual-theme] .communication-entry-visual { border-radius: 18px; box-shadow: inset 0 0 0 1px #cbd9f2, var(--skin-shadow); }
body[data-visual-theme] .communication-sketch { background: radial-gradient(ellipse at 80% 0, #d8e4ff, transparent 75%), #edf3ff; color: #294ec6; }
body[data-visual-theme] .sketch-solar { background: radial-gradient(ellipse at 90% 10%, #c9dcff, transparent 72%), #e9f1ff; color: #284cb7; }
body[data-visual-theme] .sketch-solar::after { border-color: #6c90df70; }
body[data-visual-theme] .sketch-h5 { background: linear-gradient(125deg, #3155dc, #4b67d4); color: #fff; }
body[data-visual-theme="brand"] .communication-solar {
  --ink: #151c32;
  --muted: #535f79;
  --line: #22396c24;
  background: radial-gradient(ellipse at 10% 5%, #d5e5ff, transparent 60%), #eaf1ff;
  color: #151c32;
}
body[data-visual-theme="brand"] .communication-solar .kicker,
body[data-visual-theme="brand"] .communication-solar .copy { color: #535f79; }
body[data-visual-theme="brand"] .communication-brochure { background: linear-gradient(140deg, #ffffff, #f0f4ff); color: #151c32; }
body[data-visual-theme="brand"] .communication-h5 { background: radial-gradient(ellipse at 12% 65%, #dce9ff, transparent 58%), #f6f8ff; color: #151c32; }
body[data-visual-theme="brand"] .communication-piece .media-placeholder { box-shadow: var(--skin-shadow); }
body[data-visual-theme="brand"] .visual-solar { background: linear-gradient(140deg, #253e72, #111d3c); color: #edf2ff; }
body[data-visual-theme="brand"] .visual-solar > div > span,
body[data-visual-theme="brand"] .visual-solar small { color: #c8d7f7; }
body[data-visual-theme="brand"] .visual-brochure,
body[data-visual-theme="brand"] .grid-brochure > .communication-piece:first-child .visual-brochure { background: linear-gradient(140deg, #ffffff, #e4edff); color: #31476e; }
body[data-visual-theme="brand"] .visual-h5 { background: #ffffff; color: #435a83; }
body[data-visual-theme="brand"] .h5-showcase-surround {
  background: linear-gradient(125deg, #c3d9ff, #d5e2ff 60%, #e9eaff);
  box-shadow: inset 0 0 0 1px #b9cff6, 0 24px 64px #4261b51a;
}
body[data-visual-theme="brand"] .h5-showcase-placeholder { background: radial-gradient(ellipse at 20% 0, #e1ecff, transparent 70%), #fff; }
body[data-visual-theme="brand"] .h5-placeholder-mark { color: #3155dc; border-color: #abc2f4; box-shadow: 14px 14px 0 #c9d9fa30; }

/* AI pages use the same grids and typography on midnight surfaces. */
body[data-visual-theme="ai"] {
  --paper: #080b18;
  --ink: #f2f5ff;
  --muted: #bcc8e2;
  --accent: #bac9ff;
  --line: #b3c3ee2b;
  --skin-surface: #131b30;
  --skin-soft: #1b2541;
  --skin-edge: #8a9acb55;
  --skin-shadow: 0 16px 42px #00000022;
  --case-accent: #bac9ff;
  --case-ink: #f2f5ff;
  --case-soft: #bcc8e2;
  --case-surface: #17203a;
  --story-blue: #b2c5ff;
  --story-night: #0b1125;
  --story-light: #17213c;
  --story-text: #bcc8e2;
  color-scheme: dark;
  background: radial-gradient(ellipse at 85% 0, #34355e63, transparent 37%), #080b18;
  color: #f2f5ff;
}
body[data-visual-theme="ai"]::selection { background: #475eae; color: #fff; }
body[data-visual-theme="ai"] .site-header,
body[data-visual-theme="ai"] .site-header.dark-nav,
body[data-visual-theme="ai"] .case-topbar {
  background: #0a0e1ef2;
  color: #f2f5ff;
  border-color: #b3c3ee2b;
  box-shadow: 0 1px 0 #ffffff04;
}
body[data-visual-theme="ai"] .contact-link { background: #17203a; border-color: #92a8e666; }
body[data-visual-theme="ai"] .contact-link:hover { background: #232d4e; border-color: #c1cbff; }
body[data-visual-theme="ai"] .entry-hero { background: radial-gradient(ellipse at 80% 15%, #3a35694d, transparent 60%), #080b18; }
body[data-visual-theme="ai"] .entry-hero::after { background: linear-gradient(90deg, #080b18b8, #080b1812 72%); }
body[data-visual-theme="ai"] .entry-hero .kicker,
body[data-visual-theme="ai"] .entry-hero .copy,
body[data-visual-theme="ai"] .video-status { color: #cbd5ef; }
body[data-visual-theme="ai"] .video-pause { background: #17203ad9; border-color: #b2c3f563; }
body[data-visual-theme="ai"] .pill,
body[data-visual-theme="ai"] .entry-hero .pill {
  background: linear-gradient(#11192b, #11192b) padding-box,
              linear-gradient(120deg, #6887e9, #a292df, #cfafae) border-box;
  border-color: transparent;
  color: #eef3ff;
}
body[data-visual-theme="ai"] .pill.primary,
body[data-visual-theme="ai"] .entry-hero .primary,
body[data-visual-theme="ai"] .case-experience .pill {
  background: linear-gradient(115deg, #3559ce, #514ec3 68%, #825871);
  color: #fff;
  border-color: #8f9deb;
  box-shadow: 0 8px 28px #5368eb25;
}
body[data-visual-theme="ai"] .tag { color: #cfdaef; background: #17203a; border-color: #8a9acb55; }
body[data-visual-theme="ai"] .case-hero,
body[data-visual-theme="ai"] .story-hero {
  background: radial-gradient(ellipse at 88% 5%, #4840705c, transparent 56%),
              radial-gradient(ellipse at 5% 100%, #1f3f6f40, transparent 62%), #0b1125;
  color: #f2f5ff;
}
body[data-visual-theme="ai"] .case-hero::before { border-color: #a0abdf26; box-shadow: 0 0 0 52px #a0abdf07, 0 0 0 104px #a0abdf04; }
body[data-visual-theme="ai"] .case-hero h1,
body[data-visual-theme="ai"] .story-hero h1,
body[data-visual-theme="ai"] .case-section-copy h2,
body[data-visual-theme="ai"] .media-placeholder strong,
body[data-visual-theme="ai"] .media-study strong { color: #f2f5ff; }
body[data-visual-theme="ai"] .story-hero h1 > span { color: #c3caff; }
body[data-visual-theme="ai"] .case-summary,
body[data-visual-theme="ai"] .case-eyebrow,
body[data-visual-theme="ai"] .case-english-title,
body[data-visual-theme="ai"] .case-facts dt,
body[data-visual-theme="ai"] .case-results span,
body[data-visual-theme="ai"] .case-copy,
body[data-visual-theme="ai"] .case-copy .case-note,
body[data-visual-theme="ai"] .case-data-note,
body[data-visual-theme="ai"] .case-media figcaption,
body[data-visual-theme="ai"] .case-section-label > p,
body[data-visual-theme="ai"] .case-review > div > span,
body[data-visual-theme="ai"] .case-review small,
body[data-visual-theme="ai"] .case-review details,
body[data-visual-theme="ai"] .study-spec,
body[data-visual-theme="ai"] .media-study small,
body[data-visual-theme="ai"] .media-study > div:last-child > span,
body[data-visual-theme="ai"] .media-placeholder > div > span,
body[data-visual-theme="ai"] .media-placeholder small { color: #bcc8e2; }
body[data-visual-theme="ai"] .case-results strong,
body[data-visual-theme="ai"] .case-section-label > span,
body[data-visual-theme="ai"] .media-slot-number { color: #b7c8ff; }
body[data-visual-theme="ai"] .case-facts,
body[data-visual-theme="ai"] .case-results,
body[data-visual-theme="ai"] .case-review,
body[data-visual-theme="ai"] .case-section { border-color: #b3c3ee2b; }
body[data-visual-theme="ai"] .media-placeholder,
body[data-visual-theme="ai"] .case-hero .media-placeholder,
body[data-visual-theme="ai"] .media-study {
  background: linear-gradient(135deg, #1b2541, #121a2e);
  border-color: #8396cf4d;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px #a4b3e414, var(--skin-shadow);
  color: #f2f5ff;
}
body[data-visual-theme="ai"] .case-hero .media-placeholder > div > span { color: #d9e3ff; }
body[data-visual-theme="ai"] .media-study .study-visual > span { background: #18223beb; color: #cfdaef; border-radius: 10px; }
body[data-visual-theme="ai"] .case-system-map { border-color: #b3c3ee2b; }
body[data-visual-theme="ai"] .case-system-map > p,
body[data-visual-theme="ai"] .case-system-map small { color: #bcc8e2; }
body[data-visual-theme="ai"] .case-system-map li > span { background: #17223d; border-color: #8da5e5; color: #dce6ff; }
body[data-visual-theme="ai"] .case-system-map li:not(:last-child)::after { background: #a3b5e542; }
body[data-visual-theme="ai"] .case-related p,
body[data-visual-theme="ai"] .case-related a { color: #bcc8e2; border-color: #8599c6; }
body[data-visual-theme="ai"] .workflow-steps button { background: #17213a; color: #ccd6f0; border-radius: 10px 10px 0 0; }
body[data-visual-theme="ai"] .workflow-steps button[aria-selected=true] {
  background: linear-gradient(140deg, #2c3b67, #36365e);
  color: #fff;
  border-color: #a4bbff;
  box-shadow: inset 0 1px 0 #a6b5ff66, 0 4px 20px #6d75db12;
}
body[data-visual-theme="ai"] .workflow-panel { background: linear-gradient(140deg, #202b47, #161c33); border-radius: 16px; box-shadow: inset 0 0 0 1px #a3b5e533; }
body[data-visual-theme="ai"] .impact { background: radial-gradient(ellipse at 75% 5%, #4035604f, transparent 64%), #10172b; }
body[data-visual-theme="ai"] .metric strong { color: #ccd5ff; }
body[data-visual-theme="ai"] .notice,
body[data-visual-theme="ai"] .review-field { background: #1b2541; border-color: #8da5ef; color: #d1daf0; }
body[data-visual-theme="ai"] .demo-cta { background: linear-gradient(135deg, #1b2441, #141a2f); border-color: #8d9fcd4f; border-radius: 20px; }
body[data-visual-theme="ai"] .field input,
body[data-visual-theme="ai"] .field textarea,
body[data-visual-theme="ai"] .field select,
body[data-visual-theme="ai"] .job-select { background: #141e35; border-color: #91a3d659; border-radius: 12px; color: #f2f5ff; }
body[data-visual-theme="ai"] .field input:focus,
body[data-visual-theme="ai"] .field textarea:focus,
body[data-visual-theme="ai"] .field select:focus { border-color: #b6c8ff; box-shadow: 0 0 0 3px #728bd222; }
body[data-visual-theme="ai"] .demo-controls button { background: #1e2b4a; color: #dce5fa; border-radius: 10px; }
body[data-visual-theme="ai"] .demo-controls .danger { color: #ffc4cd; }
body[data-visual-theme="ai"] .demo-preview { background: linear-gradient(140deg, #202a47, #131b31); border-radius: 20px; box-shadow: inset 0 0 0 1px #8195cf4d, var(--skin-shadow); }
body[data-visual-theme="ai"] .demo-preview iframe { border-radius: 12px; background: #e4f1ff; color-scheme: light; }
body[data-visual-theme="ai"] .preview-toolbar button { background: linear-gradient(115deg, #3559ce, #514ec3); color: #fff; }
body[data-visual-theme="ai"] .preview-actions #preview-reload { background: #273553; color: #e4ecff; border-color: #94a9df5c; }
body[data-visual-theme="ai"] .demo-message { color: #d0dcf6; }
body[data-visual-theme="ai"] .png-results { border-color: #94a9df4f; }
body[data-visual-theme="ai"] .png-files li { background: #202c46; border-radius: 12px; }
body[data-visual-theme="ai"] .png-files small { color: #c2d1ed; }
body[data-visual-theme="ai"] .png-preview { background: #e4edfc; border-radius: 8px; }
body[data-visual-theme="ai"] .screen-tabs button { background: #17213a; color: #cbd7ef; border-color: #899dd45c; }
body[data-visual-theme="ai"] .screen-tabs button[aria-selected=true] { background: #344b88; color: #fff; border-color: #a8bfff; }
body[data-visual-theme="ai"] .poster-screens,
body[data-visual-theme="ai"] .screen-panel { background: #151e34; border-radius: 18px; }
body[data-visual-theme="ai"] .screen-panel .minor-note { color: #c3cfea; }

/* Real artwork keeps a light mat and is never tinted, filtered or inverted. */
body[data-visual-theme="ai"] .project-card-media,
body[data-visual-theme="ai"] .feature-visual,
body[data-visual-theme="ai"] .case-media .media-frame,
body[data-visual-theme="ai"] .case-hero .case-media.is-portrait .media-frame {
  background: #e6edfa;
  border-radius: 16px;
  box-shadow: 0 16px 40px #00000022, 0 0 0 1px #afc0f526;
}
body[data-visual-theme="ai"] .project-card-media.portrait img { background: #e6edfa; }
body[data-visual-theme="ai"] .media-open-label { background: #fff; color: #233d71; }

/* Menu chapters retain their existing sequence, layering and active steps. */
body[data-visual-theme="ai"] .story-challenge,
body[data-visual-theme="ai"] .story-execution { background: #0a1021; }
body[data-visual-theme="ai"] .story-insight,
body[data-visual-theme="ai"] .story-outcome { background: radial-gradient(ellipse at 95% 0, #36385f45, transparent 64%), #151e34; }
body[data-visual-theme="ai"] .story-system,
body[data-visual-theme="ai"] .story-reflection { background: radial-gradient(ellipse at 10% 30%, #29356145, transparent 60%), #080d1d; }
body[data-visual-theme="ai"] .story-cover-wrap { background: linear-gradient(140deg, #273353, #171f36); border-color: #9aadcf52; box-shadow: 0 22px 52px #00000026, 0 0 36px #828dfb0e; }
body[data-visual-theme="ai"] .story-cover-wrap::before { background: #1b2540; border-color: #93a5d638; }
body[data-visual-theme="ai"] .story-cover-wrap figcaption,
body[data-visual-theme="ai"] .story-cover-note { color: #cbd8f0; border-color: #a5b8e336; }
body[data-visual-theme="ai"] .story-tab-list button { background: #10192c; color: #c2d0ed; border-color: #899fcd59; }
body[data-visual-theme="ai"] .story-tab-list button[aria-selected=true] { background: linear-gradient(115deg, #3559ce, #514ec3); border-color: #a7b4fb; color: #fff; }
body[data-visual-theme="ai"] .story-tab-list button:hover { border-color: #b9c9ff; }
body[data-visual-theme="ai"] .menu-document-label,
body[data-visual-theme="ai"] .story-project-details > p { color: #c2d0ea; }
body[data-visual-theme="ai"] .menu-document p { color: #bcc8e2; }
body[data-visual-theme="ai"] .menu-info-grid article,
body[data-visual-theme="ai"] .menu-role-grid article {
  background: linear-gradient(140deg, #1b2641, #131c31);
  border-color: #94a6d342;
  box-shadow: inset 0 1px 0 #b6c5ec0a, 0 14px 30px #00000015;
}
body[data-visual-theme="ai"] .menu-role-grid article:nth-child(2) { background: linear-gradient(135deg, #26324f, #1a2540); }
body[data-visual-theme="ai"] .menu-role-grid article:nth-child(3) { background: linear-gradient(135deg, #302e53, #202440); }
body[data-visual-theme="ai"] .menu-info-grid h3,
body[data-visual-theme="ai"] .menu-role-grid h3 { color: #eef3ff; }
body[data-visual-theme="ai"] .menu-info-grid article > small { color: #b2c5ff; }
body[data-visual-theme="ai"] .story-system .menu-document,
body[data-visual-theme="ai"] .story-reflection .menu-document { background: linear-gradient(140deg, #19233c, #121a2e); border-color: #a2b4e033; }
body[data-visual-theme="ai"] .menu-live-flow::before { background: #95aceb40; }
body[data-visual-theme="ai"] .menu-live-flow > li > small { background: #151f36; border-color: #8a9fd4; color: #dce6ff; }
body[data-visual-theme="ai"] .menu-live-flow > li.is-step-current { background: linear-gradient(110deg, #2b3b66, #38335e); }
body[data-visual-theme="ai"] .menu-live-flow > li.is-step-current > small { background: #4666b8; color: #fff; border-color: #b0c8ff; }
body[data-visual-theme="ai"] .story-output-notes,
body[data-visual-theme="ai"] .story-project-details { color: #bcc8e2; border-color: #a5b8e336; }

/* Dialogs use their own light colors, including on dark AI pages. */
body[data-visual-theme] .contact-dialog,
body[data-visual-theme] .image-dialog {
  --paper: #f6f8ff;
  --ink: #151c32;
  --muted: #535f79;
  --accent: #3155dc;
  color-scheme: light;
  color: #151c32;
  background: #f6f8ff;
  border-radius: 20px;
  box-shadow: 0 30px 100px #02071666;
}
body[data-visual-theme] .contact-dialog p,
body[data-visual-theme] .image-dialog p { color: #475a7d; }
body[data-visual-theme] .image-tools button { background: #fff; color: #263d68; border-color: #bdcde8; }
body[data-visual-theme] .image-tools button[aria-pressed=true] { background: #3155dc; border-color: #3155dc; color: #fff; }
body[data-visual-theme] .contact-dialog::backdrop,
body[data-visual-theme] .image-dialog::backdrop { background: #050a1ae6; }

/* Mobile menu colors follow the page. Existing open/closed rules are intact. */
@media (max-width: 900px) {
  body[data-visual-theme] .site-header nav { background: #f6f8ff; border-color: #cbd7f1; }
  body[data-visual-theme="ai"] .site-header nav { background: #10172b; border-color: #8ea6da47; }
}
@media (max-width: 600px) {
  body[data-visual-theme="ai"] .entry-hero::after { background: linear-gradient(90deg, #080b18ee, #080b189e 70%, #080b184a); }
}

/* Printed summaries keep dark text on a light page. The export iframe has no
 * dependency on this stylesheet and preserves the supplied poster template. */
@media print {
  body[data-visual-theme] { color-scheme: light; background: #fff; color: #172243; --ink: #172243; --muted: #526484; --line: #cbd7ee; --case-ink: #172243; --case-soft: #526484; --story-text: #526484; }
  body[data-visual-theme="ai"] .case-hero,
  body[data-visual-theme="ai"] .menu-chapter,
  body[data-visual-theme="ai"] .entry-hero,
  body[data-visual-theme="ai"] .media-study,
  body[data-visual-theme="ai"] .media-placeholder,
  body[data-visual-theme="ai"] .menu-document,
  body[data-visual-theme="ai"] .menu-info-grid article,
  body[data-visual-theme="ai"] .menu-role-grid article,
  body[data-visual-theme="ai"] .workflow-panel { background: #f5f7fc; color: #172243; box-shadow: none; }
  body[data-visual-theme="ai"] .case-hero h1,
  body[data-visual-theme="ai"] .case-section-copy h2,
  body[data-visual-theme="ai"] .case-copy,
  body[data-visual-theme="ai"] .case-summary,
  body[data-visual-theme="ai"] .case-eyebrow,
  body[data-visual-theme="ai"] .case-data-note,
  body[data-visual-theme="ai"] .case-results span,
  body[data-visual-theme="ai"] .case-media figcaption,
  body[data-visual-theme="ai"] .menu-info-grid h3,
  body[data-visual-theme="ai"] .menu-role-grid h3,
  body[data-visual-theme="ai"] .menu-document p,
  body[data-visual-theme="ai"] .menu-flow > li > strong,
  body[data-visual-theme="ai"] .menu-flow > li > p,
  body[data-visual-theme="ai"] .media-study strong,
  body[data-visual-theme="ai"] .media-study small { color: #263d68; }
}
