/* Shared ranking surface and site shell: the main pages (/, /compare/…,
   /brokers/…, text pages) and the private dashboard. A working surface, not
   a broadsheet: neutral surfaces, 8px radius on controls, one colour per
   meaning. Decisions: design/owner-dashboard-decision-2026-11-19.md and
   design/main-site-dashboard-2026-11-19.md.
   Contrast on #FFFFFF: ink #14161A 18.2:1, soft #4F5561 7.5:1,
   A #2334E0 8.0:1, B #0B6E66 6.1:1, C #7A3E9D 7.0:1, penalty #7A5200 6.6:1.
   Order matters: breakpoint overrides come after the rules they change. */
.p-app {
  --sc-canvas: #F4F5F7;
  --sc-surface: #FFFFFF;
  --sc-ink-soft: #4F5561;
  --line: #DCDFE5;
  --line-strong: #B9BEC8;
  --a: #2334E0;
  --a-wash: #E3E6FC;
  --b: #0B6E66;
  --b-wash: #DDF0EE;
  --c: #7A3E9D;
  --c-wash: #F1E6F7;
  --pen: #7A5200;
  --pen-wash: #F5EBD3;
  --r: 8px;
  --hit: 44px;
  --gut: clamp(1rem, 3vw, 2rem);
  background: var(--sc-canvas);
  color: var(--sc-ink);
}
.p-app main { padding-bottom: 2rem; }

/* App bar: the only chrome. */
.appbar { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem var(--gut); background: var(--sc-surface); border-bottom: 1px solid var(--line); }
.appbar__mark svg { width: 28px; height: 28px; display: block; }
.appbar__t { font-size: 1rem; font-weight: 750; letter-spacing: -0.01em; }
.appbar__tag { margin-left: auto; font-size: var(--t-xs); font-weight: 600; color: var(--sc-ink-soft); padding: 0.2rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; }
.appftr { padding: 1rem var(--gut) 2rem; font-size: var(--t-xs); color: var(--sc-ink-soft); }
.p-app .sources { margin-top: 0.5rem; }

.dash { padding: 0 var(--gut); max-width: 92rem; margin: 0 auto; }
.dash__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; padding: 0.6rem 0 0.4rem; }
.dash__head h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; font-stretch: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: var(--t-sm); padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--sc-surface); border: 1px solid var(--line); }
.chips b { font-weight: 750; }
.chip--p { color: var(--pen); }
.howto { font-size: var(--t-sm); }
.howto[open] { flex-basis: 100%; }
.howto > summary, .howto__lim > summary, .dr__ev > summary, .cy > summary { cursor: pointer; font-weight: 650; color: var(--a); min-height: var(--hit); min-width: var(--hit); display: inline-flex; align-items: center; }
.howto[open] { background: var(--sc-surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.6rem 0.9rem 0.8rem; }
.howto p { margin-top: 0.5rem; max-width: 62rem; }
.howto__q { color: var(--sc-ink-soft); font-size: var(--t-xs); }
.howto__lim ul { margin: 0.4rem 0 0 1.1rem; }

/* Mechanism diagram: four steps, read left to right. */
.flow { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0.4rem 0 0; padding: 0; counter-reset: none; }
.flow li { position: relative; display: flex; flex-direction: column; padding: 0.45rem 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--sc-canvas); min-width: 9rem; }
.flow li + li { margin-left: 1.1rem; }
.flow li + li::before { content: "→"; position: absolute; left: -1.15rem; top: 50%; transform: translateY(-50%); color: var(--sc-ink-soft); font-weight: 700; }
.flow .flow__or { border-style: dashed; border-color: var(--pen); }
.flow .flow__or::before { content: "or"; font-size: var(--t-xs); }
.flow b { font-weight: 750; }
.flow span { font-size: var(--t-xs); color: var(--sc-ink-soft); }

