/* Layout and look. No colour literals here: every colour is a token from themes.css (one block per Theme),
   so a reskin is CSS only. Design: Prototype A's calm card (prototypes/a) with D's Mission trail. */

:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Nunito", "Segoe UI", system-ui, sans-serif;
  --r-card: 24px;
  --r-ctl: 14px; /* boxes: cards, rows, panels */
  --side-w: 200px; /* the open menu: app.js sets it on .shell to the menu's own width */
  --r-btn: 8px; /* controls: buttons, inputs, pickers, segments */
  --r-pop: 12px; /* menus and option lists */
  --r-badge: 6px; /* status chips */
  --ctl-line: color-mix(in srgb, var(--ink) 22%, var(--rule)); /* a control's border: stronger than a box's */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* names the pages use, mapped onto Theme tokens (--bg and --ink come straight from the Theme) */
  --surface: var(--paper);
  --muted: var(--ink-dim);
  --line: var(--rule);
  --pine: var(--accent);
  --pine-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-ink: color-mix(in oklab, var(--accent) 65%, var(--ink));
  --accent-chip-ink: color-mix(in oklab, var(--accent) 50%, var(--ink)); /* on --pine-soft, over a row tint or a Theme's scenery */
  --warn-ink: color-mix(in oklab, var(--warn) 65%, var(--ink));
  /* Row colors (the list's rules): the Theme's chart hues, mixed into its --solid where they paint */
  --tone-red: var(--chart-8); --tone-orange: var(--chart-2); --tone-yellow: var(--chart-4);
  --tone-green: var(--chart-3); --tone-blue: var(--chart-1); --tone-purple: var(--chart-7); --tone-gray: var(--ink-dim);
  /* JSON editor (Reports): Theme colours pulled toward --ink, so code text reads on --code-bg in every Theme */
  --code-key: color-mix(in oklab, var(--accent) 70%, var(--ink));
  --code-string: color-mix(in oklab, var(--check) 70%, var(--ink));
  --code-number: color-mix(in oklab, var(--ready) 70%, var(--ink));
  --code-keyword: var(--warn-ink);
  --side: var(--card-bg);
  --side-ink: var(--ink);
  /* Task timer */
  --timer-size: 46px;
  --timer-clock: 11px;
  --timer-tool: 32px;
  --timer-toggle: 84px;
  --timer-left: var(--accent-ink);
  --timer-rest: var(--ink-dim);
  --timer-track: color-mix(in srgb, var(--ink) 14%, transparent);
  --timer-done: var(--warn-ink);
  --timer-break: var(--accent-chip-ink);
  --break-tip-ink: var(--ink);
  --break-tip-source: var(--ink-dim);
  --break-tip-size: 14px;
  --break-tip-source-size: 12px;
  --timer-scrim: color-mix(in srgb, var(--solid) 60%, transparent);
  /* The veil behind a window (Settings, a small dialog, a side panel): it darkens the page on every Theme. The Theme's ink would
     lighten a dark one. */
  --dialog-scrim: var(--zen-scrim-top);
  /* Zen mode (colours in themes.css). Ring strokes are in the Ring's 44-unit viewBox: thin, as prototype C's. */
  --zen-side-width: max(var(--music-w), 240px); /* the column of choices and the music player */
  /* The donut fills what the screen leaves: the height under Leave and over Check off, the width beside the side column. */
  --zen-ring: clamp(200px, min(58vmin, 100dvh - 420px, 100vw - var(--zen-side-width) - 110px), 440px);
  --zen-clock-k: 0.25; /* the clock's size, as a share of the donut's */
  --zen-ring-stroke: 0.55;
  --zen-track-stroke: 0.35;
  --zen-r: 28px;
  --zen-pill-r: 999px;
  --zen-gap: 16px;
  --zen-focus-width: 500px;
  --zen-feather: 24px; /* how far into its padding the donut's glass fades out: never more than the padding, so text stays on full glass */
  --zen-bleed: 44px; /* and how far past its sides the fade goes on, so the glass has no edge to see */
  --zen-done-width: 300px;
  --zen-target: 44px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--selection); }
::placeholder { color: var(--ink-dim); opacity: 1; }
.mono { font-family: "Spline Sans Mono", monospace; font-size: 12px; color: var(--muted); }
button {
  font: inherit; font-weight: 600; cursor: var(--cur-pointer, pointer);
  background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink);
  border: 1px solid var(--ctl-line); border-radius: var(--r-btn); padding: 6px 14px;
}
/* :where keeps this rule's weight at one class, so a flat button (tab, star, window button) can say no fill on hover */
:where(button):hover { border-color: var(--pine); background: color-mix(in srgb, var(--ink) 7%, var(--paper)); }
button.primary { background: var(--pine); border-color: transparent; color: var(--on-accent); }
button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
button.danger { color: var(--warn-ink); }
button.tiny { padding: 2px 10px; font-size: 12px; font-weight: 500; color: var(--muted); }
button.tiny.live { background: linear-gradient(var(--pine-soft), var(--pine-soft)), var(--paper); color: var(--accent-ink); border-color: var(--pine); } /* on --paper, so a Theme's scene behind the page can't lower its contrast */
button:disabled { opacity: 0.5; cursor: var(--cur-blocked, not-allowed); } /* off is not busy: an empty form's button is off too */
button[aria-busy="true"], [data-busy="true"] button:disabled { cursor: wait; } /* busy: the pressed button (aria-busy, busy.js: it gets the spinner too) and the buttons off with it (data-busy on their group) */
input, textarea, .ctl-field {
  font: inherit; color: var(--ink);
  background: color-mix(in srgb, var(--paper) 80%, transparent); border: 1px solid var(--ctl-line); border-radius: var(--r-btn); padding: 6px 12px;
}
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
textarea { width: 100%; resize: vertical; }

/* Glass (.auth, the menu, main, Today's cards): --glass is the blur, or `none` where a blur could show nothing
   (themes.css). will-change and isolation change nothing while it blurs; without it they keep the card a layer of its
   own, so what is drawn over what stays the same. */
/* auth: the same card look, so the login screen shows the Theme */
.auth {
  max-width: 340px; margin: 18vh auto; padding: 28px 26px; display: flex; flex-direction: column; gap: 10px;
  background: var(--card-bg); border-radius: var(--r-card); box-shadow: var(--shadow);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); will-change: var(--glass-keep); isolation: isolate;
}
.auth h1 { font: 500 30px/1.2 var(--font-display); margin: 0 0 6px; }
.auth h1 span { color: var(--accent-ink); }

/* shell */
/* The menu is closed until its button (top left) opens it, so a page has the full width. Open, it is a column at the left.
   Closed, it stays in the page (inert, unseen, slid off the left edge of a 0-wide column), so opening and closing slide. */
.shell { display: grid; grid-template-columns: 0px minmax(0, 1fr); min-height: 100vh; position: relative; }
.shell.nav-open { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.menu-btn {
  position: absolute; top: 14px; left: 14px; z-index: 30; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  color: var(--accent-ink); background: var(--solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.menu-btn:hover { background: var(--solid); border-color: var(--pine); }
.menu-btn[aria-expanded="true"] { border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-soft); }
.side-wrap { display: contents; } /* a box on a phone only, where it folds the menu */
.shell:not(.nav-open) .side { transform: translateX(-100%); visibility: hidden; }
.shell:not(.nav-open) > main { margin-top: 64px; } /* room for the button */
/* Top right: Activity and Recents (pages/activity.js, pages/recents.js). They scroll away with the page, so they never
   stand over a row's own controls at the right edge. */
.top-tools { position: absolute; top: 14px; right: 14px; z-index: 30; display: flex; gap: 8px; }
.top-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  color: var(--accent-ink); background: var(--solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.top-btn:hover { background: var(--solid); border-color: var(--pine); }
.top-btn[aria-expanded="true"] { border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-soft); }
.shell.nav-open > main { margin-top: 64px; } /* the menu's button has the menu under it; these have the page */
/* Wide: the button stays in reach while the page scrolls. */
@media (min-width: 1000px) {
  .menu-btn { position: fixed; }
}
/* The slide, quick (180ms): the menu moves in (a transform) while its column opens to the menu's width, so the page beside
   it moves over with it instead of jumping. Closing, the menu leaves over the page (under its button), and goes unseen
   once it is off. The page's top room is the same open or closed, so nothing moves up or down. */
.shell:not(.nav-open) .side { z-index: 25; }
@media (prefers-reduced-motion: no-preference) {
  .shell { transition: grid-template-columns 180ms var(--ease); }
  .side { transition: transform 180ms var(--ease), visibility 0s; }
  .shell:not(.nav-open) .side { transition: transform 180ms var(--ease), visibility 0s linear 180ms; }
}
.side {
  background: var(--side); color: var(--side-ink);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); will-change: var(--glass-keep); isolation: isolate;
  border-right: 1px solid var(--line);
  padding: 22px 10px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; width: max-content; min-width: 168px; max-width: 220px; height: 100vh; /* as wide as its longest line */
}
.side a.nav { text-decoration: none; }
.side button, .side a.nav {
  background: none; border: none; color: var(--side-ink); font-weight: 500;
  text-align: left; min-height: 38px; padding: 6px 10px; border-radius: var(--r-btn);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.side button:hover, .side a.nav:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
/* The open page: a soft tint and accent ink, no filled bar. */
.side button.on, .side a.nav.on { background: var(--pine-soft); color: var(--accent-ink); font-weight: 600; }
.side .gear, .side .nav-ico { flex: none; width: 18px; height: 18px; }
.nav-l { display: inline-flex; align-items: center; gap: 10px; min-width: 0; } /* a page's icon and name */
.side .ult-icon { width: 18px; height: 18px; stroke-width: 1.75; }
.side a.nav:has(.gear), .side .nav:has(.nav-ico) { justify-content: flex-start; }
.side em {
  font-style: normal; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-dim); padding: 0 2px; /* a plain count */
}
.side a.nav.on em { color: var(--accent-ink); }
/* The pages (side-menu.js). The box around them is no box: they lie in the menu as its own items. A page drags to a new
   place: the one in hand (.dragging) rides above the rest, and the others slide out of its way. */
.nav-pages { display: contents; }
.nav-pages > a.nav { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.nav-pages > a.nav.dragging { position: relative; z-index: 2; background: var(--solid); box-shadow: var(--shadow); }
.nav-pages > a.nav.on.dragging { background: linear-gradient(var(--pine-soft), var(--pine-soft)), var(--solid); }
@media (prefers-reduced-motion: no-preference) {
  .nav-pages > a.nav { transition: transform 180ms var(--ease); }
}
.spacer { flex: 1; }
main {
  margin: 20px auto; padding: 36px 40px max(80px, calc(var(--music-room, 0px) + 24px)); align-self: start; justify-self: center; width: calc(100% - 40px);
  background: var(--card-bg); border-radius: var(--r-card); box-shadow: var(--shadow);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); will-change: var(--glass-keep); isolation: isolate;
}

/* Focus music (#54). Floats, so a phase change moves no row. On <body>, or in .zen-music while Zen is open. Above the notes panel,
   as YouTube's terms want its player seen, at 200x200 or more, while it plays. The notes panel rises clear of it. Hidden outside
   Focus, when it is paused. --music-w is on :root as Zen makes room by it too. */
:root { --music-w: 356px; --music-h: 200px; }
.music-dock {
  position: fixed; right: 16px; bottom: 16px; z-index: 45; width: min(var(--music-w), 100vw - 32px);
  color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden;
}
.music-dock[hidden] { display: none; }
.music-dock[data-show="no"] { visibility: hidden; }
.music-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.music-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; overflow-wrap: anywhere; }
.music-status { color: var(--ink-dim); }
.music-credit { color: var(--ink-dim); }
.music-credit a { color: inherit; text-decoration: underline; }
.music-frame iframe { display: block; width: 100%; border: 0; }
.music-covered { margin: 0; padding: 10px 20px; font-size: 13px; color: var(--ink-dim); border-bottom: 1px solid var(--line); } /* in the modal over the dock, which says why the music stopped */
.timer-dialog > .music-covered { padding: 0 0 10px; margin-bottom: 12px; }
.music-dock[data-kind="youtube"] .music-frame iframe { height: var(--music-h); }
.music-dock[data-kind="spotify"] .music-frame iframe { height: 152px; }
.music-picker { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: 100%; }
.music-picker .zen-field { max-width: 100%; white-space: nowrap; }
.music-picker .ctl-select { max-width: 100%; min-width: 0; }
.music-picker p { margin: 0; }
.music-link { display: flex; gap: 8px; width: 100%; }
.music-link input { flex: 1; min-width: 0; }
.timer-music { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.timer-music > p { margin: 8px 0 0; }
.music-yt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; max-width: 100%; }
.music-start { flex-wrap: wrap; white-space: nowrap; }
.music-start .ctl-num input { width: 3.5em; }
/* Audio only: the player stays in the page, out of sight and too small to see, so it keeps playing. Only the bar shows. */
.music-dock[data-view="audio"] .music-frame { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
/* Zen background: in Zen the video fills the screen behind everything, under Zen's scrim; the bar alone stays, where the player was.
   The dock and its wrappers give up their boxes (display: contents; .zen-side makes no stacking context), so nothing between the
   frame and the dialog makes a stacking context or a containing block, and z-index -1 puts the frame just over the dialog's own
   background. Elsewhere: the corner player. */
.zen-music:has(> .music-dock[data-view="bg"]:not([hidden])) { display: contents; }
.zen .music-dock[data-view="bg"] { display: contents; }
.zen .music-dock[data-view="bg"][hidden] { display: none; }
.zen .music-dock[data-view="bg"] > .music-bar {
  width: 100%; border-radius: var(--zen-r);
  background: var(--zen-glass); border: 1px solid var(--zen-line); box-shadow: var(--shadow);
  backdrop-filter: blur(var(--zen-blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--zen-blur)) saturate(1.3);
}
.zen .music-dock[data-view="bg"] > .music-frame { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.zen .music-dock[data-view="bg"] > .music-frame iframe {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh);
}
.zen .music-dock[data-view="bg"] > .music-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--zen-scrim-top), var(--zen-scrim-bottom)); }
/* In Zen the dock is in flow, in .zen-music at the end of the side column (prototype C's lower right corner), so the donut stays in
   the middle of the screen with or without music. A Break hides it (visibility), and the player stays where it is in the page, so
   it is not loaded again. */
.zen .music-dock { position: static; width: 100%; }
.zen-music { width: 100%; }
.zen-music:not(:has(> .music-dock:not([hidden]))) { display: none; }
.zen-music:has(> .music-dock[data-show="no"]) { position: fixed; right: var(--zen-gap); bottom: var(--zen-gap); width: var(--music-w); pointer-events: none; } /* hidden: keeps no room */
/* On a phone there is no side column: the dock is last, and sticks to the bottom as Zen scrolls, so the player stays in view. The
   wrapper must let presses through. The donut gets smaller while the dock is there, so Stop and Check off stay above it. */
@media (max-width: 720px) {
  .zen-music { position: sticky; bottom: 0; display: flex; justify-content: flex-end; pointer-events: none; }
  .zen-music > .music-dock { pointer-events: auto; width: min(var(--music-w), 100%); }
  .zen:has(.music-dock:not([hidden]):not([data-show="no"])) { --zen-ring: clamp(120px, 32vmin, 150px); }
  .zen .music-dock[data-view="bg"] > .music-bar { position: fixed; right: 16px; bottom: 16px; z-index: 45; width: min(var(--music-w), 100vw - 32px); }
  .zen:has(.music-dock[data-view="bg"]:not([hidden]):not([data-show="no"])) { padding-bottom: calc(var(--zen-gap) + 80px); }
}
@media (max-height: 640px) {
  :root { --music-w: 240px; }
}
@media (max-width: 720px), (max-height: 820px) { /* Zen's choices stay small: the same notes are in the timer settings, and the dock has the credit */
  .zen-side .music-picker > .dimtext { display: none; }
}
/* Short and wide: the player is most of the height, so it sits over the side menu and not over the rows' tools. The menu scrolls
   clear of it, and a key press on a menu item brings it clear too. The notes panel is in the other corner and need not rise. */
@media (max-height: 640px) and (min-width: 721px) {
  :root { --music-w: 204px; }
  .music-dock { right: auto; left: 3px; bottom: 3px; }
  .side { overflow-y: auto; padding-bottom: calc(var(--music-room, 0px) + 12px); scroll-padding-bottom: calc(var(--music-room, 0px) + 8px); }
}

