/* Reading-first palette. All foreground/background pairs are explicitly defined. */
html[data-theme]{--ink:#202124;--muted:#555d68;--line:#cdd1d7;--paper:#fff;--accent:#a83c00}
html[data-theme] body{color:#202124;background:#fff}
html[data-theme] body :is(.brand,h1,.card h3,td strong,.dialoghead h2,.customerbox h3,.focus-title h3,.empty-state h3){color:#202124}
html[data-theme] body :is(p,small,.customer,.owner,.datepill,.due,.amount,.cardtop,.card-menu,.card-menu span,.label,.stat .label,.stat small,.listtitle small,.listtitle b,.eyebrow,.navlabel,.colhead,.count,.focus-label,.workspace-note p,.workspace-note>span,.syncstate small,.section-label,.formgrid label,.dialoghead small,.billing small,.paymentrow,.storage-note small,.header-right .saved,footer){color:#555d68}
html[data-theme] body :is(.card h3,td strong){font-weight:650}
html[data-theme] body :is(.stat .num,.stat:last-child .num,.stat:nth-child(2) .num,.stat:nth-child(3) .num,.billing h3,#paymentSummary strong,.formfoot #total){color:#222831}
html[data-theme] body :is(.stat .label,.stat small,.customer,.cardtop,.due,.datepill,.owner,.amount,.formgrid label,.billing small,.quickfilters button,.tools button,.tools select,th){font-size:11px}
html[data-theme] body :is(.shop,.profile,header strong,.side-note a,.resource-icon,.storage-note,.shop small,.profile small){color:#4d5560}
html[data-theme] body>aside{background:#f4f5f7;border-color:#cdd1d7}
html[data-theme] body :is(header,.shop,.stat,.stat:nth-child(2),.card,.customerbox,dialog){background:#fff;border-color:#cdd1d7}
html[data-theme] body :is(nav button,.views button,.quickfilters button,.tools button,.tools select,.theme-toggle,.flowtabs button){color:#4d5560}
html[data-theme] body nav button:not(.active){background:transparent}
html[data-theme] body nav button.active{background:#ffe4d0;color:#853000}
html[data-theme] body nav button.active>span:first-child{color:#853000}
html[data-theme] body :is(nav button>span:first-child,.mini,.avatar,.profile .avatar,.shopicon){color:#713500}
html[data-theme] body :is(.mini,.avatar,.profile .avatar,.shopicon,nav b){background:#ffead9;border-color:#e6b38c;color:#713500}
html[data-theme] body :is(.primary,.brandmark){background:#a83c00;border-color:#a83c00;color:#fff;box-shadow:none}
html[data-theme] body .primary:hover{background:#873000;border-color:#873000;color:#fff}
html[data-theme] body :is(button:focus-visible,a:focus-visible){outline:3px solid #a83c00;outline-offset:3px}
html[data-theme] body .flowtabs{border-color:#b8bec6}
html[data-theme] body .flowtabs button[aria-selected=true]{color:#853000;border-bottom-color:#b54400}
html[data-theme] body :is(.flowtabs button span,.flowtabs button[aria-selected=true] span){background:#ffe5d1;color:#713500}
html[data-theme] body :is(.views button.selected,.quickfilters button.selected){background:#ffe5d1;border-color:#d8905c;color:#853000}
html[data-theme] body .flowhint{background:#fff0d4;border-color:#c99b48;color:#704600}
html[data-theme] body :is(.flowhint button,.auth.waiting){background:#fff0cf;border-color:#c99b48;color:#704600}
html[data-theme] body .auth.ready{background:#deefdf;border-color:#86ad8c;color:#245a30}
html[data-theme] body :is(.statuspill,.statuspill.homebase,.tag){background:#f8e7dc;color:#763c16}
html[data-theme] body .statuspill.design{background:#f8e7dc;color:#763c16}
html[data-theme] body .statuspill.production{background:#e0edf9;color:#234f76}
html[data-theme] body .statuspill.complete{background:#deefdf;color:#245a30}
html[data-theme] body :is(.row-icon,.row-icon.print,.type-icon,.type-icon.print){background:#ffe5d1;color:#853000}
html[data-theme] body :is(.row-icon.embroidery,.type-icon.embroidery){background:#f5e8ce;color:#6c4d09}
html[data-theme] body :is(.row-icon.design,.type-icon.design){background:#ffe5d1;color:#853000}
html[data-theme] body table{background:#fff;border-color:#bfc5cd}
html[data-theme] body th{background:#edf0f4;color:#46505d;border-color:#c4cbd3;font-weight:650}
html[data-theme] body td{color:#454e59;border-color:#dce0e5}
html[data-theme] body td:first-child{border-left-color:#c77a42}
html[data-theme] body tbody tr:hover{background:#fff3e9}
html[data-theme] body :is(.datepill.urgent,.due.urgent,.formerror,.formfoot .danger){color:#9f2931}
html[data-theme] body :is(.search,.tools select,.tools button,.theme-toggle){background:#fff;border-color:#aeb6c0;color:#46505d}
html[data-theme] body .search input{color:#202124}
html[data-theme] body .search input::placeholder{color:#656d77}
html[data-theme] body :is(.column,.focuspanel,.workspace-note,.storage-note,.billing,.empty-state){background:#f4f5f7;border-color:#c8ced7}
html[data-theme] body :is(.listtitle,.workspace-note strong,.syncstate,.deadline>span:nth-child(2)>strong,.dateblock strong,.addcard,.payactions button,.formfoot #archive){color:#853000}
html[data-theme] body :is(.cardfoot,.paymentrow,.formfoot,.syncstate,.deadline){border-color:#cdd1d7}
html[data-theme] body :is(.dateblock,.payactions button){background:#fff;border-color:#bfc5cd}
html[data-theme] body :is(.formgrid input,.formgrid select,.formgrid textarea){background:#fff;border-color:#aeb6c0;color:#202124}
html[data-theme] body :is(.formgrid input::placeholder,.formgrid textarea::placeholder){color:#656d77}
html[data-theme] body :is(.formgrid input:focus,.formgrid select:focus,.formgrid textarea:focus){border-color:#a83c00;box-shadow:0 0 0 3px #f4d2ba}
html[data-theme] body .close{background:#edeff2;color:#46505d}
html[data-theme] body .rush{background:#fff0cf;color:#704600}
html[data-theme] body #toast{background:#363b43;color:#fff}
html[data-theme] body .theme-toggle:hover{background:#fff0e4}
html[data-theme=dark]{--ink:#f5f6f7;--muted:#b8c0ca;--line:#626a76;--paper:#17191d;--accent:#ff9b52}
html[data-theme=dark] body{background:#17191d;color:#f5f6f7}
html[data-theme=dark] body :is(.brand,h1,.card h3,td strong,.dialoghead h2,.customerbox h3,.focus-title h3,.empty-state h3){color:#f5f6f7}
html[data-theme=dark] body :is(p,small,.customer,.owner,.datepill,.due,.amount,.cardtop,.card-menu,.card-menu span,.label,.stat .label,.stat small,.listtitle small,.listtitle b,.eyebrow,.navlabel,.colhead,.count,.focus-label,.workspace-note p,.workspace-note>span,.syncstate small,.section-label,.formgrid label,.dialoghead small,.billing small,.paymentrow,.storage-note small,.header-right .saved,footer){color:#b8c0ca}
html[data-theme=dark] body :is(.stat .num,.stat:last-child .num,.stat:nth-child(2) .num,.stat:nth-child(3) .num,.billing h3,#paymentSummary strong,.formfoot #total){color:#f5f6f7}
html[data-theme=dark] body :is(.shop,.profile,header strong,.side-note a,.resource-icon,.storage-note,.shop small,.profile small){color:#c4cbd4}
html[data-theme=dark] body>aside{background:#202329;border-color:#626a76}
html[data-theme=dark] body :is(header,.shop,.stat,.stat:nth-child(2),.card,.customerbox,dialog){background:#25292f;border-color:#626a76}
html[data-theme=dark] body :is(nav button,.views button,.quickfilters button,.tools button,.tools select,.theme-toggle,.flowtabs button){color:#c4cbd4}
html[data-theme=dark] body nav button.active{background:#54321d;color:#ffd4b0}
html[data-theme=dark] body nav button.active>span:first-child{color:#ffd4b0}
html[data-theme=dark] body :is(nav button>span:first-child,.mini,.avatar,.profile .avatar,.shopicon){color:#ffd4b0}
html[data-theme=dark] body :is(.mini,.avatar,.profile .avatar,.shopicon,nav b){background:#54321d;border-color:#9d6f4a;color:#ffd4b0}
html[data-theme=dark] body :is(.primary,.brandmark){background:#ff9b52;border-color:#ff9b52;color:#1c2026}
html[data-theme=dark] body .primary:hover{background:#ffb87f;border-color:#ffb87f;color:#1c2026}
html[data-theme=dark] body :is(button:focus-visible,a:focus-visible){outline-color:#ffb87f}
html[data-theme=dark] body .flowtabs{border-color:#626a76}
html[data-theme=dark] body .flowtabs button[aria-selected=true]{color:#ffba86;border-bottom-color:#ff9b52}
html[data-theme=dark] body :is(.flowtabs button span,.flowtabs button[aria-selected=true] span){background:#54321d;color:#ffd4b0}
html[data-theme=dark] body :is(.views button.selected,.quickfilters button.selected){background:#54321d;border-color:#bc835b;color:#ffd4b0}
html[data-theme=dark] body .flowhint{background:#3e3019;border-color:#a2864c;color:#f4d38d}
html[data-theme=dark] body :is(.flowhint button,.auth.waiting){background:#48351a;border-color:#a2864c;color:#f4d38d}
html[data-theme=dark] body .auth.ready{background:#23442c;border-color:#729b7a;color:#b4e7bd}
html[data-theme=dark] body :is(.statuspill,.statuspill.homebase,.tag,.statuspill.design){background:#54321d;color:#ffd4b0}
html[data-theme=dark] body .statuspill.production{background:#253f58;color:#beddf8}
html[data-theme=dark] body .statuspill.complete{background:#23442c;color:#b4e7bd}
html[data-theme=dark] body :is(.row-icon,.row-icon.print,.type-icon,.type-icon.print,.row-icon.design,.type-icon.design){background:#54321d;color:#ffd4b0}
html[data-theme=dark] body :is(.row-icon.embroidery,.type-icon.embroidery){background:#48351a;color:#f4d38d}
html[data-theme=dark] body table{background:#25292f;border-color:#626a76}
html[data-theme=dark] body th{background:#333943;color:#d6dce4;border-color:#737d8a}
html[data-theme=dark] body td{color:#c4cbd4;border-color:#505864}
html[data-theme=dark] body td:first-child{border-left-color:#e69557}
html[data-theme=dark] body tbody tr:hover{background:#343b45}
html[data-theme=dark] body :is(.datepill.urgent,.due.urgent,.formerror,.formfoot .danger){color:#ffb0b6}
html[data-theme=dark] body :is(.search,.tools select,.tools button,.theme-toggle){background:#25292f;border-color:#737d8a;color:#d6dce4}
html[data-theme=dark] body .search input{color:#f5f6f7}
html[data-theme=dark] body .search input::placeholder{color:#b8c0ca}
html[data-theme=dark] body :is(.column,.focuspanel,.workspace-note,.storage-note,.billing,.empty-state){background:#202329;border-color:#626a76}
html[data-theme=dark] body :is(.listtitle,.workspace-note strong,.syncstate,.deadline>span:nth-child(2)>strong,.dateblock strong,.addcard,.payactions button,.formfoot #archive){color:#ffba86}
html[data-theme=dark] body :is(.cardfoot,.paymentrow,.formfoot,.syncstate,.deadline){border-color:#626a76}
html[data-theme=dark] body :is(.dateblock,.payactions button){background:#25292f;border-color:#737d8a}
html[data-theme=dark] body :is(.formgrid input,.formgrid select,.formgrid textarea){background:#17191d;border-color:#737d8a;color:#f5f6f7}
html[data-theme=dark] body :is(.formgrid input::placeholder,.formgrid textarea::placeholder){color:#b8c0ca}
html[data-theme=dark] body :is(.formgrid input:focus,.formgrid select:focus,.formgrid textarea:focus){border-color:#ffba86;box-shadow:0 0 0 3px #67492f}
html[data-theme=dark] body .close{background:#333943;color:#d6dce4}
html[data-theme=dark] body .rush{background:#48351a;color:#f4d38d}
html[data-theme=dark] body #toast{background:#e5e7eb;color:#202124}
html[data-theme=dark] body .theme-toggle:hover{background:#3b414b}
html[data-theme] body .formgrid input::placeholder,html[data-theme] body .formgrid textarea::placeholder{color:#656d77}html[data-theme=dark] body .formgrid input::placeholder,html[data-theme=dark] body .formgrid textarea::placeholder{color:#b8c0ca}
