/* Approvals hub (desktop, 2026-10-07): public/js/approvals-hub.js. Cockpit card system: 12px radius, theme tokens
   from app.css (light + dark via [data-theme]), pills .b/.b-g/.b-t/.b-a/.b-r, label floor ~10.5px.
   Two panes when the CONTENT box is wide enough, one column below. A container query, not a viewport media query:
   .main-wrap has zoom:1.25 on desktop, so viewport breakpoints mis-aim (memory: cockpit non-admin audit 10-05).
   760px of content = a ~1100px-wide window. */

/* sidebar badge on the Approvals mode button */
#modeApprovals{position:relative}
.ah-nb{position:absolute;top:3px;right:4px;min-width:17px;height:17px;padding:0 5px;border-radius:9px;background:var(--red);color:#fff;font-size:10px;font-weight:800;line-height:17px;text-align:center;box-shadow:0 0 0 2px var(--sidebar-bg)}
.ah-nb[hidden]{display:none}

.ah{container-type:inline-size;container-name:ah}
.ah-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.ah-h1{font-size:18px;font-weight:800;letter-spacing:-.01em}
.ah-sub{font-size:11.5px;color:var(--muted);margin-top:3px;line-height:1.7}
.ah kbd{display:inline-block;min-width:16px;padding:0 4px;margin:0 1px;border:1px solid var(--border-strong);border-bottom-width:2px;border-radius:4px;font:700 10.5px/15px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--muted);background:var(--fill);text-align:center}
.ah-tools{display:flex;gap:8px;align-items:center}
.ah-seg{display:inline-flex;border:1px solid var(--border-strong);border-radius:999px;overflow:hidden}
.ah-seg button{border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:700;padding:7px 14px;cursor:pointer}
.ah-seg button.on{background:var(--teal);color:var(--on-accent)}

.ah-chips{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}
.ah-chips.sm{margin:8px 0}
.ah-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border-strong);background:var(--card);color:var(--text);border-radius:999px;padding:6px 12px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.ah-chip:hover{background:var(--fill-hover)}
.ah-chip.on{background:var(--teal);border-color:transparent;color:var(--on-accent)}
.ah-chip .n{font-size:10.5px;font-weight:800;opacity:.75}

.ah-grid{display:grid;grid-template-columns:1fr;gap:14px;align-items:start}
@container ah (min-width:760px){
  .ah-grid{grid-template-columns:minmax(280px,38%) 1fr}
  /* The detail pane stays in view while the list scrolls; its body scrolls inside and the action bar is pinned.
     100vh is divided by the desktop zoom (1.25); minus the header so the action bar is on screen before any scroll. */
  .ah-detail{position:sticky;top:12px;max-height:calc(100vh / 1.25 - 110px);display:flex;flex-direction:column}
  .ah-d-body{flex:1;min-height:0;overflow-y:auto}
  .ah-list{max-height:none}
}

.ah-list{min-width:0}
.ah-search{width:100%;padding:9px 12px;border-radius:10px;border:1px solid var(--border-strong);background:var(--card);color:var(--text);font:inherit;font-size:12.5px;margin-bottom:8px}
.ah-search:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px var(--teal-glow)}
.ah-src-l{font-size:11.5px;color:var(--muted);padding:3px 2px}
.ah-src-l.err{color:var(--red)}
.ah-link{background:none;border:0;padding:0;color:var(--teal);font:inherit;font-weight:700;cursor:pointer;text-decoration:underline}

