/* Project palette tokens. All task and form components inherit these values. */
.theme-light{--primary:#17645b;--primary-dark:#104640;--accent:#2b9384;--ink:#172b2b;--muted:#4c5c5c;--bg:#f7fcfb;--surface:#fdfefe;--line:#aec9c6;--control-line:#74a29d;--task-bg:#e4f5f0;--task-line:#5d928c;--subtle:#edf8f5;--focus:#17645b66;--palette:linear-gradient(to right,#def3ed 0.00% 25.00%,#66a99a 25.00% 50.00%,#2b9384 50.00% 75.00%,#17645b 75.00% 100.00%);}
.theme-tech{--primary:#2157b0;--primary-dark:#173d7b;--accent:#397ad0;--ink:#1a2840;--muted:#4f596c;--bg:#f7faff;--surface:#fdfeff;--line:#b1c4e3;--control-line:#7a9ad0;--task-bg:#e4efff;--task-line:#6489c8;--subtle:#edf4ff;--focus:#2157b066;--palette:linear-gradient(to right,#deebff 0.00% 25.00%,#719ddd 25.00% 50.00%,#397ad0 50.00% 75.00%,#2157b0 75.00% 100.00%);}
.theme-academic{--primary:#62418b;--primary-dark:#452e61;--accent:#8966b8;--ink:#2a2237;--muted:#5b5565;--bg:#fbf9fd;--surface:#fefdff;--line:#c8bcd6;--control-line:#a18db9;--task-bg:#f1e8f8;--task-line:#917aae;--subtle:#f6f0fb;--focus:#62418b66;--palette:linear-gradient(to right,#eee3f7 0.00% 25.00%,#a68aba 25.00% 50.00%,#8966b8 50.00% 75.00%,#62418b 75.00% 100.00%);}
.theme-culture{--primary:#965322;--primary-dark:#693a18;--accent:#ce8a34;--ink:#37271d;--muted:#655951;--bg:#fff9f3;--surface:#fffefc;--line:#dac3b2;--control-line:#c0987a;--task-bg:#ffebd5;--task-line:#b68764;--subtle:#fff2e3;--focus:#96532266;--palette:linear-gradient(to right,#ffe7cc 0.00% 25.00%,#cf9a60 25.00% 50.00%,#ce8a34 50.00% 75.00%,#965322 75.00% 100.00%);}
.theme-blossom{--primary:#b90043;--primary-dark:#82002f;--accent:#009a5b;--ink:#401225;--muted:#6c4957;--bg:#f0faf6;--surface:#fbfefd;--line:#e6a6bd;--control-line:#d5668e;--task-bg:#caefdf;--task-line:#ce4c7b;--subtle:#dbf4ea;--focus:#b9004366;--palette:linear-gradient(to right,#fbcdde 0.00% 10.00%,#f89dba 10.00% 20.00%,#f6708d 20.00% 30.00%,#f02566 30.00% 40.00%,#d90049 40.00% 50.00%,#beebd8 50.00% 60.00%,#9cdcca 60.00% 70.00%,#70ceb2 70.00% 80.00%,#39bca4 80.00% 90.00%,#009a5b 90.00% 100.00%);}
.theme-orange{--primary:#b03900;--primary-dark:#7b2800;--accent:#ff7900;--ink:#3d2014;--muted:#6a534a;--bg:#fef5e4;--surface:#fffcf8;--line:#e3baa6;--control-line:#d08866;--task-bg:#fcdc9f;--task-line:#c8744c;--subtle:#fde7bf;--focus:#b0390066;--palette:linear-gradient(to right,#fae9a3 0.00% 12.50%,#fbd48a 12.50% 25.00%,#fcbd6d 25.00% 37.50%,#fe9c4a 37.50% 50.00%,#ff7900 50.00% 62.50%,#ff4c00 62.50% 75.00%,#ff0600 75.00% 87.50%,#ff0000 87.50% 100.00%);}
.theme-coast{--primary:#294558;--primary-dark:#1d303e;--accent:#0ca295;--ink:#1c232a;--muted:#50565b;--bg:#fdf2ea;--surface:#fffcf9;--line:#b4bec5;--control-line:#7f8f9b;--task-bg:#f8d2b3;--task-line:#697d8a;--subtle:#fbe1cc;--focus:#29455866;--palette:linear-gradient(to right,#f7c8a2 0.00% 20.00%,#f1a40e 20.00% 40.00%,#e86900 40.00% 60.00%,#0ca295 60.00% 80.00%,#294558 80.00% 100.00%);}
.theme-sunshine{--primary:#806000;--primary-dark:#5a4300;--accent:#f96466;--ink:#312a14;--muted:#605b4a;--bg:#fdfee8;--surface:#fffff9;--line:#d3c7a6;--control-line:#b3a066;--task-bg:#f8fbae;--task-line:#a6904c;--subtle:#fbfcc9;--focus:#80600066;--palette:linear-gradient(to right,#f7fa9c 0.00% 10.00%,#f4f54a 10.00% 20.00%,#f4f001 20.00% 30.00%,#f5e400 30.00% 40.00%,#f1cf00 40.00% 50.00%,#f5aa00 50.00% 60.00%,#f2c400 60.00% 70.00%,#f88100 70.00% 80.00%,#f96466 80.00% 90.00%,#f6725f 90.00% 100.00%);}
.theme-cream{--primary:#875500;--primary-dark:#5e3b00;--accent:#fba100;--ink:#332714;--muted:#62594a;--bg:#fefbee;--surface:#fffefa;--line:#d5c4a6;--control-line:#b79966;--task-bg:#fbf2c2;--task-line:#ab884c;--subtle:#fcf6d6;--focus:#87550066;--palette:linear-gradient(to right,#fcf7db 0.00% 16.67%,#faefb4 16.67% 33.33%,#f9e581 33.33% 50.00%,#f9d248 50.00% 66.67%,#fabc00 66.67% 83.33%,#fba100 83.33% 100.00%);}
.theme-pineapple{--primary:#683f00;--primary-dark:#492c00;--accent:#d08c00;--ink:#2b2214;--muted:#5c554a;--bg:#fbfbc8;--surface:#fefef1;--line:#cabca6;--control-line:#a48c66;--task-bg:#f1f03b;--task-line:#95794c;--subtle:#f6f57c;--focus:#683f0066;--palette:linear-gradient(to right,#eeed10 0.00% 12.50%,#ebd900 12.50% 25.00%,#eabb00 25.00% 37.50%,#e1a100 37.50% 50.00%,#d08c00 50.00% 62.50%,#ac7900 62.50% 75.00%,#8b5b00 75.00% 87.50%,#683f00 87.50% 100.00%);}
.theme-muted{--primary:#7f4a43;--primary-dark:#59342f;--accent:#a5d3cc;--ink:#312425;--muted:#605657;--bg:#f1eee8;--surface:#fbfaf9;--line:#d2c0bd;--control-line:#b2928e;--task-bg:#cdc1ad;--task-line:#a5807b;--subtle:#ddd5c8;--focus:#7f4a4366;--palette:linear-gradient(to right,#a5d3cc 0.00% 10.00%,#b2d7d3 10.00% 20.00%,#d1a79e 20.00% 30.00%,#e3b895 30.00% 40.00%,#f2ecd9 40.00% 50.00%,#c2b39b 50.00% 60.00%,#9d5f50 60.00% 70.00%,#7f4a43 70.00% 80.00%,#4f3a37 80.00% 90.00%,#2e2725 90.00% 100.00%);}
.theme-softpink{--primary:#843b80;--primary-dark:#5c295a;--accent:#f55c77;--ink:#322134;--muted:#615463;--bg:#fcf1f5;--surface:#fefbfc;--line:#d4bad3;--control-line:#b589b3;--task-bg:#f6cddc;--task-line:#a976a6;--subtle:#f9dde7;--focus:#843b8066;--palette:linear-gradient(to right,#f4c2d4 0.00% 20.00%,#f69bb1 20.00% 40.00%,#f55c77 40.00% 60.00%,#bc4a87 60.00% 80.00%,#843b80 80.00% 100.00%);}
.theme-aqua{--primary:#9d5f50;--primary-dark:#6e4238;--accent:#74bcb8;--ink:#382a28;--muted:#665b59;--bg:#eaf5f3;--surface:#fafcfc;--line:#ddc7c2;--control-line:#c49f96;--task-bg:#b5dbd5;--task-line:#ba8f84;--subtle:#cee7e3;--focus:#9d5f5066;--palette:linear-gradient(to right,#f2ecd9 0.00% 16.67%,#a5d3cc 16.67% 33.33%,#74bcb8 33.33% 50.00%,#d89694 50.00% 66.67%,#da7d62 66.67% 83.33%,#9d5f50 83.33% 100.00%);}
.theme-purple{--primary:#521b64;--primary-dark:#391346;--accent:#83388f;--ink:#26192d;--muted:#584e5d;--bg:#efe5f8;--surface:#fbf8fd;--line:#c2afc9;--control-line:#9776a2;--task-bg:#c7a4e6;--task-line:#865f92;--subtle:#dac2ee;--focus:#521b6466;--palette:linear-gradient(to right,#e0e0e0 0.00% 14.29%,#bb90e1 14.29% 28.57%,#83388f 28.57% 42.86%,#521b64 42.86% 57.14%,#320e43 57.14% 71.43%,#1f052d 71.43% 85.71%,#000000 85.71% 100.00%);}
.theme-autumn{--primary:#b73e00;--primary-dark:#802b00;--accent:#e56c00;--ink:#3f2214;--muted:#6b554a;--bg:#fbf3e5;--surface:#fefcf8;--line:#e6bba6;--control-line:#d48b66;--task-bg:#efd5a2;--task-line:#cd784c;--subtle:#f5e3c1;--focus:#b73e0066;--palette:linear-gradient(to right,#e6e6c1 0.00% 20.00%,#eccc8e 20.00% 40.00%,#f2aa00 40.00% 60.00%,#e56c00 60.00% 80.00%,#b73e00 80.00% 100.00%);}

/* Compact color selection. Each option uses its own palette, including the current choice. */
.project-theme-row .theme-picker{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.project-theme-row .theme-choice{margin:0;padding:6px 9px;font-size:13px;line-height:1.4;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-top:3px solid var(--primary)!important}
.theme-choice .theme-swatch{height:18px;margin:5px 0 0;background:var(--palette)}
.theme-choice.selected,.theme-choice:has(input:checked){outline:2px solid var(--primary);outline-offset:1px;background:var(--subtle)}
@media(max-width:800px){.project-theme-row .theme-picker{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:500px){.project-theme-row .theme-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Scope a whole project page once; the website's general management pages retain their default style. */
body.project-themed{color:var(--ink);background:var(--bg);min-height:100vh}
.project-themed h1,.project-themed h2,.project-themed h3{color:var(--primary-dark)}
.project-themed .site-header,.project-themed .card,.project-themed .form-section,.project-themed .event-card,.project-themed .work-item-dialog{background:var(--surface);border-color:var(--line)}
.project-themed input,.project-themed select,.project-themed textarea{border-color:var(--control-line);background:var(--surface);color:var(--ink)}
.project-themed input:focus,.project-themed select:focus,.project-themed textarea:focus,.project-themed button:focus-visible,.project-themed a:focus-visible{outline-color:var(--focus)}
.project-themed .subtle,.project-themed .badge:not(.danger),.project-themed .gantt-date-chip{background:var(--subtle);color:var(--primary)}
.project-themed .subtle:hover{background:var(--task-bg);color:var(--primary-dark)}
.project-themed .project-tasks{background:var(--surface);border-color:var(--line)}
.project-themed .project-task-card{background:var(--task-bg);border-color:var(--task-line);border-top-color:var(--primary)}
.project-themed .project-task-card .badge{background:var(--primary);color:#fff}
.project-themed .project-task-card .share-panel{background:var(--surface);border-color:var(--task-line)}
.project-themed .builder-section{background:var(--surface);border-color:var(--line)}
.project-themed .builder-section.active-section{border-top-color:var(--primary)}
.project-themed .builder-field{background:var(--subtle)}
.project-themed .builder-field:hover,.project-themed .builder-field.selected{border-color:var(--primary)}
.project-themed .builder-field.selected{background:var(--task-bg);box-shadow:0 0 0 2px var(--focus)}
.project-themed .builder-actions{background:var(--surface);border-color:var(--line)}
.project-themed .work-item-option,.project-themed .share-panel,.project-themed .gantt-header,.project-themed .session-row{background:var(--subtle);border-color:var(--line);color:var(--ink)}
.project-themed .work-item-option:hover{background:var(--task-bg);color:var(--primary-dark)}
.project-themed .channel-cards article,.project-themed .sms-task-row,.project-themed th{background:var(--surface);border-color:var(--line)}
.project-themed td,.project-themed th,.project-themed dt,.project-themed dd,.project-themed .gantt-chart,.project-themed .gantt-row,.project-themed .gantt-item-label{border-color:var(--line)}
.project-themed .gantt-track{background-image:linear-gradient(to right,var(--line) 1px,transparent 1px)}
.project-themed .gantt-dot{background:var(--primary);box-shadow:0 0 0 1px var(--primary-dark)}
.project-themed .gantt-bar{background:var(--primary)}
.project-themed footer{background:var(--subtle);border-color:var(--line);color:var(--muted)}

.project-themed .sms-content,.project-themed .sms-message,.project-themed .reference{background:var(--subtle);border-color:var(--line);color:var(--ink)}
.project-themed .eyebrow{color:var(--primary)}
.project-themed .auth-card{background:var(--surface);border-color:var(--line)}
