/* ═══════════════════════════════════════════════════════
   TRILOGIAM — CLIENT PORTAL
   Visual contract: HELM-PROJECTS-MOCKUP.html §16–§21.

   The design TOKENS are the same ones crm/lcars-crm.css uses — parchment,
   petrol teal, antique brass — so the portal looks like Trilogiam. The
   PRIMITIVES are its own, so it does not look like the CRM. Nothing here is
   shared with the staff stylesheet by import: a change to the Helm's chrome
   must never move a client's screen, and vice versa.

   The mockup lays these out at a fixed 1320px. Here they are fluid, because a
   client will open this on a laptop, an iPad and a phone in the same week.
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Archivo:wght@600;700;800;900&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  --teal-900:#0E2A33; --teal-800:#143845; --teal-700:#1A4A5A; --teal-600:#235E72;
  --teal-500:#2B6075; --teal-400:#3D7E94; --teal-300:#6AA3B5; --teal-200:#A7CAD5;
  --teal-100:#D7E6EB; --teal-50:#EFF5F7;
  --brass-700:#7A5A24; --brass-600:#9A7330; --brass-500:#B5893F; --brass-400:#C8A35C;
  --brass-300:#DBC089; --brass-200:#ECDCB6; --brass-100:#F6EDD7;
  --cyan-400:#6FD2E6;
  --parchment-50:#FBF7EE; --surface-card:#FFFFFF; --surface-sunk:#F7F8F8;
  --neutral-900:#161C20; --neutral-700:#3A444A; --neutral-500:#6F7A80;
  --neutral-400:#9AA3A8; --border-hair:#DDE1E3;
  --text-strong:#161C20; --text-body:#3A444A; --text-muted:#6F7A80; --text-faint:#9AA3A8;
  --secure-600:#2E7D55; --secure-500:#3B9E6C; --secure-100:#DCEFE4;
  --warn-500:#D69E45; --warn-100:#FAEFD9;
  --critical-600:#C23B33; --critical-100:#F7DEDC;
  /* The "delivered · in review" violet. It is deliberately NOT one of the
     status colours the staff app uses for anything else: Submitted is its own
     state, outside both "done" and "not done". */
  --sub-600:#5B4A86; --sub-300:#C9BCE4; --sub-100:#EFE9F7; --sub-500:#7C6BA8;
  --shadow-sm:0 2px 8px rgba(14,42,51,.06);
  --shadow-md:0 6px 18px rgba(14,42,51,.08);
  --shadow-lg:0 18px 44px rgba(14,42,51,.14);
  --font-display:'Cinzel', Georgia, serif;
  --font-heading:'Archivo', system-ui, sans-serif;
  --font-body:'Source Sans 3', system-ui, sans-serif;
  --font-mono:'JetBrains Mono', ui-monospace, monospace;
  --ease:220ms cubic-bezier(.2,.7,.3,1);
}

*{margin:0;padding:0;box-sizing:border-box}
/* [hidden] is a UA rule of `display:none`, which ANY explicit display beats —
   and .flash below is display:flex. Without this the empty error box on the
   sign-in page is visible on first paint. Observed in the browser, not in review. */
[hidden]{display:none !important}
html{-webkit-text-size-adjust:100%}
body{background:var(--parchment-50);color:var(--text-strong);font-family:var(--font-body);line-height:1.55;font-size:15px}
a{color:var(--teal-600)}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
input,select,textarea{font:inherit;color:inherit}
.mono{font-family:var(--font-mono)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:2px solid var(--teal-400);outline-offset:2px;border-radius:4px}

