/* Task Manager & Scheduler (test) — js/tasks/*. Full-screen modal. Specs/175. */

.tsk-modal { padding: 0 !important; align-items: stretch !important; justify-content: stretch !important; }
.tsk-modal.active { display: flex; }
body.tsk-open { overflow: hidden; }
.tsk-shell {
    position: relative; display: flex; flex-direction: column;
    width: 100vw; height: 100vh; height: 100dvh;
    background: var(--ras-paper); color: var(--ras-text); font-family: var(--ras-font); font-size: var(--ras-fs-base);
}

/* Header — the Hub modal header (Maintenance, Safety): green, title + subtitle, close. */
.tsk-header {
    display: flex; align-items: center; justify-content: space-between; gap: var(--ras-space-4);
    padding: 12px var(--ras-space-5); background: var(--ras-green); color: var(--ras-on-dark);
}
.tsk-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tsk-title { font-size: var(--ras-fs-lg); font-weight: 700; }
.tsk-subtitle { font-size: var(--ras-fs-sm); color: var(--ras-on-dark-muted); }
.tsk-close {
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: var(--ras-on-dark);
    width: 32px; height: 32px; border-radius: var(--ras-radius); font-size: 20px; line-height: 1; cursor: pointer;
}
.tsk-close:hover { background: rgba(255,255,255,.22); }

/* Tab group + tools on the paper, under the header. */
.tsk-navrow {
    display: flex; align-items: center; gap: var(--ras-space-3); flex-wrap: wrap;
    padding: 12px var(--ras-space-5); background: var(--ras-paper); border-bottom: 1px solid var(--ras-line);
}
.tsk-nav { display: flex; gap: 2px; background: #F2F3F1; border-radius: 3px; padding: 3px; overflow-x: auto; max-width: 100%; }
.tsk-navbtn {
    appearance: none; border: 0; background: transparent; color: #4A4A45; padding: 8px 16px; border-radius: var(--ras-radius);
    font-family: var(--ras-font); font-size: var(--ras-fs-base); font-weight: 600; cursor: pointer; min-height: 36px; white-space: nowrap;
}
.tsk-navbtn:hover { color: var(--ras-green); }
.tsk-navbtn.is-active { background: var(--ras-surface); color: var(--ras-green); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tsk-head-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.tsk-proj-select { width: auto; min-width: 220px; max-width: 340px; }

.tsk-body { flex: 1; min-height: 0; overflow: auto; }

/* Shared bits */
.tsk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; flex: none; vertical-align: 0; }
.tsk-caret { display: inline-block; width: 14px; color: var(--ras-muted); flex: none; }
.tsk-bad { color: var(--ras-danger); font-weight: 600; font-style: normal; }
.tsk-good { color: var(--ras-green); }
.tsk-meter { display: inline-block; width: 90px; height: 6px; border-radius: var(--ras-radius); background: var(--ras-line); overflow: hidden; vertical-align: middle; }
.tsk-meter i { display: block; height: 100%; background: var(--ras-green); }
.tsk-meter--wide { width: 100%; flex: 1; }
.tsk-linkbtn { background: none; border: 0; padding: 0; color: var(--ras-info); cursor: pointer; text-align: left; font: inherit; }
.tsk-linkbtn:hover { text-decoration: underline; }
.tsk-x { background: none; border: 0; color: var(--ras-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.tsk-x--lg { font-size: 26px; }
.tsk-empty { margin: 60px auto; text-align: center; display: flex; gap: 10px; justify-content: center; align-items: center; }
.tsk-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px var(--ras-space-4); }
.tsk-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tsk-chips b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.tsk-search { width: 220px; }
.tsk-sel { width: auto; min-width: 150px; }
.tsk-toggle { display: inline-flex; gap: 5px; align-items: center; font-size: var(--ras-fs-sm); color: var(--ras-text); cursor: pointer; }
.tsk-pid { color: var(--ras-muted); font-size: var(--ras-fs-xs); margin-right: 6px; font-variant-numeric: tabular-nums; }
.tsk-linktag { font-size: var(--ras-fs-xs); font-weight: 700; color: var(--ras-info); background: var(--ras-info-soft); border-radius: 3px; padding: 0 5px; }

/* ============================ Tasks tab ============================ */
.tsk-board { padding-bottom: 40px; }
.tsk-board .tsk-toolbar { position: sticky; top: 0; z-index: 3; background: var(--ras-paper); border-bottom: 1px solid var(--ras-line); }
.tsk-proj-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 18px var(--ras-space-4) 6px; }
.tsk-proj-h h2 { margin: 0; font-size: var(--ras-fs-xl); color: var(--ras-ink); }
.tsk-group { margin: 0 var(--ras-space-4) 8px; background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-group-h {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; background: none; border: 0;
    cursor: pointer; text-align: left; font: inherit;
}
.tsk-group-h:hover { background: var(--ras-green-softer); }
.tsk-group-t { font-weight: 700; color: var(--ras-ink); }
.tsk-group-h .tsk-meter { margin-left: auto; }
.tsk-group-b { border-top: 1px solid var(--ras-line-soft); }
.tsk-stage { padding: 8px 12px 4px 40px; font-size: var(--ras-fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ras-muted); background: var(--ras-paper-2); }
.tsk-row {
    display: grid; grid-template-columns: 28px minmax(0, 1fr) 160px 170px 110px; gap: 10px; align-items: center;
    padding: 7px 12px; border-top: 1px solid var(--ras-line-soft); cursor: pointer;
}
.tsk-row:hover { background: var(--ras-green-softer); }
.tsk-row.is-sel { background: var(--ras-green-soft); }
.tsk-check { width: 17px; height: 17px; accent-color: var(--ras-green); cursor: pointer; }
.tsk-row-t { font-weight: 500; color: var(--ras-ink); }
.tsk-row--done .tsk-row-t { color: var(--ras-muted); text-decoration: line-through; }
.tsk-row--blocked .tsk-row-t { color: var(--ras-muted); }
.tsk-row-who { font-size: var(--ras-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-row-dates { font-size: var(--ras-fs-sm); color: var(--ras-muted); white-space: nowrap; }
.tsk-row-st { text-align: right; }
.tsk-wait { font-size: var(--ras-fs-xs); color: var(--ras-warn); }
.tsk-wait::before { content: "⧗ "; }
.tsk-crit { font-size: 9.5px; font-weight: 700; color: var(--ras-danger); border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; }
.tsk-foot { padding: 20px var(--ras-space-4); }

/* ===================== Dashboard + My tasks ======================== */
.tsk-dashpage, .tsk-mine { padding: 6px var(--ras-space-4) 40px; max-width: 1500px; margin: 0 auto; }
.tsk-dashpage-h, .tsk-mine-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 12px 0 10px; }
.tsk-dashpage-h h2, .tsk-mine-h h2 { margin: 0; font-size: 20px; color: var(--ras-ink); }
.tsk-dashpage .tsk-kpi-v { font-size: 28px; }
.tsk-dashpage .tsk-charts { margin-bottom: 10px; }
.tsk-charts--2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.tsk-li { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 4px; background: none; border: 0; border-bottom: 1px solid var(--ras-line-soft); text-align: left; cursor: pointer; font: inherit; }
.tsk-li:hover { background: var(--ras-green-softer); }
.tsk-li-t { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ras-ink); font-weight: 500; }
.tsk-li-t .ras-meta { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-li-r { flex: none; white-space: nowrap; }
.tsk-more { margin-top: 8px; }
.tsk-mine-h .tsk-me { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.tsk-kpis--mine { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tsk-blockers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.tsk-mine .tsk-group { margin: 0 0 10px; }
.tsk-group-h--static { cursor: default; }
.tsk-group-h--static:hover { background: none; }

/* ======================= Drawer + dialog =========================== */
.tsk-drawer {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 20;
    background: var(--ras-surface); box-shadow: var(--ras-shadow-drawer); transform: translateX(105%);
    transition: transform .18s ease-out; display: flex; flex-direction: column;
}
.tsk-drawer.is-open { transform: none; }
.tsk-drawer-head { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--ras-line); }
.tsk-drawer-title { margin: 4px 0 8px; font-size: var(--ras-fs-xl); color: var(--ras-ink); line-height: 1.25; }
.tsk-drawer-body { padding: 14px 16px 30px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.tsk-done-toggle { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--ras-green-line); background: var(--ras-green-softer); border-radius: var(--ras-radius); font-weight: 600; cursor: pointer; }
.tsk-done-toggle input { width: 18px; height: 18px; accent-color: var(--ras-green); }
.tsk-kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tsk-kv > div { background: var(--ras-paper-2); padding: 6px 8px; border-radius: var(--ras-radius); display: flex; flex-direction: column; gap: 2px; }
.tsk-kv b { font-size: var(--ras-fs-md); color: var(--ras-ink); }
.tsk-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; }
.tsk-sec { margin-top: 8px; }
.tsk-subs, .tsk-deps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tsk-subs label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.tsk-subs input { accent-color: var(--ras-green); margin-top: 2px; }
.tsk-deps li { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--ras-line-soft); }
.tsk-addlink { display: flex; gap: 6px; align-items: center; }
.tsk-addlink select:first-child { flex: 1; min-width: 0; }
.tsk-addlink-type { width: 64px; }
.tsk-addlink-lag { width: 64px; }
.tsk-dialog-wrap { position: absolute; inset: 0; z-index: 30; background: rgba(0,0,0,.35); display: none; align-items: center; justify-content: center; padding: 16px; }
.tsk-dialog-wrap.is-open { display: flex; }
.tsk-dialog { background: var(--ras-surface); width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: var(--ras-radius); box-shadow: var(--ras-shadow-modal); }
.tsk-dialog-body { padding: 14px 16px; overflow: auto; }
.tsk-dialog-foot { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--ras-line); flex-wrap: wrap; }
.tsk-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tsk-checks label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tsk-checks input { accent-color: var(--ras-green); }

/* ========================== Scheduler ============================== */
.tsk-sched { display: flex; flex-direction: column; min-height: 100%; }
.tsk-dash { padding: 4px var(--ras-space-4) 8px; border-bottom: 1px solid var(--ras-line); background: var(--ras-paper); }
.tsk-dash-h { background: none; border: 0; padding: 8px 0; font-weight: 700; font-size: var(--ras-fs-md); color: var(--ras-green); cursor: pointer; }
.tsk-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin-bottom: 10px; }
.tsk-kpi { background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); padding: 10px 12px; }
.tsk-kpi-v { font-size: 24px; font-weight: 700; color: var(--ras-green); font-variant-numeric: tabular-nums; line-height: 1.2; }
.tsk-kpi-v.tsk-bad { color: var(--ras-danger); }
.tsk-kpi-v.tsk-good { color: var(--ras-green); }
.tsk-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.tsk-card { background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); padding: 10px 12px; min-width: 0; }
.tsk-card-h { font-weight: 700; color: var(--ras-green); margin-bottom: 6px; }
.tsk-chart { width: 100%; height: auto; display: block; }
.tsk-bar-fill { fill: var(--ras-green); }
.tsk-chart g:hover .tsk-bar-fill { fill: var(--ras-green-hover); }
.tsk-axis { stroke: var(--ras-line-strong); stroke-width: 1; }
.tsk-ax { font-size: 9px; fill: var(--ras-muted); }
.tsk-val { font-size: 10px; font-weight: 700; fill: var(--ras-ink); }
.tsk-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: var(--ras-fs-xs); color: var(--ras-text); margin-bottom: 6px; }
.tsk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tsk-legend i { display: inline-block; width: 12px; height: 9px; border-radius: 2px; }
.tsk-load { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: center; font-size: var(--ras-fs-sm); padding: 3px 0; }
.tsk-load-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-load-bar { display: flex; gap: 2px; height: 10px; }
.tsk-load-bar i { display: block; height: 100%; border-radius: 0 3px 3px 0; }
.tsk-load-ok { background: var(--ras-green); }
.tsk-load-late { background: var(--ras-danger); }
.tsk-load-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tsk-health { padding: 6px 4px; border-bottom: 1px solid var(--ras-line-soft); cursor: pointer; }
.tsk-health:hover { background: var(--ras-green-softer); }
.tsk-health-row { display: flex; gap: 8px; align-items: center; margin: 3px 0; }

