/* MM Core. The look is the MM CMS's (AgencyWeb /admin: Inter, neutral greys, 12px cards, 8px
   controls, compact type) in a dark version, with one accent colour the CMS does not have (the
   owner, 2026-10-10). Every colour, size, radius and shadow comes from the design tokens:
   design-tokens/tokens.json → /assets/tokens.css, linked before this file on every page.
   Change a token there, never a value here. The short names below are the ones this stylesheet
   was written with; they only point at tokens. */
:root{
  --ink:var(--color-text-default); --ink-soft:var(--color-text-subtle); --ink-faint:var(--color-text-faint);
  --canvas:var(--color-bg-canvas); --panel:var(--color-bg-surface); --raised:var(--color-bg-surface-raised);
  --chrome:var(--color-bg-chrome); --hairline:var(--color-border-subtle); --edge:var(--color-border-strong);
  --accent:var(--color-accent-base); --accent-ink:var(--color-accent-text); --accent-soft:var(--color-accent-soft);
  --on-accent:var(--color-text-on-accent);
  --danger:var(--color-danger-text); --danger-soft:var(--color-danger-soft);
  /* timeline lanes: purple plans the work, amber is what the client was told, and green
     is kept for work actually delivered */
  --tl-dev:var(--color-timeline-dev); --tl-client:var(--color-timeline-client);
  --tl-design:var(--color-timeline-design); --tl-ai:var(--color-timeline-ai);
  --warn:var(--color-warning-text); --warn-soft:var(--color-warning-soft);
  --radius:var(--radius-card); --radius-sm:var(--radius-control);
  --input-bg:var(--color-bg-surface-sunken);
  --role-admin:var(--color-role-admin); --role-employee:var(--color-role-employee); --role-developer:var(--color-role-developer);
  --role-collaborator:var(--color-role-collaborator); --role-client:var(--color-role-client);
  /* the users list colours a chip by role key: the developer tiers had no colour of their own */
  --role-dev_admin:var(--color-role-dev_admin); --role-dev_team:var(--color-role-dev_team);
}
/* One palette across every page — admin dashboards are no longer tinted differently.
   `.admin-area` is kept as a hook but must not change colours. */
body.admin-area{ /* intentionally empty */ }

/* dark only: the browser's own controls, scrollbars and canvas follow (with <meta name="color-scheme">) */
html{color-scheme:dark; accent-color:var(--accent); scrollbar-color:var(--edge) transparent}
/* our own display rules outrank the UA's [hidden] rule, so state it explicitly */
[hidden]{display:none!important}
/* Content wider than the phone (kanban columns, wide tables) makes mobile browsers widen
   the layout viewport and zoom the whole page out. Clip at the root and let those
   specific areas scroll inside themselves instead. `clip` rather than `hidden` so
   position:sticky keeps working. */
html, body{max-width:100%; overflow-x:clip}
*{box-sizing:border-box}
body{
  margin:0; background:var(--canvas); color:var(--ink);
  font-family:var(--font-family-base); font-size:var(--font-size-base); line-height:1.5;
  -webkit-font-smoothing:antialiased; -webkit-text-size-adjust:100%; text-size-adjust:100%;
}
h1,h2{font-family:var(--font-family-base); letter-spacing:-.01em}
h1{font-size:var(--font-size-h1); font-weight:var(--font-weight-bold); margin:0}
h2{font-size:var(--font-size-h2); font-weight:var(--font-weight-semibold); margin:0 0 10px}
a{color:var(--accent-ink)}
code, kbd, pre{font-family:var(--font-family-mono)}

/* the page's own bar: chrome-dark, as the CMS's top bar */
.topbar{
  display:flex; align-items:center; gap:14px; min-height:56px;
  padding:10px 22px; border-bottom:1px solid var(--hairline); background:var(--chrome);
}
.topbar .brand{font-weight:var(--font-weight-bold); font-size:14px; color:var(--ink); letter-spacing:-.01em}
.topbar .sep{color:var(--ink-faint)}
/* the breadcrumbs are targets (a bar of links, not a sentence): 24px tall at least (WCAG 2.2, 2.5.8) */
.topbar a:not(.btn){display:inline-flex; align-items:center; min-height:24px}
.topbar .spacer{flex:1}
.topbar .who{font-size:var(--font-size-sm); color:var(--ink-soft)}

.wrap{max-width:var(--layout-content-max); margin:26px auto; padding:0 22px}
/* a working page with columns side by side (Estimations): as wide as the screen allows, up to 1440px */
.wrap.wide{max-width:var(--layout-content-wide)}
.panel{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-card)}

/* preview-as banner — always visible while previewing */
.preview-bar{
  position:sticky; top:0; z-index:50; display:none;
  align-items:center; gap:12px; padding:10px 22px;
  background:var(--color-preview-bg); color:var(--color-preview-text); font-size:var(--font-size-sm);
}
.preview-bar.on{display:flex}
.preview-bar button{
  background:var(--color-preview-text); color:var(--color-preview-bg); border:0; border-radius:var(--radius-sm);
  padding:6px 12px; font-weight:var(--font-weight-semibold); cursor:pointer;
}

/* buttons, as the CMS's: primary filled (the accent here), secondary outlined, danger */
button, .btn{
  font:inherit; font-size:var(--font-size-sm); font-weight:var(--font-weight-semibold); line-height:1.35;
  cursor:pointer; text-decoration:none; display:inline-block;
  background:var(--accent); color:var(--on-accent); border:0; border-radius:var(--radius-sm);
  padding:8px 15px;
}
/* hover lifts the button it is on, whatever its own colours (custom buttons set their own background) */
button:hover, .btn:hover{filter:brightness(1.12)}
button:disabled:hover{filter:none}
/* a link styled as a button takes the same variants (a.btn.ghost rendered as a full green button) */
button.ghost, .btn.ghost{background:var(--raised); color:var(--ink); border:1px solid var(--edge); box-shadow:var(--shadow-card)}
button.ghost:hover, .btn.ghost:hover{background:color-mix(in srgb, var(--raised) 80%, var(--ink)); border-color:var(--edge); filter:none}
button.danger, .btn.danger{background:var(--color-danger-base); color:var(--color-text-on-danger)}
button.small, .btn.small{padding:5px 10px; font-size:var(--font-size-xs)}
button:disabled{opacity:.5; cursor:default}

input, select, textarea{
  font:inherit; font-size:var(--font-size-base); color:var(--ink); background:var(--input-bg);
  border:1px solid var(--edge); border-radius:var(--radius-sm); padding:9px 12px; width:100%;
}
input::placeholder, textarea::placeholder{color:var(--ink-faint); opacity:1}
input[type=checkbox], input[type=radio]{
  width:auto; padding:0; margin:0;
  accent-color:var(--accent);   /* otherwise ticks render browser-blue, off palette */
}
input:focus, select:focus, textarea:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 1px var(--accent)}
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, summary:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
input[type=date]::-webkit-calendar-picker-indicator{filter:invert(.8)}
input[type=color]{padding:4px; background:var(--input-bg)}
::-webkit-scrollbar{width:11px; height:11px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--hairline); border-radius:99px}
::-webkit-scrollbar-thumb:hover{background:var(--ink-faint)}
label{display:block; font-size:var(--font-size-xs); font-weight:var(--font-weight-semibold); color:var(--ink-soft); margin:0 0 5px}
.field{margin-bottom:14px}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:14px}
/* a grid cell may be narrower than its widest line: the card's "Client design hours" field ran out
   of the dialog at phone width (its caption does not wrap, by design, and truncates instead) */
.grid2 > *, .grid3 > *, .task-grid > *{min-width:0}
.grid3{display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px}

/* tables as the CMS's lists: small semibold heads in the subtle colour, roomy rows */
table{width:100%; border-collapse:collapse; font-size:var(--font-size-sm)}
th{
  text-align:left; font-size:11.5px; color:var(--ink-soft); font-weight:var(--font-weight-semibold);
  padding:9px 12px; border-bottom:1px solid var(--hairline);
}
td{padding:11px 12px; border-bottom:1px solid var(--hairline); vertical-align:middle}
tr:last-child td{border-bottom:0}

.role-chip{
  display:inline-block; font-size:11.5px; font-weight:var(--font-weight-semibold); padding:2px 9px;
  border-radius:var(--radius-pill); color:var(--color-role-text); text-transform:capitalize;
}
.msg{padding:10px 14px; border-radius:var(--radius-sm); font-size:var(--font-size-sm); margin:12px 0; display:none}
.msg.on{display:block}
.msg.err{background:var(--danger-soft); color:var(--danger)}
.msg.ok{background:var(--accent-soft); color:var(--accent-ink)}

dialog[open]{
  position:fixed; inset:0; margin:auto;
}
dialog{
  border:1px solid var(--hairline); border-radius:var(--radius);
  background:var(--raised); color:var(--ink); padding:22px; width:min(480px,92vw);
  box-shadow:var(--shadow-popover);
}
dialog::backdrop{background:var(--color-bg-backdrop)}

.auth-card{max-width:400px; margin:9vh auto 0}
.auth-card .brand-big{font-weight:var(--font-weight-bold); font-size:17px; color:var(--ink); letter-spacing:-.01em; margin-bottom:18px}

@media (max-width:640px){
  .grid2{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}
  .wrap{margin:14px auto; padding:0 16px}
  td,th{padding:8px 6px}
}
/* a phone or a tablet: inputs at 16px (below it iOS zooms the page in on focus; !important
   because some pages size their inputs inline). By touch, not by width: an 820px tablet zoomed
   too (mobile-check, 2026-10-12) */
@media (max-width:760px), (pointer:coarse){
  input, select, textarea{font-size:var(--font-size-input-mobile)!important}
}
/* a phone: controls a finger can hit, and a client section's wide table scrolls inside its own
   box instead of running off the screen */
@media (max-width:760px){
  .cl-section table{display:block; overflow-x:auto; max-width:100%; overscroll-behavior-x:contain}
  button, .btn{min-height:36px}
  button.small, .btn.small{min-height:32px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- board (kanban) ---------- */
.board-scroll{
  display:flex; gap:14px; align-items:flex-start;
  overflow-x:auto; overflow-y:hidden;
  padding:18px 22px 24px;
  /* fills what is left below the chrome, so the page itself never scrolls vertically —
     column headers stay put while you work down a list, as in Trello. --board-top is
     measured by board-scroll.js because the topbar height varies. */
  height:calc(100dvh - var(--board-top, 120px));
  cursor:grab; overscroll-behavior-x:contain;
}
.board-scroll.panning{cursor:grabbing; user-select:none}
/* set by board-scroll.js: on a board the page itself does not scroll */
html.board-page, body.board-page{overflow:hidden; height:100%}
.board-scroll.panning .kcard{pointer-events:none}
.kcol{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius);
  width:290px; flex:none; display:flex; flex-direction:column; max-height:100%; cursor:default}
.kcol header{display:flex; align-items:center; gap:8px; padding:10px 12px; font-weight:600; font-size:13.5px}
.kcol header .count{color:var(--ink-faint); font-weight:500}
.kcol .cards{overflow-y:auto; padding:0 8px 8px; display:flex; flex-direction:column; gap:8px; min-height:20px}
.kcard{background:var(--canvas); box-shadow:var(--shadow-card); border:1px solid var(--hairline); border-radius:8px; padding:10px 11px; cursor:pointer}
.kcard:hover{border-color:var(--accent)}
.kcard.dragging{opacity:.4}
/* A hidden card wears it: dark grey against the black of the others, so a column scans
   honestly — you should not have to open a card to learn the client cannot see it. */
.kcard.is-hidden{
  background:color-mix(in srgb, var(--ink-faint) 16%, var(--canvas));
  border-style:dashed;
}
.kcard.is-hidden .title{color:var(--ink-soft)}
/* the states a card carries, named on hover */
.kcard{position:relative}
.kcard-flags{
  position:absolute; top:7px; right:8px; display:flex; gap:5px; z-index:1;
}
.kflag{
  font-size:12px; line-height:1; color:var(--ink-faint); cursor:help;
  background:var(--panel); border:1px solid var(--hairline); border-radius:5px; padding:2px 4px;
}
.kflag:hover{color:var(--accent-ink); border-color:var(--accent)}
/* AI development (netlify/functions/_shared/dev-mode.mjs): text, not an icon, so it reads at a glance */
.kflag-ai{font-size:10px; font-weight:700; letter-spacing:.04em; color:var(--accent-ink)}
.segbtn button:disabled{opacity:.45; cursor:not-allowed}
/* a linked card's stripe is tinted, not just tagged: visible across a whole column */
.kcard-proj{
  display:flex; align-items:center; gap:6px; margin:8px -11px -10px; padding:7px 11px;
  background:var(--accent-soft); color:var(--accent-ink); font-size:12px;
  border-radius:0 0 8px 8px; border-top:1px solid var(--hairline);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.kcard-proj .pj-tag{background:transparent; border:1px solid var(--accent); padding:1px 5px}
.kcard .cover{margin:-10px -11px 8px; border-radius:8px 8px 0 0; max-height:120px; object-fit:cover; width:calc(100% + 22px)}
.kcard .title{font-weight:600; font-size:13.5px; line-height:1.35}
.kcard .chips{display:flex; flex-wrap:wrap; gap:4px; margin-top:7px}
.chip{font-size:10.5px; font-weight:600; padding:1px 7px; border-radius:99px; background:var(--accent-soft); color:var(--accent-ink)}
.chip.lab{color:var(--color-text-on-danger)}
.l-list{display:flex; flex-direction:column; gap:6px; max-height:46vh; overflow:auto; margin-bottom:6px}
.l-row{display:flex; align-items:center; gap:8px}
.l-row .l-ecolor{width:42px; height:34px; padding:3px; flex:none}
.l-row .l-ename{flex:1; min-width:0}
.l-newhead{margin:14px 0 6px}
.chip.money{background:var(--color-success-soft); color:var(--color-money-text)}
/* Keys for Claude (client page): a key's state, by its last test */
.chip.ks-ok{background:var(--color-success-soft); color:var(--color-success-text)}
.chip.ks-bad{background:var(--color-danger-soft); color:var(--color-danger-text)}
.chip.ks-off{background:var(--hairline); color:var(--ink-faint)}
.kcard .meta{display:flex; gap:10px; margin-top:7px; font-size:11px; color:var(--ink-faint)}
.addcard{border:1px dashed var(--edge); background:transparent; color:var(--ink-soft); border-radius:var(--radius-sm); box-shadow:none; padding:8px; font-size:13px; margin:0 8px 10px}
.col-drop{outline:2px dashed var(--accent); outline-offset:-2px}

/* task modal */
dialog.task{width:min(760px,95vw); max-height:92vh; overflow-y:auto}
.task-grid{display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px}
@media (max-width:640px){ .task-grid{grid-template-columns:1fr 1fr} }   /* three hour boxes do not fit a phone's card */
.field-note{font-size:11px; color:var(--ink-faint); margin-top:2px}
.labels-row{display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 8px}
/* a label not on the card is outlined in its colour, not faded: faded text fell under AA */
.labels-row .chip{cursor:pointer}
.labels-row .chip:not(.on){background:transparent!important; color:var(--ink-soft)!important; box-shadow:inset 0 0 0 1px var(--lc, var(--edge))}
.desc-view{border:1px solid var(--hairline); border-radius:8px; padding:12px; background:var(--canvas); font-size:14px}
.desc-view code{background:var(--hairline); padding:1px 5px; border-radius:4px; font-size:12.5px}
.desc-view a{color:var(--accent-ink)}
.desc-view blockquote{border-left:3px solid var(--hairline); margin:8px 0; padding-left:10px; color:var(--ink-soft)}
.desc-view h1,.desc-view h2,.desc-view h3{font-family:var(--font-family-base); font-size:15px; margin:12px 0 4px}
.desc-view ul{margin:4px 0; padding-left:20px}
.comment{border-bottom:1px solid var(--hairline); padding:9px 0; font-size:13.5px}
.comment .by{font-weight:600; font-size:12px; color:var(--ink-soft)}
.attach{display:flex; align-items:center; gap:8px; font-size:13px; padding:5px 0}
.task-actions{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; padding-top:12px; border-top:1px solid var(--hairline)}

/* ---------- client tiles ---------- */
/* a row of tabs wraps when it does not fit, at any width: on an 820px tablet Settings' eight tabs
   pushed Users past the edge, where no finger could reach it (rule 0) */
.tabs{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px}
/* a wide table scrolls inside its box on a phone: the page clips anything past the screen
   (html/body overflow-x:clip), so its last columns and buttons were out of reach. A phone, and
   any touch screen (on an 820px tablet the hours' Exclude buttons were past the edge): not a
   desktop, where a scroll box would stop the hours tables' sticky headers following the page. */
@media (max-width:760px), (pointer:coarse){
  .x-scroll{overflow-x:auto; max-width:100%; overscroll-behavior-x:contain}
}
.tabs button{background:transparent; border:1px solid var(--hairline); color:var(--ink-soft); box-shadow:none}
.tabs button:hover{background:var(--color-bg-hover); border-color:var(--edge); color:var(--ink)}
.tabs button.on, .tabs button.on:hover{background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink)}
.tile-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px}
.tile{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:16px}
.tile .head{display:flex; align-items:center; gap:10px}
/* a client's logo on a plate that contrasts with it (assets/logo-plate.js): never cropped */
.logo-plate{display:inline-flex; align-items:center; justify-content:center; flex:none; box-sizing:border-box;
  background:var(--color-logo-plate-light); border:1px solid var(--hairline); border-radius:8px; overflow:hidden;
  color:var(--color-logo-plate-light-ink); font-weight:700; font-family:var(--font-family-base)}
.logo-plate.on-dark{background:var(--color-logo-plate-dark); border-color:var(--color-logo-plate-dark-edge)}
.logo-plate img{display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain}
.logo-plate.empty{background:var(--accent-soft); color:var(--accent-ink); border-color:transparent}
.logo-tile{width:112px; height:46px; padding:7px 10px; font-size:18px}
.logo-tile.empty{width:46px; padding:0}
.logo-head{width:168px; height:68px; padding:9px 12px; font-size:24px; border-radius:12px}
.logo-head.empty{width:68px; padding:0}
.logo-nav{width:84px; height:32px; padding:4px 6px; font-size:14px; border-radius:6px}
.logo-nav.empty{width:32px; padding:0}
.tile h3{margin:0; font-size:15px; flex:1}
.tile .star{cursor:pointer; font-size:17px; background:none; border:0; color:var(--ink-faint); padding:2px; min-width:28px; min-height:28px}
.tile .star.on{color:var(--color-warning-text)}
.tile .rate{font-size:13.5px; margin:10px 0 2px}
.tile .rate b{font-size:16px}
.tile .warn{font-size:11.5px; color:var(--warn); background:var(--warn-soft); border-radius:6px; padding:4px 8px; margin-top:8px}
.tile .row{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap}
.switch{display:inline-flex; align-items:center; gap:6px; font-size:12.5px;
  color:var(--ink-soft); cursor:pointer; white-space:nowrap}

/* ---------- hours ---------- */
.hours-tot{display:flex; gap:14px; flex-wrap:wrap; margin:14px 0}
.hours-tot .box{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:12px 18px}
.hours-tot .box .v{font-family:var(--font-family-base); font-weight:700; font-size:18px; color:var(--accent-ink)}
.hours-tot .box .l{font-size:11px; color:var(--ink-faint)}
.table-tools{display:flex; gap:10px; margin:8px 0 12px; align-items:center}
.table-tools input{max-width:240px}
th.sortable{cursor:pointer}


/* ---------- left drawer ---------- */
:root{ --drawer-w:var(--layout-drawer-width) }
body{display:block}
.drawer{
  position:fixed; inset:0 auto 0 0; width:var(--drawer-w); z-index:60;
  background:var(--chrome); border-right:1px solid var(--hairline);
  display:flex; flex-direction:column; padding:16px 12px;
  /* a long list of boards scrolls inside the drawer: it was cut off on a phone (and on a short
     laptop), with Sign out and everything below Timelines out of reach (the owner, 2026-10-12) */
  overflow-y:auto; overscroll-behavior:contain;
}
.drawer-brand{
  font-family:var(--font-family-base); font-weight:var(--font-weight-bold); font-size:15px; letter-spacing:-.01em;
  color:var(--ink); padding:4px 10px 16px;
}
/* "MM Core", as the CMS writes "MM CMS": the product word quieter than the mark */
.drawer-brand span, .topbar .brand span, .brand-big span, .cnav-core span{color:var(--ink-faint); font-weight:var(--font-weight-medium)}
/* The MM Core mark before the name, wherever the name is written: the drawer, the top bar, the
   sign-in card and the client sidebar (the owner, 2026-10-19; the on-dark isotype of the MM logo
   ecosystem). One rule, so no page carries it in its markup and none can be missed. */
.drawer-brand::before, .topbar .brand::before, .brand-big::before, .cnav-core::before{
  content:''; display:inline-block; width:1.4em; height:1.4em; margin-right:.4em; vertical-align:-.36em;
  background:url('/assets/icons/mm-core-isotype.svg') center / contain no-repeat;
}
/* the version beside the logo: small, quiet, always there (stampVersion in app.js) */
.drawer-brand .ver, .topbar .brand .ver{font-size:10.5px; font-weight:var(--font-weight-medium); color:var(--ink-faint); letter-spacing:0; margin-left:4px; vertical-align:1px; font-family:monospace}
.drawer-nav{display:flex; flex-direction:column; gap:2px}
.drawer-nav a{
  display:flex; align-items:center; gap:10px; text-decoration:none;
  font-size:var(--font-size-sm); font-weight:var(--font-weight-medium); color:var(--ink-soft);
  padding:8px 11px; border-radius:var(--radius-sm);
}
.drawer-nav a .i{width:16px; text-align:center; opacity:.85; font-size:12px}
.drawer-nav a:hover{background:var(--color-bg-hover); color:var(--ink)}
/* the active item as the CMS's (raised, semibold), with the accent on its icon */
.drawer-nav a.on{background:var(--raised); color:var(--ink); font-weight:var(--font-weight-semibold); box-shadow:var(--shadow-card)}
.drawer-nav a.on .i, .drawer-acclink.on .i{color:var(--accent); opacity:1}
/* Role gating is NOT done here. The drawer is built from the role in app.js
   (renderDrawerNav) — a link a role cannot use is never in the markup, so there is
   nothing to hide. Do not reintroduce data-admin / data-devadmin / data-super rules:
   test/internal-nav-check.mjs fails the build if the markup grows them back. */
body.is-client .drawer-nav a,
body.is-client .drawer-acc,
body.is-client .drawer-boards,
body.is-client .iconbtn{display:none}
.drawer-foot{margin-top:auto; display:flex; flex-direction:column; gap:8px; padding-top:14px}
.drawer-foot .who{font-size:11.5px; color:var(--ink-faint); padding:0 4px; line-height:1.4}
/* boards accordion — the label navigates, only the caret toggles.
   Sub-items follow the Shopify admin pattern: indented under the parent, pill highlight
   on the active one with a small ↳ connector, no heavy chrome. */
.drawer-acc{display:flex; flex-direction:column}
.drawer-accrow{display:flex; align-items:center; gap:2px}
.drawer-acclink{
  display:flex; align-items:center; gap:10px; flex:1; min-width:0;
  text-decoration:none; color:var(--ink-soft);
  font-size:var(--font-size-sm); font-weight:var(--font-weight-medium); padding:8px 11px; border-radius:var(--radius-sm);
}
.drawer-acclink:hover{background:var(--color-bg-hover); color:var(--ink)}
.drawer-acclink.on{background:var(--raised); color:var(--ink); font-weight:var(--font-weight-semibold); box-shadow:var(--shadow-card)}
.acc-toggle{
  background:transparent; border:0; color:var(--ink-faint); font-size:10px;
  padding:8px 8px; border-radius:6px; transition:transform .15s ease; flex:none;
}
.acc-toggle:hover{background:var(--color-bg-hover); color:var(--ink)}
.drawer-acc.closed .acc-toggle{transform:rotate(-90deg)}

