/* Achromatic ledger: the chrome is ink and greys, and the one hue marks pay
   at or above the 60k bar wherever pay is drawn (map, ranking, matrix,
   histogram, a company's years). Everything under the bar stays grey. */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --ground: #f2f4f7;
  --surface: #ffffff;
  --raised: #eeeeee;
  --border: #e6e6e6;
  --rule: #f0f0f0;
  --control: #d4d4d4;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --hue: #1d5fbf;
  --quiet: #8a8a8a;
  --empty: #f6f6f6;
  /* Pay shades: two greys under 60k, three steps of the hue from it. */
  --s1: #ebebeb; --s2: #d4d4d4; --s3: #b5cdf0; --s4: #6f9be0; --s5: #1d5fbf;
  --s1-ink: #0a0a0a; --s2-ink: #0a0a0a; --s3-ink: #0a0a0a; --s4-ink: #0a0a0a; --s5-ink: #ffffff;
  /* Counts are not pay, so they get no hue. */
  --c1: #e6e6e6; --c2: #c4c4c4; --c3: #9a9a9a; --c4: #666666; --c5: #2b2b2b;
  --float: 0 8px 24px rgba(0, 0, 0, .12);
  --radius-card: 8px; --radius-control: 6px;
  --gap: 12px; --pad: 24px; --control-height: 32px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #000000; --surface: #111111; --raised: #222222;
    --border: #2e2e2e; --rule: #1c1c1c; --control: #444444;
    --text: #ffffff; --muted: #b4b4b4; --hue: #79b0f7; --quiet: #6e6e6e; --empty: #161616;
    --s1: #262626; --s2: #3a3a3a; --s3: #1f4a8c; --s4: #3466c0; --s5: #79b0f7;
    --s1-ink: #ffffff; --s2-ink: #ffffff; --s3-ink: #ffffff; --s4-ink: #ffffff; --s5-ink: #000000;
    --c1: #262626; --c2: #3d3d3d; --c3: #5e5e5e; --c4: #8f8f8f; --c5: #d4d4d4;
    --float: 0 8px 24px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #000000; --surface: #111111; --raised: #222222;
  --border: #2e2e2e; --rule: #1c1c1c; --control: #444444;
  --text: #ffffff; --muted: #b4b4b4; --hue: #79b0f7; --quiet: #6e6e6e; --empty: #161616;
  --s1: #262626; --s2: #3a3a3a; --s3: #1f4a8c; --s4: #3466c0; --s5: #79b0f7;
  --s1-ink: #ffffff; --s2-ink: #ffffff; --s3-ink: #ffffff; --s4-ink: #ffffff; --s5-ink: #000000;
  --c1: #262626; --c2: #3d3d3d; --c3: #5e5e5e; --c4: #8f8f8f; --c5: #d4d4d4;
  --float: 0 8px 24px rgba(0, 0, 0, .6);
}
* { box-sizing: border-box; }
/* Rules like .more { display: block } would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 14px/20px "Geist", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--control);
    text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.num, .pay, dd, .v, .ticks, .axis, .legend, small { font-variant-numeric: tabular-nums; }

/* One centred 1088px column: the bar, the header and every card share its edges. */
.topbar-in, .head, .bento, footer { max-width: calc(1088px + 2 * var(--pad)); margin: 0 auto;
  padding-left: var(--pad); padding-right: var(--pad); }

/* Not ".bar": the map ranking draws its bars with that class and would turn sticky too. */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ground);
          border-bottom: 1px solid var(--border); }
.topbar-in { height: 48px; display: flex; align-items: center; gap: 16px; }
.brand { font-weight: 600; text-decoration: none; white-space: nowrap; }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0;
            border-radius: var(--radius-control); background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .moon { display: none; }
}

/* Segmented controls: the language switch and the map's metric. */
.seg { display: inline-flex; flex: none; padding: 2px; gap: 2px; background: var(--raised);
       border-radius: var(--radius-control); }
.seg a, .seg button { display: grid; place-items: center; height: 28px; padding: 0 10px; border: 0;
  border-radius: 4px; background: none; color: var(--muted); font-size: 12px; font-weight: 500;
  text-decoration: none; white-space: nowrap; cursor: pointer; }
