:root{
  color-scheme:light;
  --brand-primary:#079fb5;
  --brand-primary-strong:#087f91;
  --brand-teal:#21aa98;
  --brand-coral:#e85d43;
  --brand-gold:#e9b83f;
  --brand-gray:#9c9e9f;
  --brand-deep:#153b43;
  --black:var(--brand-deep);
  --ink:#203a40;
  --muted:#6b7f82;
  --line:#dce8e7;
  --paper:#f3f8f7;
  --white:#ffffff;
  --red:var(--brand-primary);
  --red-dark:var(--brand-primary-strong);
  --soft-red:#e8f7f6;
  --green:var(--brand-teal);
  --shadow:0 24px 70px rgba(21,59,67,.11);
}

body{background:var(--paper);color:var(--ink);transition:background-color .25s,color .25s}
.ambient-a{background:var(--brand-primary)}
.ambient-b{background:var(--brand-gold)}
.topbar,.form-actions{background:rgba(243,248,247,.9);border-color:rgba(21,59,67,.1)}
.sidebar{border-color:rgba(21,59,67,.1)}
.progress-ring{background:conic-gradient(var(--brand-primary) calc(var(--p)*1%),#dce8e7 0)}
.progress-ring:before{background:var(--paper)}
.step-heading h2 em,.side-intro h1 em,.report-hero h2 em,.eyebrow,.step-kicker{color:var(--brand-primary)}
.nav-step.active{background:#e3efed}
.nav-step.active span{color:var(--brand-primary)}
.field>span,fieldset>legend,.metric-field>span{color:#355158}
input,textarea,select{color:var(--ink);border-color:#cfdfdd;background:rgba(255,255,255,.82)}
input:focus,textarea:focus{border-color:var(--brand-primary);box-shadow:0 0 0 3px rgba(7,159,181,.12)}
.choice span{border-color:#cfdfdd;background:rgba(255,255,255,.72)}
.choice input:checked+span{border-color:var(--brand-primary);background:#e7f7f6;color:var(--brand-primary-strong)}
.choice input:checked+span:before{background:var(--brand-primary);border-color:var(--brand-primary);box-shadow:inset 0 0 0 3px #e7f7f6}
.metric-field,.ratings,.binary-list,.opportunity-grid span,.priority-list label{background:var(--white);border-color:var(--line)}
.highlight-field{background:#e7f7f6}
.stars span{background:#e7efee;color:#789092}
.stars label:hover span,.stars label.selected span{background:var(--brand-primary);color:#fff}
.segmented{border-color:#cbdcda}
.segmented span{background:#f8fbfa}
.segmented input:checked+span{background:var(--brand-primary-strong);color:#fff}
.opportunity-grid input:checked+span{background:linear-gradient(135deg,var(--brand-primary-strong),var(--brand-teal));border-color:transparent;color:#fff;box-shadow:0 9px 22px rgba(7,127,145,.2)}
.opportunity-grid input:checked+span b{color:var(--brand-gold)}
.priority-list b{background:var(--brand-primary-strong)}
.btn.primary{background:linear-gradient(135deg,var(--brand-primary),var(--brand-teal));box-shadow:0 8px 22px rgba(7,159,181,.22)}
.btn.primary:hover{background:linear-gradient(135deg,var(--brand-primary-strong),#168e80)}
.btn.secondary{background:#e2ecea;color:#405b60}
.btn.danger{background:var(--brand-coral)}
.invalid input,.invalid textarea,[data-required-group].invalid{border-color:var(--brand-coral)}
.choice-grid.invalid{outline-color:var(--brand-coral)}
.rating-row.invalid{background:#fff2ee;box-shadow:inset 3px 0 var(--brand-coral)}
.draft-dot{background:var(--brand-teal);box-shadow:0 0 0 4px rgba(33,170,152,.13)}
.score-track i{background:linear-gradient(90deg,var(--brand-primary),var(--brand-teal),var(--brand-gold))}
.score-card>p{color:var(--brand-primary-strong)!important}
.report{background:#e2ecea}
.report-toolbar{background:rgba(243,248,247,.95);border-color:#cfdddb}
.report-hero{background:linear-gradient(135deg,#176773 0%,#0c8797 58%,#20aa98 100%)}
.report-hero:after{border-color:var(--brand-gold) var(--brand-coral) var(--brand-teal) var(--brand-primary)}
.report-footer{background:var(--brand-deep)}
.section-title span,.action-item b{color:var(--brand-primary)}
.report-tags span{border-color:#cddfdd}
.next-step-card{border-color:var(--brand-primary);background:#e7f7f6}
.toast{background:var(--brand-deep)}
.modal-icon{background:#fff0ec;color:var(--brand-coral)}
.theme-toggle{margin-left:10px;position:relative;overflow:hidden}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:var(--ink);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .sun{display:none}
.theme-toggle .moon{display:block}

html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#e8f3f2;
  --muted:#9cb2b3;
  --line:#2c4a50;
  --paper:#10282e;
  --white:#17353c;
  --red:#45ccd0;
  --red-dark:#79dde0;
  --soft-red:#193f45;
  --shadow:0 24px 70px rgba(2,17,21,.3);
}
html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .form-actions{background:rgba(16,40,46,.92);border-color:#29474d}
html[data-theme="dark"] .sidebar{border-color:#29474d}
html[data-theme="dark"] .brand img{filter:brightness(1.18)}
html[data-theme="dark"] .progress-ring{background:conic-gradient(var(--red) calc(var(--p)*1%),#29474d 0)}
html[data-theme="dark"] .progress-ring:before{background:var(--paper)}
html[data-theme="dark"] .nav-step.active,html[data-theme="dark"] .nav-step:hover{background:#1b3a41;color:#e8f3f2}
html[data-theme="dark"] .nav-step.complete{color:#a7bbbc}
html[data-theme="dark"] .field>span,html[data-theme="dark"] fieldset>legend,html[data-theme="dark"] .metric-field>span{color:#c7d8d8}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{color:var(--ink);border-color:#35545a;background:#17353c}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#708a8d}
html[data-theme="dark"] .choice span{color:#dce9e8;border-color:#35545a;background:#17353c}
html[data-theme="dark"] .choice input:checked+span{border-color:var(--red);background:#19464c;color:#8de3e2}
html[data-theme="dark"] .choice input:checked+span:before{background:var(--red);border-color:var(--red);box-shadow:inset 0 0 0 3px #19464c}
html[data-theme="dark"] .metric-field,html[data-theme="dark"] .ratings,html[data-theme="dark"] .binary-list,html[data-theme="dark"] .opportunity-grid span,html[data-theme="dark"] .priority-list label{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .highlight-field,html[data-theme="dark"] .next-step-card{background:#193f45}
html[data-theme="dark"] .highlight-field textarea{background:#17353c}
html[data-theme="dark"] .stars span{background:#25454b;color:#90a7a9}
html[data-theme="dark"] .segmented{border-color:#35545a}
html[data-theme="dark"] .segmented span{background:#18363d;color:#c7d8d8}
html[data-theme="dark"] .segmented input:checked+span{background:var(--brand-primary);color:#fff}
html[data-theme="dark"] .btn.secondary{background:#28464c;color:#dbe9e8}
html[data-theme="dark"] .ratings .rating-row,html[data-theme="dark"] .binary-list fieldset{border-color:var(--line)}
html[data-theme="dark"] .rating-row.invalid{background:#492f2d}
html[data-theme="dark"] .report{background:#0b2026}
html[data-theme="dark"] .report-toolbar{background:rgba(16,40,46,.95);border-color:#29474d}
html[data-theme="dark"] .report-page{background:#143039;color:var(--ink)}
html[data-theme="dark"] .report-content .score-card,html[data-theme="dark"] .action-item{background:#1a3940}
html[data-theme="dark"] .report-section{border-color:#2c4a50}
html[data-theme="dark"] .report-summary>div>p,html[data-theme="dark"] .action-item p,html[data-theme="dark"] .report-details dt{color:#9fb4b5}
html[data-theme="dark"] .area-score div{background:#29474d}
html[data-theme="dark"] .report-tags span{border-color:#3a5960}
html[data-theme="dark"] .theme-toggle .sun{display:block}
html[data-theme="dark"] .theme-toggle .moon{display:none}

@media print{
  :root,html[data-theme="dark"]{color-scheme:light;--ink:#203a40;--muted:#6b7f82;--line:#dce8e7;--paper:#fff;--white:#fff;--red:#079fb5;--red-dark:#087f91;--soft-red:#e8f7f6}
  .report-hero{background:#fff!important;color:var(--brand-deep)!important;border-top-color:var(--brand-primary)}
  .report-hero h2{color:var(--brand-deep)!important}
  .report-hero h2 em{color:var(--brand-primary)!important}
  .report-hero:after{border-color:var(--brand-gold) var(--brand-coral) var(--brand-teal) var(--brand-primary)}
  .report-page,html[data-theme="dark"] .report-page{background:#fff!important;color:var(--brand-deep)!important}
  .score-card,html[data-theme="dark"] .report-content .score-card,.action-item,html[data-theme="dark"] .action-item{background:#fff!important;color:var(--brand-deep)!important;border-color:#dce8e7}
  .report-summary>div>p,html[data-theme="dark"] .report-summary>div>p,.action-item p,html[data-theme="dark"] .action-item p{color:#5e7478!important}
  .report-footer,html[data-theme="dark"] .report-footer{background:#fff!important;color:var(--brand-deep)!important;border-top-color:var(--brand-primary)}
}


@media screen{
  html[data-theme="dark"]{
    --ink:#f0f2f2;
    --muted:#a8adaf;
    --line:#363a3c;
    --paper:#151718;
    --white:#222526;
    --red:#37c2cc;
    --red-dark:#75dce0;
    --soft-red:#292d2e;
    --shadow:0 24px 70px rgba(0,0,0,.34);
  }
  html[data-theme="dark"] body{background:#151718;color:var(--ink)}
  html[data-theme="dark"] .ambient{opacity:.07}
  html[data-theme="dark"] .topbar,html[data-theme="dark"] .form-actions{background:rgba(21,23,24,.94);border-color:#34383a}
  html[data-theme="dark"] .sidebar{border-color:#34383a}
  html[data-theme="dark"] .progress-ring{background:conic-gradient(var(--red) calc(var(--p)*1%),#34383a 0)}
  html[data-theme="dark"] .progress-ring:before{background:#151718}
  html[data-theme="dark"] .nav-step.active,html[data-theme="dark"] .nav-step:hover{background:#292c2e;color:#f0f2f2}
  html[data-theme="dark"] .nav-step.complete{color:#aeb3b4}
  html[data-theme="dark"] .field>span,html[data-theme="dark"] fieldset>legend,html[data-theme="dark"] .metric-field>span{color:#d4d7d7}
  html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{color:#f0f2f2;border-color:#3c4143;background:#222526}
  html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#797f81}
  html[data-theme="dark"] .choice span{color:#e1e4e4;border-color:#3c4143;background:#222526}
  html[data-theme="dark"] .choice input:checked+span{border-color:var(--red);background:#2b3132;color:#74dbe0}
  html[data-theme="dark"] .choice input:checked+span:before{background:var(--red);border-color:var(--red);box-shadow:inset 0 0 0 3px #2b3132}
  html[data-theme="dark"] .metric-field,html[data-theme="dark"] .ratings,html[data-theme="dark"] .binary-list,html[data-theme="dark"] .opportunity-grid span,html[data-theme="dark"] .priority-list label{background:#222526;border-color:#363a3c}
  html[data-theme="dark"] .highlight-field,html[data-theme="dark"] .next-step-card{background:#292d2e}
  html[data-theme="dark"] .highlight-field textarea{background:#222526}
  html[data-theme="dark"] .stars span{background:#303436;color:#9ca2a4}
  html[data-theme="dark"] .segmented{border-color:#3c4143}
  html[data-theme="dark"] .segmented span{background:#252829;color:#d3d6d6}
  html[data-theme="dark"] .btn.secondary{background:#303436;color:#e2e5e5}
  html[data-theme="dark"] .rating-row.invalid{background:#3c2b28}
  html[data-theme="dark"] .report{background:#101112}
  html[data-theme="dark"] .report-toolbar{background:rgba(21,23,24,.96);border-color:#34383a}
  html[data-theme="dark"] .report-page{background:#1c1f20;color:#f0f2f2}
  html[data-theme="dark"] .report-hero{background:linear-gradient(135deg,#1b1e1f 0%,#242829 70%,#2b3031 100%)}
  html[data-theme="dark"] .report-content .score-card,html[data-theme="dark"] .action-item{background:#25292a}
  html[data-theme="dark"] .report-section{border-color:#363a3c}
  html[data-theme="dark"] .report-summary>div>p,html[data-theme="dark"] .action-item p,html[data-theme="dark"] .report-details dt{color:#adb2b3}
  html[data-theme="dark"] .area-score div{background:#34383a}
  html[data-theme="dark"] .report-tags span{border-color:#454a4c}
  html[data-theme="dark"] .report-footer{background:#17191a}
}

