/* perf-dashboard: ServiceLift branded performance summary (ARCHITECT M3 spec H6, 6.2 BrandedChart, 6.3 InteractiveDashboard).
   Works without JS at its final state. Motion M9: bars scale on transform only. Colours come from tokens. */
.pd { position: relative; border-radius: var(--radius-card, 12px); background: var(--ink-raised, #1B2A37); border: 1px solid var(--line-dark, #2A3947); color: var(--on-dark, #F4F2EE); padding: clamp(20px, 1rem + 1.5vw, 40px); }
.pd-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s3, 12px); margin-bottom: var(--s6, 24px); }
.pd-title { font: 600 clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem)/1.1 var(--font-display); margin: 0; color: var(--on-dark, #F4F2EE); }
.pd-mark { font: 500 0.8125rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--eyebrow-on-dark, #EAD9BE); }
.pd-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-grid, 24px); margin: 0 0 var(--s8, 32px); padding: 0; list-style: none; }
@media (min-width: 1024px) { .pd-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pd-kpis .stat { border-top: 2px solid var(--accent-dark-bg, #3FB8AF); padding-top: var(--s3, 12px); }
.pd-kpis .stat-figure { font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); }
.pd-kpis .stat-label { font-size: 0.9375rem; }
.pd-kpis .stat-caption { font-size: 0.8125rem; }
.pd-chart { border-top: 1px solid var(--line-dark, #2A3947); padding-top: var(--s6, 24px); }
.pd-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s4, 16px); margin-bottom: var(--s5, 20px); }
.pd-chart-title { font: 600 1.25rem/1.2 var(--font-display); margin: 0; }
.pd-switch { display: inline-flex; border: 1px solid var(--line-dark, #2A3947); border-radius: 4px; padding: 0; margin: 0; }
.pd-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pd-switch label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4, 16px); font: 600 0.9375rem/1 var(--font-body); color: #C9CED3; cursor: pointer; }
.pd-switch label + label { border-left: 1px solid var(--line-dark, #2A3947); }
.pd-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pd-switch input:checked + span { color: var(--ink, #14202B); }
.pd-switch label:has(input:checked) { background: var(--accent-dark-bg, #3FB8AF); color: var(--ink, #14202B); }
.pd-switch label:has(input:focus-visible) { outline: 2px solid var(--eyebrow-on-dark, #EAD9BE); outline-offset: 2px; z-index: 1; }
.pd-bars { display: grid; gap: var(--s5, 20px); margin: 0; padding: 0; list-style: none; }
.pd-bar { display: grid; gap: var(--s2, 8px); }
.pd-bar-top { display: flex; justify-content: space-between; gap: var(--s3, 12px); font-size: 1rem; }
.pd-bar-label { font-weight: 600; }
.pd-bar-value { font: 600 1.0625rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; color: var(--eyebrow-on-dark, #EAD9BE); white-space: nowrap; }
.pd-track { height: 20px; background: rgba(255, 255, 255, 0.06); border-radius: 2px; overflow: hidden; }
.pd-fill { display: block; height: 100%; width: 100%; background: var(--chart-1-dark, #3FB8AF); transform-origin: left center; transform: scaleX(var(--s, 1)); }
.pd-bar:nth-child(2) .pd-fill { background: var(--chart-2-dark, #EAD9BE); }
.motion .pd-fill { transition: transform var(--dur-3, 480ms) var(--ease-out, ease-out); transition-delay: var(--d, 0ms); }
.motion .pd.is-drawing .pd-fill { transition-duration: var(--dur-4, 700ms); }
.motion .pd.pd-ready:not(.is-drawn) .pd-fill { transform: scaleX(0); }
.pd-note { margin: var(--s4, 16px) 0 0; font-size: var(--fs-small, 0.875rem); color: #C9CED3; }
.pd-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pd-foot { margin-top: var(--s6, 24px); border-top: 1px solid var(--line-dark, #2A3947); padding-top: var(--s4, 16px); font-size: var(--fs-small, 0.875rem); color: #C9CED3; }
.pd-foot p { margin: 0 0 var(--s3, 12px); }
.pd-table-wrap { overflow-x: auto; margin-top: var(--s3, 12px); }
.pd details summary { cursor: pointer; font-weight: 600; color: var(--on-dark, #F4F2EE); min-height: 44px; display: inline-flex; align-items: center; }
.pd table { border-collapse: collapse; min-width: 480px; width: 100%; font-variant-numeric: tabular-nums; }
.pd th, .pd td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line-dark, #2A3947); color: var(--on-dark, #F4F2EE); }
.pd th[scope="col"] { font-weight: 600; color: var(--eyebrow-on-dark, #EAD9BE); }
@media (max-width: 639px) { .pd-switch { display: flex; width: 100%; } .pd-switch label { flex: 1; justify-content: center; padding: 0 var(--s2, 8px); } }
@media (prefers-reduced-motion: reduce) { .pd-fill { transition: none !important; transform: scaleX(var(--s, 1)) !important; } }
