
:root{--bg:#F3F5F9;--surface:#FFFFFF;--surface-2:#EBEFF5;--ink:#0D1B2A;--ink-2:#465669;--ink-3:#5E6B7B;--line:#D3DBE6;--line-2:#BCC7D6;--primary:#1B365D;--on-primary:#FFFFFF;--header:#0F2440;--on-header:#EAF0F8;--ok:#2E7353;--ok-bg:#E2F1E9;--warn:#8C5A14;--warn-bg:#FBEFD9;--bad:#A23B33;--bad-bg:#F8E4E1;--info:#28507F;--info-bg:#E4EDF8;--r:10px;--shadow:0 1px 2px rgba(13,27,42,.06),0 2px 8px rgba(13,27,42,.05)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--bg:#0A1320;--surface:#101C2C;--surface-2:#16263A;--ink:#E6ECF4;--ink-2:#AAB8C9;--ink-3:#8394A8;--line:#22354B;--line-2:#2E4560;--primary:#8DB3E8;--on-primary:#0A1320;--header:#152B4E;--on-header:#E6ECF4;--ok:#6CC59A;--ok-bg:#12302A;--warn:#E3B062;--warn-bg:#352812;--bad:#F08A80;--bad-bg:#3A1A18;--info:#9DC0EE;--info-bg:#15283F}}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 Archivo,'Helvetica Neue',Arial,sans-serif}
.top{background:var(--header);color:var(--on-header);position:sticky;top:0;z-index:5}
.top-in{max-width:1180px;margin:0 auto;padding:10px 16px;display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.brand{font-weight:800;letter-spacing:.12em;font-size:.9em}
.nav{display:flex;gap:4px;flex-wrap:wrap;flex:1 1 auto;min-width:0}.nav::-webkit-scrollbar{display:none}
.nav button{background:transparent;border:0;color:var(--on-header);opacity:.75;font:inherit;font-weight:600;padding:7px 11px;border-radius:8px;cursor:pointer;white-space:nowrap;min-height:38px}
.nav button.on{opacity:1;background:rgba(255,255,255,.14)}
.who{margin-left:auto;flex:0 1 auto;min-width:0;display:flex;align-items:center;gap:6px}.whotext{opacity:.8;min-width:0;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page{max-width:1180px;margin:18px auto 60px;padding:0 16px;display:flex;flex-direction:column;gap:14px}
.spin{width:22px;height:22px;border:3px solid var(--line-2);border-top-color:var(--primary);border-radius:50%;animation:sp .9s linear infinite;display:inline-block;flex:none}@keyframes sp{to{transform:rotate(360deg)}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:10px;box-shadow:var(--shadow);min-width:0}
.card.note{background:var(--info-bg);color:var(--info)}.card.warnbox{background:var(--warn-bg);color:var(--warn)}.card.focus{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary)}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:14px}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
/* a short form on one line: each field a column with its label, the button at the bottom, never stretched */
.inlineform{align-items:flex-end}.inlineform label{display:flex;flex-direction:column;gap:4px;flex:1 1 180px;min-width:0}.inlineform .btn{flex:0 0 auto}.spread{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.stack{display:flex;flex-direction:column;gap:8px}
.chip{display:inline-block;padding:2px 10px;border-radius:999px;font-size:.78em;font-weight:600;background:var(--surface-2);color:var(--ink-2);white-space:nowrap}
.chip.ok{background:var(--ok-bg);color:var(--ok)}.chip.warn,.chip.help{background:var(--warn-bg);color:var(--warn)}.chip.bad{background:var(--bad-bg);color:var(--bad)}.chip.info,.chip.note{background:var(--info-bg);color:var(--info)}.chip.test{background:var(--surface-2);color:var(--ink-3)}
.muted{color:var(--ink-2)}.small{font-size:.88em}.tiny{font-size:.78em}
h1{font-size:1.35em;margin:0}h2{font-size:1.08em;margin:0}h3,h2.h3{font-size:.98em;margin:0}
.btn{min-height:40px;padding:7px 14px;border-radius:8px;border:1px solid var(--line-2);background:var(--surface);color:var(--ink);font:inherit;font-weight:600;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px}
.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}.btn.small{min-height:34px;padding:4px 10px;font-size:.9em}.btn.quiet{border-color:transparent;background:transparent;color:var(--primary)}.btn.danger{color:var(--bad)}
.btn[disabled]{opacity:.5;cursor:not-allowed}
textarea,input,select{font:inherit;color:var(--ink);background:var(--surface);border:1px solid var(--line-2);border-radius:8px;padding:7px 9px;min-height:40px;max-width:100%}
textarea{width:100%;min-height:70px}
#app [aria-invalid="true"]{border-color:var(--bad);box-shadow:inset 0 0 0 1px var(--bad)}
#app [aria-invalid="true"]:focus{border-color:var(--bad);outline:3px solid var(--bad-bg);outline-offset:1px}
.ferr{display:flex;gap:6px;align-items:flex-start;color:var(--bad);font-size:.86em;font-weight:600;margin-top:3px;line-height:1.35}
.ferr::before{content:"";flex:none;width:15px;height:15px;margin-top:1px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M10 1.8a8.2 8.2 0 1 0 0 16.4 8.2 8.2 0 0 0 0-16.4zm0 3.9c.55 0 1 .45 1 1v4.1a1 1 0 1 1-2 0V6.7c0-.55.45-1 1-1zm0 7.4a1.15 1.15 0 1 1 0 2.3 1.15 1.15 0 0 1 0-2.3z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M10 1.8a8.2 8.2 0 1 0 0 16.4 8.2 8.2 0 0 0 0-16.4zm0 3.9c.55 0 1 .45 1 1v4.1a1 1 0 1 1-2 0V6.7c0-.55.45-1 1-1zm0 7.4a1.15 1.15 0 1 1 0 2.3 1.15 1.15 0 0 1 0-2.3z'/%3E%3C/svg%3E") center/contain no-repeat}
.form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:10px}
.form label{display:flex;flex-direction:column;gap:4px;font-size:.86em;font-weight:600;color:var(--ink-2)}
.form label.wide{grid-column:1/-1}
.form input,.form select,.form textarea{width:100%;font-weight:400}
.list{display:flex;flex-direction:column}
.item{display:flex;flex-direction:column;gap:6px;padding:12px 0;border-top:1px solid var(--line)}.item:first-child{border-top:0}
.item.late{background:linear-gradient(90deg,var(--bad-bg),transparent 40%)}
table.t{width:100%;border-collapse:collapse;font-size:.92em}
table.t th,table.t td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line);vertical-align:top}
table.t th{font-size:.82em;color:var(--ink-3);font-weight:600}
table.t td.num,table.t th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
table.t tr.tot td{font-weight:700}
table.t tr.click{cursor:pointer}table.t tr.click:hover td{background:var(--surface-2)}
.twrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
details>summary{cursor:pointer;font-weight:600;padding:6px 0}
.advice{margin:0;padding-left:18px;font-size:.88em}.advice li.warn{color:var(--warn)}.advice li.ok{color:var(--ok)}.advice li.info{color:var(--ink-2)}
.files{margin:0;padding-left:18px;font-size:.88em}
.kpi{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.tbar{display:flex;height:10px;margin:4px 0 6px;border-radius:5px;overflow:hidden;background:var(--surface-2)}.tbar i{display:block;height:100%}.tbar .gc,.tdot.gc{background:var(--warn)}.tbar .client,.tdot.client{background:var(--info)}.tbar .agency,.tdot.agency{background:var(--ink-3)}
.tside{display:inline-flex;align-items:center;gap:5px;margin-right:12px;white-space:nowrap}.tdot{width:9px;height:9px;border-radius:50%;flex:none}
.kpi div{background:var(--surface-2);border-radius:8px;padding:10px}.kpi b{display:block;font-size:1.2em}
.empty{color:var(--ink-2);padding:18px 0;text-align:center}
.bar{height:8px;border-radius:999px;background:var(--surface-2);overflow:hidden}.bar i{display:block;height:100%;background:var(--primary)}
.bars{display:flex;align-items:flex-end;gap:6px;height:140px}.barcol{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:4px}.barcol i{display:block;width:100%;max-width:38px;background:var(--primary);border-radius:6px 6px 0 0;min-height:2px}
.toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:var(--header);color:var(--on-header);padding:9px 16px;border-radius:999px;font-weight:600;z-index:20;box-shadow:var(--shadow)}
@media (max-width:640px){.nav{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.top-in{padding:8px 12px}.card{padding:13px}.whotext{display:none}table.t.stackable thead{display:none}table.t.stackable tr{display:block;border-bottom:1px solid var(--line);padding:6px 0}table.t.stackable td{display:flex;justify-content:space-between;border:0;padding:3px 0}table.t.stackable td:before{content:attr(data-k);color:var(--ink-3);font-size:.85em;margin-right:12px}table.t.stackable td.num{text-align:right}}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}
:root[data-theme="dark"]{--bg:#0A1320;--surface:#101C2C;--surface-2:#16263A;--ink:#E6ECF4;--ink-2:#AAB8C9;--ink-3:#8394A8;--line:#22354B;--line-2:#2E4560;--primary:#8DB3E8;--on-primary:#0A1320;--header:#152B4E;--on-header:#E6ECF4;--ok:#6CC59A;--ok-bg:#12302A;--warn:#E3B062;--warn-bg:#352812;--bad:#F08A80;--bad-bg:#3A1A18;--info:#9DC0EE;--info-bg:#15283F}
.lookbtn{background:transparent;border:1px solid rgba(255,255,255,.35);color:inherit;border-radius:999px;font:inherit;font-size:.9em;padding:1px 8px;margin-left:6px;cursor:pointer}

/* ---------- the shell (F1, 15 Oct: the prototype's layout) ---------- */
.top{display:none}
.shell{min-height:100vh}
/* the side menu (Isaac, 2:44 AM): its own fixed panel the height of the window, scrolling by itself only if it really
   doesn't fit, and never moving the page (overscroll contained); on a wide screen only the main area scrolls */
.side{position:fixed;left:0;top:0;height:100vh;height:100dvh;width:232px;background:var(--header);color:var(--on-header);display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;z-index:30;scrollbar-width:thin}
.side-brand{padding:16px 20px 10px;display:flex;flex-direction:column;gap:4px;flex:none}.side-brand img{width:160px;height:auto}
.side-sub{font-size:.68em;letter-spacing:.16em;font-weight:700;opacity:.8;text-transform:uppercase}
.snav{display:flex;flex-direction:column;gap:1px;padding:2px 10px 10px;flex:none}
.snav .grp{font-size:.66em;letter-spacing:.14em;text-transform:uppercase;opacity:.6;margin:10px 12px 4px;font-weight:700}
.snav button{display:flex;align-items:center;gap:12px;background:transparent;border:0;color:color-mix(in srgb,var(--on-header) 82%,transparent);font:inherit;font-weight:600;padding:6px 12px;border-radius:9px;cursor:pointer;text-align:left;min-height:34px;width:100%}
.snav button:hover{color:var(--on-header);background:rgba(255,255,255,.07)}.snav button.on{color:var(--on-header);background:rgba(255,255,255,.16)}
.snav svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.snav .badge{margin-left:auto;background:var(--badge,#5B8FD4);color:#0D1B2A;font-size:.72em;font-weight:800;border-radius:999px;padding:1px 8px;min-width:22px;text-align:center}
.side-foot{margin-top:auto;padding:10px 16px 12px;border-top:1px solid rgba(255,255,255,.12);display:flex;flex-direction:column;gap:6px;font-size:.8em;flex:none}
.side-foot .whotext{opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mainwrap{margin-left:232px;min-width:0}
.mtop{display:none}
.scrim{display:none}
.page{max-width:1180px;margin:22px auto 60px;padding:0 24px}
@media (max-width:900px){
  .mainwrap{margin-left:0}
  .side{transform:translateX(-100%);transition:transform .2s ease;box-shadow:0 0 40px rgba(0,0,0,.3);width:min(280px,86vw)}
  body.side-open .side{transform:none}
  body.side-open{overflow:hidden}
  body.side-open .scrim{display:block;position:fixed;inset:0;background:rgba(8,16,28,.45);z-index:25;touch-action:none}
  .mtop{display:flex;align-items:center;gap:12px;background:var(--header);color:var(--on-header);padding:10px 14px;position:sticky;top:0;z-index:10}
  .menubtn{background:transparent;border:1px solid rgba(255,255,255,.3);color:var(--on-header);border-radius:8px;font-size:1.1em;min-height:38px;min-width:42px;cursor:pointer}
  .page{padding:0 14px;margin-top:14px}
}
@media (prefers-reduced-motion: reduce){.side{transition:none}}
/* short windows (a laptop at 700-820px tall): the whole menu still fits, tighter */
@media (max-height:820px){.side-brand{padding:10px 18px 4px}.side-brand img{width:130px}.side-sub{display:none}.snav .grp{margin:6px 12px 2px}.snav button{min-height:28px;padding:3px 12px}.side-foot{padding:6px 14px 8px;gap:4px}}
/* ---------- skeleton loading instead of a spinner ---------- */
.skel{display:flex;flex-direction:column;gap:12px}.skel i{display:block;height:14px;border-radius:7px;background:linear-gradient(90deg,var(--surface-2),var(--line),var(--surface-2));background-size:200% 100%;animation:shim 1.2s ease-in-out infinite}
.skel i.h{height:26px;width:40%}.skel i.s{width:70%}.skel i.b{height:64px}
@keyframes shim{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media (prefers-reduced-motion: reduce){.skel i{animation:none}}
/* ---------- Today (the prototype's two columns) ---------- */
.hello{display:flex;flex-direction:column;gap:6px}.hello h1{font-size:1.6em}
.seg{display:inline-flex;border:1px solid var(--line-2);border-radius:10px;overflow:hidden}.seg button{border:0;background:var(--surface);color:var(--ink);font:inherit;font-weight:600;padding:8px 14px;min-height:40px;cursor:pointer}.seg button.on{background:var(--primary);color:var(--on-primary)}
.tsearch{width:100%;max-width:560px}
.tgrid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:18px;align-items:start}
@media (max-width:1050px){.tgrid{grid-template-columns:1fr}}
.cats{display:flex;flex-wrap:wrap;gap:8px}.cats button{border:1px solid var(--line-2);background:var(--surface);color:var(--ink);font:inherit;font-weight:600;padding:7px 14px;border-radius:999px;cursor:pointer;min-height:38px}.cats button.on{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
.trow{border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:8px;background:var(--surface)}
.trow.focus{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary)}
.trow-main{display:flex;gap:14px;align-items:flex-start}
/* the weekly article's proposed update: the old and the new side by side (stacked on a phone) */
.artupd{margin-top:10px;border-color:var(--line-2)}.artcmp{display:grid;gap:6px;margin:8px 0}.artcmp-row{display:grid;grid-template-columns:96px 1fr 1fr;gap:10px;align-items:start}.artcmp-old,.artcmp-new{white-space:pre-wrap;font-size:13px;line-height:1.45;max-height:320px;overflow:auto;padding:6px 8px;border-radius:8px;background:var(--surface-2);color:var(--ink)}.artcmp-new.changed{background:var(--info-bg);color:var(--ink)}
@media (max-width:640px){.artcmp-row{grid-template-columns:1fr}}
.ticon{width:36px;height:36px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:var(--warn-bg);color:var(--warn)}
.ticon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ticon.queue,.ticon.help{background:var(--info-bg);color:var(--info)}.ticon.risk,.ticon.money{background:var(--bad-bg);color:var(--bad)}.ticon.leads,.ticon.ours{background:var(--ok-bg);color:var(--ok)}
.ttext{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}.ttext b{font-size:1.02em}.ttext .sub{color:var(--ink-2);font-size:.9em}.ttext .meta{color:var(--ink-3);font-size:.82em}
.tgo{flex:none;color:var(--ink-3);text-decoration:none;font-size:1.3em;padding:2px 6px;border-radius:8px}.tgo:hover{background:var(--surface-2)}
.tacts{padding-left:50px}
@media (max-width:560px){.tacts{padding-left:0}}
.coming{display:flex;flex-direction:column;gap:10px}
.crow{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--line);border-radius:12px;padding:12px;text-decoration:none;color:var(--ink);background:var(--surface)}
.cdate{flex:none;min-width:58px;text-align:center;background:var(--surface-2);border-radius:8px;padding:6px 4px;font-weight:700;font-size:.9em;line-height:1.2}.cdate span{display:block;font-size:.74em;font-weight:600;color:var(--ink-3)}
.tacts{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-top:8px}
.tacts:empty{display:none}
.tanswer{display:flex;gap:8px;align-items:flex-start;flex:1 1 100%}
.tanswer textarea{flex:1;min-height:34px;height:34px;resize:vertical;transition:height .15s ease}
.tanswer textarea:focus{height:90px}
.tsince{margin-top:16px}
.sincechip{display:inline-flex;gap:6px;align-items:center;padding:4px 10px;border-radius:999px;background:var(--soft,rgba(0,0,0,.04));font-size:.85em}
@media (prefers-reduced-motion: reduce){.tanswer textarea{transition:none}}
.akrow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:10px 16px;padding:12px 0;border-top:1px solid var(--line,rgba(0,0,0,.08))}
.aktext{display:flex;flex-direction:column;gap:2px;min-width:0}.aktext span{overflow-wrap:anywhere}
.akkey{display:flex;flex-direction:column;gap:6px;min-width:0}.akkey input{flex:1;min-width:0}
.akjob{padding:12px 0;border-top:1px solid var(--line,rgba(0,0,0,.08))}
@media (max-width:700px){.akrow{grid-template-columns:1fr}}
.akchk{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px;margin:4px 0 8px;font-weight:600}
.akchk input:not(.switch){width:18px!important;height:18px!important;min-height:0!important;margin:0}
.wrapany{overflow-wrap:anywhere}.nowrap{white-space:nowrap}.tablewrap{overflow-x:auto}
.backlink{display:inline-block;margin:0 0 8px;font-weight:600;text-decoration:none;color:inherit;opacity:.8}
.cshead h1{margin:0 0 8px}.cschips{gap:6px;margin-bottom:10px}.csbtns{gap:8px;margin-bottom:14px}.csbtns .btn svg{width:16px;height:16px;vertical-align:-3px;margin-right:6px;fill:none;stroke:currentColor;stroke-width:1.8}
.steps5{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:6px 0 16px}
.st5{display:flex;flex-direction:column;gap:3px;min-width:0}.st5 b{font-size:.82em}
.st5 .bar{display:block;height:5px;border-radius:3px;background:var(--line,rgba(0,0,0,.1));overflow:hidden}.st5 .bar i{display:block;height:100%;background:var(--ok,#2f7d4f);transition:width .4s ease}
.tabs5{display:flex;gap:2px;border-bottom:1px solid var(--line,rgba(0,0,0,.12));margin:0 0 16px;overflow-x:auto;scrollbar-width:thin}
.tabs5 button{background:none;border:0;border-bottom:2px solid transparent;padding:10px 14px;font:inherit;font-weight:600;color:inherit;opacity:.75;cursor:pointer;white-space:nowrap;display:inline-flex;gap:6px;align-items:center}
.tabs5 button.on{opacity:1;border-bottom-color:currentColor}.tabs5 .badge{font-size:.75em;padding:1px 7px;border-radius:999px;background:var(--soft,rgba(0,0,0,.07))}
@media (max-width:700px){.steps5{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (prefers-reduced-motion: reduce){.st5 .bar i{transition:none}}
.csvrow{justify-content:flex-end;margin-bottom:6px}.qtick{display:inline-flex;gap:6px;align-items:center;margin-right:6px}
.cols2{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px;align-items:start}.cols2 .col{display:flex;flex-direction:column;gap:16px;min-width:0}.cols2 .col>.card{margin:0}
@media (max-width:900px){.cols2{grid-template-columns:1fr}}
.nextrow{display:flex;gap:10px;align-items:center;padding:8px 0;border-top:1px solid var(--line,rgba(0,0,0,.08))}.nextrow:first-child{border-top:0}.nextrow .small{flex:1;min-width:0}.nextrow .btn{flex:none;width:auto}
.kv{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 16px;margin:0}.kv dt{font-size:.85em;opacity:.7}.kv dd{margin:0;overflow-wrap:anywhere}
.tnote{background:var(--warnbg,rgba(234,179,8,.12));border-radius:10px;padding:10px 12px;margin:0 0 8px}
.crrow{padding:10px 0;border-top:1px solid var(--line,rgba(0,0,0,.08))}.crrow:first-of-type{border-top:0}
.sfrow{padding:12px 0;border-top:1px solid var(--line,rgba(0,0,0,.08))}.sfrow:first-child{border-top:0}
/* the Look (Setup, Features; or a person's own): the accent color in light AND dark mode, then density, text size, motion.
   Isaac, 18 Oct 1:49 PM: "the colors never worked" - dark mode ignored the accent, and a device in dark mode took the
   light-mode accent (dark buttons with dark text on a dark page; the menu forced back to navy). Light first; the dark
   ones are more specific, so they win in dark mode whether it comes from the device or from the Look button. */
:root[data-accent="blue"]{--primary:#1F5FAE;--header:#103868;--info:#1F5FAE;--badge:#5B8FD4}   /* header a shade darker than before (#123E73): the menu's group titles were 4.4:1 */
:root[data-accent="green"]{--primary:#1E5E4A;--header:#0F3B2E;--info:#1E5E4A;--badge:#5FBF97}
:root[data-accent="slate"]{--primary:#3B4656;--header:#232B36;--info:#3B4656;--badge:#9AA8BA}
@media (prefers-color-scheme: dark){
:root[data-accent="blue"]:not([data-theme="light"]){--primary:#8FB8F0;--header:#123A66;--info:#9DC0EE}
:root[data-accent="green"]:not([data-theme="light"]){--primary:#7FD1AE;--header:#123A2E;--info:#7FD1AE}
:root[data-accent="slate"]:not([data-theme="light"]){--primary:#B4C0D0;--header:#262F3B;--info:#B4C0D0}}
:root[data-accent="blue"][data-theme="dark"]{--primary:#8FB8F0;--header:#123A66;--info:#9DC0EE}
:root[data-accent="green"][data-theme="dark"]{--primary:#7FD1AE;--header:#123A2E;--info:#7FD1AE}
:root[data-accent="slate"][data-theme="dark"]{--primary:#B4C0D0;--header:#262F3B;--info:#B4C0D0}
:root[data-density="compact"] .card{padding:12px 14px;margin-bottom:10px}:root[data-density="compact"] .trow{padding:8px 10px}:root[data-density="compact"] .snav button{padding:6px 10px}
:root[data-font="large"] body{font-size:17px}
:root[data-motion="reduced"] *,:root[data-motion="reduced"] *::before,:root[data-motion="reduced"] *::after{transition:none!important;animation:none!important}
:root[data-nolook] .lookbtn{display:none}
#app.pgin{animation:pgin .22s ease-out both}@keyframes pgin{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:none}}
.toast{animation:toastin .2s ease-out both}@keyframes toastin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){#app.pgin,.toast{animation:none}}
:root[data-motion="reduced"] #app.pgin,:root[data-motion="reduced"] .toast{animation:none}
/* round 7 weak spots: Today's previews in two lines (the Agent queue page keeps the whole draft); a phone table's
   first cell (the name, its chips, the program) reads as one block instead of being squeezed */
.trow .ttext .sub{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media (max-width:640px){table.t.stackable td[data-k=""]{display:block;padding:2px 0 6px}table.t.stackable td[data-k=""]:before{display:none}table.t.stackable td[data-k=""] .chip{white-space:nowrap}}
.skip{position:absolute;left:12px;top:-60px;z-index:100;background:var(--surface);color:var(--ink);padding:8px 14px;border-radius:8px;font-weight:700;box-shadow:var(--shadow)}.skip:focus{top:12px}
#app h1[tabindex="-1"]:focus{outline:none}
.lookrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.lookrow .lookbtn{margin-left:0}.lookmore{color:inherit;opacity:.75;font-size:.95em}:root[data-nolook] .lookmore{display:none}
/* ONE checkbox, radio and switch style for the portal and the desk (Isaac, 15 Oct 1:45 PM: "checkboxes look ugly
   everywhere"). A small rounded box in the brand color when ticked, a white tick, a clear focus ring; the words sit on the
   same line, to the right, and the whole label can be clicked. On/off settings use class "switch". Same text in the
   portal's styles.css and the desk's DeskCss.html: change both together. */
input[type=checkbox],input[type=radio]{-webkit-appearance:none;appearance:none;flex:0 0 auto;box-sizing:border-box;width:18px;height:18px;min-height:0;min-width:0;padding:0;margin:0;border:1.5px solid var(--line-2);border-radius:5px;background:var(--surface);display:inline-grid;place-content:center;vertical-align:middle;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}
input[type=radio]{border-radius:50%}
input[type=checkbox]::before{content:"";width:10px;height:10px;background:var(--on-primary);clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0,43% 62%);transform:scale(0);transition:transform .15s ease}
input[type=radio]::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--on-primary);transform:scale(0);transition:transform .15s ease}
input[type=checkbox]:checked,input[type=radio]:checked{background:var(--primary);border-color:var(--primary)}
input[type=checkbox]:checked::before,input[type=radio]:checked::before{transform:scale(1)}
input[type=checkbox]:hover:not(:disabled),input[type=radio]:hover:not(:disabled){border-color:var(--primary)}
input[type=checkbox]:focus-visible,input[type=radio]:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
input[type=checkbox]:disabled,input[type=radio]:disabled{opacity:.5;cursor:not-allowed}
input[type=checkbox].switch{width:36px;height:20px;border-radius:999px;border:none;background:var(--line-2);place-content:center start;padding:0 2px}
input[type=checkbox].switch::before{width:16px;height:16px;border-radius:50%;clip-path:none;background:#fff;transform:none;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .18s ease}
input[type=checkbox].switch:checked{background:var(--primary)}
input[type=checkbox].switch:checked::before{transform:translateX(16px)}
label:has(>input[type=checkbox]),label:has(>input[type=radio]){display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px;cursor:pointer}
@media (prefers-reduced-motion:reduce){input[type=checkbox],input[type=radio],input[type=checkbox]::before,input[type=radio]::before{transition:none}}
.stack>label:has(>input[type=checkbox]){align-self:stretch}
.form>label:has(>input[type=checkbox]),.inlineform>label:has(>input[type=checkbox]){min-height:40px;align-self:end;font-size:.92em;color:var(--ink)}
/* the one bubble for every short message (Isaac, 15 Oct 1:50 PM): a rounded, frosted pill at the bottom center, a tick for
   "saved", red with Retry for a failure; it fades in, stays ~2 s, and never blocks a click (only Retry can be pressed) */
#bub{position:fixed;left:0;right:0;margin:0 auto;width:max-content;bottom:max(22px,env(safe-area-inset-bottom));z-index:60;display:flex;align-items:center;gap:10px;max-width:min(92vw,520px);padding:9px 16px 9px 10px;border-radius:999px;background:var(--header);background:color-mix(in srgb,var(--header) 86%,transparent);color:var(--on-header);-webkit-backdrop-filter:blur(10px) saturate(1.2);backdrop-filter:blur(10px) saturate(1.2);box-shadow:0 10px 30px rgba(0,0,0,.22),0 1px 0 rgba(255,255,255,.08) inset;font-weight:600;font-size:.92em;line-height:1.3;opacity:0;transform:translateY(14px);pointer-events:none;transition:opacity .22s ease,transform .22s ease;animation:none}
#bub.show{opacity:1;transform:none}
#bub .bub-ic{flex:0 0 22px;width:22px;height:22px;border-radius:50%;display:grid;place-content:center;background:#2E9E6B}
#bub .bub-ic::before{content:"";width:11px;height:11px;background:#fff;clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0,43% 62%)}
#bub.bad{background:#B42318;background:color-mix(in srgb,#B42318 92%,transparent);color:#fff}
#bub.bad .bub-ic{background:rgba(255,255,255,.22)}
#bub.bad .bub-ic::before{content:"!";width:auto;height:auto;background:none;clip-path:none;font-weight:800;font-size:13px;color:#fff}
#bub.info .bub-ic{background:transparent;border:2px solid currentColor;border-right-color:transparent;animation:bubspin .8s linear infinite}
#bub.info .bub-ic::before{display:none}
#bub .bub-retry{pointer-events:auto;margin-left:4px;padding:4px 12px;min-height:0;border-radius:999px;border:1px solid rgba(255,255,255,.7);background:transparent;color:inherit;font:inherit;font-size:.9em;cursor:pointer}
#bub .bub-retry:focus-visible{outline:2px solid #fff;outline-offset:2px}
@keyframes bubspin{to{transform:rotate(360deg)}}
/* a page refreshing in the background: one small quiet dot in the corner (read aloud as "Updating") */
.upd{position:fixed;top:14px;right:16px;z-index:55;width:8px;height:8px;border-radius:50%;background:var(--primary);opacity:0;font-size:0;overflow:hidden;pointer-events:none;transition:opacity .2s ease}
.upd.on{opacity:.85;animation:updp 1s ease-in-out infinite alternate}
@keyframes updp{from{transform:scale(.7)}to{transform:scale(1.15)}}
@media (prefers-reduced-motion:reduce){#bub,#bub.info .bub-ic,.upd.on{transition:none;animation:none}}
:root[data-motion="reduced"] #bub,:root[data-motion="reduced"] #bub.info .bub-ic,:root[data-motion="reduced"] .upd.on{transition:none;animation:none}
/* links (Isaac, 15 Oct 1:55 PM: no link may use the browser's own blue): the brand color, no underline until hover */
a{color:var(--primary);text-decoration:none;text-underline-offset:2px}
a:hover{text-decoration:underline}
a:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:4px}
/* the Calendar: a week header that stays on top while scrolling, days with today marked, one row per client per day */
.cabar .row{gap:10px;align-items:center}
.cawk{padding-top:0}
.cahead{position:sticky;top:0;z-index:3;margin:0 -16px;padding:12px 16px 10px;background:var(--surface);border-bottom:1px solid var(--line);border-radius:12px 12px 0 0}
@media (max-width:900px){.cahead{top:58px}}
.caday{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.cahead+.caday{border-top:0}
.caday.past .cadate{color:var(--ink-2)}
.caday.today{background:linear-gradient(90deg,var(--info-bg,var(--surface-2)),transparent 60%);margin:0 -16px;padding:12px 16px;border-radius:8px}
.cadate{display:flex;flex-direction:column;gap:4px;align-items:flex-start;color:var(--ink);font-size:.95em}
.carows{display:flex;flex-direction:column;gap:6px;min-width:0}
.carow{border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:8px 12px}
.carow.one,.carow>summary{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.carow>summary{cursor:pointer;list-style:none}
.carow>summary::-webkit-details-marker{display:none}
.carow>summary::after{content:"";width:8px;height:8px;margin-left:auto;border-right:2px solid var(--ink-3);border-bottom:2px solid var(--ink-3);transform:rotate(45deg);transition:transform .15s ease}
.carow[open]>summary::after{transform:rotate(225deg)}
.catags{display:inline-flex;gap:4px}
.caorg{color:var(--ink)}
.cadue{color:var(--ink-2);font-size:.9em}
.casteps{display:flex;flex-direction:column;margin-top:8px;border-top:1px solid var(--line)}
.castep{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 2px;color:var(--ink);text-decoration:none;font-size:.95em;line-height:1.35}
.carow.one .castep{flex:1 1 220px;padding:0}
.casteps .castep+.castep{border-top:1px dashed var(--line)}
a.castep:hover{color:var(--primary);text-decoration:none}
a.castep:hover span:first-child{text-decoration:underline}
.caarr{flex:none;color:var(--ink-3);font-size:1.3em;line-height:1}
@media (max-width:600px){.caday{grid-template-columns:1fr;gap:6px}.caday.today{margin:0 -12px;padding:12px}}
@media (prefers-reduced-motion:reduce){.carow>summary::after{transition:none}}
/* touch screens (master backlog F, walk_consistency): 44 px controls, and boxes at 16 px or more so a phone does not zoom
   in on every tap. Same or higher specificity than the rules above and later in the file, so no !important. */
@media (pointer:coarse){.btn,.btn.small{min-height:44px}textarea,input:not([type=checkbox]):not([type=radio]),select{min-height:44px;font-size:max(16px,1em)}.tanswer textarea{min-height:44px;height:44px}}
/* the command palette (Features: Command palette) */
#pal{position:fixed;inset:0;z-index:80;background:rgba(10,19,32,.45);display:flex;align-items:flex-start;justify-content:center;padding:12vh 12px 12px}
#pal .pal-box{width:100%;max-width:560px;background:var(--surface);border:1px solid var(--line-2);border-radius:12px;box-shadow:0 20px 50px rgba(0,0,0,.3);padding:12px;display:flex;flex-direction:column;gap:8px}
#pal-in{width:100%;font-size:1.05em}
#pal-list{max-height:50vh;overflow:auto;display:flex;flex-direction:column;gap:2px}
.pal-it{display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;width:100%;min-height:40px;padding:6px 10px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
.pal-it.on,.pal-it:hover{background:var(--surface-2)}
/* text for screen readers only (a heading cell with no visible label) */
.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}
.bulkbar{gap:8px;align-items:center;flex-wrap:wrap}
/* saved views (Features: Saved views) */
.viewsbar{gap:6px;align-items:center;flex-wrap:wrap}.viewchip{display:inline-flex;gap:0}
/* the email editor's preview (Features: Email editor) */
.empv{width:100%;min-height:380px;border:1px solid var(--line-2);border-radius:8px;background:#fff}
/* Search suggestions (Isaac, 18 Oct: "like Google"): a list under the box while typing */
.serow{flex-wrap:nowrap;align-items:flex-start}
.sewrap{position:relative;flex:1;min-width:0}
.sewrap input{width:100%}
.sugbox{position:absolute;left:0;right:0;top:calc(100% + 4px);background:var(--surface);color:var(--ink);border:1px solid var(--line-2);border-radius:12px;box-shadow:0 10px 30px rgba(13,27,42,.18);z-index:25;max-height:min(440px,62vh);overflow-y:auto;padding:6px 0}
.sugbox[hidden]{display:none}
.sug-h{font-size:.72em;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-2);font-weight:700;padding:8px 14px 4px}
.sug-i{display:flex;align-items:center;gap:10px;padding:8px 14px;cursor:pointer;min-height:40px}
.sug-i svg{width:16px;height:16px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--ink-2)}
.sug-t{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sug-t b{font-weight:800}
.sug-s{flex:0 1 auto;max-width:42%;color:var(--ink-2);font-size:.86em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sug-k{flex:none;color:var(--ink-2);font-size:.75em;border:1px solid var(--line-2);border-radius:999px;padding:0 8px}
.sug-i[aria-selected="true"],.sug-i:hover{background:var(--surface-2)}
.sug-wait,.sug-more{padding:8px 14px;color:var(--ink-2);font-size:.86em}.sug-more{border-top:1px solid var(--line);margin-top:4px}
@media (max-width:640px){.sug-s,.sug-k{display:none}}
.pre{white-space:pre-wrap;line-height:1.5}
