/* Layout: a reference index. A dark ink masthead with the wordmark; one narrow measure for prose;
   full-width tables with a quiet rule system and the partner column pinned on narrow screens;
   numbers in a tabular mono; one cobalt accent for links, gold for Validated Practice. */
/* Palette (Nic, 21 Oct 2026): slate #2F4858, blue #336699, light blue #86BBD8, green #9EE493, mint #DAF7DC.
   Type: Inter for everything, Google Sans Code for numbers and labels (as coolors.co). */
:root {
  --bg: #fafcfc; --bg-2: #eef5f9; --fg: #1d2e3a; --fg-2: #4f6372; --rule: #d7e3ea; --head: #2F4858; --head-fg: #f3f8fa;
  --accent: #336699; --accent-ink: #ffffff; --blue-2: #86BBD8; --green: #9EE493; --mint: #DAF7DC;
  --vp: #1f4a2b; --vp-bg: #9EE493; --pla: #2a5a36; --pla-bg: #DAF7DC; --none: #9aa8b3; --slot-bg: #eef5f9; --card: #ffffff;
  --t1: #c9d6de; --t2: #86BBD8; --t3: #336699; --t4: #2F4858; --t5: #14212a;
  --tile-1: #86BBD8; --tile-1-fg: #1d2e3a; --tile-2: #2F4858; --tile-2-fg: #f3f8fa; --tile-3: #9EE493; --tile-3-fg: #1d2e3a; --tile-4: #DAF7DC; --tile-4-fg: #1d2e3a;
  --display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: "Google Sans Code", "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  /* type scale: every size on the site is one of these steps */
  --fs-label: .72rem;   /* mono labels: eyebrows, table headers, tile and stat captions, pills */
  --fs-small: .85rem;   /* notes, helper text, numeric cells, captions, footer */
  --fs-table: .93rem;   /* table cells, navigation, compact lists */
  --fs-body: 1rem;
  --fs-lede: 1.12rem;
  --fs-h3: 1.05rem;
  --fs-h2: 1.3rem;
  --fs-stat: 1.6rem;    /* numbers in fact tiles and the ecosystem index */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --t1: #3d5261; --t2: #336699; --t3: #86BBD8; --t4: #c4dcea; --t5: #ffffff;
  --bg: #16232b; --bg-2: #1f3038; --fg: #e9f0f3; --fg-2: #a9bcc7; --rule: #2f4350; --head: #0f1a21; --head-fg: #e9f0f3;
  --accent: #86BBD8; --accent-ink: #16232b; --blue-2: #336699;
  --vp: #0f2a17; --vp-bg: #9EE493; --pla: #DAF7DC; --pla-bg: #244a31; --none: #6b7d89; --slot-bg: #1f3038; --card: #1b2b34;
  --tile-1: #336699; --tile-1-fg: #f3f8fa; --tile-2: #2F4858; --tile-2-fg: #f3f8fa; --tile-3: #3f7a4a; --tile-3-fg: #f3f8fa; --tile-4: #2a4a3a; --tile-4-fg: #e9f0f3;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --t1: #3d5261; --t2: #336699; --t3: #86BBD8; --t4: #c4dcea; --t5: #ffffff;
  --bg: #16232b; --bg-2: #1f3038; --fg: #e9f0f3; --fg-2: #a9bcc7; --rule: #2f4350; --head: #0f1a21; --head-fg: #e9f0f3;
  --accent: #86BBD8; --accent-ink: #16232b; --blue-2: #336699;
  --vp: #0f2a17; --vp-bg: #9EE493; --pla: #DAF7DC; --pla-bg: #244a31; --none: #6b7d89; --slot-bg: #1f3038; --card: #1b2b34;
  --tile-1: #336699; --tile-1-fg: #f3f8fa; --tile-2: #2F4858; --tile-2-fg: #f3f8fa; --tile-3: #3f7a4a; --tile-3-fg: #f3f8fa; --tile-4: #2a4a3a; --tile-4-fg: #e9f0f3;
  color-scheme: dark; }

* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); line-height: 1.5; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); font-weight: 700; margin-top: 2.5rem; margin-bottom: .6rem; }
h3 { font-size: var(--fs-h3); font-weight: 700; margin-top: 1.5rem; margin-bottom: .4rem; }
p { margin: 0 0 1rem; max-width: 68ch; }