/* Notes page: the documents at the left, the open one at the right (title, sticky toolbar, body). pages/notes.js */
.notes-page { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.notes-list { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 150px); min-width: 0; }
.notes-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.notes-list-head h1 { font: 500 28px/1.1 var(--font-display); margin: 0; }
.notes-list p { margin: 0; overflow-wrap: anywhere; }
.notes-search { width: 100%; }
.notes-docs { list-style: none; margin: 0 -4px; padding: 2px 4px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.notes-docs a { display: flex; flex-direction: column; padding: 7px 10px; border: 1px solid transparent; border-radius: var(--r-btn); color: var(--ink); text-decoration: none; }
.notes-docs a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.notes-docs a:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.notes-docs a.on { background: var(--pine-soft); border-color: var(--pine); }
.notes-doc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-doc-when { font-size: 12px; color: var(--muted); }
.notes-doc { min-width: 0; max-width: 860px; }
.notes-none h2 { font: 500 28px/1.2 var(--font-display); margin: 0 0 6px; }
.notes-doc-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; position: relative; z-index: 12; } /* its menus open over the sticky toolbar below */
.notes-title { flex: 1 1 260px; min-width: 0; font: 500 34px/1.2 var(--font-display); padding: 2px 8px; margin-left: -9px; background: none; border-color: transparent; text-overflow: ellipsis; }
.notes-title:hover { border-color: var(--line); }
.notes-doc-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.notes-doc-tools .lp-menu-list button { white-space: nowrap; }
.notes-state { font-size: 13px; color: var(--muted); }
.notes-state.err { color: var(--warn-ink); }
.notes-back { display: none; }
/* The toolbar stays in sight while the body scrolls under it: opaque, so words never show through. */
.notes-bar {
  position: sticky; top: 8px; z-index: 5;
  margin: 12px 0 16px; padding: 5px 6px; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: var(--shadow);
}
.notes-bar-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; } /* relative: holds the picture button's unseen label */
.notes-tools { display: inline-flex; gap: 2px; padding: 0 6px; border-right: 1px solid var(--line); }
.notes-tools:first-child { padding-left: 0; }
.notes-tools:last-of-type { border-right: none; }
.notes-tool {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 7px;
  background: none; border-color: transparent; font-size: 14px; font-weight: 700; line-height: 1;
}
.notes-tool[aria-pressed="true"] { background: var(--pine-soft); border-color: var(--pine); color: var(--accent-ink); }
.notes-busy { font-size: 13px; color: var(--muted); padding: 0 8px; }
.notes-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0 2px; margin-top: 5px; border-top: 1px solid var(--line); }
.notes-link input { flex: 1 1 200px; min-width: 0; }
.notes-msg { margin: 0 0 12px; }
.notes-edit { min-height: 48vh; outline: none; padding: 2px 0 24px; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.notes-edit:empty::before { content: 'Write here…'; color: var(--muted); }
.notes-edit h1 { font: 500 30px/1.2 var(--font-display); margin: 20px 0 8px; }
.notes-edit h2 { font: 500 23px/1.25 var(--font-display); margin: 18px 0 6px; }
.notes-edit h3 { font-size: 15px; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.notes-edit > :first-child { margin-top: 0; }
.notes-edit blockquote { margin: 8px 0; padding: 2px 14px; border-left: 3px solid var(--pine); color: var(--muted); }
.notes-edit pre, .notes-edit code {
  font-family: "Spline Sans Mono", monospace; font-size: 13.5px;
  background: var(--code-bg); border-radius: 6px;
}
.notes-edit code { padding: 1px 5px; }
.notes-edit pre { padding: 10px 14px; margin: 8px 0; overflow-x: auto; white-space: pre-wrap; }
.notes-edit ul, .notes-edit ol { margin: 6px 0; padding-left: 24px; }
.notes-edit a { color: var(--accent-ink); text-decoration: underline; }
.notes-edit img { max-width: 100%; height: auto; border-radius: var(--r-btn); vertical-align: bottom; }
.notes-edit img[data-note-up] { opacity: 0.45; }
.notes-edit img:not([src]) { display: inline-block; width: 160px; height: 100px; background: var(--code-bg); outline: 1px dashed var(--ctl-line); }
/* Checklist: a bullet list whose box is drawn in the line's left padding; a click there ticks it. */
:is(.notes-edit, .md-edit) ul.checks { list-style: none; padding-left: 2px; }
:is(.notes-edit, .md-edit) ul.checks > li { position: relative; padding-left: 28px; }
:is(.notes-edit, .md-edit) ul.checks > li::before {
  content: ''; position: absolute; left: 0; top: 0.3em; width: 17px; height: 17px; box-sizing: border-box;
  border: 1.5px solid var(--ctl-line); border-radius: 4px; background: color-mix(in srgb, var(--paper) 80%, transparent); cursor: var(--cur-pointer, pointer);
}
:is(.notes-edit, .md-edit) ul.checks > li[data-done]::before {
  content: '\2713'; background: var(--pine); border-color: var(--pine); color: var(--on-accent);
  font: 700 12px/14px var(--font-body); text-align: center;
}
:is(.notes-edit, .md-edit) ul.checks > li[data-done] { color: var(--muted); text-decoration: line-through; }
/* Focus: the documents fold away, the open one takes the page, and its headings are listed at the left. */
.notes-outline { display: none; }
.notes-edit :is(h1, h2, h3) { scroll-margin-top: 84px; } /* a jump from the outline lands clear of the sticky toolbar */
.notes-outline-head { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.notes-outline p { margin: 0; font-size: 13px; }
.notes-outline ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.notes-outline button {
  display: block; width: 100%; margin-left: -1px; padding: 5px 8px 5px 12px; text-align: left; background: none; border: 0; border-left: 2px solid transparent;
  border-radius: 0 var(--r-btn) var(--r-btn) 0; color: var(--muted); font-size: 13.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notes-outline button.lv2 { padding-left: 26px; }
.notes-outline button.lv3 { padding-left: 40px; font-size: 13px; }
.notes-outline button:hover, .notes-outline button:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.notes-outline button.on { color: var(--accent-ink); border-left-color: var(--pine); font-weight: 600; }
.notes-focus { display: none; }
@media (min-width: 721px) {
  .notes-focus { display: inline-flex; }
  .notes-page.focus { grid-template-columns: 220px minmax(0, 1fr); }
  .notes-page.focus .notes-list { display: none; }
  .notes-page.focus .notes-doc { max-width: none; }
  .notes-page.focus .notes-outline { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 150px); min-width: 0; }
}
@media (max-width: 720px) {
  /* A phone: the list folds away above the document until "Documents" asks for it. */
  .notes-page { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .notes-list { display: none; position: static; max-height: none; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .notes-page.list-open .notes-list { display: flex; }
  .notes-docs { max-height: 40vh; }
  .notes-back { display: inline-block; }
  .notes-doc-head { align-items: flex-start; }
  .notes-title { flex-basis: 100%; order: 2; font-size: 26px; margin-left: 0; padding: 2px 0; }
  .notes-doc-tools { order: 1; }
  .notes-search, .notes-link input { font-size: 16px; } /* 16px: a phone browser zooms in on anything smaller */
  /* One row that slides sideways, so the toolbar never takes more than a line of a small screen. */
  .notes-bar-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .notes-tools { padding: 0 4px; flex: none; }
  .notes-tool { min-width: 36px; height: 36px; }
  .notes-busy { flex: none; }
  .notes-bar { top: 4px; }
}

/* hero */
.hero { margin-bottom: 22px; position: relative; }
.hero h1 { font: 500 44px/1.1 var(--font-display); letter-spacing: -0.01em; margin: 0; }
.hero h1:not(:last-child) { margin-bottom: 10px; } /* clear of the line under it: a g or a j reaches below the title's own line */
.hero .meta { margin-top: 8px; }

/* cards / lists */
ul.cards { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
ul.cards > li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start;
}
ul.cards > li.done:not(.removed) .body { color: var(--ink-dim); }
li.done:not(.removed) .title { text-decoration: line-through; }
.body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* Checkboxes are drawn here, not by the OS (#73): an accent ring over a soft accent tint, filled with the accent when on. */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; padding: 0; margin: 2px 0 0; flex-shrink: 0; position: relative;
  border: 2px solid var(--pine); border-radius: 5px; background: linear-gradient(var(--pine-soft), var(--pine-soft)), var(--solid); cursor: var(--cur-pointer, pointer);
}
input[type="checkbox"]:hover { background: linear-gradient(var(--pine-soft), var(--pine-soft)), var(--pine-soft); }
input[type="checkbox"]:checked { background: var(--pine); border-color: var(--pine); }
input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 4px; top: 0; width: 4px; height: 9px;
  border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
input[type="checkbox"]:disabled { opacity: 0.5; cursor: var(--cur-default, default); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
/* round Task checkboxes */
ul.cards > li > input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; padding: 0; margin: 1px 0 0;
  border: 2px solid var(--pine); border-radius: 50%; background: var(--pine-soft); cursor: var(--cur-pointer, pointer); position: relative;
}
ul.cards > li > input[type="checkbox"]:hover { border-color: var(--check); }
ul.cards > li > input[type="checkbox"]:checked { background: var(--check); border-color: var(--check); }
ul.cards > li > input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  font-size: 13px; font-weight: 500; padding: 1px 10px; border-radius: 999px; line-height: 20px;
  background: var(--tag-bg); border: 1px solid transparent; color: var(--tag-ink);
  max-width: 100%; overflow-wrap: break-word; /* a name with no space in it breaks rather than widen the page */
}
.meta > .chip { min-width: 0; }
.chip.focus { background: var(--pine-soft); color: var(--accent-chip-ink); font-weight: 700; }
.chip b { font-weight: 700; } /* a chip's key, as in "Owner: me" */
.chip.pick { cursor: var(--cur-pointer, pointer); }
.chip.pick input { display: none; }
.chip.pick.on { background: var(--pine-soft); color: var(--accent-ink); border-color: var(--pine); }
.chip a { cursor: var(--cur-pointer, pointer); color: var(--tag-ink); }
.st-ready { color: var(--accent-ink); }
.st-in_progress { background: var(--pine-soft); color: var(--accent-chip-ink); }
/* A status is a badge: a soft square, tinted, with a border of its own hue. Other chips stay pills. */
.chip[class*=" st-"], .chip[class*=" g-"], .chip.cond, .chip.late { border-radius: var(--r-badge); padding: 1px 8px; font-weight: 600; }
.chip[class*=" st-"], .chip[class*=" g-"] { border-color: color-mix(in srgb, currentColor 30%, transparent); }
.st-idea { font-style: italic; }
.st-cancelled, .st-complete { text-decoration: none; }
.late { color: var(--warn-ink); font-weight: 500; }
.chip.cond { border-color: currentColor; } /* a stored Condition (Needs routing / Needs grilling): outlined, not tinted */
.chip.late { background: color-mix(in srgb, var(--warn) 16%, var(--paper)); border-color: var(--warn); } /* on --paper, so a Theme's scene behind the page can't lower its contrast */
.dimtext { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); overflow-wrap: anywhere; }
.hint.err { color: var(--warn-ink); }
.row { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
/* Mission / Project (the design's trail). The slash is decoration, so it may be faint. */
.trail { color: var(--ink-dim); font-size: 13px; margin-right: 6px; max-width: 100%; overflow-wrap: anywhere; }
.trail b { font-weight: 500; color: var(--ink); }
.trail i { font-style: normal; color: var(--ink-mute); margin: 0 4px; }

/* today */
.load-notice { margin-bottom: 12px; }
.row-error { color: var(--warn-ink); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pm-note {
  display: grid; gap: 6px; margin-bottom: 14px; padding: 10px 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
}
.pm-note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-note h2 {
  margin: 0; padding: 0; border: 0; color: var(--ink); text-transform: none; letter-spacing: normal;
  font: 500 18px/1.2 var(--font-display);
}
.pm-note-text { margin: 0; font-size: 14px; overflow-wrap: anywhere; white-space: pre-line; }
.pm-note-times { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }

/* task timer: the donut on a row, the bar every page shares, and the two popups */
.timer { display: flex; align-items: center; gap: 2px; flex: none; }
.timer-ring, .timer-tool { padding: 0; border: 0; background: none; border-radius: 50%; flex: none; }
.timer-ring:hover, .timer-tool:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.timer-ring { width: var(--timer-size); height: var(--timer-size); }
.timer-tool { width: var(--timer-tool); height: var(--timer-tool); display: grid; place-items: center; color: var(--ink-dim); }
.timer-tool:hover { color: var(--ink); }
.timer-tools { display: flex; align-items: center; gap: 2px; flex: none; }
.ring { position: relative; display: grid; place-items: center; width: var(--timer-size); height: var(--timer-size); flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 3; }
.ring-track { stroke: var(--timer-track); }
.ring-left { stroke: var(--timer-rest); }
.ring.idle .ring-left { stroke-width: 1.5; } /* a list of unstarted timers stays quiet */
.ring.running .ring-left { stroke: var(--timer-left); }
.ring-clock { position: relative; font-size: var(--timer-clock); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.ring.idle .ring-clock { font-weight: 400; }
.ring.finished .ring-clock { color: var(--timer-done); }
.ring.break .ring-left { stroke: var(--timer-break); }
/* Typed time on the clock. A row's dial: the press button (start/stop) fills it under the Ring, which lets clicks
   through except on the clock. The clock is a flat button; pressed, a small box with the time in it. */
.timer-dial { position: relative; display: grid; place-items: center; }
.timer-press { position: absolute; inset: 0; padding: 0; border: 0; background: none; border-radius: 50%; }
:where(.timer-press):hover { background: none; }
.timer-dial .ring { pointer-events: none; }
.ring-clock-edit, .ring-clock-input { pointer-events: auto; z-index: 1; }
.ring-clock-edit { padding: 0.15em 0.2em; border: 0; border-radius: 0.3em; background: none; cursor: var(--cur-text, text); font-family: inherit; }
:where(.ring-clock-edit):hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.ring-clock-input { width: 7ch; min-width: 0; padding: 0.15em 0.1em; text-align: center; border-radius: 0.3em; background: var(--solid); }
.ring-clock-input[aria-invalid="true"] { outline-color: var(--warn-ink); border-color: var(--warn-ink); }
/* Words for a screen reader only. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Opaque and held at the top while the page scrolls under it. */
.timer-bar {
  position: sticky; top: 8px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: 0 0 14px; padding: 6px 14px 6px 8px; min-height: calc(var(--timer-size) + 14px); /* room for the ring, with or without one */
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: var(--shadow);
}
/* Three lines at most, so a long title can't cover the page while it stays on screen. */
.timer-bar-title {
  flex: 1 1 120px; min-width: 0; padding-left: 6px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
/* Focus, Break and Break over bars replace each other in place: one line of parts, two lines of title, so each is one height and no row moves. */
.timer-bar[role="group"] { flex-wrap: nowrap; }
.timer-bar[role="group"] .timer-bar-title { flex-basis: 0; font-weight: 600; -webkit-line-clamp: 2; }
.timer-bar[role="group"] .timer-buttons { flex: none; flex-wrap: nowrap; }
/* A Break's tip. Wraps anywhere, so a long source can't widen the page. */
.break-tip {
  display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 10px 14px; overflow-wrap: anywhere;
  color: var(--break-tip-ink); font-size: var(--break-tip-size); line-height: 1.4;
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl);
}
/* After the list, so no row moves for it and the last row can scroll clear of it; held at the bottom of the screen meanwhile. */
.break-tip-dock { position: sticky; bottom: 8px; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; margin-top: 14px; }
.break-tip-dock .break-tip { box-shadow: var(--shadow); }
.break-tip-dock.over { visibility: hidden; }
.break-tip-source, .break-tip-source a { color: var(--break-tip-source); font-size: var(--break-tip-source-size); }
.timer-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.timer-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 20px; color: var(--ink); overflow-wrap: anywhere;
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.timer-dialog::backdrop { background: var(--timer-scrim); }
.timer-dialog h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.timer-dialog p { margin: 0 0 14px; }
.timer-dialog button { white-space: normal; overflow-wrap: anywhere; }
.timer-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.timer-sentence input { width: 84px; font-size: 16px; } /* 16px: a phone browser zooms in on anything smaller */

/* Zen mode: prototype C's look and layout (prototypes/c). The Theme's backdrop is the screen, under a dark scrim; Zen's controls
   float on it as dark glass with light ink, the same on every Theme. The app behind is hidden. Inside .zen the Theme's tokens are
   mapped onto the --zen-* ones, so every part in it (Ring, music picker, Break tip, dock, notices) takes the look with no rule of
   its own. Text sits only on the glass: the scrim and the glass together keep it at 4.5:1 over any frame (tests/themes.test.mjs).
   The large donut is the same Ring, with its tokens changed (its clock is still the field to type the time left in).
   Layout, as C: Leave in the upper left corner, the donut in the middle of the screen, the done list in the lower left corner,
   and the choices (Background, Music) with the music player in the lower right corner. Nothing but Leave is above the donut, so
   a choice that grows (a YouTube link's options) grows up its own column and moves nothing. */
:root[data-zen] { overflow: hidden; }
:root[data-zen] .shell { visibility: hidden; }
:root[data-zen] .zen, :root[data-zen] .timer-dialog { visibility: visible; }
.zen {
  --ink: var(--zen-ink); --ink-dim: var(--zen-dim); --muted: var(--zen-dim); --rule: var(--zen-line); --line: var(--zen-line);
  --paper: var(--zen-glass); --solid: var(--zen-solid); --card-bg: var(--zen-glass); --selection: var(--zen-selection);
  --accent: var(--zen-ink); --pine: var(--zen-ink); --on-accent: var(--zen-on); --accent-ink: var(--zen-ink); --accent-chip-ink: var(--zen-ink);
  --pine-soft: var(--zen-hover); --warn-ink: var(--zen-warn);
  --timer-left: var(--zen-ink); --timer-rest: var(--zen-dim); --timer-track: var(--zen-line); --timer-done: var(--zen-warn); --timer-break: var(--zen-dim);
  --break-tip-ink: var(--zen-ink); --break-tip-source: var(--zen-dim);
  --timer-size: var(--zen-ring); --timer-clock: calc(var(--zen-ring) * var(--zen-clock-k));
  color-scheme: dark;
  width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: var(--zen-gap);
  color: var(--ink); border: 0; overflow-y: auto;
  background: linear-gradient(to bottom, var(--zen-scrim-top), var(--zen-scrim-bottom));
}
.zen[open] { display: flex; flex-direction: column; gap: var(--zen-gap); }
.zen::backdrop { background: transparent; }
.zen:focus { outline: none; } /* focus rests on the dialog itself; Tab goes on to its controls */
.zen button[aria-disabled="true"] { opacity: 0.5; cursor: var(--cur-blocked, not-allowed); }
.zen [data-busy="true"] button[aria-disabled="true"] { cursor: wait; } /* off while the check-off is out */
.zen button { min-height: var(--zen-target); }
.zen .ctl-select-btn, .zen input { font-size: 16px; } /* 16px: a phone browser zooms in on anything smaller */
.zen input.ring-clock-input { font-size: var(--timer-clock); } /* the clock being edited stays the clock's size (it is far over 16px) */
.zen input.ring-clock-input { max-width: var(--timer-size); } /* no wider than its donut, so it stays clear of the side column */
/* The glass: the one surface in Zen. */
.zen-card, .zen-top > *, .zen-pill, .zen-side > .music-picker, .zen .music-dock {
  background: var(--zen-glass); border: 1px solid var(--zen-line); box-shadow: var(--shadow);
  backdrop-filter: blur(var(--zen-blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--zen-blur)) saturate(1.3);
}
.zen-card { border-radius: var(--zen-r); }
.zen button { border-color: var(--zen-line); }
.zen :where(button):hover { border-color: var(--zen-ink); background: var(--zen-hover); }
.zen button.primary { background: var(--zen-ink); color: var(--zen-on); border-color: transparent; }
.zen button.primary:hover { background: color-mix(in srgb, var(--zen-ink) 86%, var(--zen-glass)); }
.zen :focus-visible { outline-color: var(--zen-ink); }
/* Top: Leave alone, a glass pill. */
.zen-top { align-self: stretch; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; max-width: 100%; }
.zen-top > *, .zen-pill, .zen-side > .music-picker { border-radius: var(--zen-pill-r); }
.zen-top > button { padding-inline: 20px; }
/* The side: the choices as glass pills over the music player. On a phone it has no box of its own: its parts go under the donut. */
.zen-side { display: contents; }
.zen-pill, .zen-side > .music-picker { padding: 4px 4px 4px 16px; max-width: 100%; }
.zen-side > .music-picker:has(> :nth-child(2)) { padding: 8px 10px 12px 16px; border-radius: var(--zen-r); gap: 8px; }
.zen-side > .hint { padding: 8px 14px; }
.zen-field { display: flex; align-items: center; gap: 8px; color: var(--ink-dim); }
.zen-side .ctl-select-btn { border-radius: var(--zen-pill-r); color: var(--zen-ink); }
.zen-side .music-start { gap: 6px; }
.zen-side .music-start .ctl-num input { width: 2.1em; padding-left: 2px; padding-right: 2px; } /* minutes and seconds on one line of the column */
/* The donut's glass is a soft field, not a box, and it does not blur: as in C the scene shows through the ring, sharp. It is
   full strength under all the text and fades out only across the padding (--zen-feather) and, at the sides, past the box
   (--zen-bleed). */
.zen-stage { flex: 1 0 auto; display: flex; justify-content: center; min-width: 0; }
.zen-focus {
  position: relative; isolation: isolate; width: min(var(--zen-focus-width), 100%); margin-block: auto; padding: 24px 28px 28px; overflow-wrap: anywhere; text-align: center; /* auto margins: in the middle, and never cut off above when it is taller than the screen */
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.zen-focus.zen-card { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.zen-focus::before {
  content: ""; position: absolute; inset: 0 calc(-1 * var(--zen-bleed)); z-index: -1; border-radius: var(--zen-r); background: var(--zen-glass);
  --zen-fade: calc(var(--zen-feather) + var(--zen-bleed));
  mask-image:
    linear-gradient(to right, transparent, black var(--zen-fade), black calc(100% - var(--zen-fade)), transparent),
    linear-gradient(to bottom, transparent, black var(--zen-feather), black calc(100% - var(--zen-feather)), transparent);
  mask-composite: intersect;
}
.zen-title { margin: 0; padding: 0; border: 0; color: var(--ink); font: 400 clamp(19px, 2.4vw, 26px)/1.25 var(--font-body); letter-spacing: 0; text-transform: none; text-wrap: balance; text-shadow: 0 2px 20px var(--zen-shade); }
.zen .ring svg { stroke-width: var(--zen-ring-stroke); }
.zen .ring-track { stroke-width: var(--zen-track-stroke); }
.zen .ring.idle .ring-left { stroke-width: var(--zen-ring-stroke); }
.zen .ring-left { stroke-linecap: round; }
.zen .ring-clock, .zen .ring.idle .ring-clock { font-weight: 200; letter-spacing: -0.04em; text-shadow: 0 2px 30px var(--zen-shade); }
.zen-status { color: var(--zen-dim); font-size: 15px; text-shadow: 0 1px 12px var(--zen-shade); }
.zen-status.finished { color: var(--zen-warn); font-weight: 600; }
.zen-status.break { order: -1; color: var(--ink); font-size: clamp(36px, 7vmin, 64px); font-weight: 200; line-height: 1.1; letter-spacing: -0.03em; } /* C's Break: the word, large and thin, over its clock */
.zen-status.breakOver { color: var(--ink); font-weight: 600; }
.zen-focus .break-tip { margin: 0; padding: 0; border: 0; background: none; text-wrap: pretty; }
.zen-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.zen-actions button { padding-inline: 20px; }
.zen-offer::before { /* C's finish mark: a thin ring with a tick */
  content: "\2713"; display: grid; place-items: center; width: 84px; height: 84px; margin: 4px auto 16px;
  border: 2px solid var(--zen-ink); border-radius: 50%; font-size: 38px; font-weight: 200; line-height: 1;
}
.zen-offer p { margin: 0 0 10px; }
.zen-focus .load-notice { margin: 0; text-align: left; }
.zen-done { width: min(var(--zen-done-width), 100%); padding: 14px 16px 10px; overflow-wrap: anywhere; min-height: 72px; max-height: 70dvh; overflow-y: auto; }
.zen-done h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--zen-dim); }
.zen-done ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.zen-done li { display: flex; align-items: baseline; gap: 10px; padding: 5px 2px; font-size: 14px; line-height: 1.3; }
.zen-done li::before {
  content: "\2713"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; translate: 0 3px;
  border-radius: 50%; background: var(--zen-ink); color: var(--zen-on); font-size: 11px; font-weight: 700; line-height: 1;
}
.zen-done p { margin: 0; color: var(--zen-dim); }
@media (prefers-reduced-motion: no-preference) {
  .zen[open] { animation: zen-in 450ms var(--ease); }
  .zen .ring-left { transition: stroke-dashoffset 500ms linear; }
  @keyframes zen-in { from { opacity: 0; } }
}
/* A phone: one column that scrolls as a whole, so a long done list does not scroll inside a scroll. Under the donut come the
   choices, then the done list, then the music player (which sticks to the bottom). */
@media (max-width: 720px) {
  :root { --zen-ring: clamp(190px, 58vmin, 250px); --zen-feather: 18px; --zen-bleed: 0px; }
  .zen-focus { padding: 20px 18px 22px; }
  .zen-pill, .zen-side > .music-picker, .zen-side > .hint { align-self: center; }
  .zen-done { order: 1; width: 100%; max-height: none; overflow-y: visible; }
  .zen-music { order: 2; }
}
/* Wider: two columns. The side column stands at the right, from the bottom up; Leave, the donut and the done list keep the rest.
   With nothing to show in it (a Break, or a Task's time over with no music) the side column takes no room. */
@media (min-width: 721px) {
  .zen[open] { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; }
  .zen-top { grid-column: 1; grid-row: 1; }
  .zen-stage { grid-column: 1; grid-row: 2; }
  .zen-done { grid-column: 1; grid-row: 3; justify-self: start; }
  .zen-side {
    grid-column: 2; grid-row: 1 / -1; align-self: start; margin-top: auto; width: var(--zen-side-width); min-width: 0; /* at the bottom; when taller than the screen it starts at the top, so Zen scrolls to all of it */
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  }
  .zen-side:not(:has(> :not(.zen-music), .music-dock:not([hidden]):not([data-show="no"]))) { width: 0; margin-left: calc(-1 * var(--zen-gap)); overflow: hidden; }
}
@media (min-width: 721px) and (min-height: 641px) { /* a Break has its word and its tip around the donut, so the donut gives them room */
  .zen:has(.zen-status.break) { --zen-ring: clamp(180px, min(50vmin, 100dvh - 440px), 400px); }
}
/* Wide and tall: C's layout. Three columns, so the donut is in the middle of the screen whatever stands at its sides. */
@media (min-width: 1240px) and (min-height: 641px) {
  :root { --zen-ring: clamp(200px, min(58vmin, 100dvh - 290px), 440px); }
  .zen { padding: 20px clamp(16px, 2.5vw, 40px) 24px; }
  .zen[open] { grid-template-columns: minmax(0, 1fr) minmax(0, var(--zen-focus-width)) minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .zen-stage { grid-column: 2; grid-row: 1 / -1; }
  .zen-done { grid-row: 2; align-self: end; max-height: 38dvh; }
  .zen-side, .zen-side:not(:has(> :not(.zen-music), .music-dock:not([hidden]):not([data-show="no"]))) {
    grid-column: 3; justify-self: end; width: min(var(--zen-side-width), 100%); margin-left: 0; overflow: visible;
  }
}
/* A short screen, as a phone on its side: the donut sits beside its controls and an alert's Retry beside its words, so Check off stays on screen. */
@media (max-height: 640px) {
  :root { --zen-ring: clamp(96px, 34vmin, 150px); --zen-gap: 8px; --zen-feather: 12px; --zen-bleed: 0px; }
  .zen-focus { padding: 12px; gap: 8px 16px; }
  .zen-title { font-size: 18px; }
  .zen-status.break { font-size: 28px; }
  .zen-done { max-height: none; overflow-y: visible; }
  .zen-clocked { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .zen-clocked > * { grid-column: 1 / -1; }
  .zen-clocked > .ring { grid-column: 1; grid-row: span 2; }
  .zen-clocked > .zen-status { grid-column: 2; align-self: end; }
  .zen-clocked > .zen-actions { grid-column: 2; align-self: start; }
  .zen-focus .load-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
}

/* Display panel: a sheet on the right. The list behind stays in view, so a change shows as you make it. */
.display-panel {
  margin: 0 0 0 auto; padding: 0; width: min(340px, 100vw - 40px); max-width: none; height: 100dvh; max-height: none;
  color: var(--ink); background: var(--solid); border: 0; border-left: 1px solid var(--line);
  border-radius: var(--r-card) 0 0 var(--r-card); box-shadow: var(--shadow); overflow-y: auto;
}
.display-panel::backdrop { background: color-mix(in srgb, var(--dialog-scrim) 25%, transparent); }
.display-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.display-head h2 { margin: 0; font: 500 22px/1.2 var(--font-display); }
.display-seg { display: flex; gap: 0; } /* each as wide as its name, so "Mission control" keeps one line */
/* Segments: one tinted track; the part that is on is a raised, bordered tile. */
.display-seg, .review-seg { background: color-mix(in srgb, var(--ink) 7%, var(--paper)); border: 1px solid var(--ctl-line); border-radius: var(--r-btn); }
.display-seg button, .display-seg a, .review-seg button { margin: -1px; border-color: transparent; background: none; border-radius: var(--r-btn); }
.display-seg button, .display-seg a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.display-seg button { flex: 1 1 auto; padding: 6px 10px; color: var(--muted); white-space: nowrap; }
.display-seg button[aria-pressed="true"] { background: var(--solid); color: var(--ink); border-color: var(--ink-dim); }
.display-field { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.display-field .ctl-select, .display-field .ctl-select-btn { width: 100%; min-width: 0; font-size: 14px; }
.display-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* Mission control (Today's layout, from prototype D). The page leaves the one big card: main goes clear and wide, and
   holds a column of glass cards. */
main:has(> .mc) {
  padding-inline: 0; padding-top: 0; background: none; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; will-change: auto; isolation: auto;
}
main:has(> .mc) > .load-notice, main:has(> .mc) > .timer-bar { background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 14px; }
/* The on-air bar stands in for the shared timer bars here. Time's up, the save alert and the Break tip stay. */
main:has(.onair) > .timer-bar[role="group"] { display: none; }
.mc-top, .mc .pm-note, .mc .ulist, .td-card, .td-board {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); will-change: var(--glass-keep); isolation: isolate;
}
.mc-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mc-main > * { margin-block: 0; }

/* The head and the on-air bar */
.mc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 26px; }
.mc-top h1 { margin: 0; font: 500 clamp(34px, 5vw, 52px)/1.05 var(--font-display); letter-spacing: -0.01em; }
.mc-line { margin: 6px 0 0; padding: 0; border: 0; font-size: 14.5px; color: var(--ink-dim); }
.mc-top-text { min-width: 0; }
/* The day's progress: a donut of done over all, the fraction beside it. today.js DayRing */
.mc-ring { display: flex; align-items: center; gap: 14px; flex: none; align-self: center; }
.mc-ring-chart { position: relative; display: grid; place-items: center; width: 72px; height: 72px; }
.mc-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 6; }
.mc-ring-track { stroke: var(--timer-track); }
.mc-ring-done { stroke: var(--timer-left); stroke-linecap: round; }
.mc-ring-pct { position: relative; font-size: 14px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.mc-ring-frac { display: flex; flex-direction: column; gap: 4px; }
.mc-ring-frac b { font: 500 30px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-ring-frac small { font-size: 12.5px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; }
@media (prefers-reduced-motion: no-preference) { .mc-ring-done { transition: stroke-dasharray 500ms var(--ease, ease-out); } }
.onair {
  position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 16px;
  background: var(--solid); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: var(--r-card);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), var(--shadow);
}
.onair-live {
  flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink);
}
.onair-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-dim); }
.onair.running .onair-live i { background: var(--accent); }
.onair.paused .onair-live { color: var(--ink-dim); }
.onair-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.onair-title { font: 500 19px/1.25 var(--font-display); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.onair .timer { display: flex; align-items: center; gap: 8px; }
.onair .timer-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.onair-go { padding: 4px 14px; font-size: 14px; }
/* the play / stop button: the bar's main press, so it is the one in the accent */
.timer-tool.onair-toggle, .timer-tool.onair-toggle:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.timer-tool.onair-toggle:hover { background: color-mix(in srgb, var(--accent) 28%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .onair.running .onair-live i { animation: onair-pulse 1.6s var(--ease) infinite; }
}
@keyframes onair-pulse { 50% { opacity: 0.35; } }

/* Add a task */
.mc .pm-note { padding: 16px 20px; }
/* Today's Completed switch and the Undo line after a check-off */
.td-done-toggle { align-self: flex-start; }
/* Today's page is clear, so what stands on it gets a backing: the list (toolbar and body) is one glass card, the lines
   above it are opaque. A Theme's scene can't lower their contrast. */
.mc .ulist { padding: 14px; overflow: hidden; }
.mc .ulist > .ult-frame { margin: 0 -14px -14px; }
.mc .ulist > .ult-frame > .ult-wrap { border-width: 1px 0 0; border-radius: 0; box-shadow: none; } /* the table fills the card, edge to edge */
.mc .ulist > .ult-frame > .ult-wrap:focus-visible { outline-offset: -2px; }
.mc .ulist > .ult-frame.has-lead > .ult-wrap { border-left-width: 1px; }
/* Today's list: plain rows, what matters first. Done box, title over a quiet Mission / Project line (and one chip when a date
   presses), the timer at the end. No table and no toolbar: those are the Inbox's. */
.td-card { padding: 6px 0; overflow: hidden; }
.td-list { list-style: none; margin: 0; padding: 0; }
.td-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; min-height: 60px; } /* a double-click or a right-click anywhere opens the Task's menu */
.td-row + .td-row { border-top: 1px solid var(--line); }
.td-row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.td-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* the title is a link to the Task, drawn as plain text */
.td-title {
  align-self: flex-start; max-width: 100%; padding: 0; border: 0; border-radius: 0; text-align: left; transform: none; text-decoration: none;
  color: var(--ink); font-size: 16px; font-weight: 600; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0% 1.5px;
}
.td-title:hover { color: var(--accent-ink); background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0% 1.5px; }
.td-title:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.td-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 0; }
.td-meta:empty { display: none; }
/* a row's status: a pill tinted in its status colour, with its dot (the same colours as a table's dots) */
/* The pill is the button of a list of statuses (controls.js Select: .td-status-pick), a pick saved at once; plain (.td-status)
   only on a recurring Task done today, whose status is not the one drawn. */
.td-status, .td-status-pick { --st: var(--tone-gray); }
.td-status, .td-status-pick .ctl-select-btn { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px;
  color: var(--ink); background: color-mix(in srgb, var(--st) 18%, var(--paper)); border: 1px solid color-mix(in srgb, var(--st) 45%, transparent); }
.td-status::before, .td-status-pick .ctl-select-btn::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
:is(.td-status, .td-status-pick).dot-idea { --st: var(--tone-yellow); }
:is(.td-status, .td-status-pick).dot-ready { --st: var(--accent); }
:is(.td-status, .td-status-pick).dot-doing { --st: var(--ready); }
:is(.td-status, .td-status-pick).dot-done { --st: var(--check); }
.td-status.dot-cancelled, .td-status-pick.dot-cancelled .ctl-select-btn { color: var(--ink-dim); }
.td-status.dot-cancelled::before, .td-status-pick.dot-cancelled .ctl-select-btn::before { background: none; box-shadow: inset 0 0 0 2px var(--tone-gray); }
.td-status-pick .ctl-select-btn { min-height: 0; padding-right: 5px; white-space: nowrap; }
.td-status-pick .ctl-select-btn:hover, .td-status-pick .ctl-select-btn[aria-expanded="true"] { border-color: var(--st); }
.td-status-pick .ctl-chevron { width: 10px; height: 10px; }
/* The other tags are buttons too: a chip opens the picker of what it says (a date, the time), the repeat sign and the fire
   open the row's menu. */
.td-meta button.chip { white-space: nowrap; }
.td-meta button.chip:hover, .td-meta button.chip[aria-expanded="true"] { border-color: currentColor; }
.td-meta button:is(.td-fire, .td-repeat) { margin: -2px; padding: 2px; border: 0; border-radius: 6px; background: none; }
.td-meta button:is(.td-fire, .td-repeat):hover { background: var(--selection); }
.td-meta .ctl-time-input { padding-block: 2px; font-size: 13px; }
@media (hover: none) { /* a finger's reach, mostly below the tag: the title above it is a link */
  .td-meta :is(button.chip, button.td-fire, button.td-repeat, .td-status-pick .ctl-select-btn) { position: relative; }
  .td-meta :is(button.chip, button.td-fire, button.td-repeat, .td-status-pick .ctl-select-btn)::after { content: ""; position: absolute; inset: -6px -3px -12px; }
}
/* Today's List | Board switch, and the board on a backing like the list's card */
.td-display { align-self: flex-start; }
.td-board { padding: 14px; overflow: hidden; }
.td-row:has(.ul-row-done:checked) .td-title { background-size: 100% 1.5px; color: var(--ink-dim); }
.td-empty { margin: 0; padding: 22px 20px; color: var(--ink-dim); }
@media (prefers-reduced-motion: no-preference) {
  .td-row:has(.ul-done.go) .td-title { animation: ul-strike 320ms 150ms cubic-bezier(0.55, 0, 0.3, 1) both; }
}
/* a checked-off row the list let go (check-off.js foldAway): its copy plays the picture out, then fades and folds to nothing */
.td-row.ult-gone {
  height: var(--h); min-height: 0; overflow: hidden; pointer-events: none;
  transition: height 300ms var(--ease), padding 300ms var(--ease), opacity 220ms var(--ease), border-color 300ms var(--ease);
}
.td-row.ult-gone.go { height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-top-color: transparent; }
@media (max-width: 720px) {
  .td-row { padding: 10px 12px; gap: 10px; }
}
.mc-main > p.hint { padding: 8px 14px; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.mc-main > .td-done-toggle, .mc-main > .td-done-toggle:hover { background: var(--solid); }

@media (max-width: 720px) {
  main:has(> .mc) { padding-inline: 4px; }
  .mc-top { padding: 16px 16px; }
  .mc-ring { gap: 10px; }
  .mc-ring-chart { width: 56px; height: 56px; }
  .mc-ring-pct { font-size: 12px; }
  .mc-ring-frac b { font-size: 24px; }
  .onair { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .onair-text { flex-basis: calc(100% - 120px); }
  .onair .timer { width: 100%; justify-content: space-between; }
}


/* Habits (pages/habits.js): the Recurring Tasks as a dashboard. Each habit hands its colour down as --hb (a chart
   colour, for marks only: every word stays in the ink). The rings are the top bar's, the cards Today's. */
.hb .mc-top { flex-wrap: wrap; align-items: flex-end; }
.hb-h { margin: 0 0 12px; font: 600 12.5px/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.hb-ring { position: relative; flex: none; display: grid; place-items: center; width: 84px; height: 84px; }
.hb-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hb-ring-track, .hb-ring-arc { fill: none; stroke-width: 3.6; }
.hb-ring-track { stroke: color-mix(in srgb, var(--hb, var(--accent)) 18%, transparent); }
.hb-ring-arc { stroke: var(--hb, var(--accent)); stroke-linecap: round; }
.hb-ring-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); }
.hb-ring-in b { font: 600 19px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.hb-ring-in span { font-size: 13px; line-height: 1; color: var(--ink-dim); }
.hb-ring.big { width: 152px; height: 152px; }
.hb-ring.big .hb-ring-in b { font-size: 40px; }
@media (prefers-reduced-motion: no-preference) { .hb-ring-arc { transition: stroke-dasharray 400ms var(--ease); } }
/* the numbers over all of them */
.hb-over { display: flex; align-items: center; gap: 32px; padding: 22px 26px; }
.hb-tiles { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
.hb-tiles .recipe-number { padding: 0; }
.hb-tiles .recipe-caption { margin: 0; font-weight: 600; color: var(--ink); }
.hb-tiles .hint { margin: 2px 0 0; font-size: 13px; }
/* every day as a square beside the times done per week */
.hb-act { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px 36px; padding: 20px 26px; }
.hb-block { min-width: 0; max-width: 100%; }
.hb-block-wide { flex: 1 1 260px; }
.hb-heat { --cell: 28px; --gap: 4px; min-width: 0; }
.hb-heat.r-12w { --cell: 20px; }
.hb-heat.r-1y { --cell: 11px; --gap: 3px; }
.hb-heat-scroll { max-width: 100%; overflow-x: auto; padding: 2px 2px 6px; }
.hb-heat-scroll:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.hb-heat-in { display: inline-flex; flex-direction: column; gap: 4px; }
.hb-months, .hb-weeks { display: grid; grid-template-columns: 30px repeat(var(--weeks), var(--cell)); column-gap: var(--gap); }
.hb-months { height: 14px; font-size: 11px; line-height: 14px; color: var(--ink-dim); }
.hb-months span { grid-row: 1; white-space: nowrap; }
.hb-week { display: grid; grid-template-rows: repeat(7, var(--cell)); row-gap: var(--gap); }
.hb-weekdays span { font-size: 11px; line-height: var(--cell); color: var(--ink-dim); }
.hb-day { box-sizing: border-box; display: block; width: var(--cell); height: var(--cell); border-radius: 4px; }
.hb-day.out { visibility: hidden; }
.hb-day.none { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.hb-day.l0 { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 50%, transparent); } /* something to do, none done: blank */
.hb-day.l1 { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.hb-day.l2 { background: color-mix(in srgb, var(--accent) 52%, transparent); }
.hb-day.l3 { background: color-mix(in srgb, var(--accent) 76%, transparent); }
.hb-day.l4 { background: var(--accent); }
.hb-day.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.hb-legend { --cell: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 10px 0 0; font-size: 12px; color: var(--ink-dim); }
.hb-legend .hb-day { border-radius: 3px; }
.hb-legend-gap { width: 10px; }
/* bars: a bar a week (or a month), standing on the line */
.hb-bars { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hb-bars-plot { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; height: 52px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.hb-bar { flex: 1 1 0; min-width: 2px; max-width: 26px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.hb-bar-due { flex: none; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: color-mix(in srgb, var(--hb) 18%, transparent); border-radius: 4px 4px 0 0; }
.hb-bar-done { flex: none; background: var(--hb); border-radius: 4px 4px 0 0; }
.hb-bar:hover > * { filter: brightness(1.12); }
.hb-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--ink-dim); }
.hb-stack .hb-bars-plot { height: 132px; padding-top: 18px; }
.hb-stack .hb-bar { gap: 2px; max-width: 34px; }
.hb-seg { flex: none; min-height: 2px; background: var(--hb); }
.hb-bar-n + .hb-seg { border-radius: 4px 4px 0 0; }
.hb-bar-n { flex: none; font-size: 11px; line-height: 14px; text-align: center; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.hb-key { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 12px 0 0; padding: 0; font-size: 12.5px; color: var(--ink-dim); }
.hb-key li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.hb-key-mark { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--hb); }
/* a card per habit */
.hb-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 8px 14px; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.hb-list-head .hb-h { margin: 0; }
.hb-dotkey { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; font-size: 12.5px; color: var(--ink-dim); }
.hb-dotkey > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hb-dotkey .hb-dot { --hb: var(--accent); }
.hb-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px; }
.hb-card {
  display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; cursor: var(--cur-pointer, pointer);
  background: linear-gradient(color-mix(in srgb, var(--hb) 9%, transparent), transparent 96px), var(--card-bg);
}
.hb-card:hover { border-color: color-mix(in srgb, var(--hb) 55%, var(--line)); }
.hb-head { display: flex; align-items: center; gap: 12px; }
.hb-badge {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px;
  background: color-mix(in srgb, var(--hb) 20%, transparent); color: color-mix(in oklab, var(--hb) 62%, var(--ink));
}
.hb-badge:hover { background: color-mix(in srgb, var(--hb) 32%, transparent); }
.hb-badge:focus-visible, .hb-pick:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.hb-icon { width: 22px; height: 22px; }
.hb-rule { font-size: 13px; color: var(--ink-dim); }
.hb-wait { box-sizing: border-box; flex: none; width: 20px; height: 20px; border: 2px dotted color-mix(in srgb, var(--ink) 34%, transparent); border-radius: 50%; }
.hb-wait.ended { border-style: solid; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.hb-charts { display: flex; align-items: center; gap: 16px; }
.hb-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hb-count { margin: 0; font-size: 13.5px; color: var(--ink-dim); }
.hb-count b { font: 600 20px/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.hb-count .dimtext { font-size: inherit; }
.hb-streak { display: flex; align-items: center; gap: 4px 10px; margin: 0; font-size: 13.5px; color: var(--ink); }
.hb-streak .dimtext { font-size: inherit; }
.hb-fire { display: inline-flex; margin-right: -4px; color: color-mix(in srgb, var(--ink) 30%, transparent); }
.hb-fire.on { color: var(--warn); }
/* a habit's dates, the oldest first: filled and ticked = done, blank = missed */
.hb-line { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.hb-nodots { margin: 0; }
.hb-dot { position: relative; box-sizing: border-box; flex: none; display: inline-block; width: 16px; height: 16px; border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 50%; }
.hb-dot.done { border-color: var(--hb); background: var(--hb); }
.hb-dot.done::after { content: ""; position: absolute; left: 4px; top: 1.5px; width: 3.5px; height: 7px; border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hb-dot.skipped { border-style: dashed; }
.hb-dot.due { border: 2px solid var(--hb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb) 24%, transparent); }
.hb-dot.next { border-style: dotted; border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
/* the panel that picks a habit's icon and colour */
.hb-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.hb-pick { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1.5px solid transparent; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.hb-pick:hover { background: color-mix(in srgb, var(--ink) 11%, transparent); }
.hb-pick[aria-pressed="true"] { border-color: var(--ink); background: color-mix(in srgb, var(--hb) 22%, transparent); }
.hb-swatch span { width: 22px; height: 22px; border-radius: 50%; background: var(--hb); }
@media (max-width: 720px) {
  .hb-over { flex-direction: column; align-items: center; gap: 16px; padding: 18px 16px; }
  .hb-tiles { width: 100%; gap: 8px 12px; }
  .hb-tiles .recipe-number-value { font-size: 32px; }
  .hb-act { padding: 16px; }
  .hb-heat { --cell: 26px; }
  .hb-heat.r-12w { --cell: 19px; }
  .hb-card { padding: 14px 14px 16px; }
}


/* backlog */
.addrow { display: flex; gap: 8px; margin: 10px 0; }
.addrow input { flex: 1; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin: 14px 0 20px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 13px;
}
.toolbar label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.toolbar .search { flex: 1; min-width: 120px; }
section h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border-bottom: 1px solid var(--line);
  padding-bottom: 4px; margin: 24px 0 8px;
}
section h2 em { font-style: normal; font-weight: 400; }
ul.tree { list-style: none; padding: 0; margin: 0; }
ul.tree li { margin: 4px 0; }

/* logs */
.logs-page { min-width: 0; }
.logs-actions { flex-wrap: wrap; }
.logs-sync-url { font-size: .85em; }
.logs-sync-url input { flex: 1; min-width: 0; }
.logs-filters { align-items: flex-start; }
.logs-cards .body { min-width: 0; }
.logs-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.logs-text.clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
.logs-ref { overflow-wrap: anywhere; }
.logs-expand { align-self: flex-start; }
.log-state-unprocessed, .log-state-requested, .log-state-in_progress { background: var(--pine-soft); border-color: transparent; color: var(--accent-ink); font-weight: 700; }
.log-state-failed { color: var(--warn-ink); border-color: var(--warn); }
.log-state-failed + .log-state-detail { color: var(--warn-ink); }
.log-state-detail { overflow-wrap: anywhere; }
.log-process { margin: 0; flex-wrap: wrap; }
.repo-tasks details { margin: 8px 0; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); }
.repo-tasks summary { cursor: var(--cur-pointer, pointer); overflow-wrap: anywhere; }
.repo-tasks summary .chip { margin-left: 6px; }
.repo-task-list { list-style: none; margin: 10px 0 0; padding: 0; }
.repo-task-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.repo-task-title { flex: 1; min-width: 120px; }

/* Projects page (pages/projects.js): one Project per repo queue, read-only; the list is the universal list. Group colours: blocked --warn, in progress --ready, done --check. */
.project-bar { display: block; height: 4px; border-radius: 2px; background: var(--timer-track); overflow: hidden; }
.project-bar > span { display: block; height: 100%; background: var(--check); }
.chip.g-blocked { background: color-mix(in srgb, var(--warn) 16%, var(--paper)); border-color: var(--warn); color: var(--warn-ink); } /* on --paper, as .chip.late */
.chip.g-doing { background: color-mix(in srgb, var(--ready) 16%, var(--paper)); border-color: var(--ready); color: color-mix(in oklab, var(--ready) 65%, var(--ink)); }
.chip.g-done { background: color-mix(in srgb, var(--check) 14%, var(--paper)); color: color-mix(in oklab, var(--check) 60%, var(--ink)); }
.chip.g-cancelled { font-style: italic; }
button.chip.pick { font-family: inherit; }
button.chip.pick.on { box-shadow: 0 0 0 2px var(--pine); }
.hero > button.tiny { margin-bottom: 10px; }
ul.cards.queue { gap: 6px; margin-bottom: 8px; }
ul.cards.queue > li { display: block; padding: 0; }
.queue-task.g-blocked { box-shadow: inset 3px 0 0 var(--warn); }
.queue-task.g-doing { box-shadow: inset 3px 0 0 var(--ready); }
.queue-row {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 14px;
  overflow-wrap: anywhere; border-radius: var(--r-ctl); color: inherit; text-decoration: none;
}
a.queue-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
a.queue-row:hover .queue-title { color: var(--accent-ink); text-decoration: underline; }
a.queue-row:focus-visible, .crumbs a:focus-visible, .obj-panel a:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.queue-id { min-width: 44px; }
.queue-title { flex: 1; min-width: 160px; font-weight: 600; }
.queue-task.g-done .queue-title, .queue-task.g-cancelled .queue-title { font-weight: 400; }
.queue-detail {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0;
  padding: 12px 14px 14px; border-top: 1px solid var(--line);
}
.queue-detail dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); line-height: 22px; }
.queue-detail dd { margin: 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.queue-detail dd.meta { white-space: normal; }
@media (max-width: 720px) {
  .queue-detail { grid-template-columns: 1fr; }
  .queue-detail dt { margin-top: 6px; }
}

/* Project page and Task page (pages/projects.js), laid out like Workfront: breadcrumb, header with a type label and a few
   fields, a left panel of sections (folds to a strip; a row of tabs on a phone), the section beside it. */
/* the owner's Task page (pages/task-page.js): the header's title with its timer, and the section's notices */
/* The header, as Workfront's: the type and the title at the left; at the right, on the same line, the named fields. */
.tp-title-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 32px; justify-content: space-between; }
.tp-title { flex: 1 1 300px; min-width: 0; }
.tp-title h1, .tp-title .obj-title-input { min-width: 0; margin-bottom: 0; }
.tp-title-row .timer { margin-top: 0; }
.tp-side { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 26px; }
.tp-pct { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.tp-pct .project-bar { width: 96px; height: 6px; border-radius: 3px; }
/* The Subtasks under Task Details: the list stays in the column beside the panel. */
.tp-subs { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); min-width: 0; }
.tp-subs-list { min-width: 0; }
.tp-new { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; font-size: 13px; font-weight: 600; }
.tp-new-plus { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; line-height: 1; }
.tp-add .addrow { margin: 0; }
.tp-subs-empty { display: grid; gap: 0; }
.tp-subs-start { justify-self: start; padding: 8px 4px; border: 0; background: none; color: var(--accent-ink); font-weight: 600; box-shadow: none; }
.tp-subs-start:hover { background: none; text-decoration: underline; }
.tp-subs-empty .hint { margin: 0; padding: 44px 0 36px; text-align: center; border-top: 1px solid var(--line); }
.tp-held, .tp-unsaved, .tp-removed, .tp-added { margin: 0 0 10px; }
.tp-deps-note { margin: 0; overflow-wrap: anywhere; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; padding: 0; font-size: 13px; }
.crumbs li { display: flex; align-items: baseline; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.crumbs li + li::before { content: "›"; color: var(--muted); margin-right: 2px; }
/* A plain link in a page ("Back to Inbox", a header's Mission link) takes the Theme's link colour, never the browser's blue. */
:where(main) a:where(:not([class])) { color: var(--accent-ink); }
.crumbs a { color: var(--accent-ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs a[aria-current="page"] { color: var(--ink); font-style: italic; }
.crumb-type, .obj-type, .obj-field-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.obj-head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.obj-head h1 { font: 500 34px/1.15 var(--font-display); margin: 2px 0 12px; overflow-wrap: anywhere; }
.obj-id { font-size: 0.6em; color: var(--muted); vertical-align: middle; }
.obj-fields { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.obj-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.obj-field-value { font-weight: 600; overflow-wrap: anywhere; }
.obj-done { display: inline-flex; align-items: center; gap: 8px; }
.obj-done .project-bar { width: 90px; }
.obj-page { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.obj-page:has(> .obj-panel.closed) { grid-template-columns: 40px minmax(0, 1fr); }
.obj-panel { position: sticky; top: 16px; border-right: 1px solid var(--line); padding-right: 12px; min-width: 0; }
.obj-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.obj-panel-title { font-weight: 700; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-panel-toggle { flex: none; width: 28px; height: 28px; font-size: 15px; background: none; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); color: var(--ink); }
.obj-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.obj-panel a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; font-weight: 500;
}
.obj-panel a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.obj-panel a.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.obj-panel em {
  font-style: normal; font-family: "Spline Sans Mono", monospace; font-size: 11px;
  background: color-mix(in srgb, var(--ink) 12%, transparent); border-radius: 10px; padding: 0 7px;
}
.obj-panel a.on em { background: var(--on-accent); color: var(--accent); }
.obj-panel.closed { padding-right: 6px; }
.obj-panel.closed .obj-panel-title, .obj-panel.closed ul { display: none; }
.obj-section .queue-detail { border-top: 0; padding: 0; }
/* A list on an object page: the panel floats, the list's tools sit beside it, and the table, board or timeline clears it and
   takes the page's full width (no dead column under the panel). Lists and their parts are blocks here, not flex or grid
   boxes, since those would sit beside the float as a whole; their gaps become margins. */
.obj-page:has(> .obj-body > .obj-section > .ulist) { display: block; }
.obj-page:has(> .obj-body > .obj-section > .ulist) > .obj-panel { float: left; width: 200px; margin-right: 24px; box-sizing: border-box; }
.obj-page:has(> .obj-body > .obj-section > .ulist) > .obj-panel.closed { width: 40px; }
.obj-page:has(> .obj-body > .obj-section > .ulist)::after { content: ''; display: block; clear: both; }
.obj-body > .obj-section > .ulist, .obj-body > .obj-section > .ulist > .lb, .obj-body > .obj-section > .ulist > .lt { display: block; }
.obj-body > .obj-section > .ulist > * + *, .obj-body > .obj-section > .ulist > .lb > * + *, .obj-body > .obj-section > .ulist > .lt > * + * { margin-top: 10px; }
.obj-body > .obj-section > .ulist > .ult-frame, .obj-body > .obj-section > .ulist > .lb > .lb-board,
.obj-body > .obj-section > .ulist > .lt > .lt-scroll { clear: left; }
.obj-files { list-style: none; margin: 0; padding: 0; }
.obj-files li { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .obj-head h1 { font-size: 26px; }
  .obj-fields { gap: 10px 18px; }
  .obj-page, .obj-page:has(> .obj-panel.closed) { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* A phone: the sections are a row of tabs that scrolls sideways; nothing to fold. */
  .obj-panel { position: static; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
  .obj-page:has(> .obj-body > .obj-section > .ulist) > .obj-panel, .obj-page:has(> .obj-body > .obj-section > .ulist) > .obj-panel.closed { float: none; width: auto; margin: 0 0 14px; }
  .obj-panel-head { display: none; }
  .obj-panel.closed ul { display: flex; }
  .obj-panel ul { flex-direction: row; overflow-x: auto; gap: 4px; }
  .obj-panel a { white-space: nowrap; padding: 8px 10px; }
}

/* editor */
.editor {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 14px; margin: 8px 0; display: flex; flex-direction: column; gap: 10px;
}
.editor .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.editor label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }

/* thread */
.thread { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.thread-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
label.thread-toggle { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); display: flex; }
.thread .hint { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.thread-older { align-self: center; }
ul.thread-list, ul.thread-replies { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
ul.thread-replies { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); }
.thread-list li { min-width: 0; margin: 0; }
.thread-change { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.thread-update { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.thread-head { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; overflow-wrap: anywhere; }
.thread-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-compose { display: flex; flex-direction: column; gap: 6px; }
.thread-pane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.thread [hidden] { display: none; }
.thread-tabs { display: flex; gap: 4px; }
.thread-tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 6px 10px; font-weight: 700; color: var(--muted); cursor: var(--cur-pointer, pointer); }
.thread-tab[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--pine); }
.thread-toggles { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.thread-label { color: var(--accent-ink); font-weight: 700; font-size: 13px; }

/* ==== list displays: Columns board (pages/list-board.js) and Timeline (pages/list-timeline.js) ====
   Laid out like Workfront's board and timeline, drawn with Mission Tasks tokens. Each scrolls inside itself, never the
   page: the board sideways (columns down inside themselves), the timeline both ways with a sticky name column. */
.lb, .lt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lb-bar, .lt-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lb-by, .lt-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.lb-by .ctl-select, .lt-pick .ctl-select { min-width: 140px; }
.lb-board {
  display: flex; gap: 12px; align-items: stretch; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  height: min(72vh, 760px); padding: 2px 2px 10px; scroll-snap-type: x proximity;
}
.lb-board.dragging { scroll-snap-type: none; } /* a held card scrolls the board freely */
.lb-board:focus-visible, .lt-scroll:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.lb-col {
  flex: 0 0 272px; display: flex; flex-direction: column; min-height: 0; scroll-snap-align: start;
  background: color-mix(in srgb, var(--panel) 70%, var(--solid)); border: 1px solid var(--line); border-radius: var(--r-ctl);
}
.lb-col.drop-over { border-color: var(--pine); box-shadow: 0 0 0 2px var(--pine-soft); }
.lb-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.lb-head h3 { flex: 1; min-width: 0; margin: 0; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-size: 12px; font-weight: 500; color: var(--ink-dim); padding: 0 8px; border-radius: 999px; background: var(--tag-bg); }
.lb-fold.tiny { padding: 0 8px; font-size: 14px; line-height: 22px; }
.lb-step button { padding: 3px 9px; font-size: 12px; }
.lb-col.is-now { border-color: var(--pine); }
.lb-col.is-now .lb-head { background: var(--pine-soft); border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
.lb-col.is-now .lb-name { color: var(--accent-ink); }
/* Folded columns: a shelf of chips above the board (name and count). A press unfolds one; a card can be dropped on it. */
.lb-shelf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lb-shelf-label { font-size: 12px; margin-right: 2px; }
.lb-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 6px 4px 12px; font-size: 13px;
  border: 1px dashed var(--ctl-line); border-radius: 999px; background: var(--solid); color: var(--ink);
  transition: transform 140ms var(--ease), border-color 140ms var(--ease), background 140ms var(--ease);
}
.lb-chip:hover { border-style: solid; border-color: var(--pine); background: var(--pine-soft); transform: translateY(-1px); }
.lb-chip:active { transform: scale(0.97); }
.lb-chip.drop-over { border-style: solid; border-color: var(--pine); box-shadow: 0 0 0 2px var(--pine-soft); transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .lb-chip { transition: none; } .lb-chip:hover, .lb-chip:active, .lb-chip.drop-over { transform: none; } }
.lb-cards { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior-y: contain; }
.lb-card {
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere;
}
.lb-card.movable { cursor: var(--cur-grab, grab); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lb-card.dragging { opacity: 0.35; } /* the place a held card left */
.lb-card.landing { opacity: 0; } /* where it lands: unseen until its ghost is there */
/* The card in hand: a copy on <body> (list-board.js makes and moves it), above the page, so no column clips it. It lifts,
   follows the pointer, then flies to its place (.fly) or into a column that does not show it (.into). */
.lb-ghost { position: fixed; left: 0; top: 0; z-index: 1000; margin: 0; padding: 0; list-style: none; pointer-events: none; will-change: transform; }
.lb-ghost > .lb-card { height: 100%; box-shadow: var(--shadow); transition: transform 140ms var(--ease), box-shadow 140ms var(--ease); }
.lb-ghost.up > .lb-card { transform: rotate(2deg) scale(1.03); border-color: var(--pine); box-shadow: var(--shadow), 0 0 0 2px var(--pine-soft); }
.lb-ghost.fly { transition: transform 220ms var(--ease), opacity 220ms var(--ease); }
.lb-ghost.into { opacity: 0; }
/* While a thing is in hand (press-drag.js: a board card, a menu page) every cursor is the closed hand: each kind's variable is pointed at it (on body: cursor.js writes its
   own on html). */
html.is-dragging body {
  --cur-default: var(--cur-grabbing, grabbing); --cur-pointer: var(--cur-grabbing, grabbing); --cur-text: var(--cur-grabbing, grabbing);
  --cur-grab: var(--cur-grabbing, grabbing);
  cursor: var(--cur-default, auto); user-select: none; -webkit-user-select: none;
}
@media (prefers-reduced-motion: reduce) {
  .lb-ghost > .lb-card, .lb-ghost.fly { transition: none; }
}
.lb-card:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.lb-top { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.lb-top > .ul-done { flex: 0 0 auto; margin-top: 1px; }
.lb-title { font-weight: 600; color: var(--ink); text-decoration: none; }
/* A card of a row that is done (a closed Task): its title struck through. */
.lb-card.is-done .lb-title, .lb-card:has(.ul-row-done:checked) .lb-title { color: var(--ink-dim); text-decoration: line-through; }
.lb-card.is-done .lb-lines { opacity: 0.7; }
a.lb-title:hover { color: var(--accent-ink); text-decoration: underline; }
a.lb-title:focus-visible, .lt-name a:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; border-radius: 4px; }
.lb-lines { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.lb-line { display: grid; grid-template-columns: minmax(64px, max-content) 1fr; gap: 8px; align-items: baseline; }
.lb-line dt { color: var(--ink-dim); }
.lb-line dd { margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; color: var(--ink); }
/* A card stays short: its title and each text value (a long Description) are cut after 3 lines, with "…". */
.lb-title, .lb-line dd.lb-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.lb-move .ctl-select-btn { padding: 2px 10px; font-size: 12px; color: var(--ink-dim); }
.lb-cards:empty { flex: 0 0 auto; padding: 0; }
.lb-all { margin: 0 8px 8px; }
.lb-empty { margin: 4px 14px 12px; }
.lb-none, .lt-none { padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-ctl); }

.lt-nav { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lt-step.tiny { padding: 2px 8px; }
.lt-label { font-size: 14px; color: var(--ink); margin-left: 4px; }
.lt-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-dim); }
.lt-read { margin: 0; font-size: 13px; min-height: 1.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-foot { margin: 0; font-size: 12px; }
.lt {
  --lt-label: 240px; --lt-lane: 34px;
}
.lt-scroll {
  overflow: auto; max-height: min(70vh, 720px); overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--solid);
}
.lt-grid { position: relative; width: calc(var(--lt-label) + var(--lt-w)); min-width: 100%; }
.lt-head, .lt-lane { display: grid; grid-template-columns: var(--lt-label) var(--lt-w); }
.lt-head { position: sticky; top: 0; z-index: 3; height: 32px; background: var(--solid); border-bottom: 1px solid var(--line); }
.lt-corner, .lt-name, .lt-group .lt-fold {
  position: sticky; left: 0; z-index: 2; background: var(--solid); border-right: 1px solid var(--line);
  padding: 0 10px; display: flex; align-items: center; min-width: 0;
}
.lt-corner { font-size: 12px; font-weight: 700; color: var(--ink-dim); z-index: 4; }
.lt-ticks { position: relative; overflow: hidden; }
.lt-tick { position: absolute; top: 0; bottom: 0; padding: 0 4px; display: flex; align-items: center; font-size: 11px; color: var(--ink-dim); white-space: nowrap; border-left: 1px solid var(--line); }
.lt-layer { position: absolute; top: 32px; bottom: 0; left: var(--lt-label); width: var(--lt-w); pointer-events: none; z-index: 0; }
.lt-weekend { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.lt-rule { position: absolute; top: 0; bottom: 0; border-left: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
.lt-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--warn); }
.lt-lane { height: var(--lt-lane); border-bottom: 1px solid color-mix(in srgb, var(--rule) 50%, transparent); position: relative; }
.lt-name { padding-left: calc(10px + var(--lt-depth, 0) * 14px); font-size: 13px; overflow: hidden; }
.lt-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-name a { color: var(--ink); text-decoration: none; }
.lt-name a:hover { color: var(--accent-ink); text-decoration: underline; }
.lt-track { position: relative; z-index: 1; }
.lt-group { background: color-mix(in srgb, var(--panel) 80%, var(--solid)); }
.lt-group .lt-fold {
  border: 0; border-right: 1px solid var(--line); border-radius: 0; height: 100%; width: 100%; gap: 6px; font-size: 13px; text-align: left;
  padding-left: calc(10px + var(--lt-depth, 0) * 14px); background: color-mix(in srgb, var(--panel) 80%, var(--solid));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lt-group .lt-fold:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.lt-bar, .lt-mark {
  position: absolute; top: 6px; height: calc(var(--lt-lane) - 13px); display: flex; align-items: center;
  font-size: 12px; text-decoration: none; color: var(--on-accent); cursor: var(--cur-pointer, pointer);
}
.lt-bar { min-width: 6px; border-radius: 6px; background: var(--accent); overflow: hidden; padding: 0 6px; }
.lt-bar .lt-bar-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lt-bar.clip-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.lt-bar.clip-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.lt-bar.clip-l::before { content: "◂"; margin-right: 4px; flex: none; } /* runs on before the window */
.lt-bar.clip-r::after { content: "▸"; margin-left: auto; padding-left: 4px; flex: none; } /* runs on past it */
.lt-mark { width: 0; color: var(--ink); }
.lt-mark::before {
  content: ""; position: absolute; left: -7px; width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--accent); border: 1px solid var(--on-accent); border-radius: 2px;
}
.lt-mark .lt-bar-text { position: absolute; left: 12px; white-space: nowrap; font-size: 12px; color: var(--ink); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.lt-bar:hover, .lt-bar:focus-visible { background: color-mix(in srgb, var(--accent) 82%, var(--ink)); }
.lt-bar:focus-visible, .lt-mark:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; z-index: 2; }
/* bars that can be dragged (onDates): the bar moves both dates, a grab edge on each end changes one; a tag reads the new dates */
.lt-bar.movable, .lt-mark.movable { cursor: var(--cur-grab, grab); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.lt-grip { position: absolute; top: 0; bottom: 0; width: min(6px, 25%); } /* shows the bar's grab hand (tests/cursor.test.mjs allows no ew-resize) */
.lt-bar.movable:hover .lt-grip { background: color-mix(in srgb, var(--on-accent) 22%, transparent); }
.lt-grip-l { left: 0; }
.lt-grip-r { right: 0; }
.lt-bar .lt-grip:hover, .lt-bar.dragging .lt-grip { background: color-mix(in srgb, var(--on-accent) 45%, transparent); }
.lt-mark .lt-grip { width: 6px; border-radius: 3px; }
.lt-mark .lt-grip-l { left: -15px; }
.lt-mark .lt-grip-r { left: 9px; right: auto; }
.lt-mark .lt-grip:hover { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.lt-bar.dragging, .lt-mark.dragging { z-index: 2; }
.lt-bar.dragging { box-shadow: var(--shadow), 0 0 0 2px var(--pine-soft); }
.lt-tag {
  position: absolute; top: 5px; z-index: 3; margin: 0 6px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--solid); color: var(--ink); font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; pointer-events: none;
}
.lt-empty { margin: 0; padding: 14px calc(var(--lt-label) + 14px); position: relative; z-index: 1; }
@media (max-width: 720px) {
  .lb-board { scroll-snap-type: x mandatory; height: min(70vh, 640px); }
  .lb-col { flex-basis: calc(100% - 28px); }
  .lt { --lt-label: 128px; }
  .lb-by .ctl-select, .lt-pick .ctl-select { min-width: 120px; }
}
/* ==== /list displays ==== */
/* interview chat */
.chat p { margin: 4px 0; padding: 8px 12px; border-radius: var(--r-ctl); max-width: 85%; white-space: pre-wrap; }
.chat p.user { background: var(--pine-soft); align-self: flex-end; }
.chat p.assistant { background: var(--panel); align-self: flex-start; }

/* missions */
li.mission .star { border: none; background: none; font-size: 18px; padding: 0 4px; color: var(--ink-dim); }
li.mission .star.on { color: var(--accent-ink); }
li.mission.focused { border-color: var(--pine); }

/* settings: group tabs wrap onto more lines on a narrow screen, never scroll sideways */
.editor label.settings-check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
/* Settings -> Menu: one row a page, its switch on the left, Up and Down on the right */
.menu-set { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.menu-set > li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--solid); }
.menu-set .settings-check { flex: 1; min-width: 0; min-height: 30px; }
.menu-set .ult-icon { width: 18px; height: 18px; stroke-width: 1.75; }
.notify-state { margin: 0; }
.notify-state:focus { outline: none; } /* takes focus only so a keyboard stays near when Allow goes; nobody tabs to it */
.replan-line { flex-wrap: wrap; }
.replan-line > button { flex: none; } /* the text beside it wraps, not the button */
.replan-line > span { flex: 1 1 180px; min-width: 0; } /* never a thin column: Look again drops to its own line */

/* The Approve screen (replan-review.js). A plan's words can be long or hold anything: they wrap, and never widen the page. */
.review { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); min-width: 0; }
.review p { margin: 0; }
.review-text { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.review-h { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.review-h:focus { outline: none; }
.review-h:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.review-item { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); min-width: 0; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.review-title { flex: 1 1 180px; font-size: 14px; color: var(--ink); }
.review-item[data-off="true"] > .review-head > .review-title { color: var(--muted); text-decoration: line-through; }
.review-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; flex: none; }
.review-seg button { padding: 4px 10px; font-size: 13px; color: var(--muted); }
.review-seg button[aria-pressed="true"] { background: var(--solid); color: var(--ink); border-color: var(--ink-dim); }
.review-events { margin-top: 4px; }
.review-fields { margin: 2px 0 0; display: grid; gap: 4px; font-size: 13px; }
.review-fields dt { color: var(--muted); font-size: 12px; }
.review-fields dd { margin: 0; color: var(--ink); }
.review-foot { flex-wrap: wrap; align-items: center; gap: 8px; }
.review-foot > span { flex: 1 1 160px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 10px 0; }
.sw-btn {
  display: grid; gap: 6px; justify-items: center; font-size: 12px; font-weight: 500; color: var(--ink-dim);
  padding: 8px 4px; border: 0; border-radius: var(--r-ctl); background: none;
}
.sw-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.sw-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); font-weight: 700; }
/* a swatch has its own data-theme, so it reads the raw tokens (--land-*, --rule), never the aliases above */
.swatch { position: relative; width: 78px; height: 52px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, var(--land-sky-top), var(--land-sky-bot)); border: 1px solid var(--rule); }
.swatch::before { content: ""; position: absolute; left: 62%; top: 14%; width: 12px; height: 12px; border-radius: 50%; background: var(--land-sun); box-shadow: 0 0 10px var(--land-glow); }
.swatch::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 70%; border-radius: 50% 50% 0 0; background: var(--land-near); box-shadow: 30px -8px 0 -4px var(--land-mid), -28px 6px 0 -2px var(--land-far); }
.swatch i { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 22%; background: var(--land-fore); }
.swatch[data-theme^="plain"] { background: var(--bg); }
.swatch[data-theme^="plain"]::before, .swatch[data-theme^="plain"] i { display: none; }
.swatch[data-theme^="plain"]::after { left: 16%; right: 16%; top: 22%; bottom: 22%; height: auto; border-radius: 6px; background: var(--paper); border: 1px solid var(--rule); box-shadow: none; }

/* Dashboards: Recipe cards. Opaque on purpose: chart colours are checked against --solid. */
.recipe-group h2 { margin: 18px 0 8px; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
ul.recipes { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 14px; }
/* anywhere: a Recipe's text is untrusted and can be one very long word. Tables opt out: they scroll inside their card. */
.recipe { background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 14px 16px; min-width: 0; overflow-wrap: anywhere; }
.hint.recipe-partial { color: var(--warn-ink); }
.recipe-head { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.recipe-head h3 { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 600; }
.recipe-head button { flex: none; }
.recipe-caption { margin: 0 0 8px; font-size: 13px; color: var(--ink-dim); }
.recipe-chart { width: 100%; }
.recipe-legend { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink); }
.recipe-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.recipe-key { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--key); }
.recipe-key.line { width: 14px; height: 2px; border-radius: 1px; }
.recipe-frames { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.recipe-frames input { flex: 1; min-width: 60px; }
.recipe-frame-label { flex: none; min-width: 84px; text-align: right; font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.recipe-foot { margin: 6px 0 0; }
.recipe-table-wrap { overflow: auto; max-height: 480px; contain: inline-size; } /* contain: a wide table can't widen the page; a long one scrolls in its card */
.recipe-table { width: 100%; border-collapse: collapse; font-size: 13px; overflow-wrap: normal; } /* wide tables scroll inside their card */
.recipe-table th { text-align: left; font-weight: 600; color: var(--ink-dim); }
.recipe-table th, .recipe-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.recipe-table .num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.ds-report-body { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; } /* the report's paragraphs, as written */
/* a number Recipe: one big figure */
.recipe-number { padding: 6px 0 2px; }
.recipe-number-value { margin: 0 0 4px; font: 600 44px/1.1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }

/* Reports: the gallery, and the editor (steps or JSON beside a live preview) */
.reports > .row { margin-bottom: 14px; }
.report-row-acts { display: inline-flex; gap: 6px; }
.report-page h1 { min-width: 0; overflow-wrap: anywhere; }
.report-about { margin: 0 0 12px; }
/* A fixed layer leaves the measured slot in the grid, so neighbours never move. */
.report-gallery { margin-top: 16px; }
.report-search { width: min(100%, 480px); margin-bottom: 18px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; align-items: stretch; }
.report-slot { min-width: 0; }
.report-card { box-sizing: border-box; height: 100%; display: flex; flex-direction: column; padding: 18px; background: var(--solid); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-ctl); overflow-wrap: anywhere; cursor: var(--cur-pointer, pointer); }
.report-card h2 { margin: 0 0 8px; padding: 0; border: 0; font: 600 18px/1.3 var(--font-body); letter-spacing: normal; text-transform: none; color: var(--ink); }
.report-card h2 a { color: var(--ink); text-decoration: none; }
.report-card:hover h2 a, .report-card h2 a:hover { text-decoration: underline; }
.report-card h2 a:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }
.report-description { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-card-kind { margin: 0 0 10px; }
.report-chips { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.report-chips-name { flex: none; min-width: 5.5em; color: var(--muted); font-size: 12px; }
.report-chip { padding: 3px 7px; border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--pine-soft); color: var(--ink-dim); font-size: 12px; }
.report-card-columns { flex: 1 1 0; min-width: 0; color: var(--ink-dim); font-size: 13px; }
.report-card .report-row-acts { flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
/* Enlarged: in the top layer (reports.js), placed over its slot by report-model.js expandedSpot. */
.report-card.is-expanded { position: fixed; inset: auto; margin: 0; height: auto; overflow: auto; box-shadow: var(--shadow); }
.report-card.is-expanded .report-row-acts { margin-top: 0; }
.report-card-preview { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); pointer-events: none; }
.report-card-preview .recipe-foot, .report-card-preview .recipe-frames { display: none; }
.report-card-preview .recipe-table-wrap { overflow: hidden; }
.report-fields .report-description-field { flex-basis: 100%; }
.report-description-field textarea { width: 100%; resize: vertical; }
@media (prefers-reduced-motion: no-preference) {
  .report-card.is-expanded { animation: report-expand 120ms ease-out; }
  @keyframes report-expand { from { opacity: 0.85; } to { opacity: 1; } }
}
.report-edit-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.report-edit-head h1 { flex: 1 1 10em; margin: 0; font: 500 30px/1.15 var(--font-display); }
.report-edit-acts { margin: 0; gap: 8px; }
.report-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.report-build { min-width: 0; }
.report-preview { position: sticky; top: 12px; min-width: 0; }
.report-preview h2 { margin: 6px 0 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.report-tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--rule); }
.report-tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 6px 12px; font-weight: 700; color: var(--muted); cursor: var(--cur-pointer, pointer); }
.report-tab[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--pine); }
.report-steps { display: flex; flex-direction: column; gap: 10px; }
.report-step { margin: 0; min-width: 0; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 14px 12px; }
.report-step legend { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-weight: 700; color: var(--ink); }
.report-step-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--pine-soft); color: var(--accent-ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.report-step .hint { margin: 2px 0 8px; font-size: 13px; }
.report-step .hint.err { margin: 6px 0 0; }
.report-fields, .report-axes { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.report-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-dim); min-width: 0; }
.report-fields .report-field { flex: 1 1 200px; }
.report-field input[type="text"] { width: 100%; }
.report-sub { margin: 4px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-dim); }
.report-filter-list + .report-filter-list { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); }
.report-filter { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 8px; }
.report-filter-acts, .report-group-acts { display: flex; gap: 6px; margin-left: auto; }
.report-value { min-width: 0; flex: 1 1 140px; }
.report-values, .report-columns { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.report-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.report-groups { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.report-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.report-group-name { font-weight: 600; min-width: 90px; }
.report-measure, .report-sort { margin: 0 0 8px; gap: 8px; flex-wrap: wrap; }
.report-limit { margin-top: 4px; max-width: 200px; }
.report-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.report-choices button[aria-pressed="true"] { background: linear-gradient(var(--pine-soft), var(--pine-soft)), var(--paper); color: var(--accent-ink); border-color: var(--pine); }
.report-json-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.report-json-label { display: block; font-size: 13px; color: var(--ink-dim); }
.report-json-keys { white-space: nowrap; }
.report-code { min-width: 0; }
.report-code .cm-editor { font-size: 13px; min-height: 380px; }
.report-code .cm-scroller { min-height: 380px; }
.report-code-wait { margin: 0; padding: 10px; border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--code-bg); min-height: 380px; }
.report-json { font-family: "Spline Sans Mono", monospace; font-size: 13px; line-height: 1.5; min-height: 380px; tab-size: 2; white-space: pre; overflow: auto; }
.report-json[aria-invalid="true"] { border-color: var(--warn-ink); }
.report-problems { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.report-problem { width: 100%; text-align: left; border-radius: var(--r-ctl); padding: 6px 10px; font-weight: 500; color: var(--warn-ink); display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.report-where { font-family: "Spline Sans Mono", monospace; font-size: 12px; color: var(--ink-dim); }
@media (max-width: 720px) {
  .report-edit { grid-template-columns: 1fr; }
  .report-preview { position: static; }
  .report-edit-head h1 { font-size: 26px; }
  .report-filter-acts, .report-group-acts { margin-left: 0; }
  .report-field input[type="text"], .report-value, .report-json { font-size: 16px; } /* 16px: a phone browser zooms in on anything smaller */
  .report-json { min-height: 300px; }
  .report-code .cm-editor { font-size: 16px; min-height: 300px; }
  .report-code .cm-scroller { min-height: 300px; }
  .report-code-wait { min-height: 300px; }
}

@media (hover: none) {
  :root { --timer-tool: 44px; }
  .timer-bar button, .timer-dialog button, .timer-dialog input { min-height: 44px; }
  .display-panel button { min-height: 44px; }
  .review button, .replan-line > button { min-height: 44px; }
}
@media (max-width: 720px) {
  .shell, .shell.nav-open { grid-template-columns: minmax(0, 1fr); align-content: start; }
  /* The menu folds: .side-wrap's one row goes from 0fr to 1fr, and the closed menu gives up its own top and bottom room. */
  .side-wrap { display: grid; grid-template-rows: 0fr; }
  .shell.nav-open .side-wrap { grid-template-rows: 1fr; }
  .side {
    position: static; width: auto; min-width: 0; max-width: none; height: auto; min-height: 0; overflow: hidden; flex-direction: row; flex-wrap: wrap; align-items: center;
    margin: 8px 8px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card);
  }
  .shell:not(.nav-open) .side { transform: none; z-index: auto; margin-top: 0; padding-block: 0; border-block-width: 0; }
  .shell:not(.nav-open) > main { margin-top: 62px; }
  /* the open menu is a block at the top of the page: its own controls have the top right, so Activity and Recents wait under it */
  .shell.nav-open > .top-tools { display: none; }
  .shell.nav-open > main { margin-top: 8px; }
  main { margin: 8px; width: auto; justify-self: stretch; padding: 20px 16px max(60px, calc(var(--music-room, 0px) + 24px)); }
  .hero h1 { font-size: 34px; }
  .display-field .ctl-select-btn { font-size: 16px; } /* 16px: a phone browser zooms in on anything smaller */
  .auth { margin: 10vh 16px; max-width: none; }
}
/* A phone folds the menu instead of sliding it. */
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .side-wrap { transition: grid-template-rows 240ms var(--ease); }
  .side { transition: margin-top 240ms var(--ease), padding 240ms var(--ease), border-width 240ms var(--ease), visibility 0s; }
  .shell:not(.nav-open) .side { transition: margin-top 240ms var(--ease), padding 240ms var(--ease), border-width 240ms var(--ease), visibility 0s linear 240ms; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .sw-btn { transition: background 160ms, border-color 160ms, transform 120ms; }
  button:active { transform: scale(0.97); }
}

/* ---------- Your image (pages/own-image.js): Settings -> Appearance. One block; tokens only. ---------- */
.own-image h3 { font-size: 15px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.own-image-body { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; }
/* The preview is shaped like the screen (width and aspect-ratio set by the page) and shows the picture as the background does. */
.own-image-preview { flex: none; max-width: 100%; overflow: hidden; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--solid); }
.own-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.own-image-preview.adjust { cursor: var(--cur-grab, grab); touch-action: none; }
.own-image-preview.adjust:active { cursor: var(--cur-grabbing, grabbing); }
.own-image-preview.adjust:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.own-image-empty { display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.own-image-zoom { align-items: center; }
.own-image-zoom input { flex: 1 1 120px; min-width: 0; }
.own-image-side { flex: 1 1 220px; min-width: 0; }
.own-image-side > .dimtext { margin: 0; }
.own-image-acts { flex-wrap: wrap; }
.own-image .hint { margin: 0; min-height: 1.5em; overflow-wrap: anywhere; }
@media (hover: none) { .own-image-acts button { min-height: 44px; } }

/* ---------- Pickers (pages/controls.js, #73): the app's own Select, date, time and number fields. Tokens only, so every
   Theme (and Zen, through its token map) draws them. Lists and the calendar are popovers in the top layer: --solid under
   --ink, the active row --selection, headings --ink-dim (all 4.5:1, tests/themes.test.mjs). ---------- */
.ctl-select { display: inline-flex; max-width: 100%; min-width: 0; }
.ctl-select-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; max-width: 100%;
  font-weight: 500; text-align: left; border-radius: var(--r-btn); padding: 6px 10px 6px 12px;
}
.ctl-select .ctl-select-btn { flex: 1 1 auto; }
.ctl-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ctl-chevron { flex: none; color: var(--ink-dim); }
.ctl-select-btn[aria-expanded="true"] { border-color: var(--pine); }
.ctl-select-btn[aria-expanded="true"] .ctl-chevron { transform: rotate(180deg); }
/* Typeahead: chips and a text box inside one field-looking box; the box grows to fit, wrapping chips */
.ctl-ta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 180px; max-width: 100%; padding: 4px 8px; cursor: var(--cur-text, text); }
.ctl-ta.open, .ctl-ta:focus-within { border-color: var(--pine); }
.ctl-ta .ctl-ta-input { flex: 1 1 80px; min-width: 80px; border: 0; background: transparent; padding: 2px 4px; }
.ctl-ta .ctl-ta-input:focus { outline: none; }
.ctl-chip { display: inline-flex; align-items: center; gap: 2px; padding-right: 4px; font-size: 13px; min-width: 0; max-width: 100%; }
.ctl-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* one value: the box stays one line high. A long name's chip shrinks (…) and the text box keeps its place beside it. */
.ctl-ta.single { flex-wrap: nowrap; }
.ctl-ta.single > .ctl-chip { flex: 0 1 auto; }
.ctl-chip-x { border: 0; background: transparent; padding: 0 4px; line-height: 1; font-size: 14px; color: var(--tag-ink); border-radius: 999px; cursor: var(--cur-pointer, pointer); }
.ctl-chip-x:hover { background: var(--selection); }
.ctl-pop {
  position: fixed; inset: auto; margin: 0; z-index: 1000; box-sizing: border-box;
  min-width: 160px; max-height: min(360px, calc(100dvh - 16px)); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop);
  box-shadow: var(--shadow); font: 400 14px/1.4 var(--font-body); text-align: left; text-transform: none; letter-spacing: 0;
}
.ctl-pop [role="listbox"]:focus { outline: none; }
.ctl-opt {
  position: relative; padding: 8px 12px 8px 30px; border-radius: var(--r-badge); cursor: var(--cur-pointer, pointer);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none;
}
.ctl-opt[data-active="true"] { background: var(--selection); }
.ctl-opt[aria-selected="true"] { font-weight: 600; }
.ctl-opt[aria-selected="true"]::before { content: "\2713"; position: absolute; left: 11px; color: var(--ink); }
.ctl-opt[aria-disabled="true"] { color: var(--ink-dim); cursor: var(--cur-blocked, not-allowed); }
.ctl-group { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); user-select: none; }
.ctl-group:not(:first-child) { margin-top: 6px; border-top: 1px solid var(--line); }
/* a phone: the list or calendar comes up from the bottom, over a scrim */
.ctl-pop.ctl-sheet {
  left: 0; right: 0; bottom: 0; top: auto; width: auto; min-width: 0; max-width: none; max-height: 70dvh;
  padding: 8px 8px max(12px, env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: var(--r-card) var(--r-card) 0 0;
  font-size: 16px;
}
.ctl-pop.ctl-sheet::backdrop { background: var(--timer-scrim); }
.ctl-sheet-title { padding: 6px 12px 8px; font-size: 13px; font-weight: 600; color: var(--ink-dim); }
.ctl-sheet .ctl-opt { display: flex; align-items: center; min-height: 44px; }
/* date and time: a text box with a calendar or clock button inside its right end */
.ctl-date, .ctl-time { position: relative; display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
.ctl-date-input { width: 100%; min-width: 0; padding-right: 40px; font-variant-numeric: tabular-nums; }
.ctl-date { width: 11.5em; }
.ctl-time { width: 7.5em; }
.ctl-date-input[aria-invalid="true"] { border-color: var(--warn-ink); outline-color: var(--warn-ink); }
.ctl-date-btn {
  position: absolute; right: 3px; top: 50%; translate: 0 -50%; display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--r-badge); background: none; color: var(--ink-dim);
}
.ctl-date-btn:hover, .ctl-date-btn[aria-expanded="true"] { color: var(--ink); background: var(--selection); }
.ctl-cal { width: 300px; padding: 10px; }
.ctl-cal.ctl-sheet { width: auto; }
.ctl-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ctl-cal-title { font-weight: 600; }
.ctl-icon { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; font-size: 18px; line-height: 1; }
.ctl-icon:disabled { cursor: var(--cur-default, default); }
.ctl-cal-grid { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; } /* separate: a collapsed cell drops its round border */
.ctl-cal-grid th { padding: 2px 0 4px; font-size: 12px; font-weight: 600; color: var(--ink-dim); text-align: center; }
.ctl-day {
  height: 36px; text-align: center; border-radius: 50%; cursor: var(--cur-pointer, pointer); font-variant-numeric: tabular-nums;
  border: 2px solid transparent; background-clip: padding-box;
}
.ctl-day.out { color: var(--ink-dim); }
.ctl-day:hover { background-color: var(--selection); }
.ctl-day[aria-current="date"] { border-color: var(--line); font-weight: 700; }
.ctl-day[aria-selected="true"] { background-color: var(--selection); border-color: var(--pine); font-weight: 700; color: var(--ink); }
.ctl-day:focus { outline: 2px solid var(--pine); outline-offset: -2px; }
.ctl-cal-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
/* number: the OS's spin arrows hidden; − and + either side */
.ctl-num { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.ctl-num input { width: 5.5em; min-width: 0; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.ctl-num input::-webkit-inner-spin-button, .ctl-num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ctl-num .ctl-icon { flex: none; width: 30px; height: 30px; font-size: 16px; }
.editor label .ctl-num, .editor label .ctl-date, .editor label .ctl-time { align-self: flex-start; }
/* the range slider (Dashboards' time step): a Theme track and thumb */
input[type="range"] {
  appearance: none; -webkit-appearance: none; height: 22px; padding: 0; border: 0; background: transparent; cursor: var(--cur-pointer, pointer);
}
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--timer-track); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--timer-track); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%;
  background: var(--pine); border: 2px solid var(--solid); box-shadow: var(--shadow);
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--pine); border: 2px solid var(--solid); }
input[type="range"]:focus { outline: none; }
input[type="range"]:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 999px; }
@media (hover: none) {
  .ctl-select-btn, .ctl-date-input { min-height: 44px; }
  .ctl-date-btn, .ctl-icon, .ctl-num .ctl-icon { width: 44px; height: 44px; }
  .ctl-date-input { padding-right: 48px; }
  .ctl-day { height: 44px; }
  .ctl-opt { min-height: 44px; display: flex; align-items: center; }
  input[type="checkbox"]::before { content: ""; position: absolute; inset: -13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ctl-chevron { transition: transform 160ms var(--ease); }
  .ctl-pop:popover-open { animation: ctl-in 140ms var(--ease); }
  .ctl-pop.ctl-sheet:popover-open { animation: ctl-up 200ms var(--ease); }
  @keyframes ctl-in { from { opacity: 0; translate: 0 -4px; } }
  @keyframes ctl-up { from { translate: 0 30%; } }
}

/* Mouse cursor (cursor.js): --cur-* are set on <html> when a custom cursor is on; without them the OS cursor shows.
   --cur-blocked is the one for a control that is off (the OS's not-allowed). wait stays the OS one: it means busy, and every OS draws it clearly. */
html { cursor: var(--cur-default, auto); }
a[href], summary, label:has(> input[type="checkbox"]), [role="button"], [role="tab"], [role="option"] { cursor: var(--cur-pointer, pointer); }
input:not([type="checkbox"], [type="radio"], [type="range"], [type="button"], [type="submit"], [type="file"]), textarea, [contenteditable="true"] { cursor: var(--cur-text, text); }
.cursor-picker .chip .cur-icon { width: 20px; height: 20px; margin-right: 6px; vertical-align: -5px; }
.cursor-try { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-ctl); }
.cursor-try-text { flex: 1 1 160px; }
.cursor-try-grab { cursor: var(--cur-grab, grab); user-select: none; }
.cursor-try-grab:active { cursor: var(--cur-grabbing, grabbing); }

/* Universal list (pages/list.js, list-ui-*.js): Workfront's toolbar, panels and table. Theme tokens only. */
.ulist { display: grid; gap: 10px; min-width: 0; }
.ult-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ult-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-left: auto; }
.ult-search { position: relative; display: flex; align-items: center; flex: 1 1 160px; max-width: 240px; }
.ult-search .ult-icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.ult-search input { width: 100%; padding-left: 32px; }
.ult-count { white-space: nowrap; }
.ult-display button { padding: 4px 12px; font-size: 13px; }
.ult-tools { display: flex; flex-wrap: wrap; gap: 2px; }
/* the toolbar's tools: plain until they hold something (a count, a changed choice), then tinted with a count badge */
.ult-tool { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 13px; font-weight: 500; max-width: 240px;
  border: 1px solid transparent; background: none; color: var(--ink); border-radius: var(--r-btn); }
.ult-tool:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ult-tool[aria-expanded="true"] { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.ult-tool.on { background: var(--pine-soft); color: var(--accent-chip-ink); }
.ult-tool.on:hover, .ult-tool.on[aria-expanded="true"] { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.ult-tool:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.ult-tool-view { font-weight: 600; max-width: 220px; }
.ult-tool-view.on { background: none; color: var(--ink); }
.ult-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px;
  background: var(--accent); color: var(--on-accent, var(--paper)); font: 700 11px/1 var(--font-body); }
.ult-caret { color: var(--muted); }
.ult-tool-v { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ult-dot { position: absolute; top: 2px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--paper); }
.ult-icon { flex: none; }
.ult-summary { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.ult-retry { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ult-empty { padding: 24px 0; display: grid; justify-items: start; gap: 8px; }
.ult-empty .hint { margin: 0; }

/* the table: scrolls sideways inside .ult-wrap; contain keeps it from widening the page. Opaque (--solid) in every Theme: rows read
   over a Theme's scene (Today's clear page). Only the header row (and the footer) stay put; no column is frozen. Its frame is one clear line with a
   soft ring round it; the lines inside are quieter (rows) and quieter still (columns), all mixed from the Theme's ink. */
.ult-wrap { --ult-edge: color-mix(in srgb, var(--ink) 28%, var(--solid)); --ult-rule: color-mix(in srgb, var(--ink) 12%, var(--solid)); --ult-col: color-mix(in srgb, var(--ink) 6%, var(--solid));
  overflow: auto; max-height: 75vh; contain: inline-size; border: 1px solid var(--ult-edge); border-radius: var(--r-ctl); background: var(--solid); scrollbar-width: thin;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 5%, transparent), 0 14px 28px -22px color-mix(in srgb, var(--ink) 60%, transparent); }
.ult-wrap:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.ult { --cy: 9px; --cx: 14px; width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ult th, .ult td { padding: var(--cy) var(--cx); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--ult-rule); border-right: 1px solid var(--ult-col); }
.ult th:last-child, .ult td:last-child { border-right: 0; }
.ult tbody tr:last-child > * { border-bottom: 0; } /* a row's cells sit on one middle line, whatever its tallest cell */
.ult thead th { position: sticky; top: 0; z-index: 2; padding: 0; background: color-mix(in srgb, var(--ink) 5%, var(--solid)); border-bottom-color: var(--ult-edge); border-right-color: var(--ult-rule); font-size: 13px; white-space: nowrap; }
.ult-th-name { overflow: hidden; text-overflow: ellipsis; }
/* a header's right edge: drag to resize the column (list-ui-table.js ResizeHandle) */
.ult-resize { position: absolute; top: 0; right: -4px; bottom: 0; width: 8px; z-index: 2; touch-action: none; cursor: col-resize; }
.ult-resize::after { content: ""; position: absolute; top: 20%; bottom: 20%; left: 3px; width: 2px; border-radius: 1px; background: transparent; transition: background 0.12s var(--ease); }
.ult thead th:hover .ult-resize::after, .ult-resize:focus-visible::after, .ult-resizing .ult-resize::after { background: var(--line); }
.ult-resize:hover::after, .ult-resize:focus-visible::after { background: var(--pine); }
.ult-resize:focus-visible { outline: none; }
/* A column drag selects no text: the press is on the handle, which is not selectable, and list-ui-table.js cancels it.
   No user-select on <html> for .ult-resizing: it reaches every element, so each drag start and end restyled the page. */
.ult-resize { user-select: none; -webkit-user-select: none; }
.ult thead th:last-child .ult-resize { right: 0; }
/* A column's header in hand (column-drag.js; the list's table and a Report's): a copy of it follows the pointer, a line marks where the
   column lands, and the header left behind dims. A press on a header selects no text and, on a touch screen, opens no menu. */
.col-ghost { position: fixed; left: 0; top: 0; z-index: 1000; box-sizing: border-box; display: flex; align-items: center; padding: 0 14px; overflow: hidden; pointer-events: none; will-change: transform;
  border: 1px solid var(--pine); border-radius: var(--r-btn); background: var(--solid); box-shadow: var(--shadow), 0 0 0 2px var(--pine-soft); color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; opacity: 0.94; }
.col-line { position: fixed; left: 0; top: 0; z-index: 1000; width: 2px; border-radius: 1px; background: var(--pine); pointer-events: none; }
.ult th.col-held > .ult-sort, .recipe-table th.col-held { opacity: 0.4; }
th[data-col] { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.recipe-table th[data-col] { cursor: var(--cur-grab, grab); }
.recipe-table th[data-col]:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.ult-th-type { margin-left: auto; padding-left: 10px; color: var(--muted); font-size: 12px; font-weight: 400; opacity: 0.8; }
.ult-sort { display: flex; align-items: center; gap: 4px; width: 100%; padding: 9px var(--cx); border: 0; border-radius: 0; background: none; color: var(--ink-dim); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-align: left; }
.ult-sort:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.ult-sort:focus-visible, .ult-fold:focus-visible, .ult-link:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.ult-arrow { color: var(--accent-ink); font-family: "Spline Sans Mono", monospace; font-size: 11px; }
th[aria-sort="ascending"] .ult-sort, th[aria-sort="descending"] .ult-sort { color: var(--ink); }
.ult td { min-width: 70px; max-width: 360px; overflow-wrap: break-word; }
.ult td.f-text { min-width: 150px; }
.ult td.f-date, .ult td.f-number { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Cells edited in place (list-ui-table.js): the cell's box fills it, and the cell shows the focus it has. */
.ult td.ult-editable, .ult td.ult-desc { cursor: var(--cur-text, text); }
.ult td.ult-editable:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, var(--solid)); } /* this cell can be edited */
.ult td.ult-desc { cursor: var(--cur-pointer, pointer); }
.ult td[data-cell]:focus { outline: 2px solid var(--pine); outline-offset: -2px; }
.ult td[data-cell] { scroll-margin-top: 44px; } /* a cell the arrow keys reach is not left under the sticky header */
.ult td.ult-editing { padding: 0; height: 1px; } /* a height, so the editor's 100% is the cell's */
.ult .ult-edit { display: block; width: 100%; min-width: 0; margin: 0; padding: var(--cy) var(--cx); border: 0; border-radius: 0; background: var(--solid); color: var(--ink); font: inherit; outline: none; resize: vertical; box-shadow: inset 0 0 0 2px var(--pine); }
.ult input.ult-edit { height: 100%; }
.ult .ult-date-edit { display: block; height: 100%; }
.ult textarea.ult-edit { min-height: 4.5em; }
/* a cell edited by choosing (list-ui-table.js ChoiceEditor): the app's Select or Typeahead, filling the cell, in the same ring */
.ult td.ult-editing-select, .ult td.ult-editing-pick, .ult td.ult-editing-picks { overflow: visible; white-space: normal; }
.ult td.ult-editing-pick, .ult td.ult-editing-picks { min-width: 140px; }
.ult-choice { display: flex; min-width: 0; height: 100%; }
.ult-choice .ctl-select, .ult-choice .ctl-ta { display: flex; flex: 1 1 auto; width: 100%; min-width: 0; }
.ult-choice .ctl-select-btn, .ult-choice .ctl-ta { min-height: 0; margin: 0; border: 0; border-radius: 0; background: var(--solid); box-shadow: inset 0 0 0 2px var(--pine); font: inherit; outline: none; }
.ult-choice .ctl-select-btn { padding: var(--cy) var(--cx); }
.ult-choice .ctl-ta { padding: max(2px, calc(var(--cy) - 4px)) calc(var(--cx) - 4px); }
.ult-choice .ctl-ta .ctl-ta-input { flex: 1 1 40px; width: 0; min-width: 40px; font: inherit; } /* no width of its own: the column keeps its width */
/* A Description, whole, in a floating window by its cell: it grows out of the cell. */
.ult-desc-pop { position: fixed; margin: 0; padding: 0; overflow: auto; color: var(--ink); background: var(--solid); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow); transform-origin: top left; animation: ult-grow 160ms var(--ease, ease-out);
  resize: both; min-width: 240px; min-height: 110px; max-width: calc(100vw - 16px); } /* sized from its lower right corner */
.ult-desc-pop::backdrop { background: color-mix(in srgb, black 18%, transparent); }
.ult-desc-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--solid); border-bottom: 1px solid var(--line);
  cursor: var(--cur-grab, grab); touch-action: none; user-select: none; -webkit-user-select: none; } /* the window is dragged by it */
.ult-desc-head:active { cursor: var(--cur-grabbing, grabbing); }
.ult-desc-head .dimtext { flex: 1; font-size: 13px; }
.ult-desc-head strong { flex: 0 0 auto; }
.ult-desc-head button { margin-left: auto; }
.ult-desc-body { padding: 12px 16px 16px; overflow-wrap: anywhere; cursor: var(--cur-text, text); }
.ult-desc-pop .obj-desc-edit { padding: 12px 16px 16px; }
@keyframes ult-grow { from { opacity: 0; transform: scale(0.94); } }
@media (prefers-reduced-motion: reduce) { .ult-desc-pop { animation: none; } }
.ult td:first-child { min-width: 64px; }
.ult-row td { background: var(--solid); transition: background 0.12s var(--ease); }
.ult-row:hover td { background: color-mix(in srgb, var(--ink) 5%, var(--solid)); }
/* Short and Standard rows keep each cell on one line, cut with "…" (Medium and Tall wrap) */
.ult.rh-short td:not(.ul-row-actions):not(.ult-editing), .ult.rh-standard td:not(.ul-row-actions):not(.ult-editing) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.ult.rh-short .ult-link, .ult.rh-standard .ult-link { white-space: nowrap; }
/* chips in a cell read as a coloured dot and its text */
.ult .chip[class*=" g-"] { padding: 0; border: 0; background: none; font-weight: 500; color: var(--ink); }
.ult .chip[class*=" g-"]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--ink-dim); vertical-align: 1px; }
.ult .chip.g-blocked::before { background: var(--warn); }
.ult .chip.g-doing::before { background: var(--ready); }
.ult .chip.g-done::before { background: var(--check); }
.ult .chip.g-ready::before, .ult .chip.g-todo::before { background: var(--accent); }
.ult .chip.g-idea::before { background: var(--tone-yellow); }
.ult .chip.g-backlog::before { background: var(--tone-gray); }
.ult .chip.g-cancelled::before { background: none; box-shadow: inset 0 0 0 2px var(--tone-gray); }
.ult .chip.g-cancelled { color: var(--ink-dim); }
/* a status as a ball and its name, outside a table (the Task page's header): a picker (controls.js Select) drawn as a pill.
   The same colours as a table's dots. */
.status-pick .ctl-select-btn { gap: 7px; padding: 4px 8px 4px 10px; border-radius: 999px; background: var(--solid); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.status-pick .ctl-select-btn::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tone-gray); }
.status-pick.dot-idea .ctl-select-btn::before { background: var(--tone-yellow); }
.status-pick.dot-ready .ctl-select-btn::before { background: var(--accent); }
.status-pick.dot-doing .ctl-select-btn::before { background: var(--ready); }
.status-pick.dot-done .ctl-select-btn::before { background: var(--check); }
.status-pick.dot-cancelled .ctl-select-btn::before { background: none; box-shadow: inset 0 0 0 2px var(--tone-gray); }
.status-pick.dot-cancelled .ctl-select-btn { color: var(--ink-dim); }
/* Row colors (view.rowColors): a tint and a bar at the row's start */
.ult-row.tone td { background: color-mix(in srgb, var(--tone) 13%, var(--solid)); }
.ult-row.tone:hover td { background: color-mix(in srgb, var(--tone) 20%, var(--solid)); }
.ult-row.tone td:first-child { box-shadow: inset 3px 0 0 var(--tone); }
.tone-red { --tone: var(--tone-red); } .tone-orange { --tone: var(--tone-orange); } .tone-yellow { --tone: var(--tone-yellow); }
.tone-green { --tone: var(--tone-green); } .tone-blue { --tone: var(--tone-blue); } .tone-purple { --tone: var(--tone-purple); } .tone-gray { --tone: var(--tone-gray); }
.ult-link { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.ult-link:hover { text-decoration: underline; }
.ult.rh-short { --cy: 4px; }
.ult.rh-medium { --cy: 14px; }
.ult.rh-tall { --cy: 20px; }
.ult.rh-short td, .ult.rh-standard td { display: table-cell; }
.ult.rh-short td > span:not(.chip), .ult.rh-standard td:not(:first-child) { max-height: 3em; }
.ult-group th, .ult-group td { padding: 0; background: color-mix(in srgb, var(--ink) 6%, var(--solid)); font-size: 13px; border-right-color: transparent; }
.ult-group.d1 th, .ult-group.d1 td { background: color-mix(in srgb, var(--ink) 3%, var(--solid)); }
/* a group's name keeps to the left edge as the table scrolls sideways; the row itself is not frozen */
.ult-fold-in { position: sticky; left: var(--cx); display: inline-flex; align-items: center; gap: 6px; }
.ult-group td.ult-sum { padding: 6px var(--cx); color: var(--ink-dim); white-space: nowrap; }
.ult-fold { display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px var(--cx); border: 0; border-radius: 0; background: none; color: var(--ink); font-weight: 600; text-align: left; white-space: nowrap; }
.ult-group.d1 .ult-fold, .ult-row.d2 td:first-child { padding-left: 34px; }
.ult-group.d2 .ult-fold, .ult-row.d3 td:first-child { padding-left: 54px; }
.ult-row.d1 td:first-child { padding-left: 18px; }
.ult-chev { color: var(--muted); }
/* row actions (UniversalList rowActions): a last cell of quick controls. rowLead's stand beside the table: below.
   With rowMenu the cell holds the row's "⋯" and stays at the table's right edge as the table scrolls sideways. */
.ult th.ul-row-actions { width: 1%; }
.ult td.ul-row-actions { min-width: 0; width: 1%; padding: 2px 8px; vertical-align: middle; white-space: nowrap; }
.ult.has-menu th.ul-row-actions, .ult.has-menu td.ul-row-actions { position: sticky; right: 0; z-index: 1; padding: 0 6px; text-align: right; box-shadow: inset 1px 0 0 var(--ult-rule); }
.ult.has-menu thead th.ul-row-actions { z-index: 3; }
/* the "⋯" at a Task row's right end (task-row.js rowActions): it opens the row's menu */
.row-more { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); transform: none; }
.row-more:hover, .row-more:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.row-more:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.ult .row-more { width: 24px; height: 24px; margin-left: auto; }
@media (hover: none) { .row-more, .ult .row-more { width: 44px; height: 44px; } }
input.ul-row-done {
  appearance: none; -webkit-appearance: none; display: block; width: 20px; height: 20px; padding: 0; margin: 0;
  border: 2px solid var(--pine); border-radius: 50%; background: var(--pine-soft); cursor: var(--cur-pointer, pointer); position: relative;
}
input.ul-row-done:hover { border-color: var(--check); }
input.ul-row-done:checked { background: var(--check); border-color: var(--check); }
input.ul-row-done:checked::after { left: 5px; top: 1px; width: 5px; height: 10px; }
/* The check-off picture (task-row.js DoneBox, check-off-model.js): over the box, the circle pops full, a V draws in, a ring and
   sparks fly out, then the title is struck through. The box under it looks open, so the pop starts from it. */
