/* RC2.30.86: named screen palettes; existing print styles remain in control. */
@media screen {
  html[data-theme-preset="dark"] { color-scheme:dark; --ui-bg:#101820; --ui-surface:#1a2632; --ui-soft:#22333e; --ui-text:#e3ebf1; --ui-muted:#a7b7c6; --ui-border:#364957; --ui-accent:#6dd4b0; --ui-focus:#6dd4b0; --theme-primary:#1e7557; --theme-hover:#1a654b; --theme-sidebar:#111d29; }
  html[data-theme-preset="dracula"] { color-scheme:dark; --ui-bg:#22212c; --ui-surface:#2d2c3b; --ui-soft:#3b384e; --ui-text:#f4f1fa; --ui-muted:#b5aec9; --ui-border:#504962; --ui-accent:#c5a6f4; --ui-focus:#c5a6f4; --theme-primary:#7654b0; --theme-hover:#654897; --theme-sidebar:#1b1a25; }
  html[data-theme-preset="mocha"] { color-scheme:dark; --ui-bg:#1e1e2e; --ui-surface:#29293c; --ui-soft:#36364e; --ui-text:#e2def8; --ui-muted:#b6afcc; --ui-border:#4c4863; --ui-accent:#d7b1f5; --ui-focus:#d7b1f5; --theme-primary:#8055a4; --theme-hover:#6e498d; --theme-sidebar:#171725; }
  html[data-theme-preset="ember"] { color-scheme:dark; --ui-bg:#211b18; --ui-surface:#30251f; --ui-soft:#443126; --ui-text:#f6e6d6; --ui-muted:#c5ac98; --ui-border:#604736; --ui-accent:#f0b77e; --ui-focus:#f0b77e; --theme-primary:#a24f1d; --theme-hover:#8b4419; --theme-sidebar:#1a1513; }
  html[data-theme-preset="rose-pine"] { color-scheme:dark; --ui-bg:#191724; --ui-surface:#242033; --ui-soft:#332d43; --ui-text:#e0d9f0; --ui-muted:#b4a7c6; --ui-border:#51465f; --ui-accent:#e7a3bc; --ui-focus:#e7a3bc; --theme-primary:#974860; --theme-hover:#823e53; --theme-sidebar:#14121e; }
  html[data-theme-preset="moonlight"] { color-scheme:dark; --ui-bg:#1d2336; --ui-surface:#28324a; --ui-soft:#34415e; --ui-text:#e0e9fc; --ui-muted:#a5b5d4; --ui-border:#475778; --ui-accent:#92b7f5; --ui-focus:#92b7f5; --theme-primary:#476dba; --theme-hover:#3d5ea0; --theme-sidebar:#171c2b; }
  html[data-theme-preset="slate"] { color-scheme:dark; --ui-bg:#17212b; --ui-surface:#23313f; --ui-soft:#304253; --ui-text:#e0ebf4; --ui-muted:#a8bdce; --ui-border:#465d6f; --ui-accent:#8ec2df; --ui-focus:#8ec2df; --theme-primary:#386f8e; --theme-hover:#305f7a; --theme-sidebar:#121a22; }
  html[data-theme-preset="midnight"] { color-scheme:dark; --ui-bg:#0c1525; --ui-surface:#15233a; --ui-soft:#233554; --ui-text:#e2edfc; --ui-muted:#a7bdd9; --ui-border:#38516f; --ui-accent:#85bbf7; --ui-focus:#85bbf7; --theme-primary:#376bac; --theme-hover:#2f5c94; --theme-sidebar:#080f1c; }
  html[data-theme-preset="nord"] { color-scheme:dark; --ui-bg:#242b38; --ui-surface:#2e394a; --ui-soft:#3e4b5f; --ui-text:#e5edf4; --ui-muted:#aabccf; --ui-border:#526478; --ui-accent:#a1cfda; --ui-focus:#a1cfda; --theme-primary:#386f7c; --theme-hover:#305f6b; --theme-sidebar:#1d2330; }
  html[data-theme-preset="light"] { color-scheme:light; --ui-bg:#f4f6f8; --ui-surface:#ffffff; --ui-soft:#edf3f0; --ui-text:#17212b; --ui-muted:#617184; --ui-border:#d9e2e9; --ui-accent:#13775a; --ui-focus:#13775a; --theme-primary:#13775a; --theme-hover:#10664d; --theme-sidebar:#18222d; }
  html[data-theme-preset="alucard"] { color-scheme:light; --ui-bg:#f3f0f6; --ui-surface:#fffcff; --ui-soft:#ece3f5; --ui-text:#322b42; --ui-muted:#6b5d77; --ui-border:#dad0e3; --ui-accent:#6842a6; --ui-focus:#6842a6; --theme-primary:#6842a6; --theme-hover:#59398f; --theme-sidebar:#2c243a; }
  html[data-theme-preset="latte"] { color-scheme:light; --ui-bg:#eff1f5; --ui-surface:#ffffff; --ui-soft:#e8e7ef; --ui-text:#4c4f69; --ui-muted:#666a83; --ui-border:#d5d6e3; --ui-accent:#7145b5; --ui-focus:#7145b5; --theme-primary:#7145b5; --theme-hover:#613b9c; --theme-sidebar:#2d2e43; }
  html[data-theme-preset="ember-light"] { color-scheme:light; --ui-bg:#fff4eb; --ui-surface:#fffcf8; --ui-soft:#f8e6d6; --ui-text:#3d302b; --ui-muted:#766454; --ui-border:#e6d3c2; --ui-accent:#a84615; --ui-focus:#a84615; --theme-primary:#a84615; --theme-hover:#903c12; --theme-sidebar:#382a26; }
  html[data-theme-preset="rose-pine-dawn"] { color-scheme:light; --ui-bg:#faf4ed; --ui-surface:#fffaf3; --ui-soft:#f2e4eb; --ui-text:#514c67; --ui-muted:#736881; --ui-border:#e0d4d7; --ui-accent:#8b467c; --ui-focus:#8b467c; --theme-primary:#8b467c; --theme-hover:#783c6b; --theme-sidebar:#3a3146; }
  html[data-theme-preset="sunshine"] { color-scheme:light; --ui-bg:#fffbed; --ui-surface:#fffef8; --ui-soft:#f5eed0; --ui-text:#403820; --ui-muted:#776a43; --ui-border:#e7ddb5; --ui-accent:#85610e; --ui-focus:#85610e; --theme-primary:#85610e; --theme-hover:#72530c; --theme-sidebar:#363123; }
  html[data-theme-preset="indigo"] { color-scheme:light; --ui-bg:#f3f5ff; --ui-surface:#ffffff; --ui-soft:#e7e9fa; --ui-text:#242b4a; --ui-muted:#616b87; --ui-border:#d7dcf0; --ui-accent:#4a4db7; --ui-focus:#4a4db7; --theme-primary:#4a4db7; --theme-hover:#40429d; --theme-sidebar:#232943; }
  html[data-theme-preset="ocean"] { color-scheme:light; --ui-bg:#edf7fb; --ui-surface:#ffffff; --ui-soft:#ddeff5; --ui-text:#193d4a; --ui-muted:#547482; --ui-border:#c5dfe8; --ui-accent:#12657f; --ui-focus:#12657f; --theme-primary:#12657f; --theme-hover:#0f576d; --theme-sidebar:#183543; }
  html[data-theme-preset="forest"] { color-scheme:light; --ui-bg:#f0f7ef; --ui-surface:#fcfffb; --ui-soft:#e1f0df; --ui-text:#233d29; --ui-muted:#5a715d; --ui-border:#cbdfc8; --ui-accent:#286b38; --ui-focus:#286b38; --theme-primary:#286b38; --theme-hover:#225c30; --theme-sidebar:#233a28; }
  html[data-theme-preset="rose"] { color-scheme:light; --ui-bg:#fff3f6; --ui-surface:#fffcfd; --ui-soft:#fae3ec; --ui-text:#4a2a35; --ui-muted:#805c6a; --ui-border:#ecd2dd; --ui-accent:#aa3d61; --ui-focus:#aa3d61; --theme-primary:#aa3d61; --theme-hover:#923453; --theme-sidebar:#402b35; }
  html[data-theme-preset="lavender"] { color-scheme:light; --ui-bg:#f7f3ff; --ui-surface:#ffffff; --ui-soft:#ede4f7; --ui-text:#36294c; --ui-muted:#746186; --ui-border:#dcd0eb; --ui-accent:#7251a0; --ui-focus:#7251a0; --theme-primary:#7251a0; --theme-hover:#62468a; --theme-sidebar:#30263f; }
  html[data-theme-preset="monochrome"] { color-scheme:light; --ui-bg:#f3f4f5; --ui-surface:#ffffff; --ui-soft:#e6e8eb; --ui-text:#25272b; --ui-muted:#656970; --ui-border:#d1d5da; --ui-accent:#4b5059; --ui-focus:#4b5059; --theme-primary:#4b5059; --theme-hover:#40454d; --theme-sidebar:#25272b; }
}
@media screen {
  html[data-theme-preset] {
    --evolve-bg:var(--ui-bg); --evolve-surface:var(--ui-surface); --evolve-text:var(--ui-text); --evolve-muted:var(--ui-muted); --evolve-border:var(--ui-border);
    --evolve-brand:var(--ui-accent); --evolve-brand-dark:var(--theme-hover); --evolve-brand-soft:var(--ui-soft); --evolve-sidebar:var(--theme-sidebar);
    --portal-bg:var(--ui-bg); --portal-surface:var(--ui-surface); --portal-text:var(--ui-text); --portal-muted:var(--ui-muted); --portal-border:var(--ui-border);
    --portal-accent:var(--ui-accent); --portal-accent-dark:var(--ui-accent); --portal-accent-soft:var(--ui-soft);
    --public-text:var(--ui-text); --public-muted:var(--ui-muted); --public-soft:var(--ui-bg); --public-white:var(--ui-surface); --public-border:var(--ui-border);
    --public-brand:var(--ui-accent); --public-brand-dark:var(--ui-accent); --public-brand-deep:var(--theme-primary); --public-brand-soft:var(--ui-soft);
    --ink:var(--ui-text); --muted:var(--ui-muted); --line:var(--ui-border);
  }
  html[data-theme-preset][data-theme="dark"] { --evolve-brand-dark:var(--ui-accent); }
  html[data-theme-preset] :is(body,.content-wrapper) { background:var(--ui-bg) !important; color:var(--ui-text); }
  html[data-theme-preset] :is(.card,.modal-content,.dropdown-menu,.list-group-item,.info-box,.collector-card,.public-login-card,.public-form-card,.public-contact-card,.public-plan-card,.public-feature-card,.suggestions,.popover) {
    background:var(--ui-surface) !important; color:var(--ui-text); border-color:var(--ui-border) !important;
  }
  html[data-theme-preset] :is(.main-header.navbar,.public-header,.portal-sidebar,.portal-sidebar .brand-link,.main-footer) { background:var(--ui-surface) !important; color:var(--ui-text); border-color:var(--ui-border); }
  html[data-theme-preset] :is(.card-footer,.input-group-text,.page-link,.btn-default,.btn-light,.bg-light,.bg-white) { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-border) !important; }
  html[data-theme-preset] :is(.table,.main-header .nav-link,.dropdown-item,.portal-sidebar .nav-link,.text-dark,.text-body,.breadcrumb-item.active) { color:var(--ui-text) !important; }
  html[data-theme-preset] :is(.text-muted,.form-text) { color:var(--ui-muted) !important; }
  html[data-theme-preset] :is(.form-control,.custom-select,.custom-file-label,.public-input,textarea,.ui-site-search input) { background:var(--ui-surface) !important; color:var(--ui-text) !important; border-color:var(--ui-border) !important; }
  html[data-theme-preset] :is(.form-control,.public-input)::placeholder { color:var(--ui-muted); opacity:1; }
  html[data-theme-preset] :is(.card-header,.modal-header,.modal-footer,.dropdown-divider,.table td,.table th) { border-color:var(--ui-border); }
  html[data-theme-preset] .table thead th { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
  html[data-theme-preset] :is(.dropdown-item:hover,.table-hover tbody tr:hover,.page-link:hover) { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
  html[data-theme-preset] :is(.btn-primary,.btn-success,.btn-portal-primary,.public-button-primary,.page-item.active .page-link,.fc-button-primary) { background:var(--theme-primary) !important; border-color:var(--theme-primary) !important; color:#fff !important; }
  html[data-theme-preset] :is(.btn-primary,.btn-success,.btn-portal-primary,.public-button-primary):hover { background:var(--theme-hover) !important; border-color:var(--theme-hover) !important; }
  html[data-theme-preset] :is(.btn-outline-primary,.btn-outline-success) { color:var(--ui-accent); border-color:var(--ui-accent); }
  html[data-theme-preset] :is(.btn-outline-primary,.btn-outline-success):hover { background:var(--theme-primary) !important; color:#fff !important; }
  html[data-theme-preset] :is(.card-primary>.card-header:not(.bg-transparent),.card-success>.card-header:not(.bg-transparent),.card-header.bg-primary) { background:var(--theme-primary) !important; border-color:var(--theme-primary) !important; color:#fff !important; }
  html[data-theme-preset] .main-sidebar { background:var(--theme-sidebar) !important; }
  html[data-theme-preset] .main-sidebar .nav-link { color:#d7e1ed !important; }
  html[data-theme-preset] :is(.nav-sidebar .nav-link.active,.portal-sidebar .nav-link.active) { background:var(--theme-primary) !important; color:#fff !important; }
  html[data-theme-preset] .ui-scroll-progress span { background:var(--ui-accent); }
  html[data-theme-preset] #statementDocument {
    --ui-bg:#fff; --ui-surface:#fff; --ui-soft:#edf3f0; --ui-text:#17212b; --ui-muted:#617184; --ui-border:#d9e2e9; --ui-accent:#13775a;
    --evolve-brand:#16805f; --evolve-brand-dark:#11664c; --evolve-brand-soft:#eaf6f1; --evolve-text:#17212b; --evolve-muted:#6b7785; --evolve-border:#e2e7ec;
    --portal-text:#17212b; --portal-muted:#617184; --ink:#17212b; --muted:#617184; --line:#d9e2e9;
    background:#fff !important; color:#17212b !important;
  }
  html[data-theme-preset] #statementDocument :is(.table,.text-dark,.text-body) { color:#17212b !important; }
  html[data-theme-preset] #statementDocument :is(.bg-light,.bg-white,.table th,.table td) { background:#fff !important; color:#17212b !important; border-color:#d9e2e9 !important; }
  html[data-theme-preset] #statementDocument .text-muted { color:#617184 !important; }
  .ui-theme-trigger.ui-theme-toggle { width:auto; min-width:40px; gap:8px; padding:8px 12px; font:600 14px/1.2 system-ui,sans-serif; background:var(--ui-surface); color:var(--ui-text); }
  html[data-theme-preset] .ui-theme-trigger { background:var(--ui-surface); color:var(--ui-text); border-color:var(--ui-border); }
  .ui-theme-trigger[aria-expanded="true"] .ui-theme-chevron { transform:rotate(180deg); }
  .ui-theme-menu { position:fixed; z-index:1065; box-sizing:border-box; width:min(460px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow-y:auto; overscroll-behavior:contain; padding:12px; border:1px solid var(--ui-border); border-radius:16px; background:var(--ui-surface); color:var(--ui-text); box-shadow:0 16px 50px #07111f33; font:400 15px/1.4 system-ui,sans-serif; }
  .ui-theme-menu[hidden] { display:none !important; }
  .ui-theme-menu-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 6px 8px; border-bottom:1px solid var(--ui-border); }
  .ui-theme-menu-heading strong { font-size:14px; }
  .ui-theme-dismiss { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:8px; background:transparent; color:var(--ui-muted); font-size:24px; cursor:pointer; }
  .ui-theme-actions,.ui-theme-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .ui-theme-actions { padding:8px 0; border-bottom:1px solid var(--ui-border); }
  .ui-theme-columns { padding-top:10px; align-items:start; }
  .ui-theme-columns h3 { margin:0 0 8px; padding:0 9px; font:700 11px/1.5 system-ui,sans-serif; letter-spacing:.08em; text-transform:uppercase; color:var(--ui-muted); }
  .ui-theme-option { display:flex; align-items:center; gap:10px; min-height:44px; width:100%; padding:9px; border:0; border-radius:9px; background:transparent; color:var(--ui-text); text-align:left; font:inherit; cursor:pointer; }
  .ui-theme-option>span:nth-child(2) { flex:1; min-width:0; overflow-wrap:break-word; }
  .ui-theme-swatch { flex:none; display:grid; place-items:center; width:16px; height:16px; border-radius:50%; box-shadow:0 0 0 1px var(--ui-border); }
  .ui-theme-swatch.is-action { font-size:20px; width:20px; height:20px; background:transparent; box-shadow:none; color:var(--ui-accent); }
  .ui-theme-selected { visibility:hidden; color:var(--ui-accent); font-size:13px; }
  .ui-theme-option[aria-pressed="true"] { background:var(--ui-soft); font-weight:600; }
  .ui-theme-option[aria-pressed="true"] .ui-theme-selected { visibility:visible; }
  .ui-theme-option:hover,.ui-theme-dismiss:hover { background:var(--ui-soft); }
  .ui-theme-menu-footer { margin:10px 6px 2px; padding-top:10px; border-top:1px solid var(--ui-border); color:var(--ui-muted); font-size:11px; }
  @media (max-width:480px) {
    .ui-theme-trigger.ui-theme-toggle { width:36px; min-width:36px; height:36px; gap:0; padding:8px; }
    .ui-theme-trigger-label,.ui-theme-chevron { display:none; }
    .ui-theme-menu { font-size:13px; padding:10px; }
    .ui-theme-option { gap:7px; padding:8px; }
  }
  @media (prefers-reduced-motion:reduce) { .ui-theme-trigger,.ui-theme-option { transition:none; } }
}
@media print { .ui-theme-menu,.ui-theme-trigger { display:none !important; } }
