@charset "UTF-8";
/* styles.css in numbered parts, each starting with a "==== n. Name ====" comment. Rules keep their order inside and across
   parts: with equal specificity the later rule wins, so moving one can change the look. Add a rule to its part. */
/* 1. Theme tokens · 2. Base and shared components · 3. Top bar · 4. Timeline chrome · 5. Dashboard · 6. Timeline · 7. Drawers and settings · 8. Shared pickers and drawer parts · 9. Dialogs · 10. Toast and the bot · 11. Tasks view · 12. Task details · 13. Narrow screens and reduced motion · 14. PDF print layout · 15. Account and plan · 16. Roles · 17. Invites · 18. Privacy · 19. Project templates */

/* ==== 1. Theme tokens ==== */
/* Theme colors. Light is the default (and always used for the printed PDF); dark applies when <html data-theme="dark">,
   set from General settings → Appearance (Light, Dark or Aubergine). Use these tokens rather than raw colors. The neutrals lean a
   little warm (toward taupe), with white staying white; the dark ones lean red rather than yellow, as
   dim yellow reads olive. */
:root, .print-view {
  color-scheme: light;
  --canvas: #f6f5f3;
  --bg: #fff;
  --surface: #fff;
  /* Two fills: --fill for hover, selected and filled controls; --fill-soft for the faintest (row hover, a resting field). */
  --fill: #f1f0ee;
  --fill-soft: #f8f7f5;
  /* Three text levels: --ink (what you read: titles, values), --text-2 (supporting text), --muted (labels, IDs, times,
     counts, placeholders, hints, disabled: text that's clear without reading it). */
  --ink: #1f1e1c;
  --text-2: #6c6a66;
  --muted: #8e8b86;
  --rule: #ebe9e6;
  --border: #d8d5d0;
  --grid-week: #c9c5bf;
  --grid-day: #ebe9e6;
  --focus: #22211f;
  --backdrop: #1113;
  --shadow-1: #00000014;
  --shadow-2: #1018281a;
  --scroll-thumb: #cbc7c1;
  --scroll-track: #f8f7f5;
  /* The one action color: switches, links, actions, mentions, send, focus on fields edited in place. */
  --accent: #5b16fe;
  --purple-text: #9400ed;
  --danger: #ba1839;
  --warning: #b45309;
  --tint-purple: #f6efff;
  --tint-purple-border: #e4d2ff;
  --toggle-off: #d2cec8;
  /* Tinted labels mix their color toward these; colored names are lightened in dark mode so they stay readable. */
  --tint-base: #fff;
  --tint-ink: #000;
  --tint-amount: 9%;
  --name-mix: 100%;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #121111;
  --bg: #191818;
  --surface: #211f1f;
  --fill: #2c2a2a;
  --fill-soft: #252323;
  --ink: #f4f2f1;
  --text-2: #a9a4a2;
  --muted: #807b79;
  --rule: #2e2c2c;
  --border: #3e3b3b;
  --grid-week: #3e3b3b;
  --grid-day: #262424;
  --focus: #edebea;
  --backdrop: #000a;
  --shadow-1: #00000059;
  --shadow-2: #00000080;
  --scroll-thumb: #484545;
  --scroll-track: #1c1b1b;
  --accent: #9b7bff;
  --purple-text: #c084fc;
  --danger: #ff6b81;
  --warning: #f5a524;
  --tint-purple: #2a2140;
  --tint-purple-border: #4b3a72;
  --toggle-off: #4d4a4a;
  --tint-base: #211f1f;
  --tint-ink: #fff;
  --tint-amount: 16%;
  --name-mix: 70%;
}
/* Aubergine: a dark mode whose greys carry a whisper of the accent's purple, as Slack's aubergine does (General
   settings → Appearance). It is data-theme="dark" with data-tone="aubergine", so only the neutrals change here. */
:root[data-theme="dark"][data-tone="aubergine"] {
  --canvas: #120f14;
  --bg: #1a161c;
  --surface: #221d24;
  --fill: #2e2830;
  --fill-soft: #262028;
  --ink: #f4f1f5;
  --text-2: #aca3b0;
  --muted: #82798a;
  --rule: #2f2932;
  --border: #41394a;
  --grid-week: #41394a;
  --grid-day: #27222a;
  --focus: #efeaf1;
  --scroll-thumb: #4a4250;
  --scroll-track: #1d181f;
  --toggle-off: #4f4655;
  --tint-base: #221d24;
}

/* Bar colors and the today red are the same in both themes. */
:root {
  /* Type scale (keep to these six, in weights 400 and 500): title (the task title), heading (page and drawer titles),
     subheading (sections, project names, the lead), body, small (times, counts, hints, buttons in pills) and tiny
     (pills, tags, the date header, avatar initials). Size and grey make the hierarchy, not weight. */
  --text-title: 28px;
  --text-heading: 20px;
  --text-subheading: 16px;
  --text-body: 14px;
  --text-small: 12px;
  --text-tiny: 11px;
  /* Corner radii: small controls, fields and menus, cards and panels, and pills (anything as round as it is tall). */
  --radius-small: 4px;
  --radius-control: 6px;
  --radius: 8px;
  --radius-large: 12px;
  --radius-pill: 999px;
  /* Cards (project cards, Today strips, task cards) on hover: a faint outline that also shows in dark mode, and a light
     lift. Rows in lists get --fill-soft instead; items in menus and pickers --fill. */
  /* Three elevations: resting cards, floating controls (and headers and dragged items), and overlays (menus, panels,
     drawers, tooltips). */
  --shadow-resting: 0 1px 3px var(--shadow-1);
  --shadow-floating: 0 2px 8px var(--shadow-1);
  --shadow-overlay: 0 8px 24px var(--shadow-2);
  --card-hover: inset 0 0 0 1px var(--border), var(--shadow-floating);
  /* Today: the today line and date, milestone dates, the bell's dot and count. */
  --today: #ef3548;
  /* The palette (bars, avatars, project, parent, status and urgency colors; app.js refers to these by name). Grey is
     for items without a color and isn't offered in pickers. */
  --purple: #9400ed;
  --orange: #ff7408;
  --blue: #168de2;
  --red: #e11d48;
  --green: #16a34a;
  --teal: #0d9488;
  --yellow: #eab308;
  --grey: #a8a8a8;
  /* Text and marks on colored fills (white; dark on yellow avatars), an avatar without a color, and the bars' done share. */
  --on-color: #fff;
  --on-yellow: #2b2b2b;
  --avatar-default: #757575;
  /* The bot's face: the logo's purple, lightened in dark mode as the logo is. */
  --bot: color-mix(in srgb, var(--purple) var(--name-mix), var(--tint-ink));
  --bar-shade: #00000026;
  --bar-label: #171717;
  --day-width: 42px;
  --week-day-width: 10px;
  --week-width: 294px;
  /* The timeline always starts on a Monday, so week lines align with day lines. */
  --week-start-offset: -1px;
  --week-mode-width: 70px;
  --week-mode-offset: 0px;
  --active-day-width: var(--day-width);
  --active-week-width: var(--week-width);
  --active-week-offset: var(--week-start-offset);
  --timeline-leading-space: 0px;
  --timeline-trailing-space: 0px;
  --task-width: 260px;
  --task-min-width: 200px;
  --task-max-width: 420px;
  --project-height: 52px;
  --header-height: 66px;
  /* The logo's distance from the window's left edge; the Timeline's month name keeps to the same line. */
  --logo-inset: 16px;
  --row-height: 50px;
}

/* ==== 2. Base and shared components: buttons, segmented controls, tags ==== */
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
/* Inter, slightly tightened, with room between lines. */
body { color: var(--ink); background: var(--bg); font-family: Inter, Arial, Helvetica, sans-serif; font-size: var(--text-body); line-height: 1.45; letter-spacing: -.006em; overflow: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input { font: inherit; }
/* Segmented control (Light/Dark, project views, roles): the choices side by side in a --fill track, the chosen one
   raised on a plate (--surface, a hairline and a faint lift) that slides between them (placeSegmentedIndicator). */
.segmented { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 2px; border: 0; border-radius: var(--radius); background: var(--fill); }
.segmented-item { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: var(--radius-control); color: var(--text-2); background: transparent; font-size: var(--text-small); text-decoration: none; white-space: nowrap; cursor: pointer; }
.segmented-item[aria-current], .segmented-item[aria-selected="true"], .segmented-item:has(input:checked) { color: var(--ink); }
.segmented-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* In the dark the plate is lighter than its track, as something raised is. */
:root[data-theme="dark"] .segmented-indicator { background: color-mix(in srgb, var(--ink) 10%, var(--surface)); }
.segmented-indicator { position: absolute; top: 2px; left: 0; z-index: -1; width: 0; height: 28px; border-radius: var(--radius-control); background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow-resting); transition: transform .26s cubic-bezier(.3, .7, .2, 1), width .26s cubic-bezier(.3, .7, .2, 1), opacity .15s ease; }
/* Tabs move between views: icon and name always shown (so nothing shifts under the pointer), the shown one in --ink with
   a 2 px line under it (aria-current). Not for choosing a value; that's a segmented control. */
.tabs { display: flex; align-items: stretch; gap: 4px; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; color: var(--muted); background: none; font: inherit; font-size: var(--text-body); font-weight: 400; text-decoration: none; white-space: nowrap; cursor: pointer; transition: color .12s ease; }
.tab:hover, .tab[aria-current], .tab[aria-selected="true"] { color: var(--ink); }
.tab::after { position: absolute; right: 8px; bottom: 0; left: 8px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; content: ""; transition: background .12s ease; }
.tab[aria-current]::after, .tab[aria-selected="true"]::after { background: var(--ink); }
.tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: var(--radius); }
.tab[hidden] { display: none; }
.tab svg { flex: 0 0 auto; }
.tab-count { color: var(--muted); font-size: var(--text-small); font-weight: 400; }
.tab-count:empty { display: none; }
/* Buttons with text, rounded like the fields (8, or 6 when small): plain .button is secondary (--surface with a --border
   hairline and a faint lift, 32 high), so it holds its own on any background; .button-primary is filled with the
   --accent, .button-ghost has no fill or line until hover, and .button-small is 28 high. Pills are for labels (tags),
   so a button never looks like one. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-resting); font-size: var(--text-body); white-space: nowrap; cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease, opacity .12s ease; }
.button:not(:disabled):hover { background: var(--fill-soft); border-color: color-mix(in srgb, var(--ink) 12%, var(--border)); }
.button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.button:disabled { opacity: .45; cursor: default; }
.button-small { gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--radius-control); font-size: var(--text-small); }
.button-primary { border-color: transparent; color: var(--surface); background: var(--accent); box-shadow: none; }
.button-primary:not(:disabled):hover { border-color: transparent; background: color-mix(in srgb, var(--ink) 12%, var(--accent)); }
.button-ghost { border-color: transparent; color: var(--text-2); background: transparent; box-shadow: none; }
.button-ghost:not(:disabled):hover { border-color: transparent; color: var(--ink); background: var(--fill); }
/* An icon beside text is a step lighter than it, so the words read first: --text-2 beside --ink, --muted beside
   --text-2 (a ghost button until hover). The accent and danger buttons keep one color. */
.button svg { color: var(--text-2); }
.button-ghost svg { color: var(--muted); }
.button-ghost:not(:disabled):hover svg { color: var(--text-2); }
.button-primary svg, .button-danger svg { color: inherit; }
/* An icon beside text is 1 px larger than the text, whatever size its markup gives: 15 beside 14, 13 beside 12, 12 in a
   tag, 17 beside a 16 px heading. So it weighs the same as its words in every place. Icons on their own
   (.icon-button) keep their size. */
:is(.button, .card-menu-item, .segmented-item, .settings-nav-item, .delete-item, .tab, .tag, .search-box, .add-item, .kanban-add, .today-more, .section-toggle, .archived-toggle, .work-item-group-toggle, .due-badge, .due-value, .round-picker-empty, .select-option) > svg { width: calc(1em + 1px); height: calc(1em + 1px); }
/* Icon buttons: square with soft corners, 32 or 28 (.icon-button-small), a fill on hover or while their menu is open. */
.icon-button { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: var(--radius-control); color: var(--text-2); background: transparent; cursor: pointer; transition: background .12s ease, color .12s ease; }
.icon-button:not(:disabled):hover, .icon-button[aria-expanded="true"] { color: var(--ink); background: var(--fill); }
.icon-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.icon-button-small { width: 28px; height: 28px; }
.button[hidden], .icon-button[hidden] { display: none; }
/* Tags (task status and urgency, project health, option chips, parent labels): a pill tinted by --tag, 24 high at
   12 px, or .tag-small, 20 high at 11 px. */
.tag { --tag: var(--muted); display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--radius-pill); color: color-mix(in srgb, var(--tag) 78%, var(--tint-ink)); background: color-mix(in srgb, var(--tag) var(--tint-amount), var(--tint-base)); font-size: var(--text-small); font-weight: 500; line-height: 1; white-space: nowrap; }
.tag:has(> svg:first-child) { padding-left: 6px; }
.tag-small { gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); font-size: var(--text-tiny); }
.tag-small:has(> svg:first-child) { padding-left: 6px; }
/* A long text's count under its field, from 90 % of the limit; in --danger at the limit. */
.text-count { display: block; margin-top: 4px; color: var(--muted); font-size: var(--text-small); text-align: right; font-variant-numeric: tabular-nums; }
.text-count[hidden] { display: none; }
.text-count.is-full { color: var(--danger); }
/* A search box: 32 high (28 small, in a row of small buttons) on --fill-soft, the icon and --muted text, its shortcut in
   a small kbd at the end until something is typed. In use, the 1.5 px --ink ring of a chosen card (its border and half a
   pixel). The dashboard's is a button that opens search; the Tasks view's filters the tasks. */
.search-box { display: flex; align-items: center; gap: 8px; min-width: 0; height: 32px; padding: 0 6px 0 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); background: var(--fill-soft); font: inherit; font-size: var(--text-body); text-align: left; }
.search-box-small { height: 28px; font-size: var(--text-small); }
.search-box svg { flex: 0 0 auto; }
.search-box input { flex: 1; min-width: 0; padding: 0; border: 0; color: var(--ink); background: transparent; font: inherit; outline: none; }
.search-box-key { flex: 0 0 auto; padding: 0 5px; border: 1px solid var(--border); border-radius: var(--radius-small); color: var(--muted); background: var(--bg); font: inherit; font-size: var(--text-tiny); line-height: 16px; }
.search-box:has(input:focus) { border-color: var(--ink); background: var(--bg); box-shadow: 0 0 0 .5px var(--ink); }
.search-box:has(input:focus) .search-box-key, .search-box:has(input:not(:placeholder-shown)) .search-box-key { display: none; }
/* Empty states. A block (.empty-state) stands where the content would be: an optional icon and title (16/500 --ink), the
   text in --muted, and what to do about it as a text action; a note (.empty-note) is a line of small --muted text in a
   list, menu or pane. Their own classes set only where they sit. */
.empty-state { display: grid; align-content: center; justify-items: center; gap: 6px; margin: 0; padding: 24px 16px; color: var(--muted); text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state > p { margin: 0; }
.empty-state > svg + .empty-state-title { margin-top: 6px; }
.empty-state-title { color: var(--ink); font-size: var(--text-subheading); font-weight: 500; }
.empty-state-text { max-width: 320px; }
.empty-state-action { padding: 0; border: 0; color: var(--accent); background: none; font: inherit; cursor: pointer; }
.empty-state-action:hover { text-decoration: underline; }
.empty-state-action:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: var(--radius-small); }
.empty-note { margin: 0; color: var(--muted); font-size: var(--text-small); line-height: 1.45; }
/* Floating menus, pickers and panels open and close the same way: they fade in and settle from where they open (the
   top, or the bottom for ones that open upwards), and fade out back again. They're shown and hidden with `hidden`;
   display waits for the fade (allow-discrete), and one that's closing no longer takes the pointer. One that's created
   and removed is hidden first (removeFaded). */
.select-options, .date-popover, .card-menu, .option-panel, .tasks-filter-panel, .emoji-menu, .member-color-menu, .client-milestone { --float-from: translateY(-4px) scale(.98); transform-origin: top; transition: opacity .14s ease, transform .18s cubic-bezier(.3, .7, .2, 1), display .18s allow-discrete; }
.card-menu { transform-origin: top right; }
.tasks-filter-panel { transform-origin: top left; }
.emoji-menu { --float-from: translateY(4px) scale(.98); transform-origin: bottom right; }
:is(.select-options, .date-popover, .card-menu, .option-panel, .tasks-filter-panel, .emoji-menu, .member-color-menu, .client-milestone)[hidden] { opacity: 0; transform: var(--float-from); pointer-events: none; }
@starting-style { :is(.select-options, .date-popover, .card-menu, .option-panel, .tasks-filter-panel, .emoji-menu, .member-color-menu, .client-milestone) { opacity: 0; transform: var(--float-from); } }
@media (prefers-reduced-motion: reduce) { .select-options, .date-popover, .card-menu, .option-panel, .tasks-filter-panel, .emoji-menu, .member-color-menu, .client-milestone { transition: none; } }

