/* Fonts are self-hosted (SIL Open Font License) so the installed app and offline page work without Google. */
@font-face { font-family: "Inter"; src: url("fonts/inter-var.260c81a4759b.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-var.938c6e8019b6.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

/* TaskPipeline UI. Structure follows Zoho Projects (top bar with page title, grouped task table,
   master-detail task page with tabs, side-panel task form). Colours: "Warm Ivory + Forest Green", light only.
   Mobile first; 960px adds the sidebar. */
:root {
  --bg: #f5f4ef; --surface: #ffffff; --surface-2: #efeee8; --line: #e7e6df; --line-strong: #d6d4ca;
  --text: #1b241f; --text-2: #34413a; --muted: #575f58;
  --ink: #1c3d2d; --ink-hover: #142c20; --ink-text: #ffffff; --ink-tint: #e4efe8; --focus: #388a5c;
  /* tints (backgrounds behind dark text) */
  --blue: #e2eaf0; --peach: #f3e0d3; --columbia: #ebe9e1; --sunset: #f1e6c8; --periwinkle: #e6e1ef; --celadon: #d8eadf;
  /* strong accents (priority edge, due-date text, status dots) */
  --sage: #388a5c; --ochre: #c49a45; --burgundy: #b4533a;
  --green: #2f7a4f; --red: #b42f2f;
  --radius: 16px; --radius-sm: 12px;
  /* Three families: Manrope for headings and titles, Inter for everything you read or click,
     monospace for task IDs so they line up. */
  --font-head: "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-family: var(--font-body);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; font-family: var(--font-body);
       text-rendering: optimizeLegibility;
       padding-bottom: calc(68px + env(safe-area-inset-bottom)); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.icon { width: 20px; height: 20px; flex: none; }
h1, h2, h3, .brand, .topbar-title, .mhead .title, .z-drawer-head h1, .z-list-head, .z-group th, .z-info summary, .z-section summary,
.column h3 { font-family: var(--font-head); letter-spacing: -.01em; }
.z-id, .z-idtag, .z-chip-id { font-family: var(--font-mono); letter-spacing: 0; }
.z-table, .z-views, .z-tabs, .z-count, .z-num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 959px) { .desktop-only { display: none !important; } }

/* Accessibility & touch basics */
html { scroll-padding-top: 96px; } /* keep focused fields clear of the sticky top bar */
body { -webkit-tap-highlight-color: rgba(28, 61, 45, .12); }
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
h1, h2, h3 { text-wrap: balance; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-sm);
             background: var(--ink); color: var(--ink-text); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; } /* focus target of the skip link, not an interactive control */

/* ---------- Mobile header ---------- */
.mhead { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; min-height: 64px;
         padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--surface); }
.mhead .title { flex: 1; text-align: center; font-weight: 700; font-size: 18px; margin: 0; }
.mhead .hello { flex: 1; display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.mhead .hello strong { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mhead .hello small { color: var(--muted); font-size: 13px; }
.circle { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
          display: inline-flex; align-items: center; justify-content: center; color: var(--text); text-decoration: none; }
.circle.ghost { visibility: hidden; }
.topbar, .sidebar { display: none; }

main { min-width: 0; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--surface);
          border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 7px;
            min-height: 56px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 12px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar .icon { width: 22px; height: 22px; }

/* ---------- Sections ---------- */
h1 { display: none; }
h2 { font-size: 18px; margin: 0; letter-spacing: -.01em; }
.panel { background: var(--surface); padding: 20px 16px; margin-top: 8px; }
h1 + .panel { margin-top: 0; }
.muted { color: var(--muted); }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.meta span, .meta a { display: inline-flex; align-items: center; gap: 6px; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); margin: 0; }
.list { display: grid; gap: 12px; }

/* ---------- Controls ---------- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--ink); color: var(--ink-text);
  font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
button:hover, .btn:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
form > button[type="submit"] { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.fab { position: fixed; right: 18px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6; width: 52px; height: 52px; border-radius: 50%;
       background: var(--ink); color: var(--ink-text); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.fab .icon { width: 24px; height: 24px; }

.search { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 0 14px; min-height: 48px; }
.search input { border: 0; background: transparent; padding: 12px 0; }
.search input:focus { outline: 0; }
.search .icon { color: var(--muted); }
.search:focus-within { outline: 2px solid var(--focus); }

.segmented { display: flex; padding: 4px; background: var(--surface-2); border-radius: var(--radius-sm); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.segmented a { flex: 1 0 auto; text-align: center; padding: 9px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.segmented a[aria-current="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.segmented.small { margin: 0; } .segmented.small a { padding: 6px 12px; font-size: 14px; }

/* ---------- Pills, tags, avatars ---------- */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--columbia); white-space: nowrap; }
.pill.in_progress { background: var(--blue); } .pill.blocked { background: var(--peach); } .pill.done { background: var(--celadon); } .pill.deployed { background: var(--periwinkle); }
.tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--text); vertical-align: 2px; }
.tag.p1 { background: var(--celadon); } .tag.p2 { background: var(--blue); } .tag.p3 { background: var(--peach); }
.tag.off { background: var(--surface-2); color: var(--muted); }