.tsk-toolbar--g { border-bottom: 1px solid var(--ras-line); background: var(--ras-surface); }
.tsk-lg-bar { background: #5B6CA8; }
.tsk-lg-crit { background: color-mix(in srgb, var(--ras-danger) 30%, white); border: 1px solid var(--ras-danger); }
.tsk-lg-late { background: var(--ras-surface); box-shadow: inset 0 -3px 0 var(--ras-danger); border: 1px solid var(--ras-line-strong); }
.tsk-legend .tsk-lg-ms { width: 9px; height: 9px; transform: rotate(45deg); background: var(--ras-ink); border-radius: 1px; }
.tsk-legend .tsk-lg-today { width: 2px; height: 12px; background: var(--ras-danger); border-radius: 0; }

/* Gantt grid */
.tsk-gantt { flex: 1; min-height: 420px; overflow: auto; position: relative; background: var(--ras-surface); }
.tsk-g-inner { position: relative; }
.tsk-gr { display: flex; height: 26px; border-bottom: 1px solid var(--ras-line-soft); }
.tsk-gr--head { height: 44px; position: sticky; top: 0; z-index: 6; background: var(--ras-paper-3); border-bottom: 1px solid var(--ras-line-strong); }
.tsk-grid {
    position: sticky; left: 0; z-index: 4; flex: none; width: 718px; display: flex;
    background: var(--ras-surface); border-right: 2px solid var(--ras-line-strong);
}
.tsk-grid--head { background: var(--ras-paper-3); z-index: 7; align-items: flex-end; }
.tsk-gc {
    flex: none; padding: 0 6px; display: flex; align-items: center; gap: 2px; font-size: var(--ras-fs-sm);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--ras-line-soft); height: 100%;
}
.tsk-grid--head .tsk-gc { font-weight: 700; color: var(--ras-muted); font-size: var(--ras-fs-xs); text-transform: uppercase; letter-spacing: .3px; height: 22px; }
.tsk-gc-name { display: block; line-height: 26px; }
.tsk-gc-id { width: 40px; justify-content: flex-end; color: var(--ras-muted); font-variant-numeric: tabular-nums; }
.tsk-gc-name { width: 230px; }
.tsk-gc-dur { width: 50px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
/* 88 px: a date with its year ("Mar 12, 2027") was cut off at 64 (Specs/212 §4). The grids grew by the same (670 → 718, 400 → 424). */
.tsk-gc-d { width: 88px; font-variant-numeric: tabular-nums; }
.tsk-gc-pred { width: 76px; color: var(--ras-muted); }
.tsk-gc-pct { width: 42px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.tsk-gc-who { width: 100px; border-right: 0; }
.tsk-gr--proj .tsk-grid, .tsk-gr--proj .tsk-tl { background: var(--ras-green-soft); }
.tsk-gr--proj .tsk-gc { font-weight: 700; color: var(--ras-ink); }
.tsk-gr--track .tsk-grid { background: var(--ras-paper-2); }
.tsk-gr--track .tsk-gc-name { font-weight: 600; color: var(--ras-ink); }
.tsk-gr--proj .tsk-grid, .tsk-gr--track .tsk-grid { cursor: pointer; }
.tsk-gr--task { cursor: pointer; }
.tsk-gr--task:hover .tsk-grid, .tsk-gr--task:hover .tsk-tl { background-color: var(--ras-green-softer); }
.tsk-gr--task.is-sel .tsk-grid, .tsk-gr--task.is-sel .tsk-tl { background-color: var(--ras-green-soft); }
.tsk-tick { color: var(--ras-green); font-weight: 700; margin-right: 4px; }

/* Gantt timeline */
.tsk-tl { position: relative; flex: none; height: 100%; }
.tsk-gh { display: flex; flex-direction: column; }
.tsk-gh-top, .tsk-gh-bot { position: relative; height: 22px; }
.tsk-gh-top { border-bottom: 1px solid var(--ras-line); }
.tsk-gh-cell { position: absolute; top: 0; height: 22px; line-height: 22px; padding-left: 4px; font-size: var(--ras-fs-xs); color: var(--ras-muted); white-space: nowrap; border-left: 1px solid var(--ras-line); }
.tsk-gh-top .tsk-gh-cell { font-weight: 700; color: var(--ras-text); }
/* A month's name stays visible right of the frozen task names (inline left = the grid's width). */
.tsk-gh-stick { position: sticky; }
.tsk-gh-day { padding: 0; text-align: center; font-size: 9px; line-height: 10px; display: flex; flex-direction: column; justify-content: center; }
.tsk-gh-day b { font-size: 10px; color: var(--ras-text); }
/* Weekends: a faint neutral grey (the warm --ras-paper-2 read as beige stripes through the chart, Specs/212 §4). */
.tsk-gh-day.is-we { background: color-mix(in srgb, var(--ras-line-soft) 40%, var(--ras-surface)); }
.tsk-g-rows { position: relative; }
.tsk-g-bg { position: absolute; top: 0; z-index: 0; pointer-events: none; }
.tsk-g-we { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ras-line-soft) 40%, var(--ras-surface)); }
/* The task-name side draws its own row divider: the chart's background layer (weekend columns) lies over the rows'
   bottom border and showed through the 1 px gap under each name as broken lines and white bands. */