/* ==== 3. Top bar: logo, project name, user and reminder bell ==== */
/* The work item pane's rendered width, shared by the pane, the Today button and the toast. */
.app { --task-pane-width: max(var(--task-min-width), min(var(--task-width), var(--task-max-width), calc(100vw - 120px))); display: flex; flex-direction: column; width: 100%; height: 100dvh; min-height: 0; }

.projectbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: var(--project-height);
  flex: 0 0 var(--project-height);
  background: var(--bg);
}
.project-logo { display: flex; align-items: center; padding-left: var(--logo-inset); }
/* The left of the bar: the logo, then inside a project where you are. */
.project-start { grid-column: 1; display: flex; align-items: center; gap: 16px; min-width: 0; }
/* The company's logo stands in for Remedy's in the client preview. */
.client-logo { display: none; max-width: 160px; height: 28px; padding-left: var(--logo-inset); object-fit: contain; object-position: left center; }
.is-client-view.has-company-logo .project-home { display: none; }
.is-client-view.has-company-logo .client-logo { display: block; }
.project-home { position: relative; justify-self: start; border: 0; background: transparent; cursor: pointer; }
/* The mark: square strokes in the text color, so it follows the theme, and a red dot. */
.brand-mark { display: block; flex: 0 0 auto; animation: brand-turn 5s linear infinite paused; }
/* On hover the mark turns like a gear at work, and stops where it is when the pointer leaves (it looks the same every
   60°, so there's no jump back). */
.project-home:hover:not(:disabled) .brand-mark { animation-play-state: running; }
@keyframes brand-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .brand-mark { animation: none; } }
.brand-hooks { fill: none; stroke: color-mix(in srgb, var(--purple) var(--name-mix), var(--tint-ink)); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
/* The name fades in quietly beside the mark on hover or keyboard focus, over the bar so nothing moves. */
.brand-name { position: absolute; top: 50%; left: calc(100% + 8px); color: var(--muted); font-size: var(--text-small); white-space: nowrap; opacity: 0; transform: translateY(-50%); transition: opacity .2s ease; pointer-events: none; }
.project-home:hover .brand-name, .project-home:focus-visible .brand-name { opacity: 1; }
.project-home:disabled .brand-name { display: none; }
/* Where you are, beside the logo: Projects (back to the dashboard) / a square in the project's color and its name in
   --ink, as on its card. */
.project-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--text-body); white-space: nowrap; }
.project-crumb-home { color: var(--muted); text-decoration: none; transition: color .12s ease; }
.project-crumb-home:hover { color: var(--ink); }
.project-crumb-home:focus-visible { border-radius: var(--radius-small); outline: 2px solid var(--focus); outline-offset: 2px; }
/* Separators whisper, lighter than the words they part. */
.project-crumb-slash { color: var(--border); }
.project-title-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 2px; background: var(--project-color, var(--muted)); }
.project-title-name { min-width: 0; overflow: hidden; color: var(--ink); font-weight: 500; text-overflow: ellipsis; }
/* The logo's name would slide out over the project's; only on the dashboard. */
.projectbar:not(.is-dashboard) .brand-name { display: none; }
/* The dashboard's search, in the middle of the top bar where a project's name is: a field to look at, which opens the
   search (Cmd/Ctrl+K, shown at its end). Only the icon on a narrow screen. */
.dashboard-search { display: none; }
.projectbar.is-dashboard .project-title { display: none; }
.projectbar.is-dashboard .dashboard-search { grid-column: 2; justify-self: center; display: flex; width: min(360px, 40vw); cursor: pointer; transition: border-color .12s ease, color .12s ease; }
.projectbar.is-dashboard .dashboard-search:hover { color: var(--text-2); border-color: color-mix(in srgb, var(--ink) 20%, var(--border)); }
.dashboard-search:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dashboard-search-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 4px; }
/* Saving… and Saved, small and grey; Not saved in the danger color, a button that tries again. */
.save-status { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; border: 0; color: var(--muted); background: none; font: inherit; font-size: var(--text-small); white-space: nowrap; transition: opacity .3s ease; }
.save-status[hidden] { display: none; }
.save-status.is-fading { opacity: 0; }
.save-status.is-failed { color: var(--danger); cursor: pointer; }
.save-status svg { flex: 0 0 auto; }
.save-status.is-saving svg { animation: save-spin 1s linear infinite; }
@keyframes save-spin { to { transform: rotate(360deg); } }
/* Offline: a pill under the top bar, in the middle, over the page. */
.connection-notice { position: fixed; top: calc(var(--project-height) + 12px); left: 50%; z-index: 60; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 8px 16px; border: 1px solid var(--rule); border-radius: var(--radius-pill); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-floating); font-size: var(--text-small); transform: translateX(-50%); }
.connection-notice[hidden] { display: none; }
.connection-notice svg { flex: 0 0 auto; color: var(--warning); }
/* Loading: grey shapes of the cards and rows to come, with a slow shine. */
.loading-view { padding: 40px 32px; }
.loading-view[hidden] { display: none; }
/* Only the logo and the placeholders until the data is there. */
.app.is-loading .project-actions > :not(.save-status), .app.is-loading .dashboard-search, .app.is-loading .project-title, .app.is-loading .view-tabs, .app.is-loading .board, .app.is-loading .zoom-controls { visibility: hidden; }
.loading-strip, .loading-card, .loading-row, .loading-line { border-radius: var(--radius-large); background: linear-gradient(90deg, var(--fill) 0%, var(--fill-soft) 50%, var(--fill) 100%); background-size: 200% 100%; animation: loading-shine 1.4s ease-in-out infinite; }
.loading-line { width: 160px; height: 20px; margin: 0 0 16px 16px; border-radius: var(--radius-small); }
.loading-strip { height: 58px; margin-bottom: 8px; }
.loading-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 32px; }
.loading-card { height: 220px; }
.loading-row { height: 44px; margin-bottom: 8px; border-radius: var(--radius); }
@keyframes loading-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .loading-strip, .loading-card, .loading-row, .loading-line, .save-status.is-saving svg { animation: none; } }
/* The dashboard shows only the user button on the right; projects show the bell and ⋮ instead. */
.projectbar.is-dashboard .menu-button { display: none; }
.user-button { display: none; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--on-color); background: var(--avatar-default); font: inherit; font-size: var(--text-body); font-weight: 400; cursor: pointer; }
.projectbar.is-dashboard .user-button { display: grid; }
.user-button:hover { filter: brightness(.9); }
.user-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.user-button > * { grid-area: 1 / 1; }
.user-button.has-initial svg, .user-button:not(.has-initial) .user-initial, .user-button.has-photo svg, .user-button.has-photo .user-initial { display: none; }
.user-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-photo[hidden] { display: none; }
.menu-button { color: var(--ink); }
.reminder-button { position: relative; }
.reminder-button[hidden] { display: none; }
/* Rings twice whenever it appears. */
.reminder-button svg { transform-origin: 50% 3px; animation: reminder-ring 1.1s ease 2; }
@keyframes reminder-ring { 0%, 50%, 100% { transform: none; } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
.reminder-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid var(--bg); border-radius: var(--radius-pill); color: var(--on-color); background: var(--today); font-size: var(--text-tiny); font-weight: 500; line-height: 13px; text-align: center; }
.reminder-count:empty { top: 5px; right: 6px; min-width: 0; width: 10px; height: 10px; padding: 0; }

/* ==== 4. Timeline chrome: zoom, Today, view switch and client preview ==== */
.board { position: relative; min-height: 0; flex: 1; }
.app.is-week-zoom { --active-day-width: var(--week-day-width); --active-week-width: var(--week-mode-width); --active-week-offset: var(--week-mode-offset); }
/* Hidden weekends leave five columns per week. */
.app.hide-weekends { --active-week-width: calc(var(--day-width) * 5); }
.app.hide-weekends.is-week-zoom { --active-week-width: calc(var(--week-day-width) * 5); }
.zoom-controls { position: absolute; right: 20px; bottom: 20px; z-index: 14; display: flex; flex-direction: column; gap: 8px; }
/* Floating, like the Today button beside it: 36 high, bordered, with a shadow. */
.zoom-control { border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-floating); }
.zoom-control:not(:disabled):hover { background: var(--fill-soft); }
/* Timeline / Tasks: a floating switch level with the zoom out button, at the same spot in both views. */
/* Client preview (#/projects/<id>/client): the Timeline as a client sees it. Everything that edits, leads to settings,
   Tasks or the dashboard is hidden; responsible people only show when "Show responsible" is on. */
.app.is-client-view #editProject, .app.is-client-view .view-tabs, .app.is-client-view .project-crumb-home, .app.is-client-view .project-crumb-slash, .app.is-client-view .project-people, .app.is-client-view #reminderButton, .app.is-client-view .add-item,
.app.is-client-view .task-drag-handle, .app.is-client-view .timeline-empty, .app.is-client-view .bar-handle { display: none !important; }
.app.is-client-view:not(.shows-responsible) .task-row > .avatar { display: none; }
.app.is-client-view .project-home, .app.is-client-view .activity-bar, .app.is-client-view .timeline-row,
.app.is-client-view .task-row:not(.group-row), .app.is-client-view .task-name, .app.is-client-view .date-cell:not(.has-milestone) { cursor: default; }
/* The preview's own controls, where ⋮ and the switch usually sit: clearly not part of what the client sees. */
.client-preview-controls { display: flex; align-items: center; gap: 12px; }
.client-preview-controls[hidden] { display: none; }
.client-preview-label { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); color: var(--purple-text); background: var(--tint-purple); font-size: var(--text-small); font-weight: 500; white-space: nowrap; }
.client-preview-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--text-small); white-space: nowrap; cursor: pointer; }
/* A milestone in the client view: a small read-only card under its date. */
.client-milestone { position: fixed; z-index: 60; width: min(300px, calc(100vw - 24px)); padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-overlay); }
.client-milestone p { margin: 0; }
.client-milestone-date { color: var(--muted); font-size: var(--text-tiny); }
.client-milestone-title { margin-top: 6px !important; font-weight: 500; }
.client-milestone-description { margin-top: 4px !important; color: var(--text-2); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
/* The project's view tabs in the top bar (Timeline, Backlog, Board), as tall as the bar so the line under the shown
   one sits on its bottom edge. */
.project-actions { align-self: stretch; }
.view-tabs { grid-column: 2; justify-self: center; align-self: stretch; }
/* The project's members, overlapping, before the bell and ⋮. */
.project-people:empty { display: none; }
.project-people-group { display: flex; align-items: center; padding: 4px; border: 0; border-radius: var(--radius-control); background: transparent; cursor: default; }
button.project-people-group { cursor: pointer; transition: background .12s ease; }
button.project-people-group:hover { background: var(--fill); }
.project-people-group:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.project-people-group .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.project-people-group .avatar:first-child { margin-left: 0; }
button.project-people-group:hover .avatar { box-shadow: 0 0 0 2px var(--fill); }
.view-tabs[hidden] { display: none; }
.zoom-control:disabled { color: var(--muted); cursor: default; opacity: .65; }
/* Centered horizontally over the visible Gantt area, i.e. the board minus the work item pane. */
.today-control { position: absolute; bottom: 20px; left: calc(var(--task-pane-width) + (100% - var(--task-pane-width)) / 2); z-index: 14; box-shadow: var(--shadow-floating); transform: translateX(-50%); transition: background .12s ease, opacity .16s ease, visibility .16s ease; }
.today-control.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.zoom-control:focus-visible { outline-offset: 2px; }

/* ==== 5. Dashboard: Get started, Today, project cards, archive and the yearly overview ==== */
/* The bottom padding keeps the last cards clear of the floating Overview button. */
.dashboard-view { flex: 1; min-height: 0; overflow-y: auto; padding: 40px 16px 84px; background: var(--bg); }
/* On a large screen the dashboard keeps to 1440 wide, in the middle, so cards and Today don't stretch. */
.dashboard-view { padding-right: max(16px, calc((100% - 1440px) / 2)); padding-left: max(16px, calc((100% - 1440px) / 2)); }
/* Floats over the cards like Today does over the timeline; opens the yearly overview, which slides up from below, as wide as the dashboard (1440 at most). */
/* Visible again at once when shown (visibility only lags when hiding), so focus can return to it right away. */
.overview-button { position: fixed; bottom: 20px; left: 50%; z-index: 20; box-shadow: var(--shadow-floating); transform: translateX(-50%); transition: background .12s ease, opacity .16s ease, visibility 0s; }
.overview-button.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .16s ease, visibility .16s ease; }
.overview-panel { position: fixed; bottom: 16px; left: 50%; z-index: 21; width: min(1440px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; padding: 16px 20px 6px; border: 1px solid var(--rule); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-overlay); transform: translate(-50%, calc(100% + 32px)); visibility: hidden; transition: transform .26s ease, visibility .26s ease; }
.overview-panel.is-open { transform: translate(-50%, 0); visibility: visible; transition: transform .26s ease, visibility 0s; }
.overview-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.overview-title { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: var(--text-subheading); font-weight: 500; }
.overview-actions { display: flex; align-items: center; gap: 2px; }
.overview-actions .settings-close { margin: 0 0 0 6px; }
/* Month columns are as wide as their number of days, so bars (placed by day) line up with them. */
.overview-chart { position: relative; }
/* Stepping to a year with more or fewer lanes grows or shrinks the panel smoothly instead of jumping. */
.overview-panel.is-open .overview-chart { transition: height .25s ease; }
.overview-month { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--rule); }
.overview-month span { position: absolute; right: 0; bottom: 7px; left: 0; color: var(--muted); font-size: var(--text-tiny); text-align: center; }
.overview-bar { position: absolute; height: 6px; min-width: 4px; border-radius: var(--radius-pill); }
/* A taller invisible hit area, so the thin bars are easy to hover. */
.overview-bar::before { position: absolute; top: -5px; right: 0; bottom: -5px; left: 0; content: ""; }
.overview-tooltip { position: absolute; z-index: 1; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-overlay); font-size: var(--text-small); line-height: 1.4; white-space: nowrap; pointer-events: none; transform: translate(-50%, calc(-100% - 8px)); }
.overview-tooltip[hidden] { display: none; }
.overview-tooltip strong { display: block; font-size: var(--text-body); font-weight: 500; }
.overview-tooltip span { color: var(--muted); }
.overview-today { position: absolute; top: 0; bottom: 26px; width: 1px; background: var(--today); }
.overview-empty { position: absolute; top: 18px; right: 0; left: 0; text-align: center; }
/* Type follows the project view's scale: 13px body, 15-18px headings, 12px secondary text. */
.dashboard-title { margin: 0 0 12px; padding-left: 16px; font-size: var(--text-heading); font-weight: 500; line-height: 24px; letter-spacing: -.015em; }
.projects-header { margin-top: 32px; }
/* Archived projects sit under a collapsible heading below the active ones. */
.archived-section[hidden], .archived-projects[hidden] { display: none; }
.archived-title { margin-top: 32px; }
.archived-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 2px 6px 2px 0; border: 0; color: var(--text-2); background: none; font: inherit; font-size: var(--text-subheading); cursor: pointer; }
.archived-toggle:hover { color: var(--ink); }
.archived-toggle:focus-visible { border-radius: var(--radius-small); outline: 2px solid var(--focus); outline-offset: 2px; }
.archived-toggle svg { transition: transform .15s ease; }
.archived-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
/* Toned down: grey text and a grey progress line instead of the accent. */
.archived-projects .dashboard-card { color: var(--text-2); background: var(--fill-soft); }
.archived-projects .card-strip, .archived-projects .dashboard-card-dot { filter: grayscale(1); opacity: .6; }
.dashboard-title-date { margin-left: 6px; color: var(--muted); font-size: var(--text-body); font-weight: 400; }
/* Today: one card with a row per item, most urgent first. What and where on the left, when on the right. */
/* Get started: a card above Today with the first steps, ticked off from what's in the app. */
.checklist { display: grid; gap: 12px; margin-bottom: 32px; padding: 16px 20px 20px; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--bg); }
.checklist[hidden] { display: none; }
.checklist-header { display: flex; align-items: center; gap: 8px; }
.checklist-title { margin: 0; font-size: var(--text-subheading); font-weight: 500; }
.checklist-count { margin-right: auto; color: var(--text-2); font-size: var(--text-small); }
.checklist-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.checklist-item.list-row { height: 100%; border: 1px solid var(--rule); }
.checklist-item.is-done { color: var(--text-2); cursor: default; }
.checklist-item.is-done:hover { background: transparent; }
.checklist-item.is-done .list-row-icon { color: var(--green); }
.checklist-item .list-row-end { color: var(--muted); }
.checklist-item .list-row-title { flex: 1; white-space: normal; }
.today-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 12px; }
.today-header .dashboard-title { margin: 0; }
/* My work and Inbox, under the heading; Inbox's unread count in the today red, so it shows from My work too. */
.today-tabs { height: 36px; margin-bottom: 12px; padding-left: 14px; border-bottom: 1px solid var(--rule); }
.today-tabs .tab:first-child { padding-left: 2px; }
.today-tabs .tab:first-child::after { left: 0; }
.inbox-count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; padding: 0 5px; border-radius: var(--radius-pill); color: var(--on-color); background: var(--today); font-size: var(--text-tiny); font-weight: 500; }
.inbox-count:empty { display: none; }
.today-list[hidden] { display: none; }
/* One list in a thin outline, rows divided by lines; My work folds to its most urgent rows (.today-more, the last row). */
.today-list { position: relative; }
/* The rows keep their height while the list's eases, so the list clips them rather than squeezing them together. */
.today-list > * { flex-shrink: 0; }
/* Folding eases the list's height while the rows that go or come fade, and the last row rides on its bottom edge (over
   the fading rows, so it has the list's background). Only while toggling. */