.seg button { font-size: 14px; padding: 0 12px; }
.seg a:hover, .seg button:hover { color: var(--text); }
.seg a.on, .seg button[aria-pressed=true] { background: var(--surface); color: var(--text); }

/* Header: the title, where the figures come from, and the five figures for everyone. */
.head { padding-top: 32px; padding-bottom: 24px; }
h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin: 4px 0 0; font-size: 12px; line-height: 16px; color: var(--muted); }
/* Labels share one line and figures one baseline: each cell is two rows of the strip's grid. */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: auto auto;
        margin: 24px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius-card); }
.kpis div { grid-row: span 2; display: grid; grid-template-rows: subgrid; row-gap: 4px;
            padding: 16px 20px; min-width: 0; }
.kpis dd { align-self: last baseline; }
.kpis div + div { border-left: 1px solid var(--border); }
.kpis dt { font-size: 12px; line-height: 16px; color: var(--muted); }
.kpis dd { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; white-space: nowrap; }
/* The answer leads: the median base, the only figure at 30px. */
.kpis .lead dd { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; }
.kpis .money dd { font-weight: 700; }
.rule { margin: 16px 0 0; color: var(--muted); max-width: 72ch; }
.how { margin-top: 8px; }
.how summary { width: fit-content; cursor: pointer; list-style: none; font-weight: 500;
               border-radius: 4px; }
.how summary::-webkit-details-marker { display: none; }
.how summary::after { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 0 2px 8px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; }
.how[open] summary::after { transform: rotate(45deg); }
.steps { margin: 12px 0 0; padding: 20px 24px 20px 44px; display: grid; gap: 8px; max-width: 760px;
         background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
         color: var(--muted); }
.steps b { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .how summary::after { transition: none; } }

/* Cards */
.bento { display: grid; gap: var(--gap); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
        padding: var(--pad); min-width: 0; }
h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.tile > h2, .tile-head { margin-bottom: 20px; }
.tile > h2:has(+ .lede) { margin-bottom: 0; }
.lede { margin: 0 0 20px; color: var(--muted); max-width: 72ch; }
.tile-head .lede { margin: 0; }
.tile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
             flex-wrap: wrap; }
input[type=search] { -webkit-appearance: none; appearance: none; width: 256px; height: var(--control-height);
  padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control);
  background: var(--surface); outline: none; }
input[type=search]::placeholder { color: var(--muted); }
input[type=search]:focus-visible { border-color: var(--text); outline: 1px solid var(--text); outline-offset: 0; }

/* Company filters: a button per filter, each opening a list */
.filter-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px;
              margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0; }
.filter { position: relative; }
.pick { height: var(--control-height); padding: 0 30px 0 12px; border: 1px solid var(--control);
        border-radius: var(--radius-control); background: var(--surface); cursor: pointer;
        white-space: nowrap; position: relative; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pick::after { content: ""; position: absolute; right: 13px; top: 50%; width: 5px; height: 5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg); }
.pick:hover { border-color: var(--muted); }
.pick .lab { color: var(--muted); }
/* A filter that is set: ink edge and a filled step, no colour. */
.filter.on .pick { border-color: var(--text); background: var(--raised); font-weight: 500; }
.menu { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; min-width: 220px;
        max-width: calc(100vw - 32px); max-height: 340px; overflow-y: auto; margin: 0; padding: 4px;
        list-style: none; background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius-card); box-shadow: var(--float); }
.menu li { padding: 6px 12px 6px 32px; min-height: 32px; display: flex; align-items: center;
           border-radius: 4px; cursor: pointer; position: relative; white-space: nowrap; }
.menu li:hover, .menu li:focus-visible { background: var(--raised); outline: none; }
/* Checks are drawn, not typed: a glyph renders differently on every system. */
.menu li.sel:not(.check)::before { content: ""; position: absolute; left: 13px; top: 50%; width: 4px; height: 8px;
  border: solid var(--text); border-width: 0 1.5px 1.5px 0; transform: translateY(-60%) rotate(45deg); }
