.demo-page{background:#f8f8fa;color:#202025}
.demo-header{max-width:1320px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 32px;border-bottom:1px solid #e5e4e9}
.demo-header>a:last-child{font-size:14px;color:#5e5c67}
.demo-shell{max-width:1256px;padding:0 32px;margin:auto}
.demo-intro{padding:42px 0 30px;max-width:960px}
.demo-eyebrow{font-size:13px;color:#6e647c;margin:0 0 18px}
.demo-intro h1{font-size:clamp(38px,5vw,60px);letter-spacing:-.045em;line-height:1.04}
.demo-intro>p:last-child{max-width:760px;color:#65616c;font-size:17px;line-height:1.7;margin:22px 0 0}
.demo-tabs{display:flex;gap:5px;padding:5px;background:#eeedf2;border-radius:14px;width:fit-content}
.demo-tabs button{border:0;border-radius:10px;background:transparent;padding:13px 25px;cursor:pointer;font-weight:500;font-size:15px}
.demo-tabs [aria-selected=true]{background:#fff;color:#5c467a}
.scope-note{font-size:13px;line-height:1.6;color:#6b6673;margin:18px 0 25px;max-width:950px;min-height:22px}
.demo-workspace{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px;align-items:stretch}
.demo-controls,.demo-results{background:#fff;border:1px solid #e5e3ea;border-radius:20px;padding:26px}
.demo-page h2{font-size:20px;line-height:1.35;letter-spacing:-.025em}
.demo-page h3{font-size:16px;line-height:1.45;letter-spacing:-.015em}
.control-title,.results-title{display:flex;align-items:center;justify-content:space-between;gap:14px}
.control-title>button{border:0;background:none;padding:6px 0;color:#6b567f;font-size:13px;cursor:pointer}
.demo-controls label{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px;margin:28px 0 13px}
.demo-controls label output{font-variant-numeric:tabular-nums;color:#68517d;font-weight:500;white-space:nowrap}
.demo-controls input[type=range]{width:100%;height:24px;accent-color:#8572b3;cursor:pointer;margin:0}
.range-labels{display:flex;justify-content:space-between;color:#6d6575;font-size:11px;margin-top:3px}
.control-divider{border-top:1px solid #eeedf2;margin-top:26px}
.control-help{font-size:12px;line-height:1.7;color:#6d6575;margin:14px 0 24px}
.operating-summary{margin:0;border-top:1px solid #eeedf2;padding-top:17px;font-size:12px}
.operating-summary div{display:flex;justify-content:space-between;gap:12px;margin:8px 0}
.operating-summary dt{color:#6d6575}.operating-summary dd{margin:0;font-variant-numeric:tabular-nums}
.alarm-state{font-size:11px;border-radius:6px;padding:6px 9px;background:#f4edf3;color:#805075;white-space:nowrap}
.alarm-state.normal{background:#f0f4f1;color:#4c6958}
.metric-pair{display:grid;grid-template-columns:1fr 1fr 1fr;gap:15px;margin:28px 0 10px}
.metric-pair span{display:block;font-size:12px;color:#6d6575;margin-bottom:5px}
.metric-pair output{font-size:33px;letter-spacing:-.04em;line-height:1.3;font-variant-numeric:tabular-nums}
.metric-pair>div:first-child output{color:#a44579}.metric-pair>div:nth-child(2) output{color:#78649f}
.performance-chart{margin:12px 0 0}
.performance-chart svg{display:block;width:100%;overflow:visible}
.performance-chart path{stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.measured-line{fill:none;stroke:#8572b3;stroke-width:2.8}.expected-line{fill:none;stroke:#bc397c;stroke-width:1.8;stroke-dasharray:6 4}
.alarm-line{fill:none;stroke:#b4b1b9;stroke-width:1;stroke-dasharray:2 4}.gap{fill:#ede8f5;stroke:none}.end-dot{fill:#8572b3;stroke:#fff;stroke-width:2}
.chart-legend{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;color:#6d6575;font-size:11px;margin:6px 0 26px}
.chart-legend span:before{content:"";display:inline-block;width:19px;border-top:2px solid #8572b3;vertical-align:middle;margin-right:6px}
.chart-legend .expected-key:before{border-top:2px dashed #bc397c}.chart-legend .alarm-key:before{border-top:1px dotted #aaa6b1}
.energy-comparison{border-top:1px solid #eeedf2;padding-top:21px}
.energy-title{display:flex;justify-content:space-between;gap:12px;align-items:baseline;flex-wrap:wrap;margin-bottom:16px}
.energy-title span{font-size:11px;color:#6d6575}
.energy-row{display:grid;grid-template-columns:67px 1fr 85px;align-items:center;gap:12px;font-size:11px;margin:12px 0}
.energy-row>span{color:#6d6575}.energy-row>output{text-align:right;font-variant-numeric:tabular-nums}
.bar-track{height:13px;background:#f7f5f9;border-radius:4px;overflow:hidden}
.baseline-bar{height:100%;background:#e8cddc;border-bottom:2px dashed #bc397c;box-sizing:border-box;border-radius:4px;transition:width .25s ease}
.actual-bar{height:100%;background:#8572b3;border-radius:4px;transition:width .25s ease}
#energy-explanation{font-size:12px;color:#6d6575;line-height:1.6;margin:18px 0 0}
.workflow{margin:42px 0 0}
.workflow-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}
.workflow-heading p{font-size:13px;color:#6d6575;margin:6px 0 0}
#play{border:1px solid #d8d2e0;background:#fff;border-radius:8px;padding:10px 16px;font-size:12px;cursor:pointer;color:#665078}
.workflow-steps{display:flex;gap:6px;border-bottom:1px solid #e0dce6;margin:21px 0 0}
.workflow-steps button{flex:1;cursor:pointer;border:0;border-bottom:2px solid transparent;background:transparent;padding:14px 8px;color:#6d6575;font-size:14px;transition:color .2s,border-color .2s}
.workflow-steps [aria-pressed=true]{color:#68507e;border-bottom-color:#8572b3}
.step-detail{padding:26px 0;min-height:155px;max-width:850px}
.step-detail h3{font-size:21px}.step-detail p{font-size:15px;line-height:1.7;color:#686170;margin:12px 0}
.step-detail .step-equation{font-size:14px;color:#665078;font-variant-numeric:tabular-nums}
.demo-boundary{border-top:1px solid #e0dce6;padding:32px 0 48px;max-width:960px}
.demo-boundary h2{font-size:17px}.demo-boundary p,.demo-boundary summary{font-size:13px;line-height:1.8;color:#6d6575;margin:15px 0}
.demo-boundary summary{cursor:pointer;color:#665078}
.demo-footer{max-width:1256px;margin:auto;padding:25px 32px 35px;border-top:1px solid #e0dce6;display:flex;flex-wrap:wrap;gap:20px;font-size:12px;color:#6d6575}
.demo-footer span{margin-left:auto}
.demo-page button:focus-visible,.demo-page input:focus-visible,.demo-page summary:focus-visible{outline:2px solid #8572b3;outline-offset:4px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:950px){.demo-workspace{grid-template-columns:260px minmax(0,1fr)}.demo-controls,.demo-results{padding:20px}.metric-pair output{font-size:27px}.results-title{align-items:flex-start;flex-direction:column}.metric-pair{gap:8px}.chart-legend{gap:12px}}
@media(max-width:720px){.demo-header{padding:20px}.demo-header .brand{font-size:24px}.demo-header>a:last-child{font-size:12px}.demo-shell{padding:0 20px}.demo-intro{padding-top:42px}.demo-intro>p:last-child{font-size:16px}.demo-tabs{width:100%}.demo-tabs button{flex:1;padding:12px 9px;font-size:14px}.demo-workspace{grid-template-columns:1fr;gap:16px}.demo-controls{display:grid;grid-template-columns:1fr 1fr;column-gap:24px}.control-title{grid-column:1/-1}.demo-controls label,.demo-controls input,.range-labels,.control-divider,.control-help,.operating-summary{grid-column:1/-1}.demo-controls label{margin-top:18px}.control-divider{margin-top:17px}.control-help{margin-bottom:16px}.metric-pair output{font-size:30px}.results-title{flex-direction:row}.results-title h2{font-size:18px}.workflow-heading{align-items:flex-start}.workflow-steps button{font-size:12px;padding:13px 3px}.demo-footer{padding:22px 20px}.demo-footer span{width:100%;margin:0}.energy-row{grid-template-columns:62px 1fr 76px;gap:9px}.step-detail{min-height:200px}}
@media(prefers-reduced-motion:reduce){.baseline-bar,.actual-bar,.workflow-steps button{transition:none}}
/* Visual refinement only: preserve all data, controls, and calculations. */
.demo-intro{padding-top:54px;padding-bottom:36px}.demo-intro h1{margin:0}.demo-workspace{gap:28px}.demo-controls,.demo-results{box-shadow:0 8px 28px rgba(40,31,54,.035)}.demo-page h2,.demo-page h3{margin-top:0}.demo-controls label{line-height:1.45}.performance-chart{margin-top:24px}.chart-legend{font-size:12px;line-height:1.5}.energy-row{font-size:12px}.workflow{margin-top:52px}.demo-page button{touch-action:manipulation}.demo-tabs button:hover,.workflow-steps button:hover{color:#543c6d}
@media(prefers-reduced-motion:no-preference){.demo-tabs button{transition:background-color .2s ease,color .2s ease,box-shadow .2s ease}.demo-controls,.demo-results{transition:box-shadow .2s ease}}
@media(max-width:720px){.demo-intro{padding-top:36px}.demo-results{padding:20px 16px}.metric-pair{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.metric-pair span{font-size:11px;line-height:1.35}.metric-pair output{font-size:clamp(21px,6vw,30px)}.performance-chart{overflow-x:auto}.performance-chart svg{min-width:480px}.chart-legend{justify-content:flex-start;gap:8px 16px}.workflow-steps{overflow-x:auto}.workflow-steps button{min-width:68px}.energy-row{grid-template-columns:62px minmax(0,1fr) 76px}}
@media(prefers-reduced-motion:reduce){.demo-tabs button,.demo-controls,.demo-results{transition:none}}
/* A grid child must shrink below its chart's intrinsic width on mobile. */
.demo-controls,.demo-results{min-width:0}
@media(max-width:720px){.demo-workspace{grid-template-columns:minmax(0,1fr)}.performance-chart{min-width:0;max-width:100%}.metric-pair>div{min-width:0}.results-title{flex-wrap:wrap}.energy-title{min-width:0}}
