/* LoopClosers Marketing Tracker: the CSM Tracker's "Maximalist Pop" design system
   (itself lifted from the loopclosers-website prototypes), unchanged so both
   internal tools look like one family. Marketing-specific pieces live in
   static/css/marketing.css. */

:root {
  --ink: #11100c; --cream: #fff6e9; --blue: #2b27ff; --pink: #ff45b5;
  --lime: #c9f23a; --orange: #ff5c1a; --cyan: #19d3e6;
  --sun: #ffd23f; --red: #f0303a; --paper: #fffdf6; --white: #fff;
  --muted: #6b6a5e; --muted-2: #4a4940; --line: rgba(17, 16, 12, .14); --soft: #e9e2d3;
  --display: 'Bricolage Grotesque', 'Space Grotesk', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45;
       -webkit-font-smoothing: antialiased; min-height: 100vh; padding-bottom: 60px; }
a { color: inherit; }
a.link { color: var(--blue); font-weight: 600; text-decoration: none; }
a.link:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.01em; }
h1 { font-weight: 800; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.04; }
h2 { font-weight: 800; font-size: 22px; line-height: 1.1; }
h3 { font-weight: 700; font-size: 17px; line-height: 1.2; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--muted-2); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.stack.lg > * + * { margin-top: 22px; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.mt { margin-top: 20px; } .mt-s { margin-top: 10px; } .mt-l { margin-top: 32px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Nav (floating island) ---------- */
nav.top { position: sticky; top: 0; z-index: 80; padding: 14px 0 10px; background: linear-gradient(var(--cream) 70%, rgba(255, 246, 233, 0)); }
.navbar { display: flex; align-items: center; gap: 18px; background: var(--cream); border: 3px solid var(--ink);
          border-radius: 16px; box-shadow: 5px 5px 0 var(--ink); height: 60px; padding: 0 10px 0 18px; }
.navbar .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.navbar .logo img { height: 24px; width: auto; display: block; }
.navbar .logo .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
                     background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px; }
.navlinks { display: flex; gap: 4px; font-weight: 600; font-size: 14.5px; }
.navlinks a { text-decoration: none; padding: 7px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.navlinks a:hover { color: var(--pink); }
.navlinks a.active { background: var(--ink); color: var(--cream); }
.navlinks .count { background: var(--pink); color: var(--cream); border: 2px solid var(--ink); border-radius: 999px;
                   font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 16px; }
.navlinks a.active .count { border-color: var(--cream); }
.navright { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: var(--cream);
           display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
           font-size: 17px; transition: transform .12s, box-shadow .12s; }
.iconbtn:hover { background: var(--lime); }
.iconbtn .badge { position: absolute; top: -7px; right: -7px; background: var(--pink); color: var(--cream);
                  border: 2px solid var(--ink); border-radius: 999px; font-size: 11px; font-weight: 700;
                  min-width: 20px; height: 20px; padding: 0 5px; display: flex; align-items: center; justify-content: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: var(--sun);
          font-family: var(--display); font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
          cursor: pointer; font-size: 15px; }
.avatar.sm { width: 26px; height: 26px; border-width: 2px; font-size: 11px; cursor: default; }
.dropdown { position: absolute; top: 74px; right: 0; width: min(380px, calc(100vw - 32px)); background: var(--cream);
            border: 3px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); z-index: 90;
            max-height: min(70vh, 560px); overflow: auto; }
.dropdown .dd-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
                     border-bottom: 3px solid var(--ink); position: sticky; top: 0; background: var(--cream); }
.dropdown .dd-item { display: block; padding: 11px 16px; border-bottom: 1px solid var(--line); text-decoration: none; cursor: pointer; }
.dropdown .dd-item:hover { background: var(--white); }
.dropdown .dd-item.unread { background: #fff; box-shadow: inset 5px 0 0 var(--pink); }
.dropdown .dd-item .t { font-weight: 700; font-size: 14px; }
.dropdown .dd-item .b { font-size: 13px; color: var(--muted-2); margin-top: 2px; }
.dropdown .dd-item .w { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.dropdown .dd-empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.navwrap { position: relative; }
.menu-btn { display: none; }
.mobile-links { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--pink); color: var(--cream);
       font-weight: 700; font-size: 15px; padding: 11px 20px; border-radius: 999px; border: 3px solid var(--ink);
       box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; cursor: pointer;
       text-decoration: none; white-space: nowrap; line-height: 1.1; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.btn.lime { background: var(--lime); color: var(--ink); }
.btn.cream { background: var(--cream); color: var(--ink); }
.btn.white { background: var(--white); color: var(--ink); }
.btn.ink { background: var(--ink); color: var(--cream); }
.btn.cyan { background: var(--cyan); color: var(--ink); }
.btn.blue { background: var(--blue); color: var(--cream); }
.btn.red { background: var(--red); color: var(--cream); }
.btn.sm { font-size: 13.5px; padding: 7px 14px; box-shadow: 3px 3px 0 var(--ink); border-width: 2px; }
.btn.sm:hover { box-shadow: 1px 1px 0 var(--ink); }
.btn.xs { font-size: 12px; padding: 4px 10px; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; }
.btn.xs:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn.block { width: 100%; }
.linkbtn { background: none; border: none; color: var(--blue); font-weight: 700; cursor: pointer; padding: 0; text-decoration: none; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--red); }
.x-btn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); background: var(--cream); cursor: pointer;
         font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.x-btn:hover { background: var(--red); color: var(--cream); }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 18px 0 20px; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head h1 { margin-top: 4px; }
