/* additions.css — NEW, additive-only stylesheet for the rebuild.
   The four extracted stylesheets (tokens/layout/components/modals) are FINAL and untouched.
   Everything here is either (a) a component the prototype had no styles for
   (provenance chips, freshness chip, data-quality panel, assertion banner, pipeline table,
   untiered avatar/tier variants, notes editor, skeletons) or (b) responsive rules so the Hub
   holds up on tablet. Uses only the 13 brand tokens. */

/* ---------- grid variants (prototype used inline grid-template-columns) ---------- */
.krow3{grid-template-columns:repeat(3,1fr);}
.krow3.tight{margin-top:-6px;}

/* ---------- KPI accent bars for tiles 5 and 6 ---------- */
.k5::before{background:var(--grass);}
.k6::before{background:var(--rin);}
.kpi:focus-visible,.qb:focus-visible,.pc2:focus-visible,.rr:focus-visible,.dc:focus-visible,.dcd:focus-visible,.nt:focus-visible,.sbi:focus-visible,.tb:focus-visible{outline:2px solid var(--wat);outline-offset:2px;}
.kpi[data-modal]{cursor:pointer;}
.kpi.nomodal{cursor:default;}
.kpi.nomodal:hover{box-shadow:none;}

/* ---------- provenance chips ---------- */
.prov{display:inline-flex;align-items:center;gap:4px;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:2px 6px;border-radius:9px;white-space:nowrap;border:1px solid transparent;line-height:1.4;}
.prov::before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0;}
.prov-live{background:#EAF3DE;color:#3F5008;border-color:#CFE0AE;}
.prov-content{background:#EBF4F8;color:#00415F;border-color:#BFDCE6;}
.prov-user{background:#FEF0E4;color:#8A420F;border-color:#F2D3B6;}
.prov-none{background:var(--pbl);color:#5A5347;border-color:var(--stn);}
.provrow{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:8px;}
.cdh .prov,.secl .prov,.rssh .prov{margin-left:6px;}
.secl{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}

/* ---------- freshness chip / nav right rail ---------- */
.nr{flex-wrap:wrap;}
.fresh{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:600;padding:3px 9px;border-radius:11px;background:rgba(255,255,255,.12);color:var(--cld);border:1px solid rgba(255,255,255,.18);white-space:nowrap;}
.fresh::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--grass);}
.fresh.stale{background:rgba(217,64,64,.22);border-color:rgba(217,64,64,.5);color:#FFE2E2;}
.fresh.stale::before{background:var(--hi);}
.nu{font-size:11px;color:var(--stn);white-space:nowrap;}
.nu.ro::after{content:' · read only';color:var(--bld);}

/* ---------- assertion / fetch-failure banner ---------- */
.banner{border-radius:8px;padding:12px 14px;margin-bottom:16px;display:flex;gap:11px;align-items:flex-start;border-left:4px solid var(--hi);background:#FDF0F0;}
.banner.warn{border-left-color:var(--cly);background:#FEF7EC;}
.banner-i{font-size:15px;line-height:1.2;flex-shrink:0;}
.banner-t{font-size:12px;font-weight:700;color:var(--soil);margin-bottom:3px;}
.banner-b{font-size:11px;color:var(--bld);line-height:1.6;}
.banner-b ul{margin:5px 0 0 14px;}
.banner-b li{margin-bottom:2px;}

/* ---------- data-quality panel ---------- */
.dq{background:var(--cld);border:1px solid var(--stn);border-left:4px solid var(--cly);border-radius:8px;padding:13px 15px;margin-bottom:18px;}
.dqh{display:flex;align-items:center;gap:8px;margin-bottom:4px;}
.dqt{font-size:12px;font-weight:700;color:var(--soil);}
.dqx{margin-left:auto;background:none;border:none;cursor:pointer;color:var(--bld);font-size:15px;line-height:1;padding:2px 6px;border-radius:4px;}
.dqx:hover{background:var(--pbl);color:var(--soil);}
.dqs{font-size:11px;color:var(--bld);margin-bottom:10px;line-height:1.5;}
.dql{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px;}
.dqi{background:var(--pbl);border-radius:6px;padding:9px 11px;}
.dqin{font-size:11px;font-weight:700;color:var(--soil);margin-bottom:3px;}
.dqiv{font-size:10px;color:var(--bld);line-height:1.5;}
.dqib{font-size:9px;color:var(--cly);font-weight:700;margin-top:4px;}
.dqib.none{color:var(--bld);font-weight:600;}

/* ---------- untiered variants ---------- */
.av.av-untiered{background:var(--stn);color:var(--soil);}
.bdg.tier-untiered{background:var(--stn);color:var(--soil);}
.dtd.dt-untiered{background:var(--stn);}
.st-none{background:var(--pbl);color:var(--bld);}

/* ---------- muted / not-set values ---------- */
.notset{color:var(--stn);font-weight:600;}
.mrv .notset,.dv .notset{color:var(--stn);}
.emptyst{border:1.5px dashed var(--stn);border-radius:7px;padding:16px;text-align:center;font-size:11px;color:var(--bld);line-height:1.6;}
.hint{font-size:10px;color:var(--bld);line-height:1.5;margin-top:6px;}
.hint.warn{color:var(--cly);}

/* ---------- pipeline table view ---------- */
.ptbl{width:100%;border-collapse:collapse;background:var(--cld);border:1px solid var(--stn);border-radius:8px;overflow:hidden;}
.ptbl th{text-align:left;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--cld);background:var(--soil);padding:8px 12px;white-space:nowrap;}
.ptbl td{font-size:11px;color:var(--soil);padding:9px 12px;border-bottom:1px solid var(--pbl);vertical-align:middle;}
.ptbl tbody tr:last-child td{border-bottom:none;}
.ptbl tbody tr:nth-child(even){background:var(--pbl);}
.ptbl tbody tr:hover{background:#EBF4F8;}
.ptbl .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;}
.tblwrap{padding:14px;overflow-x:auto;}
.tblwrap .cdt{font-size:12px;font-weight:700;}

/* ---------- forecast ---------- */
.fcwrap{padding:14px;}
.fcrow{display:grid;grid-template-columns:150px 1fr 90px;gap:11px;align-items:center;padding:7px 0;border-bottom:1px solid var(--pbl);}
.fcrow:last-child{border-bottom:none;}
.fcl{font-size:11px;font-weight:600;color:var(--soil);}
.fclm{font-size:9px;color:var(--bld);margin-top:1px;}
.fctrack{background:var(--pbl);border-radius:4px;height:16px;overflow:hidden;}
.fcfill{height:100%;background:var(--rin);border-radius:4px;min-width:2px;transition:width .3s;}
.fcv{font-size:11px;font-weight:700;color:var(--soil);text-align:right;font-variant-numeric:tabular-nums;}

/* ---------- notes editor / store-backed sections ---------- */
.nte{width:100%;min-height:86px;border:1px solid var(--stn);border-radius:6px;padding:9px 10px;font-family:inherit;font-size:11px;color:var(--soil);background:white;line-height:1.6;resize:vertical;}
.nte:focus{outline:none;border-color:var(--wat);}
.nteb{display:flex;gap:7px;margin-top:7px;}
.ntbody{font-size:11px;color:var(--soil);line-height:1.6;white-space:pre-wrap;}
.sc-row{display:flex;gap:8px;align-items:flex-start;}
.sc-row .team-del-btn{margin-left:auto;}

/* ---------- modal sizing for KPI detail ---------- */
.modal.wide{max-width:620px;}
.mct strong{color:var(--soil);}
.mct .prov{margin-left:4px;}
.msec{margin-bottom:14px;}
.msecl{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--bld);margin-bottom:6px;border-bottom:1px solid var(--pbl);padding-bottom:4px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.mlist{list-style:none;}
.mlist li{font-size:11px;color:var(--soil);line-height:1.6;padding:3px 0;display:flex;gap:6px;}
.mlist li::before{content:'·';color:var(--rin);font-weight:700;flex-shrink:0;}
.vrow{display:flex;justify-content:space-between;gap:10px;font-size:11px;padding:4px 0;border-bottom:1px solid var(--pbl);}
.vrow:last-child{border-bottom:none;}
.vrow .l{color:var(--bld);}
.vrow .v{font-weight:700;color:var(--soil);font-variant-numeric:tabular-nums;}
.vrow.on .v{color:var(--wat);}
.jrn{display:flex;align-items:center;gap:10px;margin-top:8px;}
.jrni{text-align:center;flex:1;}
.jrnv{font-size:16px;font-weight:700;color:var(--soil);}
.jrnl{font-size:9px;color:var(--bld);text-transform:uppercase;letter-spacing:.07em;margin-top:2px;}
.jrna{color:var(--stn);font-size:12px;}
.modal .mbody{max-height:min(62vh,520px);overflow-y:auto;padding-right:4px;}
.rosterlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:3px 12px;}
.rosterlist div{font-size:10px;color:var(--soil);line-height:1.6;}
.rosterlist .sub{color:var(--bld);}

/* ---------- pending-link resource cards (prototype bug: these fired a toast) ---------- */
.dcd.pending{cursor:not-allowed;background:var(--pbl);border-style:dashed;opacity:.85;}
.dcd.pending:hover{transform:none;box-shadow:none;border-color:var(--stn);}
.dcd.pending .dn2{color:var(--bld);}
.dcd.pending .dic{filter:grayscale(1);opacity:.6;}
.pend{font-size:9px;font-weight:700;color:var(--bld);background:var(--stn);padding:2px 6px;border-radius:3px;display:inline-flex;align-items:center;gap:4px;text-transform:uppercase;letter-spacing:.05em;}
.pendnote{font-size:9px;color:var(--bld);line-height:1.5;margin-top:6px;font-style:italic;}
.li.pending{cursor:not-allowed;background:var(--pbl);border-style:dashed;opacity:.85;}
.li.pending:hover{transform:none;border-color:var(--stn);background:var(--pbl);}
.li.pending .linm{color:var(--bld);}
.li.pending .lic{filter:grayscale(1);opacity:.6;}

/* ---------- playbook process rows ---------- */
.ptable{width:100%;border-collapse:collapse;}
.ptable th{text-align:left;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--cld);background:var(--soil);padding:8px 12px;}
.ptable td{padding:9px 12px;border-bottom:1px solid var(--pbl);font-size:11px;color:var(--bld);vertical-align:top;}
.stage-row{cursor:pointer;}
.stage-row:hover{background:var(--pbl);}
.stage-row .num2{font-size:12px;font-weight:700;color:var(--soil);width:52px;}
.stage-row .nm{font-size:12px;font-weight:700;color:var(--soil);white-space:nowrap;}
.stage-row .car{color:var(--stn);font-size:9px;margin-left:5px;}
.stage-row.open .car{color:var(--wat);}
.stage-detail{display:none;}
.stage-detail.open{display:table-row;}
.stage-detail td{background:var(--pbl);padding:12px 14px;}
.sdgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;}
.sdgrid p{font-size:10px;color:var(--soil);line-height:1.6;}

/* ---------- advisory committee ---------- */
.acgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px;}
.actbl{width:100%;border-collapse:collapse;}
.actbl td{font-size:10px;padding:6px 8px;border-bottom:1px solid var(--pbl);color:var(--soil);vertical-align:top;}
.actbl td:first-child{font-weight:700;white-space:nowrap;color:var(--bld);}
.seat{border:1.5px dashed var(--stn);border-radius:6px;padding:9px 11px;font-size:10px;color:var(--bld);margin-bottom:6px;}