.menu li.check::before { content: ""; position: absolute; left: 10px; top: 50%; width: 14px; height: 14px;
  margin-top: -7px; border: 1px solid var(--control); border-radius: 3px; }
.menu li.check.sel::before { background: var(--text); border-color: var(--text); }
.menu li.check.sel::after { content: ""; position: absolute; left: 15px; top: 50%; width: 3px; height: 7px;
  border: solid var(--surface); border-width: 0 1.5px 1.5px 0; transform: translateY(-65%) rotate(45deg); }
.menu small { color: var(--muted); font-size: 12px; margin-left: 8px; }
.menu.tree { min-width: min(320px, calc(100vw - 24px)); }
.tree li { gap: 4px; padding-right: 6px; }
.tree li > span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tree li.spec { padding-left: 48px; }
.tree li.spec.sel::before { left: 29px; }
.twist { flex: none; border: 0; background: none; width: 24px; height: 24px; margin: -4px 0 -4px 4px;
         border-radius: 4px; color: var(--muted); font-size: 16px; cursor: pointer; transition: transform .15s; }
.twist:hover { background: var(--control); color: var(--text); }
.twist.open { transform: rotate(90deg); }
.menu.span { width: 320px; padding: 16px 20px 12px; }
.span-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.span-head b { font-weight: 600; }
.link { border: 0; background: none; padding: 0; font-size: 12px; cursor: pointer;
        text-decoration: underline; text-decoration-color: var(--control); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.dual { position: relative; height: 24px; }
.dual .rail { position: absolute; left: 9px; right: 9px; top: 11px; height: 2px; background: var(--raised); }
.dual .rail i { position: absolute; top: 0; bottom: 0; background: var(--text); }
.dual input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none;
              -webkit-appearance: none; appearance: none; }
.dual input::-webkit-slider-runnable-track { background: none; height: 24px; }
.dual input::-moz-range-track { background: none; }
.dual input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px;
  margin-top: 3px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--text); cursor: grab; }
.dual input::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--text); cursor: grab; }
.dual input:focus { outline: none; }
.dual input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text); outline-offset: 2px; }
.ticks { display: flex; justify-content: space-between; margin: 6px 9px 0; font-size: 12px; color: var(--muted); }
.ticks span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.menu li.any { color: var(--muted); }

/* Map: the ranking beside it carries the figures. */
.map-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px;
            align-items: start; }
#map { width: 100%; height: auto; display: block; }
#map .region { fill: var(--empty); stroke: var(--surface); stroke-width: 1.2; stroke-linejoin: round;
               transition: fill .35s; }
#map .region.has:hover { stroke: var(--text); }
/* A region with too few salaries keeps its outline, so Spain stays whole. */
#map .region:not(.has) { stroke: var(--control); stroke-width: .8; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