.today-item.list-row { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; padding: 12px 16px; }
.today-item[hidden] { display: none; }
.today-item:has(.today-open:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.today-item.has-clear { grid-template-columns: 24px minmax(0, 1fr) auto auto; }
/* The title opens the item; its hit area stretches over the whole strip, under the Clear button. */
.today-open { display: block; max-width: 100%; padding: 0; border: 0; color: inherit; background: none; font: inherit; font-size: var(--text-body); font-weight: 500; text-align: left; cursor: pointer; }
.today-open::after { position: absolute; inset: 0; border-radius: inherit; content: ""; }
.today-open:focus-visible { outline: none; }
.today-clear { position: relative; z-index: 1; }
.today-icon { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; }
.today-item.is-reminder .today-icon { color: var(--purple-text); background: var(--tint-purple); }
.today-icon svg { width: 14px; height: 14px; }
/* The icon's wrapper is a block, so the icon doesn't sit on a text baseline above the middle. */
.today-icon > span, .today-icon svg { display: block; }
.today-item.is-task .today-icon, .today-item.is-project-task .today-icon { background: var(--fill); }
.today-item.is-milestone .today-icon { color: var(--on-color); background: var(--today); font-size: var(--text-tiny); font-weight: 500; }
.today-text { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.today-main { overflow: hidden; font-size: var(--text-body); font-weight: 500; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.today-project { overflow: hidden; color: var(--text-2); font-size: var(--text-small); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.today-project-name { color: color-mix(in srgb, var(--project-color, var(--muted)) var(--name-mix), var(--tint-ink)); font-weight: 500; }
.today-detail::before { content: " \00B7  "; color: var(--muted); }
.today-when { color: var(--muted); font-size: var(--text-small); white-space: nowrap; }
.today-when.is-overdue { color: var(--danger); }
/* Inbox rows: who, with what kind in a badge on their avatar; unread ones marked with a dot and in full ink. */
.inbox-item .today-icon { position: relative; }
.inbox-item .today-icon > .avatar { display: inline-grid; }
.inbox-kind { position: absolute; right: -5px; bottom: -5px; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: var(--text-2); background: var(--surface); box-shadow: 0 0 0 1.5px var(--surface), inset 0 0 0 1px var(--rule); }
.inbox-kind.is-mention { color: var(--on-color); background: var(--accent); box-shadow: 0 0 0 1.5px var(--surface); }
.today-icon .inbox-kind svg { width: 10px; height: 10px; }
.inbox-item.is-unread::before { position: absolute; top: 50%; left: 7px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); content: ""; }
.inbox-item:not(.is-unread) .today-open { color: var(--text-2); font-weight: 400; }
.today-empty { padding: 12px 16px; }
.today-more { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 16px; border: 0; border-top: 1px solid var(--rule); color: var(--text-2); background: var(--bg); font: inherit; font-size: var(--text-small); text-align: left; cursor: pointer; transition: background .12s ease, color .12s ease; }
.today-more:hover { color: var(--ink); background: var(--fill-soft); }
.today-more:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.dashboard-projects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Project cards, per the Figma dashboard design. Name and description are clamped to two lines each, so 236px fits the
   fullest card and every card (and grid row) gets the same height; the status block sits at the bottom so it lines up.
   Space below it is reserved for member avatars once there are users. */
.dashboard-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 236px; padding: 20px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius-large); color: var(--ink); background: var(--bg); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s ease; }
/* The wrapper holds the card and its ⋮ menu side by side, since a button can't contain another button. */
.dashboard-card-wrap { position: relative; display: grid; min-width: 0; }
.dashboard-card-wrap:hover .dashboard-card { box-shadow: var(--card-hover); }
.dashboard-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.dashboard-card.is-new { animation: card-arrive 1.2s ease-out; }
@keyframes card-arrive { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); } to { box-shadow: 0 0 0 3px transparent; } }
/* Room on the right of the name row for the ⋮ button. */
.dashboard-card-head { display: flex; align-items: flex-start; gap: 8px; padding-right: 28px; }
.dashboard-card-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 7px; border-radius: 2px; background: var(--project-color); }
.dashboard-card-head .status-pill { flex: 0 0 auto; margin-top: 1px; }
.card-menu-button { position: absolute; top: 13px; right: 7px; }
.card-menu { position: absolute; top: 46px; right: 8px; z-index: 3; min-width: 180px; padding: 4px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-overlay); }
.card-menu[hidden] { display: none; }
/* The project's ⋮ menu in the top bar, under its button; the bar rises over the sticky date header while it's open. */
.projectbar:has(.project-menu:not([hidden])) { z-index: 46; }
.project-menu-wrap { position: relative; }
.project-menu { top: calc(100% + 6px); right: 0; z-index: 30; min-width: 200px; }
.card-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-small); color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.card-menu-item:hover, .card-menu-item:focus-visible { background: var(--fill); outline: none; }
.card-menu-item svg { flex: 0 0 auto; color: var(--text-2); }
.card-menu-item.is-danger, .card-menu-item.is-danger svg { color: var(--danger); }
.dashboard-card-name { display: -webkit-box; flex: 1; min-width: 0; overflow: hidden; font-size: var(--text-subheading); font-weight: 500; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.dashboard-card-description { display: -webkit-box; margin-top: 6px; overflow: hidden; color: var(--text-2); font-size: var(--text-body); line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
/* The same bell (and red dot) as the reminder button in the project bar. */
.dashboard-card-bell { position: relative; display: grid; flex: 0 0 auto; margin-top: 2px; color: var(--ink); }
.dashboard-card-bell::after { position: absolute; top: -1px; right: -2px; width: 8px; height: 8px; border: 2px solid var(--bg); border-radius: 50%; background: var(--today); content: ""; }
/* People and status, then sections divided by hairlines: completion (with the phases) and time elapsed. */
/* All phases on one row: the name on top, then the ring with the percentage. Long names are cut short. */
/* A rounded cap would still draw a dot at 0 %. */
/* Project status and overdue labels, tinted like the parent labels so they read in both themes. */
.status-pill.is-ok { --tag: var(--green); }
.status-pill.is-risk { --tag: var(--orange); }
.status-pill.is-behind, .status-pill.is-overdue { --tag: var(--red); }
/* The strip: the plan from first start to last end, phases as bars (done share solid, the rest faint), milestones as
   --ink diamonds, today as a red line; then the first and last day, and the phases with their completion. */
.card-strip { display: grid; gap: 6px; margin-top: auto; padding-top: 20px; }
.card-strip-track { position: relative; height: 8px; border-radius: var(--radius-pill); background: var(--fill); }
.card-strip-segment { position: absolute; top: 0; bottom: 0; overflow: hidden; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--segment) 28%, transparent); }
.card-strip-segment > span { display: block; height: 100%; background: var(--segment); }
.card-strip-milestone { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 0 2px var(--bg); transform: rotate(45deg); }
.card-strip-today { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--today); }
.card-strip-dates { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: var(--text-small); font-variant-numeric: tabular-nums; }
.card-strip-phases { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-2); font-size: var(--text-small); }
.card-strip-phase { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.card-strip-phase::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 2px; background: var(--segment); content: ""; }
.card-strip-phase-value { color: var(--muted); font-variant-numeric: tabular-nums; }
/* The foot: completion, then overdue and time left, and the assignees as overlapping avatars on the right. */
.dashboard-card-foot { display: flex; align-items: center; gap: 8px; min-height: 37px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.dashboard-card-label { flex: 0 0 auto; font-weight: 500; }
.dashboard-card-meta { flex: 1; min-width: 0; overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-card-meta > * + *::before { content: " · "; color: var(--muted); }
.dashboard-card-overdue { color: var(--danger); }
.dashboard-card-avatars { display: flex; flex: 0 0 auto; }
.dashboard-card-avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.dashboard-card-avatars .avatar:first-child { margin-left: 0; }
.archived-projects .dashboard-card-avatars .avatar { box-shadow: 0 0 0 2px var(--fill-soft); }
.avatar-more { color: var(--text-2); background: var(--fill); font-size: var(--text-small); }
.dashboard-card-progress { height: 6px; border-radius: var(--radius-pill); background: var(--rule); }
.dashboard-card-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
/* The big plus keeps a thin line, like the card's border. */
@media (max-width: 1200px) { .dashboard-projects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .dashboard-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .today-item.list-row { grid-template-columns: 24px minmax(0, 1fr); }
  .today-item.has-clear { grid-template-columns: 24px minmax(0, 1fr); }
  .today-when { grid-column: 2; margin-top: -8px; }
  .today-clear { grid-column: 2; justify-self: start; }
  .dashboard-view { padding-top: 24px; }
  .dashboard-projects { grid-template-columns: minmax(0, 1fr); }
  .dashboard-card { min-height: 160px; }
}

/* ==== 6. Timeline: work item pane, dates, groups and bars ==== */
/* One scroll container for both axes keeps the work item pane and the timeline rows in lockstep. The pane sticks to
   the left edge and, via the negative margin, overlays the start of the timeline instead of pushing it right. */
.timeline-body { display: flex; width: max-content; min-width: 100%; min-height: calc(100% - var(--header-height)); }
.task-pane { position: sticky; left: 0; z-index: 5; display: flex; flex: 0 0 var(--task-pane-width); flex-direction: column; width: var(--task-pane-width); margin-right: calc(-1 * var(--task-pane-width)); background: var(--bg); box-shadow: 1px 0 0 var(--rule); }
/* Lives outside the scroll container, over the pane's right edge, so it (and its indicator) always spans the visible
   height rather than the full height of a long work item list. */
.task-resize-handle { position: absolute; top: var(--header-height); bottom: 0; left: calc(var(--task-pane-width) - 9px); z-index: 6; width: 9px; cursor: col-resize; touch-action: none; }
.task-resize-handle::after { position: absolute; top: 25%; right: 3px; bottom: 25%; width: 2px; border-radius: var(--radius-pill); background: transparent; content: ""; }
.task-resize-handle:hover::after, .task-resize-handle.is-resizing::after { background: var(--accent); }
.timeline-viewport { width: 100%; height: 100%; min-width: 0; overflow: auto; background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--scroll-track); overscroll-behavior: contain; }
.timeline-heading { position: sticky; top: 0; z-index: 45; height: var(--header-height); padding: 0 var(--timeline-trailing-space) 0 var(--timeline-leading-space); background: var(--bg); box-shadow: 0 1px 0 var(--rule); }
.timeline-heading { width: max-content; min-width: 100%; }
.month-row, .date-row { display: grid; width: max-content; height: 50%; grid-template-columns: repeat(var(--day-count), var(--active-day-width)); }
.month-cell { display: flex; align-items: center; padding-left: 8px; color: var(--muted); font-size: var(--text-tiny); }
/* The month's name stays at the left edge, in line with the logo, while its days scroll by under it; at the month's end
   the next month's name pushes it out and takes its place (scrolling back, the earlier month comes back the same way). */
.month-name { position: sticky; left: var(--logo-inset); white-space: nowrap; }
.date-cell { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 0; border: 0; color: var(--muted); background: transparent; font: inherit; font-size: var(--text-tiny); cursor: pointer; }
.date-cell:hover { background: var(--fill-soft); }
.date-cell span:last-child { color: var(--text-2); }
.date-cell.today:not(.has-milestone):not(.week-cell) span:last-child { color: var(--today); font-weight: 500; }
.date-cell.has-milestone:not(.week-cell) span:last-child { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; color: var(--on-color); background: var(--today); }
.date-cell.week-cell.today::after, .date-cell.week-cell.has-milestone::after { position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--today); content: ""; }
.date-cell.week-cell { font-weight: 500; }
.date-cell:focus-visible { z-index: 1; outline: 2px solid var(--focus); outline-offset: -2px; }

.task-list { position: relative; }
.timeline-list { position: relative; padding: 0 var(--timeline-trailing-space) 0 var(--timeline-leading-space); background-image: linear-gradient(to right, var(--grid-week) 1px, transparent 1px), linear-gradient(to right, var(--grid-day) 1px, transparent 1px); background-size: var(--active-week-width) 100%, var(--active-day-width) 100%; background-position: calc(var(--timeline-leading-space) + var(--active-week-offset)) 0, calc(var(--timeline-leading-space) - 1px) 0; }
.timeline-list::before { position: absolute; top: 0; bottom: 0; left: var(--today-line-offset); z-index: 0; width: 2px; background: var(--today); content: ""; pointer-events: none; }
.app.is-week-zoom .timeline-list { background-image: linear-gradient(to right, var(--grid-week) 1px, transparent 1px); background-size: var(--active-week-width) 100%; background-position: calc(var(--timeline-leading-space) + var(--active-week-offset)) 0; }
.task-row, .timeline-row { height: var(--row-height); }
.task-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; white-space: nowrap; }
.task-row::after { position: absolute; right: 12px; left: 12px; height: 1px; content: ""; pointer-events: none; }
.task-row::after { bottom: 0; background: var(--rule); }
.timeline-tail { height: 43px; }
.timeline-group-row { position: relative; height: var(--row-height); }
/* A parent's summary bar: from its first work item's start to its last one's end, with the group's completion. */
.group-bar { position: absolute; top: 19px; height: 12px; overflow: hidden; border-radius: var(--radius-pill); background: var(--parent-color); }
/* The grip covers the row's left padding strip and only shows while that strip is hovered; during a drag only the drop indicator shows. */
.task-drag-handle { position: absolute; top: 0; bottom: 0; left: 0; display: grid; width: 13px; place-items: center; color: var(--muted); cursor: grab; opacity: 0; touch-action: none; }
.task-drag-handle:hover { opacity: 1; }
.task-row.is-dragging { background: var(--fill-soft); }
.task-row.is-dragging .task-drag-handle { opacity: 0; cursor: grabbing; }
.task-drop-indicator { position: absolute; right: 12px; left: 12px; z-index: 2; height: 2px; border-radius: 1px; background: var(--accent); pointer-events: none; }
.task-drop-indicator.is-indented { left: 32px; }
@media (hover: none) { .task-drag-handle { opacity: 1; } }
/* Label for the work item's parent (a project phase such as Design), tinted with the parent's color. */
.task-parent { --tag: var(--parent-color); display: inline-block; flex: 0 0 auto; max-width: 45%; overflow: hidden; line-height: 20px; text-overflow: ellipsis; }
.task-name { overflow: hidden; text-overflow: ellipsis; }
/* Grouped by parent: a header row per parent. Its color dot (the marker) is drawn out into a line along the group's
   work items while the group is open; the marker's center and the lines share x = 17.5px. */
