/* One stylesheet for both sites; only the accent colour differs. */

:root {
  --accent: #023759;
  --gold: #fdb704;
  --fg: #131a22;
  --muted: #5b6672;
  --bg: #ffffff;
  --soft: #f3f4f2;
  --line: #d9dcd7;
  --max: 70rem;
  --read: 46rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23fdb704' d='M10 1.5l2.6 5.6 6.1.7-4.5 4.2 1.2 6L10 15l-5.4 3 1.2-6L1.3 7.8l6.1-.7z'/%3E%3C/svg%3E");
  --star-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23cfd3cf' d='M10 1.5l2.6 5.6 6.1.7-4.5 4.2 1.2 6L10 15l-5.4 3 1.2-6L1.3 7.8l6.1-.7z'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; font: 1.0625rem/1.6 var(--sans); color: var(--fg); background: var(--bg); overflow-wrap: break-word; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--accent); text-decoration-thickness: .07em; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 10; padding: .5rem 1rem; background: var(--fg); color: #fff; }
.skip:focus { left: 0; }

/* Header */
header.site { background: var(--bg); border-bottom: 2px solid var(--fg); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-top: .8rem; padding-bottom: .8rem; }
header.site a { color: var(--fg); text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -.015em; }
.brand img { width: auto; height: 2.3rem; }
header.site ul { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0; padding: 0; list-style: none; font-size: .95rem; font-weight: 500; }
header.site li a { display: block; padding: .2rem 0; border-bottom: 2px solid transparent; }
header.site li a:hover { border-bottom-color: var(--line); }
header.site li a[aria-current] { border-bottom-color: var(--gold); }

/* Type */
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
h1 { max-width: 16em; margin: .4rem 0 1.1rem; font-size: clamp(2.2rem, 5.4vw, 3.9rem); font-weight: 800; line-height: 1.04; overflow-wrap: break-word; }
h1 em { font-style: normal; color: var(--accent); }
h2 { margin: 3.5rem 0 .5rem; padding-top: 1.1rem; border-top: 2px solid var(--fg); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
h3 { margin: 2rem 0 .5rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p, ul, ol, dl { margin: .5rem 0 1rem; }
small, .muted { color: var(--muted); font-size: .93rem; }

/* Head band: breadcrumbs, H1, dateline, opening lines */
.hero .wrap { display: flex; flex-direction: column; padding-top: 2.75rem; padding-bottom: 1.5rem; }
.hero .wrap > p, .hero .wrap > .note { max-width: 48rem; }
.hero p { margin: .4rem 0; }
.crumbs { order: -2; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .75rem; padding: 0; list-style: none; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .35rem; }
.dateline { order: -1; margin: 0; font-size: .95rem; color: var(--muted); }
.dateline strong { color: var(--fg); }
.standfirst { font-size: 1.15rem; }
.answer { max-width: 44rem; margin: .75rem 0 0; font-size: 1.25rem; line-height: 1.5; }
.answer p { margin: .5rem 0; }
.answer p + p { font-size: .95rem; color: var(--muted); }
.hero .lead { font-size: 1.15rem; }

main > .body { padding-bottom: 4rem; }
.body > p, .body > ul, .body > ol, .body > h3 { max-width: var(--read); }
.body > h2 + p { margin-top: 0; color: var(--muted); }
.note { max-width: var(--read); margin: 1rem 0; padding: .7rem 1rem; background: var(--soft); }
.columns { columns: 14rem; column-gap: 2rem; }
.columns li { break-inside: avoid; }

/* Figures in a row */
ul.strip { display: grid; grid-template-columns: repeat(4, 1fr); max-width: none; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip li { padding: 1.1rem 1.5rem 1.1rem 0; font-size: .88rem; color: var(--muted); }
.strip li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.strip strong { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; color: var(--fg); font-variant-numeric: tabular-nums; }

/* Logos: the box takes the logo's own shape; square marks stand taller, wide wordmarks run longer */
.logo { --h: 3rem; --f: 1; --r: 1; --bg: #fff; display: block; flex: none; height: calc(var(--h) * var(--f)); width: min(100%, calc(var(--h) * var(--f) * var(--r))); padding: calc(var(--h) * .1); background: var(--bg); }
.logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo.plain { padding: 0; background: transparent; }
.logo.mono { display: grid; place-items: center; background: var(--soft); color: var(--accent); font-weight: 800; font-size: calc(var(--h) * .38); }
.logo.mono::before { content: attr(data-i); }

/* Stars and score bars (the figures are always written beside them) */
.stars { position: relative; display: inline-block; flex: none; width: 5.5em; height: 1.1em; vertical-align: -.15em; background: var(--star-off) 0 0 / 1.1em 1.1em repeat-x; }
.stars i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--star) 0 0 / 1.1em 1.1em repeat-x; }
.meter { display: block; height: .3rem; background: var(--soft); }
.meter i { display: block; height: 100%; background: var(--accent); }

/* Buttons */
.btn { display: inline-block; padding: .7rem 1.3rem; border: 1px solid var(--fg); background: var(--bg); color: var(--fg); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.primary:hover { border-color: var(--fg); background: var(--fg); }

/* The No. 1 card */
.top1 { margin-top: 2.5rem; border: 1px solid var(--fg); }
.top1 .bar { margin: 0; padding: .65rem 2rem; background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem; }
.top1 .card-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2.5rem; align-items: center; padding: 2rem; }
.top1 .logo { --h: 9.5rem; }
.top1 h2 { margin: 0; padding: 0; border: 0; font-size: 1.9rem; }
.place { margin: .2rem 0 .6rem; color: var(--muted); }
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .5rem 0; font-size: .95rem; color: var(--muted); }
.rating .stars { font-size: 1.25em; }
.rating strong { color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.chips li { font-size: .95rem; font-weight: 500; }
.chips li::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin: 0 .55rem .12rem 0; background: var(--gold); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.4rem 0 0; }
.scorebox { margin: 0; padding-left: 2rem; border-left: 1px solid var(--line); text-align: center; }
.scorebox strong { display: block; font-size: 4rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--accent); }
.scorebox span { display: block; margin-top: .2rem; font-size: .85rem; color: var(--muted); }

/* The next three */
ol.podium { display: grid; grid-template-columns: repeat(3, 1fr); max-width: none; margin: 1.5rem 0 0; padding: 0; list-style: none; border: 1px solid var(--line); }
.podium li { display: flex; flex-direction: column; padding: 1.5rem; }
.podium li + li { border-left: 1px solid var(--line); }
.podium .pos { font-weight: 600; font-size: .95rem; color: var(--muted); }
.podium .logo { --h: 5rem; margin: 1.25rem 0; }
.podium .name { font-weight: 800; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.02em; color: var(--fg); text-decoration: none; }
.podium .name:hover { text-decoration: underline; }
.podium .place { display: block; margin: .15rem 0 1rem; font-size: .92rem; }
.podium .nums { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.podium .nums strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); }