/* Every region in full: an inner scroll hid the last four, with no scrollbar on a Mac. */
.ranking { list-style: none; margin: 0; padding: 0; }
.ranking li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 6px 0; }
.ranking li:hover { color: var(--text); }
.ranking .v { font-weight: 700; text-align: right; }
.ranking .bar { grid-column: 1 / -1; height: 3px; background: var(--rule); }
.ranking .bar i { display: block; height: 100%; background: var(--quiet); }
.ranking li.hi .bar i { background: var(--hue); }
.ranking .n { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* Role x experience matrix */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.matrix th, .matrix td { border: 0; }
.matrix thead th:first-child { width: 220px; }
.matrix thead th { font-size: 12px; font-weight: 400; color: var(--muted); text-align: center; padding: 0 0 6px; }
.matrix tbody th { text-align: left; font-weight: 500; padding: 0 12px 0 0; white-space: nowrap;
                   position: sticky; left: 0; z-index: 1; background: var(--surface); }
.matrix tbody th small { display: block; font-weight: 400; font-size: 12px; line-height: 16px; color: var(--muted); }
.matrix td { padding: 0; height: 44px; }
.matrix td.na { text-align: center; color: var(--muted); background: var(--empty); border-radius: 4px; }
.matrix button { width: 100%; height: 100%; border: 0; border-radius: 4px; cursor: pointer;
                 font-weight: 500; font-variant-numeric: tabular-nums; }
.matrix button:hover { outline: 2px solid var(--text); outline-offset: -2px; }
.s1 { background: var(--s1); color: var(--s1-ink); }
.s2 { background: var(--s2); color: var(--s2-ink); }
.s3 { background: var(--s3); color: var(--s3-ink); }
.s4 { background: var(--s4); color: var(--s4-ink); }
.s5 { background: var(--s5); color: var(--s5-ink); }
.legend i.na { background: var(--empty); border: 1px solid var(--border); }

/* Summary of the table's filters */
.summary { display: grid; grid-template-columns: repeat(4, auto) minmax(180px, 1fr); gap: 16px 32px;
           align-items: end; padding: 16px 20px; margin-bottom: 8px; background: var(--ground);
           border-radius: var(--radius-card); }
.summary dl { margin: 0; display: flex; flex-direction: column-reverse; gap: 2px; }
.summary dt { font-size: 12px; line-height: 16px; color: var(--muted); }
.summary dd { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; white-space: nowrap; }
.summary dl:first-child dd { font-weight: 700; }
.summary .empty { grid-column: 1 / -1; padding: 8px 0; }
.dist .bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 44px; }
.dist .col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.dist .bars i { flex: 1; background: var(--quiet); }
.dist .bars:hover i { opacity: .45; }
.dist .bars .col:hover i { opacity: 1; }
.dist .bars i.hi { background: var(--hue); }
.dist .bars i.wh { background: none; border: 1px dashed var(--quiet); border-bottom: 0; }
/* The 60k bar, where the hue starts. */
.dist .ref { position: absolute; top: -4px; bottom: 0; border-left: 1px dashed var(--text); pointer-events: none; }
.dist .axis { position: relative; display: flex; justify-content: space-between; margin-top: 4px;
              font-size: 12px; line-height: 16px; color: var(--muted); }
.dist .axis span:nth-child(2) { position: absolute; transform: translateX(-50%); color: var(--text); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 12px 12px 8px;
     border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.num, .pay { text-align: right; white-space: nowrap; }
td.co .name { font-weight: 500; }
td.co .co-in { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.links { display: grid; grid-template-columns: repeat(3, 16px); gap: 12px; flex: none; }
.links a { display: block; width: 16px; height: 16px; color: var(--muted); }
.links a:hover { color: var(--text); }
.links svg { display: block; width: 16px; height: 16px; }
/* On a desktop the row carries the links; the open row repeats them for phones. */
.detail .links { display: none; }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover, th.sort.on { color: var(--text); }
/* The arrow sits before the label, so a right-aligned heading stays flush with its figures. */
th.sort.on::before { content: "↓"; display: inline-block; margin-right: 4px; }
th.sort.on.asc::before { content: "↑"; }
/* The name takes about half the row and the figures sit together on the right,
   so the middle of a row, where people click to open it, is never a link logo. */
@media (min-width: 641px) {
  #companies th.pay, #companies td.pay { width: 22%; }
  #companies th.num, #companies td.num { width: 15%; }
}
td.co .cities { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
tr.main { cursor: pointer; }
tr.main:hover td, tr.main:focus-visible td { background: var(--ground); }
tr.main:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.chev { width: 24px; padding-right: 0; color: var(--muted); }
.chev span { display: inline-block; transition: transform .15s; }
tr.open .chev span { transform: rotate(90deg); }
tr.open td { border-bottom-color: transparent; background: var(--ground); }
td.pay b { font-weight: 700; }
tr.det td { background: var(--ground); padding: 8px 12px 24px 48px; }
.detail { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: end; }
.ybars { display: grid; grid-template-columns: repeat(6, minmax(44px, 64px)); gap: 8px; align-items: end; }
.yb { display: grid; gap: 4px; justify-items: center; font-size: 12px; color: var(--muted); }
.yb b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.yb i { display: block; width: 100%; background: var(--quiet); }
.yb i.hi { background: var(--hue); }
.yb.on span:last-child { color: var(--text); font-weight: 600; }
.yb i.none { height: 2px; background: var(--control); }
.yb .na { color: var(--muted); }
.split { display: grid; gap: 8px; width: 280px; max-width: 100%; }
.split dl { margin: 0; display: grid; gap: 2px; }
.split dt { font-size: 12px; color: var(--muted); }
.split dd { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; }
.mix { display: flex; gap: 2px; height: 8px; }
.mix i { display: block; background: var(--c); }
.b0 { --c: var(--text); } .b1 { --c: var(--quiet); } .b2 { --c: var(--control); }
.mix-key { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.mix-key li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--c); }
.mix-key b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.mix-key .nil { opacity: .5; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }
.more { display: block; margin: 16px auto 0; height: var(--control-height); padding: 0 14px;
        border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface);
        font-weight: 500; cursor: pointer; }
.more:hover { border-color: var(--text); }

footer { padding-top: 32px; padding-bottom: 48px; color: var(--muted); font-size: 12px; line-height: 18px; }
footer p { margin: 4px 0; }

/* Star prompt: it floats, so it is the one card with a shadow. */
.star-pop { position: fixed; z-index: 25; width: 320px; max-width: calc(100vw - 32px);
            right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
            padding: 16px 20px; border-radius: var(--radius-card); background: var(--surface); color: var(--text);
            border: 1px solid var(--border); box-shadow: var(--float); animation: star-in .25s ease-out; }
@keyframes star-in { from { opacity: 0; transform: translateY(12px); } }
.star-title { margin: 0 24px 4px 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.star-text { margin: 0 0 12px; color: var(--muted); }
.star-btn { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto;
            border: 1px solid var(--control); border-radius: var(--radius-control); color: var(--text); }
.star-btn:hover { border-color: var(--text); background: var(--raised); }
.star-btn svg { width: 24px; height: 24px; }
.star-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 4px;
          background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.star-x:hover { background: var(--raised); color: var(--text); }
@media (prefers-reduced-motion: reduce) { .star-pop { animation: none; } }

#tip { position: fixed; z-index: 30; pointer-events: none; font-size: 12px; line-height: 18px;
       padding: 8px 10px; border-radius: var(--radius-control); max-width: 260px;
       background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--float); }
