/* Shared product layer. Tokens from pcBrandSheet/setAccent take precedence.
   No status, permission, visibility or business-rule selectors belong here. */
:root[data-theme="light"]{
  --bg:#F5F6F8;--bg-grad:none;--panel:#FFFFFF;--panel-2:#F0F2F5;
  --panel-hover:#EAEDF2;--ink:#202735;--muted:#566174;--dim:#657084;
  --line:#DDE2E9;--line-soft:#E9EDF2;
  --shadow-sm:0 1px 2px rgba(20,30,50,.03);
  --shadow-md:0 8px 24px -12px rgba(20,30,50,.12);
}
:root[data-theme="dark"]{
  --bg:#11151C;--bg-grad:none;--panel:#191F29;--panel-2:#212936;
  --panel-hover:#2A3443;--ink:#EDF1F7;--muted:#B0BDCF;--dim:#9EACC0;
  --line:#354153;--line-soft:#2A3443;
}
body.ipd-workspace{background:var(--bg);font-weight:400;line-height:1.55}
body.ipd-workspace #main{max-width:1600px;padding:28px 36px 48px;margin-inline:auto}
body.ipd-workspace .pchead-title .sub{font-weight:650;letter-spacing:-.02em}
body.ipd-workspace .pchead-desc{font-weight:400;color:var(--muted)}
@media(min-width:900px){body.ipd-workspace .head-row{flex-wrap:nowrap}}
@media(max-width:1500px){body.ipd-workspace .pchead-desc{display:none}}
body.ipd-workspace .pcnav .navgrp{letter-spacing:.035em;font-size:11px}
body.ipd-workspace .pcnav .grpt{white-space:normal;text-align:start;line-height:1.4}
body.ipd-workspace .pcnav .navcard a{font-weight:500}
body.ipd-workspace .pcnav .navcard a.active{font-weight:650}
body.ipd-workspace .pagehead h1{font-size:30px;font-weight:650;letter-spacing:-.035em;line-height:1.2}
body.ipd-workspace .pagehead p{font-weight:400;color:var(--muted);max-width:85ch}
body.ipd-workspace :is(.filters,.wafil){background:var(--panel);border:1px solid var(--line);box-shadow:none;border-radius:10px}
body.ipd-workspace :is(.filters,.wafil) label{font-family:var(--sans);font-weight:600;letter-spacing:0;text-transform:none;color:var(--muted);font-size:12px}
body.ipd-workspace :is(.filters,.wafil) :is(input,select){min-height:38px;border-radius:6px;font-weight:450;background:var(--panel);border-color:var(--line)}
body.ipd-workspace :is(.btn,.iconbtn){box-shadow:none}
body.ipd-workspace .btn{font-weight:600;border-radius:6px}
body.ipd-workspace :is(.card,.mcard,.kpi,.stat){box-shadow:none}
body.ipd-workspace :is(table th){font-family:var(--sans);text-transform:none;letter-spacing:0;font-weight:600;color:var(--muted);background:var(--panel-2)}
body.ipd-workspace :is(table td){font-weight:400;border-bottom-color:var(--line-soft)}
body.ipd-workspace :is(table tbody tr:hover){background:var(--panel-hover)}
body.ipd-workspace :is(.stats,.metrics){gap:10px}
body.ipd-workspace :is(.stats,.metrics) :is(.v,.mv){font-variant-numeric:tabular-nums;letter-spacing:-.035em}
body.ipd-workspace :is(.rec-sec,.plwork,.plevid){box-shadow:none}
body.ipd-workspace .plstep[aria-current="true"]{border-inline-start:3px solid var(--accent);background:var(--accent-soft)}
body.ipd-workspace :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--ink);outline-offset:3px;box-shadow:0 0 0 5px var(--panel);
}
body.ipd-workspace .ux-skip{position:fixed;top:8px;left:16px;z-index:10000;padding:10px 18px;background:var(--panel);color:var(--ink);border:2px solid var(--ink);border-radius:6px;transform:translateY(-200%)}
body.ipd-workspace .ux-skip:focus{transform:translateY(0)}
.ux-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 22px}
.ux-eyebrow{font-size:11px;font-weight:650;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}
.ux-hero h1{font-size:clamp(25px,2.7vw,34px);line-height:1.18;letter-spacing:-.04em;font-weight:650;margin:0 0 8px}
.ux-hero p{color:var(--muted);margin:0;font-size:14px}
.ux-hero .btn{flex-shrink:0;text-decoration:none;min-height:40px}
.ux-guide{margin:0 0 20px;border-block:1px solid var(--line);font-size:13px;color:var(--muted)}
.ux-guide summary{cursor:pointer;padding:11px 0;font-weight:550;color:var(--ink);width:fit-content}
.ux-guide p{margin:0 0 14px;max-width:94ch;line-height:1.65}
.ux-guide ol{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;list-style:none;padding:0;margin:4px 0 20px;counter-reset:ux-step}
.ux-guide li{counter-increment:ux-step;border-inline-start:2px solid var(--line);padding-inline-start:12px}
.ux-guide li::before{content:"0" counter(ux-step);display:block;font:12px var(--mono);color:var(--muted);margin-bottom:6px}
.ux-guide li b{display:block;color:var(--ink);font-weight:600;margin-bottom:5px}
.ux-guide li a{text-decoration:underline;text-underline-offset:3px}
.ux-filter-panel{margin-bottom:20px}
.ux-filter-panel > summary{cursor:pointer;font-size:13px;font-weight:600;padding:9px 0;color:var(--ink)}
.ux-filter-panel[open] > summary{margin-bottom:5px}
body.ipd-workspace :is(.ux-evidence-toggle,.ux-evidence-back){display:none}
@media(max-width:1180px){
  body.ipd-workspace .ux-evidence-toggle{display:inline-flex;margin-bottom:16px;min-height:44px}
  body.ipd-workspace .ux-evidence-back:not([hidden]){display:inline-flex;grid-column:1/-1;justify-self:start;min-height:44px}
  body.ipd-workspace #plEvid{scroll-margin-top:80px}
}
body.ipd-workspace #csNew{width:auto;padding-inline:12px;gap:7px;background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
body.ipd-workspace #csNew span{font-size:12px;font-weight:600;white-space:nowrap}
.dq-work{margin:24px 0 30px}
.dq-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:6px}
.dq-heading h2,.dq-analysis h2{font-size:19px;font-weight:650;letter-spacing:-.025em;margin:0}
.dq-heading span{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.dq-scope{color:var(--muted);font-size:12px;margin:0 0 15px;line-height:1.6}
.dq-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden}
.dq-item{padding:18px;display:flex;flex-direction:column;min-width:0;border-inline-end:1px solid var(--line)}
.dq-item:last-child{border-inline-end:0}
.dq-label{font-size:12px;font-weight:600;margin:0 0 12px;color:var(--muted)}
.dq-number{font-size:32px;font-weight:600;letter-spacing:-.04em;font-variant-numeric:tabular-nums;line-height:1.15;color:var(--ink)}
.dq-definition{font-size:12px;color:var(--muted);margin:8px 0 18px;min-height:38px}
.dq-action{display:flex;align-items:center;justify-content:space-between;gap:6px;border:0;background:transparent;color:var(--ink);padding:8px 0 0;margin-top:auto;font:600 12px var(--sans);text-align:start;cursor:pointer;border-top:1px solid var(--line)}
.dq-action:hover{text-decoration:underline;text-underline-offset:3px}
.dq-action:disabled{cursor:wait;color:var(--muted)}
.dq-item[data-state="error"] .dq-number{font-size:18px;color:var(--danger-ink)}
.dq-item[data-state="loading"] .dq-number{color:var(--muted)}
.dq-analysis{border-top:1px solid var(--line);padding-top:22px;margin-bottom:18px}
.dq-analysis p{color:var(--muted);font-size:13px;margin:5px 0 0}
body.ipd-workspace #rail{box-shadow:none}
body.ipd-workspace #metrics .mcard{border-top:1px solid var(--line);text-align:start}
body.ipd-workspace #metrics .mv{color:var(--ink);font-size:23px}
body.ipd-workspace #cardUsage .uv{display:block}
body.ipd-workspace #cardUsage .uh{display:block;margin-top:5px}
body.ipd-workspace #main:has(#cardUsage) > .filters{padding:14px}
body.ipd-workspace #main > section:not(.dq-work) .sec-head{box-shadow:none}
@media(min-width:1100px){body.ipd-workspace #metrics{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1199px){
  body.ipd-workspace #main{padding:24px}
  .dq-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dq-item{border-bottom:1px solid var(--line)}
  .dq-item:nth-child(3){border-inline-end:0}
  .dq-item:nth-last-child(-n+2){border-bottom:0}
}
@media(max-width:720px){
  body.ipd-workspace #main{padding:20px 16px 32px}
  .ux-hero{align-items:flex-start;flex-direction:column;gap:14px}
  .ux-hero .btn{min-height:44px}
  .ux-guide ol{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dq-heading{align-items:flex-start;flex-direction:column;gap:4px}
  .dq-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dq-item{padding:15px;border-inline-end:0;border-bottom:1px solid var(--line)}
  .dq-item:nth-child(odd){border-inline-end:1px solid var(--line)}
  .dq-item:nth-last-child(2){border-bottom:1px solid var(--line)}
  .dq-item:last-child{grid-column:1/-1;border:0}
  .dq-action{min-height:44px}
  body.ipd-workspace :is(.filters,.wafil) :is(input,select){font-size:16px;min-height:44px}
}
@media(prefers-reduced-motion:reduce){
  body.ipd-workspace *,body.ipd-workspace *::before,body.ipd-workspace *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media print{.ux-skip,.ux-guide,.ux-hero .btn,.dq-action{display:none!important}.dq-grid{break-inside:avoid}}