/* Toolbar: rank key, search, reset. Sticks while the list scrolls. */
.tb { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.6rem 0; background: var(--sc-canvas); border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--sc-surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 2px; gap: 2px; }
.seg button { min-height: 40px; padding: 0 0.85rem; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: var(--t-sm); font-weight: 650; color: var(--sc-ink); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--sc-ink); color: #FFFFFF; }
.seg button:hover:not([aria-pressed="true"]) { background: var(--sc-canvas); }
.tb__q { position: relative; display: flex; align-items: center; flex: 1 1 14rem; max-width: 22rem; }
.tb__q svg { position: absolute; left: 0.7rem; width: 18px; height: 18px; color: var(--sc-ink-soft); pointer-events: none; }
.tb__q input { width: 100%; min-height: var(--hit); padding: 0 0.8rem 0 2.3rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--sc-surface); font: inherit; font-size: 1rem; color: var(--sc-ink); }
.tb__n { flex-basis: 100%; font-size: var(--t-xs); color: var(--sc-ink-soft); margin: 0; }
.dbtn { min-height: var(--hit); padding: 0 0.9rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--sc-surface); font: inherit; font-size: var(--t-sm); font-weight: 650; color: var(--sc-ink); cursor: pointer; white-space: nowrap; }
.dbtn:hover { border-color: var(--sc-ink); }
.dbtn--quiet { background: transparent; }
.dbtn[aria-pressed="true"] { background: var(--a); border-color: var(--a); color: #FFFFFF; }
.is-b .dbtn[aria-pressed="true"] { background: var(--b); border-color: var(--b); }
.p-app :focus-visible { outline: 3px solid var(--a); outline-offset: 2px; border-radius: 4px; }

/* Layout: list plus a sticky comparison pane on wide screens. */
.dash__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 0.75rem; }
/* Below the wide layout the pane sits above the list, and only once a
   broker is selected, so the first rows stay on the first screen. */
.dash__grid .cmp { order: -1; }
/* The side pane needs a list of at least ~830px beside it, so it starts at
   1280px; narrower screens stack it above the list. */
@media (max-width: 1279px) { .dash__grid .cmp:not(.is-on) { display: none; } }
@media (min-width: 1280px) {
  .dash__grid { grid-template-columns: minmax(0, 1fr) 25rem; align-items: start; }
  .dash__grid .cmp { order: 0; position: sticky; top: 4.5rem; max-height: calc(100vh - 5.5rem); overflow: auto; }
}

/* Row grid shared by the column header and every row. */
.dh, .dr__m { display: grid; grid-template-columns: 3.4rem minmax(10rem, 1.5fr) 4.8rem repeat(5, minmax(3.8rem, 1fr)) 13.4rem; align-items: center; column-gap: 0.8rem; }
.dh { align-items: end; }
/* Wide screens: the Breakdown toggle sits beside Compare in the action
   column, so a collapsed row is one line tall. */