.avatars { display: inline-flex; align-items: center; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: var(--text); border: 2px solid var(--surface); background: var(--columbia); flex: none; }
.avatars .av:not(:first-child) { margin-left: -9px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; }
.av.more { background: var(--surface-2); color: var(--text); font-size: 12px; }
.t0, .t6 { background: var(--sunset); } .t1, .t7 { background: var(--blue); } .t2, .t8 { background: var(--celadon); }
.t3, .t9 { background: var(--periwinkle); } .t4 { background: var(--peach); } .t5 { background: var(--columbia); }

/* ---------- Task card: left edge is the priority colour, as in the kit ---------- */
.tcard { display: block; position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
         padding: 16px 16px 14px 22px; text-decoration: none; color: inherit; }
.tcard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--accent, var(--blue)); }
.tcard.p0 { --accent: var(--line-strong); }
.z-idtag + .pill { margin-left: auto; } .tcard.p1 { --accent: var(--sage); } .tcard.p2 { --accent: var(--ochre); } .tcard.p3 { --accent: var(--burgundy); }
.tcard:hover { border-color: var(--columbia); }
.tcard .row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.tcard .title { font-weight: 600; font-size: 16px; margin: 12px 0 4px; overflow-wrap: anywhere; }
.tcard .excerpt { color: var(--muted); font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); font-weight: 500; gap: 6px 18px; }
.tcard .foot .icon { width: 18px; height: 18px; color: var(--muted); }
.left { color: var(--green); display: inline-flex; align-items: center; gap: 4px; } .left .icon { color: currentColor !important; }
.left.soon { color: var(--red); }



/* ---------- Board ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; }
.column { flex: 0 0 82%; scroll-snap-align: start; background: var(--surface-2); border-radius: var(--radius); padding: 16px 12px; }
.column h3 { font-size: 16px; margin: 0 4px 14px; }
.column .tcard .row1 .pill { display: none; }
.column .tcard.closed .row1 .pill { display: inline-flex; font-size: 12px; padding: 2px 8px; }
.column .empty { padding: 18px 8px; font-size: 14px; }

/* ---------- Forms ---------- */
form > div, .field { margin-bottom: 16px; }
label, legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
/* Filled inputs: soft grey fill, no border until focus. */
input, select, textarea { width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom on focus */
  padding: 12px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; background: var(--surface); }