.ul-done { position: relative; display: block; width: 20px; height: 20px; }
.ul-done > input.ul-row-done:disabled { opacity: 1; cursor: var(--cur-default, default); }
.ul-done.go > input.ul-row-done:checked, .ul-done.done > input.ul-row-done:checked { background: var(--pine-soft); border-color: var(--pine); }
.ul-done.go > input.ul-row-done:checked::after, .ul-done.done > input.ul-row-done:checked::after { content: none; }
.ul-done-fx { position: absolute; left: -8px; top: -8px; width: 36px; height: 36px; overflow: visible; pointer-events: none; }
.ul-done-fx .fx-fill { fill: var(--check); transform-box: fill-box; transform-origin: center; }
.ul-done-fx .fx-ring { fill: none; stroke: var(--check); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ul-done-fx .fx-sparks path { fill: none; stroke: var(--check); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1 2; stroke-dashoffset: -1; }
.ul-done-fx .fx-tick { fill: none; stroke: var(--on-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
/* a done Task's title is struck through (a line drawn as a background, so it can draw across). The box stands beside the table, so it
   tells its row: data-done (ticked), data-go (the picture is playing). */
.ult-row td:first-child .ult-link { background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0% 1.5px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: color 0.2s var(--ease); }
.ult-row[data-done] td:first-child .ult-link { background-size: 100% 1.5px; color: var(--ink-dim); }
@media (prefers-reduced-motion: no-preference) {
  .ul-done-fx .fx-fill { animation: ul-pop 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .ul-done-fx .fx-ring { animation: ul-ring 420ms 50ms var(--ease) both; }
  .ul-done-fx .fx-sparks path { animation: ul-spark 360ms 100ms cubic-bezier(0.2, 0.6, 0.3, 1) both; }
  .ul-done-fx .fx-tick { animation: ul-tick 240ms 120ms cubic-bezier(0.3, 0.9, 0.4, 1.15) both; }
  .ult-row[data-go] td:first-child .ult-link { animation: ul-strike 320ms 150ms cubic-bezier(0.55, 0, 0.3, 1) both; }
}
@keyframes ul-pop { from { transform: scale(0); } }
@keyframes ul-ring { from { opacity: 0.6; transform: scale(1); } to { opacity: 0; transform: scale(1.75); } }
@keyframes ul-spark { from { stroke-dashoffset: 1; } to { stroke-dashoffset: -1; } }
@keyframes ul-tick { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ul-strike { from { background-size: 0% 1.5px; } to { background-size: 100% 1.5px; } }
/* a checked-off row the list let go (check-off.js foldAway): its copy fades and folds to nothing where it stood */
.ult-row.ult-gone { pointer-events: none; }
.ult-row.ult-gone > td { transition: padding 300ms var(--ease), opacity 220ms var(--ease), border-color 300ms var(--ease); }
.ult-row.ult-gone.go > td { padding-top: 0; padding-bottom: 0; opacity: 0; border-bottom-color: transparent; }
.ult-gone-box { height: var(--h); overflow: hidden; transition: height 300ms var(--ease); }
.ult-row.ult-gone.go .ult-gone-box { height: 0; }
.ult-lead.ult-gone { opacity: 1; pointer-events: none; transition: opacity 220ms var(--ease); } /* the box's copy, beside the row's */
.ult-lead.ult-gone.go { opacity: 0; }
/* the controls beside the rows (list-ui-table.js places each at its row): shown for the row pointed at, and when on */
.ult-frame { position: relative; min-width: 0; --lead: 34px; }
.ult-frame.has-lead { padding-left: var(--lead); }
.ult-gutter { position: absolute; left: 0; top: 0; bottom: 0; width: var(--lead); overflow-x: visible; overflow-y: clip; pointer-events: none; } /* sideways, a check-off's sparks may pass the edge */
.ult-gutter-in { position: relative; }
.ult-lead { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: center; pointer-events: auto; opacity: 0; transition: opacity 0.12s var(--ease); }
.ult-lead[hidden] { display: none; }
.ult-lead[data-hot], .ult-lead:hover, .ult-lead:focus-within, .ult-lead:has(:checked), .ult-lead:has([aria-pressed="true"]), .ult-lead:has(:disabled) { opacity: 1; }
.ult-row[data-hot] td { background: color-mix(in srgb, var(--ink) 5%, var(--solid)); }
.ult-row.tone[data-hot] td { background: color-mix(in srgb, var(--tone) 20%, var(--solid)); }
/* the row follows a drag to the left (row-swipe.js) and slides back */
.ult-row { transition: transform .15s ease-out; }
.ult-row.swiping { transition: none; }
.ult-wrap { position: relative; }
.swipe-hint { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: flex-end; overflow: hidden; pointer-events: none;
  color: var(--solid); background: color-mix(in srgb, var(--warn) 55%, var(--solid)); }
.swipe-hint svg { flex: none; margin-right: 18px; transition: transform .12s; }
.swipe-hint.armed { background: var(--warn); }
.swipe-hint.armed svg { transform: scale(1.25); }
.swipe-hint.leaving { transition: left .15s ease-out, width .15s ease-out; }
.is-swiping { user-select: none; -webkit-user-select: none; } /* on <html> during a row swipe: the page under it follows (auto takes the parent's) */
dialog.row-menu { position: fixed; margin: 0; width: 264px; max-height: calc(100dvh - 16px); overflow: auto; padding: 4px; color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow); }
dialog.row-menu::backdrop { background: transparent; }
/* what is in a Task's menu (task-menu.js): rows, a row of three date buttons, and the part a row opens under itself */
.tm { display: grid; }
.tm hr { margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.row-menu .tm-item, .tm-quick button { display: flex; align-items: center; gap: 8px; border: 0; border-radius: var(--r-badge); background: none; padding: 8px 12px; text-align: left; font-weight: 500; color: inherit; }
.row-menu .tm-item:hover, .row-menu .tm-item:focus-visible, .tm-quick button:hover, .tm-quick button:focus-visible, .tm-quick button[aria-expanded="true"] { background: color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
.row-menu .tm-item.danger { color: var(--warn); }
.row-menu .tm-item.tm-live { color: var(--accent-ink); } /* Stop focus: the Task is In progress */
/* the Task's timer, as a line of the menu: its ring, clock and tools at the right */
/* The menu's focus line: Focus now and the Task's timer. Before a start the ring is in the button; after, beside it, in the same place. */
.tm-focus { display: flex; align-items: center; --timer-size: 36px; --timer-clock: 10px; }
.row-menu .tm-focus .tm-item { flex: 1; min-width: 0; padding-block: 4px; min-height: 44px; }
.tm-focus .tm-side { display: flex; overflow: visible; }
.tm-clock { display: flex; flex: none; padding-right: 4px; }
/* Zen mode, at the end of the focus line: always there, also before a start */
.tm-zen { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 4px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-dim); }
.tm-zen:hover, .tm-zen:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
.row-menu .tm-focus .tm-item:has(+ .tm-clock) { padding-right: 8px; }
.tm-label { flex: 1; min-width: 0; }
.tm-side { color: var(--ink-dim); font-size: 12px; font-weight: 500; }
.tm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 12px 2px; font-size: 12px; font-weight: 600; color: var(--ink-dim); }
.tm-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 0 4px; }
.tm-quick button { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 12px; text-align: center; }
.tm-fire.on, .tm-fire.on .tm-side, .td-fire { color: var(--warn); }
.td-fire { display: inline-flex; align-items: center; }
.tm-quick.four { grid-template-columns: repeat(4, 1fr); }
.tm-quick.four button { padding: 8px 2px; font-size: 11px; }
.tm-side { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-repeat { display: inline-flex; align-items: center; color: var(--ink-dim); }
/* the "how often" form of a recurring Task (repeat-form.js), in a Task's menu and on its page */
.rp { display: grid; gap: 8px; }
.rp-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; }
.rp-label { font-size: 12px; font-weight: 600; color: var(--ink-dim); }
.rp-row .ctl-select, .rp-row .ctl-select-btn, .rp-row .ctl-date { width: 100%; min-width: 0; }
.rp-every { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: center; }
.rp .ctl-num input { width: 2.4em; padding-left: 2px; padding-right: 2px; }
.rp-every .ctl-select-btn { padding-left: 8px; padding-right: 6px; }
.rp .ctl-num .ctl-icon { width: 26px; }
.rp-foot button.primary { color: var(--on-accent); }
.rp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rp-day { padding: 6px 0; border: 1px solid var(--line); border-radius: var(--r-badge); background: none; font-size: 12px; font-weight: 600; color: var(--ink-dim); text-align: center; }
.rp-day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rp-preview { margin: 0; font-size: 12px; color: var(--ink-dim); }
.rp-preview.err { color: var(--warn); }
.rp-foot { display: flex; align-items: center; gap: 6px; }
.rp-gap { flex: 1; }
/* a Task page's Repeat group (occurrences.js): the rule, the habit numbers, a line for each date that has passed */
.occ-rule { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; }
.occ-none { margin: 0; }
.occ-form { max-width: 340px; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-pop); }
.occ-stats { margin: 0 0 8px; color: var(--ink-dim); }
.occ-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.occ-list li { display: flex; align-items: center; gap: 10px; }
.occ-day { min-width: 130px; font-variant-numeric: tabular-nums; }
.chip.occ-done { color: var(--check); }
.chip.occ-missed { color: var(--warn); }
.tm-part { padding: 4px 12px 8px; }
.tm-part .ctl-date { width: 100%; }
/* a phone: the menu is a sheet from the bottom, wherever its row is */
@media (max-width: 720px) {
  dialog.row-menu { top: auto !important; left: 0 !important; bottom: 0; width: 100vw; max-width: none; max-height: 88dvh; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-width: 1px 0 0; border-radius: var(--r-card) var(--r-card) 0 0; }
  dialog.row-menu::backdrop { background: var(--timer-scrim); }
}
/* "Task deleted" and its Undo: bottom centre, over everything */
.toast { position: fixed; inset: auto auto 24px 50%; transform: translateX(-50%); margin: 0; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 14px; color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow); }
.toast > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-more { margin-left: 6px; font-size: 12px; color: var(--ink-dim); white-space: nowrap; } /* older changes Undo can still take back */
.toast-x { border: 0; background: none; padding: 0 6px; font-size: 18px; line-height: 1; color: var(--ink-dim); }
@media (prefers-reduced-motion: reduce) { .ult-row { transition: none; } }
.ult tfoot td { position: sticky; bottom: 0; background: color-mix(in srgb, var(--ink) 3%, var(--solid)); border-top: 1px solid var(--ult-edge); border-bottom: 0; color: var(--ink-dim); white-space: nowrap; }

/* panels: the Display panel's right sheet, wider for the filter builder; a bottom sheet on a phone */
/* the toolbar's popover (Sheet with an anchor): just under its button, over the page */
.lpop {
  position: fixed; inset: auto; margin: 0; z-index: 900; box-sizing: border-box; display: none; flex-direction: column;
  width: min(380px, 100vw - 16px); padding: 0; overflow: hidden; color: var(--ink); background: var(--solid);
  border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow); font: 400 14px/1.4 var(--font-body);
}
.lpop:popover-open, .lpop.sheet { display: flex; }
.lpop.wide { width: min(600px, 100vw - 16px); }
.lpop .lp-body { padding: 16px; gap: 10px; }
.lpop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lpop-head h2 { margin: 0; font: 600 16px/1.3 var(--font-body); }
.lpop .lp-foot { padding: 10px 16px; }
.lpop.sheet { left: 0; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none !important; max-height: 85dvh !important; border-width: 1px 0 0; border-radius: var(--r-card) var(--r-card) 0 0; }
.lpop-search { position: relative; display: flex; align-items: center; }
.lpop-search .ult-icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.lpop-search input { width: 100%; padding-left: 32px; }
.lpop .hint { margin: 0; }
.lpop .lp-body > .tiny { align-self: flex-start; }
/* Recents (pages/recents.js): a fold per kind of object, each object a bordered row */
.rc-group { display: grid; gap: 6px; }
.rc-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 0; border: 0; background: none; box-shadow: none; color: var(--ink); font-weight: 600; text-align: left; }
.rc-head:hover { background: none; color: var(--accent-ink); }
.rc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rc-item { display: block; padding: 9px 12px; color: var(--ink); text-decoration: none; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-item:hover, .rc-item:focus-visible { border-color: var(--pine); color: var(--accent-ink); }
.rc-note { padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
/* Activity (pages/activity.js): the log scrolls inside its frame */
.ac-who { align-self: flex-start; }
.ac-msg { margin: 0; }
.ac-list { list-style: none; margin: 0; padding: 0; max-height: min(58dvh, 520px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.ac-list:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; }
.ac-list[aria-busy="true"] { opacity: .7; }
.ac-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; }
.ac-row + .ac-row { border-top: 1px solid var(--line); }
.ac-icon { display: grid; place-items: center; width: 28px; height: 28px; color: var(--accent-ink); background: var(--pine-soft); border-radius: 50%; }
.ac-main { display: grid; gap: 2px; min-width: 0; }
.ac-trail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-title { justify-self: start; max-width: 100%; font-weight: 600; color: var(--accent-ink); text-decoration: none; overflow-wrap: anywhere; }
a.ac-title:hover { text-decoration: underline; }
.ac-title.gone { color: var(--ink-dim); }
.ac-line { font-size: 13px; color: var(--ink-dim); overflow-wrap: anywhere; }
.ac-when { font-size: 12px; line-height: 28px; color: var(--muted); white-space: nowrap; }
/* Fields: a row per field, a switch each */
.lfx { list-style: none; margin: 0 -8px; padding: 0; display: grid; }
.lfx-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-badge); }
.lfx-row:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lfx-row[draggable="true"] { cursor: var(--cur-grab, grab); }
.lfx-row .lv-grip.off { opacity: 0.3; }
.lfx-type { width: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.lfx-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lfx-name .dimtext { font-size: 12px; }
.lfx-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.lfx-all { display: flex; gap: 6px; }
.lfx-back { align-self: flex-start; }
.lfx-obj { padding: 0; }
.lfx-obj:hover { background: none; }
.lfx-row:not(.lfx-obj) + .lfx-obj { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.lfx-open { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; color: var(--ink); text-align: left; border-radius: var(--r-badge); }
.lfx-open:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lfx-open .lfx-type { margin-left: 26px; }
/* Sort */
.lsx { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lsx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Row colors */
.lcx { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.lcx-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lcx-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.lcx-swatch { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: var(--tone); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 20%, transparent); }
.lcx-swatch[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--solid) inset; }
/* Row height */
.lhx { display: grid; gap: 2px; margin: 0 -8px; }
.lhx-opt { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: none; color: var(--ink); text-align: left; border-radius: var(--r-badge); }
.lhx-opt:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lhx-opt[aria-checked="true"] { font-weight: 600; }
.lhx-bars { display: grid; width: 22px; gap: 2px; }
.lhx-bars i { display: block; border: 1.5px solid var(--muted); border-radius: 2px; height: 4px; }
.lhx-bars.rh-standard i { height: 6px; } .lhx-bars.rh-medium i { height: 8px; } .lhx-bars.rh-tall i { height: 10px; }
.display-panel.lp { display: flex; flex-direction: column; width: min(400px, 100vw - 40px); overflow: hidden; }
.display-panel.lp[open] { display: flex; }
.display-panel.lp.wide { width: min(560px, 100vw - 40px); }
.lp-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px; overflow-y: auto; }
.lp-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--solid); }
.lp-top { display: grid; gap: 8px; justify-items: start; }
.lp-top input[type="search"] { width: 100%; }
.lp-summary { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.lp-clear { align-self: end; }
.lp-section h3 { margin: 4px 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); }
.lp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lp-row { display: flex; align-items: center; gap: 2px; border-radius: var(--r-btn); }
.lp-row:hover, .lp-row:focus-within { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.lp-row.on { background: var(--pine-soft); }
.lp-name { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 8px 10px; border: 0; background: none; text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.lp-row.on .lp-name { color: var(--accent-ink); font-weight: 600; }
.lp-tick { display: inline-grid; width: 16px; flex: none; }
.lp-more { border: 0; background: none; color: var(--muted); }
.lp-menu { position: relative; }
.lp-menu-list {
  position: absolute; right: 0; top: 100%; z-index: 3; display: grid; min-width: 150px; padding: 4px;
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow);
}
.lp-menu-list button { border: 0; border-radius: var(--r-badge); background: none; padding: 8px 12px; text-align: left; font-weight: 500; }
.lp-menu-list button:hover, .lp-menu-list button:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
/* a filter's rules: a small card under its row while hovered or focused; it floats, so no row moves under the pointer */
.lp-row.has-rules { position: relative; }
.lp-rules { position: absolute; left: 30px; right: 8px; top: calc(100% - 2px); z-index: 3; padding: 6px 10px; font-size: 12px; line-height: 1.35;
  color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-badge); box-shadow: var(--shadow);
  overflow-wrap: anywhere; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.12s var(--ease) 0s, visibility 0s linear 0.12s; }