.group-row { cursor: pointer; }
.group-row:hover, .task-row:hover { background: var(--fill-soft); }
.group-row:focus-visible, .task-row:focus-visible { outline-offset: -2px; }
.group-marker { position: relative; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--parent-color); }
.group-row.is-open .group-marker::after, .group-row.is-closing .group-marker::after { position: absolute; top: 4.5px; left: 3px; width: 3px; height: calc(var(--row-height) / 2); background: var(--parent-color); content: ""; transform-origin: top; }
.group-row.is-open.is-empty .group-marker::after { display: none; }
/* Inside an open group the row dividers start right of the line, so they don't cut it; a group's last row spans fully. */
.group-row.is-open:not(.is-empty)::after { left: 32px; }
.task-row.is-grouped.is-group-end::after { left: 12px; }
.group-name { overflow: hidden; font-weight: 500; text-overflow: ellipsis; }
.group-count { flex: 0 0 auto; color: var(--muted); font-size: var(--text-small); }
.group-progress { flex: 0 0 auto; margin-left: auto; color: var(--text-2); font-size: var(--text-small); }
.group-chevron { flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.group-count + .group-chevron { margin-left: auto; }
.group-row.is-open .group-chevron { transform: rotate(90deg); }
.task-row.is-grouped { padding-left: 32px; }
.task-row.is-grouped::after { left: 32px; }
.group-line { position: absolute; top: 0; bottom: 0; left: 15px; width: 3px; background: var(--parent-color); pointer-events: none; transform-origin: top; }
.task-row.is-group-end .group-line { bottom: 14px; border-radius: 0 0 2px 2px; }
/* Opening a group draws the line down row by row (each segment's delay and duration are set inline). */
.group-row.is-opening .group-marker::after, .task-row.is-opening .group-line { animation: draw-line var(--draw-duration) linear var(--draw-delay) both; }
@keyframes draw-line { from { transform: scaleY(0); } }
.group-row.is-closing .group-marker::after, .task-row.is-closing .group-line { animation: retract-line var(--draw-duration) linear var(--draw-delay) forwards; }
@keyframes retract-line { to { transform: scaleY(0); } }
.task-name-input { width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid var(--border); border-radius: var(--radius-small); outline: none; }
/* Pinned to the bottom of the visible area; the 43px .timeline-tail keeps the last row clear of it. */
.add-item { position: sticky; bottom: 0; z-index: 1; display: flex; flex: 0 0 43px; margin-top: auto; align-items: center; gap: 4px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; color: var(--accent); background: var(--bg); text-align: left; cursor: pointer; }
.add-item::before { position: absolute; top: 0; right: 0; left: 0; height: 1px; background: var(--rule); content: ""; pointer-events: none; }
.add-item:hover { background: var(--fill-soft); }
.timeline-list { width: max-content; min-width: 100%; }
.timeline-row { position: relative; width: max-content; cursor: crosshair; touch-action: pan-y; }
.activity-bar { position: absolute; top: 10px; z-index: 1; display: flex; align-items: center; height: 29px; min-width: 10px; padding: 0; border: 0; border-radius: var(--radius-pill); cursor: grab; touch-action: none; }
.activity-bar:hover { z-index: 2; }
/* Lifted while being dragged (moved or resized); dropping lets it settle back down. */
.activity-bar:not(.preview) { transition: box-shadow .2s ease, transform .2s ease; }
/* Negative spread keeps the shadow beneath the bar rather than around it. */
.activity-bar.is-lifted { z-index: 3; box-shadow: var(--shadow-floating); transform: translateY(-1px); cursor: grabbing; }
/* Completion: a light shade over the done share, rounded at both ends like the bar itself. */
.bar-progress { position: absolute; top: 0; bottom: 0; left: 0; border-radius: inherit; background: var(--bar-shade); pointer-events: none; }
/* Sits just inside the bar's left end. When that end scrolls in under the work item pane, the label sticks just right of
   the pane, so it stays visible and close to the item name; sticky positioning keeps it within the bar. */
.bar-progress-label { position: sticky; left: calc(var(--task-pane-width) + 8px); flex: 0 0 auto; margin: 0 6px; padding: 2px 6px; border-radius: var(--radius-pill); color: var(--bar-label); background: var(--on-color); font-size: var(--text-tiny); font-weight: 500; line-height: 1; white-space: nowrap; opacity: 0; transition: opacity .12s ease; pointer-events: none; }
.activity-bar:hover .bar-progress-label, .activity-bar:focus-visible .bar-progress-label { opacity: 1; }
.activity-bar:active { cursor: grabbing; }
.activity-bar.purple { background: var(--purple); }
.activity-bar.orange { background: var(--orange); }
.activity-bar.blue { background: var(--blue); }
.activity-bar.red { background: var(--red); }
.activity-bar.green { background: var(--green); }
.activity-bar.teal { background: var(--teal); }
.activity-bar.yellow { background: var(--yellow); }
.activity-bar.grey { background: var(--grey); }
.activity-bar.preview { opacity: .56; pointer-events: none; }
.bar-handle { position: absolute; top: 0; bottom: 0; width: min(9px, 30%); cursor: ew-resize; }
.bar-handle.start { left: 0; }
.bar-handle.end { right: 0; }
.activity-bar:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.timeline-empty { padding: 16px 12px; }

/* ==== 7. Drawers and settings: modals, fields, team, colors ==== */
.settings-backdrop { position: fixed; top: calc(var(--project-height) + var(--header-height)); right: 0; bottom: 0; left: 0; z-index: 40; border: 0; background: var(--backdrop); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility .22s ease; }
.settings-backdrop.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.settings-drawer { position: fixed; top: calc(var(--project-height) + var(--header-height)); right: 0; bottom: 0; z-index: 41; display: flex; flex-direction: column; width: min(360px, 100vw); border-left: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-overlay); transform: translateX(100%); visibility: hidden; transition: transform .24s ease, visibility .24s ease; }
/* Become visible at once when opening (visibility only lags when closing), so focus can move into the drawer right away. */
/* On the dashboard there is no date header, so drawers and the backdrop start right under the top bar. */
.projectbar.is-dashboard ~ .settings-backdrop { top: 0; }
.setting-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.setting-hint.backup-status { color: var(--ink); }
/* Light / Dark: radio buttons in a segmented control. */
.segmented-item input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-item:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.backup-status:empty { display: none; }
.settings-drawer.is-open { transform: translateX(0); visibility: visible; transition: transform .24s ease, visibility 0s; }
/* Every drawer floats as a card over the page, like the board's details: clear of the top bar and the window edges by 16,
   and as tall as the window allows whatever it holds, so it doesn't change size as its content does. */
.floating-drawer { top: calc(var(--project-height) + 16px); right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-large); box-shadow: var(--shadow-overlay); transform: translateX(calc(100% + 32px)); }
.floating-drawer .settings-content { flex: 1 1 auto; min-height: 0; }
/* Rows reordered by dragging mustn't make the panel scroll itself to keep them in view. */
.settings-content { overflow-anchor: none; }
.floating-drawer.is-open { transform: translateX(0); }
/* On the Timeline the date header stays clear of the dimming (a click on another date switches milestones), so the cards start below it. */
.app:not(.is-tasks-view) .projectbar:not(.is-dashboard) ~ .floating-drawer { top: calc(var(--project-height) + var(--header-height) + 16px); }
/* General settings and Edit project: a modal in the middle of the window, with a menu of pages on the left and one page
   shown at a time. A fixed height, so switching pages doesn't make it jump. */
.settings-modal { position: fixed; top: 50%; left: 50%; z-index: 50; display: flex; width: min(800px, calc(100vw - 32px)); height: min(600px, calc(100vh - 64px)); overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-overlay); opacity: 0; visibility: hidden; transform: translate(-50%, calc(-50% + 8px)) scale(.98); transition: opacity .18s ease, transform .2s ease, visibility .2s; }
.settings-modal.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition: opacity .18s ease, transform .2s ease, visibility 0s; }
.settings-backdrop.is-modal { top: 0; z-index: 49; }
.settings-nav { display: flex; flex: 0 0 220px; flex-direction: column; gap: 2px; padding: 20px 12px 12px; border-right: 1px solid var(--rule); }
.settings-nav-title { margin: 0 8px 16px; overflow: hidden; font-size: var(--text-subheading); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.settings-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--radius); color: var(--text-2); background: transparent; text-align: left; cursor: pointer; }
.settings-nav-item:hover { color: var(--ink); background: var(--fill); }
.settings-nav-item[aria-current="page"] { color: var(--ink); background: var(--fill); font-weight: 500; }
.settings-nav-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.settings-nav-item svg { flex: 0 0 auto; }
.settings-nav-delete { margin-top: auto; padding: 0 10px; }
.settings-main { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.settings-modal .settings-header { align-items: flex-start; padding: 20px 16px 8px 32px; }
.settings-page-title { margin: 0; font-size: var(--text-heading); font-weight: 500; letter-spacing: -.015em; }
.settings-modal .settings-close { margin: 0; }
.settings-modal .settings-content { padding: 16px 32px 32px; }
.settings-page { max-width: 560px; }
/* Every page reads the same way: its title, a line in --text-2 saying what it's for (data-lede), then sections, each a
   black heading (14/500) over an outlined card of rows, 28 apart. A row has its name in --ink with a --text-2 line
   under it on the left, and its control on the right (.setting-row); a wide control goes under its text
   (.setting-stack). Lists and editors sit in a card or under their section's line. Black over grey, as in the rest
   of the app, and in the settings only: in drawers a label stays --muted beside its value. */
.settings-page-lede { margin: 2px 0 0; color: var(--text-2); }
.settings-page-lede:empty { display: none; }
.setting-section + .setting-section { margin-top: 28px; }
.setting-section-title { display: block; margin: 0 0 8px; color: var(--ink); font-size: var(--text-body); font-weight: 500; }
.setting-section-text { margin: -4px 0 10px; color: var(--text-2); font-size: var(--text-small); }
.setting-card { border: 1px solid var(--rule); border-radius: var(--radius-large); background: var(--bg); }
.settings-modal .setting-card > .setting-group:nth-child(n) { margin: 0; padding: 14px 16px; }
.setting-card > .setting-group:not([hidden]) ~ .setting-group { border-top: 1px solid var(--rule); }
.settings-modal .setting-label { margin-bottom: 0; color: var(--ink); }
.settings-modal .setting-hint { margin-top: 2px; color: var(--text-2); }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
.setting-row > :is(.setting-label, .setting-hint, .delete-item, .plan-name, .plan-card) { grid-column: 1; }
.setting-row > :not(.setting-label, .setting-hint, .delete-item, .plan-name, .plan-card) { grid-row: 1 / span 3; grid-column: 2; justify-self: end; }
/* A row with only a name (no line under it, or an empty one) centers it beside the control. */
.setting-row:not(:has(> .setting-hint:not([hidden], :empty))) > :is(.setting-label, .delete-item, .plan-name) { grid-row: 1 / span 3; align-self: center; }
.setting-row .setting-input { width: 240px; }
.setting-row > .delete-item { min-height: 0; }
.setting-row .setting-buttons { justify-content: flex-end; }
.setting-stack > .setting-label + :not(.setting-hint), .setting-stack > .setting-hint + :not(.setting-hint) { margin-top: 10px; }
.setting-card > .member-list { margin: 0; }
.setting-card .member-row.list-row { padding: 8px 16px; }
.setting-card + .project-member-add { margin-top: 12px; }
.setting-card > .plan-lines { padding: 14px 16px; }
.settings-page[hidden] { display: none; }
/* A project without the Timeline or Tasks leaves out their settings and actions. */
.settings-nav-item[hidden], .card-menu-item[hidden], .setting-group[hidden] { display: none; }
/* A switch with its explanation beside it, on the left. */
.toggle-text { display: grid; gap: 2px; }
.toggle-text .setting-hint { margin: 0; }
.settings-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 16px 16px; }
.settings-title { max-width: 270px; margin: 0; overflow: hidden; font-size: var(--text-heading); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.015em; }
.settings-close { margin: -6px -8px 0 0; }
.settings-content { flex: 1; overflow-y: auto; padding: 20px 16px; }
.setting-group + .setting-group { margin-top: 24px; }
/* Keyboard shortcuts: what it does on the left, its keys on the right, a row each. */
.shortcut-list { margin: 0; }
.shortcut-row.list-row { justify-content: space-between; gap: 16px; min-height: 36px; padding: 0; }
.shortcut-label { margin: 0; color: var(--ink); }
.shortcut-keys { display: flex; flex: 0 0 auto; gap: 4px; margin: 0; }
/* A hidden group (e.g. a milestone's "On this date") leaves no gap above the next. */
.setting-group[hidden] + .setting-group { margin-top: 0; }
/* …unless a shown group comes before it, as Name before a hidden Parent and then Responsible. */
.setting-group + .setting-group[hidden] + .setting-group { margin-top: 24px; }
/* Text sizes come from the type scale on :root (--text-*), in weights 400, 500 and 600. */
.setting-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: var(--text-body); font-weight: 400; }
.setting-input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); background: var(--surface); outline: none; }
.setting-textarea { height: auto; min-height: 128px; padding: 10px; font: inherit; resize: vertical; }
/* A field in use, everywhere: an accent border, doubled by a 1 px ring. */
.setting-input:focus, .select-button[aria-expanded="true"], .task-name-input:focus, .inline-field-input:not([hidden]), .comment-edit-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
.color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch { width: 28px; height: 28px; padding: 0; border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.color-swatch[aria-pressed="true"] { box-shadow: 0 0 0 1.5px var(--ink); }
.color-swatch:disabled { cursor: default; }
.color-swatch:disabled:not([aria-pressed="true"]) { opacity: .3; }
.color-swatch:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
/* A setting's text and its switch on one line, without an outline. */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; cursor: pointer; }
.toggle-row[hidden] { display: none; }
.toggle-row-first { margin-top: 0; }
.toggle { position: relative; width: 34px; height: 20px; flex: 0 0 34px; margin: 0; border-radius: var(--radius-pill); background: var(--toggle-off); cursor: pointer; appearance: none; transition: background .15s ease; }
.toggle::before { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--on-color); box-shadow: 0 1px 2px #00000033; content: ""; transition: transform .15s ease; }
.toggle:checked { background: var(--accent); }
.toggle:checked::before { transform: translateX(14px); }
.toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* A person's initial in a round avatar: 24 wherever a person is named, 20 inside a line of text (history changes)
   and 32 on project cards and the top bar. */
.avatar { display: inline-grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; color: var(--on-color); background: var(--avatar-default); font-size: var(--text-tiny); line-height: 1; }
/* The initial's capital, not its line, is what's centered (where text-box is supported), so no letter sits a rounding
   pixel high or low. */
.avatar, .user-initial { text-box: trim-both cap alphabetic; }
/* A photo fills the avatar instead of the initial. */
.avatar > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* Profile settings: your avatar (large), then Add or Change photo and Remove. */
.profile-photo { display: flex; align-items: center; gap: 8px; }
.company-logo-field { display: flex; align-items: center; gap: 8px; }
/* The logo as it is, at most 32 high, on the field color so a white logo still shows. */
.company-logo-preview { max-width: 160px; height: 32px; margin-right: 4px; padding: 4px 8px; box-sizing: content-box; border-radius: var(--radius); background: var(--fill-soft); object-fit: contain; }
.company-logo-preview[hidden] { display: none; }
/* The company's time zone: a city, then its region and offset in grey. */
.zone-choice { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; }
.zone-detail { color: var(--muted); font-size: var(--text-small); white-space: nowrap; }
.profile-photo .avatar { width: 32px; height: 32px; flex-basis: 32px; margin-right: 4px; font-size: var(--text-body); }
.task-row .avatar { margin-left: auto; }
.member-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.member-label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-label small { color: var(--muted); font-size: var(--text-small); }
/* Team members: one row each, with the avatar (its colors in a menu under it), name, email and remove. */
.member-list { margin-bottom: 12px; }
.member-list:empty { display: none; }
.member-row.list-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr) auto auto; gap: 8px; min-height: 52px; padding: 8px 0; }
.member-row.member-self { grid-template-columns: auto minmax(0, 1fr) auto; }
/* A project's members: who (as in the team list), their role in a menu, and remove. */
.member-row.project-member-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.project-member-role, .project-member-add { position: relative; }
.project-member-role .card-menu { top: calc(100% + 4px); right: 0; min-width: 260px; }
.project-member-add .card-menu { top: calc(100% + 4px); right: auto; left: 0; min-width: 220px; }
.project-member-add { margin-bottom: 4px; }
.project-member-remove.is-self { visibility: hidden; }
.role-button { gap: 4px; }
.role-choice { display: grid; gap: 2px; padding: 8px 0; text-align: left; }
.role-choice small { color: var(--muted); font-size: var(--text-small); }
.card-menu-item.role-item { min-height: 0; align-items: flex-start; }
.card-menu-item.role-item svg { margin-top: 9px; }
.card-menu-item.role-item:not([aria-checked="true"]) svg { visibility: hidden; }
.member-self-text { display: grid; min-width: 0; gap: 2px; }
.member-self-text small { overflow: hidden; color: var(--muted); font-size: var(--text-small); text-overflow: ellipsis; white-space: nowrap; }
.member-color-picker { position: relative; }
.member-avatar-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.member-avatar-button:hover, .member-avatar-button[aria-expanded="true"] { background: var(--fill); }
.member-avatar-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.member-color-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 5; padding: 8px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-overlay); }
.member-color-menu .color-options { flex-wrap: nowrap; gap: 6px; }
.member-color-menu .color-swatch { width: 24px; height: 24px; }

/* ==== 8. Shared pickers and drawer parts: select menu, date picker, option fields, reminders ==== */
.select-menu { position: relative; }
.select-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
.select-button svg { flex: 0 0 auto; color: var(--text-2); }
.select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-value .task-parent { display: inline-block; max-width: 100%; vertical-align: middle; }
.select-options { position: absolute; top: calc(100% + 4px); right: 0; left: 0; z-index: 2; max-height: 240px; overflow-y: auto; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-overlay); outline: none; }
.select-options[hidden] { display: none; }
.select-option { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border-radius: var(--radius-small); cursor: pointer; }
/* A menu with nothing to choose says why, in grey. */
.select-empty { padding: 8px 10px; }
.select-option .task-parent { max-width: calc(100% - 24px); }
.select-option.is-active { background: var(--fill); }
.select-none { color: var(--text-2); }
.select-none svg { color: var(--muted); }
/* Start and End: a field-like button with the date and a calendar. */
.date-button-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The calendar for every date field (openDatePicker): month and arrows, weeks from Monday, Today below. The chosen day
   is filled with the accent and today's number is in the today red; while picking Start or End the work item's days
   are tinted as one band. */