/* masthead */
.site-head { background: var(--head); color: var(--head-fg); }
.head-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--head-fg); text-decoration: none; }
.brand .mark { color: var(--green); flex: none; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.wordmark b { font-weight: 400; color: var(--green); }
.brand .tag { font-size: var(--fs-small); opacity: .75; margin-left: .4rem; }
nav.main { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: var(--fs-table); }
nav.main a { color: var(--head-fg); text-decoration: none; opacity: .9; }
nav.main a:hover { text-decoration: underline; opacity: 1; }
@media (max-width: 700px) { .brand .tag { display: none; } }

main { padding-block: 1.75rem 3rem; }
.eyebrow { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.asof { font-family: var(--mono); font-size: var(--fs-small); color: var(--fg-2); margin: .5rem 0 1.25rem; }
.asof b { color: var(--fg); font-weight: 500; white-space: nowrap; }
p.asof { max-width: none; }
.lede { font-size: var(--fs-lede); max-width: 70ch; }

/* facts row */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.fact { padding: .75rem .9rem; border-radius: 10px; background: var(--tile-4); color: var(--tile-4-fg); }
.fact:nth-child(4n+1) { background: var(--tile-1); color: var(--tile-1-fg); }
.fact:nth-child(4n+2) { background: var(--tile-2); color: var(--tile-2-fg); }
.fact:nth-child(4n+3) { background: var(--tile-3); color: var(--tile-3-fg); }
.fact .k { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.fact .v { font-family: var(--display); font-size: var(--fs-stat); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: .15rem; }
.fact .v small { font-family: var(--body); font-size: var(--fs-small); font-weight: 400; opacity: .85; }
.fact .s { font-size: var(--fs-small); opacity: .85; }

/* tables */
.tablewrap { overflow-x: auto; margin: .75rem 0 1rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-table); }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; background: var(--bg); }
th { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
td.num { font-size: var(--fs-small); }
th.num { font-size: var(--fs-label); }
td.pos { font-family: var(--display); font-weight: 700; font-size: var(--fs-h3); width: 2.5rem; }
td.pos { color: var(--accent); }
/* pinned partner column: the second column in ranked tables, the first in plain lists */
@media (max-width: 1100px) {
table.pin th:nth-child(2), table.pin td:nth-child(2), table.pin-first th:first-child, table.pin-first td:first-child {
  position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--rule); } }

.nowrap { white-space: nowrap; }
/* fixed column widths (set per table with a colgroup) so tables in one card line up and rows keep their proportions */
table.fixed { table-layout: fixed; }
table.fixed td { overflow-wrap: break-word; }
@media (min-width: 641px) { table.fixed.wide { min-width: 1000px; } }
@media (max-width: 640px) { table.fixed { table-layout: auto; } table.fixed td { overflow-wrap: normal; } }
table.pin td:nth-child(2), table.pin-first td:first-child { background: var(--bg); }

.pill { display: inline-block; font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .03em; padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; }
.pill.vp { background: var(--vp-bg); color: var(--vp); } .pill.pla { background: var(--pla-bg); color: var(--pla); } .pill.none { color: var(--none); border: 1px solid var(--rule); }
.pill.tier { border: 1px solid var(--rule); color: var(--fg); }
.mv { font-family: var(--mono); font-size: var(--fs-small); } .mv.up { color: var(--pla); } .mv.down { color: #b4432a; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* badges */
.badges { display: flex; flex-wrap: wrap; gap: .75rem; margin: .5rem 0; }
.badge { width: 96px; margin: 0; text-align: center; font-size: var(--fs-label); line-height: 1.25; color: var(--fg-2); }
.badge img { width: 88px; height: 88px; display: block; margin: 0 auto .25rem; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem 2rem; }
.cols > * { min-width: 0; }
ul.plain { list-style: none; padding: 0; margin: 0 0 1rem; } ul.plain li { padding: .2rem 0; border-bottom: 1px solid var(--rule); }
.method { margin: 1.25rem 0; }
.method ol { margin: .25rem 0 .5rem 1.1rem; padding: 0; }
.faq dt { font-weight: 700; margin-top: .9rem; } .faq dd { margin: .2rem 0 0; max-width: 70ch; }
.slot { display: block; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: .75rem 1.25rem; margin: 1.25rem 0; font-size: var(--fs-table); }
.note { font-size: var(--fs-small); color: var(--fg-2); max-width: 70ch; }

/* cards and ways in */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; margin: 1rem 0; }
.card { display: block; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: .85rem 1rem; min-width: 0; color: var(--fg); text-decoration: none; }
a.card:hover { border-color: var(--accent); background: var(--bg-2); } a.card h3 { color: var(--accent); }
.card h3 { margin: 0 0 .25rem; font-size: var(--fs-body); }
.card .n { font-family: var(--mono); font-size: var(--fs-small); color: var(--fg-2); }
.ways { margin: 1.5rem 0 .5rem; }

/* search and letters */
.search { margin: 1.5rem 0; max-width: 70ch; position: relative; }
.search input { display: block; width: 100%; margin-top: .35rem; font: var(--fs-body) var(--body); padding: .7rem .9rem; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--card); color: var(--fg); }
.results { list-style: none; margin: .25rem 0 0; padding: .25rem 0; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; max-width: 70ch; }
.results li { padding: .35rem .8rem; } .results li span { color: var(--fg-2); font-size: var(--fs-small); }
.letters { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0 1.5rem; }
.letters a { font-family: var(--mono); font-size: var(--fs-small); text-decoration: none; border: 1px solid var(--rule); border-radius: 8px; padding: .2rem .5rem; color: var(--fg); min-width: 2.2rem; text-align: center; }
.letters a small { display: block; font-size: var(--fs-label); color: var(--fg-2); }
.letters a[aria-current], .letters a:hover { border-color: var(--accent); color: var(--accent); }