.lp-row.has-rules:hover .lp-rules, .lp-row.has-rules:has(.lp-name:focus-visible) .lp-rules { opacity: 1; visibility: visible; transition: opacity 0.12s var(--ease) 0.35s, visibility 0s linear 0.35s; }
.lp-fav { padding: 0 6px; color: var(--accent-ink); font-size: 14px; }
.lp-rules { display: none; flex-basis: 100%; margin: -2px 0 4px 34px; font-size: 12px; line-height: 1.35; color: var(--ink-dim); overflow-wrap: anywhere; }
.lp-row.has-rules:hover .lp-rules, .lp-row.has-rules:focus-within .lp-rules { display: block; }
.lp-switch { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; background: none; font-weight: 500; }
.lp-switch:hover { background: none; }
.lp-switch-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line); transition: background 0.15s var(--ease); }
.lp-switch-track > span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 30%, transparent); transition: transform 0.15s var(--ease); }
.lp-switch[aria-checked="true"] .lp-switch-track { background: var(--pine); }
.lp-switch[aria-checked="true"] .lp-switch-track > span { transform: translateX(14px); background: var(--on-accent, var(--paper)); }
.lp-switch:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.lp-ask { padding: 20px; width: min(360px, 100vw - 40px); color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.lp-ask::backdrop { background: color-mix(in srgb, var(--dialog-scrim) 38%, transparent); }
.lp-ask form { display: grid; gap: 12px; }
.lp-ask h3 { margin: 0; font: 500 18px/1.2 var(--font-display); }
.lp-ask p { margin: 0; overflow-wrap: anywhere; }
.lp-ask-row { display: flex; justify-content: flex-end; gap: 8px; }

/* the filter builder */
.lf { display: grid; gap: 10px; }
.lf-group { margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); display: grid; gap: 8px; min-width: 0; }
.lf-group legend { padding: 0 4px; font-size: 12px; color: var(--ink-dim); }
.lf-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.lf-group > button.tiny { justify-self: start; }
.lf > button.tiny { justify-self: start; }
.lf-join { justify-self: center; }
.lf-join button { padding: 3px 14px; font-size: 13px; }
.lf-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lf-rule { display: grid; gap: 6px; padding: 8px; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.lf-rule.unfinished { box-shadow: inset 3px 0 0 var(--warn); }
.lf-unfinished { margin: 0; color: var(--warn-ink); font-size: 12px; }
.lf-rule-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lf-rule-top > .lf-pick { flex: 1 1 160px; }
.lf-value, .lf-date, .lf-range, .lf-many { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.lf-value input[type="text"] { flex: 1 1 160px; min-width: 0; }
.lf-mode button { padding: 2px 10px; font-size: 12px; }
.lf-chip { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.lf-x { padding: 0 6px; border: 0; background: none; line-height: 18px; font-size: 14px; color: inherit; }
.lf-pick { position: relative; display: inline-grid; min-width: 0; }
.lf-pick-btn { text-align: left; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-pick-box {
  display: grid; gap: 4px; margin-top: 4px; padding: 8px; max-height: 300px; overflow-y: auto; min-width: min(280px, 100%);
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow);
}
.lf-pick-head { margin: 6px 0 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); }
.lf-pick-obj { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.lf-pick-list { display: grid; }
.lf-pick-list button { border: 0; border-radius: var(--r-badge); background: none; padding: 6px 10px; text-align: left; font-weight: 500; }
.lf-pick-list button:hover, .lf-pick-list button:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); outline: none; }
.lf-pick-list button.on { color: var(--accent-ink); }

/* the view and grouping editors */
.lv, .lg { display: grid; gap: 10px; }
.lv h3, .lg h3 { margin: 4px 0 0; font-size: 13px; font-weight: 600; }
.lv-cols, .lg-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lv-col { display: flex; align-items: flex-start; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.lv-grip { padding-top: 6px; color: var(--muted); cursor: var(--cur-grab, grab); }
.lv-col-main { flex: 1; display: grid; gap: 4px; min-width: 0; }
.lv-col-field { font-size: 12px; color: var(--ink-dim); }
.lv-col-main input { min-width: 0; }
.lv-col-moves { display: flex; gap: 2px; }
.lg-level { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.lg-head { display: flex; align-items: center; justify-content: space-between; }

@media (max-width: 720px) {
  .ult-search { max-width: none; flex-basis: 100%; }
  .ult-tools { margin-left: 0; }
  .ult-tool { max-width: 180px; }
  .display-panel.lp, .display-panel.lp.wide {
    margin: auto 0 0; width: 100vw; height: auto; max-height: 88dvh;
    border-left: 0; border-top: 1px solid var(--line); border-radius: var(--r-card) var(--r-card) 0 0;
  }
  .ult td { max-width: 240px; }
}
@media (hover: none) {
  .ult-tool, .lp-name, .lp-menu-list button, .lf-pick-list button, .ult-fold, .ult-sort { min-height: 44px; }
  .lp-more { min-width: 44px; min-height: 44px; }
  .row-menu .tm-item, .tm-quick button, .rp-day, .toast .tiny, .toast-x { min-height: 44px; }
}
.ult-wrap .chip { white-space: nowrap; }
/* a table's row controls stand beside it: closer on a phone, and always shown where nothing hovers */
@media (max-width: 720px) {
  .ult-frame.has-lead { --lead: 30px; }
  /* on a phone's page they stand mostly in the page's own side padding (main's 16px), so the table is wider and starts nearer
     the toolbar's edge */
  main > .ulist > .ult-frame.has-lead, main > section > .ulist > .ult-frame.has-lead, .obj-body > .obj-section > .ulist > .ult-frame.has-lead { margin-left: -12px; }
}
@media (hover: none) { .ult-lead { opacity: 1; } }
/* on a page (not in a card, not on a phone) they stand in the page's own margin, so the table keeps the page's left edge */
@media (min-width: 721px) {
  main > .ulist > .ult-frame.has-lead, main > section > .ulist > .ult-frame.has-lead { padding-left: 0; }
  main > .ulist > .ult-frame.has-lead > .ult-gutter, main > section > .ulist > .ult-frame.has-lead > .ult-gutter { left: calc(-1 * var(--lead)); }
}

/* Missions lists, Mission and owner Project pages (missions.js, mission-page.js, mission-project.js) */
.mp-switch { margin: 0 0 14px; max-width: 280px; }
.mp-switch a { flex: 1 1 auto; padding: 6px 10px; text-align: center; border: 1px solid transparent; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.mp-switch a[aria-current="page"] { background: var(--solid); color: var(--ink); border-color: var(--ink-dim); }
.mp-note { margin: 0 0 10px; }
.mp-interview-row { margin: 0 0 10px; }
.mp-title-row { display: flex; align-items: center; gap: 8px; }
.mp-title-row h1 { min-width: 0; }
.mp-star { border: none; background: none; font-size: 18px; padding: 0 4px; color: var(--ink-dim); cursor: var(--cur-pointer, pointer);
  min-width: 32px; min-height: 32px; margin: 0 -4px; } /* a 32px target for a finger; the margin gives the room back, so the mark stands where it stood */
.mp-star.on { color: var(--accent-ink); }

/* ---- The side menu's top (top-bar.js): profile button and its menu, the daily goal, Add task ---- */
.tb { display: flex; flex-direction: column; gap: 6px; margin: -8px 0 10px; }
.tb-profile { position: relative; display: block; padding-left: 48px; min-height: 40px; } /* beside the menu button */
.side .tb-profile-btn { width: 100%; min-height: 40px; padding: 3px 8px 3px 4px; justify-content: flex-start; gap: 8px; font-weight: 700; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.tb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-avatar { position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; }
.tb-avatar svg { position: absolute; inset: 0; }
.tb-avatar b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; background: var(--pine-soft); color: var(--accent-ink); }
.tb-ring-track, .tb-ring { fill: none; stroke-width: 2.5; }
.tb-ring-track { stroke: color-mix(in srgb, var(--ink) 14%, transparent); }
.tb-ring { stroke: var(--pine); stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) { .tb-ring { transition: stroke-dasharray 400ms var(--ease); } }
.tb-menu {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(280px, 100vw - 24px); display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow);
}
.side .tb-menu button { justify-content: flex-start; gap: 12px; min-height: 40px; }
.side .tb-menu button:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); outline: none; }
.tb-menu hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.tb-me span { display: flex; flex-direction: column; min-width: 0; }
.tb-me b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-me small { color: var(--ink-dim); font-size: 12px; font-weight: 500; }
.side a.tb-goal {
  align-self: flex-start; margin-left: 2px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums;
  color: var(--side-ink); background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.side a.tb-goal:hover { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.side .tb-add-btn { justify-content: flex-start; gap: 10px; font-weight: 700; color: var(--accent-ink); }
.tb-plus-disc { fill: var(--pine); }
.tb-plus-mark { fill: none; stroke: var(--on-accent); stroke-width: 2.2; stroke-linecap: round; }
.lp-ask.tb-add { width: min(540px, 100vw - 32px); }
.tb-add input.tb-add-title { font-size: 17px; font-weight: 600; }
.tb-add input[type="text"], .tb-add textarea { width: 100%; }
/* Add task (add-task-dialog.js): the date chips, and at the foot the Deadline flag and the Priority fire. Each one grows
   and lights on hover, dips on a press, and pops when it turns on. .tb-add first: the window opens inside the side menu,
   whose flat rows (.side button) would take these with them. */
.at-when, .at-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tb-add .at-foot { flex-wrap: wrap; align-items: center; }
.at-extras { flex: 1 0 auto; flex-wrap: nowrap; --fire: var(--tone-orange); --fire-core: var(--tone-yellow); }
.ctl-datebtn { display: inline-flex; }
.tb-add :is(.at-chip, .at-icon) { position: relative; display: inline-flex; justify-content: flex-start; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--ctl-line); border-radius: 999px; background: none; color: var(--ink-dim); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tb-add .at-icon { gap: 0; padding: 6px 9px; }
.tb-add :is(.at-chip, .at-icon):is(:hover, :focus-visible, [aria-expanded="true"]) { color: var(--ink); border-color: var(--pine); background: var(--selection); }
.tb-add .at-chip:is([aria-pressed="true"], .is-on) { color: var(--ink); border-color: var(--pine); background: var(--pine-soft); font-weight: 600; }
.at-more { max-width: 0; overflow: hidden; opacity: 0; }
.at-icon:is(:hover, :focus-visible, [aria-expanded="true"], .is-on) .at-more { max-width: 10em; margin-left: 6px; opacity: 1; }
.tb-add .at-deadline.is-on { color: var(--warn-ink); border-color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 12%, transparent); font-weight: 600; }
.tb-add .at-fire.is-on { color: var(--fire); border-color: var(--fire); background: color-mix(in srgb, var(--fire) 14%, transparent); font-weight: 600; }
.at-flame { overflow: visible; }
.at-flame-out { fill: var(--fire); }
.at-flame-in { fill: var(--fire-core); }
@media (prefers-reduced-motion: no-preference) {
  .tb-add :is(.at-chip, .at-icon) { transition: transform 160ms var(--ease), background-color 160ms, border-color 160ms, color 160ms; }
  .at-more { transition: max-width 240ms var(--ease), margin-left 240ms var(--ease), opacity 200ms; }
  .tb-add :is(.at-chip, .at-icon):is(:hover, :focus-visible) { transform: scale(1.06); }
  .tb-add :is(.at-chip, .at-icon):active { transform: scale(0.94); }
  .tb-add :is(.at-chip:is([aria-pressed="true"], .is-on), .at-icon.is-on) { animation: at-pop 280ms var(--ease); }
  .tb-add :is(.at-chip:is([aria-pressed="true"], .is-on), .at-deadline.is-on) .ult-icon { animation: at-wag 420ms var(--ease); }
  /* the fire catches: the flame jumps up, a ring goes out from the button, then it keeps flickering */
  .at-fire.is-on::after { content: ""; position: absolute; inset: -1px; border: 2px solid var(--fire); border-radius: inherit; pointer-events: none; animation: ul-ring 520ms var(--ease) forwards; }
  .tb-add .at-fire.is-on .at-flame { transform-origin: 50% 90%; animation: at-ignite 520ms var(--ease), at-flicker 1300ms ease-in-out 520ms infinite; }
}
@keyframes at-pop { 40% { transform: scale(1.1); } }
@keyframes at-wag { 30% { transform: rotate(-14deg) scale(1.15); } 65% { transform: rotate(9deg); } }
@keyframes at-ignite { from { transform: scale(0.3) rotate(-18deg); opacity: 0.2; } 45% { transform: scale(1.55) rotate(8deg); opacity: 1; } 72% { transform: scale(0.9) rotate(-3deg); } }
@keyframes at-flicker { 25% { transform: scale(1.06, 1.14) rotate(-3deg); } 50% { transform: scale(0.97, 1.04) rotate(2deg); } 75% { transform: scale(1.04, 1.1) rotate(-1deg); } }
@media (max-width: 720px) {
  .tb { flex: 1 0 100%; margin: 0 0 6px; }
  .tb-profile { padding-left: 46px; }
}

/* ---- Settings: a window over the page, its groups down the left (settings.js) ---- */
.set-modal {
  padding: 0; width: min(880px, 100vw - 32px); height: min(680px, 100dvh - 48px); overflow: hidden;
  color: var(--ink); background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: var(--shadow);
}
.set-modal::backdrop { background: color-mix(in srgb, var(--dialog-scrim) 75%, transparent); }
.set-frame { display: grid; grid-template-columns: 220px minmax(0, 1fr); height: 100%; }
.set-side { display: flex; flex-direction: column; gap: 10px; padding: 16px 10px; min-height: 0; background: color-mix(in srgb, var(--ink) 5%, var(--solid)); border-right: 1px solid var(--line); }
.set-side h2 { margin: 0 8px; font: 700 15px/1.3 var(--font-body); }
.set-search { display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--ctl-line); border-radius: var(--r-btn); background: var(--solid); color: var(--muted); }
.set-search:focus-within { border-color: var(--pine); }
.set-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 6px 0; }
.set-search input:focus { outline: none; }
.set-groups { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.set-group { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border: 0; background: none; text-align: left; font-weight: 500; color: var(--ink); }
.set-group:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.set-group[aria-current="true"] { background: var(--pine-soft); color: var(--accent-ink); font-weight: 700; }
.set-group .ult-icon { width: 18px; height: 18px; stroke-width: 1.75; flex: none; }
.set-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.set-head h3 { margin: 0; font: 700 16px/1.3 var(--font-body); }
.set-close { border: 0; background: none; font-size: 22px; color: var(--muted); }
.set-close:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.set-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 20px 20px; }
.set-body > .editor { border: 0; padding: 0; background: none; }
.set-foot { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.set-field { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.set-field > span:first-child { font-weight: 700; font-size: 13px; }
.set-steps { font-size: 13px; resize: vertical; }
.ai-providers { align-self: flex-start; }
@media (max-width: 720px) {
  .set-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .set-frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .set-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 10px 8px; }
  .set-groups { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .set-group { white-space: nowrap; min-height: 44px; }
}

/* ---- Object pages: Back, the title and description typed in place, the Fields group (obj-parts.js) ---- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 14px; }
.crumbs ol { margin: 0; }
.obj-back { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; font-weight: 600; }
.obj-head h1.obj-title, .obj-title-input { font: 600 38px/1.15 var(--font-display); letter-spacing: -0.01em; margin: 2px 0 14px; }
.obj-head h1.obj-title { flex: 1; min-width: 0; padding: 2px 8px; margin-left: -8px; border-radius: var(--r-btn); border: 1px solid transparent; cursor: var(--cur-text, text); }
.obj-head h1.obj-title::first-letter { text-transform: uppercase; }
.obj-head h1.obj-title:hover, .obj-head h1.obj-title:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); border-color: var(--line); outline: none; }
.obj-head h1.obj-title:focus-visible { outline: 2px solid var(--pine); outline-offset: 1px; } /* a Tab stop: the same outline as a button's */
.obj-title-input { flex: 1; min-width: 0; width: 100%; padding: 2px 8px; margin-left: -8px; }
.obj-empty { color: var(--muted); font-style: italic; }
.obj-details { display: flex; flex-direction: column; gap: 22px; }
.obj-group { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.obj-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.obj-group-head h2 { margin: 0; font: 700 13px/1.3 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.obj-desc { min-height: 3.2em; padding: 10px 14px; border: 1px solid transparent; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--ink) 3%, transparent); cursor: var(--cur-text, text); font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.obj-desc:hover, .obj-desc:focus-visible { border-color: var(--ctl-line); outline: none; }
.obj-desc[aria-disabled="true"] { cursor: var(--cur-default, default); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md pre { margin: 0 0 0.7em; }
.md h2, .md h3, .md h4 { font-family: var(--font-display); font-weight: 600; margin: 0.9em 0 0.4em; line-height: 1.2; }
/* A page's own section title (`section h2`: small capitals over a line) is not a heading written in a description. */
.md h2, .md-edit h2 { text-transform: none; letter-spacing: normal; color: inherit; border-bottom: 0; padding-bottom: 0; }
.md h2 { font-size: 1.45em; } .md h3 { font-size: 1.2em; } .md h4 { font-size: 1.05em; }
.md ul, .md ol { padding-left: 1.4em; }
.md li > ul, .md li > ol { margin-bottom: 0; }
.md li.md-check { list-style: none; margin-left: -1.3em; }
.md li.md-check.done { color: var(--muted); text-decoration: line-through; }
.md-box { display: inline-block; width: 1.3em; text-decoration: none; }
.md blockquote { padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; padding: 1px 5px; border-radius: 4px; background: var(--code-bg); }
.md pre { padding: 10px 12px; border-radius: var(--r-btn); background: var(--code-bg); overflow-x: auto; }
.md pre code { padding: 0; background: none; }
.md a { color: var(--accent-ink); }
.obj-desc-edit { border: 1px solid var(--pine); border-radius: var(--r-ctl); background: var(--surface); overflow: hidden; }
.md-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.md-tool { min-width: 30px; height: 30px; padding: 0 7px; border: 0; background: none; font-size: 13px; color: var(--ink); }
.md-tool:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.md-tool[aria-pressed="true"] { background: var(--pine-soft); color: var(--accent-ink); }
.md-tools .md-done { margin-left: auto; }
.md-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.md-link input { flex: 1 1 200px; min-width: 0; font-size: 16px; }
.md-link-bad { flex: 1 1 100%; font-size: 13px; color: var(--warn-ink); }
/* The Description's rich text box (obj-parts.js, rich-edit.js). It reads as the saved text will (.md above): its lines
   are <div>s where the read view has <p>s, and its headings <h1> to <h3> where the read view has <h2> to <h4>. */
.md-edit { min-height: 7em; padding: 10px 14px; outline: none; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; cursor: var(--cur-text, text); }
.md-edit:empty::before { content: attr(data-placeholder); color: var(--muted); }
.md-edit > :first-child { margin-top: 0; }
.md-edit > :last-child { margin-bottom: 0; }
.md-edit > div, .md-edit p, .md-edit ul, .md-edit ol, .md-edit blockquote, .md-edit pre { margin: 0 0 0.7em; }
.md-edit li > ul, .md-edit li > ol, .md-edit ul > ul, .md-edit ul > ol, .md-edit ol > ul, .md-edit ol > ol { margin-bottom: 0; }
.md-edit h1, .md-edit h2, .md-edit h3 { font-family: var(--font-display); font-weight: 600; margin: 0.9em 0 0.4em; line-height: 1.2; }
.md-edit h1 { font-size: 1.45em; } .md-edit h2 { font-size: 1.2em; } .md-edit h3 { font-size: 1.05em; }
.md-edit ul, .md-edit ol { padding-left: 1.4em; }
.md-edit blockquote { padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.md-edit code, .md-edit pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; border-radius: 4px; background: var(--code-bg); }
.md-edit code { padding: 1px 5px; }
.md-edit pre { padding: 10px 12px; border-radius: var(--r-btn); white-space: pre-wrap; }
.md-edit a { color: var(--accent-ink); text-decoration: underline; }
.obj-ai-note { margin: 0; }
/* The Fields: one grid, every cell the same width, a control never wider than its cell. */
.obj-ffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; }
.obj-ff { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.obj-ff > .ctl-ta, .obj-ff > .ctl-select, .obj-ff .ctl-select-btn { width: 100%; min-width: 0; max-width: 100%; }
.obj-ff .ctl-ta .ctl-ta-input { flex: 1 1 30px; min-width: 30px; }
.obj-ff .ctl-ta .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-cats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.obj-cats button.ctl-chip-x { min-height: 0; }
.obj-cat-box { position: relative; display: inline-block; }
.obj-cat-box input { width: 200px; padding: 4px 8px; }
.obj-cat-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow); }
.obj-cat-list button { border: 0; background: none; text-align: left; padding: 6px 10px; white-space: nowrap; font-weight: 500; }
.obj-cat-list button.on, .obj-cat-list button:hover { background: var(--pine-soft); color: var(--accent-ink); }
.obj-cat-list .dimtext { padding: 6px 10px; }
.obj-save { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 720px) {
  .obj-head h1.obj-title, .obj-title-input { font-size: 28px; }
  .obj-back { min-height: 44px; }
}

/* ---- The AI button and its panel (ai-handoff.js) ---- */
.ai-menu { position: relative; display: inline-block; }
.ai-btn { color: var(--accent-ink); border-color: var(--pine); background: var(--pine-soft); }
.ai-btn .ult-icon { width: 18px; height: 18px; }
.ai-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: min(360px, 100vw - 32px); display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow); text-align: left;
}
.mp-interview-row .ai-pop { right: auto; left: 0; }
.ai-ask { display: flex; gap: 6px; }
.ai-ask input { flex: 1; min-width: 0; }
.ai-ask button.tiny { padding: 2px 12px; color: var(--on-accent); }
.ai-list { display: flex; flex-direction: column; gap: 2px; }
.ai-list button { border: 0; background: none; text-align: left; padding: 8px 10px; font-weight: 500; }
.ai-list button:hover, .ai-list button:focus-visible { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.ai-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.ai-note { margin: 0; font-size: 13px; }
.ai-last { font-size: 12px; }
.ai-setup { align-self: flex-start; white-space: normal; text-align: left; border: 0; background: none; padding: 2px 0; text-decoration: underline; }

/* ---- Export a note as PDF (notes.js exportNotePdf): the browser prints the open document and nothing else ---- */
@media print {
  :root[data-print="note"] { color-scheme: light; }
  :root[data-print="note"], :root[data-print="note"] body { background: Canvas; color: CanvasText; }
  :root[data-print="note"] .notes-page, :root[data-print="note"] .notes-doc { margin: 0; max-width: none; width: auto; }
  :root[data-print="note"] body > :not(#root), :root[data-print="note"] .menu-btn, :root[data-print="note"] .top-tools, :root[data-print="note"] .side-wrap,
  :root[data-print="note"] main > :not(.notes-page), :root[data-print="note"] .notes-list, :root[data-print="note"] .notes-bar,
  :root[data-print="note"] .notes-doc-tools, :root[data-print="note"] .notes-back, :root[data-print="note"] .notes-outline,
  :root[data-print="note"] .notes-msg { display: none !important; }
  :root[data-print="note"] .shell, :root[data-print="note"] .notes-page { display: block; min-height: 0; }
  :root[data-print="note"] main { margin: 0; padding: 0; width: auto; max-width: none; justify-self: stretch; background: none; box-shadow: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; will-change: auto; isolation: auto; }
  :root[data-print="note"] .notes-doc, :root[data-print="note"] .notes-edit { color: CanvasText; background: none; border: 0; padding: 0; min-height: 0; }
  :root[data-print="note"] .notes-title { border: 0; padding: 0; margin: 0; text-indent: 0; overflow: visible; text-overflow: clip; background: none; color: CanvasText; width: 100%; }
  :root[data-print="note"] .notes-icon-btn { border: 0; background: none; padding: 0; }
  :root[data-print="note"] .notes-icon-pop { display: none !important; }
  :root[data-print="note"] .notes-edit img { max-width: 100%; break-inside: avoid; }
  :root[data-print="note"] .notes-edit a { color: LinkText; }
}

/* A Planned time and its reminders (controls.js TimeField / TimeChip, reminder-picker.js). */
.ctl-time.ampm { width: 9.5em; }
.ctl-timechip { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.tm-part .ctl-time { width: 100%; }
.rem { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.rem button.chip.pick:disabled { opacity: 0.5; cursor: var(--cur-blocked, not-allowed); }
/* Add task opens inside the side menu, whose flat rows (.side button) would take the chips' pill with them. */
.tb-add .rem button.chip.pick { display: inline-flex; min-height: 0; padding: 1px 10px; border: 1px solid transparent; border-radius: 999px; background: var(--tag-bg); color: var(--tag-ink); font-weight: 500; }
.tb-add .rem button.chip.pick.on { background: var(--pine-soft); color: var(--accent-ink); border-color: var(--pine); }
.rem-custom { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rem-custom .ctl-num input { width: 4em; }
.notify-rem { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
/* Add task: the day and the time typed in the name light up. The lit layer lies over the box, its own letters unseen, so
   only the marks show; it takes no press. Its font and padding are the box's (add-task-dialog.js copies them). */
.at-title { position: relative; display: block; min-width: 0; }
.at-lit { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; box-sizing: border-box; border: 0 solid transparent;
  white-space: pre; color: transparent; pointer-events: none; user-select: none; -webkit-user-select: none; }
.at-lit > * { flex: none; }
.at-tok { color: transparent; border-radius: 4px; background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.at-tok.time { background: color-mix(in srgb, var(--ready) 24%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ready) 24%, transparent); }
.tb-add .at-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tb-add .at-time { margin-top: -4px; }

/* ---- WP-C: notes row menu, document icon ---- */
.notes-docs li { position: relative; }
.notes-docs a { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding-right: 36px; }
.notes-docs a .notes-doc-icon { grid-row: 1 / span 2; font-size: 20px; line-height: 1; }
.notes-docs a .notes-doc-name, .notes-docs a .notes-doc-when { grid-column: 2; }
.notes-docs a:not(:has(.notes-doc-icon)) .notes-doc-name, .notes-docs a:not(:has(.notes-doc-icon)) .notes-doc-when { grid-column: 1 / -1; }
.notes-doc-more { position: absolute; right: 2px; top: 50%; translate: 0 -50%; width: 28px; height: 28px; opacity: 0; }
.notes-docs li:hover .notes-doc-more, .notes-docs li:focus-within .notes-doc-more, .notes-doc-more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .notes-doc-more { opacity: 1; width: 44px; height: 44px; } }
.notes-row-menu { position: fixed; right: auto; top: 0; left: 0; z-index: 60; width: max-content; }
.notes-row-menu button { display: block; width: 100%; white-space: nowrap; }
.notes-icon-wrap { position: relative; flex: none; }
.notes-icon-btn { width: 44px; height: 44px; padding: 0; font-size: 26px; line-height: 1; background: none; border-color: transparent; color: var(--muted); }
.notes-icon-btn:hover, .notes-icon-btn:focus-visible { border-color: var(--line); }
.notes-icon-pop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 8px; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow); }
.notes-icon-grid { display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; }
.notes-icon-grid button { width: 36px; height: 36px; padding: 0; font-size: 20px; line-height: 1; background: none; border-color: transparent; }
.notes-icon-grid button:hover, .notes-icon-grid button:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.notes-icon-grid button.on { background: var(--pine-soft); border-color: var(--pine); }
.notes-icon-wrap + .notes-title { margin-left: 0; }
@media (max-width: 720px) { .notes-icon-grid { grid-template-columns: repeat(5, 40px); } .notes-icon-pop { max-width: calc(100vw - 32px); } }

/* ---- WP-D: add Project (project-dialog.js) ---- */
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + var(--music-room, 0px) + env(safe-area-inset-bottom)); z-index: 40;
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: var(--cur-pointer, pointer);
  background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow); }
