/* Billing-only appearance layer. 02 and 04 are UI themes, not invoice PDF templates.
   Intentionally loaded after the existing Billing CSS so users can switch safely. */

/* Purpose-built appearance menu: a small curated palette, not an OS select list. */
.theme-switcher{position:relative;min-width:174px}
.theme-picker-button{display:flex;align-items:center;gap:10px;width:100%;min-height:41px;border:1px solid #d8e2dd;border-radius:10px;background:#fff;padding:0 11px;color:#28493e;text-align:left;font-family:inherit;font-size:12px;font-weight:750;line-height:1.35;box-shadow:0 1px 2px #193b2810;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}
.theme-picker-button:hover{border-color:#9fbcaa;background:#fbfdfb}
.theme-picker-button[aria-expanded="true"]{border-color:#60977b;box-shadow:0 0 0 3px #34835c17}
.theme-picker-button svg{width:15px;height:15px;margin-left:auto;flex:none;transition:transform .16s ease}
.theme-picker-button[aria-expanded="true"] svg{transform:rotate(180deg)}
.theme-picker-current{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-weight:800}
.theme-picker-dot{height:13px;width:13px;border:3px solid #ecf6ef;background:#337b5b;border-radius:4px;flex:none;box-shadow:0 0 0 1px #47796242}
.theme-picker-button[data-theme="ivory"] .theme-picker-dot{background:#987347;border-color:#f8eddb;box-shadow:0 0 0 1px #9873474d}
.theme-picker-button[data-theme="azure"] .theme-picker-dot{background:#2d7fac;border-color:#e4f2f9;box-shadow:0 0 0 1px #2d7fac4d}
.theme-picker-button[data-theme="contrast"] .theme-picker-dot{background:#111;border-color:#ffe572;box-shadow:0 0 0 1px #111}
.theme-picker-menu{position:absolute;z-index:90;top:calc(100% + 9px);right:0;width:325px;max-width:calc(100vw - 24px);padding:9px;background:#fff;border:1px solid #dfe7e1;border-radius:14px;box-shadow:0 16px 50px #1a382b28,0 2px 7px #1a382b0a;white-space:normal;color:#273e35}
.theme-picker-intro{padding:12px 12px 10px;border-bottom:1px solid #edf0ed;margin-bottom:5px}
.theme-picker-intro strong{display:block;font:800 13px/1.3 system-ui,sans-serif;color:#253e33}
.theme-picker-intro small{display:block;font:500 11px/1.55 system-ui,sans-serif;color:#75887d;margin-top:3px}
.theme-picker-option{display:flex;align-items:center;gap:11px;width:100%;border:1px solid transparent;background:transparent;border-radius:9px;padding:10px 9px;text-align:left;color:#264338;transition:background .14s ease,border-color .14s ease}
.theme-picker-option:hover,.theme-picker-option:focus-visible{background:#f3f7f4;border-color:#dfebe2;outline:none}
.theme-picker-option[aria-checked="true"]{background:#eaf3ed;border-color:#d4e5d9}
.theme-option-art{width:51px;height:38px;border:1px solid #d9e1dc;border-radius:6px;display:flex;gap:3px;padding:5px;flex:none}
.theme-option-art i{flex:1;border-radius:2px;min-width:0}
.theme-option-art i:first-child{flex:.65}
.theme-option-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.theme-option-copy strong{font:750 12px/1.3 system-ui,sans-serif;color:#264036}
.theme-option-copy small{font:500 10px/1.4 system-ui,sans-serif;color:#77877f}
.theme-option-check{opacity:0;color:#23714d;font-size:15px;font-weight:800}
.theme-picker-option[aria-checked="true"] .theme-option-check{opacity:1}
.theme-picker-foot{border-top:1px solid #edf0ed;margin-top:6px;padding:10px 11px 5px;font:500 10px/1.5 system-ui,sans-serif;color:#71857a}
.theme-picker-button:focus-visible{outline:3px solid #3b9378;outline-offset:2px}
.accounting-launch[hidden]{display:none!important}

/* Each choice has its own typography system without paid/external font requests.
   Never change the independently styled printable invoice sheets. */
html[data-ui-theme="signature"] :is(.sidebar,.topbar,.page,.footer){font-family:"Segoe UI",system-ui,Arial,sans-serif}
html[data-ui-theme="signature"] :is(.premium-page-title h1,.page-header h1,.owner-intelligence-head h2){font-family:"Segoe UI",system-ui,sans-serif;font-weight:750;letter-spacing:-.04em}
html[data-ui-theme="ivory"] :is(.sidebar,.topbar,.page,.footer){font-family:"Segoe UI",Tahoma,Arial,sans-serif}
html[data-ui-theme="ivory"] :is(.premium-page-title h1,.page-header h1,.owner-intelligence-head h2,.studio-hero h1,.theme-settings h3){font-family:Georgia,"Times New Roman",serif;font-weight:700;letter-spacing:-.045em}
html[data-ui-theme="ivory"] .premium-page-title h1{font-size:clamp(32px,3.5vw,47px);line-height:1.09}
html[data-ui-theme="ivory"] .owner-intelligence-head h2{font-size:clamp(23px,2vw,31px)}
html[data-ui-theme="azure"] :is(.sidebar,.topbar,.page,.footer){font-family:"Segoe UI",Arial,sans-serif}
html[data-ui-theme="azure"] :is(.premium-page-title h1,.page-header h1,.owner-intelligence-head h2){font-family:"Trebuchet MS","Segoe UI",Arial,sans-serif;font-weight:800;letter-spacing:-.045em}
html[data-ui-theme="azure"] .premium-page-title h1{font-size:clamp(29px,3.25vw,43px);line-height:1.14}
html[data-ui-theme="contrast"] :is(.sidebar,.topbar,.page,.footer){font-family:Arial,Helvetica,sans-serif}
html[data-ui-theme="contrast"] :is(.premium-page-title h1,.page-header h1,.owner-intelligence-head h2){font-family:Arial,Helvetica,sans-serif;letter-spacing:-.035em}

/* Appearance selector: four choices, recognisable even in a compact sidebar. */
.swatch-ivory{background:#f9f7f0}
.swatch-ivory i:first-child{background:#fffdf9;border:1px solid #e5d5c2}
.swatch-ivory i:nth-child(2){background:#9b7950}
.swatch-ivory i:nth-child(3){background:#e8dfcf}
.swatch-azure{background:#f2f7fb}
.swatch-azure i:first-child{background:#163452}
.swatch-azure i:nth-child(2){background:#287eb1}
.swatch-azure i:nth-child(3){background:#e1f0f7}
.theme-choice-swatch{position:relative;box-shadow:inset 0 0 0 1px #ffffff6d}
.theme-choice.selected{box-shadow:0 0 0 3px #397f6720,0 6px 17px #183a2a0b}
.theme-quick-control select{max-width:181px}

/* 02 — Executive Ivory: understated premium service-office treatment. */
html[data-ui-theme="ivory"]{
  --bg:#f9f7f0;--ink:#463b32;--muted:#81766b;--muted-dark:#695c4e;
  --line:#e7dfd2;--green:#785c3a;--green-light:#f4eddf;
  --shadow:0 14px 36px rgba(79,62,38,.055)
}
html[data-ui-theme="ivory"] body{background:#f9f7f0;color:#463b32}
html[data-ui-theme="ivory"] .shell{grid-template-columns:242px minmax(0,1fr)}
html[data-ui-theme="ivory"] .sidebar{background:#fffdf9;border-right:1px solid #e9e2d5;padding-top:31px}
html[data-ui-theme="ivory"] .brand-mark{background:#755d42;color:#fff9ed;box-shadow:0 5px 16px #755d4220}
html[data-ui-theme="ivory"] .brand-words{color:#41382f}
html[data-ui-theme="ivory"] .brand-dot{color:#b99458}
html[data-ui-theme="ivory"] .brand-words small{color:#9a8d7e}
html[data-ui-theme="ivory"] .workspace-tag{background:#f9f4eb;border-color:#eadfce;color:#7b6347}
html[data-ui-theme="ivory"] .workspace-free{background:#eee1cb;color:#715533}
html[data-ui-theme="ivory"] .nav-caption{color:#9b8c7b}
html[data-ui-theme="ivory"] .nav-link{color:#73685e;border-radius:9px}
html[data-ui-theme="ivory"] .nav-link:hover{background:#f4ecdf;color:#6b4d2f}
html[data-ui-theme="ivory"] .nav-link.active{background:#eee4d1;color:#61472e;box-shadow:inset 3px 0 0 #a78450}
html[data-ui-theme="ivory"] .nav-link.active .nav-count{color:#715837}
html[data-ui-theme="ivory"] .nav-more-toggle{color:#735f48;border-color:#d7c8b3}
html[data-ui-theme="ivory"] .nav-more-toggle:hover,
html[data-ui-theme="ivory"] .nav-more-toggle[aria-expanded="true"]{background:#f2e8d8;color:#664c31}
html[data-ui-theme="ivory"] .side-tip{background:linear-gradient(150deg,#faf2e5,#fff9ee);border-color:#e9dcc7}
html[data-ui-theme="ivory"] .side-tip-icon,html[data-ui-theme="ivory"] .side-tip a{color:#8a6b43}
html[data-ui-theme="ivory"] .side-tip p{color:#887c6e}
html[data-ui-theme="ivory"] .sidebar-foot{color:#a79a8c}
html[data-ui-theme="ivory"] .topbar{height:80px;background:#fffefa;border-color:#e9e1d6;box-shadow:0 3px 14px #71614808}
html[data-ui-theme="ivory"] .crumb{color:#938778}
html[data-ui-theme="ivory"] .crumb strong{color:#554534}
html[data-ui-theme="ivory"] .search-trigger{background:#faf8f2;border-color:#e8dfd3;color:#7e7062}
html[data-ui-theme="ivory"] .theme-quick-control{color:#827468}
html[data-ui-theme="ivory"] .theme-quick-control select{background:#fffdf8;color:#684c33;border-color:#e1d4c2}
html[data-ui-theme="ivory"] .top-add,
html[data-ui-theme="ivory"] .btn:not(.secondary):not(.ghost):not(.soft):not(.danger){background:#785c3a;border-color:#785c3a;color:#fff}
html[data-ui-theme="ivory"] .top-add:hover,
html[data-ui-theme="ivory"] .btn:not(.secondary):not(.ghost):not(.soft):not(.danger):hover{background:#62492f;border-color:#62492f}
html[data-ui-theme="ivory"] .btn.secondary{background:#fffdf9;border-color:#e2d6c6;color:#725837}
html[data-ui-theme="ivory"] .page{padding-top:34px}
html[data-ui-theme="ivory"] .page-header h1,
html[data-ui-theme="ivory"] .premium-page-title h1{color:#41392e}
html[data-ui-theme="ivory"] .eyebrow{color:#9a7951}
html[data-ui-theme="ivory"] :is(.panel,.premium-ledger,.premium-focus-card,.project-card,.settings-card,.theme-settings){
  background:#fffefa;border:1px solid #e9dfd2;border-radius:15px;box-shadow:0 11px 31px #76604409
}
html[data-ui-theme="ivory"] .studio-hero{background:linear-gradient(112deg,#f4ead8,#fffaf1);border-color:#e8d9c2}
html[data-ui-theme="ivory"] .studio-hero h1{color:#4d3d2e}
html[data-ui-theme="ivory"] .data-table thead{background:#faf6ed}
html[data-ui-theme="ivory"] .data-table th{color:#8c7a65}
html[data-ui-theme="ivory"] .data-table td{border-color:#eee7db}
html[data-ui-theme="ivory"] .data-table tbody tr:hover{background:#fcf8ef}
html[data-ui-theme="ivory"] .client-avatar,
html[data-ui-theme="ivory"] .business-launch-icon{background:#f1e8d6;color:#806340}
html[data-ui-theme="ivory"] .sales-dashboard{background:linear-gradient(120deg,#69543f,#927751)}
html[data-ui-theme="ivory"] .sales-kpi.profit-kpi{background:#f7efdf}
html[data-ui-theme="ivory"] .bold-sales-hero{background:linear-gradient(122deg,#594b3b,#866b4b);box-shadow:0 16px 36px #7e644527}
html[data-ui-theme="ivory"] .bold-hero-action{color:#60482e}
html[data-ui-theme="ivory"] .bold-hero-action:hover{color:#60482e;background:#fff3dc}
html[data-ui-theme="ivory"] .bold-sales-overline{color:#f4e7d1}
html[data-ui-theme="ivory"] .bold-mini-chart span.latest{background:#e4bf8b}
html[data-ui-theme="ivory"] .bold-range{background:#f1eadd}
html[data-ui-theme="ivory"] .bold-range button{color:#79674e}
html[data-ui-theme="ivory"] .bold-range button.active{color:#705338}
html[data-ui-theme="ivory"] .bold-side-icon{background:#eee4d0;color:#715938}
html[data-ui-theme="ivory"] .theme-choice.selected{border-color:#92724a;background:#fdf8ed}
html[data-ui-theme="ivory"] .theme-choice.selected strong:after{color:#846339}
html[data-ui-theme="ivory"] .footer{border-color:#ece3d6;color:#988b7c}
html[data-ui-theme="ivory"] .theme-picker-button{background:#fffdf8;border-color:#e4d8c5;color:#684a2f;box-shadow:0 2px 7px #7a63400b}
html[data-ui-theme="ivory"] .theme-picker-button[aria-expanded="true"]{border-color:#9d8058;box-shadow:0 0 0 3px #9d80581c}
html[data-ui-theme="ivory"] .owner-intelligence-card{background:#fffdf9;border:1px solid #e8dfd0;border-radius:10px;box-shadow:0 7px 20px #80603a0a}
html[data-ui-theme="ivory"] .owner-data-head h3,html[data-ui-theme="ivory"] .owner-rank b{color:#694f35}
html[data-ui-theme="ivory"] .owner-rank-track>span{background:#a88656}
html[data-ui-theme="ivory"] .owner-intelligence-head a{color:#805e38}
html[data-ui-theme="ivory"] .owner-start-guide{background:#fffcf7;border-color:#e8dac6;border-radius:12px}
html[data-ui-theme="ivory"] .owner-start-step{border-color:#ebdfce;border-radius:8px}
html[data-ui-theme="ivory"] .owner-start-number{background:#efe5d4;color:#755538}
html[data-ui-theme="ivory"] .owner-start-heading h2{color:#5e4935}

/* 04 — Azure Workbench: high-trust blue navigation and sharp office surfaces. */
html[data-ui-theme="azure"]{
  --bg:#f2f7fb;--ink:#243f56;--muted:#758d9e;--muted-dark:#4b6a80;
  --line:#dce7ef;--green:#246e9c;--green-light:#e7f2f9;
  --shadow:0 13px 35px rgba(30,68,106,.055)
}
html[data-ui-theme="azure"] body{background:#f2f7fb;color:#243f56}
html[data-ui-theme="azure"] .shell{grid-template-columns:253px minmax(0,1fr)}
html[data-ui-theme="azure"] .sidebar{background:#163452;border-right:1px solid #244866}
html[data-ui-theme="azure"] .brand-mark{background:#dbeef8;color:#235f85}
html[data-ui-theme="azure"] .brand-words{color:#eff9ff}
html[data-ui-theme="azure"] .brand-dot{color:#76c6ec}
html[data-ui-theme="azure"] .brand-words small{color:#9ebed1}
html[data-ui-theme="azure"] .workspace-tag{background:#244764;border-color:#3b607b;color:#c3dfef}
html[data-ui-theme="azure"] .workspace-free{background:#d9eff9;color:#245d80}
html[data-ui-theme="azure"] .nav-caption{color:#94b4c7}
html[data-ui-theme="azure"] .nav-link{color:#c0d5e3}
html[data-ui-theme="azure"] .nav-link:hover{background:#244a68;color:#fff}
html[data-ui-theme="azure"] .nav-link.active{background:#dbeef8;color:#17496a;box-shadow:0 3px 12px #0d263524}
html[data-ui-theme="azure"] .nav-link.active .nav-count{color:#245d83}
html[data-ui-theme="azure"] .nav-more-toggle{color:#cee3f0;border-color:#6b91a9}
html[data-ui-theme="azure"] .nav-more-toggle:hover,
html[data-ui-theme="azure"] .nav-more-toggle[aria-expanded="true"]{background:#285675;color:#fff}
html[data-ui-theme="azure"] .side-tip{background:linear-gradient(150deg,#244d6b,#1d405d);border-color:#3d647d;color:#eaf5fc}
html[data-ui-theme="azure"] .side-tip-icon,html[data-ui-theme="azure"] .side-tip a{color:#a0d7f1}
html[data-ui-theme="azure"] .side-tip p{color:#b8d0e1}
html[data-ui-theme="azure"] .sidebar-foot{color:#88afc5}
html[data-ui-theme="azure"] .topbar{height:77px;background:#fff;border-color:#dce7ee;box-shadow:0 4px 18px #29577f0b}
html[data-ui-theme="azure"] .crumb{color:#7e98aa}
html[data-ui-theme="azure"] .crumb strong{color:#284a62}
html[data-ui-theme="azure"] .search-trigger{background:#f4f9fd;border-color:#dbeaf3;color:#587c94}
html[data-ui-theme="azure"] .theme-quick-control{color:#607f94}
html[data-ui-theme="azure"] .theme-quick-control select{background:#f8fcff;border-color:#d8e8f3;color:#285979}
html[data-ui-theme="azure"] .top-add,
html[data-ui-theme="azure"] .btn:not(.secondary):not(.ghost):not(.soft):not(.danger){background:#246f9e;border-color:#246f9e;color:#fff}
html[data-ui-theme="azure"] .top-add:hover,
html[data-ui-theme="azure"] .btn:not(.secondary):not(.ghost):not(.soft):not(.danger):hover{background:#195781;border-color:#195781}
html[data-ui-theme="azure"] .btn.secondary{background:#fff;border-color:#dce8f1;color:#235f89}
html[data-ui-theme="azure"] .page-header h1,
html[data-ui-theme="azure"] .premium-page-title h1{color:#243d55}
html[data-ui-theme="azure"] .eyebrow{color:#3d7da3}
html[data-ui-theme="azure"] :is(.panel,.premium-ledger,.premium-focus-card,.project-card,.settings-card,.theme-settings){
  background:#fff;border:1px solid #dce8f1;border-radius:13px;box-shadow:0 10px 28px #345e7909
}
html[data-ui-theme="azure"] .studio-hero{background:linear-gradient(110deg,#e9f3fa,#fff);border-color:#d8e9f4}
html[data-ui-theme="azure"] .studio-hero h1{color:#244c69}
html[data-ui-theme="azure"] .data-table thead{background:#f1f7fc}
html[data-ui-theme="azure"] .data-table th{color:#66869f}
html[data-ui-theme="azure"] .data-table td{border-color:#e5eef5}
html[data-ui-theme="azure"] .data-table tbody tr:hover{background:#f5faff}
html[data-ui-theme="azure"] .client-avatar,
html[data-ui-theme="azure"] .business-launch-icon{background:#e5f2fa;color:#2a759f}
html[data-ui-theme="azure"] .sales-dashboard{background:linear-gradient(120deg,#164268,#297daf)}
html[data-ui-theme="azure"] .sales-kpi.profit-kpi{background:#e7f4f9}
html[data-ui-theme="azure"] .bold-sales-hero{background:linear-gradient(118deg,#174b74,#2674a5);box-shadow:0 15px 33px #1c61852b}
html[data-ui-theme="azure"] .bold-hero-action{color:#195679}
html[data-ui-theme="azure"] .bold-hero-action:hover{color:#174c6c;background:#e7f5fc}
html[data-ui-theme="azure"] .bold-sales-overline{color:#c6e8fa}
html[data-ui-theme="azure"] .bold-mini-chart span.latest{background:#77ccec}
html[data-ui-theme="azure"] .bold-range{background:#e8f1f7}
html[data-ui-theme="azure"] .bold-range button{color:#547993}
html[data-ui-theme="azure"] .bold-range button.active{color:#245b80}
html[data-ui-theme="azure"] .bold-side-icon{background:#e1f2fc;color:#256e9b}
html[data-ui-theme="azure"] .theme-choice.selected{border-color:#287eb1;background:#f2f9fd}
html[data-ui-theme="azure"] .theme-choice.selected strong:after{color:#256e9b}
html[data-ui-theme="azure"] .footer{border-color:#e0eaf2;color:#829bab}
html[data-ui-theme="azure"] .theme-picker-button{background:#f8fbfe;border-color:#cbdfea;color:#205675}
html[data-ui-theme="azure"] .theme-picker-button[aria-expanded="true"]{border-color:#347da4;box-shadow:0 0 0 3px #2f80a819}
html[data-ui-theme="azure"] .owner-intelligence-card{background:#fff;border:1px solid #dbe9f3;border-radius:11px;box-shadow:0 8px 22px #2b648210}
html[data-ui-theme="azure"] .owner-data-head h3,html[data-ui-theme="azure"] .owner-rank b{color:#225c81}
html[data-ui-theme="azure"] .owner-rank-track>span{background:#287eaf}
html[data-ui-theme="azure"] .owner-intelligence-head a{color:#1c6893}
html[data-ui-theme="azure"] .owner-start-guide{background:#f9fcff;border-color:#d6e7f2;border-radius:12px}
html[data-ui-theme="azure"] .owner-start-step{border-color:#dfebf3;border-radius:9px}
html[data-ui-theme="azure"] .owner-start-number{background:#e1f0fb;color:#226f9c}
html[data-ui-theme="azure"] .owner-start-heading h2{color:#244f71}

/* Accounting Lite and Excel import inherit the chosen Billing theme.
   Previously these components retained fixed blue backgrounds, text and figures. */
.finance-pro-hint{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}
html[data-ui-theme="signature"]{--finance-accent:#17644c;--finance-deep:#193c33;--finance-muted:#63796f;--finance-soft:#edf6f0;--finance-line:#d6e7dc;--finance-paper:#fff;--finance-font:"Segoe UI",system-ui,sans-serif}
html[data-ui-theme="ivory"]{--finance-accent:#795735;--finance-deep:#493b2e;--finance-muted:#857563;--finance-soft:#f4ebdc;--finance-line:#e6d9c7;--finance-paper:#fffdf8;--finance-font:Georgia,"Times New Roman",serif}
html[data-ui-theme="azure"]{--finance-accent:#236c95;--finance-deep:#24455d;--finance-muted:#648199;--finance-soft:#e9f3f9;--finance-line:#d6e5ef;--finance-paper:#fff;--finance-font:"Trebuchet MS","Segoe UI",sans-serif}
html[data-ui-theme="contrast"]{--finance-accent:#141414;--finance-deep:#101010;--finance-muted:#323232;--finance-soft:#fff0a1;--finance-line:#262626;--finance-paper:#fff;--finance-font:Arial,Helvetica,sans-serif}
html[data-ui-theme] .finance-head h1{font-family:var(--finance-font);color:var(--finance-deep)}
html[data-ui-theme] .finance-head p,html[data-ui-theme] .finance-panel p,html[data-ui-theme] .finance-table td small,html[data-ui-theme] .finance-kpi small{color:var(--finance-muted)}
html[data-ui-theme] .finance-mode{background:var(--finance-soft);border-color:var(--finance-line)}
html[data-ui-theme] .finance-mode a{color:var(--finance-deep)}
html[data-ui-theme] .finance-mode a.selected{background:var(--finance-paper);color:var(--finance-accent);box-shadow:0 3px 12px #0000000b}
html[data-ui-theme] .finance-panel{background:var(--finance-paper);border-color:var(--finance-line)}
html[data-ui-theme] .finance-panel h3{color:var(--finance-deep);font-family:var(--finance-font)}
html[data-ui-theme] .finance-kpi span,html[data-ui-theme] .finance-tally{color:var(--finance-muted)}
html[data-ui-theme] .finance-kpi strong{color:var(--finance-accent);font-family:var(--finance-font)}
html[data-ui-theme] .finance-hint{background:var(--finance-soft);border-color:var(--finance-line);border-left-color:var(--finance-accent);color:var(--finance-deep)}
html[data-ui-theme] .finance-hint b{color:var(--finance-accent)}
html[data-ui-theme] .finance-table-wrap{border-color:var(--finance-line)}
html[data-ui-theme] .finance-table th{background:var(--finance-soft);color:var(--finance-deep)}
html[data-ui-theme] .finance-table td{color:var(--finance-deep);border-color:var(--finance-line)}
html[data-ui-theme] .finance-tabs{border-color:var(--finance-line)}
html[data-ui-theme] .finance-tabs button{color:var(--finance-muted)}
html[data-ui-theme] .finance-tabs button.on{background:var(--finance-soft);color:var(--finance-accent)}
html[data-ui-theme] .finance-tally span{background:var(--finance-soft)}
html[data-ui-theme] .finance-step>span{background:var(--finance-soft);color:var(--finance-accent);font-family:var(--finance-font)}
html[data-ui-theme] .finance-filedrop{background:var(--finance-soft);border-color:var(--finance-accent);color:var(--finance-deep)}
html[data-ui-theme] .finance-filedrop:hover{background:var(--finance-paper)}
html[data-ui-theme] .finance-filedrop small{color:var(--finance-muted)}
html[data-ui-theme] .finance-map label,html[data-ui-theme] .finance-form label{color:var(--finance-deep)}
html[data-ui-theme] .finance-map select,html[data-ui-theme] .finance-form input,html[data-ui-theme] .finance-form select{background:var(--finance-paper);border-color:var(--finance-line);color:var(--finance-deep)}
html[data-ui-theme] .finance-map select:focus,html[data-ui-theme] .finance-form input:focus,html[data-ui-theme] .finance-form select:focus{outline-color:var(--finance-accent)}
html[data-ui-theme="ivory"] .finance-head h1{font-size:clamp(28px,3.1vw,43px);letter-spacing:-.04em}
html[data-ui-theme="contrast"] :is(.finance-table-wrap,.finance-mode,.finance-panel,.finance-hint){border-width:2px}
html[data-ui-theme="contrast"] .theme-picker-button{background:#fff;border:2px solid #111;color:#111;border-radius:4px;font-size:14px}
html[data-ui-theme="contrast"] .theme-picker-menu{border:3px solid #111;border-radius:6px;box-shadow:8px 8px 0 #111}
html[data-ui-theme="contrast"] .theme-picker-option[aria-checked="true"]{background:#ffe572;border-color:#111}
html[data-ui-theme="contrast"] .theme-option-copy strong,html[data-ui-theme="contrast"] .theme-option-copy small{color:#111}

/* Respect desktop-collapse and mobile navigation layouts owned by existing CSS. */
@media(min-width:801px){
  html[data-ui-theme="ivory"][data-sidebar-collapsed="true"] .shell,
  html[data-ui-theme="azure"][data-sidebar-collapsed="true"] .shell{grid-template-columns:0 minmax(0,1fr)}
}
@media(max-width:800px){
  html[data-ui-theme="ivory"] .shell,html[data-ui-theme="azure"] .shell{grid-template-columns:1fr}
  html[data-ui-theme="ivory"] .sidebar{background:#fffdf9}
  html[data-ui-theme="azure"] .sidebar{background:#163452}
}
@media(min-width:801px) and (max-width:1460px){
  html[data-ui-theme="ivory"] .topbar,
  html[data-ui-theme="azure"] .topbar{padding-inline:clamp(16px,2.1vw,30px);gap:11px}
  html[data-ui-theme="ivory"] .top-actions,
  html[data-ui-theme="azure"] .top-actions{gap:9px}
  html[data-ui-theme="ivory"] .local-badge,
  html[data-ui-theme="azure"] .local-badge{display:none}
}
@media(max-width:620px){
  .theme-quick-control select{max-width:106px}
  html[data-ui-theme="ivory"] .topbar,html[data-ui-theme="azure"] .topbar{height:auto;min-height:61px}
}