.ico{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.ico-sm{width:13px;height:13px}
.ico-lg{width:22px;height:22px}

/* ═════════ SIGN-IN (§16) ═════════ */
.login{min-height:100vh;display:grid;grid-template-columns:1.15fr 1fr}
.login-art{background:var(--teal-800);position:relative;overflow:hidden;padding:56px 54px;
  display:flex;flex-direction:column;justify-content:flex-end;color:#fff}
.login-art .art-img{position:absolute;inset:0;background-size:cover;background-position:center}
/* All three login images are dark down the left edge exactly where the wordmark
   sits; this gradient is what guarantees the type stays legible on any of them. */
.login-art::after{content:"";position:absolute;inset:0;
  background:linear-gradient(to top,rgba(10,30,38,.93) 0%,rgba(10,30,38,.55) 38%,rgba(10,30,38,.12) 100%)}
.login-art > *{position:relative;z-index:2}
.login-art .wheel{width:52px;height:52px;color:var(--brass-400);stroke:currentColor;fill:none;
  stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;margin-bottom:auto}
.login-art h1{font-family:var(--font-display);font-weight:700;font-size:clamp(26px,3.2vw,32px);
  letter-spacing:.06em;text-transform:uppercase;color:#fff;line-height:1.1}
.login-art .sub{font-family:var(--font-heading);font-weight:700;font-size:10px;letter-spacing:.24em;
  text-transform:uppercase;color:var(--brass-300);margin-top:12px}
.login-art p{font-size:15px;color:rgba(240,246,248,.86);margin-top:20px;max-width:38ch}
.login-form{background:#fff;padding:clamp(28px,5vw,56px) clamp(24px,5vw,60px);
  display:flex;flex-direction:column;justify-content:center}
.login-form .top{display:flex;justify-content:flex-end;margin-bottom:auto}
.login-form .mid{margin:auto 0;width:100%;max-width:420px}
.login-h{font-family:var(--font-display);font-weight:700;font-size:22px;letter-spacing:.03em;
  text-transform:uppercase;color:var(--teal-800);margin-bottom:6px}
.login-p{font-size:13.5px;color:var(--text-muted);margin-bottom:24px}
.login-note{margin-top:26px;padding-top:18px;border-top:1px solid var(--border-hair);
  display:flex;gap:10px;align-items:flex-start;font-size:12px;color:var(--text-muted);line-height:1.5}
.login-note .ico{color:var(--secure-600);margin-top:2px}

/* The centred card — activation, reset request, reset complete (§16 lower). */
.cardpage{min-height:100vh;display:flex;justify-content:center;align-items:flex-start;
  padding:clamp(24px,6vh,64px) 20px}
.authcard{width:100%;max-width:520px;background:#fff;border:1px solid var(--border-hair);
  border-radius:12px;box-shadow:var(--shadow-md);overflow:hidden}
.authcard .hd{background:var(--teal-700);padding:22px 28px}
.authcard .hd .wm{font-family:var(--font-display);font-weight:700;font-size:18px;letter-spacing:.06em;
  text-transform:uppercase;color:var(--brass-300)}
.authcard .hd .ey{font-family:var(--font-heading);font-weight:700;font-size:9px;letter-spacing:.2em;
  text-transform:uppercase;color:rgba(215,230,235,.6);margin-top:3px}
.authcard .bd{padding:26px 28px}
.authcard h2{font-family:var(--font-display);font-weight:700;font-size:18px;color:var(--teal-800);
  margin-bottom:6px;letter-spacing:.02em}
.authcard .lede{font-size:13.5px;color:var(--text-muted);margin-bottom:20px}

/* Password strength bars + the live checklist (§16). */
.pwbars{display:flex;gap:4px;margin-bottom:7px}
.pwbars span{flex:1;height:4px;border-radius:2px;background:var(--border-hair);transition:background var(--ease)}
.pwbars span.on{background:var(--secure-500)}
.pwchecks{display:grid;gap:4px;font-size:12px;color:var(--text-faint)}
.pwchecks .ok{color:var(--secure-600)}

/* ═════════ APP SHELL (§17–§21) ═════════ */
.phdr{background:#fff;border-bottom:1px solid var(--border-hair);min-height:66px;display:flex;
  align-items:center;padding:10px clamp(16px,3vw,28px);gap:16px;flex-wrap:wrap;
  position:sticky;top:0;z-index:20}
.phdr .wheel{width:26px;height:26px;color:var(--brass-500);stroke:currentColor;fill:none;
  stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.pwm{font-family:var(--font-display);font-weight:700;font-size:19px;letter-spacing:.07em;
  text-transform:uppercase;color:var(--teal-700)}
.pnav{display:flex;gap:3px;margin-left:16px}
.pnav a{font-family:var(--font-heading);font-weight:700;font-size:11px;letter-spacing:.07em;
  text-transform:uppercase;color:var(--text-muted);padding:7px 13px;border-radius:6px;text-decoration:none}
.pnav a.on,.pnav a:hover{background:var(--teal-50);color:var(--teal-700)}
.phdr .spacer{flex:1}
.whoami{display:flex;align-items:center;gap:9px}
.whoami .nm{font-family:var(--font-heading);font-weight:700;font-size:12px;line-height:1.2}
.whoami .co{font-size:10.5px;color:var(--text-muted)}
.pbody{padding:24px clamp(16px,3vw,28px) 60px;max-width:1320px;margin:0 auto}

.av{width:34px;height:34px;border-radius:50%;background:var(--brass-500);color:#fff;
  font-family:var(--font-heading);font-weight:800;font-size:12.5px;display:flex;
  align-items:center;justify-content:center;flex-shrink:0}
.avs{display:flex}
.avs .a{width:24px;height:24px;border-radius:50%;font-family:var(--font-heading);font-weight:800;
  font-size:9px;color:#fff;display:flex;align-items:center;justify-content:center;
  border:2px solid #fff;margin-left:-7px;flex-shrink:0}
.avs .a:first-child{margin-left:0}
.a-t{background:var(--teal-500)}.a-b{background:var(--brass-500)}.a-d{background:var(--teal-700)}
.a-g{background:var(--secure-500)}.a-p{background:var(--sub-500)}

.crumb{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-muted);
  margin-bottom:12px;font-family:var(--font-heading);font-weight:600;letter-spacing:.03em;flex-wrap:wrap}
.crumb a{color:var(--teal-600);text-decoration:none}
.crumb a:hover{text-decoration:underline}
.crumb .sep{color:var(--text-faint)}
.ptitle{font-family:var(--font-display);font-weight:700;font-size:clamp(18px,2.4vw,22px);
  letter-spacing:.04em;text-transform:uppercase;color:var(--teal-800)}
.titlerow{display:flex;align-items:center;gap:13px;margin-bottom:3px;flex-wrap:wrap}
.submeta{font-size:12.5px;color:var(--text-muted);margin-bottom:12px}

/* ═════════ PRIMITIVES ═════════ */
.btn{font-family:var(--font-heading);font-weight:700;font-size:11px;letter-spacing:.07em;
  text-transform:uppercase;padding:8px 14px;border-radius:6px;border:1px solid transparent;
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;cursor:pointer;
  transition:filter var(--ease),background var(--ease)}
.btn:hover:not(:disabled){filter:brightness(1.07)}
.btn:disabled{opacity:.45;cursor:default}
.btn.pri{background:var(--teal-500);color:#fff}
.btn.sec{background:#fff;color:var(--teal-600);border-color:var(--border-hair)}
.btn.sec:hover:not(:disabled){background:var(--teal-50)}
.btn.acc{background:var(--brass-500);color:#fff}
.btn.grn{background:var(--secure-500);color:#fff}
.btn.dgr{background:#fff;color:var(--critical-600);border-color:var(--critical-100)}
.btn.sm{padding:5px 10px;font-size:9.5px}
.btn.wide{width:100%;justify-content:center;padding:13px;font-size:12.5px}

.chip{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-heading);font-weight:700;
  font-size:9.5px;letter-spacing:.07em;text-transform:uppercase;padding:3px 8px;border-radius:4px;white-space:nowrap}
.c-teal{background:var(--teal-100);color:var(--teal-700)}
.c-brass{background:var(--brass-100);color:var(--brass-700)}
.c-grn{background:var(--secure-100);color:var(--secure-600)}
.c-warn{background:var(--warn-100);color:var(--brass-700)}
.c-red{background:var(--critical-100);color:var(--critical-600)}
.c-grey{background:var(--surface-sunk);color:var(--text-muted);border:1px solid var(--border-hair)}
.c-dark{background:var(--teal-700);color:#fff}
.c-sub{background:var(--sub-100);color:var(--sub-600);border:1px solid var(--sub-300)}

.card{background:var(--surface-card);border:1px solid var(--border-hair);border-radius:10px;
  box-shadow:var(--shadow-sm)}
.card-h{display:flex;align-items:center;gap:9px;padding:10px 15px;background:var(--teal-500);
  border-radius:9px 9px 0 0}
.card-h .t{font-family:var(--font-heading);font-weight:800;font-size:11.5px;letter-spacing:.08em;
  text-transform:uppercase;color:#fff}
.card-h .c{margin-left:auto;font-family:var(--font-mono);font-size:9.5px;color:rgba(255,255,255,.75)}
.card-b{padding:14px 15px}

/* ⚠️ NO `overflow-x: auto` HERE. It was there so five tabs could scroll on a
   phone, and it silently CLIPPED the Table/Kanban menu — an overflow container
   clips absolutely-positioned descendants, so the menu opened (hidden=false)
   and was simply invisible. The staff strip wraps instead, and wrapping is the
   better answer anyway: a horizontally scrolled tab is a tab nobody finds. */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border-hair);margin-bottom:16px;
  flex-wrap:wrap}
.tab{padding:9px 15px;font-family:var(--font-heading);font-weight:700;font-size:11px;letter-spacing:.07em;
  text-transform:uppercase;color:var(--text-muted);border-bottom:2px solid transparent;
  display:flex;align-items:center;gap:6px;white-space:nowrap;text-decoration:none}
.tab:hover{color:var(--teal-600)}
.tab.on{color:var(--teal-600);border-bottom-color:var(--brass-400)}
.tab .n{background:var(--teal-100);color:var(--teal-700);border-radius:9px;padding:1px 6px;font-size:9px}
.tab .n.alert{background:var(--critical-100);color:var(--critical-600)}

table.t{width:100%;border-collapse:collapse;font-size:12.5px}
table.t th{font-family:var(--font-heading);font-weight:700;font-size:9.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--text-muted);text-align:left;padding:9px 10px;
  border-bottom:1px solid var(--border-hair);background:var(--surface-sunk);white-space:nowrap}
table.t td{padding:10px;border-bottom:1px solid var(--border-hair);color:var(--text-body);vertical-align:middle}
table.t tr:last-child td{border-bottom:none}
table.t tr.hi td{background:var(--teal-50)}
table.t .nm{font-family:var(--font-heading);font-weight:700;font-size:12.5px;color:var(--text-strong)}

.bar{height:6px;border-radius:3px;background:var(--teal-100);overflow:hidden;min-width:70px}
.bar span{display:block;height:100%;border-radius:3px;background:var(--teal-500)}
.bar.g span{background:var(--secure-500)}
.bar.b span{background:var(--brass-500)}

.stats4{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.st{background:#fff;border:1px solid var(--border-hair);border-radius:9px;padding:13px 15px;
  box-shadow:var(--shadow-sm);border-left:3px solid var(--teal-500)}
.st.b{border-left-color:var(--brass-500)}.st.g{border-left-color:var(--secure-500)}
.st.w{border-left-color:var(--warn-500)}.st.v{border-left-color:var(--sub-500)}
.st .k{font-family:var(--font-heading);font-weight:700;font-size:8.5px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--text-muted)}
.st .v{font-family:var(--font-heading);font-weight:800;font-size:25px;color:var(--teal-800);
  line-height:1.15;margin-top:3px}
.st .s{font-size:11px;color:var(--text-faint)}

.fld{display:flex;flex-direction:column;gap:5px}
.fld .fl{font-family:var(--font-heading);font-weight:700;font-size:9px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--text-muted)}
.inp{border:1px solid var(--border-hair);border-radius:6px;padding:11px 13px;font-size:14px;
  color:var(--text-body);background:#fff;font-family:var(--font-body);width:100%}
.inp:focus{outline:none;border-color:var(--teal-400);box-shadow:0 0 0 3px rgba(61,126,148,.14)}
.inp::placeholder{color:var(--text-faint)}
textarea.inp{resize:vertical;min-height:64px;line-height:1.5}

.tg{display:inline-flex;border:1px solid var(--border-hair);border-radius:7px;overflow:hidden;
  background:var(--surface-sunk)}
.tg a,.tg button{padding:6px 13px;font-family:var(--font-heading);font-weight:700;font-size:10px;
  letter-spacing:.07em;text-transform:uppercase;color:var(--text-muted);display:flex;
  align-items:center;gap:5px;text-decoration:none}
.tg a.on,.tg button.on{background:var(--teal-600);color:#fff}

.sw{width:36px;height:20px;border-radius:11px;background:var(--border-hair);position:relative;
  flex-shrink:0;transition:background var(--ease)}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;
  background:#fff;box-shadow:var(--shadow-sm);transition:left var(--ease)}
.sw.on{background:var(--brass-500)}
.sw.on::after{left:18px}

.cb{width:16px;height:16px;border:1.6px solid var(--teal-300);border-radius:4px;display:flex;
  align-items:center;justify-content:center;flex-shrink:0;background:#fff}
.cb.ck{background:var(--secure-500);border-color:var(--secure-500);color:#fff}
.cb.sb{background:var(--sub-500);border-color:var(--sub-500);color:#fff}

.phase{font-family:var(--font-heading);font-weight:800;font-size:10px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--teal-600);background:var(--teal-50);padding:7px 12px;
  border-radius:6px;margin:14px 0 7px;display:flex;align-items:center;gap:9px}
.phase .cnt{margin-left:auto;font-family:var(--font-mono);font-size:10px;color:var(--text-muted);letter-spacing:0}
.tname{font-family:var(--font-heading);font-weight:600;font-size:12.5px;color:var(--text-strong);
  display:flex;align-items:center;gap:7px}
.tname.done{color:var(--text-faint);text-decoration:line-through;font-weight:400}

.sel{background:#fff;border:1px solid var(--border-hair);border-radius:6px;padding:7px 26px 7px 11px;
  font-size:12px;color:var(--text-body);font-family:var(--font-heading);font-weight:600;
  appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239AA3A8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 9px center;background-size:9px}

/* ═════════ HOME (§17) ═════════ */
.hello{font-family:var(--font-display);font-weight:700;font-size:clamp(20px,3vw,24px);
  letter-spacing:.03em;text-transform:uppercase;color:var(--teal-800);margin-bottom:4px}
.hello-sub{font-size:14px;color:var(--text-muted);margin-bottom:20px}
.waiting{background:var(--warn-100);border:1px solid var(--warn-500);border-radius:10px;
  padding:15px 18px;margin-bottom:20px;display:flex;gap:13px;align-items:flex-start;flex-wrap:wrap}
.waiting .ico{color:var(--brass-600)}
.waiting .t{font-family:var(--font-heading);font-weight:800;font-size:13px;color:var(--brass-700);letter-spacing:.03em}
.waiting .d{font-size:13px;color:var(--text-body);margin-top:3px}
.waiting.calm{background:var(--secure-100);border-color:var(--secure-500)}
.waiting.calm .ico{color:var(--secure-600)}
.waiting.calm .t{color:var(--secure-600)}
/* Two equal columns, as §17 has them — NOT auto-fill. auto-fill lays down as
   many tracks as the container allows and leaves the empty ones behind, so a
   client with one project got a card a third of the page wide. */
.projgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:820px){.projgrid{grid-template-columns:1fr}}
.projcard{overflow:hidden;display:block;text-decoration:none;color:inherit;transition:box-shadow var(--ease),transform var(--ease)}
.projcard:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}
.projcard .strip{height:5px;background:var(--teal-500)}
.projcard.done{opacity:.75}
.projcard.done .strip{background:var(--border-hair)}
.projcard .in{padding:18px 20px}
.projcard .code{font-family:var(--font-mono);font-size:10px;color:var(--text-faint);letter-spacing:.08em;
  text-transform:uppercase}
.projcard .nm{font-family:var(--font-display);font-weight:700;font-size:17px;letter-spacing:.03em;
  text-transform:uppercase;color:var(--teal-800);margin-top:4px}
.projcard.done .nm{color:var(--text-muted)}
.projcard .dt{font-size:12.5px;color:var(--text-muted);margin-top:3px}
.projstats{display:flex;gap:18px;padding-top:13px;border-top:1px solid var(--border-hair);flex-wrap:wrap}
.projstats .k{font-family:var(--font-heading);font-weight:700;font-size:8.5px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--text-faint)}
.projstats .v{font-family:var(--font-heading);font-weight:800;font-size:18px;color:var(--teal-700)}
.projstats .v.b{color:var(--brass-600)}
.projstats .v em{font-style:normal;font-size:11px;color:var(--critical-600)}

/* ═════════ OVERVIEW (§18) ═════════ */
.ov3{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:14px;
  align-items:start}
.donutwrap{display:flex;flex-direction:column;align-items:center;position:relative}
.donut{width:150px;height:150px;transform:rotate(-90deg)}
.donutlabel{position:absolute;top:52px;text-align:center;width:100%}
.donutlabel .p{font-family:var(--font-heading);font-weight:800;font-size:27px;color:var(--teal-800);line-height:1}
.donutlabel .l{font-family:var(--font-heading);font-weight:700;font-size:9px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--text-muted)}
.legend{margin-top:12px;width:100%;display:grid;gap:6px}
.legend div{display:flex;align-items:center;gap:8px;font-size:12px}
.legend i{width:10px;height:10px;border-radius:2px;display:block;flex-shrink:0}
.legend .n{margin-left:auto;font-family:var(--font-mono)}
.duerow{display:flex;gap:11px;padding:10px 0;border-bottom:1px solid var(--border-hair);align-items:center}
.duerow:last-child{border-bottom:none}
.duebox{width:44px;text-align:center;background:var(--surface-sunk);border-radius:6px;padding:5px 0;flex-shrink:0}
.duebox.sub{background:var(--sub-100)}
.duebox .d{font-family:var(--font-mono);font-size:14px;font-weight:500;color:var(--teal-700);line-height:1}
.duebox.sub .d{color:var(--sub-600)}
.duebox .m{font-size:9px;color:var(--text-muted);text-transform:uppercase}
.duebox.sub .m{color:var(--sub-600)}
.duerow .nm{font-family:var(--font-heading);font-weight:700;font-size:12.5px}
.duerow .who{font-size:11px;color:var(--text-muted)}
.duerow .who.sub{color:var(--sub-600)}
.breakrow{margin-bottom:14px}
.breakrow .hd{display:flex;align-items:center;gap:8px;margin-bottom:5px;flex-wrap:wrap}
.breakrow .hd .nm{font-family:var(--font-heading);font-weight:700;font-size:12.5px}
.breakrow .hd .n{margin-left:auto;font-family:var(--font-mono);font-size:11px;color:var(--text-muted)}
.cardnote{margin-top:auto;padding-top:10px;border-top:1px solid var(--border-hair);font-size:12px;color:var(--text-muted)}

/* ═════════ TASKS (§19) ═════════ */
.mytasks{background:var(--brass-100);border:1px solid var(--brass-300);border-radius:10px;
  padding:14px 16px;margin-bottom:16px}
.mytasks > .hd{font-family:var(--font-heading);font-weight:800;font-size:11px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--brass-700);margin-bottom:11px}
.mytasks .list{display:grid;gap:8px}
.mytask{background:#fff;border:1px solid var(--border-hair);border-left:3px solid var(--teal-500);
  border-radius:8px;padding:12px 14px;display:flex;align-items:center;gap:13px;flex-wrap:wrap}
.mytask.sub{border-color:var(--sub-300);border-left-color:var(--sub-500)}
.mytask .nm{font-family:var(--font-heading);font-weight:700;font-size:13.5px;color:var(--text-strong)}
.mytask .meta{font-size:12px;color:var(--text-muted);margin-top:2px}
.mytask .meta .sub{color:var(--sub-600);font-weight:600}
.mytask .grow{flex:1;min-width:180px}
.mytasks .foot{font-size:11.5px;color:var(--brass-700);margin-top:9px;display:flex;
  align-items:center;gap:7px}
.tasktools{display:flex;align-items:center;gap:9px;padding:12px 12px 4px;flex-wrap:wrap}
.tasktools .lbl{font-family:var(--font-heading);font-weight:800;font-size:11px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--teal-600)}
.trow{display:grid;grid-template-columns:22px 1fr 130px 90px 110px;gap:10px;align-items:center;
  padding:9px 12px;border-bottom:1px solid var(--border-hair);font-size:12.5px}
.trow:last-child{border-bottom:none}
.trow:hover{background:var(--teal-50)}
.trow.subrow{background:#F7F4FC}
.trow .who{display:flex;align-items:center;gap:6px;color:var(--text-body);min-width:0}
.trow .who span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trow .avs .a{width:20px;height:20px;font-size:8px}

/* ═════════ DOCUMENTS (§20) ═════════ */
.docsplit{display:flex;padding:0;overflow:hidden}
.ftree{width:210px;border-right:1px solid var(--border-hair);padding:10px 8px;flex-shrink:0}
.ftree .hd{font-family:var(--font-heading);font-weight:700;font-size:9px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--text-faint);padding:5px 9px 8px}
.fnode{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:6px;font-size:12.5px;
  color:var(--text-body);font-family:var(--font-heading);font-weight:600;width:100%;text-align:left}
.fnode:hover{background:var(--teal-50)}
.fnode.on{background:var(--teal-50);color:var(--teal-700)}
.fnode .cnt{margin-left:auto;font-family:var(--font-mono);font-size:10px;color:var(--text-faint);font-weight:400}
.docmain{flex:1;padding:14px 16px;min-width:0}
.dochd{display:flex;align-items:center;gap:9px;margin-bottom:12px;flex-wrap:wrap}
.drop{border:2px dashed var(--teal-200);border-radius:9px;padding:18px;text-align:center;
  color:var(--teal-500);background:rgba(239,245,247,.6);font-size:12.5px;cursor:pointer;
  transition:background var(--ease),border-color var(--ease)}
.drop:hover,.drop.over{background:var(--teal-50);border-color:var(--teal-400)}
.drop .lim{font-size:11.5px;color:var(--text-faint)}
.upbar{margin-top:10px;background:var(--teal-50);border:1px solid var(--teal-200);border-radius:8px;
  padding:9px 12px;font-size:12.5px;color:var(--teal-700)}
.upbar .bar{margin-top:6px}

/* ═════════ MESSAGES (§21) ═════════ */
.msgsplit{display:flex;padding:0;overflow:hidden;min-height:460px}
.thrlist{width:280px;border-right:1px solid var(--border-hair);display:flex;flex-direction:column;flex-shrink:0}
.thrlist .top{padding:11px 12px;border-bottom:1px solid var(--border-hair)}
.thrlist .scroll{overflow-y:auto;flex:1}
.thr{display:flex;gap:10px;padding:11px 12px;border-bottom:1px solid var(--border-hair);
  width:100%;text-align:left}
.thr:hover{background:var(--surface-sunk)}
.thr.on{background:var(--teal-50);box-shadow:inset 3px 0 0 var(--brass-400)}
.thr .tt{font-family:var(--font-heading);font-weight:700;font-size:12.5px;color:var(--text-strong);line-height:1.25}
.thr .tp{font-size:11.5px;color:var(--text-muted);margin-top:3px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;max-width:200px}
.thr .tm{font-family:var(--font-mono);font-size:9.5px;color:var(--text-faint);margin-top:4px}
.thr .tm .un{color:var(--critical-600);font-weight:600}
.convo{flex:1;display:flex;flex-direction:column;min-width:0}
.convo .hd{padding:12px 18px;border-bottom:1px solid var(--border-hair)}
.convo .hd .s{font-family:var(--font-heading);font-weight:800;font-size:14px;color:var(--text-strong)}
.convo .hd .m{font-size:11.5px;color:var(--text-muted)}
.convo .scroll{flex:1;padding:18px;display:flex;flex-direction:column;gap:14px;
  background:var(--surface-sunk);overflow-y:auto;max-height:52vh}
.daymark{align-self:center;font-family:var(--font-mono);font-size:9.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--text-faint);background:#fff;border:1px solid var(--border-hair);
  border-radius:11px;padding:2px 10px}
.msgline{display:flex;gap:9px;align-items:flex-end}
.msgline.mine{flex-direction:row-reverse}
.bub{max-width:78%;border-radius:11px;padding:11px 14px;font-size:13px;line-height:1.5;
  overflow-wrap:anywhere}
.bub.them{background:#fff;border:1px solid var(--border-hair);color:var(--text-body);border-bottom-left-radius:3px}
.bub.me{background:var(--brass-500);color:#fff;border-bottom-right-radius:3px}
.bub.sys{background:var(--brass-100);border:1px solid var(--brass-300);color:var(--brass-700);
  border-bottom-left-radius:3px;font-style:italic}
.bub.fresh{border-color:var(--brass-400);box-shadow:0 0 0 3px rgba(219,192,137,.25)}
.bmeta{font-family:var(--font-mono);font-size:9.5px;color:var(--text-faint);margin-top:4px}
.msgline.mine .bmeta{text-align:right}
.tasklink{margin-top:9px;border:1px solid var(--teal-200);background:var(--teal-50);border-radius:7px;
  padding:8px 10px;display:flex;align-items:center;gap:8px;text-decoration:none;color:inherit}
.tasklink .nm{font-family:var(--font-heading);font-weight:700;font-size:11.5px;color:var(--teal-700)}
.tasklink .mt{font-size:10.5px;color:var(--text-muted)}
.tasklink .go{font-size:10.5px;color:var(--teal-600);font-weight:700;margin-left:auto;white-space:nowrap}
.composer{border-top:1px solid var(--border-hair);padding:12px 16px;background:#fff}
.composer .row{display:flex;align-items:center;gap:9px;margin-top:9px}
.composer .row .grow{flex:1}

/* ═════════ NOTES / MEETINGS ═════════ */
.notecard{margin-bottom:14px}
.notecard .h{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.notecard .h .t{font-family:var(--font-heading);font-weight:800;font-size:14px;color:var(--text-strong)}
.notecard .h .d{font-family:var(--font-mono);font-size:11px;color:var(--text-faint)}
.notebody{font-size:14px;color:var(--text-body);line-height:1.6}
.notebody p{margin-bottom:9px}
.notebody ul,.notebody ol{margin:0 0 10px 22px}
.notebody h1,.notebody h2,.notebody h3{font-family:var(--font-heading);color:var(--teal-800);margin:12px 0 6px}
.notebody a{color:var(--teal-600)}
.notebody img{max-width:100%;height:auto}
.notebody table{border-collapse:collapse;max-width:100%}
.notebody td,.notebody th{border:1px solid var(--border-hair);padding:5px 8px}

/* ═════════ STATE ═════════ */
.empty{padding:34px 20px;text-align:center;color:var(--text-muted);font-size:13.5px}
.empty .ico{color:var(--teal-200);margin-bottom:8px}
.empty .h{font-family:var(--font-heading);font-weight:800;font-size:14px;color:var(--text-body);margin-bottom:4px}
.flash{border-radius:8px;padding:10px 14px;font-size:13px;margin-bottom:12px;display:flex;
  align-items:center;gap:9px}
.flash.ok{background:var(--secure-100);color:var(--secure-600);border:1px solid var(--secure-500)}
.flash.bad{background:var(--critical-100);color:var(--critical-600);border:1px solid var(--critical-600)}
.flash.info{background:var(--teal-50);color:var(--teal-700);border:1px solid var(--teal-200)}
.spinner{width:18px;height:18px;border:2px solid var(--teal-200);border-top-color:var(--teal-500);
  border-radius:50%;animation:spin .7s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}
.loading{padding:40px;text-align:center;color:var(--text-muted)}

/* ═════════ RESPONSIVE ═════════ */
@media (max-width:900px){
  .login{grid-template-columns:1fr}
  .login-art{min-height:280px;padding:32px 28px}
  .login-art .wheel{display:none}
  .trow{grid-template-columns:22px 1fr 90px;row-gap:4px}
  .trow .who{display:none}
  .docsplit,.msgsplit{flex-direction:column}
  .ftree{width:auto;border-right:none;border-bottom:1px solid var(--border-hair);
    display:flex;flex-wrap:wrap;gap:4px}
  .ftree .hd{width:100%}
  .fnode{width:auto}
  .thrlist{width:auto;border-right:none;border-bottom:1px solid var(--border-hair);max-height:34vh}
  .thr .tp{max-width:60vw}
  .convo .scroll{max-height:none}
}
@media (max-width:560px){
  .phdr{gap:10px}
  .pnav{margin-left:0}
  .whoami .nm,.whoami .co{display:none}
  .projgrid{grid-template-columns:1fr}
}
@media print{
  .phdr,.tabs,.btn,.drop,.composer{display:none}
}

/* ═════════ TASK ROWS ARE CLICKABLE (drawer) ═════════ */
.trow.open { cursor: pointer; }
.trow.open:focus-visible { outline: 2px solid var(--teal-400); outline-offset: -2px; }
.trow.mine { box-shadow: inset 3px 0 0 var(--brass-400); }
.filterchip { border: 1px solid var(--border-hair); cursor: pointer; }
.filterchip.c-brass { border-color: var(--brass-400); }

/* ═════════ TASK DRAWER ═════════ */
.pdrawer-scrim { position: fixed; inset: 0; background: rgba(14,42,51,.28); z-index: 900; }
.pdrawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 910;
  width: clamp(360px, 40vw, 620px); background: #fff; border-left: 1px solid var(--border-hair);
  box-shadow: -14px 0 34px rgba(14,42,51,.10); display: flex; flex-direction: column; }
.pdrawer-h { padding: 15px 18px; border-bottom: 1px solid var(--border-hair);
  display: flex; align-items: flex-start; gap: 10px; }
.pdrawer-h .eyebrow { font-family: var(--font-heading); font-weight: 700; font-size: 9px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint); }
.pdrawer-h .ttl { font-family: var(--font-heading); font-weight: 800; font-size: 15px;
  color: var(--text-strong); margin-top: 4px; line-height: 1.35; }
.pdrawer-h .x { font-size: 16px; color: var(--text-muted); line-height: 1; padding: 2px 4px; }
.pdrawer-h .x:hover { color: var(--text-strong); }
.pdrawer-b { padding: 16px 18px; overflow-y: auto; flex: 1; }
.pdrawer-f { border-top: 1px solid var(--border-hair); padding: 12px 18px; background: var(--surface-sunk); }
.pdrawer-f .note { font-size: 11.5px; color: var(--brass-700); display: flex; align-items: flex-start;
  gap: 7px; margin-bottom: 9px; line-height: 1.45; }

.pdmeta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border-hair); margin-bottom: 14px; }
.pdmeta .k { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 8.5px;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.pdmeta .v { font-size: 13px; color: var(--text-body); }

.pdsec { margin-bottom: 18px; }
.pdlabel { font-family: var(--font-heading); font-weight: 700; font-size: 9px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.pdnone { font-size: 13px; color: var(--text-faint); font-style: italic; line-height: 1.5; }
.pdfile { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border-hair);
  border-radius: 8px; margin-bottom: 7px; background: #fff; }
.pdfile .nm { font-family: var(--font-heading); font-weight: 700; font-size: 12.5px;
  color: var(--text-strong); overflow-wrap: anywhere; }
.pdfile .mt { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pdupload { margin-top: 10px; }
.pdupload .drop { padding: 14px; }

/* ═════════ NEW-CONVERSATION DIALOG ═════════ */
.pdlg-scrim { position: fixed; inset: 0; background: rgba(14,42,51,.42); z-index: 970;
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.pdlg { width: 520px; max-width: 100%; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; }
.pdlg-h { background: var(--teal-600); color: #fff; padding: 13px 20px;
  display: flex; align-items: center; gap: 9px; }
.pdlg-h .t { font-family: var(--font-heading); font-weight: 800; font-size: 12px;
  letter-spacing: .09em; text-transform: uppercase; }
.pdlg-b { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pdlg-f { border-top: 1px solid var(--border-hair); padding: 13px 20px; background: var(--surface-sunk);
  display: flex; gap: 9px; justify-content: flex-end; }
.pdlinked { display: flex; align-items: center; gap: 8px; padding: 9px 11px; font-size: 12.5px;
  border: 1px solid var(--teal-200); background: var(--teal-50); border-radius: 7px; color: var(--teal-700); }

/* ═════════ TAB MENU (Table / Kanban) ═════════ */
.tabwrap { position: relative; display: inline-flex; }
.tab.hasmenu { gap: 6px; }
/* The caret is the only thing that says this tab has a choice behind it, and
   it is the ONLY way in on a touch screen — hover-open is fine-pointer only.
   It was reported as almost invisible at .7/9px. */
.tab .tcar { font-size: 10px; opacity: .8; padding: 0 2px; cursor: pointer;
  display: inline-block; transition: transform .13s ease, opacity .13s ease; }
.tabwrap:hover .tcar, .tab .tcar:hover { opacity: 1; }
.tab .tcar[aria-expanded="true"] { opacity: 1; transform: rotate(180deg); }
/* On a coarse pointer the caret is the ONLY way in — hover-open is fine-pointer
   only — so give it a finger-sized target. Padding, not width, so the glyph
   stays where it is and the tab does not reflow. */
@media (pointer: coarse) {
  .tab .tcar { padding: 6px 8px; margin: -6px -4px; font-size: 11px; opacity: 1; }
}
/* A CHILD of the wrapper, overlapping the strip's border by 1px, so moving the
   pointer from the caret into the menu never crosses a gap. */
.tabmenu { position: absolute; top: 100%; left: 0; margin-top: -1px; z-index: 40;
  background: #fff; border: 1px solid var(--border-hair); border-radius: 9px;
  box-shadow: var(--shadow-md); padding: 5px; min-width: 168px; }
.tabmenu .mi { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px;
  border-radius: 6px; font-family: var(--font-heading); font-weight: 600; font-size: 12px;
  color: var(--text-body); text-align: left; cursor: pointer; text-transform: none; letter-spacing: 0; }
.tabmenu .mi:hover { background: var(--teal-50); }
.tabmenu .mi.on { color: var(--teal-700); }
.tabmenu .mi .tick { margin-left: auto; color: var(--secure-500); font-weight: 800; }

/* ═════════ KANBAN ═════════ */
.kb { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; padding-bottom: 6px; }
/* max-width so a board with only one or two columns — an assignee board on a
   project where nothing is assigned yet, or a two-phase project — does not
   stretch its cards across the whole page. Five status columns on a 1050px
   content area are ~202px each, so this can never affect them. The mobile
   min-width below still wins: min beats max in CSS. */
.kcol { flex: 1 1 0; min-width: 190px; max-width: 380px; background: var(--surface-sunk);
  border: 1px solid var(--border-hair); border-radius: 10px; display: flex; flex-direction: column; }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-bottom: 1px solid var(--border-hair); }
.kcol-h .l { font-family: var(--font-heading); font-weight: 800; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--teal-700); }
.kcol-h .n { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.kcol-h .avs .a { width: 18px; height: 18px; font-size: 7.5px; }
.kcol-b { padding: 8px; display: flex; flex-direction: column; gap: 7px;
  overflow-y: auto; max-height: 62vh; }
.kc { background: #fff; border: 1px solid var(--border-hair); border-radius: 8px; padding: 9px 11px;
  cursor: pointer; transition: box-shadow var(--ease), transform var(--ease); }
.kc:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kc:focus-visible { outline: 2px solid var(--teal-400); outline-offset: 1px; }
.kc.mine { border-left: 3px solid var(--brass-500); }
.kc.sub { border-left: 3px solid var(--sub-500); background: #FCFBFE; }
.kc .nm { font-family: var(--font-heading); font-weight: 600; font-size: 12.5px;
  color: var(--text-strong); line-height: 1.35; }
.kc .nm.done { color: var(--text-faint); text-decoration: line-through; font-weight: 400; }
.kc .mt { display: flex; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 11px; color: var(--text-muted); }
.kc .mt .d { margin-left: auto; }
.kc .mt .avs .a { width: 18px; height: 18px; font-size: 7.5px; }
.kc .ic { display: flex; align-items: center; gap: 5px; margin-top: 6px;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.kempty { padding: 16px 8px; text-align: center; font-size: 11px; color: var(--text-faint); }

@media (max-width: 900px) {
  .pdrawer { width: 100%; }
  .kcol { min-width: 76vw; }
}

/* ═════════ DOCUMENTS — multi-select (2026-08-29) ═════════ */
.docbulk { display: flex; align-items: center; gap: 8px; padding: 9px 0 12px;
  flex-wrap: wrap; border-bottom: 1px solid var(--border-hair); margin-bottom: 10px; }
.docbulk .cnt { font-family: var(--font-heading); font-weight: 700; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--teal-700); }
.docbulk.off .cnt { color: var(--text-faint); }
.docbulk .btn:disabled { opacity: .4; cursor: default; }
table.t tr.picked td { background: var(--teal-50); }
table.t tr.picked td:first-child { box-shadow: inset 3px 0 0 var(--brass-400); }
/* ⛔ NOT `.cb.sel` — `.sel` is already the <select> class in this stylesheet
   (line ~264: chevron background, padding, min-width), and a compound selector
   does not stop the bare `.sel` rule applying. It rendered the tick box as a
   39px-wide dropdown. Same trap as `.kanban-*` in lcars-crm.css. */
.cb.cbon { background: var(--teal-500); border-color: var(--teal-500); }
.cb.cbon::after { content: ''; width: 4.5px; height: 8.5px; margin-top: -2px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(43deg); }
/* Still being scanned, so not downloadable — and therefore not selectable.
   An inert box says so without offering a tick that would 409. */
.cb.cbdis { border-style: dashed; border-color: var(--border-hair);
  cursor: not-allowed; background: var(--surface-sunk); }
.cb[role="checkbox"] { cursor: pointer; }