.date-popover { position: fixed; z-index: 60; width: 262px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-overlay); }
.date-popover[hidden] { display: none; }
.date-popover-header { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; padding-left: 6px; }
.date-popover-month { flex: 1; font-size: var(--text-body); font-weight: 500; }
.date-popover-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px 0; }
.date-weekday { display: grid; height: 24px; place-items: center; color: var(--muted); font-size: var(--text-tiny); font-weight: 500; }
.date-day { position: relative; display: grid; width: 34px; height: 32px; place-items: center; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: var(--text-body); cursor: pointer; }
.date-day::before { position: absolute; inset: 0 1px; z-index: 0; border-radius: var(--radius-pill); content: ""; transition: background .12s ease; }
.date-day span { position: relative; }
.date-day.is-outside { color: var(--muted); }
.date-day.is-today { color: var(--today); font-weight: 500; }
.date-day:hover::before { background: var(--fill); }
.date-day.is-in-range { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.date-day.is-range-start, .date-day:nth-child(7n+1).is-in-range { border-top-left-radius: var(--radius-pill); border-bottom-left-radius: var(--radius-pill); }
.date-day.is-range-end, .date-day:nth-child(7n).is-in-range { border-top-right-radius: var(--radius-pill); border-bottom-right-radius: var(--radius-pill); }
.date-day[aria-pressed="true"] { color: var(--on-color); font-weight: 500; }
.date-day[aria-pressed="true"]::before { background: var(--accent); }
.date-day:focus-visible { outline: none; }
.date-day:focus-visible::before { box-shadow: 0 0 0 2px var(--focus); }
.date-day:disabled { opacity: .3; cursor: default; }
.date-day:disabled:hover::before { background: transparent; }
.date-popover-footer { display: flex; justify-content: flex-end; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
.parent-list { display: grid; gap: 10px; margin-bottom: 12px; }
.parent-list:empty { display: none; }
.parent-item { padding: 10px; border: 1px solid var(--rule); border-radius: var(--radius); }
.parent-item-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.parent-remove:not(:disabled):hover { color: var(--danger); }
.parent-remove svg { width: 16px; height: 16px; }
.parent-item .color-options { gap: 8px; padding-left: 2px; }
/* Statuses and urgency levels can be put in order by a grip at the start of each row. */
/* Parent items, task statuses and urgency levels: a field of colored chips, and a panel over it to edit them. */
.option-field { position: relative; }
.option-field-button { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; min-height: 40px; padding: 8px 8px; border: 1px solid transparent; border-radius: var(--radius); color: var(--ink); background: transparent; text-align: left; cursor: pointer; transition: background .12s ease; }
.option-field-button:hover { background: var(--fill); }
.option-field-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.option-field-empty { color: var(--muted); }
.option-chip { gap: 4px; min-width: 0; max-width: 100%; }
.option-panel { position: absolute; top: 0; right: 0; left: 0; z-index: 5; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-overlay); }
.option-panel[hidden] { display: none; }
.option-panel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 8px; border-bottom: 1px solid var(--rule); background: var(--fill-soft); }
.option-chip-remove { display: grid; width: 16px; height: 16px; place-items: center; margin-right: -4px; padding: 0; border: 0; border-radius: var(--radius-small); color: inherit; background: transparent; opacity: .7; cursor: pointer; }
.option-chip-remove:hover { opacity: 1; background: color-mix(in srgb, var(--tag) 22%, transparent); }
.option-chip-remove:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; opacity: 1; }
.option-input { flex: 1 0 120px; min-width: 0; height: 24px; padding: 0 2px; border: 0; color: var(--ink); background: transparent; font: inherit; outline: none; }
.option-input::placeholder { color: var(--muted); }
.option-panel-hint { margin: 0; padding: 10px 12px 4px; color: var(--muted); font-size: var(--text-small); }
.option-list { display: grid; padding: 2px 4px 6px; }
.option-row { border-radius: var(--radius); }
.option-row-head { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 4px 0 6px; border-radius: var(--radius); cursor: pointer; }
.option-row-head:hover { background: var(--fill); }
.option-row-head .option-chip { overflow: hidden; text-overflow: ellipsis; }
.option-more { margin-left: auto; opacity: 0; }
.option-row-head:hover .option-more, .option-more:focus-visible, .option-more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .option-more { opacity: 1; } }
.option-row.is-dragging { position: relative; z-index: 1; background: var(--surface); box-shadow: var(--shadow-overlay); }
.option-row.is-dragging .label-grip { cursor: grabbing; }
.option-edit { display: grid; gap: 10px; margin: 2px 6px 8px 32px; padding: 10px; border: 1px solid var(--rule); border-radius: var(--radius); }
.option-edit .color-options { gap: 8px; }
.option-edit .color-swatch { width: 20px; height: 20px; }
.option-delete { display: inline-flex; align-items: center; justify-self: start; gap: 6px; padding: 4px 6px; margin-left: -6px; border: 0; border-radius: var(--radius-small); color: var(--danger); background: transparent; font: inherit; font-size: var(--text-body); cursor: pointer; }
.option-delete:hover { background: var(--fill); }
.option-delete:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.label-grip { display: grid; width: 20px; height: 32px; flex: 0 0 20px; place-items: center; margin-left: -4px; padding: 0; border: 0; border-radius: var(--radius-small); color: var(--muted); background: transparent; cursor: grab; touch-action: none; }
.label-grip:hover { color: var(--ink); background: var(--fill); }
.label-grip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.parent-item .color-swatch { width: 20px; height: 20px; }
.setting-hint { margin: 8px 0 0; color: var(--muted); font-size: var(--text-small); line-height: 1.45; }
.setting-hint.is-error { color: var(--danger); }
.setting-hint-split { display: flex; justify-content: space-between; gap: 12px; }
.project-description { min-height: 84px; }
.settings-footer { display: flex; flex: 0 0 43px; align-items: center; padding: 0 16px; border-top: 1px solid var(--rule); }
.delete-item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 2px; border: 0; color: var(--danger); background: transparent; cursor: pointer; }
.delete-item[hidden] { display: none; }
.reminder-card { padding: 12px 16px; border: 1px solid var(--rule); border-radius: var(--radius); }
.reminder-card[data-state="due"] { border-color: var(--tint-purple-border); background: var(--tint-purple); }
.reminder-card[hidden], .reminder-fields[hidden], .reminder-actions [hidden] { display: none; }
.reminder-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--text-small); }
.reminder-card[data-state="due"] .reminder-card-head { color: var(--purple-text); font-weight: 500; }
.reminder-card-time { color: var(--ink); font-weight: 500; }
.reminder-card-message { margin: 8px 0 0; color: var(--ink); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.reminder-card-message.is-empty { color: var(--muted); }
/* Actions at the foot of the card or form, on the right; Remove reminder on the left. */
.reminder-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.reminder-actions .delete-item { min-height: 28px; margin-right: auto; }
.reminder-fields { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius); }
.reminder-fields .reminder-message { min-height: 76px; }
.reminder-when { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; }
.reminder-zone { margin: 0; }
.reminder-fields .reminder-actions { margin-top: 2px; }
.delete-item:hover { text-decoration: underline; }
/* Milestones: a date's milestones one after another, each headed by its title edited in place (the first one's beside
   ×), then Date and Reminder as label/value rows and its description. */
.floating-drawer.milestone-drawer { width: min(440px, calc(100vw - 32px)); background: var(--bg); }
.milestone-close { position: absolute; top: 16px; right: 12px; z-index: 1; color: var(--text-2); }
.milestone-drawer .settings-content { padding: 20px 24px 24px; }
/* The project's activity: a head with the title and ×, then the log by day, in History's rows. */
.floating-drawer.activity-drawer { width: min(480px, calc(100vw - 32px)); background: var(--bg); }
.activity-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px 4px 24px; }
.activity-title { margin: 0; font-size: var(--text-heading); font-weight: 500; letter-spacing: -.015em; }
.activity-drawer .settings-content { padding: 4px 24px 32px; }
.activity-list { display: grid; gap: 16px; }
.activity-day { margin: 12px 0 -4px; color: var(--muted); font-size: var(--text-small); font-weight: 400; }
.activity-day:first-child { margin-top: 4px; }
/* Show earlier, under the log while there's more (a failure to load says so above it). */
.activity-more { display: grid; justify-items: start; gap: 8px; }
.activity-name { font-weight: 500; }
.activity-link { padding: 0; border: 0; color: inherit; background: none; font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.activity-link:hover { text-decoration: underline; }
.activity-link:focus-visible { border-radius: var(--radius-small); outline: 2px solid var(--focus); outline-offset: 1px; }
.activity-color { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--color); vertical-align: -1px; }
.milestone-block + .milestone-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule); }
.milestone-head { display: flex; align-items: flex-start; gap: 4px; }
.milestone-block:first-child .milestone-head { padding-right: 32px; }
.milestone-title { flex: 1; min-width: 0; margin-top: -6px; }
.milestone-title .milestone-title-text { font-size: var(--text-heading); font-weight: 500; line-height: 28px; letter-spacing: -.015em; }
.milestone-menu { flex: 0 0 auto; margin-top: -2px; }
.milestone-fields { margin: 8px 0 12px; }
.milestone-day { display: inline-grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--on-color); background: var(--today); font-size: var(--text-tiny); }
.milestone-fields.task-pickers > .milestone-reminder-group:not([hidden]) { align-items: start; }
.milestone-reminder-group > .setting-label { line-height: 40px; }
.milestone-fields.task-pickers > .setting-group > .milestone-reminder { justify-self: stretch; }
.reminder-add .round-picker-empty { gap: 8px; }
.milestone-reminder .reminder-card, .milestone-reminder .reminder-fields { margin: 4px 0; }
.reminder-past { margin: 0; padding: 10px 0; color: var(--muted); line-height: 1.45; }
.milestone-drawer .milestone-add { margin: 16px 0 0 -8px; }
.milestone-add[hidden] { display: none; }

/* ==== 9. Dialogs: search, onboarding, releases and list rows ==== */
/* Dialogs (search, releases): a modal <dialog> card near the top of the window, 520 wide unless --dialog-width says. */
.dialog { width: min(var(--dialog-width, 520px), calc(100% - 32px)); max-height: min(var(--dialog-height, 680px), calc(100vh - 32px)); margin: 10vh auto auto; padding: 0; border: 1px solid var(--rule); border-radius: var(--radius-large); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-overlay); }
/* It fades in and settles over a fading dimmer, and fades out the same way: it stays in the top layer until it has
   (overlay, allow-discrete), and takes no clicks meanwhile. */
.dialog { transition: opacity .16s ease, transform .18s cubic-bezier(.3, .7, .2, 1), overlay .18s allow-discrete, display .18s allow-discrete; }
.dialog[open] { display: flex; flex-direction: column; }
/* Closing, it's no longer modal, so it keeps the modal's place and layout itself until it has faded. */
.dialog:not([open]) { position: fixed; inset: 0; display: none; flex-direction: column; opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; }
@starting-style { .dialog[open] { opacity: 0; transform: translateY(-6px) scale(.98); } }
.dialog::backdrop { background: var(--backdrop); transition: opacity .18s ease, overlay .18s allow-discrete, display .18s allow-discrete; }
.dialog:not([open])::backdrop { opacity: 0; pointer-events: none; }
@starting-style { .dialog[open]::backdrop { opacity: 0; } }
/* Search (Cmd/Ctrl+K): a card near the top of the window over a dimmed page, the field on top and the results below,
   grouped by kind. The highlighted result (arrows or hover) gets --fill. */
.search-dialog { --dialog-width: 560px; --dialog-height: 520px; overflow: hidden; }

/* Onboarding: the bot, larger, beside each step's title; the steps change in place, with dots for where you are. */
.onboarding { --dialog-width: 560px; }
.onboarding-head { display: flex; flex: 0 0 auto; align-items: center; gap: 16px; padding: 24px 24px 0; }
.onboarding-bot { display: grid; width: 56px; height: 56px; flex: 0 0 56px; place-items: center; padding: 6px; border: 1px solid var(--rule); border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-floating); }
.onboarding-title { margin: 0; font-size: var(--text-heading); font-weight: 500; letter-spacing: -.015em; }
.onboarding-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 24px 24px; }
.onboarding-body.is-changing { animation: onboarding-step-in .22s ease-out; }
@keyframes onboarding-step-in { from { opacity: 0; transform: translateX(8px); } }
.onboarding-text { margin: 0; color: var(--text-2); line-height: 1.5; }
.onboarding-step { margin-top: 20px; }
.onboarding-step[hidden] { display: none; }
.onboarding-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onboarding-part { display: grid; align-content: start; gap: 8px; padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius-large); }
.onboarding-part-head { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.onboarding-part p { margin: 0; color: var(--text-2); line-height: 1.5; }
.list-rows.onboarding-choices { gap: 8px; margin: 0; }
.list-row.onboarding-choice { border: 1px solid var(--border); }
.onboarding-footer { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--rule); }
.onboarding-dots { display: flex; gap: 6px; margin-right: auto; }
.onboarding-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: background .2s ease; }
.onboarding-dot.is-current { background: var(--ink); }
@media (max-width: 620px) { .onboarding-parts { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .onboarding-body.is-changing { animation: none; } }

/* List rows (search results, releases and their tasks, a work item's tasks): an optional round icon, a title with a
   detail below, then whatever sits at the end. --fill-soft on hover, --fill when chosen with the keyboard. */
.list-rows { display: grid; gap: 2px; margin: 0 -8px; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px; border: 0; border-radius: var(--radius); color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; transition: background .12s ease; }
.list-row:hover { background: var(--fill-soft); }
.list-row[aria-selected="true"] { background: var(--fill); }
.list-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.list-row-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 50%; color: var(--text-2); background: var(--fill-soft); }
.list-row:hover .list-row-icon, .list-row[aria-selected="true"] .list-row-icon { background: var(--surface); }
.list-row-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.list-row-title, .list-row-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-title.is-strong { font-weight: 500; }
.list-row > .list-row-title { flex: 1; min-width: 0; }
.list-row-detail { color: var(--text-2); font-size: var(--text-small); }
/* Rows divided by lines (Today and the Inbox, the team, a project's members, the invited, keyboard shortcuts): no gaps or
   rounding, a --rule line between rows. .is-ruled adds lines above and below (in settings); .is-outlined puts the list in
   a thin --border outline (Today). A row that does nothing when pressed is .is-static: no hover. */
.divided-rows { display: flex; flex-direction: column; }
.divided-rows > .list-row { border-radius: 0; }
.divided-rows > * + * { border-top: 1px solid var(--rule); }
.divided-rows.is-ruled { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.divided-rows.is-outlined { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--bg); }
.list-row.is-static { cursor: default; }
.list-row.is-static:hover { background: transparent; }
.list-row-end { display: grid; flex: 0 0 auto; justify-items: end; gap: 2px; color: var(--text-2); font-size: var(--text-small); }
.search-field { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--rule); color: var(--text-2); }
.search-input { flex: 1; min-width: 0; height: 52px; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: var(--text-subheading); outline: none; }
.search-input::placeholder { color: var(--muted); }
.search-dialog kbd, .shortcut-keys kbd { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 4px; border: 1px solid var(--border); border-radius: var(--radius-small); color: var(--text-2); background: var(--fill-soft); font: inherit; font-size: var(--text-tiny); }
.search-results { flex: 1 1 auto; overflow-y: auto; padding: 6px 8px 8px; }
.search-results[hidden] { display: none; }
.search-group { margin: 0; padding: 10px 8px 6px; color: var(--muted); font-size: var(--text-small); font-weight: 500; }
.search-dot { width: 10px; height: 10px; border-radius: 2px; }
.search-match { color: inherit; background: none; font-weight: 500; }
.search-project { color: color-mix(in srgb, var(--project-color, var(--muted)) var(--name-mix), var(--tint-ink)); font-weight: 500; }
.search-hint { display: flex; flex: 0 0 auto; gap: 16px; margin: 0; padding: 8px 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: var(--text-small); }
.search-hint span { display: inline-flex; align-items: center; gap: 4px; }
@media (prefers-reduced-motion: reduce) { .dialog, .dialog::backdrop { transition: none; } }
@media (hover: none) { .search-hint { display: none; } }

/* ==== 10. Toast and the bot ==== */
/* Speech bubble from the planning bot, pinned bottom-left of the Gantt area. Its width always stops short of where the
   centered Today button sits (76px = 20px offset + half the button + a gap), whether or not Today is showing, so long
   messages wrap onto a second line instead of stretching across the timeline. */
.toast { position: fixed; bottom: 20px; left: calc(var(--task-pane-width) + 20px); z-index: 30; display: flex; align-items: flex-end; gap: 8px; max-width: max(200px, calc((100vw - var(--task-pane-width)) / 2 - 76px)); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; pointer-events: none; }
/* Too narrow to fit beside Today: lift the bubble above the bottom row of buttons, still clear of the zoom controls. */
.toast.is-raised { bottom: 70px; max-width: calc(100vw - var(--task-pane-width) - 90px); }
/* Tasks has no work item pane, so the bubble starts at the window's edge. */
.app.is-tasks-view .toast, .app.is-tasks-view .toast.is-raised { left: 20px; max-width: min(520px, calc(100vw - 40px)); }
.toast.visible { opacity: 1; visibility: visible; transform: none; }
/* A toast with an action (Undo) sits above an open drawer's backdrop, and only its button takes clicks. */
.toast.has-action { z-index: 51; }
.toast-action { margin-left: 8px; padding: 0; border: 0; color: var(--accent); background: none; font: inherit; font-weight: 500; cursor: pointer; }
.toast-action[hidden] { display: none; }
.toast.visible .toast-action { pointer-events: auto; }
.toast-action:hover { text-decoration: underline; }
.toast-action:focus-visible { border-radius: var(--radius-small); outline: 2px solid var(--focus); outline-offset: 2px; }
/* The avatar sits in a round white badge styled like the buttons. The icon's body sits left of and below its image
   center (the trailing dots widen the box to the right), so object-position nudges it to look optically centered. */