.drawer-boards{display:flex; flex-direction:column; gap:1px; padding:2px 0 6px}
.drawer-acc.closed .drawer-boards,
.drawer-acc.closed .drawer-sub{display:none!important}
.drawer-boards a,
.drawer-sub{
  position:relative; display:flex; align-items:center; gap:8px;
  font-size:12.5px; color:var(--ink-soft); text-decoration:none; font-weight:500;
  padding:7px 10px 7px 34px; border-radius:8px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.drawer-boards a:hover,
.drawer-sub:hover{background:var(--color-bg-hover); color:var(--ink)}
/* the ↳ connector marks where you are, exactly like Shopify's admin nav */
.drawer-boards a.on::before,
.drawer-sub.on::before{
  content:'↳'; position:absolute; left:16px; color:var(--ink-faint); font-size:11px;
}
.drawer-boards a.on,
.drawer-sub.on{background:var(--raised); color:var(--ink); font-weight:600;
  box-shadow:var(--shadow-card)}
.drawer-boards a .bdot{width:7px; height:7px; border-radius:2px; background:var(--strip); flex:none}
.drawer-sub .i{font-size:10px; width:auto; text-align:left; opacity:.75}
.drawer-empty{font-size:11.5px; color:var(--ink-faint); padding:4px 10px}
/* nothing pinned yet: the drawer says where pinning is done (the owner, 2026-10-19) */
.drawer-boards a.drawer-pinhint{color:var(--ink-faint); font-size:11.5px; font-weight:400; white-space:normal}

/* footer actions */
.drawer-actions{display:flex; gap:6px; align-items:stretch}
.drawer-actions #logout{flex:1}
.iconbtn{
  display:flex; align-items:center; justify-content:center; width:34px;
  border:1px solid var(--hairline); border-radius:8px; color:var(--ink-soft);
  text-decoration:none; font-size:14px;
}
.iconbtn:hover{background:var(--color-bg-hover); color:var(--ink)}
#debug-cta{display:block}
#debug-cta[hidden]{display:none !important}
#debug-cta.on{background:var(--accent); color:var(--on-accent); border-color:var(--accent)}

.app-main{margin-left:var(--drawer-w)}
.drawer-toggle{
  display:none; position:fixed; top:10px; left:10px; z-index:70;
  background:var(--raised); color:var(--ink); border:1px solid var(--edge);
  border-radius:var(--radius-sm); padding:7px 12px; font-size:16px; min-height:40px; box-shadow:none;
}
.drawer-scrim{display:none; position:fixed; inset:0; background:var(--color-bg-backdrop); z-index:55}
@media (max-width:900px){
  .drawer{transform:translateX(-100%); transition:transform .18s ease}
  body.drawer-open .drawer{transform:none}
  body.drawer-open .drawer-scrim{display:block}
  .app-main{margin-left:0}
  .drawer-toggle{display:block}
  .topbar{padding-left:60px}
  /* the menu button sits over the drawer's corner: the brand starts after it, not under it */
  .drawer-brand{padding-left:58px}
  /* with the mark there, the version no longer fits beside the name: it goes under the name,
     lined up with it (the mark is 1.4em plus .4em of the brand's 15px) */
  .drawer-brand .ver{display:block; margin:2px 0 0 27px}
  /* the open drawer is the screen: the role switcher floated over its foot (Sign out, Settings) */
  body.drawer-open .role-switch{display:none}
}
@media (prefers-reduced-motion:reduce){.drawer{transition:none}}

/* ---------- feedback file (spreadsheet view) ---------- */
.fb-tools{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px}
.fb-wrap{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); overflow:auto}
.fb-table{width:100%; border-collapse:collapse; font-size:13px}
.fb-table th{
  position:sticky; top:0; z-index:2; background:var(--panel);
  border-bottom:1px solid var(--hairline); white-space:nowrap;
}
.fb-table td{padding:8px 10px; border-bottom:1px solid var(--hairline); vertical-align:top}
.fb-row td{background:color-mix(in srgb, var(--row, transparent) 13%, transparent)}
.fb-row td:first-child{box-shadow:inset 3px 0 0 var(--row, transparent)}
.fb-row:hover td{background:color-mix(in srgb, var(--row, var(--accent)) 24%, transparent)}
.fb-row.closed td{color:var(--ink-faint); filter:saturate(.35)}
.fb-group td{
  background:var(--accent-soft); color:var(--accent-ink); font-weight:700;
  font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; padding:6px 10px;
}
.fb-desc{color:var(--ink-soft); line-height:1.45; max-width:420px}
.fb-id{
  font-family:ui-monospace,SFMono-Regular,monospace; font-size:12px; cursor:pointer;
  color:var(--accent-ink); white-space:nowrap;
}
.fb-id .cp{opacity:0; margin-left:5px; font-size:11px}
.fb-id:hover .cp{opacity:1}
.fb-status{
  width:100%; padding:4px 6px; font-size:11.5px; font-weight:600;
  border-radius:99px; border:1px solid var(--hairline); cursor:pointer;
}
.fb-ref{
  font-family:ui-monospace,SFMono-Regular,monospace; font-weight:700;
  font-size:14px; color:var(--accent-ink);
}

.kcard .chip.fb-badge{background:var(--color-feedback-soft); color:var(--color-feedback-text); font-weight:700}
.fb-filter{
  background:var(--accent-soft); color:var(--accent-ink); border-radius:8px;
  padding:8px 12px; font-size:13px; margin-bottom:12px;
}
.fb-filter a{margin-left:8px}

/* ---------- status editor ---------- */
.st-list{display:flex; flex-direction:column; gap:6px}
.st-row{display:flex; align-items:center; gap:8px}
.st-row .st-color{width:42px; height:34px; padding:3px; flex:none}
.st-row .st-label{flex:1; min-width:120px}
.st-row .st-closed{white-space:nowrap; font-size:12px}
.st-row button{flex:none}
@media (max-width:700px){ .st-row{flex-wrap:wrap} .st-row .st-label{min-width:100%} }

/* ---------- feedback files index ---------- */
.fb-tile{text-decoration:none; color:inherit; display:block}
.fb-tile:hover{border-color:var(--accent)}
.fb-counts{display:flex; align-items:baseline; gap:7px; margin:10px 0 4px}
.fb-counts .n{font-family:var(--font-family-base); font-weight:700; font-size:22px; color:var(--ink-faint)}
.fb-counts .n.hot{color:var(--color-feedback-text)}
.fb-counts .l{font-size:12px; color:var(--ink-soft)}

/* ---------- role preview switcher ---------- */
body.has-role-switch .app-main{padding-bottom:88px}
body.has-role-switch .board-scroll{padding-bottom:96px}
.role-switch{
  position:fixed; left:50%; transform:translateX(-50%); bottom:18px; z-index:90;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:center;
  background:var(--panel); border:1px solid var(--hairline); border-radius:99px;
  padding:7px 8px 7px 16px; box-shadow:var(--shadow-popover); max-width:calc(100vw - 24px);
}
.role-switch.on{border-color:var(--color-warning-text); box-shadow:0 8px 30px color-mix(in srgb, var(--color-warning-text) 25%, transparent)}
.role-switch.busy{opacity:.55; pointer-events:none}
.rs-label{font-size:11.5px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--ink-faint); font-weight:600; white-space:nowrap}
.rs-opts{display:flex; gap:3px; flex-wrap:wrap; min-width:0}
.rs-opts button{
  background:transparent; border:1px solid transparent; color:var(--ink-soft);
  padding:6px 13px; border-radius:99px; font-size:12.5px; font-weight:600; white-space:nowrap;
}
.rs-opts button:hover{background:var(--hairline); color:var(--ink)}
.rs-opts button.on{background:var(--accent); color:var(--on-accent)}
.role-switch.on .rs-opts button.on{background:var(--color-warning-text); color:var(--on-accent)}
.rs-note{font-size:11px; color:var(--color-warning-text); padding-right:8px; white-space:nowrap}
@media (max-width:760px){
  .role-switch{left:12px; right:12px; transform:none; border-radius:14px; justify-content:flex-start}
  .rs-note{white-space:normal}
}

/* the feedback CTA sits in the sticky footer, styled to read as a real action */
.task-foot .feedback-cta{border-color:var(--color-feedback-border); color:var(--color-feedback-text)}
.task-foot .feedback-cta:hover{background:var(--color-feedback-soft); color:var(--color-feedback-hover)}
.task-foot .feedback-cta[hidden]{display:none !important}

/* ---------- rich text editor (assets/rich-editor.js) ---------- */
.rte{border:1px solid var(--hairline); border-radius:8px; background:var(--canvas); position:relative}
.rte-bar{
  display:flex; flex-wrap:wrap; gap:2px; align-items:center; padding:5px 6px; position:relative;
  border-bottom:1px solid var(--hairline); background:var(--panel); border-radius:8px 8px 0 0;
}
.rte-bar .rte-btn{
  background:transparent; border:1px solid transparent; color:var(--ink-soft);
  padding:4px 8px; min-width:30px; font-size:13px; line-height:1.25; border-radius:6px; font-weight:500;
}
.rte-bar .rte-btn:hover{background:var(--hairline); color:var(--ink)}
.rte-bar .rte-btn[aria-pressed="true"],.rte-bar .rte-btn[aria-expanded="true"]{
  background:var(--accent-soft); color:var(--accent-ink); border-color:var(--accent-soft)}
.rte-bar button:focus-visible{outline:2px solid var(--accent); outline-offset:1px}
.rte-btn sub{font-size:8px; margin-left:1px}
.rte-sep{width:1px; align-self:stretch; background:var(--hairline); margin:3px 4px}
.rte-mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11.5px; letter-spacing:-.02em}
.rte-menu{position:relative}
.rte-bar .rte-block{min-width:132px; display:inline-flex; justify-content:space-between; align-items:center; gap:10px; color:var(--ink)}
.rte-caret{opacity:.6; font-size:10px}
.rte-pop{
  position:absolute; top:calc(100% + 4px); left:0; z-index:40; background:var(--panel);
  border:1px solid var(--hairline); border-radius:8px; box-shadow:var(--shadow-popover); padding:6px;
}
.rte-pop[hidden]{display:none}
.rte-blockpop{min-width:260px; display:flex; flex-direction:column; gap:1px}
.rte-blockpop button{
  display:flex; justify-content:space-between; align-items:center; gap:18px; width:100%;
  background:transparent; border:0; color:var(--ink); padding:6px 10px; border-radius:6px; text-align:left;
}
.rte-blockpop button:hover,.rte-blockpop button:focus{background:var(--hairline); outline:none}
.rte-blockpop button[aria-checked="true"]{background:var(--accent-soft)}
.rte-blockpop kbd{font-family:inherit; font-size:11px; color:var(--ink-faint); white-space:nowrap}
.rte-pv{font-weight:500; line-height:1.3}
.rte-pv-p{font-size:14px}
.rte-pv-h1{font-family:var(--font-family-base); font-size:19px}
.rte-pv-h2{font-family:var(--font-family-base); font-size:16.5px}
.rte-pv-h3{font-size:15px; font-weight:700}
.rte-pv-h4{font-size:13.5px; font-weight:700; color:var(--ink-soft)}
.rte-help{left:auto; right:0; width:min(340px, 86vw); font-size:12.5px; line-height:1.5; color:var(--ink-soft); padding:10px 12px}
.rte-help b{display:block; color:var(--ink); margin:8px 0 4px}
.rte-help b:first-child{margin-top:0}
.rte-help dl{display:grid; grid-template-columns:auto 1fr; gap:3px 12px; margin:0}
.rte-help dt{font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11.5px; color:var(--ink)}
.rte-help dd{margin:0}
.rte-help p{margin:8px 0 0}
.rte-linkpop{left:auto; right:6px; width:min(360px, calc(100% - 12px)); display:flex; flex-direction:column; gap:6px}
.rte-linkpop[hidden]{display:none}
.rte-linkpop-actions{display:flex; gap:6px; flex-wrap:wrap}
.rte-linkpop .rte-bad{border-color:var(--danger)}
.rte-area{
  min-height:190px; max-height:420px; overflow-y:auto; padding:12px 14px; position:relative;
  font-size:14px; line-height:1.55; outline:none; border-radius:0 0 8px 8px;
}
.rte-area:focus{box-shadow:inset 0 0 0 2px var(--accent-soft)}
.rte-area p{margin:0 0 6px}
.rte-area h1{font-family:var(--font-family-base); font-size:19px; margin:14px 0 6px}
.rte-area h2{font-family:var(--font-family-base); font-size:16.5px; margin:13px 0 5px}
.rte-area h3{font-size:15px; font-weight:700; margin:12px 0 4px}
.rte-area h4{font-size:13.5px; font-weight:700; margin:11px 0 4px; color:var(--ink-soft)}
.rte-area > :first-child{margin-top:0}
.rte-area ul,.rte-area ol{padding-left:22px; margin:6px 0}
.rte-area li{margin:2px 0}
.rte-area a{color:var(--accent-ink)}
.rte-area.rte-empty::before{
  content:attr(data-placeholder); position:absolute; top:12px; left:14px;
  color:var(--ink-faint); pointer-events:none;
}
.rte-area.rte-empty:not([data-placeholder])::before{content:'Write here — type # for a heading, - for a list'}
/* what the editor can make, shown the same wherever it is read */
.rte-area code,.sec-body code,.tut-prose code,.cfb-desc code{
  background:var(--hairline); padding:1px 5px; border-radius:4px; font-size:.9em;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.rte-area pre,.sec-body pre,.tut-prose pre,.cfb-desc pre,.desc-view pre,.ks-env pre{
  background:var(--panel); border:1px solid var(--hairline); border-radius:6px; padding:9px 11px; margin:8px 0;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12.5px; white-space:pre-wrap; overflow-x:auto}
.rte-area pre code,.sec-body pre code,.tut-prose pre code,.cfb-desc pre code{background:none; padding:0}
.rte-area blockquote,.sec-body blockquote,.tut-prose blockquote,.cfb-desc blockquote{
  border-left:3px solid var(--hairline); margin:8px 0; padding:2px 0 2px 11px; color:var(--ink-soft)}
.rte-area hr,.sec-body hr,.tut-prose hr,.cfb-desc hr,.desc-view hr{border:0; border-top:1px solid var(--hairline); margin:12px 0}

/* ---------- board background picker ---------- */
.bg-swatches{display:grid; grid-template-columns:repeat(5,1fr); gap:8px}
.bg-swatches .sw{
  height:46px; border-radius:8px; border:1px solid var(--hairline); padding:0; cursor:pointer;
}
.bg-swatches .sw.on{outline:2px solid var(--accent); outline-offset:2px}
.board-scroll{transition:background .15s ease}

/* ---------- Trello-style card ---------- */
dialog.tcard{padding:0; border-radius:12px; width:min(860px,96vw); max-height:92vh; overflow:hidden}
dialog.tcard:not([open]){display:none}
dialog.tcard[open]{display:flex; flex-direction:column}
.tc-close{
  position:absolute; top:12px; right:12px; z-index:5; background:transparent; border:0;
  color:var(--ink-soft); font-size:15px; padding:6px 9px; border-radius:8px;
}
.tc-close:hover{background:var(--hairline); color:var(--ink)}
.tc-ico{color:var(--ink-faint); font-size:14px; width:20px; flex:none; text-align:center; line-height:1.6}
.tc-head{
  display:flex; gap:10px; align-items:flex-start; padding:18px 46px 12px 18px;
  background:var(--panel); border-bottom:1px solid var(--hairline); position:sticky; top:0; z-index:4;
}
.tc-title{
  font-family:var(--font-family-base); font-weight:700; font-size:17px;
  background:transparent; border:1px solid transparent; padding:4px 8px; border-radius:6px;
}
.tc-title:hover{background:var(--canvas)}
.tc-title:focus{background:var(--canvas); border-color:var(--accent)}
.tc-sub{font-size:12px; color:var(--ink-faint); padding-left:9px}
.tc-sub b{color:var(--ink-soft); font-weight:600}
.tc-body{display:flex; gap:0; overflow:hidden; flex:1; min-height:0}
.tc-main{flex:1; min-width:0; overflow-y:auto; padding:16px 18px 24px}
.tc-side{
  width:210px; flex:none; overflow-y:auto; padding:16px 14px 24px;
  border-left:1px solid var(--hairline); background:color-mix(in srgb, var(--canvas) 55%, var(--panel));
}
.tc-side h4{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.07em; color:var(--ink-faint);
  margin:0 0 7px; font-weight:700;
}
.tc-side h4:not(:first-child){margin-top:16px}
.tc-sidebtn{
  display:flex; align-items:center; gap:9px; width:100%; margin-bottom:5px;
  background:var(--canvas); border:1px solid var(--hairline); color:var(--ink-soft);
  padding:8px 10px; border-radius:7px; font-size:12.5px; font-weight:600; text-align:left;
}
.tc-sidebtn span{font-size:11px; width:14px}
.tc-sidebtn:hover{background:var(--hairline); color:var(--ink)}
.tc-sidebtn.danger, .tc-side button.danger{
  background:var(--canvas); border-color:var(--hairline); color:var(--danger);
}
.tc-sidebtn.danger:hover, .tc-side button.danger:hover{
  background:var(--danger-soft); border-color:var(--danger); color:var(--danger);
}
.tc-sidebtn.feedback-cta{border-color:var(--color-feedback-border); color:var(--color-feedback-text)}
.tc-sidebtn.feedback-cta:hover{background:var(--color-feedback-soft)}
.tc-meta{display:flex; flex-wrap:wrap; gap:14px; margin-bottom:16px}
.tc-meta-block{flex:1 1 150px; min-width:140px}
.tc-meta-block h4{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.07em;
  color:var(--ink-faint); margin:0 0 5px; font-weight:700;
}
.tc-section{margin-top:22px}
/* the tools of a section head (Rewrite, Check vs design, …) wrap under the title on a phone
   instead of covering the One body / Sections switch (the mobile check, 0.3.8) */
.tc-sec-head{display:flex; align-items:center; gap:9px; margin-bottom:9px; flex-wrap:wrap}
.tc-tools{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-left:auto; justify-content:flex-end}
.tc-sec-head h3{margin:0; font-size:14px; font-family:var(--font-family-base); font-weight:700}
.tc-count{
  font-size:11px; background:var(--hairline); color:var(--ink-soft);
  padding:1px 7px; border-radius:99px; font-weight:600;
}
.tc-addfile{
  margin-left:auto; font-size:12px; color:var(--accent-ink); cursor:pointer; background:transparent;
  padding:4px 9px; border-radius:var(--radius-sm); border:1px solid var(--edge);
}
.tc-addfile:hover{background:var(--color-bg-hover)}
.tc-foot{
  display:flex; gap:10px; justify-content:flex-end; padding:12px 18px;
  background:var(--panel); border-top:1px solid var(--hairline);
}

/* comments */
.avatar{
  width:30px; height:30px; flex:none; border-radius:50%; display:grid; place-items:center;
  background:var(--accent); color:var(--on-accent); font-size:11.5px; font-weight:700; letter-spacing:.02em;
}
.tc-newcomment{display:flex; gap:10px; align-items:flex-start; margin-bottom:14px}
.tc-newcomment textarea{
  resize:none; overflow:hidden; min-height:40px; line-height:1.45; font-size:13.5px;
}
.tc-comment-actions{display:flex; gap:8px; margin-top:8px}
.tc-comment{display:flex; gap:10px; padding:9px 0; align-items:flex-start}
.tc-comment .avatar{background:var(--hairline); color:var(--ink-soft)}
.tc-comment-main{flex:1; min-width:0; position:relative}
.tc-comment-by{font-size:12.5px; font-weight:700; margin-bottom:3px}
.tc-when{font-weight:500; color:var(--ink-faint); font-size:11px; margin-left:6px}
.tc-comment-body{
  background:var(--canvas); border:1px solid var(--hairline); border-radius:8px;
  padding:9px 11px; font-size:13.5px; line-height:1.5; white-space:pre-wrap; word-break:break-word;
}
.tc-comment-del{
  position:absolute; top:0; right:0; background:transparent; border:0; opacity:0;
  color:var(--ink-faint); font-size:11px; padding:2px 6px; text-decoration:underline;
}
.tc-comment:hover .tc-comment-del{opacity:1}
.tc-comment-del:hover{color:var(--danger)}

@media (max-width:820px){
  .tc-body{flex-direction:column; overflow-y:auto}
  .tc-side{width:auto; border-left:0; border-top:1px solid var(--hairline)}
  .tc-main{overflow:visible}
}

/* ---------- grouped hour blocks ---------- */
.hgroup{margin-bottom:14px}
.hgroup h5{
  margin:0 0 7px; font-size:10.5px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--accent-ink);
  display:flex; align-items:center; gap:9px;
}
.hgroup h5::after{content:''; flex:1; height:1px; background:var(--hairline)}
.hgroup .field{margin-bottom:0; display:flex; flex-direction:column; justify-content:flex-end}
.hgroup .grid2{align-items:end}
.hgroup + .hgroup{padding-top:12px; border-top:1px dashed var(--hairline)}
/* typing a value the 0.5 arrows wouldn't reach is fine — don't flag it */
input[type=number]:invalid{border-color:var(--hairline)}

/* ---------- surplus markers ---------- */
.surplus{font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:99px; margin-left:4px}
.surplus.up{background:var(--color-success-soft); color:var(--color-success-text)}
.surplus.down{background:var(--color-danger-soft); color:var(--color-danger-text)}

/* ---------- collapsed card: single hours row ---------- */
.kcard-hours{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:7px;
  font-size:11.5px; color:var(--ink-soft);
}
.kcard-hours b{color:var(--ink); font-weight:700}
.kcard-hours i{color:var(--ink-faint); font-style:normal}
.kcard-hours .money{color:var(--color-money-text); font-weight:700}

/* ---------- blocker feedback ---------- */
.kcard.blocked{border-color:var(--color-blocker-base); box-shadow:0 0 0 1px var(--color-blocker-base) inset}
.kcard-blocker{
  background:var(--color-blocker-base); color:var(--color-blocker-text); font-size:10.5px; font-weight:700;
  letter-spacing:.03em; padding:3px 8px; border-radius:6px; margin-bottom:7px;
}
.tc-blocker{
  background:var(--color-blocker-soft); border:1px solid var(--color-blocker-base); color:var(--color-blocker-soft-text); border-radius:8px;
  padding:10px 12px; font-size:12.5px; margin-bottom:14px;
  display:flex; align-items:center; gap:9px; flex-wrap:wrap;
}
.tc-blocker[hidden]{display:none}
.tc-blocker b{color:var(--color-blocker-text)}
.tc-blocker button{margin-left:auto}

/* feedback badge by highest open urgency */
/* one colour code for feedback badges everywhere they appear */
.chip.fb-badge{font-weight:700}
.chip.fb-badge.blocker{background:var(--color-blocker-base); color:var(--color-blocker-text)}
.chip.fb-badge.high{background:var(--color-priority-high); color:var(--color-priority-high-text)}
.chip.fb-badge.normal{background:var(--color-priority-normal); color:var(--color-priority-normal-text)}
.chip.fb-badge.low{background:var(--hairline); color:var(--ink-soft)}

/* ---------- computed values (never editable) ---------- */
.field.readonly .readout{
  font-family:var(--font-family-base); font-weight:700; font-size:15px; color:var(--ink);
  padding:8px 0 2px; background:none; border:0; letter-spacing:-.01em;
}
.field.readonly .readout-note{
  font-size:9.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-faint);
  display:flex; align-items:center; gap:4px;
}
.field.readonly .readout-note::before{content:'∑'; font-size:10px}
.field.readonly [data-ro="money"]{color:var(--accent-ink)}

/* ---------- column reordering ---------- */
.kcol header{cursor:grab}
.kcol header:active{cursor:grabbing}
.col-grip{color:var(--ink-faint); font-size:12px; letter-spacing:-1px; flex:none}
.kcol header:hover .col-grip{color:var(--ink-soft)}
.kcol.col-dragging{opacity:.45}
.kcol.col-before{box-shadow:-3px 0 0 var(--accent)}
.kcol.col-after{box-shadow:3px 0 0 var(--accent)}

/* badges sit tight together so a row of urgencies reads as one cluster */
.chip.fb-badge{padding:1px 8px; letter-spacing:.02em; cursor:help}

/* feedback list inside a task card */
.t-fb-row{
  display:flex; align-items:center; gap:9px; width:100%; text-align:left;
  background:var(--canvas); border:1px solid var(--hairline); color:var(--ink-soft);
  padding:7px 10px; border-radius:8px; margin-bottom:5px; font-size:12.5px; font-weight:500;
}
.t-fb-row:hover{border-color:var(--accent); color:var(--ink)}
.t-fb-where{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.t-fb-ref{font-family:ui-monospace,SFMono-Regular,monospace; font-size:11px; color:var(--ink-faint)}
.fe-dialog{z-index:100}

/* ---------- related-card picker ---------- */
.cardpick select{padding:4px; font-size:13px}
.cardpick select option{padding:5px 7px; border-radius:5px}
.cardpick select option:checked{background:var(--accent); color:var(--on-accent)}
.cardpick input[type=text],.cardpick input:not([type]){margin-bottom:5px}

/* ---------- board search ---------- */
.bsearch{display:flex; align-items:center; gap:4px; position:relative}
.bsearch input{width:190px; padding:7px 10px; font-size:13px}
.bsearch button{padding:6px 9px}
.advpanel{
  position:fixed; top:56px; right:22px; z-index:70; width:min(430px,92vw);
  background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius);
  padding:16px; box-shadow:var(--shadow-popover);
}
.advpanel[hidden]{display:none}
.advpanel h4{
  margin:0 0 12px; font-size:11px; text-transform:uppercase; letter-spacing:.07em;
  color:var(--ink-faint); font-weight:700;
}
.adv-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px}
.adv-actions{display:flex; gap:8px; justify-content:flex-end; margin-top:14px}
.searchresults{
  position:fixed; top:56px; right:22px; z-index:65; width:min(430px,92vw); max-height:60vh;
  overflow-y:auto; background:var(--panel); border:1px solid var(--hairline);
  border-radius:var(--radius); box-shadow:var(--shadow-popover);
}
.searchresults[hidden]{display:none}
.sr-head{
  display:flex; align-items:center; gap:8px; padding:11px 14px; font-size:12.5px;
  color:var(--ink-soft); border-bottom:1px solid var(--hairline); position:sticky; top:0;
  background:var(--panel);
}
.sr-head button{margin-left:auto}
.sr-list{padding:6px}
.sr-item{
  display:flex; flex-direction:column; gap:2px; padding:8px 10px; border-radius:8px;
  text-decoration:none; color:inherit;
}
.sr-item:hover{background:var(--hairline)}
.sr-board{font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--accent-ink); font-weight:700}
.sr-title{font-size:13px; font-weight:600}
.sr-col{font-size:11px; color:var(--ink-faint)}
.sr-empty{padding:14px; font-size:12.5px; color:var(--ink-faint)}
@media (max-width:760px){
  .bsearch input{width:120px}
  .advpanel,.searchresults{right:8px; left:8px; width:auto}
}

