/* Layout: sidebar on a tinted canvas, content in one inset rounded panel (Linear / Plane style). Few borders, quiet chrome, color only where it carries meaning. */
:root {
  --canvas: #f3f3f5;
  --surface: #ffffff;
  --surface-2: #f8f8fa;
  --surface-3: #f2f2f5;
  --hover: #f1f1f4;
  --active: #e9e9ee;
  --border: #e7e7ec;
  --border-soft: #efeff3;
  --border-strong: #d9d9e0;
  --fg: #1b1b21;
  --fg-2: #3d3d46;
  --muted: #6f6f7b;
  --faint: #a2a2ad;
  --accent: #5b5bd6;
  --accent-hover: #4f4fca;
  --accent-fg: #ffffff;
  --accent-soft: #efeffd;
  --accent-line: #cfcff6;
  --series-1: #5b5bd6;
  --series-2: #c9c9f2;
  --danger: #d93f45;
  --danger-soft: #fdeeee;
  --warn: #b5730a;
  --warn-soft: #fff5e3;
  --ok: #24855a;
  --ok-soft: #e8f6ee;
  --scrim: rgba(24, 24, 36, 0.16);
  --panel-shadow: 0 0 0 1px rgba(24, 24, 40, 0.06), 0 1px 2px rgba(24, 24, 40, 0.04), 0 4px 16px -8px rgba(24, 24, 40, 0.08);
  --card-shadow: 0 0 0 1px rgba(24, 24, 40, 0.06), 0 1px 2px rgba(24, 24, 40, 0.05);
  --card-shadow-hover: 0 0 0 1px rgba(24, 24, 40, 0.09), 0 4px 12px -4px rgba(24, 24, 40, 0.12);
  --pop-shadow: 0 0 0 1px rgba(24, 24, 40, 0.07), 0 10px 32px -6px rgba(24, 24, 40, 0.18), 0 2px 6px rgba(24, 24, 40, 0.05);
  --lift: 0%;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 7px;
  --r-lg: 12px;
  --sbw: 240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0c0c0f;
    --surface: #141418;
    --surface-2: #18181d;
    --surface-3: #1c1c22;
    --hover: #1e1e24;
    --active: #26262e;
    --border: #25252c;
    --border-soft: #1f1f25;
    --border-strong: #31313a;
    --fg: #ececf1;
    --fg-2: #c8c8d0;
    --muted: #8e8e9a;
    --faint: #5f5f6a;
    --accent: #7c7cf0;
    --accent-hover: #8c8cf5;
    --accent-fg: #ffffff;
    --accent-soft: #23234a;
    --accent-line: #3a3a78;
    --series-1: #8585f2;
    --series-2: #3a3a72;
    --danger: #f06469;
    --danger-soft: #3a1c1f;
    --warn: #eda63c;
    --warn-soft: #352914;
    --ok: #4cc286;
    --ok-soft: #142e21;
    --scrim: rgba(0, 0, 0, 0.45);
    --panel-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --card-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4);
    --card-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 16px -6px rgba(0, 0, 0, 0.6);
    --pop-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 40px -8px rgba(0, 0, 0, 0.7);
    --lift: 22%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0c0c0f;
  --surface: #141418;
  --surface-2: #18181d;
  --surface-3: #1c1c22;
  --hover: #1e1e24;
  --active: #26262e;
  --border: #25252c;
  --border-soft: #1f1f25;
  --border-strong: #31313a;
  --fg: #ececf1;
  --fg-2: #c8c8d0;
  --muted: #8e8e9a;
  --faint: #5f5f6a;
  --accent: #7c7cf0;
  --accent-hover: #8c8cf5;
  --accent-fg: #ffffff;
  --accent-soft: #23234a;
  --accent-line: #3a3a78;
  --series-1: #8585f2;
  --series-2: #3a3a72;
  --danger: #f06469;
  --danger-soft: #3a1c1f;
  --warn: #eda63c;
  --warn-soft: #352914;
  --ok: #4cc286;
  --ok-soft: #142e21;
  --scrim: rgba(0, 0, 0, 0.45);
  --panel-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 16px -6px rgba(0, 0, 0, 0.6);
  --pop-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 40px -8px rgba(0, 0, 0, 0.7);
  --lift: 22%;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* On auto the app sits inside the theme's section wrappers (#section-app > #hub-root,
   both tagged data-section-name="hub-app"); they have to hand the full height down. */