/* ---------- misc ---------- */
.skel{background:linear-gradient(90deg,var(--pbl) 25%,#F4F2EE 50%,var(--pbl) 75%);background-size:200% 100%;animation:sk 1.2s ease-in-out infinite;border-radius:5px;}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skelrow{height:56px;margin-bottom:9px;}
.toast.err{background:var(--hi);}
.sronly{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
.gc .si{flex-shrink:0;}
.ptm{white-space:normal;}

/* ---------- responsive: tablet (iPad) ---------- */
@media(max-width:1180px){
  .pg{padding:18px 16px;}
  .rspg{padding:20px 16px;}
}
@media(max-width:1080px){
  .tcol{grid-template-columns:1fr;}
  .bot{grid-template-columns:1fr;}
  .dp{width:300px;}
  .pll{min-height:0;}
  .tgrd{grid-template-columns:1fr;}
  .tlgrd{grid-template-columns:1fr;}
  .qgd{grid-template-columns:1fr;}
  .acgrid{grid-template-columns:1fr;}
  .rhd,.rr{grid-template-columns:1fr 84px 78px 92px;}
  .rhd span:nth-child(5),.rr>*:nth-child(5){display:none;}
  .fcrow{grid-template-columns:120px 1fr 84px;}
}
@media(max-width:900px){
  .krow3{grid-template-columns:repeat(2,1fr);}
  .krow3.tight{margin-top:0;}
  .pll{flex-direction:column;}
  .dp{width:auto;border-left:none;border-top:1px solid var(--stn);}
  .pbl2{flex-direction:column;}
  .sb{width:auto;border-right:none;border-bottom:1px solid var(--stn);padding:10px 0;}
  .sbs{display:inline-block;vertical-align:top;margin-right:10px;}
  .pbc{padding:18px 16px;}
  .qgrd{grid-template-columns:1fr;}
  .ptb{flex-wrap:wrap;}
  .ptr{margin-left:0;flex-wrap:wrap;}
  nav{height:auto;min-height:46px;flex-wrap:wrap;padding:0 12px;}
  .nr{margin-left:auto;padding:5px 0;}
  .ns{width:120px;}
}
@media(max-width:640px){
  .krow3{grid-template-columns:1fr;}
  .rhd,.rr{grid-template-columns:1fr 80px;}
  .rhd span:nth-child(3),.rr>*:nth-child(3),.rhd span:nth-child(4),.rr>*:nth-child(4){display:none;}
}

/* ---- QA pass 1: contrast + column-width corrections (additive overrides only) ---- */

/* Prototype set card stat labels to var(--stn) at 8px on a white card: unreadable.
   Same size class, darker ink. */
.pst{gap:14px}
.pstl{font-size:9px;color:var(--bld)}

/* Roster: 75px stage/tier columns forced "Active Partnership" and "Pilot/Testing" to wrap
   onto two lines. Widen and stop the pills wrapping. */
.rhd,.rr{grid-template-columns:1fr 88px 122px 92px 104px}
.rr .sp{white-space:nowrap}

/* Untiered tier dot in the roster: a --stn dot on the --stn chip was invisible. */
.tw{display:flex;align-items:center;gap:6px}
.tw .td{width:7px;height:7px;border-radius:50%;background:var(--bld);flex:none}
.tw-untiered .td{background:var(--stn);box-shadow:0 0 0 1px var(--bld) inset}
.tw .tl{font-size:11px;color:var(--bld);font-weight:600}
.tw-untiered .tl{color:var(--bld);font-weight:500} /* --stn on white fails contrast; the dot carries the muted state */

/* Type tag is inline-block but sits in a flex column, so it stretched edge to edge. */
.dcd .dtg2{align-self:flex-start;width:auto}

/* Playbook sidebar stopped at content height, leaving a hard edge mid-page. */
.pbl2{align-items:stretch;min-height:calc(100vh - 52px)}

/* Alert meta line was var(--stn) on a tinted alert background: too faint to read. */
.alm{color:var(--bld);opacity:.85}
/* Forecast label column was too narrow and wrapped "0 with amount" onto a second line. */
.fcrow{grid-template-columns:230px 1fr 96px}

/* Field names from HubSpot are quoted a lot in the honesty copy: make them legible. */
code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em;background:var(--pbl);
  padding:1px 4px;border-radius:3px;color:var(--soil);}
