/* vLockin — dopecode house style.
 *
 * Amber goes to three places only: the mark, the selected control, and the
 * focus ring. Data takes the jurisdiction scale below, validated for colour
 * vision deficiency in both appearances. Roles, not hexes: every colour here
 * is a token that resolves per appearance. */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --canvas: #F7F4EF;
  --card: #FFFDFA;
  --hover: #F7F3EC;
  --raised: #F0EBE2;
  --line: #E0D8CB;
  --line-soft: #EFE9E0;
  --text: #17130F;
  --prose: #5C5248;
  --dim: #6B6055;
  --amber: #FFB224;
  --amber-hi: #FFC65C;
  --amber-dn: #E89A12;
  --amber-text: #8F5806;
  --ink: #17130F;
  --ink-card: #1B1712;
  --ink-line: #3A322A;
  --bone: #F4EFE8;
  --ink-dim: #9A8F82;

  /* jurisdiction: US red ↔ EU blue, neutrals for elsewhere and absent */
  --j-bigtech: #BF2F3B;
  --j-us: #E5735F;
  --j-europe: #5E93E8;
  --j-eu: #2456BD;
  --j-other: #9A8F82;
  --j-none: #DDD5C8;

  /* sequential, for the map: share with an American company */
  --s0: #F6DCD5;
  --s1: #EFB0A2;
  --s2: #E27B69;
  --s3: #C9464A;
  --s4: #992331;
  --s-na: #EBE4DA;

  /* one series, no identity: the depth histogram's columns */
  --col: #BDB2A3;

  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-panel: 12px;
  --r-row: 10px;
  --r-ctl: 8px;
  --r-chip: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #17130F;
    --card: #1B1712;
    --hover: #211C16;
    --raised: #241E18;
    --line: #3A322A;
    --line-soft: #2B241D;
    --text: #F4EFE8;
    --prose: #BDB3A6;
    --dim: #9A8F82;
    --amber-text: #FFB224;
    --ink: #0F0D0A;
    --ink-card: #17130F;
    --j-bigtech: #EC5B63;
    --j-us: #A93F37;
    --j-europe: #3A63B8;
    --j-eu: #6793E3;
    --j-other: #7D7266;
    --j-none: #3A322A;
    --s0: #3A2522;
    --s1: #5E2E2A;
    --s2: #8E3833;
    --s3: #C4474B;
    --s4: #F0666C;
    --s-na: #2B241D;
    --col: #54493E;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #17130F;
  --card: #1B1712;
  --hover: #211C16;
  --raised: #241E18;
  --line: #3A322A;
  --line-soft: #2B241D;
  --text: #F4EFE8;
  --prose: #BDB3A6;
  --dim: #9A8F82;
  --amber-text: #FFB224;
  --ink: #0F0D0A;
  --ink-card: #17130F;
  --j-bigtech: #EC5B63;
  --j-us: #A93F37;
  --j-europe: #3A63B8;
  --j-eu: #6793E3;
  --j-other: #7D7266;
  --j-none: #3A322A;
  --s0: #3A2522;
  --s1: #5E2E2A;
  --s2: #8E3833;
  --s3: #C4474B;
  --s4: #F0666C;
  --s-na: #2B241D;
  --col: #54493E;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber-text); text-decoration: none; border-bottom: 1px solid var(--line); }
a:hover { border-bottom-color: currentColor; }
code, .mono { font-family: var(--mono); }
code { font-size: 0.88em; overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: var(--r-ctl); }
:focus-visible { outline: 2px solid var(--amber-text); outline-offset: 2px; border-radius: 4px; }
.muted, .dim { color: var(--dim); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } }

/* ── top bar ─────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ink-line);
}
.top-row { display: flex; align-items: center; gap: 24px; height: 56px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; border: 0; color: var(--bone); flex: none; }
.lockup .mark { width: 24px; height: 28px; color: var(--amber); flex: none; }
.lockup-text { display: flex; flex-direction: column; gap: 4px; }
.wordmark { font: 700 21px/1 var(--mono); letter-spacing: -0.04em; color: var(--bone); }
/* The subtitle sits under the wordmark, flush left with it, in the sans at
   about half its size: Ink 300, never amber, never without the wordmark. */