.toast-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; padding: 4px; border: 1px solid var(--rule); border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-floating); transform: scale(.6) rotate(-12deg); transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
/* The bot's face. Each eye squashes from its bottom edge, so blinking and squinting keep the eyes' baseline. */
.bot-face { display: block; width: 100%; height: 100%; overflow: visible; }
.bot-eyes { transform-box: view-box; transform-origin: 50% 50%; transition: transform .28s cubic-bezier(.34, 1.4, .64, 1); }
.bot-head { fill: var(--bot); }
.bot-eye { fill: var(--on-color); transform-box: fill-box; transform-origin: 50% 100%; transition: transform .2s cubic-bezier(.34, 1.4, .64, 1); }
/* Moods, after the sketches: looking up and away, a skeptical "oops" (one eye low), and a happy squint. */
.bot-face.is-look .bot-eyes { transform: translate(11px, -6px) rotate(-10deg); }
.bot-face.is-glance .bot-eyes { transform: translate(-7px, 1px); }
.bot-face.is-oops .bot-eye-left { transform: scaleY(.6); }
.bot-face.is-happy .bot-eye { transform: scaleY(.45); }
/* A blink is quicker than a mood change. */
.bot-face.is-blinking .bot-eye { transform: scaleY(.1); transition-duration: .07s; transition-timing-function: ease-in; }
.toast.visible .toast-avatar { transform: none; }
.toast-bubble { position: relative; min-width: 0; min-height: 38px; margin: 0; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius-large); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-floating); font-size: var(--text-small); line-height: 1.4; overflow-wrap: anywhere; }
/* A rotated square whose left/bottom borders form the tail, 14px up from the bottom: low enough to read as a speech
   bubble, high enough that its lower point stays on the straight edge above the 14px corner curve. */
.toast-bubble::before { position: absolute; bottom: 10px; left: -4.5px; width: 8px; height: 8px; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); background: var(--surface); transform: rotate(45deg); content: ""; }

/* ==== 11. Tasks view: the list, filter, board and releases ==== */
/* Tasks view: the project's tasks in a pane on the left, like the Gantt's work item pane, and the chosen task's
   details filling the rest. Each side scrolls on its own. */
.tasks-view { display: flex; flex: 1; min-height: 0; background: var(--canvas); }
.tasks-view[hidden] { display: none; }
.tasks-sidebar { position: relative; z-index: 1; display: flex; flex: 0 0 var(--tasks-sidebar-width, 380px); flex-direction: column; width: var(--tasks-sidebar-width, 380px); min-height: 0; border-right: 1px solid var(--rule); background: var(--bg); }
.tasks-resize-handle { top: 0; right: -4px; left: auto; }
/* The filter: an icon button right of the heading (dark with a dot while a filter is on), and a panel below it. */
/* Filter, with a dot after the word while something in its panel is set. */
.tasks-filter-button.is-active::after { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ""; }
.tasks-filter-panel { position: absolute; top: calc(100% - 6px); right: 16px; left: 16px; z-index: 5; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-overlay); }
.tasks-filter-panel[hidden] { display: none; }
.tasks-filter-label { margin: 16px 0 8px; }
.tasks-filter-statuses { display: flex; flex-wrap: wrap; gap: 6px; }
.tasks-filter-status { padding: 2px; border: 0; border-radius: var(--radius-pill); background: transparent; cursor: pointer; }
.tasks-filter-status:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
/* A chosen chip gets the 1.5 px --ink ring of anything chosen. */
.tasks-filter-status[aria-pressed="true"] .tag-badge { box-shadow: 0 0 0 1.5px var(--ink); }
.tasks-filter-none { --tag: var(--muted); }
/* Work items as bordered pills with their color dot; a chosen one gets a solid outline. */
.tasks-filter-work-item { display: inline-flex; max-width: 220px; height: 24px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--ink); font-size: var(--text-small); gap: 6px; }
.tasks-filter-work-item.select-none { align-items: center; color: var(--text-2); }
.tasks-filter-work-item .work-item-dot { width: 8px; height: 8px; flex-basis: 8px; }
.tasks-filter-status:hover .tasks-filter-work-item { background: var(--fill-soft); }
.tasks-filter-status[aria-pressed="true"] .tasks-filter-work-item { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
#taskFilterWorkItemGroup[hidden], #taskFilterAssigneeGroup[hidden] { display: none; }
/* A person: their avatar (20, inside the outline) and name, in the same outlined pill as a work item. */
.tasks-filter-person { align-items: center; padding-left: 1px; }
.tasks-filter-person .avatar { width: 20px; height: 20px; flex-basis: 20px; }
.tasks-filter-person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tasks-filter-clear { justify-self: start; margin: 12px 0 0 -12px; }
.tasks-header { position: relative; }
/* The list's header: a compact row, 48 high with a line under it, of the search and the filter; the heading is under it. */
.tasks-header { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 48px; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.tasks-scroller { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 24px; }
.task-detail-area { display: flex; flex: 1; min-width: 0; min-height: 0; background: var(--bg); }
.task-detail { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.task-detail[hidden] { display: none; }
/* The details sit beside the list, one column up to 760 wide (the room left over stays on the right): a head with the
   task's place and actions, then the title, its fields, the description, and the sections. */
/* 20 below the head's line to the title (whose field in use reaches past its text). */
.task-detail .settings-content { padding-top: 20px; padding-right: clamp(32px, 3vw, 48px); padding-left: clamp(32px, 3vw, 48px); }
.task-layout { max-width: 760px; }
.task-main { min-width: 0; }
/* The head is 48 high with a line under it across the details, level with the list's header beside it. */
.task-detail-head { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 48px; padding: 0 clamp(24px, 3vw, 40px) 0 clamp(32px, 3vw, 48px); border-bottom: 1px solid var(--rule); }
.task-crumbs { display: flex; flex: 1; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: var(--text-small); }
.task-crumbs span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-crumbs svg { flex: 0 0 auto; color: var(--border); }
.task-crumbs .task-crumb-key { flex: 0 0 auto; color: var(--muted); }
.task-crumbs .task-crumb-project { flex: 0 0 auto; }
.task-detail-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.task-detail-actions .icon-button { color: var(--text-2); }
/* The ⋮ of a task card, reused in the head: in place, its menu under it on the right. */
.task-detail-menu { position: relative; display: flex; }
.task-detail-menu .tasks-item-menu-button { position: static; opacity: 1; }
.task-detail-menu .tasks-item-menu { top: calc(100% + 4px); right: 0; }
/* The fields: label and value on a row each; values open their menus under them. */
.task-pickers { display: grid; gap: 2px; margin: 12px 0 20px; }
.task-pickers > .setting-group:not([hidden]) { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; column-gap: 12px; min-height: 40px; margin: 0; }
/* Hidden fields (the Timeline on the Timeline, Parent without parents) leave no gap, unlike in other drawers. */
.task-pickers > .setting-group + .setting-group[hidden] + .setting-group { margin-top: 0; }
.task-pickers > .setting-group > .setting-label { margin: 0; }
.task-pickers > .setting-group > :not(.setting-label) { justify-self: start; min-width: 0; max-width: 100%; }
.task-pickers .due-note { grid-column: 2; margin-top: 0; padding-left: 4px; }
.inline-fields.task-description { margin-bottom: 8px; }
.task-detail .settings-content { padding-bottom: 40px; }
.tasks-heading { margin: 0; padding: 12px 0 8px; font-size: var(--text-body); font-weight: 500; line-height: 20px; }
.tasks-count { margin-left: 6px; color: var(--muted); font-size: var(--text-body); font-weight: 400; }
.tasks-list { display: flex; flex-direction: column; gap: 10px; }
.tasks-item { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-large); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-resting); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s ease; }
/* On hover, the same outline and lift as every card. */
.tasks-item:hover { box-shadow: var(--card-hover); }
.tasks-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The task shown in the details. */
.tasks-item.is-selected, .tasks-item.is-selected:hover { box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-floating); }
/* A new card grows into place from its top edge rather than sliding down from above, which would take it under the
   list's top edge (the backlog's header) on its way in. */
.tasks-item.is-new { transform-origin: top center; animation: task-grow .45s ease-out; }
/* Dragging a task into order: it lifts and follows the pointer while the others slide out of its way. */
.tasks-list.is-reordering { user-select: none; }
.tasks-list.is-reordering .tasks-row { transition: transform .18s ease; }
.tasks-row.is-dragging { position: relative; z-index: 2; transition: none !important; }
.tasks-row.is-dragging .tasks-item { box-shadow: var(--shadow-overlay); cursor: grabbing; }
.tasks-row.is-dropping { position: relative; z-index: 2; }
@keyframes task-arrive { from { opacity: 0; transform: translateY(-8px); } }
@keyframes task-grow { from { opacity: 0; transform: scale(.96); } }
/* The ⋮ menu sits in the card's top right corner, beside the assignee, like on project cards. */
.tasks-row { position: relative; }
.tasks-item-menu-button { top: 10px; right: 6px; }
.tasks-row.is-dragging .tasks-item-menu-button { opacity: 0; }
.tasks-item-menu { top: 40px; right: 6px; }
.tasks-item-menu.is-above { top: auto; bottom: calc(100% - 6px); transform-origin: bottom right; }
/* The card's last line: status and urgency, the work item (cut short first), then the due date and assignee on the right. */
.tasks-item-meta { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; }
.tasks-item-meta .tag { flex: 0 0 auto; }
.tasks-item-end { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.tasks-item-end .due-badge { height: 20px; }
.tasks-item-end .avatar { width: 20px; height: 20px; flex-basis: 20px; }
.tasks-item-title { display: -webkit-box; min-width: 0; margin-right: 20px; overflow: hidden; font-size: var(--text-body); font-weight: 500; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.tasks-item-work-item { gap: 6px; color: var(--text-2); font-size: var(--text-small); }
.tasks-item-work-item .work-item-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 2px; }
/* On top, the task's ID (WEB-12), quiet, level with the ⋮. */
.tasks-item-key { margin-right: 24px; color: var(--muted); font-size: var(--text-small); line-height: 20px; }
/* Without an ID the title is on top, beside the ⋮. */
.tasks-item-title:first-child { margin-right: 24px; }
.avatar.tasks-unassigned { border: 1px solid var(--border); color: var(--muted); background: transparent; box-shadow: none; }
/* List or Board, left of the filter. */

/* Board: the pane takes the whole view, a column per status side by side, scrolling both ways in one scroller. The
   details become a drawer over it. */
.tasks-view.is-board .tasks-sidebar { flex: 1; width: auto; min-width: 0; border-right: 0; }
.tasks-view.is-board .tasks-resize-handle, .tasks-view.is-board #createTask { display: none; }
/* The board's header (the tab says where you are, so no heading): on the left the search, the team and the filter, then
   what's on the board; on the right Releases and the backlog column. */
.tasks-view.is-board .tasks-header { justify-content: flex-start; gap: 8px; padding-left: 24px; padding-right: 24px; }
.tasks-view.is-board .tasks-heading { display: none; }
.board-summary { order: 4; flex: 1; min-width: 0; margin: 0 0 0 8px; overflow: hidden; color: var(--muted); font-size: var(--text-small); text-overflow: ellipsis; white-space: nowrap; }
/* The search (a small .search-box) fills the list's header; on the board it's 240 wide. */
.tasks-search { order: 1; flex: 1; }
.tasks-view.is-board .tasks-search { flex: 0 0 auto; width: 240px; }
.board-people { order: 2; display: flex; gap: 4px; }
.board-person { display: grid; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.board-person[aria-pressed="true"] .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.board-person:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.board-summary span + span { margin-left: 16px; }
.board-summary[hidden], .board-people[hidden] { display: none; }
.tasks-filter-button { order: 3; }
/* Shows or hides the board's backlog column. */
.kanban-unsorted { order: 6; }
/* A Lucide box, ticked while the column shows: one line weight for box and tick, in the icons' grey, as in a list of
   options rather than a form's checkbox. */
.kanban-unsorted[aria-pressed="true"] .kanban-unsorted-off, .kanban-unsorted:not([aria-pressed="true"]) .kanban-unsorted-on { display: none; }
.kanban-unsorted[hidden] { display: none; }
.tasks-view.is-board #taskFilterStatusLabel, .tasks-view.is-board #taskFilterStatuses, .tasks-view.is-board .tasks-filter-all, .tasks-view.is-board .tasks-filter-assignees { display: none; }
/* The backlog has no status choices until it shows all tasks. */
.tasks-view.is-backlog-only #taskFilterStatusLabel, .tasks-view.is-backlog-only #taskFilterStatuses { display: none; }
.tasks-view.is-board .tasks-filter-panel { right: auto; width: 360px; }
.tasks-view.is-board .tasks-scroller { overflow: auto; padding: 0; }
/* The board in lines, like the dashboard and the Timeline: columns side by side on the page's color, parted by thin
   lines that run its full height, under a row of headers with a line beneath, like a table. */
.kanban { --column-min: 300px; --column-max: 400px; --backlog-min: 260px; --backlog-max: 340px; display: flex; align-items: stretch; gap: 0; width: max-content; min-width: 100%; min-height: 100%; }
.kanban[hidden], .tasks-list[hidden] { display: none; }
/* Columns are 300 wide and grow to 400 where the screen has room (the backlog 260 to 340). Their width is set as if the
   backlog column were there (sizeBoardColumns), so showing or hiding it doesn't change it. */
.kanban-column { display: flex; flex: 0 0 var(--column-width, var(--column-min)); flex-direction: column; width: var(--column-width, var(--column-min)); padding-bottom: var(--sticky-end, 0px); border-right: 1px solid var(--rule); background: var(--bg); }
/* The header's room ends above the last card (fitStickyHeaders); Create task reaches back into that padding. Without
   cards the header stays put. */
.kanban-column.is-empty .kanban-column-header { position: relative; }
.kanban-column > .kanban-add { margin-bottom: calc(8px - var(--sticky-end, 0px)); }
/* The backlog: narrower; nothing in it is being worked on yet, so its dot is hollow and its name grey. */
.kanban-column.is-backlog { flex: 1 0 var(--backlog-min); width: var(--backlog-min); max-width: var(--backlog-max); }
/* On the page's color with a line under it, so the cards scroll under it while it sticks. */
.kanban-column-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--rule); background: var(--bg); }
.kanban-column-count { color: var(--muted); font-size: var(--text-small); }
/* The column's name: its status's icon in the status's color, then the name in --ink (the backlog's in --text-2). */
.kanban-column-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.kanban-column-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--status-color); }
.kanban-column-dot.is-hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.kanban-column-name { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.kanban-column.is-backlog .kanban-column-name { color: var(--text-2); }
/* A column's estimated hours, on the right (before Release in the last column). */
.kanban-column-hours { margin-left: auto; color: var(--muted); font-size: var(--text-small); }
.kanban-column-hours + .kanban-release { margin-left: 4px; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; min-height: 8px; padding: 4px 12px; }
/* Only their outline, as on the dashboard; the lift comes on hover. */
.kanban .tasks-item:not(.is-selected) { box-shadow: none; }
.kanban .tasks-item:not(.is-selected):hover { box-shadow: var(--card-hover); }
.kanban-add { display: flex; align-items: center; gap: 4px; margin: 0 8px 8px; padding: 8px; border: 0; border-radius: var(--radius); color: var(--accent); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.kanban-add:hover { background: var(--fill); }
.kanban-add:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.kanban .tasks-row.is-dragging { z-index: 60; pointer-events: none; }
.kanban .tasks-row.is-dragging .tasks-item { box-shadow: var(--shadow-overlay); }
.kanban .tasks-row.is-dropping { z-index: 60; transition: transform .2s ease; }
.kanban.is-reordering { user-select: none; }
/* Releases: Release sits at the end of the last column's header, Releases (the history) beside the filter. */
.kanban-release { margin-left: auto; }
.kanban-releases { order: 5; }
.kanban-releases[hidden] { display: none; }
.release-header { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 16px 16px 8px 24px; }
.release-header .icon-button-small { margin-left: -8px; }
.release-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: var(--text-heading); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.015em; }
.release-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 24px 24px; }
.release-description { min-height: 80px; }
.release-task-names { max-height: 200px; margin: 0; padding: 0; overflow-y: auto; border: 1px solid var(--rule); border-radius: var(--radius); list-style: none; }
.release-task-names li { padding: 8px 12px; overflow: hidden; border-top: 1px solid var(--rule); text-overflow: ellipsis; white-space: nowrap; }
.release-task-names li:first-child { border-top: 0; }
.release-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--rule); }
.release-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.release-meta { margin: 0; color: var(--text-2); font-size: var(--text-small); }
.release-notes { margin: 0 0 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
/* The gap where a dragged card would land: empty room, which the cards around it slide to open, as in the backlog list. */
.kanban-placeholder { flex: 0 0 auto; }
.tasks-view.is-board .task-detail-area { position: fixed; top: calc(var(--project-height) + 16px); right: 16px; bottom: 16px; z-index: 40; width: min(600px, calc(100vw - 32px)); overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-large); box-shadow: var(--shadow-overlay); visibility: hidden; transform: translateX(calc(100% + 32px)); transition: transform .26s cubic-bezier(.3, .7, .2, 1), visibility 0s .26s; }
.tasks-view.is-board .task-detail-area.is-open { visibility: visible; transform: translateX(0); transition: transform .26s cubic-bezier(.3, .7, .2, 1); }
.task-detail { position: relative; }
.task-detail-close { display: none; }
.tasks-view.is-board .task-detail-close { display: grid; }
.tasks-view.is-board .task-detail .settings-content { padding: 20px 24px 32px; }
.tasks-view.is-board .task-detail-head { padding: 0 12px 0 24px; }
.tasks-empty { flex: 1; padding: 56px 24px 96px; }