.fab:hover { filter: brightness(1.08); }
.fab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.lp-ask.pd-dialog { width: min(600px, 100vw - 32px); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; }
.lp-ask.pd-dialog .pd-form { display: flex; flex-direction: column; gap: 0; max-height: inherit; }
.pd-form h3 { padding: 18px 20px 8px; }
.pd-body { display: grid; gap: 14px; padding: 8px 20px 16px; max-height: min(80vh, 720px); overflow: auto; }
.pd-form .hint { padding: 0 20px; margin: 4px 0; }
.pd-foot { position: sticky; bottom: 0; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--solid); }
.pd-pick { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pd-pick > .ctl-ta { flex: 1; min-width: 0; }
.pd-plus { flex: none; }
.my-projects-h { margin: 18px 0 4px; font: 500 16px/1.2 var(--font-display); }

/* ---- WP-E: @ mentions ---- */
.mention { padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink); }
.mention-pop { position: fixed; z-index: 70; margin: 0; padding: 4px; list-style: none; min-width: 200px; max-width: 280px; background: var(--solid); border: 1px solid var(--line); border-radius: var(--r-pop); box-shadow: var(--shadow); }
.mention-pop li { padding: 6px 10px; border-radius: 4px; cursor: var(--cur-pointer, pointer); white-space: nowrap; }
.mention-pop li.on, .mention-pop li:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* ---- WP-A: list select, bulk edit, Done column ---- */
/* Picked rows (list-ui-table.js onSelection): tinted; a Shift-click picks no words. */
.ult-row.ult-sel > td { background: linear-gradient(var(--pine-soft), var(--pine-soft)), var(--solid); }
.ult-row.ult-sel > td:first-child { box-shadow: inset 2px 0 0 var(--pine); }
/* "N selected · Edit · Clear" (list-bulk.js BulkBar), above the table. */
.ult-bulk { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 10px; border: 1px solid var(--pine); border-radius: var(--r-card); background: linear-gradient(var(--pine-soft), var(--pine-soft)), var(--paper); color: var(--accent-ink); }
.ult-bulk-n { font-weight: 600; margin-right: auto; }
/* The bulk edit dialog: one line per field, its label with the shared value or "different", the editor under it. */
.lp-ask.ult-bulk-edit { width: min(480px, 100vw - 32px); max-height: calc(100vh - 48px); overflow: auto; }
.ult-bulk-fields { display: grid; gap: 10px; }
.ult-bulk-field { display: grid; gap: 4px; min-width: 0; }
.ult-bulk-label { display: flex; align-items: baseline; gap: 8px; font-weight: 600; }
.ult-bulk-now { font-weight: 400; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ult-different { font-weight: 400; font-style: italic; color: var(--ink-dim); }
.ult-bulk-field input[type="text"], .ult-bulk-field textarea { width: 100%; box-sizing: border-box; }
/* The Done column: the done box in its cell, centred; its header a check mark. */
.ult-done-cell { width: 36px; min-width: 36px; text-align: center; padding-left: 4px; padding-right: 4px; }
.ult-done-cell > * { margin: 0 auto; }
.ult-th-icon { display: inline-flex; align-items: center; justify-content: center; }
.ult-th-icon svg { width: 14px; height: 14px; }

/* ---- WP-B: a Report's Export (report-export.js) and its PDF: the browser prints the Report and nothing else ---- */
.report-tools { margin: 0 0 10px; align-items: center; }
.report-export { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-export .lp-menu-list { left: 0; right: auto; }
.rx-btn { display: inline-flex; align-items: center; gap: 6px; }
.rx-btn svg { width: 16px; height: 16px; flex: none; }
.rx-busy { display: inline-flex; align-items: center; gap: 8px; }
@media print {
  :root[data-print="report"] { color-scheme: light; }
  :root[data-print="report"], :root[data-print="report"] body { background: Canvas; color: CanvasText; }
  :root[data-print="report"] body > :not(#root), :root[data-print="report"] .menu-btn, :root[data-print="report"] .top-tools, :root[data-print="report"] .side-wrap,
  :root[data-print="report"] main > :not(.report-page), :root[data-print="report"] .report-edit-acts, :root[data-print="report"] .report-tools,
  :root[data-print="report"] .ult-tool, :root[data-print="report"] .ult-bulk, :root[data-print="report"] .row-more { display: none !important; }
  :root[data-print="report"] .shell { display: block; min-height: 0; }
  :root[data-print="report"] main { margin: 0; padding: 0; width: auto; max-width: none; justify-self: stretch; background: none; box-shadow: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; will-change: auto; isolation: auto; }
  :root[data-print="report"] .recipe { border: 0; padding: 0; background: none; overflow: visible; }
  :root[data-print="report"] tr { break-inside: avoid; }
}

/* ---- WP-F: compact page header + scroll ribbon (page-head.js), spinners and busy states (busy.js) ---- */
/* A page's header (all but Today): the title, a one-line sub under it, the actions at its right; one compact row. */
main:has(.phead) { padding-top: 24px; }
.phead-mark { height: 0; }
.phead {
  position: sticky; top: 0; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 0 0 12px; min-width: 0;
}
.phead-text { flex: 1 1 260px; min-width: 0; }
.phead h1 { font: 500 28px/1.15 var(--font-display); letter-spacing: -0.01em; margin: 0; }
.phead-sub { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.phead-actions .mp-switch { margin: 0; }
.phead-actions .meta { margin: 0; }
/* Scrolled past: a thin ribbon held at the top of the window, the width of the page's card. */
.phead.ribbon {
  margin-inline: -40px; padding: 6px 40px; min-height: 52px;
  background: var(--solid); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.phead.ribbon h1 { font-size: 18px; }
.phead.ribbon .phead-sub { display: none; }
.phead.ribbon .phead-text { flex-basis: auto; }
main:has(.timer-bar) .phead.ribbon { top: calc(var(--timer-size, 40px) + 22px); } /* under the running timer's bar */
@media (prefers-reduced-motion: no-preference) {
  .phead.ribbon { animation: phead-in 160ms var(--ease); }
}
@keyframes phead-in { from { opacity: 0.6; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
  main:has(.phead) { padding-top: 16px; }
  .phead h1 { font-size: 26px; }
  .phead.ribbon { margin-inline: -16px; padding-inline: 16px; min-height: 44px; }
  .phead.ribbon h1 { font-size: 17px; }
  .phead-sub { white-space: normal; }
}

/* A spinner: a ring with one clear side, turning. Without motion it stands still (the text still says Loading). */
.spin {
  display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .spin, button[aria-busy="true"]::before { animation: spin 700ms linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 8px; }
/* A button whose write is out (busy.js useBusy): a small spinner before its label. */
button[aria-busy="true"]::before {
  content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-right: 6px; border-radius: 50%; vertical-align: -0.12em;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor;
}
/* "Saving…" / "Saved" (busy.js SavingPill), first of the top-right tools; empty, it takes no room. */
.saving-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; font-size: 13px; color: var(--ink-dim);
  background: var(--solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.saving-pill:empty { display: none; }

/* ---- Review fixes (nov27): header room ---- */
/* Wide window, menu shut: the fixed menu button (left 14px to 54px) sits over the ribbon's left edge, so the ribbon's
   title starts clear of it. */
@media (min-width: 1000px) {
  .shell:not(.nav-open) .phead.ribbon { padding-left: 72px; }
}
/* Phone: the actions (the Missions/Projects switch) share the title's row when they fit, the sub goes under both. */
@media (max-width: 720px) {
  .phead:has(.phead-actions) .phead-text { display: contents; }
  .phead:has(.phead-actions) h1 { flex: 1 1 auto; }
  .phead:has(.phead-actions) .phead-sub { order: 3; flex: 1 1 100%; margin-top: -6px; }
}
/* Report PDF: the list prints whole, down the pages, not as its on-screen scroll box. */
@media print {
  :root[data-print="report"] .ult-wrap { overflow: visible; max-height: none; contain: none; box-shadow: none; }
  :root[data-print="report"] .crumbs, :root[data-print="report"] .ult-bar { display: none !important; }
}
/* ---- go-live C1 ---- */
.gl-empty-lead { display: block; margin-bottom: 4px; color: var(--ink); }
/* ---- go-live C4 ---- */
.mp-focus-line { margin: 0 0 8px; }
.mp-interview-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Phone pass (docs/phone-pass.md): the interview button is a finger's size where nothing hovers. */
@media (hover: none) {
  .mp-interview-btn { min-height: 44px; }
}
/* ---- go-live C5 ---- */
.beta-note { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted, inherit); opacity: .85; }
.beta-note b { color: var(--accent-ink); }
.beta-note span { display: block; margin-top: 2px; }
.auth .beta-note { margin-top: 14px; }
.set-side .beta-note { margin: auto 8px 0; }
/* ---- go-live D2 ---- */
/* The sign-in screen (pages/auth.js): Google above an "or" rule, a text-link Forgot password, the captcha, the legal line. */
.auth-google { width: 100%; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-link { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--accent-ink); font-size: 13px; text-decoration: underline; }
.auth-link:hover { background: none; }
.auth-say { margin: 0; color: var(--muted); }
.auth-captcha:empty { display: none; }
.auth-legal { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.auth-legal a { color: inherit; }
/* Phone pass (docs/phone-pass.md): fields, buttons and the text link are a finger's size where nothing hovers. */
@media (hover: none) {
  .auth input, .auth button { min-height: 44px; box-sizing: border-box; }
  .auth-link { display: inline-flex; align-items: center; }
}
/* ---- go-live E1 ---- */
/* The landing page (pages/landing.js): a signed-out visitor at /. One glass sheet over the Theme, like the sign-in card.
   The try-it Today card is the one bold thing; the rest stays quiet. */
.landing {
  max-width: 1080px; margin: 5vh auto; padding: 26px 44px 44px; width: calc(100% - 40px); box-sizing: border-box;
  background: var(--card-bg); border-radius: var(--r-card); box-shadow: var(--shadow);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); will-change: var(--glass-keep); isolation: isolate;
}
.ld-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ld-mark { font: 500 22px/1.2 var(--font-display); color: var(--ink); }
.ld-mark span { color: var(--accent-ink); }
.ld-signin { font-weight: 600; color: var(--accent-ink); text-decoration: none; padding: 6px 12px; border-radius: var(--r-btn); }
.ld-signin:hover { background: var(--pine-soft); }
.ld-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 64px 0 56px; }
.ld-copy h1 {
  font: 500 clamp(38px, 5.2vw, 62px)/1.04 var(--font-display); letter-spacing: -0.015em; margin: 0 0 22px;
  max-width: 13ch; text-wrap: balance; color: var(--ink);
}
.ld-pitch { font-size: 18px; line-height: 1.55; color: var(--ink-dim); max-width: 44ch; margin: 0 0 30px; text-wrap: pretty; }
.ld-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ld-start {
  display: inline-block; padding: 12px 28px; border-radius: var(--r-btn); font-size: 17px; font-weight: 600; text-decoration: none;
  background: var(--pine); color: var(--on-accent);
}
.ld-start:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.ld-start:focus-visible, .ld-signin:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.ld-beta { margin: 0; font-size: 14px; color: var(--ink-dim); max-width: 30ch; }
.ld-demo, .ld-clip { margin: 0; }
.ld-demo {
  padding: 20px 22px 16px; background: var(--solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
}
.ld-demo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ld-demo-title { font: 500 26px/1.1 var(--font-display); }
.ld-ring { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-dim); }
.ld-ring b { color: var(--ink); font-weight: 600; }
.ld-ring circle { fill: none; stroke-width: 5; }
.ld-ring-track { stroke: var(--line); }
.ld-ring-done { stroke: var(--check); stroke-linecap: round; }
.ld-demo-list { list-style: none; margin: 0; padding: 0; }
.ld-demo-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); }
.ld-demo-list label { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: var(--cur-pointer, pointer); }
.ld-demo-list li.done .ld-demo-name { color: var(--ink-dim); text-decoration: line-through; }
.ld-chip { flex: none; font-size: 13px; padding: 1px 10px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-ink); }
.ld-chip.late { color: var(--warn-ink); }
.ld-demo figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-dim); }
.ld-clip video { display: block; width: 100%; border-radius: 18px; box-shadow: var(--shadow); background: var(--solid); }
.ld-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.ld-points h2 { font: 500 21px/1.25 var(--font-display); margin: 0 0 8px; padding: 0; border: 0; letter-spacing: normal; text-transform: none; color: var(--ink); }
.ld-points p { margin: 0; font-size: 15px; color: var(--ink-dim); max-width: 34ch; }
@media (max-width: 820px) {
  .landing { margin: 12px auto; padding: 18px 20px 30px; width: calc(100% - 24px); }
  .ld-hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 36px 0 36px; }
  .ld-demo { transform: none; }
  .ld-points { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ld-ring-done { transition: stroke-dasharray 420ms var(--ease); }
  .ld-demo-name { transition: color 200ms var(--ease); }
}
/* Phone pass (docs/phone-pass.md): the Sign in link is a finger's size where nothing hovers. */
@media (hover: none) {
  .ld-signin { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
}
/* ---- Feedback (pages/feedback.js) ---- */
.lp-ask.fb-ask { width: min(440px, 100vw - 32px); }
.fb-ask textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 120px; font: inherit; }
@media (hover: none) { .fb-ask textarea { font-size: 16px; } } /* a phone browser zooms in on anything smaller */
/* ---- go-live D3 ---- */
/* Settings -> Account (pages/account.js): the delete sits apart, under a line, and asks for DELETE in place. */
.acct { gap: 18px; }
.acct-email { overflow-wrap: anywhere; }
.acct-danger { padding-top: 14px; border-top: 1px solid var(--line); }
.acct-confirm { display: flex; flex-direction: column; gap: 8px; }
.acct-confirm input { width: 14em; max-width: 100%; }
/* ---- go-live A3 ---- */
/* The assistant's sign-in page (/oauth/consent, pages/oauth.js) and Settings -> AI's signed-in assistants. */
.oauth { max-width: 420px; }
.oauth-signin .oauth-lead { max-width: 340px; margin: 12vh auto -14vh; text-align: center; color: var(--ink); }
.oauth-ask { margin: 0; }
.oauth-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.oauth p.dimtext { margin: 0; }
.oauth .linkish { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: var(--cur-pointer, pointer); font: inherit; }
.oauth-grant-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.oauth-grant-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.oauth-grant-name { font-weight: 500; }

/* ---- go-live B1 ---- */
.mc-plan { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mc-plan-btn { display: inline-flex; align-items: center; gap: 6px; }
.mc-plan-note { margin: 0; }

/* ---- go-live C2 ---- */
/* "Connect your assistant": Today's card and Settings -> AI (pages/connect.js). */
/* The card wears the PM note's look (.pm-note): here only what differs. */
.cn-card { gap: 8px; }
.cn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cn-how { margin: 0; }
.cn-steps { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
.cn-url { display: flex; gap: 6px; width: 100%; max-width: 560px; }
.cn-url input { flex: 1; min-width: 0; }
.cn-test { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cn-test-btn { display: inline-flex; align-items: center; gap: 6px; }
/* ---- go-live C3 ---- */
.pg-bar { margin-bottom: 8px; align-items: center; }
.pg-note { min-height: 1.4em; margin: 0 0 12px; }
.pg-group { margin-bottom: 28px; }
.pg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pg-card { border: 1px solid var(--line, currentColor); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pg-card h3 { margin: 0; }
.pg-card p { margin: 0; }
.pg-card .row { margin-top: auto; }
.pg-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 8px 0 0; }
.pg-url { overflow-wrap: anywhere; }
.pg-card button.primary { color: var(--on-accent); }
/* ---- go-live G2 ---- */
/* Phone pass (docs/phone-pass.md): on a phone the Boards bar and an add row wrap instead of pushing the page sideways, and
   the small buttons grow to a finger's size where nothing hovers. */
.lb-by, .addrow { flex-wrap: wrap; }
@media (hover: none) {
  button.tiny, button.chip.pick, .display-seg button, .display-seg a, .notes-tool, .mp-star { min-height: 44px; }
  .notes-tool, .mp-star, .lb-fold.tiny { min-width: 44px; }
  summary { padding-block: 10px; }
}
/* ---- announce cards ---- */
/* Today's one-time card (pages/announce.js): the Connect card's look (.cn-card); a link action is a finger's size on touch. */
.an-action { align-self: flex-start; }
@media (hover: none) {
  .an-action { display: inline-flex; align-items: center; min-height: 44px; }
}
/* ---- today-rows ---- */
/* Today's rows (pages/today.js): a subtask reads "Top parent : Subtask", the parent quieter and cut first; the Project sits in
   the middle of the row, at the same place on every row. On a phone it goes under the title, cut to one line. */
.td-body { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); grid-template-areas: "name proj" "meta proj"; column-gap: 24px; row-gap: 2px; align-items: center; }
.td-body:not(:has(> .td-proj)) { grid-template-areas: "name name" "meta meta"; }
.td-name { grid-area: name; display: flex; align-items: baseline; min-width: 0; }
.td-name .td-title { flex: 0 1 auto; min-width: 0; align-self: auto; }
.td-parent ~ .td-title { flex-shrink: 0; max-width: calc(100% - 4em); } /* the leaf keeps its room; the parent takes what is left */
.td-meta { grid-area: meta; }
.td-parent {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-dim); font-size: 14px; font-weight: 500; text-decoration: none;
}
.td-sep { flex: none; margin: 0 6px 0 3px; color: var(--ink-dim); }
.td-proj {
  grid-area: proj; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-dim); font-size: 13px; text-decoration: none;
}
.td-parent:hover, .td-proj:hover { color: var(--accent-ink); text-decoration: underline; }
.td-parent:focus-visible, .td-proj:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.zen-parent { color: var(--zen-dim); font-size: 0.8em; }
@media (max-width: 720px) {
  .td-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "proj" "meta"; }
  .td-body:not(:has(> .td-proj)) { grid-template-areas: "name" "meta"; }
}
/* ---- report-fold-all ---- */
/* A grouped table's fold-all toggle (list-ui-table.js), at the right end of the first header: the name keeps its place. */
.ult th.has-fold-all > .ult-sort { padding-right: 38px; } /* the button (28px), its 6px from the edge and a 4px gap */
.ult-fold-all { position: absolute; inset-block: 0; right: 6px; z-index: 3; margin-block: auto; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: var(--r-btn); background: none; color: var(--ink-dim); -webkit-tap-highlight-color: transparent; }
.ult-fold-all:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.ult-fold-all:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
.ult-fold-all .ult-chev { color: inherit; }
html[data-skin="pixel"] .ult-fold-all { color: var(--on-accent); }
html[data-skin="pixel"] .ult-fold-all:hover { background: var(--px-glint); color: var(--on-accent); }
@media (hover: none) {
  .ult-fold-all { right: 0; width: 44px; height: 44px; }
  .ult th.has-fold-all > .ult-sort { padding-right: 48px; }
}