@media (min-width: 900px) {
  .dr { position: relative; }
  .dr__act { align-self: start; }
  .dr__more > summary { position: absolute; top: 0.55rem; right: calc(0.9rem + 6.8rem); width: 6.4rem; justify-content: center; min-height: var(--hit); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--sc-ink); background: var(--sc-surface); }
  .dr__more[open] > summary { border-bottom: 1px solid var(--line-strong); background: var(--sc-canvas); }
  .dr__more[open] { border-top: 1px solid var(--line); }
  .dr__act .dbtn { width: 6.4rem; padding: 0; }
}
.dh { padding: 0 0.9rem 0.35rem; font-size: var(--t-xs); font-weight: 650; color: var(--sc-ink-soft); }
.dh small { font-weight: 500; }
.dl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.dr { background: var(--sc-surface); border: 1px solid var(--line); border-radius: var(--r); }
.dr[hidden] { display: none; }
.dr.is-a { box-shadow: inset 4px 0 0 var(--a); }
.dr.is-b { box-shadow: inset 4px 0 0 var(--b); }
.dr__m { padding: 0.55rem 0.9rem; }
.dr__rk { display: flex; flex-direction: column; line-height: 1.1; }
.dr__rk b { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
/* The rank basis is written under every rank number: "overall" or "on Costs". */
.dr__rk small { font-size: 0.6875rem; font-weight: 650; color: var(--sc-ink-soft); white-space: nowrap; }
[data-by]:not([data-by="overall"]) .dr__rk small { color: var(--a); }
.dr__t.is-sel b { color: var(--a); }
.dh .is-sel { color: var(--a); text-decoration: none; }
.dh .is-sel::after { content: "▲ rank basis"; display: block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.02em; }
.dh [data-rank-h] { white-space: nowrap; }
.dr__n { font-size: 1rem; font-weight: 750; line-height: 1.25; }
.dr__s { margin: 0.1rem 0 0; font-size: var(--t-xs); color: var(--sc-ink-soft); }
.dr__kind { display: inline-block; margin-right: 0.35rem; padding: 0 0.4rem; border: 1px solid var(--line); border-radius: 4px; font-weight: 650; }
.dr__t { display: flex; flex-direction: column; margin: 0; line-height: 1.1; }
.dr__t b { font-size: 1.35rem; font-weight: 800; }
.dr__t span { display: none; }
.dr__t small { font-size: var(--t-xs); color: var(--sc-ink-soft); }
.dr__bars { display: contents; }
.dr__act { display: flex; justify-content: flex-end; }

/* One bar: 0–10 track, solid fill to the assigned grade. A penalty grade is
   hatched amber with a P label; the optimistic end of a range is never drawn. */
.db { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "k" "v" "tr"; gap: 0.2rem; }
.db__k { grid-area: k; display: none; }
.db__tr { grid-area: tr; }
.db__v { grid-area: v; }
.db__tr { height: 8px; border-radius: 4px; background: #E7E9EE; overflow: hidden; }
.db__tr i { display: block; height: 100%; background: var(--sc-ink); border-radius: 4px; }
.db--p .db__tr i { background: repeating-linear-gradient(135deg, var(--pen) 0 2px, #C9A35A 2px 4px); }
.db__v { font-size: var(--t-sm); font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.db--p .db__v { color: var(--pen); }
.db.is-sel .db__tr { background: var(--a-wash); }
.db.is-sel .db__tr i { background: var(--a); }
.db--p.is-sel .db__tr i { background: repeating-linear-gradient(135deg, var(--pen) 0 2px, #C9A35A 2px 4px); }
.pp { display: inline-block; margin-left: 0.15em; padding: 0 0.25em; border: 1px solid currentColor; border-radius: 3px; font-size: 0.7em; font-weight: 750; line-height: 1.3; color: var(--pen); text-decoration: none; cursor: help; vertical-align: 0.15em; }
.pp.tt { color: var(--a); }

/* Breakdown and evidence on demand. */
.dr__more > summary { cursor: pointer; display: flex; align-items: center; min-height: var(--hit); padding: 0 0.9rem; border-top: 1px solid var(--line); font-size: var(--t-sm); font-weight: 650; color: var(--a); }
.dr__more[open] > summary { border-bottom: 1px solid var(--line); }
.bd { list-style: none; margin: 0; padding: 0.4rem 0.9rem; }
.bd li { display: grid; grid-template-columns: 10rem 3rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.3rem 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.bd li:last-child { border-bottom: 0; }
.bd__k { font-weight: 650; }
.bd__v { font-weight: 800; font-variant-numeric: tabular-nums; }
.bd__v.is-p { color: var(--pen); }
.bd__w { color: var(--sc-ink-soft); }
.dr__ev { padding: 0 0.9rem 0.8rem; font-size: var(--t-sm); }
.dr__scope { margin-top: 0.4rem; max-width: 62rem; }
.dr__ev .whylist--of { margin-top: 0.5rem; }
.p-app .ofatt > summary { display: inline-flex; align-items: center; min-height: var(--hit); cursor: pointer; }

/* Comparison pane. */
.cmp { background: var(--sc-surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.9rem; }
.cmp h2 { font-size: 1rem; font-weight: 750; }
.cmp__empty { margin-top: 0.4rem; font-size: var(--t-sm); color: var(--sc-ink-soft); }
.cmp__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.6rem; }
.cmp__who { display: flex; flex-direction: column; padding: 0.5rem 0.6rem; border-radius: var(--r); border-left: 4px solid var(--a); background: var(--a-wash); }
.cmp__who--b { border-left-color: var(--b); background: var(--b-wash); }
.cmp__who b { font-size: var(--t-sm); font-weight: 750; line-height: 1.25; }
.cmp__rk { font-size: var(--t-xs); font-weight: 650; color: var(--sc-ink-soft); }
.cmp__tot { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.cmp__tot small { font-size: var(--t-xs); font-weight: 600; color: var(--sc-ink-soft); }
.cmp__meta { font-size: var(--t-xs); color: var(--sc-ink-soft); }
.cmp__verdict { margin-top: 0.6rem; font-size: var(--t-sm); }
.ct { width: 100%; margin-top: 0.6rem; border-collapse: collapse; font-size: var(--t-sm); }
.ct th, .ct td { text-align: left; padding: 0.4rem 0.3rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ct thead th { font-size: var(--t-xs); font-weight: 650; color: var(--sc-ink-soft); }
.ct tbody th { font-weight: 650; white-space: nowrap; }
.ct tbody th small { display: block; font-weight: 500; color: var(--sc-ink-soft); }
.ct tfoot th { font-weight: 500; font-size: var(--t-xs); color: var(--sc-ink-soft); }
.ct__w { text-align: right !important; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb { display: grid; grid-template-columns: 1rem 1fr 2.6rem; align-items: center; gap: 0.35rem; margin-bottom: 0.2rem; }
.cb__k { font-size: 0.6875rem; font-weight: 800; text-align: center; border-radius: 3px; color: #FFFFFF; line-height: 1rem; }
.cb--a .cb__k { background: var(--a); }
.cb--b .cb__k { background: var(--b); }
.cmp__ab { align-self: flex-start; font-size: 0.6875rem; font-weight: 800; padding: 0 0.35rem; border-radius: 3px; color: #FFFFFF; background: var(--a); }
.cmp__who--b .cmp__ab { background: var(--b); }
.cb__tr { height: 8px; border-radius: 4px; background: #E7E9EE; overflow: hidden; }
.cb__tr i { display: block; height: 100%; border-radius: 4px; }
.cb--a .cb__tr i { background: var(--a); }
.cb--b .cb__tr i { background: var(--b); }
.cb--p .cb__tr i { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.55) 0 2px, transparent 2px 4px); }
.cb__v { font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.cb--a .cb__v { color: var(--a); }
.cb--b .cb__v { color: var(--b); }
.cw { font-size: var(--t-xs); font-weight: 750; }
.cw--a { color: var(--a); }
.cw--b { color: var(--b); }
.cw--tie { color: var(--sc-ink-soft); }
.cy { font-size: var(--t-xs); margin-top: 0.15rem; }
.cy p { margin-top: 0.25rem; color: var(--sc-ink-soft); }
.cmp__note { margin-top: 0.5rem; font-size: var(--t-xs); color: var(--sc-ink-soft); }
.cmp__act { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.cmp__copied { font-size: 0.85rem; color: var(--muted, #555); }

.empty { margin-top: 0.5rem; padding: 1.2rem; text-align: center; background: var(--sc-surface); border: 1px dashed var(--line-strong); border-radius: var(--r); font-family: inherit; font-size: var(--t-sm); }
.empty[hidden] { display: none; }
.empty p { margin-bottom: 0.6rem; }

/* Medium widths: bars keep their own small labels so columns stay readable. */
@media (max-width: 1279px) and (min-width: 900px) {
  .dh, .dr__m { grid-template-columns: 3.2rem minmax(8rem, 1.4fr) 4.4rem repeat(5, minmax(2.9rem, 1fr)) 12.6rem; column-gap: 0.45rem; }
  .dr__more > summary { right: calc(0.9rem + 6.4rem); width: 6rem; }
  .dr__act .dbtn { width: 6rem; }
}

/* Phones: stacked rows. Rank, name and total first, then the five bars as a
   labelled grid, then the actions. */
@media (max-width: 899px) {
  .dh { display: none; }
  .dr__m { grid-template-columns: 3.2rem minmax(0, 1fr) auto; grid-template-areas: "rk id t" "bars bars bars" "act act act"; row-gap: 0.5rem; column-gap: 0.6rem; }
  .dr__rk { grid-area: rk; }
  .dr__id { grid-area: id; }
  .dr__t { grid-area: t; text-align: right; align-items: flex-end; }
  .dr__bars { grid-area: bars; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
  .db__k { display: block; font-size: 0.6875rem; font-weight: 650; color: var(--sc-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dr__act { grid-area: act; justify-content: stretch; }
  .dr__act .dbtn { width: 100%; }
  .bd li { grid-template-columns: 6.5rem 2.6rem minmax(0, 1fr); }
  /* One scrolling row of keys instead of two rows: more brokers on screen. */
  .seg { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: 0 0 auto; min-height: var(--hit); padding: 0 0.75rem; }
  .dash__head { padding-top: 0.7rem; gap: 0.4rem 0.6rem; }
  .dash__head h1 { font-size: 1.15rem; }
  .chips li { font-size: var(--t-xs); padding: 0.15rem 0.5rem; }
  .chips li:last-child { display: none; }
  .tb { position: static; }
  .tb__q { max-width: none; }
  .flow li + li { margin-left: 0; margin-top: 1.1rem; }
  .flow { flex-direction: column; }
  .flow li + li::before { left: 50%; top: -1.05rem; transform: translateX(-50%) rotate(90deg); }
  .ct thead th:nth-child(2) { width: 45%; }
}
@media (max-width: 359px) {
  .dash__head h1 { font-size: 1.15rem; }
  .dr__bars { gap: 0.35rem; }
  .bd li { grid-template-columns: 5.5rem 2.4rem minmax(0, 1fr); gap: 0.4rem; }
  .cmp { padding: 0.7rem; }
  .ct th, .ct td { padding: 0.35rem 0.15rem; }
}
/* 1280–1399: the side pane leaves the list about 830–950px, so the row grid
   narrows. Kept after the base and 900px rules so it wins the cascade. */
@media (min-width: 1280px) and (max-width: 1399px) {
  .dash__grid { grid-template-columns: minmax(0, 1fr) 22.5rem; }
  .dh, .dr__m { grid-template-columns: 3.2rem minmax(7.5rem, 1.3fr) 3.9rem repeat(5, minmax(2.7rem, 1fr)) 12.4rem; column-gap: 0.5rem; }
  .dr__more > summary { right: calc(0.9rem + 6.2rem); width: 5.8rem; }
  .dr__act .dbtn { width: 5.8rem; }
  .dh small { display: none; }
}
/* ---- Site shell (main pages): brand, three routes, country, preview tag. */
.appbar--site { flex-wrap: wrap; gap: 0.3rem 0.8rem; }
.appbar__brand { display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--hit); font-weight: 750; color: var(--sc-ink); text-decoration: none; }
.appbar__brand svg { width: 28px; height: 28px; display: block; }
.appnav { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.appnav a { display: inline-flex; align-items: center; min-height: var(--hit); padding: 0 0.7rem; border-radius: var(--r); color: var(--sc-ink); text-decoration: none; font-size: var(--t-sm); font-weight: 650; }
.appnav a:hover { background: var(--sc-canvas); }
.appnav a[aria-current="page"] { background: var(--sc-ink); color: #FFFFFF; }
.appbar--site .appbar__c { margin-left: auto; }
.appbar__c select { min-height: var(--hit); padding: 0 0.5rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--sc-surface); font: inherit; font-size: var(--t-sm); color: var(--sc-ink); }
.appbar--site .appbar__tag { margin-left: 0; }
.appftr--site { margin-top: 2rem; border-top: 1px solid var(--line); }
.appftr__l { display: flex; flex-wrap: wrap; gap: 0 1rem; margin-top: 0.3rem; }
.appftr__l a { display: inline-flex; align-items: center; min-height: var(--hit); }
.p-app .crumb a { display: inline-flex; align-items: center; min-height: var(--hit); }
a.dbtn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--sc-ink); }

/* Rows on the main ranking: the name links to the broker page; availability
   for the chosen country sits under it; equal scores are marked. */
.dr__n a { color: inherit; text-decoration: none; }
.dr__n a:hover { text-decoration: underline; }
.dr__av { margin: 0.15rem 0 0; font-size: var(--t-xs); }
/* Wide screens: the strength line stays on one line so rows stay short; the
   same reasons are listed in full under Breakdown. */
@media (min-width: 900px) {
  .dr__s, .dr__av { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Availability in a row is one quiet line: the state's dot and words, no box. */
.dr__av .chip { padding: 0; border: 0; background: none; font-size: 0.6875rem; gap: 0.3rem; }
.dr__av .chip--unavailable { color: var(--stop); }
.dr__av .chip--unavailable::before { border-color: var(--stop); }
.dr__eq { font-size: 0.625rem; font-weight: 650; color: var(--sc-ink-soft); white-space: nowrap; }
.dr__eq[hidden] { display: none; }
.ofatt__n { font-size: var(--t-xs); color: var(--sc-ink-soft); }
.cmp__more a { display: inline-flex; align-items: center; min-height: var(--hit); font-weight: 650; }
.cmp__more a[hidden] { display: none; }

/* Comparison: a third broker (C), names, equal-score and availability notes. */
.cmp__pair--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cmp__who--c { border-left-color: var(--c); background: var(--c-wash); }
.cmp__who--c .cmp__ab { background: var(--c); }
.cb--c .cb__k { background: var(--c); }
.cb--c .cb__tr i { background: var(--c); }
.cb--c .cb__v { color: var(--c); }
.cw--c { color: var(--c); }
.cmp__nm { font-size: var(--t-sm); font-weight: 750; line-height: 1.25; color: var(--sc-ink); }
.cmp__eq { font-size: var(--t-xs); color: var(--sc-ink-soft); }
.cmp__av { align-self: flex-start; margin-top: 0.3rem; font-size: 0.6875rem; }
.ct__pt { display: block; white-space: nowrap; }

/* Compare page: picker, the comparison, starting points. */
.dash--cmp .crumb { padding-top: 0.4rem; font-size: var(--t-xs); }
.dash__sub { flex-basis: 100%; margin: 0; font-size: var(--t-sm); color: var(--sc-ink-soft); }
.picker { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.75rem; margin-top: 0.4rem; }
.picker label { display: flex; flex-direction: column; gap: 0.2rem; flex: 1 1 14rem; max-width: 22rem; font-size: var(--t-xs); font-weight: 650; }
.picker label[hidden] { display: none; }
.picker select { min-height: var(--hit); padding: 0 0.5rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--sc-surface); font: inherit; font-size: var(--t-sm); color: var(--sc-ink); }
.cmp--page { max-width: 62rem; margin-top: 0.8rem; }
.dash--cmp .howto { margin-top: 1rem; max-width: 62rem; }
.cmpstart { max-width: 62rem; margin-top: 1.2rem; }
.cmpstart h2 { font-size: 1rem; font-weight: 750; }
.cmpstart ul { display: grid; gap: 0.35rem; margin: 0.4rem 0 0; padding: 0; list-style: none; }
.cmpstart li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; min-height: var(--hit); padding: 0.2rem 0.8rem; background: var(--sc-surface); border: 1px solid var(--line); border-radius: var(--r); }
.cmpstart a { font-weight: 650; }
.cmpstart span { font-size: var(--t-xs); color: var(--sc-ink-soft); }

/* Broker pages: the ranking card beside the name, the breakdown below. */
.prof__head--rank { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem); gap: 1rem 2rem; align-items: start; }
.rcard { padding: 0.9rem; background: var(--sc-surface); border: 1px solid var(--line); border-radius: var(--r); }
.rcard__pos { margin: 0; }
.rcard__pos b { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.rcard__pos span { font-size: var(--t-sm); color: var(--sc-ink-soft); }
.rcard__tot { margin: 0.1rem 0 0; }
.rcard__tot b { font-size: 1.4rem; font-weight: 800; }
.rcard__tot span { font-size: var(--t-sm); color: var(--sc-ink-soft); }
.rcard__bars .dr__bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.6rem; }
.rcard__bars .db__k { display: block; overflow: hidden; font-size: 0.6875rem; font-weight: 650; color: var(--sc-ink-soft); white-space: nowrap; text-overflow: ellipsis; }
.rcard__crit { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; margin: 0.6rem 0 0; font-size: var(--t-xs); color: var(--sc-ink-soft); }
.rcard__act { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.7rem 0 0; }
.prof__score { margin-top: 1rem; }
.prof__note { font-size: var(--t-sm); color: var(--sc-ink-soft); }
.bd--page { margin-top: 0.4rem; background: var(--sc-surface); border: 1px solid var(--line); border-radius: var(--r); }
.prof__score .dr__ev { padding: 0.4rem 0 0; }

@media (max-width: 899px) {
  .appnav__x, .appbar--site .appbar__tag { display: none; }
  .prof__head--rank { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .cmp__pair--3 { grid-template-columns: minmax(0, 1fr); }
  /* Phones: each criterion row stacks (name and weighted difference, then the
     full-width bars, then the winner), so the bars keep a readable length. */
  .ct thead { display: none; }
  .ct tbody tr, .ct tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k w" "g g" "h h"; column-gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
  .ct tfoot tr { grid-template-areas: "k w"; }
  .ct tbody th, .ct tfoot th { grid-area: k; padding: 0; border: 0; }
  .ct tbody th small { display: inline; margin-left: 0.3rem; }
  .ct tbody td { padding: 0; border: 0; }
  .ct tbody td:nth-of-type(1) { grid-area: g; padding-top: 0.3rem; }
  .ct tbody td:nth-of-type(2) { grid-area: h; }
  .ct td.ct__w { grid-area: w; }
}
@media (max-width: 520px) {
  .appbar--site { padding-top: 0.35rem; padding-bottom: 0.35rem; }
  .appbar__brand span { display: none; }
  .appnav { order: 3; width: 100%; }
  .appnav a { flex: 1 1 0; justify-content: center; padding: 0 0.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .p-app *, .p-app *::before, .p-app *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Official resources on a broker page: further reading, not evidence. */
.resources__list { margin: 0.6rem 0 0; display: grid; gap: 0.6rem; }
.resources__list dt { font-weight: 650; font-size: var(--t-xs, 0.85rem); }
.resources__list dd { margin: 0; }
.resources__list ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.resources__list a { overflow-wrap: anywhere; }
.resources__list small { color: var(--sc-ink-soft, #55585F); white-space: nowrap; }
