/* ==========================================================================
   Who carries the 2030 target: hero total, five sector rows (slider + two
   thin bars on a shared 0 to 100% axis), comparison result and table view.
   Guess = cobalt outline bar; NDC = solid cobalt bar. Same hue, two textures.
   ========================================================================== */
.mx__hero { display: grid; gap: 6px; margin-bottom: 28px; }
.mx__total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.mx__total-n { font: 300 clamp(4rem, 9vw, 7.4rem)/.9 var(--serif); letter-spacing: -.04em; }
.mx__unit { font: 500 18px/1.2 var(--sans); color: var(--ink-2); }
.mx__total-sub { font: italic 400 1.25rem/1.3 var(--serif); color: var(--ink-2); }

.mx__board { max-width: 1180px; padding: clamp(18px, 2.4vw, 30px); background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.mx__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; margin-bottom: 14px; }
.mx__help { max-width: 56ch; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.mx__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; font: 600 14px/1.2 var(--sans); }
.mx__legend li { display: inline-flex; align-items: center; gap: 8px; }
.mx__sw { width: 22px; height: 10px; }
.mx__sw--guess { box-shadow: inset 0 0 0 2px var(--cobalt); background: rgba(21, 119, 189, .12); }
.mx__sw--ndc { background: var(--cobalt); }
.mx:not(.is-revealed) .mx__legend li:last-child { opacity: .45; }

.mx__rows { list-style: none; border-top: 1px solid var(--rule-strong); }
.mx__row {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 2.2fr) minmax(0, 4.6fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 10px 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.mx__label { display: flex; align-items: center; gap: 12px; }
.mx__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; background: var(--paper-2); font-size: 22px; color: var(--cobalt-deep); }
.mx__text { display: grid; gap: 2px; }
.mx__name { font: 600 16.5px/1.25 var(--sans); }
.mx__what { font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }

/* Range input styled to the system: hairline track, square thumb */
.mx__range { width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
.mx__range:focus-visible { outline: 2px solid var(--cobalt-deep); outline-offset: 2px; }
.mx__range::-webkit-slider-runnable-track { height: 2px; background: var(--rule-strong); }
.mx__range::-moz-range-track { height: 2px; background: var(--rule-strong); }
.mx__range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); border: 0; transition: transform .15s var(--ease-out); }
.mx__range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.mx__range:active::-webkit-slider-thumb { transform: scale(1.15); background: var(--cobalt); }

/* Bars on a shared 0 to 100% axis with recessive gridlines */
.mx__bars {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 4px 0;
  background: linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 25% 100% repeat-x;
}
.mx__bar { display: block; height: 14px; transform-origin: left center; transform: scaleX(0); transition: transform .45s var(--ease-out); }
.mx__bar--guess { box-shadow: inset 0 0 0 2px var(--cobalt); background: rgba(21, 119, 189, .12); }
.mx__bar--ndc { background: var(--cobalt); }
.mx:not(.is-revealed) .mx__bar--ndc { visibility: hidden; }
.mx__vals { display: grid; justify-items: end; gap: 2px; font-variant-numeric: tabular-nums lining-nums; }
.mx__g { font: 600 16px/1.2 var(--sans); }
.mx__n { font: 600 16px/1.2 var(--sans); color: var(--cobalt-deep); }
.mx__n:empty { display: none; }
.mx__axis { display: grid; grid-template-columns: minmax(0, 3.2fr) minmax(0, 2.2fr) minmax(0, 4.6fr) minmax(0, 1.4fr); column-gap: 22px; margin-top: 8px; font: 500 12.5px/1 var(--sans); color: var(--ink-2); }
.mx__axis span { grid-column: 3; grid-row: 1; }
.mx__axis span:nth-child(1) { justify-self: start; }
.mx__axis span:nth-child(2) { justify-self: start; margin-left: calc(25% - .6em); }
.mx__axis span:nth-child(3) { justify-self: center; }
.mx__axis span:nth-child(4) { justify-self: end; margin-right: calc(25% - .6em); }
.mx__axis span:nth-child(5) { justify-self: end; }
.mx__actions { margin-top: 26px; }

/* Result */
.mx__result { display: grid; gap: 22px; max-width: 1180px; margin-top: 34px; }
.mx__score { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 36px; }
.mx__score-big { font: 300 clamp(4rem, 8vw, 6.8rem)/.85 var(--serif); letter-spacing: -.04em; }
.mx__score-of { color: var(--ink-3); }
.mx__score-label { font: 500 17px/1 var(--sans); letter-spacing: 0; color: var(--ink-2); }
.mx__msg { max-width: 28ch; padding-bottom: .4em; font: 400 clamp(1.3rem, 2vw, 1.8rem)/1.25 var(--serif); text-wrap: balance; }
.mx__insight { max-width: 70ch; font-size: 17px; line-height: 1.6; }
.mx__toggle { display: inline-flex; flex-wrap: wrap; gap: 0; justify-self: start; box-shadow: inset 0 0 0 1px var(--rule-strong); border-radius: 999px; padding: 4px; }
.mx__seg { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 14.5px/1 var(--sans); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.mx__seg[aria-pressed="true"] { background: var(--cobalt); color: var(--on-cobalt); }
.mx__seg:focus-visible { outline: 2px solid var(--cobalt-deep); outline-offset: 2px; }
.mx__cm2 { max-width: 70ch; padding-left: 16px; border-left: 2px solid var(--cobalt); font-size: 16px; line-height: 1.55; }
.mx__tie { padding: clamp(20px, 2.6vw, 30px); background: var(--paper-2); }
.mx__tie-title { font: italic 400 1.3rem/1.3 var(--serif); }
.mx__tie ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; margin-top: 14px; }
.mx__tie p { font-size: 16px; line-height: 1.55; }
.mx__tie .link-arrow { margin-top: 8px; }
.mx__details summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 600 15px/1.2 var(--sans); color: var(--cobalt-deep); cursor: pointer; }
.mx__table { width: 100%; max-width: 900px; margin-top: 10px; border-collapse: collapse; font-size: 15px; }
.mx__table th, .mx__table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.mx__table thead th { font-weight: 600; color: var(--ink-2); border-bottom-color: var(--rule-strong); }
.mx__table td { font-variant-numeric: tabular-nums lining-nums; }
.mx__total-row th, .mx__total-row td { font-weight: 700; border-bottom: 1.5px solid var(--ink); }

@media (max-width: 900px) {
  .mx__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label vals" "ctrl ctrl" "bars bars"; gap: 8px 16px; }
  .mx__label { grid-area: label; }
  .mx__ctrl { grid-area: ctrl; }
  .mx__bars { grid-area: bars; }
  .mx__vals { grid-area: vals; }
  .mx__axis { grid-template-columns: minmax(0, 1fr); }
  .mx__axis span { grid-column: 1; }
  .mx__tie ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .mx__toggle { display: grid; width: 100%; border-radius: 26px; }
  .mx__seg { width: 100%; }
}
