:root {
  --brand-accent: #197bb5;
  --brand-soft: #e6f3fa;
  --brand-secondary: #155b84;
  --brand-on-accent: #fff;
  --font-tajawal: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-system: 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-serif: 'Noto Naskh Arabic', 'Traditional Arabic', serif;
}

html[data-accent-mode="brand"],
html[data-accent-mode="custom"] {
  --teal: var(--brand-accent) !important;
  --teal2: var(--brand-soft) !important;
}

html[data-font-family="tajawal"] .shell,
html[data-font-family="tajawal"] .shell :not(svg):not(path) {
  font-family: var(--font-tajawal) !important;
}
html[data-font-family="system"] .shell,
html[data-font-family="system"] .shell :not(svg):not(path) { font-family: var(--font-system) !important; }
html[data-font-family="serif"] .shell,
html[data-font-family="serif"] .shell :not(svg):not(path) { font-family: var(--font-serif) !important; }

html[data-accent-mode="brand"] .marketing-view,
html[data-accent-mode="custom"] .marketing-view {
  --teal: var(--brand-accent) !important;
  --teal2: var(--brand-soft) !important;
}

html[data-accent-mode="brand"] .shell .btn.primary,
html[data-accent-mode="custom"] .shell .btn.primary,
html[data-accent-mode="brand"] .shell .marketing-view .btn.primary,
html[data-accent-mode="custom"] .shell .marketing-view .btn.primary,
html[data-accent-mode="brand"] .shell #modalCard .btn.primary,
html[data-accent-mode="custom"] .shell #modalCard .btn.primary,
html[data-accent-mode="brand"] .shell .campaign-wallet .btn,
html[data-accent-mode="custom"] .shell .campaign-wallet .btn {
  background: var(--brand-accent) !important;
  background-image: none !important;
  border-color: var(--brand-accent) !important;
  color: var(--brand-on-accent) !important;
  box-shadow: 0 4px 13px color-mix(in srgb, var(--brand-accent) 22%, transparent) !important;
}

html[data-accent-mode="brand"] .shell .btn.soft,
html[data-accent-mode="custom"] .shell .btn.soft,
html[data-accent-mode="brand"] .shell .btn.ghost,
html[data-accent-mode="custom"] .shell .btn.ghost,
html[data-accent-mode="brand"] .shell .btn:not(.primary):not(.danger):not(.status-active-open):not(.status-active-close),
html[data-accent-mode="custom"] .shell .btn:not(.primary):not(.danger):not(.status-active-open):not(.status-active-close),
html[data-accent-mode="brand"] .shell .theme-toggle,
html[data-accent-mode="custom"] .shell .theme-toggle,
html[data-accent-mode="brand"] .shell .account-logout,
html[data-accent-mode="custom"] .shell .account-logout {
  background: var(--brand-soft) !important;
  background-image: none !important;
  border-color: color-mix(in srgb, var(--brand-accent) 28%, transparent) !important;
  color: var(--brand-accent) !important;
}

html[data-accent-mode="brand"] .shell :is(.campaign-choice-pills button.active, .hours-platform-tab.active, .order-status-tab.active, .product-tab.active, [aria-pressed="true"].btn),
html[data-accent-mode="custom"] .shell :is(.campaign-choice-pills button.active, .hours-platform-tab.active, .order-status-tab.active, .product-tab.active, [aria-pressed="true"].btn) {
  background: var(--brand-soft) !important;
  background-image: none !important;
  border-color: var(--brand-accent) !important;
  color: var(--brand-accent) !important;
}