.chg { display: grid; grid-template-columns: 11ch 1fr; gap: .25rem 1rem; font-size: var(--fs-table); }
.chg time { font-family: var(--mono); font-size: var(--fs-small); color: var(--fg-2); }
.chg div { padding-bottom: .5rem; border-bottom: 1px solid var(--rule); }
footer { border-top: 1px solid var(--rule); padding-block: 1.5rem 2.5rem; font-size: var(--fs-small); color: var(--fg-2); }
footer p { max-width: 80ch; }
.proto { background: var(--mint); color: #1d2e3a; border-radius: 8px; padding: .5rem .8rem; font-size: var(--fs-small); font-family: var(--mono); color: var(--fg-2); margin-bottom: 1rem; }
@media (max-width: 600px) { html { font-size: 16px; } .chg { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* modules: each section of a profile or hub page is a quiet card */
.mod { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.25rem 1.25rem; margin: 1.25rem 0; min-width: 0; }
.mod > h2:first-child, .modhead h2 { margin-top: 0; }
.modhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .5rem; }
.mod th, .mod td, .mod table.pin td:nth-child(2), .mod table.pin-first td:first-child { background: var(--card); }
.cols .mod { margin: 0; }
.cols { margin: 1.25rem 0; }
.inline-list { max-width: none; line-height: 1.7; }

/* search spacing */
.search label { display: block; margin-bottom: .45rem; }
.search .help { margin-top: .6rem; }

/* ecosystem index */
.eco { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.eco .stat { padding: .9rem 1rem .9rem 0; border-right: 1px solid var(--rule); margin-right: 1rem; }
.eco .stat:last-child { border-right: 0; }
.eco .k { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.eco .v { font-family: var(--display); font-size: var(--fs-stat); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: .2rem 0 .1rem; }
.eco .v small { font-family: var(--mono); font-size: var(--fs-small); font-weight: 400; color: var(--fg-2); }
.eco .d { font-size: var(--fs-small); color: var(--fg-2); }
.delta.up { color: var(--pla); } .delta.down { color: #b4432a; }

/* tier mix bars */
.mix { margin: .6rem 0 .9rem; }
.mixhead { display: flex; justify-content: space-between; font-size: var(--fs-table); margin-bottom: .3rem; }
.mixhead .num { font-family: var(--mono); font-size: var(--fs-small); color: var(--fg-2); }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg-2); }
.seg { display: block; height: 100%; }
.seg.t1 { background: var(--t1); } .seg.t2 { background: var(--t2); } .seg.t3 { background: var(--t3); } .seg.t4 { background: var(--t4); } .seg.t5 { background: var(--t5); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: var(--fs-small); color: var(--fg-2); margin-top: .5rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }

/* inside a card, content runs the full card width and reads one step larger */
.howto { font-size: var(--fs-table); color: var(--fg); max-width: none; margin: .25rem 0 1rem; line-height: 1.55; }
.howto .pill { vertical-align: middle; }
.mod .note, .mod .faq dd, .mod p, .mod ol, .mod .method { max-width: none; }
.mod.method { border-left: 3px solid var(--accent); background: var(--card); border-radius: 12px; padding: 1rem 1.25rem 1.25rem; }
.mod.method ol { margin: .25rem 0 .75rem 1.2rem; font-size: var(--fs-body); }
.mod.faq dt { font-size: var(--fs-body); }
.mod.prose h2:first-child { margin-top: 0; }
.mod.prose h2 { margin-top: 1.75rem; }
.mod .lede { max-width: none; }

.mod dd, .mod dt, .mod.faq dd { max-width: none; }

/* league tables: one header row per group, so the Validated-first rule is visible */
tr.group th { font-family: var(--body); font-size: var(--fs-table); letter-spacing: 0; text-transform: none; color: var(--fg); font-weight: 700;
  padding-top: 1.1rem; background: var(--card); }
tr.group th span { font-weight: 400; color: var(--fg-2); }
tbody:first-of-type tr.group th { padding-top: .6rem; }

/* region tabs at the top of a league card */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; font-size: var(--fs-table); }
.tabs a { text-decoration: none; border: 1px solid var(--rule); border-radius: 999px; padding: .25rem .8rem; color: var(--fg); }
.tabs a span { font-family: var(--mono); font-size: var(--fs-small); color: var(--fg-2); margin-left: .3rem; }
.tabs a:hover { border-color: var(--accent); color: var(--accent); }
.tabs a[aria-current] { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* profile: tiers in one row of four cells; company facts in two columns */
.tierstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.tierstrip > div { padding: .75rem 1rem .75rem 0; border-right: 1px solid var(--rule); margin-right: 1rem; }
.tierstrip > div:last-child { border-right: 0; }
.tierstrip .k { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); margin-bottom: .3rem; }
dl.company { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 1.5rem; margin: 0; }
dl.company > div { padding: .45rem 0; border-bottom: 1px solid var(--rule); min-width: 0; }
dl.company dt { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
dl.company dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
dl.company > div.wide { grid-column: 1 / -1; }

/* ways in: descriptions in the text face */
.ways .card .n { font-family: var(--body); font-size: var(--fs-small); }

/* phones: ranked tables become one block per partner; header labels move into each cell */
@media (max-width: 640px) {
  .mod { padding: .85rem .8rem 1rem; }
  .tierstrip > div { border-right: 0; margin-right: 0; }
  .head-inner { flex-wrap: wrap; }
  nav.main { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; width: 100%; padding-bottom: .2rem; scrollbar-width: none; }
  nav.main::-webkit-scrollbar { display: none; }
  table.stack, table.stack tbody { display: block; }
  table.stack colgroup { display: none; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
  table.stack td, table.stack th { display: block; border: 0; padding: 0; position: static; box-shadow: none; min-width: 0; text-align: left; }
  table.stack tr.group { padding: 1rem 0 .2rem; border-bottom: 0; }
  table.stack td.lead { flex: 1 1 calc(100% - 3.5rem); font-weight: 600; font-size: var(--fs-body); }
  table.stack td.pos, table.stack td.rk { flex: 0 0 auto; width: auto; min-width: 2rem; }
  table.stack td[data-label]::before { content: attr(data-label) " "; font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .05em; text-transform: uppercase; color: var(--fg-2); }
  table.stack td.num { font-size: var(--fs-small); }
  table.stack td:empty { display: none; }
  table.stack.pin td:nth-child(2), table.stack.pin th:nth-child(2) { position: static; box-shadow: none; }
}