textarea { resize: vertical; min-height: 120px; }
input[type="checkbox"] { width: 20px; height: 20px; margin: 0 10px 0 0; accent-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* ---------- Task form ---------- */
/* Compact one-row dropzone so the whole form fits a laptop screen. */
.dropzone { position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer; margin: 0;
            padding: 14px 16px; border: 1.5px dashed var(--columbia); border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 400; }
.dropzone .icon { width: 26px; height: 26px; color: var(--muted); }
.dropzone span { display: grid; gap: 2px; }
.dropzone strong { font-size: 14px; } .dropzone u { text-underline-offset: 3px; }
.dropzone kbd { font: 600 12px var(--font-mono); padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.dropzone small { color: var(--muted); font-size: 13px; max-width: 420px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.dropzone:hover, .dropzone.over { border-color: var(--ink); }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--focus); }
.thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.thumbs:empty { display: none; }
.thumbs li { position: relative; }
.thumb-x { position: absolute; top: 6px; right: 6px; width: 28px; min-height: 28px; padding: 0; border-radius: 50%;
           border: 1px solid var(--line); background: var(--surface); color: var(--text-2); box-shadow: 0 1px 3px rgba(27,36,31,.15); }
.thumb-x:hover { background: var(--surface); border-color: var(--red); color: var(--red); }
.thumb-x .icon { width: 14px; height: 14px; }
.thumbs li a { display: block; text-decoration: none; }
.thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.thumbs span { display: block; font-size: 13px; font-weight: 600; margin-top: 4px; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.opt, .person { position: relative; margin: 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.opt input, .person input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { display: inline-block; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.opt:hover span { border-color: var(--columbia); color: var(--text); }
.opt:has(input:checked) span { color: var(--text); border-color: transparent; background: var(--columbia); }
.opt.s-in_progress:has(input:checked) span, .opt.p2:has(input:checked) span { background: var(--blue); }
.opt.s-blocked:has(input:checked) span, .opt.p3:has(input:checked) span { background: var(--peach); }
.opt.s-done:has(input:checked) span, .opt.p1:has(input:checked) span { background: var(--celadon); }
.opt.s-deployed:has(input:checked) span { background: var(--periwinkle); }
.person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.person .av { width: 28px; height: 28px; font-size: 12px; border: 0; }
.person:has(input:checked) { border-color: var(--ink); color: var(--text); background: var(--surface-2); }
.opt:has(input:focus-visible), .person:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.helptext { font-size: 13px; color: var(--muted); display: block; margin-top: 4px; }
.errorlist { color: var(--red); font-size: 14px; padding-left: 18px; margin: 4px 0; }



/* ---------- Zoho-style structure ---------- */
.z-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 0; flex-wrap: wrap; }
.z-views { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); flex: 1 1 auto; }
.z-views a { flex: none; padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.z-views a span { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.z-views a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.z-views a[aria-current] span { background: var(--ink-tint); color: var(--ink); }
.z-tools { display: flex; align-items: center; gap: 10px; }
.z-note { padding: 8px 16px 0; margin: 0; color: var(--muted); font-size: 14px; }
.z-sheet { background: var(--surface); margin-top: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.z-table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--text); }
.z-table tbody { content-visibility: auto; contain-intrinsic-size: auto 480px; } /* skip rendering off-screen groups in long lists */
.z-table th, .z-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.z-table thead th { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.z-group th { background: var(--bg); font-weight: 600; }
.z-group a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.z-group .icon { width: 16px; height: 16px; color: var(--muted); }
.z-count { display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.z-row { position: relative; }
.z-row:hover td { background: var(--bg); }
.z-row td:first-child { box-shadow: inset 3px 0 0 var(--accent, transparent); }
.z-row.p1 { --accent: var(--sage); } .z-row.p2 { --accent: var(--ochre); } .z-row.p3 { --accent: var(--burgundy); }
.z-id, .z-idtag { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.z-id a { text-decoration: none; }
.z-task a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; } .z-task a:hover { color: var(--ink); text-decoration: underline; }
.z-sub { display: block; font-size: 13px; margin-top: 2px; }
.z-num { text-align: right !important; white-space: nowrap; color: var(--muted); }
.z-num span { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; }
.z-num .icon, .z-due .icon { width: 15px; height: 15px; }
.z-due { white-space: nowrap; font-size: 14px; }
.z-add td { padding: 6px 12px; }
.z-add a { font-size: 14px; color: var(--muted); text-decoration: none; } .z-add a:hover { color: var(--ink); }
/* Phones: each row becomes a compact two-line item. */
@media (max-width: 959px) {
  .z-table thead { display: none; }
  .z-table tbody, .z-table tr { display: block; }
  .z-group th { display: block; }
  .z-table .z-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 16px; border-bottom: 1px solid var(--line);
           box-shadow: inset 3px 0 0 var(--accent, transparent); }
  .z-row td { display: block; padding: 0; border: 0; box-shadow: none !important; }
  .z-row .z-task { flex-basis: 100%; }
  .z-row .z-prio, .z-row .z-id { display: none; }
  .z-row .z-num { margin-left: auto; }
  .z-add { display: none !important; }
}

/* Top bar quick-create menu (native <details>, no JS) */
.z-create { position: relative; }
.z-create summary { list-style: none; }
.z-create summary::-webkit-details-marker { display: none; }
.z-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 190px; padding: 6px; background: var(--surface);
          border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(27,36,31,.12); display: grid; gap: 2px; }
.z-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.z-menu a:hover, .z-menu a:focus-visible { background: var(--surface-2); }
.z-menu .icon { width: 18px; height: 18px; color: var(--muted); }

/* Project page: header, Kanban | List switch */
.z-phead { background: var(--surface); padding: 16px; }
.z-lede { margin: 0 0 10px; color: var(--text-2); max-width: 760px; white-space: pre-wrap; overflow-wrap: anywhere; }
.z-chip-ok { background: var(--celadon); color: var(--green); }
.z-phead .z-meta .avatars .av { width: 26px; height: 26px; font-size: 11px; }
.board.z-board { margin: 14px 0 0; } /* no padded card around it any more, so no negative side margins */
.column h3 { display: flex; align-items: center; gap: 8px; }
.column h3 .z-count { margin-left: 0; }
.z-dot.closed { background: var(--sage); } .z-dot.todo { background: #9a9688; }
.z-none { margin: 0; padding: 14px 4px; text-align: center; color: var(--muted); font-size: 14px; }
.z-gap { margin: 16px; }

/* Task page: task list on the left, details with tabs on the right */
.z-split { display: block; }
.z-list { display: none; }
.z-detail { background: var(--surface); padding: 16px; }
.z-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.z-chips { display: flex; gap: 6px; }
.z-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 600;
          background: var(--ink-tint); color: var(--ink); }
.z-chip .icon { width: 14px; height: 14px; }
.z-chip-id { background: var(--surface-2); color: var(--muted); }
.z-actions { display: none; gap: 6px; }
.btn.danger-text { background: none; border-color: transparent; color: var(--red); width: auto; }
.btn.danger-text:hover { background: var(--surface-2); border-color: transparent; }
h1.z-title { display: block; font-size: 22px; line-height: 1.25; margin: 12px 0 6px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.z-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--muted); font-size: 14px; }
.z-meta span, .z-meta a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.z-meta a:hover { color: var(--ink); }
.z-meta .icon { width: 15px; height: 15px; }
.z-status-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 16px 0 0; padding: 14px 16px;
                  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.z-status-block dt, .z-info dt { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.z-status-block dd { margin: 0; font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 14px; }
.z-status-block dd .left { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.z-status-block dd .icon { width: 14px; height: 14px; }
.z-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.z-dot.in_progress { background: #4a7a9b; } .z-dot.blocked { background: var(--burgundy); } .z-dot.done { background: var(--sage); } .z-dot.deployed { background: #6e5a8f; }
.z-person { display: inline-flex; align-items: center; gap: 6px; }
.z-person .av, .z-list .av, .z-comments .av:not(.lg) { width: 24px; height: 24px; font-size: 11px; }
.z-info { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 16px; }
.z-info summary, .z-section summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; }
.z-info dl { margin: 0 0 14px; display: grid; grid-template-columns: 1fr; gap: 4px; }
.z-info dd { margin: 0 0 10px; }
.z-tabs { display: flex; gap: 4px; margin-top: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.z-tabs a { flex: none; padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.z-tabs a span { font-size: 13px; background: var(--surface-2); border-radius: 999px; padding: 1px 7px; margin-left: 2px; }
.z-tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.z-tabpanel { padding-top: 16px; }
.z-composer { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 8px; }
.z-editor { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.z-editor:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--ink-tint); }
.z-editor textarea { border: 0; background: none; min-height: 80px; resize: vertical; padding: 12px 14px; outline: 0; }
.z-editor-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg);
                 border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.z-editor-foot a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); text-decoration: none; }
.z-editor-foot a .icon { width: 16px; height: 16px; }
.z-editor-foot label { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.z-editor-foot select { width: auto; padding: 6px 28px 6px 10px; font-size: 14px; background-color: var(--surface); border: 1px solid var(--line); }
.z-grow { flex: 1; }
.z-comments, .z-timeline { list-style: none; margin: 0; padding: 0; }
.z-comments > li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.z-comment { flex: 1; min-width: 0; }
.z-comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.z-comment-head .muted { font-size: 13px; }
.z-comment-head form { margin: 0 0 0 auto; }
.z-comment .desc { margin-top: 6px; }
.z-change { margin: 6px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.z-change .pill { font-size: 12px; padding: 2px 8px; }
.z-icon-btn { width: 30px; min-height: 30px; padding: 0; background: none; border: 0; color: var(--muted); border-radius: 6px; }
.z-icon-btn:hover { background: var(--surface-2); border: 0; color: var(--red); }
.z-icon-btn .icon { width: 16px; height: 16px; }
.z-empty { color: var(--muted); padding: 14px 0; border-top: 1px solid var(--line); list-style: none; margin: 0; }
.z-files { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.z-files a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; background: var(--surface); }
.z-files a:hover { border-color: var(--line-strong); box-shadow: 0 4px 12px rgba(31,42,36,.08); }
.z-files img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.z-files span { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 13px; font-weight: 600; border-top: 1px solid var(--line); }
.z-files .icon { width: 14px; height: 14px; color: var(--sage); }
.z-timeline li { display: flex; gap: 12px; padding: 0 0 16px 0; position: relative; }
.z-timeline li::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.z-timeline li:last-child::before { display: none; }
.z-timeline .z-dot { margin-top: 5px; }
.z-timeline p { margin: 0; } .z-timeline .muted { font-size: 13px; }

/* Task form: Zoho-style side panel with a fixed header and footer */
.z-drawer { background: var(--surface); }
.z-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.z-drawer-head h1 { display: block; font-size: 18px; margin: 0; letter-spacing: 0; }
.z-drawer-body { padding: 16px 16px 88px; overscroll-behavior: contain; }
.z-drawer-body .dropzone { margin-top: 10px; }
.req { color: var(--red); }
.z-section { border-top: 1px solid var(--line); margin-top: 8px; }
.z-section summary { padding: 14px 0 10px; }
.z-section legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.z-grid2 { display: grid; gap: 0 20px; }
.z-check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid var(--line);
           border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; }
.z-check input { margin-top: 2px; }
.z-check strong { display: block; font-size: 14px; }
.z-check small { color: var(--muted); font-size: 14px; }
.z-facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0 0 8px; font-size: 14px; }
.z-facts dt { color: var(--muted); } .z-facts dd { margin: 0; font-weight: 600; }
.z-drawer-foot { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 4; display: flex; gap: 10px;
                 padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.z-drawer-foot > * { flex: 1; }

/* ---------- Sign-in page (centred card; reuses the site tokens, fonts and controls) ---------- */
body.auth { padding-bottom: 0; background: var(--bg); }
.auth .mhead { display: none; }
.auth main { padding: 0; max-width: none; }
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
             padding: 28px 24px; box-shadow: 0 1px 2px rgba(27,36,31,.04), 0 12px 32px rgba(27,36,31,.06); }
.auth-logo { display: block; font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--ink); margin-bottom: 20px; }
.auth-card h1 { display: block; font-size: 30px; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; }
.auth-input { position: relative; }
.auth-input > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.auth-input input { padding-left: 44px; padding-right: 48px; min-height: 52px; }
.auth-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; min-height: 40px; padding: 0;
            border: 0; border-radius: 8px; background: none; color: var(--muted); }