/* ==== 12. Task details: fields, sections, attachments, history and comments ==== */
/* Fields edited in place (the task's title and description): text at rest, a soft fill on hover, a field on click.
   Text and field share the same box, so the words don't move when switching between them. */
.inline-fields { display: grid; gap: 6px; margin: -10px -9px 0; }
.inline-field-text, .inline-field-input { display: block; width: 100%; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--radius); color: var(--ink); font: inherit; }
.inline-field-text { background: transparent; text-align: left; overflow-wrap: anywhere; cursor: text; transition: background .12s ease; }
.inline-field-text:hover { background: var(--fill); }
.inline-field-text:focus-visible { outline: none; background: var(--fill); box-shadow: inset 0 0 0 1px var(--border); }
.inline-field-text.is-placeholder { color: var(--muted); }
.inline-field-input { background: var(--surface); }
.inline-field-input::placeholder { color: var(--muted); }
.inline-field-input[hidden], .inline-field-text[hidden] { display: none; }
/* The task name leads the details: large, in a lighter weight. */
.inline-field-title { font-size: var(--text-title); font-weight: 400; line-height: 36px; letter-spacing: -.022em; }
.text-link { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2px; overflow-wrap: anywhere; cursor: pointer; }
.text-link:hover { text-decoration-color: currentColor; }
.text-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: var(--radius-small); }
.inline-field-description { min-height: 34px; color: var(--text-2); font-size: var(--text-subheading); line-height: 1.6; white-space: pre-wrap; }
textarea.inline-field-description { min-height: 84px; overflow: hidden; resize: none; }
/* Attached files: a thumbnail or type icon, name and size; the row opens the file. */
/* A ghost button lines its text up with the content above. */
#addAttachment { margin-left: -12px; }
.task-pickers { display: grid; }
/* Long names shorten instead of widening the column. */
.task-pickers .round-picker, .task-pickers .round-picker-button { max-width: 100%; }
/* In the right-hand column, menus open inward: anchored to the column's right edge, not past the window. */
.task-pickers > .setting-group { position: relative; }
.task-pickers .round-picker-button > span { display: flex; min-width: 0; }
.task-pickers .assignee-person, .task-pickers .work-item-value { min-width: 0; }
.task-pickers .assignee-person > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sections in the task details: a heading with a chevron that folds the content away, and a count. */
.task-section { margin-top: 32px; }
.section-heading { margin: 0 0 12px; font-size: var(--text-subheading); font-weight: 500; }
.task-section.is-collapsed .section-heading { margin-bottom: 0; }
.section-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: -6px; padding: 4px 8px 4px 4px; border: 0; border-radius: var(--radius); color: var(--ink); background: transparent; font: inherit; cursor: pointer; transition: background .12s ease; }
.section-toggle:hover { background: var(--fill); }
.section-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.section-toggle svg { color: var(--muted); transition: transform .15s ease; }
.task-section.is-collapsed .section-toggle svg { transform: rotate(-90deg); }
.section-count { color: var(--muted); font-weight: 500; }
.section-count:empty { display: none; }
.section-body[hidden] { display: none; }
/* Field pickers (Status, Assignee, Urgency…): what's missing in grey until set, then the value; the menu opens beside it.
   A button, so its hover is square-cornered like the ghost buttons (Add attachment), even around a tag. */