/* ---------- coloured status picker ---------- */
.spick{position:relative; display:inline-block; width:100%}
.spick-btn{
  display:flex; align-items:center; gap:7px; width:100%; text-align:left;
  background:color-mix(in srgb, var(--c) 16%, var(--canvas));
  border:1px solid color-mix(in srgb, var(--c) 45%, transparent);
  color:var(--ct, var(--c)); font-weight:600; font-size:12.5px; padding:6px 9px; border-radius:7px;
}
.spick.compact .spick-btn{padding:5px 8px; font-size:11.5px}
.spick-btn:hover{background:color-mix(in srgb, var(--c) 26%, var(--canvas))}
.spick-dot{width:9px; height:9px; border-radius:50%; background:var(--c); flex:none}
.spick-label{flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.spick-caret{font-size:9px; opacity:.7}
.spick-menu{
  position:fixed; z-index:120; min-width:210px;
  background:var(--panel); border:1px solid var(--hairline); border-radius:9px;
  padding:5px; box-shadow:var(--shadow-popover);
}
.spick-menu[hidden]{display:none}
.spick-item{
  display:flex; align-items:center; gap:8px; width:100%; text-align:left;
  background:transparent; border:0; color:var(--ink); font-size:12.5px; font-weight:600;
  padding:7px 9px; border-radius:6px;
}
.spick-item:hover{background:color-mix(in srgb, var(--c) 22%, transparent)}
.spick-item.on{background:color-mix(in srgb, var(--c) 30%, transparent)}
.spick-item .spick-dot{width:10px; height:10px}
.spick-flag{
  margin-left:auto; font-size:9px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--ink-faint); font-weight:700;
}
.fb-table td .spick{min-width:150px}
.fb-done{cursor:pointer; width:16px; height:16px}
.fb-row td:first-child{text-align:center}
.fb-row{cursor:pointer}

/* ---------- board listings ---------- */
.board-head{display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap}
.board-group + .board-group{margin-top:26px; padding-top:22px; border-top:1px solid var(--hairline)}
.board-group h2{
  margin:0; font-size:14px; display:flex; align-items:center; gap:9px;
}
.board-count{
  font-family:var(--font-family-base); font-size:11px; font-weight:700; color:var(--ink-faint);
  background:var(--hairline); padding:1px 8px; border-radius:99px;
}
.board-groupnote{margin:3px 0 12px; font-size:12px; color:var(--ink-faint)}
.board-tile{
  position:relative; overflow:hidden; text-decoration:none; color:inherit; display:block;
  padding-top:20px;
}
.board-strip{
  position:absolute; top:0; left:0; right:0; height:8px; background:var(--strip);
}
.board-tile:hover{border-color:var(--strip)}
.board-tile h3{font-size:15px}
.board-meta{font-size:12.5px; color:var(--ink-faint); margin-top:6px}

/* board colour in the admin dashboard */
.board-table{width:100%; border-collapse:collapse}
.board-swatch-cell{width:26px; padding-left:0!important}
.board-swatch{
  display:block; width:6px; height:26px; border-radius:99px; background:var(--strip);
}
.board-table tbody tr:hover td{background:color-mix(in srgb, var(--strip) 14%, transparent)}

/* ---------- board stage counts ---------- */
.bstats{display:flex; gap:4px; margin-top:12px; flex-wrap:wrap; align-items:center}
.bstat{
  display:flex; align-items:baseline; gap:4px; font-size:10.5px; color:var(--ink-soft);
  background:var(--canvas); border:1px solid var(--hairline); padding:4px 8px; border-radius:99px;
  white-space:nowrap; min-width:0; cursor:help;
}
.bstat b{font-family:var(--font-family-base); font-size:12px; color:var(--ink)}
.bstat.start b{color:var(--color-status-todo)}
.bstat.working b{color:var(--color-status-working)}
.bstat.done b{color:var(--color-status-done)}
.bstat.zero{color:var(--ink-faint); border-style:dashed}
.bstat.zero b{color:var(--ink-faint)}

/* ---------- feedback summary row (cards + files) ---------- */
.kcard-fb{display:flex; align-items:center; gap:4px; flex-wrap:wrap; margin-top:7px}
.kcard-fb-label{
  font-size:10.5px; font-weight:700; letter-spacing:.03em; color:var(--ink-faint);
  text-transform:uppercase; margin-right:2px;
}
.kcard-fb .fb-badge{
  min-width:22px; text-align:center; padding:1px 7px; font-weight:700; margin:0; cursor:help;
}
/* resolved feedback now reads green — the work was done */
.chip.fb-badge.done{background:var(--color-success-soft); color:var(--color-success-text)}
.bstat.client b{color:var(--color-status-client)}
.tabs a.btn{padding:9px 16px; font-size:13.5px; background:transparent; border:1px solid var(--hairline); color:var(--ink-soft)}
.tabs a.btn:hover{background:var(--hairline); color:var(--ink)}

/* ---------- hours: sub-boards, exclusions, payment history ---------- */
.tabs.sub{margin:14px 0 12px; align-items:center; flex-wrap:wrap}
.tabs.sub button{font-size:12.5px; padding:7px 13px}
/* the first three tabs are stages of one flow, so the arrows say so */
.tab-arrow{color:var(--ink-faint); font-size:11px; margin:0 -2px}
.tab-spacer{flex:1}

tr.row-excluded td{color:var(--ink-faint); filter:saturate(.35); text-decoration:line-through}
tr.row-excluded td:last-child{opacity:1; text-decoration:none}
/* Not the same thing as excluded: a project row whose cards are not finished is not
   crossed out — nothing was cancelled, the work is simply not ripe. Dimmed, no line. */
tr.row-notready td{color:var(--ink-faint); filter:saturate(.35)}
tr.row-notready td :is(a, .field-note, .pj-tag){color:var(--ink-faint)}
tr.row-notready td:last-child{opacity:1}

/* ---------- payment history ---------- */

.hist-intro{
  display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; justify-content:space-between;
  border-left:3px solid var(--color-highlight-text); padding:2px 0 2px 14px; margin-bottom:18px;
}
.hist-intro h2{margin:0 0 4px; font-size:15px; color:var(--color-highlight-text)}
.hist-intro p{margin:0; font-size:12.5px; color:var(--ink-soft); max-width:640px; line-height:1.5}
.hist-intro .hours-tot{margin:0}

.runcard{
  border:1px solid var(--hairline); border-radius:var(--radius); margin-bottom:10px;
  overflow:hidden; background:var(--panel);
}
.runcard.open{border-color:var(--color-warning-border)}
.runcard.reverted{color:var(--ink-faint); filter:saturate(.35)}
.runhead{
  display:flex; align-items:center; gap:12px; width:100%; text-align:left;
  background:transparent; border:0; padding:13px 15px; color:var(--ink); flex-wrap:wrap;
}
.runhead:hover{background:color-mix(in srgb, var(--color-highlight-text) 7%, transparent)}
.run-caret{color:var(--ink-faint); font-size:10px; transition:transform .15s ease}
.runcard:not(.open) .run-caret{transform:rotate(-90deg)}
.run-month{font-family:var(--font-family-base); font-weight:700; font-size:14px; min-width:130px}
.run-flag{
  font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  padding:2px 8px; border-radius:99px;
}
.run-flag.reverted{background:var(--hairline); color:var(--ink-faint)}
.run-flag.partial{background:var(--color-warning-soft); color:var(--color-highlight-text)}
.run-figures{display:flex; gap:14px; align-items:baseline; margin-left:auto; font-size:11.5px; color:var(--ink-soft)}
.run-figures b{font-family:var(--font-family-base); font-size:13px; color:var(--ink)}
.run-figures .run-cost b{color:var(--color-highlight-text)}
.run-meta{font-size:11px; color:var(--ink-faint); width:100%; padding-left:22px}
.runbody{display:none; border-top:1px solid var(--hairline)}
.runcard.open .runbody{display:block}
.run-clients{
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  padding:10px 15px; background:var(--canvas);
}
.runtable{width:100%; border-collapse:collapse; font-size:12.5px}
.runtable th{
  text-align:left; font-size:9.5px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--ink-faint); padding:8px 15px; border-bottom:1px solid var(--hairline);
}
.runtable td{padding:8px 15px; border-bottom:1px solid var(--hairline)}
.runtable tr:last-child td{border-bottom:0}
.runtable tr:hover td{background:var(--canvas)}
/* task links leave the current list, so mark them as external-ish */
.fb-table a[target="_blank"], .runtable a[target="_blank"], table a[target="_blank"]{white-space:nowrap}

/* payment markers: information, not an assignable label */
.paidchip{
  display:inline-block; background:var(--color-success-soft); color:var(--color-money-text); border:1px solid var(--color-success-border);
  font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:99px; margin:0 4px 4px 0;
}
.kcard .chip.paidchip{border:0; background:var(--color-success-soft); color:var(--color-success-text)}

/* the invoice review stage reads as neutral-blue: pending, not paid */
.invoice-intro{border-left-color:var(--color-info-text)}
.invoice-intro h2{color:var(--color-info-text)}
#inv-table .inv-pick{cursor:pointer}

/* ---------- hours resume polish ---------- */
.hours-tot .box{min-width:132px}
#dev-table th, #inv-table th, #cli-table th, #total-table th{
  position:sticky; top:0; z-index:2; background:var(--canvas);
}
#dev-table tbody tr:hover td, #inv-table tbody tr:hover td,
#cli-table tbody tr:hover td, #total-table tbody tr:hover td{background:var(--panel)}
.table-tools{flex-wrap:wrap; row-gap:8px}
.table-tools .switch{white-space:nowrap}
.flow-note{
  margin:0 0 4px; font-size:12.5px; color:var(--ink-soft);
  border-left:3px solid var(--accent); padding-left:11px; line-height:1.5;
}
.flow-note b{color:var(--ink)}
/* Sub-links are gated the same way as the rest of the drawer: by not being rendered.
   The hours accordion simply is not built for a role without an entry in it. */
body.is-client .drawer-acc{display:none}

/* Rewrite preview: the two versions side by side, because the point is the comparison.
   Stacked on narrow screens — a diff you have to scroll between is not a diff. */
.rw-cols{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.rw-col h4{margin:0 0 6px; font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-faint)}
.rw-pane{
  border:1px solid var(--hairline); border-radius:10px; padding:12px 14px;
  background:var(--canvas); max-height:52vh; overflow:auto; font-size:13.5px;
  line-height:1.55; color:var(--ink-soft);
}
.rw-pane.rw-after{border-color:var(--accent); color:var(--ink)}
.rw-pane h1,.rw-pane h2,.rw-pane h3,.rw-pane h4{font-size:14px; margin:12px 0 6px; color:var(--ink)}
.rw-pane ul,.rw-pane ol{margin:6px 0 6px 18px}
.rw-notes{
  margin-top:14px; border-left:3px solid var(--warn); padding:8px 0 8px 12px;
  font-size:13px; color:var(--ink-soft);
}
.rw-notes ul{margin:6px 0 0 18px}
@media (max-width:900px){ .rw-cols{grid-template-columns:1fr} }

/* Sectioned cards (REQ-25).
   The reading view is the default one, so it gets the care: headings that look like
   headings, and the reference chip beside each so a section can be quoted without
   opening anything. */
.segbtn{display:inline-flex; border:1px solid var(--hairline); border-radius:8px; overflow:hidden}
.segbtn button{
  background:transparent; border:0; color:var(--ink-soft); font-size:12px;
  padding:5px 10px; cursor:pointer;
}
.segbtn button.on{background:var(--accent-soft); color:var(--accent-ink); font-weight:600}
.segbtn button:not(.on):hover{background:var(--hairline); color:var(--ink)}

.sec-read{display:flex; flex-direction:column; gap:14px}
/* Each section is its own card on a sunken background, with a header bar that carries its
   reference and its title: eight sections in one body were hard to tell apart (the owner,
   2026-10-16: "show the division better with a different background and a title on top with
   the id"). The left edge still lights up when the section is the one a link points at. */
.sec-block{
  background:var(--input-bg); border:1px solid var(--hairline); border-left:3px solid var(--hairline);
  border-radius:var(--radius-card); overflow:hidden;
}
.sec-block:target,.sec-block.on{border-left-color:var(--accent)}
.sec-head{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:var(--canvas); border-bottom:1px solid var(--hairline); padding:9px 14px;
}
.sec-title{margin:0; color:var(--ink); font-family:var(--font-family-base); flex:1; min-width:0; line-height:1.25}
/* The H level a section is given is its size too, in the order a reader expects (the rich
   editor's own sizes). Without these, h3 and h4 fell to the browser's defaults and an h3
   drew LARGER than an h2. Sized up on 2026-10-16: "h2 is very small". */
h1.sec-title{font-size:22px; font-weight:700}
h2.sec-title{font-size:19px; font-weight:700}
h3.sec-title{font-size:17px; font-weight:700}
h4.sec-title{font-size:15px; font-weight:700; color:var(--ink-soft)}
.sec-id{
  order:-1;
  background:var(--panel); border:1px solid var(--hairline); border-radius:20px;
  color:var(--ink-faint); font-size:11px; padding:2px 9px; cursor:pointer; font-family:monospace;
}
.sec-id:hover{color:var(--accent-ink); border-color:var(--accent)}
.sec-fb{opacity:0; transition:opacity .12s ease}
.sec-block:hover .sec-fb,.sec-fb:focus{opacity:1}
.sec-body{padding:12px 14px 14px; color:var(--ink-soft); font-size:13.5px; line-height:1.55}
/* headings inside a section step down from the section's own, and stay headings */
.sec-body h1,.sec-body h2,.sec-body h3,.sec-body h4{margin:14px 0 6px; color:var(--ink); line-height:1.3}
.sec-body h1{font-size:18px}
.sec-body h2{font-size:16.5px}
.sec-body h3{font-size:15px}
.sec-body h4{font-size:14px}
.sec-body > :first-child{margin-top:0}
.sec-body ul,.sec-body ol{margin:5px 0 5px 18px}
.sec-hours{padding:0 14px 12px; font-size:11.5px; color:var(--ink-faint)}
/* a line that says the design is missing or wrong: light red, wherever a body is read or edited */
.flag-miss, .flag-miss > *{color:var(--danger)}
.chk-items{margin:0;padding-left:18px;font-size:13.5px;line-height:1.5}
.chk-items li{margin:8px 0}

.tsec{border:1px solid var(--hairline); border-radius:10px; padding:10px 12px; margin-bottom:10px}
.tsec-head{display:flex; align-items:center; gap:7px; margin-bottom:8px}
.tsec-head input[data-sfield="title"]{flex:1; min-width:0}
.tsec-head select{width:64px}
.tsec-id{font-family:monospace; font-size:11px; color:var(--ink-faint); white-space:nowrap}
.tsec-body{min-height:80px}
/* a section's editor is the card's editor, one size down: the same chrome, less of it */
.tsec .rte-bar{padding:4px 6px}
.tsec .rte-bar .rte-btn{font-size:11.5px; padding:2px 6px; min-width:26px}
.tsec .rte-bar .rte-block{min-width:116px}

/* per-section hours, when the card is split */
.sec-hrow{border-top:1px dashed var(--hairline); padding-top:10px; margin-top:10px}
.sec-hrow-title{font-size:12px; font-weight:600; color:var(--ink); margin-bottom:6px}
#hours-grid.by-sections input{opacity:.75; cursor:not-allowed}
#hours-grid.by-sections .hgroup h5::after{
  content:' — from the sections'; font-weight:400; color:var(--ink-faint); text-transform:none;
}

/* Projects (REQ-26). The sheet is a spreadsheet, so it behaves like one: dense rows,
   inputs that do not look like form fields, and a horizontal scroll rather than a wrap. */
.pj-head{display:flex; align-items:center; gap:12px; margin:14px 0; flex-wrap:wrap}
.pj-head h2{margin:0; font-size:18px}
.pj-sub{color:var(--ink-soft); font-size:12.5px}
.pj-figs{display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; font-size:12px; color:var(--ink-soft)}
.pj-figs b{color:var(--ink)}
.pj-sheet{overflow-x:auto; border:1px solid var(--hairline); border-radius:10px; margin-top:10px}
.pj-sheet table{margin:0; min-width:1000px}
.pj-sheet th{white-space:nowrap; font-size:11px}
.pj-sheet td{padding:4px 6px}
.pj-sheet input{
  background:transparent; border:1px solid transparent; border-radius:6px;
  padding:5px 7px; width:100%; font-size:13px; color:var(--ink);
}
.pj-sheet input:hover{border-color:var(--hairline)}
.pj-sheet input:focus{border-color:var(--accent); background:var(--canvas)}
.pj-rowtot{font-weight:600; white-space:nowrap; color:var(--ink)}
/* the file input is a label, so it has to be told to look like the buttons beside it */
.pj-import{
  display:inline-flex; align-items:center; cursor:pointer; border:1px solid var(--hairline);
  background:transparent; color:var(--ink-soft); border-radius:8px; padding:6px 11px; font-size:12.5px;
}
.pj-import:hover{background:var(--hairline); color:var(--ink)}
/* a project row in the developer resume, and the note on a linked card */
.row-project{background:color-mix(in srgb, var(--accent-soft) 35%, transparent)}
/* a line we added by hand to a client (Hours → Clients, the owner 2026-11-05) */
.row-manual{background:color-mix(in srgb, var(--warn-soft) 30%, transparent)}
/* A board kept out of hours (the owner, 2026-11-05): no hour fields, no hours on a card's face,
   no missing-hours banner. The server asks for none and the Hours resume leaves the board out. */