.subtitle { font: 500 11px/1 var(--sans); letter-spacing: 0.01em; color: var(--ink-dim); white-space: nowrap; }
.lockup:hover .subtitle { color: var(--bone); }
.nav { display: flex; gap: 20px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-dim); border: 0; font-size: 13px; white-space: nowrap; }
.nav a:hover { color: var(--bone); }
.theme { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-ctl);
  background: transparent; border: 1px solid var(--ink-line); color: var(--ink-dim); cursor: pointer; }
.theme:hover { color: var(--bone); }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* The maker, named where the maker is named: after the navigation, quiet,
   the same lockup and treatment as the footer's bar. */
.maker-top { flex: none; display: flex; align-items: center; height: 22px; padding-left: 22px;
  border: 0; border-left: 1px solid var(--ink-line); color: var(--ink-dim); opacity: 0.75; line-height: 0; }
.maker-top:hover { opacity: 1; border-left-color: var(--ink-line); }
.maker-top svg { display: block; height: 16px; width: auto; }
@media (max-width: 720px) {
  .nav { display: none; }
  .maker-top { margin-left: auto; padding-left: 0; border-left: 0; }
}

/* ── hero: always on ink ─────────────────────────────────────────────── */
.hero { background: var(--ink); color: var(--bone); padding: 72px 0 56px; }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-text); }
.hero .eyebrow { color: var(--amber); }
/* The question the page answers, at its head: large and quiet, the mono in
   Ink 300, the one word it turns on in bone. Never amber. */
