@import url("./ui-tokens.css");
.detail-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.detail-grid { display: grid; }
.task-content h2 { margin-top: 5px; }
@media (max-width: 1100px) {.detail-grid { grid-template-columns: 1fr 1fr; }}
@media (max-width: 700px) {#detail.mobile-chat .task-content { display: none; }
#detail:not(.mobile-chat) .chat { display: none; }}
.detail-head { position: sticky; top: 0px; background: rgb(32, 35, 38); z-index: 3; }
#detail { height: min(900px, 91dvh); overflow: hidden; max-height: 91dvh; background: linear-gradient(135deg, rgb(38, 42, 45), rgb(28, 31, 34) 55%); border-color: rgb(var(--tone)/.3); box-shadow: 0 25px 90px #0008,0 0 50px rgb(var(--tone)/.05),inset 0 1px #ffffff24; }
#detail .detail-head { height: 67px; background: linear-gradient(90deg,rgb(var(--tone)/.07),#202326 60%); padding: 13px 20px; }
.detail-grid { height: calc(100% - 67px); grid-template-columns: minmax(0px, 1.12fr) minmax(0px, 1fr); min-height: 0px; }
.task-content { overflow: auto; min-width: 0px; padding: 26px; scrollbar-width: thin; scrollbar-color: rgb(var(--tone)/.25) transparent; }
.task-content h2 { font-size: 25px; line-height: 1.3; letter-spacing: -0.45px; overflow-wrap: anywhere; }
.task-content > .actions { position: relative; margin: 18px 0px 22px; }
.task-content > .section:has(> h3):not(.management-panel):not(.operations-panel) { border-top-color: rgba(255, 255, 255, 0.11); }
@media (min-width: 1450px) {.task-content { padding: 30px 34px; }}
@media (max-width: 700px) {#detail { height: 94dvh; max-height: 94dvh; width: 97vw; }
#detail .detail-head { height: 57px; padding: 10px 12px; }
.detail-grid { display: block; height: calc(100% - 110px); }
.task-content { height: 100%; padding: 20px; }
.task-content h2 { font-size: 22px; }}
.task-content > .acceptance-panel { padding: 18px; border: 1px solid rgba(184, 176, 236, 0.44); border-radius: 18px; background: linear-gradient(125deg, rgba(183, 162, 240, 0.098), rgba(12, 9, 31, 0.314)); box-shadow: rgba(232, 226, 255, 0.098) 0px 1px inset; margin: 18px 0px; }
.task-content > .acceptance-panel:has(> #handover[hidden]:only-child) { display: none; }
html[data-theme="light"] .task-content > .acceptance-panel { background: linear-gradient(125deg, rgba(233, 224, 251, 0.6), rgba(255, 255, 255, 0.533)); border-color: rgb(162, 148, 198); }
@media (max-width: 800px) {.task-content > .acceptance-panel { padding: 14px; border-radius: 14px; }}
#task-link-dialog { width: min(480px, -28px + 100vw); padding: 24px; border-radius: 18px; }
#task-link-dialog h2 { font-size: 20px; margin: 0px 0px 12px; }
#task-link-dialog input { display: block; width: 100%; margin: 16px 0px; font-size: 14px; }
#task-link-dialog button { min-height: 40px; }
@media (max-width: 700px) {#detail .detail-head { gap: 8px; }
#detail .detail-head #back { padding: 8px; font-size: 12px; }}
html[data-theme] #task-code { font-size: 19px; font-weight: 750; letter-spacing: 0.025em; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {html[data-theme] #task-code { font-size: 17px; }}
@media (max-width: 700px) {#detail.task-overlay { inset: 0px; width: 100%; max-width: none; margin: 0px; height: var(--phone-visible-height,100dvh); max-height: 100dvh; border-radius: 0px; border: 0px; }
#detail > .detail-head { height: 58px; padding: 7px 14px; gap: 7px; }
#detail .detail-head button { min-height: 44px; }
#detail #close { display: none; }
#detail #back { font-size: 12px; }
#detail .mobile-tabs { position: static; height: 54px; padding: 5px 14px; gap: 8px; }
#detail .mobile-tabs button { min-height: 44px; flex: 1 1 0%; font-size: 13px; }
#detail .detail-grid { height: calc(100% - 112px); min-height: 0px; }
#detail .task-content { padding: 18px 16px 30px; height: 100%; overscroll-behavior: contain; }
#detail .task-content h2 { font-size: 23px; margin-top: 8px; }
#detail .task-content .actions button { min-height: 46px; }
#detail .chat { height: 100%; min-height: 0px; overscroll-behavior: contain; }
#detail .chat-tabs { padding: 7px 12px; }
#detail .chat-tabs button { min-height: 44px; }}
@media (max-width: 850px) {#detail.compact-task > .detail-head, #detail.compact-task > .mobile-tabs { flex-shrink: 0; }
#detail.compact-task > .detail-grid { flex: 1 1 0px; min-height: 0px; height: auto; }}
html[data-theme="light"] #detail .chat[data-ux-channel="public"] { background-color: rgb(247, 240, 232) !important; }
html[data-theme="light"] #detail .chat[data-ux-channel="internal"] { background-color: rgb(237, 244, 240) !important; }
html[data-theme="light"] #detail .chat[data-ux-channel] { background-image: none !important; }
#detail .chat[data-ux-channel="public"] .chat-tabs { background: rgba(219, 170, 103, 0.063); box-shadow: rgba(229, 183, 115, 0.533) 0px -1px inset !important; }
#detail .chat[data-ux-channel="internal"] .chat-tabs { background: rgba(151, 187, 189, 0.035); box-shadow: rgba(184, 211, 209, 0.165) 0px -1px inset !important; }
#detail .chat [data-channel="public"].active { background: rgba(220, 165, 88, 0.145) !important; border-color: rgba(231, 181, 117, 0.533) !important; }
#detail .chat [data-channel="internal"].active { background: rgba(155, 191, 183, 0.09) !important; border-color: rgba(165, 199, 190, 0.267) !important; }
#detail :is(.rich-message-input, .message-text) :is(ul, ol) { margin: 4px 0px; padding-left: 24px; white-space: normal; list-style-position: outside; }
#detail :is(.rich-message-input, .message-text) ul { list-style-type: disc; }
#detail :is(.rich-message-input, .message-text) ol { list-style-type: decimal; }
#detail :is(.rich-message-input, .message-text) li { padding: 1px 0px 1px 2px; white-space: pre-wrap; line-height: 1.5; }
#detail :is(.rich-message-input, .message-text) li ul { list-style-type: circle; }
#detail :is(.rich-message-input, .message-text) li li ul { list-style-type: square; }
#detail #message-form { grid-template-columns: 38px 32px minmax(0px, 1fr) 40px; grid-template-areas: "channel channel channel channel" "reply reply reply reply" "format format format format" "entry entry entry entry" "add type . send" "help help help help"; max-height: none; flex: 0 0 auto; align-items: center; }
#detail #message-form #compose-blocks { max-height: min(24dvh, 180px); overflow: hidden auto; scrollbar-gutter: stable; overscroll-behavior: contain; padding: 2px 4px 2px 0px; gap: 6px; align-content: start; }
#detail #message-form .rich-message-input { max-height: none; overflow: visible; min-height: 44px; padding: 10px 34px 10px 12px; }
#detail #message-form .compose-block[data-kind="text"]:only-child .rich-message-input { padding-right: 12px; }
#detail #message-form .compose-block:not([data-kind="text"]) { padding: 8px 34px 8px 10px; border: 1px solid var(--ui-tab-hover-border); border-radius: var(--ui-radius-control); background: var(--ui-tab-hover); }
#detail #message-form :is(.message-image, .message-video) { max-height: 104px; max-width: 100%; width: auto; object-fit: contain; border-radius: 8px; margin: 0px 0px 4px; }
#detail #message-form .compose-block > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; font-size: 10px; }
#detail #message-form .remove-block { display: grid; place-items: center; top: 6px; right: 6px; width: 24px; height: 24px; min-height: 24px; padding: 0px; border-radius: 50%; opacity: 0.85; background: rgba(35, 49, 61, 0.8); }
#detail #message-form .compose-block:only-child:has(.rich-message-input) .remove-block { display: none; }
#detail #message-form .messenger-send svg { color: rgb(25, 53, 44); }
#detail #message-form .send-progress { display: block; font-size: 20px; line-height: 1; color: rgb(25, 53, 44); }
html[data-theme="light"] #detail #message-form .remove-block { background: rgb(226, 234, 241); color: rgb(51, 77, 96); }
#detail .message-receipt > summary { color: inherit !important; }
#detail.compact-task:not([hidden]) { display: flex; flex-direction: column; }
#detail.compact-task > .detail-head, #detail.compact-task > .mobile-tabs { flex-shrink: 0; }
#detail.compact-task .detail-head { display: flex; align-items: center; min-height: 72px; height: auto; overflow: visible; }
#detail.compact-task .task-link-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin: 0px; }
#detail.compact-task #task-code { font-size: 20px; white-space: nowrap; margin: 0px 5px 0px 0px; }
#detail.compact-task :is(#back, #close, #copy-task-link) { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 36px; min-height: 36px; padding: 0px; border: 0px; background: transparent; box-shadow: none; }
#detail.compact-task #copy-task-link > span { display: none; }
#detail.compact-task :is(#back, #close, #copy-task-link):hover { background: rgba(178, 199, 213, 0.1); }
#detail.compact-task #ux-task-menu { margin: 0px; flex: 0 0 34px; border: 0px; padding: 0px; }
#detail.compact-task #ux-task-menu > summary { display: flex; align-items: center; justify-content: center; width: 34px; height: 36px; min-height: 36px; padding: 0px; border: 0px; border-radius: 7px; background: transparent; box-shadow: none; font-size: 20px; line-height: 1; list-style: none; }
#detail #ux-task-menu > summary::before, #detail #ux-task-menu > summary::marker { display: none !important; content: none !important; }
#detail.compact-task #ux-task-menu > div { z-index: 30; min-width: 210px; top: 40px; }
.compact-task-controls { margin-left: auto; min-width: 0px; }
#detail .compact-task-controls #task-settings { display: flex; margin: 0px; }
#detail .compact-task-controls .settings-grid { display: flex; }
#detail .compact-task-controls label { display: grid; font-size: 10px; line-height: 1.2; color: var(--muted); margin: 0px; }
#detail .compact-task-controls label > span { font-size: 12px; color: var(--ink); padding: 9px 4px; white-space: nowrap; }
#detail .compact-task-controls select { font-size: 12px; padding-top: 7px; padding-bottom: 7px; padding-left: 9px; min-height: 34px; max-width: 145px; border-radius: 8px; }
#detail .compact-task-controls .ux-extra-settings { padding: 0px; border: 0px; }
#detail .compact-task-controls .ux-extra-settings > summary { gap: 6px; }
#detail .compact-task-controls .ux-extra-settings > div { position: absolute; right: 0px; width: 280px; display: grid; gap: 12px; padding: 17px; background: rgb(37, 49, 63); border: 1px solid rgba(175, 199, 218, 0.333); border-radius: 12px; box-shadow: rgba(0, 0, 0, 0.333) 0px 12px 25px; z-index: 20; }
#detail .compact-task-controls .ux-extra-settings:not([open]) > div { display: none; }
#detail .compact-task-controls .ux-extra-settings label { font-size: 12px; gap: 6px; }
#detail .compact-task-controls .ux-extra-settings input, #detail .compact-task-controls .ux-extra-settings select { width: 100%; max-width: none; }
#detail .compact-task-controls form > button { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0px; min-width: 34px; min-height: 34px; border-color: rgba(185, 212, 192, 0.3); color: rgb(195, 227, 205); }
.compact-task-next { display: flex; align-items: center; gap: 3px; margin-left: 5px; align-self: center; }
#detail .compact-task-next button { min-height: 36px; white-space: nowrap; padding: 8px 12px; font-size: 12px; }
#detail .compact-task-next .compact-other-step { display: grid; place-items: center; width: 30px; padding: 0px; font-size: 20px; border: 0px; background: transparent; }
.compact-wait { font-size: 11px; color: var(--muted); max-width: 170px; }
#detail.compact-task .detail-grid { flex: 1 1 0; min-height: 0; height: auto; grid-template-columns: minmax(0px, 1fr) minmax(0px, 0.95fr); }
#detail.compact-task .task-content { padding: 20px 24px 24px; scrollbar-gutter: stable; }
#detail.compact-task .task-content > h2 { margin: 0px 0px 12px; font-size: 24px; line-height: 1.25; }
#detail.compact-task .meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 0px 0px 17px; }
#detail .task-consultants { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; width: auto; }
#detail .task-consultants > small { font-size: 10px; }
#detail :is(.task-consultants, .message-text) .mention-link { text-decoration: underline; text-underline-offset: 3px; font-size: inherit; line-height: inherit; font-weight: 550; display: inline !important; padding: 0px !important; min-height: 0px !important; margin: 0px !important; border: 0px !important; border-radius: 0px !important; box-shadow: none !important; background: none !important; color: rgb(138, 201, 243) !important; }
#detail .task-consultants .mention-link { font-size: 12px; }
#detail .mention-link:hover { color: rgb(195, 232, 255) !important; }
.compact-task-workspace { display: flex; flex-direction: column; gap: 15px; }
.compact-task-tabs { display: flex; gap: 5px; padding-bottom: 8px; border-bottom: 1px solid rgba(185, 203, 215, 0.17); flex-wrap: wrap; flex-shrink: 0; }
#detail .compact-task-tabs button { border: 1px solid transparent; border-radius: var(--ui-radius-control); padding: 9px 10px; background: none; font-size: 12px; line-height: 1.2; color: var(--muted); min-height: 36px; box-shadow: none; display: inline-flex; align-items: center; justify-content: center; }
#detail .compact-task-tabs button:hover { background: var(--ui-tab-hover); border-color: var(--ui-tab-hover-border); }
#detail .compact-task-tabs button[aria-selected="true"] { color: var(--ui-tab-selected-text); border-color: var(--ui-tab-selected-border); background: var(--ui-tab-selected); box-shadow: rgba(255, 255, 255, 0.08) 0px 1px 0px inset; }
#detail .compact-task-tabs button:focus-visible { outline: 2px solid var(--ui-tab-selected-border); outline-offset: 2px; }
.compact-task-body { min-height: 0px; flex: 1 1 0%; }
.compact-task-panel[hidden] { display: none !important; }
#detail .compact-task-tabs button[data-stage-focus] { border-color: rgba(var(--action-rgb),.6); color: var(--ink); gap: 6px; background: rgba(var(--action-rgb),.08); }
#detail .compact-task-tabs button[data-stage-focus][aria-selected="true"] { background: rgba(var(--action-rgb),.20); border-color: rgba(var(--action-rgb),.85); }
#detail .task-stage-cue { font-size: 9px; line-height: 1; padding: 4px 5px; border-radius: var(--ui-radius-chip); color: rgb(var(--action-rgb)); background: rgba(var(--action-rgb),.12); }
#detail .task-phase-note { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; margin: 0px 0px 12px; border: 1px solid rgba(var(--action-rgb),.4); border-radius: var(--ui-radius-control); background: rgba(var(--action-rgb),.07); font-size: 12px; line-height: 1.5; color: var(--muted); }
#detail .task-phase-note strong { color: rgb(var(--action-rgb)); font-size: 12px; }
#detail .compact-task-panel[data-stage-focus] :is(.editable-text-block, .document-input) { border-color: rgba(var(--action-rgb),.5); }
#detail .compact-task-panel > .section { padding: 0px; margin: 0px 0px 18px; border: 0px; background: none; }
#detail .compact-task-panel h3 { margin: 0px 0px 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
#detail .compact-task-panel p { font-size: 14px; line-height: 1.6; margin: 0px 0px 12px; color: var(--ink); white-space: pre-wrap; }
#detail [data-panel="description"] > .section:has(> h3) { padding: 15px 17px; background: rgba(195, 210, 225, 0.03); border: 1px solid rgba(190, 211, 225, 0.173); border-radius: 12px; }
#detail [data-panel="description"] .intake-description { max-height: 200px; overflow: auto; }
#detail .compact-task-panel form { gap: 10px; }
#detail .compact-task-panel :is(input, select, textarea) { font-size: 13px; padding: 8px 10px; }
#detail .compact-task-panel label { font-size: 12px; gap: 5px; }
#detail .compact-task-panel textarea { min-height: 65px; }
#detail .compact-result { margin: 0px; padding: 0px; border: 0px; background: none; }
#detail .compact-result > summary { display: none !important; }
#detail .compact-result form { padding: 0px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#detail .compact-result form > h3 { grid-column: 1 / -1; }
#detail .compact-result form > label:has(textarea) { grid-column: 1 / -1; }
#detail .compact-result form > label:has([type="checkbox"]) { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
#detail .compact-result form > label textarea { width: 100%; min-height: 62px; }
#detail .compact-result form > button { font-size: 12px; min-height: 36px; padding: 8px 12px; }
#detail .compact-result form > button:last-child { background: transparent; }
#detail .compact-history > h3 { font-size: 16px; }
#detail .compact-history .ux-action-history { font-size: 12px; }
#detail details > summary { align-items: center; gap: 9px; min-height: 34px; }
#detail details > summary::before { content: ""; display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; border-right: 1.5px solid; border-top: 1.5px solid; transform: rotate(45deg); font-size: 0px; line-height: 0; margin: 0px 4px 0px 1px; }
#detail details[open] > summary::before { transform: rotate(135deg); }
#detail :is(.message-menu, .messenger-add) > summary::before { display: none !important; }
#detail #message-form :is(.messenger-add, .messenger-send, .chat-format-toggle) { align-self: center; margin: 0px !important; }
#detail #message-form .messenger-add > summary, #detail #message-form .messenger-send { width: 38px; height: 38px; min-height: 38px; place-items: center; line-height: 1; display: grid !important; padding: 0px !important; }
#detail #message-form .messenger-send::after { content: none !important; }
#detail #message-form .messenger-send svg { display: block; transform: rotate(-20deg); width: 19px; height: 19px; margin: 0px; }
#detail #message-form .messenger-send[data-editing="true"] svg { transform: none; }
#detail .reply-preview { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; font-size: 11px; line-height: 1.5; }
#detail .reply-preview button { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; min-height: 28px; padding: 0px; font-size: 16px; border: 0px; background: none; line-height: 1; }
html[data-theme="light"] #detail :is(.task-consultants, .message-text) .mention-link { color: rgb(23, 106, 171) !important; }
html[data-theme="light"] #detail .compact-task-controls .ux-extra-settings > div { background: rgb(244, 246, 248); color: rgb(38, 60, 73); }
html[data-theme="light"] #detail .compact-task-controls form > button { color: rgb(40, 93, 73); }
@media (max-width: 1100px) {.compact-task-controls .ux-extra-settings > summary { font-size: 0px !important; }
.compact-task-controls .ux-extra-settings > summary::after { content: "⚙"; font-size: 16px; }
#detail.compact-task #task-code { font-size: 17px; }
#detail.compact-task .task-content { padding: 18px; }}
@media (max-width: 700px) {#detail.compact-task .detail-head { flex-wrap: wrap; gap: 7px; height: auto; min-height: 104px; }
#detail.compact-task .compact-task-controls { order: 5; width: 100%; }
#detail .compact-task-controls #task-settings { justify-content: space-between; }
#detail .compact-task-next { margin-left: auto; }
#detail.compact-task .detail-grid { display: block; }
#detail.compact-task .task-content { padding: 15px; }
#detail .task-consultants { width: 100%; margin: 0px; }
#detail .compact-result form { grid-template-columns: 1fr; }
#detail .compact-result form > label { grid-column: 1 !important; }}
#detail .compact-result #handover { margin: 0px; gap: 10px; align-content: start; }
#detail .compact-result #handover > h3 { display: none; }
#detail .compact-result #handover > label { display: grid; margin: 0px; gap: 5px; align-content: start; }
#detail .compact-result #handover > label:has([name="changes"]) { order: 1; }
#detail .compact-result #handover > label:has([name="instructions"]) { order: 2; }
#detail .compact-result #handover > label:has([name="where"]) { order: 3; }
#detail .compact-result #handover > label:has([name="tester"]) { order: 4; }
#detail .compact-result #handover > label:has([type="checkbox"]) { order: 5; display: flex; min-height: 28px; }
#detail .compact-result #handover > button { order: 6; margin: 0px; }
#detail .compact-result #handover :is(input:not([type="checkbox"]), select) { width: 100%; min-width: 0px; }
#detail .compact-result #handover textarea { min-height: 64px; height: 64px; }
#detail .compact-task-panel .result-heading { margin: 0px 0px 10px; padding: 0px; }
#detail .compact-task-panel .result-round { padding: 0px; margin: 0px 0px 10px; }
#detail .compact-task-panel .result-round-meta { padding: 0px; margin: 0px 0px 12px; }
#detail .compact-task-panel .result-copy { padding: 0px; margin: 0px; gap: 0px; }
#detail .compact-task-panel .result-copy p { margin: 3px 0px 10px; font-size: 13px; }
#detail .compact-task-panel .result-review-owner { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 0px; margin-top: 4px; align-items: center; }
#detail .compact-task-panel .result-review-owner small { width: 100%; }

#detail #review-success[hidden] { display: none !important; }
#detail .compact-task-panel :is(.compact-feedback, .review-events, .review-adjustment) { padding: 0px; margin: 6px 0px; border: 0px; }
#detail .compact-feedback form { padding: 8px 0px 12px; }
#detail .compact-feedback label { display: grid; margin: 0px 0px 10px; }
#detail .compact-task-panel details > summary { padding: 6px 0px; min-height: 32px; }
#detail .compact-task-panel .compact-previous-result { margin: 0px 0px 12px; padding: 0px; }
#detail.compact-task .detail-head { gap: 16px; padding: 14px 20px; }
#detail.compact-task .compact-task-controls { margin-left: 10px; flex: 1 1 0%; }
#detail .compact-task-controls #task-settings { gap: 12px; align-items: end; }
#detail .compact-task-controls .settings-grid { gap: 12px; align-items: end; }
#detail .compact-task-controls label { gap: 4px; }
#detail .compact-task-controls form > button, #detail .compact-task-controls .ux-extra-settings { align-self: end; }
#detail .compact-task-next { margin-left: 0px; gap: 6px; }
#detail .compact-task-next .compact-primary { padding: 10px 16px; min-height: 40px; }
.compact-title-row { display: flex; gap: 16px; justify-content: space-between; align-items: start; margin-bottom: 10px; }
#detail .compact-title-row h2 { font-size: 24px; line-height: 1.3; margin: 0px; min-width: 0px; }
.compact-title-badges { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; max-width: 45%; flex-shrink: 0; padding-top: 3px; }
#detail .task-consultants { margin-left: 0px; }
#detail .compact-history { margin: 0px; padding: 0px; border: 0px; }
#detail .compact-history > h3 { display: none; }
#detail .compact-task-state { border: 0px; position: relative; margin: 0px; padding: 0px; }
#detail .compact-task-state > summary { justify-items: center; font-size: 23px; }
#detail .compact-task-state > summary::before { display: none; }
#detail .compact-task-state .compact-state-menu { position: absolute; right: 0px; padding: 18px; z-index: 40; background: rgb(37, 49, 63); border: 1px solid rgba(172, 203, 210, 0.333); box-shadow: rgba(0, 0, 0, 0.4) 0px 18px 35px; }
#detail .compact-state-menu h3 { margin: 0px 0px 12px; font-size: 14px; }
#detail .compact-state-menu form { display: grid; gap: 12px; font-size: 13px; }
#detail .compact-state-menu label { display: grid; gap: 6px; }
#detail .compact-state-menu small { line-height: 1.5; color: var(--muted); }
#detail .compact-state-menu details { margin-top: 14px; border-top: 1px solid rgba(176, 199, 220, 0.2); padding-top: 10px; }
#detail .compact-state-menu textarea { min-height: 90px; }
#detail .compact-result #handover { grid-template-columns: 1fr 1fr; }
#detail .compact-result #handover > .consultant-field { grid-column: 1 / -1; order: 3; font-size: 12px; }
#detail .compact-result #handover > .reviewer-help { grid-column: 1 / -1; order: 4; line-height: 1.5; color: var(--muted); }
#detail .compact-result #handover > .form-attachments { grid-column: 1 / -1; order: 2; }
.form-attachments { display: grid; gap: 8px; margin: 4px 0px; }
#detail .attachment-add { cursor: pointer; width: fit-content; align-items: center; min-height: 34px; background: rgba(156, 186, 212, 0.08); border: 1px solid rgba(169, 200, 214, 0.24); border-radius: 8px; color: var(--ink); display: inline-flex !important; padding: 7px 12px !important; }
.form-file-list { display: flex; gap: 6px; flex-wrap: wrap; }
.form-file-list > span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(177, 200, 208, 0.2); padding: 4px 8px; border-radius: 8px; font-size: 12px; }
#detail .form-file-list button { width: 24px; height: 24px; min-height: 24px; padding: 0px; display: grid; place-items: center; border: 0px; background: none; }
#detail .form-attachments small { font-size: 11px; color: var(--muted); }
#detail .consultation-request { padding: 0px; border: 0px; margin-top: 0px; margin-right: 0px; margin-left: 0px; }
#detail .consultation-request > summary { pointer-events: none; font-weight: 650; color: var(--ink); }
#detail .consultation-request > summary::before { display: none; }
#detail #consultation-request { display: grid; padding: 10px 0px; }
#detail #consultation-request label { display: grid; gap: 7px; }
#detail #consultation-request small { font-size: 12px; line-height: 1.5; color: var(--muted); }
#detail #consultation-request button[type="submit"] { justify-self: start; }
#detail .assignee-hint { padding-top: 14px; margin-top: 16px; border-top: 1px solid rgba(171, 197, 212, 0.17); }
#detail .assignee-hint p { font-size: 12px; }
.reviewer-verdicts { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.reviewer-verdicts > span { padding: 5px 8px; border-radius: 6px; background: rgba(164, 187, 209, 0.082); font-size: 12px; }
.reviewer-verdicts > .confirmed { color: rgb(175, 218, 195); background: rgba(166, 220, 181, 0.09); }
.result-file { display: inline-flex; padding: 6px 10px; margin: 0px 6px 6px 0px; border: 1px solid rgba(170, 203, 222, 0.267); border-radius: 8px; color: rgb(153, 209, 244); font-size: 12px; }
.ux-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ux-route > span { opacity: 0.5; padding: 7px 8px; border: 1px solid transparent; border-radius: 7px; }
.ux-route > span[aria-current="step"] { opacity: 1; background: rgba(169, 217, 209, 0.137); border-color: rgba(176, 221, 213, 0.42); color: rgb(210, 238, 231); font-weight: 700; box-shadow: rgba(160, 209, 206, 0.07) 0px 0px 16px; }
.ux-route > i { opacity: 0.35; font-style: normal; }
html[data-theme="light"] #detail .compact-state-menu { background: rgb(245, 247, 250); color: rgb(37, 60, 78); }
html[data-theme="light"] .ux-route > span[aria-current="step"] { color: rgb(41, 94, 98); background: rgba(141, 202, 199, 0.2); border-color: rgba(82, 143, 147, 0.467); }
html[data-theme="light"] .reviewer-verdicts > .confirmed { color: rgb(38, 105, 75); }
html[data-theme="light"] .result-file { color: rgb(23, 106, 171); }
@media (max-width: 1100px) {#detail.compact-task .detail-head { padding: 12px; }
.compact-title-row { gap: 10px; }
#detail .compact-title-row h2 { font-size: 21px; }
#detail .compact-task-controls #task-settings { gap: 6px; }
#detail .compact-task-next .compact-primary { padding: 8px; }}
@media (max-width: 700px) {#detail.compact-task .compact-task-controls { margin: 0px; flex: 1 0 100%; }
.compact-title-row { flex-wrap: wrap; }
.compact-title-badges { max-width: 100%; }
#detail .compact-task-state .compact-state-menu { position: fixed; top: 130px; left: 16px; right: 16px; }}
.ux-stage-dialog .ux-route { font-size: 13px; }
.ux-stage-dialog .ux-route > span[aria-current="step"] { color: rgb(225, 255, 243); background: linear-gradient(130deg, rgba(50, 121, 104, 0.6), rgba(61, 101, 132, 0.533)); border-color: rgba(164, 226, 216, 0.6); box-shadow: rgba(112, 200, 179, 0.133) 0px 0px 18px; font-weight: 750; }
.ux-stage-dialog .ux-route > span[aria-current="step"]::before { content: "●"; font-size: 8px; margin-right: 6px; color: rgb(180, 241, 216); }
html[data-theme="light"] .ux-stage-dialog .ux-route > span[aria-current="step"] { color: rgb(33, 78, 73); background: rgba(171, 220, 205, 0.533); border-color: rgb(81, 135, 121); }
.intake-routing-hint { padding: 12px 14px; background: rgba(155, 189, 204, 0.043); border: 1px solid rgba(161, 193, 205, 0.19); border-radius: 10px; font-size: 12px; }
.intake-routing-hint p { margin: 5px 0px; }
.intake-routing-hint small { color: var(--muted); }
#detail #consultation-request { gap: 10px; }
#detail #consultation-request label { margin: 0px; }
#detail #consultation-request > button { margin: 0px; }
#detail .form-file-list:empty, #detail .form-attachments > [role="status"]:empty { display: none; }
#detail .form-attachments { margin: 0px; }
#detail .consultation-request { margin-bottom: 14px; }
#detail .compact-task-controls form > button[hidden] { display: none !important; }
#detail .compact-task-controls .ux-extra-settings { flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 155px; }
#detail .compact-more-caption { font-size: 10px; line-height: 12px; color: var(--muted); }
#detail .compact-task-controls .ux-extra-settings > summary { border: 1px solid rgba(173, 197, 211, 0.267); background: rgba(171, 198, 208, 0.04); border-radius: 8px; padding-top: 7px; padding-bottom: 7px; padding-left: 10px; min-height: 34px; font-size: 12px; line-height: 18px; justify-content: center; }
#detail .compact-task-controls .ux-extra-settings > summary::after { font-size: 14px; }
#detail .compact-task-controls .ux-extra-settings > div { top: 60px; }
#detail .compact-task-state { flex: 0 0 auto; min-width: 150px; align-self: center; }
#detail .compact-task-state > summary { width: auto; height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 4px; background: none; border: 0px; border-radius: 0px; padding: 0px; line-height: 1.2; }
#detail .compact-task-state > summary small { font-size: 10px; color: var(--muted); text-align: left; }
#detail .compact-task-state > summary span { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 7px 10px; font-size: 12px; font-weight: 600; border: 1px solid rgba(165, 210, 195, 0.5); background: rgba(172, 215, 197, 0.1); border-radius: 8px; color: rgb(211, 234, 223); }
#detail .compact-task-state > summary svg { width: 15px; height: 15px; }
#detail .compact-task-state .compact-state-menu { top: 61px; }
#detail .compact-status-actions { display: grid; gap: 6px; }
#detail .compact-status-actions button { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 8px; min-height: 48px; background: rgba(165, 201, 192, 0.047); }
#detail .compact-status-actions button b { font-size: 13px; }
#detail .compact-status-actions button small { font-size: 11px; line-height: 1.4; white-space: normal; }
#detail .task-route-button { margin-top: 12px; padding: 7px 0px; border: 0px; background: none; font-size: 12px; color: var(--muted); text-decoration: underline; }
#detail .edit-description-button { margin-left: auto; border: 0px; background: transparent; box-shadow: none; min-height: 30px; padding: 5px 8px; font-size: 12px; color: rgb(166, 202, 220); }
#task-edit-bar { position: absolute; bottom: 0px; left: 0px; width: 51.28%; padding: 14px 22px 18px; background: rgba(38, 52, 66, 0.96); backdrop-filter: blur(16px); border-top: 1px solid rgba(186, 216, 215, 0.467); box-shadow: rgba(16, 27, 40, 0.267) 0px -12px 28px; border-radius: 0px 0px 0px 18px; z-index: 35; display: grid; gap: 10px; }
#task-edit-bar[hidden] { display: none !important; }
#task-edit-bar > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
#task-edit-bar strong { font-size: 13px; }
#task-edit-bar small { font-size: 11px; color: var(--muted); }
#task-edit-bar .task-edit-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#task-edit-bar .task-edit-buttons button { min-height: 44px; font-size: 14px; font-weight: 650; padding: 10px 16px; border-radius: 10px; }
#task-edit-bar p { font-size: 12px; line-height: 1.4; margin: 0px; color: rgb(255, 181, 173); }
#detail.has-task-edits .task-content { padding-bottom: 150px; }
#detail #edit-intake > button[hidden], #detail #participants > button[hidden] { display: none !important; }
html[data-theme="light"] #task-edit-bar { background: rgba(243, 248, 246, 0.96); box-shadow: rgba(71, 97, 107, 0.08) 0px -8px 25px; color: rgb(34, 61, 71); border-color: rgb(171, 207, 196); }
html[data-theme="light"] #task-edit-bar p { color: rgb(163, 48, 37); }
html[data-theme="light"] #detail .compact-task-state > summary span { color: rgb(45, 98, 86); border-color: rgba(120, 169, 154, 0.533); background: rgba(184, 220, 204, 0.2); }
html[data-theme="light"] #detail .edit-description-button { color: rgb(40, 106, 139); }
@media (max-width: 1100px) {#detail .compact-task-controls .ux-extra-settings > summary { font-size: 11px !important; }
#detail .compact-task-controls .ux-extra-settings > summary::after { content: "⌄"; font-size: 13px; }
#detail .compact-task-controls .ux-extra-settings { min-width: 125px; }
#detail .compact-task-state { min-width: 125px; }
#detail .compact-task-controls select { max-width: 110px; }
#detail.compact-task .detail-head { gap: 7px; }}
@media (max-width: 850px) {#detail.compact-task .detail-head { flex-wrap: wrap; }
#detail .compact-task-controls { order: 5; flex: 1 0 100%; }
#detail .compact-task-next { margin-left: auto; }

#task-edit-bar { width: 100%; padding: 12px 15px; }
.compact-task-state > summary small { display: block; }}
#detail .compact-task-controls .ux-extra-settings { align-self: flex-end; display: block; position: relative; }
#detail .compact-task-controls .compact-more-caption { display: none; }
#detail .compact-task-controls .ux-extra-settings > summary::before { content: "Дополнительно"; display: block; position: absolute; top: -17px; left: 0px; font-size: 10px; line-height: 12px; color: var(--muted); font-weight: 400; transform: none; }
#detail .compact-task-controls .ux-extra-settings { margin: 0px; }
#detail .compact-state-menu > .compact-action-form:not([open]) { display: none; }
[data-tone="work"] { --action-rgb: 111,183,235; }
[data-tone="review"], [data-tone="done"] { --action-rgb: 127,209,179; }
[data-tone="wait"], [data-tone="return"] { --action-rgb: 235,183,103; }
[data-tone="stop"] { --action-rgb: 231,130,139; }
.ux-stage-dialog .ux-stage-choices button[data-tone], #detail .compact-status-actions button[data-tone] { background: rgba(var(--action-rgb),.10); border: 1px solid rgba(var(--action-rgb),.42); box-shadow: inset 3px 0 rgba(var(--action-rgb),.65); transition: background 0.18s, border-color 0.18s; }
.ux-stage-dialog .ux-stage-choices button[data-tone]:hover, #detail .compact-status-actions button[data-tone]:hover { background: rgba(var(--action-rgb),.18); border-color: rgba(var(--action-rgb),.75); }
.ux-stage-dialog .ux-stage-choices button[data-tone] > small, #detail .compact-status-actions button[data-tone] > b { color: rgb(var(--action-rgb)); }
#detail .compact-state-advanced > summary { color: rgb(229, 160, 164); font-weight: 650; }
#detail .compact-task-controls select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bed0dc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-size: 16px auto; background-repeat: no-repeat; background-position: right 8px center; padding-right: 30px; }
#detail .compact-task-controls .ux-extra-settings > summary { padding-right: 30px; }
#detail .compact-task-controls .ux-extra-settings > summary::after { content: ""; position: absolute; right: 8px; width: 16px; height: 16px; margin: 0px; background: currentcolor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center center / contain no-repeat; }
.editable-text-block { position: relative; }
#detail .editable-text-block.section { padding-right: 46px; }
#detail .edit-block-button { display: grid; place-items: center; position: absolute; right: 9px; top: 9px; width: 29px; height: 29px; min-height: 0px; padding: 5px; border: 0px; background: transparent; border-radius: 6px; color: rgb(167, 196, 213); opacity: 0.7; }
#detail .edit-block-button:hover { opacity: 1; background: rgba(170, 205, 222, 0.1); color: rgb(213, 237, 252); }
#detail .edit-block-button svg { width: 17px; height: 17px; }
#detail .compact-title-row { padding-right: 32px; }
#detail .compact-title-row > .edit-block-button { right: 0px; top: 0px; }
#detail .intake-editor:not([open]) { display: none; }
#detail .all-participants { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#detail .all-participants > label, #detail .all-participants > .consultant-field { margin: 0px; min-width: 0px; display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--muted); }
#detail .all-participants select, #detail .all-participants input { margin: 0px; width: 100%; }
#detail .all-participants select[hidden] { display: none; }
#detail .participants-chat-hint { font-size: 12px; color: var(--muted); margin-top: 20px; }
.task-people-list { display: grid; grid-template-columns: 130px 1fr; gap: 14px; }
.task-people-list dt { color: var(--muted); }
.task-people-list dd { margin: 0px; }
html[data-theme="light"] [data-tone="work"] { --action-rgb: 44,111,167; }
html[data-theme="light"] [data-tone="review"], html[data-theme="light"] [data-tone="done"] { --action-rgb: 42,126,99; }
html[data-theme="light"] [data-tone="wait"], html[data-theme="light"] [data-tone="return"] { --action-rgb: 145,95,23; }
html[data-theme="light"] [data-tone="stop"] { --action-rgb: 171,69,81; }
html[data-theme="light"] #detail .compact-state-advanced > summary { color: rgb(164, 67, 81); }
html[data-theme="light"] #detail .edit-block-button { color: rgb(71, 108, 136); }
@media (max-width: 650px) {#detail .all-participants { grid-template-columns: 1fr; }}
#detail .all-participants > label, #detail .all-participants > .consultant-field { text-align: left; align-items: stretch; }
#detail .compact-task-panel .intake-revisions { margin: 0px 0px 8px; padding: 0px; border: 0px; }
#detail .compact-task-panel .intake-revisions > summary { min-height: 28px; padding: 4px 0px; font-size: 12px; }
#detail .compact-task-panel > .intake-panel { margin: 0px 0px 8px; padding: 0px; }
#detail.compact-task .detail-head > :is(.compact-task-next, .compact-task-state, .compact-task-controls, .task-link-actions, #back, #close, #ux-task-menu) { align-self: flex-end; }
#detail.compact-task .compact-task-controls select, #detail.compact-task .ux-extra-settings > summary, #detail.compact-task .compact-task-state > summary span, #detail.compact-task .compact-task-next button { box-sizing: border-box; height: 36px; min-height: 36px; }
#detail.compact-task .compact-task-next button { display: flex; align-items: center; justify-content: center; padding: 7px 14px; line-height: 1.2; }
#phone-task-parameters { display: none; }
.phone-intake-fields { display: contents; }
@media (max-width: 700px) {body.task-open #detail.compact-task { top: var(--phone-visible-top,0px); }
body #detail.compact-task > .detail-head { display: grid; grid-template-columns: 44px minmax(0px, 1fr) 44px 44px; gap: 5px 8px; min-height: 0px; height: auto; padding: 8px 12px; }
body #detail.compact-task > .detail-head > #back { grid-area: 1 / 1; }
body #detail.compact-task > .detail-head > #task-code { grid-area: 1 / 2; margin: 0px; align-self: center; font-size: 19px; }
body #detail.compact-task > .detail-head > .task-link-actions { grid-area: 1 / 2 / auto / 4; justify-content: space-between; min-width: 0px; }
body #detail.compact-task > .detail-head > #ux-task-menu { grid-area: 1 / 4; margin: 0px; }
body #detail.compact-task > .detail-head > #close, body #detail.compact-task > .detail-head > .compact-task-controls { display: none; }
body #detail.compact-task > .detail-head > .compact-task-state { grid-area: 2 / 1 / auto / 3; min-width: 0px; width: 100%; margin: 0px; }
body #detail.compact-task > .detail-head > .compact-task-next { grid-area: 2 / 3 / auto / 5; min-width: 0px; margin: 0px; }
body #detail.compact-task > .detail-head:has(#phone-task-parameters) { grid-template-columns: 44px minmax(0px, 1fr) minmax(100px, 1fr) 44px; }
body #detail.compact-task > .detail-head:has(#phone-task-parameters) > .compact-task-next { grid-column: 3; }
body #detail.compact-task > .detail-head:not(:has(.compact-task-state)) > .compact-task-next { grid-column: 1 / 4; justify-content: flex-start; }
body #detail.compact-task > .detail-head > #phone-task-parameters { display: grid; place-items: center; grid-area: 2 / 4; width: 44px; height: 44px; padding: 0px; }
body #detail.compact-task .compact-task-state > summary span, body #detail.compact-task .compact-task-next button { min-height: 44px; height: auto; width: 100%; padding: 7px 9px; font-size: 12px; }
body #detail.compact-task .compact-task-next .compact-primary { min-width: 0px; white-space: normal; overflow-wrap: anywhere; text-align: center; }
body #detail.compact-task .compact-task-state > summary small { display: block; }
body #detail.compact-task .compact-task-state .compact-state-menu { top: 112px; max-height: calc(var(--phone-visible-height,100dvh) - 130px); overflow: auto; }
body #detail.compact-task .compact-task-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; gap: 5px; padding: 3px 0px 7px; }
body #detail.compact-task .compact-task-tabs > button { flex: 0 0 auto; white-space: nowrap; min-height: 44px; padding: 8px 12px; }
body #detail.compact-task .task-content { padding: 12px 14px; }
body #detail.compact-task .compact-title-row h2 { font-size: 21px; }
body #detail #phone-task-settings { max-height: calc(var(--phone-visible-height,100dvh) - 12px); padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); }
body #detail #phone-task-settings .compact-task-controls { display: block; margin: 0px; width: 100%; }
body #detail #phone-task-settings #task-settings, body #detail #phone-task-settings .settings-grid { display: grid; grid-template-columns: 1fr; gap: 18px; width: 100%; }
body #detail #phone-task-settings .compact-task-controls :is(label, select, .ux-extra-settings) { width: 100%; max-width: none; min-width: 0px; font-size: 14px; }
body #detail #phone-task-settings .compact-task-controls select { font-size: 16px; min-height: 46px; }
body #detail #phone-task-settings .ux-extra-settings > summary { height: 46px; justify-content: flex-start; font-size: 14px !important; }
body #detail #phone-task-settings .ux-extra-settings > summary::before { display: none; }
body #detail #phone-task-settings .ux-extra-settings > div { position: static; width: 100%; max-height: none; box-shadow: none; margin-top: 12px; }
body #detail #phone-task-settings #task-edit-bar { position: sticky; bottom: -16px; width: 100%; margin-top: 18px; padding: 14px 0px; border-radius: 0px; box-shadow: none; }
body #detail #message-form { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); grid-template-columns: 44px 44px minmax(0px, 1fr) 44px; }
body #detail #message-form :is(.messenger-send, .messenger-add > summary, .chat-format-toggle) { width: 44px; height: 44px; display: grid; place-items: center; min-height: 44px !important; }
body #detail #message-form .rich-message-input { font-size: 16px; }
body #detail #message-form #compose-blocks { max-height: min(24dvh, 140px); }
body #detail #message-form .chat-formatbar { flex-wrap: nowrap; overflow-x: auto; }
body #detail #message-form .chat-formatbar > button { flex-shrink: 0; min-width: 40px; min-height: 40px; }
body #new { top: var(--phone-visible-top,0px); height: var(--phone-visible-height,100dvh); overflow: hidden; padding: 0px 16px; }
body #new-form { height: 100%; display: flex; flex-direction: column; min-height: 0px; gap: 0px; }
body #new-form > .detail-head { position: static; flex-shrink: 0; padding: 12px 0px; margin: 0px; }
body #new-form > .phone-intake-fields { flex: 1 1 0%; min-height: 0px; overflow-y: auto; overscroll-behavior: contain; padding: 0px 2px 20px; display: grid; gap: 14px; align-content: start; }
body #new-form > .phone-intake-fields { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
body #new-form > .phone-intake-fields > * { grid-column: 1 / -1; margin-top: 0px; margin-bottom: 0px; }
body #new-form > .phone-intake-fields > label:has([name="system"]), body #new-form > .phone-intake-fields > label:has([name="type"]) { grid-column: auto; }
body #new-form > .phone-intake-fields > label { position: relative; margin: 0px; }
body #new-form .required-mark { position: absolute; top: 0px; right: 2px; }
body #new-form > button.primary { flex-shrink: 0; width: 100%; min-height: 48px; margin: 10px 0 calc(10px + env(safe-area-inset-bottom)); }}
#task-subscription { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0px 8px; }
#task-subscription button { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--ui-radius-control); }
#task-subscription button svg { width: 19px; height: 19px; }
#task-subscription button[aria-pressed="true"] { background: var(--ui-selected-bg,#9dd0e51c); border-color: var(--ui-selected-border,#9dd0e577); }
#task-subscription small { font-size: 11px; color: var(--muted); }
.task-result-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line,#abcbd733); }
.task-result-section > h3 { font-size: 14px; margin: 0px 0px 12px; }
.relation-management { margin: 12px 0px; border: 1px solid var(--line,#abcbd733); padding: 10px; border-radius: var(--ui-radius-panel); }
.relation-management summary { cursor: pointer; }
#task-panel-links h4 { font-size: 13px; color: var(--muted); margin: 16px 0px 8px; }
#detail .compact-task-state .compact-state-menu { width: min(390px, -32px + 100vw); max-height: min(620px, 100dvh - 180px); overflow: auto; border-radius: var(--ui-radius-panel); }
.ux-stage-dialog { width: min(780px, -32px + 100vw); max-height: calc(100dvh - 32px); overflow: auto; }
#detail .mention-suggestions { max-height: min(360px, 45dvh); padding: 10px; border-radius: var(--ui-radius-panel); }
#detail .mention-suggestions > button { padding: 12px; min-height: 46px; white-space: normal; overflow-wrap: anywhere; border-radius: var(--ui-radius-control); }
#detail .mention-suggestions > button b { min-width: 0px; }
@media (max-width: 700px) {#detail .compact-task-state .compact-state-menu { width: auto; }
.ux-stage-choices { grid-template-columns: 1fr; }}
.task-examples > summary { font-size: 12px; cursor: pointer; padding: 4px; }
/* Task actions and responsible people: shared surfaces in both themes. */
#detail .task-header-reviewers{min-width:160px;max-width:220px}
#detail .task-header-reviewers small{font-size:11px;color:var(--muted)}
#detail .task-header-reviewers button{width:100%;max-width:220px;min-height:36px;text-align:left;white-space:normal;overflow-wrap:anywhere;padding:7px 10px;border-radius:var(--ui-radius-control);font-size:12px}
.task-responsible-summary{display:none}
#review-decision[hidden]{display:none!important}
.review-decision{margin:14px 0;padding:14px;border:1px solid var(--ui-tab-selected-border);border-radius:var(--ui-radius-panel);background:var(--ui-tab-selected)}
.review-decision h3{font-size:16px;margin:0 0 8px}
.review-decision .actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 0}
#detail .review-decision .actions button{min-height:46px;white-space:normal;border-radius:var(--ui-radius-control);font-weight:650}
#detail .review-decision .actions button:last-child{background:var(--ui-tab-hover);border-color:var(--ui-tab-selected-border);color:var(--ink)}
#detail #handover,#detail #review-decision,#detail #review-feedback{scroll-margin-top:12px}
#detail .task-result-section:first-child{margin-top:0;padding-top:0;border-top:0}
#detail .task-result-section:first-child > h3{display:none}
#detail .compact-title-badges .status-chip{display:none}
#detail .chat-formatbar #chat-article,#detail .document-toolbar .open-article,.article-dialog .open-article{width:auto!important;min-width:76px;display:inline-flex!important;align-items:center;gap:5px;padding:6px 8px}
.article-button-label{font-size:12px;white-space:nowrap}
#detail #channel-label{font-size:12px;font-weight:650}
@media(max-width:700px){
 body #detail.compact-task > .detail-head > .task-responsible-summary{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;width:100%;padding:6px 2px;border-top:1px solid var(--line)}
 .task-responsible-summary div{display:flex;flex-direction:column;min-width:0;font-size:12px;line-height:1.4}
 .task-responsible-summary small{font-size:10px;color:var(--muted)}
 .task-responsible-summary span{overflow-wrap:anywhere;max-height:3.5em;overflow:auto}
 .task-responsible-summary div:last-child{grid-column:1/-1;flex-direction:row;gap:8px;align-items:center}
 body #detail.compact-task .compact-task-tabs{display:grid;grid-template-columns:1fr 1fr;overflow:visible;gap:6px}
 body #detail.compact-task .compact-task-tabs > button{min-width:0;white-space:normal;padding:7px;font-size:12px}
 body #detail.compact-task .task-stage-cue{display:none}
 #detail .task-header-reviewers,#detail .task-header-reviewers button{max-width:none;width:100%}
}

#detail #task-panel-result:has(.result-heading) > h3{display:none}

#detail .task-header-reviewers button{display:grid;gap:3px;justify-items:start;line-height:1.35;height:auto}
#detail .task-header-reviewers button span{display:block;text-align:left}
#detail .task-review-popover{position:fixed;inset:auto;margin:0;box-sizing:border-box;padding:14px;border:1px solid var(--ui-tab-selected-border);border-radius:var(--ui-radius-panel);background:#25313f;color:var(--ink);box-shadow:0 12px 28px #0004;overflow:auto}
#detail .task-review-popover:not(:popover-open){display:none}
#detail .task-review-popover .review-decision{margin:0;padding:0;border:0;background:transparent}
#detail .task-review-popover .compact-feedback{margin-top:12px}
#detail .task-review-popover textarea{box-sizing:border-box;width:100%;min-height:100px}
#detail .task-review-popover small{white-space:normal}
html[data-theme=light] #detail .task-review-popover{background:#f4f6f8}

/* Forms continue beside the action that opened them, including on touch screens. */
:is(#detail,.task-route-dialog) .task-action-panel{position:fixed;inset:auto;margin:0;box-sizing:border-box;padding:16px;border:1px solid var(--ui-tab-selected-border);border-radius:var(--ui-radius-panel);background:#25313f;color:var(--ink);box-shadow:0 12px 28px #0004;overflow:auto;overscroll-behavior:contain;font-size:14px;line-height:1.45}
:is(#detail,.task-route-dialog) .task-action-panel:not(:popover-open){display:none}
:is(#detail,.task-route-dialog) .task-action-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:0;position:static;background:none}
:is(#detail,.task-route-dialog) .task-action-panel .action-panel-close{display:grid;place-items:center;width:32px;height:32px;min-width:32px;padding:5px;border-radius:var(--ui-radius-control)}
:is(#detail,.task-route-dialog) .task-action-panel .action-panel-close svg{width:18px;height:18px}
:is(#detail,.task-route-dialog) .task-action-panel>details{border:0;padding:0;margin:0}
:is(#detail,.task-route-dialog) .task-action-panel>details>summary{display:none}
:is(#detail,.task-route-dialog) .task-action-panel form{display:grid;gap:12px;margin:0;min-width:0}
:is(#detail,.task-route-dialog) .task-action-panel :is(label:not(.intake-edit-emergency),.consultant-field){display:grid;gap:6px;min-width:0}
:is(#detail,.task-route-dialog) .task-action-panel :is(input,textarea,select){box-sizing:border-box;max-width:100%;width:100%}
:is(#detail,.task-route-dialog) .task-action-panel input[type=checkbox]{width:auto}
:is(#detail,.task-route-dialog) .task-action-panel textarea{min-height:100px}
:is(#detail,.task-route-dialog) .task-action-panel :is(button,summary){white-space:normal;border-radius:var(--ui-radius-control)}
:is(#detail,.task-route-dialog) .task-action-panel .document-input{min-height:110px;max-height:230px;overflow:auto}
:is(#detail,.task-route-dialog) .task-action-panel .document-editor{min-width:0}
:is(#detail,.task-route-dialog) .task-action-panel #handover>h3{display:none}
:is(#detail,.task-route-dialog) .task-action-panel .consultant-picker{max-height:170px;overflow:auto}
:is(#detail,.task-route-dialog) .task-action-panel .consultant-dropdown summary{overflow-wrap:anywhere}
:is(#detail,.task-route-dialog) .task-action-panel small{white-space:normal}
html[data-theme=light] :is(#detail,.task-route-dialog) .task-action-panel{background:#f4f6f8}
@media(max-width:700px){:is(#detail,.task-route-dialog) .task-action-panel{padding:14px}:is(#detail,.task-route-dialog) .task-action-panel :is(button,summary){min-height:42px}:is(#detail,.task-route-dialog) .task-action-panel :is(input,textarea){font-size:16px}}

#detail .task-action-panel #handover,#detail .task-action-panel #participants{grid-template-columns:minmax(0,1fr)}
#detail .task-action-panel #handover>label{grid-column:1/-1}

#detail .executor-outcome-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
#detail .executor-outcome-choices button{min-height:44px;font-weight:650}
#detail .executor-outcome-choices button[aria-expanded=true]{background:var(--ui-tab-selected);border-color:var(--ui-tab-selected-border)}
#detail .executor-blockers{display:grid;gap:8px}
#detail .executor-blockers[hidden],#detail #handover[hidden]{display:none!important}
#detail .task-action-panel .attachment-add{display:flex;align-items:center;justify-content:center;cursor:pointer;min-height:42px;border:1px solid var(--ui-tab-hover-border);border-radius:var(--ui-radius-control);padding:6px 12px;background:var(--ui-tab-hover)}
#detail .task-action-panel .form-file-list{display:grid;gap:6px;overflow-wrap:anywhere}

/* Description stays beside the title, independently of the selected work tab. */
#task-content .task-description-summary{position:relative;margin:10px 0 8px;padding:12px 40px 12px 14px;border:1px solid var(--line);border-radius:var(--ui-radius-panel);background:var(--glass-fill)}
.task-description-summary h3{font-size:12px;color:var(--muted);margin:0 0 6px}
.task-description-summary>.document-copy{max-height:6em;overflow:hidden;line-height:1.5;overflow-wrap:anywhere}
.task-description-summary>.document-copy>:first-child{margin-top:0}
.task-description-summary.description-expanded>.document-copy,.task-description-summary.inline-document-edit>.document-copy{max-height:none}
.task-description-summary.inline-document-edit>.description-expand{display:none}
.task-description-summary .description-expand{font-size:12px;padding:4px 8px;margin-top:6px;display:inline-flex;gap:6px;align-items:center;border-radius:var(--ui-radius-control)}
.description-expand svg{width:14px;height:14px}.description-expanded .description-expand svg{transform:rotate(180deg)}
#task-subscription{margin:2px 0 6px}#task-subscription button{font-size:12px;padding:4px 9px;min-height:28px;gap:5px}#task-subscription svg{width:15px;height:15px}
.compact-title-badges .task-emergency-control{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:5px 9px;border:1px solid var(--line);border-radius:var(--ui-radius-chip);margin:0;cursor:pointer;color:var(--muted);background:var(--glass-fill)}
.task-emergency-control input{width:14px;height:14px;margin:0;accent-color:var(--ui-required)}
.compact-title-badges .task-emergency-control.is-stopped{color:var(--ui-required);border-color:var(--ui-required-border);background:var(--ui-required-fill);font-weight:700}
#task-edit-all{display:flex;gap:6px;align-items:center}#task-edit-all svg{width:16px;height:16px}
@media(max-width:700px){#task-content .task-description-summary{padding-left:10px;margin-top:8px}.compact-title-badges .task-emergency-control{max-width:100%;white-space:normal}}

/* Long titles keep the full line; status and stopped marker share the next row. */
body #detail.compact-task .compact-title-row{display:block;padding-right:0}
body #detail.compact-task .compact-title-badges{max-width:100%;justify-content:flex-start;margin-top:10px}
body #detail.compact-task .compact-title-badges .status-chip{display:inline-flex}

/* A single visible reviewer summary and a follow action in its corner. */
#detail .task-header-reviewers{position:relative;min-width:180px}
#detail .task-header-reviewers>.reviewer-follow,.mobile-reviewer-slot>.reviewer-follow{position:absolute;right:0;top:0;display:inline-flex;align-items:center;gap:3px;width:auto;max-width:none;min-height:22px;height:auto;padding:2px 5px;font-size:10px;line-height:1.3;border-radius:var(--ui-radius-chip)}
#detail .reviewer-follow svg{width:12px;height:12px}
#detail .reviewer-follow[aria-pressed=true]{background:var(--ui-tab-selected);border-color:var(--ui-tab-selected-border)}
#detail .compact-task-state>summary>small{display:block;font-size:10px;font-weight:500;color:var(--muted)}
#detail .state-readonly>summary{cursor:default}#detail .state-readonly>summary svg{display:none}
#detail .task-phase-note{background:none;border:0;border-left:2px solid var(--line);padding:2px 0 2px 10px;margin-bottom:12px;font-size:11px;line-height:1.45;color:var(--muted);box-shadow:none}
#task-content>.meta:empty{display:none}
@media(max-width:700px){
 #detail .task-responsible-summary .mobile-reviewer-slot{position:relative;padding-right:62px}
 #detail .task-responsible-summary .mobile-reviewer-slot>.reviewer-follow{min-height:26px;font-size:10px}
}

#detail .task-header-reviewers>button:not(.reviewer-follow){padding-right:65px}
#detail .task-header-reviewers>.reviewer-follow{top:20px;right:5px}
#detail>.detail-head>#task-subscription{display:contents}
#detail>.detail-head>#task-subscription>.task-save-error:not([hidden]){position:absolute;right:12px;top:100%;z-index:45;max-width:320px;padding:12px;border:1px solid var(--ui-required-border);border-radius:var(--ui-radius-panel);background:var(--ui-message-in);color:var(--ink)}

/* Follow sits in the reviewer caption row; names keep the full field width. */
#detail .task-header-reviewers{min-width:160px}
#detail .task-header-reviewers>small{display:block;min-height:26px;padding-right:28px;box-sizing:border-box}
#detail .task-header-reviewers>button:not(.reviewer-follow){padding-right:10px}
#detail .task-header-reviewers>.reviewer-follow,#detail .mobile-reviewer-slot>.reviewer-follow{top:0;right:0;width:24px;height:24px;min-height:24px;padding:4px;border:0;background:transparent}
#detail .reviewer-follow svg{width:16px;height:16px}
#detail .reviewer-follow:hover{background:var(--ui-tab-hover)}
#detail .reviewer-follow[aria-pressed=true]{color:var(--ui-tab-selected-text);background:var(--ui-tab-selected)}
body #detail.compact-task .compact-title-row{display:flex;flex-direction:column;align-items:stretch}
body #detail.compact-task .compact-title-badges{order:-1;justify-content:flex-end;margin:0 0 8px;padding:0;max-width:100%}
@media(max-width:700px){
 #detail .task-responsible-summary .mobile-reviewer-slot{padding-right:0}
 #detail .task-responsible-summary .mobile-reviewer-slot>small{min-height:30px;padding-right:30px}
 #detail .task-responsible-summary .mobile-reviewer-slot>.reviewer-follow{width:28px;height:28px;min-height:28px}
}

/* One caption baseline and one field baseline; medium windows get a whole row. */
@media(min-width:701px){
 body #detail.compact-task>.detail-head{align-items:flex-start}
 body #detail.compact-task>.detail-head>:is(.compact-task-controls,.compact-task-state,.compact-task-next,.task-link-actions,#back,#close,#ux-task-menu){align-self:flex-start}
 #detail .compact-task-controls #task-settings,#detail .compact-task-controls #task-settings>.settings-grid{align-items:flex-start}
 #detail .compact-task-controls #task-settings>.settings-grid>label,#detail .assignee-hint-field>label{gap:4px}
 #detail .compact-task-controls #task-settings>.settings-grid>label>small,#detail .assignee-hint-field>label>small,#detail .compact-task-state>summary>small{display:block;height:20px;min-height:20px;font-size:10px;line-height:20px;box-sizing:border-box}
 #detail .compact-task-controls .ux-extra-settings{align-self:flex-start;margin-top:24px}
 #detail .compact-task-controls .ux-extra-settings>summary::before{top:-24px;line-height:20px}
 body #detail.compact-task>.detail-head>:is(.compact-task-next,.task-link-actions,#back,#close,#ux-task-menu){margin-top:24px}
 #detail .compact-task-state>summary{gap:4px}
 #detail .task-header-reviewers>.reviewer-follow{width:20px;height:20px;min-height:20px;padding:2px}
}
@media(min-width:701px) and (max-width:1100px){
 body #detail.compact-task>.detail-head{flex-wrap:wrap}
 body #detail.compact-task>.detail-head>.compact-task-controls{order:5;flex:1 0 100%;width:100%;margin:8px 0 0}
}
body #detail.compact-task .compact-title-row{gap:8px}
body #detail.compact-task .compact-title-badges{margin-bottom:0}
#detail .inline-document-edit .document-input{min-height:160px;max-height:350px}
#detail .inline-document-edit .document-toolbar{row-gap:5px}
@media(min-width:701px) and (max-width:1100px){
 body #detail.compact-task .compact-task-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
 body #detail.compact-task .compact-task-tabs>button{min-width:0;white-space:normal}
}
@media(min-width:701px){#detail .compact-task-controls #task-settings>.settings-grid>label>select{min-width:110px}}

#task-content .task-status-reason{margin:8px 0 12px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--ui-radius-panel);background:var(--ui-tab-hover);overflow-wrap:anywhere}#task-content .task-status-reason h3{font-size:13px;margin:0 0 8px;color:var(--muted)}#task-content .task-status-reason .document-copy{font-size:14px;line-height:1.55;max-height:260px;overflow:auto}#task-content .task-status-reason img{max-width:100%;max-height:180px;object-fit:contain}

.task-subscribers-summary{display:flex;align-items:baseline;gap:6px 12px;flex-wrap:wrap;margin:6px 0 12px;font-size:12px;line-height:1.5}.task-subscribers-summary>span,.task-subscribers-empty{color:var(--muted)}.task-subscribers-summary>div{display:flex;flex-wrap:wrap;gap:4px 10px;min-width:0;max-height:78px;overflow:auto}.task-subscriber-name{color:var(--ink);overflow-wrap:anywhere;max-width:100%}

/* Keep full task editing actions beside the fields, outside their scroll area. */
#detail .task-edit-panel:popover-open{display:flex;flex-direction:column;overflow:hidden;gap:0}
#detail .task-edit-panel>header{flex:none}
#detail .task-edit-panel>.intake-editor{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:4px}
#detail .task-edit-panel>#task-edit-bar{position:static;flex:none;bottom:auto;left:auto;width:100%;box-sizing:border-box;margin:12px 0 0;padding:12px 0 0;border-radius:0;box-shadow:none;background:transparent;backdrop-filter:none}
#detail .task-edit-panel #task-edit-bar .task-edit-buttons{gap:8px}
#detail .task-edit-panel #task-edit-bar .task-edit-buttons button{padding:10px 8px}
#task-content .task-reopen-comment{white-space:pre-wrap}
#task-content .task-status-reason[data-tone="return"]{
 background:rgba(var(--action-rgb),.15);
 border-color:rgba(var(--action-rgb),.37);
 box-shadow:inset 3px 0 rgba(var(--action-rgb),.90);
}
#task-content .task-status-reason[data-tone="return"] h3{
 color:color-mix(in srgb,rgb(var(--action-rgb)) 78%,currentColor);
 font-size:14px;
 font-weight:700;
}
#task-content .task-reopen-details>summary{display:grid;gap:6px;color:inherit;border-radius:var(--ui-radius-control);list-style:none}
#task-content .task-reopen-details>summary::-webkit-details-marker{display:none}
#task-content .task-reopen-expand,#task-content .task-reopen-collapse{font-size:12px;color:var(--muted);text-decoration:underline}
#task-content .task-reopen-details:not([open]) .task-reopen-collapse,#task-content .task-reopen-details[open] .task-reopen-expand,#task-content .task-reopen-details[open]>summary>span:first-child{display:none}