.no-hours-note{display:none}
body.board-no-hours .no-hours-note{display:block}
body.board-no-hours #hours-grid, body.board-no-hours #hours-mode, body.board-no-hours #sec-hours,
body.board-no-hours #t-hourwarn, body.board-no-hours .sec-hours, body.board-no-hours .kcard-hours{display:none !important}
/* Work completed, one heading per client with its work underneath (the owner, 2026-11-05) */
#cli-table tr.cli-group td{background:var(--raised); border-top:2px solid var(--edge); padding:10px 8px}
.cli-group-head{display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.cli-group-head b{font-size:14.5px}
.cli-group-total{font-weight:700; color:var(--accent-ink)}
/* a paid figure is history: the field says so and refuses the keyboard */
.hour-locked input{opacity:.55; cursor:not-allowed; background:var(--panel)}
.lock-note{
  font-size:10.5px; color:var(--warn); border:1px solid var(--warn); border-radius:5px;
  padding:1px 6px; white-space:nowrap;
}

/* the project totals, grouped the way the money is grouped */
.pj-totgrid{display:flex; flex-wrap:wrap; gap:14px; margin:12px 0}
.pj-tgroup{
  border:1px solid var(--hairline); border-radius:10px; padding:10px 12px 12px;
  display:flex; gap:10px; align-items:stretch; flex-wrap:wrap;
}
.pj-tgroup h4{
  flex-basis:100%; margin:0 0 2px; font-size:10.5px; letter-spacing:.09em;
  text-transform:uppercase; color:var(--ink-faint);
}
.pj-tgroup .box{background:var(--canvas); border:1px solid var(--hairline); border-radius:8px;
  padding:8px 12px; min-width:104px}
.pj-tgroup .box .v{font-size:17px; font-weight:700; color:var(--ink)}
.pj-tgroup .box .l{font-size:11px; color:var(--ink-faint); margin-top:2px}
.pj-tgroup .box.held .v{color:var(--warn)}
.pj-tgroup .box.ok .v{color:var(--accent-ink)}
.pj-tgroup .box.bad .v{color:var(--danger)}
/* a stage project's fixed total: the sheet says its money is not hours × rate */
.pj-fixed-note{flex-basis:100%; margin:0}
/* ---------- timelines ----------
   A grid: one row per element, one column per week. The two plans are drawn as
   semi-transparent bands in the same cell, so an overlap reads as the deeper colour —
   which is the whole reason both live on one board. */
.tl-head{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:6px 0 4px}
.tl-bar{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:var(--panel); border:1px solid var(--hairline); border-radius:10px;
  padding:8px 12px; margin:8px 0;
}
.tl-legend{display:flex; align-items:center; gap:8px; font-size:12px; color:var(--ink-soft)}
/* the edit switch, and what the grid looks like in each state */
/* the overview: what needs attention, grouped by project */
.tl-group{margin-bottom:12px}
.tl-group-head{display:flex; align-items:center; gap:10px; margin-bottom:6px}
.tl-att{width:100%}
.tl-att td{padding:6px 8px; border-top:1px solid var(--hairline); vertical-align:middle}
.tl-att tr.late td{background:color-mix(in srgb, var(--danger) 8%, transparent)}
.tl-badge{
  font-size:10.5px; font-weight:700; border-radius:5px; padding:2px 7px; white-space:nowrap;
}
.tl-badge.late{background:var(--danger-soft); color:var(--danger)}
.tl-badge.now{background:var(--accent-soft); color:var(--accent-ink)}
.tl-badge.soon{background:var(--panel); color:var(--ink-faint); border:1px solid var(--hairline)}
/* every project, stacked */
.tl-acc{margin-bottom:10px}
.tl-acc summary{display:flex; align-items:center; gap:10px; cursor:pointer; padding:4px 0}
.tl-acc summary b{font-size:14px}
.tl-acc-grid{min-height:40px}
.tl-acc-tools{display:flex; align-items:center; gap:10px; margin:6px 0 8px; flex-wrap:wrap}
/* the cards behind an element, reachable from the plan */
.tl-cards{display:flex; flex-direction:column; gap:2px; margin-top:2px}
.tl-card{
  font-size:10.5px; color:var(--ink-faint); text-decoration:none;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.tl-card:hover{color:var(--accent-ink); text-decoration:underline}
.tl-edit-toggle{
  border:1px solid var(--hairline); border-radius:8px; padding:4px 10px;
}
.tl-edit-toggle.on{
  border-color:var(--accent); color:var(--accent-ink);
  background:color-mix(in srgb, var(--accent) 12%, transparent);
}
.tl-swatch{width:16px; height:9px; border-radius:3px; display:inline-block}
.tl-swatch.dev{background:var(--tl-dev)}
.tl-swatch.client{background:var(--tl-client); margin-left:8px}
/* one plan, coloured by who does the row: the client document's own key (black bars for
   admin and AI, green for design, a dotted outline for the client's approval round) */
.tl-swatch.owner-dev{background:var(--tl-ai)}
.tl-swatch.owner-design{background:var(--tl-design); margin-left:8px}
.tl-swatch.owner-client{border:1.5px dashed var(--ink-soft); margin-left:8px}
.tl-owner{
  font-size:9px; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
  border-radius:4px; padding:0 5px; margin-right:2px;
  color:var(--ink-faint); border:1px solid var(--hairline);
}
.tl-owner.owner-design{color:var(--tl-design); border-color:var(--tl-design)}
.tl-owner.owner-client{border-style:dashed}
/* the month band above the weeks, so eleven columns of dd/mm mean something */
.tl-month{
  border-top:1px solid var(--hairline); border-right:1px solid var(--hairline);
  background:var(--canvas); text-align:center; font-size:10.5px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-faint); padding:4px 0;
}
.tl-corner{background:var(--canvas)}
.tl-el{font-weight:600}
.tl-head h2{margin:0; font-size:18px}
.tl-key.dev{color:var(--tl-dev)}
.tl-key.client{color:var(--tl-client)}
.tl-scroll{overflow-x:auto; overflow-y:visible; padding-bottom:8px; max-width:100%}
.tl-table{
  display:grid;
  grid-template-columns:240px repeat(var(--weeks), minmax(52px, 1fr));
  min-width:100%;
}
.tl-row{display:contents}
.tl-name{
  position:sticky; left:0; z-index:2; background:var(--panel);
  border-top:1px solid var(--hairline); border-right:1px solid var(--hairline);
  padding:8px 10px; font-size:12.5px; display:flex; flex-direction:column; gap:4px;
  overflow:hidden;
}
.tl-name > span:first-child{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tl-name small{font-size:10.5px; color:var(--ink-faint)}
.tl-name small.tl-late{color:var(--warn)}
.tl-head-row .tl-name{background:var(--canvas); font-weight:700}
.tl-cell{
  border-top:1px solid var(--hairline); border-right:1px solid var(--hairline);
  min-height:44px; position:relative; cursor:default;
}
/* only a grid in edit mode invites the pointer */
#tl-grid.editing .tl-cell[data-week]{cursor:crosshair}
#tl-grid.editing .tl-cell[data-week]:hover{outline:1px solid var(--hairline); outline-offset:-1px}
#tl-grid.editing{
  box-shadow:0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius:10px;
}
.tl-week{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:1px; font-size:11px; color:var(--ink-faint); cursor:default; min-height:38px;
}
.tl-week small{font-size:9.5px; opacity:.7}
/* This week, made obvious: the whole column is tinted and its header named, because
   "where are we now" is the first question anybody asks of a timeline. */
.tl-cell.now{background-color:color-mix(in srgb, var(--accent) 8%, transparent)}
.tl-week.now{
  background:color-mix(in srgb, var(--accent) 16%, transparent);
  color:var(--accent-ink); font-weight:700;
}
.tl-week.now small{color:var(--accent-ink); opacity:1}
.tl-cell.now::marker{content:''}
/* Three lanes in every cell, and they never touch:
     top     the developers' plan, purple
     middle  what actually happened — the delivery line, or the red overrun
     bottom  the client's plan, amber
   The bands used to overlap in the middle, which made a busy grid unreadable: two
   semi-transparent colours crossing produce a third that means nothing. Separated, each
   lane answers one question, and the middle lane is always reality. */
.tl-cell.has-dev::before, .tl-cell.has-client::after{
  content:''; position:absolute; left:0; right:0; height:34%;
}
.tl-cell.has-dev::before{top:4px; background:var(--tl-dev)}
.tl-cell.has-client::after{bottom:4px; background:var(--tl-client)}
/* One plan (an AI project): the band takes the upper half of the cell in the owner's colour,
   and the lower half stays the lane for what actually happened. */
/* The bar is continuous across the run (it covers the cell borders between its weeks and is
   rounded only at the run's ends), and it carries the status itself: the share of the
   work already done is solid, the rest a tint; a delivered row ends in a tick. */
.tl-cell.has-plan{--bar:var(--tl-ai)}
.tl-cell.has-plan.owner-design{--bar:var(--tl-design)}
.tl-cell.has-plan::before{
  content:''; position:absolute; left:-1px; right:-1px; top:6px; height:42%; z-index:1;
  background:linear-gradient(to right, var(--bar) var(--fill, 0%),
    color-mix(in srgb, var(--bar) 32%, transparent) var(--fill, 0%));
}
.tl-cell.has-plan.run-start::before{left:3px; border-radius:4px 0 0 4px}
.tl-cell.has-plan.run-end::before{right:3px; border-radius:0 4px 4px 0}
.tl-cell.has-plan.run-start.run-end::before{border-radius:4px}
/* the client's own week: an outline, as the document draws its approval rounds */
.tl-cell.has-plan.owner-client::before{
  background:transparent; border:1.5px dashed var(--ink-soft); border-left:0; border-right:0;
}
.tl-cell.has-plan.owner-client.run-start::before{border-left:1.5px dashed var(--ink-soft)}
.tl-cell.has-plan.owner-client.run-end::before{border-right:1.5px dashed var(--ink-soft)}
.tl-cell.has-plan.owner-client.is-done::before{border-style:solid; border-color:var(--accent)}
/* delivered: the bar is whole and ends in a tick, green inside the plan, red past it */
.tl-cell.has-plan.is-done.run-end::after{
  content:'✓'; position:absolute; right:7px; top:5px; z-index:2; font-size:11px; font-weight:700;
  line-height:1; color:var(--on-accent); background:var(--accent); border-radius:50%;
  width:14px; height:14px; display:flex; align-items:center; justify-content:center;
}
.tl-cell.has-plan.is-done.done-late.run-end::after{background:var(--danger)}
/* late: the bar runs on past its plan in red, up to this week */
.tl-table.one-plan .tl-cell.over{box-shadow:none}
.tl-table.one-plan .tl-cell.over::before{
  content:''; position:absolute; left:-1px; right:-1px; top:6px; height:42%; z-index:1;
  background:repeating-linear-gradient(135deg, var(--danger) 0 4px,
    color-mix(in srgb, var(--danger) 35%, transparent) 4px 8px);
}
.tl-table.one-plan .tl-cell.over.now::before{right:3px; border-radius:0 4px 4px 0}
.tl-swatch.tint{background:color-mix(in srgb, var(--tl-ai) 32%, transparent); margin-left:8px}
.tl-swatch.solid{background:var(--tl-ai); margin-left:8px}
.tl-swatch.over{
  background:repeating-linear-gradient(135deg, var(--danger) 0 3px,
    color-mix(in srgb, var(--danger) 35%, transparent) 3px 6px); margin-left:8px;
}
.tl-status{margin:8px 0 4px}
.tl-status .box.bad .v{color:var(--danger)}
.tl-status .box.ok .v{color:var(--accent-ink)}
.tl-badge.done{background:var(--accent-soft); color:var(--accent-ink)}
.tl-sprint .tl-badge{margin-left:2px}
.tl-table.one-plan .tl-cell[class*="done-"], .tl-table.one-plan .tl-cell.over{background-image:none}
/* weeks the work has run into beyond its plan */
/* weeks the work has run into beyond its plan, drawn over everything */
.tl-cell.over{box-shadow:inset 0 -4px 0 var(--danger)}
.tl-cell.picking{outline:2px solid var(--accent); outline-offset:-2px}
.tl-sprint{
  grid-column:1 / -1; background:var(--canvas); color:var(--ink-faint);
  font-size:10.5px; letter-spacing:.06em; padding:7px 10px;
  border-top:1px solid var(--hairline);
  display:flex; align-items:center; gap:10px; position:sticky; left:0;
}
.tl-sprint b{font-size:11px; letter-spacing:.09em; text-transform:uppercase; color:var(--ink)}
.tl-sprint-date{color:var(--accent-ink)}
.tl-sprint-note{
  color:var(--warn); max-width:340px; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; cursor:help;
}
/* The middle lane: what actually happened, drawn between the two plans so it can never
   be confused with either. Green is reserved for delivery, and a run that ends early ends
   early — the line stops at the week the work landed, whatever the plan said. */
.tl-cell[class*="done-"], .tl-cell.over{
  background-image:linear-gradient(to bottom,
    transparent calc(50% - 2.5px), var(--tl-actual) calc(50% - 2.5px),
    var(--tl-actual) calc(50% + 2.5px), transparent calc(50% + 2.5px));
}
.tl-cell.done-on_time{--tl-actual:var(--accent)}
.tl-cell.done-buffer{--tl-actual:var(--color-timeline-buffer)}
.tl-cell.done-late{--tl-actual:var(--danger)}
.tl-cell.over{--tl-actual:var(--danger)}
/* the week it actually landed gets a cap, so the end of the line is a place not a fade */
.tl-cell.delivered-end::after{
  content:''; position:absolute; top:calc(50% - 6px); right:2px; width:5px; height:12px;
  border-radius:2px; background:var(--tl-actual); z-index:1;
}
/* a delivered element reads as finished from the name alone */
.tl-name.is-done{border-left:3px solid var(--accent)}
.tl-name.is-done .tl-el{color:var(--accent-ink)}
.tl-swatch.done-on_time{background:var(--accent); margin-left:8px}
.tl-swatch.done-buffer{background:var(--color-timeline-buffer); margin-left:8px}
.tl-swatch.done-late{background:var(--danger); margin-left:8px}

.kcard-sched{
  margin-top:6px; font-size:10.5px; font-weight:600; border-radius:5px;
  padding:2px 6px; display:inline-block; cursor:help;
}
.kcard-sched.ok{background:var(--accent-soft); color:var(--accent-ink)}
.kcard-sched.late{background:var(--warn-soft); color:var(--warn)}
.col-note{
  font-size:9.5px; color:var(--accent-ink); border:1px solid var(--accent);
  border-radius:5px; padding:1px 5px; white-space:nowrap; cursor:help;
}
.row-ops{white-space:nowrap}
.row-ops button{padding:2px 6px}
/* progress: cards finished against cards linked, with the two milestones marked */
.pj-prog-head{display:flex; align-items:center; gap:10px; margin-bottom:8px}
.pj-prog-head h3{margin:0; font-size:14px}
.pj-prog-pct{font-size:18px; color:var(--accent-ink)}
.pj-prog{
  position:relative; height:14px; border-radius:7px; background:var(--canvas);
  border:1px solid var(--hairline); overflow:visible;
}
.pj-prog-fill{
  height:100%; border-radius:7px 0 0 7px; background:var(--accent);
  transition:width .3s ease;
}
.pj-prog-fill.done{border-radius:7px}
/* a milestone is a place on the bar, so it is drawn ON the bar */
.pj-prog-mark{
  position:absolute; top:-4px; width:2px; height:22px; background:var(--ink-faint);
  transform:translateX(-1px);
}
.pj-prog-mark::after{
  content:'\25c6'; position:absolute; top:-11px; left:-5px; font-size:10px; color:var(--ink-faint);
}
.pj-prog-mark.reached, .pj-prog-mark.reached::after{color:var(--accent); background:var(--accent)}
.pj-prog-mark.reached::after{background:transparent}
.pj-prog-mark.end{transform:translateX(-2px)}
.pj-prog-legend{display:flex; gap:16px; margin-top:14px; font-size:11.5px; color:var(--ink-faint)}
.pj-prog-legend .on{color:var(--accent-ink)}
/* the stage invoices, and which one the work says is due */
.pj-stages{margin-top:12px}
.pj-stages tr.sent td{color:var(--ink-soft)}
.pj-stages tr.paid td{color:var(--ink-soft)}
.pj-stages tr.due{background:color-mix(in srgb, var(--warn-soft) 45%, transparent)}
.pj-due{color:var(--warn); font-weight:700}

/* stage-billed projects listed in the client cycle */
.cli-stage-row{padding:12px 0; border-top:1px solid var(--hairline)}
.cli-stage-row:first-of-type{border-top:0}
.cli-stage-top{display:flex; align-items:center; gap:10px; margin-bottom:8px}
.cli-stage-list{display:flex; flex-wrap:wrap; gap:10px; margin-top:14px}
.cli-stage{
  font-size:11.5px; color:var(--ink-faint); border:1px solid var(--hairline);
  border-radius:6px; padding:3px 8px;
}
.cli-stage.sent{color:var(--accent-ink); border-color:var(--accent)}
.cli-stage.due{color:var(--warn); border-color:var(--warn); font-weight:600}

/* A stage-billed project's payments (assets/stage-bar.js, the owner 2026-11-05): the plan laid
   end to end, each stage as wide as its share; paid is filled, invoiced-not-paid hatched, due
   outlined. The work is its own slim line below. */
.stg{display:flex; flex-direction:column; gap:8px}
.stg-head{display:flex; align-items:baseline; flex-wrap:wrap; gap:10px}
.stg-head b{font-size:16px; color:var(--accent-ink)}
.stg-bar{position:relative; height:16px; border-radius:8px; background:var(--canvas); border:1px solid var(--hairline); overflow:hidden}
.stg-seg{position:absolute; top:0; bottom:0; border-right:2px solid var(--panel)}
.stg-seg:last-child{border-right:0}
.stg-seg.is-paid{background:var(--accent)}
.stg-seg.is-sent{background:repeating-linear-gradient(135deg, var(--accent-soft) 0 6px, transparent 6px 12px)}
.stg-seg.is-due{box-shadow:inset 0 0 0 2px var(--warn)}
.stg-labels{display:flex; font-size:11.5px; line-height:1.3}
.stg-label{display:flex; flex-direction:column; gap:1px; padding:0 6px 0 0; min-width:0; color:var(--ink-faint)}
.stg-label b{color:var(--ink-soft); font-weight:600}
.stg-label.is-paid span{color:var(--accent-ink); font-weight:600}
.stg-label.is-sent span{color:var(--ink-soft)}
.stg-label.is-due span{color:var(--warn); font-weight:700}
.stg-work{display:flex; align-items:center; gap:10px; margin-top:4px}
.stg-work-bar{position:relative; flex:1 1 auto; height:6px; border-radius:3px; background:var(--canvas); border:1px solid var(--hairline)}
.stg-work-fill{height:100%; border-radius:3px; background:var(--ink-faint)}
.stg-work-mark{position:absolute; top:-4px; width:2px; height:12px; background:var(--ink-faint); transform:translateX(-1px)}
.stg-work-mark.reached{background:var(--accent)}

/* a disabled CTA must look like one: nothing to release reads as grey, not as green */
#ret-release:disabled{opacity:.45; cursor:not-allowed; filter:saturate(.3)}
/* the retainer panel and its releases */
.pj-ret-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.pj-ret-head h3{margin:0; font-size:14px}
.pj-rel{margin-top:10px}
.pj-rel th{font-size:11px}
.pj-tag.ok{background:var(--accent-soft); color:var(--accent-ink); border:1px solid var(--accent)}

/* section headings inside the payment lists: board work above, project work below */
.dev-section td{
  background:var(--panel); color:var(--ink-faint); font-size:11px; font-weight:700;
  letter-spacing:.09em; text-transform:uppercase; padding:7px 10px!important;
  border-top:1px solid var(--hairline);
}
.pj-tag{
  background:var(--accent-soft); color:var(--accent-ink); border-radius:5px;
  font-size:10px; letter-spacing:.04em; text-transform:uppercase; padding:2px 6px; margin-right:6px;
}
.pj-linked{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  border:1px solid var(--accent); background:var(--accent-soft);
  border-radius:10px; padding:10px 13px; font-size:13px; color:var(--ink); margin-bottom:8px;
}
.pj-linked[hidden]{display:none}
.pj-card{
  display:inline-block; font-size:11px; padding:2px 7px; margin:1px 3px 1px 0;
  border:1px solid var(--hairline); border-radius:20px; color:var(--ink-soft); text-decoration:none;
}
.pj-card:hover{border-color:var(--accent); color:var(--accent-ink)}
/* Embed mode: the board page reduced to its card dialog, for the projects overlay.
   Everything else is hidden rather than removed — the dialog's JS still needs the page. */
body.embed .drawer, body.embed .drawer-toggle, body.embed .drawer-scrim,
body.embed .topbar, body.embed .board-scroll, body.embed .preview-bar,
body.embed .boardbar{display:none!important}
body.embed{background:transparent}
body.embed .app-main{padding:0}
/* the projects page's overlay that hosts it */
.pj-overlay{
  position:fixed; inset:0; z-index:80; border:0; width:100%; height:100%;
  background:color-mix(in srgb, var(--canvas) 60%, transparent);
}

/* Tutorials (REQ-28). A manual is read far more often than it is edited, so the reading
   view is the plain one and editing is something you turn on per section. */
.tut-layout{display:grid; grid-template-columns:250px 1fr; gap:20px; align-items:start}
.tut-nav{position:sticky; top:14px; display:flex; flex-direction:column; gap:8px}
.tut-nav input{width:100%}
.tut-page{margin-bottom:10px}
.tut-page-t{
  display:flex; align-items:center; gap:6px; font-size:11px; letter-spacing:.07em;
  text-transform:uppercase; color:var(--ink-faint); margin:8px 0 4px;
}
.tut-link{
  display:flex; align-items:center; gap:6px; padding:5px 9px; border-radius:7px;
  color:var(--ink-soft); text-decoration:none; font-size:13px;
}
.tut-link:hover{background:var(--hairline); color:var(--ink)}
.tut-link.on{background:var(--accent-soft); color:var(--accent-ink)}
.tut-dot{width:6px; height:6px; border-radius:50%; background:var(--warn); flex:none}

.tut-body{min-width:0}
.tut-pagesec{margin-bottom:26px}
.tut-page-head{display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--hairline); padding-bottom:6px}
.tut-page-head h2{margin:0; font-size:17px}
.tut-sec{border:1px solid var(--hairline); border-radius:10px; padding:12px 15px; margin-top:12px}
.tut-sec.is-draft{border-style:dashed}
.tut-sec-head{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.tut-sec-head h3{margin:0; font-size:15px}
.tut-src{font-size:11.5px; color:var(--ink-faint); text-decoration:none;
  min-width:0; max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tut-src:hover{color:var(--accent-ink)}
.tut-prose{margin-top:8px; color:var(--ink-soft); font-size:13.5px; line-height:1.6}
.tut-prose h1,.tut-prose h2,.tut-prose h3{font-size:14px; margin:12px 0 5px; color:var(--ink)}
.tut-prose ul,.tut-prose ol{margin:6px 0 6px 18px}
.tut-title-in{width:100%; margin-top:8px; font-weight:600}
.tut-body-in{width:100%; margin-top:8px; font-family:inherit; font-size:13.5px; line-height:1.55}
.tut-sec-foot{display:flex; align-items:center; gap:10px; margin-top:8px}

/* names of things: a different colour because they must be typed exactly, and a visible
   question mark until somebody has checked them against the theme */
.tut-vars{margin-top:10px; padding-top:9px; border-top:1px dashed var(--hairline)}
.tut-var{
  display:inline-block; margin:0 6px 6px 0; padding:2px 8px; border-radius:6px;
  cursor:pointer; border:1px solid transparent; font-size:12px;
}
.tut-var code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px}
.tut-var.ok{background:var(--accent-soft); color:var(--accent-ink)}
.tut-var.unconfirmed{background:var(--warn-soft); color:var(--warn); border-color:var(--warn)}
.tut-var:hover{border-color:currentColor}
.tut-var-note{font-size:11.5px; color:var(--ink-faint); margin-top:3px}
/* the same name, coloured where it is read rather than only in the list below */
/* where the search found what you asked for */
mark.tut-hit{background:var(--warn-soft); color:var(--warn); border-radius:3px; padding:0 2px}
.tut-body-in.rte-area{min-height:220px}
.tut-inline-var{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.94em;
  padding:1px 4px; border-radius:4px; cursor:pointer; white-space:nowrap;
}
.tut-inline-var.ok{background:var(--accent-soft); color:var(--accent-ink)}
.tut-inline-var.unconfirmed{
  background:var(--warn-soft); color:var(--warn);
  border-bottom:1px dashed var(--warn);
}
.tut-badge{
  background:var(--hairline); color:var(--ink-soft); border-radius:20px;
  padding:1px 9px; font-size:11px;
}
.tut-badge.draft{background:var(--warn-soft); color:var(--warn)}
.tut-badge.warn{background:var(--warn-soft); color:var(--warn)}
.tut-skipped{margin:10px 0 14px; border:1px dashed var(--hairline); border-radius:9px; padding:9px 13px}
.tut-skipped summary{cursor:pointer; font-size:12.5px; color:var(--ink-soft)}
.tut-skipped li{font-size:12.5px; color:var(--ink-soft); margin:6px 0}
.tut-lessons{margin-top:26px; border-top:1px solid var(--hairline); padding-top:14px}
.tut-lessons h3{font-size:14px; margin:0 0 8px}
.tut-lessons li{font-size:13px; color:var(--ink-soft); margin-bottom:5px}
@media (max-width:820px){ .tut-layout{grid-template-columns:1fr} .tut-nav{position:static} }

/* ---------- hours overview ---------- */
.ov-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; margin-top:14px}
.ov-card{
  display:block; text-decoration:none; color:inherit; background:var(--panel);
  border:1px solid var(--hairline); border-radius:var(--radius); padding:18px 20px;
}
.ov-card:hover{border-color:var(--accent)}
.ov-head{display:flex; align-items:center; gap:10px}
.ov-head h2{margin:0; font-size:15px}
.ov-go{margin-left:auto; font-size:12px; color:var(--accent-ink); font-weight:600}
.ov-note{margin:6px 0 14px; font-size:12.5px; color:var(--ink-faint); line-height:1.5}
.ov-rows{display:flex; flex-direction:column}
.ov-row{
  display:grid; grid-template-columns:1fr auto; gap:2px 12px; align-items:baseline;
  padding:10px 0; border-top:1px solid var(--hairline);
}
.ov-l{font-size:12.5px; color:var(--ink-soft)}
.ov-v{font-family:var(--font-family-base); font-weight:700; font-size:15px; text-align:right}
.ov-sub{grid-column:1 / -1; font-size:11px; color:var(--ink-faint)}

/* ---------- board tile reordering ---------- */
.board-tile{cursor:grab}
body.reordering{cursor:grabbing; user-select:none}
body.reordering .board-tile{cursor:grabbing}
.board-placeholder{
  border:2px dashed var(--accent); border-radius:var(--radius);
  background:var(--accent-soft); opacity:.5;
}
.board-grip{
  position:absolute; top:14px; right:12px; color:var(--ink-faint);
  font-size:12px; letter-spacing:-1px; opacity:0;
}
.board-tile:hover .board-grip{opacity:1}
/* the pin: which boards your menu lists (the owner, 2026-10-19). Quiet until hovered or pinned. */
.board-pin{
  position:absolute; top:10px; right:8px; width:30px; height:30px; padding:0; display:grid; place-items:center;
  background:transparent; border:1px solid transparent; border-radius:var(--radius-sm); box-shadow:none;
  color:var(--ink-faint); cursor:pointer;
}
.board-pin svg{width:15px; height:15px}
.board-pin:hover{background:var(--color-bg-hover); color:var(--ink)}
.board-pin.on{color:var(--accent-ink)}
.board-pin + .board-grip{right:44px}
.board-pin ~ .head{padding-right:34px}
.board-tile.dragging{
  opacity:.9; transform:rotate(1.5deg); box-shadow:var(--shadow-drag);
  border-color:var(--accent);
}
.board-tile.drop-before{box-shadow:-3px 0 0 var(--accent)}
.board-tile.drop-after{box-shadow:3px 0 0 var(--accent)}

/* ---------- touch targets ---------- */
/* 13px checkboxes are unhittable with a thumb; enlarge on touch devices */
@media (pointer: coarse) {
  input[type=checkbox], input[type=radio]{width:24px; height:24px}
  .fb-done{width:24px; height:24px}
  /* the cell around a checkbox is padded so the comfortable tap area is ~44px,
     even though the control itself stays a sensible size */
  .fb-table td:first-child, #dev-table td:first-child, #inv-table td:first-child{
    padding:12px 10px;
  }
  .switch{padding:6px 2px}
  .switch{gap:9px}
  .tabs button, .tabs a.btn{min-height:38px}
  .ghost.small, button.small{min-height:34px}
  .drawer-nav a, .drawer-acclink, .drawer-boards a{min-height:40px}
  /* the accordion caret is a real control, so give it a real target */
  .acc-toggle{min-width:40px; min-height:40px; display:flex; align-items:center; justify-content:center}
  /* the role switcher scrolls sideways instead of stacking three rows deep */
  .role-switch{flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; padding:7px 12px}
  .rs-opts{flex-wrap:nowrap}
  .rs-note{display:none}
}

@media (max-width:820px){
  dialog[open]{width:min(96vw,860px); max-height:92vh}
  dialog.tcard[open]{width:96vw; max-height:94vh}
  .tc-head{padding:14px 44px 10px 14px}
  .tc-main{padding:14px}
  .tc-side{padding:14px}
  .tc-foot{padding:10px 14px}
}

/* ---------- client hub ---------- */
.client-head{
  display:flex; gap:16px; align-items:center; flex-wrap:wrap;
  background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius);
  padding:18px 20px; margin-bottom:8px;
}

.client-head h1{margin:0; font-size:19px; font-family:var(--font-family-base)}
.client-meta{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:6px; font-size:13px; color:var(--ink-soft)}
.client-meta .chip.off{background:var(--hairline); color:var(--ink-faint)}
.cl-section{margin-top:26px; scroll-margin-top:16px}
.cl-head{display:flex; align-items:center; gap:9px; margin-bottom:10px}
.cl-head h2{margin:0; font-size:14px}
.cl-empty{color:var(--ink-soft); font-size:13px; margin:0}
.cl-users{list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; font-size:13px}
.cl-future{color:var(--ink-soft); border-top:1px dashed var(--hairline); padding-top:18px}
/* Dashboard activity (rule 11e): the four parts of the section, each under a small heading */
/* Client dashboard usage: a row reads across, so on a phone the table scrolls rather than wrapping every cell */
.usage-table th, .usage-table td{white-space:nowrap}
.act-h{margin:18px 0 8px; font-size:12.5px; font-weight:600; color:var(--ink-soft)}

/* ---------- connectors ---------- */
.conn-head{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.conn-logo{
  width:40px; height:40px; border-radius:10px; display:grid; place-items:center; flex:none;
  background:var(--color-info-soft); color:var(--color-info-text); font-family:var(--font-family-base); font-weight:700; font-size:17px;
}
.conn-status{
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  padding:4px 10px; border-radius:99px; background:var(--hairline); color:var(--ink-faint);
}
.conn-status.on{background:var(--color-success-soft); color:var(--color-success-text)}
.pick-list{max-height:46vh; overflow-y:auto; display:flex; flex-direction:column; gap:4px; margin-top:6px}
.pick-row{
  display:flex; flex-direction:column; gap:2px; align-items:flex-start; text-align:left;
  background:var(--canvas); border:1px solid var(--hairline); color:var(--ink);
  padding:9px 11px; border-radius:8px; font-size:13px;
}
.pick-row:hover{border-color:var(--accent); background:var(--hairline)}
.conn-diag{
  background:var(--canvas); border:1px solid var(--hairline); border-radius:8px;
  padding:12px; font:11.5px/1.5 ui-monospace,SFMono-Regular,monospace; color:var(--ink-soft);
  white-space:pre-wrap; word-break:break-word; margin-top:10px; max-height:280px; overflow:auto;
}

/* ---------- fixed columns and the hours gate ---------- */
.kcol.fixed header{cursor:default}
.kcol.fixed .col-grip{font-size:10px}
.kcol.fixed:hover .col-grip{opacity:1}
.tc-hourwarn{
  background:var(--color-warning-soft); border:1px solid var(--color-warning-border); color:var(--color-warning-text); border-radius:8px;
  padding:10px 12px; font-size:12.5px; margin-bottom:14px; line-height:1.5;
}
.tc-hourwarn[hidden]{display:none}
.tc-hourwarn b{color:var(--color-highlight-text)}
/* Caption and its Excluded tick stay on one line. They used to wrap when the label was a
   few pixels too long ("Client design hours" + EXCLUDED), which made that caption two
   lines tall and dropped its input below its neighbour's. The label truncates instead —
   its full text is in the field's title. */
.field-cap{
  display:flex; align-items:center; gap:8px; flex-wrap:nowrap;
  font-size:11px; color:var(--ink-soft); margin-bottom:5px; font-weight:500;
  min-height:17px;
}
.field-cap .cap-text{
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0;
}
.field .excl{
  margin-left:auto; flex:0 0 auto; display:inline-flex; align-items:center; gap:5px; min-height:24px;
  white-space:nowrap;
  font-size:10px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--ink-faint); font-weight:700; cursor:pointer;
}
.field .excl input{width:14px; height:14px}
.field.hour-required.missing input[type=number]{border-color:var(--color-warning-border); background:var(--color-warning-soft)}
.field.hour-required.missing input[type=number]::placeholder{color:var(--color-highlight-text)}

