/* Alternate palettes reuse kraft surface tones; semantic status colors stay unchanged. */
@media screen and (forced-colors: none) {
  [data-palette=pink] {
    --tone-21170eb3: #200f15b3;
    --tone-231d18: #23181c;
    --tone-26190e14: #23111814;
    --tone-26190e45: #23111845;
    --tone-2b231c: #2b1c21;
    --tone-30211326: #2e151e26;
    --tone-35291f: #351f27;
    --tone-35291f0c: #351f270c;
    --tone-352b22: #352229;
    --tone-38271940: #371a2540;
    --tone-392619: #381a25;
    --tone-39261930: #381a2530;
    --tone-3e3024: #3e242e;
    --tone-443224: #442430;
    --tone-49321f: #47212f;
    --tone-493725: #492532;
    --tone-493726: #492633;
    --tone-493827: #492733;
    --tone-4b3928: #4b2835;
    --tone-4d3422: #4b2432;
    --tone-503b29: #502937;
    --tone-51351c0c: #4a23310c;
    --tone-51351c20: #4a233120;
    --tone-52371b08: #4a233108;
    --tone-52371b0b: #4a23310b;
    --tone-52371b12: #4a233112;
    --tone-52371b14: #4a233114;
    --tone-56412c: #562c3b;
    --tone-583d2c: #582c3c;
    --tone-584322: #532737;
    --tone-58432e: #582e3d;
    --tone-59422e: #592e3e;
    --tone-604831: #603142;
    --tone-644b32: #643244;
    --tone-645039: #643949;
    --tone-654a32: #653245;
    --tone-66503d: #663d4c;
    --tone-695239: #69394b;
    --tone-6a4d33: #6a3347;
    --tone-6b5541: #6b4150;
    --tone-6c4c3040: #6a324740;
    --tone-6d5b49: #6d4956;
    --tone-6f492f: #6b3347;
    --tone-705039: #70394d;
    --tone-705435: #70354b;
    --tone-715333: #70344a;
    --tone-754d09: #562839;
    --tone-755139: #75394f;
    --tone-77624b: #774b5b;
    --tone-7b4d0c: #5c2b3d;
    --tone-805c3c: #803c55;
    --tone-805d3538: #7b3a5238;
    --tone-81705c: #815c6a;
    --tone-875b38: #823d56;
    --tone-8c6240: #8b415c;
    --tone-8c6e4f: #8c4f65;
    --tone-92714d: #924d66;
    --tone-94734f: #944f68;
    --tone-9b7953: #9b536d;
    --tone-9e7a52: #9e526e;
    --tone-a47a50: #a4506f;
    --tone-a5895c: #a55c77;
    --tone-a6845b: #a65b76;
    --tone-a98962: #a9627c;
    --tone-ac8a604d: #ac607c4d;
    --tone-ad8659: #ad5978;
    --tone-ae895b: #ae5b79;
    --tone-b17a1d: #8c425d;
    --tone-b18a5e: #b15e7c;
    --tone-b7916c: #b76c87;
    --tone-b79770: #b7708a;
    --tone-b8a386: #b88698;
    --tone-baa48a: #ba8a9c;
    --tone-bc966f: #bb708b;
    --tone-bca077: #bc7790;
    --tone-bd9360: #b76684;
    --tone-bd9a76: #bd7690;
    --tone-bfa079: #bf7993;
    --tone-c2a180: #c28098;
    --tone-c3aa87: #c3879d;
    --tone-c4ad93: #c493a5;
    --tone-c5aa84: #c5849c;
    --tone-c6a77f: #c4819a;
    --tone-ceb08e: #cb91a6;
    --tone-ceb291: #cc93a8;
    --tone-d0b28f: #cc93a8;
    --tone-d1bba1: #d1a1b3;
    --tone-d3ac7133: #c3819933;
    --tone-d5ac79: #c7879f;
    --tone-d5c4ab: #d5abba;
    --tone-d8b589: #cd94a9;
    --tone-deccb5: #ddb6c4;
    --tone-dfc297: #d3a3b4;
    --tone-dfcbb3: #dcb6c4;
    --tone-dfd1ba: #dfbac8;
    --tone-e1d0ba: #dfbcc9;
    --tone-e3c49a: #d6a7b8;
    --tone-e4d7c6: #e4c6d1;
    --tone-e5bf8f: #d3a1b3;
    --tone-e5d6c2: #e3c4cf;
    --tone-e8dac8: #e6cad4;
    --tone-e9b96e: #ca8da3;
    --tone-e9d0ac: #ddb8c5;
    --tone-e9ddcd: #e8ced8;
    --tone-ead7b9: #e2c1cd;
    --tone-ecdfce8c: #e9d1da8c;
    --tone-eddfcc: #e9d0d9;
    --tone-eee2d3: #ebd6de;
    --tone-eee4d6: #ecd8df;
    --tone-eee6da: #eedae1;
    --tone-efd8b8: #e3c4cf;
    --tone-efe1cb: #e9d1da;
    --tone-f0d4ae: #e0beca;
    --tone-f0d8b7: #e3c4cf;
    --tone-f0e2cf: #ebd4dc;
    --tone-f0e6d8eb: #eedae1eb;
    --tone-f3d390: #d8abbc;
    --tone-f4ede2: #f2e4e9;
    --tone-f4ede270: #f2e4e970;
    --tone-f7e5ca: #ebd6de;
    --tone-f7e9cb: #ecd6de;
    --tone-f7f2e9: #f5ebef;
    --tone-f8f4ed: #f7eef1;
    --tone-fae6b3: #e5c8d3;
    --tone-faf4e9: #f6edf0;
    --tone-faf6ef: #f8f1f3;
    --tone-faf6efed: #f8f1f3ed;
    --tone-fcfaf6: #fbf7f8;
    --tone-ffe8dd: #f4e8ec;
    --tone-fff0d9: #f3e5ea;
    --tone-fff0e8: #f8eff2;
    --tone-fff1e8: #f8eff2;
    --tone-fff3db24: #f3e7eb24;
    --tone-fff4e4: #f6edf0;
    --tone-fff5df40: #f5e9ed40;
    --tone-fff5dfb3: #f5e9edb3;
    --tone-fff7e270: #f6ebef70;
    --tone-fff8ed: #f9f3f5;
    --tone-fffdf7: #fcfafb;
  }
  [data-palette=ccs] {
    --tone-21170eb3: #1a101fb3;
    --tone-231d18: #1f1823;
    --tone-26190e14: #1c122214;
    --tone-26190e45: #1c122245;
    --tone-2b231c: #261c2b;
    --tone-30211326: #25172c26;
    --tone-35291f: #2d1f35;
    --tone-35291f0c: #2d1f350c;
    --tone-352b22: #2e2235;
    --tone-38271940: #2c1c3540;
    --tone-392619: #2d1d35;
    --tone-39261930: #2d1d3530;
    --tone-3e3024: #35243e;
    --tone-443224: #392444;
    --tone-49321f: #392444;
    --tone-493725: #3c2748;
    --tone-493726: #3c2748;
    --tone-493827: #3d2749;
    --tone-4b3928: #3f284b;
    --tone-4d3422: #3c2748;
    --tone-503b29: #422a4f;
    --tone-51351c0c: #3b26470c;
    --tone-51351c20: #3b264720;
    --tone-52371b08: #3b264708;
    --tone-52371b0b: #3b26470b;
    --tone-52371b12: #3b264712;
    --tone-52371b14: #3b264714;
    --tone-56412c: #472d54;
    --tone-583d2c: #482e56;
    --tone-584322: #422b4f;
    --tone-58432e: #492f57;
    --tone-59422e: #4a2f58;
    --tone-604831: #4f335e;
    --tone-644b32: #523462;
    --tone-645039: #553964;
    --tone-654a32: #523562;
    --tone-66503d: #583d66;
    --tone-695239: #583969;
    --tone-6a4d33: #563766;
    --tone-6b5541: #5c416b;
    --tone-6c4c3040: #55376540;
    --tone-6d5b49: #60496d;
    --tone-6f492f: #563767;
    --tone-705039: #5c3b6e;
    --tone-705435: #5a3a6b;
    --tone-715333: #59396b;
    --tone-754d09: #452c52;
    --tone-755139: #5f3d71;
    --tone-77624b: #684b77;
    --tone-7b4d0c: #4a2f58;
    --tone-805c3c: #66427a;
    --tone-805d3538: #633f7638;
    --tone-81705c: #745c81;
    --tone-875b38: #68437c;
    --tone-8c6240: #6f4785;
    --tone-8c6e4f: #774f8c;
    --tone-92714d: #7a4e91;
    --tone-94734f: #7c4f94;
    --tone-9b7953: #82539b;
    --tone-9e7a52: #83549c;
    --tone-a47a50: #85559f;
    --tone-a5895c: #8b5ca5;
    --tone-a6845b: #8c5ba6;
    --tone-a98962: #9062a9;
    --tone-ac8a604d: #9162aa4d;
    --tone-ad8659: #8e5ea8;
    --tone-ae895b: #9060a9;
    --tone-b17a1d: #704886;
    --tone-b18a5e: #9264ab;
    --tone-b7916c: #9b71b2;
    --tone-b79770: #9d73b4;
    --tone-b8a386: #a786b8;
    --tone-baa48a: #a98aba;
    --tone-bc966f: #9f76b5;
    --tone-bca077: #a37bb8;
    --tone-bd9360: #996db0;
    --tone-bd9a76: #a37bb8;
    --tone-bfa079: #a57eba;
    --tone-c2a180: #a985bd;
    --tone-c3aa87: #ad8ac0;
    --tone-c4ad93: #b393c4;
    --tone-c5aa84: #ad89c0;
    --tone-c6a77f: #ab87be;
    --tone-ceb08e: #b596c6;
    --tone-ceb291: #b798c7;
    --tone-d0b28f: #b798c7;
    --tone-d1bba1: #bfa4ce;
    --tone-d3ac7133: #aa86be33;
    --tone-d5ac79: #af8dc1;
    --tone-d5c4ab: #c6add3;
    --tone-d8b589: #b899c8;
    --tone-deccb5: #ceb9da;
    --tone-dfc297: #c1a7cf;
    --tone-dfcbb3: #ceb9d9;
    --tone-dfd1ba: #d1bddc;
    --tone-e1d0ba: #d2bfdc;
    --tone-e3c49a: #c4abd2;
    --tone-e4d7c6: #d9c8e2;
    --tone-e5bf8f: #c0a5cf;
    --tone-e5d6c2: #d7c6e1;
    --tone-e8dac8: #dccce4;
    --tone-e9b96e: #b392c5;
    --tone-e9d0ac: #cfbbda;
    --tone-e9ddcd: #ded0e6;
    --tone-ead7b9: #d6c4df;
    --tone-ecdfce8c: #e0d3e78c;
    --tone-eddfcc: #e0d2e7;
    --tone-eee2d3: #e3d7ea;
    --tone-eee4d6: #e5d9eb;
    --tone-eee6da: #e6dcec;
    --tone-efd8b8: #d7c6e1;
    --tone-efe1cb: #e0d3e7;
    --tone-f0d4ae: #d3c1dd;
    --tone-f0d8b7: #d7c6e1;
    --tone-f0e2cf: #e2d6e9;
    --tone-f0e6d8eb: #e6dceceb;
    --tone-f3d390: #c7afd4;
    --tone-f4ede2: #ede5f1;
    --tone-f4ede270: #ede5f170;
    --tone-f7e5ca: #e3d7ea;
    --tone-f7e9cb: #e4d8ea;
    --tone-f7f2e9: #f1ebf4;
    --tone-f8f4ed: #f4eff6;
    --tone-fae6b3: #dacae3;
    --tone-faf4e9: #f3edf6;
    --tone-faf6ef: #f5f1f8;
    --tone-faf6efed: #f5f1f8ed;
    --tone-fcfaf6: #faf7fb;
    --tone-ffe8dd: #f0e9f3;
    --tone-fff0d9: #eee6f2;
    --tone-fff0e8: #f5f0f7;
    --tone-fff1e8: #f5f0f7;
    --tone-fff3db24: #efe8f224;
    --tone-fff4e4: #f3edf6;
    --tone-fff5df40: #f0eaf440;
    --tone-fff5dfb3: #f0eaf4b3;
    --tone-fff7e270: #f2ecf570;
    --tone-fff8ed: #f7f3f9;
    --tone-fffdf7: #fbfafc;
  }
  [data-palette=pink] body, [data-palette=ccs] body { --grain: none; }
  [data-palette=ccs] .brand crate-logo { --crate-cap: #4b2360; --crate-rest: #4b2360; --crate-accent: linear-gradient(90deg, #4b2360, #6c7020); }
  [data-palette=ccs][data-color-mode=dark] .brand crate-logo { --crate-cap: #efdcfa; --crate-rest: #efdcfa; --crate-accent: linear-gradient(90deg, #b98ee0, #d4db6a); }
  [data-palette=ccs] :is(button, .button):not(.secondary):not(.quiet):not(.danger) { background: #4b2360; color: #fff; border-color: #8d689e; }
  [data-palette=ccs] .main-nav a[aria-current] { box-shadow: inset 3px 0 #a0a53a; }
  [data-palette=ccs] :focus-visible { outline-color: #a0a53a; }
  .palette-swatches { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
  .palette-swatch { display: inline-flex; align-items: center; gap: 8px; }
  .palette-swatch i { display: inline-block; width: 48px; height: 24px; border: 1px solid #8886; border-radius: 6px; }
  .swatch-cardboard { background: linear-gradient(90deg, #bc966f 50%, #f7f2e9 50%); }
  .swatch-pink { background: linear-gradient(90deg, #a45975 50%, #faeaf0 50%); }
  .swatch-ccs { background: linear-gradient(90deg, #4b2360 50%, #a0a53a 50%); }
}

/* Shipping states retain their meaning across workspace palettes and layouts. */
@media screen and (forced-colors: none) {
  .shipment-status { display: inline-block; padding: 4px 8px; border-radius: 5px; font-weight: 600; color: #4b4035; background: #eee5da; }
  .shipment-status-delivered { color: #20532b; background: #dfefdf; }
  .shipment-status-in_transit, .shipment-status-shipped { color: #174c76; background: #deedfa; }
  .shipment-status-out_for_delivery, .shipment-status-available_for_pickup { color: #07564d; background: #d6f0e9; }
  .shipment-status-packaged, .shipment-status-backordered, .shipment-status-partial { color: #714608; background: #fff0cd; }
  .shipment-status-delayed, .shipment-status-returned { color: #842a27; background: #fbe3df; }
  .shipment-status-cancelled { color: #4c4c4c; background: #e6e6e6; }
  [data-color-mode=dark] .shipment-status { color: #eaded0; background: #493e34; }
  [data-color-mode=dark] .shipment-status-delivered { color: #c8ebce; background: #254a2e; }
  [data-color-mode=dark] .shipment-status-in_transit, [data-color-mode=dark] .shipment-status-shipped { color: #cce8ff; background: #233f59; }
  [data-color-mode=dark] .shipment-status-out_for_delivery, [data-color-mode=dark] .shipment-status-available_for_pickup { color: #bcefe4; background: #214941; }
  [data-color-mode=dark] .shipment-status-packaged, [data-color-mode=dark] .shipment-status-backordered, [data-color-mode=dark] .shipment-status-partial { color: #ffe1a1; background: #56421e; }
  [data-color-mode=dark] .shipment-status-delayed, [data-color-mode=dark] .shipment-status-returned { color: #ffd6ce; background: #652f2c; }
  [data-color-mode=dark] .shipment-status-cancelled { color: #e3e3e3; background: #444; }
}

@media screen {
  .allocation-edit-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
  .project-table .supply-receipt-details { margin: 2px 0 5px; font-size: 11px; }
  .project-table .supply-receipt-details summary { cursor: pointer; }
  .project-table a.shipment-status { text-decoration: underline; text-underline-offset: 3px; }
  .project-floating-heading { position: fixed; top: 0; z-index: 20; overflow: hidden; pointer-events: none; margin: 0; padding: 0; border-radius: 0; }
  .project-floating-heading table { table-layout: fixed; margin: 0; }
}
@media (pointer: coarse) { .allocation-edit-icon { min-width: 44px; min-height: 44px; } }
@media print { .project-floating-heading { display: none !important; } }

/* Dense browsing controls and the account menu, shared by both layouts. */
@media screen {
  .project-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin: 0 0 18px; }
  .project-filters .field { margin: 0; flex: 0 1 18rem; }
  .project-filters .field + .field { flex-basis: 12rem; }
  .project-filters > label { display: flex; align-items: center; gap: 7px; min-height: 36px; margin: 0; }
  .project-filters input:not([type=checkbox]), .project-filters select, .project-filters > button { min-height: 36px; padding: 6px 10px; }
  .project-filters > button { align-self: end; width: auto; }
  .compact-filters:not([open]) { width: fit-content; padding: 8px 12px; }
  .compact-filters summary { cursor: pointer; }
  .shipment-summary { margin: 4px 0 8px; }
  .shipment-summary > small { margin-top: 3px; }
  a.shipment-status { text-decoration: underline; text-underline-offset: 3px; }
  .readiness-status { margin: 3px 0; font-size: 13px; border: 1px solid currentColor; }
  .account-menu { position: relative; }
  .account-menu > summary { display: flex; gap: 8px; align-items: center; cursor: pointer; list-style: none; min-height: 44px; padding: 4px 8px; border-radius: 6px; }
  .account-menu > summary::-webkit-details-marker { display: none; }
  .account-menu .account-identity { padding: 0; border: 0; }
  .account-actions { position: absolute; top: 100%; right: 0; width: 12rem; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--tone-fffaf0, #fffaf0); box-shadow: 0 6px 18px #0002; z-index: 100; }
  .account .account-actions a, .account .account-actions button { display: flex; width: 100%; justify-content: flex-start; min-height: 44px; padding: 8px 12px; color: var(--ink); font-size: 14px; text-decoration: none; border: 0; background: transparent; }
  .account-actions form { margin: 0; }
  .account-actions a:hover, .account-actions button:hover { background: var(--tone-e8dac8, #e8dac8); }
  [data-color-mode=dark] .account-actions { background: var(--tone-2b231c, #2b231c); }
  @media (pointer: coarse) { .project-filters input:not([type=checkbox]), .project-filters select, .project-filters > button { min-height: 44px; } }
  @media (max-width: 600px) { .project-filters .field, .project-filters .field + .field { flex: 1 1 12rem; } .account-actions { right: auto; left: 0; } }
}
@media screen and (forced-colors: none) {
  .shipment-status-dropship_delivered, .shipment-status-received { color: #20532b; background: #dfefdf; }
  .shipment-status-partially_received { color: #714608; background: #fff0cd; }
  [data-color-mode=dark] .shipment-status-dropship_delivered, [data-color-mode=dark] .shipment-status-received { color: #c8ebce; background: #254a2e; }
  [data-color-mode=dark] .shipment-status-partially_received { color: #ffe1a1; background: #56421e; }
}