/* Featured facts and other boxed sections */
.featured { margin-top: 3.5rem; padding: .5rem 2rem 1.5rem; border: 1px solid var(--line); }
.featured h2 { margin-top: 1.75rem; padding-top: 0; border-top: 0; }
.featured-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.featured-head .logo { --h: 4rem; margin-top: 1.25rem; }
dl div { display: grid; grid-template-columns: 11rem 1fr; gap: .25rem 1.5rem; padding: .8rem 0; border-top: 1px solid var(--line); }
dt { padding-top: .3rem; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
dd { margin: 0; }
dl.glance { max-width: 54rem; margin: 1rem 0 .5rem; border-bottom: 1px solid var(--line); }
dl.glance div { grid-template-columns: 13rem 1fr; padding: .55rem 0; }
dl.glance dt { padding-top: .2rem; }

/* Tables: wide ones scroll inside their frame */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; border: 1px solid var(--line); background: var(--bg); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { caption-side: bottom; padding: .9rem 1.25rem; border-top: 1px solid var(--line); text-align: left; font-size: .85rem; color: var(--muted); }
th, td { padding: .75rem 1.25rem; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { border-top: 0; border-bottom: 2px solid var(--fg); font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
tbody tr:hover { background: var(--soft); }
tbody th { font-weight: 650; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.date { white-space: nowrap; color: var(--muted); font-size: .88rem; }
td.go { white-space: nowrap; }
table.rank tbody th a { color: var(--fg); text-decoration: none; }
table.rank tbody th a:hover { text-decoration: underline; }
td.num a { font-weight: 700; }
.co { display: flex; align-items: center; gap: .9rem; }
.slot { display: flex; flex: none; justify-content: center; width: 6.5rem; }
.co .logo { --h: 2.8rem; }
.nm { display: flex; flex-direction: column; line-height: 1.35; }
.nm small { font-weight: 400; font-size: .85rem; }
.nm .own { margin-top: .15rem; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.nm .why { margin-top: .1rem; font-size: .8rem; color: var(--muted); }
.medal { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; font-weight: 700; font-size: .9rem; }
table.rank tbody tr:nth-child(1) .medal { background: var(--gold); color: #201600; }
table.rank tbody tr:nth-child(2) .medal, table.rank tbody tr:nth-child(3) .medal { background: var(--soft); }
td.score strong { display: block; font-size: 1.05rem; }
td.score .meter { width: 5rem; margin: .3rem 0 0 auto; }
td .stars { margin-right: .4rem; font-size: .9rem; }
td .btn { padding: .4rem .9rem; border-color: var(--line); font-size: .85rem; }
.t247 { font-weight: 600; font-size: .88rem; }

/* Table filters (built by /filter.js; hidden without it) */
.filter[hidden], tbody tr[hidden] { display: none; }
.filter { margin: 1rem 0 -.5rem; }
.filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.filter .btn { padding: .45rem .9rem; border-color: var(--line); font-size: .9rem; }
.filter .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.filter label { font-size: .9rem; font-weight: 600; }
.filter select { padding: .4rem .5rem; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: .9rem; }
.filter-count { margin: .6rem 0 0; font-size: .88rem; color: var(--muted); }
.onpage { font-size: .95rem; }

/* Company cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--line); }
.card header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.card .logo { --h: 3.4rem; }
.card h3 { margin: .1rem 0 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.015em; }
.card .rk { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.card .profile { margin: 0 0 1rem; font-size: .95rem; }
.card .more { margin: auto 0 0; padding-top: 1rem; font-size: .88rem; color: var(--muted); }

/* Company page head */
.ident { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem 2.5rem; align-items: center; margin-top: .5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ident .logo { --h: 6rem; }
.ident .chips { margin-top: .6rem; }
.ident .actions { margin-top: 1rem; }

/* Two-column sections: the heading on the left, the content on the right */
.split { display: grid; gap: 1.5rem 4rem; margin-top: 3.5rem; padding-top: 1.1rem; border-top: 2px solid var(--fg); }
.split > div { min-width: 0; }
.split > div:first-child h2 { margin: 0; padding: 0; border: 0; }
.split > div:first-child p { max-width: 22rem; margin: .6rem 0 0; font-size: .95rem; color: var(--muted); }
.split > div:last-child > p, .split > div:last-child > ul, .split > div:last-child > ol { max-width: var(--read); }
.split > div:last-child > :first-child { margin-top: 0; }
.split h3 { margin-top: 1.5rem; }

/* Folding questions and rules */
.q { border-top: 1px solid var(--line); }
.q:last-child { border-bottom: 1px solid var(--line); }
.q > summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.05rem 0; cursor: pointer; list-style: none; }
.q > summary::-webkit-details-marker { display: none; }
.q > summary h3 { margin: 0; font-size: 1.06rem; font-weight: 600; line-height: 1.35; }
.q > summary::after { content: "+"; flex: none; font-size: 1.5rem; font-weight: 300; line-height: 1; color: var(--accent); transition: transform .15s; }
.q[open] > summary::after { transform: rotate(45deg); }
.q > summary:hover h3 { color: var(--accent); }
.q > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.q > div { max-width: 42rem; margin: 0 0 1.15rem; }
.q > div p { margin: 0 0 .8rem; }

/* How we rank */
.weights { margin: 0 0 1.75rem; padding: 0; list-style: none; }
.weights li { display: grid; grid-template-columns: 1fr 3.2rem; gap: .15rem 1rem; align-items: baseline; padding: .7rem 0; border-top: 1px solid var(--line); }
.weights li:first-child { padding-top: 0; border-top: 0; }
.weights strong { font-weight: 600; }
.weights .pc { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.weights small { grid-column: 1 / -1; font-size: .9rem; }
.weights .meter { grid-column: 1 / -1; height: 6px; margin-top: .35rem; }
.rules3 { display: grid; gap: 0; margin: 0 0 1.5rem; padding: 0; list-style: none; border-top: 2px solid var(--fg); }
.rules3 li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.rules3 h3 { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rules3 p { margin: 0; font-size: .97rem; }
.facts3 { margin: 0; padding: 0; list-style: none; }
.facts3 li { padding: .85rem 0; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.facts3 li:first-child { padding-top: 0; border-top: 0; }
.facts3 strong { display: block; font-size: 1.0625rem; font-weight: 600; color: var(--fg); }

/* Terms and privacy */
.page-legal h1 { font-size: 2.4rem; }
.page-legal .body h2 { margin-top: 2.25rem; font-size: 1.3rem; }
.page-legal .body p, .page-legal .body ul { max-width: 44rem; }
.page-legal .body > h2 + p { color: var(--fg); }

/* Footer */
footer.site { padding: 2.5rem 0 3rem; border-top: 2px solid var(--fg); background: var(--soft); color: var(--muted); font-size: .9rem; }
footer.site p { max-width: var(--read); margin: .5rem 0; }
footer.site a { color: var(--fg); }

@media (min-width: 44rem) {
  .rules3 { grid-template-columns: repeat(3, 1fr); }
  .rules3 li { padding: 1rem 1.25rem; border-bottom: 0; border-left: 1px solid var(--line); }
  .rules3 li:first-child { padding-left: 0; border-left: 0; }
}
@media (min-width: 60rem) {
  .split { grid-template-columns: 17rem minmax(0, 1fr); }
}
@media (max-width: 56rem) {
  ol.podium, .cards { grid-template-columns: 1fr; }
  .podium li + li { border-left: 0; border-top: 1px solid var(--line); }
  ul.strip { grid-template-columns: repeat(2, 1fr); }
  .strip li, .strip li + li { padding: 1rem 1rem 1rem 0; }
  .strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .strip li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .strip li:nth-child(even) { padding-left: 1rem; }
  .top1 .card-body { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem; }
  .top1 .bar { padding: .7rem 1.25rem; }
  .top1 .logo { --h: 7.5rem; }
  .scorebox, .ident .scorebox { padding: 1rem 0 0; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .ident { grid-template-columns: auto minmax(0, 1fr); }
  .ident .scorebox { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .wrap { padding: 0 1rem; }
  body { font-size: 1rem; }
  .hero .wrap { padding-top: 1.75rem; }
  header.site ul { gap: .25rem 1rem; font-size: .9rem; }
  dl div, dl.glance div { grid-template-columns: 1fr; gap: 0; }
  .featured { padding: .25rem 1.1rem 1rem; }
  th, td { padding: .6rem .7rem; }
  .slot { width: 4.6rem; }
  .co .logo { --h: 1.9rem; }
  .strip strong { font-size: 1.5rem; }
  .ident { grid-template-columns: 1fr; }
  .ident .logo { --h: 4.5rem; }
  .featured-head .logo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  header.site nav, .skip { display: none; }
}