/* ---------- client dashboard ---------- */
.portal-board{display:flex; gap:10px; overflow-x:auto; padding-bottom:6px}
.portal-col{
  flex:0 0 190px; background:var(--canvas); border:1px solid var(--hairline);
  border-radius:10px; padding:9px; display:flex; flex-direction:column; gap:6px;
}
.portal-col header{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; font-weight:700;
  color:var(--ink-faint); display:flex; gap:6px; align-items:center;
}
.portal-col header span{background:var(--hairline); border-radius:99px; padding:0 6px; font-size:10px}
.portal-card{background:var(--panel); border:1px solid var(--hairline); border-radius:8px; padding:9px}
.portal-card.done{filter:saturate(.35)}
.portal-card.done :is(.field-note, small){color:var(--ink-soft)}
.portal-card .title{font-size:12.5px; font-weight:600; line-height:1.35}
.portal-card .where{font-size:10.5px; color:var(--ink-faint); margin-top:3px}
.portal-card .figs{display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; font-size:11px; color:var(--ink-soft)}
.portal-empty{font-size:11px; color:var(--ink-faint); text-align:center; padding:6px}
/* columns whose contents are derived from payment state, not drag and drop */
.kcol.derived{opacity:.92}
.kcol.derived .cards{min-height:20px}
.kcol.derived .addcard{display:none}

/* board tiles are divs now, so they need the affordances an anchor had */
.board-tile{cursor:pointer}
.board-tile:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

/* Completed reads as the finish line */
.kcol[data-role="completed_invoice"]{
  background:linear-gradient(180deg, var(--color-success-soft) 0%, var(--panel) 220px);
  border-color:var(--color-success-border);
}
.kcol[data-role="completed_invoice"] header{background:var(--color-success-soft); border-bottom-color:var(--color-success-border)}
.kcol[data-role="completed_invoice"] .colname{color:var(--color-money-text)}

/* looking at a client's own view */
.client-view-note{
  background:var(--color-info-soft); border:1px solid var(--color-info-border); color:var(--color-info-text); border-radius:8px;
  padding:9px 12px; font-size:12.5px; margin-bottom:14px;
}
.client-view-note[hidden]{display:none}
.kcol.done header{background:var(--color-success-soft); border-bottom-color:var(--color-success-border)}
.kcol.done .colname{color:var(--color-money-text)}
.portal-link{display:flex; gap:8px; align-items:center}
.portal-link input{font-family:ui-monospace,SFMono-Regular,monospace; font-size:12px}
/* MM Connect on the client page */
.mmc-chips{display:flex; flex-wrap:wrap; gap:4px; margin-top:2px}
.mmc-warn{font-size:11.5px; color:var(--warn); background:var(--warn-soft); border-radius:6px; padding:1px 7px}
.mmc-connect{border:1px solid var(--accent); border-radius:10px; padding:14px 16px; margin-bottom:18px}
/* MM Connect → Products: the two 24-hour windows MM Core keeps, each a line with its state and its one button */
.mmc-products{margin-top:10px; padding:14px 16px; font-size:13px; line-height:1.6}
.mmc-prow{display:flex; align-items:center; justify-content:space-between; gap:6px 12px; flex-wrap:wrap; padding:6px 0}
.mmc-prow-what{display:flex; align-items:center; gap:4px 8px; flex-wrap:wrap; min-width:0}
/* a client's connections at a glance (public/assets/connection-status.js): a dot and a word,
   the full text and the fix on hover; on the client page the same text is written out */
.conn-icons{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px}
.conn-icon{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; line-height:1.4; padding:2px 9px;
  border-radius:99px; background:var(--hairline); color:var(--ink-soft); cursor:help}
.conn-icon b{font-weight:600; color:var(--ink)}
.conn-dot{width:8px; height:8px; border-radius:50%; flex:none; background:var(--ink-faint)}
.conn-icon.ok{background:var(--color-success-soft)} .conn-icon.ok .conn-dot{background:var(--color-success-text)} .conn-icon.ok b{color:var(--color-success-text)}
.conn-icon.warn{background:var(--warn-soft)} .conn-icon.warn .conn-dot{background:var(--warn)} .conn-icon.warn b{color:var(--warn)}
.conn-icon.bad{background:var(--danger-soft)} .conn-icon.bad .conn-dot{background:var(--danger)} .conn-icon.bad b{color:var(--danger)}
.conn-detail{margin:0 0 12px; font-size:12.5px; line-height:1.55}
.conn-detail .conn-how{white-space:pre-line; color:var(--ink-soft); margin-top:4px}

/* ---------- client shell ----------
   The client surface is a dashboard of its own: left sidebar, sectioned content. It shares
   the palette with the internal tool and nothing else — these classes are used only by
   client-dashboard, client-board and client-feedback, and never name an internal page. */
:root{--cdrawer-w:224px}
body.client-shell .app-main{margin-left:var(--cdrawer-w)}

.cdrawer{
  position:fixed; inset:0 auto 0 0; width:var(--cdrawer-w); z-index:40;
  display:flex; flex-direction:column;
  background:var(--chrome); border-right:1px solid var(--hairline);
}
/* an admin previewing a client user: the preview bar sits on top, the sidebar starts below it */
body.client-previewing .cdrawer{top:var(--preview-h, 0px)}
.cdrawer-scrim{display:none}
/* the product the dashboard is part of, above the client's own name (the owner, 2026-10-19) */
.cnav-core{
  padding:14px 16px 0; color:var(--ink); white-space:nowrap;
  font-family:var(--font-family-base); font-weight:var(--font-weight-bold); font-size:13px; letter-spacing:-.01em;
}
.cnav-brand{
  display:flex; align-items:center; gap:9px; padding:15px 16px; text-decoration:none;
  border-bottom:1px solid var(--hairline); color:var(--ink);
  font-family:var(--font-family-base); font-weight:700; font-size:13.5px;
}

.cnav-brand span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.cnav-list{flex:1; overflow-y:auto; padding:10px 8px}
.cnav-item{
  display:flex; align-items:center; gap:10px; padding:8px 10px; margin-bottom:1px;
  border-radius:var(--radius-sm); color:var(--ink-soft); text-decoration:none; font-size:var(--font-size-sm); font-weight:var(--font-weight-medium);
}
.cnav-item .i{color:var(--ink-faint); font-size:12px; width:14px; text-align:center}
.cnav-item:hover{background:var(--color-bg-hover); color:var(--ink)}
/* the active section as in our own menu: raised, semibold, the accent on its icon */
.cnav-item.on{background:var(--raised); color:var(--ink); font-weight:var(--font-weight-semibold); box-shadow:var(--shadow-card)}
.cnav-item.on .i{color:var(--accent)}
.cnav-subs{margin:0 0 6px 22px; display:flex; flex-direction:column}
.cnav-sub{
  display:flex; align-items:center; gap:7px; padding:5px 9px; border-radius:7px;
  color:var(--ink-faint); text-decoration:none; font-size:12.5px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cnav-sub:hover{color:var(--ink); background:var(--color-bg-hover)}
.cnav-sub.on{color:var(--ink); background:var(--raised); font-weight:var(--font-weight-semibold)}
.cnav-sub .cdot{
  width:7px; height:7px; border-radius:2px; flex:0 0 auto;
  background:var(--strip,var(--hairline));
}
/* a section that is coming (the 24h emergency AI developer, 2027): its year beside its name, and its page */
.cnav-soon{margin-left:auto; font-size:10px; font-weight:600; padding:1px 6px; border-radius:99px; background:var(--accent-soft); color:var(--accent-ink)}
.chip.soon{margin-left:10px; align-self:center}
.soon-panel p{margin:0 0 10px; max-width:62ch}
.soon-lead{font-size:16px; font-weight:600}
.cnav-count{
  margin-left:auto; font-size:10.5px; font-weight:600; padding:1px 6px;
  border-radius:20px; background:var(--danger-soft); color:var(--danger);
}
/* Sections fold like ours: the label navigates, only the caret toggles. */
.cnav-acc{display:flex; flex-direction:column}
.cnav-accrow{display:flex; align-items:center; gap:2px}
.cnav-accrow .cnav-item{flex:1; min-width:0}
.cnav-acc.closed .cnav-subs{display:none}
.cnav-acc.closed .acc-toggle{transform:rotate(-90deg)}
.cnav-foot{padding:12px 14px; border-top:1px solid var(--hairline); display:flex;
  flex-direction:column; align-items:flex-start; gap:7px}
.cnav-actions{display:flex; gap:6px; align-items:stretch; align-self:stretch}
.cnav-actions #csignout{flex:1}
.cnav-who{font-size:12px; color:var(--ink-faint)}
.cnav-back{font-size:12px; color:var(--accent-ink); text-decoration:none; display:inline-flex; align-items:center; min-height:24px}
.cnav-toggle{display:none}

.chead{
  display:flex; align-items:center; gap:9px;
  min-height:56px; padding:10px 22px; border-bottom:1px solid var(--hairline); background:var(--chrome);
}
.chead-logo{
  width:26px; height:26px; border-radius:6px; object-fit:cover;
  background:var(--hairline); flex:0 0 auto;
}
.chead-name{
  font-family:var(--font-family-base); font-weight:700; font-size:13.5px;
  color:var(--ink); text-decoration:none; display:inline-flex; align-items:center; min-height:24px;
}
.chead-sep{color:var(--ink-faint)}
.chead-crumb{font-size:13.5px; color:var(--ink-soft)}
/* a person with several clients moves between their dashboards here (client-app.js) */
.chead-switch{width:auto; max-width:200px; font-size:12.5px; padding:4px 8px}
.chead-spacer{flex:1}
.chead-back{font-size:12.5px; color:var(--accent-ink); text-decoration:none; white-space:nowrap}

.cl-more{font-size:12.5px; color:var(--accent-ink); text-decoration:none; display:inline-flex; align-items:center; min-height:24px}

/* ---- the client Overview, their turn first (0.4.0, option A of the client dashboard review) ---- */
.cov-head{display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; margin:4px 0 14px}
.cov-head .field-note{font-size:12.5px; margin:0}
/* what waits on them: the one block with the accent edge, a row per thing and its button */
.cov-turn{background:var(--panel); border:1px solid var(--color-success-border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow-card)}
.cov-turn.calm{border-color:var(--hairline)}
.cov-turn-head{display:flex; align-items:center; gap:16px}
.cov-turn-head h2{margin:0; font-size:16px}
.cov-turn-head p{margin:2px 0 0; font-size:13px; color:var(--ink-soft)}
.cov-turn-n{font-size:36px; font-weight:700; line-height:1; color:var(--accent-ink); font-variant-numeric:tabular-nums; min-width:28px}
.cov-turn.calm .cov-turn-n{color:var(--ink-faint)}
.cov-turn-rows{display:flex; flex-direction:column; gap:8px; margin-top:14px}
.cov-turn-row{display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; background:var(--raised); border-radius:10px; padding:11px 14px}
.cov-turn-main{flex:1 1 240px; min-width:0}
.cov-turn-title{font-size:14px; font-weight:600; overflow-wrap:anywhere}
.cov-turn-meta{font-size:12px; color:var(--ink-faint)}
.cov-kind{font-size:var(--font-size-xxs); font-weight:700; letter-spacing:.05em; text-transform:uppercase; border-radius:6px; padding:3px 8px; min-width:64px; text-align:center}
.cov-kind.quote{background:var(--warn-soft); color:var(--warn)}
.cov-kind.review{background:var(--accent-soft); color:var(--accent-ink)}
.cov-kind.feedback{background:var(--color-feedback-soft); color:var(--color-feedback-text)}
/* where the work is: one cell per stage, the two that wait on them outlined */
.cov-stages{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(118px, 1fr)); gap:8px}
.cov-stage{background:var(--panel); border:1px solid var(--hairline); border-top:3px solid var(--hairline); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; min-width:0}
.cov-stage b{font-size:21px; font-variant-numeric:tabular-nums}
.cov-stage span{font-size:12px; color:var(--ink-soft)}
.cov-stage.client{border-top-color:var(--color-status-client)}
.cov-stage.todo{border-top-color:var(--color-status-todo)}
.cov-stage.working{border-top-color:var(--color-status-working)}
.cov-stage.done{border-top-color:var(--color-status-done)}
.cov-stage.yours{background:var(--accent-soft); border-color:var(--accent); border-top-color:var(--accent)}
/* the work in motion beside the hours and their requests; one column on a phone */
.cov-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:14px; margin-top:26px; align-items:start}
.cov-col{display:flex; flex-direction:column; gap:14px; min-width:0}
.cov-card{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:16px 18px; box-shadow:var(--shadow-card); min-width:0}
.cov-card h2{font-size:14px; margin:0 0 8px}
.cov-card .cl-head h2{margin:0}
.cov-card .hours-tot{margin:4px 0 8px; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px}
.cov-card .hours-tot .box{min-width:0; padding:10px 12px}
.cov-grid + .cov-card{margin-top:14px}
.cov-row{display:flex; align-items:flex-start; gap:10px; padding:9px 2px; border-top:1px solid var(--hairline); text-decoration:none; color:var(--ink); min-height:24px}
.cov-row:hover .cov-row-title{color:var(--accent-ink)}
.cov-row-main{flex:1; min-width:0; display:flex; flex-direction:column}
.cov-row-title{font-size:13.5px; overflow-wrap:anywhere}
.cov-row-meta{font-size:12px; color:var(--ink-faint)}
.cov-row-side{font-size:12px; color:var(--ink-soft); white-space:nowrap; font-variant-numeric:tabular-nums}
.cov-dot{width:8px; height:8px; border-radius:50%; margin-top:6px; flex:none; background:var(--ink-faint)}
.cov-dot.todo{background:var(--color-status-todo)}
.cov-dot.working{background:var(--color-status-working)}
.cov-dot.client{background:var(--color-status-client)}
.cov-req{color:var(--color-status-client)}
/* the store at a glance (performance-report.js storeGlanceHtml) */
.sg-period{margin:0}
.sg-line{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:4px}
.sg-sum{font-size:13px; color:var(--ink-soft); margin-right:2px}
.sg-chip{display:inline-flex; align-items:center; gap:5px; min-height:30px; padding:0 11px; border-radius:99px; background:var(--raised); color:var(--ink); font-size:12px; text-decoration:none}
.sg-chip:hover{background:var(--hairline)}
.sg-high{color:var(--danger); font-weight:600}
.sg-none{color:var(--ink-faint)}
@media (max-width:640px){
  .cov-turn{padding:14px}
  .cov-turn-row .btn{flex:1 1 100%; text-align:center; min-height:40px; display:inline-flex; align-items:center; justify-content:center}
  .cov-stages{grid-template-columns:repeat(2, minmax(0, 1fr))}
}

.cbar{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px}
.cpicker{
  display:flex; align-items:center; gap:9px; margin-bottom:14px;
  font-size:13px; color:var(--ink-soft);
}
.cfb-row{
  background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius);
  padding:13px 15px; margin-bottom:10px;
}
.cfb-row.done{color:var(--ink-faint); filter:saturate(.35)}
.cfb-top{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:7px}
.cfb-where{font-size:12px; color:var(--ink-faint)}
.cfb-desc{font-size:14px; line-height:1.5}
.cfb-desc p{margin:0 0 7px}
.cfb-desc :last-child{margin-bottom:0}
.cfb-dialog textarea{width:100%; font:inherit; background:var(--canvas);
  color:var(--ink); border:1px solid var(--hairline); border-radius:8px; padding:9px}

@media (max-width:900px){
  body.client-shell .app-main{margin-left:0}
  .cdrawer{transform:translateX(-100%); transition:transform .18s ease}
  body.cnav-open .cdrawer{transform:none}
  body.cnav-open .cdrawer-scrim{display:block; position:fixed; inset:0; z-index:35;
    background:rgba(0,0,0,.5)}
  .cnav-toggle{
    display:inline-flex; align-items:center; justify-content:center;
    width:32px; height:32px; flex:0 0 auto; border-radius:8px; cursor:pointer;
    background:var(--canvas); color:var(--ink); border:1px solid var(--hairline);
  }
  .chead{padding:11px 14px}
}

/* client board: the mirror. Their own requests column and their own cards are marked,
   because "can I change this?" must be answerable at a glance. */
.kcol.requests header .colname{color:var(--role-client)}
.kcard.mine{border-left:3px solid var(--role-client)}
.kcard-mine{
  display:inline-block; font-size:10px; font-weight:600; letter-spacing:.03em;
  text-transform:uppercase; color:var(--role-client); margin-bottom:3px;
}
.cfb-chip{
  display:inline-block; margin-left:6px; font-size:10.5px; padding:1px 6px;
  border-radius:20px; background:var(--warn-soft); color:var(--warn);
}
.ctask-dialog textarea{width:100%; font:inherit; background:var(--canvas);
  color:var(--ink); border:1px solid var(--hairline); border-radius:8px; padding:9px}
.ctask-dialog .tc-foot{display:flex; align-items:center; gap:9px}
.cboard-bar{padding:14px 22px 0}
.ct-name{font-family:var(--font-family-base); font-size:15px; font-weight:600; line-height:1.3}
.ct-note{
  margin:14px 0 0; padding:9px 12px; border-radius:8px; font-size:12.5px;
  background:var(--canvas); border:1px solid var(--hairline); color:var(--ink-soft);
}

/* Internal topbar on a phone.
   Three attempts taught the lesson: squeezing a desktop toolbar into 390px either wraps
   it into 140px of chrome or shrinks the search box to 22px. So nothing shrinks — the bar
   scrolls sideways instead, every control keeps its usable size, and the board name is
   the only thing that truncates. */
@media (max-width:760px){
  .topbar{
    flex-wrap:nowrap; gap:9px;
    /* the 60px keeps clear of the fixed drawer toggle — this rule comes after the
       900px block, so it has to restate it or the toggle covers the page name */
    padding:9px 14px 9px 60px;
    overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
    /* the scroll has to show: a shadow at the edge while more controls sit past it (QA
       2026-10-10: Add feedback and Statuses were off-screen with nothing saying so). The
       panel-coloured cover scrolls with the content and hides the shadow at the very end. */
    background:
      linear-gradient(to left, var(--chrome) 40%, transparent) right center / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 100% 50%, rgba(255,255,255,.16), transparent) right center / 14px 100% no-repeat scroll,
      var(--chrome);
  }
  .topbar::-webkit-scrollbar{display:none}
  .topbar > *{flex:0 0 auto}
  .topbar .brand, .topbar .sep, .topbar .who{display:none}  /* the drawer already says both */
  .topbar .spacer{display:none}
  .topbar #crumb, .topbar .crumb, .topbar #bname{
    max-width:46vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    font-weight:600;
  }
  .topbar .bsearch{flex:0 0 auto}
  .topbar input[type="text"], .topbar #bsearch{width:150px}
  .topbar .btn, .topbar button, .topbar a.btn{white-space:nowrap}
}

/* connected services cards (Claude, GitHub, Figma) */
.cx-card{
  border:1px solid var(--hairline); border-radius:var(--radius);
  padding:14px 16px; margin-bottom:12px; background:var(--canvas);
}
.cx-card:last-child{margin-bottom:0}
.cx-card .field{margin-top:10px}
.conn-status.good{color:var(--accent-ink); border-color:var(--accent)}
.conn-status.bad{color:var(--danger); border-color:var(--danger)}

/* Requests waiting on us get their own line on a board tile: mixed in with the stage
   counts they read as one more number, when they are the thing that needs an answer. */
.bstat-new{
  display:flex; align-items:center; gap:6px; margin-top:8px;
  padding:6px 10px; border-radius:8px; font-size:12px;
  background:color-mix(in srgb, var(--role-client) 16%, transparent);
  color:var(--role-client); border:1px solid color-mix(in srgb, var(--role-client) 45%, transparent);
}
.bstat-new b{font-size:13px}

/* the client's original request, and the card history */
.client-request{
  font-size:13.5px; line-height:1.5; padding:11px 13px; border-radius:8px;
  background:color-mix(in srgb, var(--role-client) 9%, var(--canvas));
  border-left:3px solid var(--role-client);
}
.client-request p{margin:0 0 7px}
.client-request :last-child{margin-bottom:0}
.t-history{display:flex; flex-direction:column; gap:2px; max-height:280px; overflow-y:auto}
.t-ev{display:flex; gap:8px; padding:5px 0; font-size:12px}
.t-ev-dot{
  width:7px; height:7px; border-radius:99px; margin-top:5px; flex:0 0 auto;
  background:var(--ink-faint);
}
.t-ev.client .t-ev-dot{background:var(--role-client)}
.t-ev-line{color:var(--ink-soft); line-height:1.4}
.t-ev-line b{color:var(--ink)}
.t-ev-when{color:var(--ink-faint); font-size:11px; margin-top:1px}

/* a quote waiting on the client */
.kcard-approve{
  display:inline-block; font-size:10px; font-weight:600; letter-spacing:.03em;
  text-transform:uppercase; color:var(--accent-ink); margin-bottom:3px;
}
/* the quote, read before anything else on its card (0.5.0): the split, the total, the price,
   and the one button that accepts it */
.quote-box{
  display:flex; flex-direction:column; gap:10px; margin:0 0 14px;
  padding:14px 16px; border-radius:var(--radius);
  background:var(--panel); border:1px solid var(--color-warning-border);
}
.quote-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.quote-lines{display:flex; flex-direction:column; gap:4px; max-width:340px}
.quote-lines > div{display:flex; justify-content:space-between; gap:12px; font-size:13px; color:var(--ink-soft); font-variant-numeric:tabular-nums}
.quote-lines .quote-total{color:var(--ink); font-weight:600; border-top:1px solid var(--hairline); padding-top:6px; margin-top:2px}
.quote-lines .quote-price span:last-child{font-size:18px; font-weight:700; color:var(--color-money-text)}
.quote-box .field-note{margin:0; font-size:12px}
.quote-box #ct-approve{align-self:flex-start}

/* ---- the client board (0.5.0): their steps outlined, empty steps folded, a list on a phone ---- */
.cjump{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px}
.cjump .field-note{margin:0; font-size:12px}
.jump-chip{background:var(--accent-soft); color:var(--accent-ink); border:1px solid var(--accent); border-radius:99px; padding:4px 12px; font-size:var(--font-size-xs); min-height:30px}
.jump-chip b{margin-left:4px}
.kcol.yours{border-color:var(--accent); background:var(--accent-soft)}
.kcol-yours{margin-left:auto; font-size:var(--font-size-xxs); font-weight:700; color:var(--accent-ink); text-transform:uppercase; letter-spacing:.04em}
.kcol.folded{width:46px; align-items:center; gap:8px; padding:12px 0; border-style:dashed; color:var(--ink-faint)}
.kcol.folded .count{font-size:11px}
.kcol-vname{writing-mode:vertical-rl; transform:rotate(180deg); font-size:12px; white-space:nowrap}
.kcard-act{margin-top:8px; width:100%}
.board-scroll.as-list{flex-direction:column; align-items:stretch; overflow-x:hidden; overflow-y:auto; cursor:default; max-width:880px}
.board-scroll.as-list .kcol{width:auto; max-height:none}
.board-scroll.as-list .kcol .cards{overflow:visible}
.kcol-empties{margin:0 2px 12px; font-size:12px}
/* the Hours section: the three totals as the cycle they belong to (0.5.0) */
.hours-cycle{list-style:none; margin:0 0 6px; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:10px}
.hours-cycle li{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:12px 15px; display:flex; flex-direction:column; gap:2px; min-width:0}
.hours-cycle li.now{background:var(--accent-soft); border-color:var(--accent)}
.hc-step{font-size:12px; font-weight:600; color:var(--ink-soft)}
.hours-cycle li.now .hc-step{color:var(--accent-ink)}
.hours-cycle b{font-size:22px; font-variant-numeric:tabular-nums}
.hc-note{font-size:12px; color:var(--ink-faint)}
/* Performance: what to fix first, split by who does it (0.6.0, performance-report.js fixFirstHtml) */
.ff{background:var(--panel); border:1px solid var(--color-success-border); border-radius:var(--radius); padding:16px 18px; margin:0 0 14px; box-shadow:var(--shadow-card)}
.ff-head{display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; margin-bottom:12px}
.ff-head h2{margin:0; font-size:16px}
.ff-head .field-note{margin:0; font-size:12.5px}
.ff-sides{display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:12px; align-items:start}
.ff-side{background:var(--raised); border-radius:10px; padding:12px 14px; min-width:0}
.ff-side h3{margin:0 0 6px; font-size:13.5px}
.ff-n{color:var(--ink-faint); font-weight:400}
.ff-list{list-style:none; margin:0; padding:0}
.ff-row{display:flex; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--hairline); font-size:13.5px}
.ff-row span{flex:1; min-width:0; overflow-wrap:anywhere}
.ff-ask{margin-top:10px}
/* AI search: the question first, answered (0.6.0, ai-search-view.js verdictHtml) */
.ais-verdict{display:flex; flex-wrap:wrap; align-items:center; gap:12px 22px; background:var(--panel); border:1px solid var(--color-warning-border); border-radius:var(--radius); padding:16px 18px; margin:0 0 14px; box-shadow:var(--shadow-card)}
.ais-verdict.some{border-color:var(--color-success-border)}
.ais-verdict-n{font-size:36px; font-weight:700; line-height:1; color:var(--warn); font-variant-numeric:tabular-nums}
.ais-verdict.some .ais-verdict-n{color:var(--accent-ink)}
.ais-verdict-n span{font-size:16px; font-weight:600; color:var(--ink-soft)}
.ais-verdict-main{flex:1 1 320px; min-width:0}
.ais-verdict-main h3{margin:0; font-size:16px}
.ais-verdict-main p{margin:3px 0 0; font-size:13px; color:var(--ink-soft)}
.ais-verdict-go{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.ais-why{display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:12px; margin:0 0 12px; align-items:start}
.ais-why-card{background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:14px 16px; min-width:0}
.ais-why-head{display:flex; align-items:center; gap:10px; margin-bottom:8px}
.ais-why-head h3{margin:0; font-size:14px; flex:1}
.ais-why-head .linklike{min-height:24px}
.ais-why-chips{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px}
.ais-why-chip{font-size:12.5px; background:var(--raised); border-radius:99px; padding:4px 11px}
.ais-why-list{list-style:none; margin:0; padding:0}
.ais-why-list li{display:flex; flex-wrap:wrap; gap:4px 10px; padding:6px 0; border-top:1px solid var(--hairline); font-size:13px}
.ais-why-list li span:first-child{flex:1; min-width:0; overflow-wrap:anywhere}
.ais-why-todo{background:var(--panel); border:1px solid var(--color-success-border); border-radius:var(--radius); padding:14px 16px; margin:0 0 14px}
.ais-why-todo h3{margin:0 0 6px; font-size:14px}
/* Settings: the team, added on the page (0.6.0) */
.team-empty{display:flex; flex-direction:column; gap:2px; background:var(--panel); border:1px solid var(--hairline); border-radius:10px; padding:12px 14px; margin:0 0 12px; font-size:13px; color:var(--ink-soft)}
.team-empty b{color:var(--ink); font-size:14px}
.team-add{display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; align-items:end; margin:0 0 14px}
.team-add label{display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--ink-soft)}
.team-add button{min-height:40px}
.team-link{display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; background:var(--panel); border:1px solid var(--hairline); border-radius:var(--radius); padding:14px 16px}
.team-link > div{flex:1 1 300px; min-width:0}
.team-link h2{margin:0 0 2px; font-size:14px}
.team-link code{font-size:12.5px; background:var(--input-bg); border:1px solid var(--hairline); border-radius:8px; padding:7px 10px; overflow-wrap:anywhere; max-width:100%}

