/* Small help controls, with an independent target beside the real action. */
.help-button{width:28px;min-width:28px;height:28px;padding:0;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--muted);font:600 13px/1 var(--font);vertical-align:middle;flex-shrink:0}.help-button:hover,.help-button[aria-expanded=true]{background:var(--blue-bg);border-color:var(--blue);color:var(--blue)}
.help-caption>.help-button{margin-left:8px}.help-caption:where(h1,h2,h3,dt){text-wrap:initial}.help-pair{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%}.help-pair>.btn{min-width:0}.nav-help{display:flex;width:100%;gap:4px}.nav-help>.nav-item{flex:1;min-width:0;width:auto;padding-inline:10px}.help-settings-link{margin-top:auto}.help-settings-link>.settings-link{margin-top:0}.help-pair:has(>[hidden]),.field-help:has(>.field[hidden]){display:none}
.field-help{position:relative;min-width:0}.field-help>.help-button{position:absolute;top:-4px;right:0}.field-help-label{padding-right:36px;display:block}.field-help>.field{width:100%}.help-filter{display:flex}.help-filter>.filter-label{min-width:0}.help-filter select{max-width:240px}.help-search{display:flex;margin-left:auto;max-width:310px;flex:1;min-width:180px}.help-search>.search-box{margin:0;min-width:0;flex:1;max-width:none}.help-search input{width:100%}.help-date{flex:1}.help-date>.filter-note-date{width:100%;min-width:0}.table-head .help-caption{display:flex;align-items:center;gap:4px}.table-head .help-caption>.help-button{margin-left:0;width:24px;min-width:24px;height:24px;font-size:12px}.tabs.help-caption>.help-button{align-self:center;margin:0 4px}.list-caption>.help-caption{display:inline-flex;align-items:center}.comment-form{position:relative}.comment-form textarea{padding-right:34px}.comment-help{position:absolute;top:14px;right:14px}.history-help-line{display:flex;align-items:center;gap:8px}.image-field-heading>.help-button{margin-left:auto}.help-pair>#remove-image{white-space:nowrap}.notification-actions>.help-pair{flex-wrap:wrap}.page-header{flex-wrap:wrap}.header-actions{max-width:100%}
.help-popover{position:fixed;inset:auto;margin:0;width:380px;max-width:calc(100vw - 24px);padding:0;border:1px solid var(--line);border-radius:var(--radius-card);background:var(--surface);color:var(--text);box-shadow:var(--shadow);z-index:1000;overflow:auto;font-size:14px;line-height:1.65;overscroll-behavior:contain}.help-popover-head{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 10px;background:var(--surface);border-bottom:1px solid var(--line);z-index:1}.help-popover-head h2{font-size:17px;line-height:1.4;font-weight:600;text-wrap:initial}.help-popover-head .icon-button{width:36px;height:36px}.help-popover-body{padding:4px 18px 18px}.help-popover-body p{margin:12px 0 0}.help-popover-body p:first-child{font-weight:500}.help-popover-body p+p{color:var(--muted)}
/* Native dialog has a default max-width; explicitly remove it for full-screen tasks. */
html:has(dialog[open]){overflow:hidden}.task-dialog{overscroll-behavior:contain}
@media(max-width:1140px){.task-filters>.help-search{margin-left:0;max-width:none}}
@media(max-width:650px){.help-button{width:30px;min-width:30px;height:30px}.page-header{gap:12px}.page-heading{max-width:100%}.page-header h1>.help-button{margin-left:6px}.header-actions>.help-pair{gap:4px}.task-dialog{inset:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;animation:task-fade 160ms var(--ease)}.task-dialog .dialog-top{padding-top:max(10px,env(safe-area-inset-top));padding-inline:max(16px,env(safe-area-inset-left))}.task-detail-body{padding-bottom:max(22px,env(safe-area-inset-bottom))}.mobile-task-tools.help-caption{gap:8px;align-items:center}.mobile-task-tools.help-caption>.help-button{margin-left:0}.mobile-task-tools .filter-toggle{padding-inline:10px}.task-filters>.help-search{width:100%;max-width:none;min-width:0}.task-filters .help-filter{width:100%}.task-filters .help-filter>.filter-label{flex:1}.help-filter select{width:100%;max-width:none}.filters:not(.task-filters)>.help-filter,.filters:not(.task-filters)>.help-search{grid-column:1/-1;width:100%;max-width:none;min-width:0}.filters:not(.task-filters)>.help-filter>.filter-label{flex:1}.filters:not(.task-filters)>.help-date{min-width:0}.filters:not(.task-filters)>.help-date>.help-button{width:26px;min-width:26px;height:26px}.field-help>.help-button{top:-4px}.help-popover{font-size:15px}.director-actions>.help-pair{max-width:100%}.director-actions .btn{flex:1}.notification-actions>.help-pair{display:flex;width:100%;flex-wrap:nowrap}.notification-actions>.help-pair>.btn{flex:1}.settings-buttons>.help-pair{display:flex}.settings-buttons>.help-pair>.btn{flex:1}.task-detail-title>.help-button{margin-left:6px}.task-dialog .dialog-top .help-caption{display:flex;align-items:center;gap:6px}.task-dialog .dialog-top .help-caption>.help-button{margin-left:0}}
@media(max-width:380px){.header-actions .help-pair>.help-button{width:28px;min-width:28px;height:28px}.page-header{gap:10px}.filters:not(.task-filters){grid-template-columns:1fr}.filters:not(.task-filters)>.help-date{grid-column:1/-1}.image-buttons>.help-pair{display:flex;width:100%}.image-buttons>.help-pair .text-link{flex:1}.mobile-task-tools .filter-toggle{font-size:13px}.help-popover-head{padding-inline:12px}.help-popover-body{padding-inline:14px}}
@keyframes task-fade{from{opacity:0}to{opacity:1}}

/* A local preference hides all help controls without leaving empty targets. */
html[data-help=off] :is(.help-button,.help-popover,.history-help-line){display:none!important}
html[data-help=off] .help-pair{gap:0}
html[data-help=off] .field-help-label{padding-right:0}
html[data-help=off] .comment-form textarea{padding-right:6px}
.help-preference{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:16px 0;margin:0 0 20px;border-block:1px solid var(--line);background:transparent;text-align:left;min-height:44px}
.help-preference-copy{display:grid;gap:6px;min-width:0}.help-preference-copy>span:first-child{font-size:14px;font-weight:600;line-height:1.45}.help-preference-copy>span:last-child{font-size:12px;font-weight:400;color:var(--muted);line-height:1.5}
.help-switch{display:grid;justify-items:center;gap:6px;min-width:68px;font-size:12px;font-weight:400;color:var(--muted)}
.help-switch-track{display:block;position:relative;width:44px;height:26px;padding:3px;border:1px solid var(--line);border-radius:20px;background:var(--hover);transition:background-color var(--speed) var(--ease),border-color var(--speed) var(--ease)}
.help-switch-thumb{display:block;width:18px;height:18px;border-radius:50%;background:var(--text);transform:translateX(0);transition:transform var(--speed) var(--ease),background-color var(--speed) var(--ease)}
.help-preference[aria-checked=true] .help-switch-track{background:var(--switch-on-bg,var(--blue));border-color:var(--switch-on-bg,var(--blue))}.help-preference[aria-checked=true] .help-switch-thumb{background:#fff;transform:translateX(18px)}
.help-preference:hover #help-toggle-label{color:var(--blue)}