.round-picker { display: inline-block; margin-left: -4px; }
.round-picker .select-options { right: auto; min-width: 230px; }
.round-picker-button { display: inline-flex; align-items: center; padding: 4px; border: 0; border-radius: var(--radius-control); color: var(--ink); background: transparent; font: inherit; cursor: pointer; transition: background .12s ease; }
.round-picker-button:hover, .round-picker-button[aria-expanded="true"] { background: var(--fill); }
.round-picker-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.assignee-person { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px 0 4px; }
.round-picker-empty { display: inline-flex; align-items: center; height: 30px; padding: 0 8px 0 4px; color: var(--muted); white-space: nowrap; }
.round-picker-button:hover .round-picker-empty, .round-picker-button[aria-expanded="true"] .round-picker-empty { color: var(--ink); }
/* The Work item menu: a dot in the bar color, then the name. */
.work-item-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.work-item-label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-item-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: var(--radius-small); }
/* A linked work item in its round picker: a pill as tall as the others, with the color dot and name. */
.work-item-value { max-width: 100%; height: 30px; padding: 0 12px 0 10px; }
/* Due date: the button opens the browser's picker on the hidden input beneath it. */
.due-picker { position: relative; display: inline-flex; align-items: center; gap: 2px; max-width: 100%; margin-left: -4px; }
.due-value { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 8px; white-space: nowrap; }
.due-value svg { color: var(--text-2); }
.due-value.is-overdue, .due-value.is-overdue svg { color: var(--danger); }
/* The estimate: the hours on a round button like the others, or a small field with "h" after it while typing. */
.estimate-picker { display: flex; margin-left: -4px; }
.estimate-field { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--accent); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--accent); background: var(--surface); }
.estimate-field[hidden], .estimate-picker .round-picker-button[hidden] { display: none; }
.estimate-field input { width: 48px; padding: 0; border: 0; color: var(--ink); background: transparent; font: inherit; outline: none; }
.estimate-unit { color: var(--muted); }
.due-note { margin: 4px 0 0; color: var(--muted); font-size: var(--text-small); line-height: 1.4; }
.due-note.is-warning { color: var(--warning); }
.due-note[hidden] { display: none; }
/* On a task card: a calendar and the date, after status and urgency. */
.due-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 2px; color: var(--text-2); font-size: var(--text-small); font-weight: 400; white-space: nowrap; }
.due-badge.is-today { color: var(--ink); font-weight: 500; }
.due-badge.is-overdue { color: var(--danger); font-weight: 500; }
/* Status and urgency tags: an icon and the label, tinted in its color. */
/* In a picker the tag is as tall as the other values. */
.round-picker-button .tag { height: 30px; padding: 0 12px 0 10px; border-radius: var(--radius-pill); }
/* The parent's tag keeps its whole name here; in list rows it shares the line (45%). */
.round-picker-button .task-parent { max-width: 100%; line-height: 30px; }
.assignee-unassign { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.select-option:has(.assignee-unassign) { margin-top: 4px; border-top: 1px solid var(--rule); border-radius: 0 0 var(--radius-small) var(--radius-small); }
.attachment-list { display: grid; gap: 6px; margin-bottom: 10px; }
.attachment-list[hidden] { display: none; }
.attachment { position: relative; display: flex; align-items: center; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); transition: background .12s ease; }
.attachment:hover { background: var(--fill-soft); }
.attachment-link { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.attachment-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.attachment-thumb { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; overflow: hidden; border-radius: var(--radius); color: var(--text-2); background: var(--fill); }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attachment-text { display: grid; gap: 2px; min-width: 0; }
.attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-meta { color: var(--muted); font-size: var(--text-tiny); }
.attachment-remove { margin-right: 6px; opacity: 0; transition: opacity .12s ease, background .12s ease, color .12s ease; }
.attachment:hover .attachment-remove, .attachment-remove:focus-visible { opacity: 1; }
@media (hover: none) { .attachment-remove { opacity: 1; } }
/* Who created the task, and when: quiet, under Work item. */
/* Comments: a section of their own, headed like a title rather than a field label. Each comment has the author's
   avatar beside the name and time, and the text indented below with a thin thread line under the avatar. */
/* Comments and History: tabs within the task, 36 high, on a hairline that runs under them. */
.activity-tabs { height: 36px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
.activity-tabs .tab:first-child { padding-left: 2px; }
.activity-tabs .tab:first-child::after { left: 0; }
#commentsPanel[hidden], .history-panel[hidden] { display: none; }
/* History: each change with who made it and when, oldest first. */
.history-list { display: grid; gap: 16px; }
.history-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; align-items: start; }
.history-line { margin: 0; color: var(--text-2); line-height: 24px; overflow-wrap: anywhere; }
.history-name { color: var(--ink); font-weight: 500; }
.history-file { color: var(--ink); }
.history-time { color: var(--muted); font-size: var(--text-small); line-height: 24px; white-space: nowrap; }
.history-change, .history-description { grid-column: 2 / -1; }
.history-change { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.history-change .is-before { opacity: .6; }
.history-change .history-text.is-before { text-decoration: line-through; }
.history-change .avatar { width: 20px; height: 20px; flex-basis: 20px; }
.history-arrow { color: var(--muted); }
.history-none { color: var(--muted); }
.history-description { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text-2); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.comment-list { display: grid; gap: 16px; margin-bottom: 16px; }
.comment-list:empty { display: none; }
.comment { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; }
.comment.is-new { animation: task-arrive .35s ease-out; }
.comment > .avatar { margin-top: 2px; }
.comment-header { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 28px; }
.comment-author { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.comment-time { flex: 0 0 auto; color: var(--muted); font-size: var(--text-small); }
.comment-thread { justify-self: center; width: 2px; border-radius: 1px; background: var(--rule); }
.comment-edited { flex: 0 0 auto; color: var(--muted); font-size: var(--text-small); }
.comment-actions { display: flex; gap: 2px; margin-left: auto; opacity: 0; transition: opacity .12s ease; }
.comment:hover .comment-actions, .comment-actions:focus-within { opacity: 1; }
.comment-remove:not(:disabled):hover { color: var(--danger); }
@media (hover: none) { .comment-actions { opacity: 1; } }
/* Editing a comment in place: the text in a field, then Cancel and Save. */
.comment-edit { display: grid; gap: 8px; }
.comment-edit-input { display: block; width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); background: var(--surface); font: inherit; line-height: 1.6; resize: none; overflow: hidden; }
.comment-edit-actions { display: flex; justify-content: flex-end; gap: 6px; }
/* Emoji show larger than the letters around them. */
.emoji { font-size: 1.4em; line-height: 1; vertical-align: -.12em; }
.comment-body { display: grid; gap: 6px; min-width: 0; padding-bottom: 4px; }
.comment-attachments, .comment-files { max-width: 420px; margin: 0; }
.comment-files { margin-top: 4px; }
.emoji-picker { position: relative; }
.emoji-menu { position: absolute; right: -40px; bottom: calc(100% + 6px); z-index: 6; display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; padding: 6px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-overlay); }
.emoji-menu[hidden] { display: none; }
.emoji-option { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: var(--radius); background: transparent; font-size: var(--text-heading); line-height: 1; cursor: pointer; }
.emoji-option:hover, .emoji-option:focus-visible { background: var(--fill); outline: none; }
.comment-text { margin: 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
/* The field for a new comment: your avatar, the text, and @ and send while in use; a line below closes the section. */
.comment-composer { display: block; }
.comment-composer-avatar { display: flex; grid-row: 1; grid-column: 1; }
/* A softly filled box shows where to write: the text on top, the tools and send at its bottom right. A click anywhere
   in it goes to the text. */
/* At rest only your avatar and "Add comment" show, on a faint fill; in use (focus or a draft) the box grows to fit the
   text and the tools, on the usual fill. */
.comment-box { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 12px; min-width: 0; padding: 8px 10px 8px 12px; border-radius: var(--radius-large); background: var(--fill-soft); cursor: text; transition: background .2s ease, box-shadow .12s ease; }
.comment-composer.is-active .comment-box { background: var(--fill); }
.comment-box:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.comment-field { position: relative; grid-column: 2; min-width: 0; }
.comment-input { display: block; width: 100%; min-height: 24px; padding: 2px 0 0; transition: min-height .22s ease; border: 0; color: var(--ink); background: transparent; font: inherit; line-height: 22px; resize: none; outline: none; }
.comment-input::placeholder { color: var(--muted); }
.comment-composer.is-active .comment-input { min-height: 48px; }
.comment-tools { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 4px; max-height: 0; margin-top: 0; overflow: hidden; opacity: 0; visibility: hidden; cursor: default; transition: max-height .22s ease, margin-top .22s ease, opacity .15s ease, visibility .22s; }
/* Visible overflow lets the emoji menu open above the tools. */
.comment-composer.is-active .comment-tools { max-height: 36px; margin-top: 4px; overflow: visible; opacity: 1; visibility: visible; transition: max-height .22s ease, margin-top .22s ease, opacity .2s ease .05s, visibility 0s; }
.comment-send, .comment-send:not(:disabled):hover { margin-left: 2px; color: var(--on-color); background: var(--accent); }
.comment-send:not(:disabled):hover { opacity: .85; }
.comment-send:disabled { color: var(--surface); background: var(--muted); opacity: .55; cursor: default; }
/* A mentioned person: a soft pill with room around the name, slightly taller than the text. */
.mention { padding: 1px 6px; border-radius: var(--radius); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mention.is-you { color: var(--on-color); background: var(--accent); }
/* On Tasks and the dashboard the top bar casts the same shadow as the Timeline's date header does under it. */
/* A 1 px line divides the top bar from the page, as the Timeline's date header and work item pane are divided from
   the schedule: lines, not shadows, for what's part of the page (shadows are for what floats). The view tabs' line sits
   right on it. */
.projectbar { border-bottom: 1px solid var(--rule); }
/* On the Timeline the bar and the date header read as one block, with the line under the dates; it stays there, unseen,
   so the bar keeps its height from view to view. */
.app:not(.is-tasks-view) .projectbar:not(.is-dashboard) { border-bottom-color: transparent; }
/* On Tasks the bar keeps its line, and the header (search, filter; on the board also people, Releases, backlog) is a
   compact row of its own under it, 48 high with its own line (part 11). */
/* The dimming behind a drawer covers the top bar too on Tasks, as it does under the floating drawers. */
.app.is-tasks-view .settings-backdrop { top: 0; }
@media (prefers-reduced-motion: reduce) { .tasks-item.is-new, .comment.is-new { animation: none; } .comment-box, .comment-input, .comment-tools, .comment-composer.is-active .comment-tools, .tasks-item, .segmented-indicator, .segmented-item, .brand-name, .tasks-list.is-reordering .tasks-row, .tasks-view.is-board .task-detail-area, .kanban .tasks-row.is-dropping { transition: none; } }

/* The work item view, in the task details' place: the same head, title and label/value rows (read only), then its
   tasks grouped by status, each group folding away. The work item in a task's head is a link to it. */
.task-crumbs .task-crumb-link { min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-small); color: inherit; background: none; font: inherit; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.task-crumbs .task-crumb-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.task-crumbs .task-crumb-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.work-item-view-value { display: flex; align-items: center; gap: 12px; min-width: 0; }
.work-item-view-value .round-picker-empty { padding: 0; }
.work-item-view-when { color: var(--muted); }
.work-item-view-bar { flex: 0 0 120px; width: 120px; }
.work-item-view-tasks-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.work-item-view-tasks-head .section-heading { margin: 0; }
.work-item-view-tasks-head .kanban-add { margin: 0 -8px 0 0; }
.work-item-group + .work-item-group { margin-top: 8px; }
.work-item-group-toggle { display: flex; align-items: center; gap: 8px; width: calc(100% + 8px); min-height: 36px; margin-left: -8px; padding: 4px 8px; border: 0; border-radius: var(--radius); color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.work-item-group-toggle:hover { background: var(--fill-soft); }
.work-item-group-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.work-item-group-chevron { flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.work-item-group.is-folded .work-item-group-chevron { transform: rotate(-90deg); }
.work-item-view-tasks[hidden] { display: none; }
.work-item-view-key { flex: 0 0 auto; min-width: 44px; color: var(--muted); font-size: var(--text-small); }
.work-item-view-task-end { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
/* On the Timeline the details open in a drawer as wide as the board's, laid out as there. */
.floating-drawer.work-item-drawer { width: min(600px, calc(100vw - 32px)); background: var(--bg); }
.work-item-drawer .task-detail .settings-content { padding: 20px 24px 32px; }
.work-item-drawer .task-detail-head { padding: 0 12px 0 24px; }
/* The Timeline field: a slice of the Timeline. Week lines with their dates behind, then a lane of the work items around
   it in grey and a lane with its own bar (the done share shaded), and today's red line. */
.task-pickers > .setting-group > .work-item-strip { justify-self: stretch; }
.work-item-strip { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 4px 0; padding: 22px 0 6px; overflow: hidden; border: 0; border-radius: var(--radius); color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; transition: background .15s ease; }
.work-item-strip:hover { background: var(--fill-soft); }
.work-item-strip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.work-item-strip.is-empty { display: inline-flex; width: auto; margin: 0; padding: 0; }
.task-pickers > .setting-group > .work-item-strip.is-empty { justify-self: start; }
.work-item-strip-weeks { position: absolute; inset: 0; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
.work-item-strip-weeks span { padding: 4px 0 0 6px; overflow: hidden; border-left: 1px solid var(--rule); color: var(--muted); font-size: var(--text-tiny); white-space: nowrap; }
.work-item-strip-weeks span:first-child { border-left: 0; }
.work-item-strip-lane { position: relative; height: 22px; }
.work-item-strip-bar { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; min-width: 4px; padding: 0 8px; overflow: hidden; border-radius: var(--radius-control); color: var(--on-color); background: linear-gradient(90deg, var(--bar-shade) 0 var(--done, 0%), transparent var(--done, 0%)), var(--bar); box-shadow: var(--shadow-resting); font-size: var(--text-tiny); white-space: nowrap; }
.work-item-strip-bar.is-other { color: var(--muted); background: var(--fill); box-shadow: none; }
.work-item-strip-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.work-item-strip-today { position: absolute; top: 20px; bottom: 2px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--today); }
/* Color as small swatches in its row; the hint under them. */
.task-pickers .color-options { gap: 8px; padding: 4px 0; }
.task-pickers .color-swatch { width: 22px; height: 22px; }
/* Progress: the bar and what's done, then the share to type in where it can be. */
.work-item-progress { display: flex; align-items: center; gap: 8px; min-width: 0; }
.work-item-view-progress[hidden], .work-item-progress .round-picker-button[hidden] { display: none; }
.work-item-progress-value { padding: 0 4px; }
/* Create task: a field above the tasks. */
.work-item-new-task { margin: 0 0 8px; }
.work-item-new-task[hidden] { display: none; }

/* ==== 13. Narrow screens and reduced motion ==== */
@media (max-width: 620px) {
  /* The list goes above the details. */
  .tasks-view { flex-direction: column; }
  .tasks-sidebar { flex: 0 0 auto; width: auto; max-height: 42vh; }
  .tasks-view.is-board .tasks-sidebar { flex: 1; max-height: none; }
  .tasks-view.is-board .tasks-filter-panel { right: 16px; left: 16px; width: auto; }
  .tasks-view.is-board .tasks-header { flex-wrap: wrap; padding-left: 16px; padding-right: 16px; }
  .board-summary { flex-basis: 100%; }
  .tasks-view.is-board .tasks-search { flex: 1; width: auto; }
  .tasks-view.is-board .task-detail-area { right: 8px; bottom: 8px; width: calc(100vw - 16px); }
  .kanban { --column-min: 260px; }
  .tasks-resize-handle { display: none; }
  /* Settings modals fill the window, with their pages as a row of tabs on top. */
  .settings-modal { flex-direction: column; width: calc(100vw - 16px); height: calc(100vh - 16px); }
  .settings-nav { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .settings-nav-title { display: none; }
  .settings-nav-item { width: auto; flex: 0 0 auto; }
  .settings-nav-item svg { display: none; }
  /* Delete project shrinks to its icon (the name stays for screen readers). */
  .settings-nav-delete { margin: 0 0 0 auto; flex: 0 0 auto; }
  .settings-nav-delete span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .settings-modal .settings-header { padding-left: 16px; }
  /* A setting's control goes under its text, full width. */
  .setting-row { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .setting-row > :not(.setting-label, .setting-hint, .delete-item, .plan-name, .plan-card) { grid-row: auto; grid-column: 1; justify-self: start; }
  .setting-row .setting-input { width: 100%; }
  .setting-row > .setting-label + .setting-hint { margin-top: -8px; }
  .settings-modal .settings-content { padding: 16px; }
  /* A team member's email goes under their name. */
  .member-row.list-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 6px; }
  .member-row .member-email { grid-column: 2; }
  .member-row .parent-remove { grid-row: 1; grid-column: 3; }
}

@media (max-width: 620px) {
  :root { --logo-inset: 12px; --task-width: clamp(112px, 42vw, 190px); --task-min-width: 112px; --task-max-width: 320px; --day-width: 38px; --week-day-width: 8px; --week-width: 266px; --week-mode-width: 56px; }
  .projectbar { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  /* Inside a project the view tabs need the room: the name shortens beside the logo, without Projects / or the members. */
  .projectbar:not(.is-dashboard) { grid-template-columns: minmax(0, 1fr) auto auto; }
  .project-start { gap: 10px; }
  .project-crumb-home, .project-crumb-slash, .project-people { display: none; }
  .project-actions { gap: 4px; padding-right: 6px; }
  .projectbar.is-dashboard .dashboard-search { width: 32px; justify-content: center; padding: 0; }
  .dashboard-search-text, .dashboard-search .search-box-key { display: none; }
  /* The view tabs keep their icons; the names go (they stay for screen readers through the label). */
  .view-tabs .tab { padding: 0 8px; }
  .view-tabs .tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .project-logo { padding-left: var(--logo-inset); }
  .task-row { gap: 8px; padding: 0 8px 0 12px; }
  .zoom-controls { right: 12px; bottom: 12px; }
  .toast { bottom: 12px; left: calc(var(--task-pane-width) + 12px); }
  .toast.is-raised { bottom: 60px; max-width: calc(100vw - var(--task-pane-width) - 74px); }
  .app.is-tasks-view .toast, .app.is-tasks-view .toast.is-raised { left: 12px; max-width: calc(100vw - 24px); }
  .today-control { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) { .overview-panel, .overview-panel.is-open, .overview-button, .overview-panel.is-open .overview-chart { transition: none; } .dashboard-card.is-new, .group-row.is-opening .group-marker::after, .task-row.is-opening .group-line, .group-row.is-closing .group-marker::after, .task-row.is-closing .group-line { animation: none; } .group-chevron { transition: none; } .activity-bar:not(.preview), .settings-backdrop, .settings-drawer, .settings-drawer.is-open, .settings-modal, .settings-modal.is-open, .today-control, .toast, .toast-avatar, .bot-eyes, .bot-eye { transition: none; } .reminder-button svg { animation: none; } }

/* ==== 14. PDF print layout ==== */
/* Client-facing print/PDF layout, filled by renderPrintView() just before printing. */
.print-view { display: none; color: var(--ink); font-family: Inter, Arial, Helvetica, sans-serif; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.print-header .brand-mark { animation: none; }
.print-logo { display: none; max-width: 160px; height: 28px; object-fit: contain; object-position: left center; }
.print-header.has-logo .print-logo { display: block; }
.print-header.has-logo .brand-mark { display: none; }
.print-header h1 { margin: 0; font-size: 17px; font-weight: 600; }
.print-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.print-gantt { width: 100%; border-collapse: collapse; table-layout: fixed; }
.print-gantt th { padding: 0; border-bottom: 1px solid var(--grid-week); font-weight: 400; text-align: left; vertical-align: bottom; }
.print-gantt th.print-name-col { width: 30%; padding: 0 10px 5px 0; color: var(--muted); font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.print-scale-row { position: relative; height: 14px; }
.print-scale-cell { position: absolute; top: 0; bottom: 0; overflow: hidden; padding-left: 3px; border-left: 1px solid var(--border); color: var(--muted); font-size: 8px; line-height: 14px; white-space: nowrap; }
.print-marker-row { height: 17px; }
.print-marker { display: inline-grid; width: 13px; height: 13px; place-items: center; border-radius: 50%; color: var(--on-color); background: var(--ink); font-size: 7px; font-weight: 700; }
.print-marker-row .print-marker { position: absolute; top: 2px; width: auto; min-width: 13px; padding: 0 3px; border-radius: 7px; transform: translateX(-50%); }
.print-gantt tbody tr { height: 26px; break-inside: avoid; }
.print-gantt td { padding: 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.print-name { padding-right: 10px !important; }
.print-name-inner { display: flex; align-items: center; gap: 6px; min-width: 0; }
.print-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; }
.print-name-text { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.print-name .task-parent { max-width: 40%; height: auto; padding: 1px 5px; font-size: 7px; line-height: 1.4; }
.print-name small { flex: 0 0 auto; margin-left: auto; padding-left: 4px; color: var(--muted); font-size: 8px; }
.print-track { position: relative; height: 26px; background-image: linear-gradient(to right, var(--grid-day) 1px, transparent 1px); background-size: var(--week-size) 100%; }
.print-bar { position: absolute; top: 7px; bottom: 7px; min-width: 3px; border-radius: 6px; }
.print-group-row td { border-bottom-color: var(--border); }
.print-group-marker { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--parent-color); }
.print-group-name { font-weight: 600; }
/* A line in the parent's color down the grouped rows, under the header's marker. */
.print-grouped .print-name { background: linear-gradient(var(--parent-color), var(--parent-color)) 2.5px 0 / 2px 100% no-repeat; }
.print-grouped .print-name-inner { padding-left: 13px; }
.print-milestone-line { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--ink); opacity: .45; }
.print-today-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--today); }
.print-empty { padding: 12px 0 !important; color: var(--muted); }
.print-legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 8px; }
.print-legend-today, .print-legend-milestone { display: inline-block; width: 12px; height: 0; border-top: 1px solid var(--today); }
.print-legend-milestone { margin-left: 10px; border-top: 1px dashed var(--ink); opacity: .6; }
.print-milestones { margin-top: 18px; break-inside: avoid; }
.print-milestones h2 { margin: 0 0 8px; font-size: 11px; font-weight: 600; }
.print-milestones ol { margin: 0; padding: 0; list-style: none; }
.print-milestones li { display: grid; grid-template-columns: 13px 84px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 0; border-bottom: 1px solid var(--rule); break-inside: avoid; }
.print-milestone-date { color: var(--muted); line-height: 13px; }
.print-milestones strong { font-weight: 600; line-height: 13px; }
.print-milestones p { margin: 3px 0 0; color: var(--text-2); white-space: pre-line; }
@page { size: A4 landscape; margin: 12mm; }
@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  body.is-printing-project .app { display: none; }
  body.is-printing-project .print-view { display: block; }
}

/* ==== 15. Account and plan ==== */
/* Log in or create an account: one card in the middle of the window, in place of the app (and its top bar). */
.app.is-signed-out > :not(.auth-view, .toast) { display: none !important; }
.auth-view { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 0; padding: 24px 16px; overflow-y: auto; background: var(--canvas); }
.auth-view[hidden] { display: none; }
.auth-card { display: flex; flex-direction: column; width: min(400px, 100%); margin: auto; padding: 40px 32px 32px; border: 1px solid var(--rule); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-resting); }
.auth-mark { margin-bottom: 24px; }
.auth-title { margin: 0 0 8px; font-size: var(--text-heading); font-weight: 500; letter-spacing: -.015em; }
.auth-text { margin: 0 0 24px; color: var(--text-2); }
.auth-step[hidden], .auth-error[hidden], .auth-links[hidden], .auth-note[hidden] { display: none; }
.auth-code { font-variant-numeric: tabular-nums; letter-spacing: .3em; }
.auth-error { margin: 12px 0 0; color: var(--danger); font-size: var(--text-small); }
.auth-submit { width: 100%; margin-top: 20px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.auth-links button { padding: 0; border: 0; color: var(--accent); background: none; font: inherit; font-size: var(--text-small); font-weight: 500; cursor: pointer; }
.auth-note { margin: 16px 0 0; color: var(--muted); font-size: var(--text-small); text-align: center; }
/* The top bar's trial reminder: quiet, then edged in the warning color in its last days, and in red once it has ended. */
.plan-button.is-warning { background: color-mix(in srgb, var(--warning) 16%, transparent); }
.plan-button.is-ended { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.app.is-client-view #planButton { display: none !important; }
/* General settings → Plan, and the price in Add a card. */
.plan-name { margin: 0; font-weight: 500; }
.plan-card { margin: 0; }
.plan-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 0; margin: 0; }
.plan-lines dt { color: var(--text-2); }
.plan-lines dd { margin: 0; padding-left: 16px; font-variant-numeric: tabular-nums; text-align: right; }
.plan-lines .plan-total { padding-top: 8px; border-top: 1px solid var(--rule); color: var(--ink); font-weight: 500; }
.plan-meter { width: 160px; height: 8px; overflow: hidden; border-radius: var(--radius-pill); background: var(--fill); }
.plan-meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.plan-meter.is-warning .plan-meter-fill { background: var(--warning); }
.plan-meter ~ .setting-buttons { margin-top: 12px; }
.setting-buttons[hidden] { display: none; }
.checkout-dialog { --dialog-width: 440px; }
.checkout-dialog .plan-lines { margin-bottom: 16px; }

/* ==== 16. Roles ==== */
/* A project you can only look at and comment on: View only in the top bar, and no create buttons or drag handles. Its
   fields are inert (applyEditRights), so they read as text and don't answer the pointer. */
.view-only-label[hidden] { display: none; }
.app.is-view-only .add-item, .app.is-view-only .kanban-add, .app.is-view-only .task-drag-handle, .app.is-view-only .bar-handle,
.app.is-view-only .timeline-empty, .app.is-view-only #addAttachment, .app.is-view-only #workItemCreateTask, .app.is-view-only #attachmentList .attachment-remove { display: none !important; }
.app.is-view-only .activity-bar, .app.is-view-only .timeline-row, .app.is-view-only .task-name { cursor: default; }
/* The company's name for someone who can't change it: text, not a field. */
#companyNameInput:read-only { height: auto; padding: 0; border-color: transparent; background: none; box-shadow: none; }
/* A role you can't change, as text where the role menu would be. */
.role-text { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; color: var(--text-2); font-size: var(--text-small); white-space: nowrap; }
/* On a narrow screen View only keeps its eye (the name stays for screen readers), and the plan's reminder waits for the
   dashboard. */
@media (max-width: 620px) {
  .view-only-label { padding: 0 8px; }
  .view-only-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .projectbar:not(.is-dashboard) #planButton { display: none; }
}

/* ==== 17. Invites ==== */
/* General settings → Company: the emails and a role on one line, then those invited, each with its role and ⋮. */
.invite-form { display: flex; align-items: center; gap: 8px; }
.invite-form .setting-input { flex: 1 1 auto; min-width: 0; }
#inviteError { margin-top: 8px; }
.invite-list { margin-top: 16px; border-top: 1px solid var(--rule); }
.invite-list[hidden] { display: none; }
.member-row.invite-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.invite-avatar { display: inline-grid; place-items: center; color: var(--text-2); background: var(--fill); }
/* Join, when trying an invite: back without joining. */
.auth-back { justify-content: center; }

/* ==== 18. Privacy ==== */
/* Agreeing to the terms on signing up: a checkbox and its sentence, the documents underlined once they're linked. */
.auth-terms { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; color: var(--text-2); font-size: var(--text-small); cursor: pointer; }
.auth-terms input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--accent); }
.auth-terms a { color: var(--ink); }
.auth-terms a:not([href]) { text-decoration: none; }
/* Deleting an account or the company: the dialog's confirm button in the danger color. */
.danger-dialog { --dialog-width: 460px; }
.danger-text { margin: 0 0 20px; color: var(--text-2); }
.button-danger { border-color: transparent; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); box-shadow: none; }
.button-danger:not(:disabled):hover { border-color: transparent; background: color-mix(in srgb, var(--danger) 18%, transparent); }
.button-danger:disabled { opacity: .4; cursor: default; }
/* The terms asked again when they change: the same links as on signing up. */
.terms-dialog { --dialog-width: 440px; }
.terms-text { margin: 0 0 12px; color: var(--text-2); }
.terms-documents a { color: var(--ink); }
.terms-documents a:not([href]) { text-decoration: none; }

/* ==== 19. Project templates ==== */
/* Template cards (General settings → Templates and New project): a small picture of the plan, the name and a summary. */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.template-grid[hidden] { display: none; }
.template-item { position: relative; display: grid; min-width: 0; }
.template-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 8px 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius-large); color: var(--ink); background: var(--surface); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s ease; }
.template-card:hover { box-shadow: var(--card-hover); }
.template-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.template-card.is-editing, .template-card.is-preview { cursor: default; box-shadow: none; }
.template-card.is-preview { flex-direction: row; align-items: center; padding: 8px; }
.template-card.is-preview .template-thumb { flex: 0 0 160px; }
.template-thumb { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; height: 88px; padding: 10px 12px; overflow: hidden; border-radius: var(--radius); background: var(--fill-soft); }
.template-thumb-row { position: relative; flex: 0 1 6px; min-height: 2px; }
.template-thumb-bar { position: absolute; top: 0; bottom: 0; min-width: 4px; border-radius: var(--radius-pill); }
.template-thumb-milestones { flex-basis: 6px; margin-bottom: 2px; }
.template-thumb-milestone { position: absolute; top: 0; width: 6px; height: 6px; margin-left: -3px; border-radius: 1px; background: var(--ink); transform: rotate(45deg) scale(.85); }
.template-thumb.is-list { justify-content: flex-start; }
.template-thumb-line { flex: 0 0 4px; border-radius: var(--radius-pill); background: var(--border); }
.template-blank .template-thumb { align-items: center; color: var(--accent); }
.template-card-text { display: grid; gap: 2px; min-width: 0; padding: 0 4px; }
.template-name { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.template-detail { color: var(--text-2); font-size: var(--text-small); }
.template-menu-button { top: 12px; right: 12px; background: var(--surface); }
.template-item .card-menu { top: 44px; right: 12px; }
.new-project-dialog { --dialog-width: 640px; }
.template-preview { margin-bottom: 16px; }
.new-project-dialog .release-footer[hidden] { display: none; }
