/* Shared layout and effects; only materials and contrast change with appearance. */
.theme-switch{display:flex;gap:8px;margin:8px 0 10px}.theme-switch button{flex:1;min-height:44px}
.theme-switch [aria-pressed=true]{border-color:var(--accent);background:rgb(var(--tone)/.16);box-shadow:inset 0 1px #ffffff44,0 0 20px rgb(var(--tone)/.12)}
.appearance-label{display:block;margin-top:20px;font-weight:600}.appearance-hint{display:block;margin-bottom:18px}
#new-messages{align-self:center;flex-shrink:0;font-size:11px;margin:5px;min-height:30px}
.chat[data-audience=requester]:has([data-channel=public].active) #channel-label:before{content:'◉ Команда · '}
.upload-status{width:100%;margin-block:8px}.upload-status button{margin:6px}

/* Colour lives behind the glass: translucent panes borrow the background beneath. */
html[data-theme=dark]{color-scheme:dark;--ink:#f3f6f8;--muted:#bccad2;--line:#dbe7ef24;--accent:#d0dce2;--glass-fill:linear-gradient(135deg,#edf6ff18,#edf6ff09 55%,#edf6ff10)}
html[data-theme=dark] body{background:#140e26;isolation:isolate}
html[data-theme=dark] .ambient{z-index:-2;background:radial-gradient(ellipse at 53% 48%,#090613ed 0%,#0c081bc9 32%,#100b2159 53%,transparent 77%),radial-gradient(ellipse at 0% 0%,#eee7ff75,transparent 38%),radial-gradient(ellipse at 0% 0%,#a78bfa99,transparent 60%),radial-gradient(ellipse at 100% 100%,#7c3aedbb,transparent 65%)}
html[data-theme=dark] .glass{background:radial-gradient(230px at var(--shine-x,-250px) var(--shine-y,-250px),rgb(var(--tone)/.1),transparent),var(--glass-fill);backdrop-filter:blur(12px);border-color:#e0eaf02b;border-top-color:#edf5fa65;border-left-color:#edf5fa42;box-shadow:inset 0 1px #ffffff0c,inset 0 -16px 26px -25px #e2edfaaa,0 10px 28px #00000018}
html[data-theme=dark] .column{background:#e2efff02;border-color:#e0e8ee12;box-shadow:none}
html[data-theme=dark] .card{background:radial-gradient(180px at var(--mx,-200px) var(--my,-200px),rgb(var(--tone)/.13),transparent 85%),var(--glass-fill);backdrop-filter:blur(10px);border-color:rgb(var(--tone)/.27);border-top-color:rgb(var(--tone)/.6);border-left-color:rgb(var(--tone)/.4);box-shadow:inset 0 1px #ffffff0d,inset 0 -17px 28px -25px rgb(var(--tone)/.6),0 7px 20px #00000018}
html[data-theme=dark] .card:hover,html[data-theme=dark] .card:focus-visible{border-color:rgb(var(--tone)/.7);box-shadow:0 0 30px rgb(var(--tone)/.18),inset 0 1px #ffffff50,inset 0 -18px 30px -24px rgb(var(--tone)/.75)}
html[data-theme=dark] :is(.workspace-card,.metric):hover{border-color:rgb(var(--tone)/.5);box-shadow:0 0 30px rgb(var(--tone)/.13),inset 0 1px #ffffff50,inset 0 -18px 30px -25px rgb(var(--tone)/.65)}
html[data-theme=dark] :is(input,textarea,select){background-color:#060e183d;border-color:#b8c6d133}
html[data-theme=dark] select option{background:#18232c;color:var(--ink)}
html[data-theme=dark] :is(label,.code,footer,.column-empty:after){color:var(--muted)}
html[data-theme=dark] :is(.card h3,.workspace-card h3,.metric b){color:var(--ink)}
html[data-theme=dark] :is(#detail,#new,dialog){background:linear-gradient(135deg,#d8e9f40c,#d8e9f402 65%),#170f2ab8;backdrop-filter:blur(24px);border-color:#e0eaf035;border-top-color:#edf5fa65;border-left-color:#edf5fa42;box-shadow:inset 0 1px #ffffff14,inset 0 -18px 30px -27px #e2edfaaa,0 24px 65px #0005}
html[data-theme=dark] body.task-open:before,html[data-theme=dark] dialog::backdrop{background:#100b1c4d;backdrop-filter:blur(6px)}
html[data-theme=dark] :is(#detail .detail-head,.mobile-tabs,#message-form){background:#160e263d;backdrop-filter:blur(12px)}
html[data-theme=dark] .chat:has([data-channel=public].active){background:#4aaf9510}
html[data-theme=dark] .chat:has([data-channel=internal].active){background:#d5a75416}
html[data-theme=dark] .bubble{background:linear-gradient(125deg,#ffffff09,#ffffff03);border-color:#e4edf124}
html[data-theme=dark] :is(.management-panel,.operations-panel,.contact){background:#ffffff04}
@media(max-width:700px){html[data-theme=dark] .task-scopes{background:linear-gradient(135deg,#edf6ff0d,#edf6ff03),#170f2ab3;backdrop-filter:blur(18px)}}

/* Pearl glass. Darker accent ink keeps priorities and systems readable in daylight. */
html[data-theme=light]{color-scheme:light;--ink:#273438;--muted:#596b72;--accent:#465e67;--line:#516c792b;--tone:82 108 119}
html[data-theme=light] body{background:#edf0f0}
html[data-theme=light] .ambient{background:radial-gradient(ellipse at 8% 0%,#ffffffec,transparent 60%),radial-gradient(ellipse at 95% 70%,#b9cfc244,transparent 50%)}
html[data-theme=light] [data-tone=critical]{--tone:177 47 71}
html[data-theme=light] [data-tone=high],html[data-theme=light] [data-tone=amber]{--tone:137 85 19}
html[data-theme=light] [data-tone=normal],html[data-theme=light] [data-tone=lilac]{--tone:82 108 119}
html[data-theme=light] [data-tone=optional],html[data-theme=light] [data-tone=mint]{--tone:40 112 85}
html[data-theme=light] [data-tone=rose]{--tone:161 60 95}
html[data-theme=light] :is(.glass,.column,.card,dialog){border-color:#607d8b30;box-shadow:inset 0 1px #ffffff,0 10px 30px #4960700b,inset 0 -16px 24px -26px #718d9b88}
html[data-theme=light] :is(.sidebar,.toolbar,.task-insights,.task-scopes,.workspace-card,.metric){background:radial-gradient(230px at var(--shine-x,-250px) var(--shine-y,-250px),rgb(var(--tone)/.09),transparent),linear-gradient(135deg,#ffffffdc,#ffffff70);backdrop-filter:blur(16px)}
html[data-theme=light] .column{background:#d5dfe335}
html[data-theme=light] .card{background:radial-gradient(180px at var(--mx,-200px) var(--my,-200px),rgb(var(--tone)/.09),transparent 85%),linear-gradient(145deg,#fffffff5,#ffffffa8);border-color:rgb(var(--tone)/.27)}
html[data-theme=light] :is(.card,.workspace-card,.metric):hover{border-color:rgb(var(--tone)/.5);box-shadow:0 0 25px rgb(var(--tone)/.13),inset 0 1px #ffffff}
html[data-theme=light] :is(button,input,textarea,select){color:var(--ink);border-color:var(--line)}
html[data-theme=light] button{background-color:#ffffff40}
html[data-theme=light] button:hover{background-color:rgb(var(--tone)/.08)}
html[data-theme=light] :is(input,textarea,select,.compose-block textarea){background:#ffffffb8}
html[data-theme=light] :is(input,textarea)::placeholder{color:#64777e;opacity:1}
html[data-theme=light] .primary{background:linear-gradient(120deg,#485e67,#304b54);color:#fff;border-color:#304b54;box-shadow:0 0 20px #4b7c8b20}
html[data-theme=light] button.primary:hover{background:linear-gradient(120deg,#526f78,#3a5a64);color:#fff;box-shadow:0 0 25px #4b7c8b30}
html[data-theme=light] .active{background:#526e7b15!important;border-color:#526e7b55!important;color:#263e48}
html[data-theme=light] nav button.active{box-shadow:inset 2px 0 #627d86,0 0 20px #647f8b0c}
html[data-theme=light] :is(.logo .radar-word,.settings-grid span){color:var(--ink)}
html[data-theme=light] :is(label,summary,.section summary,.section p,.workspace-card p,.management-panel h3,.operations-panel h3,.acceptance-panel h3,.acceptance-settings summary,.message-text,.bubble,.attached-file,.message-actions button,.sidebar-status small,footer,.code,.unread-count,.estimate-chip,.column-empty:after,#custom-progress,#checklist-progress){color:var(--muted)}
html[data-theme=light] :is(.message-text,.bubble,.section p){color:#344b54}
html[data-theme=light] .avatar{background:#607e8b15;border-color:var(--line);color:#39535f}
html[data-theme=light] :is(.toolbar .views,.count,.summary-bar i,.load-track){background:#647f8b10}
html[data-theme=light] .summary-bar i b{background:#718e99}
html[data-theme=light] :is(.card-foot,.section,.task-content>.section:has(>h3),.attention-item,.requester-row,.sidebar-context){border-color:var(--line)}
html[data-theme=light] :is(.management-panel,.operations-panel,.problem-example,.similar-panel){background:#ffffff55;border-color:var(--line)}
html[data-theme=light] :is(.badge,.status-chip){color:#48616d!important;background:#647f8b0c!important;border-color:#647f8b45!important}
html[data-theme=light] .priority-chip{color:rgb(var(--tone))!important;background:rgb(var(--tone)/.08)!important;border-color:rgb(var(--tone)/.4)!important}
html[data-theme=light] .card .badge:not(.system-badge){color:rgb(var(--tone))!important;background:rgb(var(--tone)/.06)!important;border-color:rgb(var(--tone)/.25)!important}
html[data-theme=light] .metric{--tone:82 108 119}html[data-theme=light] .metric[data-metric=work]{--tone:40 112 85}html[data-theme=light] .metric[data-metric=review]{--tone:137 85 19}
html[data-theme=light] .assignee-chip{color:#344b54!important;background:#ffffffc0!important;border-color:#647f8b35!important}
html[data-theme=light] .system-badge[data-system=one-c]{color:#805311!important;background:#cf9a2018!important;border-color:#aa7b3150!important}
html[data-theme=light] .system-badge[data-system=site]{color:#176b54!important;background:#289c7512!important;border-color:#39896c50!important}
html[data-theme=light] .system-badge[data-system=tsd]{color:#9b3a5d!important;background:#bb4f7910!important;border-color:#ac4a6d50!important}
html[data-theme=light] .system-badge[data-system=other]{color:#496570!important;background:#708b9510!important;border-color:#647f8b50!important}
html[data-theme=light] :is(.notice,.clarification,.attention-item>small){color:#795519;background-color:#dba83912;border-color:#bc91333d}
html[data-theme=light] .critical-alert{background:#c4455c0a;border-color:#b12f473d;box-shadow:0 0 26px #b12f4710}
html[data-theme=light] .critical-alert h3{color:#a42c43}
html[data-theme=light] .column[data-stage="В работе"] .col-head{color:#286c55}
html[data-theme=light] .column[data-stage="Проверка"] .col-head{color:#80591c}
html[data-theme=light] :is(#detail,#new,#login-dialog,#password-dialog,dialog){background:linear-gradient(135deg,#f9fbfb,#edf2f2 65%);border-color:rgb(var(--tone)/.3);box-shadow:0 25px 90px #293d4930,inset 0 1px white}
html[data-theme=light] :is(#detail .detail-head,.mobile-tabs){background:#f4f7f7}
html[data-theme=light] #new .detail-head{background:transparent}
html[data-theme=light] body.task-open:before,html[data-theme=light] dialog::backdrop{background:#405b6950;backdrop-filter:blur(6px)}
html[data-theme=light] .chat:has([data-channel=public].active){background:#e8f1ee}
html[data-theme=light] .chat:has([data-channel=internal].active){background:#f3eddf}
html[data-theme=light] .chat-tabs{background:#ffffff40}
html[data-theme=light] .bubble{background:#ffffffb3;border-color:#607d8b25}
html[data-theme=light] #message-form{background:#f7f9f8;border-color:var(--line)}
html[data-theme=light] .chat:has([data-channel=public].active) #channel-label{color:#226a55}
html[data-theme=light] .chat:has([data-channel=internal].active) #channel-label{color:#825814}
html[data-theme=light] .mention-link{color:#315f70;background:#577b8e13}
html[data-theme=light] :is(.bubble blockquote,.reply-preview){border-color:#78949f;background:#6684930a}
html[data-theme=light] .completed{color:#47725b;text-decoration-color:#47725b55}
html[data-theme=light] #save-status{color:#37704e}
html[data-theme=light] #toast{background:#f9fcfc;border-color:#718c9966;color:#344b54;box-shadow:0 12px 40px #30485226}
html[data-theme=light] .snow-burst i{background:#fff;box-shadow:0 0 2px #5c7e9588,0 0 9px #91b5c488}
html[data-theme=light] :is(.task-content,#messages){scrollbar-color:#607d8b50 transparent}
@media(max-width:700px){html[data-theme=light] .task-scopes{background:#f1f5f4f5;backdrop-filter:blur(16px)}}
/* Brand accents identify navigation and the primary creation action, not task priority. */
html[data-theme=dark] .glass{border-color:#dce6f043;border-top-color:#edf5fa80;border-left-color:#edf5fa60}
html[data-theme=dark] .card{border-color:rgb(var(--tone)/.43);border-top-color:rgb(var(--tone)/.75);border-left-color:rgb(var(--tone)/.55)}
html[data-theme=dark] .column{border-color:#dce6f02b}
html[data-theme=dark] :is(input,textarea,select){border-color:#c8d4df50}
html[data-theme=dark] :is(.bubble,.badge){border-color:#dce6f040}
html[data-theme=dark] .status-chip{border-color:#c8d4df66!important}
html[data-theme=dark] .assignee-chip{border-color:#dce6f04d!important}
html[data-theme=light] :is(.glass,.column,.card,dialog){border-color:#607d8b50}
html[data-theme=light] .card{border-color:rgb(var(--tone)/.4)}
html[data-theme] #task-scopes button{border-color:rgb(var(--scope-tone)/.4)}

/* Brand accents identify navigation and the primary creation action, not task priority. */
html[data-theme] #contact-card{width:min(440px,calc(100vw - 28px));max-height:88dvh;padding:0;border-radius:20px;overflow:auto}
.contact-card-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:20px 22px;border-bottom:1px solid var(--line)}.contact-card-head h2{font-size:22px;overflow-wrap:anywhere;margin:4px 0 0}.contact-card-close{flex:0 0 40px;min-height:40px;padding:8px}.contact-card-body{padding:0 22px 20px}.contact-role{font-size:12px}
.contact-field,.contact-schedule,.contact-skills{padding:15px 0;border-bottom:1px solid var(--line)}.contact-card-body h3{font-size:12px;font-weight:600;margin:0 0 9px;color:var(--muted)}.contact-value-row{display:flex;align-items:center;gap:8px}.contact-value-row input{width:100%;min-width:0;font-size:15px;font-variant-numeric:tabular-nums}.contact-copy{min-height:42px;font-size:12px;flex-shrink:0}.contact-empty{margin:0;font-size:13px}.contact-call{display:inline-flex;align-items:center;min-height:36px;color:#b4db58;margin-top:6px;font-size:13px;text-underline-offset:4px}.contact-schedule dl{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px 12px;font-size:13px;margin:0}.contact-schedule dt{color:var(--muted)}.contact-schedule dd{margin:0;overflow-wrap:anywhere}.contact-skills p{margin:0;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.contact-copy-status{min-height:20px;font-size:12px;margin:14px 0 0}
html[data-theme] .message-author-contact{display:inline;padding:0;border:0;border-radius:3px;background:transparent;box-shadow:none;font-weight:700;text-align:left;min-width:0;overflow-wrap:anywhere;line-height:inherit}html[data-theme] .message-author-contact:hover{text-decoration:underline;text-underline-offset:3px}
html[data-theme=light] .contact-call{color:#386514}
@media(max-width:420px){.contact-card-head{padding:17px}.contact-card-body{padding:0 17px 16px}.contact-schedule dl{grid-template-columns:95px minmax(0,1fr)}.contact-copy{padding:9px}.contact-value-row input{font-size:14px}}

/* Brand accents identify navigation and the primary creation action, not task priority. */
html[data-theme] :is(#create,#new-form>button.primary){background:linear-gradient(125deg,#b4db58,#a2ce3b);color:#18220c;border-color:#bbdf6e;font-weight:700;box-shadow:0 0 24px #a2ce3b24,inset 0 1px #e8f6c580}
html[data-theme] :is(#create,#new-form>button.primary):hover{background:linear-gradient(125deg,#c2e66a,#acd844);color:#18220c;border-color:#d2ed9a;box-shadow:0 0 30px #a2ce3b45,inset 0 1px #f3ffdcaa}
#task-scopes [data-scope=all]{--scope-tone:167 139 250}
#task-scopes [data-scope=mine]{--scope-tone:89 195 229}
#task-scopes [data-scope=moderation]{--scope-tone:251 162 104}
#task-scopes [data-scope=testing]{--scope-tone:99 211 175}
#task-scopes [data-scope=archive]{--scope-tone:168 184 195}
html[data-theme] #task-scopes button{display:inline-flex;align-items:center;gap:8px;min-height:38px;background:rgb(var(--scope-tone)/.21);border-color:rgb(var(--scope-tone)/.4);color:var(--ink);box-shadow:none}
#task-scopes button:before{content:'';width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:rgb(var(--scope-tone));opacity:.85}
html[data-theme] #task-scopes button:hover{background:rgb(var(--scope-tone)/.21);border-color:rgb(var(--scope-tone)/.55);box-shadow:0 0 18px rgb(var(--scope-tone)/.12)}
html[data-theme] #task-scopes button.active{background:linear-gradient(135deg,rgb(var(--scope-tone)/.38),rgb(var(--scope-tone)/.23))!important;border-color:rgb(var(--scope-tone)/.8)!important;color:var(--ink);font-weight:700;box-shadow:inset 0 -2px rgb(var(--scope-tone)/.9),0 0 20px rgb(var(--scope-tone)/.14)}
html[data-theme] #my-relations{align-items:center;gap:6px;padding:0 10px 4px;--relation-tone:89 195 229}
.relation-caption{font-size:11px;color:var(--muted);margin-right:8px}
html[data-theme] #my-relations button{background:rgb(var(--relation-tone)/.055);border-color:transparent;border-radius:7px;box-shadow:none;color:var(--muted);padding:8px 11px}
html[data-theme] #my-relations button:hover{background:rgb(var(--relation-tone)/.08);color:var(--ink)}
html[data-theme] #my-relations button.active{background:rgb(var(--relation-tone)/.19)!important;border-color:transparent!important;box-shadow:inset 0 -2px rgb(var(--relation-tone));color:var(--ink);font-weight:700}
html[data-theme=light] #task-scopes [data-scope=all]{--scope-tone:124 58 237}
html[data-theme=light] #task-scopes [data-scope=mine]{--scope-tone:19 132 166}
html[data-theme=light] #task-scopes [data-scope=moderation]{--scope-tone:181 98 31}
html[data-theme=light] #task-scopes [data-scope=testing]{--scope-tone:22 139 111}
html[data-theme=light] #task-scopes [data-scope=archive]{--scope-tone:97 115 124}
html[data-theme=light] #task-scopes button.active{background:rgb(var(--scope-tone)/.20)!important;border-color:rgb(var(--scope-tone)/.6)!important;box-shadow:inset 0 -2px rgb(var(--scope-tone)),0 3px 10px rgb(var(--scope-tone)/.08)}
html[data-theme=light] #my-relations{--relation-tone:19 132 166}
@media(max-width:700px){.relation-caption{flex-basis:100%;margin:0 0 1px}html[data-theme] #my-relations{padding-inline:3px}html[data-theme] #my-relations button{font-size:11px;padding:8px 9px}}
@media(prefers-reduced-motion:reduce){.press-glow,.message-arrived{animation:none!important}}

/* Detailed statistics keeps present workload separate from dated events. */
.stats-header h2{margin-top:0}.stats-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.stats-tabs [aria-pressed=true]{border-color:#a78bfa99;background:#a78bfa22;font-weight:700;box-shadow:inset 0 -2px #a78bfa}
.stats-filters{display:flex;flex-wrap:wrap;gap:12px;padding:16px;align-items:end}.stats-filters label{flex:1 1 170px;font-size:12px;margin:0}.stats-filters select{width:100%}#stats-date-range{display:flex;flex-wrap:wrap;gap:10px;width:100%;align-items:end}#stats-date-range[hidden]{display:none}#stats-error{margin:0;color:#ef9bab;font-size:12px}.stats-explanation{font-size:12px;line-height:1.7;margin:16px 0}.stats-coverage{font-size:12px;color:var(--muted);margin:12px 0 20px}.stats-coverage p{margin:6px 0 0}.stats-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:18px;align-items:start}.stats-person h3{font-size:19px;margin:0 0 15px}.stats-person h4{font-size:11px;font-weight:500;color:var(--muted);margin:18px 0 8px}.stats-person h4:empty{display:none}.stats-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stats-metric{text-align:left;display:grid;gap:5px;align-content:start;padding:12px;min-height:80px}.stats-metric b{font-size:24px;line-height:1}.stats-metric span{font-size:11px;color:var(--muted);line-height:1.4}.stats-hours,.stats-rate{font-size:12px;line-height:1.6}.stats-person details{font-size:12px}.stats-drilldown{margin-top:18px;padding:18px;scroll-margin-top:16px}.stats-record-meta{display:block;font-size:11px;color:var(--muted);margin-top:5px}.stats-record{gap:12px}.stats-record>span:first-child{min-width:0}.stats-record>span:last-child{flex-shrink:0}.stats-metric[data-stats-metric=overdue],.stats-metric[data-stats-metric=unchecked]{border-color:#e5ae4966}.stats-metric[data-stats-metric=onTime],.stats-metric[data-stats-metric=accepted]{border-color:#4fc5a866}
html[data-theme=light] #stats-error{color:#a42c43}html[data-theme=light] .stats-tabs [aria-pressed=true]{background:#7c3aed12;border-color:#7c3aed77;box-shadow:inset 0 -2px #7c3aed}
@media(max-width:700px){.stats-filters{padding:13px}.stats-filters label{flex-basis:100%}.stats-person{padding:16px}.stats-people{grid-template-columns:1fr}}

/* Slightly richer pane fills; priority and system colours retain their meaning. */
html[data-theme=dark] .card{background-color:rgb(var(--tone)/.045)}
html[data-theme=dark] .status-chip{background:#71808c2c!important}
html[data-theme=dark] .priority-chip{background:rgb(var(--tone)/.22)!important}
html[data-theme=dark] .assignee-chip{background:#ffffff12!important}
html[data-theme=dark] .system-badge[data-system=one-c]{background:#e5ae4930!important}
html[data-theme=dark] .system-badge[data-system=site]{background:#4fc5a830!important}
html[data-theme=dark] .system-badge[data-system=tsd]{background:#df759830!important}
html[data-theme=dark] .system-badge[data-system=other]{background:#aab9c32b!important}
html[data-theme=light] .system-badge[data-system=one-c]{background:#cf9a2028!important}
html[data-theme=light] .system-badge[data-system=site]{background:#289c7524!important}
html[data-theme=light] .system-badge[data-system=tsd]{background:#bb4f7922!important}
html[data-theme=light] .system-badge[data-system=other]{background:#708b9522!important}

/* Guided intake: concise labels, examples beside the field, and recoverable sending. */
#new-form>p:first-of-type{font-size:13px;line-height:1.6;color:var(--muted)}
#new-form label{margin-bottom:18px;gap:6px}
#new-form label>small{font-size:11px;line-height:1.55;color:var(--muted)}
#new-form textarea{min-height:108px;line-height:1.6}
.intake-completeness{padding:10px 12px;border-left:2px solid #a78bfa99;background:#a78bfa12;border-radius:0 8px 8px 0;font-size:11px;color:var(--muted);margin:14px 0 20px}
.intake-error{padding:12px;border:1px solid #e5ae4966;background:#e5ae4918;border-radius:9px;line-height:1.6;font-size:12px;overflow-wrap:anywhere}
#new-form .intake-field-error{color:#f3be87}#new-form [aria-invalid=true]{border-color:#e5ae49}
.intake-file-list>div{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:8px 0;border-top:1px solid var(--line);font-size:12px}
.intake-file-list span{min-width:0;overflow-wrap:anywhere}.intake-file-list button{flex-shrink:0;font-size:11px;min-height:32px}
.intake-draft-note,.intake-next{display:block;font-size:11px;line-height:1.6;color:var(--muted);margin:8px 0 18px}
.intake-next{margin-bottom:0}#new-form [inert]{opacity:.7}
#new .similar-panel>small{display:block;line-height:1.5}
#new .similar-panel.no-matches{background:transparent;border:0;box-shadow:none;backdrop-filter:none;padding:0;margin:0 0 16px}
html[data-theme=light] #new-form .intake-field-error{color:#8a4111}
@media(max-width:700px){#new{padding:18px}#new-form>.primary{width:100%;min-height:44px}#new-form label{margin-bottom:16px}}

/* Account access: compact overview, with consequential actions inside an editor. */
.accounts-page{max-width:1200px;margin:auto}.account-page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.account-page-head h2{margin:0 0 8px}.account-page-head p{color:var(--muted);font-size:13px;line-height:1.6;margin:0}.account-page-head>button{flex-shrink:0}
.account-create{padding:16px 20px;margin-bottom:20px}.account-create>summary{font-weight:600}.account-create form{max-width:620px;margin:20px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:16px}.account-create form>small,.account-create form>button{grid-column:1/-1}.accounts-page label{display:flex;flex-direction:column;gap:6px;font-size:12px}.accounts-page input,.accounts-page select{width:100%;min-width:0}.account-filters{display:flex;align-items:end;gap:14px;margin:20px 0 14px}.account-filters>label:first-child{flex:1}.account-filters>label{min-width:0}.account-filters>button{min-height:42px}
.accounts-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:14px;align-items:start}.account-card{padding:20px;min-width:0}.account-card-head{display:flex;justify-content:space-between;gap:12px;align-items:start}.account-card-head>div{min-width:0}.account-card h3{font-size:16px;margin:0 0 5px;overflow-wrap:anywhere}.account-card h3 small{font-size:10px;color:var(--muted);white-space:nowrap;font-weight:400}.account-login{color:var(--muted);overflow-wrap:anywhere}.account-state{display:inline-flex;align-items:center;justify-content:center;padding:6px 9px;border-radius:8px;font-size:10px;border:1px solid;white-space:nowrap;flex-shrink:0}.account-state.is-active{color:#91ddc7;background:#4fc5a81c;border-color:#4fc5a867}.account-state.is-disabled{color:#e5b98c;background:#e5ae4918;border-color:#e5ae4966}.account-role{font-size:13px;margin:16px 0 12px}.account-work{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:12px;color:var(--muted)}.account-work b{color:var(--text)}
.account-card details{border-top:1px solid var(--line);padding-top:13px;margin-top:14px}.account-card summary{font-size:12px}.account-card form{display:grid;gap:14px;margin-top:16px}.account-card small,.account-hint{color:var(--muted);line-height:1.6}.account-hint{font-size:11px;margin-bottom:0}.account-tasks button{width:100%;text-align:left;margin-top:8px;font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}.account-tasks button small{display:block;font-size:10px;margin-top:4px}
#accounts-message{padding:12px 15px;border:1px solid #4fc5a866;background:#4fc5a814;border-radius:9px;line-height:1.5;font-size:13px}.account-error{color:#ffc29f}#accounts-message.account-error{border-color:#e5ae4966;background:#e5ae4918}
#account-confirm{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:26px;box-sizing:border-box;overflow:auto}#account-confirm h2{margin-top:0;font-size:21px}#account-confirm p{font-size:13px;line-height:1.7;overflow-wrap:anywhere}.account-work-note{border:1px solid #e5ae4966;background:#e5ae4918;border-radius:9px;padding:12px;font-size:12px;line-height:1.6}.account-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}.account-danger{background:#ce6c5628;border-color:#e09369;color:#ffd7bf}
html[data-theme=light] .account-state.is-active{color:#16604c;background:#309b7216;border-color:#309b7266}html[data-theme=light] .account-state.is-disabled,html[data-theme=light] .account-error{color:#804d16}html[data-theme=light] .account-danger{color:#8f311d;background:#c4513020}
@media(max-width:800px){.accounts-list{grid-template-columns:1fr}.account-filters{flex-wrap:wrap}.account-filters>label:first-child{flex-basis:100%}.account-filters>label:nth-child(2){flex:1}.account-create form{grid-template-columns:1fr}.account-page-head{align-items:start;flex-direction:column}.account-card{padding:16px}.account-card-head{flex-wrap:wrap}.account-actions{flex-wrap:wrap}#account-confirm{padding:20px}}

/* Several responsibilities can be selected without switching accounts. */
.account-roles{min-width:0;border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;gap:6px;grid-column:1/-1}.account-roles legend{font-size:12px;padding:0 6px}.accounts-page .account-roles label{display:flex;flex-direction:row;align-items:flex-start;gap:10px;padding:9px;border-radius:8px;cursor:pointer}.account-roles label:has(input:checked){background:#a78bfa16}.accounts-page .account-roles input[type=checkbox]{width:17px;min-width:17px;height:17px;min-height:0;margin:2px 0 0;accent-color:#baaadf}.account-roles label span{min-width:0;line-height:1.5}.account-roles small{display:block;font-size:10px;color:var(--muted);margin-top:3px}.account-role{line-height:1.6}.sidebar-person small{line-height:1.45;white-space:normal}

/* Clarification keeps the original request editable without losing the discussion. */
.intake-editor form{margin-top:18px}.intake-editor fieldset{border:0;padding:0;margin:0;min-width:0}.intake-editor label{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.intake-editor input,.intake-editor select,.intake-editor textarea{width:100%;min-width:0}.intake-editor textarea{min-height:110px;line-height:1.6}.intake-editor small{color:var(--muted);font-size:11px;line-height:1.6;display:block}.intake-editor form>small{margin-top:12px}.intake-edit-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.intake-editor .intake-edit-emergency{display:flex;flex-direction:row;align-items:flex-start;font-size:12px;line-height:1.6}.intake-edit-emergency input[type=checkbox]{width:17px;height:17px;min-width:17px;margin-top:3px}.intake-edit-error{padding:12px;border:1px solid #e5ae4977;border-radius:8px;background:#e5ae4914;font-size:12px;line-height:1.6}.intake-revisions{margin-top:20px}.intake-revisions section{border-top:1px solid var(--line);margin-top:14px;padding-top:10px;font-size:12px;overflow-wrap:anywhere}.intake-revisions section>div{border-left:2px solid var(--line);padding-left:12px;margin:12px 0}.intake-revisions p{white-space:pre-wrap;line-height:1.6}.intake-revisions p small{display:block;color:var(--muted);margin-bottom:3px}.intake-editor [inert]{opacity:.7}
@media(max-width:700px){.intake-edit-pair{grid-template-columns:1fr;gap:0}.intake-editor [type=submit]{width:100%;white-space:normal}}
/* Results belong to the task, with every review kept beside its delivery. */
.task-content>.acceptance-panel{padding:18px;border:1px solid #b8b0ec70;border-radius:18px;background:linear-gradient(125deg,#b7a2f019,#0c091f50);box-shadow:inset 0 1px #e8e2ff19;margin:18px 0}
.task-content>.acceptance-panel:has(>#handover[hidden]:only-child){display:none}
.result-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}.result-heading h3{margin:0;color:var(--text)}.result-state{font-size:11px;padding:6px 10px;border:1px solid #b8b0ec55;border-radius:9px;background:#b8b0ec16}
.result-round-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px}.result-round-meta span{color:var(--muted);font-size:11px}.result-copy{margin-top:16px}.result-copy>b{font-size:11px;color:var(--muted)}.result-copy p,.result-outcome p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:5px 0 14px;font-size:13px}.result-outcome{padding:13px;border-radius:12px;margin-top:12px;border:1px solid #cabd8b66;background:#ccaa4a15}.result-outcome b{font-size:13px}.result-outcome small{display:block;margin-top:4px;color:var(--muted)}.result-outcome p{margin:10px 0 0}.result-accepted{border-color:#9bc97d66;background:#91c27913}.result-unchecked{border-color:#c48a7566;background:#c48a7512}
.result-review-owner{display:grid;gap:6px;padding:13px 0;font-size:12px;border-top:1px solid var(--line)}.result-review-owner small{color:var(--muted)}.result-review-owner strong{color:#f5be77}.result-history{margin-top:16px;border-top:1px solid var(--line);padding-top:12px}.result-history .result-round{margin-top:16px;padding:15px;border:1px solid var(--line);border-radius:12px;background:#0c091f28}.acceptance-panel form{margin-top:18px}.acceptance-panel form label{display:block}.acceptance-panel textarea{min-height:90px}.acceptance-panel form>small{display:block;margin-top:8px;line-height:1.6;color:var(--muted)}.review-events,.review-adjustment{margin-top:16px}.review-save-error{color:#ffc6a6!important;line-height:1.6}.result-round p{max-width:100%}
html[data-theme=light] .task-content>.acceptance-panel{background:linear-gradient(125deg,#e9e0fb99,#fff8);border-color:#a294c6}html[data-theme=light] .result-history .result-round{background:#ffffff60}html[data-theme=light] .result-review-owner strong,html[data-theme=light] .review-save-error{color:#8b4521!important}
@media(max-width:800px){.task-content>.acceptance-panel{padding:14px;border-radius:14px}.result-heading{align-items:start}.result-round-meta{flex-direction:column}.acceptance-panel form>button{max-width:100%;white-space:normal}.result-history .result-round{padding:11px}}
.workflow-warning{border:1px solid #d0b77b66;background:#be9b4a15;border-radius:12px;padding:12px 14px;font-size:12px;line-height:1.6;color:#e9d8b2;overflow-wrap:anywhere}.subtask-summary{font-size:12px;color:var(--muted);line-height:1.6}.task-save-error{font-size:12px;color:#ffd0b6!important;line-height:1.6;overflow-wrap:anywhere}html[data-theme=light] .workflow-warning,html[data-theme=light] .task-save-error{color:#78521a!important}
#link-form.inline-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}#link-form>label:first-child{grid-column:1/-1}#link-form>label{display:block;min-width:0;font-size:12px}#link-form select{display:block;width:100%;min-width:0;max-width:100%;margin-top:6px}#link-form>button{margin:0}.relation-help{font-size:12px;line-height:1.6;color:var(--muted)}