html, body, #app, [data-section-name="hub-app"] { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--fg); font: 13px/1.5 var(--font); letter-spacing: -0.003em; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea, select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ic { flex: none; display: block; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; font: 500 11px/1 var(--font); color: var(--muted); background: var(--surface-3); box-shadow: inset 0 -1px 0 var(--border); }
::selection { background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- entity marks ---------- */
.sico { color: color-mix(in oklab, var(--c), #ffffff var(--lift)); }
.sico .glyph { fill: var(--surface); stroke: var(--surface); }
.pico .on { fill: var(--fg-2); }
.pico .off { fill: var(--border-strong); }
.pico.crit { color: color-mix(in oklab, #ef5a2a, #ffffff var(--lift)); }
.pico .glyph { fill: var(--surface); }
.tico { color: color-mix(in oklab, var(--c), #ffffff var(--lift)); display: inline-flex; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in oklab, var(--c), #ffffff var(--lift)); flex: none; }
.sq { width: 10px; height: 10px; border-radius: 3px; background: color-mix(in oklab, var(--c), #ffffff var(--lift)); flex: none; }
.av { --av: #888; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(145deg, color-mix(in oklab, var(--av), #fff 32%), var(--av) 70%); color: #fff; font-size: 8.5px; font-weight: 650; text-shadow: 0 1px 1px rgba(0,0,0,.15); display: inline-flex; align-items: center; justify-content: center; flex: none; letter-spacing: 0; }
.av.lg { width: 28px; height: 28px; font-size: 11px; }
.av.xl { width: 36px; height: 36px; font-size: 13px; }
.av.agent { background: linear-gradient(145deg, #f3b37a, #d97757 50%, #b4589a); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.av.none { background: transparent; border: 1px dashed var(--border-strong); color: var(--faint); }
.av.more { background: var(--surface-3); color: var(--muted); font-size: 9.5px; }
.avs { display: inline-flex; align-items: center; }
.avs .av { box-shadow: 0 0 0 2px var(--surface); }
.avs .av + .av { margin-left: -5px; }
.tag { --c: #8a8a96; display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 550; white-space: nowrap; background: color-mix(in oklab, var(--c) 13%, var(--surface)); color: color-mix(in oklab, var(--c) 80%, var(--fg)); }
.gpill { --c: #8a8a96; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 7px; background: color-mix(in oklab, var(--c) 13%, var(--surface)); color: color-mix(in oklab, var(--c) 75%, var(--fg)); font-weight: 600; font-size: 12.5px; white-space: nowrap; min-width: 0; }
.tag .dot { width: 6px; height: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--surface-3); color: var(--fg-2); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.date { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.date .ic { opacity: .8; }
.date.over { color: var(--danger); }
.date.soon { color: var(--warn); }
.prog { width: 40px; height: 4px; border-radius: 2px; background: var(--active); overflow: hidden; flex: none; }
.prog > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.proj-ic { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(145deg, color-mix(in oklab, var(--c), #fff 18%), var(--c)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); flex: none; }
.proj-ic.lg { width: 28px; height: 28px; border-radius: 8px; }
.team-ic { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 650; background: var(--active); color: var(--fg-2); flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; background: var(--surface); color: var(--fg-2); font-weight: 500; white-space: nowrap; box-shadow: var(--card-shadow); transition: background .12s, box-shadow .12s, transform .06s; }
.btn:hover { background: var(--surface-2); box-shadow: var(--card-shadow-hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-fg); box-shadow: 0 1px 2px rgba(40, 40, 120, .25), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { box-shadow: none; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--fg); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.ibtn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); flex: none; transition: background .12s, color .12s; }
.ibtn:hover { background: var(--hover); color: var(--fg); }
.ibtn.sm { width: 24px; height: 24px; border-radius: 6px; }
.ibtn.on { color: #e3a008; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; color: var(--fg-2); font-weight: 500; white-space: nowrap; transition: background .12s; }
.tbtn:hover { background: var(--hover); }
.tbtn .ic { color: var(--muted); }
.tbtn.on { background: var(--accent-soft); color: var(--accent); }
.tbtn.on .ic { color: var(--accent); }
.tbtn.tree-sw .switch { width: 24px; height: 14px; }
.tbtn.tree-sw .switch::after { top: 2px; left: 2px; width: 10px; height: 10px; }
.tbtn.tree-sw .switch.on::after { transform: translateX(10px); }
.tbtn b { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--surface-3); gap: 2px; }
.seg button { height: 26px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; transition: background .12s, color .12s; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: var(--card-shadow); }
.switch { width: 30px; height: 18px; border-radius: 9px; background: var(--border-strong); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(12px); }
.cb { width: 15px; height: 15px; border: 1.5px solid var(--border-strong); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface); color: var(--accent-fg); transition: background .1s, border-color .1s; }
.cb.on { background: var(--accent); border-color: var(--accent); }
.cb svg { opacity: 0; }
.cb.on svg { opacity: 1; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 64px var(--sbw) minmax(0, 1fr); grid-template-rows: 52px minmax(0, 1fr); grid-template-areas: "top top top" "rail sb main"; height: 100%; background: var(--canvas); }
.app.ai-open { grid-template-columns: 64px var(--sbw) minmax(0, 1fr) 384px; grid-template-areas: "top top top top" "rail sb main ai"; }
.app.collapsed { --sbw: 0px; }
.app.collapsed .sb { visibility: hidden; }
.topbar { grid-area: top; display: grid; grid-template-columns: calc(64px + var(--sbw)) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 12px 0 0; min-width: 0; }
.tb-left { display: flex; align-items: center; gap: 4px; padding-left: 12px; min-width: 0; }
.tb-right { display: flex; align-items: center; gap: 6px; }
.gsearch { justify-self: center; width: min(560px, 100%); display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 14px; border-radius: 10px; background: var(--surface); box-shadow: var(--card-shadow); color: var(--faint); transition: box-shadow .12s; }
.gsearch:hover { box-shadow: var(--card-shadow-hover); }
.gsearch .ph-text { flex: 1; text-align: left; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px 0 11px; border-radius: 10px; font-weight: 550; color: color-mix(in oklab, var(--accent) 85%, var(--fg)); background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 13%, var(--surface)), color-mix(in oklab, #e0609c 12%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 22%, transparent); transition: filter .12s, box-shadow .12s; white-space: nowrap; }
.ai-btn:hover { filter: brightness(1.03); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 40%, transparent), 0 4px 14px -6px color-mix(in oklab, var(--accent) 50%, transparent); }
.ai-btn.on { background: linear-gradient(135deg, var(--accent), #c8559a); color: #fff; box-shadow: 0 4px 14px -6px color-mix(in oklab, var(--accent) 70%, transparent); }
.ai-btn.sm { height: 30px; padding: 0 10px 0 9px; font-size: 12.5px; border-radius: 8px; }
.me-btn { border-radius: 50%; padding: 2px; }
.bell { position: relative; }
.bell .badge { position: absolute; top: 1px; right: -1px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; background: var(--danger); box-shadow: 0 0 0 2px var(--canvas); }
.me-btn:hover { box-shadow: 0 0 0 2px var(--active); }
.rail { grid-area: rail; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 10px; min-height: 0; }
.rail-i { width: 56px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0 4px; border-radius: 10px; color: var(--muted); }
.rail-ic { width: 36px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; position: relative; transition: background .12s, color .12s; }
.rail-l { font-size: 10.5px; font-weight: 550; letter-spacing: 0; }
.rail-i:hover .rail-ic { background: var(--hover); color: var(--fg); }
.rail-i:hover { color: var(--fg-2); }
.rail-i.on { color: var(--fg); }
.rail-i.on .rail-ic { background: var(--surface); color: var(--accent); box-shadow: var(--card-shadow); }
.rail-badge { position: absolute; top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font: 600 10px/16px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--canvas); }
.sb { grid-area: sb; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.sb-head { display: flex; align-items: center; gap: 2px; padding: 6px 6px 4px 16px; height: 40px; font-weight: 650; font-size: 14px; letter-spacing: -0.01em; }
.sb-head span { flex: 1; }
.sb-card { margin: 8px; padding: 12px; border-radius: 12px; background: linear-gradient(150deg, color-mix(in oklab, #d97757 12%, var(--surface)), color-mix(in oklab, var(--accent) 10%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 16%, transparent); display: flex; flex-direction: column; gap: 6px; }
.sb-card-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.sb-card-h .ic { color: #d97757; }
.sb-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.sb-card .btn { align-self: flex-start; }
.sb-top { display: flex; align-items: center; gap: 2px; padding: 10px 8px 6px 10px; }
.ws { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 4px; border-radius: 8px; min-width: 0; flex: 1; }
.ws:hover { background: var(--hover); }
.ws-logo { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(140deg, var(--accent), color-mix(in oklab, var(--accent), #000 25%)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.ws-name { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.sb .compose { background: var(--surface); box-shadow: var(--card-shadow); color: var(--fg-2); }
.sb-scroll { flex: 1; overflow-y: auto; padding: 6px 8px 16px; scrollbar-width: thin; }
.sb-main { display: flex; flex-direction: column; gap: 1px; }
.sb-sec { margin-top: 16px; }
.sb-sec-h { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 2px 8px; height: 26px; }
.sb-sec-h > button { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--faint); border-radius: 5px; padding: 2px 4px; margin-left: -4px; }
.sb-sec-h > button:hover { color: var(--fg-2); }
.sb-sec-h .chev { opacity: 0; transition: transform .15s, opacity .15s; }
.sb-sec-h:hover .chev { opacity: 1; }
.sb-sec.closed .chev { transform: rotate(-90deg); opacity: 1; }
.sb-sec.closed .sb-sec-b { display: none; }
.sb-sec-b { display: flex; flex-direction: column; gap: 1px; }
.nav { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 7px; color: var(--fg-2); width: 100%; text-align: left; font-weight: 450; transition: background .1s; }
.nav:hover { background: var(--hover); }
.nav.on { background: var(--surface); color: var(--fg); font-weight: 550; box-shadow: var(--card-shadow); }
.nav > svg.ic:not(.sico):not(.pico) { color: var(--muted); }
.nav.on > svg.ic:not(.sico):not(.pico) { color: var(--fg-2); }
.nav .cnt { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; display: inline-flex; }
.nav .cnt.danger { color: var(--danger); }
.nav .cnt.badge { color: var(--accent-fg); }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 4px 17px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-sub .nav { height: 27px; font-size: 12.5px; color: var(--muted); }
.nav-sub .nav.on { color: var(--fg); }
.sb-foot { padding: 8px; display: flex; align-items: center; gap: 4px; }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 6px; border-radius: 8px; font-weight: 500; }
.me:hover { background: var(--hover); }

.main { grid-area: main; display: flex; min-width: 0; min-height: 0; padding: 0 8px 8px 0; }
.app.collapsed .main { padding-left: 0; }
.panel { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--panel-shadow); overflow: hidden; container-type: inline-size; }
@container (max-width: 1000px) { .home-grid .span-8, .home-grid .span-4 { grid-column: span 12; } .dash .t-4, .dash .t-6 { grid-column: span 12; } }
@container (max-width: 760px) { .hstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home { padding: 22px 18px 40px; } }
.ph { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px 22px; flex: none; }
.ph-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crumbs { font-size: 12px; color: var(--faint); font-weight: 500; }
.crumb { display: flex; align-items: center; gap: 9px; min-width: 0; }
.crumb h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -0.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.vbar { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--border-soft); flex: none; }
.tabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; transition: background .12s, color .12s; position: relative; flex: none; }
.tab .ic { opacity: .85; }
.tab:hover { background: var(--hover); color: var(--fg); }
.tab.on { color: var(--fg); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-soft); }
.tab.add { padding: 0 8px; color: var(--faint); }
.tab .dirty-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); display: inline-block; }
.tab-sep { width: 1px; height: 16px; background: var(--border); margin: 0 6px; flex: none; }
.vtools { display: flex; align-items: center; gap: 2px; flex: none; }
.vsearch { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; width: 210px; color: var(--faint); background: var(--surface-3); margin-right: 4px; }
.vsearch input { border: 0; outline: 0; background: transparent; width: 100%; padding: 0; height: 28px; box-shadow: none; }
.vsearch input:focus-visible { box-shadow: none; }
.vsearch:focus-within { box-shadow: 0 0 0 1px var(--accent-line), 0 0 0 3px var(--accent-soft); background: var(--surface); }

.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--border-soft); flex: none; }
.rule { display: inline-flex; align-items: stretch; height: 26px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; font-size: 12.5px; max-width: 100%; }
.rule > button { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; color: var(--fg-2); white-space: nowrap; min-width: 0; }
.rule > button:hover { background: var(--hover); }
.rule > button + button { box-shadow: inset 1px 0 0 var(--border); }
.rule .f { color: var(--fg-2); font-weight: 500; }
.rule .f .ic { color: var(--muted); }
.rule .o { color: var(--muted); }
.rule .v { font-weight: 500; max-width: 260px; }
.rule .x { padding: 0 6px; color: var(--faint); }
.rule.quick { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rule.quick > button { color: var(--accent); }
.rule.quick > button + button { box-shadow: none; }
.match, .addf { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.match:hover, .addf:hover { background: var(--hover); color: var(--fg); }
.fcount { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; margin-right: 4px; }

.content { flex: 1; overflow: auto; position: relative; min-height: 0; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 72px 20px; color: var(--muted); text-align: center; }
.empty h3 { margin: 6px 0 0; color: var(--fg); font-size: 14px; font-weight: 600; }
.empty p { margin: 0 0 8px; max-width: 42ch; }

/* ---------- list ---------- */
.list { padding-bottom: 96px; }
.ghd { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; background: color-mix(in oklab, var(--surface-2) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-soft); border-top: 1px solid var(--border-soft); font-weight: 550; margin-top: -1px; }
.ghd .cnt { color: var(--faint); font-weight: 450; font-variant-numeric: tabular-nums; }
.ghd .meta { color: var(--faint); font-size: 12px; font-weight: 450; }
.ghd .chev { color: var(--faint); transition: transform .15s; }
.ghd.closed .chev { transform: rotate(-90deg); }
.ghd .add { margin-left: auto; opacity: 0; transition: opacity .12s; }
.ghd:hover .add { opacity: 1; }
.ghd.drop { background: var(--accent-soft); }
.sghd { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 36px; font-size: 12.5px; font-weight: 550; color: var(--fg-2); }
.sghd .cnt { color: var(--faint); font-weight: 450; }
.row { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px 0 8px; position: relative; transition: background .08s; }
.dense .row { height: 34px; }
.row:hover { background: var(--surface-2); }
.row.sel { background: var(--accent-soft); }
.row.focus { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.row.child { padding-left: 32px; }
.row .rcb { opacity: 0; transition: opacity .1s; }
.row:hover .rcb, .row.sel .rcb, .list.selecting .rcb { opacity: 1; }
.row .key { width: 70px; flex: none; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.row .ttl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.row .ttl .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; cursor: pointer; color: var(--fg); }
.row .ttl .name:hover { color: var(--accent); }
.row .meta { display: flex; align-items: center; gap: 12px; flex: none; }
.row .meta .tags { display: flex; gap: 4px; }
.row .meta .due { width: 62px; display: flex; justify-content: flex-end; }
.row.done .name { color: var(--muted); }
.hit { display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; min-width: 22px; height: 22px; transition: background .1s; }
.hit:hover { background: var(--active); }
.subcnt { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); padding: 0 5px; height: 20px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.subcnt:hover { background: var(--active); }
.inline-new { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 42px; background: var(--surface-2); }
.inline-new input { flex: 1; height: 30px; padding: 0 10px; }

.bulk { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 12px; background: var(--surface); box-shadow: var(--pop-shadow); max-width: calc(100% - 32px); overflow-x: auto; }
.bulk .n { font-weight: 600; padding: 0 10px 0 8px; white-space: nowrap; border-right: 1px solid var(--border); margin-right: 4px; }
.bulk .btn { box-shadow: none; background: transparent; }
.bulk .btn:hover { background: var(--hover); }
.bulk .btn.bf-again { color: var(--danger); background: var(--danger-soft); margin-right: 4px; }
.bulk .btn.bf-again:hover { background: color-mix(in oklab, var(--danger) 14%, var(--surface)); }

/* bulk fix-up: what a bulk change couldn't save */
.modal.bf { width: min(720px, 100%); display: flex; flex-direction: column; max-height: calc(88vh - 16px); }
.modal.bf .modal-b { overflow-y: auto; min-height: 0; }
.bf-ic { display: inline-flex; color: var(--danger); }
.bf-what { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.bf-what b { color: var(--fg-2); font-weight: 600; }
.bf-list { display: flex; flex-direction: column; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); }
.bf-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.bf-row:last-child { border-bottom: 0; }
.bf-top { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.bf-top .mono { font-size: 11.5px; flex: none; }
.bf-top .btn { flex: none; }
.bf-name { font-weight: 550; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: left; }
button.bf-name:hover { color: var(--accent); text-decoration: underline; }
.bf-why { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.45; color: var(--danger); }
.bf-why .ic { margin-top: 2px; }
.bf-row.unsure .bf-why { color: var(--warn); }
.bf-row.denied .bf-why, .bf-row.gone .bf-why { color: var(--muted); }
.bf-fields { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.bf-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); min-width: 0; }
.bf-f.wide { flex: 1 1 100%; }
.bf-f input { height: 30px; padding: 0 8px; }
.bf-f input[type="number"] { width: 96px; }
.bf-f .pbtn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bf-f.bad > span { color: var(--danger); }
.bf-f.bad input { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.bf-f.bad .pbtn { box-shadow: inset 0 0 0 1px var(--danger), 0 0 0 3px var(--danger-soft); }
.bf-ic.ok { color: var(--ok); }
.bf-row.held .bf-why { color: var(--fg-2); font-weight: 500; }
.bf-row.held .bf-why .ic { color: var(--warn); }
/* the tasks holding a row back, nested under it */
.bf-hold { display: flex; flex-direction: column; margin-left: 6px; padding-left: 10px; border-left: 2px solid var(--border); min-width: 0; }
.bf-hrow { display: flex; flex-direction: column; gap: 4px; padding: 5px 0; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.bf-hrow:last-of-type { border-bottom: 0; }
.bf-htop { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; }
.bf-htop .mono { font-size: 11px; flex: none; }
.bf-htop .pbtn { height: 24px; padding: 0 8px; font-size: 12px; flex: none; }
.bf-htop .btn, .bf-htop .av, .bf-htop .pill { flex: none; }
.bf-htop .bf-name { font-weight: 500; }
.bf-hrow.done .bf-name { color: var(--muted); text-decoration: line-through; }
.bf-hrow.skipped .bf-htop > :not([data-a="bfkskip"]) { opacity: .5; }
.bf-hok { display: inline-flex; color: var(--ok); flex: none; }
.bf-hwhy, .bf-hnote { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.bf-hwhy .ic { color: var(--warn); flex: none; }
.bf-hacts { display: flex; align-items: center; gap: 6px; padding: 6px 0 2px; flex-wrap: wrap; font-size: 12.5px; }
.bf-hacts.confirm { background: var(--warn-soft); border-radius: 8px; padding: 6px 8px; margin-top: 4px; color: var(--fg-2); }
.bf-link { color: var(--accent); text-decoration: underline; font: inherit; }

/* ---------- board ---------- */
.ly-board { background: var(--surface-2); }
.board-wrap { padding: 14px 14px 32px; min-height: 100%; }
.lane { margin-bottom: 18px; }
.lane-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 600; }
.lane-h .cnt { color: var(--faint); font-weight: 450; }
.board { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.col { width: 292px; flex: none; display: flex; flex-direction: column; border-radius: 12px; transition: background .12s; }
.col.collapsed { width: 40px; align-items: center; padding: 10px 0; gap: 10px; cursor: pointer; background: var(--surface-3); }
.col.collapsed:hover { background: var(--active); }
.col.collapsed .vlabel { writing-mode: vertical-rl; font-weight: 550; color: var(--fg-2); white-space: nowrap; }
.col-h { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 4px 0 8px; font-weight: 600; }
.col-h .cnt { color: var(--faint); font-weight: 450; font-variant-numeric: tabular-nums; }
.col-h .wip { font-size: 11.5px; font-weight: 500; color: var(--faint); }
.col-h .wip.over { color: var(--danger); }
.col-h .hours { margin-left: auto; font-size: 11.5px; color: var(--faint); font-weight: 450; font-variant-numeric: tabular-nums; }
.col-h .ibtn { opacity: 0; }
.col:hover .col-h .ibtn { opacity: 1; }
.col-body { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 6px; min-height: 48px; }
.col.drop, .cal-day.drop, .sp.drop .sp-body, .wl-drop.drop { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.card { background: var(--surface); border-radius: 10px; padding: 11px 12px 10px; display: flex; flex-direction: column; gap: 8px; cursor: grab; box-shadow: var(--card-shadow); transition: box-shadow .14s, transform .14s; }
.card:hover { box-shadow: var(--card-shadow-hover); }
.card.dragging { opacity: .4; transform: rotate(1.5deg); }
.card .c-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.card .c-top .hit { margin-left: auto; }
.card .c-name { font-weight: 500; line-height: 1.4; display: flex; gap: 6px; align-items: flex-start; color: var(--fg); text-wrap: pretty; }
.card .c-name .hit { margin-top: -1px; }
.card .c-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.card .chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); font-size: 11.5px; color: var(--fg-2); }
.card .chip:hover { background: var(--hover); }
.card .c-foot { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.card .c-foot span { display: inline-flex; align-items: center; gap: 3px; }
.card .cl-bar { height: 3px; border-radius: 2px; background: var(--active); overflow: hidden; }
.card .cl-bar i { display: block; height: 100%; background: var(--ok); }
.quick-add { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; color: var(--faint); border-radius: 8px; width: 100%; font-weight: 500; }
.quick-add:hover { background: var(--hover); color: var(--fg); }
/* every row of a long view is in the DOM; the browser lays out and paints only the ones near the screen */
.list > .row, .col-body > .card { content-visibility: auto; }
.list > .row { contain-intrinsic-size: auto 42px; }
.col-body > .card { contain-intrinsic-size: auto 96px; }
.col textarea { width: 100%; min-height: 64px; padding: 10px 12px; resize: none; border-radius: 10px; box-shadow: var(--card-shadow); border: 0; }

/* ---------- table ---------- */
.tbl-wrap { overflow: auto; height: 100%; }
.tbl { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 12.5px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--border-soft); border-right: 1px solid var(--border-soft); height: 38px; padding: 0 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface); }
.tbl th { position: sticky; top: 0; z-index: 4; height: 36px; color: var(--muted); font-weight: 500; font-size: 12px; user-select: none; border-bottom: 1px solid var(--border); }
.tbl th .thc { display: flex; align-items: center; gap: 5px; }
.tbl th .rz { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.tbl th .rz:hover, .tbl th .rz.on { background: var(--accent-line); }
.tbl th.dragover { box-shadow: inset 2px 0 0 var(--accent); }
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--fg); background: var(--hover); }
.tbl th[aria-sort] { color: var(--fg); }
.tbl th .thc .ellipsis { min-width: 0; }
.tbl th .sort-ic { display: inline-flex; align-items: center; flex: none; color: var(--accent); }
.tbl th .sort-ic:not(.on) { color: var(--faint); opacity: 0; }
.tbl th.sortable:hover .sort-ic:not(.on) { opacity: 1; }
.tbl th .sort-ic.then { color: var(--muted); }
.tbl th .sort-ic sub { font-size: 9px; line-height: 1; margin-left: 1px; }
.tbl .fz { position: sticky; left: 0; z-index: 3; box-shadow: 1px 0 0 var(--border); }
.tbl th.fz { z-index: 5; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl tr.focus td { background: var(--surface-2); }
.tbl tr.focus td.fz { box-shadow: inset 2px 0 0 var(--accent), 1px 0 0 var(--border); }
.tbl td.edit { cursor: pointer; }
.tbl td.edit:hover { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.tbl td input { width: 100%; height: 28px; padding: 0 6px; }
.tbl .cellf { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tbl .name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tbl .name-cell .name { overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-weight: 500; }
.tbl .name-cell .name:hover { color: var(--accent); }
.tbl .grow-row td { background: var(--surface-2); font-weight: 600; color: var(--fg-2); }
.tbl tfoot td { position: sticky; bottom: 0; background: var(--surface-2); font-weight: 500; color: var(--muted); z-index: 3; font-variant-numeric: tabular-nums; border-top: 1px solid var(--border); }
.tbl tfoot td.fz { z-index: 5; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- calendar ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 256px; height: 100%; min-height: 560px; }
.cal-main { display: flex; flex-direction: column; min-width: 0; padding: 12px 14px 14px; }
.cal-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-bar h2 { margin: 0 8px 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); flex: 1; border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.cal-dow { padding: 8px 10px; font-size: 12px; font-weight: 500; color: var(--faint); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 108px; border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 4px 4px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background .1s; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .dn { color: var(--faint); }
.cal-day.wk { min-height: 440px; }
.cal-day .dn { height: 24px; flex: none; font-size: 12px; font-weight: 500; color: var(--fg-2); padding: 3px 5px; display: flex; align-items: center; justify-content: space-between; font-variant-numeric: tabular-nums; }
.cal-day.today .dn b { background: var(--accent); color: var(--accent-fg); border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.cal-day .dn b { font-weight: 500; }
.cchip { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 7px; border-radius: 6px; background: var(--surface); box-shadow: var(--card-shadow); font-size: 12px; min-width: 0; cursor: grab; transition: box-shadow .12s; }
.cchip:hover { box-shadow: var(--card-shadow-hover); }
.cchip .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cchip.done .t { color: var(--faint); text-decoration: line-through; }
.cchip.over { box-shadow: inset 2px 0 0 var(--danger), var(--card-shadow); }
/* a task over several days: one band through each week row, its pieces meeting across the cell gaps */
.cal-grid { isolation: isolate; }
.cchip.cspan { background: var(--accent-soft); box-shadow: none; }
.cchip.cspan.over { box-shadow: inset 2px 0 0 var(--danger); }
.cchip.cl { margin-left: -4px; padding-left: 11px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cchip.cr { margin-right: -5px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-day:nth-child(7n) .cchip.cr { margin-right: -4px; }
/* the name runs over the bar's next days: each day is the piece's width plus the 18px its padding and the cell gap take */
.cchip.run .t { flex: none; width: calc(var(--run) * (100% + 18px) - 44px); position: relative; z-index: 1; pointer-events: none; }
.cal-day.wk .cchip.run .t { width: calc(var(--run) * (100% + 18px) - 61px); }
.cgap { height: 24px; flex: none; }
.cal-more { font-size: 12px; color: var(--muted); padding: 1px 6px; text-align: left; border-radius: 5px; }
.cal-more:hover { background: var(--hover); }
.tray { border-left: 1px solid var(--border-soft); padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.tray h4 { margin: 0 0 2px; font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; }

/* ---------- timeline ---------- */
.tl { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100%; min-height: 0; }
.tl-left { border-right: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.tl-right { overflow: auto; position: relative; }
.tl-head { height: 52px; border-bottom: 1px solid var(--border); flex: none; background: var(--surface); }
.tl-left .tl-head { display: flex; align-items: flex-end; padding: 0 14px 9px; font-size: 12px; font-weight: 500; color: var(--faint); }
.tl-rows { overflow: hidden; }
.tl-row { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 14px; white-space: nowrap; }
.tl-row .name { overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-weight: 500; }
.tl-row .name:hover { color: var(--accent); }
.tl-grp { height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--surface-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); font-weight: 600; font-size: 12.5px; }
.tl-canvas { position: relative; }
.tl-scale { position: sticky; top: 0; z-index: 4; height: 52px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tl-scale .m { position: absolute; top: 0; height: 26px; padding: 7px 8px; font-size: 12px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.tl-scale .d { position: absolute; top: 26px; height: 26px; font-size: 11.5px; color: var(--faint); display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.tl-scale .d.we { color: var(--border-strong); }
.tl-scale .d.td { color: var(--accent); font-weight: 700; }
.tl-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border-soft); }
.tl-col.we { background: var(--surface-2); border-left: 0; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--accent); z-index: 3; }
.tl-today::before { content: "Today"; position: absolute; top: 4px; left: -18px; font-size: 10px; font-weight: 600; color: var(--accent-fg); background: var(--accent); padding: 1px 6px; border-radius: 6px; }
.tl-gr { position: absolute; left: 0; right: 0; height: 32px; background: var(--surface-2); opacity: .7; }
.tl-rl { position: absolute; left: 0; right: 0; height: 36px; }
.bar { position: absolute; height: 24px; border-radius: 7px; background: color-mix(in oklab, color-mix(in oklab, var(--c), #fff var(--lift)) 16%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in oklab, color-mix(in oklab, var(--c), #fff var(--lift)) 45%, transparent); display: flex; align-items: center; gap: 6px; padding: 0 8px 0 4px; font-size: 12px; font-weight: 500; overflow: hidden; white-space: nowrap; cursor: grab; z-index: 2; color: var(--fg); transition: box-shadow .12s; }
.bar:hover { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c), #fff var(--lift)), 0 4px 10px -4px rgba(0,0,0,.2); }
.bar .pf { position: absolute; inset: 0 auto 0 0; background: color-mix(in oklab, color-mix(in oklab, var(--c), #fff var(--lift)) 22%, transparent); z-index: -1; }
.bar .rh, .bar .lh { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.bar .rh { right: 0; }
.bar .lh { left: 0; }
.bar.ms { width: 14px !important; height: 14px; border-radius: 3px; transform: rotate(45deg); padding: 0; margin-top: 5px; background: color-mix(in oklab, var(--c), #fff var(--lift)); }
.bar-label { position: absolute; font-size: 12px; color: var(--muted); white-space: nowrap; pointer-events: none; height: 24px; display: flex; align-items: center; }
.tl-deps { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: visible; }
.tl-deps path { fill: none; stroke: var(--faint); stroke-width: 1.3; }
.tl-deps path.crit { stroke: var(--danger); opacity: .7; }

/* ---------- workload ---------- */
.wl { padding: 14px 16px; }
.wl-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.wl-t { overflow-x: auto; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--border); }
.wl-grid { display: grid; min-width: 860px; }
.wl-h { padding: 10px 12px; font-size: 12px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.wl-h.cur { color: var(--accent); }
.wl-p { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.wl-p .nm { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-p .rl { font-size: 12px; color: var(--faint); }
.wl-c { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); border-left: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 6px; justify-content: center; cursor: pointer; transition: background .1s; }
.wl-c:hover { background: var(--surface-2); }
.wl-c .v { display: flex; justify-content: space-between; font-size: 12px; font-variant-numeric: tabular-nums; }
.wl-c .v b { font-weight: 600; }
.wl-c .v .ofc { color: var(--faint); }
.wl-meter { height: 6px; border-radius: 3px; background: var(--active); overflow: hidden; }
.wl-meter i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.wl-c.warn .wl-meter i { background: var(--warn); }
.wl-c.over .wl-meter i { background: var(--danger); }
.wl-c.over { background: color-mix(in oklab, var(--danger-soft) 55%, transparent); }
.wl-c.over .v b { color: var(--danger); }
.wl-c.warn .v b { color: var(--warn); }
.wl-tasks { grid-column: 1 / -1; display: grid; border-bottom: 1px solid var(--border-soft); background: var(--surface-2); }
.wl-tasks > div { padding: 8px; display: flex; flex-direction: column; gap: 5px; border-left: 1px solid var(--border-soft); min-width: 0; }
.wl-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; margin-left: auto; }
.wl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wl-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- dashboard ---------- */
.dash { padding: 16px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.tile { grid-column: span 12; border-radius: var(--r-lg); padding: 16px 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); min-width: 0; }
.tile h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tile h3 .muted { font-weight: 450; margin-left: auto; font-size: 12px; }
.stats { grid-column: span 12; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 14px 16px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--border); min-width: 0; transition: background .12s; }
.stat[data-a] { cursor: pointer; }
.stat[data-a]:hover { background: var(--surface-2); }
.stat .l { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .n { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .s { font-size: 12px; color: var(--faint); margin-top: 4px; }
.stat.alert .n { color: var(--danger); }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hb { display: grid; grid-template-columns: 124px minmax(0, 1fr) 36px; align-items: center; gap: 10px; font-size: 12.5px; }
.hb .lb { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--fg-2); }
.hb .lb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .tr { height: 10px; display: flex; gap: 2px; }
.hb .tr i { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; background: color-mix(in oklab, var(--c), #fff var(--lift)); }
.hb .tr i.s1 { background: var(--series-1); border-radius: 0; }
.hb .tr i.s2 { background: var(--series-2); }
.hb .tr i.s1:last-child { border-radius: 0 4px 4px 0; }
.hb .vl { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 12px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; background: var(--series-1); border-radius: 1px; }
.legend svg { display: block; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--border-soft); stroke-width: 1; }
.chart .axis text { fill: var(--faint); font-size: 10.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .ideal { fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .actual { fill: none; stroke: var(--series-1); stroke-width: 2; }
.chart .area { fill: var(--series-1); opacity: .08; }
.chart .pt { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .xh { stroke: var(--faint); stroke-width: 1; }
.olist { display: flex; flex-direction: column; }
.olist .orow { display: flex; align-items: center; gap: 8px; height: 36px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; min-width: 0; }
.olist .orow:last-child { border-bottom: 0; }
.olist .orow .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-weight: 500; }
.olist .orow .name:hover { color: var(--accent); }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr); height: 100%; min-height: 0; }
.ib-list { border-right: 1px solid var(--border-soft); overflow-y: auto; padding: 0 6px 12px; }
.ib-bar { display: flex; align-items: center; gap: 6px; padding: 10px 6px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.ib-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 9px; cursor: pointer; position: relative; transition: background .08s; }
.ib-item:hover { background: var(--surface-2); }
.ib-item.on { background: var(--accent-soft); }
.ib-item.unread::before { content: ""; position: absolute; left: 3px; top: 20px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.ib-item .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-item .t2 { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-item .t3 { font-size: 12px; color: var(--faint); display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.ib-item .when { font-size: 12px; color: var(--faint); white-space: nowrap; }
.ib-item:not(.unread) .t1 { font-weight: 500; color: var(--fg-2); }
.ib-item .ibtn { opacity: 0; }
.ib-item:hover .ibtn { opacity: 1; }
.ib-preview { overflow-y: auto; min-width: 0; display: flex; flex-direction: column; }

/* ---------- backlog ---------- */
.bl { padding: 14px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
.bl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.sp-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.sp-h .nm { font-weight: 600; }
.sp-h .dt { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sp-h .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cap .m { width: 120px; height: 6px; border-radius: 3px; background: var(--active); overflow: hidden; display: flex; gap: 1px; }
.cap .m i { display: block; height: 100%; }
.cap .m i.d { background: var(--ok); }
.cap .m i.p { background: var(--accent); }
.cap .m.over i.p { background: var(--danger); }
.sp-stat { display: flex; gap: 4px; }
.sp-stat span { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.sp-body { min-height: 40px; border-top: 1px solid var(--border-soft); }
.sp-body .row { height: 38px; }
.sp-empty { padding: 16px; color: var(--faint); text-align: center; font-size: 12.5px; }

/* ---------- settings ---------- */
.set { display: grid; grid-template-columns: 228px minmax(0, 1fr); height: 100%; min-height: 0; }
.set-nav { border-right: 1px solid var(--border-soft); padding: 14px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.set-nav h5 { margin: 14px 8px 4px; font-size: 12px; font-weight: 500; color: var(--faint); }
.set-nav h5:first-child { margin-top: 0; }
.set-nav .nav.on { background: var(--surface-3); box-shadow: none; }
.set-body { overflow-y: auto; padding: 32px 40px 96px; }
.set-body > div { max-width: 780px; }
.set-body h1 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.set-body .lead { margin: 0 0 24px; color: var(--muted); max-width: 64ch; line-height: 1.6; }
.set-body h2 { margin: 32px 0 10px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel-box { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.prow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border-soft); min-height: 52px; }
.prow:last-child { border-bottom: 0; }
.prow .grip { color: var(--faint); cursor: grab; }
.prow .lbl { font-weight: 550; }
.prow .desc { color: var(--muted); font-size: 12.5px; }
.prow .end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.kv > div { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); min-width: 0; display: flex; align-items: center; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.copyline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.copyline code { font: 12px var(--mono); background: var(--surface-3); border-radius: 6px; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.flow > div { padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); min-width: 0; position: relative; }
.flow .s { font: 600 11px var(--font); color: var(--accent); letter-spacing: .02em; }
.flow .t { font-weight: 600; margin: 6px 0 4px; }
.flow .d { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.note { display: flex; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--fg-2); font-size: 12.5px; margin-top: 12px; }
.note .ic { color: var(--accent); margin-top: 2px; }

/* ---------- task detail ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer { position: fixed; top: 8px; right: 8px; bottom: 8px; width: min(900px, calc(100% - 16px)); background: var(--surface); z-index: 51; box-shadow: var(--pop-shadow); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; animation: slidein .2s cubic-bezier(.2, .8, .2, 1); }
.drawer.full { width: calc(100% - 64px - var(--sbw) - 8px); }
.drawer:focus { outline: none; }
@keyframes slidein { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.dt-h { display: flex; align-items: center; gap: 4px; height: 50px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--border-soft); flex: none; }
.dt-h .crumb { font-weight: 500; font-size: 13px; gap: 7px; }
.dt-h .sep { color: var(--faint); }
.dt-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 280px; min-height: 0; }
.dt-main { overflow-y: auto; padding: 26px 36px 72px; min-width: 0; }
.dt-side { border-left: 1px solid var(--border-soft); overflow-y: auto; padding: 14px 12px 40px; }
.dt-title { font-size: 22px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.3; margin: 0 0 12px; outline: 0; border-radius: 6px; padding: 2px 6px; margin-left: -6px; text-wrap: pretty; }
.dt-title:hover { background: var(--surface-2); }
.dt-title:focus { background: var(--surface-2); }
.rte-wrap { position: relative; margin-left: -10px; }
.rte-bar { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface); box-shadow: var(--pop-shadow); position: absolute; top: -40px; left: 6px; z-index: 3; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.rte-wrap:focus-within .rte-bar { opacity: 1; pointer-events: auto; transform: none; }
.rte { min-height: 70px; padding: 6px 10px; border-radius: 8px; outline: 0; line-height: 1.65; color: var(--fg-2); font-size: 13.5px; transition: background .12s; }
.rte:hover { background: var(--surface-2); }
.rte:focus { background: transparent; }
.rte p { margin: 0 0 8px; }
.rte ul { margin: 0 0 8px; padding-left: 20px; }
.rte code { font: 12px var(--mono); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.sec { margin-top: 28px; }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; font-size: 13px; }
.sec-h .ic { color: var(--faint); }
.sec-h .cnt { color: var(--faint); font-weight: 450; font-variant-numeric: tabular-nums; }
.sec-h .end { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.sec-list { border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border-soft); }
.sl-row { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 4px 10px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.sl-row:last-child { border-bottom: 0; }
.sl-row:hover { background: var(--surface-2); }
.sl-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-weight: 500; }
.sl-row .name:hover { color: var(--accent); }
.sl-row.done .name { color: var(--faint); text-decoration: line-through; }
.sl-row input.add { border: 0; background: transparent; outline: 0; flex: 1; height: 28px; padding: 0; box-shadow: none; }
.sl-row input.add::placeholder { color: var(--faint); }
.cl-prog { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 450; }
.cl-prog .m { width: 80px; height: 4px; border-radius: 2px; background: var(--active); overflow: hidden; }
.cl-prog .m i { display: block; height: 100%; background: var(--ok); }
.dep-h { padding: 7px 10px 5px; font-size: 12px; font-weight: 500; color: var(--faint); background: var(--surface-2); border-bottom: 1px solid var(--border-soft); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); min-width: 0; }
.file .fi { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; font: 600 9px var(--mono); }
.file .fn { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .fs { font-size: 11.5px; color: var(--faint); }
.drop-zone { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 10px; color: var(--faint); text-align: center; font-size: 12.5px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.drop-zone:hover { color: var(--fg-2); border-color: var(--faint); }
.act-tabs { display: flex; gap: 2px; margin-left: auto; }
.cmt { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
.cmt .who { font-weight: 600; font-size: 13px; }
.cmt .when { color: var(--faint); font-size: 12px; margin-left: 6px; font-weight: 400; }
.cmt .txt { margin-top: 3px; color: var(--fg-2); line-height: 1.6; font-size: 13.5px; }
.cmt .txt .mention { color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 0 3px; font-weight: 500; }
.cmt .acts { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--faint); opacity: 0; transition: opacity .1s; }
.cmt:hover .acts { opacity: 1; }
.cmt .acts button:hover { color: var(--fg); }
.cmt .replies { margin-top: 4px; padding-left: 12px; border-left: 2px solid var(--border-soft); }
.hist { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; color: var(--muted); }
.hist b { color: var(--fg-2); font-weight: 550; }
.hist .when { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.hist .hdot { width: 20px; display: flex; justify-content: center; color: var(--faint); }
/* the History tab: filter chips, day headings, one line per change */
.hwrap { margin-top: 6px; }
.hchips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0 4px; }
.hchips .chip { height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); transition: background .1s, color .1s; }
.hchips .chip:hover { background: var(--hover); color: var(--fg); }
.hchips .chip.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.hchips .hcount { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.hday { margin: 14px 0 2px; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.htl .hday:first-child { margin-top: 8px; }
.htl.busy { opacity: .6; transition: opacity .2s; }
.hist.hrow { align-items: flex-start; gap: 10px; padding: 6px 0; }
.hist.hrow > .av { margin-top: 1px; }
.hist.hrow .when { padding-top: 2px; }
.hist.hrow.local { opacity: .75; }
.hbody { flex: 1; min-width: 0; }
.hline { line-height: 1.6; overflow-wrap: anywhere; }
.hv { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: bottom; color: var(--fg-2); font-weight: 500; }
.hv .av { width: 16px; height: 16px; font-size: 7px; }
.hv.link { cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
.hv.link:hover { color: var(--accent); }
.hdot-c { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.hmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--faint); }
.hlink { color: var(--accent); font-size: 12px; font-weight: 500; }
.hlink:hover { text-decoration: underline; }
.hdiff { display: grid; gap: 6px; margin-top: 6px; }
.hdiff > div { padding: 7px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.55; color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.hdiff .hd-from { background: var(--danger-soft); }
.hdiff .hd-to { background: var(--ok-soft); }
.hd-k { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
.hd-cut { margin: 0; font-size: 11.5px; color: var(--faint); }
.hmore { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; }
.hmore .spin { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.hnote { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 6px 6px 6px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.hnote > span { flex: 1; min-width: 0; }
.hnote.inline { display: inline; margin: 0; padding: 0; background: none; }
.hload { display: grid; gap: 12px; padding: 10px 0; }
.hsk { display: flex; align-items: center; gap: 10px; }
.hsk .av-sk { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.composer { border-radius: 12px; margin-top: 12px; background: var(--surface); position: relative; box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .12s; }
.composer:focus-within { box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 3px var(--accent-soft); }
.composer textarea { width: 100%; border: 0; min-height: 66px; resize: vertical; padding: 12px 14px; outline: 0; background: transparent; box-shadow: none; }
.composer .cb-bar { display: flex; align-items: center; gap: 4px; padding: 4px 8px 8px; }
.prop { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 4px; min-height: 34px; }
.prop .k { color: var(--muted); font-size: 12.5px; padding-left: 6px; }
.prop .val { display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 2px 8px; border-radius: 7px; font-size: 13px; font-weight: 500; min-width: 0; text-align: left; width: 100%; flex-wrap: wrap; transition: background .1s; }
.prop button.val:hover { background: var(--hover); }
.prop .val .ellipsis { flex: 1; }
.side-sec { padding: 8px 0 12px; border-bottom: 1px solid var(--border-soft); }
.side-sec:last-child { border-bottom: 0; }
.side-sec h6 { margin: 6px 0 4px 6px; font-size: 12px; font-weight: 500; color: var(--faint); }
.range { flex: 1; min-width: 0; accent-color: var(--accent); }
.dt-pills { display: none; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }

/* ---------- popovers, menus, modals ---------- */
.pop { position: fixed; z-index: 80; min-width: 220px; max-width: min(360px, calc(100vw - 16px)); background: var(--surface); border-radius: 12px; box-shadow: var(--pop-shadow); display: flex; flex-direction: column; max-height: min(620px, calc(100vh - 24px)); overflow-y: auto; animation: popin .12s ease-out; }
@keyframes popin { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.pop .ps { border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; height: 40px; padding: 0 14px; width: 100%; outline: 0; background: transparent; box-shadow: none; flex: none; }
.pop .ph { padding: 10px 14px 4px; font-size: 12px; font-weight: 500; color: var(--faint); }
.menu { overflow-y: auto; padding: 4px; }
.menu .ph { padding: 8px 10px 4px; }
.mi { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border-radius: 7px; text-align: left; color: var(--fg-2); white-space: nowrap; }
.mi > svg.ic:not(.sico):not(.pico) { color: var(--muted); }
.proj-ic svg.ic, .av svg.ic { color: #fff; }
.av.none svg.ic { color: var(--faint); }
.tico svg.ic { color: inherit; }
.mi:hover, .mi.act { background: var(--hover); color: var(--fg); }
.mi .hint { margin-left: auto; color: var(--faint); font-size: 12px; display: inline-flex; gap: 3px; align-items: center; }
.mi .hint .ic { color: var(--accent); }
.mi .chk { margin-left: auto; color: var(--accent); }
.mi .chk .ic { color: var(--accent); }
.mi.danger, .mi.danger .ic { color: var(--danger); }
.mi > span:not(.hint):not(.chk) { overflow: hidden; text-overflow: ellipsis; }
.mdiv { height: 1px; background: var(--border-soft); margin: 4px -4px; }
.pop-sec { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 10px; }
.pop-sec:last-child { border-bottom: 0; }
.pop-sec label.k, .pop-sec .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.pop-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.pop-row select, .pop-row input[type="number"], .pop-row input[type="date"] { height: 30px; padding: 0 8px; }
.props-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.props-grid button { height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 500; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); transition: background .1s, color .1s; }
.props-grid button:hover { color: var(--fg); }
.props-grid button.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent); }
.sortrow { display: flex; align-items: center; gap: 6px; }
.sortrow select { flex: 1; height: 30px; padding: 0 8px; }
.wd { display: flex; gap: 4px; }
.wd button { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.wd button.on { background: var(--accent); color: var(--accent-fg); box-shadow: none; }

.modal-bg { position: fixed; inset: 0; background: var(--scrim); z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; animation: fade .12s ease-out; }
.modal { width: min(660px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--pop-shadow); overflow: hidden; animation: popin .16s cubic-bezier(.2, .8, .2, 1); }
.modal.sm { width: min(460px, 100%); }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0 18px; }
.modal-h b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.modal-b { padding: 12px 18px; display: flex; flex-direction: column; gap: 12px; }
.modal-f { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-soft); }
.modal input.big { border: 0; outline: 0; font-size: 20px; font-weight: 600; padding: 4px 0; background: transparent; letter-spacing: -0.02em; box-shadow: none; }
.modal textarea.desc { border: 0; outline: 0; resize: none; min-height: 72px; padding: 0; background: transparent; color: var(--fg-2); box-shadow: none; font-size: 13.5px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pbtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; transition: background .1s; }
.pbtn:hover { background: var(--hover); }
.pbtn.unset { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.field input, .field select, .field textarea { height: 36px; padding: 0 12px; }
.field textarea { height: auto; min-height: 64px; padding: 8px 12px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-cards button { border-radius: 10px; padding: 10px 12px; text-align: left; display: flex; flex-direction: column; gap: 2px; box-shadow: inset 0 0 0 1px var(--border); transition: background .1s, box-shadow .1s; }
.radio-cards button:hover { background: var(--surface-2); }
.radio-cards button.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.radio-cards b { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.radio-cards span { font-size: 12px; color: var(--muted); }

.cmdk { width: min(640px, 100%); }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; height: 54px; padding: 0 18px; font-size: 15px; outline: 0; background: transparent; box-shadow: none; }
.cmdk .menu { max-height: 420px; padding: 6px; }
.cmdk .mi { height: 38px; }
.cmdk .foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--faint); }
.cmdk .foot span { display: inline-flex; gap: 5px; align-items: center; }

@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tip { position: fixed; z-index: 95; pointer-events: none; background: var(--fg); color: var(--surface); padding: 5px 8px; border-radius: 7px; font-size: 12px; font-weight: 500; max-width: 280px; box-shadow: var(--pop-shadow); line-height: 1.4; }
.tip b { font-weight: 650; }
.tip .kbd { background: color-mix(in oklab, var(--surface) 18%, transparent); color: inherit; box-shadow: none; margin-left: 4px; }
.code-pop { font: 11.5px/1.55 var(--mono); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 0; max-height: 300px; overflow: auto; white-space: pre; color: var(--fg-2); }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding: 6px 18px 18px; }
.shortcuts > div { display: flex; justify-content: space-between; align-items: center; height: 34px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.shortcuts h6 { grid-column: 1 / -1; margin: 14px 0 2px; font-size: 12px; font-weight: 500; color: var(--faint); }

/* ---------- auth ---------- */
.auth { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: auto; background: var(--canvas); }
.auth-art { margin: 8px 0 8px 8px; border-radius: 16px; background: radial-gradient(120% 80% at 0% 0%, color-mix(in oklab, var(--accent) 22%, var(--surface)) 0%, var(--surface-2) 55%), var(--surface-2); box-shadow: var(--panel-shadow); padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-width: 0; overflow: hidden; }
.auth-art .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.auth-art h2 { font-size: 34px; line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 12px; max-width: 16ch; font-weight: 650; }
.auth-art p { color: var(--muted); max-width: 44ch; margin: 0; line-height: 1.6; font-size: 14px; }
.mini-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; transform: perspective(1400px) rotateX(8deg) rotateZ(-2deg); transform-origin: left top; margin-right: -80px; }
.mini-board .col { width: auto; }
.mini-board .card { cursor: default; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { margin: 0; font-size: 26px; letter-spacing: -0.03em; font-weight: 650; }
.auth-card .sub { color: var(--muted); margin: -6px 0 8px; }
.auth-card .btn { height: 40px; font-size: 13.5px; border-radius: 10px; }
.auth-card .field input { height: 40px; border-radius: 10px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-foot { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.consent { height: 100%; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 40px; background: var(--canvas); }
.consent-card { width: min(440px, 100%); border-radius: 18px; background: var(--surface); box-shadow: var(--panel-shadow); overflow: hidden; }
.consent-card .top { padding: 28px 28px 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.consent-card .logos { display: flex; align-items: center; gap: 12px; }
.consent-card .logo { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.consent-card h1 { margin: 0; font-size: 19px; letter-spacing: -0.02em; font-weight: 650; }
.scopes { padding: 4px 28px 8px; }
.scope { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.scope:last-child { border-bottom: 0; }
.scope .ic { color: var(--ok); margin-top: 2px; }
.scope b { display: block; font-weight: 600; }
.scope span { font-size: 12.5px; color: var(--muted); }
.consent-card .acct { margin: 0 28px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; gap: 10px; }
.consent-card .acts { display: flex; gap: 8px; padding: 18px 28px 22px; }
.consent-card .acts .btn { flex: 1; height: 38px; }
.consent-card .fine { padding: 14px 28px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--faint); line-height: 1.55; }

/* ---------- home ---------- */
.home { max-width: 1240px; margin: 0 auto; padding: 30px 32px 56px; display: flex; flex-direction: column; gap: 20px; }
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.home-date { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.home-head h1 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -0.035em; }
.home-actions { display: flex; gap: 8px; }
.hstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hstat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .14s, transform .14s; }
.hstat:hover { box-shadow: inset 0 0 0 1px var(--border-strong), 0 6px 18px -10px rgba(20,20,40,.25); transform: translateY(-1px); }
.hs-ic { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--tc); background: color-mix(in oklab, var(--tc) 13%, var(--surface)); }
.hs-n { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hs-l { font-size: 12.5px; color: var(--muted); }
.t-blue { --tc: #3d8ff0; } .t-red { --tc: #e5484d; } .t-amber { --tc: #e2a336; } .t-green { --tc: #2f9e6a; }
.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-8 { grid-column: span 8; } .span-4 { grid-column: span 4; }
.hcard { border-radius: 14px; padding: 16px 18px 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); min-width: 0; }
.hcard-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.hcard-h h2 { margin: 0; font-size: 14.5px; font-weight: 650; letter-spacing: -0.015em; display: flex; align-items: center; gap: 7px; }
.hcard-h .seg b { font-weight: 600; color: var(--faint); margin-left: 2px; }
.flist { display: flex; flex-direction: column; margin: 0 -8px; }
.frow { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px; border-radius: 9px; transition: background .08s; }
.frow:hover { background: var(--surface-2); }
.frow .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; cursor: pointer; }
.frow .name:hover { color: var(--accent); }
.frow-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.frow .due { width: 74px; display: flex; justify-content: flex-end; }
.brief { background: radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--accent) 9%, var(--surface)), var(--surface) 60%); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 20%, var(--border)); }
.ai-grad { color: var(--accent); }
.brief-list { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; line-height: 1.55; color: var(--fg-2); }
.brief-list b { color: var(--fg); font-weight: 600; }
.brief-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chipbtn { height: 28px; padding: 0 11px; border-radius: 14px; font-size: 12.5px; font-weight: 500; color: var(--fg-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.chipbtn:hover { box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent); }
.aref { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--surface-3); font-size: 12px; font-weight: 500; color: var(--fg-2); vertical-align: middle; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aref:hover { background: var(--active); color: var(--fg); }
.aref > span:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.aref .k { color: var(--faint); font-variant-numeric: tabular-nums; }
.feed { display: flex; flex-direction: column; }
.fitem { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; color: var(--muted); }
.fitem:last-child { border-bottom: 0; }
.fitem b { color: var(--fg); font-weight: 600; }
.fbody { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.fitem .when { font-size: 12px; color: var(--faint); white-space: nowrap; }
.ring-wrap { display: flex; align-items: center; gap: 16px; padding: 4px 0 12px; }
.ring-bg { fill: none; stroke: var(--active); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-t { font: 650 17px var(--font); fill: var(--fg); }
.ring-title { font-weight: 650; font-size: 15px; }
.ring-stats { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.ring-stats b { color: var(--fg); font-weight: 650; }
.hproj { display: flex; flex-direction: column; border-top: 1px solid var(--border-soft); padding-top: 8px; margin: 0 -6px; }
.hp { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 6px; border-radius: 8px; font-weight: 500; text-align: left; }
.hp:hover { background: var(--surface-2); }
.hp .ellipsis { flex: 1; }
.hp .prog { width: 72px; }

/* ---------- AI panel ---------- */
.aip { grid-area: ai; margin: 0 8px 8px 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--panel-shadow); display: flex; flex-direction: column; min-height: 0; overflow: hidden; animation: slidein .2s cubic-bezier(.2, .8, .2, 1); }
.aip-h { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--border-soft); flex: none; }
.aip-h b { font-size: 14px; font-weight: 650; }
.ai-mark { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(140deg, var(--accent), #c8559a 60%, #e98a4f); box-shadow: 0 3px 10px -4px color-mix(in oklab, var(--accent) 70%, transparent); }
.aip-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.ai-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 8px 8px; }
.ai-orb { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: radial-gradient(circle at 30% 25%, #b9b4ff, var(--accent) 45%, #c8559a 80%); box-shadow: 0 10px 30px -8px color-mix(in oklab, var(--accent) 70%, transparent), inset 0 2px 6px rgba(255,255,255,.35); animation: orb 4s ease-in-out infinite; }
@keyframes orb { 50% { transform: translateY(-3px) scale(1.03); } }
.ai-hero h3 { margin: 6px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.ai-hero p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; max-width: 34ch; }
.ai-sugs { display: flex; flex-direction: column; gap: 6px; }
.ai-sug { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px; text-align: left; font-weight: 500; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--border); transition: background .1s, box-shadow .1s; }
.ai-sug .ic { color: var(--accent); }
.ai-sug:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent-line); }
.msg.user { align-self: flex-end; max-width: 86%; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: var(--accent); color: #fff; font-size: 13.5px; line-height: 1.5; }
.msg.ai { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.msg.ai .av { width: 22px; height: 22px; }
.mbody { font-size: 13.5px; line-height: 1.6; color: var(--fg-2); min-width: 0; }
.mbody p { margin: 0 0 8px; }
.mbody ul, .mbody ol { margin: 0 0 8px; padding-left: 18px; }
.mbody li { margin-bottom: 4px; }
.mbody b { color: var(--fg); }
.mbody .aref { margin: 2px 4px 2px 0; }
.macts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ai-grp { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 13px; }
.ai-grp .over { color: var(--danger); font-weight: 600; }
.ai-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0; font-size: 12px; }
.ai-draft { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: var(--surface-2); margin: 5px 0; font-weight: 500; }
.ai-draft span { flex: 1; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.aip-in { margin: 0 12px 12px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), 0 4px 16px -10px rgba(20,20,40,.25); flex: none; transition: box-shadow .12s; }
.aip-in:focus-within { box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 0 3px var(--accent-soft); }
.aip-in textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; padding: 4px 0; box-shadow: none; font-size: 13.5px; }
.aip-in textarea:focus-visible { box-shadow: none; }
.aip-row { display: flex; align-items: center; gap: 6px; }
.ibtn.send { background: var(--accent); color: #fff; border-radius: 9px; width: 30px; height: 30px; }
.ibtn.send:hover { background: var(--accent-hover); color: #fff; }
.ai-ctx { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--fg-2); background: var(--surface-3); border-radius: 8px; padding: 3px 4px 3px 8px; margin-bottom: 6px; max-width: 100%; }

/* ---------- responsive ---------- */
.only-sm { display: none !important; }
@media (max-width: 1180px) {
  .hide-lg { display: none !important; }
  .dt-body { grid-template-columns: minmax(0, 1fr) 250px; }
}
@media (max-width: 960px) {
  .app, .app.ai-open { grid-template-columns: minmax(0, 1fr); grid-template-rows: 52px minmax(0, 1fr) 62px; grid-template-areas: "top" "main" "rail"; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 8px; gap: 8px; }
  .tb-left { padding-left: 0; }
  .ws-name { display: none; }
  .gsearch { justify-self: stretch; width: auto; height: 34px; }
  .main { padding: 0; }
  .panel { border-radius: 0; box-shadow: none; }
  .rail { flex-direction: row; justify-content: space-around; padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--border); }
  .rail .grow, .rail-i:nth-last-child(-n+2) { display: none; }
  .rail-i { width: auto; flex: 1; }
  .aip { position: fixed; inset: 0; z-index: 65; margin: 0; border-radius: 0; }
  .home { padding: 20px 16px 40px; }
  .hstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-8, .span-4 { grid-column: span 12; }
  .sb { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-102%); transition: transform .2s ease-out; box-shadow: var(--pop-shadow); visibility: visible !important; background: var(--canvas); }
  .app.sb-open .sb { transform: none; }
  .sb-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 59; }
  .only-sm { display: inline-flex !important; }
  .hide-md { display: none !important; }
  .ph { padding: 0 12px 0 8px; }
  .drawer, .drawer.full { width: 100%; top: 0; right: 0; bottom: 0; border-radius: 0; }
  .dt-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .dt-main, .dt-side { overflow: visible; }
  .dt-side { border-left: 0; border-top: 1px solid var(--border-soft); }
  .dt-pills { display: flex; }
  .cal-wrap { grid-template-columns: minmax(0, 1fr); }
  .tray { border-left: 0; border-top: 1px solid var(--border-soft); max-height: 220px; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .ib-preview { display: none; }
  .set { grid-template-columns: minmax(0, 1fr); }
  .set-nav { flex-direction: row; gap: 4px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border-soft); padding: 8px; }
  .set-nav h5 { display: none; }
  .set-nav .nav { width: auto; white-space: nowrap; flex: none; }
  .set-body { padding: 22px 16px 80px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .tl { grid-template-columns: 170px minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:last-child { grid-column: span 2; }
  .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rte-wrap { margin-left: 0; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .vbar { padding: 0 8px; gap: 6px; }
  .vsearch { width: 140px; }
  .row .key { display: none; }
  .row { padding: 0 12px 0 6px; }
  .fbar { padding: 8px 10px; }
  .dt-main { padding: 18px 16px 60px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv > div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; font-size: 12px; }
  .shortcuts { grid-template-columns: minmax(0, 1fr); }
  .hb { grid-template-columns: 96px minmax(0, 1fr) 32px; }
  .radio-cards { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .t-4 { grid-column: span 4; }
  .t-6 { grid-column: span 6; }
  .t-8 { grid-column: span 8; }
}

/* ---------- live app additions ---------- */
img.av { object-fit: cover; background: var(--active); padding: 0; }
.av.kind { background: var(--surface-3); color: var(--muted); }
.rich { overflow-wrap: anywhere; }
.rich p { margin: 0 0 8px; }
.rich img { max-width: 100%; height: auto; border-radius: 8px; }
.rich table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12.5px; display: block; overflow-x: auto; }
.rich td, .rich th { border: 1px solid var(--border); padding: 6px 10px; vertical-align: top; text-align: left; }
.rich pre { background: var(--surface-3); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; font: 12px/1.5 var(--mono); margin: 6px 0; }
.rich blockquote { margin: 6px 0; padding-left: 12px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.rich a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.rich .mention { color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 0 3px; font-weight: 500; }
.rich h1, .rich h2, .rich h3, .rich h4 { font-size: 14px; margin: 10px 0 6px; }
.reply-to { display: flex; align-items: center; gap: 6px; padding: 8px 12px 0; font-size: 12px; color: var(--muted); }
.reply-to .ibtn { margin-left: auto; }
a.file { color: inherit; text-decoration: none; }
a.file:hover { box-shadow: inset 0 0 0 1px var(--accent-line); }
.ib-digest { padding: 24px 28px; display: flex; flex-direction: column; gap: 2px; }
.ib-digest h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.02em; }
.ib-digest p { margin: 0 0 12px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; max-width: 46ch; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); line-height: 1.5; }
.auth-points li .ic { color: var(--accent); margin-top: 2px; }
.auth-points b { display: block; color: var(--fg); font-weight: 600; }
.auth-err, .form-err { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 13px; line-height: 1.45; }
.auth-err .ic, .form-err .ic { margin-top: 1px; flex: none; }
.bootscr { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--canvas); padding: 24px; }
.bootbox { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 380px; color: var(--muted); }
.bootbox b { color: var(--fg); font-size: 15px; }
.bootbox h3 { margin: 4px 0 0; color: var(--fg); font-size: 16px; }
.bootbox p { margin: 0 0 6px; line-height: 1.5; }
.bootbox .ws-logo { width: 36px; height: 36px; border-radius: 11px; font-size: 17px; }
.ws-logo.pulse { animation: hub-pulse 1.2s ease-in-out infinite; }
@keyframes hub-pulse { 50% { transform: scale(.88); opacity: .7; } }

/* ---- running timer (top bar + task drawer) ---- */
.timer-chip { display: inline-flex; align-items: center; height: 32px; border-radius: 9px; background: color-mix(in oklab, var(--ok) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ok) 30%, transparent); color: color-mix(in oklab, var(--ok) 80%, var(--fg)); overflow: hidden; }
.timer-chip .tc-open { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 8px 0 10px; font: 600 12.5px var(--mono); color: inherit; transition: background .12s; }
.timer-chip .tc-open:hover, .timer-chip .tc-stop:hover { background: color-mix(in oklab, var(--ok) 16%, transparent); }
.timer-chip .tc-stop { width: 30px; height: 100%; display: flex; align-items: center; justify-content: center; color: inherit; border-left: 1px solid color-mix(in oklab, var(--ok) 25%, transparent); transition: background .12s; }
.tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: hub-pulse 1.4s ease-in-out infinite; }
.btn.timer-on { color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ok) 35%, transparent); background: color-mix(in oklab, var(--ok) 9%, var(--surface)); font-variant-numeric: tabular-nums; }
.btn.timer-on .num { font: 600 12px var(--mono); }

/* ---- attachments: upload, drop, delete ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label.btn { cursor: pointer; }
label.btn:has(.sr-only:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.files { border-radius: 10px; transition: background .12s, box-shadow .12s; }
.files.drop { background: color-mix(in oklab, var(--accent) 7%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.file-w { position: relative; min-width: 0; }
.file-w .file { padding-right: 34px; }
.file-x { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); opacity: 0; transition: opacity .12s; }
.file-w:hover .file-x, .file-x:focus-visible { opacity: 1; }
.file-x:hover { color: var(--danger); }
@media (hover: none) { .file-x { opacity: 1; } }
.file.up { opacity: .75; }
.file.up .fi { color: var(--accent); animation: hub-pulse 1.2s ease-in-out infinite; }
.drop-hint { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 10px; border: 1.5px dashed var(--border); color: var(--faint); font-size: 12.5px; cursor: pointer; transition: border-color .12s, color .12s; }
.drop-hint:hover { border-color: var(--accent); color: var(--muted); }
.drop-hint u { text-underline-offset: 2px; }


/* ---- toasts ---- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
body:has(.bulk) .toasts { bottom: 76px; }
.toast { position: relative; overflow: hidden; pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; width: max-content; min-width: 260px; max-width: min(420px, calc(100vw - 32px)); padding: 11px 8px 12px 12px; border-radius: 12px; background: var(--surface); color: var(--fg); font-size: 13px; line-height: 1.45; box-shadow: 0 0 0 1px var(--border), 0 14px 34px -14px rgb(15 15 30 / .32), 0 4px 10px -6px rgb(15 15 30 / .18); animation: toastin .22s cubic-bezier(.2, .8, .2, 1); }
.toast.out { animation: toastout .18s ease-in forwards; }
.toast .t-ic { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.toast.ok .t-ic { background: color-mix(in oklab, var(--ok) 15%, transparent); color: var(--ok); }
.toast.err .t-ic { background: var(--danger-soft); color: var(--danger); }
.toast.info .t-ic { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
.toast.err { box-shadow: 0 0 0 1px color-mix(in oklab, var(--danger) 30%, var(--border)), 0 14px 34px -14px rgb(15 15 30 / .32), 0 4px 10px -6px rgb(15 15 30 / .18); }
.toast .t-msg { padding-top: 1px; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.toast .t-act { font-weight: 600; color: var(--accent); margin-left: 4px; text-underline-offset: 2px; }
.toast .t-act:hover { text-decoration: underline; }
.toast .t-x { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--faint); transition: background .12s, color .12s; }
.toast .t-x:hover { background: var(--surface-3); color: var(--fg); }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left; opacity: .5; animation-name: toastbar; animation-timing-function: linear; animation-fill-mode: forwards; }
.toast.ok .t-bar { background: var(--ok); }
.toast.err .t-bar { background: var(--danger); }
.toast.info .t-bar { background: var(--accent); }
.toast:hover .t-bar, .toast:focus-within .t-bar { animation-play-state: paused; }
@keyframes toastbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toastout { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (max-width: 640px) { .toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; } .toast { width: auto; min-width: 0; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.out { animation-duration: .01ms; } }

/* ---- view loading state ---- */
.vstat { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vstat.warn { color: color-mix(in oklab, var(--accent) 80%, var(--fg)); background: color-mix(in oklab, var(--accent) 8%, transparent); cursor: help; }
.vstat.err { color: var(--danger); background: var(--danger-soft); }
button.vstat.err:hover { filter: brightness(.97); }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sk { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 0%, color-mix(in oklab, var(--surface-3) 50%, var(--surface)) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-list { padding: 10px 20px; display: grid; gap: 4px; }
.sk-row { display: flex; align-items: center; gap: 14px; height: 38px; border-bottom: 1px solid var(--border); }
.sk-row .sk:nth-child(2) { flex: none; }
.sk-board { display: flex; gap: 12px; padding: 14px 20px; }
.sk-col { width: 272px; flex: none; display: grid; gap: 8px; align-content: start; }
.sk-card { display: grid; gap: 10px; padding: 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .sk, .spin { animation: none; } }

/* ---- share popover ---- */
.share-row { display: flex; gap: 6px; }
.share-row input { flex: 1; min-width: 0; height: 32px; padding: 0 9px; font: 12px var(--mono); color: var(--fg-2); }
.share-note { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.share-people { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.sp-p { display: inline-flex; align-items: center; gap: 6px; max-width: 160px; font-size: 12.5px; }

/* ---- custom fields ---- */
.req { color: var(--danger); font-weight: 600; }
.attr-rte { min-height: 180px; max-height: 50vh; overflow: auto; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); }
.attr-rte:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ---- comment edit, checklist delete, inbox row actions ---- */
.cmt-edit { display: grid; gap: 6px; margin-top: 4px; }
.cmt-edit textarea { width: 100%; min-height: 70px; resize: vertical; }
.cmt .acts button + button { margin-left: 10px; }
.sl-row .cl-x { opacity: 0; transition: opacity .12s; }
.sl-row:hover .cl-x, .sl-row .cl-x:focus-visible { opacity: 1; }
.sl-row .cl-x:hover { color: var(--danger); }
.sl-row .name[data-a="clrename"] { cursor: text; }
.ib-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ib-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.ib-item:hover .ib-acts, .ib-item:focus-within .ib-acts { opacity: 1; }
@media (hover: none) { .sl-row .cl-x, .ib-acts { opacity: 1; } }

/* ---- project settings ---- */
.ps-members { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ps-m { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; height: 30px; padding: 0 4px 0 6px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--border); font-size: 12.5px; }
.ps-m .pill { font-size: 10.5px; }
.avs[data-a="projsettings"] { cursor: pointer; }

/* ---- rich text: hub's HTML and Markdown read the same ---- */
.rte[contenteditable="true"]:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
.rich { overflow-wrap: anywhere; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p { margin: 0 0 .65em; }
.rich h1, .rich h2, .rich h3, .rich h4, .rich h5, .rich h6 { margin: 1.1em 0 .45em; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
.rich h1 { font-size: 1.35em; } .rich h2 { font-size: 1.2em; } .rich h3 { font-size: 1.08em; } .rich h4, .rich h5, .rich h6 { font-size: 1em; }
.rich ul, .rich ol { margin: 0 0 .65em; padding-left: 1.4em; }
.rich ul { list-style: disc; } .rich ol { list-style: decimal; }
.rich ul ul { list-style: circle; } .rich li { margin: .15em 0; } .rich li > p { margin: 0; }
.rich li:has(> .tl-box) { list-style: none; margin-left: -1.2em; }
.rich .tl-box { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--border-strong); font-size: 10px; color: #fff; }
.rich .tl-box.on { background: var(--accent); box-shadow: none; }
.rich a { color: var(--accent); text-underline-offset: 2px; }
.rich code { font: .88em var(--mono); padding: .1em .35em; border-radius: 5px; background: var(--surface-3); }
.rich pre { margin: 0 0 .8em; padding: 10px 12px; border-radius: 9px; background: var(--surface-3); overflow-x: auto; line-height: 1.5; }
.rich pre code { padding: 0; background: none; font-size: .86em; white-space: pre; }
.rich blockquote { margin: 0 0 .8em; padding: 2px 0 2px 12px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.rich hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
.rich table { border-collapse: collapse; margin: 0 0 .8em; font-size: .95em; display: block; overflow-x: auto; max-width: 100%; }
.rich th, .rich td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; vertical-align: top; }
.rich th { background: var(--surface-2, var(--surface-3)); font-weight: 600; }
.rich img { max-width: 100%; height: auto; border-radius: 8px; }

/* ---- connect AI tools (MCP) ---- */
.mcp-guide { max-width: 860px; }
.mcp-guide h2 { margin: 28px 0 10px; font-size: 15px; }
.mcp-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 18px; }
.mcp-url .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.client-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.client-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); text-align: left; transition: box-shadow .12s, background .12s; }
.client-tabs button b { font-size: 13px; font-weight: 600; }
.client-tabs button span { font-size: 11px; color: var(--faint); }
.client-tabs button:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.client-tabs button.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: color-mix(in oklab, var(--accent) 6%, var(--surface)); }
.client-body { padding: 16px 18px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: none; }
.steps > li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; line-height: 1.55; font-size: 13.5px; }
.steps > li > div { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.st-n { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 600 12px var(--mono); background: color-mix(in oklab, var(--accent) 12%, transparent); color: var(--accent); }
.cblock { width: 100%; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.cblock .cb-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 4px 12px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--border); }
.cblock pre { margin: 0; padding: 10px 12px; overflow-x: auto; }
.cblock code { font: 12.5px/1.55 var(--mono); white-space: pre; color: var(--fg); }
.note-s { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.tech { margin-top: 16px; font-size: 12.5px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.tool { display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); }
.tool code { font: 600 12px var(--mono); color: var(--accent); }
.tool span { font-size: 12.5px; color: var(--muted); }
.sec-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--fg-2); line-height: 1.55; }
.connect-page { min-height: 100%; background: var(--canvas); overflow-y: auto; height: 100%; }
.cp-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: color-mix(in oklab, var(--canvas) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.cp-main { max-width: 900px; margin: 0 auto; padding: 32px 24px 64px; }
.cp-main h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }
@media (max-width: 640px) { .cp-h { padding: 10px 16px; } .cp-main { padding: 22px 16px 48px; } .client-body { padding: 14px 12px; } .steps > li { grid-template-columns: 22px 1fr; gap: 10px; } }

/* ---- tree (hierarchy) rows in list and table ---- */
.row[style*="--lvl"] .ttl { padding-left: calc(var(--lvl, 0) * 22px); }
.name-cell[style*="--lvl"] { padding-left: calc(var(--lvl, 0) * 20px); }
.caret { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; color: var(--muted); flex: none; transition: transform .14s ease, background .12s; }
.caret:hover { background: var(--surface-3); color: var(--fg); }
.caret.open svg { transform: rotate(90deg); }
.caret svg { transition: transform .14s ease; }
.caret-sp { width: 20px; flex: none; display: inline-block; }
.row.nomatch, tr.nomatch { opacity: .55; }
.row.nomatch:hover, tr.nomatch:hover { opacity: .85; }
.kids-load .ttl, .kids-load .name-cell { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.parent-hint { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 0 6px; height: 18px; border-radius: 5px; font: 500 11px var(--mono); color: var(--muted); background: var(--surface-3); cursor: pointer; }
.parent-hint:hover { color: var(--accent); }

/* ---------------- reports (report.js) ---------------- */
.rl { max-width: 980px; margin: 0 auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 10px; }
.rl-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 6px; }
.rl-head p { margin: 0; }
.rl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 14px; background: var(--surface); border-radius: var(--r-lg, 12px); box-shadow: inset 0 0 0 1px var(--border); }
.rl-title { font-weight: 600; color: var(--fg); text-decoration: none; }
.rl-title:hover { color: var(--accent); text-decoration: underline; }
.rl-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rl-k { display: flex; gap: 12px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.rl-k b { color: var(--fg); }
.rl-k .danger b { color: var(--danger); }
.rl-a { display: flex; gap: 4px; align-items: center; }
@media (max-width: 760px) { .rl-row { grid-template-columns: 1fr; gap: 8px; } }
.rt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rt-card { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); color: var(--fg); font-size: 12.5px; }
.rt-card span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.rt-card:hover { background: var(--hover); }
.rt-card.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.re-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.re { display: grid; grid-template-columns: 380px minmax(0, 1fr); height: 100%; min-height: 0; }
.re-side { overflow: auto; padding: 14px 16px 18px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.re-main { overflow: auto; min-width: 0; background: var(--canvas); }
.re-main .rpt { padding-top: 18px; }
.re-link { display: flex; gap: 6px; align-items: center; }
.re-link input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.re-f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.re-f > span:first-child { color: var(--muted); font-size: 12px; font-weight: 500; }
.re-f input, .re-f select, .re-f textarea, .re-2 > input { width: 100%; }
.re-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.re-check input { width: auto; margin: 0; }
.re-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rf { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 13px; font-size: 12px; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); }
.rf i { width: 8px; height: 8px; border-radius: 50%; }
.rf:hover { background: var(--hover); }
.rf.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.re-h { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 4px; }
.re-h .btn { margin-left: auto; }
.re-secs { display: flex; flex-direction: column; gap: 6px; }
.re-sec { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); }
.re-sec.open { box-shadow: inset 0 0 0 1px var(--accent); }
.re-sh { display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 6px; }
.re-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; padding: 4px; font-size: 13px; font-weight: 500; color: var(--fg); }
.re-name span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-name .faint { font-weight: 400; font-size: 11.5px; margin-left: auto; }
.re-opts { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 12px; border-top: 1px solid var(--border-soft); }
.re-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; bottom: -18px; background: var(--surface); padding: 10px 0 2px; border-top: 1px solid var(--border-soft); margin-top: auto; }
.re-warn { flex-basis: 100%; margin: 0; display: flex; gap: 6px; align-items: flex-start; color: var(--warn); font-size: 12px; }
/* a sprint report: the sprint picker, and the period it fixes (read-only) */
.rsp-btn { width: 100%; justify-content: flex-start; font-weight: 400; }
.rsp-btn .ellipsis { flex: 1; text-align: left; }
.rsp-btn.faint { color: var(--muted); }
.rsp-msg { margin: 0; display: flex; gap: 6px; align-items: flex-start; color: var(--warn); font-size: 12.5px; }
.rsp-fail { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 12.5px; }
.rsp-fail .btn { margin-left: auto; }
/* the new-report dialog: on a short screen its body scrolls and Create stays in view */
.modal.nr { display: flex; flex-direction: column; max-height: calc(100vh - 12vh - 16px); max-height: calc(100dvh - 12vh - 16px); }
.modal.nr .modal-b { overflow-y: auto; min-height: 0; }
/* the team picker (new-report dialog, editor) */
.rteam { display: flex; flex-direction: column; gap: 6px; }
.rteam-list { max-height: 140px; overflow-y: auto; }
.rteam-top { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.rteam-top .rteam-q { flex: 1; min-width: 120px; width: auto; height: 26px; padding: 0 9px; font-size: 12px; border-radius: 13px; }
.rteam-mine .ic { margin-right: 1px; }
.field .lbl .faint { font-weight: 400; margin-left: 4px; }
.re-ro { margin: 0; display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--border); color: var(--fg-2); font-size: 12.5px; }
@media (max-width: 900px) { .re { grid-template-columns: 1fr; height: auto; } .re-side { border-right: 0; border-bottom: 1px solid var(--border); } .re-main { overflow: visible; } }
.rp-wait { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; color: var(--muted); }
.rp-wait h2 { margin: 0; color: var(--fg); }

/* report period picker (report.js openPeriodPicker): quick picks on the left, a calendar or a list of weeks on the right */
.pp-trig { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--fg); text-align: left; font-size: 13px; transition: box-shadow .12s; }
.pp-trig:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.pp-trig[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.pp-trig > .ic { color: var(--muted); flex: none; }
.pp-trig > .ic:last-child { margin-left: auto; }
.pp-trig b { font-weight: 550; white-space: nowrap; }
.pp-tsub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.pp-roll { display: inline-flex; align-items: center; gap: 3px; flex: none; height: 18px; padding: 0 7px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 550; }
.pop.pp { width: 728px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: hidden; }
.pp-body { display: flex; min-height: 0; flex: 1 1 auto; }
.pp-side { width: 212px; flex: none; display: flex; flex-direction: column; padding: 10px 8px 8px; border-right: 1px solid var(--border-soft); background: var(--surface-2); overflow-y: auto; }
.pp-k { padding: 2px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.pp-pre { display: flex; flex-direction: column; gap: 1px; }
.pp-p { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 29px; padding: 0 8px; border-radius: 7px; color: var(--fg-2); text-align: left; white-space: nowrap; }
.pp-p:hover { background: var(--hover); color: var(--fg); }
.pp-p.on { background: var(--accent-soft); color: var(--accent); font-weight: 550; }
.pp-ph { color: var(--faint); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
.pp-p.on .pp-ph { color: var(--accent); opacity: .8; }
.pp-sep { display: block; height: 1px; margin: 4px 8px; background: var(--border-soft); }
.pp-rl { display: flex; align-items: flex-start; gap: 9px; margin-top: auto; padding: 10px 8px 2px; border-top: 1px solid var(--border-soft); }
.pp-rl .switch { margin-top: 2px; }
.pp-rl .switch:disabled { opacity: .45; cursor: not-allowed; }
.pp-rl:has(.switch:disabled) b { color: var(--muted); }
.pp-rl b { display: block; font-size: 12.5px; font-weight: 550; color: var(--fg); }
.pp-rl span span { display: block; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 10px; }
.pp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-in { display: flex; align-items: center; gap: 6px; }
.pp-in input { width: 106px; height: 28px; padding: 0 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pp-in input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.pp-cal { position: relative; flex: 1; display: flex; flex-direction: column; }
.pp-tip { margin: auto 0 0; padding-top: 10px; font-size: 11.5px; color: var(--faint); }
.pp-nav { position: absolute; top: 1px; }
.pp-nav.prev { left: 0; }
.pp-nav.next { right: 0; }
.pp-mos { display: flex; gap: 22px; }
.pp-mo { flex: 1; min-width: 0; }
.pp-mt { height: 26px; margin-bottom: 4px; text-align: center; font-weight: 600; line-height: 26px; }
.pp-dow, .pp-row { display: grid; grid-template-columns: 26px repeat(7, minmax(0, 1fr)); }
.pp-dow span { height: 22px; text-align: center; font-size: 11px; font-weight: 500; line-height: 22px; color: var(--faint); }
.pp-dow span:first-child { font-size: 10px; }
.pp-row { margin-bottom: 2px; }
.pp-wn { height: 32px; border-radius: 6px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pp-wn:hover, .pp-wn.on { color: var(--accent); background: var(--accent-soft); }
.pp-wn.on { font-weight: 600; }
.pp-x { height: 32px; }
.pp-d { position: relative; z-index: 0; height: 32px; font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.pp-d::before { content: ""; position: absolute; inset: 1px 2px; z-index: -1; border-radius: 7px; }
.pp-d:hover::before { background: var(--hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pp-d.in { background: var(--accent-soft); color: var(--fg); }
.pp-d.in.pv { background: color-mix(in srgb, var(--accent-soft) 65%, transparent); }
.pp-row > .pp-d.in:nth-child(2), .pp-x + .pp-d.in, .pp-d.in.lo { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.pp-row > .pp-d.in:last-child, .pp-d.in:has(+ .pp-x), .pp-d.in.hi { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.pp-d.lo::before, .pp-d.hi::before, .pp-d.lo:hover::before, .pp-d.hi:hover::before { background: var(--accent); box-shadow: none; }
.pp-d.lo, .pp-d.hi { color: var(--accent-fg); font-weight: 600; }
.pp-d.today::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.pp-d.lo.today::after, .pp-d.hi.today::after { background: var(--accent-fg); }
.pp-d[aria-disabled="true"] { color: var(--faint); opacity: .5; cursor: not-allowed; text-decoration: line-through; }
.pp-d[aria-disabled="true"]:hover::before { background: none; box-shadow: none; }
.pp-weeks { position: relative; flex: 1 1 0; min-height: 252px; display: flex; flex-direction: column; margin: 0 -8px; padding: 0 8px 4px; overflow-y: auto; overscroll-behavior: contain; }
.pp-yr { position: sticky; top: 0; z-index: 1; padding: 4px 10px; background: var(--surface); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--faint); }
.pp-wk { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; flex: none; padding: 0 10px; border-radius: 7px; text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-wl { color: var(--fg-2); }
.pp-wl b { display: inline-block; min-width: 56px; font-weight: 550; color: var(--fg); }
.pp-wk em { padding: 1px 7px; border-radius: 9px; background: var(--surface-3); font-size: 11px; font-style: normal; font-weight: 500; color: var(--muted); }
.pp-wk .ic { margin-left: auto; color: var(--accent); }
.pp-wk:hover { background: var(--hover); }
.pp-wk.on { background: var(--accent-soft); }
.pp-wk.on .pp-wl, .pp-wk.on b { color: var(--accent); }
.pp-wk.on em { background: var(--surface); color: var(--accent); }
.pp-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 16px; border-top: 1px solid var(--border-soft); }
.pp-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.4; color: var(--fg-2); }
.pp-sum b { font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.pp-sum .faint { font-size: 11.5px; }
.pp-sum .ic { vertical-align: -1px; }
.pp-err { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); }
.pp-rolls { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-weight: 550; }
.pp-foot .btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 759px) { .pop.pp { width: 540px; } .pp-side { width: 204px; } }
@media (max-width: 640px) {
  .pop.pp { top: auto !important; bottom: 8px; left: 8px !important; right: 8px; width: auto; max-width: none; max-height: calc(100dvh - 16px); border-radius: 16px; }
  .pp-body { flex-direction: column; overflow-y: auto; }
  .pp-side { width: auto; padding: 12px 0 10px; border-right: 0; border-bottom: 1px solid var(--border-soft); background: var(--surface); overflow: visible; }
  .pp-k, .pp-sep, .pp-ph { display: none; }
  .pp-pre { flex-direction: row; gap: 6px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
  .pp-p { flex: none; height: 32px; padding: 0 12px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--border); }
  .pp-p.on { box-shadow: inset 0 0 0 1px var(--accent-line); }
  .pp-rl { align-items: center; margin: 10px 14px 0; padding: 0; border-top: 0; }
  .pp-rl .switch { margin-top: 0; }
  .pp-rl b { display: inline; margin-right: 6px; }
  .pp-rl span span { display: inline; }
  .pp-pre { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .pp-tip { display: none; }
  .pp-main { padding: 12px 14px 10px; }
  .pp-top { flex-direction: column; align-items: stretch; }
  .pp-top .seg { align-self: flex-start; }
  .pp-in input { flex: 1; width: auto; min-width: 0; height: 34px; font-size: 14px; }
  .pp-wn, .pp-x, .pp-d { height: 38px; }
  .pp-d { font-size: 14px; }
  .pp-weeks { height: 300px; }
  .pp-wk { height: 40px; }
  .pp-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .pp-foot .btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
}

/* ---------- reports: the side panel (a task or a person, over the report) ---------- */
.rtp-bg { position: fixed; inset: 0; z-index: 48; background: var(--scrim); animation: fade .2s ease-out; }
.rtp { position: fixed; top: 8px; right: 8px; bottom: 8px; z-index: 49; width: min(600px, calc(100% - 16px)); display: flex; flex-direction: column; background: var(--surface); color: var(--fg); border-radius: 16px; box-shadow: var(--pop-shadow); overflow: hidden; font-size: 13.5px; line-height: 1.5; animation: rtpin .28s cubic-bezier(.2, .8, .2, 1); }
.rtp:focus { outline: none; }
.rtp-bg.out { animation: rtpfade .17s ease-in forwards; pointer-events: none; }
.rtp.out { animation: rtpout .17s ease-in forwards; pointer-events: none; }
@keyframes rtpin { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rtpout { to { transform: translateX(28px); opacity: 0; } }
@keyframes rtpfade { to { opacity: 0; } }
@keyframes rtpswap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rtp-h { display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--border-soft); flex: none; }
.rtp-h > .ibtn:first-child { margin-left: -8px; margin-right: 4px; }
.rtp-crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.rtp-crumb .sep { color: var(--faint); }
.rtp-crumb .mono { font-size: 12px; color: var(--faint); flex: none; }
.rtp-pj { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--fg-2); }
.rtp-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 32px; animation: rtpswap .22s ease-out; }
.rtp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rtp-pill { --c: var(--faint); display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 9px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; background: color-mix(in oklab, var(--c) 13%, var(--surface)); color: color-mix(in oklab, var(--c) 70%, var(--fg)); }
.rtp-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.rtp-pill.pr::before { border-radius: 2px; transform: rotate(45deg) scale(.88); }
.rtp-pill.ty { background: transparent; box-shadow: inset 0 0 0 1px var(--border); color: var(--fg-2); }
.rtp-t { margin: 12px 0 0; font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; text-wrap: pretty; overflow-wrap: anywhere; }
.rtp-parent { margin: 8px 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; min-width: 0; }
.rtp-parent a { color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtp-parent a:hover { color: var(--accent); text-decoration-color: currentColor; }
.rtp-props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 18px 0 0; padding: 6px 16px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-soft); }
.rtp-props > div { padding: 8px 0; min-width: 0; }
.rtp-props dt { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-bottom: 3px; }
.rtp-props dd { margin: 0; display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 500; }
.rtp-props dd > span:not(.rtp-av) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rtp-props dd > .faint { flex: none; font-weight: 400; }
.rtp-av { --c: var(--faint); width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--c); color: #fff; font-size: 9.5px; font-weight: 650; letter-spacing: .02em; }
.rtp-av.sm { width: 18px; height: 18px; font-size: 8px; }
.rtp-av.lg { width: 48px; height: 48px; font-size: 16px; }
.rtp-late { color: var(--danger); }
.rtp-ok { color: var(--ok); display: inline-flex; align-items: center; gap: 4px; }
.rtp-prog { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 16px 2px 0; font-size: 12px; color: var(--muted); }
.rtp-prog b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.rtp-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.rtp-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.rtp-bar.sm { height: 4px; margin: -2px 0 8px; }
.rtp-bar.sm i { background: var(--ok); }
.rtp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.rtp-tag { --c: #8a8a96; height: 22px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 550; background: color-mix(in oklab, var(--c) 13%, var(--surface)); color: color-mix(in oklab, var(--c) 75%, var(--fg)); }
.rtp-s { margin-top: 26px; }
.rtp-s h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.rtp-cnt { font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface-3); border-radius: 10px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.rtp-overdue h3 { color: var(--danger); }
.rtp-done h3 { color: var(--ok); }
.rtp-rich { font-size: 13.5px; line-height: 1.6; color: var(--fg-2); }
.rtp-empty, .rtp-earlier { color: var(--faint); font-size: 12.5px; margin: 4px 0; }
.rtp-earlier { margin: 0 0 10px; }
.rtp-rows + .rtp-earlier { margin: 6px 0 0; }
.rtp-ck { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rtp-ck li { display: flex; align-items: flex-start; gap: 10px; padding: 4px 2px; font-size: 13px; }
.rtp-cb { width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--border-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.rtp-ck li.on .rtp-cb { background: var(--ok); box-shadow: none; }
.rtp-ck li.on > span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.rtp-rows { display: flex; flex-direction: column; margin: 0 -8px; }
.rtp-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 8px; border-radius: 8px; color: var(--fg); text-decoration: none; transition: background .12s; }
.rtp-row:hover { background: var(--surface-2); }
.rtp-row:hover .rtp-rn { color: var(--accent); }
.rtp-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rtp-dot { --c: var(--faint); width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c) 18%, transparent); }
.rtp-rn { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rtp-m { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rtp-cs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rtp-c { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.rtp-c .rtp-av { width: 26px; height: 26px; font-size: 10px; }
.rtp-c > div { background: var(--surface-2); border-radius: 4px 12px 12px 12px; padding: 7px 12px 9px; min-width: 0; }
.rtp-cw { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.rtp-cw b { font-weight: 600; font-size: 12.5px; }
.rtp-cw span { font-size: 11.5px; color: var(--faint); }
.rtp-c .rich { font-size: 13px; color: var(--fg-2); }
.rtp-c .rich > :last-child { margin-bottom: 0; }
.rtp-note { display: flex; gap: 12px; margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--fg-2); }
.rtp-note > .ic { color: var(--accent); flex: none; margin-top: 1px; }
.rtp-note b { display: block; color: var(--fg); font-weight: 600; font-size: 13px; }
.rtp-note p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; }
.rtp-note .btn { margin-top: 10px; }
.rtp-note.warn { background: var(--warn-soft); }
.rtp-note.warn > .ic { color: var(--warn); }
.rtp-sk { display: grid; gap: 10px; margin-top: 28px; }
.rtp-sk .sk.tall { height: 72px; margin-top: 10px; border-radius: 10px; }
.rtp-f { flex: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 22px; border-top: 1px solid var(--border-soft); background: var(--surface); }
.rtp-f p { flex: 1; min-width: 0; margin: 0; font-size: 12px; color: var(--muted); }
.rtp-open { height: 36px; padding: 0 16px; border-radius: 10px; font-weight: 600; gap: 8px; text-decoration: none; flex: none; }
.rtp-who { display: flex; align-items: center; gap: 14px; }
.rtp-who > div { flex: 1; min-width: 0; }
.rtp-who .rtp-t { margin: 0; font-size: 20px; }
.rtp-who p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.rtp-hl { flex: none; align-self: flex-start; margin-top: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.rtp-hl.ok { background: var(--ok-soft); color: var(--ok); }
.rtp-hl.warn { background: var(--warn-soft); color: var(--warn); }
.rtp-hl.bad { background: var(--danger-soft); color: var(--danger); }
.rtp-k { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.rtp-k div { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-soft); min-width: 0; }
.rtp-k b { font-size: 20px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rtp-k span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtp-k .alert b { color: var(--danger); }
.rtp-facts { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
@keyframes rtpup { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rtpdown { to { transform: translateY(24px); opacity: 0; } }
@media (max-width: 640px) {
  .rtp { inset: 0; width: 100%; border-radius: 0; animation-name: rtpup; }
  .rtp.out { animation-name: rtpdown; }
  .rtp-h { padding: 0 6px 0 14px; }
  .rtp-b { padding: 18px 16px 28px; }
  .rtp-t { font-size: 19px; }
  .rtp-props { gap: 0 14px; padding: 4px 14px; }
  .rtp-k { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rtp-k div { grid-column: span 2; }
  .rtp-k div:nth-child(n+4) { grid-column: span 3; }
  .rtp-f { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .rtp-f p { text-align: center; }
  .rtp-open { height: 42px; }
}
@media print { .rtp, .rtp-bg { display: none !important; } }

/* ---- affordances: what can be clicked looks it, what can't doesn't ---- */
.crumb h1 .ph-h1 { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: inherit; border-radius: 6px; padding: 1px 6px; margin-left: -6px; transition: background .12s; }
.crumb h1 .ph-h1:hover { background: var(--hover); }
.btn.primary .spin { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.nr-why { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; min-width: 0; font-size: 12.5px; color: var(--muted); }
.nr-why .ic { flex: none; color: var(--accent); }
.rte a[href] { cursor: pointer; }
/* ---------- reports: comments (on the report, a block, a task row) ---------- */
.rpt .rp-s { position: relative; }
.rc-ind { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px 0 6px; border-radius: 999px; color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 1; white-space: nowrap; vertical-align: middle; transition: background .12s, color .12s, opacity .12s; }
.rc-ind:hover { background: var(--surface-3); color: var(--fg); }
.rc-ind:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; opacity: 1; }
.rc-ind b { font-weight: 600; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rc-ind:not(.none) { color: var(--accent); background: color-mix(in oklab, var(--accent) 9%, transparent); }
.rc-ind:not(.none):hover { background: color-mix(in oklab, var(--accent) 16%, transparent); }
.rc-ind.none { opacity: 0; }
.rpt .rp-s h3 > .rc-ind { margin-left: auto; }
.rc-ind.corner { position: absolute; top: 10px; right: 10px; }
.rc-ind.row { height: 20px; margin-left: 6px; padding: 0 6px 0 5px; }
.rpt .rp-s:hover > h3 > .rc-ind.none, .rpt .rp-s:hover > .rc-ind.none, .rpt tr:hover .rc-ind.none, .rpt li:hover .rc-ind.none { opacity: 1; }
@media (hover: none) { .rc-ind.none { opacity: .75; } .rc-ind.none.row { display: none; } }
.rpt .rm-mr { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.rc-avs { display: inline-flex; align-items: center; margin-left: 2px; }
.rc-avs .rc-av + .rc-av { margin-left: -5px; }
.rc-av { --c: var(--faint); position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: var(--c); color: #fff; font-size: 10.5px; font-weight: 650; letter-spacing: .02em; }
.rc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-av.xs { width: 16px; height: 16px; font-size: 7px; box-shadow: 0 0 0 1.5px var(--surface); }
.rc-disc { gap: 6px; }
.rc-disc .rc-n { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent); }
.rc-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.rc-sub a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.rc-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.rc-c { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.rc-cb { min-width: 0; background: var(--surface-2); border-radius: 4px 12px 12px 12px; padding: 8px 12px 9px; box-shadow: inset 0 0 0 1px var(--border-soft); }
.rc-c.mine .rc-cb { background: color-mix(in oklab, var(--accent) 6%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 16%, transparent); }
.rc-cw { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rc-cw b { font-weight: 600; font-size: 12.5px; }
.rc-cw time, .rc-ed { font-size: 11.5px; color: var(--faint); }
.rc-ed::before { content: "· "; }
.rc-tx { margin-top: 3px; font-size: 13.5px; line-height: 1.55; color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.rc-tx a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.rc-acts { display: flex; gap: 12px; margin-top: 4px; }
.rc-acts button { font-size: 11.5px; color: var(--faint); font-weight: 500; }
.rc-acts button:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.rc-on { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin: 3px 0 1px; padding: 1px 8px 1px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }
.rc-on span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.rc-on:hover { background: color-mix(in oklab, var(--accent) 15%, transparent); }
.rc-on.gone { color: var(--faint); background: var(--surface-3); }
.rc-empty { margin: 18px 0 0; color: var(--faint); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.rc-new, .rc-signin, .rc-edit { margin-top: 16px; }
/* a thread's box sits at the foot of the panel, and stays there over a long thread */
.rc-b { display: flex; flex-direction: column; }
.rc-b .rc-new, .rc-b .rc-signin { position: sticky; bottom: -32px; margin: auto -28px -32px; padding: 12px 28px 16px; background: var(--surface); border-top: 1px solid var(--border-soft); }
.rc-b .rc-list, .rc-b .rc-empty { margin-bottom: 16px; }
.rc-new textarea, .rc-edit textarea { display: block; width: 100%; min-height: 64px; max-height: 40vh; resize: vertical; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; background: var(--surface); }
.rc-edit textarea { min-height: 56px; }
.rc-new textarea:focus, .rc-edit textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.rc-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rc-hint { flex: 1; min-width: 0; font-size: 11.5px; color: var(--faint); }
.rc-err { color: var(--danger); font-weight: 500; }
.rc-signin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rc-signin p { flex: 1; min-width: 200px; margin: 0; font-size: 12.5px; color: var(--muted); }
.rtp-s.rc-in .rc-list { margin-top: 4px; }
@keyframes rcflash { 0%, 35% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
@keyframes rcflashbg { 0%, 35% { background: var(--accent-soft); } 100% { background: transparent; } }
.rpt .rp-s.rc-flash { animation: rcflash 1.8s ease-out; }
.rpt tr.rc-flash td, .rpt li.rc-flash { animation: rcflashbg 1.8s ease-out; border-radius: 6px; }
@media (max-width: 640px) { .rc-b .rc-new, .rc-b .rc-signin { margin: auto -16px -28px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); bottom: -28px; } }
@media print { .rc-ind, .rc-disc { display: none !important; } }