.tsk-gr:not(.tsk-gr--head) > .tsk-grid { box-shadow: 0 1px 0 var(--ras-line-soft); }
.tsk-g-wk { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ras-line-soft); }
.tsk-g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ras-danger); opacity: .75; }
.tsk-g-arrows { position: absolute; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
.tsk-arrow { fill: none; stroke: #8E8E86; stroke-width: 1.1; }
.tsk-arrow.is-crit { stroke: var(--ras-danger); stroke-width: 1.4; }
.tsk-arrow-head { fill: #8E8E86; }
.tsk-arrow-head.is-crit { fill: var(--ras-danger); }
.tsk-gr .tsk-tl { z-index: 2; }
.tsk-gr--proj .tsk-tl, .tsk-gr--track .tsk-tl { z-index: 2; }

.tsk-bar {
    position: absolute; top: 6px; height: 14px; border-radius: 4px; overflow: hidden;
    background: color-mix(in srgb, var(--c) 30%, white); border: 1px solid var(--c);
}
.tsk-bar i { display: block; height: 100%; background: var(--c); }
.tsk-bar--done { opacity: .55; }
.tsk-bar--late, .tsk-bar--overdue { box-shadow: inset 0 -3px 0 var(--ras-danger); }
.tsk-bar--blocked { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, white) 0 4px, white 4px 7px); }
/* .tsk-bar.is-crit: the whole bar turns red, done-so-far fill included. The script sets --c to
   var(--ras-danger) on the bar itself (an inline --c would win over a rule here). Specs/219. */
.tsk-ms { position: absolute; top: 7px; width: 11px; height: 11px; transform: rotate(45deg); background: var(--ras-ink); border-radius: 1px; }
.tsk-ms.is-done { background: var(--ras-green); }
.tsk-ms.is-crit { background: var(--ras-danger); }
.tsk-sum { position: absolute; top: 9px; height: 8px; background: color-mix(in srgb, var(--c, #37352F) 35%, white); border: 1px solid var(--c, #37352F); }
.tsk-sum i { display: block; height: 100%; background: var(--c, #37352F); }
.tsk-sum::before, .tsk-sum::after { content: ""; position: absolute; bottom: -5px; border: 4px solid transparent; border-top-color: var(--c, #37352F); }
.tsk-sum::before { left: -5px; }
.tsk-sum::after { right: -5px; }
.tsk-sum--proj { --c: var(--ras-ink); top: 8px; height: 10px; }
.tsk-due { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--ras-danger); font-size: 9px; color: var(--ras-danger); padding-left: 3px; font-weight: 700; line-height: 26px; }
.tsk-bar-lbl { position: absolute; top: 0; line-height: 26px; font-size: var(--ras-fs-xs); color: var(--ras-muted); white-space: nowrap; pointer-events: none; }
.tsk-unsched { font-style: italic; }
/* Gantt look (Specs/206): float, initials after the bar, "N d late", the Today tag, the Show group. */
.tsk-float { position: absolute; top: 9px; height: 8px; border-radius: 0 3px 3px 0; background: repeating-linear-gradient(135deg, #A8A8A0 0 1.5px, transparent 1.5px 5px); }
.tsk-bar-who { position: absolute; top: 4px; height: 18px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.tsk-g-av { width: 18px; height: 18px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; object-fit: cover; font-size: 9px; font-weight: 700; color: #fff; background: var(--ras-green); box-shadow: 0 0 0 1.5px var(--ras-surface); }
.tsk-g-late { background: var(--ras-surface); border-radius: 3px; padding: 0 3px; }
.tsk-g-av.is-role { background: var(--ras-paper-3); color: var(--ras-text); }
.tsk-g-more { font-size: var(--ras-fs-xs); color: var(--ras-muted); }
.tsk-g-late { margin-left: 4px; font-size: var(--ras-fs-xs); font-weight: 600; color: var(--ras-danger); }
.tsk-gh-now { position: absolute; top: 3px; z-index: 1; transform: translateX(-50%); padding: 0 6px; border-radius: 3px; background: var(--ras-danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; }
.tsk-g-show { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Zoom + Today / Expand / Collapse, and Group by / Filter / PDF: spaced as the toolbar, one box each for the walkthrough (Specs/209 §19). */
.tsk-g-group { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tsk-legend .tsk-lg-float { background: repeating-linear-gradient(135deg, #A8A8A0 0 1.5px, transparent 1.5px 5px); }
/* The striped "waiting" bar (.tsk-bar--blocked) in the legend, drawn the same way. */
.tsk-legend .tsk-lg-wait { background: repeating-linear-gradient(135deg, color-mix(in srgb, #5B6CA8 18%, white) 0 3px, white 3px 5px); border: 1px solid #5B6CA8; }
/* Taller rows (30 px, _TSK_ROW) with everything in them re-centred. Not the header row. */
.tsk-gr:not(.tsk-gr--head) { height: 30px; }
.tsk-gr:not(.tsk-gr--head) .tsk-gc-name, .tsk-bar-lbl, .tsk-due { line-height: 30px; }
.tsk-bar { top: 8px; }
.tsk-ms { top: 9px; }
.tsk-sum { top: 11px; height: 7px; }
.tsk-sum--proj { top: 10px; height: 9px; }
.tsk-float { top: 11px; }
.tsk-bar-who { top: 6px; }
/* Dragging bars (Specs/206): grab a bar to move it, its right end to change its length. */
.tsk-bar[data-drag], .tsk-ms[data-drag] { cursor: move; }
.tsk-bar[data-drag], .tsk-ms[data-drag], .tsk-link-dot { touch-action: pan-y; }   /* a pen drag along the bar isn't taken over as a scroll */
/* Drawing links: a dot at each end of a draggable bar (shown on the row's hover), a dashed line while drawing,
   the task under the pointer outlined green (red when the link isn't allowed). */
.tsk-link-dot { position: absolute; top: 10px; z-index: 1; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ras-green); background: var(--ras-surface); cursor: crosshair; opacity: 0; transition: opacity .12s; }
.tsk-gr--task:hover .tsk-link-dot, body.tsk-g-linking .tsk-link-dot { opacity: 1; }
.tsk-link-dot:hover { background: var(--ras-green); }
body.tsk-g-linking, body.tsk-g-linking * { cursor: crosshair !important; user-select: none; }
body.tsk-g-linking .tsk-tip { display: none !important; }
.tsk-g-linkline { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.tsk-g-linkpath { fill: none; stroke: var(--ras-green); stroke-width: 1.6; stroke-dasharray: 5 3; }
.tsk-g-linkpath.is-bad { stroke: var(--ras-danger); }
.tsk-g-linkhead { fill: var(--ras-green); }
.tsk-g-linkhead.is-bad { fill: var(--ras-danger); }
.tsk-gr--task.is-link-target .tsk-bar, .tsk-gr--task.is-link-target .tsk-ms { outline: 2px solid var(--ras-green); outline-offset: 2px; }
.tsk-gr--task.is-link-target.is-bad .tsk-bar, .tsk-gr--task.is-link-target.is-bad .tsk-ms { outline-color: var(--ras-danger); }
/* Drawing dates on an undated task's row: a crosshair there (not the panning hand) and a hint on hover. */
.tsk-gantt .tsk-gr--task[data-undated] .tsk-tl { cursor: crosshair; }
.tsk-undated-hint { opacity: 0; transition: opacity .12s; }
.tsk-gr--task[data-undated]:hover .tsk-undated-hint { opacity: 1; }
body.tsk-g-drawing, body.tsk-g-drawing * { cursor: crosshair !important; user-select: none; }
body.tsk-g-drawing .tsk-tip { display: none !important; }
/* The Stages Filter under the Scheduler's toolbar (Specs/206): the same panel and "Showing only" chips as in Stages. */
.tsk-g-filter { padding: 0 12px; }
.tsk-g-filter:empty { display: none; }
/* Panning: the empty timeline shows a hand; while panning, a closed hand everywhere. */
.tsk-gantt .tsk-tl { cursor: grab; }
body.tsk-g-panning, body.tsk-g-panning * { cursor: grabbing !important; user-select: none; }
.tsk-bar-grip { position: absolute; top: 0; right: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.tsk-bar[data-drag]:hover .tsk-bar-grip { background: color-mix(in srgb, var(--c) 70%, white); border-left: 1px solid var(--c); }
/* The darker fill sets % complete: drag it, or the thin handle at its edge (also there at 0 %). */
.tsk-bar[data-drag] > i { cursor: col-resize; }
.tsk-bar-pgrip { position: absolute; top: 0; bottom: 0; width: 8px; cursor: col-resize; }
.tsk-bar[data-drag]:hover .tsk-bar-pgrip { background: linear-gradient(var(--c), var(--c)) center / 2px 100% no-repeat; }
.tsk-bar.is-dragging, .tsk-ms.is-dragging { opacity: .35; }
/* The selected bar (Specs/206): the arrow keys move it. */
.tsk-bar.is-picked, .tsk-ms.is-picked { outline: 2px solid var(--ras-green); outline-offset: 2px; }
body.tsk-g-dragging, body.tsk-g-dragging * { cursor: grabbing !important; user-select: none; }
body.tsk-g-dragging .tsk-tip { display: none !important; }
.tsk-g-ghosts { position: absolute; top: 0; z-index: 3; pointer-events: none; }
.tsk-g-ghost { position: absolute; height: 14px; border: 1.5px dashed var(--ras-ink); border-radius: 4px; background: color-mix(in srgb, var(--ras-ink) 6%, transparent); }
.tsk-g-ghost.is-self { border-color: var(--ras-green); background: color-mix(in srgb, var(--ras-green) 14%, transparent); }
.tsk-g-ghost.is-other { border-color: var(--ras-warn-strong); }
.tsk-g-ghost.is-ms { width: 11px; height: 11px; border-radius: 1px; transform: rotate(45deg); }
.tsk-g-dtip { position: fixed; z-index: 10051; display: none; pointer-events: none; max-width: 340px; padding: 7px 10px; border: 1px solid var(--ras-line-strong); border-radius: 6px; background: var(--ras-surface); color: var(--ras-text); font-size: var(--ras-fs-sm); line-height: 1.45; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.tsk-g-dtip b { color: var(--ras-ink); }
.tsk-g-dtip .is-warn { color: var(--ras-warn); }
.tsk-g-toast { position: fixed; z-index: 10052; left: 50%; bottom: 24px; transform: translateX(-50%); display: none; align-items: center; gap: 10px; max-width: min(92vw, 640px); padding: 8px 10px 8px 14px; border-radius: 6px; background: var(--ras-ink); color: #fff; font-size: var(--ras-fs-sm); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.tsk-g-toast button { flex: none; padding: 3px 10px; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.tsk-g-toast button:hover { background: rgba(255,255,255,.12); }
.tsk-g-toast .tsk-g-toast-x { border: 0; padding: 0 4px; font-size: 16px; line-height: 1; }
@keyframes tskGMoved { from { box-shadow: 0 0 0 3px #E8C35A; } to { box-shadow: 0 0 0 3px transparent; } }
.tsk-bar.is-moved, .tsk-ms.is-moved { animation: tskGMoved 2.6s ease-out; }
/* A narrow grid by default: task name, finish and % (Show › All columns brings the rest back). Wide screens only:
   the phone layout below keeps its own 260 px grid. */
@media (min-width: 861px) {
    .tsk-sched--compact .tsk-grid { width: 424px; }
    .tsk-sched--compact .tsk-gc-id, .tsk-sched--compact .tsk-gc-dur, .tsk-sched--compact .tsk-gc-start,
    .tsk-sched--compact .tsk-gc-pred, .tsk-sched--compact .tsk-gc-who { display: none; }
    .tsk-sched--compact .tsk-gc-name { width: 294px; }
}

.tsk-tip {
    position: fixed; z-index: 10050; display: none; pointer-events: none; max-width: 360px;
    background: var(--ras-surface); color: var(--ras-text); border: 1px solid var(--ras-line-strong);
    border-radius: 6px; padding: 6px 9px; font-size: var(--ras-fs-sm); box-shadow: 0 6px 18px rgba(0,0,0,.14);
}

@media (max-width: 860px) {
    .tsk-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
    .tsk-row-who, .tsk-row-dates { display: none; }
    .tsk-search { width: 100%; }
    .tsk-kv { grid-template-columns: repeat(2, 1fr); }
    .tsk-grid { width: 260px; }
    .tsk-gc-dur, .tsk-gc-d, .tsk-gc-pred, .tsk-gc-pct, .tsk-gc-who { display: none; }
    .tsk-gc-name { width: 220px; }
    .tsk-head-tools { margin-left: 0; width: 100%; }
}

/* ---- Saved-in-the-Hub state, project dialog ---- */
.tsk-savestate { font-weight: 600; }
.tsk-savestate.is-bad { color: #FFB4A8; }
.tsk-span2 { grid-column: span 2; }
.tsk-span-all { grid-column: 1 / -1; }
.tsk-dialog--narrow { width: min(560px, 100%); }
.tsk-page { padding-bottom: 30px; }

@media (max-width: 860px) {
    .tsk-span2 { grid-column: auto; }
}
}

/* ---- Floors tab: Floor Design Checklist (js/tasks/tasks-floors.js), in the Hub's own style ---- */
.tsk-fl { color: var(--ras-text); }
.tsk-fl .stepper {
    display: flex; gap: var(--ras-space-5); align-items: stretch; flex-wrap: wrap;
    background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); padding: 14px 16px;
}
.tsk-fl .gauge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 120px; padding-right: var(--ras-space-5); border-right: 1px solid var(--ras-line); }
.tsk-fl .gauge .ring { position: relative; width: 92px; height: 92px; }
.tsk-fl .gauge svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.tsk-fl .gauge .trk { fill: none; stroke: var(--ras-paper-3); stroke-width: 9; }
.tsk-fl .gauge .val { fill: none; stroke: var(--ras-green); stroke-width: 9; stroke-linecap: butt; transition: stroke-dashoffset .4s ease; }
.tsk-fl .gauge .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: var(--ras-green); font-variant-numeric: tabular-nums; }
.tsk-fl .gauge .pct small { font-size: 12px; color: var(--ras-muted); margin-left: 1px; }
.tsk-fl .gauge .cap { font-size: var(--ras-fs-xs); color: var(--ras-muted); text-align: center; line-height: 1.3; }
.tsk-fl .gauge .cap b { color: var(--ras-ink); }
.tsk-fl .lvls { display: grid; gap: 6px; flex: 1; min-width: 0; align-content: center; }
.tsk-fl .lvl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tsk-fl .lvl .name { width: 92px; font-size: var(--ras-fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ras-muted); display: flex; align-items: center; gap: 5px; }
.tsk-fl .lvl .name .tick { color: var(--ras-green); font-size: 12px; }
.tsk-fl .lvlpct { margin-left: auto; min-width: 40px; text-align: right; font-size: var(--ras-fs-sm); font-weight: 700; color: var(--ras-ink); font-variant-numeric: tabular-nums; }
.tsk-fl .lvlpct.full { color: var(--ras-green); }
.tsk-fl .step {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; cursor: pointer;
    background: var(--ras-surface); border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius);
    font-family: var(--ras-font); font-size: var(--ras-fs-sm); color: var(--ras-text);
}
.tsk-fl .step:hover { border-color: var(--ras-green); }
.tsk-fl .step .ic { width: 14px; height: 14px; border: 2px solid var(--ras-line-strong); border-radius: 50%; display: grid; place-items: center; font-size: 9px; color: var(--ras-on-dark); flex: none; }
.tsk-fl .step b { font-weight: 700; }
.tsk-fl .step .pr { font-size: var(--ras-fs-xs); color: var(--ras-muted); font-variant-numeric: tabular-nums; }
.tsk-fl .step.done { background: var(--ras-green-soft); border-color: var(--ras-green-line); color: var(--ras-green-deep); }
.tsk-fl .step.done .ic { background: var(--ras-green); border-color: var(--ras-green); }
.tsk-fl .step.done .ic::before { content: "✓"; }
.tsk-fl .step.current .ic { border-color: var(--ras-green); }
.tsk-fl .step.locked { background: var(--ras-paper-2); color: var(--ras-muted-soft); border-style: dashed; }
.tsk-fl .step.locked .ic { border-color: var(--ras-line); }
.tsk-fl .step.sel { border-color: var(--ras-green); box-shadow: inset 0 -3px 0 var(--ras-green); }

.tsk-fl .phasehead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.tsk-fl .phasehead h2 { margin: 0; font-size: 20px; color: var(--ras-ink); }
.tsk-fl .phasehead .sub { color: var(--ras-muted); font-size: var(--ras-fs-base); }
.tsk-fl .prog { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: var(--ras-fs-sm); color: var(--ras-muted); }
.tsk-fl .prog .bar { width: 160px; height: 6px; background: var(--ras-paper-3); border-radius: var(--ras-radius); overflow: hidden; }
.tsk-fl .prog .bar i { display: block; height: 100%; background: var(--ras-green); transition: width .25s; }

/* Banners = the Hub's .ras-note family */
.tsk-fl .banner {
    display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px;
    padding: 9px var(--ras-space-3); border: 1px solid; border-left-width: 3px; border-radius: var(--ras-radius); font-size: var(--ras-fs-base);
}
.tsk-fl .banner.wait { background: var(--ras-warn-soft); border-color: var(--ras-warn); color: var(--ras-warn-strong); }
.tsk-fl .banner.ok { background: var(--ras-green-soft); border-color: var(--ras-green-line); border-left-color: var(--ras-green); color: var(--ras-green-deep); }
.tsk-fl .banner.lock { background: var(--ras-paper-2); border-color: var(--ras-line); border-left-color: var(--ras-line-strong); color: var(--ras-text); }
.tsk-fl .banner.bad { background: var(--ras-danger-soft); border-color: var(--ras-danger); color: var(--ras-danger); }
.tsk-fl .banner label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; color: var(--ras-text); }
.tsk-fl .chip { background: var(--ras-surface); border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius); padding: 1px 8px; font-size: var(--ras-fs-sm); color: var(--ras-text); }

/* Task list */
.tsk-fl .list { background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-fl .row { display: grid; grid-template-columns: 24px 130px minmax(0, 1fr) 150px; gap: 12px; align-items: start; padding: 10px 14px; border-bottom: 1px solid var(--ras-line-soft); }
.tsk-fl .row:last-child { border-bottom: 0; }
.tsk-fl .row:hover { background: var(--ras-green-softer); }
.tsk-fl .row.done .txt { color: var(--ras-muted); }
.tsk-fl .row.gated .txtcol, .tsk-fl .row.gated .tag { opacity: .45; pointer-events: none; }
.tsk-fl .row.gaterow { box-shadow: inset 3px 0 0 var(--ras-green); background: var(--ras-green-softer); }
.tsk-fl .row.gaterow .txt { font-weight: 700; }
.tsk-fl .cb { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ras-green); cursor: pointer; }
.tsk-fl .cb:disabled { cursor: not-allowed; opacity: .45; }
.tsk-fl .tag {
    display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px;
    font-size: var(--ras-fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ras-muted);
}
.tsk-fl .txt { font-size: var(--ras-fs-md); color: var(--ras-ink); line-height: 1.4; }
.tsk-fl .resp, .tsk-fl .req {
    display: inline-block; margin-left: 6px; padding: 0 7px; vertical-align: 1px; white-space: nowrap;
    font-size: var(--ras-fs-xs); font-weight: 700; border-radius: var(--ras-radius-pill);
}
.tsk-fl .resp { background: var(--ras-paper-3); color: var(--ras-text); }
.tsk-fl .resp.dsn { background: var(--ras-green-soft); color: var(--ras-green-deep); }
.tsk-fl .req { background: var(--ras-info-soft); color: var(--ras-info); }
.tsk-fl .mbtn { margin-left: 6px; vertical-align: 1px; }
.tsk-fl ul.subs { margin: 4px 0 0; padding-left: 18px; color: var(--ras-text); font-size: var(--ras-fs-base); }
.tsk-fl .spec { margin-top: 2px; font-size: var(--ras-fs-sm); color: var(--ras-muted); }
.tsk-fl .right { text-align: right; font-size: var(--ras-fs-xs); color: var(--ras-muted); padding-top: 2px; }
.tsk-fl .right .who { color: var(--ras-green); white-space: nowrap; }
.tsk-fl .ctrl { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.tsk-fl .opt {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; cursor: pointer;
    background: var(--ras-surface); border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius); font-size: var(--ras-fs-base);
}
.tsk-fl .opt:hover { border-color: var(--ras-green); }
.tsk-fl .opt input { accent-color: var(--ras-green); margin: 0; }
.tsk-fl .opt.on { border-color: var(--ras-green); background: var(--ras-green-soft); color: var(--ras-green-deep); }
.tsk-fl .opt small { color: var(--ras-muted); font-size: var(--ras-fs-xs); }
.tsk-fl .note { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 3px 9px; font-size: var(--ras-fs-sm); color: var(--ras-danger); background: var(--ras-danger-soft); border-radius: var(--ras-radius); }
.tsk-fl .note label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; color: var(--ras-text); }
.tsk-fl .fld {
    width: 100%; height: 34px; padding: 0 10px; font: inherit; font-size: var(--ras-fs-base); color: var(--ras-text);
    background: var(--ras-surface); border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius);
}
.tsk-fl textarea.fld { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }
.tsk-fl .fld:focus { outline: none; border-color: var(--ras-green); box-shadow: 0 0 0 2px var(--ras-green-soft); }
.tsk-fl .po { width: 150px; }
.tsk-fl .pob { font-size: var(--ras-fs-xs); color: var(--ras-green); white-space: nowrap; }
.tsk-fl .fldrow { display: flex; gap: 8px; width: 100%; align-items: center; }
.tsk-fl .fstamp { width: 100%; min-height: 15px; font-size: var(--ras-fs-xs); color: var(--ras-muted); }
.tsk-fl .fstamp b { color: var(--ras-green); }
.tsk-fl .lks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; width: 100%; }
.tsk-fl .lk { min-width: 0; }
.tsk-fl .lkl { display: block; margin-bottom: 3px; font-size: var(--ras-fs-xs); font-weight: 700; color: var(--ras-muted); text-transform: uppercase; letter-spacing: .3px; }
.tsk-fl .asgrow { display: flex; gap: 12px; flex-wrap: wrap; width: 100%; }
.tsk-fl .asg { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 200px; max-width: 320px; font-size: var(--ras-fs-xs); font-weight: 700; color: var(--ras-muted); text-transform: uppercase; letter-spacing: .3px; }
.tsk-fl .asg .fld { text-transform: none; letter-spacing: 0; font-weight: 400; }
.tsk-fl .ro-link a { color: var(--ras-info); word-break: break-all; }
.tsk-fl .ro-notes { white-space: pre-wrap; margin-top: 4px; padding: 8px 10px; font-size: var(--ras-fs-base); background: var(--ras-paper-2); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-fl .ro-by { color: var(--ras-muted); font-size: var(--ras-fs-xs); }
.tsk-fl .ro-none { color: var(--ras-muted); font-style: italic; font-size: var(--ras-fs-base); }
.tsk-fl .nextbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.tsk-fl-page .tsk-fl { max-width: 1120px; margin: 0 auto; padding: 0 var(--ras-space-4); }
.tsk-fl-hub { min-width: 300px; }
.tsk-fl-levels { margin: 0 var(--ras-space-4) 10px; display: flex; flex-direction: column; gap: 8px; }
.tsk-fl [hidden] { display: none !important; }

@media (max-width: 760px) {
    .tsk-fl .gauge { border-right: 0; padding-right: 0; width: 100%; flex-direction: row; gap: 12px; }
    .tsk-fl .row { grid-template-columns: 24px minmax(0, 1fr); }
    .tsk-fl .row .tag, .tsk-fl .row .txtcol, .tsk-fl .row .right { grid-column: 2; }
    .tsk-fl .row .right { text-align: left; }
    .tsk-fl .lks { grid-template-columns: 1fr; }
    .tsk-fl-hub { min-width: 0; width: 100%; }
}

/* ---- Dashboard charts ---- */
.tsk-kpi { display: flex; flex-direction: column; gap: 2px; }
.tsk-kpi-l { font-size: var(--ras-fs-sm); font-weight: 700; color: var(--ras-ink); }
.tsk-charts--main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); margin-bottom: 10px; }
.tsk-card { padding: 14px 16px; }
.tsk-card-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--ras-ink); font-size: var(--ras-fs-md); margin-bottom: 10px; }
.tsk-card-h .ras-meta { font-weight: 400; }
.tsk-gridline { stroke: var(--ras-line-soft); stroke-width: 1; }
.tsk-bar-done { fill: var(--ras-green); }
.tsk-bar-plan { fill: var(--ras-green-soft); stroke: var(--ras-green); stroke-width: 1.2; stroke-dasharray: 3 2; }
.tsk-bar-plan--thin { fill: none; }
.tsk-hit:hover .tsk-bar-done { fill: var(--ras-green-hover); }
.tsk-hit:hover .tsk-bar-plan { fill: #D3E8DF; }
.tsk-today-line { stroke: var(--ras-muted); stroke-width: 1; stroke-dasharray: 2 3; }
.tsk-ax--now { font-weight: 700; fill: var(--ras-ink); }
.tsk-legend i.tsk-lg-done { background: var(--ras-green); }
.tsk-legend i.tsk-lg-plan { background: var(--ras-green-soft); outline: 1.2px dashed var(--ras-green); outline-offset: -1px; }
.tsk-legend i.tsk-lg-fc { background: color-mix(in srgb, var(--ras-green) 35%, white); }
.tsk-legend i.tsk-lg-due { width: 3px; background: var(--ras-danger); border-radius: 0; }
.tsk-stack { position: relative; height: 22px; background: var(--ras-paper-3); border-radius: var(--ras-radius); overflow: hidden; margin: 6px 0 14px; }
.tsk-stack-seg { position: absolute; top: 0; bottom: 0; border-right: 2px solid var(--ras-surface); cursor: default; }
.tsk-stack-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.tsk-stack-legend div { display: flex; align-items: center; gap: 7px; font-size: var(--ras-fs-sm); }
.tsk-stack-legend div.is-zero { opacity: .45; }
.tsk-stack-legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.tsk-stack-legend b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ras-ink); }
.tsk-hbar { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: var(--ras-fs-sm); }
.tsk-hbar-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ras-text); }
.tsk-hbar-track { position: relative; height: 10px; background: var(--ras-paper-3); border-radius: var(--ras-radius); overflow: hidden; display: flex; gap: 2px; }
.tsk-hbar-track i { display: block; height: 100%; border-radius: 0 3px 3px 0; }
.tsk-hbar-track--split { background: none; }
.tsk-hbar-v { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tsk-hbar-v em { font-style: normal; font-size: var(--ras-fs-xs); }
.tsk-hbar:hover .tsk-hbar-n { color: var(--ras-ink); font-weight: 600; }
.tsk-timeline { position: relative; height: 10px; background: var(--ras-paper-3); border-radius: var(--ras-radius); margin: 6px 0 4px; }
.tsk-timeline-done { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ras-green); }
.tsk-timeline-fc { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ras-green) 35%, white); }
.tsk-timeline-due { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: var(--ras-danger); }
.tsk-health { padding: 8px 4px; }
.tsk-health-row { display: flex; align-items: center; gap: 8px; }

/* ---- Templates tab ---- */
.tsk-te { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--ras-space-4); padding: var(--ras-space-4) var(--ras-space-5) 40px; align-items: start; }
.tsk-te-side { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; }
.tsk-te-tpl { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; cursor: pointer; font: inherit; background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-te-tpl:hover { border-color: var(--ras-green); }
.tsk-te-tpl.is-active { border-color: var(--ras-green); box-shadow: inset 3px 0 0 var(--ras-green); background: var(--ras-green-softer); }
.tsk-te-tpl b { color: var(--ras-ink); }
.tsk-te-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tsk-te-head h2 { margin: 0; font-size: 20px; color: var(--ras-ink); }
.tsk-te-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tsk-te-phase { background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); margin-bottom: 12px; }
.tsk-te-phase-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--ras-line-soft); }
.tsk-te-swatch { width: 4px; align-self: stretch; border-radius: 2px; }
.tsk-te-phase-t { display: flex; flex-direction: column; }
.tsk-te-phase-t b { color: var(--ras-ink); font-size: var(--ras-fs-md); }
.tsk-te-tablewrap { border: 0; border-radius: 0; }
.tsk-te-table tbody tr { cursor: pointer; }
.tsk-te-name { color: var(--ras-ink); font-weight: 600; }
.tsk-te-notes { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-te-who { display: inline-block; margin: 0 4px 2px 0; padding: 0 7px; font-size: var(--ras-fs-xs); font-weight: 700; color: var(--ras-text); background: var(--ras-paper-3); border-radius: var(--ras-radius-pill); white-space: nowrap; }
.tsk-te-empty { padding: 12px 14px; }
.tsk-te-whopick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tsk-te-whopick .ras-chip { cursor: pointer; }
.tsk-te-q { margin: 0 0 12px; }
.tsk-te-scope { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin-bottom: 8px; cursor: pointer; border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius); }
.tsk-te-scope:has(input:checked) { border-color: var(--ras-green); background: var(--ras-green-softer); }
.tsk-te-scope input { margin-top: 3px; accent-color: var(--ras-green); }
.tsk-te-scope span { display: flex; flex-direction: column; gap: 2px; }
.tsk-te-log td { vertical-align: top; }
.tsk-te-diff div { font-size: var(--ras-fs-sm); }
.tsk-te-diff s { color: var(--ras-muted); }

/* ---- RFIs: ticket desk ---- */
.tsk-rfi .tsk-toolbar { padding: 12px var(--ras-space-5); }
.tsk-rfi-hub { min-width: 260px; }
.tsk-rfi-localnote { margin: 0 var(--ras-space-5) 10px; }
.tsk-rfi-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 var(--ras-space-5) 12px; }
.tsk-rfi-kpi { display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; font: inherit; padding: 10px 14px; background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-rfi-kpi:hover { border-color: var(--ras-green); }
.tsk-rfi-kpi b { font-size: 22px; color: var(--ras-green); font-variant-numeric: tabular-nums; }
.tsk-rfi-kpi span { font-size: var(--ras-fs-sm); color: var(--ras-muted); }
.tsk-rfi-kpi.is-bad b { color: var(--ras-danger); }
.tsk-rfi-kpi.is-info b { color: var(--ras-info); }
/* RFI desk overview (Specs/209): the first page while no RFI is picked. Three softly tinted tiles, one quiet line. */
.tsk-rfi-ov { padding: 26px 32px; display: flex; flex-direction: column; gap: 18px; }
.tsk-rfi-ov h3 { margin: 2px 0 0; font-size: 20px; font-weight: 600; color: var(--ras-ink); }
.tsk-rfi-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tsk-rfi-tile { display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; cursor: pointer; padding: 16px 18px; border: 0; border-radius: var(--ras-radius); }
.tsk-rfi-tile b { font-size: 38px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tsk-rfi-tile span { font-size: var(--ras-fs-sm); }
.tsk-rfi-tile:hover { filter: brightness(.97); }
.tsk-rfi-tile--gc { background: #FFF8E8; color: #8A5A00; }
.tsk-rfi-tile--ras { background: var(--ras-info-soft); color: var(--ras-info); }
.tsk-rfi-tile--late { background: var(--ras-danger-soft); color: var(--ras-danger); }
.tsk-rfi-ov-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; color: var(--ras-muted); font-size: var(--ras-fs-base); }
.tsk-rfi-ov-line b { color: var(--ras-ink); }
.tsk-rfi-ov-line .tsk-linkbtn { color: var(--ras-muted); padding: 0; font-size: inherit; }
.tsk-rfi-ov-line .tsk-linkbtn:hover { color: var(--ras-green); }
.tsk-rfi-ov-avg.is-good { color: var(--ras-green); }
.tsk-rfi-ov-avg.is-warn { color: var(--ras-warn-strong); }
.tsk-rfi-ov-avg.is-bad { color: var(--ras-danger); }
.tsk-rfi-ov-fold { align-self: flex-start; font-weight: 600; padding: 0; }
.tsk-rfi-ov-list { display: flex; flex-direction: column; border-top: 1px solid var(--ras-line); }
.tsk-rfi-ov-row { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; cursor: pointer; background: none; border: 0; border-bottom: 1px solid var(--ras-line-soft); padding: 9px 4px; }
.tsk-rfi-ov-row:hover { background: var(--ras-green-softer); }
.tsk-rfi-ov-name { flex: 1; color: var(--ras-ink); }
.tsk-rfi-ov-row .tsk-rfi-ov-avg { min-width: 90px; text-align: right; font-size: var(--ras-fs-sm); color: var(--ras-muted); }
.tsk-rfi-ovlink { display: inline-block; padding: 0; margin-bottom: 8px; font-weight: 600; }   /* "← Overview" above an open ticket */
@media (max-width: 1100px) { .tsk-rfi-tile b { font-size: 30px; } }
/* The counts strip, always on top of the desk (Specs/236): compact tiles that filter the list, the close-time line. */
.tsk-rfi-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 0 var(--ras-space-5) 12px; }
.tsk-rfi-strip .tsk-rfi-tiles { grid-template-columns: repeat(3, minmax(120px, 170px)); gap: 8px; }
.tsk-rfi-strip .tsk-rfi-tile { flex-direction: row; align-items: baseline; gap: 8px; padding: 8px 12px; border: 2px solid transparent; }
.tsk-rfi-strip .tsk-rfi-tile b { font-size: 24px; }
.tsk-rfi-strip .tsk-rfi-tile.is-active { border-color: currentColor; }
.tsk-rfi-tile--client { background: var(--ras-paper-2); color: var(--ras-ink); }
.tsk-rfi-strip .tsk-rfi-ov-line { font-size: var(--ras-fs-sm); }
/* The project dropdown on top of the left column: a box you click or type in; the list drops over the RFI list,
   by year, a project per row with its Hub number and open count (and how many are late). */
.tsk-rfi-projects { position: relative; z-index: 5; }
.tsk-rfi-pq { width: 100%; box-sizing: border-box; padding-right: 30px; background: var(--ras-surface); font-weight: 600; text-overflow: ellipsis; cursor: pointer; }
.tsk-rfi-projects.is-open .tsk-rfi-pq { font-weight: 400; cursor: text; }
.tsk-rfi-pcaret { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 4px 6px; font-size: 12px; color: var(--ras-muted); background: none; border: 0; cursor: pointer; }
.tsk-rfi-projects.is-open .tsk-rfi-pcaret { transform: translateY(-50%) rotate(180deg); }
.tsk-rfi-projdrop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; max-height: min(440px, calc(100vh - 220px)); overflow: hidden auto; padding: 4px; background: var(--ras-surface); border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius); box-shadow: var(--ras-shadow-modal); }
.tsk-rfi-projdrop[hidden] { display: none; }
.tsk-rfi-proj-code { flex: 0 0 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ras-fs-xs); color: var(--ras-muted); font-variant-numeric: tabular-nums; }
.tsk-rfi-year { padding: 8px 8px 2px; font-size: var(--ras-fs-xs); font-weight: 700; letter-spacing: .05em; color: var(--ras-muted); }
.tsk-rfi-proj { display: flex; align-items: center; gap: 6px; padding: 5px 8px; text-align: left; font: inherit; font-size: var(--ras-fs-sm); color: var(--ras-text); background: none; border: 0; border-radius: var(--ras-radius); cursor: pointer; }
.tsk-rfi-proj:hover { background: var(--ras-green-softer); }
.tsk-rfi-proj.is-sel { background: var(--ras-green-soft); color: var(--ras-green); font-weight: 600; }
.tsk-rfi-proj.is-hi { box-shadow: inset 0 0 0 2px var(--ras-green); }
.tsk-rfi-proj-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-rfi-proj-n { min-width: 18px; text-align: right; color: var(--ras-muted); font-variant-numeric: tabular-nums; }
/* The tile picked as a filter, shown next to the tabs with an × to clear it. */
.tsk-rfi-filter { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 4px 2px 8px; font-size: var(--ras-fs-xs); font-weight: 600; color: var(--ras-green); background: var(--ras-green-soft); border-radius: 999px; }
.tsk-rfi-filter .tsk-x { font-size: 14px; line-height: 1; padding: 0 2px; }
.tsk-rfi-desk { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; padding: 0 var(--ras-space-5); align-items: start; }
.tsk-rfi-desk.has-ai { grid-template-columns: 320px minmax(0, 1fr) 340px; }
.tsk-rfi-queue, .tsk-rfi-ticket, .tsk-rfi-ai { background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-rfi-queue { max-height: calc(100vh - 290px); overflow: auto; position: sticky; top: 0; }
/* Left: the project dropdown over the RFI list (sticky together). Right: the counts strip over the open RFI (Specs/236). */
.tsk-rfi-left { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tsk-rfi-left .tsk-rfi-queue { position: static; }
.tsk-rfi-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tsk-rfi-main .tsk-rfi-strip { padding: 0; }
/* Open · Closed · All (Specs/236): underlined tabs, dark words, a green bar and a filled count under the one picked. */
.tsk-rfi-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding: 0 6px; border-bottom: 1px solid var(--ras-line); background: var(--ras-surface); position: sticky; top: 0; z-index: 1; }
.tsk-rfi-tabs > button { margin-bottom: -1px; padding: 9px 8px 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ras-text); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.tsk-rfi-tabs > button:hover { color: var(--ras-ink); border-bottom-color: var(--ras-line-strong); }
.tsk-rfi-tabs > button span { display: inline-block; min-width: 10px; margin-left: 6px; padding: 0 6px; font-size: var(--ras-fs-xs); line-height: 17px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ras-text); background: var(--ras-line); border-radius: 999px; }
.tsk-rfi-tabs > button.is-active { font-weight: 700; color: var(--ras-green); border-bottom-color: var(--ras-green); }
.tsk-rfi-tabs > button.is-active span { color: #fff; background: var(--ras-green); }
.tsk-rfi-pad { padding: 16px; }
.tsk-rfi-item { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; padding: 10px 12px; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--ras-line-soft); cursor: pointer; }
.tsk-rfi-item:hover { background: var(--ras-green-softer); }
.tsk-rfi-item.is-sel { background: var(--ras-green-soft); box-shadow: inset 3px 0 0 var(--ras-green); }
.tsk-rfi-item.is-overdue { box-shadow: inset 3px 0 0 var(--ras-danger); }
.tsk-rfi-item.is-new .tsk-rfi-item-s { font-weight: 700; }
/* Who has to act: amber = with the GC (the Task Manager's own amber; the Hub's --ras-warn-strong reads as brown),
   blue = with RAS (ras-badge--info), red = overdue (ras-badge--danger). */
.tsk-rfi { --tsk-gc: #F5A524; --tsk-gc-soft: #FFF4DB; --tsk-gc-text: #B45309; }
.ras-badge.tsk-badge-gc { background: var(--tsk-gc-soft); color: var(--tsk-gc-text); }
/* The row's 3 px stripe in the same colours (red: .is-overdue above). After .is-sel, so the open row keeps its colour. */
.tsk-rfi-item.is-gc { box-shadow: inset 3px 0 0 var(--tsk-gc); }
.tsk-rfi-item.is-ras { box-shadow: inset 3px 0 0 var(--ras-info); }
/* An RFI that has ended: the stripe in its closing label's colour (the badges' colours below, Specs/235). */
.tsk-rfi-item.is-cl-accepted { box-shadow: inset 3px 0 0 var(--ras-green); }
.tsk-rfi-item.is-cl-rejected { box-shadow: inset 3px 0 0 #A8574B; }
.tsk-rfi-item.is-cl-escalated { box-shadow: inset 3px 0 0 #6B7A8F; }
.tsk-rfi-item.is-cl-not_applicable { box-shadow: inset 3px 0 0 #B4B2A9; }
.tsk-rfi-item.is-cl-si_forthcoming { box-shadow: inset 3px 0 0 #9B7FC4; }
.tsk-rfi-item.is-cl-voided { box-shadow: inset 3px 0 0 #2C2C2A; }
.tsk-rfi-item-top { display: flex; align-items: center; gap: 6px; }
.tsk-rfi-item-top b { color: var(--ras-ink); font-size: var(--ras-fs-sm); }
.tsk-rfi-item-s { color: var(--ras-ink); }
.tsk-rfi-ticket { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-height: 420px; }
.tsk-rfi-blank { display: grid; place-items: center; min-height: 380px; }
/* The SI log on an SI ticket (Specs/210). */
.tsk-si-log { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--ras-line); border-bottom: 1px solid var(--ras-line); }
.tsk-si-log .tsk-kv .ras-input { width: 100%; }
.tsk-si-cost { gap: 8px; align-items: center; }
.tsk-si-cost .ras-input { width: auto; }
.tsk-rfi-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.tsk-rfi-head h3 { margin: 4px 0 8px; font-size: var(--ras-fs-xl); color: var(--ras-ink); }
.tsk-rfi-head-t { flex: 1; min-width: 240px; }
.tsk-rfi-head-a { display: flex; gap: 6px; flex-wrap: wrap; }
.tsk-rfi-owner { width: 100%; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ras-ink); padding: 0; cursor: pointer; }
.tsk-rfi-text { white-space: pre-wrap; background: var(--ras-paper-2); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); padding: 10px 12px; }
.tsk-rfi-answer { padding: 10px 12px; background: var(--ras-green-soft); border: 1px solid var(--ras-green-line); border-left: 3px solid var(--ras-green); border-radius: var(--ras-radius); color: var(--ras-green-deep); }
.tsk-rfi-thread { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow: auto; padding-right: 4px; }
.tsk-msg { padding: 10px 12px; border: 1px solid var(--ras-line); border-left-width: 3px; border-radius: var(--ras-radius); background: var(--ras-surface); }
.tsk-msg.is-out { border-left-color: var(--ras-green); }
.tsk-msg.is-in { border-left-color: var(--ras-info); background: var(--ras-info-soft); }
.tsk-msg.is-note { border-left-color: #C99A2E; background: var(--ras-warn-soft); }
.tsk-msg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: var(--ras-fs-sm); }
.tsk-msg-h b { color: var(--ras-ink); }
.tsk-msg-h .ras-btn { margin-left: auto; }
.tsk-msg-b { white-space: pre-wrap; color: var(--ras-text); }
/* New RFI / Log SI as a task card (Specs/209): the task card's own classes (.tsk-sg-popd,
   .tsk-pop-*, features/stages/stages.css) plus these few. The project is a chip-like list in the
   top row; the subject's "Project - RFI 012 -" sits in grey in front of the big title; the
   buttons sit along the bottom. */
.tsk-rfi-projsel { font: inherit; font-size: var(--ras-fs-sm); color: var(--ras-text); background: var(--ras-surface); border: 1px solid var(--ras-line-strong); border-radius: 999px; padding: 2px 10px; max-width: 360px; }
.tsk-rfi-projsel:disabled { color: var(--ras-muted); background: var(--ras-paper-2); }
.tsk-rfi-subj-pre { font-size: 20px; font-weight: 600; color: var(--ras-muted-soft); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.tsk-rfi-subj-pre.is-empty { font-weight: 400; }
.tsk-rfi-card .tsk-pop-titlerow { gap: 8px; }
.tsk-rfi-card .tsk-pop-notes { border-color: var(--ras-line); }   /* a field to fill, not an optional note */
.tsk-rfi-card .tsk-pop-line .tsk-pp { width: auto; max-width: 340px; padding: 2px 10px 2px 3px; border-radius: 999px; }   /* the owner as a person chip */
.tsk-rfi-card .tsk-pop-line .tsk-pp-t span { display: none; }
.tsk-rfi-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--ras-line-soft); }
/* Green ✓ / red ✗ on an answer (Specs/209): stacked inside the card at its right edge, green right above red,
   centred top to bottom, always shown; the card is tall enough for both, so they never cross its border.
   Lightly filled; full colour under the pointer. */
.tsk-msg.has-verdict { position: relative; padding-right: 52px; min-height: 78px; flex-shrink: 0; }   /* never squeezed by the scrolling thread */
.tsk-rfi-verdict { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.tsk-rfi-verdict button { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; font: 600 15px/1 var(--ras-font); border-radius: var(--ras-radius); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.tsk-rfi-verdict .is-ok { background: var(--ras-green-soft); border: 1px solid var(--ras-green-line); color: var(--ras-green); }
.tsk-rfi-verdict .is-ok:hover, .tsk-rfi-verdict .is-ok:focus-visible { background: var(--ras-green); border-color: var(--ras-green); color: var(--ras-on-dark); }
.tsk-rfi-verdict .is-no { background: var(--ras-danger-soft); border: 1px solid #E8C5C5; color: var(--ras-danger); }
.tsk-rfi-verdict .is-no:hover, .tsk-rfi-verdict .is-no:focus-visible { background: var(--ras-danger); border-color: var(--ras-danger); color: var(--ras-on-dark); }
.tsk-rfi-verdict button:disabled { opacity: .5; cursor: default; }
.tsk-rfi-compose { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--ras-line); }
.tsk-rfi-modes { display: flex; gap: 2px; background: #F2F3F1; border-radius: 3px; padding: 3px; align-self: flex-start; }
.tsk-rfi-modes button { border: 0; background: none; padding: 6px 12px; font: inherit; font-size: var(--ras-fs-sm); font-weight: 600; color: #4A4A45; cursor: pointer; border-radius: var(--ras-radius); }
.tsk-rfi-modes button.is-active { background: var(--ras-surface); color: var(--ras-green); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tsk-rfi-histwrap summary { cursor: pointer; }
.tsk-rfi-hist { margin: 6px 0 0; padding-left: 18px; font-size: var(--ras-fs-sm); color: var(--ras-muted); }
.tsk-rfi-claude { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--ras-green-softer); border: 1px dashed var(--ras-green-line); border-radius: var(--ras-radius); }
/* Files on thread messages (tasks-rfis.js: files): images as thumbnails, PDFs as links */
.tsk-msg-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-size: var(--ras-fs-sm); }
.tsk-msg-thumb img { display: block; width: 88px; height: 66px; object-fit: cover; border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-msg-thumb:hover img { border-color: var(--ras-green); }
.tsk-msg-files a { color: var(--ras-green); text-decoration: none; }
.tsk-msg-files a:hover { text-decoration: underline; }
/* Markup drawings on a ticket (thumbnails reuse .tsk-fq-photos / .tsk-fq-ph) */
.tsk-rfi-photos { display: grid; gap: 6px; }
.tsk-rfi-addph { align-self: center; cursor: pointer; }
.tsk-rfi-addph.is-busy { opacity: .6; pointer-events: none; }
/* New RFI form: the Markup Drawing field; adding is a dashed tile as tall as a thumbnail */
.tsk-rfi-droptile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 72px; height: 72px; box-sizing: border-box;
    border: 1px dashed var(--ras-line-strong); border-radius: var(--ras-radius); background: var(--ras-paper-2); color: var(--ras-green); cursor: pointer; text-align: center; }
.tsk-rfi-droptile.is-empty { width: 100%; }
.tsk-rfi-droptile:hover { border-color: var(--ras-green); background: var(--ras-green-softer); }
.tsk-rfi-droptile small { color: var(--ras-muted); font-size: var(--ras-fs-xs); }
.tsk-rfi-drawings .tsk-fq-photos { gap: 6px; }   /* 3 tiles of 68 px fit one form column */
.tsk-rfi-drawings .tsk-fq-ph img, .tsk-rfi-drawings .tsk-rfi-droptile:not(.is-empty) { width: 68px; height: 68px; }
.tsk-rfi-drawings .tsk-rfi-droptile.is-empty { height: 68px; }
/* A PDF drawing: a tile the size of a thumbnail with its name (Specs/215). */
.tsk-rfi-pdftile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 72px; height: 72px; box-sizing: border-box;
    padding: 4px; border: 1px solid var(--ras-line); border-radius: var(--ras-radius); background: var(--ras-surface); text-align: center; }
.tsk-rfi-pdftile b { font-size: var(--ras-fs-xs); color: var(--ras-danger); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; }
.tsk-rfi-pdftile small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--ras-muted); }
.tsk-rfi-drawings .tsk-rfi-pdftile { width: 68px; height: 68px; }
a:hover > .tsk-rfi-pdftile { border-color: var(--ras-green); }
/* Files dragged over a drop area (the Markup Drawing field, a draft's strip, a reply's files). */
.tsk-rfi-drawings.is-dragover, .tsk-rfi-photos.is-dragover, .tsk-rfi-replyfiles.is-dragover, .tsk-rfi-followfiles.is-dragover {
    outline: 2px dashed var(--ras-green); outline-offset: 4px; border-radius: var(--ras-radius); background: var(--ras-green-softer); }
/* Reply to consultant: markup drawings picked for the reply; PDFs show as a 72px tile with the name */
.tsk-rfi-replyfiles, .tsk-rfi-followfiles { align-items: center; }   /* the follow-up window's strip too (Specs/209 §22) */
/* Reply to / Answer from consultant (Specs/238): the form's Markup Drawing look, a dashed tile; empty, one wide tile. */
.tsk-rfi-msgfiles { gap: 6px; align-items: stretch; }
.tsk-rfi-msgfiles .tsk-rfi-droptile.is-empty { height: 64px; padding: 0 12px; }
.tsk-rfi-replydoc { display: flex; align-items: center; width: 72px; height: 72px; padding: 4px; box-sizing: border-box; overflow: hidden; overflow-wrap: anywhere;
    font-size: var(--ras-fs-sm); line-height: 1.2; border: 1px solid var(--ras-line); border-radius: var(--ras-radius); background: var(--ras-paper-2); }
.tsk-rfi-contacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
/* Closing an RFI (Specs/235): the close window's labels as a column of choices, the closed badge with its label. */
.tsk-rfi-closelabels { display: grid; gap: 4px; margin: 6px 0; }
.tsk-rfi-closelabels label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--ras-line); border-radius: var(--ras-radius); cursor: pointer; }
.tsk-rfi-closelabels label:hover { background: var(--ras-green-softer); }
.tsk-rfi-closelabels label.is-on { border-color: var(--ras-green); background: var(--ras-green-soft); font-weight: 600; }
.tsk-rfi-closelabels input { accent-color: var(--ras-green); margin: 0; }
.tsk-rfi-closeans { white-space: pre-wrap; max-height: 140px; overflow: auto; }
/* One colour per closing label. Amber (With GC) and blue (With RAS) are left out: the list uses them for who acts. */
.tsk-rfi-closed { background: var(--ras-paper-2); color: var(--ras-ink); border: 1px solid var(--ras-line); }
.tsk-rfi-closed.is-accepted { background: var(--ras-green-soft); color: var(--ras-green); border-color: var(--ras-green-line); }
.tsk-rfi-closed.is-rejected { background: #F3E4E1; color: #7A2318; border-color: #C9958C; }   /* a darker, browner red than Overdue */
.tsk-rfi-closed.is-escalated { background: #E6EAF0; color: #34404F; border-color: #A9B4C2; }   /* slate */
.tsk-rfi-closed.is-not_applicable { background: var(--ras-paper-2); color: var(--ras-muted); border-color: var(--ras-line-strong); border-style: dashed; }
.tsk-rfi-closed.is-si_forthcoming { background: #F1ECF8; color: #6B4E96; border-color: #D9CCEB; }
.tsk-rfi-closed.is-voided { background: #EDEDE8; color: #2C2C2A; border-color: #2C2C2A; text-decoration: line-through; }   /* charcoal, struck through */
/* The close window's choices wear the same colours as the badges they make. */
.tsk-rfi-closelabels label[data-k="accepted"].is-on { border-color: var(--ras-green); background: var(--ras-green-soft); }
.tsk-rfi-closelabels label[data-k="rejected"].is-on { border-color: #A8574B; background: #F3E4E1; }
.tsk-rfi-closelabels label[data-k="escalated"].is-on { border-color: #6B7A8F; background: #E6EAF0; }
.tsk-rfi-closelabels label[data-k="not_applicable"].is-on { border-color: var(--ras-line-strong); background: var(--ras-paper-2); }
.tsk-rfi-closelabels label[data-k="si_forthcoming"].is-on { border-color: #9B7FC4; background: #F1ECF8; }
.tsk-rfi-closelabels label[data-k="voided"].is-on { border-color: #2C2C2A; background: #EDEDE8; }
/* Voided picked: its own hint; the label hint and the closing-email tick go (no email goes out). */
.tsk-rfi-closewin .tsk-rfi-voidhint, .tsk-rfi-closewin.is-void .tsk-rfi-closehint, .tsk-rfi-closewin.is-void .tsk-rfi-closemail { display: none; }
.tsk-rfi-closewin.is-void .tsk-rfi-voidhint { display: block; }
/* One RFI with several questions (Specs/234): the form's question boxes, each with its own photos, and the
   "Add from drafts" window over the form (a list of the project's drafts, a preview of the one clicked). */
.tsk-rfi-qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tsk-rfi-qtools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; font-weight: 400; }
.tsk-rfi-qs { display: grid; gap: 10px; }
.tsk-rfi-q { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--ras-line); border-radius: var(--ras-radius); background: var(--ras-paper-2); }
.tsk-rfi-q.is-dragover { outline: 2px dashed var(--ras-green); outline-offset: 2px; background: var(--ras-green-softer); }
.tsk-rfi-q-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tsk-rfi-q-h > b { color: var(--ras-green); min-width: 18px; }
.tsk-rfi-q-topic { flex: 1; min-width: 0; font-weight: 600; }
.tsk-rfi-q-btns { display: flex; gap: 2px; }
.tsk-rfi-q-btns button { width: 24px; height: 24px; padding: 0; border: 1px solid var(--ras-line); border-radius: var(--ras-radius); background: var(--ras-surface); color: var(--ras-muted); cursor: pointer; font: inherit; line-height: 1; }
.tsk-rfi-q-btns button:hover:not(:disabled) { color: var(--ras-green); border-color: var(--ras-green); }
.tsk-rfi-q-btns button:disabled { opacity: .4; cursor: default; }
.tsk-rfi-q .tsk-pop-notes { background: var(--ras-surface); }
.tsk-rfi-q-disc { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-left: 24px; font-size: var(--ras-fs-sm); }   /* a question's disciplines */
.tsk-rfi-perq { background: var(--ras-paper-2); border: 1px solid var(--ras-line); }
.tsk-rfi-q .tsk-fq-photos { gap: 6px; }
.tsk-rfi-q .tsk-fq-ph img, .tsk-rfi-q .tsk-rfi-pdftile, .tsk-rfi-q .tsk-rfi-droptile { width: 56px; height: 56px; }
.tsk-rfi-q .tsk-rfi-droptile.is-wide { width: 100%; height: 44px; flex-direction: row; gap: 8px; }
.tsk-rfi-pickwrap { display: none; position: absolute; inset: 0; z-index: 2; background: rgba(0,0,0,.25); align-items: center; justify-content: center; padding: 16px; }
.tsk-rfi-pickwrap.is-open { display: flex; }
.tsk-rfi-pick { width: min(940px, 100%); height: min(640px, 100%); }
.tsk-rfi-pick .tsk-drawer-head { align-items: center; }
.tsk-rfi-pick-q { width: 220px; }
.tsk-rfi-pick-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); }
.tsk-rfi-pick-list { overflow: auto; border-right: 1px solid var(--ras-line); padding: 6px; }
.tsk-rfi-pick-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--ras-radius); cursor: pointer; }
.tsk-rfi-pick-row:hover { background: var(--ras-green-softer); }
.tsk-rfi-pick-row.is-sel { background: var(--ras-green-soft); }
.tsk-rfi-pick-row.is-added .tsk-rfi-pick-name { color: var(--ras-muted); }
.tsk-rfi-pick-row input { accent-color: var(--ras-green); flex: none; }
.tsk-rfi-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-rfi-pick-prev { overflow: auto; padding: 14px 18px; display: grid; gap: 12px; align-content: start; }
.tsk-rfi-pick-title { margin: 0; font-size: var(--ras-fs-lg); color: var(--ras-ink); }
.tsk-rfi-pick-text { white-space: pre-wrap; padding: 10px 12px; background: var(--ras-paper-2); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-rfi-used { background: var(--ras-paper-2); color: var(--ras-muted); border: 1px solid var(--ras-line); }
/* RFI question templates in the "Add questions" window (Specs/234): sections, folding sets, a green Template badge. */
.tsk-rfi-pick-sec { font-size: var(--ras-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ras-muted); padding: 10px 8px 4px; }
.tsk-rfi-pick-sec:first-child { padding-top: 4px; }
.tsk-rfi-pick-row.is-set .tsk-rfi-pick-name { font-weight: 600; color: var(--ras-ink); }
/* A template's (or a set's: any of its templates) RFIs on this project, quietly at the end of its row. */
.tsk-rfi-usedtxt { flex: none; font-size: var(--ras-fs-xs); color: var(--ras-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tsk-rfi-pick-row.is-tpl { padding-left: 34px; }
.tsk-rfi-pick-fold { border: 0; background: none; padding: 0 2px; color: var(--ras-muted); cursor: pointer; font: inherit; width: 16px; }
.tsk-rfi-tpl { background: var(--ras-green-soft); color: var(--ras-green); border: 1px solid var(--ras-green-line); }
.tsk-rfi-pick-setlist { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.tsk-rfi-usednote { font-size: var(--ras-fs-sm); }
/* An RFI's questions on its page: each with its drawings under it. */
.tsk-rfi-qview { display: grid; gap: 10px; }
.tsk-rfi-qv { display: grid; gap: 4px; padding: 8px 10px; border-left: 3px solid var(--ras-green-line); background: var(--ras-paper-2); }
.tsk-rfi-qv-h { display: flex; align-items: baseline; gap: 8px; color: var(--ras-ink); }
.tsk-rfi-qv-from { font-size: var(--ras-fs-xs); }
.tsk-rfi-qv .tsk-fq-ph img, .tsk-rfi-qv .tsk-rfi-pdftile { width: 60px; height: 60px; }
@media (max-width: 720px) {
    .tsk-rfi-pick-body { grid-template-columns: 1fr; grid-template-rows: minmax(120px, 40%) minmax(0, 1fr); }
    .tsk-rfi-pick-list { border-right: 0; border-bottom: 1px solid var(--ras-line); }
    .tsk-rfi-pick-q { width: 140px; }
}
.tsk-rfi-contacts .ras-chip { cursor: pointer; }
/* Project link panel (tasks-rfis.js: tskRfiLinksHtml) */
.tsk-rfi-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-rfi-link > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* Claude panel */
.tsk-rfi-ai { display: flex; flex-direction: column; max-height: calc(100vh - 290px); position: sticky; top: 0; }
.tsk-ai-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--ras-line); }
.tsk-ai-h b { color: var(--ras-green); }
.tsk-ai-log { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 220px; }
.tsk-ai-m { white-space: pre-wrap; padding: 8px 10px; border-radius: var(--ras-radius); font-size: var(--ras-fs-base); }
.tsk-ai-m.is-user { align-self: flex-end; max-width: 88%; background: var(--ras-green); color: var(--ras-on-dark); }
.tsk-ai-m.is-ai { background: var(--ras-paper-2); border: 1px solid var(--ras-line); }
.tsk-ai-m.is-err { background: var(--ras-danger-soft); color: var(--ras-danger); border-color: var(--ras-danger); }
.tsk-ai-wait { color: var(--ras-muted); font-style: italic; }
.tsk-ai-copy { display: block; margin-top: 6px; font-size: var(--ras-fs-sm); }
.tsk-ai-sugg { display: flex; flex-direction: column; gap: 6px; }
.tsk-ai-sugg .ras-chip { cursor: pointer; text-align: left; }
.tsk-ai-in { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--ras-line); }
.tsk-ai-in textarea { flex: 1; }

@media (max-width: 1100px) {
    .tsk-rfi-desk.has-ai { grid-template-columns: 300px minmax(0, 1fr); }
    .tsk-rfi-desk.has-ai .tsk-rfi-ai { grid-column: 1 / -1; position: static; }
}
@media (max-width: 860px) {
    .tsk-charts--main { grid-template-columns: 1fr; }
    .tsk-te { grid-template-columns: 1fr; padding: var(--ras-space-3); }
    .tsk-te-side { position: static; }
    .tsk-rfi-desk, .tsk-rfi-desk.has-ai { grid-template-columns: 1fr; padding: 0 var(--ras-space-3); }
    .tsk-rfi-desk.has-sel .tsk-rfi-queue { max-height: 260px; }
    .tsk-rfi-queue, .tsk-rfi-ai, .tsk-rfi-left { position: static; max-height: none; }
    .tsk-rfi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 var(--ras-space-3) 10px; }
    .tsk-navrow { padding: 10px var(--ras-space-3); }
    .tsk-header { padding: 10px var(--ras-space-3); }
    .tsk-stack-legend { grid-template-columns: 1fr; }
}

/* ---- Line charts (tskLineChart) ---- */
.tsk-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tsk-line.is-dashed { stroke-dasharray: 5 4; }
.tsk-line.tsk-s-done, .tsk-dotm.tsk-s-done { stroke: var(--ras-green); }
.tsk-line.tsk-s-plan, .tsk-dotm.tsk-s-plan { stroke: #6E9E8A; }
.tsk-s-done-area { fill: var(--ras-green); opacity: .08; }
.tsk-s-plan-area { fill: #6E9E8A; opacity: .06; }
.tsk-dotm { fill: var(--ras-surface); stroke-width: 2; }
.tsk-s-done-t { fill: var(--ras-green); }
.tsk-s-plan-t { fill: #4F7A6A; }
.tsk-cross { stroke: var(--ras-line-strong); stroke-width: 1; opacity: 0; }
.tsk-hitcol:hover .tsk-cross { opacity: 1; }
.tsk-legend i.tsk-lg-line-plan { height: 0; border-top: 2px dashed #6E9E8A; border-radius: 0; background: none; }

/* ---- Rockstars ---- */
.tsk-card--stars { background: linear-gradient(180deg, var(--ras-green-softer), var(--ras-surface) 60%); }
.tsk-star { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--ras-line-soft); }
.tsk-star:last-child { border-bottom: 0; }
.tsk-star-m { font-size: 20px; text-align: center; }
.tsk-star-n { font-weight: 700; color: var(--ras-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-star-v { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tsk-star-v b { color: var(--ras-green); font-size: var(--ras-fs-lg); }

/* ---- Notifications (header bell) ---- */
.tsk-head-r { display: flex; align-items: center; gap: 8px; }
.tsk-bell-wrap { position: relative; }
.tsk-bell {
    position: relative; display: grid; place-items: center; width: 32px; height: 32px; cursor: pointer; color: var(--ras-on-dark);
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: var(--ras-radius);
}
.tsk-bell:hover { background: rgba(255,255,255,.22); }
.tsk-bell-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; }
.tsk-notifs {
    position: absolute; right: 0; top: 40px; z-index: 50; width: min(380px, calc(100vw - 24px)); max-height: 70vh; display: flex; flex-direction: column;
    background: var(--ras-surface); color: var(--ras-text); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); box-shadow: var(--ras-shadow-modal);
}
.tsk-notifs[hidden] { display: none; }
.tsk-notifs-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--ras-line); color: var(--ras-ink); }
.tsk-notifs-list { overflow: auto; }
.tsk-notifs-empty { padding: 16px 12px; }
.tsk-notif { display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--ras-line-soft); cursor: pointer; }
.tsk-notif:hover { background: var(--ras-green-softer); }
.tsk-notif.is-unread { background: var(--ras-green-soft); }
.tsk-notif-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--ras-paper-3); color: var(--ras-text); }
.tsk-notif-ic--task_assigned { background: var(--ras-green); color: #fff; }
.tsk-notif-ic--rfi_response { background: var(--ras-info); color: #fff; }
.tsk-notif-ic--si_logged { background: #C99A2E; color: #fff; }
.tsk-notif-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tsk-notif-t b { color: var(--ras-ink); font-size: var(--ras-fs-base); }

/* ---- Mandatory output ---- */
.tsk-output { padding: 10px 12px; border: 1px solid var(--ras-warn); border-left-width: 3px; background: var(--ras-warn-soft); border-radius: var(--ras-radius); }
.tsk-output .ras-label { color: var(--ras-warn-strong); font-weight: 700; }
.tsk-output.is-done { border-color: var(--ras-green-line); border-left-color: var(--ras-green); background: var(--ras-green-softer); }
.tsk-output.is-done .ras-label { color: var(--ras-green-deep); }
.tsk-te-out { font-size: var(--ras-fs-sm); color: var(--ras-warn-strong); }
.tsk-te-output { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px dashed var(--ras-line-strong); border-radius: var(--ras-radius); }
.tsk-te-subh { padding: 8px 14px 4px; font-size: var(--ras-fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ras-muted); background: var(--ras-paper-2); }
.tsk-te-table--ro tbody tr { cursor: default; }

/* ---- RFI / SI ---- */
.tsk-kind { display: inline-block; min-width: 26px; padding: 0 5px; text-align: center; font-size: 9.5px; font-weight: 800; letter-spacing: .4px; border-radius: var(--ras-radius); color: #fff; background: var(--ras-green); }
.tsk-kind--si { background: #C99A2E; }

/* My tasks: who is signed in */
.tsk-me-av { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 8px; border-radius: 50%; background: var(--ras-green); color: #fff; font-size: 11px; font-weight: 700; }
.tsk-claude-logo { vertical-align: -3px; flex: none; }
.ras-btn .tsk-claude-logo { margin-right: 2px; }
.tsk-ai-h .tsk-claude-logo { width: 20px; height: 20px; }

/* ---- Scheduler: project / construction switch ---- */
.tsk-schedmode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px var(--ras-space-5) 4px; }

/* ---- Construction schedule (tasks-construction.js) ---- */
.tsk-cs-kpis { padding: 8px var(--ras-space-5) 0; }
.tsk-cs-tools { padding: 10px var(--ras-space-5); }
.tsk-cs-legend { padding: 0 var(--ras-space-5) 8px; }
.tsk-cs-legend i.tsk-cs-lg-bar { background: #7FA694; }
.tsk-cs-legend i.tsk-cs-lg-crit { background: #7FA694; outline: 2px solid var(--ras-danger); outline-offset: -2px; }
.tsk-cs-legend i.tsk-cs-lg-late { background: #7FA694; box-shadow: inset 0 -3px 0 var(--ras-danger); }
.tsk-cs-legend i.tsk-cs-lg-sum { background: var(--ras-ink); height: 5px; }
.tsk-cs-empty { max-width: 640px; margin: 24px auto; }
.tsk-cs-empty h3 { margin: 0 0 8px; color: var(--ras-ink); }
.tsk-cs-empty ol { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; }
.tsk-cs-gantt { position: relative; height: calc(100vh - 380px); min-height: 360px; overflow: auto; margin: 0 var(--ras-space-5); background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-cs-inner { position: relative; }
.tsk-cs-head { position: sticky; top: 0; z-index: 6; display: flex; height: 46px; background: var(--ras-paper-3); border-bottom: 1px solid var(--ras-line-strong); }
.tsk-cs-gridh { position: sticky; left: 0; z-index: 7; display: flex; align-items: flex-end; height: 46px; padding-bottom: 6px; background: var(--ras-paper-3); border-right: 2px solid var(--ras-line-strong); font-size: var(--ras-fs-xs); font-weight: 700; color: var(--ras-muted); text-transform: uppercase; letter-spacing: .3px; }
.tsk-cs-tlh { position: relative; }
.tsk-cs-hrow { position: relative; height: 23px; }
.tsk-cs-hrow + .tsk-cs-hrow { border-top: 1px solid var(--ras-line); }
.tsk-cs-hc { position: absolute; top: 0; height: 23px; line-height: 23px; padding-left: 4px; font-size: var(--ras-fs-xs); color: var(--ras-muted); border-left: 1px solid var(--ras-line); white-space: nowrap; }
.tsk-cs-hm { font-weight: 700; color: var(--ras-text); }
.tsk-cs-today { position: absolute; top: 0; width: 2px; background: var(--ras-danger); opacity: .7; z-index: 3; pointer-events: none; }
.tsk-cs-rows { position: absolute; left: 0; top: 0; }
.tsk-cs-row { position: absolute; left: 0; height: 26px; display: flex; border-bottom: 1px solid var(--ras-line-soft); cursor: pointer; }
.tsk-cs-row:hover .tsk-cs-grid, .tsk-cs-row:hover { background: var(--ras-green-softer); }
.tsk-cs-row.is-sel .tsk-cs-grid, .tsk-cs-row.is-sel { background: var(--ras-green-soft); }
.tsk-cs-row.is-sum .tsk-cs-grid { font-weight: 700; color: var(--ras-ink); background: var(--ras-paper-2); }
.tsk-cs-grid { position: sticky; left: 0; z-index: 4; display: flex; align-items: center; height: 100%; background: var(--ras-surface); border-right: 2px solid var(--ras-line-strong); font-size: var(--ras-fs-sm); }
.tsk-cs-grid span, .tsk-cs-gridh span { flex: none; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-cs .c-id { width: 48px; text-align: right; color: var(--ras-muted); font-variant-numeric: tabular-nums; }
.tsk-cs .c-n { width: 300px; }
.tsk-cs .c-d { width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.tsk-cs .c-s, .tsk-cs .c-f { width: 78px; font-variant-numeric: tabular-nums; }
.tsk-cs .c-p { width: 50px; text-align: right; font-variant-numeric: tabular-nums; }
.tsk-cs .c-p sup { color: var(--ras-info); font-weight: 700; }
.tsk-cs-caret { border: 0; background: none; cursor: pointer; color: var(--ras-muted); padding: 0 4px 0 0; font-size: 11px; }
.tsk-crit-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--ras-danger); vertical-align: 1px; }
.tsk-cs-tl { position: absolute; top: 0; height: 26px; }
.tsk-cs-bar { position: absolute; top: 7px; height: 12px; background: #CFE0D8; border: 1px solid #7FA694; border-radius: 2px; overflow: hidden; }
.tsk-cs-bar i { display: block; height: 100%; background: #7FA694; }
.tsk-cs-bar.is-crit { border: 2px solid var(--ras-danger); }
.tsk-cs-bar.is-late { box-shadow: inset 0 -3px 0 var(--ras-danger); }
.tsk-cs-sum { position: absolute; top: 9px; height: 6px; background: color-mix(in srgb, var(--ras-ink) 30%, white); }
.tsk-cs-sum i { display: block; height: 100%; background: var(--ras-ink); }
.tsk-cs-sum::before, .tsk-cs-sum::after { content: ""; position: absolute; bottom: -5px; border: 4px solid transparent; border-top-color: var(--ras-ink); }
.tsk-cs-sum::before { left: -4px; } .tsk-cs-sum::after { right: -4px; }
.tsk-cs-ms { position: absolute; top: 7px; width: 11px; height: 11px; transform: rotate(45deg); background: var(--ras-ink); }
.tsk-cs-ms.is-done { background: var(--ras-green); }
.tsk-cs-res { position: absolute; top: 5px; font-size: var(--ras-fs-xs); color: var(--ras-muted); white-space: nowrap; }
.tsk-cs-foot { padding: 8px var(--ras-space-5) 20px; }
.tsk-cs-pct { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tsk-cs-pct .ras-input { width: 80px; }
@media (max-width: 860px) { .tsk-cs .c-n { width: 140px; } .tsk-cs .c-s, .tsk-cs .c-d, .tsk-cs .c-p { display: none; } .tsk-cs-gantt { margin: 0 var(--ras-space-3); } }
.tsk-notif-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #E5484D; vertical-align: 1px; box-shadow: 0 0 0 2px rgba(229,72,77,.2); }
.tsk-bell-n { box-shadow: 0 0 0 2px var(--ras-green); }

/* ---- People: photos + person picker (tasks-people.js) ---- */
.tsk-av { display: inline-block; flex: none; border-radius: 50%; object-fit: cover; background: var(--ras-paper-3); vertical-align: middle; }
.tsk-av--ini { display: inline-grid; place-items: center; color: #fff; font-weight: 700; letter-spacing: .2px; }
.tsk-av--none { width: 26px; height: 26px; border: 1.5px dashed var(--ras-line-strong); background: transparent; }
.tsk-me { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ras-ink); }
.tsk-pp {
    display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 6px 10px; text-align: left; cursor: pointer;
    font: inherit; background: var(--ras-surface); border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius);
}
.tsk-pp:hover { border-color: var(--ras-green); background: var(--ras-green-softer); }
.tsk-pp.is-empty .tsk-pp-t b { color: var(--ras-muted); font-weight: 500; }
.tsk-pp-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.tsk-pp-t b { color: var(--ras-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ras-fs-base); }
.tsk-pp-t span { color: var(--ras-muted); font-size: var(--ras-fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-pp-c { color: var(--ras-muted); font-size: 11px; }
.tsk-pp-pop {
    position: fixed; z-index: 100020; max-height: 340px; display: flex; flex-direction: column;
    background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); box-shadow: var(--ras-shadow-modal);
}
.tsk-pp-pop[hidden] { display: none; }
.tsk-pp-s { padding: 8px; border-bottom: 1px solid var(--ras-line); }
.tsk-pp-l { overflow: auto; padding: 4px 0; }
.tsk-pp-g { padding: 8px 12px 4px; font-size: var(--ras-fs-micro); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ras-muted); }
.tsk-pp-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 12px; text-align: left; cursor: pointer; font: inherit; background: none; border: 0; }
.tsk-pp-i:hover { background: var(--ras-green-softer); }
.tsk-pp-i.is-sel { background: var(--ras-green-soft); box-shadow: inset 3px 0 0 var(--ras-green); }
.tsk-pp-empty { padding: 12px; }
.tsk-form--people { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tsk-fl .asg .tsk-pp { text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 3px; }
.tsk-star-n { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tsk-star-n > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-hbar-n--av { display: flex; align-items: center; gap: 7px; }
.tsk-hbar-n--av > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-row-who { display: flex; align-items: center; gap: 6px; }
.tsk-row-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsk-msg-h .tsk-av { margin-right: 2px; }
.tsk-claude-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; font-size: var(--ras-fs-xs); font-weight: 600; color: #B8603F; background: #FBEEE8; border-radius: var(--ras-radius-pill); }

/* ---- Claude on every tab (tasks-claude.js) ---- */
.tsk-claude {
    position: absolute; top: 0; right: 0; bottom: 0; z-index: 25; width: min(400px, 100vw); display: flex; flex-direction: column;
    background: var(--ras-surface); border-left: 1px solid var(--ras-line); box-shadow: var(--ras-shadow-drawer);
    transform: translateX(105%); transition: transform .18s ease-out;
}
.tsk-claude.is-open { transform: none; }
.tsk-claude .tsk-ai-h { padding: 14px; }
.tsk-claude-btn.is-active { background: #FBEEE8; border-color: #D97757; color: #8A3F22; }

/* ---- Construction: company master schedule ---- */
.tsk-cs-master { margin: 6px var(--ras-space-5) 4px; }
.tsk-cs-row.is-mine, .tsk-cs-row.is-mine .tsk-cs-grid { background: #FFF6DA; }
.tsk-cs-row.is-mine .tsk-cs-bar { border-color: #C99A2E; box-shadow: 0 0 0 2px #FFD24A; }
.tsk-cs-mine { display: inline-block; margin-right: 6px; padding: 0 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: #6B4E00; background: #FFD24A; border-radius: var(--ras-radius); }
/* Avatars match the org chart (orgAvatar): green ring on photos, initials on RAS green. */
img.tsk-av { border: 2px solid #BFDCCF; box-sizing: border-box; }
.tsk-av--ini { background: var(--ras-green); font-weight: 800; }

/* ---- Task form (tasks-forms.js) ---- */
.tsk-form-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--ras-line); border-left: 3px solid var(--ras-info); border-radius: var(--ras-radius); background: var(--ras-surface); }
.tsk-form-box.is-done { border-left-color: var(--ras-green); }
.tsk-form-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tsk-form-h b { color: var(--ras-ink); }
.tsk-form-h .tsk-meter { margin-left: auto; }
.tsk-fq { padding: 10px; border: 1px solid var(--ras-line-soft); border-radius: var(--ras-radius); background: var(--ras-paper-2); display: flex; flex-direction: column; gap: 8px; }
.tsk-fq.is-open { background: var(--ras-surface); border-color: var(--ras-line-strong); }
.tsk-fq-q { display: flex; gap: 8px; align-items: flex-start; color: var(--ras-ink); font-weight: 600; }
.tsk-fq-n { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--ras-muted); }
.tsk-fq:not(.is-open) .tsk-fq-n { background: var(--ras-green); }
.tsk-fq-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tsk-yn { display: inline-flex; border: 1px solid var(--ras-line-strong); border-radius: var(--ras-radius); overflow: hidden; }
.tsk-yn button { padding: 6px 16px; border: 0; background: var(--ras-surface); font: inherit; font-weight: 700; cursor: pointer; color: var(--ras-text); min-height: 34px; }
.tsk-yn button + button { border-left: 1px solid var(--ras-line-strong); }
.tsk-yn button.is-yes { background: var(--ras-green); color: #fff; }
.tsk-yn button.is-no { background: var(--ras-danger); color: #fff; }
.tsk-fq-add { cursor: pointer; }
.tsk-fq-add.is-busy { opacity: .6; pointer-events: none; }
.tsk-fq-add.is-busy::after { content: " …"; }
.tsk-fq-by { margin-left: auto; }
.tsk-fq-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.tsk-fq-ph { position: relative; }
.tsk-fq-ph img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--ras-radius); border: 1px solid var(--ras-line); display: block; }
.tsk-fq-ph .tsk-x { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--ras-surface); border: 1px solid var(--ras-line-strong); font-size: 13px; line-height: 16px; padding: 0; }
.tsk-form-chip { font-size: var(--ras-fs-xs); font-weight: 700; color: var(--ras-info); }
.tsk-form-chip.is-done { color: var(--ras-green); }
/* Scheduler › Stages projects: the project picker in the mode bar (Specs/206) */
.tsk-schedmode .tsk-gsg-pick { width: auto; max-width: 420px; }

/* My tasks, Planner-style (Specs/205): Grid / Board, pills, search, filter; the counts on top are .tsk-kpis--mine */
.tsk-my-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.tsk-my-views { display: inline-flex; gap: 6px; }
.tsk-my-pill { border: 1px solid var(--ras-line-strong); background: var(--ras-surface); border-radius: var(--ras-radius-pill); padding: 4px 12px; font-size: var(--ras-fs-sm); color: var(--ras-text); cursor: pointer; }
.tsk-my-pill:hover { border-color: var(--ras-green-line); }
.tsk-my-pill.is-on { border: 1.5px solid var(--ras-green); color: var(--ras-green); font-weight: 600; }
/* All tasks / Dashboard: All · Stages projects · Older projects (Specs/205) */
.tsk-b-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px var(--ras-space-4) 0; }
.tsk-dashpage .tsk-b-kinds { padding: 0 0 4px; }   /* the Dashboard page has its own padding */
.tsk-my-sep { width: 1px; height: 20px; background: var(--ras-line); margin: 0 4px; }
.tsk-my-search { width: 180px; }
.tsk-my-group { width: auto; margin-left: 6px; }
.tsk-my-grid { background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: var(--ras-radius); }
.tsk-my-row { display: grid; grid-template-columns: 28px minmax(0, 2fr) minmax(0, 1.3fr) 90px 100px 120px 110px; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--ras-line-soft); cursor: pointer; }
.tsk-my-row:last-child { border-bottom: none; }
.tsk-my-row:hover { background: var(--ras-green-softer); }
.tsk-my-row.is-head { cursor: default; font-size: var(--ras-fs-sm); color: var(--ras-muted); background: none; }
.tsk-my-row.is-done .tsk-my-name, .tsk-my-card.is-done .tsk-my-name { text-decoration: line-through; color: var(--ras-muted); }
.tsk-my-name { color: var(--ras-ink); overflow-wrap: anywhere; }
.tsk-my-name .tsk-wait { display: block; }
.tsk-my-src { font-size: var(--ras-fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsk-my-src .tsk-dot { margin-right: 5px; }
.tsk-my-tick { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 50%; border: 1.5px solid var(--ras-muted); cursor: pointer; display: inline-grid; place-content: center; flex: none; }
.tsk-my-tick:hover:not(:checked) { border-color: var(--ras-green); }
.tsk-my-tick:checked { background: var(--ras-green); border-color: var(--ras-green); }
.tsk-my-tick:checked::after { content: "✓"; color: #fff; font-size: 11px; line-height: 1; }
/* In progress (Specs/217): half filled, as in Planner. */
.tsk-my-tick.is-half:not(:checked) { border-color: var(--ras-green); background: linear-gradient(90deg, var(--ras-green) 50%, transparent 50%); }
.tsk-my-prio, .tsk-my-st { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ras-fs-sm); }
.tsk-my-prio i { width: 6px; height: 6px; border-radius: 50%; }
.tsk-my-st.is-notstarted { color: var(--ras-muted); }   /* words only: the tick is the icon (Specs/217) */
.tsk-my-board { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.tsk-my-col { flex: 0 0 280px; }
.tsk-my-col-h { font-size: var(--ras-fs-md); font-weight: 600; color: var(--ras-ink); margin: 0 0 8px; }
.tsk-my-card { background: var(--ras-surface); border: 1px solid var(--ras-line); border-radius: 6px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--ras-shadow-card); }
.tsk-my-card:hover { border-color: var(--ras-green-line); }
.tsk-my-card-b { padding: 8px 10px; display: grid; gap: 5px; }
.tsk-my-card-src { font-size: var(--ras-fs-xs); color: var(--ras-green); display: flex; align-items: center; gap: 5px; }
.tsk-my-card-t { display: flex; gap: 8px; align-items: flex-start; }
.tsk-my-card-m { font-size: var(--ras-fs-xs); }
.tsk-my-card-f { border-top: 1px solid var(--ras-line-soft); padding: 6px 10px; display: flex; align-items: center; gap: 4px; min-height: 22px; }
@media (max-width: 860px) {
    .tsk-my-row { grid-template-columns: 28px minmax(0, 1fr) 80px; }
    .tsk-my-row > :nth-child(3), .tsk-my-row > :nth-child(5), .tsk-my-row > :nth-child(6), .tsk-my-row > :nth-child(7) { display: none; }
    .tsk-my-search { width: 100%; }
}
/* My tasks Board: dragging a card (Specs/205). The cards keep the normal pointer: Windows has no open-hand (grab)
   cursor, and the browser's own small white one was lost on the white cards (user, 2026-11-16). */
.tsk-my-card.is-dragging { opacity: .45; }
.tsk-my-col { min-height: 120px; border-radius: 8px; padding: 2px; transition: background .12s; }
.tsk-my-col.is-over { background: var(--ras-green-softer); outline: 1.5px dashed var(--ras-green-line); }