html[data-accent-mode="brand"] .shell :is(.main, .content, .view),
html[data-accent-mode="custom"] .shell :is(.main, .content, .view) {
  background-color: color-mix(in srgb, var(--brand-accent) 3%, #fff) !important;
  background-image: none !important;
}
html[data-accent-mode="brand"] .shell :is(.panel, .content-card, .campaign-stat, .store-status-card, .commerce-panel, .commerce-setting),
html[data-accent-mode="custom"] .shell :is(.panel, .content-card, .campaign-stat, .store-status-card, .commerce-panel, .commerce-setting) {
  border-color: color-mix(in srgb, var(--brand-accent) 17%, #dfe4e7) !important;
}

html[data-accent-mode="brand"] .shell .nav button.active,
html[data-accent-mode="custom"] .shell .nav button.active,
html[data-accent-mode="brand"] .shell .marketing-subnav button.active,
html[data-accent-mode="custom"] .shell .marketing-subnav button.active,
html[data-accent-mode="brand"] .shell .sidebar-foot [data-view].active,
html[data-accent-mode="custom"] .shell .sidebar-foot [data-view].active,
html[data-accent-mode="brand"] .shell .marketing-nav-toggle[aria-expanded="true"],
html[data-accent-mode="custom"] .shell .marketing-nav-toggle[aria-expanded="true"] {
  background: var(--brand-soft) !important;
  background-image: none !important;
  color: var(--brand-accent) !important;
  border-color: color-mix(in srgb, var(--brand-accent) 28%, transparent) !important;
}

html[data-accent-mode="brand"] .shell :is(.brand-mark, .brand strong, .topbar-project-label, .nav .ico, .sidebar-foot .ico),
html[data-accent-mode="custom"] .shell :is(.brand-mark, .brand strong, .topbar-project-label, .nav .ico, .sidebar-foot .ico) {
  color: var(--brand-accent) !important;
}

html[data-accent-mode="brand"] .shell :is(input, textarea, select):focus,
html[data-accent-mode="custom"] .shell :is(input, textarea, select):focus {
  border-color: var(--brand-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 18%, transparent) !important;
  outline-color: var(--brand-accent) !important;
}
html[data-accent-mode="brand"] .shell :is(input[type="checkbox"], input[type="radio"], input[type="range"]),
html[data-accent-mode="custom"] .shell :is(input[type="checkbox"], input[type="radio"], input[type="range"]) { accent-color: var(--brand-accent) !important; }

html[data-accent-mode="brand"] .shell :is(.tag, .campaign-status-dot),
html[data-accent-mode="custom"] .shell :is(.tag, .campaign-status-dot) {
  background: var(--brand-soft) !important;
  color: var(--brand-accent) !important;
}

html[data-app-theme="dark"] {
  --ink: #f4f6f8 !important;
  --muted: #d0d7df !important;
  --line: #495767 !important;
  --paper: #1c2733 !important;
  --bg: #111922 !important;
  --teal: #d98eae !important;
  --teal2: #3b2934 !important;
  --shadow: 0 8px 28px #0007 !important;
  color-scheme: dark;
}
html[data-app-theme="dark"] .shell,
html[data-app-theme="dark"] .shell .main,
html[data-app-theme="dark"] .shell .content,
html[data-app-theme="dark"] .shell .view,
html[data-app-theme="dark"] .shell .marketing-view {
  background: #111922 !important;
  color: #f4f6f8 !important;
  --ink: #f4f6f8 !important;
  --muted: #d0d7df !important;
  --line: #495767 !important;
  --paper: #1c2733 !important;
  --bg: #111922 !important;
  --teal: var(--brand-accent) !important;
  --teal2: #3b2934 !important;
}
html[data-app-theme="dark"] .shell :is(.sidebar, .topbar, .panel, .content-card, .campaign-stat, .campaign-step, .campaign-connection, .campaign-promo, .campaign-full-item, .campaign-form-section, .commerce-panel, .commerce-setting, .store-status-card, .commerce-app-card, .commerce-product-card, .platform-hours-row, .hours-global, .orders-devices, .modal-card, #modalCard, .profile-bar, .theme-popover, .usage-meters, .stat, .card, .plan-day-open, .channel-options, .campaign-choice, .campaign-specs, .campaign-create-card, .campaign-support, .campaign-wallet, .campaign-full-item, .campaign-list-toolbar, .campaign-choice-pills) {
  background: #1c2733 !important;
  background-image: none !important;
  color: #f4f6f8 !important;
  border-color: #495767 !important;
}
html[data-app-theme="dark"] .shell :is(input:not([type="color"]), textarea, select, .day, .day-name, .plan-day, .commerce-contact-details, .commerce-schedules, .delivery-compact-card, .campaign-choice, .campaign-specs, .campaign-support, .campaign-create-card) {
  background: #25313e !important;
  background-image: none !important;
  color: #f4f6f8 !important;
  border-color: #566575 !important;
}
html[data-app-theme="dark"] .shell :is(h1, h2, h3, h4, p, label, strong, th, td, .muted, .hint, small, .nav button, .nav-title, .topbar-user-name) { color: #f4f6f8 !important; }
html[data-app-theme="dark"] .shell :is(.muted, .hint, small, .nav-title, .campaign-full-item p) { color: #d0d7df !important; }
html[data-app-theme="dark"] .shell .topbar { background: #1a2531 !important; border-color: #495767 !important; }
html[data-app-theme="dark"] .shell :is(.btn.soft, .btn.ghost, .theme-toggle, .account-logout, .nav button.active, .marketing-subnav button.active, .sidebar-foot [data-view].active, .campaign-choice-pills button.active, .hours-platform-tab.active, .order-status-tab.active) {
  background: color-mix(in srgb, var(--brand-accent) 28%, #1c2733) !important;
  background-image: none !important;
  color: #fff !important;
  border-color: color-mix(in srgb, var(--brand-accent) 58%, #495767) !important;
}
html[data-app-theme="dark"] .shell .usage-ring:before { background: #1c2733 !important; }
html[data-app-theme="dark"] .shell .general-browser-surface,
html[data-app-theme="dark"] .shell .general-browser-surface iframe { background: #fff !important; color: #151515 !important; }

html[data-contrast="high"][data-app-theme="light"] { --ink: #111 !important; --muted: #343b42 !important; --line: #89939d !important; }
html[data-contrast="high"][data-app-theme="dark"] { --ink: #fff !important; --muted: #f0f3f6 !important; --line: #8998a8 !important; }
html[data-contrast="high"][data-app-theme="light"] .shell { --ink: #111 !important; --muted: #343b42 !important; --line: #89939d !important; }
html[data-contrast="high"][data-app-theme="dark"] .shell { --ink: #fff !important; --muted: #f0f3f6 !important; --line: #8998a8 !important; }
html[data-contrast="high"] .shell :is(.muted, .hint, small, .nav-title, label, p) { color: var(--muted) !important; }
html[data-text-size="large"] .shell { font-size: 1.1em !important; }
html[data-text-size="large"] .shell :is(.muted, .hint, small, label, button, input, textarea, select, th, td) { font-size: max(1em, 14px) !important; }

/* Keep the appearance controls and every app action on the same palette. */
html .shell :is(button, .btn, [role="button"], [data-in-app-back]) {
  font-family: inherit;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
html[data-accent-mode="brand"] .shell :is(.btn.primary, button.primary, [data-in-app-back]),
html[data-accent-mode="custom"] .shell :is(.btn.primary, button.primary, [data-in-app-back]) {
  background: var(--brand-accent) !important;
  background-image: none !important;
  border-color: var(--brand-accent) !important;
  color: var(--brand-on-accent) !important;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--brand-accent) 18%, transparent) !important;
}
html[data-accent-mode="brand"] .shell :is(.btn:not(.primary), .theme-toggle, .account-logout, .mobile-menu),
html[data-accent-mode="custom"] .shell :is(.btn:not(.primary), .theme-toggle, .account-logout, .mobile-menu) {
  background: var(--brand-neutral-soft) !important;
  background-image: none !important;
  border-color: var(--brand-neutral-border) !important;
  color: var(--brand-accent) !important;
}
html[data-app-theme="dark"] .shell :is(.btn:not(.primary), .theme-toggle, .account-logout, .mobile-menu, [data-in-app-back]) {
  background: var(--brand-neutral-soft) !important;
  color: #f2f4f7 !important;
}
html[data-app-theme="dark"] .shell :is(.btn.primary, button.primary, [data-in-app-back]) {
  color: var(--brand-on-accent) !important;
}
html[data-app-theme="dark"] .shell .theme-popover {
  background: #1c2733 !important;
  color: #f4f6f8 !important;
  border-color: #495767 !important;
  max-height: min(72vh, 520px);
  overflow-y: auto;
}
html[data-app-theme="dark"] .shell .theme-popover :is(label, span, hr) { color: #e1e6eb !important; }
html[data-app-theme="dark"] .shell .theme-popover :is(select, input:not([type="color"])) {
  background: #25313e !important;
  color: #fff !important;
  border-color: #566575 !important;
}
html[data-app-theme="dark"] .shell :is(input[type="checkbox"], input[type="radio"], input[type="range"]) { accent-color: var(--brand-accent) !important; }
html[data-app-theme="dark"] .shell :is(.ai-usage-trigger, .theme-toggle, .account-logout, #menuBtn, .topbar-logo-fallback) {
  background: #25313e !important;
  color: #f2f4f7 !important;
  border-color: #495767 !important;
}

/* Cards generated by the profile journey keep their own layout, but inherit the theme colors. */
html[data-app-theme="dark"] .shell :is(.project-dashboard-hero, .project-dashboard-card, .profile-map-card, .profile-journey-head, .profile-journey-steps, .profile-next-step, .profile-map-section, .profile-map-fields p) {
  background: #1c2733 !important;
  background-image: none !important;
  color: #f4f6f8 !important;
  border-color: #495767 !important;
}
html[data-app-theme="dark"] .shell :is(.profile-map-item, .profile-map-section summary, .profile-map-fields button, .profile-next-step > span) {
  background: #25313e !important;
  color: #eef2f6 !important;
  border-color: #495767 !important;
}
html[data-app-theme="dark"] .shell :is(.profile-journey-copy h3, .profile-journey-step, .profile-journey-step strong, .profile-journey-step small, .profile-progress-ring span, .profile-progress-ring small, .profile-next-step small, .project-dashboard-card p) {
  color: #e4eaf0 !important;
}
html[data-app-theme="dark"] .shell .profile-journey-step .journey-icon {
  background: #25313e !important;
  color: #e4eaf0 !important;
  border-color: #566575 !important;
}
html[data-app-theme="dark"] .shell .profile-journey-step.is-current .journey-icon,
html[data-app-theme="dark"] .shell .profile-journey-step.is-current small {
  background: var(--brand-accent) !important;
  color: var(--brand-on-accent) !important;
  border-color: var(--brand-accent) !important;
}
html[data-app-theme="dark"] .shell .profile-journey-step.is-done .journey-icon {
  background: #203a32 !important;
  color: #a9e1c0 !important;
  border-color: #47745e !important;
}
html[data-app-theme="dark"] .shell .profile-progress-ring circle { stroke: #495767 !important; }
html[data-app-theme="dark"] .shell .profile-progress-ring .progress { stroke: var(--brand-accent) !important; }
html[data-app-theme="dark"] .shell .profile-journey-step small { background: #25313e !important; }
html[data-app-theme="dark"] .shell .profile-journey-step.is-current strong { color: #fff !important; }
html[data-app-theme="dark"] .shell .project-dashboard-hero h1,
html[data-app-theme="dark"] .shell .project-dashboard-card h2 { color: #f4f6f8 !important; }

html[data-accent-mode="brand"] .shell :is(.profile-journey-copy h3, .profile-progress-ring span),
html[data-accent-mode="custom"] .shell :is(.profile-journey-copy h3, .profile-progress-ring span) {
  color: var(--brand-accent) !important;
}
html[data-accent-mode="brand"] .shell :is(.profile-progress-ring .progress, .profile-journey-step.is-current .journey-icon, .profile-journey-step.is-current small, .profile-next-step button),
html[data-accent-mode="custom"] .shell :is(.profile-progress-ring .progress, .profile-journey-step.is-current .journey-icon, .profile-journey-step.is-current small, .profile-next-step button) {
  background: var(--brand-accent) !important;
  background-color: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
  color: var(--brand-on-accent) !important;
  stroke: var(--brand-accent) !important;
}
html[data-accent-mode="brand"] .shell :is(.profile-journey-head, .profile-journey-steps, .profile-next-step, .profile-next-step > span),
html[data-accent-mode="custom"] .shell :is(.profile-journey-head, .profile-journey-steps, .profile-next-step, .profile-next-step > span) {
  background-color: var(--brand-neutral-soft) !important;
  border-color: var(--brand-neutral-border) !important;
}

/* Final app-wide palette layer: legacy pages share these semantic tokens. */
html, html .shell { --primary: var(--brand-accent) !important; --primary-strong: var(--brand-accent) !important; --teal: var(--brand-accent) !important; --teal2: var(--brand-neutral-soft) !important; --sky: var(--brand-secondary) !important; --sky-light: var(--brand-neutral-soft) !important; --blue-light: var(--brand-neutral-soft) !important; --icon-accent: var(--brand-accent) !important; --section-accent: var(--brand-accent) !important; --section-soft: var(--brand-neutral-soft) !important; }
html .shell .topbar-project-label,
html .shell :is(.nav .ico, .nav-chevron, .sidebar-foot .ico, .global-module-icon, .app-line-icon),
html .shell :is(.finance-icon, .transaction-icon, .module-icon, .section-icon, .stat-icon, .campaign-step-number, .campaign-promo-icon, .campaign-link-icon, .campaign-chart-icon) {
  color: var(--icon-accent) !important;
}
html .shell :is(.nav .ico, .nav-chevron, .global-module-icon, .finance-icon, .transaction-icon, .module-icon, .section-icon, .stat-icon, .campaign-step-number, .campaign-promo-icon, .campaign-link-icon, .campaign-chart-icon) {
  background: var(--brand-neutral-soft) !important;
  border-color: var(--brand-neutral-border) !important;
}
html .shell .marketing-nav-toggle,
html .shell .marketing-nav-toggle[aria-expanded="true"],
html .shell .nav button:is(:hover, .active),
html .shell .marketing-subnav button:is(:hover, .active),
html .shell .sidebar-foot [data-view]:is(:hover, .active) {
  background: var(--brand-neutral-soft) !important;
  background-image: none !important;
  color: var(--primary-strong) !important;
  border-color: var(--brand-neutral-border) !important;
  box-shadow: none !important;
}
html .shell .tag:not(.green):not(.amber):not(.red):not(.danger):not(.success) {
  background: var(--brand-neutral-soft) !important;
  color: var(--primary-strong) !important;
  border-color: var(--brand-neutral-border) !important;
}
html .shell :is(.project-dashboard-hero, .project-dashboard-card, .overview-list-row, .profile-map-card, .profile-journey-head, .profile-journey-steps, .profile-next-step) {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html .shell :is(.profile-journey-head, .profile-journey-steps, .profile-next-step) { background: var(--section-soft) !important; }
html .shell :is(.finance-total, .transaction-total, .project-card-content strong, .overview-list-row strong, .stat b, .dashboard-grid .stat strong) {
  color: var(--primary-strong) !important;
}
html .shell .overview-finance-grid b { color: var(--primary-strong) !important; }
html .shell :is(input, textarea, select):focus {
  border-color: var(--brand-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 18%, transparent) !important;
  outline-color: var(--brand-accent) !important;
}
html:not([data-app-theme="dark"]) body,
html:not([data-app-theme="dark"]) .shell,
html:not([data-app-theme="dark"]) .shell .main,
html:not([data-app-theme="dark"]) .shell .content,
html:not([data-app-theme="dark"]) .shell .view {
  background-color: var(--bg) !important;
  background-image: none !important;
  color: var(--ink);
}
html:not([data-app-theme="dark"]) .shell :is(.sidebar, .topbar, .panel, .content-card, .stat, .card, .commerce-panel, .commerce-setting, .store-status-card, .project-dashboard-card, .profile-map-card) {
  background-color: var(--paper) !important;
  border-color: var(--line) !important;
}
html:not([data-app-theme="dark"]) .shell :is([class*="card"], [class*="panel"], [class*="widget"], [class*="stat"]) {
  background-color: var(--paper) !important;
  border-color: var(--line) !important;
}
html:not([data-app-theme="dark"]) .shell :is(.overview-finance-grid > div, .campaign-stat, .campaign-promo, .campaign-wallet, .campaign-link-center, .campaign-performance, .campaign-latest) {
  background: var(--brand-neutral-soft) !important;
  background-image: none !important;
  border-color: var(--brand-neutral-border) !important;
}
html .shell a:not(.btn) { color: var(--icon-accent); }
html:not([data-app-theme="dark"]) .shell :is(.btn.primary, button.primary, [data-in-app-back]) {
  background: var(--brand-accent) !important;
  background-image: none !important;
  color: var(--brand-on-accent) !important;
  border-color: var(--brand-accent) !important;
}
html:not([data-app-theme="dark"]) .shell :is(.btn:not(.primary):not(.danger), .theme-toggle, .account-logout, .mobile-menu, #menuBtn) {
  background: var(--brand-neutral-soft) !important;
  background-image: none !important;
  color: var(--primary-strong) !important;
  border-color: var(--brand-neutral-border) !important;
}
html[data-app-theme="dark"] body,
html[data-app-theme="dark"] .shell,
html[data-app-theme="dark"] .shell .main,
html[data-app-theme="dark"] .shell .content,
html[data-app-theme="dark"] .shell .view,
html[data-app-theme="dark"] .shell .marketing-view {
  background: var(--bg) !important;
  color: var(--ink) !important;
}
html[data-app-theme="dark"] .shell :is([class*="card"], [class*="panel"], [class*="widget"], [class*="stat"], .profile-map-section, .profile-map-fields p, .overview-list-row) {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-app-theme="dark"] .shell :is(.sidebar, .topbar, .theme-popover, .profile-journey-head, .profile-journey-steps, .profile-next-step, .commerce-platform-card, .commerce-contact-details, .commerce-schedules, .delivery-compact-card, .hours-global, .platform-hours-row) {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-app-theme="dark"] .shell :is(input:not([type="color"]), textarea, select, .overview-list-row, .profile-map-section summary, .profile-map-item, .profile-map-fields p) {
  background: #25313e !important;
  color: #f1f4f7 !important;
  border-color: var(--line) !important;
}
html[data-app-theme="dark"] .shell :is(h1, h2, h3, h4, p, label, strong, th, td, .muted, .hint, small, .profile-journey-step, .profile-journey-step strong, .profile-progress-ring span, .profile-progress-ring small) {
  color: var(--ink) !important;
}
html[data-app-theme="dark"] .shell :is(.muted, .hint, small, .nav-title, .profile-map-head p, .profile-journey-copy p) { color: var(--muted) !important; }
html[data-app-theme="dark"] .shell :is(.btn.primary, button.primary, [data-in-app-back]) {
  background: var(--brand-accent) !important;
  background-image: none !important;
  color: var(--brand-on-accent) !important;
  border-color: var(--brand-accent) !important;
}
html[data-app-theme="dark"] .shell :is(.btn:not(.primary):not(.danger), .theme-toggle, .account-logout, .mobile-menu, #menuBtn) {
  background: #25313e !important;
  background-image: none !important;
  color: #f1f4f7 !important;
  border-color: var(--line) !important;
}
html[data-app-theme="dark"] .shell :is(.global-module-icon, .nav .ico, .nav-chevron, .finance-icon, .transaction-icon, .module-icon, .section-icon, .stat-icon) {
  background: var(--brand-neutral-soft) !important;
  color: var(--icon-accent) !important;
  border-color: var(--brand-neutral-border) !important;
}
html[data-app-theme="dark"] .shell :is(.nav button:is(:hover, .active), .marketing-subnav button:is(:hover, .active), .sidebar-foot [data-view]:is(:hover, .active)) {
  background: #25313e !important;
  color: #f1f4f7 !important;
  border-color: var(--line) !important;
}
html[data-app-theme="dark"] .shell .tag:not(.green):not(.amber):not(.red):not(.danger):not(.success) {
  background: #25313e !important;
  color: #e7edf2 !important;
  border-color: var(--line) !important;
}
html[data-accent-mode="brand"] .shell :is(.profile-journey-copy h3, .profile-progress-ring span),
html[data-accent-mode="brand"] .shell :is(.profile-progress-ring .progress, .profile-journey-step.is-current .journey-icon, .profile-journey-step.is-current small, .profile-next-step button) {
  color: var(--brand-accent) !important;
  stroke: var(--brand-accent) !important;
}
html[data-accent-mode="brand"] .shell :is(.profile-journey-step.is-current .journey-icon, .profile-journey-step.is-current small, .profile-next-step button) {
  background: var(--brand-accent) !important;
  color: var(--brand-on-accent) !important;
}
html[data-accent-mode="brand"] .shell :is(.nav .ico, .nav-chevron, .sidebar-foot .ico, .global-module-icon, .app-line-icon) {
  background: var(--brand-neutral-soft) !important;
  color: var(--icon-accent) !important;
  border-color: var(--brand-neutral-border) !important;
}
.theme-palette-note { margin: -3px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* Final dark-mode audit: dashboard maps and nested navigation were outside the
   original surface list, leaving white cards and low-contrast labels behind. */
html[data-app-theme="dark"] .shell :is(.connection-map, .social-overview-stat, .roadmap-step, .project-card-content, .dashboard-grid .stat, .marketing-nav-toggle, .marketing-subnav button, .nav-group) {
  background: #1c2733 !important;
  background-image: none !important;
  color: #edf2f6 !important;
  border-color: #465565 !important;
}
html[data-app-theme="dark"] .shell .sidebar :is(.nav button, .marketing-subnav button):not(:hover):not(.active) {
  background: #202d3a !important;
  background-image: none !important;
  color: #e1e8ee !important;
  border-color: #3b4a59 !important;
}
html[data-app-theme="dark"] .shell .sidebar .marketing-nav-toggle[aria-expanded="true"],
html[data-app-theme="dark"] .shell .sidebar .nav button:is(:hover, .active),
html[data-app-theme="dark"] .shell .sidebar .marketing-subnav button:is(:hover, .active) {
  background: color-mix(in srgb, var(--brand-accent) 34%, #202d3a) !important;
  background-image: none !important;
  color: #fff !important;
  border-color: color-mix(in srgb, var(--brand-accent) 58%, #465565) !important;
}
html[data-app-theme="dark"] .shell .sidebar :is(.nav .ico, .nav-chevron) {
  background: #2a3947 !important;
  color: color-mix(in srgb, var(--brand-accent) 52%, #f7f9fb) !important;
  border-color: #4b5b6a !important;
}
html[data-app-theme="dark"] .shell :is(.connection-map h2, .connection-map h3, .connection-map p, .connection-map-node, .connection-map-legend) {
  color: #edf2f6 !important;
}
html[data-app-theme="dark"] .shell .connection-map-node { background: transparent !important; border-color: transparent !important; }
html[data-app-theme="dark"] .shell .connection-map-node:hover,
html[data-app-theme="dark"] .shell .connection-map-node:focus-visible { background: #263544 !important; border-color: #526272 !important; }
html[data-app-theme="dark"] .shell .connection-map-dot { background: #263544 !important; border-color: #a6b4c0 !important; color: transparent !important; }
html[data-app-theme="dark"] .shell .connection-map-node.is-connected .connection-map-dot { background: var(--brand-accent) !important; border-color: var(--brand-accent) !important; color: var(--brand-on-accent) !important; }
html[data-app-theme="dark"] .shell .connection-map-legend i { background: #263544 !important; border-color: #a6b4c0 !important; }
html[data-app-theme="dark"] .shell .connection-map-legend i.connected { background: var(--brand-accent) !important; border-color: var(--brand-accent) !important; }
html[data-app-theme="dark"] .shell :is(.stat b, .dashboard-grid .stat strong, .project-card-content strong, .overview-list-row strong) {
  color: color-mix(in srgb, var(--brand-accent) 48%, #f3f6f8) !important;
}

/* Dark-mode pass for the dashboard sections and settings accordions shown on
   small screens. Keep these nested surfaces on the same neutral palette. */
html[data-app-theme="dark"] .shell :is(.overview-feature, .overview-kpi-row, .overview-status-row, .overview-empty) {
  background: #202d3a !important;
  background-image: none !important;
  color: #e8edf2 !important;
  border-color: #465565 !important;
}
html[data-app-theme="dark"] .shell :is(.overview-feature > span, .overview-feature p, .overview-kpi-row > span, .overview-status-row > span, .overview-empty) {
  color: #c2ccd5 !important;
}
html[data-app-theme="dark"] .shell .overview-kpi-row b,
html[data-app-theme="dark"] .shell .overview-status-row b { color: #f4f6f8 !important; }

html[data-app-theme="dark"] .shell .settings-accordion {
  background: #1c2733 !important;
  border-color: #465565 !important;
  box-shadow: 0 4px 16px #0003 !important;
}
html[data-app-theme="dark"] .shell .settings-accordion > summary,
html[data-app-theme="dark"] .shell .settings-accordion > summary:hover,
html[data-app-theme="dark"] .shell .settings-accordion[open] > summary {
  background: #202d3a !important;
  color: #f1f4f7 !important;
  border-color: #465565 !important;
}
html[data-app-theme="dark"] .shell .settings-accordion > summary:after {
  background-color: #304052 !important;
  filter: brightness(1.45);
}
html[data-app-theme="dark"] .shell .settings-accordion-body {
  background: #1c2733 !important;
  color: #e8edf2 !important;
  border-color: #465565 !important;
}
html[data-app-theme="dark"] .shell .settings-accordion-body :is(p, label, strong, small, span, h3, h4) {
  color: #d5dde5 !important;
}

/* The social preview intentionally depicts a real platform in its own light
   interface; app-wide dark text rules must not wash its labels out. */
html[data-app-theme="dark"] .shell .schedule-platform-mockup,
html[data-app-theme="dark"] .shell .schedule-platform-mockup :not(.schedule-tiktok-frame):not(.schedule-tiktok-frame *) {
  color: #17191c;
}
html[data-app-theme="dark"] .shell .schedule-platform-mockup :is(h1, h2, h3, h4, p, small, strong, span, label, a, button):not(.schedule-tiktok-frame):not(.schedule-tiktok-frame *) {
  color: #25282b !important;
}
html[data-app-theme="dark"] .shell .schedule-platform-mockup :is(.schedule-ig-link, .schedule-pin-mark) {
  color: #24558a !important;
}
html[data-app-theme="dark"] .shell .schedule-platform-mockup .schedule-tiktok-frame,
html[data-app-theme="dark"] .shell .schedule-platform-mockup .schedule-tiktok-frame :is(h1, h2, h3, h4, p, small, strong, span, label, a, button) {
  color: #f5f5f5 !important;
}

/* Content-type chooser is injected at runtime by plan-ui.js, so theme it here
   with higher-specificity rules that also cover its active option and header. */
html[data-app-theme="dark"] .shell .creation-type-menu,
html[data-app-theme="dark"] .shell .creation-mode-header {
  background: #1c2733 !important;
  color: #f1f4f7 !important;
  border-color: #465565 !important;
}
html[data-app-theme="dark"] .shell .creation-type-menu h2,
html[data-app-theme="dark"] .shell .creation-mode-header :is(strong, span) {
  color: #f1f4f7 !important;
}
html[data-app-theme="dark"] .shell .creation-type-option {
  background: #202d3a !important;
  color: #f1f4f7 !important;
  border-color: #465565 !important;
}
html[data-app-theme="dark"] .shell .creation-type-option :is(strong, small, .creation-type-count) {
  color: #d5dde5 !important;
}
html[data-app-theme="dark"] .shell .creation-type-option > span {
  background: #2b3947 !important;
  color: color-mix(in srgb, var(--brand-accent) 62%, #ffffff) !important;
}
html[data-app-theme="dark"] .shell .creation-type-option.active {
  background: color-mix(in srgb, var(--brand-accent) 20%, #202d3a) !important;
  border-color: color-mix(in srgb, var(--brand-accent) 70%, #465565) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-accent) 22%, transparent) !important;
}

/* One shared palette for the remaining marketing and content-settings surfaces.
   These rules live in the identity layer so inline module styles cannot leave
   isolated white cards behind when the user switches appearance. */
html[data-app-theme="dark"] .shell :is(
  .marketing-view .panel,
  .marketing-view .content-card,
  .marketing-view .stat,
  .marketing-view .campaign-stat,
  .marketing-view .campaign-step,
  .marketing-view .campaign-connection,
  .marketing-view .campaign-promo,
  .marketing-view .campaign-full-item,
  .marketing-view .campaign-form-section,
  .marketing-view .campaign-create-card,
  .marketing-view .campaign-choice,
  .marketing-view .campaign-specs,
  .marketing-view .campaign-support,
  .marketing-view .campaign-wallet,
  .marketing-view .campaign-list-toolbar,
  .marketing-view .campaign-link-center,
  .marketing-view .campaign-performance,
  .marketing-view .campaign-latest,
  .marketing-view .connection-setup-guide,
  .marketing-view .report-platform-list > .row,
  .marketing-view .report-bars,
  .marketing-view .campaign-notice,
  .marketing-view .campaign-empty-performance,
  .marketing-view .empty,
  .marketing-view .table-wrap,
  .marketing-view .checkpill,
  .marketing-view .campaign-report-fields > label
) {
  background: var(--surface-raised) !important;
  background-image: none !important;
  color: var(--text-primary) !important;
  border-color: var(--surface-border) !important;
  box-shadow: none !important;
}
html[data-app-theme="dark"] .shell .marketing-view :is(
  .campaign-notice, .campaign-empty-performance, .campaign-full-item p,
  .campaign-stat span, .campaign-choice small, .campaign-promo p,
  .campaign-create-card p, .campaign-form-section p, .report-bar-row,
  .report-platform-list, .hint, .muted, .empty
) { color: var(--text-secondary) !important; }
html[data-app-theme="dark"] .shell .marketing-view :is(
  .campaign-link-icon, .campaign-chart-icon, .campaign-step-number,
  .campaign-promo-icon
) {
  background: var(--brand-neutral-soft) !important;
  color: var(--icon-accent) !important;
  border-color: var(--brand-neutral-border) !important;
}
html[data-app-theme="dark"] .shell .marketing-view :is(.campaign-choice:has(input:checked), .campaign-status-dot) {
  background: color-mix(in srgb, var(--brand-accent) 22%, var(--surface-raised)) !important;
  color: color-mix(in srgb, var(--brand-accent) 65%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--brand-accent) 46%, var(--surface-border)) !important;
}
html[data-app-theme="dark"] .shell .marketing-view :is(input:not([type="color"]), textarea, select) {
  background: var(--surface-inset) !important;
  color: var(--text-primary) !important;
  border-color: var(--surface-border) !important;
}
html[data-app-theme="dark"] .shell .marketing-view :is(.report-bar-row > div, .campaign-performance-chart, .campaign-chart-track) {
  background: #2c3946 !important;
}
html[data-app-theme="dark"] .shell .marketing-view :is(.campaign-empty-performance, .empty) {
  border: 1px dashed var(--surface-border) !important;
}

html[data-app-theme="dark"] .shell :is(
  #creationPromptSettings,
  #creationPromptSettings .prompt-settings-section,
  #creationPromptSettings .prompt-subsection,
  #creationPromptSettings .creation-prompt-settings-grid label,
  #view-socialSettings .social-content-settings-sections > details,
  #view-socialSettings .platform-plan-card,
  #view-socialSettings .visual-style-manager-item,
  #view-socialSettings .visual-style-manager-details,
  #view-socialSettings .visual-style-manager-group,
  #view-socialSettings .visual-logo-settings-body,
  #view-socialSettings .visual-table-settings-body,
  #view-socialSettings .schedule-alert-content,
  #view-socialSettings .design-size-option,
  #view-socialSettings .logo-settings-tabs button,
  #view-socialSettings .visual-style-manager-tabs button,
  #view-socialSettings .visual-logo-position-grid button,
  #view-socialSettings .visual-logo-preview-frame
) {
  background: var(--surface-soft) !important;
  background-image: none !important;
  color: var(--text-primary) !important;
  border-color: var(--surface-border) !important;
  box-shadow: none !important;
}
html[data-app-theme="dark"] .shell :is(
  #creationPromptSettings .prompt-settings-section :is(h3, p, small, label),
  #creationPromptSettings .prompt-subsection > summary,
  #creationPromptSettings .creation-prompt-settings-grid label,
  #view-socialSettings .social-settings-summary,
  #view-socialSettings .social-settings-summary :is(strong, small),
  #view-socialSettings .platform-plan-card :is(h3, label, small),
  #view-socialSettings .visual-style-manager-item :is(strong, small, p),
  #view-socialSettings .visual-style-manager-group h3,
  #view-socialSettings .visual-logo-settings-body :is(strong, p, small, label),
  #view-socialSettings .visual-table-settings-body :is(strong, p, small, label),
  #view-socialSettings .schedule-alert-content :is(p, label, small, .hint)
) { color: var(--text-secondary) !important; }
html[data-app-theme="dark"] .shell :is(
  #creationPromptSettings .prompt-subsection > summary,
  #view-socialSettings .social-settings-summary,
  #view-socialSettings .logo-settings-tabs button.active,
  #view-socialSettings .visual-style-manager-tabs button.active,
  #view-socialSettings .design-size-option:has(input:checked)
) {
  background: color-mix(in srgb, var(--brand-accent) 22%, var(--surface-raised)) !important;
  color: var(--text-primary) !important;
  border-color: color-mix(in srgb, var(--brand-accent) 48%, var(--surface-border)) !important;
}
html[data-app-theme="dark"] .shell :is(
  #creationPromptSettings summary::after,
  #creationPromptSettings .prompt-subsection > summary::after,
  #view-socialSettings .social-settings-summary > i
) {
  background-color: var(--surface-inset) !important;
  color: var(--icon-accent) !important;
  filter: brightness(1.35);
}
html[data-app-theme="dark"] .shell :is(
  #creationPromptSettings textarea,
  #view-socialSettings .platform-plan-card input,
  #view-socialSettings .platform-plan-card select,
  #view-socialSettings textarea,
  #view-socialSettings input:not([type="color"]),
  #view-socialSettings select
) {
  background: var(--surface-inset) !important;
  color: var(--text-primary) !important;
  border-color: var(--surface-border) !important;
}
html[data-app-theme="dark"] .shell .creation-prompt-settings-grid label > small,
html[data-app-theme="dark"] .shell .platform-plan-total,
html[data-app-theme="dark"] .shell .platform-plan-empty { color: var(--text-secondary) !important; }

/* Brand appearance: derive every app-owned surface from the selected brand
   color. This replaces leftover fixed cyan/blue fills across nested cards. */
html[data-accent-mode="brand"] .shell :is(
  .panel, .content-card, .stat, .card,
  .project-dashboard-hero, .project-dashboard-card, .profile-map-card,
  .profile-journey-head, .profile-journey-steps, .profile-next-step,
  .campaign-stat, .campaign-step, .campaign-connection, .campaign-promo,
  .campaign-full-item, .campaign-form-section, .campaign-create-card,
  .campaign-choice, .campaign-specs, .campaign-support, .campaign-wallet,
  .campaign-list-toolbar, .campaign-link-center, .campaign-performance,
  .campaign-latest, .commerce-panel, .commerce-setting, .store-status-card,
  .commerce-app-card, .commerce-product-card, .platform-hours-row,
  .hours-global, .orders-devices, .usage-meters, .overview-finance-grid > div
) {
  background: var(--surface-raised) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .overview-feature, .overview-kpi-row, .overview-status-row,
  .overview-list-row, .overview-empty, .connection-map,
  .social-overview-stat, .roadmap-step, .project-card-content,
  .profile-map-section, .profile-map-section summary, .profile-map-item,
  .profile-map-fields p, .marketing-view .campaign-notice,
  .marketing-view .campaign-empty-performance,
  .marketing-view .report-platform-list > .row,
  .marketing-view .report-bar-row > div,
  .settings-accordion, .settings-accordion > summary,
  .settings-accordion-body, .creation-prompt-settings,
  .prompt-settings-section, .prompt-subsection,
  .creation-type-menu, .creation-mode-header,
  .visual-style-manager-item, .platform-plan-card
) {
  background: var(--surface-soft) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .overview-list-row, .connection-map-node, .profile-next-step,
  .platform-plan-card input, .platform-plan-card select,
  .creation-prompt-settings textarea, .creation-type-option,
  .settings-accordion-body input:not([type="color"]),
  .settings-accordion-body textarea, .settings-accordion-body select,
  #view-socialSettings input:not([type="color"]),
  #view-socialSettings textarea, #view-socialSettings select,
  .marketing-view input:not([type="color"]),
  .marketing-view textarea, .marketing-view select
) {
  background: var(--surface-inset) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .overview-feature, .overview-kpi-row, .overview-status-row,
  .overview-list-row, .overview-empty, .connection-map,
  .social-overview-stat, .roadmap-step, .project-card-content,
  .profile-map-section, .profile-map-item, .profile-map-fields p,
  .settings-accordion, .settings-accordion > summary,
  .settings-accordion-body, .creation-prompt-settings,
  .prompt-settings-section, .prompt-subsection,
  .creation-type-menu, .creation-mode-header,
  .visual-style-manager-item, .platform-plan-card,
  .marketing-view .campaign-notice, .marketing-view .campaign-empty-performance
) { color: var(--text-primary) !important; }
html[data-accent-mode="brand"] .shell :is(
  .overview-feature > span, .overview-feature p,
  .overview-kpi-row > span, .overview-status-row > span,
  .overview-list-row span, .overview-empty,
  .social-overview-stat span, .roadmap-step small,
  .profile-map-head p, .profile-journey-copy p,
  .marketing-view .muted, .marketing-view .hint,
  .campaign-stat span, .campaign-choice small,
  .prompt-settings-section .muted,
  .creation-prompt-settings-grid small,
  .settings-accordion summary > span,
  .settings-accordion-body .muted,
  .settings-accordion-body .hint
) { color: var(--text-secondary) !important; }
html[data-accent-mode="brand"] .shell :is(
  .overview-kpi-row b, .overview-status-row b,
  .overview-finance-grid b, .social-overview-stat b,
  .campaign-stat b, .profile-progress-ring .progress
) { color: var(--brand-accent) !important; }
html[data-accent-mode="brand"] .shell :is(
  .creation-type-option.active,
  .campaign-choice:has(input:checked),
  .design-size-option:has(input:checked),
  .logo-settings-tabs button.active,
  .visual-style-manager-tabs button.active,
  .settings-accordion > summary:hover
) {
  background: color-mix(in srgb, var(--brand-accent) 12%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--brand-accent) 35%, var(--surface-border)) !important;
  color: var(--brand-accent) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .project-card-heading .global-module-icon, .global-module-icon,
  .finance-icon, .transaction-icon, .module-icon, .section-icon, .stat-icon,
  .campaign-link-icon, .campaign-chart-icon, .campaign-promo-icon,
  .campaign-step-number, .profile-journey-step .journey-icon
) {
  background: var(--brand-neutral-soft) !important;
  border-color: var(--brand-neutral-border) !important;
  color: var(--icon-accent) !important;
}

/* Keep every nested surface inside the shared appearance system. These
   components were still carrying standalone white/cyan fills. */
html .shell :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--brand-accent) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .project-card-heading, .project-card-heading > *,
  .overview-card-heading, .overview-card-heading > *
) {
  background-color: transparent !important;
  background-image: none !important;
}
html[data-accent-mode="brand"] .shell :is(
  .overview-empty, .overview-finance-grid > div,
  .project-dashboard-card .overview-empty,
  .project-dashboard-card .overview-finance-grid > div,
  .campaign-connections .campaign-connection,
  .campaign-stats .campaign-stat,
  .settings-savebar
) {
  background: var(--surface-soft) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
  color: var(--text-primary) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .product-catalog-card, .product-detail-view,
  .product-editor-toolbar, .product-form-section,
  .product-form-section-body, .product-editor-bottom-actions,
  .product-accordion, .product-component-editor,
  .product-visibility-form > div:first-child label,
  .product-visibility-platforms
) {
  background: var(--surface-soft) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
  color: var(--text-primary) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .product-catalog-card input:not([type="checkbox"]):not([type="radio"]),
  .product-catalog-card textarea, .product-catalog-card select,
  .product-editor-grid input:not([type="checkbox"]):not([type="radio"]),
  .product-editor-grid textarea, .product-editor-grid select,
  .product-visibility-form input:not([type="checkbox"]):not([type="radio"]),
  .product-visibility-form textarea, .product-visibility-form select
) {
  background: var(--surface-inset) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
  color: var(--text-primary) !important;
}
html[data-accent-mode="brand"] .shell :is(
  .product-catalog-card .muted, .product-detail-view dt,
  .product-form-section .muted, .product-editor-bottom-actions .hint,
  .settings-savebar span
) { color: var(--text-secondary) !important; }
html[data-accent-mode="brand"] .shell .product-editor-grid .grid.g2 > select {
  background: var(--surface-inset) !important;
  color: var(--text-primary) !important;
  border-color: var(--surface-border) !important;
}

html[data-app-theme="dark"] .shell :is(
  .overview-empty, .overview-finance-grid > div,
  .project-dashboard-card .overview-empty,
  .project-dashboard-card .overview-finance-grid > div,
  .campaign-connections .campaign-connection,
  .campaign-stats .campaign-stat,
  .settings-savebar,
  .product-catalog-card, .product-detail-view,
  .product-editor-toolbar, .product-form-section,
  .product-form-section-body, .product-editor-bottom-actions,
  .product-accordion, .product-component-editor,
  .product-visibility-form > div:first-child label,
  .product-visibility-platforms
) {
  background: var(--surface-raised) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}
html[data-app-theme="dark"] .shell :is(
  .product-catalog-card input:not([type="checkbox"]):not([type="radio"]),
  .product-catalog-card textarea, .product-catalog-card select,
  .product-editor-grid input:not([type="checkbox"]):not([type="radio"]),
  .product-editor-grid textarea, .product-editor-grid select,
  .product-visibility-form input:not([type="checkbox"]):not([type="radio"]),
  .product-visibility-form textarea, .product-visibility-form select,
  .product-editor-grid .grid.g2 > select
) {
  background: var(--surface-inset) !important;
  background-image: none !important;
  border-color: var(--surface-border) !important;
  color: var(--text-primary) !important;
}
html[data-app-theme="dark"] .shell :is(
  .product-catalog-card .muted, .product-detail-view dt,
  .product-form-section .muted, .product-editor-bottom-actions .hint,
  .settings-savebar span, .overview-finance-grid span
) { color: var(--text-secondary) !important; }
html[data-app-theme="dark"] .shell :is(
  .project-card-heading, .project-card-heading > *,
  .overview-card-heading, .overview-card-heading > *
) {
  background-color: transparent !important;
  background-image: none !important;
}
html[data-app-theme="dark"] .shell .product-catalog-card > img,
html[data-app-theme="dark"] .shell .product-catalog-no-image {
  background: var(--surface-inset) !important;
  color: var(--text-secondary) !important;
}
html[data-app-theme="dark"] .shell .settings-savebar.is-dirty {
  background: var(--surface-raised) !important;
  border-color: var(--brand-accent) !important;
}

/* Connection maps inherit the selected accent instead of the old fixed blue.
   In the default appearance this accent is the product's blue palette. */
html .shell .connection-map .connection-map-legend i.connected,
html .shell .connection-map .connection-map-node.is-connected .connection-map-dot {
  background: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
}
html .shell .connection-map .connection-map-node.is-connected .connection-map-dot {
  color: var(--brand-on-accent) !important;
}
html .shell .connection-map .connection-map-node.is-connected > span:last-child,
html .shell .connection-map .connection-map-legend span {
  color: var(--text-secondary, var(--muted)) !important;
}
html .shell .connection-map .connection-map-node.is-connected > span:last-child {
  color: var(--brand-accent) !important;
}
html .shell .connection-map .connection-map-node:focus-visible {
  outline-color: var(--brand-accent) !important;
}
html .shell .connection-target-focus {
  outline-color: var(--brand-accent) !important;
}

/* The setup journey follows the current mode accent: blue in default light
   appearance and the saved primary identity color in brand appearance. */
html .shell :is(.profile-journey-copy h3, .profile-progress-ring span) {
  color: var(--brand-accent) !important;
}
html .shell .profile-progress-ring .progress {
  stroke: var(--brand-accent) !important;
}
html .shell .profile-progress-ring circle:not(.progress) {
  stroke: var(--brand-neutral-border) !important;
}
html .shell .profile-journey-step .journey-icon:not(.is-done) {
  border-color: var(--brand-neutral-border) !important;
}
html .shell .profile-journey-step:not(.is-done) .journey-icon {
  background: var(--brand-neutral-soft) !important;
  color: var(--icon-accent) !important;
}
html .shell :is(.profile-journey-step.is-current .journey-icon, .profile-journey-step.is-current small, .profile-next-step button) {
  background: var(--brand-accent) !important;
  background-color: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
  color: var(--brand-on-accent) !important;
}
html .shell .profile-next-step > span {
  background: var(--brand-neutral-soft) !important;
  color: var(--icon-accent) !important;
}
html .shell .connection-map .connection-map-note {
  color: var(--text-secondary, var(--muted)) !important;
}
html[data-accent-mode="brand"] .shell .connection-map .connection-map-note {
  color: var(--text-secondary) !important;
}