.ah-row{display:block;width:100%;text-align:left;background:var(--card);border:1px solid var(--border);border-radius:12px;padding:10px 12px;margin-bottom:6px;color:var(--text);font:inherit;cursor:pointer;box-shadow:var(--shadow);transition:border-color .12s,background .12s}
.ah-row:hover{border-color:var(--border-strong);background:var(--elev)}
.ah-row.on{border-color:var(--teal);box-shadow:0 0 0 2px var(--teal-glow)}
.ah-row.other{opacity:.78}
.ah-row.in-grp{border-radius:10px;box-shadow:none;margin:0 0 4px;padding:8px 10px;background:var(--fill)}
.ah-type{flex-shrink:0;font-size:10px}
.ah-client{font-size:11.5px;font-weight:700;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.ah-age{margin-left:auto;font-size:10.5px;color:var(--dim);white-space:nowrap;flex-shrink:0}
.ah-title{display:block;font-size:13px;font-weight:700;line-height:1.4;margin-top:4px;overflow-wrap:anywhere}
/* one line per card (2026-10-24, card-view.js): state word · title · the primary button (yours) or a two-word state (not yours) */
.ah-row.cv{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px 12px}
.ah-row.cv.in-grp{padding:7px 10px}
.ah-row.cv .b.sw{flex-shrink:0;font-size:10px;white-space:nowrap}
.ah-row.cv .ah-title{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ah-row-mark{font-size:10.5px;font-weight:600;color:var(--dim);margin-left:4px}
.ah-row .ah-wait,.ah-row .ah-overdue{flex:none;font-size:10.5px;font-weight:700;white-space:nowrap;margin-left:6px}
.ah-row .ah-wait{background:var(--fill);color:var(--muted)}
.ah-row .ah-wait[role=button]{cursor:pointer}
.ah-row .ah-wait[role=button]:hover{color:var(--text)}
.ah-wait-fold{margin:-2px 0 6px 18px;padding-left:8px;border-left:2px solid var(--border-strong)}
@media (max-width:768px){.ah-row .ah-overdue{display:none}}
.ah-row-pri{font-size:11.5px;padding:6px 12px;white-space:nowrap;flex-shrink:0}
.ah-row-pri.armed{background:var(--amber);border-color:transparent;color:#fff}
.ah-row-state{font-size:11px;font-weight:700;color:var(--muted);white-space:nowrap;flex-shrink:0;max-width:40%;overflow:hidden;text-overflow:ellipsis}
.ah-row-state.chev{font-size:16px;color:var(--dim);font-weight:400}
.ah-row.cv:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
.ah-grp-sumbox{margin:0 2px 6px}
.ah-grp-sumbox>summary{cursor:pointer;font-size:11px;font-weight:700;color:var(--muted);list-style:none;padding:2px 2px 4px}
.ah-grp-sumbox>summary::-webkit-details-marker{display:none}
.ah-grp-sumbox>summary::before{content:'▸ ';}
.ah-grp-sumbox[open]>summary::before{content:'▾ ';}
.ah-flags{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}
.ah-flags .b,.ah-d-eyebrow .b,.ah-li .b,.ah-steps .b,.ah-box-h .b,.ah-done .b{font-size:10px}

.ah-grp{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:10px 10px 6px;margin-bottom:6px;box-shadow:var(--shadow)}
.ah-grp-h{display:flex;align-items:center;gap:7px;padding:0 2px}
.ah-grp-note{font-size:11.5px;color:var(--amber);padding:2px 4px 6px;line-height:1.5}
.ah-grp-note a{color:inherit;font-weight:800}
.ah-grp-all{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 2px 6px}
.ah-grp-all .btn{font-size:11.5px;padding:7px 12px}

.ah-empty{margin:6px 0}
.ah-foot{font-size:10.5px;color:var(--dim);text-align:center;margin:10px 0 2px}
.ah-skel{height:62px;border-radius:12px;margin-bottom:6px;background:linear-gradient(90deg,var(--fill),var(--fill-hover),var(--fill));background-size:200% 100%;animation:ahSk 1.2s infinite linear}
@keyframes ahSk{0%{background-position:200% 0}100%{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.ah-skel{animation:none}}

.ah-donebox{margin-top:12px}
.ah-done-h{display:flex;align-items:center;gap:8px;width:100%;background:none;border:0;border-top:1px solid var(--border);padding:10px 2px 6px;color:var(--muted);font:inherit;font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;cursor:pointer}
.ah-done-h .n{font-weight:800;color:var(--text)}
.ah-done{display:flex;align-items:center;gap:8px;padding:6px 4px;border-bottom:1px solid var(--border);font-size:12px}
.ah-done.go{cursor:pointer}
.ah-done.go:hover{background:var(--fill)}
.ah-done .t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* detail */
.ah-detail{background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);min-width:0;overflow:hidden}
.ah-detail-empty{padding:42px 22px;text-align:center;color:var(--muted)}
.ah-detail-empty .ce-t{font-weight:800;color:var(--text);font-size:13.5px}
.ah-detail-empty .ce-s{font-size:11.5px;color:var(--dim);margin-top:6px}
.ah-d-head{padding:14px 18px 12px;border-bottom:1px solid var(--border)}
.ah-d-eyebrow{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.ah-d-title{font-size:17px;font-weight:800;margin-top:6px;line-height:1.3;overflow-wrap:anywhere}
.ah-d-eb{font-weight:600;letter-spacing:0;text-transform:none;font-size:11.5px;min-width:0;overflow-wrap:anywhere}
.ah-d-no{color:var(--muted);font-weight:700;font-size:13px;margin-right:2px}
.ah-d-marks{font-size:11px;color:var(--amber);margin-top:4px}
/* the opened card (2026-10-24): one sentence, at most three facts, the preview at 220px, one Details disclosure */
.ah-sentence{font-size:13.5px;line-height:1.5;margin:12px 0 8px;color:var(--text)}
.ah-sentence.next{color:var(--muted)}
.ah-fact{display:flex;align-items:baseline;gap:8px;font-size:12.5px;line-height:1.45;padding:7px 10px;margin:4px 0;border-radius:8px;border-left:3px solid var(--border-strong);background:var(--fill)}
.ah-fact.bad{border-left-color:var(--red)}
.ah-fact.warn{border-left-color:var(--amber)}
.ah-fact.go{cursor:pointer}
.ah-fact.go:hover{background:var(--fill-hover)}
.ah-fact-go{margin-left:auto;font-size:11px;font-weight:700;color:var(--teal);white-space:nowrap}
.ah-preview{height:220px;overflow:hidden;border:1px solid var(--border);border-radius:10px;background:#fff;transition:height .15s}
.ah-preview.is-full{height:560px}
.ah-preview iframe,.ah-preview object{display:block;width:100%;height:100%;border:0;margin:0}
.ah-preview-bar{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:6px 0 2px;flex-wrap:wrap}
.ah-preview-bar .ah-link{font-size:11.5px}
.ah-preview-note{font-size:12px;color:var(--muted);line-height:1.5;margin:0 0 4px}
.ah-preview-img img{display:block;max-width:100%;max-height:300px;border-radius:8px;border:1px solid var(--border)}
.ah-preview-img.grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-width:520px}
.ah-preview-img.grid img{width:100%;aspect-ratio:1;object-fit:cover;max-height:none}
.ah-clamp.l8{-webkit-line-clamp:8}
.ah-sql.clamp{max-height:200px}
.ah-more-text summary{list-style:none;cursor:pointer;margin-top:6px;display:inline-block}
.ah-more-text summary::-webkit-details-marker{display:none}
.ah-details{margin-top:14px;border-top:1px solid var(--border)}
.ah-details>summary{cursor:pointer;list-style:none;padding:12px 0 8px;font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.ah-details>summary::-webkit-details-marker{display:none}
.ah-details>summary::before{content:'▸';font-size:10px}
.ah-details[open]>summary::before{content:'▾'}
.ah-details-hint{font-weight:600;letter-spacing:0;text-transform:none;font-size:11px;color:var(--dim)}
.ah-d-body{padding:4px 18px 16px}
.ah-sec{font-size:10.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin:16px 0 6px}
.ah-box{border:1px solid var(--border);border-radius:10px;padding:10px 12px;margin-bottom:8px;font-size:12.5px;line-height:1.55;background:var(--card)}
.ah-box-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.ah-li{padding:5px 0;border-top:1px solid var(--border);font-size:12.5px;line-height:1.5}
.ah-li:first-child{border-top:0}
.ah-li.int{color:var(--muted)}
.ah-line{font-size:12.5px;padding:4px 8px;border-radius:6px;margin:3px 0;line-height:1.5;overflow-wrap:anywhere}
.ah-line.add{background:color-mix(in srgb,var(--green) 10%,transparent);border-left:3px solid var(--green)}
.ah-line.rem{background:color-mix(in srgb,var(--red) 8%,transparent);border-left:3px solid var(--red);text-decoration:line-through;color:var(--muted)}
.ah-pre{white-space:pre-wrap;word-break:break-word;font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;padding:10px 12px;border-radius:10px;background:var(--fill);margin:0;border-left:3px solid var(--border-strong);max-height:260px;overflow:auto}
.ah-pre.add{border-left-color:var(--green)}
.ah-pre.rem{border-left-color:var(--red)}
.ah-sql{white-space:pre-wrap;word-break:break-word;font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;padding:10px 12px;border-radius:10px;background:var(--fill);border:1px solid var(--border);max-height:340px;overflow:auto;margin:0}
.ah-ul{margin:0 0 0 18px;font-size:12.5px;line-height:1.6}
.ah-kv{display:flex;gap:8px 22px;flex-wrap:wrap;margin:12px 0 4px;font-size:12.5px}
.ah-kv b{display:block;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:2px}
.ah-p{font-size:12.5px;line-height:1.55;margin:12px 0 4px}
.ah-dim{font-size:11.5px;color:var(--muted);line-height:1.5}
.ah-warn{margin:12px 0 4px;padding:9px 12px;border-radius:10px;font-size:12px;line-height:1.55;background:color-mix(in srgb,var(--amber) 10%,transparent);border:1px solid color-mix(in srgb,var(--amber) 28%,transparent)}
.ah-bad{margin:12px 0 4px;padding:9px 12px;border-radius:10px;font-size:12px;line-height:1.55;background:color-mix(in srgb,var(--red) 9%,transparent);border:1px solid color-mix(in srgb,var(--red) 28%,transparent)}
.ah-quote{font-size:12.5px;line-height:1.55;border-left:3px solid var(--border-strong);padding:4px 10px;margin:6px 0}
.ah-steps{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:12px 0 4px}
.ah-links{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0 2px}
.ah-links .btn,.ah-a{font-size:11.5px;padding:7px 12px;text-decoration:none}
.ah-frame{border:1px solid var(--border);border-radius:10px;overflow:hidden;background:#fff;margin-top:6px}
.ah-frame iframe{width:100%;border:0;display:block;background:#fff}
.ah-pw{font:13px ui-monospace,monospace;padding:4px 8px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--text);margin-left:6px}
.ah-detail .crewcard{box-shadow:none;margin-top:10px}

/* action bar, pinned to the bottom of the detail pane */
.ah-bar{border-top:1px solid var(--border);padding:10px 18px 12px;background:var(--card);position:sticky;bottom:0}
.ah-bar-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ah-says{flex-basis:100%;font-size:11.5px;color:var(--muted);line-height:1.45}
.ah-bar .btn{font-size:12px;padding:8px 14px}
.ah-bar .btn kbd{border-color:currentColor;color:inherit;background:transparent;opacity:.75;margin-left:4px}
.ah-bar .btn.armed{background:var(--amber);border-color:transparent;color:#fff}
.ah-bar .btn:disabled{opacity:.5;cursor:not-allowed}
.ah-msg{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5;max-height:120px;overflow:auto;white-space:pre-wrap}
.ah-msg:empty{display:none}
.ah-msg.err{color:var(--red)}
.ah-msg.warn{color:var(--amber);font-weight:700}
.ah-panel{border:1px solid var(--border);border-radius:10px;padding:10px 12px;margin-bottom:10px;background:var(--fill)}
.ah-panel-t{font-size:12.5px;font-weight:700;line-height:1.5}
.ah-panel textarea{width:100%;min-height:52px;margin:6px 0 8px;padding:8px 10px;border-radius:8px;border:1px solid var(--border-strong);background:var(--card);color:var(--text);font:inherit;font-size:12.5px;resize:vertical}
.ah-panel textarea:focus{outline:none;border-color:var(--teal)}
.ah-check{display:flex;gap:12px;align-items:center;font-size:12px;margin:2px 0 8px}

/* pointer card left in the category tabs (Portals, New builds, SEO, Crew Control, Exec Home) */
.ah-ptr{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:14px 16px;margin-bottom:14px;border-radius:12px}
.ah-ptr b{font-size:14px}
.ah-ptr .ah-dim{margin-top:2px}

/* 2026-10-13: blocking "working" overlay while a decision is in flight (nothing else clickable) */
.ah-busy{position:fixed;inset:0;z-index:12000;display:none;align-items:center;justify-content:center;background:rgba(8,12,16,.45);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.ah-busy.on{display:flex}
body.ah-busy-lock{overflow:hidden}
.ah-busy-card{width:min(420px,calc(100vw - 32px));background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:16px;padding:26px 24px 20px;box-shadow:0 24px 60px rgba(0,0,0,.28);text-align:center;outline:none}
.ah-busy-spin{width:42px;height:42px;margin:0 auto 14px;border-radius:50%;border:4px solid var(--teal-dim);border-top-color:var(--teal);animation:ahSpin .8s linear infinite}
.ah-busy-t{font-weight:800;font-size:15px;line-height:1.35}
.ah-busy-s{margin-top:6px;font-size:13px;color:var(--muted);min-height:18px}
.ah-busy-bar{position:relative;height:4px;margin:16px 0 8px;border-radius:4px;background:var(--teal-dim);overflow:hidden}
.ah-busy-bar i{position:absolute;top:0;bottom:0;width:35%;border-radius:4px;background:var(--teal);animation:ahSlide 1.4s ease-in-out infinite}
.ah-busy-e{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.ah-busy-long{margin-top:14px;font-size:12px;color:var(--muted);line-height:1.5}
.ah-busy-long .btn{display:block;margin:10px auto 0}
@keyframes ahSpin{to{transform:rotate(360deg)}}
@keyframes ahSlide{0%{left:-35%}100%{left:100%}}
@media (prefers-reduced-motion:reduce){.ah-busy-spin{animation-duration:2.4s}.ah-busy-bar i{animation:none;left:0;width:100%;opacity:.5}}
/* group header is a real button now ("2 to review ›" opens the first card) */
button.ah-grp-h{width:100%;background:none;border:0;font:inherit;color:inherit;text-align:left;cursor:pointer;padding:4px 2px;border-radius:8px}
button.ah-grp-h:hover{background:var(--fill)}
button.ah-grp-h .ah-age{margin-left:auto}
.ah-src-banner{padding:8px 10px;border:1px solid color-mix(in srgb,var(--red) 35%,transparent);border-radius:10px;background:color-mix(in srgb,var(--red) 6%,transparent)}
.ah-done .ah-link{margin-left:6px;font-size:11.5px}
/* batch cards (2026-10-13): collapsed by default with the AI summary; expand to see the rows */
.ah-grp-sum{font-size:12.5px;line-height:1.5;color:var(--text);padding:4px 4px 6px}
.ah-grp-sum-wait{color:var(--muted);font-style:italic}
.ah-grp-check{margin-top:5px;font-size:12px;color:var(--muted)}
.ah-grp-check b{color:var(--amber);font-weight:800}
.ah-grp.is-closed .ah-grp-all{padding-top:2px}

/* Sections (2026-10-13): with "All" selected the list is cut by type, each header collapsible with a count; the type chips
   become one <select> when the box is narrower than 560px (the same ah container query as the two-pane layout). */
.ah-sect{margin:0 0 10px}
.ah-sect-h{display:flex;align-items:center;gap:8px;width:100%;border:0;background:none;padding:6px 2px;font:inherit;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);cursor:pointer;text-align:left}
.ah-sect-h:hover{color:var(--text)}
.ah-sect-h .n{font-size:10.5px;font-weight:800;color:var(--text);background:var(--fill);border-radius:999px;padding:1px 7px}
.ah-sect-h .ah-chev{margin-left:auto;font-size:12px}
.ah-sect.is-closed .ah-sect-h{opacity:.8}
.ah-sect-b{margin-top:2px}
.ah-chips-sel{display:none;width:100%;font:inherit;font-size:12.5px;padding:8px 10px;border:1px solid var(--border-strong);border-radius:10px;background:var(--card);color:var(--text);margin:0 0 12px}
@container ah (max-width:559px){.ah-chips .ah-chip{display:none}.ah-chips .ah-chips-sel{display:block}}
.ah-foot.ah-dim{color:var(--dim);font-size:11px}
/* Send to… panel (2026-10-13): the teammate picker */
.ah-sel{display:block;width:100%;font:inherit;font-size:12.5px;padding:8px 10px;border:1px solid var(--border-strong);border-radius:10px;background:var(--card);color:var(--text);margin:0 0 8px}
/* Publish now / Take back confirm (2026-10-13 evening): a real modal, not a two-press arm. Reuses the .ah-busy overlay. */
.pn-card{text-align:left;width:min(460px,calc(100vw - 32px))}
.pn-card h3{margin:0 0 10px;font-size:17px;font-weight:800;line-height:1.3}
.pn-card p{margin:0 0 10px;font-size:13.5px;line-height:1.5}
.pn-card ul{margin:0 0 10px 18px;padding:0;font-size:13px;line-height:1.5;color:var(--muted)}
.pn-warn{color:var(--red);font-weight:700}
.pn-acts{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:16px}
.pn-acts button{font:inherit;font-size:13.5px;font-weight:700;border-radius:10px;padding:10px 16px;cursor:pointer;border:1px solid var(--border);background:var(--card);color:var(--text)}
.pn-acts .pn-keep{background:var(--teal);border-color:var(--teal);color:#fff}
.pn-acts .pn-go{color:var(--red);border-color:color-mix(in srgb,var(--red) 45%,var(--border))}
.pn-acts button:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
@media (max-width:520px){.pn-acts{flex-direction:column-reverse}.pn-acts button{width:100%}}

/* Line-by-line meeting review (2026-10-17): one line per screen, ticker + progress bar, big Client / Internal buttons.
   Full-screen overlay on body (outside .main-wrap zoom), 12px radii, theme tokens only. */
.ah-lr-cta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 4px}
.ah-lr{position:fixed;inset:0;z-index:9000;background:rgba(5,12,18,.62);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:24px}
.ah-lr-card{width:min(860px,100%);max-height:calc(100vh - 48px);display:flex;flex-direction:column;background:var(--card);color:var(--text);border:1px solid var(--border-strong);border-radius:12px;box-shadow:var(--shadow);overflow:hidden}
.ah-lr-top{display:flex;align-items:center;gap:14px;padding:16px 20px 10px}
.ah-lr-who{flex:1;min-width:0;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ah-lr-who b{color:var(--text)}
.ah-lr-count{font-size:15px;font-weight:800;color:var(--text);white-space:nowrap}
.ah-lr-x{background:none;border:0;color:var(--muted);font-size:18px;cursor:pointer;padding:4px 6px;border-radius:12px}
.ah-lr-x:hover{color:var(--text);background:var(--fill)}
.ah-lr-bar{height:6px;margin:0 20px;background:var(--fill);border-radius:12px;overflow:hidden}
.ah-lr-bar span{display:block;height:100%;background:var(--teal);border-radius:12px;transition:width .25s}
.ah-lr-body{padding:22px 24px 8px;overflow-y:auto;min-height:220px}
.ah-lr-tags{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.ah-lr-sec{font-size:11px;font-weight:800;letter-spacing:1.2px;text-transform:uppercase;color:var(--teal)}
.ah-lr-proj{font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:12px;background:color-mix(in srgb,var(--pc) 18%,transparent);color:var(--text);border:1px solid color-mix(in srgb,var(--pc) 45%,transparent)}
.ah-lr-text{font-size:21px;line-height:1.5;font-weight:500;color:var(--text);white-space:pre-wrap}
.ah-lr-edit{width:100%;font:inherit;font-size:18px;line-height:1.5;padding:12px 14px;border:1.5px solid var(--teal);border-radius:12px;background:var(--fill);color:var(--text);resize:vertical}
.ah-lr-meta{margin-top:12px;font-size:13px;color:var(--muted)}
.ah-lr-acts{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;padding:14px 24px}
.ah-lr-big{display:flex;align-items:center;justify-content:center;gap:10px;min-height:60px;padding:0 20px;border-radius:12px;font:inherit;font-size:16px;font-weight:800;cursor:pointer;border:2px solid var(--border-strong);background:var(--fill);color:var(--text);transition:transform .06s,background .15s}
.ah-lr-big:active{transform:scale(.98)}
.ah-lr-big kbd,.ah-lr-approve kbd{font:inherit;font-size:11.5px;font-weight:800;padding:2px 7px;border-radius:6px;border:1px solid currentColor;opacity:.75}
.ah-lr-big.client{border-color:color-mix(in srgb,var(--teal) 55%,transparent);color:var(--teal)}
.ah-lr-big.client.on{background:var(--teal);border-color:var(--teal);color:#05202a}
.ah-lr-big.internal{border-color:color-mix(in srgb,var(--amber) 55%,transparent);color:var(--amber)}
.ah-lr-big.internal.on{background:var(--amber);border-color:var(--amber);color:#2a1a02}
.ah-lr-big.edit{min-width:120px}
.ah-lr-big.edit.on{border-color:var(--teal);color:var(--teal)}
.ah-lr-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 24px 18px;border-top:1px solid var(--border)}
.ah-lr-nb{background:none;border:1px solid var(--border-strong);color:var(--text);font:inherit;font-size:14px;font-weight:700;padding:10px 16px;border-radius:12px;cursor:pointer;min-height:44px}
.ah-lr-nb:hover:not([disabled]){border-color:var(--teal);color:var(--teal)}
.ah-lr-nb[disabled]{opacity:.35;cursor:default}
.ah-lr-approve{display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:0 22px;border-radius:12px;border:0;background:var(--green);color:#05231a;font:inherit;font-size:16px;font-weight:800;cursor:pointer}
.ah-lr-approve[disabled]{opacity:.4;cursor:default}
.ah-lr-split{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.ah-lr-split:has(>div:nth-child(4)){grid-template-columns:repeat(4,1fr)}   /* + "to the board" (PM Phase 2) */
.ah-lr-split>div{background:var(--fill);border:1px solid var(--border);border-radius:12px;padding:14px 16px}
.ah-lr-split b{display:block;font-size:2rem;line-height:1.1;color:var(--text)}
.ah-lr-split span{font-size:12px;color:var(--muted);font-weight:600}
.ah-lr-plabel{font-size:11px;font-weight:800;letter-spacing:1.1px;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.ah-lr-preview{border:1px solid var(--border);border-radius:12px;padding:14px 18px;background:var(--fill)}
.ah-lr-psec+.ah-lr-psec{margin-top:12px}
.ah-lr-preview ul,.ah-lr-int ul{margin:4px 0 0;padding-left:20px}
.ah-lr-preview li,.ah-lr-int li{font-size:14px;line-height:1.55;margin:4px 0}
.ah-lr-int{margin-top:12px;font-size:13px;color:var(--muted)}
.ah-lr-int summary{cursor:pointer;font-weight:700}
@media (max-width:640px){
  .ah-lr{padding:0;align-items:stretch}
  .ah-lr-card{max-height:none;height:100%;border-radius:0}
  .ah-lr-text{font-size:18px}
  .ah-lr-acts{grid-template-columns:1fr 1fr}
  .ah-lr-big.edit{grid-column:1/-1;min-height:48px}
  .ah-lr-big kbd,.ah-lr-approve kbd{display:none}
  .ah-lr-split b{font-size:1.4rem}
  .ah-lr-split:has(>div:nth-child(4)){grid-template-columns:repeat(2,1fr)}
}

/* Changes (2026-10-17): the cockpit's own deploys; write-ups rendered by md-lite.js */
.ah-change-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--amber,#d97706);margin-left:6px;vertical-align:middle}
.ah-md{font-size:12.5px;line-height:1.5}.ah-md h2{font-size:14px;margin:12px 0 4px}.ah-md h3{font-size:13px;margin:10px 0 4px}.ah-md h4{font-size:12.5px;margin:8px 0 2px}.ah-md p{margin:6px 0}.ah-md ul,.ah-md ol{margin:4px 0 6px 18px;padding:0}.ah-md li{margin:2px 0}.ah-md code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;background:var(--fill,rgba(0,0,0,.05));padding:0 3px;border-radius:3px}.ah-md pre{white-space:pre-wrap;background:var(--fill,rgba(0,0,0,.05));padding:8px;border-radius:6px;font-size:11.5px}
html.ah-lr-open,html.ah-lr-open body{overflow:hidden}
/* Parked tasks (2026-10-19): the agent's description folds to two lines; "more" opens it */
.ah-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ah-clamp.is-open{display:block;-webkit-line-clamp:unset}

/* In motion + honest sources (2026-10-19, scratchpad/queue/CONTRACT.md): the stage line on a row that a person already
   decided, red when it is past its expected time; the per-section state line (failed red with Retry, off for your role,
   stale cards from a failed load); "0 for you · N for others · show" on an empty Mine section; the in-flight marker on a
   card whose decision was released to the background after 60 s. Theme tokens only. */
.ah-motion{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;color:var(--teal);padding:2px 0;line-height:1.4;overflow-wrap:anywhere}
.ah-motion::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor;flex-shrink:0;animation:ahPulse 1.6s ease-in-out infinite}
.ah-motion.overdue{color:var(--red)}
.ah-motion.overdue::before{animation:none}
@keyframes ahPulse{0%,100%{opacity:.35}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.ah-motion::before{animation:none}}
.ah-sect-state{display:block;font-size:11px;line-height:1.5;color:var(--muted);padding:0 2px 6px;text-transform:none;letter-spacing:0;font-weight:600}
.ah-sect-state.err{color:var(--red)}
.ah-sect-state.off{color:var(--dim);font-weight:500}
.ah-sect.is-failed .ah-sect-h{color:var(--red)}
.ah-sect-oth{font-size:10.5px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--muted)}
.ah-sect-oth .ah-link{font-size:10.5px}
.ah-sect-new{font-size:9.5px;text-transform:none;letter-spacing:0}
.b.b-stale{background:transparent;border:1px dashed color-mix(in srgb,var(--amber) 60%,transparent);color:var(--amber)}
.b.b-inflight{border:1px solid color-mix(in srgb,var(--amber) 40%,transparent)}
.ah-motion.settled{color:var(--green)}
.ah-motion.settled::before{animation:none}
.ah-motion-why{display:block;font-size:11px;color:var(--red);line-height:1.4;overflow-wrap:anywhere}

/* Batch 1.6a (2026-10-22): three group chips + the type filter as a quiet select; a card's extra actions under More */
.ah-chips{align-items:center}
.ah-chips .ah-type-sel{display:inline-block;width:auto;margin:0 0 0 auto;padding:6px 10px;border-radius:999px}
@container ah (max-width:559px){.ah-chips .ah-chip{display:inline-flex}.ah-chips .ah-type-sel{margin-left:0;width:100%}}
.ah-more{position:relative;display:inline-block}
.ah-more summary{list-style:none;cursor:pointer}
.ah-more summary::-webkit-details-marker{display:none}
.ah-more[open] summary{background:var(--fill-hover)}
.ah-more-menu{position:absolute;bottom:calc(100% + 6px);left:0;min-width:220px;background:var(--card);border:1px solid var(--border-strong);border-radius:10px;box-shadow:var(--shadow);padding:6px;display:flex;flex-direction:column;gap:4px;z-index:5}
.ah-more-menu .btn{justify-content:flex-start;width:100%;text-align:left}

/* ── result panel + Done today (2026-10-26, card-view.js resultHtml / doneTodayHtml; hub pane and phone sheet share these) ── */
.cv-res{margin:12px 0;padding:14px 16px;border-radius:12px;border:1px solid var(--border,#e5e7eb);background:var(--card,#fff)}
.cv-res-done{border-color:color-mix(in srgb,var(--green,#14b8a6) 40%,transparent)}
.cv-res-needs_you{border-color:color-mix(in srgb,var(--amber,#d97706) 45%,transparent);background:color-mix(in srgb,var(--amber,#d97706) 6%,var(--card,#fff))}
.cv-res-failed{border-color:color-mix(in srgb,var(--red,#dc2626) 40%,transparent)}
.cv-res-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cv-res-h .b{font-size:11px}
.cv-res-t{font-size:13px;font-weight:700;color:var(--text,#111)}
.cv-res-text{margin:8px 0 10px;font-size:13.5px;line-height:1.5;color:var(--text,#111)}
.cv-res-acts{display:flex;gap:8px;flex-wrap:wrap}
.cv-res-btn{display:inline-flex;align-items:center;gap:4px;padding:8px 14px;border-radius:12px;border:1px solid var(--border-strong,#d1d5db);background:var(--fill,#f3f4f6);color:var(--text,#111);font:inherit;font-size:13px;font-weight:700;text-decoration:none;cursor:pointer}
.cv-res-btn.pri{background:var(--teal,#0d9488);border-color:transparent;color:var(--on-accent,#fff)}
.cv-res-btn.sm{padding:4px 10px;font-size:11.5px}
.cv-res-btn:disabled{opacity:.5;cursor:default}
.cv-res-where{margin-top:8px;font-size:11px;color:var(--muted,#6b7280)}
.cv-res-wait{margin-top:6px;font-size:11px;color:var(--muted,#6b7280)}
.cv-suggest{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 8px}
.cv-suggest-l{width:100%;font-size:11px;color:var(--muted,#6b7280)}
.cv-today{margin:0 0 10px;border:1px solid var(--border,#e5e7eb);border-radius:12px;padding:6px 10px;background:var(--card,#fff)}
.cv-today>summary{cursor:pointer;font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#6b7280);padding:4px 0}
.cv-today>summary .n{color:var(--text,#111);margin-left:4px}
.cv-today-row{display:flex;align-items:center;gap:8px;padding:6px 0;border-top:1px solid var(--border,#e5e7eb);font-size:12px}
.cv-today-row .b{font-size:11px;flex:none}
.cv-today-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text,#111)}
.cv-today-acts{display:flex;gap:6px;flex:none}
.cv-today-sub{margin-top:6px;padding-top:6px;border-top:1px solid var(--border,#e5e7eb);font-size:11px;font-weight:800;color:var(--muted,#6b7280);text-transform:uppercase;letter-spacing:.05em}
@media (max-width:768px){.cv-today-row{flex-wrap:wrap}.cv-today-t{white-space:normal}.cv-today-acts{width:100%}}

/* audience: a quiet Change link that opens three pills (2026-10-26, replaced the native select) */
.ah-aud-link{border:0;background:none;padding:0 0 0 6px;font:inherit;font-size:12px;font-weight:600;color:var(--accent,#0a8a88);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.ah-aud-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.ah-aud-pills[hidden]{display:none}
.ah-aud-pill{border:1px solid var(--border-strong);background:var(--card);color:var(--text);border-radius:999px;padding:4px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.ah-aud-pill.on{background:var(--accent,#0a8a88);border-color:var(--accent,#0a8a88);color:#fff}
.ah-aud-pill:hover{border-color:var(--accent,#0a8a88)}

/* Changes log: category chips, search, and a link to the live screen (2026-10-26).
   Every row used to link to a frozen Netlify build, which looked identical to the live cockpit. */
.ah-chg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px 10px; }
.ah-chg-chip {
  font-size: 11px; line-height: 1; padding: 6px 10px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--border); color: var(--muted); background: transparent; white-space: nowrap;
}
.ah-chg-chip b { font-weight: 700; opacity: .65; margin-left: 2px; }
.ah-chg-chip:hover { border-color: var(--teal); color: var(--text); }
.ah-chg-chip.on { background: var(--teal); border-color: transparent; color: #fff; }
.ah-chg-chip.on b { opacity: .8; }
.ah-chg-q {
  flex: 1 1 140px; min-width: 120px; font-size: 12px; padding: 6px 10px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--fill); color: var(--text);
}
.ah-chg-q:focus { outline: none; border-color: var(--teal); }
.ah-chg-go {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--teal);
  text-decoration: none; padding: 2px 8px; border-radius: 7px; border: 1px solid transparent; white-space: nowrap;
}
.ah-chg-go:hover { border-color: var(--teal); }
/* failed cards say why and who fixes it (2026-10-26): the reason under the row title, the Done today second line, the pane's details */
.ah-tw{display:block;min-width:0}
.ah-row.cv .ah-tw .ah-title{display:block}
.ah-row-why{display:block;font-size:11.5px;font-weight:500;line-height:1.35;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.ah-sentence.fail{color:var(--text);border-left:3px solid var(--red);padding-left:10px}
.ah-fail-acts{font-size:12.5px;margin:-4px 0 8px}
.ah-fail-d{font-size:12px;margin:0 0 10px;color:var(--muted)}
.ah-fail-d summary{cursor:pointer;font-weight:600}
.ah-fail-li{padding:3px 0;overflow-wrap:anywhere}
.cv-today-row.has-why{flex-wrap:wrap}
.cv-today-why{flex-basis:100%;font-size:11.5px;line-height:1.4;color:var(--muted);padding-left:2px;overflow-wrap:anywhere}
.cv-today-why b{color:var(--text);font-weight:600}
@media (max-width:768px){.ah-row-why{white-space:normal}}
/* say each thing once (2026-10-28, text-sim.js): folded repeats under the line that stays */
.ah-also{font-weight:600}
.ah-fold{margin-top:8px;font-size:13px;color:var(--muted)}
.ah-fold summary{cursor:pointer}
.ah-fold ul{margin:6px 0 0;padding-left:18px}
.ah-fold li{margin:4px 0;line-height:1.4}
.ah-fold-row{margin-top:6px}
/* Money chip (2026-10-28, card-view.js moneyHtml): every money sentence on a card, the trigger highlighted, labelled */
.cv-money{font-size:12.5px;line-height:1.45}
.cv-money>summary{cursor:pointer;list-style:revert}
.cv-money-chip{display:inline-block;font-size:11px;font-weight:800;padding:1px 8px;border-radius:999px;background:rgba(245,158,11,.16);color:var(--amber,#b45309);border:1px solid rgba(245,158,11,.45)}
.cv-money-who{color:var(--muted,#6b7280);font-size:11.5px}
.cv-money-ul{margin:6px 0 2px;padding-left:16px}
.cv-money-li{margin:3px 0;word-break:break-word}
.cv-money-li mark{background:rgba(245,158,11,.28);color:inherit;border-radius:3px;padding:0 2px}
.cv-money-k{display:inline-block;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.02em;padding:0 6px;border-radius:4px;margin-right:4px;border:1px solid var(--border,#d1d5db);color:var(--muted,#6b7280)}
.cv-money-li.k-fee .cv-money-k,.cv-money-li.k-contract .cv-money-k{border-color:rgba(239,68,68,.5);color:var(--red,#dc2626)}
.cv-money-li.k-pricing .cv-money-k{border-color:rgba(245,158,11,.55);color:var(--amber,#b45309)}
.cv-money-li.k-value .cv-money-k,.cv-money-li.k-client_money .cv-money-k{border-color:rgba(16,185,129,.5);color:var(--green,#059669)}
.cv-money-s{font-size:11px;color:var(--muted,#6b7280)}
.cv-money-fact{display:block}
/* receipts + Approve-off line (2026-10-28, plan-approvals-that-work Phase 1) */
.ah-receipt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; line-height: 1.4; margin: 0 0 8px; }
.ah-receipt .ah-age { margin-left: auto; }
.ah-receipt.st-refused, .ah-receipt.st-failed { color: var(--text, inherit); }
.ah-apoff { margin: 0 0 8px; }
.ah-rc-list { margin: 4px 0 10px; }
.ah-rc-list .ah-done { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.ah-rc-list .ah-receipt { margin: 0; }