.auth-eye:hover { background: var(--surface-2); color: var(--text); border: 0; }
.auth-eye:active { transform: translateY(-50%) scale(.94); }
.auth-eye .icon { width: 20px; height: 20px; }
.auth-eye .eye-hide, .auth-eye[aria-pressed="true"] .eye-show { display: none; }
.auth-eye[aria-pressed="true"] .eye-hide { display: inline-flex; }
.auth-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 20px; }
.auth-check { display: inline-flex; align-items: center; gap: 0; margin: 0; font-weight: 500; font-size: 14px; cursor: pointer; }
.auth-forgot { text-align: right; font-size: 14px; max-width: 100%; }
.auth-forgot summary { cursor: pointer; color: var(--ink); font-weight: 600; list-style: none; }
.auth-forgot summary::-webkit-details-marker { display: none; }
.auth-forgot summary:hover { text-decoration: underline; }
.auth-forgot p { margin: 8px 0 0; padding: 10px 12px; text-align: left; background: var(--surface-2); border-radius: 10px; color: var(--text-2); font-size: 13px; }
form > button.auth-submit { min-height: 52px; font-size: 16px; }
.auth-foot { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

@media (min-width: 960px) {
  body.auth { display: block; }
  .auth-card { padding: 44px 44px 32px; }
}

/* ---------- Account: profile header, team table, form dialogs ---------- */
.acct-profile { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; }
.av.acct-av { width: 64px; height: 64px; font-size: 24px; border: 0; }
.acct-name { font-size: 22px; margin: 6px 0 4px; }
.acct-profile .z-meta .icon { width: 15px; height: 15px; }
.acct-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.acct-actions form { margin: 0; }
.acct-counts { display: flex; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.acct-counts h2 { margin-right: 4px; }
.acct-counts strong { color: var(--text); font-variant-numeric: tabular-nums; }
.acct-person { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.acct-person .av { width: 30px; height: 30px; font-size: 12px; }
.acct-email { color: var(--text-2); overflow-wrap: anywhere; }
.acct-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.acct-member-note { margin-top: 8px; } .acct-member-note p { margin: 0; }
.acct-two { display: grid; gap: 0 14px; }
.acct-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.acct-role span { display: grid; gap: 2px; height: 100%; padding: 12px 14px; text-align: left; }
.acct-role strong { color: var(--text); font-size: 14px; }
.acct-role small { color: var(--muted); font-weight: 400; font-size: 12px; line-height: 1.4; }
.opt.acct-role:has(input:checked) span { background: var(--ink-tint); border-color: var(--ink); }

dialog.sheet { overscroll-behavior: contain; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line);
               border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(27,36,31,.22); }
dialog.sheet::backdrop { background: rgba(27,36,31,.38); }
dialog.sheet form { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); margin: 0; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 19px; margin: 0; } .sheet-head p { margin: 4px 0 0; font-size: 13px; }
.sheet-body { padding: 18px 22px 6px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg);
              border-radius: 0 0 var(--radius) var(--radius); }