/* ---- feedback listing: scrolls sideways, but the controls stay put ----
   The sheet is wide and the two things you act on — the status and Open — are at the far
   right. Scrolling them off screen means scrolling back for every row, so they are
   pinned to the right edge while everything else moves under them. */
.fb-scroll{overflow-x:auto; overscroll-behavior-x:contain}
.fb-scroll .fb-table{min-width:1180px}
/* The status column pins next to the actions column, so the offset has to be that
   column's width — hard-coding it made status sit on top of Related card wherever the
   actions column was a different size. */
.fb-table{--fb-act-w:52px}
.fb-table th:nth-last-child(2), .fb-table td:nth-last-child(2){
  position:sticky; right:var(--fb-act-w); z-index:2; background:var(--panel);
  box-shadow:-8px 0 8px -8px rgba(0,0,0,.55);
}
.fb-table th:last-child, .fb-table td:last-child{
  position:sticky; right:0; z-index:2; background:var(--panel);
}
/* Pinning is for our sheet, where the status control has to stay reachable. The client
   sheet has no control to reach, and pinned columns cover Related card whenever the table
   is wider than its box — so there it stays a plain table that simply scrolls. */
.fb-table.fb-plain th, .fb-table.fb-plain td{position:static; box-shadow:none}
/* the client's sheet opens no row (its long text opens in place with "More"): no hand cursor over it */
.fb-table.fb-plain .fb-row, .fb-table.fb-plain .fb-id, .fb-table.fb-plain .fb-status{cursor:default}

.fb-table tbody tr:hover td:nth-last-child(2),
.fb-table tbody tr:hover td:last-child{background:var(--canvas)}
.fb-group td{position:static !important}
.fb-when{white-space:nowrap; font-size:12px}
.fb-when-sub{color:var(--ink-faint); font-size:11px; margin-top:2px}
.fb-link{color:var(--accent-ink); text-decoration:none; white-space:nowrap}
.fb-link:hover{text-decoration:underline}
.fb-more{background:none; border:0; padding:0 0 0 4px; color:var(--accent-ink); font:inherit; font-size:12px; cursor:pointer}
.fb-more:hover{text-decoration:underline}

/* history inside an open feedback */
.fb-history{display:flex; flex-direction:column; gap:2px; margin-top:6px}

/* history accordion — closed until asked for */
.hist-acc{border-top:1px solid var(--hairline); margin-top:10px; padding-top:8px}
.hist-acc > summary{
  display:flex; align-items:center; gap:7px; cursor:pointer; list-style:none;
  font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-faint); padding:3px 0;
}
.hist-acc > summary::-webkit-details-marker{display:none}
.hist-acc > summary:hover{color:var(--ink-soft)}
.hist-caret{display:inline-block; transition:transform .15s ease; font-size:13px}
.hist-acc[open] > summary .hist-caret{transform:rotate(90deg)}
.hist-n{
  margin-left:auto; font-size:10.5px; letter-spacing:0; padding:1px 7px;
  border-radius:20px; background:var(--hairline); color:var(--ink-soft);
}
.hist-acc[open] .t-history{margin-top:6px}

/* the client's own view of an approval, and their feedback CTA */
.approved-note{
  margin-top:14px; padding:10px 13px; border-radius:8px; font-size:13px;
  background:var(--accent-soft); color:var(--accent-ink);
}
.cfb-cta{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:14px;
  padding:12px 15px; border-radius:var(--radius);
  background:var(--canvas); border:1px solid var(--hairline);
}
.cfb-cta > div{flex:1; min-width:180px}

/* ---- client dashboard: what needs their attention ---- */
.cfb-confirm{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:9px;
  padding:8px 11px; border-radius:8px; font-size:12.5px;
  background:var(--canvas); border:1px solid var(--hairline);
}
.cfb-confirm span{flex:1; min-width:150px; color:var(--ink-soft)}

/* a task name in the client's hours tables is a way into the card.
   /t/<id> resolves per viewer, so the same href works for us and for them. */
.hours-task{color:var(--ink); text-decoration:none}
.hours-task:hover{color:var(--accent-ink); text-decoration:underline}

/* client feedback file: two tabs over the same sheet layout we use internally */
.tab-n{
  margin-left:6px; font-size:10.5px; padding:1px 6px; border-radius:20px;
  background:rgba(255,255,255,.12);
}
.fb-internal-note{
  margin-bottom:14px; padding:11px 14px; border-radius:var(--radius); font-size:13px;
  line-height:1.5; color:var(--ink-soft);
  background:var(--canvas); border:1px solid var(--hairline); border-left:3px solid var(--ink-faint);
}
.fb-internal-note b{color:var(--ink)}

/* ---- cards from a mockup ---- */
.mk-dialog{width:min(980px,96vw)}
.mk-drop{
  border:2px dashed var(--hairline); border-radius:var(--radius); padding:26px 20px;
  text-align:center; transition:border-color .15s ease, background .15s ease;
}
.mk-drop.over{border-color:var(--accent); background:var(--accent-soft)}
.mk-drop p{margin:0 0 5px}
.mk-preview{
  display:block; max-width:100%; max-height:320px; margin:14px auto 0;
  border-radius:8px; border:1px solid var(--hairline);
}
.mk-card{
  border:1px solid var(--hairline); border-radius:var(--radius); padding:13px 15px;
  margin-bottom:12px; background:var(--canvas);
}
.mk-card-head{display:flex; align-items:center; gap:9px; margin-bottom:10px}
.mk-n{
  width:22px; height:22px; flex:0 0 auto; border-radius:99px; font-size:11px; font-weight:600;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent-soft); color:var(--accent-ink);
}
.mk-title{flex:1; font-weight:600}
.mk-card textarea, .mk-dialog textarea{
  width:100%; font:inherit; font-size:12.5px; line-height:1.5;
  background:var(--panel); color:var(--ink);
  border:1px solid var(--hairline); border-radius:8px; padding:9px;
}
.mk-lesson{
  display:flex; gap:10px; align-items:flex-start; padding:9px 11px; border-radius:8px;
  background:var(--canvas); border:1px solid var(--hairline); margin-bottom:7px; font-size:13px;
}
.mk-lesson.off{color:var(--ink-faint); filter:saturate(.35)}
.mk-lesson-w{
  font-size:10.5px; padding:1px 7px; border-radius:20px; flex:0 0 auto;
  background:var(--hairline); color:var(--ink-soft);
}

/* count on a card sidebar button */
.tc-sidecount{
  margin-left:auto; font-size:10.5px; padding:1px 7px; border-radius:20px;
  background:var(--hairline); color:var(--ink-soft);
}


/* ---- requests & to-dos: the backlog this tool is built from ---- */
.rq-filters{display:flex; gap:8px; flex-wrap:wrap; margin:14px 0}
.rq-filters button{background:transparent; border:1px solid var(--hairline); color:var(--ink-soft)}
.rq-filters button.on{background:var(--accent); border-color:var(--accent); color:var(--on-accent)}
.rq-row{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; cursor:pointer;
  padding:11px 13px; margin-bottom:7px; border-radius:var(--radius);
  background:var(--canvas); border:1px solid var(--hairline); border-left:3px solid var(--hairline);
}
.rq-row:hover{border-color:var(--accent)}
.rq-new{border-left-color:var(--accent)}
.rq-in_progress{border-left-color:var(--role-collaborator)}
.rq-waiting{border-left-color:var(--danger)}
.rq-done{border-left-color:var(--hairline); color:var(--ink-faint); filter:saturate(.35)}
.rq-ref{font-family:ui-monospace,monospace; font-size:11.5px; color:var(--accent-ink)}
.rq-ref.todo{color:var(--role-collaborator)}
.rq-title{font-size:13.5px; color:var(--ink)}
.rq-pri{font-size:10px; font-weight:700; text-transform:uppercase; color:var(--danger)}
.rq-meta{font-size:11px; color:var(--ink-faint)}
.rq-wait{
  font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  padding:1px 7px; border-radius:20px; background:var(--danger-soft); color:var(--danger);
}
.rq-status{font-size:11.5px; color:var(--ink-soft)}
.rq-dialog textarea, .rq-dialog input{width:100%; font:inherit; background:var(--canvas);
  color:var(--ink); border:1px solid var(--hairline); border-radius:8px; padding:9px}
.rq-drop{
  border:1px dashed var(--hairline); border-radius:var(--radius); padding:16px;
  text-align:center; font-size:12.5px; color:var(--ink-soft);
}
.rq-drop.on{border-color:var(--accent); background:var(--accent-soft)}
.rq-shots{display:flex; flex-wrap:wrap; gap:10px; margin-top:11px}
.rq-shot{margin:0; width:190px}
.rq-shot img{
  width:100%; border-radius:8px; border:1px solid var(--hairline); display:block;
  background:var(--canvas);
}
.rq-shot figcaption{
  display:flex; align-items:center; gap:6px; justify-content:space-between;
  font-size:10.5px; color:var(--ink-faint); margin-top:4px;
}
.rq-comments{display:flex; flex-direction:column; gap:8px; margin-bottom:10px}
.rq-comment{padding:9px 11px; border-radius:8px; background:var(--canvas);
  border:1px solid var(--hairline); font-size:13px}
.rq-comment.waiting{border-color:var(--danger)}
.rq-comment-by{display:flex; align-items:center; gap:8px; font-size:11.5px;
  color:var(--ink-soft); margin-bottom:4px}

