/* Secondary routes in light mode. Only interface colors change; media keeps its colors. */
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page),
html[data-mi-theme="light"] body:has(> .auth-header),
html[data-mi-theme="light"] body:has(> .legal-header),
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) {
  color-scheme: light;
  color: #242424;
  background-color: #fafafa;
  background-image: none;
}

html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) {
  --g-bg: #fafafa;
  --g-text: #242424;
  --g-muted: #626262;
  --g-line: #d6d6d6;
  --wm-page-frost: linear-gradient(132deg, #fff, #f3f3f3 74%, #fafafa);
  background-image: var(--wm-page-grain), radial-gradient(circle, #0000000b .7px, transparent .9px);
}

html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :focus-visible,
html[data-mi-theme="light"] body:has(> .auth-header) :focus-visible,
html[data-mi-theme="light"] body:has(> .legal-header) :focus-visible,
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) :focus-visible {
  outline-color: #303030;
}

/* Authentication: labels, autofill and password controls remain legible. */
html[data-mi-theme="light"] .auth-header { border-color: #dedede; }
html[data-mi-theme="light"] :is(.auth-brand img, .auth-weave-center img, .legal-header .wordmark img) {
  filter: brightness(0);
}
html[data-mi-theme="light"] :is(.auth-home, .auth-story-copy, .auth-eyebrow, .auth-weave-caption,
  .auth-card-kicker, .auth-description, .auth-field-hint, .auth-status, .auth-switch, .auth-footer) { color: #626262; }
html[data-mi-theme="light"] .auth-home:hover { color: #111; }
html[data-mi-theme="light"] .auth-language svg { stroke: #626262; }
html[data-mi-theme="light"] .auth-language select { color: #303030; background: #fafafa; }
html[data-mi-theme="light"] .auth-eyebrow > span:first-child { background: #666; box-shadow: none; }
html[data-mi-theme="light"] .auth-weave-orbit { border-color: #d4d4d4; }
html[data-mi-theme="light"] :is(.auth-weave-center, .auth-weave-tile) {
  color: #444;
  border-color: #d0d0d0;
  background: linear-gradient(145deg, #fff, #ededed);
  box-shadow: 0 12px 28px #0000000d, inset 0 1px #fff;
}
html[data-mi-theme="light"] .auth-tile-symbol { color: #333; }
html[data-mi-theme="light"] .auth-weave-line { background: linear-gradient(90deg, #00000016, #00000060, #00000016); }
html[data-mi-theme="light"] .auth-card {
  color: #242424;
  border-color: #d5d5d5;
  background: linear-gradient(150deg, #fff, #f5f5f5);
  box-shadow: 0 24px 70px #0000000d, inset 0 1px #fff;
}
html[data-mi-theme="light"] .auth-field label { color: #3b3b3b; }
html[data-mi-theme="light"] .auth-field input {
  color: #242424;
  border-color: #bcbcbc;
  background: #fff;
  caret-color: #242424;
}
html[data-mi-theme="light"] .auth-field input::placeholder { color: #717171; opacity: 1; }
html[data-mi-theme="light"] .auth-field input:focus { border-color: #555; background: #fff; box-shadow: 0 0 0 3px #0000000a; }
html[data-mi-theme="light"] .auth-field input[aria-invalid="true"] { border-color: #a83b35; }
html[data-mi-theme="light"] .auth-field input:-webkit-autofill {
  -webkit-text-fill-color: #242424;
  box-shadow: 0 0 0 1000px #f1f1f1 inset;
  caret-color: #242424;
}
html[data-mi-theme="light"] .auth-password-toggle { color: #626262; }
html[data-mi-theme="light"] .auth-password-toggle:hover { color: #111; background: #ededed; }
html[data-mi-theme="light"] .auth-password-toggle[aria-pressed="true"] { color: #222; }
html[data-mi-theme="light"] .auth-submit { background: #242424; color: #fff; border-color: #242424; }
html[data-mi-theme="light"] .auth-submit:not(:disabled):hover { background: #080808; border-color: #080808; }
html[data-mi-theme="light"] .auth-spinner { border-color: #ffffff55; border-top-color: #fff; }
html[data-mi-theme="light"] .auth-status[data-type="error"] { color: #a12e27; }
html[data-mi-theme="light"] .auth-switch { border-color: #ddd; }
html[data-mi-theme="light"] :is(.auth-switch a, .auth-noscript) { color: #303030; }

/* Legal documents and installation guide. */
html[data-mi-theme="light"] .legal-header { border-color: #d6d6d6; }
html[data-mi-theme="light"] .legal-header > div { color: #555; }
html[data-mi-theme="light"] .legal-language select { color: #303030; border-color: #bdbdbd; background: #fff; }
html[data-mi-theme="light"] .legal-main nav a { color: #626262; }
html[data-mi-theme="light"] .legal-main nav a[aria-current="page"] { color: #222; border-color: #ccc; background: #ededed; }
html[data-mi-theme="light"] :is(.legal-eyebrow, .legal-contact) { color: #626262; }
html[data-mi-theme="light"] .legal-notice { color: #505050; background: #f0f0f0; border-color: #777; }
html[data-mi-theme="light"] .legal-main section p { color: #444; }
html[data-mi-theme="light"] .legal-contact { border-color: #d6d6d6; }
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) :is(.brand, a) { color: #222; }
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) :is(p, li) { color: #505050; }
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) ol { background: #f2f2f2; border-color: #d6d6d6; }
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) code { color: #303030; background: #e7e7e7; }
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) small { color: #626262; }
html[data-mi-theme="light"] body:has(> main > .download[data-copy]) .download { color: #fff; background: #242424; }

/* Gallery cards, filters and read-only public canvas. */
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-intro h1, .g-work-heading h1,
  .g-card h2, .g-card h3, .g-empty h2, .publish-intro h1, .publish-panel-heading h2) { color: #242424; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-current, .g-nav-projects,
  .g-language, .g-intro-copy > p:last-child, .g-eyebrow, .g-result-line, .g-filter-label, .g-card-kicker,
  .g-card-footer, .g-card-footer b, .g-empty p, .g-footer, .g-back, .g-work-description,
  .g-detail-toolbar, .g-publication-note, .g-subtle, .g-canvas-node-head span, .g-canvas-scale,
  .g-canvas-help, .g-canvas-empty) { color: #626262; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-back:hover, .g-footer > span:first-child) { color: #242424; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-button, .publish-secondary) {
  color: #333; background: #f8f8f8; border-color: #c8c8c8; box-shadow: inset 0 1px #fff;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-button, .publish-secondary):hover:not(:disabled) {
  color: #111; background: #e9e9e9; border-color: #999;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-primary, .publish-primary) {
  color: #fff; background: #242424; border-color: #242424; box-shadow: none;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-primary, .publish-primary):hover:not(:disabled) {
  color: #fff; background: #080808; border-color: #080808;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-search, .g-tabs) {
  color: #333; background: #fff; border-color: #ccc; box-shadow: none;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-search input { color: #242424; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-search input::placeholder { color: #6b6b6b; opacity: 1; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-language option, .g-filter-label select) {
  color: #333; background: #fff; border-color: #bdbdbd;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-card, .publish-panel, .publish-preview-panel) {
  color: #242424; border-color: #d0d0d0;
  background-color: #fff;
  background-image: var(--wm-page-grain), var(--wm-page-frost);
  box-shadow: inset 0 1px #fff, 0 12px 28px #0000000b;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-card:hover { border-color: #999; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-card-media, .g-canvas-node .g-node-media, .g-dialog .g-node-media) { background-color: #f3f3f3; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-card-cover-fallback, .g-node-media.g-media-empty) {
  color: #626262; background-image: radial-gradient(circle, #00000020 .8px, transparent 1px);
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-card-cover-fallback svg { fill: #e9e9e9; stroke: #737373; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-empty-diagram i { background: #f4f4f4; border-color: #8a8a8a; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-empty-diagram span { border-color: #888; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-footer, .g-readonly, .g-node-count-pill) { border-color: #d0d0d0; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-readonly { color: #555; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-tabs button { color: #626262; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-tabs button[aria-selected="true"] {
  color: #222; background: #e8e8e8; box-shadow: inset 0 1px #fff;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-result-text, .g-node-body-text, .g-canvas-node-head) { color: #3c3c3c; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-toast, #publish-toast) {
  color: #fff; background: #303030; border-color: #303030; box-shadow: 0 10px 30px #0002;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-dialog, .publish-dialog) {
  color: #242424; background: #fff; border-color: #ccc; box-shadow: 0 25px 90px #0003;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-dialog, .publish-dialog)::backdrop { background: #12121252; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) :is(.g-close, .publish-dialog header button) {
  color: #444; background: #f1f1f1; border-color: #ccc;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas {
  border-color: #ccc; background-color: #f5f5f5;
  background-image: var(--canvas-grain), radial-gradient(circle, #00000024 .8px, transparent 1px);
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-edges path { stroke: #777; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-edges circle { fill: #f5f5f5; stroke: #626262; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-node {
  color: #333; border-color: #bbb; background: linear-gradient(132deg, #fff, #f2f2f2);
  box-shadow: inset 0 1px #fff, 0 10px 30px #0000000d;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-node:is(:hover, :focus-visible) { border-color: #555; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-tools {
  background: #fffffff5; border-color: #c7c7c7; box-shadow: 0 4px 18px #00000014;
}
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-tools button { color: #333; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-tools button:hover { background: #e9e9e9; }
html[data-mi-theme="light"] body:is(.gallery-page, .publish-page) .g-canvas-tools .g-fit { border-color: #ccc; }

/* Publishing form and review states; no publishing behavior changes. */
html[data-mi-theme="light"] body.publish-page :is(.publish-intro p, .publish-help, .publish-local-note,
  .publish-panel-heading > span:first-child, .publish-panel label:not(.publish-node-choice),
  .publish-selection-heading button, .publish-node-choice small, .publish-review > p,
  .publish-success p, .publish-manage, .publish-manage button) { color: #626262; }
html[data-mi-theme="light"] body.publish-page :is(.publish-panel input:not([type="checkbox"]),
  .publish-panel select, .publish-panel textarea, #publication-url) { color: #242424; background: #fff; border-color: #bdbdbd; }
html[data-mi-theme="light"] body.publish-page :is(input, textarea)::placeholder { color: #707070; opacity: 1; }
html[data-mi-theme="light"] body.publish-page .publish-node-choice { color: #333; border-color: #ddd; background: #fafafa; }
html[data-mi-theme="light"] body.publish-page .publish-node-choice:has(input:checked) { border-color: #999; background: #ededed; }
html[data-mi-theme="light"] body.publish-page :is(.publish-node-choice input, .publish-consent input) { accent-color: #333; }
html[data-mi-theme="light"] body.publish-page .publish-preview { border-color: #d0d0d0; background: #f7f7f7; }
html[data-mi-theme="light"] body.publish-page .publish-preview-empty { color: #626262; }
html[data-mi-theme="light"] body.publish-page .publish-preview-empty svg { fill: #eee; stroke: #777; }
html[data-mi-theme="light"] body.publish-page :is(.publish-success, .publish-manage) { border-color: #d6d6d6; }
html[data-mi-theme="light"] body.publish-page .publish-error { color: #a02e20; background: #fff5f3; border-color: #dbb1aa; }

/* Shared feedback and plugin dialogs outside the already-themed homepage. */
html[data-mi-theme="light"] body:not(.story-home) .support-footer { color: #505050; border-color: #d6d6d6; }
html[data-mi-theme="light"] body:not(.story-home) :is(.support-brand .wordmark, .support-footer h2) { color: #202020; }
html[data-mi-theme="light"] body:not(.story-home) .support-brand .brand-symbol img { filter: brightness(0); }
html[data-mi-theme="light"] body:not(.story-home) :is(.support-brand p, .support-contact p, .support-bottom,
  .support-intro, .support-field-meta, .support-privacy) { color: #626262; }
html[data-mi-theme="light"] body:not(.story-home) .support-bottom { border-color: #dedede; }
html[data-mi-theme="light"] body:not(.story-home) .support-footer a:hover { color: #111; }
html[data-mi-theme="light"] body:not(.story-home) :is(.support-open, .support-close) { color: #303030; border-color: #cdcdcd; background: #f8f8f8; }
html[data-mi-theme="light"] body:not(.story-home) :is(.support-open, .support-close):hover { color: #111; border-color: #999; background: #ededed; }
html[data-mi-theme="light"] body:not(.story-home) :is(.support-dialog, .pc-dialog) {
  color: #242424; border-color: #d1d1d1; background: #fff; box-shadow: 0 24px 100px #0003;
}
html[data-mi-theme="light"] body:not(.story-home) :is(.support-dialog, .pc-dialog)::backdrop { background: #12121252; }
html[data-mi-theme="light"] body:not(.story-home) .support-form :is(input, textarea) { color: #222; border-color: #bdbdbd; background: #f8f8f8; }
html[data-mi-theme="light"] body:not(.story-home) .support-form :is(input, textarea)::placeholder { color: #6c6c6c; opacity: 1; }
html[data-mi-theme="light"] body:not(.story-home) .support-form [aria-invalid="true"] { border-color: #a93829; }
html[data-mi-theme="light"] body:not(.story-home) .support-error { color: #a02e20; }
html[data-mi-theme="light"] body:not(.story-home) .support-dialog a { color: #303030; }
html[data-mi-theme="light"] body:not(.story-home) .support-dialog a:hover { color: #000; }
html[data-mi-theme="light"] body:not(.story-home) .support-submit { color: #fff; background: #242424; }
html[data-mi-theme="light"] body:not(.story-home) .support-submit:hover:not(:disabled) { background: #080808; }
html[data-mi-theme="light"] body:not(.story-home) .support-status { color: #333; border-color: #ccc; background: #f2f2f2; }
html[data-mi-theme="light"] body:not(.story-home) :is(.support-footer a, .support-footer button, .pc-entry):focus-visible,
html[data-mi-theme="light"] body:not(.story-home) .support-dialog :focus-visible,
html[data-mi-theme="light"] body:not(.story-home) .pc-dialog :is(button, a, summary):focus-visible { outline-color: #272727; }
html[data-mi-theme="light"] body:not(.story-home) .pc-entry:hover { color: #111; }
html[data-mi-theme="light"] body:not(.story-home) .pc-dialog button { color: #303030; border-color: #cecece; background: #f5f5f5; }
html[data-mi-theme="light"] body:not(.story-home) .pc-dialog :is(button, a):hover { background-color: #e9e9e9; }
html[data-mi-theme="light"] body:not(.story-home) .pc-sidebar { color: #282828; background: #f4f4f4; border-color: #dedede; }
html[data-mi-theme="light"] body:not(.story-home) .pc-sidebar nav button { border-color: transparent; background: transparent; }
html[data-mi-theme="light"] body:not(.story-home) .pc-sidebar nav button:hover { background: #e9e9e9; }
html[data-mi-theme="light"] body:not(.story-home) .pc-sidebar nav button[aria-pressed="true"] { color: #111; border-color: #bdbdbd; background: #e5e5e5; }
html[data-mi-theme="light"] body:not(.story-home) :is(.pc-caption, .pc-nav-arrow, .pc-side-note,
  .pc-heading p, .pc-heading .pc-eyebrow, .pc-feature p, .pc-compat, .pc-download-area > span,
  .pc-step-number, .pc-steps p, .pc-state, .pc-connection p, .pc-help, .pc-footer, .pc-license code) { color: #5d5d5d; }
html[data-mi-theme="light"] body:not(.story-home) .pc-scroll { scrollbar-color: #aaa transparent; }
html[data-mi-theme="light"] body:not(.story-home) .pc-dialog .pc-close { color: #505050; background: #f2f2f2; }
html[data-mi-theme="light"] body:not(.story-home) .pc-dialog .pc-close:hover { color: #111; background: #e5e5e5; }
html[data-mi-theme="light"] body:not(.story-home) .pc-feature { border-color: #dedede; background: linear-gradient(125deg, #f8f8f8, #f3f3f3); }
html[data-mi-theme="light"] body:not(.story-home) .pc-symbol { background: #ededed; border-color: #d3d3d3; }
html[data-mi-theme="light"] body:not(.story-home) .pc-dialog .pc-download { color: #fff; border-color: #242424; background: #242424; }
html[data-mi-theme="light"] body:not(.story-home) .pc-dialog .pc-download:hover { color: #fff; border-color: #080808; background: #080808; }
html[data-mi-theme="light"] body:not(.story-home) .pc-steps li { border-color: #dedede; background: #fafafa; }
html[data-mi-theme="light"] body:not(.story-home) :is(.pc-command code, .pc-state[data-state="connected"], .pc-footer strong) { color: #292929; }
html[data-mi-theme="light"] body:not(.story-home) :is(.pc-connection, .pc-footer) { border-color: #dedede; }
html[data-mi-theme="light"] body:not(.story-home) .pc-license a { color: #333; }
html[data-mi-theme="light"] body:not(.story-home) .pc-license a:hover { color: #000; }