.sheet-foot .btn { min-width: 120px; }
@media (min-width: 560px) { .acct-two { grid-template-columns: 1fr 1fr; } }
@media (max-width: 959px) {
  .acct-table thead { display: none; }
  .acct-table .z-row { gap: 4px 12px; }
  .acct-table .acct-email { flex-basis: 100%; font-size: 13px; order: 2; }
  .acct-table .z-due { display: none !important; }
}
@media (min-width: 960px) {
  .acct-profile { grid-template-columns: auto 1fr auto; padding: 24px 28px; }
  .acct-actions { grid-column: auto; }
  .acct-profile + .z-toolbar { margin-top: 24px; }
}

/* ---------- Interface states: toasts, alerts, confirm dialog, loading, field errors, error pages ---------- */
:root { --ok-bg: #e6f1ea; --ok-fg: #24603f; --info-bg: #e7eef3; --info-fg: #2f5470; --warn-bg: #fbf1dc; --warn-fg: #7a5a12;
        --err-bg: #f9e5e3; --err-fg: #9c2a25; }
.toasts { position: fixed; z-index: 50; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: var(--radius-sm);
         background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok-fg);
         box-shadow: 0 8px 24px rgba(27,36,31,.12); font-weight: 500; }
.toast > .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--ok-fg); }
.toast > span { flex: 1; }
.toast.info { border-left-color: var(--info-fg); } .toast.info > .icon { color: var(--info-fg); }
.toast.warning { border-left-color: var(--warn-fg); } .toast.warning > .icon { color: var(--warn-fg); }
.toast.error { border-left-color: var(--err-fg); } .toast.error > .icon { color: var(--err-fg); }
.toast-x { width: 28px; min-height: 28px; padding: 0; border: 0; background: none; color: var(--muted); border-radius: 6px; }
.toast-x:hover { background: var(--surface-2); color: var(--text); border: 0; }
.toast-x .icon { width: 16px; height: 16px; }

.alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-sm);
         border: 1px solid transparent; font-size: 14px; font-weight: 500; line-height: 1.45; }
.alert > .icon { width: 18px; height: 18px; margin-top: 1px; }
.alert.error { background: var(--err-bg); color: var(--err-fg); border-color: #efcdc9; }
.alert.warning { background: var(--warn-bg); color: var(--warn-fg); border-color: #f0dfb3; }
.alert.info { background: var(--info-bg); color: var(--info-fg); border-color: #d3e0ea; }
.alert.success { background: var(--ok-bg); color: var(--ok-fg); border-color: #cfe3d6; }

.field:has(.errorlist) :is(input, select, textarea), .auth-input:has(+ .errorlist) input { border-color: var(--err-fg); background: var(--err-bg); }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--err-fg); font-size: 13px; font-weight: 500; }

.btn.btn-danger, button.btn-danger { background: var(--err-fg); border-color: var(--err-fg); color: #fff; }
.btn.btn-danger:hover, button.btn-danger:hover { background: #7f211d; border-color: #7f211d; }

dialog.confirm { overscroll-behavior: contain; width: min(420px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
                 background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(27,36,31,.22); }
dialog.confirm::backdrop { background: rgba(27,36,31,.38); }
.confirm-icon .if-neutral, dialog.neutral .confirm-icon .if-danger { display: none; }
dialog.neutral .confirm-icon .if-neutral { display: inline-flex; }
dialog.neutral .confirm-icon { background: var(--ink-tint); color: var(--ink); }
dialog.neutral #confirm-ok { background: var(--ink); border-color: var(--ink); }
dialog.neutral #confirm-ok:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.confirm-icon > span { display: inline-flex; }
.confirm-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
                background: var(--err-bg); color: var(--err-fg); margin-bottom: 14px; }
.confirm h2 { font-size: 19px; margin: 0 0 6px; }
.confirm p { margin: 0 0 22px; color: var(--text-2); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-actions .btn { min-width: 104px; }

button.is-loading, .btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
button.is-loading::after, .btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--ink-text) var(--ink-text) transparent transparent; animation: tp-spin .7s linear infinite; }
.btn.secondary.is-loading::after, .btn.danger-text.is-loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes tp-spin { to { transform: rotate(360deg); } }
button:disabled:not(.is-loading) { opacity: .55; cursor: not-allowed; }

body:not(.auth) .auth-page { min-height: calc(100vh - 160px); } /* error card inside the app shell for signed-in users */
.state-code { display: block; font-family: var(--font-head); font-size: 56px; font-weight: 800; line-height: 1; color: var(--ink); opacity: .9; margin-bottom: 8px; }
.state-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.state-actions .btn { flex: 1; }

/* ---------- Motion: CSS micro-interactions (JS entrances live in motion-init.js) ----------
   Short, transform/opacity-only transitions; everything is switched off for "reduce motion" users. */
:root { --ease-out: cubic-bezier(.22, 1, .36, 1); --t-fast: 140ms; --t-med: 220ms; }
button, .btn, .circle, .z-icon-btn, .fab, .opt span, .person, .segmented a, .z-views a, .z-tabs a,
.nav a, .sub a, .z-menu a, .z-list-item, .tcard, .z-files a, .thumbs img, .dropzone, input, select, textarea, .z-row td {
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease,
              box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), opacity var(--t-med) ease;
}
button:active, .btn:active, .circle:active, .fab:active, .opt:active span, .person:active { transform: scale(.97); }
.tcard:hover, .z-list-item:hover, .z-files a:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(27,36,31,.08); }
.z-list-item[aria-current]:hover { transform: none; }
.fab:hover { transform: scale(1.06); }
.nav a:hover .icon, .sub a:hover { transform: translateX(1px); }
.z-views a, .z-tabs a { transition-property: color, border-color, background-color; }
.z-create[open] > summary { box-shadow: 0 0 0 3px var(--ink-tint); }
.dropzone.over { transform: scale(1.01); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; }
  .tcard:hover, .z-list-item:hover, .z-files a:hover, .fab:hover { transform: none; }
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh;
         /* paint the sidebar column the full page height, even when the page is taller than the sticky sidebar */
         background: linear-gradient(to right, var(--surface) 259px, var(--line) 259px 260px, var(--bg) 260px); }
  .mobile-only, .mhead, .tabbar, .fab { display: none !important; }

  .sidebar { display: flex; flex-direction: column; grid-row: 1 / 3; position: sticky; top: 0; height: 100vh; overflow-y: auto;
             background: var(--surface); border-right: 1px solid var(--line); padding: 28px 20px; }
  .brand { font-weight: 800; font-size: 26px; letter-spacing: -.02em; text-decoration: none; padding: 0 8px 36px; }
  .nav { display: grid; gap: 6px; }
  .nav a, .nav .group { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 500; }
  .nav a:hover { color: var(--text); background: var(--surface-2); }
  .nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
  .nav .group { color: var(--text); font-weight: 600; justify-content: space-between; padding-right: 6px; }
  .nav .group a { padding: 4px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); }
  .nav .group a .icon { width: 14px; height: 14px; }
  .nav .group span { display: flex; align-items: center; gap: 12px; }
  .sub { display: grid; gap: 4px; margin: 0 0 6px 22px; padding-left: 10px; border-left: 1px solid var(--line); }
  .sub a { padding: 10px 12px; font-size: 14px; }
  .sub a[aria-current="page"] { background: var(--ink); color: var(--ink-text); }
  .sidebar .signout { margin-top: auto; }
  .sidebar .signout button { width: 100%; justify-content: flex-start; background: none; border: 0; color: var(--muted); padding: 11px 12px; font-weight: 500; }

  .topbar { display: flex; align-items: center; gap: 14px; padding: 16px 40px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .topbar .search { width: 360px; margin-right: auto; min-height: 44px; }
  .topbar .av { width: 44px; height: 44px; font-size: 16px; text-decoration: none; }

  main { padding: 32px 40px 32px; width: 100%; }
  h1 { display: block; font-size: 40px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 24px; }
  .panel { border-radius: 20px; padding: 24px; margin-top: 16px; }


  /* Zoho structure on desktop */
  .topbar-title { display: block; margin: 0 auto 0 0; font-size: 18px; font-weight: 700; }
  .topbar .search { width: 300px; margin-right: 0; }
  .z-toolbar { padding: 0; }
  .z-note { padding: 8px 0 0; }
  .z-sheet { margin: 12px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
  .z-table th, .z-table td { padding: 10px 14px; }
  .z-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; min-height: calc(100vh - 81px); margin: -32px -40px -32px; }
  .z-list { display: block; background: var(--bg); border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; max-height: calc(100vh - 81px); position: sticky; top: 81px; }
  .z-list-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 12px; font-weight: 700; }
  .z-list-head a { text-decoration: none; }
  .z-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .z-list-item { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
                 text-decoration: none; box-shadow: inset 3px 0 0 var(--accent, transparent); }
  .z-list-item.p1 { --accent: var(--sage); } .z-list-item.p2 { --accent: var(--ochre); } .z-list-item.p3 { --accent: var(--burgundy); }
  .z-list-item:hover { border-color: var(--line-strong); }
  .z-list-item[aria-current] { border-color: var(--ink); background: var(--ink-tint); }
  .z-list-top, .z-list-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
  .z-list-top .pill { font-size: 12px; padding: 2px 8px; }
  .z-list-title { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
  .z-list-foot .left { display: inline-flex; align-items: center; gap: 4px; } .z-list-foot .icon { width: 13px; height: 13px; }
  .z-detail { padding: 24px 32px 40px; }
  .z-phead { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 24px; }
  .z-phead + .z-toolbar { margin-top: 16px; }
  .z-gap { margin: 16px 0; }
  .z-actions { display: flex; }
  h1.z-title { font-size: 26px; }
  .z-status-block { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .z-info dl { grid-template-columns: 140px 1fr; gap: 6px 16px; }
  .z-info dd { margin: 0; }
  .z-drawer { margin: -32px -40px; height: calc(100vh - 81px); display: flex; flex-direction: column;
              border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(31,42,36,.06); }
  .z-drawer-body { flex: 1; min-height: 0; padding: 20px 40px 24px; overflow-y: auto; }
  .z-drawer-body > * { max-width: 880px; }
  .z-drawer-head { padding: 16px 40px; }
  .z-drawer-foot { position: static; justify-content: flex-start; padding: 12px 40px; }
  .z-drawer-foot > * { flex: none; min-width: 110px; }
  .z-grid2 { grid-template-columns: 1fr 1fr; }
  .z-grid2.inner { grid-template-columns: auto 1fr; }
  .toasts { left: auto; right: 24px; top: 92px; width: 380px; }
  /* Desktop board fits the screen: 4 columns when there is room, wrapping instead of scrolling sideways. */
  .board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; overflow: visible; margin: 0; padding: 0; }
}
