
/* ===== QERIS visual v2 (registry) ===== */
@property --qv-p { syntax: '<number>'; inherits: true; initial-value: 0; }
.registry-live-page { --qv-track: #ECEAE3; --qv-card: #fff; --qv-line: #E2E0D8; --qv-muted: #5A5F69; --qv-accent: #2F45D8; }
.qv-ring { --size: 56px; --w: 6px; --qv-p: var(--p, 0); position: relative; display: inline-grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  background: conic-gradient(var(--g-fill, var(--qv-accent)) calc(var(--qv-p) * 1%), var(--qv-track) 0); }
.qv-ring::before { content: ""; position: absolute; inset: var(--w); border-radius: 50%; background: var(--qv-card); }
.qv-ring > .qv-ring-in { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.registry-live-page .qv-ring-val { margin: 0; text-transform: none; letter-spacing: 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 600; font-size: calc(var(--size) * .27); line-height: 1; color: var(--rg-ink, #141821); }
.registry-live-page .qv-ring-sub { text-transform: none; letter-spacing: 0; display: block; font-size: calc(var(--size) * .12); font-weight: 600; color: var(--qv-muted); margin-top: 2px; text-align: center; }
.qv-ring.is-empty { background: repeating-conic-gradient(var(--qv-track) 0 4deg, transparent 4deg 8deg); }
@media (prefers-reduced-motion: no-preference) { .qv-ring { animation: qv-fill .9s cubic-bezier(.2,.7,.2,1) both; } }
@keyframes qv-fill { from { --qv-p: 0; } }
.qv-code { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; font: 700 12px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .04em; color: var(--g-fg, #1E2F9E); background: var(--g-bg, #E2E7FC); }
.qv-code.sm { width: 26px; height: 20px; border-radius: 6px; font-size: 10px; }

/* Hero stats */
.rg-stats .rg-stat:not(.rg-dist) { border-top: 3px solid var(--qv-accent); }
.rg-stats .rg-stat dd { font-size: 2rem; }
.qv-dist { display: flex; align-items: center; gap: 18px; }
.qv-donut { --size: 92px; position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 50%; background: var(--qv-donut, var(--qv-track)); }
.qv-donut::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--qv-card); }
.qv-donut b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 20px/1 'IBM Plex Mono', monospace; }
.qv-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px 10px; margin: 0; padding: 0; list-style: none; flex: 1; }
.qv-legend li { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.qv-legend .qv-chip { min-width: 30px; padding: 2px 6px; border-radius: 6px; text-align: center; font-weight: 700; font-size: .78rem; background: var(--g-bg); color: var(--g-fg); }
.rg-dist.qv-on .rg-dist-bar, .rg-dist.qv-on .rg-dist-legend { display: none; }

/* Hero summary box: barometer + countries + institutions */
.rg-stats.qv-hero-on { grid-template-columns: 1fr; }
.rg-stats .qv-hidden-stat { display: none; }
.qv-hero-box { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(160px, 1fr); align-items: center; gap: 18px; padding: 18px 20px; background: #fff; border: 1px solid var(--qv-line); border-top: 3px solid var(--qv-accent); border-radius: 12px; }
.qv-hero-gauge { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qv-hero-label { align-self: flex-start; font-size: .85rem; color: var(--qv-muted); }
.qv-hero-gauge .qv-gauge { width: 100%; max-width: 230px; }
.qv-hero-gauge .qv-gauge-num { align-items: center; }
.qv-hero-gauge .qv-gauge-num strong { font: 600 2.2rem/1 'IBM Plex Mono', monospace; }
.qv-hero-figs { display: flex; flex-direction: column; gap: 14px; padding-inline-start: 18px; border-inline-start: 1px solid var(--qv-line); }
.qv-fig { display: flex; align-items: center; gap: 12px; }
.qv-fig strong { display: block; font: 600 2rem/1 'IBM Plex Mono', monospace; }
.qv-fig span { font-size: .85rem; color: var(--qv-muted); }
.qv-fig-ic { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 13px; background: #E2E7FC; color: #2F45D8; }
.qv-fig-ic.is-teal { background: #D5F3EE; color: #0E7C6F; }
.qv-fig-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) { .qv-hero-box { grid-template-columns: 1fr; } .qv-hero-figs { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--qv-line); padding-top: 14px; flex-direction: row; justify-content: space-around; } }

/* Rankings */
.rg-rank-head { flex-wrap: wrap; }
.qv-type-select { min-height: 40px; padding-inline: 10px 30px; border: 1px solid var(--qv-line); border-radius: 8px; background: #fff; font: inherit; font-size: .92rem; }
.qv-type-select:disabled { opacity: .55; }
.rg-row { transition: background .15s ease; }
.rg-row:hover { background: #FAF9F5; }
.rg-row .rg-c-rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .85rem; }
.rg-row.qv-top-1 .rg-c-rank { background: linear-gradient(135deg, #F6D365, #D4A017); color: #3D2B00; }
.rg-row.qv-top-2 .rg-c-rank { background: linear-gradient(135deg, #E6E9EE, #A9B1BC); color: #22272F; }
.rg-row.qv-top-3 .rg-c-rank { background: linear-gradient(135deg, #F2C29B, #B8733D); color: #3A1E08; }
.rg-row .rg-sub .qv-code { margin-inline-end: 6px; vertical-align: 1px; }
.rg-row .rg-track { height: 10px; border-radius: 6px; }
.rg-row .rg-fill { border-radius: 6px; background: linear-gradient(90deg, var(--g-fill), color-mix(in srgb, var(--g-fill) 70%, #fff)); }
.registry-live-page .qv-grade { border: 0; margin-inline-start: 0; min-height: 0; display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 7px; font-weight: 700; font-size: .8rem; background: var(--g-bg); color: var(--g-fg); }

/* Countries panel + institution-type tabs */
.qv-type-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: #F1F0EA; }
.qv-type-tabs button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: .8rem; font-weight: 600; color: var(--qv-muted); cursor: pointer; }
.qv-type-tabs button[aria-pressed="true"] { background: #fff; color: var(--rg-ink, #141821); box-shadow: 0 1px 2px rgba(20,24,33,.12); }
.rg-panel h2[data-qv-type]::after { content: " · " attr(data-qv-type); color: var(--qv-accent); }
.rg-note[data-qv-note] { font-size: 0; }
.rg-note[data-qv-note]::before { content: attr(data-qv-note); font-size: .8rem; }
.rg-countries.qv-on { display: flex; flex-direction: column; gap: 10px !important; }
.rg-country.qv-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--qv-card); border: 1px solid var(--qv-line); border-radius: 14px; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.rg-country.qv-card:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(20,24,33,.08); border-color: var(--g-fill); }
.qv-cty-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qv-cty-main strong { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.qv-cty-main small { color: var(--qv-muted); font-size: .8rem; }
.qv-cty-score { display: flex; align-items: center; gap: 8px; }
.qv-cty-score .qv-ring { --size: 52px; --w: 5px; }
.qv-cty-score .qv-ring .qv-ring-val { font-size: 12.5px; }
.qv-cty-empty { margin: 0; padding: 14px; border: 1px dashed var(--qv-line); border-radius: 12px; color: var(--qv-muted); font-size: .88rem; }

/* Country page (first design) */
.registry-summary.qv-on { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.qv-tile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--qv-card); border: 1px solid var(--qv-line); border-radius: 14px; }
.qv-tile span { display: block; font-size: .85rem; color: var(--qv-muted); }
.qv-tile strong { font: 600 1.7rem/1.1 'IBM Plex Mono', monospace; }
.qv-tile.qv-grades { grid-column: span 2; flex-wrap: wrap; gap: 8px; }
.registry-summary.qv-on { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.registry-summary .qv-country-box { min-width: 0; }
.registry-summary .qv-tile.qv-grades { grid-column: auto; align-content: center; }
.registry-summary .qv-fig span, .registry-summary .qv-hero-label { text-transform: none; letter-spacing: 0; font-weight: 500; }
.registry-summary .qv-fig strong { font: 600 2rem/1 'IBM Plex Mono', monospace; }
@media (max-width: 860px) { .registry-summary.qv-on { grid-template-columns: 1fr; } }
.qv-tile.qv-grades .qv-gpill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--g-bg); color: var(--g-fg); font-weight: 700; font-size: .85rem; }
.qv-tile.qv-grades .qv-gpill.is-zero { opacity: .35; }
.qv-tile .qv-ring .qv-ring-val { font-size: 16px; }
.registry-table tbody tr { transition: background .15s ease; }
.registry-table tbody tr:hover { background: #FAF9F5; }
/* Score: the number only (no bar). The grade chip carries the colour. */
.qv-score-cell { display: inline-flex; align-items: center; min-width: 0; }
.qv-score-cell b { font: 650 var(--fs-body)/1.2 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
@media (max-width: 640px) { .qv-tile.qv-grades { grid-column: 1 / -1; } .qv-dist { flex-direction: column; align-items: flex-start; } }

/* Institution page — mixed charts */
.registry-score-card.qv-core { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); align-items: center; gap: 6px 22px; }
.registry-score-card.qv-core > strong { display: none; }
.registry-score-card.qv-core > .qv-gauge-box { grid-row: span 4; }
.registry-score-card.qv-core > span, .registry-score-card.qv-core > b, .registry-score-card.qv-core > small, .registry-score-card.qv-core > .rg-cap-callout { grid-column: 2; margin-inline-start: 0; }
.registry-score-card.qv-core > small { margin-top: 0; }
.registry-score-card.qv-core > b.qv-grade { justify-self: start; height: 30px; min-width: 40px; font-size: .95rem; }
.qv-gauge { width: 100%; height: auto; display: block; }
.qv-gauge-num { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-top: 2px; }
.qv-gauge-num strong { font: 600 2.4rem/1 'IBM Plex Mono', monospace; }
.qv-gauge-num small { font-weight: 600; color: var(--qv-muted); }
@media (prefers-reduced-motion: no-preference) { .qv-needle { transform-origin: 110px 108px; animation: qv-needle .9s cubic-bezier(.2,.7,.2,1) both; } }
@keyframes qv-needle { from { transform: rotate(-90deg); } }
.qv-bullet { margin-top: 12px; }
.qv-bullet-val { font: 600 2.6rem/1 'IBM Plex Mono', monospace; margin-bottom: 12px; }
.qv-bullet-track { position: relative; height: 18px; border-radius: 10px; background: #ECEAE3; overflow: hidden; }
.qv-bullet-track i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #22D3EE, #2F45D8 70%, #7C3AED); }
.qv-bullet-track .qv-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.8); }
.qv-bullet-scale { display: flex; justify-content: space-between; margin-top: 4px; font: 500 .72rem 'IBM Plex Mono', monospace; color: var(--qv-muted); }
.qv-dimcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.qv-dimcard { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, #fff), #fff 60%); border: 1px solid color-mix(in srgb, var(--c) 22%, #E2E0D8); }
.qv-dimcard::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px; background: var(--c); }
.qv-dimcard-head { display: flex; gap: 12px; align-items: flex-start; }
.qv-dimcard-ic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--c); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent); }
.qv-dimcard-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.qv-dimcard-head strong { display: block; font-size: 1.02rem; text-transform: capitalize; }
.qv-dimcard-head small { display: block; font-size: .8rem; color: var(--qv-muted); line-height: 1.35; margin-top: 2px; }
.qv-dimcard-score { display: flex; align-items: baseline; gap: 6px; }
.qv-dimcard-score b { font: 600 2.5rem/1 'IBM Plex Mono', monospace; color: var(--c); }
.qv-dimcard-score span { font-weight: 600; color: var(--qv-muted); }
.qv-blocks { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.qv-blocks i { height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--c) 14%, #EEECE5); }
.qv-blocks i.on { background: var(--c); }
.qv-dimcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.qv-cov { padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; text-transform: capitalize; background: #DDF2E6; color: #14532F; }
.qv-cov.is-insufficient { background: #F1F0EA; color: var(--qv-muted); }
.qv-weight { font: 600 .76rem 'IBM Plex Mono', monospace; color: var(--qv-muted); }
.qv-dimcard.is-empty { background: repeating-linear-gradient(135deg, #FBFAF7 0 10px, #F5F4EF 10px 20px); }
.qv-dimcard.is-empty .qv-dimcard-score b { color: var(--qv-muted); }
.qv-dimcard.is-empty .qv-dimcard-ic { background: #B9BCC3; box-shadow: none; }
.qv-pie-row { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px 18px; margin: 10px 0 14px; }
.qv-pie { position: relative; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(#2e8b57 0 var(--ok), #E6E4DC var(--ok) 100%); }
.qv-pie b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 15px 'IBM Plex Mono', monospace; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.qv-pie-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.qv-pie-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; background: #2e8b57; }
.qv-pie-legend .is-missing i { background: #E6E4DC; }
.qv-pie-row .qv-sample-head { margin: 0; }
.qv-cols { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 10px 4px 0; border-bottom: 1px solid #E2E0D8; }
.qv-col { flex: 0 1 86px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.qv-col-bar { position: relative; width: 100%; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--g-fill) 70%, #fff), var(--g-fill)); }
.qv-col-bar span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font: 600 .85rem 'IBM Plex Mono', monospace; white-space: nowrap; }
.qv-col small { font-size: .72rem; color: var(--qv-muted); margin-bottom: -22px; white-space: nowrap; }
.registry-history.qv-hide, .registry-history-chart.qv-hide { display: none !important; }
.registry-two .registry-panel:last-child { padding-bottom: 34px; }
@media (max-width: 640px) {
  .registry-score-card.qv-core { grid-template-columns: 1fr; }
  .registry-score-card.qv-core > * { grid-column: 1 !important; }
  .registry-score-card.qv-core > .qv-gauge-box { grid-row: auto; max-width: 260px; }
  .qv-pie-row { grid-template-columns: auto 1fr; }
  .qv-pie-row .qv-sample-head { grid-column: 1 / -1; }
}

/* Institution page details */
.qv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qv-chip-meta { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--qv-line); font-size: .88rem; text-transform: capitalize; }
.qv-chip-meta.qv-method { text-transform: none; font-family: 'IBM Plex Mono', monospace; font-size: .78rem; color: var(--qv-muted); }
.qv-visit { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--qv-accent); color: #fff !important; font-weight: 600; font-size: .88rem; text-decoration: none; }
.qv-visit::after { content: "↗"; }
.qv-visit:hover { filter: brightness(1.08); }
.qv-sample-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 6px 10px; margin: 10px 0 14px; }
.qv-pages-num { font: 600 1.6rem/1 'IBM Plex Mono', monospace; }
.qv-sample-head > span { color: var(--qv-muted); }
.qv-pages { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: var(--qv-track); overflow: hidden; }
.qv-pages i { display: block; height: 100%; border-radius: 6px; background: #2e8b57; }
.qv-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.qv-role { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--qv-line); background: #fff; }
.qv-role strong { display: block; font-size: .88rem; line-height: 1.25; }
.qv-role small { font-size: .76rem; color: var(--qv-muted); }
.qv-role-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; }
.qv-role-ic svg, .qv-disc-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.qv-role.is-ok .qv-role-ic { background: #DDF2E6; color: #14532F; }
.qv-role.is-missing { border-style: dashed; background: transparent; }
.qv-role.is-missing .qv-role-ic { background: #F1F0EA; color: #8A8F98; }
.qv-role.is-missing strong { color: var(--qv-muted); }
.qv-sample-note { margin: 12px 0 0; font-size: .8rem; color: var(--qv-muted); }
.registry-disclosure.qv-on { display: flex; gap: 14px; align-items: flex-start; }
.qv-disc-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #E2E7FC; color: #1E2F9E; }
.registry-badges .registry-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-weight: 700; }
.registry-badges .registry-badge[data-badge="Excellence"] { background: #146c43; color: #fff; border-color: transparent; }
.registry-badges .registry-badge[data-badge="Advanced"] { background: #d3f0dd; color: #0b4f2c; border-color: transparent; }
.registry-badges .registry-badge[data-badge="Most improved"] { background: #E2E7FC; color: #1E2F9E; border-color: transparent; }
.registry-badges .registry-badge::before { content: "★"; }
.registry-summary .qv-fig-ic { display: grid !important; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 13px; font-size: 0; }
.registry-summary .qv-fig-ic svg { display: block; width: 24px; height: 24px; }

.qv-gauge-slot { width: 100%; max-width: 230px; }
.qv-fig-extra { display: block; font-size: .78rem; color: var(--qv-accent); font-weight: 600; margin-top: 2px; }
.registry-summary .qv-fig-extra { text-transform: none; letter-spacing: 0; }
.qv-global-line { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--qv-muted); margin-top: 4px; }
.qv-global-line i { display: inline-block; width: 14px; height: 0; border-top: 3px dashed #2F45D8; }
.registry-summary .qv-global-line { text-transform: none; letter-spacing: 0; }

/* Country page: grade distribution box */
.qv-distbox { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; background: #fff; border: 1px solid var(--qv-line); border-radius: 12px; min-width: 0; }
.qv-distbox-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.registry-summary .qv-distbox-head strong { font-size: .95rem; text-transform: none; letter-spacing: 0; }
.registry-summary .qv-distbox-head span { font-size: .8rem; color: var(--qv-muted); text-transform: none; letter-spacing: 0; }
.qv-stack { display: flex; height: 26px; border-radius: 8px; overflow: hidden; gap: 2px; }
.qv-seg { display: grid; place-items: center; min-width: 26px; background: var(--g-fill); }
.qv-seg b { font-size: .72rem; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.qv-dist-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qv-dist-rows li { display: grid; grid-template-columns: 38px 1fr 64px; align-items: center; gap: 10px; }
.qv-dist-rows li.is-zero { opacity: .45; }
.qv-dist-track { height: 8px; border-radius: 5px; background: #F1F0EA; overflow: hidden; }
.qv-dist-track i { display: block; height: 100%; border-radius: 5px; background: var(--g-fill); }
.registry-summary .qv-dist-n { font: 600 .78rem 'IBM Plex Mono', monospace; color: var(--qv-muted); text-align: end; text-transform: none; letter-spacing: 0; }
.registry-summary .qv-dist-rows .qv-grade { min-width: 34px; }
.registry-summary.qv-on { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; }
/* Country switcher */
/* Registry countries search */
.qv-cty-search { display: flex; align-items: center; gap: 8px; }
.qv-cty-search input { flex: 1; min-height: 38px; padding: 0 12px; border: 1px solid var(--qv-line); border-radius: 9px; background: #fff; font: inherit; font-size: .9rem; }
.qv-cty-count { font: 600 .76rem 'IBM Plex Mono', monospace; color: var(--qv-muted); white-space: nowrap; }
.rg-countries.qv-on { max-height: none; overflow: visible; padding: 0; gap: 8px !important; }
.rg-side { align-self: stretch; }
.rg-side > .rg-panel:first-child { flex: 1 1 auto; }
.rg-country.qv-card { padding: 9px 12px; gap: 10px; grid-template-columns: 34px minmax(0, 1fr) auto; }
.rg-country.qv-card .qv-code { width: 34px; height: 34px; }
.qv-cty-score .qv-ring { --size: 44px; --w: 4px; }
.qv-cty-score .qv-ring .qv-ring-val { font-size: 11px; }
.qv-cty-main strong { font-size: .92rem; }
.qv-cty-main small { font-size: .74rem; }
.registry-summary .qv-seg { display: grid !important; place-items: center; padding: 0; margin: 0; }
.registry-summary .qv-seg b { line-height: 1; }

/* Compact country summary */
.registry-controls.qv-has-switch { grid-template-columns: minmax(150px, .8fr) minmax(200px, 1.4fr) repeat(3, minmax(130px, .7fr)); }
@media (max-width: 860px) { .registry-controls.qv-has-switch { grid-template-columns: 1fr 1fr; } }
.registry-summary.qv-on { gap: 12px; margin-bottom: 18px; }
.registry-summary .qv-country-box { padding: 14px 16px; gap: 14px; grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr); }
.registry-summary .qv-hero-label { font-size: .78rem; }
.registry-summary .qv-gauge-slot { max-width: 170px; }
.registry-summary .qv-gauge-num strong { font-size: 1.6rem; }
.registry-summary .qv-gauge-num small { font-size: .72rem; }
.registry-summary .qv-hero-figs { gap: 12px; padding-inline-start: 14px; }
.registry-summary .qv-fig { gap: 10px; }
.registry-summary .qv-fig-ic { width: 36px; height: 36px; border-radius: 10px; }
.registry-summary .qv-fig-ic svg { width: 19px; height: 19px; }
.registry-summary .qv-fig strong { font-size: 1.45rem; }
.registry-summary .qv-fig span { font-size: .78rem; }
.registry-summary .qv-fig-extra { font-size: .72rem; }
.registry-summary .qv-global-line { font-size: .72rem; }
.registry-summary .qv-distbox { padding: 14px 16px; gap: 9px; }
.registry-summary .qv-distbox-head strong { font-size: .85rem; }
.qv-stack { height: 18px; border-radius: 6px; }
.qv-seg b { font-size: .65rem; }
.qv-dist-rows { gap: 3px; }
.qv-dist-rows li { grid-template-columns: 32px 1fr 58px; gap: 8px; }
.registry-summary .qv-dist-rows .qv-grade { min-width: 30px; height: 20px; font-size: .72rem; }
.qv-dist-track { height: 6px; }
.registry-summary .qv-dist-n { font-size: .72rem; }

/* Institution: single sample box */
.registry-two.qv-single { display: block; }
.registry-two.qv-single > .registry-panel { width: 100%; }
.registry-two.qv-single .qv-roles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.registry-two.qv-single .qv-pie-row { grid-template-columns: auto auto minmax(220px, 420px); justify-content: start; column-gap: 28px; }
/* balance columns: tighter ranking rows */
.rg-list .rg-row { padding-block: 8px; }
.rg-list .rg-row .rg-c-name a { line-height: 1.25; }
.rg-list .rg-row .rg-sub { font-size: .78rem; }
.rg-list .rg-row .rg-badge { height: 28px; }
.rg-cols { align-items: stretch !important; }

/* v08: no rings in country cards, fill height, header language select */
.qv-cty-num { font: 600 1.05rem 'IBM Plex Mono', monospace; color: var(--rg-ink, #141821); }
.qv-cty-score { gap: 8px; }
.qv-small { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #F1F0EA; color: #6B6F78; white-space: nowrap; }
.rg-side > .rg-panel:first-child { flex: 1 1 auto; display: flex; flex-direction: column; }
.rg-side > .rg-panel:first-child .rg-countries.qv-on { flex: 1 1 auto; }
.rg-countries.qv-on > .rg-country.qv-card { flex: 1 1 auto; max-height: 112px; min-height: 52px; }

/* Country page: first design for every country */
.registry-summary.qv-on.qv-first { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: stretch; }
.registry-summary.qv-first .qv-tile.qv-grades { grid-column: span 2; align-content: center; }
@media (max-width: 640px) { .registry-summary.qv-first .qv-tile.qv-grades { grid-column: 1 / -1; } }

/* v12: bidi-safe numbers and grades (A+ never shows as +A in Arabic) */
.qv-grade, .rg-badge, .qv-chip, .qv-gpill, .qv-gcol-lab, .qv-code, .qv-ring-val, .qv-gauge-num, .qv-dimcard-score, .qv-pages-num, .qv-pie b, .qv-cty-num, .qv-dist-n, .qv-tile-val, .rg-num, .qv-score-cell b, .qv-cty-count { unicode-bidi: isolate; direction: ltr; }
.qv-gauge-num, .qv-dimcard-score { justify-content: flex-start; }
[dir="rtl"] .qv-gauge-num { justify-content: center; }
.qv-bullet { direction: ltr; }
[dir="rtl"] .qv-bullet { text-align: left; }
/* v12: mobile fixes */
@media (max-width: 640px) {
  .registry-two.qv-single .qv-pie-row { grid-template-columns: auto 1fr; }
  .registry-two.qv-single .qv-pie-row .qv-sample-head { grid-column: 1 / -1; }
  .registry-two.qv-single .qv-roles { grid-template-columns: 1fr 1fr; }
  .rg-list .rg-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
  .rg-list .rg-row .rg-c-rank { grid-row: 1; grid-column: 1; }
  .rg-list .rg-row .rg-c-name { grid-row: 1; grid-column: 2; }
  .rg-list .rg-row .rg-c-badge { grid-row: 1; grid-column: 3; width: auto; }
  .rg-list .rg-row .rg-c-score { grid-row: 2; grid-column: 2 / -1; width: auto; }
  .qv-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Global registry (approved layout) */
.registry-summary.qv-global { grid-template-columns: minmax(130px,.7fr) minmax(130px,.7fr) minmax(200px,1fr) minmax(260px,1.6fr); }
.registry-summary.qv-global .qv-tile.qv-grades { grid-column: auto; }
.registry-controls.qv-global-controls { grid-template-columns: minmax(200px,1.4fr) repeat(4, minmax(130px,.7fr)); }
.qv-global-table .qv-rank { font: 600 .85rem 'IBM Plex Mono', monospace; color: #5A5F69; }
.qv-global-table .qv-date { white-space: nowrap; }
.qv-cty-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.qv-global-section .rg-pager { border-top: 0; }
@media (max-width: 980px) { .registry-summary.qv-global { grid-template-columns: 1fr 1fr; } .registry-controls.qv-global-controls { grid-template-columns: 1fr 1fr; } }
/* v20: align dimension cards — description area always two lines tall */
.qv-dimcard-head small { min-height: 2.7em; }

/* QERIS AccessTwin button */
.qv-twin-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--qv-accent, #2F45D8); color: var(--qv-accent, #2F45D8) !important; background: #fff; font-weight: 600; font-size: .88rem; text-decoration: none; }
.qv-twin-btn:hover { background: #E2E7FC; }
.qv-twin-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* v37: country flag in the registry table */
.qv-flag { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(20,24,33,.12); flex: none; }
.qv-chip-meta.qv-chip-flag { display: inline-flex; align-items: center; gap: 6px; }
.qv-chip-flag .qv-flag { width: 20px; height: 15px; }

/* v48: QERIS Depth (how many accessibility tests applied) + Proven excellence */
.qd-cell { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem var(--qv-mono, ui-monospace, monospace); color: #2a3350; white-space: nowrap; }
.qd-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.qd-bars i { display: block; width: 4px; border-radius: 1px; background: #d9dce6; }
.qd-bars i:nth-child(1) { height: 5px; } .qd-bars i:nth-child(2) { height: 8px; } .qd-bars i:nth-child(3) { height: 11px; } .qd-bars i:nth-child(4) { height: 14px; } .qd-bars i:nth-child(5) { height: 16px; }
.qd-bars i.on { background: #2F45D8; }
.qd-star { display: inline-grid; place-items: center; margin-inline-start: 5px; width: 18px; height: 18px; border-radius: 50%; background: #0f5132; color: #fff; font-size: .62rem; vertical-align: middle; cursor: help; }
.qd-wrap { margin-top: 18px; margin-bottom: 4px; }
.qd-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid #e2e0d8; border-radius: 14px; background: #fff; }
.qd-big { display: inline-flex; align-items: flex-end; gap: 4px; height: 34px; }
.qd-big i { display: block; width: 9px; border-radius: 2px; background: #d9dce6; }
.qd-big i:nth-child(1) { height: 10px; } .qd-big i:nth-child(2) { height: 16px; } .qd-big i:nth-child(3) { height: 22px; } .qd-big i:nth-child(4) { height: 28px; } .qd-big i:nth-child(5) { height: 34px; }
.qd-big i.on { background: #2F45D8; }
.qd-card h3 { margin: 0 0 4px; font-size: var(--fs-h3); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qd-card p { margin: 0; color: #5A5F69; font-size: .86rem; line-height: 1.55; }
.qd-proven { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: #0f5132; color: #fff; font-size: .72rem; font-weight: 700; }
@media (max-width: 640px) { .qd-card { grid-template-columns: 1fr; } }

/* v49: Proven excellence = A+ with depth 5/5 only; gold badge next to the institution name */
.qd-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.qd-gold { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: linear-gradient(135deg, #f8dc7a 0%, #e0b02a 55%, #c8941a 100%); color: #3a2800; border: 1px solid #c18d14; font-size: .7rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 1px 3px rgba(150,105,10,.25); cursor: help; }
.qd-gold-lg { font-size: .76rem; padding: 3px 11px; cursor: default; }

/* v50: QERIS distinction medals (gold / silver / bronze), high confidence only */
.qm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 11px 2px 4px; border: 1px solid; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; cursor: help; }
.qm-pill .qm-ico { width: 18px; height: 23px; margin: -4px 0; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.qm-gold { background: #fff6d8; border-color: #e3b33a; color: #7a5200; }
.qm-silver { background: #f3f5f8; border-color: #b8bec6; color: #3d444d; }
.qm-bronze { background: #fff0e4; border-color: #d9935a; color: #7a3d10; }
.qm-big { width: 52px; height: 65px; flex: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.18)); }
.qd-card h3 .qm-pill { cursor: default; }

/* v51: medal only (no text label), compact so rows keep their height */
.qm-only { display: inline-flex; align-items: center; line-height: 0; cursor: help; flex: none; }
.qm-only .qm-ico { width: 18px; height: 22px; margin: -4px 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.qd-name { flex-wrap: nowrap; }
.qd-card h3 .qm-only .qm-ico { width: 20px; height: 25px; }

/* v59: grade scale A+ 98+, A 90-97, B+ 80-89, B 70-79, C+ 60-69, C 50-59 (below 50 is outside the classification) */
.registry-live-page [data-g="A+"] { --g-fill: #146c43; --g-bg: #146c43; --g-fg: #ffffff; }
.registry-live-page [data-g="A"] { --g-fill: #2e8b57; --g-bg: #d3f0dd; --g-fg: #0b4f2c; }
.registry-live-page [data-g="B+"] { --g-fill: #7aa32a; --g-bg: #e6f2cc; --g-fg: #3d5a0a; }
.registry-live-page [data-g="B"] { --g-fill: #b8960a; --g-bg: #fbf1bf; --g-fg: #5c4a00; }
.registry-live-page [data-g="C+"] { --g-fill: #e07b1f; --g-bg: #fde3c8; --g-fg: #7a3a00; }
.registry-live-page [data-g="C"] { --g-fill: #c62828; --g-bg: #f9d6d6; --g-fg: #8a1c1c; }
.registry-live-page [data-g="D"] { --g-fill: #8e1b1b; --g-bg: #f1c9c9; --g-fg: #6b1010; }

/* ===== QERIS table component — one column system for every registry table =====
   Global ranking and every country table share fixed column definitions, so column widths
   never depend on the country or on name length. Columns are tagged by registry-live.js
   (data-col / data-label). Below 720px every table becomes the same card list. */
.registry-table.q-table { table-layout: fixed; width: 100%; }
.q-table th, .q-table td { padding: var(--table-pad-y) var(--table-pad-x); font-size: var(--fs-table); line-height: var(--lh-table); vertical-align: middle; }
.q-table th { font-size: var(--fs-meta); }
.q-table [data-col="rank"] { width: 52px; }
.q-table [data-col="name"] { width: auto; }
.q-table [data-col="country"] { width: 16%; }
.q-table [data-col="category"] { width: 12%; }
.q-table [data-col="score"] { width: 92px; }
.q-table [data-col="grade"] { width: 84px; }
.q-table [data-col="depth"] { width: 104px; }
.q-table [data-col="conf"] { width: 112px; }
.q-table [data-col="date"] { width: 116px; }
.q-table td[data-col="name"] { overflow-wrap: anywhere; }
.q-table td[data-col="name"] a { font-weight: var(--fw-strong); }
.q-table td[data-col="country"], .q-table td[data-col="category"], .q-table td[data-col="conf"], .q-table td[data-col="date"] { color: var(--muted); }
.q-table .qv-score-cell { min-width: 0; }
.q-table .qv-cty-cell { white-space: normal; }

@media (max-width: 720px) {
  .registry-table-wrap:has(> .q-table) { overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .registry-table-wrap > .q-table { min-width: 0; }
  .q-table, .q-table tbody { display: block; width: 100%; }
  .q-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* One card per row: rank · name · score · grade on top, a divider, then a fixed two-column grid of labelled details. */
  .q-table tbody tr {
    display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px;
    margin: 0 0 10px; padding: 14px 16px;
    border: var(--border); border-radius: var(--radius-card); background: var(--panel);
  }
  .q-table tbody tr::before { content: ""; order: 4; flex: 1 1 100%; height: 1px; background: var(--line-faint); }
  .q-table tbody tr:hover { background: var(--panel); }
  .q-table tbody td[data-col] { display: block; width: auto; min-width: 0; padding: 0; border: 0; font-size: var(--fs-small); line-height: var(--lh-small); }
  .q-table td[data-col="rank"] { order: 0; flex: 0 0 auto; min-width: 1.4em; padding-top: 1px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .q-table td[data-col="name"] { order: 1; flex: 1 1 0; font-size: var(--fs-body); line-height: 1.35; }
  .q-table td[data-col="score"] { order: 2; flex: 0 0 auto; }
  .q-table td[data-col="score"] .qv-score-cell b { font-size: var(--fs-h3); }
  .q-table td[data-col="grade"] { order: 3; flex: 0 0 auto; }
  .q-table td[data-col="country"], .q-table td[data-col="category"], .q-table td[data-col="depth"], .q-table td[data-col="conf"], .q-table td[data-col="date"] {
    order: 5; flex: 0 0 calc(50% - 8px); color: var(--text);
  }
  .q-table td[data-col="country"]::before, .q-table td[data-col="category"]::before, .q-table td[data-col="depth"]::before, .q-table td[data-col="conf"]::before, .q-table td[data-col="date"]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    color: var(--muted); font-size: var(--fs-meta); font-weight: var(--fw-meta); letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  }
}

/* Institution page: the five core standards are the result; no separate language index card. */
.registry-score-card.registry-linguistic { display: none !important; }
.registry-institution-grid:has(> .registry-linguistic) { grid-template-columns: minmax(0, 1fr); }

/* Tablet: the same fixed columns, narrowed so the table fits its column without sideways scrolling. */
@media (min-width: 721px) and (max-width: 1099px) {
  .registry-table-wrap > .q-table { min-width: 0; }
  .q-table th, .q-table td { padding-inline: 10px; }
  .q-table [data-col="rank"] { width: 40px; }
  .q-table [data-col="country"] { width: 15%; }
  .q-table [data-col="category"] { width: 12%; }
  .q-table [data-col="score"] { width: 76px; }
  .q-table [data-col="grade"] { width: 64px; }
  .q-table [data-col="depth"] { width: 76px; }
  .q-table [data-col="conf"] { width: 92px; }
  .q-table [data-col="date"] { width: 100px; }
}

/* Narrow screens: tiles and sample tiles never force sideways scrolling. */
@media (max-width: 720px) {
  .registry-summary.qv-on { grid-template-columns: minmax(0, 1fr); }
  .registry-summary.qv-on .qv-tile { min-width: 0; flex-wrap: wrap; }
  .qv-tile span { overflow-wrap: anywhere; }
  .qv-roles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
  .qv-role { min-width: 0; }
  .qv-role strong, .qv-role small { overflow-wrap: anywhere; }
}

/* Results receive focus after Next / Previous (focus management only, no visible ring on the whole list). */
.registry-table-wrap:focus, #rg-list:focus { outline: none; }