#tip b { font-weight: 600; }
#tip .t-sub { color: var(--muted); }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .lead { grid-column: 1 / -1; }
  .kpis div + div { border-left: 0; }
  .kpis div:not(.lead) { border-top: 1px solid var(--border); }
  .kpis div:nth-child(odd):not(.lead) { border-left: 1px solid var(--border); }
  .summary { grid-template-columns: repeat(4, 1fr); }
  .dist { grid-column: 1 / -1; }
  .map-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  :root { --pad: 16px; }
  /* One row, so the sticky bar takes 48px of a phone's screen, not 90. */
  .topbar-in { gap: 8px; padding-right: 8px; }
  .brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar-end { gap: 2px; flex: none; }
  .head { padding-top: 24px; }
  h1 { font-size: 20px; line-height: 28px; }
  .kpis div { padding: 12px 16px; }
  .kpis .lead dd { font-size: 28px; line-height: 34px; }
  /* The companies table fits a phone: the links move into the open row and
     headings wrap, so the median and the 60k+ share stay on screen. */
  td.co .co-in > .links { display: none; }
  .detail .links { display: grid; }
  #companies th { white-space: normal; line-height: 16px; padding: 8px 6px; }
  #companies td { padding: 12px 6px; }
  #companies td.chev, #companies th.chev { width: 12px; padding-left: 0; padding-right: 0; }
  .tile { padding: 20px 16px; }
  input[type=search] { width: 100%; }
  tr.det td { padding-left: 6px; }
  .ybars { grid-template-columns: repeat(6, 1fr); width: 100%; }
  .hide-sm { display: none; }
  .summary { grid-template-columns: 1fr 1fr; }
  .filter-row { flex-wrap: wrap; }
  .star-pop { width: auto; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
  .matrix { min-width: 560px; }
  .matrix thead th:first-child { width: 112px; }
  .matrix tbody th { white-space: normal; min-width: 104px; max-width: 120px; font-size: 12px; line-height: 16px; }
}
@media (max-width: 400px) {
  /* The footer and the star prompt link to GitHub too. */
  .topbar-end > a.icon-btn { display: none; }
}
