/* Leaderboard tab. Live variables, fonts and colours only. */
.fx-updated { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px !important; font: 13px var(--result-mono); color: var(--result-muted); }
.fx-updated i { width: 8px; height: 8px; background: var(--result-accent); border-radius: 1px; }
.fx-section { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--result-line); }
.fx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 28px; }
.fx-head h2, .fx-disclosure summary h2, .fx-faq h2 { margin: 0; font-size: 22px; font-weight: 500; }
.fx-subhead { margin-top: 10px; }
.fx-metric { border-bottom: 0; }
.fx-metric button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 0 10px; font: inherit; font-size: 15px; color: var(--result-muted); cursor: pointer; }
.fx-metric button[aria-current] { color: var(--result-text); border-color: var(--result-accent); }
.fx-metric button:hover { color: var(--result-text); }
.fx-exp { margin-left: 6px; padding: 1px 6px; border: 1px solid #62686d; border-radius: 3px; font: 11px var(--result-mono); color: #c8cdc9; vertical-align: 1px; }
.results-page .fx-note { max-width: 1100px; margin-top: 10px !important; }

/* A. ranking rows */
.fx-board { margin-top: 12px; }
.fx-board-row, .fx-board-axis { display: grid; grid-template-columns: 32px minmax(150px, 230px) minmax(0, 1fr) 74px 44px; gap: 0 14px; align-items: center; }
.fx-board-row { min-height: 40px; border-top: 1px solid var(--result-line); color: inherit; text-decoration: none; }
.fx-board-row:hover, .fx-board-row:focus-visible { background: var(--result-surface); }
.fx-board-axis { min-height: 26px; }
.fx-axis-track { position: relative; height: 22px; font: 12px var(--result-mono); color: #b5bcc1; }
.fx-axis-track i { position: absolute; bottom: 2px; transform: translateX(-50%); font-style: normal; }
.fx-axis-track b { position: absolute; top: -16px; transform: translateX(-50%); font-weight: 400; color: var(--result-text); white-space: nowrap; }
.fx-rank { font: 13px var(--result-mono); color: var(--result-muted); text-align: right; }
.fx-who strong { display: block; font-weight: 500; font-size: 14px; line-height: 1.25; }
.fx-who small { display: block; color: var(--result-muted); font-size: 12px; line-height: 1.3; }
.fx-track svg { display: block; width: 100%; height: 22px; }
.fx-grid { stroke: #2a2d30; stroke-width: 1; }
.fx-ref { stroke: #eef0ec; stroke-width: 1.4; }
.fx-whisker { stroke: #eef0ec; stroke-width: 1.2; opacity: .85; }
.fx-value { font: 14px var(--result-mono); text-align: right; }
.fx-value b { display: block; font-weight: 400; }
.fx-value small { display: block; font-size: 11px; color: var(--result-muted); }
.fx-halo { paint-order: stroke; stroke: var(--result-bg); stroke-width: 4px; stroke-linejoin: round; }
.fx-delta { font: 12px var(--result-mono); color: var(--result-muted); }
.fx-harness { color: var(--result-muted); font-size: 12px; margin-left: 6px; }

/* F1. faults disclosure */
.fx-faults { font-size: 14px; color: var(--result-muted); }
.fx-faults summary, .fx-disclosure summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.fx-faults summary::-webkit-details-marker, .fx-disclosure summary::-webkit-details-marker, .fx-faq summary::-webkit-details-marker { display: none; }
.fx-faults summary { font-size: 15px; color: var(--result-text); }
.fx-faults[open] summary span, .fx-disclosure[open] summary > span, .fx-faq details[open] summary span { transform: rotate(45deg); }
.fx-faults summary span, .fx-disclosure summary > span, .fx-faq summary span { display: inline-block; transition: transform .15s ease; font-size: 18px; color: var(--result-muted); }
.fx-faults p { margin-top: 10px !important; max-width: 1100px; }
.fx-faults ul { margin: 8px 0 0; padding-left: 18px; columns: 2; column-gap: 40px; }
.fx-faults li { margin: 0 0 6px; break-inside: avoid; }
.fx-faults strong { color: var(--result-text); font-weight: 500; }

/* C. table */
.fx-table th small { display: block; color: var(--result-muted); font: 12px var(--result-mono); font-weight: 400; }
.fx-table th, .fx-table td { padding: 8px 10px; white-space: nowrap; }
.fx-table td[data-col] { font-family: var(--result-mono); text-align: right; color: #c8cdc9; }
.fx-table th:not(:first-child) { text-align: right; }
.fx-table td.fx-best { color: var(--result-text); font-weight: 700; }
.fx-table .fx-split { border-left: 1px solid var(--result-line); }
.fx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }

/* B. dot chart */
.fx-dots-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; margin-top: 12px; }
.fx-dots-chart svg, .fx-chart svg { display: block; max-width: 100%; overflow: visible; }
.fx-row-line { stroke: var(--result-line); stroke-width: 1; }
.fx-row-name { fill: var(--result-text); font: 500 13px "Avenir Next", "Helvetica Neue", Arial, sans-serif; }
.fx-row-sub { fill: var(--result-muted); font: 12px "Avenir Next", "Helvetica Neue", Arial, sans-serif; }
.fx-row a:hover .fx-row-name, .fx-row a:focus .fx-row-name { text-decoration: underline; }
.fx-zero { stroke: #eef0ec; stroke-width: 1.3; }
.fx-zero-label { fill: var(--result-text); font: 12px var(--result-mono); }
.fx-range { stroke-width: 1.4; opacity: .55; }
.fx-faint { opacity: .42; }
.fx-main { stroke: var(--result-bg); stroke-width: 2; }
.fx-dot-label { font: 600 12px var(--result-mono); paint-order: stroke; stroke: var(--result-bg); stroke-width: 3px; stroke-linejoin: round; }
.fx-tick { font-size: 12px !important; }
.fx-row:hover .fx-row-line { stroke: #62686d; }
.fx-customize > summary { display: none; }
.fx-settings { padding: 16px 18px 18px; border: 1px solid var(--result-line); border-radius: 3px; background: var(--result-surface); font-size: 14px; }
.fx-settings h3 { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--result-line); font-size: 18px; font-weight: 500; }
.fx-settings h4 { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--result-text); }
.fx-switch { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--result-line); cursor: pointer; }
.fx-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fx-switch span { position: relative; width: 32px; height: 18px; border: 1px solid #62686d; border-radius: 9px; background: var(--result-bg); transition: background .15s ease; flex: none; }
.fx-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #aeb2b7; transition: transform .15s ease, background .15s ease; }
.fx-switch input:checked + span { background: #1f4f55; border-color: var(--result-accent); }
.fx-switch input:checked + span::after { transform: translateX(14px); background: var(--result-accent); }
.fx-switch input:focus-visible + span { outline: 2px solid var(--result-accent); outline-offset: 2px; }
.fx-pills { display: flex; gap: 6px; }
.fx-pills button { padding: 4px 12px; border: 1px solid #62686d; border-radius: 14px; background: none; color: var(--result-text); font: inherit; font-size: 13px; cursor: pointer; }
.fx-pills button[aria-pressed=true] { background: #eef0ec; border-color: #eef0ec; color: #151617; }
.fx-radios { display: grid; gap: 6px; }
.fx-radios label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.fx-radios input { accent-color: #7ddfd4; width: 15px; height: 15px; margin: 0; }

/* D. budget chart */
.fx-context { fill: none; stroke: #86a0a1; stroke-opacity: .28; stroke-width: 1; }
.fx-leader { fill: none; stroke-width: 2.3; stroke-linejoin: round; stroke-linecap: round; }
.fx-leader-line { fill: none; stroke-width: 1; stroke-opacity: .75; }
.fx-end-label { font: 12px var(--result-mono); paint-order: stroke; stroke: var(--result-bg); stroke-width: 3px; stroke-linejoin: round; }
.fx-end-sub { fill: #aeb2b7; font-size: 11px; }
.fx-gridline { stroke: #2a2d30 !important; }

/* E. difficulty */
.fx-legend { display: flex; gap: 8px 20px; margin-top: 4px; font-size: 13px; color: var(--result-muted); }
.fx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.fx-item { opacity: .85; }
.fx-item:hover { opacity: 1; stroke: #eef0ec; stroke-width: 1.5; }
.fx-h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 500; }
.fx-hard th, .fx-hard td { text-align: left !important; }
.fx-hard td:nth-child(n+3) { font-family: var(--result-mono); }

/* F2. questions */
.fx-faq { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 28px; }
.fx-faq details { border-top: 1px solid var(--result-line); }
.fx-faq details:last-child { border-bottom: 1px solid var(--result-line); }
.fx-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; cursor: pointer; list-style: none; font-size: 16px; }
.fx-faq summary:hover { color: var(--result-accent); }
.fx-faq .fx-q { font-weight: 400; }
.fx-faq p { margin: 0 0 16px !important; color: var(--result-muted); font-size: 15px; }

@media (max-width: 860px) {
  .fx-dots-layout { grid-template-columns: minmax(0, 1fr); }
  .fx-customize { order: -1; }
  .fx-customize > summary { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid #62686d; border-radius: 3px; cursor: pointer; font-size: 14px; list-style: none; }
  .fx-customize[open] > summary { margin-bottom: 10px; }
  .fx-faq { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .fx-faults ul { columns: 1; }
}
@media (max-width: 600px) {
  .fx-board-row, .fx-board-axis { grid-template-columns: 20px minmax(0, 142px) minmax(0, 1fr) 52px; gap: 0 8px; }
  .fx-who strong { font-size: 13px; }
  .fx-delta { display: none; }
  .fx-axis-track { font-size: 11px; }
  .fx-metric { display: flex; flex-wrap: nowrap; gap: 16px; overflow-x: auto; max-width: 100%; }
  .fx-metric button { flex: none; white-space: nowrap; font-size: 14px; }
}

/* Provider logos (monochrome, family colour) */
.org-logo { display: inline-block; flex: none; vertical-align: -0.17em; margin-right: 7px; }
.fx-who strong { display: flex; align-items: flex-start; gap: 0; }
.fx-who strong .org-logo { margin-top: 1px; }
.fx-table td .org-logo { margin-right: 8px; vertical-align: -0.2em; }
.results-heading h1 .org-logo { margin-right: 10px; vertical-align: -0.12em; }
.pareto-detail h2 .org-logo { margin-right: 8px; vertical-align: -0.12em; }
.participant-name .org-logo { margin-right: 7px; vertical-align: -0.16em; }
@media (max-width: 600px) {
  .fx-who strong .org-logo { width: 14px; height: 14px; margin-right: 6px; }
  .fx-board-row, .fx-board-axis { grid-template-columns: 18px minmax(0, 164px) minmax(0, 1fr) 48px; gap: 0 7px; }
}
.fx-row-name.fx-narrow { font-size: 12px; }