.hero .ask { margin: 0 0 20px; font: 700 clamp(28px, 4.2vw, 50px)/1.05 var(--mono); letter-spacing: -0.04em; word-spacing: -0.3em; color: var(--ink-dim); }
.hero .ask strong { font-weight: 700; color: var(--bone); }
.hero h1 { margin: 22px 0 0; font-size: clamp(26px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; max-width: 900px; }
.hero h1 .big { display: block; font-size: clamp(88px, 17vw, 196px); line-height: 0.9; letter-spacing: -0.06em; color: var(--bone); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.hero .lede { margin-top: 22px; font-size: 17px; line-height: 1.6; color: var(--ink-dim); max-width: 680px; text-wrap: pretty; }
.hero .lede a { color: var(--amber-hi); border-bottom-color: var(--ink-line); }
.hero-foot { margin-top: 28px; font-size: 12px; color: var(--ink-dim); }

.seg-control { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: var(--r-ctl);
  background: var(--card); border: 1px solid var(--line); }
.seg-control button { font: 13px/1 var(--sans); color: var(--dim); background: transparent; border: 0; border-radius: var(--r-chip);
  padding: 8px 12px; cursor: pointer; min-height: 32px; }
.seg-control button:hover { color: var(--text); background: var(--hover); }
.seg-control button[aria-selected="true"] { background: var(--raised); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--amber); }
.hero .seg-control { margin-top: 36px; background: var(--ink-card); border-color: var(--ink-line); }
.hero .seg-control button { color: var(--ink-dim); }
.hero .seg-control button:hover { color: var(--bone); background: #211C16; }
.hero .seg-control button[aria-selected="true"] { background: #241E18; color: var(--bone); }

.tiles { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.tile { background: var(--ink-card); border: 1px solid var(--ink-line); border-radius: var(--r-panel); padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-k { font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.tile-v { font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.tile-d { font-size: 13px; color: var(--ink-dim); line-height: 1.45; }
.tile-bar { height: 4px; border-radius: 2px; background: var(--ink-line); overflow: hidden; display: flex; margin-top: 8px; }
.tile-bar i { display: block; height: 100%; }

/* ── callouts band ───────────────────────────────────────────────────── */
.band { background: var(--card); border-bottom: 1px solid var(--line); }
.callouts { display: grid; grid-template-columns: repeat(3, 1fr); }
.callout { padding: 28px 24px 30px 0; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line-soft); }
.callout + .callout { padding-left: 24px; }
.callout:last-child { border-right: 0; }
.callout-v { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.callout-t { font-size: 14px; color: var(--prose); line-height: 1.5; }
@media (max-width: 800px) {
  .callouts { grid-template-columns: 1fr; }
  .callout, .callout + .callout { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .callout:last-child { border-bottom: 0; }
}

/* ── sections ────────────────────────────────────────────────────────── */
.section { padding: 80px 0 8px; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.section h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.015em; line-height: 1.15; }
.prose { font-size: 15px; color: var(--prose); max-width: 640px; line-height: 1.6; text-wrap: pretty; }
.controls { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; font-size: 12px; color: var(--prose); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.j-bigtech { background: var(--j-bigtech); }
.j-us { background: var(--j-us); }
.j-europe { background: var(--j-europe); }
.j-eu { background: var(--j-eu); }
.j-other, .j-unknown { background: var(--j-other); }
.j-none { background: var(--j-none); }

/* layers: four 100% bars */
.layers { display: flex; flex-direction: column; gap: 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-panel); padding: 22px 24px 24px; }
.layer-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 12px; }
.layer-name { font-size: 15px; font-weight: 600; }
.layer-name small { font: 400 11px var(--mono); margin-left: 6px; }
.layer-us { font-size: 13px; color: var(--dim); }
.stack { display: flex; gap: 2px; height: 30px; }
.seg { display: block; height: 100%; min-width: 2px; position: relative; transition: flex-grow 500ms cubic-bezier(.2,.7,.2,1); }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.seg:only-child { border-radius: 4px; }
.seg b { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 8px; font: 700 12px/1 var(--mono);
  color: #fff; white-space: nowrap; overflow: hidden; pointer-events: none; }
.seg.j-us b, .seg.j-europe b, .seg.j-none b, .seg.j-other b { color: var(--text); }
:root[data-theme="dark"] .seg.j-us b, :root[data-theme="dark"] .seg.j-europe b { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg.j-us b, :root:not([data-theme="light"]) .seg.j-europe b { color: #fff; } }
@media (prefers-reduced-motion: reduce) { .seg { transition: none; } }

/* sectors: small multiples, one row per sector */
.sectors { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .sectors { grid-template-columns: 1fr; } }
.sector { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 18px 20px 20px; }
.sector h3 { font-size: 15px; }
.sector .sub { font-size: 12px; color: var(--dim); margin: 2px 0 14px; }
.mini { display: grid; grid-template-columns: 92px 1fr 40px; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; }
.mini .k { color: var(--prose); }
.mini .v { font: 12px var(--mono); text-align: right; color: var(--text); }
.mini .stack { height: 14px; }
.mini .seg:first-child { border-radius: 3px 0 0 3px; }
.mini .seg:last-child { border-radius: 0 3px 3px 0; }

/* depth: organisations by layers at American companies */
.depth { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px 24px 16px; }
.dcols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 220px; }
.dcol { display: flex; flex-direction: column; align-items: stretch; height: 100%; gap: 6px; cursor: default; border-radius: 6px; }
.dcol:hover .dbar i { background: var(--dim); }
.dcol.med:hover .dbar i { background: var(--text); }
.dv { font-size: 12px; font-weight: 700; text-align: center; min-height: 16px; }
.dbar { flex: 1; display: flex; align-items: flex-end; }
.dbar i { display: block; width: 100%; min-height: 2px; background: var(--col); border-radius: 4px 4px 0 0;
  transition: height 500ms cubic-bezier(.2,.7,.2,1); }
.dcol.med .dbar i { background: var(--text); }
.dk { font-size: 12px; text-align: center; color: var(--dim); padding-top: 6px; border-top: 1px solid var(--line); }
.dcol.med .dk { color: var(--text); font-weight: 700; }
.daxis { margin-top: 10px; font-size: 11px; color: var(--dim); }
@media (prefers-reduced-motion: reduce) { .dbar i { transition: none; } }
.depth-sectors { margin-top: 14px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 900px) { .depth-sectors { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .depth-sectors { grid-template-columns: repeat(2, 1fr); } .dcols { height: 180px; gap: 4px; } }
.dsec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.dsec-v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.dsec-t { font-size: 13px; color: var(--prose); }

/* top tens: the freest and the most locked in */
.tops-controls { flex-direction: column; align-items: flex-start; gap: 14px; }
.ctl { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ctl-k { font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.tops-scope { font-size: 12px; color: var(--dim); margin: 0 0 12px; }
.tops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .tops { grid-template-columns: minmax(0, 1fr); } }
.top-panel { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 20px 14px; }
/* The panel's edge says which end of the scale it lists, in the data's own colours. */
.top-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--j-eu); }
.top-panel.worst::before { background: var(--j-bigtech); }
.top-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.top-head h3 { font-size: 16px; letter-spacing: -0.01em; }
.top-head span { font-size: 11px; color: var(--dim); white-space: nowrap; }
.top-rule { font-size: 12px; color: var(--prose); margin: 2px 0 10px; }
.top-list { list-style: none; margin: 0 -8px; padding: 0; counter-reset: none; }
/* Every row is its own grid, so the columns are fixed: the strips line up. */
.trow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 40px; gap: 12px; align-items: center;
  width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.trow:hover { background: var(--hover); }
.top-list.one .trow { grid-template-columns: 26px minmax(0, 1fr) auto 128px; }
.trow .rk { font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.trow .rk.tie { color: var(--dim); font-weight: 400; }
.trow .who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.trow .who b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .who small { font: 11px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp { display: grid; grid-auto-flow: column; grid-auto-columns: 10px; gap: 2px; }
.fp i { display: block; height: 20px; border-radius: 2px; }
.fp.one i:not(.on) { opacity: 0.3; }
.fp i.on { outline: 1.5px solid var(--text); outline-offset: 1px; }
.trow .sc { font-size: 13px; font-weight: 700; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .sc small { font-size: 11px; font-weight: 400; color: var(--dim); }
.top-more { margin: 6px 0 0; font-size: 11px; color: var(--dim); }
.top-empty { font-size: 14px; color: var(--prose); padding: 10px 0 6px; }
.tops-key { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; font-size: 12px; color: var(--dim); }
.tops-key .legend { margin: 0; }
@media (max-width: 520px) {
  .trow { grid-template-columns: 22px minmax(0, 1fr) auto 32px; gap: 10px; }
  .top-list.one .trow { grid-template-columns: 22px minmax(0, 1fr) auto 84px; }
  .trow .who b { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
  .fp { grid-auto-columns: 7px; gap: 1.5px; }
  .fp i { height: 16px; }
  .trow .sc { font-size: 12px; }
}

/* units: one square per organisation */
.units { display: flex; flex-direction: column; gap: 26px; }
.ugroup-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ugroup-head h3 { font-size: 15px; }
.ugroup-head .n { font: 12px var(--mono); color: var(--dim); }
.ugroup-head .u { font: 700 12px var(--mono); margin-left: auto; }
.ucohort { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line-soft); }
.ucohort:first-of-type { border-top: 0; }
.ucohort .name { font-size: 12px; color: var(--prose); line-height: 1.3; padding-top: 1px; }
.ucohort .name b { font-weight: 600; color: var(--text); }
.ucohort .name .pc { font: 11px var(--mono); color: var(--dim); display: block; }
.squares { display: flex; flex-wrap: wrap; gap: 3px; }
.squares i { width: 13px; height: 13px; border-radius: 2px; display: block; cursor: pointer; }
.squares i:hover, .squares i.on { outline: 2px solid var(--text); outline-offset: 1px; }
@media (max-width: 720px) { .ucohort { grid-template-columns: 1fr; } .squares i { width: 11px; height: 11px; } }

.exceptions { margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 18px 20px; }
.exc-head { font-size: 14px; color: var(--prose); }
.exc-head b { color: var(--text); }
button.chip { cursor: pointer; font: 11px var(--mono); }
button.chip:hover { background: var(--hover); color: var(--text); }
.tries { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }

/* bars: providers and the long tail */
.bars { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 20px; }
.brow { display: grid; grid-template-columns: minmax(120px, 240px) 1fr 92px; gap: 14px; align-items: center; padding: 7px 0; border-radius: 6px; }
.brow:hover { background: var(--hover); }
.brow .l { font-size: 13px; display: flex; flex-direction: column; min-width: 0; }
.brow .l b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .l span { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .track { height: 14px; }
.brow .fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 3px; transition: width 500ms cubic-bezier(.2,.7,.2,1); }
.brow .v { font: 12px var(--mono); text-align: right; color: var(--text); }
.brow .v small { color: var(--dim); font-size: 11px; }
@media (max-width: 720px) { .brow { grid-template-columns: 110px 1fr 64px; gap: 8px; } }

/* map */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .map-wrap { grid-template-columns: 1fr; } }
.map-col { min-width: 0; }
.map { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-panel); padding: 18px; }
.tilec { aspect-ratio: 1; border-radius: 8px; display: flex; flex-direction: column; justify-content: space-between; padding: 7px 8px;
  cursor: pointer; border: 0; font: inherit; text-align: left; color: var(--text); min-width: 0; }
.tilec .cc { font: 700 12px/1 var(--mono); }
.tilec .cv { font: 11px/1 var(--mono); }
.tilec.dark { color: #fff; }
.tilec.na { background: var(--s-na); color: var(--dim); cursor: default; }
.tilec:hover:not(.na), .tilec.on { outline: 2px solid var(--text); outline-offset: 1px; }
@media (max-width: 520px) { .map { gap: 4px; padding: 10px; } .tilec { padding: 4px; border-radius: 5px; } .tilec .cv { display: none; } }
.scale { display: flex; align-items: center; gap: 8px; margin-top: 12px; font: 11px var(--mono); color: var(--dim); }
.scale i { width: 26px; height: 10px; display: inline-block; }
.scale i:first-of-type { border-radius: 2px 0 0 2px; }
.scale i:last-of-type { border-radius: 0 2px 2px 0; }
.map-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 22px; min-height: 100%; }
.map-side h3 { font-size: 18px; }
.map-side .sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.map-side ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow: auto; }
.map-side li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.map-side li .p { font: 11px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }

/* table */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); }
.ctable { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1000px; }
.ctable th, .ctable td { padding: 9px 14px; text-align: left; }
.ctable thead th { font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; position: sticky; top: 0; background: var(--card); }
.ctable thead th.sorted { color: var(--text); }
.ctable tbody tr:hover { background: var(--hover); }
.ctable tbody th { font-weight: 500; }
.ctable tbody th small { display: block; color: var(--dim); font: 11px var(--mono); }
.ctable .num { text-align: right; }
.ctable tr.sep th { padding-top: 18px; font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-text); }
.cell { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; font-family: var(--mono); }
.cell .mb { width: 28px; height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; display: inline-block; }
.ctable td.num, .ctable th.num { padding-left: 6px; padding-right: 10px; }
.ctable tbody th { min-width: 200px; }
.cell .mb i { display: block; height: 100%; background: var(--j-bigtech); border-radius: 3px; }

/* the stack: companies × layers, shaded on the map's scale */
.stable { min-width: 860px; }
.stable thead th { cursor: default; }
.stable tbody th { white-space: nowrap; }
.stable tbody th .sw { vertical-align: -1px; }
.stable td.hm { font-family: var(--mono); font-size: 12px; color: var(--text); border: 2px solid var(--card); border-radius: 6px; min-width: 64px; }
.stable td.hm.dark { color: #fff; }
.stable tbody tr:hover { background: transparent; }
.stable tbody tr:hover th { color: var(--amber-text); }
[data-scale="stack"] { flex-wrap: wrap; }

/* look up */
.lookup { position: relative; max-width: 560px; }
.field { width: 100%; font-size: 15px; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line);
  background: var(--card); color: var(--text); }
.field:focus { outline: none; background: var(--raised); border-color: var(--amber-hi); box-shadow: 0 0 0 2px var(--amber-text); }
.field::selection { background: var(--amber-hi); color: #17130F; }
.suggest { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px 0; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: 0 12px 32px rgba(23,19,15,.14);
  max-height: 320px; overflow: auto; }
.suggest li { display: grid; grid-template-columns: 3px 1fr auto; align-items: center; gap: 10px; padding: 0 12px 0 0; cursor: pointer; }
.suggest li::before { content: ""; align-self: stretch; }
.suggest li span { padding: 8px 0; font-size: 13px; }
.suggest li small { font: 11px var(--mono); color: var(--dim); }
.suggest li[aria-selected="true"] { background: var(--raised); }
.suggest li[aria-selected="true"]::before { background: var(--amber); }
.suggest li[aria-selected="true"] span { font-weight: 600; }
.card-slot { margin-top: 20px; }
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px 24px; }
.ocard-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.ocard-head h3 { font-size: 20px; letter-spacing: -0.01em; }
.ocard-head .d { font: 13px var(--mono); color: var(--dim); }
.ocard-head .score { margin-left: auto; font: 700 13px var(--mono); }
.ocard-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ocard-grid .svc:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 720px) { .ocard-grid { grid-template-columns: 1fr; } }
.svc { border: 1px solid var(--line); border-radius: var(--r-row); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--canvas); }
.svc .k { font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.svc .p { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.svc .j { font-size: 12px; color: var(--prose); font-weight: 400; }
.svc .e { font: 11.5px/1.6 var(--mono); color: var(--prose); overflow-wrap: anywhere; }
.svc .also { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.svc .also .j { margin-right: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-chip);
  padding: 3px 8px; font: 11px var(--mono); color: var(--prose); }

/* method */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.mcard h3 { font-size: 15px; }
.mcard p { font-size: 14px; color: var(--prose); line-height: 1.6; }
.mcard strong { color: var(--text); font-weight: 600; }

/* footer — the maker's bar follows slassh: the lockup quiet, in Ink 300 */
.foot { margin-top: 96px; background: var(--ink); color: var(--ink-dim); padding: 40px 0 36px; }
.foot .lockup .mark { width: 20px; height: 23px; }
.foot .wordmark { font-size: 17px; }
.foot .subtitle { font-size: 10px; }
.foot-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px;
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink-line);
  font: 0.72rem/1.5 var(--mono); color: #6E6459; }
.foot-maker { display: flex; align-items: center; gap: 14px; }
.foot-maker a { display: block; color: var(--ink-dim); opacity: 0.75; line-height: 0; border: 0; }
.foot-maker a:hover { opacity: 1; }
.foot-maker svg { display: block; height: 18px; width: auto; }

/* tooltip */
.tip { position: fixed; z-index: 50; pointer-events: none; max-width: 320px; background: var(--ink-card); color: var(--bone);
  border: 1px solid var(--ink-line); border-radius: var(--r-row); padding: 10px 12px; font-size: 12px; line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.tip b { font-weight: 600; font-size: 13px; }
.tip .t-row { display: flex; align-items: center; gap: 8px; }
.tip .t-e { font: 11px/1.5 var(--mono); color: var(--ink-dim); overflow-wrap: anywhere; margin-top: 4px; }
.tip .t-grid { display: grid; grid-template-columns: 10px 1fr auto; gap: 3px 8px; align-items: center; margin-top: 6px; }
.tip .t-grid .n { font-family: var(--mono); text-align: right; }

@media print {
  .top, .theme, .controls, .lookup, .tip { display: none !important; }
  .hero { background: #fff; color: #000; }
}