/* the queue: what Claude picks up next, and in what order */
.rq-queue{
  margin:14px 0; padding:14px 16px; border-radius:var(--radius);
  background:var(--accent-soft); border:1px solid var(--accent);
}
.rq-queue-head h3{margin:0 0 3px; font-size:14px; color:var(--accent-ink)}
.rq-queue-head .field-note{display:block; margin-bottom:9px}
.rq-q{
  display:flex; align-items:center; gap:9px; padding:8px 11px; margin-bottom:5px;
  border-radius:8px; background:var(--panel); border:1px solid var(--hairline);
}
.rq-q:last-child{margin-bottom:0}
.rq-q-n{
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
  width:21px; height:21px; border-radius:99px; font-size:11px; font-weight:700;
  background:var(--accent); color:var(--on-accent);
}
.rq-q-n.small{width:18px; height:18px; font-size:10px}
.rq-q-title{font-size:13.5px; color:var(--ink); min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rq-row.queued{border-left-color:var(--accent)}
.rq-schema{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px}
.tc-sidebtn.on{border-color:var(--role-client); color:var(--role-client)}

/* Theme rules & gates (Settings): agency-standards' catalogue */
.std-head{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap}
.std-head h2{margin:0}
.std-intro{font-size:12.5px; color:var(--ink-soft); max-width:78ch}
.std-tiles{display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:10px; margin:14px 0}
.std-tile{border:1px solid var(--hairline); border-radius:var(--radius); padding:12px 14px; background:var(--canvas); display:flex; flex-direction:column; gap:2px}
.std-tile b{font-size:24px; font-family:var(--font-family-base); color:var(--ink)}
.std-tile span{font-size:12px; color:var(--ink-soft)}
.std-tools{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:6px 0 4px}
.std-tools input[type=search]{max-width:280px}
.std-tools select{max-width:200px}
.std-h{font-family:var(--font-family-base); font-size:16px; margin:22px 0 8px}
.std-table{font-size:13px}
.std-table th{text-align:left; font-size:11.5px; color:var(--ink-faint); font-weight:600; padding:6px 8px; border-bottom:1px solid var(--hairline)}
.std-table td{padding:8px; border-bottom:1px solid var(--hairline); vertical-align:top}
.std-table code{background:var(--hairline); padding:1px 5px; border-radius:4px; font-size:12px}
.std-table td:first-child code,.std-table td:nth-child(2) .chip{white-space:nowrap}
.std-tier-push{background:var(--accent-soft); color:var(--accent-ink)}
.std-tier-preview{background:var(--warn-soft); color:var(--warn)}
.std-gchip,.std-rchip{border:0; cursor:pointer; font-family:inherit; margin:1px 0}
.std-hand{background:var(--danger-soft); color:var(--danger)}
.std-tool{background:var(--warn-soft); color:var(--warn)}
.std-book{margin-top:10px}
.std-bookname{font-family:var(--font-family-base); font-size:14px; margin:16px 0 6px; color:var(--ink)}
.std-sec{margin:10px 0 16px}
.std-sec-head{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; border-bottom:1px solid var(--hairline); padding-bottom:4px; margin-bottom:4px}
.std-sec-head h4{margin:0; font-size:13.5px; color:var(--ink)}
.std-kind{font-size:11px; color:var(--ink-faint)}
.std-rule{border-bottom:1px solid var(--hairline)}
.std-rule summary{display:flex; gap:10px; align-items:baseline; padding:7px 2px; cursor:pointer; font-size:13.5px; flex-wrap:wrap}
.std-rule summary::-webkit-details-marker{display:none}
.std-rule[open] summary{color:var(--accent-ink)}
.std-rule .desc-view{margin:0 0 10px; font-size:13px}
.std-id{font-family:ui-monospace,SFMono-Regular,monospace; font-size:11.5px; color:var(--ink-faint); min-width:34px}
.std-title{flex:1 1 320px; min-width:0}
.std-title code{background:var(--hairline); padding:0 4px; border-radius:4px; font-size:12px}
.std-gates{display:flex; gap:4px; flex-wrap:wrap}
@media (max-width:700px){ .std-table thead{display:none} .std-table td{display:block; border-bottom:0; padding:4px 8px} .std-table tr{display:block; border-bottom:1px solid var(--hairline); padding:6px 0} }

/* Images & files on a feedback (feedback-editor.js) */
.fe-drop{border:1px dashed var(--hairline); border-radius:8px; padding:12px; font-size:12.5px; color:var(--ink-soft); background:var(--canvas)}
.fe-drop.on{border-color:var(--accent); color:var(--accent-ink)}
.fe-files{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px}
.fe-file{position:relative; width:112px; height:84px; border:1px solid var(--hairline); border-radius:8px; overflow:hidden; background:var(--canvas); display:flex; align-items:center; justify-content:center}
.fe-file a{display:flex; width:100%; height:100%; align-items:center; justify-content:center; text-decoration:none}
.fe-file img{width:100%; height:100%; object-fit:cover; display:block}
.fe-file-name{font-size:11px; color:var(--ink-soft); padding:6px; word-break:break-all; text-align:center}
.fe-file-note{position:absolute; left:0; right:0; bottom:0; font-size:10px; background:rgba(0,0,0,.6); color:var(--ink); text-align:center; padding:2px}
.fe-file-del{position:absolute; top:3px; right:3px; width:22px; height:22px; padding:0; border-radius:50%; font-size:14px; line-height:1; background:rgba(0,0,0,.65); color:#fff; border:0; cursor:pointer}

/* Feedback type chips */
.fb-type-issue{background:var(--danger-soft); color:var(--danger)}
.fb-type-client-issue{background:var(--warn-soft); color:var(--warn)}
.fb-type-request{background:var(--hairline); color:var(--ink-soft)}

/* ---------- Clients performances (architecture rule 21) ---------- */
.perf-score{font-family:var(--font-family-base); font-weight:700; font-size:20px; color:var(--accent-ink)}
.perf-score.mid{color:var(--warn)}
.perf-score.low{color:var(--danger)}
.perf-score.none{color:var(--ink-faint); font-family:inherit; font-size:13px; font-weight:500}
.perf-scores{display:flex; gap:14px; margin-top:12px}
.perf-scores > div{flex:1}
.perf-scores .l{font-size:11px; color:var(--ink-faint)}
.perf-head{display:flex; gap:22px; align-items:center; flex-wrap:wrap}
.perf-ring{--p:0; width:112px; height:112px; border-radius:50%; display:grid; place-items:center; flex:none;
  background:conic-gradient(var(--accent) calc(var(--p) * 1%), var(--hairline) 0)}
.perf-ring.mid{background:conic-gradient(var(--warn) calc(var(--p) * 1%), var(--hairline) 0)}
.perf-ring.low{background:conic-gradient(var(--danger) calc(var(--p) * 1%), var(--hairline) 0)}
.perf-ring span{width:88px; height:88px; border-radius:50%; background:var(--panel); display:grid; place-items:center; font-family:var(--font-family-base); font-weight:700; font-size:22px}
.perf-meta{font-size:12.5px; color:var(--ink-soft); line-height:1.6}
/* minmax(0,1fr): a column never grows to its widest code line, which pushed the plan off a
   phone's screen and made the two columns uneven once a code block was opened */
.perf-plan{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; margin-top:16px}
.perf-plan > *{min-width:0}
@media (max-width:900px){.perf-plan{grid-template-columns:minmax(0,1fr)}}
.perf-changes{margin-top:12px; font-size:13px}
.perf-changes-list{margin:4px 0 2px 18px; padding:0; font-size:12.5px; line-height:1.6; overflow-wrap:anywhere}
.perf-changes-list .admin-edit{font-size:11px; color:var(--ink-soft); border:1px solid var(--hairline); border-radius:999px; padding:0 6px; margin-left:4px}
.perf-col h3{margin:0 0 2px; font-size:15px}
.perf-col .sub{font-size:12px; color:var(--ink-faint); margin-bottom:10px}
.perf-action{border:1px solid var(--hairline); border-radius:var(--radius); padding:10px 12px; margin-bottom:10px; background:var(--canvas)}
.perf-action summary{cursor:pointer; display:flex; gap:8px; align-items:baseline; list-style:none; min-height:24px}
.perf-action summary::-webkit-details-marker{display:none}
.perf-action .t{flex:1; font-weight:600; font-size:13.5px}
.perf-action .pts{font-size:12px; color:var(--accent-ink); white-space:nowrap}
.perf-action .where{font-size:12px; color:var(--ink-soft); margin:8px 0 4px}
.perf-action .why{font-size:12.5px; color:var(--ink-soft); margin:4px 0}
.perf-action ol{margin:6px 0 6px 18px; padding:0; font-size:13px}
.perf-action pre{background:var(--panel); border:1px solid var(--hairline); border-radius:8px; padding:10px; overflow:auto; font-size:11.5px; white-space:pre; max-height:340px}
.perf-action .ev{font-size:12px; color:var(--ink-faint); margin-top:4px}
/* where an action's rules come from: Google's or Shopify's page, a store it was seen on, or our own reason */
.perf-src{font-size:12px; color:var(--ink-faint); margin:6px 0; overflow-wrap:anywhere}
.perf-src a{color:var(--accent-ink)}
/* the issues a report found, shown instead of a score (the owner, 2026-10-12): the count in the
   colour of its worst, never green, since none found is not "perfect" */
.perf-count{flex:none; min-width:120px}
.perf-issues{display:inline-flex; align-items:baseline; gap:6px; color:var(--ink-soft); font-size:13px}
.perf-issues b{font-family:var(--font-family-base); font-weight:700; color:var(--ink); line-height:1}
.perf-issues.big b{font-size:44px}
.perf-issues.mid b{font-size:22px}
.perf-issues.small b{font-size:14px}
.perf-issues.high b{color:var(--danger)}
.perf-issues.normal b{color:var(--warn)}
.perf-split{display:inline-flex; gap:6px; flex-wrap:wrap; margin-top:6px}
.perf-count .perf-split{display:flex}
.chip.prio-normal{background:var(--hairline); color:var(--ink-soft)}
.chip.prio-high{background:var(--danger-soft); color:var(--danger)}
.chip.prio-medium{background:var(--warn-soft); color:var(--warn)}
.chip.prio-low{background:var(--hairline); color:var(--ink-soft)}
.chip.src-audit{background:var(--accent-soft); color:var(--accent-ink)}
/* the checks by hand (the owner, 2026-10-13): what a report cannot check, marked done or not needed */
.man-state-open{background:var(--warn-soft); color:var(--warn)}
.man-state-due{background:var(--danger-soft); color:var(--danger)}
.man-state-done{background:var(--accent-soft); color:var(--accent-ink)}
.man-state-ignored{background:var(--hairline); color:var(--ink-soft)}
.perf-manual.man-done .t,.perf-manual.man-ignored .t{color:var(--ink-soft); font-weight:500}
.man-marked{font-size:12px; color:var(--ink-soft); margin-top:6px}
.man-actions{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px}
.man-actions .man-note{flex:1 1 180px; min-width:0}
.man-error{color:var(--danger); font-size:12px; margin-top:6px}
.sum-manual{color:var(--warn)}
.perf-checks{width:100%; border-collapse:collapse; font-size:12.5px}
.perf-checks th,.perf-checks td{padding:6px 8px; border-bottom:1px solid var(--hairline); text-align:left; vertical-align:top}
.perf-checks .ok{color:var(--accent-ink)}
.perf-checks .no{color:var(--danger)}
.perf-checks .na{color:var(--ink-faint)}
/* a folded panel's title is a target: 24px tall at least, the whole row */
details.panel > summary{padding:4px 0; cursor:pointer}
.perf-soon{color:var(--ink-faint); font-size:14px; line-height:1.6}
.perf-start{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:10px}
/* a wide table scrolls inside its panel, never the page (a phone included) */
.perf-scroll{overflow-x:auto; max-width:100%}
.perf-run{display:flex; flex-direction:column; gap:6px; align-items:flex-start; max-width:260px}
.perf-run .field-note{font-size:12px; color:var(--ink-faint); line-height:1.5}
/* what a report's tab needs from the store's connection: no store, no MM Connect, a switch off */
.perf-warn{border:1px solid var(--warn); background:var(--warn-soft); color:var(--ink); border-radius:var(--radius); padding:10px 12px; margin-bottom:12px; font-size:13px; line-height:1.55}
.perf-warn b{color:var(--warn); margin-right:4px}
.perf-warn-block{border-color:var(--danger); background:var(--danger-soft)}
.perf-warn-block b{color:var(--danger)}
.perf-warn-info{border-color:var(--hairline); background:var(--panel)}
.perf-warn-info b{color:var(--ink-soft)}
.perf-tabs{flex-wrap:wrap}
.perf-allow{font-size:13px; color:var(--ink-soft); margin:0 0 12px; line-height:1.55}
/* our page: what the client's own dashboard shows */
.perf-dash{display:flex; gap:16px 22px; flex-wrap:wrap; align-items:center; font-size:13px}
.perf-dash label{display:flex; gap:6px; align-items:center}
.perf-dash input[type=number]{width:64px}
/* the CRO report's averages and what stands out (agency-standards 0.36.0) */
.perf-block{margin-top:16px}
.perf-block h4{margin:0 0 4px; font-size:14px}
.kpi-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px; margin:10px 0}
.kpi{border:1px solid var(--hairline); border-radius:var(--radius); padding:10px 12px; background:var(--canvas); min-width:0}
.kpi-l{font-size:11.5px; color:var(--ink-faint)}
.kpi-v{font-family:var(--font-family-base); font-weight:700; font-size:17px; margin:4px 0; overflow-wrap:anywhere}
.kpi-c{font-size:12px; color:var(--ink-soft)}
.kpi-c span{color:var(--ink-faint)}
.kpi-c.good{color:var(--accent-ink)}
.kpi-c.bad{color:var(--danger)}
.kpi-few{font-size:10.5px; border:1px solid var(--hairline); border-radius:99px; padding:0 6px; margin-left:4px}
.perf-obs{margin:8px 0 0 18px; padding:0; font-size:13px; line-height:1.55}
.perf-obs li{margin-bottom:8px}
.perf-why{margin:4px 0}
.perf-why > summary{cursor:pointer; font-size:11.5px; color:var(--ink-faint)}
.perf-fold{border-top:1px solid var(--hairline); padding-top:10px}
.perf-fold > summary{cursor:pointer; display:flex; flex-direction:column; gap:2px; font-size:13px; line-height:1.5}
.perf-fold > summary span{color:var(--ink-soft)}
/* the summary of every report (the client's overviews) */
.sum-cards{display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:10px}
.sum-card{border:1px solid var(--hairline); border-radius:var(--radius); padding:12px; background:var(--panel); display:flex; flex-direction:column; gap:6px; min-width:0}
.sum-k{font-size:12px; font-weight:600; color:var(--ink-soft)}
.sum-row{display:flex; gap:8px; align-items:baseline}
.sum-none{font-size:13px; color:var(--ink-faint)}
.sum-acts{margin:0 0 0 16px; padding:0; font-size:12.5px; color:var(--ink-soft)}
.sum-card button{align-self:flex-start; margin-top:auto}
.sum-h{margin:16px 0 4px; font-size:14px}
/* the client's two calls to action, in the bar above every client page */
.chead-ctas{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end}
@media (max-width:560px){.chead-ctas button{padding:6px 10px; font-size:12px}}
dialog.cta-choose{border:1px solid var(--hairline); border-radius:var(--radius); background:var(--panel); color:var(--ink); padding:18px; width:min(420px, calc(100vw - 32px))}
dialog.cta-choose::backdrop{background:var(--color-bg-backdrop)}
.cta-choose h3{margin:0 0 12px; font-size:15px}
.cta-list{display:flex; flex-direction:column; gap:8px}
.cta-list button{text-align:left}
.cta-foot{display:flex; justify-content:flex-end; margin-top:12px}

/* the manual's badges (assets/manual.js, ours only: the client's Documentation draws none) */
.tut-badge.builder{background:var(--accent-soft); color:var(--accent-ink)}
.tut-badge.live{background:transparent; border:1px solid var(--hairline); color:var(--ink-soft)}

/* ---------- AI search (architecture rule 22): the client dashboard's section, theirs and ours ---------- */
.ais-provs{display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px}
.ais-prov{font-size:11.5px; border:1px solid var(--edge); color:var(--ink-faint); border-radius:var(--radius-pill); padding:2px 10px}
.ais-prov.on{border-color:var(--accent); color:var(--accent-ink); background:var(--accent-soft)}
.ais-tabs{margin-top:4px}
.ais-faint{color:var(--ink-faint); font-size:12px; font-weight:400}
.ais-clip{max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ais-err{color:var(--danger); font-size:12.5px; margin:6px 0 0}
.ais-running{font-size:13px; color:var(--ink-soft); margin:10px 0 0}
.ais-pos{font-weight:700}
.ais-pos.top, .ais-vis.good{color:var(--accent-ink)}
.ais-pos.good{color:var(--accent-ink)}
.ais-pos.fair, .ais-vis.fair{color:var(--warn)}
.ais-pos.miss, .ais-vis.low, .ais-miss-t{color:var(--danger)}
.ais-vis{font-weight:700}
.ais-us{color:var(--accent-ink)}
.ais-view .panel h3, .ais-dhead h3{margin:0 0 8px; font-size:15px}
.ais-view .panel h3{overflow-wrap:anywhere}
.ais-form{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; margin-top:10px; align-items:start}
.ais-form textarea{width:100%; min-height:84px}
.ais-opts{display:flex; flex-direction:column; gap:8px; font-size:12.5px; color:var(--ink-soft)}
.ais-opts label{display:flex; flex-direction:column; gap:4px}
.ais-go{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:10px}
.ais-go .field-note{font-size:12px; margin:0}
.ais-table td.ais-ops{white-space:nowrap; text-align:right}
.ais-table tr.on td{background:var(--accent-soft)}
.ais-table tr.us td{background:color-mix(in srgb, var(--accent-soft) 60%, transparent)}
.ais-dhead{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:0 0 12px}
.ais-dhead h3{margin:0}
.ais-term{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; margin-top:8px; align-items:start}
.ais-term textarea{width:100%}
.ais-term-b{display:flex; flex-direction:column; gap:8px}
.ais-change p{margin:0; font-size:13px; line-height:1.55}
.ais-change{border-left:3px solid var(--warn)}
.ais-change.up{border-left-color:var(--accent)}
/* the websites and the whole answer, folded: a row that says it opens */
.ais-fold{border-top:1px solid var(--hairline); margin-top:10px; padding-top:8px}
.ais-fold > summary{cursor:pointer; color:var(--accent-ink); font-size:13px; padding:4px 0}
.ais-srcs ul{margin:8px 0 0 18px; padding:0; font-size:12.5px; line-height:1.6}
.ais-srcs li{margin-bottom:6px; overflow-wrap:anywhere}
.ais-answer{margin-top:8px; max-height:360px; overflow:auto; border:1px solid var(--hairline); border-radius:var(--radius-sm); padding:12px 14px; font-size:13.5px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; background:var(--canvas)}
/* advice in short paragraphs and a list of actions, at a length a line can be read (0.6.1) */
.ais-advice{margin:8px 0 0; font-size:13.5px; line-height:1.65; max-width:75ch}
.ais-advice p, .ais-advice ul{margin:0 0 10px}
.ais-advice > :last-child{margin-bottom:0}
.ais-advice ul{padding-left:20px}
.ais-advice li{margin-bottom:6px}
.ais-advice li::marker{color:var(--accent)}
.ais-dom{font-weight:600; color:var(--ink)}
.ais-del{margin-top:14px}
.ais-brand .field input, .ais-brand .field textarea, .ais-brand .field select{width:100%}
.ais-view .panel + .panel{margin-top:14px}
.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}
.linklike{background:none; border:0; box-shadow:none; padding:0; color:var(--accent-ink); text-decoration:underline; font:inherit; cursor:pointer; min-height:0}
.linklike:hover{background:none; filter:none}
/* a phone: a row is a card, each value under its label (no sideways scrolling in a list) */
@media (max-width:700px){
  .ais-form, .ais-term{grid-template-columns:minmax(0,1fr)}
  .ais-term-b{flex-direction:row; flex-wrap:wrap}
  .ais-table thead{display:none}
  .ais-table tr{display:block; border-bottom:1px solid var(--hairline); padding:8px 0}
  .ais-table td{display:block; border-bottom:0; padding:4px 4px; text-align:right; overflow-wrap:anywhere}
  .ais-table td::before{content:attr(data-label); float:left; margin-right:12px; color:var(--ink-faint); font-size:11.5px; text-align:left; max-width:45%}
  .ais-table td::after{content:''; display:table; clear:both}
  .ais-table td:not([data-label])::before{content:none}
  .ais-table td[data-label="Keyword"], .ais-table td[data-label="Question"]{text-align:left}
  .ais-table td[data-label="Keyword"]::before, .ais-table td[data-label="Question"]::before{content:none}
  .ais-table td.ais-ops{text-align:left; white-space:normal}
  .ais-table td.ais-ops button{margin:4px 6px 0 0}
  .ais-clip{max-width:100%; white-space:normal}
}

/* cards from a design link: the frame picker and the mode choice (board.html, mk dialog) */
.mk-or{display:flex;align-items:center;gap:10px;margin:10px 0;color:var(--ink-faint);font-size:12px}
.mk-or::before,.mk-or::after{content:"";flex:1;border-top:1px solid var(--line)}
.mk-frames{margin-top:12px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;max-height:280px;overflow:auto}
.mk-frames h4{margin:8px 0 4px;font-size:12px;color:var(--ink-faint);text-transform:uppercase;letter-spacing:.04em}
.mk-frames label{display:flex;gap:8px;align-items:center;padding:3px 0;font-size:13px}
.mk-frames label span.sz{color:var(--ink-faint);font-size:11px;margin-left:auto}
.mk-groups label{justify-content:space-between}
.mk-groups .mk-gname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.mk-groups select{max-width:55%}
.mk-mode{display:flex;gap:16px;margin-top:12px;font-size:13px}
.mk-mode label{display:flex;gap:6px;align-items:center}
.mk-thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.mk-thumbs img{height:72px;border:1px solid var(--line);border-radius:6px}

/* ---------- the bell (rule 25): every internal top bar, from bootAuth (assets/bell.js) ---------- */
.topbar .bell{
  position:relative; display:inline-flex; align-items:center; justify-content:center; flex:none;
  width:40px; height:40px; padding:0; border-radius:var(--radius-sm);
  background:transparent; color:var(--ink-soft); border:1px solid var(--hairline); box-shadow:none;
}
.topbar .bell:hover{background:var(--hairline); color:var(--ink); filter:none}
.topbar .bell.has-unread{color:var(--ink)}
.bell-n{
  position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 5px; border-radius:99px;
  background:var(--accent); color:var(--on-accent); font-size:var(--font-size-xxs); font-weight:var(--font-weight-bold);
  line-height:18px; text-align:center;
}
.bell-n[hidden]{display:none !important}
/* on a phone the bar scrolls sideways: the bell stays put at the top right, as the menu button does at the left */
@media (max-width:760px){
  .topbar .bell{position:fixed; top:10px; right:10px; z-index:70; background:var(--raised); border-color:var(--edge)}
  .topbar{padding-right:60px}
}
.bell-panel{
  position:fixed; inset:auto; margin:0; width:min(400px, calc(100vw - 24px)); max-height:min(70vh, 560px); overflow:auto;
  background:var(--raised); color:var(--ink); border:1px solid var(--edge); border-radius:var(--radius);
  box-shadow:var(--shadow-popover); padding:8px; z-index:80;
}
.bell-panel[hidden]{display:none !important}
.bell-head{display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 8px 8px}
.bell-list{display:flex; flex-direction:column; gap:2px}
.bell-empty{color:var(--ink-soft); font-size:var(--font-size-sm); padding:6px 8px; margin:0; line-height:1.5}
.bell-all{display:block; padding:10px 8px 4px; font-size:var(--font-size-sm); font-weight:var(--font-weight-semibold)}
/* one notification, in the panel and on Home */
.ntf{display:flex; gap:10px; align-items:flex-start; padding:9px 8px; border-radius:var(--radius-sm); color:var(--ink); text-decoration:none}
.ntf:hover{background:var(--hairline)}
.ntf-dot{flex:none; width:8px; height:8px; margin-top:6px; border-radius:50%; background:transparent}
.ntf.unread .ntf-dot{background:var(--accent)}
.ntf-main{display:flex; flex-direction:column; gap:2px; min-width:0}
.ntf-title{font-weight:var(--font-weight-medium); line-height:1.35; overflow-wrap:anywhere}
.ntf.unread .ntf-title{font-weight:var(--font-weight-semibold)}
.ntf-body{color:var(--ink-soft); font-size:var(--font-size-sm); line-height:1.45; overflow-wrap:anywhere;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.ntf-meta{color:var(--ink-faint); font-size:var(--font-size-xs)}
.ntf-meta b{color:var(--accent-ink); font-weight:var(--font-weight-semibold)}
.push-line{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-top:8px; padding:10px 8px 6px;
  border-top:1px solid var(--hairline); font-size:var(--font-size-sm); color:var(--ink-soft); line-height:1.45}
.push-line > span:first-child{flex:1 1 220px}
.push-actions{display:inline-flex; gap:6px; flex-wrap:wrap}

/* ---------- Home (rule 26): where the team lands ---------- */
.home-head{display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:10px 20px; margin:0 0 14px}
.tab-n[hidden]{display:none !important}
.home-line{margin:4px 0 0; color:var(--ink-soft)}
.home-filter{display:inline-flex; align-items:center; gap:8px; font-size:var(--font-size-sm); color:var(--ink-soft)}
.home-filter select{max-width:220px}
.home-tiles{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:10px; margin:0 0 26px}
.home-tile{display:flex; flex-direction:column; gap:2px; padding:14px 16px; border:1px solid var(--hairline);
  border-radius:var(--radius); background:var(--panel); color:var(--ink); text-decoration:none}
.home-tile:hover{border-color:var(--edge)}
.home-tile .v{font-size:var(--font-size-display); font-weight:var(--font-weight-bold); font-variant-numeric:tabular-nums}
.home-tile .l{font-size:var(--font-size-sm); color:var(--ink-soft)}
.home-tile.hot .v{color:var(--accent-ink)}
.home-sec{margin:0 0 30px; scroll-margin-top:16px}
.home-sec-head{display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin:0 0 6px}
.home-sec-head h2{margin:0}
.home-sec-head .spacer{flex:1}
.home-ntf{padding:6px}
.home-group{margin:14px 0 0}
.home-group h3{font-size:var(--font-size-sm); text-transform:uppercase; letter-spacing:.06em; color:var(--ink-soft); margin:0 0 8px; font-weight:var(--font-weight-semibold)}
.home-rows{display:flex; flex-direction:column; border:1px solid var(--hairline); border-radius:var(--radius); background:var(--panel); overflow:hidden}
.home-row{display:flex; align-items:flex-start; gap:12px; padding:11px 14px; color:var(--ink); text-decoration:none; border-top:1px solid var(--hairline)}
.home-row:first-child{border-top:0}
.home-row:hover{background:var(--hairline)}
.home-strip{flex:none; width:4px; align-self:stretch; border-radius:2px; background:var(--strip)}
.home-row-main{display:flex; flex-direction:column; gap:3px; min-width:0; flex:1}
.home-row-title{font-weight:var(--font-weight-medium); overflow-wrap:anywhere}
.home-row-title code{font-size:var(--font-size-xs); color:var(--ink-soft)}
.home-row-text{color:var(--ink-soft); font-size:var(--font-size-sm); overflow-wrap:anywhere;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.home-row-sub{color:var(--ink-faint); font-size:var(--font-size-xs); overflow-wrap:anywhere}
.home-row-when{flex:none; color:var(--ink-faint); font-size:var(--font-size-xs); white-space:nowrap; padding-top:2px}
@media (max-width:760px){
  .home-row{padding:11px 12px}
  .home-row-when{display:none}
  .home-tiles{grid-template-columns:repeat(2, minmax(0, 1fr))}
}

/* a large file's progress on a card (assets/big-files.js, rule 27): the native bar, in our accent */
.attach-progress{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.attach-progress progress{inline-size:min(260px, 100%); accent-color:var(--color-accent-base)}

/* Tools → Product images (rule 28): the catalogue, the rules, one product's photos side by side with
   their versions, and the client's review on their dashboard (.pir-*). Tokens only. */
.pi-head{display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:14px}
.pi-head h1{margin:0}
.pi-line{margin:4px 0 0; color:var(--ink-soft); font-size:var(--font-size-sm)}
.pi-store{color:var(--ink)}
.pi-client{margin-left:auto; display:flex; align-items:center; gap:8px; font-size:var(--font-size-sm); color:var(--ink-soft)}
.pi-client select{min-width:200px}
.pi-empty p{margin:0 0 6px}
.pi-job{font-size:var(--font-size-xs); color:var(--ink-soft); margin-top:4px; display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.pi-job progress{inline-size:min(220px, 100%); accent-color:var(--color-accent-base)}
.pi-running{color:var(--accent-ink)}
.pi-err{color:var(--danger)}
.pi-tabs{margin-top:4px}
.pi-actions{display:flex; gap:8px; flex-wrap:wrap}
.pi-find{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:6px}
.pi-find input[type=search]{flex:1; min-width:220px}
.pi-find label{display:flex; align-items:center; gap:6px; font-size:var(--font-size-sm); color:var(--ink-soft)}
/* the list: one row a product, its state in a pill or two */
.pi-list{display:flex; flex-direction:column; border:1px solid var(--hairline); border-radius:var(--radius); background:var(--panel); overflow:hidden}
.pi-row{display:flex; align-items:center; gap:10px; padding-left:14px; border-top:1px solid var(--hairline)}
.pi-row:first-child{border-top:0}
.pi-row:hover{background:var(--color-bg-hover)}
.pi-row.on{background:var(--accent-soft)}
.pi-row > input{width:24px; height:24px; flex:none}   /* a thumb-sized tick on every screen */
.pi-row-link{flex:1; min-width:0; display:grid; grid-template-columns:44px minmax(0, 1fr) auto 16px; gap:12px; align-items:center; padding:8px 14px 8px 0; color:var(--ink); text-decoration:none}
.pi-row img, .pi-noimg{inline-size:44px; block-size:44px; object-fit:cover; border-radius:var(--radius-sm); background:var(--raised)}
.pi-row-main{display:flex; flex-direction:column; gap:2px; min-width:0}
.pi-row-title{font-weight:600; overflow-wrap:anywhere}
.pi-row-sub{font-size:var(--font-size-xs); color:var(--ink-soft); overflow-wrap:anywhere}
.pi-row-state{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end}
.pi-row-go{color:var(--ink-soft); font-size:18px}
.pi-pill{font-size:var(--font-size-xs); font-weight:600; padding:2px 8px; border-radius:99px; background:var(--raised); color:var(--ink-soft); white-space:nowrap}
.pi-pill.warn{background:var(--warn-soft); color:var(--color-warning-text)}
.pi-pill.accent{background:var(--accent-soft); color:var(--accent-ink)}
.pi-pill.info{background:var(--color-info-soft); color:var(--color-info-text)}
.pi-pill.ok{background:var(--color-success-soft); color:var(--color-success-text)}
.pi-pill.quiet{background:transparent; font-weight:400}
.pi-count{font-size:var(--font-size-sm); color:var(--ink-soft); margin:6px 0 8px; display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.pi-bulkbar{margin:0 0 10px}
.pi-many{display:inline-flex; align-items:center; gap:6px; font-size:var(--font-size-xs); color:var(--ink-soft); margin:0}
.pi-many select{inline-size:auto; min-width:64px}
.chip.pi-st-sent{background:var(--color-info-soft); color:var(--color-info-text)}
.chip.pi-st-changes{background:var(--warn-soft); color:var(--color-warning-text)}
.chip.pi-st-approved, .chip.pi-st-applied{background:var(--color-success-soft); color:var(--color-success-text)}
.chip.pi-st-draft, .chip.pi-st-drafts, .chip.pi-st-replace{background:var(--raised); color:var(--ink-soft)}
.pi-rules{display:flex; flex-direction:column; gap:10px; margin:10px 0 14px}
.pi-rule{padding:14px 16px}
.pi-rule.off{filter:saturate(.3)}
.pi-rule-head{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.pi-rule-head h3{margin:0; font-size:15px}
.pi-rule-head .spacer{flex:1}
.pi-rule-n{inline-size:24px; block-size:24px; border-radius:99px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-ink); font-size:var(--font-size-xs); font-weight:700}
.pi-rule-what, .pi-rule-covers{margin:6px 0 0; font-size:var(--font-size-sm); color:var(--ink-soft); overflow-wrap:anywhere}
.pi-prompt{white-space:pre-wrap; font-size:var(--font-size-sm); margin:6px 0 0; overflow-wrap:anywhere}
.pi-apply{margin-bottom:14px}
.pi-apply h3, .pi-sub{margin:0 0 6px; font-size:15px}
.pi-apply p{font-size:var(--font-size-sm)}
.pi-cmd{background:var(--raised); padding:10px 12px; border-radius:var(--radius-sm); white-space:pre-wrap; margin:8px 0}
.pi-back{margin-bottom:10px}
.pi-facts h2{margin:0 0 4px}
.pi-facts p{margin:0 0 4px; font-size:var(--font-size-sm); color:var(--ink-soft)}
.pi-sel{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:12px 0; padding:10px 14px; position:sticky; top:0; z-index:5}
.pi-sel-n{font-size:var(--font-size-sm); color:var(--ink-soft); flex:1; min-width:120px}
.pi-images{display:flex; flex-direction:column; gap:14px}
.pi-image{padding:14px 16px}
.pi-image-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px}
.pi-check{display:inline-flex; align-items:center; gap:6px; font-size:var(--font-size-sm); min-height:24px; cursor:pointer}
.pi-check input{width:auto}
.pi-note{background:var(--warn-soft); color:var(--color-warning-text); padding:8px 10px; border-radius:var(--radius-sm); font-size:var(--font-size-sm); margin:0 0 10px}
.pi-pair{display:grid; grid-template-columns:minmax(0, 220px) minmax(0, 1fr); gap:14px; align-items:start; margin-bottom:12px}
.pi-pair figure{margin:0}
.pi-pair figure img{inline-size:100%; border-radius:var(--radius-sm); background:var(--raised); display:block}
.pi-pair figcaption{font-size:var(--font-size-xs); color:var(--ink-soft); margin-top:4px}
.pi-versions{display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px}
.pi-version{display:flex; flex-direction:column; gap:4px; padding:6px; border:1px solid var(--hairline); border-radius:var(--radius-sm); font-size:var(--font-size-xs); color:var(--ink-soft); cursor:pointer; min-width:0}
.pi-version.on{border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink)}
.pi-version input{width:auto; align-self:flex-start}
.pi-version img{inline-size:100%; border-radius:4px; background:var(--raised)}
.pi-version.keep{grid-column:1 / -1; flex-direction:row; align-items:center; gap:8px; min-height:0; padding:6px 10px; font-size:var(--font-size-sm)}
.pi-version.failed{border-color:var(--danger); color:var(--danger); cursor:default}
.pi-version.queued, .pi-version.running{cursor:default; min-height:80px; justify-content:center}
.pi-vstate{overflow-wrap:anywhere}
.pi-cols{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px}
.pi-hist summary, .pi-rule summary{cursor:pointer; font-size:var(--font-size-sm); color:var(--ink-soft); min-block-size:24px; padding:3px 0}
.pi-hist ol{margin:6px 0 0; padding-left:18px; font-size:var(--font-size-xs); color:var(--ink-soft)}
dialog.pi-dialog[open]{inline-size:min(640px, calc(100vw - 32px)); max-block-size:calc(100vh - 32px); overflow:auto; background:var(--panel); color:var(--ink); border:1px solid var(--edge); border-radius:var(--radius); padding:20px}
dialog.pi-dialog h2{margin:0 0 12px}
.pi-checklist{display:flex; flex-direction:column; gap:4px; max-block-size:220px; overflow:auto; border:1px solid var(--hairline); border-radius:var(--radius-sm); padding:8px; margin-top:6px}
.pi-dlg-foot{display:flex; justify-content:flex-end; gap:8px; margin-top:14px}
.pi button.link{background:none; border:0; padding:2px 0; min-block-size:24px; color:var(--accent-ink); text-decoration:underline; cursor:pointer; font:inherit}
.pi-line #pi-sync{margin-left:6px; vertical-align:middle}
/* what stops the work, in one list */
.pi-setup{border-left:3px solid var(--danger); padding:12px 16px; margin-bottom:14px}
.pi-setup h2{font-size:15px; margin:0 0 6px}
.pi-setup ul{margin:0; padding-left:18px; font-size:var(--font-size-sm); display:flex; flex-direction:column; gap:4px}
/* the work, step by step */
.pi-flow{display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:10px; margin:0 0 16px}
.pi-step{display:flex; flex-direction:column; border:1px solid var(--hairline); border-radius:var(--radius); background:var(--panel); min-width:0}
.pi-step.on{border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset}
.pi-step-main{display:grid; grid-template-columns:auto 1fr; grid-template-areas:'n label' 'count count' 'sub sub'; gap:2px 8px; align-items:center; text-align:left;
  background:none; border:0; color:var(--ink); padding:12px 14px 10px; cursor:pointer; border-radius:var(--radius); font:inherit; inline-size:100%}
.pi-step-main:hover{background:var(--color-bg-hover)}
.pi-step-n{grid-area:n; inline-size:22px; block-size:22px; border-radius:99px; display:grid; place-items:center; background:var(--raised); color:var(--ink-soft); font-size:var(--font-size-xs); font-weight:700}
.pi-step.on .pi-step-n{background:var(--accent-soft); color:var(--accent-ink)}
.pi-step-label{grid-area:label; font-size:var(--font-size-sm); font-weight:600; color:var(--ink-soft)}
.pi-step-count{grid-area:count; font-size:26px; font-weight:700; line-height:1.2; margin-top:4px}
.pi-step.empty .pi-step-count{color:var(--ink-soft)}
.pi-step-sub{grid-area:sub; font-size:var(--font-size-xs); color:var(--ink-soft); overflow-wrap:anywhere}
.pi-step-do{display:flex; flex-direction:column; gap:6px; padding:0 14px 12px}
.pi-step-do button{inline-size:100%}
.pi-step-note{margin:0; font-size:var(--font-size-xs); color:var(--ink-soft); overflow-wrap:anywhere}
/* one product: the photos, and beside them what the AI is told about the product */
.pi-prod-head{display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; margin-bottom:10px}
.pi-prod-head .pi-back{margin:4px 0 0}
.pi-layout{display:grid; grid-template-columns:minmax(0, 1fr) 320px; grid-template-areas:'main aside'; gap:16px; align-items:start}
.pi-main{grid-area:main; min-width:0}
.pi-aside{grid-area:aside; display:flex; flex-direction:column; gap:12px; position:sticky; top:12px; min-width:0}
.pi-aside .pi-desc, .pi-aside .pi-sizes{margin:0}
.pi-aside .pi-refs{grid-template-columns:repeat(2, minmax(0, 1fr))}
.pi-main .pi-sel{margin-top:0}
.pi-image.quiet{padding-block:10px}
.pi-quiet{display:grid; grid-template-columns:96px minmax(0, 1fr); gap:14px; align-items:start}
.pi-quiet img{inline-size:96px; block-size:96px; object-fit:cover; border-radius:var(--radius-sm); background:var(--raised)}
.pi-quiet .field-note{margin:0 0 8px}
.pi-more{margin-top:8px}
.pi-more summary{cursor:pointer; font-size:var(--font-size-sm); color:var(--ink-soft); min-block-size:24px; padding:3px 0}
.pi-more .pi-cols{margin-top:8px}
.pi-alt{margin-bottom:0}
.pi-optbar{display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 14px; margin-bottom:12px}
.pi-optbar .field-note{flex:1 1 320px; margin:0}
.pi-prod-head .spacer{flex:1}
.pi-vpick{display:flex; flex-direction:column; gap:4px; cursor:pointer; min-width:0}
.pi-vpick input{width:auto; align-self:flex-start}
.pi-offer{font-size:var(--font-size-xs)}
.pi-offer-note{grid-column:1 / -1; margin:0}
.pi-vnote{margin:2px 0 0; font-size:var(--font-size-xs); color:var(--ink); overflow-wrap:anywhere}
.pi-vprompt summary{cursor:pointer; min-block-size:24px; padding:3px 0}
.pi-vprompt .pi-actions{margin-top:6px}
.pi-rule-text{color:var(--ink-soft); margin:6px 0 8px}
.pi-try{margin-top:10px}
.pi-try .pi-actions{margin-top:8px; align-items:center}
.pi-general{padding:14px 16px; max-inline-size:900px}
.pi-cols3{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px}
/* reference photos: a rule's look, a product's size (and its description, read-only) */
.pi-label{display:block; font-size:var(--font-size-xs); font-weight:var(--font-weight-semibold); color:var(--ink-soft); margin:0 0 5px}
.pi-refs{display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:10px; margin:8px 0}
.pi-ref{margin:0; display:flex; flex-direction:column; gap:6px; padding:6px; border:1px solid var(--hairline); border-radius:var(--radius-sm); min-width:0}
.pi-ref img{inline-size:100%; aspect-ratio:1; object-fit:contain; border-radius:4px; background:var(--raised); display:block}
.pi-ref figcaption{display:flex; flex-direction:column; gap:4px; min-width:0}
.pi-ref figcaption .field-note{margin:0; overflow-wrap:anywhere}
.pi-ref figcaption button{align-self:flex-start}
.pi-refs.mini{display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 0}
.pi-refs.mini img{inline-size:48px; block-size:48px; object-fit:cover; border-radius:4px; background:var(--raised)}
.pi-desc, .pi-sizes{margin:12px 0}
.pi-desc summary{cursor:pointer; font-weight:var(--font-weight-semibold); min-block-size:24px; padding:3px 0}
.pi-desc-text{white-space:pre-line; font-size:var(--font-size-sm); margin:8px 0 0; overflow-wrap:anywhere; max-block-size:320px; overflow:auto}
.pi-sizes h3{margin:0 0 4px; font-size:15px}
/* FB-76: prompt variables, ingredients, new photos and the photos' order */
.pi-vars{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:6px 0 0}
.pi-vars .field-note{margin:0}
.pi-vars button{font-family:var(--font-family-mono); min-block-size:28px}
.pi-prompt mark, .pi-varsused dt{background:var(--accent-soft); color:var(--ink); border-radius:3px; padding:0 3px; font-family:var(--font-family-mono)}
.pi-varsused{display:flex; flex-direction:column; gap:4px; margin:8px 0 0; font-size:var(--font-size-xs)}
.pi-varsused dt{align-self:flex-start}
.pi-varsused dd{margin:0; white-space:pre-line; overflow-wrap:anywhere}
.pi-full{margin-top:6px}
.pi-full summary{cursor:pointer; font-size:var(--font-size-xs); color:var(--ink-soft); min-block-size:24px; padding:3px 0}
.pi-newopts{border:1px solid var(--hairline); border-radius:var(--radius-sm); padding:10px 12px; margin:0 0 12px; min-width:0}
.pi-newopts legend{font-size:var(--font-size-xs); font-weight:var(--font-weight-semibold); color:var(--ink-soft); padding:0 4px}
.pi-newopts .field-note{margin:0 0 8px}
.pi-ingredients{margin:12px 0}
.pi-ingredients h3{margin:0 0 4px; font-size:15px}
.pi-ingredients textarea{inline-size:100%; margin:6px 0 8px}
.pi-new{border-left:3px solid var(--accent)}
.pi-newph{margin:0}
.pi-newph-box{display:grid; place-items:center; aspect-ratio:1; inline-size:100%; border:1px dashed var(--hairline); border-radius:var(--radius-sm); color:var(--ink-faint); font-size:28px; background:var(--raised)}
.pi-newph figcaption{font-size:var(--font-size-xs); color:var(--ink-soft); margin-top:4px}
.pi-order{padding:12px 14px; margin-bottom:12px}
.pi-order-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px}
.pi-order-head h3{margin:0; font-size:15px}
.pi-order-head .field-note{margin:0; flex:1 1 220px}
.pi-order-head .spacer{flex:1}
.pi-order-list{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(108px, 1fr)); gap:8px}
.pi-order-item{display:flex; flex-direction:column; gap:4px; padding:6px; border:1px solid var(--hairline); border-radius:var(--radius-sm); background:var(--panel); cursor:grab; min-width:0}
.pi-order-item img, .pi-order-item .pi-newph-box{inline-size:100%; aspect-ratio:1; object-fit:cover; border-radius:4px; background:var(--raised); display:block}
.pi-order-item .pi-newph-box{font-size:20px}
.pi-order-item.new{border-color:var(--accent)}
.pi-order-item.dragging{opacity:.5}
.pi-order-item.over{outline:2px solid var(--accent); outline-offset:1px}
.pi-order-n{font-size:var(--font-size-xs); color:var(--ink-soft)}
.pi-order-btns{display:flex; gap:4px}
.pi-order-btns button{flex:1; min-inline-size:32px; min-block-size:28px; padding:0}
/* 0.21.0: one button per job in each photo (New version first), what goes to the client ticked on the
   versions, the product's progress with the client */
.pi-image-title{margin:0; font-size:15px}
.pi-cta{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:4px 0 10px}
.pi-cta button[data-new-version]{font-weight:var(--font-weight-semibold)}
.pi-version{cursor:default}
.pi-version .zoomable img{aspect-ratio:1; object-fit:contain; background:var(--raised); border-radius:4px}
.pi-send{font-size:var(--font-size-xs); color:var(--ink); font-weight:var(--font-weight-semibold)}
.pi-send input{inline-size:20px; block-size:20px}
.pi-vmeta{overflow-wrap:anywhere}
.pi-dims a{color:inherit}
.pi-vbtns{display:flex; flex-wrap:wrap; gap:6px}
.pi-vbtns .pi-vdel{color:var(--danger)}
.pi-vbtns .pi-vdel:disabled{color:var(--ink-soft)}
.pi-current .zoomable img{inline-size:100%; border-radius:var(--radius-sm); background:var(--raised)}
.pi-quiet .pi-current{margin:0; min-width:0}
.pi-quiet .pi-current figcaption{font-size:var(--font-size-xs); color:var(--ink-soft); margin-top:4px}
.pi-inline{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:8px 0 0}
.pi-inline label{font-size:var(--font-size-xs); font-weight:var(--font-weight-semibold); color:var(--ink-soft)}
.pi-inline select{inline-size:auto; min-width:64px}
.pi-inline .field-note{margin:0; flex:1 1 220px}
.pi-progress{display:inline-flex; flex-wrap:wrap; gap:4px 12px; align-items:center}
.pi-prog{display:inline-flex; align-items:center; gap:6px; font-size:var(--font-size-xs); color:var(--ink-soft); white-space:nowrap; font-variant-numeric:tabular-nums}
.pi-prog b{color:var(--ink)}
.pi-prog-bar{inline-size:48px; block-size:6px; border-radius:3px; background:var(--raised); overflow:hidden; display:inline-block}
.pi-prog-bar span{display:block; block-size:100%; background:var(--color-info-text)}
.pi-prog.ok .pi-prog-bar span{background:var(--accent)}
.pi-prodbar .pi-sel-n{flex:1 1 220px}
@media (max-width:1180px){
  .pi-flow{grid-template-columns:repeat(3, minmax(0, 1fr))}
  .pi-layout{grid-template-columns:minmax(0, 1fr); grid-template-areas:'main' 'aside'}
  .pi-aside{position:static}
  .pi-aside .pi-refs{grid-template-columns:repeat(auto-fill, minmax(150px, 1fr))}
}
@media (max-width:900px){
  /* the menu button is fixed in the top left corner here: the photos' bar sticks below it */
  .pi-sel{top:58px}
}
@media (max-width:760px){
  .pi-client{margin-left:0; inline-size:100%}
  .pi-client select{flex:1; min-width:0}
  .pi-flow{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .pi-row-link{grid-template-columns:44px minmax(0, 1fr) 12px; row-gap:6px}
  .pi-row-state{grid-column:2 / 3; justify-content:flex-start}
  .pi-row-go{grid-column:3; grid-row:1}
  .pi-cols3{grid-template-columns:minmax(0, 1fr)}
  .pi-pair, .pi-cols{grid-template-columns:minmax(0, 1fr)}
  .pi-pair figure{max-inline-size:260px}
}

/* the full-screen view of a picture (assets/zoom.js): the team's page and the client's dashboard */
dialog.zoom-dlg{inline-size:100vw; block-size:100dvh; max-inline-size:none; max-block-size:none; margin:0; padding:0; border:0; background:var(--color-bg-backdrop); color:var(--ink); overflow:hidden}
dialog.zoom-dlg[open]{display:block}
dialog.zoom-dlg::backdrop{background:var(--color-bg-backdrop)}
.zoom-bar{position:absolute; inset:0 0 auto 0; z-index:2; display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; padding:8px 12px; background:var(--panel); border-bottom:1px solid var(--hairline)}
.zoom-title{font-weight:var(--font-weight-semibold); min-width:0; overflow-wrap:anywhere}
.zoom-meta{font-size:var(--font-size-sm); color:var(--ink-soft); font-variant-numeric:tabular-nums}
.zoom-tools{display:flex; align-items:center; gap:6px; margin-left:auto; flex-wrap:wrap}
.zoom-tools button, .zoom-tools .zoom-dl{min-inline-size:36px; min-block-size:36px; padding:0 10px; border:1px solid var(--hairline); border-radius:var(--radius-sm); background:var(--raised); color:var(--ink); font:inherit; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; text-decoration:none}
.zoom-tools .zoom-dl{border-color:var(--accent); color:var(--accent)}
.zoom-tools .zoom-dl[hidden], .zoom-nav[hidden]{display:none}
.zoom-pct{min-inline-size:48px; text-align:center; font-size:var(--font-size-sm); font-variant-numeric:tabular-nums}
.zoom-stage{position:absolute; inset:0; overflow:hidden; touch-action:none; cursor:grab}
.zoom-stage.moving{cursor:grabbing}
.zoom-img{position:absolute; left:0; top:0; transform-origin:0 0; max-inline-size:none; user-select:none; -webkit-user-drag:none}
.zoom-nav{position:absolute; top:50%; z-index:2; inline-size:48px; block-size:64px; margin-top:-32px; border:1px solid var(--hairline); border-radius:var(--radius-sm); background:var(--panel); color:var(--ink); font-size:28px; cursor:pointer}
.zoom-prev{left:10px}
.zoom-next{right:10px}
.zoom-hint{position:absolute; inset:auto 0 10px 0; z-index:2; margin:0; text-align:center; font-size:var(--font-size-xs); color:var(--ink-soft); pointer-events:none}
/* a picture that opens full screen */
.zoomable{display:block; padding:0; border:0; background:none; cursor:zoom-in; inline-size:100%; min-block-size:48px}
.zoomable img{display:block}
.pi-dims{font-size:var(--font-size-xs); color:var(--ink-soft); font-variant-numeric:tabular-nums}

/* the client's side: each photo before and after, and its answer */
.pir-intro{color:var(--ink-soft); font-size:var(--font-size-sm); margin:0 0 12px}
.pir-filter{margin-bottom:12px}
.pir-mode{margin-bottom:12px}
.pir-product{margin-bottom:16px}
.pir-product-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px}
.pir-product-head h3{margin:0; font-size:16px; overflow-wrap:anywhere}
.pir-photo{border-top:1px solid var(--hairline); padding-top:12px; margin-top:12px}
.pir-pair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; max-inline-size:760px}
.pir-pair figure{margin:0}
.pir-pair img{inline-size:100%; border-radius:var(--radius-sm); background:var(--raised); display:block}
.pir-pair figcaption{font-size:var(--font-size-xs); color:var(--ink-soft); margin-top:4px}
.pir-alt{font-size:var(--font-size-sm); margin:10px 0 0}
.pir-alt span{color:var(--ink-soft)}
.pir-answer{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:10px}
.pir-answer textarea{flex:1 1 260px; min-width:0}
.pir-state{font-size:var(--font-size-sm); color:var(--ink-soft); margin-top:8px}
.pir-new{margin:0 0 8px}
/* several options of one photo: they pick one and can comment on each */
.pir-opt-intro{margin:0 0 8px}
.pir-options{display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:12px; max-inline-size:1000px}
.pir-options figure{margin:0; display:flex; flex-direction:column; gap:6px; min-width:0}
.pir-options img{inline-size:100%; border-radius:var(--radius-sm); background:var(--raised); display:block}
.pir-option{border:1px solid var(--hairline); border-radius:var(--radius-sm); padding:6px}
.pir-option.on{border-color:var(--accent); background:var(--accent-soft)}
.pir-option{display:flex; flex-direction:column; gap:6px; min-width:0}
.pir-option figcaption{font-size:var(--font-size-xs); color:var(--ink-soft)}
.pir-option textarea{inline-size:100%}
.pir-photo-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.pir-fig{margin:0; min-width:0}
.pir-fig .zoomable img{inline-size:100%; block-size:auto; min-block-size:48px; border-radius:var(--radius-sm); background:var(--raised)}
.pir-fig figcaption{font-size:var(--font-size-xs); color:var(--ink-soft); margin-top:4px}
.pir-fig figcaption a{color:inherit}
.pir-st-sent{border-color:var(--color-info-border); color:var(--color-info-text)}
.pir-st-approved, .pir-st-applied{border-color:var(--accent); color:var(--accent)}
.pir-pick{display:flex; align-items:center; gap:6px; font-weight:600; font-size:var(--font-size-sm); min-block-size:24px; cursor:pointer}
.pir-pick input{width:auto}
/* their size reference photos */
.pir-refs-about{margin-bottom:12px; max-inline-size:760px}
.pir-refs-about h3{margin:0 0 6px; font-size:15px}
.pir-refs-about p{margin:0 0 6px; font-size:var(--font-size-sm)}
.pir-refs-find{max-inline-size:420px}
.pir-refs{display:flex; flex-direction:column; gap:10px}
.pir-ref-product .pir-product-head{margin-bottom:0}
.pir-ref-product .pi-refs{margin-top:10px}
.pir-ref-thumb{inline-size:44px; block-size:44px; object-fit:cover; border-radius:4px; background:var(--raised); flex:none}
@media (max-width:760px){ .pir-pair{grid-template-columns:minmax(0, 1fr)} }

/* ---------- Estimations (rule 30): the list, one estimation's options side by side, the default items ---------- */
/* readable first (the owner, 2026-11-13: "low readability, really difficult to see and use"): bigger names
   and prices, descriptions in the soft ink (never the faint), cells that are a summary and open an editor */
.est-bar{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:8px}
.est-onlyon{margin:0 0 0 8px; font-weight:400; color:var(--ink-soft)}
.est-list td{vertical-align:top}
.est-chips{display:flex; flex-wrap:wrap; gap:6px}
.est-chips .chip{font-size:var(--font-size-xs); padding:3px 9px; display:inline-flex; align-items:center; gap:6px}
.est-rowbtns{white-space:nowrap; text-align:right}
.est-rowbtns > * + *{margin-left:6px}
.est-sub{font-size:13px; margin:18px 0 8px; color:var(--ink-soft)}
.est-head .est-fields{display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,.7fr); gap:14px}
.est-inline{display:flex; gap:6px}
.est-inline select{width:auto}
.est-dlgbtns{display:flex; gap:10px; justify-content:flex-end; align-items:center}
.est-hgrid{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px}
.est-hgrid > [hidden], #i-sections-wrap[hidden]{display:none !important}
.est-rates{display:grid; grid-template-columns:repeat(3, minmax(0,220px)); gap:14px; margin-top:14px}
.est-scope{border:1px solid var(--hairline); border-radius:var(--radius-sm); padding:10px 12px; margin:12px 0 0; display:grid; gap:6px}
.est-scope legend{font-size:var(--font-size-xs); color:var(--ink-soft); padding:0 4px}
.est-scope[hidden]{display:none !important}
.est-usedefault{margin-top:6px; min-height:24px; font-size:12px}
.est-usedefault[hidden]{display:none !important}
.est-h{margin:0; font-size:11px; font-weight:var(--font-weight-semibold); color:var(--ink-soft); display:flex; flex-direction:column; gap:3px; min-width:0}
.est-num{padding:6px 8px; min-width:0}
@media (min-width:761px) and (pointer:fine){ .est-num{font-size:13.5px} }
.est-iname{color:var(--ink); font-weight:var(--font-weight-semibold); font-size:14px; line-height:1.35}
.est-tag{font-size:10px; margin-left:4px}
.est-desc{margin:4px 0 6px; font-size:12.5px; font-weight:400; color:var(--ink-soft); line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.est-cmeta{font-size:12px; color:var(--ink-soft); font-weight:400}
/* sections: − n + and what they make */
.est-sectick{font-size:12px; margin:0; color:var(--ink-soft)}
.est-counter{display:inline-flex; align-items:center; gap:6px; margin-top:8px}
.est-counter button{min-width:30px; padding:3px 8px; font-size:15px; line-height:1}
.est-count{font-size:13px; color:var(--ink); min-width:76px; text-align:center}
.est-count b{font-size:15px}
.est-counter-lg input{width:72px; text-align:center}
.est-counter-lg button{min-width:40px; min-height:40px}
.est-calc{font-size:12px; color:var(--ink-soft); line-height:1.5; margin-top:4px}
.est-calc b{color:var(--ink); font-weight:var(--font-weight-semibold)}
.est-calc-sm{font-size:11.5px}
/* the options side by side, in a box that scrolls: the option cards (and their prices) stay on top, the
   items on the left, the sideways bar always on screen */
.est-scroll{overflow:auto; max-height:calc(100vh - 140px); overscroll-behavior:contain; border:1px solid var(--hairline); border-radius:var(--radius-sm); background:var(--panel)}
.est-table{width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0}
.est-table .est-itemcol, .est-table .est-item{width:290px}
.est-table thead th{position:sticky; top:0; background:var(--raised); z-index:2; vertical-align:top; padding:14px 14px 12px; border-bottom:1px solid var(--edge)}
.est-table th.est-item{position:sticky; left:0; background:var(--panel); z-index:1; font-weight:400; vertical-align:top; padding:14px; box-shadow:1px 0 0 var(--hairline)}
.est-table thead th.est-itemcol{left:0; z-index:3}
.est-opname{display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:16px; font-weight:var(--font-weight-semibold); color:var(--ink)}
.est-opdesc{margin:6px 0 10px; font-size:12.5px; font-weight:400; color:var(--ink-soft); line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.est-opdesc.is-empty{font-style:italic}
.est-opprice{font-size:24px; font-weight:var(--font-weight-semibold); color:var(--ink); line-height:1.1}
.est-opsave{margin-top:4px; font-size:12px; color:var(--accent-ink); font-weight:var(--font-weight-semibold)}
.est-opsave span{color:var(--ink-soft); font-weight:400}
.est-group th{font-size:11.5px; text-transform:uppercase; letter-spacing:.07em; color:var(--accent-ink); background:var(--canvas); padding:10px 14px; border-top:1px solid var(--hairline); border-bottom:1px solid var(--hairline)}
.est-table tr.est-group th{position:sticky; left:0}
.est-table tbody tr[data-item] > *{border-bottom:1px solid var(--hairline)}
.est-itembtns{display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; font-size:12px}
.est-itembtns .linklike, .est-chips .linklike{min-height:24px; min-width:24px}
.est-cell{vertical-align:top; padding:10px}
.est-cellbtn{all:unset; box-sizing:border-box; display:flex; flex-direction:column; gap:3px; width:100%; min-height:64px; padding:10px 12px; border-radius:var(--radius-sm); cursor:pointer;
  border:1px solid var(--hairline); background:var(--panel); color:var(--ink)}
.est-cellbtn:hover{border-color:var(--edge); background:var(--color-bg-hover)}
.est-cellbtn:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.est-cell.is-custom .est-cellbtn{background:var(--accent-soft); border-color:var(--accent)}
.est-cell.is-included .est-cellbtn{background:color-mix(in srgb, var(--accent-soft) 60%, var(--panel)); border-color:var(--hairline)}
.est-cell.is-style .est-cellbtn{border:1px dashed var(--accent)}
.est-cell.is-covered .est-cellbtn{background:var(--panel); border-color:var(--hairline)}
.est-off{font-size:13px; color:var(--ink-soft)}
.est-add{font-size:12px; color:var(--accent-ink); font-weight:var(--font-weight-semibold)}
.est-ctop{display:flex; align-items:center; gap:8px}
.est-pill{font-size:11px; font-weight:var(--font-weight-semibold); padding:1px 8px; border-radius:var(--radius-pill); background:var(--raised); color:var(--ink)}
.est-pill.is-custom{background:var(--accent); color:var(--on-accent)}
.est-pill.is-style{border:1px dashed var(--accent); background:transparent; color:var(--accent-ink)}
.est-pill.is-covered{background:var(--accent-soft); color:var(--accent-ink)}
.est-changed{font-size:11px; color:var(--warn)}
.est-cprice{font-size:16px; font-weight:var(--font-weight-semibold); color:var(--ink)}
/* the cell editor */
dialog.est-celldlg{width:min(560px,94vw)}
.est-csub{margin:-6px 0 12px; color:var(--ink-soft); font-size:13px}
.est-seg{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px}
.est-seg button{flex:1 1 140px; background:var(--panel); border:1px solid var(--edge); color:var(--ink); box-shadow:none}
.est-seg button[aria-pressed="true"]{background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink)}
#c-on[hidden], #c-sections[hidden], #c-reset[hidden]{display:none !important}
#c-sections{margin-bottom:12px}
.est-preview{margin:12px 0 4px; padding:12px; border-radius:var(--radius-sm); background:var(--panel); border:1px solid var(--hairline); font-size:13px; color:var(--ink-soft); line-height:1.6}
/* the default items: a list that fits the page; a row's hours, or its sections and what they make */
.est-dgroup{font-size:11.5px; text-transform:uppercase; letter-spacing:.07em; color:var(--accent-ink); margin:20px 0 0; padding:6px 0; border-bottom:1px solid var(--hairline)}
.est-drow{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,400px) auto; gap:18px; align-items:center; padding:12px 0; border-bottom:1px solid var(--hairline)}
.est-dmain .chip{margin-left:4px}
.est-dmain .est-desc{margin-bottom:0}
.est-dset{display:grid; gap:6px}
.est-dhours{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px}
.est-dsec{display:flex; align-items:flex-end; gap:12px}
.est-dsec .est-h{width:90px}
.est-dsec .est-counter{margin-top:0}
.est-dbtns{display:flex; gap:6px; justify-content:flex-end; flex-wrap:wrap}
@media (max-width:760px){
  .est-head .est-fields{grid-template-columns:1fr}
  .est-hgrid{grid-template-columns:1fr 1fr}
  .est-rates{grid-template-columns:1fr}
  /* a phone has no room to hold the item column: it scrolls with the options, so it never covers a control */
  .est-table th.est-item, .est-table thead th.est-itemcol, .est-table tr.est-group th{position:static}
  .est-table .est-itemcol, .est-table .est-item{width:180px}
  .est-scroll{max-height:calc(100vh - 90px)}
  .est-drow{grid-template-columns:1fr; gap:10px}
  .est-dbtns{justify-content:flex-start}
}
/* shared with the client (rule 30): one block per link, its address, password, on/off and actions */
.est-shares{display:grid; gap:0}
.est-share{display:grid; grid-template-columns:minmax(0,1fr) 260px auto; gap:16px; align-items:center; padding:12px 0; border-bottom:1px solid var(--hairline)}
.est-share:last-child{border-bottom:0}
.est-link{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:4px 0; font-size:13px; word-break:break-all}
.est-share-set{display:flex; align-items:flex-end; gap:12px}
.est-share-set .est-h{flex:1}
.est-file{position:relative; overflow:hidden; cursor:pointer; display:inline-flex; align-items:center}
.est-file input{position:absolute; inset:0; opacity:0; cursor:pointer}
.est-slug span{white-space:nowrap; align-self:center; font-size:12px; color:var(--ink-soft)}
@media (max-width:760px){
  .est-share{grid-template-columns:1fr; gap:10px}
}
/* who else works on an estimation (0.43.0): an admin gives it to an employee */
.est-people{margin:0 0 14px; padding:12px 14px; border:1px solid var(--hairline); border-radius:var(--radius-sm); display:grid; gap:8px}
.est-people[hidden]{display:none !important}
.est-people label{margin:0}
.est-people .est-inline select{max-width:260px}