.page-head .sub { color: var(--muted-2); margin-top: 6px; font-weight: 500; }
.crumb { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 13.5px; text-decoration: none; color: var(--muted-2); margin-top: 14px; }
.crumb:hover { color: var(--pink); }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 3px solid var(--ink); border-radius: var(--r-lg); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; min-width: 0; }
.card > .head { padding: 13px 18px; border-bottom: 3px solid var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card > .head h2, .card > .head h3 { font-size: 17px; font-weight: 800; font-family: var(--display); }
.card > .head .hint { font-size: 12px; font-weight: 600; opacity: .8; }
.card > .head .actions { margin-left: auto; display: flex; gap: 8px; }
.card > .body { padding: 16px 18px; }
.card > .body.flush { padding: 0; }
.card.flat { box-shadow: 4px 4px 0 var(--ink); border-radius: var(--r); }
.h-pink { background: var(--pink); color: var(--cream); }
.h-cyan { background: var(--cyan); color: var(--ink); }
.h-lime { background: var(--lime); color: var(--ink); }
.h-blue { background: var(--blue); color: var(--cream); }
.h-orange { background: var(--orange); color: var(--ink); }
.h-sun { background: var(--sun); color: var(--ink); }
.h-ink { background: var(--ink); color: var(--cream); }
.h-cream { background: var(--cream); color: var(--ink); }
.h-red { background: var(--red); color: var(--cream); }
.h-pink .btn.xs, .h-blue .btn.xs, .h-ink .btn.xs, .h-red .btn.xs { box-shadow: 2px 2px 0 var(--cream); border-color: var(--cream); }
.empty { border: 2px dashed var(--ink); border-radius: var(--r); padding: 22px; text-align: center; color: var(--muted-2); background: var(--paper); }
.empty .btn { margin-top: 12px; }
.note { background: var(--paper); border: 2px dashed var(--ink); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; }
.banner { border: 3px solid var(--ink); border-radius: var(--r); padding: 12px 16px; font-weight: 600; box-shadow: 4px 4px 0 var(--ink); }
.banner.lime { background: var(--lime); } .banner.sun { background: var(--sun); } .banner.orange { background: var(--orange); }

/* Definition lists inside cards */
.dl { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 9px 14px; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; font-size: 13px; display: flex; gap: 5px; align-items: baseline; }
.dl dd { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dl dd.empty-v { color: var(--muted); font-weight: 500; }
.lock { font-size: 11px; color: var(--muted); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- KPI (from platform.html) ---------- */
.kpi-row { display: grid; grid-template-columns: 5fr 8fr; gap: 18px; }
.roi { background: var(--blue); color: var(--cream); border: 3px solid var(--ink); border-radius: 18px; padding: 22px; box-shadow: 6px 6px 0 var(--ink); display: flex; flex-direction: column; min-width: 0; }
.roi .k { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.roi .big { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.4vw, 50px); line-height: 1; margin-top: 8px; }
.roi .big small { font-size: 13px; background: var(--lime); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px; vertical-align: middle; margin-left: 6px; font-weight: 700; font-family: var(--body); }
.roi .sub { font-size: 13px; color: #d8d5ff; margin-top: 8px; font-weight: 500; }
.roi svg { margin-top: auto; padding-top: 14px; width: 100%; height: 70px; overflow: visible; }
.roi .spark-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: #d8d5ff; font-weight: 600; margin-top: 4px; }
.mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.m { background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r); padding: 13px 14px; box-shadow: 4px 4px 0 var(--ink); min-width: 0; text-decoration: none; display: block; }
a.m:hover { background: var(--white); }
.m .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; flex-wrap: nowrap; }
.m .delta { background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px; font-size: 10.5px; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.m .delta.bad { background: var(--red); color: var(--cream); }
.m .delta.warn { background: var(--sun); }
.m .v { font-family: var(--display); font-weight: 800; font-size: 26px; margin-top: 6px; line-height: 1.05; overflow-wrap: anywhere; }
.m .s { font-size: 12px; color: var(--muted-2); margin-top: 3px; font-weight: 500; }
.m.alert { background: #ffe3e4; }

/* ---------- Forms (from demo-modal.js) ---------- */
label, .label { display: block; font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.fld { margin-bottom: 14px; min-width: 0; }
.fld .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.fld .req { color: var(--pink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local],
input[type=url], input[type=search], select, textarea {
  width: 100%; font-family: inherit; font-size: 15px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 12px;
  background: var(--white); color: var(--ink); outline: none; transition: box-shadow .12s; min-height: 44px; }
textarea { min-height: 76px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { box-shadow: 4px 4px 0 var(--blue); }
input.bad, select.bad, textarea.bad { border-color: var(--orange); box-shadow: 4px 4px 0 var(--orange); }
input:disabled, select:disabled, textarea:disabled { background: var(--soft); color: var(--muted-2); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
         background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%2311100c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
         background-repeat: no-repeat; background-position: right 13px center; }
select.sm, input.sm { min-height: 36px; padding: 6px 10px; font-size: 13.5px; border-width: 2px; border-radius: 10px; }
select.sm { padding-right: 30px; background-position: right 10px center; }
input[type=checkbox], input[type=radio] { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border: 3px solid var(--ink);
  border-radius: 6px; background: var(--white); cursor: pointer; flex: none; display: inline-grid; place-content: center; vertical-align: middle; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:checked { background: var(--lime); }
input[type=checkbox]:checked::after { content: ""; width: 10px; height: 6px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateY(-1px) rotate(-45deg); }
input[type=radio]:checked { background: var(--blue); box-shadow: inset 0 0 0 3px var(--white); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { box-shadow: 3px 3px 0 var(--blue); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; cursor: pointer; margin: 0; }
.err { color: #c43d00; font-size: 13px; font-weight: 700; margin-top: 8px; }
.err:empty { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.money-in { position: relative; }
.money-in::before { content: "₹"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted-2); pointer-events: none; }
.money-in input { padding-left: 28px; }
.money-in.sm::before { left: 10px; font-size: 13px; }
.money-in.sm input { padding-left: 22px; }

/* Segmented control / tabs (from demo-modal day picker) */
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button, .seg a { font-weight: 700; font-size: 13.5px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 11px;
                      background: var(--white); cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.seg button:hover, .seg a:hover { background: var(--cyan); }
.seg .sel, .seg .sel:hover { background: var(--blue); color: var(--cream); }
.seg .count { font-size: 11px; background: var(--cream); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 0 6px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 4px 8px; margin: 0 -4px 14px; scrollbar-width: thin; }
.tabs button { flex: none; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px;
        font-size: 12px; font-weight: 700; line-height: 1.35; white-space: nowrap; background: var(--white); max-width: 100%; }
.chip.lg { font-size: 13.5px; padding: 4px 13px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
.st-discovery { background: var(--sun); }
.st-poc { background: var(--cyan); }
.st-in-development { background: var(--blue); color: var(--cream); }
.st-live { background: var(--lime); }
.st-stuck { background: var(--orange); }
.st-closed { background: var(--ink); color: var(--cream); }
.stage { background: var(--white); }
.stage.warn { border-color: var(--orange); box-shadow: 2px 2px 0 var(--orange); }
.flag { cursor: default; }
.flag.red { background: var(--red); color: var(--cream); }
.flag.orange { background: var(--cream); border-color: var(--orange); color: #b23a00; }
.flag.info { background: var(--soft); }
.flag.acked { opacity: .55; text-decoration: line-through; }
.ap-pending { background: var(--sun); }
.ap-approved { background: var(--lime); }
.ap-changes_requested { background: var(--cyan); }
.ap-rejected { background: var(--red); color: var(--cream); }
.ap-draft, .ap-withdrawn, .ap-superseded { background: var(--soft); color: var(--muted-2); }
.q-tag { font-size: 11px; font-weight: 700; border: 2px solid var(--ink); border-radius: 6px; padding: 0 6px; background: var(--cream); white-space: nowrap; }
.person { background: var(--white); }
.person.on { background: var(--lime); }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.fdot { min-width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.fdot.red { background: var(--red); color: var(--cream); }
.fdot.orange { background: var(--sun); }

/* ---------- Filters bar ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters select, .filters input { width: auto; min-width: 140px; }
.filters input[type=search] { min-width: 240px; flex: 1; max-width: 320px; }
.attention { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.attention a { text-decoration: none; }

/* ---------- Kanban board ---------- */
.board { display: grid; grid-template-columns: repeat(6, minmax(240px, 1fr)); gap: 16px; overflow-x: auto; padding: 4px 8px 16px 4px; margin: 0 -8px 0 -4px; align-items: start; }
.board.no-closed { grid-template-columns: repeat(5, minmax(240px, 1fr)); }
.col { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; min-width: 0; }
.col-head { padding: 11px 14px; border-bottom: 3px solid var(--ink); border-radius: 15px 15px 0 0; display: flex; align-items: center; gap: 8px; }
.col-head h3 { font-size: 15px; font-weight: 800; }
.col-head .n { margin-left: auto; font-weight: 700; font-size: 12px; background: var(--cream); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; }
.col-head .val { font-size: 12px; font-weight: 600; opacity: .85; }
.col-body { padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 80px; }
.col-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 0; }
.pcard { display: block; text-decoration: none; background: var(--white); border: 3px solid var(--ink); border-radius: 14px; padding: 12px 13px;
         box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.pcard:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.pcard .client { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .name { font-family: var(--display); font-weight: 800; font-size: 16.5px; line-height: 1.15; margin: 3px 0 8px; }
.pcard .headline { font-size: 13px; color: var(--muted-2); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .foot { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pcard .foot .spacer { min-width: 4px; }
.pcard .age { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pcard.red { box-shadow: 4px 4px 0 var(--red); }

/* ---------- Tables (from celevida .summary) ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2);
          padding: 10px 12px; border-bottom: 3px solid var(--ink); background: var(--cream); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--pink); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--paper); }
.tbl td.name { font-weight: 700; min-width: 180px; }
.tbl th.right, .tbl td.right { text-align: right; }
.tbl .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }
/* A table that fits the screen: no fixed minimum widths, long text wraps (the projects list). */
.tbl.fit td.name { min-width: 0; }
.tbl.fit td, .tbl.fit th { padding: 9px 10px; }
.tbl.fit .cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tbl.fit .mt-xs { margin-top: 4px; }
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.th-sort:hover, .th-sort.on { color: var(--pink); }
.th-sep { color: var(--line); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.proj-tbl .col-update { width: 30%; }
@media (max-width: 1100px) { .proj-tbl .col-update { display: none; } }
@media (max-width: 760px) { .proj-tbl .col-golive { display: none; } }
/* Phones: each project becomes a stacked block (name, then CSM, status, deal and flags wrapping). */
@media (max-width: 600px) {
  .proj-tbl thead { display: none; }
  .proj-tbl, .proj-tbl tbody { display: block; }
  .proj-tbl tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .proj-tbl tr:last-child { border-bottom: 0; }
  .proj-tbl td { display: block; padding: 0; border: 0; background: none !important; }
  .proj-tbl td.name { flex: 1 0 100%; }
  .proj-tbl td.right { text-align: left; }
}

/* ---------- Project page ---------- */
.phead { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; background: var(--white); border: 3px solid var(--ink);
         border-radius: var(--r-lg); box-shadow: 6px 6px 0 var(--ink); padding: 20px 22px; margin: 14px 0 18px; }
.phead h1 { margin: 6px 0 10px; }
.phead .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.phead .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stuck-note { margin-top: 10px; background: #ffe7dc; border: 2px solid var(--orange); border-radius: 10px; padding: 7px 11px; font-size: 13.5px; font-weight: 600; }

/* Lifecycle stepper: one row of nodes on one line, grouped by status. Every
   node and gate is 26px tall with the line through its middle, so circles
   line up whatever the labels wrap to; labels always reserve two lines. */
.stepper { --track: #d8d0bf; display: flex; align-items: flex-start; overflow-x: auto; padding: 4px 2px 8px; margin-bottom: 4px; scrollbar-width: thin; }
.stp-group { flex: none; display: flex; flex-direction: column; }
.stp-group .g-label { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; font-size: 10.5px; font-weight: 800; text-transform: uppercase;
                      letter-spacing: .09em; color: var(--muted); margin: 0 6px 9px; padding-bottom: 5px; border-bottom: 3px solid var(--track); }
.stp-group .g-label small { font-size: 10.5px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.stp-group.now .g-label { color: var(--ink); border-bottom-color: var(--ink); }
.stp-group.now.g-discovery .g-label { border-bottom-color: var(--sun); }
.stp-group.now.g-poc .g-label { border-bottom-color: var(--cyan); }
.stp-group.now.g-in-development .g-label { border-bottom-color: var(--blue); }
.stp-group.now.g-live .g-label { border-bottom-color: var(--lime); }
.stp-group.bare .g-label { border-bottom-color: transparent; margin: 0 0 9px; }
.stp-group.optional .g-label { border-bottom-style: dashed; }
.stp-row { display: flex; align-items: flex-start; }
.stp { flex: none; width: 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.stp::before, .stp::after, .stp-gate::before, .stp-gate::after { content: ""; position: absolute; top: 11.5px; height: 3px; width: 50%; background: var(--track); }
.stp::before, .stp-gate::before { left: 0; }
.stp::after, .stp-gate::after { right: 0; }
.stp.lit-in::before, .stp.lit-out::after, .stp-gate.lit-in::before, .stp-gate.lit-out::after { background: var(--ink); }
.stp.first::before, .stp.last::after { display: none; }
.stp .node { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink); background: var(--white); position: relative; z-index: 1;
             display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; transition: transform .15s; }
.stp .lbl { font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--muted); min-height: 2.4em; padding: 0 3px; }
.stp .sub { font-size: 10.5px; font-weight: 700; color: var(--muted-2); margin-top: -4px; white-space: nowrap; }
.stp.done .node { background: var(--lime); }
.stp.done .lbl { color: var(--muted-2); }
.stp.current .node { background: var(--pink); transform: scale(1.18); box-shadow: 3px 3px 0 var(--ink); }
.stp.paused .node, .stp.stuck .node { background: var(--orange); transform: scale(1.18); box-shadow: 3px 3px 0 var(--ink); }
.stp.lost .node, .stp.lost-at .node { background: var(--red); color: var(--white); }
.stp.lost-at .node { transform: scale(1.18); box-shadow: 3px 3px 0 var(--ink); }
.stp.current .lbl, .stp.paused .lbl, .stp.stuck .lbl, .stp.lost .lbl, .stp.lost-at .lbl { color: var(--ink); font-weight: 800; }
.stp.skip .node { border-style: dashed; border-color: #a9a294; background: transparent; }
.stp.skip .lbl { color: #8d887c; font-weight: 500; }
.stp-gate { flex: none; width: 26px; height: 26px; position: relative; display: grid; place-items: center; }
.stp-gate i { width: 16px; height: 16px; transform: rotate(45deg); border: 3px solid var(--ink); background: var(--white); position: relative; z-index: 1; }
.stp-gate.ok i { background: var(--lime); }
.stp-gate.wait i { background: var(--sun); }
.stp-gate.na i { border-style: dashed; border-color: #a9a294; background: var(--cream); }
.stp-detours { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin: 1px 6px 0; }
.stp-detours span { font-size: 10.5px; font-weight: 700; color: #8d887c; border: 2px dashed #b9b2a3; border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.stp-detours span.on { color: var(--ink); border: 2px solid var(--ink); background: var(--orange); }
.stp-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin: 0 4px 14px; }
.stp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.stp-legend i { width: 10px; height: 10px; transform: rotate(45deg); border: 2px solid var(--ink); display: inline-block; }
.stp-legend .ok { background: var(--lime); } .stp-legend .wait { background: var(--sun); } .stp-legend .no { background: var(--white); }
.stp-legend .dash { border-style: dashed; border-color: #a9a294; border-radius: 50%; transform: none; }

.timeline { list-style: none; }
.timeline li { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: none; }
.timeline .when { font-size: 12px; color: var(--muted); font-weight: 600; }
.timeline .what { font-size: 14px; }
.timeline .diff { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }
.timeline .diff s { color: var(--muted); }

.update { border: 3px solid var(--ink); border-radius: var(--r); background: var(--white); box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px; }
.update.latest { box-shadow: 4px 4px 0 var(--pink); }
.update .uh { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.update .uh h3 { font-size: 16px; }
.update .uh .when { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: auto; }
.update .ub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 10px; font-size: 14px; }
.update .ub .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }

.apcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.history { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.history summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--blue); }
.history .hv { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.history .hv:last-child { border-bottom: none; }
.diffv s { color: var(--muted); text-decoration-thickness: 2px; margin-right: 6px; }
.diffv b { background: var(--sun); padding: 0 3px; border-radius: 4px; }
.decision { margin-top: 12px; border-radius: 12px; border: 2px solid var(--ink); padding: 10px 12px; font-size: 13.5px; }
.decision.approved { background: #f1fbd2; } .decision.rejected { background: #ffe3e4; } .decision.changes_requested { background: #dcf8fb; }
.breakdown { width: 100%; font-size: 13px; border-collapse: collapse; margin-top: 6px; }
.breakdown td { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.breakdown td:last-child { text-align: right; font-weight: 700; }
.margin-pill { font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.margin-pill.good { background: var(--lime); } .margin-pill.warn { background: var(--sun); } .margin-pill.bad { background: var(--red); color: var(--cream); }

.picker-team { margin-bottom: 12px; }
.picker-team .tl { font-size: 12px; font-weight: 700; display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.picker-team .tl .sugg { background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.picker-team .people { display: flex; gap: 8px; flex-wrap: wrap; }
.picker-team .person { cursor: pointer; font-size: 13.5px; padding: 5px 12px; }
.picker-team .person:hover { background: var(--cyan); }
.picker-team .person.on:hover { background: var(--lime); }
.effort-rows { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.effort-row { display: grid; grid-template-columns: 1fr 130px 1.4fr; gap: 10px; align-items: center; }
.stage-block + .stage-block { margin-top: 16px; }
.stage-block .sb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.team-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) 120px 2fr 30px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.team-row:last-child { border-bottom: none; }
.team-row input { min-height: 34px; padding: 5px 9px; font-size: 13.5px; border-width: 2px; border-radius: 9px; }

/* ---------- Approvals inbox ---------- */
.inbox { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.ap-list { display: flex; flex-direction: column; gap: 10px; }
.ap-item { display: block; text-align: left; width: 100%; background: var(--white); border: 3px solid var(--ink); border-radius: 14px; padding: 11px 13px;
           box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: transform .1s, box-shadow .1s; }
.ap-item:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.ap-item.sel { background: var(--cream); box-shadow: 3px 3px 0 var(--pink); border-color: var(--ink); }
.ap-item .r1 { display: flex; gap: 8px; align-items: center; }
.ap-item .r1 .age { margin-left: auto; font-size: 12px; font-weight: 700; }
.ap-item .r2 { font-family: var(--display); font-weight: 800; font-size: 15.5px; margin-top: 6px; }
.ap-item .r3 { font-size: 12.5px; color: var(--muted-2); margin-top: 2px; }
.age.ok { color: var(--muted); } .age.warn { color: #a36b00; } .age.bad { color: var(--red); }
.ap-panel { position: sticky; top: 92px; }
.checklist { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.checklist .check .have { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .bl { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bv { font-weight: 700; font-size: 13px; white-space: nowrap; min-width: 34px; text-align: right; }
.track { height: 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.track .fill { height: 100%; background: var(--blue); border-right: 2px solid var(--ink); min-width: 0; }
.track .fill.zero { border-right: none; }
.funnel { display: flex; flex-direction: column; gap: 7px; }
.funnel .fs { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.funnel .fb { height: 30px; border: 3px solid var(--ink); border-radius: 10px; display: flex; align-items: center; padding: 0 10px; font-weight: 800; font-family: var(--display); min-width: 46px; }
.funnel .fs .pc { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 6px; font-family: var(--body); }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.cmp th:first-child, .cmp td:first-child { text-align: left; color: var(--muted-2); font-weight: 600; }
.cmp thead th { font-family: var(--display); font-size: 16px; font-weight: 800; color: var(--ink); border-bottom: 3px solid var(--ink); }
.cmp td.best { background: #f1fbd2; font-weight: 800; }
.flaglist { display: flex; flex-direction: column; }
.flaglist .fr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.flaglist .fr:last-child { border-bottom: none; }
.flaglist .fr .d { font-size: 12.5px; color: var(--muted-2); }
.stat-trio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px; background: var(--cream); }
.stat .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .v { font-family: var(--display); font-weight: 800; font-size: 22px; margin-top: 3px; }
.stat .s { font-size: 11.5px; color: var(--muted); }

/* Profitability */
.prof-top { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3.4fr); gap: 16px; align-items: stretch; }
.prof-head { background: var(--ink); color: var(--cream); border: 3px solid var(--ink); border-radius: 16px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--lime); }
.prof-head .k { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.prof-head .v { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; margin: 8px 0 6px; }
.prof-head .s { font-size: 12.5px; color: #d9d5c7; margin-top: 3px; }
.bands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.band { text-align: left; border: 3px solid var(--ink); border-radius: 14px; padding: 11px 12px; box-shadow: 4px 4px 0 var(--ink); background: var(--white);
        cursor: pointer; transition: transform .12s, box-shadow .12s; font: inherit; color: var(--ink); min-width: 0; }
.band:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.band.sel { box-shadow: 4px 4px 0 var(--pink); outline: 3px solid var(--pink); outline-offset: 2px; }
.band .bl { font-weight: 800; font-family: var(--display); font-size: 15px; }
.band .br { font-size: 11.5px; font-weight: 600; opacity: .8; }
.band .bn { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; margin-top: 10px; }
.band .bn small { font-family: var(--body); font-size: 13px; font-weight: 700; opacity: .8; }
.band .bs { font-size: 12px; font-weight: 600; opacity: .85; margin-top: 3px; }
.b-loss { background: var(--red); color: var(--cream); }
.b-below { background: var(--sun); }
.b-healthy { background: var(--lime); }
.b-strong { background: var(--blue); color: var(--cream); }
.b-none { background: var(--soft); cursor: default; box-shadow: none; border-style: dashed; }
.b-none:hover { transform: none; box-shadow: none; }
.tbl tr.team-h td { background: var(--paper); padding: 8px 12px; }

/* ---------- Team matrix ---------- */
.loadgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lrow { display: grid; grid-template-columns: minmax(70px, 1fr) 1.4fr auto; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; border-radius: 8px; }
.lrow:hover .lname { color: var(--pink); }
.lname { font-weight: 700; font-size: 14px; }
.load { display: flex; gap: 3px; }
.load i { flex: 1; height: 14px; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); }
.load i.on { background: var(--lime); } .load.warn i.on { background: var(--sun); } .load.bad i.on { background: var(--red); }
.matrix-wrap { overflow: auto; max-height: 75vh; }
table.matrix { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 7px 9px; vertical-align: top; }
.matrix thead th { position: sticky; top: 0; background: var(--cream); z-index: 2; border-bottom: 3px solid var(--ink); min-width: 130px; max-width: 170px; text-align: left; font-weight: 700; }
.matrix thead th a { text-decoration: none; }
.matrix thead th a:hover { color: var(--pink); }
.matrix thead th .sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.matrix .rh { position: sticky; left: 0; background: var(--white); z-index: 1; font-weight: 700; min-width: 140px; border-right: 3px solid var(--ink); white-space: nowrap; }
.matrix thead th.rh { z-index: 3; background: var(--cream); }
.matrix tr.team-h td { background: var(--paper); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); position: sticky; left: 0; }
.matrix .cell { display: flex; flex-direction: column; gap: 4px; }
.mchip { font-size: 11px; font-weight: 700; border: 2px solid var(--ink); border-radius: 7px; padding: 1px 6px; background: var(--white); white-space: nowrap; }
.mchip.current { background: var(--lime); }
.mchip .e { font-weight: 600; color: var(--muted-2); margin-left: 4px; }

/* ---------- Modal (from demo-modal.js) ---------- */
.modal-root { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal-back { position: fixed; inset: 0; background: rgba(17, 16, 12, .62); backdrop-filter: blur(4px); }
.modal { position: relative; z-index: 1; width: 100%; max-width: 560px; background: var(--cream); border: 3px solid var(--ink); border-radius: 22px;
         box-shadow: 9px 9px 0 var(--ink); padding: 26px 26px 22px; animation: lcPop .2s cubic-bezier(.2, 1.3, .5, 1); margin-bottom: 5vh; }
.modal.wide { max-width: 760px; }
@keyframes lcPop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { font-size: 24px; margin-right: 46px; }
.modal .msub { font-size: 14px; color: var(--muted-2); margin: 6px 0 18px; }
.modal .x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); background: var(--cream);
            font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
.modal .x:hover { transform: rotate(90deg); background: var(--pink); color: var(--cream); }
.modal .mfoot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.modal .mbody { margin-top: 14px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 3px solid var(--ink); border-radius: 14px; padding: 11px 13px; background: var(--white); cursor: pointer; margin-bottom: 10px; }
.opt:hover { background: var(--paper); }
.opt.on { box-shadow: 4px 4px 0 var(--blue); }
.opt.off { opacity: .55; cursor: not-allowed; }
.opt .ot { font-weight: 700; }
.opt .od { font-size: 13px; color: var(--muted-2); margin-top: 2px; }
.opt-extra { margin: -2px 0 12px 0; padding: 12px 14px 2px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--paper); }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 700; background: var(--white); border: 3px solid var(--ink); border-radius: 12px; padding: 12px 14px; letter-spacing: .03em; word-break: break-all; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { background: var(--ink); color: var(--cream); border: 3px solid var(--ink); border-radius: 14px; padding: 11px 16px; font-weight: 600; font-size: 14px;
         box-shadow: 5px 5px 0 var(--lime); max-width: min(420px, calc(100vw - 36px)); animation: lcPop .2s ease-out; }
.toast.error { background: var(--red); box-shadow: 5px 5px 0 var(--ink); }

/* ---------- Login ---------- */
body.login-body { background: var(--blue); overflow-x: hidden; padding: 0; }
body.login-body main.wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding-top: 30px; padding-bottom: 30px; }
.blob { position: fixed; border-radius: 50%; z-index: 0; border: 3px solid var(--ink); }
.blob.p { width: 300px; height: 300px; background: var(--pink); top: -90px; right: 6%; }
.blob.o { width: 170px; height: 170px; background: var(--orange); bottom: 40px; right: 24%; }
.blob.c { width: 130px; height: 130px; background: var(--cyan); top: 40%; left: -40px; }
.blob.l { width: 90px; height: 90px; background: var(--lime); bottom: -20px; left: 18%; }
.login-card { position: relative; z-index: 2; width: 100%; max-width: 440px; background: var(--cream); border: 3px solid var(--ink); border-radius: 24px;
              box-shadow: 10px 10px 0 var(--ink); padding: 32px 30px 28px; }
.login-card .logo { height: 34px; width: auto; display: block; }
.login-card .sticker { display: inline-flex; align-items: center; gap: 8px; background: var(--lime); font-weight: 700; padding: 5px 13px; border-radius: 999px;
                       border: 2px solid var(--ink); transform: rotate(-2deg); font-size: 12.5px; margin: 22px 0 10px; }
.login-card h1 { font-size: 34px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted-2); margin-bottom: 22px; }
.login-card .btn { width: 100%; margin-top: 6px; font-family: var(--display); font-weight: 800; font-size: 17px; padding: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .navlinks a { padding: 7px 9px; }
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loadgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c3, .c4, .c5 { grid-column: span 6; } .c7, .c8 { grid-column: span 12; }
  .prof-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .navlinks { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-links { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-bottom: 3px solid var(--ink); }
  .mobile-links a { text-decoration: none; font-weight: 700; padding: 9px 12px; border-radius: 10px; border: 2px solid var(--ink); background: var(--white); display: flex; justify-content: space-between; }
  .mobile-links a.active { background: var(--lime); }
  .grid2, .grid3, .kpi-row, .inbox, .apcards { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid > * { grid-column: span 12; }
  .bands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phead { grid-template-columns: 1fr; }
  .phead .actions { justify-content: flex-start; }
  .ap-panel { position: static; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .update .ub { grid-template-columns: minmax(0, 1fr); }
  .team-row { grid-template-columns: 1fr 90px 30px; }
  .team-row .tnote { grid-column: 1 / -1; }
  .effort-row { grid-template-columns: 1fr 110px; }
  .effort-row .tnote { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .navbar { padding: 0 8px 0 12px; gap: 10px; }
  .navbar .logo .tag { display: none; }
  .mgrid, .loadgrid, .grid4 { grid-template-columns: minmax(0, 1fr); }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .filters select, .filters input { flex: 1 1 140px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .modal { padding: 22px 18px 18px; }
  .funnel .fs { grid-template-columns: 110px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Invoicing ---------- */
.ms-editor { border: 2px dashed var(--ink); border-radius: 14px; background: var(--paper); padding: 12px; }
.ms-head, .ms-row { display: grid; grid-template-columns: minmax(100px, 1.5fr) minmax(110px, 1.3fr) 74px 112px 148px 28px; gap: 8px; align-items: center; }
.ms-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 2px 6px; }
.ms-rows { display: flex; flex-direction: column; gap: 8px; }
.ms-row input, .ms-row select { min-height: 38px; padding: 6px 9px; font-size: 14px; border-width: 2px; border-radius: 9px; }
.ms-row select { padding-right: 30px; background-position: right 10px center; }
.ms-row.locked { opacity: .7; }
.ms-pct { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.ms-total { margin: 10px 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ms-empty { padding: 6px 2px; }
.stat.bad { background: #ffe3e4; border-color: var(--red); }
.tbl tr.missed td { background: #fff1f1; }
@media (max-width: 900px) {
  .ms-head { display: none; }
  .ms-row { grid-template-columns: 1fr 1fr; padding: 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); }
  .ms-row > :first-child { grid-column: 1 / -1; }
}
.phead > * { min-width: 0; }
.chip.flag { white-space: normal; text-align: left; }

/* ---------- Calendar ---------- */
.cal-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-size: 22px; margin-left: 6px; }
.cal-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-toggle { display: inline-flex; align-items: center; gap: 7px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white);
              padding: 4px 11px; font-weight: 700; font-size: 12.5px; cursor: pointer; opacity: .45; }
.cal-toggle.on { opacity: 1; }
.cal-toggle .sw { width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--ink); background: var(--g); }
.cal-toggle .n { font-size: 11px; background: var(--cream); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 6px; }
.g-milestones { --g: var(--sun); } .g-approvals { --g: #ff9bd6; } .g-work { --g: #e9e5ff; }
.g-invoicing { --g: #ffb48f; } .g-updates { --g: #d8f6fa; } .g-stages { --g: #e7f7b3; }
.cal-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; min-width: 760px; background: var(--ink); gap: 2px; }
.cal-dow { background: var(--ink); color: var(--cream); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; padding: 6px 8px; }
.cal-cell { background: var(--white); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; min-width: 0; }
.cal-cell:hover { background: var(--paper); }
.cal-cell:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.cal-cell.wkend { background: #fbf7ee; }
.cal-cell.out { background: #f3eee3; }
.cal-cell.out .cal-dn { color: var(--muted); }
.cal-cell.today { box-shadow: inset 0 0 0 3px var(--blue); }
.cal-dn { font-weight: 800; font-family: var(--display); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.cal-today { font-size: 10px; font-family: var(--body); text-transform: uppercase; letter-spacing: .06em; background: var(--blue); color: var(--cream); border-radius: 999px; padding: 1px 7px; }
.cal-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-ev { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; line-height: 1.25; text-decoration: none; color: var(--ink);
          background: var(--g); border: 1.5px solid var(--ink); border-radius: 7px; padding: 2px 5px; min-width: 0; }
.cal-ev .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-ev .i { flex: none; font-size: 11px; }
.cal-ev:hover { filter: brightness(.95); }
.cal-ev.t-work { background: var(--white); border-left: 6px solid var(--tc, #888); }
.cal-ev.cont { opacity: .7; border-style: dashed; }
.cal-ev.tone-bad, .cal-item.tone-bad { background: #ffd9db; border-color: var(--red); }
.cal-ev.tone-late, .cal-item.tone-late { background: #ffe9c7; }
.cal-ev.tone-good { background: #e6f7b0; }
.cal-ev.t-golive_due { background: var(--white); border-style: dashed; }
.cal-ev.t-golive_due.tone-late { background: #ffe9c7; border-color: var(--red); }
.cal-more { background: none; border: none; text-align: left; font-size: 11.5px; font-weight: 700; color: var(--blue); cursor: pointer; padding: 0 2px; }
.cal-count { display: none; }
.cal-list { display: flex; flex-direction: column; gap: 8px; }
.cal-item { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--ink); background: var(--white); border: 2px solid var(--ink);
            border-left: 8px solid var(--g); border-radius: 12px; padding: 8px 12px; }
.cal-item:hover { background: var(--paper); }
.cal-item.t-work { border-left-color: var(--tc, #888); }
.cal-item .ci-icon { width: 22px; flex: none; text-align: center; font-size: 15px; }
.cal-item .ci-main { min-width: 0; }
.cal-item .ci-t { font-weight: 700; font-size: 14px; }
.cal-item .ci-p { font-weight: 600; color: var(--muted-2); }
.cal-item .ci-d { font-size: 13px; color: var(--muted-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.cal-item .ci-m { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cal-month { font-family: var(--display); font-weight: 800; font-size: 18px; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 3px solid var(--ink); }
.cal-month:first-child { margin-top: 0; }
.cal-day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cal-day:last-child { border-bottom: none; }
.cal-day.future .cal-dh { color: var(--blue); }
.cal-dh { font-weight: 800; font-size: 13.5px; display: flex; gap: 6px; align-items: center; align-content: flex-start; align-self: start; flex-wrap: wrap; }
@media (max-width: 700px) {
  .cal-grid { min-width: 0; }
  .cal-cell { min-height: 56px; padding: 4px; }
  .cal-evs { flex-direction: row; flex-wrap: wrap; gap: 3px; }
  .cal-ev { width: 10px; height: 10px; padding: 0; border-radius: 50%; border-width: 1.5px; }
  .cal-ev .tx, .cal-ev .i, .cal-more, .cal-today { display: none; }
  .cal-ev.t-work { border-left-width: 1.5px; background: var(--tc, #888); }
  .cal-dow { padding: 5px 2px; text-align: center; font-size: 10px; letter-spacing: 0; }
  .cal-day { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* ---------- SOW PDFs ---------- */
.pdf-pick { display: flex; align-items: center; gap: 12px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--paper); padding: 12px 14px; }
.pdf-pick.over { background: #e6f7b0; border-style: solid; }
.pdf-icon { flex: none; width: 42px; height: 50px; border: 2px solid var(--ink); border-radius: 6px 14px 6px 6px; background: var(--red); color: var(--cream);
            font-weight: 800; font-size: 12px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.pdf-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pdf-link { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.pdf-tag { font-size: 9.5px; font-weight: 800; background: var(--red); color: var(--cream); border: 1.5px solid var(--ink); border-radius: 4px; padding: 0 4px; flex: none; }
.chip.new-pdf { background: var(--lime); font-size: 11px; margin-left: 6px; }
.sow-hist { margin-top: 16px; border-top: 2px solid var(--ink); padding-top: 12px; }
.sow-hist .sv { padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); margin-top: 8px; }
.sow-hist .sv.official { background: #f1fbd2; }
.sv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sv-ver { font-family: var(--display); font-weight: 800; font-size: 16px; }
.sv-note { font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.sv-req { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.sv-comment { flex-basis: 100%; color: var(--muted-2); }
@media (max-width: 560px) { .pdf-pick { flex-wrap: wrap; } }

/* ---------- Work log ---------- */
.picker-team .tl .swatch { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); display: inline-block; }
.people-sum { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.people-sum .ps { display: flex; align-items: center; gap: 6px; }
.work-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 150px 90px minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.work-row:last-child { border-bottom: none; }
.work-row .wr-note { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .work-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .work-row .wr-when, .work-row .wr-note { grid-column: 1; }
  .work-row .wr-h { grid-column: 2; grid-row: 1; }
  .work-row .wr-act { grid-column: 2; grid-row: 2; }
}

/* ---------- Navigation groups ---------- */
.navlinks { align-items: center; }
.navgroup { position: relative; }
.navgroup-btn { background: none; border: none; font: inherit; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.navgroup-btn:hover { color: var(--pink); }
.navgroup.active > .navgroup-btn { background: var(--ink); color: var(--cream); }
.navmenu { display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 200px; background: var(--cream); border: 3px solid var(--ink);
           border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); padding: 6px; z-index: 90; }
.navgroup:hover .navmenu, .navgroup:focus-within .navmenu { display: flex; flex-direction: column; gap: 2px; }
.navmenu a { border-radius: 10px; padding: 8px 12px; }
.navmenu a:hover { background: var(--white); color: var(--ink); }
.navlinks .count.red, .mobile-links .count.red { background: var(--red); }
.mgroup { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 4px 0; }
@media (max-width: 1240px) {
  .navlinks { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-links { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-bottom: 3px solid var(--ink); }
  .mobile-links a { text-decoration: none; font-weight: 700; padding: 9px 12px; border-radius: 10px; border: 2px solid var(--ink); background: var(--white); display: flex; justify-content: space-between; }
  .mobile-links a.active { background: var(--lime); }
  .mobile-links .count { background: var(--pink); color: var(--cream); border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px; font-size: 11px; }
}

/* ---------- Charts: monthly columns, donut ---------- */
.colchart { min-width: 0; }
.cols { display: grid; gap: 6px; align-items: end; }
.cc { display: flex; flex-direction: column; align-items: stretch; min-width: 0; background: none; border: none; padding: 0; font: inherit; color: inherit; }
button.cc { cursor: pointer; }
button.cc:hover .cbars { background: var(--paper); }
.cc .cv { font-size: 10.5px; font-weight: 700; text-align: center; min-height: 15px; white-space: nowrap; overflow: hidden; }
.cbars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 2px solid var(--ink); border-radius: 6px 6px 0 0; }
.cbars.stacked { flex-direction: column-reverse; align-items: stretch; justify-content: flex-start; gap: 0; }
.cbars .cb { flex: 1; min-width: 4px; max-width: 34px; border: 1.5px solid var(--ink); border-bottom: none; border-radius: 4px 4px 0 0; }
.cbars.stacked .cb { max-width: none; flex: none; border-radius: 0; border-bottom: none; }
.cbars.stacked .cb:last-child { border-radius: 4px 4px 0 0; }
.cbars .cb.zero { border: none; }
.cc .cl { font-size: 10.5px; font-weight: 700; color: var(--muted-2); text-align: center; margin-top: 4px; white-space: nowrap; }
.cc .cl small { font-weight: 500; color: var(--muted); margin-left: 2px; }
.cc.cur .cl { color: var(--blue); }
.cc.cur .cbars { background: rgba(43, 39, 255, .06); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; font-weight: 600; margin-top: 8px; }
.legend i { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--ink); border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart-empty { padding: 18px 0; }
.donut { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; }
.donut svg { width: 140px; height: 140px; }
.donut .dc { font-family: var(--display); font-weight: 800; font-size: 18px; fill: var(--ink); }
.donut .ds { font-size: 8px; fill: var(--muted); font-weight: 600; }
.dlegend { display: flex; flex-direction: column; gap: 6px; }
.dl-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 40px; gap: 8px; align-items: center; font-size: 13px; }
.dl-row i { width: 12px; height: 12px; border: 1.5px solid var(--ink); border-radius: 3px; }
.dl-l { font-weight: 700; }
.dl-p { color: var(--muted); text-align: right; font-size: 12px; }
.mini { min-width: 0; }
.mini-h { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; margin-bottom: 8px; font-size: 13.5px; }
.trend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 26px; }
@media (max-width: 1100px) { .trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .trend-grid { grid-template-columns: minmax(0, 1fr); } .donut { grid-template-columns: 110px minmax(0, 1fr); } .donut svg { width: 110px; height: 110px; } }

/* ---------- Dashboard bits ---------- */
.stat.warn { background: #fff4d6; border-color: #a36b00; }
.util-list { display: flex; flex-direction: column; gap: 8px; }
.util-row { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) 54px 44px minmax(0, 150px); gap: 10px; align-items: center; }
.util-row .track { height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.util-row .fill { height: 100%; border-right: 2px solid var(--ink); }
.bad-t { color: var(--red); font-weight: 700; }
.split-rows { display: flex; flex-direction: column; gap: 14px; }
.stackbar { display: flex; height: 26px; border: 2px solid var(--ink); border-radius: 9px; overflow: hidden; margin-top: 6px; background: var(--paper); }
.seg-bar { display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; border-right: 2px solid var(--ink); min-width: 22px; }
.seg-bar:last-child { border-right: none; }
@media (max-width: 700px) { .util-row { grid-template-columns: minmax(0, 1fr) 54px 44px; } .util-row .track, .util-row > :last-child { grid-column: 1 / -1; } }

/* ---------- Smoke signals ---------- */
.sig-sum { display: grid; gap: 16px; }
.sig-card { background: var(--white); border: 3px solid var(--ink); border-radius: var(--r-lg); box-shadow: 5px 5px 0 var(--ink); padding: 14px 16px; }
.sig-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.sn { border: 2px solid var(--ink); border-radius: 12px; padding: 6px 10px; font-size: 12px; font-weight: 700; display: flex; flex-direction: column; }
.sn b { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.sn.red { background: #ffd9db; } .sn.orange { background: #ffe3cc; } .sn.ok { background: #e6f7b0; }
.sig-matrix tr { cursor: pointer; }
.sig-matrix tr.sel td { background: #fff4d6; }
.sig-matrix td.heat.h1 { background: #ffe9c7; } .sig-matrix td.heat.h2 { background: #ffc78f; } .sig-matrix td.heat.h3 { background: #ff9a7a; font-weight: 800; }
.sig-cols { display: grid; gap: 18px; align-items: start; }
.sig-proj { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sig-proj:last-child { border-bottom: none; }
.sig-flags { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sig-flag { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 900px) { .sig-sum, .sig-cols { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- Case studies ---------- */
.cs-stats { margin-bottom: 4px; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cs-card { background: var(--white); border: 3px solid var(--ink); border-radius: var(--r); box-shadow: 4px 4px 0 var(--ink); padding: 14px; min-width: 0; }
.cs-card.draft { background: var(--paper); border-style: dashed; }
.cs-top { display: flex; gap: 12px; align-items: flex-start; }
.cs-play { flex: none; width: 54px; height: 54px; border-radius: 14px; border: 3px solid var(--ink); background: var(--pink); color: var(--cream); font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cs-play.doc { background: var(--sun); color: var(--ink); cursor: default; }
.cs-play:hover:not(.doc) { background: var(--blue); }
.cs-main { min-width: 0; }
.cs-title { font-family: var(--display); font-weight: 800; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.cs-sum { margin-top: 8px; color: var(--muted-2); overflow-wrap: anywhere; }
.video-frame { position: relative; padding-top: 56.25%; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--ink); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Weekend work ---------- */
.wk-list { display: flex; flex-direction: column; gap: 12px; }
.wk-req { border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; background: var(--white); }
.wk-req.pending { background: #fff4d6; border-color: #a36b00; box-shadow: 3px 3px 0 #a36b00; }
.wk-req.rejected { background: #f6f1e6; opacity: .8; }
.chip.wk-chip { font-size: 10.5px; padding: 0 7px; margin-left: 6px; background: #ffe3cc; }
.chip.wk-chip.pending { background: #fff4d6; border-style: dashed; }
.chip.wk-chip.rejected { background: #ffd9db; text-decoration: line-through; }
.work-row.rejected { opacity: .55; }
.cal-ev.wk { border-left-style: double; }
.cal-ev.tone-warn, .cal-item.tone-warn { background: #fff4d6; border-style: dashed; }

/* ---------- Forms & misc ---------- */
.split-note { font-size: 12.5px; font-weight: 600; color: var(--muted-2); background: var(--paper); border: 2px dashed var(--ink); border-radius: 10px; padding: 7px 10px; margin: 0 0 14px; }
.split-note.warn { color: #a36b00; border-color: #a36b00; background: #fff4d6; }
.note.warn { background: #fff4d6; border-color: #a36b00; }
.heatmap td.h1 { background: #f1fbd2; } .heatmap td.h2 { background: #dff59a; } .heatmap td.h3 { background: #c9f23a; } .heatmap td.over { background: #ffd9db; }
.heatmap tfoot td { border-top: 3px solid var(--ink); background: var(--paper); }
.inv-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .inv-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .inv-stats, .cs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Fixes: one-line navbar, filters, work rows ---------- */
.navlinks { gap: 2px; font-size: 14px; }
.navlinks a, .navgroup-btn { white-space: nowrap; padding: 7px 10px; }
.navbar .logo .tag { white-space: nowrap; }
/* The logo and links keep their size; app.js hides the tag when the bar is too full for it. */
.navbar .logo, .navlinks { flex: none; }
.filters label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.filters input[type=checkbox] { min-width: 0; width: 18px; height: 18px; flex: none; }
.work-row { grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.2fr) 80px minmax(0, 1fr) auto; }


/* ---------- POCs, lost deals ---------- */
.chip.poc { background: #c8f6fb; border-color: var(--ink); white-space: nowrap; }
.chip.poc.late { background: #ffd9db; border-color: var(--red); }
.chip.poc.done { background: #e6f9b5; }
.chip.lost { background: #ffd9db; border-color: var(--red); color: #8a0d14; }
.stuck-note.lost-note { background: #ffe9ea; border-color: var(--red); }
.stat-trio.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-trio.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stat-trio.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-trio.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
a.stat { text-decoration: none; color: inherit; }
a.stat:hover { box-shadow: 3px 3px 0 var(--ink); }
.stat-trio.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .stat-trio.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .stat-trio.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.poc-list { display: flex; flex-direction: column; }
.poc-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.poc-row:last-child { border-bottom: none; }
.poc-prog { height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); overflow: hidden; }
.poc-prog .fill { height: 100%; background: var(--cyan); }
.poc-row.late .poc-prog .fill { background: var(--red); }
@media (max-width: 560px) { .poc-row { grid-template-columns: minmax(0, 1fr) auto; } .poc-prog { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Your day (calendar task list) ---------- */
.day-card .head .actions .seg button { padding: 4px 10px; font-size: 12.5px; }
.day-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; }
@media (max-width: 900px) { .day-grid { grid-template-columns: minmax(0, 1fr); } }
.day-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.t-sec { display: flex; flex-direction: column; gap: 6px; }
.t-sec-h { display: flex; gap: 8px; align-items: center; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.t-sec-h .n { background: var(--ink); color: var(--cream); border-radius: 999px; font-size: 11px; padding: 0 7px; letter-spacing: 0; }
.t-sec.overdue .t-sec-h { color: var(--red); } .t-sec.overdue .t-sec-h .n { background: var(--red); }
.task { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: start; background: var(--white); border: 2px solid var(--ink);
        border-left-width: 6px; border-radius: 12px; padding: 8px 11px; }
.task.red { border-left-color: var(--red); } .task.orange { border-left-color: var(--orange); } .task.plain, .task.info { border-left-color: var(--soft); }
.task.overdue { background: #fff3f3; }
.task .t-ico { font-size: 16px; line-height: 1.4; text-align: center; }
.task .t-title { font-weight: 700; font-size: 14px; text-decoration: none; color: var(--ink); display: block; line-height: 1.3; }
.task .t-title:hover { text-decoration: underline; }
.task .t-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.task .t-due { font-size: 11.5px; font-weight: 800; white-space: nowrap; border: 2px solid var(--ink); border-radius: 999px; padding: 0 7px; background: var(--paper); }
.task .t-due.late { background: var(--red); color: var(--white); border-color: var(--red); }
.t-day { display: flex; flex-direction: column; gap: 6px; }
.t-day + .t-day { margin-top: 6px; }
.t-day-h { font-size: 12.5px; font-weight: 800; color: var(--ink); }

/* ---------- Commercials: cost proposal form, P&L ---------- */
.cost-proposal { display: flex; flex-direction: column; gap: 14px; }
.cp-sec { border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); padding: 12px 14px; }
.cp-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.cp-head strong { font-family: var(--display); font-size: 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .form-grid.three, .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .form-grid.three, .form-grid.four { grid-template-columns: minmax(0, 1fr); } }
.res-rows, .meter-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.res-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 28px; gap: 8px; align-items: center; }
.res-row select, .meter-row select, .meter-row input { min-height: 36px; padding: 5px 8px; font-size: 14px; border-width: 2px; border-radius: 9px; }
.res-row .hrs { display: flex; align-items: center; gap: 4px; }
.res-row .hrs input { width: 100%; min-height: 36px; padding: 5px 8px; border-width: 2px; border-radius: 9px; }
.meter-head, .meter-row { display: grid; grid-template-columns: minmax(130px, 1.4fr) 90px 120px 90px 90px 90px 28px; gap: 6px; align-items: center; }
.meter-head { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.meter-row input, .meter-row select { width: 100%; }
.stack-xs { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 760px) {
  .meter-head { display: none; }
  .meter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
  .meter-row > :first-child { grid-column: 1 / -1; }
}
.pnl-preview { min-height: 40px; }
.pnl-t th.grp { text-align: center; border-bottom: 2px solid var(--ink); }
.pnl-t .sep { border-left: 2px solid var(--line); }
.pnl-t tr.total td { font-weight: 800; border-top: 3px solid var(--ink); background: var(--paper); }
.pnl-t tr.sub-total td { font-weight: 700; color: var(--muted-2); background: #fbf7ee; }
.pnl-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .pnl-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat.bad { background: #fff3f3; border-color: var(--red); }
.stat.bad .v { color: var(--red); }
.alloc-list { display: flex; flex-direction: column; gap: 8px; }
.alloc-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.alloc-row .track { height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); overflow: hidden; }
.alloc-row .fill { height: 100%; background: var(--lime); }
.alloc-row.over .fill { background: var(--red); }
.alloc-row.over .num { color: var(--red); font-weight: 800; }
@media (max-width: 560px) { .alloc-row { grid-template-columns: minmax(0, 1fr) auto; } .alloc-row .track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Log today, monthly check ---------- */
.daylog { display: flex; flex-direction: column; gap: 8px; }
.daylog-rows { display: flex; flex-direction: column; gap: 6px; }
.daylog-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) 110px minmax(0, auto); gap: 10px; align-items: center; font-size: 14px; }
.daylog-row .dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.daylog-row .hrs, .res-row .hrs { display: flex; align-items: center; gap: 4px; }
.daylog-row .hrs input { width: 100%; min-height: 34px; padding: 4px 8px; border-width: 2px; border-radius: 9px; }
.daylog select { max-width: 280px; min-height: 34px; padding: 4px 8px; border-width: 2px; border-radius: 9px; }
.cons-rows { display: flex; flex-direction: column; gap: 8px; }
.cons-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) 120px minmax(0, 1.4fr) auto; gap: 10px; align-items: center; font-size: 14px;
            border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.cons-row input { width: 100%; min-height: 34px; padding: 4px 8px; border-width: 2px; border-radius: 9px; }
.cons-row .full-row { grid-column: 1 / -1; }
.ok-t { color: #3a7d00; font-weight: 700; }
@media (max-width: 640px) {
  .cons-row { grid-template-columns: minmax(0, 1fr) 110px; }
  .daylog-row { grid-template-columns: 12px minmax(0, 1fr) 90px; }
  .daylog-row > :last-child { grid-column: 2 / -1; }
}
.card select[aria-label=Month] { max-width: 280px; }

/* ---------- Quarter review (dashboard) ---------- */
.page-tabs { flex: none; }
.q-strip { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; }
.q-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 4px 2px; flex: 1; }
.q-strip .q { flex: none; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); padding: 6px 14px; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: baseline; }
.q-strip .q small { font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: var(--blue); }
.q-strip .q.sel { background: var(--ink); color: var(--cream); box-shadow: 3px 3px 0 var(--blue); }
.q-strip .q.sel small { color: var(--lime); }
.q-arrow { flex: none; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: var(--sun); font-weight: 800; cursor: pointer; }
.q-arrow:disabled { opacity: .35; cursor: default; }
.r-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.r-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
@media (max-width: 1100px) { .r-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .r-tiles, .r-tiles.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.r-tile { background: var(--white); border: 3px solid var(--ink); border-radius: 14px; padding: 12px 14px; box-shadow: 4px 4px 0 var(--ink); min-width: 0; }
.r-tile .k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); }
.r-tile .v { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.15; margin-top: 4px; }
.r-tile .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.r-tile.warn { background: #fff4d6; } .r-tile.bad { background: #fff3f3; border-color: var(--red); }
.r-margin { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.r-margin .arrow { font-weight: 800; color: var(--muted); }
.r-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
@media (max-width: 980px) { .r-grid { grid-template-columns: minmax(0, 1fr); } }
.r-card { margin-bottom: 16px; }
.r-grid .r-card { margin-bottom: 0; }
/* The review's cards, packed into two columns by height (review.js pack()). */
.r-pack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
.r-col { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 980px) { .r-pack { grid-template-columns: minmax(0, 1fr); } }
.r-pack .r-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* the Money card at half width */
.r-funnel { display: flex; flex-direction: column; gap: 6px; }
.r-stage { display: grid; grid-template-columns: 10px 54px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; border: 2px solid var(--ink); border-radius: 12px;
           background: var(--white); padding: 8px 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.r-stage .bar { width: 10px; height: 28px; border-radius: 4px; border: 1.5px solid var(--ink); }
.r-stage .n { font-family: var(--display); font-weight: 800; font-size: 24px; }
.r-stage .l { font-weight: 700; }
.r-stage { text-decoration: none; }
.r-stage:hover { box-shadow: 3px 3px 0 var(--ink); background: var(--paper); }
.r-bands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.r-bands .rb { border: 2px solid var(--ink); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 700; display: flex; flex-direction: column; }
.r-bands .rb b { font-family: var(--display); font-size: 20px; }
.r-bands .b-loss { background: #ffd9db; } .r-bands .b-below { background: #fff4d6; } .r-bands .b-healthy { background: #e6f9b5; } .r-bands .b-strong { background: #c9f23a; }
@media print {
  .navbar, .filters, .q-arrow, .print-btn, .menu-btn, .toast { display: none !important; }
  body { background: #fff; padding: 0; }
  .card, .r-tile { box-shadow: none !important; break-inside: avoid; }
  .q-strip .q:not(.sel) { display: none; }
}

/* ---------- SOW read by AI ---------- */
.ai-read { margin-top: 10px; border: 2px solid var(--ink); border-radius: 14px; background: #f3f0ff; padding: 12px 14px; box-shadow: 3px 3px 0 var(--ink); }
.ai-head { display: flex; gap: 10px; align-items: flex-start; }
.ai-icon { font-size: 18px; line-height: 1.2; }
.ai-warn { margin: 10px 0 0 18px; font-size: 13px; color: #6b3d00; }
.ai-warn li { margin-top: 3px; }
.ai-more { margin-top: 8px; font-size: 13px; }
.ai-more summary { cursor: pointer; font-weight: 700; }
.ai-more ul { margin: 6px 0 0 18px; }
.spin { width: 18px; height: 18px; flex: none; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: lcSpin .8s linear infinite; margin-top: 2px; }
@keyframes lcSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.chip.sow-src { background: #e7e3ff; border-color: #4b3fd1; color: #2c228f; font-size: 10.5px; padding: 1px 7px; }
.ms-src { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -2px; color: var(--muted-2); }
.ms-src .q { font-style: italic; overflow-wrap: anywhere; }
.need-t { color: #b3261e; font-weight: 700; }
.ms-row input.need { border-color: #b3261e; background: #fff1ef; }
.sow-terms .tbl-wrap { overflow-x: auto; }
.sow-terms table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sow-terms th, .sow-terms td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sow-terms thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sow-terms tbody th { font-weight: 700; min-width: 140px; }
.sow-terms td.now { color: var(--muted-2); min-width: 150px; }
.sow-terms tr.chg td.now { text-decoration: line-through; }
.sow-terms tr.chg { background: #fff8d8; }
.sow-terms input.sm { width: 100px; min-height: 34px; }
.st-meter { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-end; }
.st-meter label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); font-weight: 700; }
.st-meter input.sm { width: 88px; }
.st-meter select { min-height: 34px; }

/* ---------- Delivery plan (the look of Arun's Sleepwell plan) ---------- */
.dp { --lc: #3449b8; --client: #c27c12; --joint: #14857a; --third: #6b7285; --ms: #b0244a; --phase-bg: #eceef6;
      --gl: #dfe2ea; --gls: #c3c8d6; --fg: #1b1f2e; --mut: #5d6478; --surface: #fff; --label: 300px; --row: 40px;
      --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
      display: flex; flex-direction: column; gap: 22px; background: #f5f6f9; border: 2px solid var(--ink); border-radius: 18px;
      padding: 24px; color: var(--fg); box-shadow: 4px 4px 0 var(--ink); }
.dp-tab { display: flex; flex-direction: column; gap: 14px; }
.dp-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.dp-toolbar select { max-width: 360px; margin-left: 6px; }
.dp-change { background: #fff; }
.dp-head { display: flex; flex-direction: column; gap: 12px; }
.dp-eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.dp h1 { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; margin: 0; }
.dp-sub { color: var(--mut); max-width: 80ch; }
.dp-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 28px; }
.dp-field { display: flex; flex-direction: column; gap: 4px; }
.dp-field label { font-size: 12px; color: var(--mut); font-weight: 600; }
.dp-field input { font-family: var(--mono); font-size: 14px; padding: 6px 10px; border: 1px solid var(--gls); border-radius: 6px; background: #fff; min-height: 0; box-shadow: none; }
.dp-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--mut); }
.dp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dp-dot { width: 14px; height: 8px; border-radius: 2px; display: inline-block; background: var(--lc); }
.tmeta .dp-dot { width: 7px; height: 7px; border-radius: 50%; }
.dp-dot.o-lc, .dp-bar.o-lc { background-color: var(--lc); }
.dp-dot.o-client, .dp-bar.o-client { background-color: var(--client); }
.dp-dot.o-joint, .dp-bar.o-joint { background-color: var(--joint); }
.dp-dot.o-third, .dp-bar.o-third { background-color: var(--third); }
.dp-dot.dep { background: repeating-linear-gradient(45deg, var(--mut) 0 3px, transparent 3px 6px); }
.dp-diamond { width: 10px; height: 10px; transform: rotate(45deg); background: var(--ms); display: inline-block; }
.dp-diamond.sm { width: 7px; height: 7px; }
.dp-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--gl); border-radius: 10px; background: #fff; overflow: hidden; }
.dp-kd { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--gl); }
.dp-kd:last-child { border-right: 0; }
.dp-kd .k { font-size: 12px; color: var(--mut); }
.dp-kd .v { font-family: var(--display); font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; }
.dp-kd .w { font-family: var(--mono); font-size: 11px; color: var(--mut); }
.dp-kd.golive .v { color: var(--ms); }
.dp-shell { border: 1px solid var(--gl); border-radius: 10px; background: #fff; overflow-x: auto; }
.dp-gantt { display: grid; grid-template-columns: var(--label) auto; min-width: max-content; position: relative; }
.dp-row { display: contents; }
.dp-label { position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid var(--gls); border-bottom: 1px solid var(--gl);
            padding: 4px 14px; display: flex; flex-direction: column; justify-content: center; min-height: var(--row); }
.dp-time { position: relative; min-height: var(--row); border-bottom: 1px solid var(--gl);
           background-image: linear-gradient(to right, transparent calc(100% - 1px), var(--gl) calc(100% - 1px)); background-repeat: repeat-x; }
.dp-row.head .dp-label { font-size: 12px; color: var(--mut); font-weight: 600; justify-content: end; padding-bottom: 8px; min-height: 58px; border-bottom-color: var(--gls); }
.dp-row.head .dp-time { min-height: 58px; background-image: none; border-bottom-color: var(--gls); }
.dp-wk { position: absolute; top: 0; height: 26px; display: flex; align-items: center; padding-left: 8px; font-size: 11.5px; font-weight: 600; border-left: 1px solid var(--gls); white-space: nowrap; overflow: hidden; }
.dp-wk:first-child { border-left: 0; }
.dp-dy { position: absolute; top: 30px; text-align: center; font-family: var(--mono); font-size: 10.5px; color: var(--mut); line-height: 1.15; }
.dp-dy b { display: block; font-weight: 500; color: var(--fg); font-size: 11px; }
.dp-dy.now b { color: var(--ms); font-weight: 700; }
.dp-row.phase .dp-label, .dp-row.phase .dp-time { background-color: var(--phase-bg); }
.pname { font-family: var(--display); font-weight: 700; font-size: 13.5px; }
.pname .pnum, .dp-phases .pnum { font-family: var(--mono); font-size: 11px; color: var(--mut); margin-right: 6px; }
.tname { font-size: 13px; line-height: 1.3; font-weight: 500; }
.tname .tid { font-family: var(--mono); font-size: 10.5px; color: var(--mut); margin-right: 6px; }
.tmeta { font-family: var(--mono); font-size: 10.5px; color: var(--mut); display: flex; gap: 8px; align-items: center; white-space: nowrap; flex-wrap: wrap; }
.tmeta .owner { display: inline-flex; align-items: center; gap: 5px; }
.dp-blk { font-family: var(--mono); font-size: 9.5px; font-weight: 700; color: #b3261e; background: #fde9e7; border-radius: 4px; padding: 0 5px; }
.dp-time .dp-bar { position: absolute; top: 50%; height: 14px; transform: translateY(-50%); border-radius: 4px; opacity: .92; }
.dp-time .dp-bar.summary { height: 6px; border-radius: 2px; background: var(--fg); opacity: .55; }
.dp-time .dp-bar.dep.o-client { background: repeating-linear-gradient(45deg, var(--client) 0 6px, rgba(194, 124, 18, .5) 6px 12px); }
.dp-time .dp-bar.dep.o-joint { background: repeating-linear-gradient(45deg, var(--joint) 0 6px, rgba(20, 133, 122, .5) 6px 12px); }
.dp-time .dp-bar.dep.o-lc { background: repeating-linear-gradient(45deg, var(--lc) 0 6px, rgba(52, 73, 184, .5) 6px 12px); }
.dp-time .dp-bar.dep.o-third { background: repeating-linear-gradient(45deg, var(--third) 0 6px, rgba(107, 114, 133, .5) 6px 12px); }
.dp-ms { position: absolute; top: 50%; width: 13px; height: 13px; background: var(--ms); transform: translate(-50%, -50%) rotate(45deg); border-radius: 2px; }
.dp-ms-label { position: absolute; top: 50%; transform: translateY(-50%); font-size: 11.5px; font-weight: 600; color: var(--ms); white-space: nowrap; padding-left: 12px; }
.dp-ms-label.left { padding-left: 0; padding-right: 12px; }
.dp-bar-label { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--mut); white-space: nowrap; padding-left: 6px; }
.dp-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ms); opacity: .5; pointer-events: none; z-index: 1; }
.dp-row:not(.head):hover .dp-label, .dp-row:not(.head):hover .dp-time { background-color: #f0f2fb; }
.dp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dp h2 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0 0 10px; }
.dp-pts { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; max-width: 70ch; font-size: 14px; }
.dp-pts li::marker { color: #2c3a8c; }
.dp-pts b { font-weight: 600; }
.dp-reqs .tbl td { vertical-align: top; }
.dp .mono { font-family: var(--mono); font-size: 12px; }
.dp-note { font-size: 12.5px; color: var(--mut); }
.dp-phases { display: flex; flex-direction: column; gap: 8px; }
.dp-prow { display: grid; grid-template-columns: 22px minmax(140px, 1fr) 170px 28px; gap: 8px; align-items: center; }
@media (max-width: 820px) { .dp-cols { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .dp { --label: 190px; padding: 16px; }
  .dp-kd { border-right: 0; border-bottom: 1px solid var(--gl); }
  .dp-prow { grid-template-columns: 18px 1fr 28px; }
  .dp-prow input[type=date] { grid-column: 2; }
}
@media print { .dp-tab .dp-toolbar, .dp-tab .card, .dp-tab details { display: none; } .dp { box-shadow: none; } }

/* ---------- Quarter review: the CEO view ---------- */
.r-exec .r-summary { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.45; }
.r-exec .r-summary li::marker { color: var(--pink); }
.r-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.r-kpi { background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; box-shadow: 3px 3px 0 var(--ink); min-width: 0; }
.r-kpi .k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); }
.r-kpi .v { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; margin-top: 4px; }
.r-kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.r-kpi.good { background: #f3ffd6; } .r-kpi.warn { background: #fff4d6; } .r-kpi.bad { background: #ffe3e0; }
.r-kpi .r-margin { font-size: 14px; }
.r-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-stack { display: flex; flex-direction: column; gap: 18px; }
.r-golives { display: flex; flex-direction: column; gap: 6px; }
.r-gl { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; background: var(--white); }
.r-gl:hover { border-color: var(--ink); }
.r-gl .gd { font-weight: 700; }
.r-gl .gn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.gk.ok { background: #e3f9b0; } .chip.gk.warn { background: #fff0c2; } .chip.gk.bad { background: #ffd6d2; } .chip.gk.soft { background: var(--paper); color: var(--muted-2); }
.r-gl.bad { border-color: #f0303a; }
.r-score td.name { font-weight: 700; }
@media (max-width: 1100px) { .r-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .r-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-kpi .v { font-size: 24px; }
  .r-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-gl { grid-template-columns: 54px 1fr; } .r-gl .gk { grid-column: 2; justify-self: start; }
}
/* Present mode: the review alone, big, for the CEO meeting. */
body.present #nav, body.present .page-head, body.present .filters, body.present .q-arrow, body.present .print-btn { display: none !important; }
body.present .wrap { max-width: 1600px; }
body.present { background: var(--paper); }
body.present .r-exec .r-summary { font-size: 20px; }
body.present .r-kpi .v { font-size: 38px; }
body.present .q-strip .q:not(.sel) { display: none; }
@media print {
  .r-card, .r-kpis, .r-exec { break-inside: avoid; }
  .r-kpi { box-shadow: none; }
  .present-btn { display: none; }
}

/* ---------- Client satisfaction ---------- */
.stars { display: inline-flex; gap: 1px; color: #d9d2c0; font-size: 14px; line-height: 1; letter-spacing: 0; }
.stars i { font-style: normal; }
.stars i.on { color: #f5a400; }
.stars.low i.on { color: #f0303a; } .stars.mid i.on { color: #e3a300; }
.stars.big { font-size: 22px; }
.fb-stack { display: flex; flex-direction: column; gap: 18px; }
.fb-links { display: flex; flex-direction: column; gap: 8px; }
.fb-link { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--white); }
.fb-url code { display: block; padding: 10px 12px; background: var(--paper); border: 2px dashed var(--ink); border-radius: 10px; font-size: 13px; overflow-wrap: anywhere; }
.fb-resp { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 8px; background: var(--white); display: flex; flex-direction: column; gap: 4px; }
.fb-resp.low { border-color: #f0303a; background: #fff6f5; }
.fb-q { font-size: 14px; } .fb-q.good b { color: #3a7d00; } .fb-q.improve b { color: #a36b00; }
.fb-fu { color: #3a7d00; }
.r-kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.r-kpi .v small { font-size: 16px; color: var(--muted); margin-left: 2px; }
/* Testimonials stack in columns (each card its own height, no stretched blanks). */
.tm-grid { columns: 3 300px; column-gap: 14px; }
.tm-grid > .tm { break-inside: avoid; margin: 0 0 14px; }
.tm blockquote.long { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.tm .more { align-self: flex-start; margin-top: -4px; }
.tm { margin: 0; background: var(--white); border: 2px solid var(--ink); border-radius: 16px; padding: 16px; box-shadow: 3px 3px 0 var(--ink); display: flex; flex-direction: column; gap: 10px; }
.tm.featured { background: #fbffe8; box-shadow: 4px 4px 0 var(--lime), 4px 4px 0 2px var(--ink); }
.tm blockquote { margin: 0; font-family: var(--display); font-size: 17px; line-height: 1.35; }
.tm.small blockquote { font-size: 14.5px; }
.tm figcaption { font-size: 13px; }
.tm-media { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-media img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); display: block; }
.tm-media video { width: 100%; max-height: 220px; border-radius: 8px; border: 2px solid var(--ink); background: #000; }
.tm-foot { flex-wrap: wrap; gap: 8px; }
.tm-files { display: flex; flex-direction: column; gap: 6px; }
.tm-file { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; }
.chip.lime-chip { background: var(--lime); }
.cv-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cv-score b { font-family: var(--display); font-size: 40px; font-weight: 800; }
.cv-score > span:not(.stars) { color: var(--muted); margin-right: 8px; }
.cv-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cv-item { display: block; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }
.cv-item:hover { border-color: var(--ink); }
.cv-q { margin-top: 4px; color: var(--muted-2); }
.cv-tm { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
/* Each CSM's satisfaction average (ratings + AI-scored testimonials), and a testimonial's AI score. */
.cv-csm { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
/* Case studies: go-live videos, missing next to available. */
.vid-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.vid-cols .label { margin-bottom: 8px; }
@media (max-width: 760px) { .vid-cols { grid-template-columns: minmax(0, 1fr); } }
.cs-play.sm { width: 34px; height: 34px; font-size: 14px; flex: none; }
.cv-csm-r { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; }
.tm-ai { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; }
.tm-ai .spin { width: 12px; height: 12px; }
/* The client's page */
body.fb-body { background: var(--blue); overflow-x: hidden; padding: 0; }
body.fb-body main.wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding-top: 30px; padding-bottom: 30px; }
.fb-card { max-width: 520px; }
.fb-card h1 { font-size: clamp(26px, 6vw, 34px); }
.fb-stars { display: flex; gap: 6px; margin: 6px 0 2px; }
.fb-star { font-size: 40px; line-height: 1; width: 54px; height: 54px; border: 3px solid var(--ink); border-radius: 14px; background: var(--white); color: #d9d2c0; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.fb-star.on { background: var(--sun); color: var(--ink); }
.fb-star:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.fb-label { font-size: 13px; font-weight: 700; color: var(--muted-2); min-height: 18px; }
.fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fb-quote { font-size: 13px; margin: 6px 0 14px; }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 600px) {
  .r-kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-link { grid-template-columns: 1fr auto; } .fb-link > .row { grid-column: 1 / -1; }
  .fb-star { width: 48px; height: 48px; font-size: 32px; }
  .fb-two { grid-template-columns: 1fr; }
}
