/* Reference components plus explicit operational shell overrides. Fixtures stay in tests. */
@font-face{font-family:OptiReferenceInter;src:url('/admin/assets/inter-latin.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:OptiReferenceInter;src:url('/admin/assets/inter-latin-600.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:OptiReferenceInter;src:url('/admin/assets/inter-latin-700.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:OptiReferenceNoto;src:url('/admin/assets/noto-sans-sc.woff2') format('woff2');font-weight:400;font-display:swap}
.opti-ref{--ref-rail:232px;--ref-navy:#10172f;--ref-teal:#009c95;--ref-teal-dark:#006f70;--ref-ink:#10152a;--ref-muted:#626d88;--ref-border:#d9dfeb;--ref-bg:#f1f4f9;--ref-indigo:#5149d7;margin:0;background:var(--ref-bg);color:var(--ref-ink);font:14px/1.45 OptiReferenceInter,OptiReferenceNoto,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
.opti-ref *,.opti-ref *::before,.opti-ref *::after{box-sizing:border-box}
.opti-ref [hidden]{display:none!important}
.opti-ref button,.opti-ref input,.opti-ref select{font:inherit;color:inherit}
.opti-ref button,.opti-ref select,.opti-ref summary{cursor:pointer}
.opti-ref button:disabled,.opti-ref input:disabled{cursor:not-allowed}
.opti-ref a{color:var(--ref-teal-dark);text-decoration:none}
.opti-ref button{border:0;background:none}
.opti-ref :focus-visible{outline:3px solid #1657b8;outline-offset:3px}
.opti-ref h1,.opti-ref h2,.opti-ref p{margin:0}
.opti-ref h1{font-size:30px;line-height:1.18;letter-spacing:-1.1px;font-weight:700}
.opti-ref h2{font-size:19px;line-height:1.3;letter-spacing:-.55px}
.opti-ref hr{border:0;border-top:1px solid var(--ref-border);margin:14px 0}
.opti-ref .ref-icon{width:21px;height:21px;flex:none;vertical-align:middle}
.opti-ref .ref-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.opti-ref .ref-skip{position:fixed;left:16px;top:-80px;z-index:100;padding:12px;background:white;border:2px solid var(--ref-teal)}
.opti-ref .ref-skip:focus{top:12px}
.opti-ref .ref-sidebar{position:fixed;inset:0 auto 0 0;width:var(--ref-rail);background:linear-gradient(160deg,#111a33,#0c1228);color:#fff;display:flex;flex-direction:column;padding:20px 12px;z-index:40}
.opti-ref .ref-brand{display:flex;align-items:center;gap:9px;padding:0 10px 36px;font-size:29px;font-weight:700;letter-spacing:-1px}
.opti-ref .ref-brand svg{width:43px;height:29px;color:#17c2b3}
.opti-ref .ref-nav-item{min-height:48px;width:100%;display:flex;align-items:center;gap:17px;color:#fff;padding:10px 16px;margin:3px 0;border-radius:9px;font-size:16px;text-align:left}
.opti-ref .ref-nav-item .ref-icon{width:23px;height:23px}
.opti-ref .ref-nav-item .ref-icon:last-child:not(:first-child){margin-left:auto;width:17px}
.opti-ref .ref-nav-item:disabled{color:#d3d8e7;opacity:1}
.opti-ref .ref-nav-item.is-active{background:linear-gradient(100deg,#007f80,#007b75);font-weight:600}
.opti-ref .ref-subnav{margin:2px 0 18px 24px;display:grid;gap:0}
.opti-ref .ref-subnav a,.opti-ref .ref-subnav button{min-height:34px;padding:6px 12px;text-align:left;color:#f2f4fa;font-size:13px;white-space:normal}
.opti-ref .ref-subnav a{border-radius:6px;background:#104f59;font-weight:600}
.opti-ref .ref-nav-bottom{margin-top:auto;border-top:1px solid #333d57;padding-top:12px}
.opti-ref .ref-nav-bottom .ref-nav-item{font-size:15px;min-height:42px}
.opti-ref .ref-workspace{margin-left:var(--ref-rail)}
.opti-ref .ref-topbar{position:sticky;top:0;z-index:30;height:56px;display:flex;align-items:center;gap:22px;padding:0 28px;background:#fff;border-bottom:1px solid var(--ref-border)}
.opti-ref .ref-breadcrumb{white-space:nowrap;font-size:14px;color:var(--ref-muted)}
.opti-ref .ref-breadcrumb span{margin:0 7px}
.opti-ref .ref-breadcrumb strong{color:var(--ref-ink);font-weight:600}
.opti-ref .ref-preview-badge{flex-shrink:0;font-size:11px;line-height:1.25;font-weight:700;color:#00555a;background:#d3f5ef;padding:8px 11px;border-radius:9px;white-space:nowrap}
.opti-ref .ref-top-tools{margin-left:auto;display:flex;align-items:center;gap:18px}
.opti-ref .ref-search{position:relative;display:flex;align-items:center}
.opti-ref .ref-search .ref-icon{position:absolute;left:12px;width:18px}
.opti-ref .ref-search input{height:36px;width:220px;padding:6px 10px 6px 38px;border:1px solid #bdc6d9;border-radius:6px;background:#fff;font-size:13px}
.opti-ref .ref-icon-button{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
.opti-ref .ref-icon-button:disabled{opacity:.65}
.opti-ref .ref-avatar{height:38px;min-width:38px;border-radius:50%;background:#008d87;color:#fff;font-weight:600;font-size:13px}
.opti-ref .ref-menu,.opti-ref .ref-drawer-close{display:none}
.opti-ref .ref-main{padding:24px 28px 20px;max-width:1650px;margin:auto;min-width:0}
.opti-ref .ref-page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.opti-ref .ref-page-heading p{font-size:16px;color:var(--ref-muted);margin-top:5px}
.opti-ref .ref-actions{display:flex;gap:12px;flex-shrink:0}
.opti-ref .ref-button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:8px 18px;background:#fff;border:1px solid #aeb8ca;border-radius:7px;font-weight:600;font-size:13px;white-space:nowrap;color:var(--ref-ink)}
.opti-ref .ref-button .ref-icon{width:18px}
.opti-ref .ref-button:hover:not(:disabled){background:#f3faf9;border-color:var(--ref-teal)}
.opti-ref .ref-button.ref-primary{color:white;background:linear-gradient(120deg,#007e80,#006f70);border-color:#007e80}
.opti-ref .ref-button:disabled{opacity:.55}
.opti-ref .ref-context{min-height:52px;display:grid;grid-template-columns:1.1fr 1.3fr 1.2fr 1.35fr .85fr;align-items:center;padding:6px 8px;background:#fff;border:1px solid var(--ref-border);border-radius:11px;box-shadow:0 1px 2px #1925440c;margin-bottom:16px}
.opti-ref .ref-select{display:flex;align-items:center;position:relative;min-width:0;gap:9px;padding:0 12px}
.opti-ref .ref-context .ref-select+.ref-select{border-left:1px solid var(--ref-border)}
.opti-ref .ref-select>.ref-icon{color:#3d4b6a;width:20px}
.opti-ref .ref-select>.ref-icon:last-child{position:absolute;right:12px;pointer-events:none;width:16px}
.opti-ref .ref-select select{width:100%;min-width:0;height:38px;padding:0 22px 0 0;border:0;background:transparent;appearance:none;font-weight:600;font-size:13px}
.opti-ref .ref-kpis{display:grid;gap:16px;margin-bottom:18px}
.opti-ref .ref-four{grid-template-columns:repeat(4,minmax(0,1fr))}
.opti-ref .ref-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.opti-ref .ref-card{background:#fff;border:1px solid var(--ref-border);border-radius:11px;box-shadow:0 1px 2px #101d3510;min-width:0}
.opti-ref .ref-kpi{position:relative;display:block;padding:15px 17px 12px;color:var(--ref-ink);overflow:hidden}
.opti-ref a.ref-kpi:hover{border-color:var(--ref-teal)}
.opti-ref .ref-kpi-title{font-size:14px;display:flex;gap:16px;align-items:center;margin-bottom:7px;font-weight:600}
.opti-ref .ref-kpi-title>.ref-icon{color:var(--ref-teal-dark)}
.opti-ref .ref-kpi-value{display:flex;align-items:center;gap:12px;font-size:30px;line-height:1.2;font-weight:700;letter-spacing:-.8px;font-variant-numeric:tabular-nums;white-space:nowrap}
.opti-ref .ref-delta{font-size:14px;background:#e0f5e7;color:#116328;padding:4px 6px;border-radius:6px;letter-spacing:0;font-weight:600}
.opti-ref .ref-muted{color:var(--ref-muted);font-size:12px;margin-top:4px}
.opti-ref .ref-spark{width:100%;height:43px;color:var(--ref-teal);display:block;margin-top:3px}
.opti-ref .ref-kpi-compact{padding:12px 15px;min-height:112px}
.opti-ref .ref-kpi-compact .ref-kpi-title,.opti-ref .ref-kpi-compact .ref-kpi-value{position:relative;z-index:1;width:69%}
.opti-ref .ref-kpi-compact .ref-spark{position:absolute;right:14px;top:26px;width:27%;height:50px}
.opti-ref .ref-kpi-compare{font-size:11px;margin-top:7px;color:#43485e;position:relative}
.opti-ref .ref-kpi-compare>span{color:#096b2c;font-weight:600;white-space:nowrap}
.opti-ref .ref-kpi-compare .ref-icon{width:15px;height:15px}
.opti-ref .ref-grid{display:grid;gap:16px;margin-bottom:16px}
.opti-ref .ref-overview-grid{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.opti-ref .ref-business-grid{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);margin-top:16px}
.opti-ref .ref-customer-grid{grid-template-columns:minmax(0,1.85fr) minmax(0,1fr)}
.opti-ref .ref-panel{position:relative;padding:14px 16px 12px}
.opti-ref .ref-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;min-height:25px}
.opti-ref .ref-panel-heading h2{min-width:0}
.opti-ref .ref-chart-scroll{overflow-x:auto;max-width:100%;padding:0 4px}
.opti-ref .ref-chart{display:block;width:100%;min-width:440px;height:196px;overflow:visible}
.opti-ref .ref-chart text{fill:#414b68;font-size:12px;font-family:OptiReferenceInter,OptiReferenceNoto,sans-serif}
.opti-ref .ref-gridline{stroke:#d2daea;stroke-width:1}
.opti-ref .ref-series-0{fill:var(--ref-teal)}
.opti-ref .ref-series-1{fill:var(--ref-indigo)}
.opti-ref .ref-line{fill:none;stroke-width:2.7}
.opti-ref .ref-stroke-0{stroke:var(--ref-teal)}
.opti-ref .ref-stroke-1{stroke:var(--ref-indigo)}
.opti-ref .ref-dashed{stroke-dasharray:7 5;stroke-width:2}
.opti-ref .ref-legend{display:flex;align-items:center;justify-content:center;gap:24px;font-size:11px;margin:5px 0 2px;flex-wrap:wrap}
.opti-ref .ref-legend>span{display:flex;align-items:center;gap:7px}
.opti-ref .ref-key{width:17px;height:3px;background:var(--ref-teal);display:inline-block;position:relative}
.opti-ref .ref-key::after{content:"";position:absolute;width:7px;height:7px;border-radius:50%;left:5px;top:-2px;background:inherit}
.opti-ref .ref-key-1{background:var(--ref-indigo)}
.opti-ref .ref-key-dashed{height:0;border-top:2px dashed var(--ref-indigo);background:none}
.opti-ref .ref-key-dashed::after{display:none}
.opti-ref .ref-chart-data{font-size:10px;color:var(--ref-muted);margin-top:5px}
.opti-ref .ref-chart-data summary{min-height:22px;display:flex;align-items:center;width:max-content;text-decoration:underline;text-underline-offset:3px}
.opti-ref .ref-chart-data[open] summary{min-height:44px}
.opti-ref .ref-chart-data .ref-table-scroll{max-height:200px}
.opti-ref .ref-panel .ref-chart-data{position:absolute;top:2px;right:16px;margin:0}
.opti-ref .ref-panel:has(.ref-chart-data)>.ref-panel-heading{padding-right:108px}
.opti-ref .ref-panel .ref-chart-data[open]{background:#fff;border:1px solid var(--ref-border);border-radius:8px;padding:6px 12px;box-shadow:0 8px 24px #10172f22;width:min(90%,600px);z-index:20}
.opti-ref .ref-lifecycle-bar{display:flex;margin:24px 3px 14px;border-radius:6px;overflow:hidden}
.opti-ref .ref-segment{flex:1;min-height:32px;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:12px}
.opti-ref .ref-segment:nth-child(1){flex:28}
.opti-ref .ref-segment:nth-child(2){flex:52}
.opti-ref .ref-segment:nth-child(3){flex:14;color:#171b30}
.opti-ref .ref-segment:nth-child(4){flex:6;color:#171b30}
.opti-ref .ref-teal{background:#007f7d}
.opti-ref .ref-indigo{background:#5149d7}
.opti-ref .ref-amber{background:#f1b22c}
.opti-ref .ref-lilac{background:#c7bffa}
.opti-ref .ref-lifecycle-list{list-style:none;padding:0;margin:0 3px 14px}
.opti-ref .ref-lifecycle-list li{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e6eaf2;padding:6px 0}
.opti-ref .ref-lifecycle-list li>span{display:flex;align-items:center;gap:12px}
.opti-ref .ref-lifecycle-list strong{font-weight:400;font-variant-numeric:tabular-nums}
.opti-ref .ref-dot{display:inline-block;width:12px;height:12px;border-radius:50%}
.opti-ref .ref-table-scroll{max-width:100%;overflow:auto}
.opti-ref table{border-collapse:collapse;width:100%;font-size:12px;text-align:left;white-space:nowrap}
.opti-ref thead{background:#edf0f6}
.opti-ref th,.opti-ref td{padding:9px 7px;border-bottom:1px solid #e1e6ef;font-variant-numeric:tabular-nums}
.opti-ref tbody th{font-weight:400}
.opti-ref th:first-child{border-radius:5px 0 0 5px}
.opti-ref th:last-child{border-radius:0 5px 5px 0}
.opti-ref td:last-child,.opti-ref thead th:last-child{text-align:right}
.opti-ref .ref-text-button{padding:0;display:inline-flex;align-items:center;gap:5px;min-height:32px;font-weight:600;text-align:left;font-size:12px}
.opti-ref .ref-teal-text{color:var(--ref-teal-dark)}
.opti-ref .ref-pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:1.3;padding:4px 9px;border-radius:6px;white-space:nowrap}
.opti-ref .ref-pill .ref-icon{width:15px;height:15px}
.opti-ref .ref-green{background:#dff6e9;color:#12552b}
.opti-ref .ref-aqua{background:#ccf2ef;color:#005e64}
.opti-ref .ref-neutral{background:#e9edf4;color:#26314a}
.opti-ref .ref-purple{background:#e3defd;color:#332b78}
.opti-ref .ref-blue{background:#d4ebff;color:#153d63}
.opti-ref .ref-warn{background:#fff2d3;color:#694600}
.opti-ref .ref-micro{font-size:10px;color:#5e667d;line-height:1.5;margin-top:9px}
.opti-ref .ref-micro .ref-icon{width:15px;height:15px;margin-right:6px}
.opti-ref .ref-health-row{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:8px;margin-top:10px;min-height:51px;font-size:12px}
.opti-ref .ref-health-row>strong{font-weight:600}
.opti-ref .ref-health-row>span{font-size:10px;border-left:1px solid #c5ddcf;padding-left:16px;margin-left:auto}
.opti-ref .ref-health-row b{display:block}
.opti-ref .ref-small-button{background:#fff;border:1px solid var(--ref-teal);color:var(--ref-teal-dark);border-radius:6px;margin-left:auto;padding:7px;min-height:36px;font-size:11px;font-weight:600}
.opti-ref .ref-provenance{font-size:10px;color:#51596c;line-height:1.8;margin-top:10px}
.opti-ref .ref-filters{display:flex;gap:8px;margin:-4px 0 14px;flex-wrap:wrap}
.opti-ref .ref-filters .ref-select{border:1px solid #c8d0df;background:#fff;border-radius:30px;padding:0 12px;min-width:130px}
.opti-ref .ref-filters .ref-select select{height:34px;font-weight:400;font-size:12px}
.opti-ref .ref-filters .ref-button{min-height:34px;border-radius:22px;font-weight:400;color:var(--ref-teal-dark);border-color:#a4d7d3;background:#eafffb;padding:5px 12px;font-size:12px}
.opti-ref .ref-business-trend{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:20px}
.opti-ref .ref-period-panel{border-left:1px solid var(--ref-border);padding:10px 0 8px 24px}
.opti-ref .ref-period-panel>div+div{border-top:1px solid var(--ref-border);margin-top:14px;padding-top:14px}
.opti-ref .ref-period-panel p{color:#565d74;font-weight:600;font-size:13px}
.opti-ref .ref-period-panel span{display:block;margin-top:3px}
.opti-ref .ref-period-panel strong{display:block;font-size:27px;line-height:1.4;margin-top:5px}
.opti-ref .ref-period-panel strong.ref-positive{font-size:34px}
.opti-ref .ref-positive{color:#08732f}
.opti-ref .ref-segmented{display:flex;border:1px solid #aab5ca;border-radius:5px;overflow:hidden;flex-shrink:0}
.opti-ref .ref-segmented button{min-height:32px;min-width:70px;padding:4px 12px;border-right:1px solid #aab5ca;font-size:12px}
.opti-ref .ref-segmented button:last-child{border:0}
.opti-ref .ref-segmented [aria-pressed=true]{background:#007e7c;color:#fff}
.opti-ref .ref-inline-value{display:flex;align-items:center;gap:12px}
.opti-ref .ref-inline-value svg{width:100px;height:12px;flex:none;fill:var(--ref-teal)}
.opti-ref .ref-table-foot{display:flex;justify-content:space-between;gap:12px;font-size:10px;margin-top:12px;color:#535d72}
.opti-ref .ref-table-foot span,.opti-ref .ref-table-foot a{display:flex;align-items:center;gap:6px}
.opti-ref .ref-table-foot .ref-icon{width:14px;height:14px}
.opti-ref .ref-workspace-tabs{display:flex;gap:24px;background:#fff;border-bottom:1px solid var(--ref-border);margin:-24px -28px 12px;padding:0 28px}
.opti-ref .ref-workspace-tabs a,.opti-ref .ref-workspace-tabs button{display:flex;align-items:center;min-height:44px;color:var(--ref-ink);font-size:13px;padding:0 5px;border-bottom:3px solid transparent}
.opti-ref .ref-workspace-tabs [aria-current=page]{border-color:var(--ref-teal);font-weight:700}
.opti-ref .ref-back{display:flex;align-items:center;gap:5px;min-height:34px;font-size:12px;font-weight:600;margin-top:4px}
.opti-ref .ref-back .ref-icon{width:16px}
.opti-ref .ref-customer-title{display:flex;gap:12px;align-items:center;margin:2px 0 16px}
.opti-ref .ref-customer-title h1{font-size:27px}
.opti-ref .ref-player{display:flex;align-items:center;gap:20px;padding:14px 16px;margin-bottom:4px}
.opti-ref .ref-player h2{font-size:21px;margin-bottom:6px}
.opti-ref .ref-player-avatar{width:60px;height:60px;flex:none;border-radius:50%;background:#c5f2e9;color:#005f66;font-size:26px;display:grid;place-items:center;font-weight:600}
.opti-ref .ref-player-badges{display:flex;align-items:center;gap:10px;font-size:12px;flex-wrap:wrap}
.opti-ref .ref-player .ref-actions{margin-left:auto}
.opti-ref .ref-player .ref-button{padding:8px 16px;font-size:12px}
.opti-ref .ref-detail-tabs{display:flex;gap:28px;border-bottom:1px solid var(--ref-border);margin:0 0 16px;overflow-x:auto}
.opti-ref .ref-detail-tabs a{min-height:44px;display:flex;align-items:center;padding:0 12px;color:#444e66;border-bottom:3px solid transparent;white-space:nowrap}
.opti-ref .ref-detail-tabs [aria-current=page]{color:var(--ref-teal-dark);border-color:var(--ref-teal);font-weight:600}
.opti-ref .ref-customer-kpis .ref-kpi{padding:13px 16px}
.opti-ref .ref-customer-kpis .ref-kpi-title{font-size:12px;font-weight:400}
.opti-ref .ref-customer-kpis .ref-kpi-value{padding-left:37px;font-size:24px}
.opti-ref .ref-profile-list{margin:0;font-size:12px}
.opti-ref .ref-profile-list>div{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:4px 0}
.opti-ref .ref-profile-list dd{margin:0}
.opti-ref .ref-advisory{font-size:11px;display:flex;align-items:flex-start;gap:8px;background:#eff2f8;border-radius:7px;padding:9px;margin-top:10px}
.opti-ref .ref-advisory .ref-icon{width:16px;height:16px}
.opti-ref .ref-timeline{list-style:none;margin:0;padding:4px 0}
.opti-ref .ref-timeline li{position:relative;display:grid;grid-template-columns:1.35fr 1.65fr .9fr 1fr;align-items:center;gap:2px 10px;margin-left:7px;padding:4px 0 6px 26px;border-left:2px solid #8bdad0;font-size:11px}
.opti-ref .ref-timeline li::before{content:"";position:absolute;left:-5px;top:10px;width:8px;height:8px;border-radius:50%;background:var(--ref-teal)}
.opti-ref .ref-timeline time{white-space:nowrap}
.opti-ref .ref-timeline small{grid-column:1/-1;font-size:9px;color:#636c80}
.opti-ref .ref-timeline .ref-pill{font-size:10px;justify-self:start}
.opti-ref .ref-audience-chips{display:flex;flex-direction:column;gap:6px;align-items:flex-start;margin-bottom:8px}
.opti-ref .ref-audience-chips button{min-height:32px}
.opti-ref .ref-state{display:flex;gap:12px;align-items:flex-start;padding:18px;background:#f3f6fa;border:1px solid #cbd5e1;border-radius:9px;color:#3c4961;margin-bottom:12px;min-height:90px}
.opti-ref .ref-state p{font-size:12px;margin-top:6px}
.opti-ref .ref-state-partial,.opti-ref .ref-state-stale{background:#fff7e4;border-color:#f0d699;min-height:auto;padding:10px}
.opti-ref .ref-state-error{background:#fff1ef;border-color:#edb5ae}
.opti-ref .ref-state .ref-button{margin-left:auto}
.opti-ref .ref-annotation{padding:16px;border:2px dashed #5149d7;background:#f0edff;margin-bottom:18px;font-size:12px}
.opti-ref .ref-annotation p{margin-top:7px}
.opti-ref .ref-annotated [data-region]{position:relative;outline:2px dashed #7771c4;outline-offset:3px;margin-top:26px}
.opti-ref .ref-annotated [data-region]::before{content:attr(data-region);position:absolute;top:-22px;left:0;color:#36316e;font-weight:600;font-size:11px}
.opti-ref .ref-preview-tools{max-width:1650px;margin:0 auto;padding:0 28px 20px;font-size:11px;color:#4e5870}
.opti-ref .ref-preview-tools>details{border-top:1px dashed #aeb8cd;padding-top:8px}
.opti-ref .ref-preview-tools summary{min-height:32px}
.opti-ref .ref-preview-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding-top:10px}
.opti-ref .ref-preview-controls label{display:flex;gap:5px;align-items:center}
.opti-ref .ref-preview-controls select{min-height:36px}
.opti-ref dialog{border:1px solid var(--ref-border);border-radius:14px;padding:24px;max-width:min(540px,calc(100% - 32px));color:var(--ref-ink);box-shadow:0 20px 80px #10172f44}
.opti-ref dialog::backdrop{background:#10172f77}
.opti-ref dialog h2{margin-bottom:15px}
.opti-ref dialog p{margin:12px 0}
.opti-ref dialog .ref-actions{margin-top:20px;justify-content:flex-end;flex-wrap:wrap}
.opti-ref .ref-toast{position:fixed;bottom:20px;right:20px;z-index:60;background:#0c5b57;color:white;border-radius:8px;padding:14px 22px;max-width:calc(100vw - 40px);box-shadow:0 4px 24px #10172f33}
.opti-ref .ref-result-search{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.opti-ref .ref-result-search input{min-height:44px;width:300px;max-width:100%;border:1px solid var(--ref-border);border-radius:6px;padding:8px 12px}
.opti-ref[data-page=business] .ref-main{padding-top:16px}
.opti-ref[data-page=business] .ref-page-heading{margin-bottom:12px}
.opti-ref[data-page=business] .ref-context{min-height:44px;padding-top:2px;padding-bottom:2px;margin-bottom:12px}
.opti-ref .ref-small-button,.opti-ref .ref-text-button,.opti-ref .ref-chart-data summary,.opti-ref .ref-segmented button,.opti-ref .ref-subnav a,.opti-ref .ref-subnav button,.opti-ref .ref-nav-bottom .ref-nav-item,.opti-ref .ref-audience-chips button{min-height:44px}
.opti-ref .ref-select select{min-height:44px}
.opti-ref .ref-filters .ref-select select{height:44px}
.opti-ref .ref-filters .ref-button{min-height:44px}
.opti-ref .ref-row-link{display:inline-flex;align-items:center;min-height:44px}
.opti-ref .ref-business-grid tbody th,.opti-ref .ref-business-grid tbody td{padding-top:0;padding-bottom:0}
.opti-ref .ref-business-grid tbody tr:last-child th,.opti-ref .ref-business-grid tbody tr:last-child td{padding-top:10px;padding-bottom:10px;background:#eff2f7}
@media(min-width:1700px){.opti-ref .ref-main{padding-top:30px}.opti-ref .ref-chart{max-height:300px}.opti-ref .ref-kpi{padding-top:20px;padding-bottom:16px}.opti-ref .ref-panel{padding:18px 20px}}
@media(max-width:1370px) and (min-width:1001px){.opti-ref{--ref-rail:216px}.opti-ref .ref-topbar{gap:14px;padding:0 22px}.opti-ref .ref-top-tools{gap:8px}.opti-ref .ref-search input{width:150px}.opti-ref .ref-preview-badge{font-size:9px}.opti-ref .ref-main{padding:22px}.opti-ref .ref-kpi-value{font-size:25px;gap:6px}.opti-ref .ref-delta{font-size:11px}.opti-ref .ref-context{grid-template-columns:1.05fr 1.25fr 1.2fr 1.3fr .7fr}.opti-ref .ref-select{padding:0 8px;gap:5px}.opti-ref .ref-select select{font-size:11px}.opti-ref .ref-select>.ref-icon:last-child{right:8px}.opti-ref .ref-player{gap:12px}.opti-ref .ref-player .ref-actions{gap:7px}.opti-ref .ref-player .ref-button{padding:8px 9px;font-size:10px}.opti-ref .ref-business-trend{grid-template-columns:minmax(0,1fr) 160px}.opti-ref .ref-workspace-tabs{margin:-22px -22px 12px;padding:0 22px}}
@media(max-width:1000px){
  .opti-ref{--ref-rail:232px}
  .opti-ref .ref-sidebar{transform:translateX(-100%);visibility:hidden;transition:transform .15s,visibility .15s}
  .opti-ref.ref-drawer-open .ref-sidebar{transform:none;visibility:visible}
  .opti-ref .ref-workspace{margin-left:0}
  .opti-ref .ref-menu,.opti-ref .ref-drawer-close{display:inline-flex}
  .opti-ref .ref-drawer-close{position:absolute;right:2px;top:2px;color:white}
  .opti-ref .ref-scrim{position:fixed;inset:0;background:#10172f66;z-index:35}
  .opti-ref .ref-topbar{gap:12px;padding:0 20px;min-height:64px;height:auto;flex-wrap:wrap}
  .opti-ref .ref-top-tools{gap:8px}
  .opti-ref .ref-search{display:none}
  .opti-ref .ref-breadcrumb{font-size:12px}
  .opti-ref .ref-preview-badge{font-size:10px;padding:7px}
  .opti-ref .ref-top-tools>.ref-icon-button,.opti-ref .ref-avatar{display:none}
  .opti-ref .ref-main{padding:22px}
  .opti-ref .ref-context{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 0}
  .opti-ref .ref-context .ref-select{border:0!important}
  .opti-ref .ref-context .ref-select select{min-height:44px}
  .opti-ref .ref-context .ref-select:nth-child(4){grid-column:span 2}
  .opti-ref .ref-kpis.ref-four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .opti-ref .ref-kpis.ref-three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .opti-ref .ref-three .ref-kpi:last-child{grid-column:1/-1}
  .opti-ref .ref-grid{grid-template-columns:minmax(0,1fr)}
  .opti-ref .ref-page-heading{align-items:flex-start}
  .opti-ref .ref-page-heading h1{font-size:26px}
  .opti-ref .ref-page-heading p{font-size:13px}
  .opti-ref .ref-page-heading .ref-actions{flex-direction:column;gap:8px}
  .opti-ref .ref-player{flex-wrap:wrap}
  .opti-ref .ref-player .ref-actions{width:calc(100% - 80px);margin-left:80px;flex-wrap:wrap}
  .opti-ref .ref-workspace-tabs{margin:-22px -22px 12px;padding:0 22px}
  .opti-ref .ref-detail-tabs{gap:16px}
  .opti-ref .ref-business-trend{grid-template-columns:minmax(0,1fr) 160px}
  .opti-ref .ref-period-panel{padding-left:15px}
  .opti-ref .ref-preview-tools{padding:0 22px 20px}
  .opti-ref .ref-button,.opti-ref .ref-small-button,.opti-ref .ref-segmented button,.opti-ref .ref-audience-chips button,.opti-ref .ref-text-button,.opti-ref .ref-chart-data summary{min-height:44px}
  .opti-ref .ref-filters .ref-select select{height:44px}
}
@media(max-width:540px){
  .opti-ref .ref-topbar{padding:6px 12px;gap:4px 8px}
  .opti-ref .ref-breadcrumb{flex:1}
  .opti-ref .ref-top-tools{margin-left:0}
  .opti-ref .ref-top-tools .ref-select{padding:0 5px;width:62px}
  .opti-ref .ref-top-tools .ref-select select{font-size:11px}
  .opti-ref .ref-preview-badge{order:5;flex-basis:100%;text-align:center;margin-bottom:3px;white-space:normal;font-size:11px}
  .opti-ref .ref-main{padding:20px 16px}
  .opti-ref .ref-page-heading{display:block;margin-bottom:16px}
  .opti-ref .ref-page-heading h1{font-size:26px;letter-spacing:-.8px}
  .opti-ref .ref-page-heading .ref-actions{flex-direction:row;margin-top:14px;flex-wrap:wrap}
  .opti-ref .ref-button{padding:8px 12px;font-size:12px}
  .opti-ref .ref-context{grid-template-columns:repeat(2,minmax(0,1fr));padding:6px 2px;gap:2px}
  .opti-ref .ref-context .ref-select{padding:0 8px}
  .opti-ref .ref-context .ref-select select{font-size:11px;font-weight:400}
  .opti-ref .ref-context .ref-select:nth-child(4){grid-column:auto}
  .opti-ref .ref-context .ref-select>.ref-icon:first-child{width:16px}
  .opti-ref .ref-context .ref-select:nth-child(4)>.ref-icon:first-child{display:none}
  .opti-ref .ref-kpis.ref-four,.opti-ref .ref-kpis.ref-three{grid-template-columns:minmax(0,1fr);gap:12px}
  .opti-ref .ref-kpi{padding:16px}
  .opti-ref .ref-kpi-value{font-size:30px}
  .opti-ref .ref-spark{height:48px}
  .opti-ref .ref-panel{padding:14px 12px}
  .opti-ref .ref-panel-heading{align-items:flex-start;flex-wrap:wrap}
  .opti-ref h2{font-size:18px}
  .opti-ref .ref-legend{font-size:10px;gap:12px}
  .opti-ref .ref-business-trend{grid-template-columns:minmax(0,1fr)}
  .opti-ref .ref-period-panel{border-left:0;border-top:1px solid var(--ref-border);padding:14px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:5px 15px}
  .opti-ref .ref-period-panel>div+div{border:0;padding-top:0;margin-top:0}
  .opti-ref .ref-period-panel strong{font-size:24px}
  .opti-ref .ref-period-panel strong.ref-positive{font-size:28px}
  .opti-ref .ref-period-panel strong,.opti-ref .ref-period-panel span{margin-top:0}
  .opti-ref .ref-filters{gap:6px}
  .opti-ref .ref-filters .ref-select{min-width:0;max-width:100%}
  .opti-ref .ref-filters .ref-select select{font-size:11px}
  .opti-ref .ref-table-foot{flex-direction:column}
  .opti-ref .ref-workspace-tabs{gap:20px;margin:-20px -16px 12px;padding:0 16px}
  .opti-ref .ref-workspace-tabs a,.opti-ref .ref-workspace-tabs button{font-size:11px}
  .opti-ref .ref-customer-title{flex-wrap:wrap;gap:8px}
  .opti-ref .ref-customer-title h1{width:100%}
  .opti-ref .ref-customer-title .ref-pill{font-size:10px}
  .opti-ref .ref-player{padding:14px 12px;gap:12px}
  .opti-ref .ref-player-avatar{width:46px;height:46px}
  .opti-ref .ref-player>div:nth-child(2){flex:1;min-width:0}
  .opti-ref .ref-player h2{font-size:17px}
  .opti-ref .ref-player-badges{gap:5px;font-size:10px}
  .opti-ref .ref-player-badges .ref-pill{font-size:10px}
  .opti-ref .ref-player .ref-actions{width:100%;margin-left:0;flex-direction:column;gap:8px}
  .opti-ref .ref-player .ref-button{font-size:12px}
  .opti-ref .ref-detail-tabs{gap:0}
  .opti-ref .ref-detail-tabs a{padding:0 11px;font-size:11px}
  .opti-ref .ref-customer-kpis .ref-kpi-value{font-size:27px}
  .opti-ref .ref-timeline li{grid-template-columns:1fr 1fr;gap:5px;padding-left:18px;padding-bottom:14px}
  .opti-ref .ref-timeline time{grid-column:1/-1}
  .opti-ref .ref-timeline li>strong{font-size:10px}
  .opti-ref .ref-timeline li>.ref-pill{grid-column:1/-1}
  .opti-ref .ref-health-row{padding:10px 9px;gap:7px;font-size:11px;flex-wrap:wrap}
  .opti-ref .ref-health-row>span{font-size:9px;padding-left:8px}
  .opti-ref .ref-provenance{font-size:9px;overflow-wrap:anywhere}
  .opti-ref .ref-preview-tools{padding:0 16px 20px}
  .opti-ref .ref-state{padding:12px;flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.opti-ref *{scroll-behavior:auto!important;transition:none!important}}

/* The existing authenticated shell keeps its session, drawer and routing hooks. */
body.opti-reference-shell{--sidebar-w:232px;--bg:#f1f4f9;--surface-2:#f1f4f9;--accent:#007e80;--accent-strong:#006f70;--accent-grad:#007e80;--accent-soft:#d3f5ef;--accent-text:#006f70;--radius:8px;--radius-lg:11px}
.opti-reference-shell .shell-sidebar{background:#10172f;color:#d8e1f3;border-right:0}
.opti-reference-shell .shell-sidebar .brand h1{color:#fff}
.opti-reference-shell .shell-sidebar .brand p,.opti-reference-shell .nav-group-label{color:#a7b4cf}
.opti-reference-shell #navigation a{color:#d8e1f3}
.opti-reference-shell #navigation a[aria-current=page]{background:#007e80;color:#fff;border-color:#007e80}
.opti-reference-shell .shell-main{max-width:1706px}
.opti-ref.ref-live-page{padding:0;background:transparent;min-width:0}
.opti-ref .ref-live-context{display:flex;flex-wrap:wrap;gap:10px 22px;padding:14px 16px;margin-bottom:18px;color:#626d88;font-size:12px}
.opti-ref .ref-live-context strong{color:#006f70}
.opti-ref .ref-live-profile{margin-bottom:18px}
.opti-ref.ref-live-page .ref-state{min-height:164px}
.opti-ref.ref-live-page .ref-kpi{min-height:122px}
.opti-ref.ref-live-page .ref-filters .ref-select{margin:0;white-space:nowrap;max-width:100%}
.opti-ref.ref-live-page .ref-filters .ref-select select{width:auto;flex:1}
.opti-ref.ref-live-page .ref-detail-tabs button{margin:0;padding:12px;color:#626d88;flex-shrink:0;white-space:nowrap}
/* Keep unavailable actions readable and all detail labels in the keyboard user's
   viewport; global mobile button width must not create five full-width tabs. */
.opti-ref.ref-live-page .ref-detail-tabs{flex-wrap:wrap;gap:0 16px;overflow-x:visible}
.opti-ref.ref-live-page .ref-detail-tabs button{width:auto;min-height:44px;opacity:1;cursor:not-allowed}
.opti-ref.ref-live-page .ref-button:disabled{opacity:1;color:#626d88;background:#f3f6fa;border-style:dashed}
/* The foundation header takes real vertical space. Compact only the desktop
   Customer360 unavailable placeholders; keep content in flow and controls44px. */
@media(min-width:1001px){
  #customer360.ref-live-page .ref-state{min-height:96px}
  #customer360.ref-live-page .ref-live-profile .ref-state{min-height:64px}
}
@media(max-width:720px){.opti-reference-shell .shell-sidebar{width:var(--sidebar-w)}}

/* QA reference-frame density. Keep content in flow and controls at 44px;
   disclosures expand normally and narrow layouts retain their original spacing. */
.opti-ref .ref-sync-details{position:absolute;top:2px;right:16px;font-size:10px;color:var(--ref-muted);z-index:20}
.opti-ref .ref-sync-details summary{min-height:44px;display:flex;align-items:center;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.opti-ref .ref-sync-details[open]{max-width:90%;padding:6px 12px;background:#fff;border:1px solid var(--ref-border);border-radius:8px;box-shadow:0 8px 24px #10172f22}
.opti-ref .ref-panel:has(.ref-sync-details)>.ref-panel-heading{padding-right:80px}
@media(min-width:1001px){
  .opti-ref[data-page=customer] .ref-topbar,.opti-ref[data-page=business] .ref-topbar{height:48px}
  .opti-ref[data-page=customer] .ref-workspace-tabs{margin-bottom:6px}
  .opti-ref[data-page=customer] .ref-context,.opti-ref[data-page=business] .ref-context{padding-top:0;padding-bottom:0;min-height:46px;margin-bottom:8px}
  .opti-ref[data-page=customer] .ref-customer-title{margin-bottom:10px}
  .opti-ref[data-page=customer] .ref-player{padding-top:10px;padding-bottom:10px}
  .opti-ref[data-page=customer] .ref-detail-tabs{margin-bottom:10px}
  .opti-ref[data-page=customer] .ref-customer-kpis{margin-bottom:12px}
  .opti-ref[data-page=customer] .ref-customer-kpis .ref-kpi{padding-top:9px;padding-bottom:9px}
  .opti-ref[data-page=customer] .ref-customer-kpis .ref-kpi-title{margin-bottom:3px}
  .opti-ref[data-page=customer] .ref-chart{height:174px}
  .opti-ref[data-page=customer] .ref-profile-list>div{padding:3px 0}
  .opti-ref[data-page=customer] .ref-profile-list+hr{margin:9px 0}
  .opti-ref[data-page=customer] .ref-panel-heading{margin-bottom:8px}
  .opti-ref[data-page=customer] .ref-panel{padding-top:12px;padding-bottom:12px}
  .opti-ref[data-page=customer] .ref-grid{margin-bottom:12px}
  .opti-ref[data-page=customer] .ref-timeline li{min-height:28px;padding-top:2px;padding-bottom:2px}
  .opti-ref[data-page=customer] .ref-audience-chips{display:grid;grid-template-columns:repeat(2,max-content);gap:4px 8px;margin-bottom:4px}
  .opti-ref[data-page=business] .ref-main{padding-top:12px}
  .opti-ref[data-page=business] .ref-page-heading{margin-bottom:8px}
  .opti-ref[data-page=business] .ref-page-heading p{font-size:14px;margin-top:3px}
  .opti-ref[data-page=business] .ref-filters{margin-bottom:8px}
  .opti-ref[data-page=business] .ref-kpis{margin-bottom:12px}
  .opti-ref[data-page=business] .ref-chart{height:164px}
  .opti-ref[data-page=business] .ref-panel-heading{margin-bottom:8px}
  .opti-ref[data-page=business] .ref-panel{padding-top:12px;padding-bottom:12px}
  .opti-ref[data-page=business] .ref-period-panel{padding-top:4px;padding-bottom:4px}
  .opti-ref[data-page=business] .ref-period-panel>div+div{margin-top:10px;padding-top:10px}
  .opti-ref[data-page=business] .ref-period-panel strong{font-size:24px}
  .opti-ref[data-page=business] .ref-business-grid{margin-top:12px;margin-bottom:8px}
  .opti-ref[data-page=business] .ref-business-grid thead th{padding-top:6px;padding-bottom:6px}
  .opti-ref[data-page=business] .ref-business-grid tbody tr:last-child th,.opti-ref[data-page=business] .ref-business-grid tbody tr:last-child td{padding-top:6px;padding-bottom:6px}
  .opti-ref[data-page=business] .ref-table-foot{margin-top:8px}
  .opti-ref[data-page=business] .ref-provenance{margin-top:6px}
}

@media(min-width:1001px){
  .opti-ref[data-page=business] .ref-kpi-compact{min-height:100px;padding-top:9px;padding-bottom:9px}
  .opti-ref[data-page=business] .ref-kpi-compact .ref-kpi-title{margin-bottom:4px}
  .opti-ref[data-page=business] .ref-kpi-compare{margin-top:4px}
}

@media(min-width:1001px){
  .opti-ref[data-page=customer] .ref-context{margin-bottom:4px}
  .opti-ref[data-page=customer] .ref-grid{margin-bottom:6px}
  .opti-ref[data-page=business] .ref-kpis{margin-bottom:10px}
  .opti-ref[data-page=business] .ref-business-grid{margin-bottom:4px}
}

/* Explicit dated reporting context; no source defaults or display-zone inference. */
.opti-ref .ref-report-query{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;padding:16px;margin-bottom:18px;background:#fff;border:1px solid var(--ref-border);border-radius:11px}
.opti-ref .ref-report-query label{display:grid;gap:6px;margin:0;flex:1 1 170px;min-width:0;font-size:13px}
.opti-ref .ref-report-query input{width:100%;min-width:0;min-height:44px;background:#fff}
.opti-ref .ref-report-query button{margin:0;width:auto;min-height:44px}
.opti-ref .ref-query-help,.opti-ref .ref-query-status{flex-basis:100%;font-size:13px;color:#3c4961}

.capability-truth{margin-block:16px;padding:20px;overflow-wrap:anywhere}.capability-truth ul{padding-left:20px;display:grid;gap:12px}.capability-truth li p{margin:6px 0}.capability-truth small{color:#536680}

.opti-ref .ref-data-health-navigation{padding:16px;display:grid;gap:8px;justify-items:start;overflow-wrap:anywhere}
.ref-navigation{padding:20px;margin-block:16px;overflow-wrap:anywhere}.ref-customer-navigation{display:flex;flex-wrap:wrap;gap:12px;align-items:end}.ref-customer-navigation label{display:grid;gap:8px;max-width:100%}.ref-customer-navigation input{max-width:100%;box-sizing:border-box;padding:10px;border:1px solid #c9d3e3;border-radius:8px}.ref-navigation dd{margin:4px 0 12px}