/* ---- People slice 1 ---- */
/* Settings -> People (people.js): the people list, the link made once, Join with a code; the Inbox's "Given to you". */
.people { display: flex; flex-direction: column; gap: 12px; }
.people-h { margin: 8px 0 0; font-size: 14px; }
.people-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.people-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.people-name { font-weight: 700; overflow-wrap: anywhere; }
.people-row > .dimtext { grid-column: 1; font-size: 12px; overflow-wrap: anywhere; }
.people-acts { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.people-add, .people-join { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.people-add input[type="text"], .people-join input[type="text"] { width: min(100%, 320px); }
.people-code { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed var(--accent); border-radius: 6px; }
.people-code input { width: 100%; font-family: var(--mono, monospace); font-size: 12px; }
.people-code-text { font-family: var(--mono, monospace); font-weight: 700; letter-spacing: 1px; user-select: all; }
.people-found { margin: 0; }
.shared-tasks { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.shared-head { margin: 0; font-size: 15px; display: flex; align-items: baseline; gap: 8px; }
.tp-assignee { min-width: 120px; }
.tp-given { display: block; font-size: 12px; max-width: 220px; }
.shared-desc { grid-column: 1; font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.people-warn { grid-column: 1; font-size: 12px; color: var(--warn-ink); font-weight: 600; overflow-wrap: anywhere; }
.people button.tiny.primary { color: var(--on-accent); }
@media (hover: none) {
  .people button, .people input[type="text"] { min-height: 44px; box-sizing: border-box; }
}
@media (max-width: 720px) {
  .people-row { grid-template-columns: minmax(0, 1fr); }
  .people-acts { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

/* Settings -> People, the Team part (people.js TeamPart, slice 2). */
.people-team { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.people-team-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.people-team-new { display: flex; flex-direction: column; gap: 8px; }
.people-team-new input[type="text"] { width: min(100%, 320px); }
.people-add-team { border-top: 0; padding-top: 0; }
.people-team-acts { gap: 6px; }
