.scale-main {max-inline-size:1050px}
.scale-hero {margin-block:1rem;background:linear-gradient(130deg,#f4edff,#fff);border:1px solid #e6daf7;border-radius:20px;padding:clamp(1rem,4vw,2.3rem);color:#20142f}
.scale-kicker {color:#5d3198;font-weight:750;margin:0}
.scale-hero h1 {color:#32175a;font-size:clamp(1.65rem,5vw,2.65rem);line-height:1.35;margin:.2rem 0 .45rem}
.scale-hero p:last-child {color:#504360;margin:0;line-height:1.75}
.scale-panel {min-inline-size:0;margin-block:1rem;padding:clamp(.8rem,3vw,1.45rem)}
.scale-panel h2 {font-size:1.25rem;margin-block:0 .8rem}
.scale-field {display:grid;gap:.28rem;margin-block-end:.7rem}
.scale-field label {font-weight:700}
.scale-field textarea {width:100%;resize:vertical;min-height:6rem;font:inherit;line-height:1.85;border:1px solid #cdbbe6;border-radius:12px;padding:.6rem .75rem;background:#fff;color:#1e1429}
.scale-field textarea::placeholder {color:#645971;opacity:1}
.scale-actions {display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin-block:.7rem}
.scale-actions button {min-height:44px}
.scale-bands {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:.65rem}
.scale-band,.scale-token {color:var(--scale-ink);background:var(--scale-bg)}
.scale-band {display:grid;gap:.2rem;padding:.65rem .8rem;border-radius:12px}
.scale-band strong {font-size:1.25rem}
.scale-token {border-radius:.24em;padding-inline:.14em;box-decoration-break:clone}
.scale-high {--scale-ink:#14532d;--scale-bg:#dcfce7}
.scale-medium {--scale-ink:#1e40af;--scale-bg:#dbeafe}
.scale-low {--scale-ink:#713f12;--scale-bg:#fef3c7}
.scale-absent {--scale-ink:#3d4654;--scale-bg:#eceff3}
.scale-method {margin-block-start:.9rem}
.scale-results details summary {cursor:pointer;font-weight:700}
.scale-preview {white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid #e6daf7;border-radius:12px;padding:.7rem;line-height:2.15}
.scale-table {overflow:auto;max-inline-size:100%;margin-block:.65rem}
.scale-table table {width:100%;min-inline-size:680px}
.scale-table th,.scale-table td {padding:.55rem;text-align:start}
.scale-table tbody tr:nth-child(odd) {background:#faf7ff}
.scale-table [dir="ltr"] {font-variant-numeric:tabular-nums;unicode-bidi:isolate}
.scale-panel :focus-visible {outline:2px solid #6342a4;outline-offset:3px}
.scale-reference {max-inline-size:33rem;margin-block-end:1.15rem}
.scale-reference select {min-block-size:44px;max-inline-size:100%;font:inherit}
.scale-reference .hint {margin:0}

.scale-chart-key {display:flex;flex-wrap:wrap;gap:.45rem 1rem;margin-block:.65rem 1rem}
.scale-chart-key-item {display:inline-flex;align-items:center;gap:.35rem;color:#30243e}
.scale-chart-swatch {display:inline-block;inline-size:.85rem;block-size:.85rem;border-radius:.2rem;background:var(--scale-chart-color)}
.scale-high {--scale-chart-color:#047857}
.scale-medium {--scale-chart-color:#1d4ed8}
.scale-low {--scale-chart-color:#a65309}
.scale-absent {--scale-chart-color:#596273}
.scale-chart {display:grid;gap:.7rem}
.scale-chart-row {border:1px solid #dfd8eb;border-radius:12px;padding:.65rem .75rem}
.scale-chart-row h3 {font-size:1rem;margin:0;color:#32175a}
.scale-chart-row p {margin-block:.1rem .35rem}
.scale-chart-bar {display:block;inline-size:100%;block-size:1.25rem;border-radius:.35rem;overflow:hidden;margin-block:.45rem}
.scale-chart-bar rect {fill:var(--scale-chart-color)}
.scale-chart-values {font-size:.9rem;color:#504360}
.scale-chart-values p {line-height:1.7}
.scale-panel[aria-labelledby="scale-compare-title"] select {max-inline-size:100%;min-block-size:44px}
#scale-compare-scope-field:not([hidden]),#scale-highlight:not([hidden]) {display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}
#scale-compare-charts {grid-template-columns:repeat(2,minmax(0,1fr))}
#scale-comparison h3 {margin-block:.9rem .35rem}
#scale-comparison .scale-chart-row h3 {margin:0}
.scale-impact-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
.scale-impact-card {padding:.65rem;border:1px solid #dfd8eb;border-radius:12px;background:#fff}
.scale-impact-card h3 {margin-block:0 .45rem;padding:.3rem .65rem;border-radius:.45rem;background:var(--scale-bg);color:var(--scale-ink);font-size:1rem}
.scale-impact-list {padding-inline-start:1.45rem;margin-block:.25rem .65rem}
.scale-impact-list li {padding-block:.18rem;border-block-end:1px solid #eeeaf3}
.scale-impact-list .scale-form-button {border:0;background:none;color:#381a64;text-decoration:underline;text-underline-offset:.22em;min-block-size:44px;padding:.2rem .45rem;overflow-wrap:anywhere;max-inline-size:100%;text-align:start}
.scale-impact-count {font-size:.9rem;color:#504360}
.scale-emphasis {outline:2px solid #4b227b;outline-offset:2px;background:#fff4a3;color:#25143c;scroll-margin-block:5rem}
@media(max-width:40rem){#scale-compare-charts,.scale-impact-grid {grid-template-columns:minmax(0,1fr)}}
#scale-coverage-scope-row:not([hidden]),#scale-report-actions:not([hidden]) {display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin-block:.65rem}
.scale-report-table {overflow:auto;max-inline-size:100%;margin-block:.6rem}
.scale-report-table table {border-collapse:collapse;inline-size:100%;min-inline-size:34rem}
.scale-report-table th,.scale-report-table td {text-align:start;border:1px solid #e2dbea;padding:.4rem .55rem;overflow-wrap:anywhere}
.scale-report-table th {background:#f4edff;color:#32175a}
.scale-report-table tr:nth-child(even) {background:#faf7ff}
.scale-report-charts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}
.scale-report-original {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9}
#scale-report-preview {border-block-start:1px solid #dfd8eb;padding-block-start:.75rem}
@media(max-width:40rem){.scale-report-charts {grid-template-columns:minmax(0,1fr)}}
@media print {
 @page {size:A4;margin:13mm}
 body.scale-print-report {background:#fff!important;color:#171423!important}
 body.scale-print-report> :not(main),body.scale-print-report main> :not(#scale-results),
 body.scale-print-report #scale-results> :not(#scale-report-panel),
 body.scale-print-report #scale-report-panel> :not(#scale-report-preview) {display:none!important}
 body.scale-print-report :is(main,#scale-results,#scale-report-panel,#scale-report-preview) {display:block!important;margin:0!important;padding:0!important;max-inline-size:none!important;border:0!important;box-shadow:none!important}
 .scale-print-report .scale-report-content {font-size:10pt;line-height:1.5;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 .scale-print-report .scale-report-charts {grid-template-columns:repeat(2,minmax(0,1fr))}
 .scale-print-report .scale-report-table {overflow:visible}
 .scale-print-report .scale-report-table table {min-inline-size:0}
 .scale-print-report .scale-report-table thead {display:table-header-group}
 .scale-print-report :is(.scale-chart-row,tr) {break-inside:avoid}
 .scale-print-report :is(h2,h3,h4) {break-after:avoid}
 .scale-print-report details summary {display:none}
}

/* Let headers wrap at word boundaries; keep each statistical value intact. */
.scale-table table,.scale-report-table table {table-layout:auto}
:is(.scale-table,.scale-report-table) thead th {white-space:normal;overflow-wrap:normal;word-break:normal;vertical-align:middle;text-align:center}
:is(.scale-table,.scale-report-table) thead th:first-child {text-align:start}
:is(.scale-table,.scale-report-table) tbody td {overflow-wrap:normal;word-break:normal;font-variant-numeric:tabular-nums}
:is(.scale-table,.scale-report-table) tbody td[dir=ltr] {text-align:center;white-space:nowrap}
.scale-table tbody td:not(:first-child) {text-align:center}
.scale-table tbody td:first-child {min-inline-size:5.2rem}
