:root {
  --ink: #10211f;
  --ink-soft: #334b47;
  --paper: #f5f4ef;
  --paper-2: #ecebe4;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --line: #d7d7cf;
  --line-strong: #b8beb7;
  --navy: #112522;
  --teal: #16786f;
  --teal-dark: #0d5d56;
  --teal-light: #dff1ec;
  --amber: #bb7414;
  --amber-light: #f7ead4;
  --blue: #285d9b;
  --blue-light: #e2ecf7;
  --purple: #7050a3;
  --purple-light: #ece5f5;
  --red: #a54535;
  --red-light: #f4e3df;
  --green: #257150;
  --green-light: #dfeee6;
  --grey: #67746f;
  --shadow: 0 18px 48px rgba(16, 33, 31, 0.12);
  --shadow-soft: 0 8px 24px rgba(16, 33, 31, 0.08);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1440px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
img, svg, canvas { max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 10000;
  padding: .75rem 1rem;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  gap: 1rem;
  color: #fff;
  background: var(--navy);
  text-align: center;
  transition: opacity .3s ease, visibility .3s ease;
}
.loading-screen.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: auto;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 18px;
  font: 700 1.35rem/1 var(--mono);
  letter-spacing: .08em;
}
.loading-screen p { margin: 0; color: rgba(255,255,255,.72); }

.hero {
  position: relative;
  overflow: visible;
  color: #f9fbf8;
  background:
    radial-gradient(circle at 78% 14%, rgba(22,120,111,.34), transparent 35%),
    radial-gradient(circle at 12% 96%, rgba(187,116,20,.2), transparent 30%),
    linear-gradient(135deg, #0d1d1b 0%, #142d29 60%, #10221f 100%);
  padding: 1.2rem max(1.25rem, calc((100vw - var(--max)) / 2)) 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero-bar, .hero-grid, .trust-strip { position: relative; z-index: 1; }
.hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem 0 2.7rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 750;
  letter-spacing: -.015em;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 9px;
  font: 800 .72rem/1 var(--mono);
  letter-spacing: .08em;
}
.snapshot-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .72rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: rgba(255,255,255,.76);
  font-size: .78rem;
  letter-spacing: .02em;
}
.snapshot-pill span { width: 7px; height: 7px; border-radius: 50%; background: #5dd1b7; box-shadow: 0 0 0 4px rgba(93,209,183,.12); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
  padding-bottom: 3.5rem;
}
.hero-copy { max-width: 870px; }
.eyebrow {
  margin: 0 0 .75rem;
  color: var(--teal);
  font: 750 .75rem/1.2 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero .eyebrow { color: #77d7c3; }
.hero h1 {
  max-width: 920px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.5vw, 5.5rem);
  font-weight: 560;
  line-height: .98;
  letter-spacing: -.045em;
}
.hero-lede {
  max-width: 760px;
  margin: 1.55rem 0 0;
  color: rgba(249,251,248,.74);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.7rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .68rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-weight: 680;
  font-size: .88rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.button:hover { transform: translateY(-1px); border-color: var(--teal); }
.button:focus-visible, .icon-button:focus-visible, .tabs button:focus-visible, .lens-switch button:focus-visible { outline: 3px solid rgba(22,120,111,.26); outline-offset: 2px; }
.button-primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.button-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.hero .button { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.04); }
.hero .button:hover { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.09); }
.hero .button-primary { background: #f5f2e9; color: var(--navy); border-color: #f5f2e9; }
.hero .button-primary:hover { background: #fff; border-color: #fff; }
.button-small { min-height: 38px; padding: .5rem .82rem; font-size: .8rem; }

.verification-note {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: .85rem;
  align-items: start;
  max-width: 740px;
  margin-top: 1.8rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255,255,255,.14);
}
.verification-note p { margin: 0; color: rgba(255,255,255,.67); font-size: .86rem; }
.verification-note strong { color: #fff; }
.verification-seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #7ad6c4;
  border-radius: 50%;
  color: #7ad6c4;
  font: 800 .75rem/1 var(--mono);
}

.global-search-card {
  position: sticky;
  top: 1rem;
  padding: 1.25rem;
  color: var(--ink);
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  box-shadow: 0 24px 65px rgba(0,0,0,.2);
  backdrop-filter: blur(12px);
}
.global-search-card > label { display: block; margin-bottom: .7rem; font-weight: 760; font-size: .83rem; }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 48px;
  padding: 0 .85rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-strong);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(22,120,111,.1); }
.search-input-wrap svg { width: 19px; height: 19px; fill: none; stroke: var(--grey); stroke-width: 1.8; flex: none; }
.search-input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-input-wrap.compact { min-height: 40px; max-width: 280px; }
.global-results {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: calc(100% - 3.5rem);
  z-index: 50;
  max-height: min(460px, 58vh);
  overflow: auto;
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.global-result {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: .75rem;
  align-items: center;
  width: 100%;
  padding: .7rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.global-result:hover, .global-result.active { background: var(--paper); }
.global-result-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--teal-light); color: var(--teal-dark); font: 800 .7rem/1 var(--mono); }
.global-result strong, .global-result span { display: block; }
.global-result strong { font-size: .9rem; }
.global-result span { color: var(--grey); font-size: .75rem; }
.global-result-type { color: var(--grey); font: 700 .65rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.search-hint { margin: .72rem 0 0; color: var(--grey); font-size: .73rem; }
.search-hint button { padding: 0; border: 0; color: var(--teal-dark); background: none; text-decoration: underline; cursor: pointer; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(255,255,255,.13);
}
.trust-strip div { padding: 1.25rem 1rem 1.35rem; border-right: 1px solid rgba(255,255,255,.13); }
.trust-strip div:first-child { padding-left: 0; }
.trust-strip div:last-child { border-right: 0; }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip strong { font: 650 clamp(1.45rem, 2.2vw, 2.05rem)/1 var(--serif); letter-spacing: -.025em; }
.trust-strip span { margin-top: .45rem; color: rgba(255,255,255,.58); font-size: .74rem; }

.tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 max(1.25rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(245,244,239,.95);
  backdrop-filter: blur(14px);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative;
  flex: none;
  padding: 1.05rem .95rem .9rem;
  border: 0;
  color: var(--grey);
  background: transparent;
  font-weight: 720;
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
}
.tabs button::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: 0; height: 2px; background: transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { background: var(--teal); }

main { min-height: 70vh; }
.tab-panel { width: min(var(--max), calc(100% - 2.5rem)); margin: 0 auto; padding: clamp(2rem, 4vw, 4.5rem) 0 5rem; }
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  margin-bottom: 1.8rem;
}
.section-heading h2 { max-width: 850px; margin: 0; font: 600 clamp(2rem, 4vw, 3.8rem)/1.03 var(--serif); letter-spacing: -.035em; }
.section-heading p:not(.eyebrow):not(.network-count) { max-width: 760px; margin: .8rem 0 0; color: var(--ink-soft); }
.text-link { flex: none; color: var(--teal-dark); font-weight: 700; font-size: .82rem; text-underline-offset: 4px; }

.filter-panel, .review-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(5, minmax(140px, .75fr));
  gap: .85rem;
  align-items: end;
  margin-bottom: 1.2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
}
.compact-panel { grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(150px, .8fr)); }
.review-toolbar { grid-template-columns: 1fr 190px; margin-top: 2rem; }
.field label { display: block; margin: 0 0 .4rem .1rem; color: var(--ink-soft); font-size: .7rem; font-weight: 760; letter-spacing: .035em; text-transform: uppercase; }
.field input, .field select, .network-controls select {
  width: 100%;
  min-height: 42px;
  padding: .55rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: 0;
}
.field input:focus, .field select:focus, .network-controls select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,120,111,.1); }
.check-field { display: flex; align-items: center; gap: .55rem; min-height: 42px; color: var(--ink-soft); font-size: .79rem; font-weight: 650; cursor: pointer; }
.check-field input { width: 18px; height: 18px; accent-color: var(--teal); }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 42px; gap: 1rem; }
.results-bar p { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.active-filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--surface); font-size: .68rem; }
.filter-chip button { padding: 0; border: 0; background: none; cursor: pointer; color: var(--grey); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.company-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 318px;
  overflow: hidden;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.company-card:hover { transform: translateY(-3px); border-color: #aebdb8; box-shadow: var(--shadow-soft); }
.company-card:focus-visible { outline: 3px solid rgba(22,120,111,.22); outline-offset: 2px; }
.company-card::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--teal); }
.company-card.review-high::after { background: var(--red); }
.company-card.review-medium::after { background: var(--amber); }
.card-topline, .badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.card-topline { justify-content: space-between; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: .25rem .5rem;
  border-radius: 999px;
  color: var(--grey);
  background: var(--paper-2);
  font: 700 .62rem/1 var(--mono);
  letter-spacing: .03em;
}
.badge-verified { color: var(--green); background: var(--green-light); }
.badge-candidate { color: var(--blue); background: var(--blue-light); }
.badge-review { color: var(--red); background: var(--red-light); }
.badge-non-uk { color: var(--purple); background: var(--purple-light); }
.badge-scope { color: var(--teal-dark); background: var(--teal-light); }
.badge-comparable { color: var(--green); background: var(--green-light); }
.badge-noncomparable { color: var(--amber); background: var(--amber-light); }
.card-location { color: var(--grey); font-size: .72rem; }
.company-card h3 { margin: 1rem 0 .35rem; font: 650 1.55rem/1.1 var(--serif); letter-spacing: -.02em; }
.company-card .legal-name { min-height: 1.2em; margin: 0; color: var(--grey); font: .7rem/1.4 var(--mono); }
.company-card .sector { margin: .9rem 0 0; color: var(--ink-soft); font-size: .82rem; }
.card-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: auto; padding-top: 1.2rem; }
.card-metrics div { padding-top: .7rem; border-top: 1px solid var(--line); }
.card-metrics strong, .card-metrics span { display: block; }
.card-metrics strong { font-size: .88rem; }
.card-metrics span { margin-top: .25rem; color: var(--grey); font-size: .66rem; }
.card-footer { display: flex; justify-content: space-between; gap: .75rem; margin-top: .9rem; color: var(--grey); font-size: .7rem; }
.load-more-wrap { display: grid; place-items: center; padding-top: 1.8rem; }
.empty-results { grid-column: 1 / -1; padding: 3rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--ink-soft); }
.empty-results strong { display: block; margin-bottom: .4rem; color: var(--ink); }

.map-layout { display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(320px, .85fr); gap: 1rem; }
.map-card, .region-panel {
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.map-card { position: relative; display: grid; grid-template-rows: 1fr auto; padding: 1rem; }
.uk-map { width: 100%; height: 570px; }
.uk-silhouette { fill: #e9e9e2; stroke: #d0d3ca; stroke-width: 2; filter: drop-shadow(0 10px 18px rgba(16,33,31,.08)); }
.region-bubble { cursor: pointer; }
.region-bubble circle { fill: rgba(22,120,111,.78); stroke: #fff; stroke-width: 2.5; transition: fill .15s ease, stroke-width .15s ease, transform .15s ease; transform-box: fill-box; transform-origin: center; }
.region-bubble.zero circle { fill: rgba(103,116,111,.14); stroke: #8e9994; stroke-dasharray: 5 5; }
.region-bubble:hover circle, .region-bubble:focus circle, .region-bubble.selected circle { fill: var(--amber); stroke-width: 4; transform: scale(1.04); }
.region-bubble text { pointer-events: none; text-anchor: middle; fill: var(--ink); font-size: 12px; font-weight: 750; paint-order: stroke; stroke: rgba(255,255,255,.88); stroke-width: 3px; stroke-linejoin: round; }
.region-bubble .region-count { font: 800 13px/1 var(--mono); }
.map-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; padding: .7rem .4rem .2rem; color: var(--grey); font-size: .7rem; }
.map-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.legend-ring { width: 12px; height: 12px; border: 2px solid var(--grey); border-radius: 50%; }
.region-panel { padding: 1.25rem; }
.empty-state { height: 100%; display: grid; place-content: center; text-align: center; color: var(--grey); }
.empty-state > span { display: grid; place-items: center; width: 70px; height: 70px; margin: auto; border: 1px solid var(--line-strong); border-radius: 50%; font: 800 .95rem/1 var(--mono); }
.empty-state h3 { margin: 1.2rem 0 .4rem; color: var(--ink); font: 600 1.65rem/1 var(--serif); }
.empty-state p { max-width: 300px; margin: 0 auto; font-size: .82rem; }
.region-panel h3 { margin: .25rem 0 0; font: 620 2.2rem/1 var(--serif); letter-spacing: -.03em; }
.region-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0; }
.region-kpis div { padding: .8rem; border-radius: 12px; background: var(--paper); }
.region-kpis strong, .region-kpis span { display: block; }
.region-kpis strong { font-size: 1.05rem; }
.region-kpis span { margin-top: .2rem; color: var(--grey); font-size: .65rem; }
.mini-bars { display: grid; gap: .5rem; margin: .9rem 0; }
.mini-bar { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; align-items: center; gap: .55rem; font-size: .7rem; }
.mini-bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: var(--paper-2); }
.mini-bar-fill { height: 100%; border-radius: inherit; background: var(--teal); }
.region-company-list { display: grid; gap: .35rem; max-height: 220px; overflow: auto; margin: .8rem 0; padding: 0; list-style: none; }
.region-company-list button { display: flex; justify-content: space-between; width: 100%; gap: .8rem; padding: .55rem .65rem; border: 0; border-radius: 8px; background: var(--paper); text-align: left; cursor: pointer; }
.region-company-list button:hover { background: var(--teal-light); }
.region-company-list span { color: var(--grey); font-size: .66rem; text-align: right; }
.coverage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1rem; }
.coverage-card { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.55); cursor: pointer; }
.coverage-card:hover { border-color: var(--teal); }
.coverage-card strong, .coverage-card span { display: block; }
.coverage-card strong { font-size: .86rem; }
.coverage-card span { margin-top: .35rem; color: var(--grey); font-size: .7rem; }

.network-count { margin: 0; color: var(--grey); font: 700 .72rem/1.4 var(--mono); text-align: right; }
.network-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: .75rem;
}
.lens-switch { display: flex; flex-wrap: wrap; gap: .3rem; padding: .3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lens-switch button { min-height: 36px; padding: .45rem .7rem; border: 0; border-radius: 8px; color: var(--grey); background: transparent; font-weight: 720; font-size: .72rem; cursor: pointer; }
.lens-switch button.active { color: #fff; background: var(--navy); }
.network-controls { display: flex; gap: .5rem; align-items: center; }
.network-controls select { width: 155px; min-height: 40px; font-size: .75rem; }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 1.2rem; cursor: pointer; }
.icon-button:hover { border-color: var(--teal); }
.network-stage {
  position: relative;
  height: min(72vh, 780px);
  min-height: 580px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at center, rgba(22,120,111,.055), transparent 42%),
    linear-gradient(rgba(16,33,31,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,33,31,.035) 1px, transparent 1px),
    var(--surface);
  background-size: auto, 30px 30px, 30px 30px, auto;
  cursor: grab;
  touch-action: none;
}
.network-stage.dragging { cursor: grabbing; }
.network-stage canvas { display: block; width: 100%; height: 100%; }
.network-tooltip { position: absolute; z-index: 8; max-width: 260px; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: rgba(255,255,255,.96); box-shadow: var(--shadow-soft); pointer-events: none; font-size: .72rem; }
.network-tooltip strong, .network-tooltip span { display: block; }
.network-tooltip span { margin-top: .2rem; color: var(--grey); }
.network-legend { position: absolute; left: .8rem; bottom: .8rem; z-index: 4; display: flex; flex-wrap: wrap; gap: .5rem .8rem; max-width: calc(100% - 1.6rem); padding: .55rem .7rem; border: 1px solid rgba(184,190,183,.7); border-radius: 10px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); color: var(--grey); font-size: .65rem; pointer-events: none; }
.network-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.network-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--legend-color); }
.network-instructions { position: absolute; right: .8rem; top: .8rem; padding: .4rem .55rem; border-radius: 8px; color: var(--grey); background: rgba(255,255,255,.82); font-size: .64rem; pointer-events: none; }
.network-explainer { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; margin-top: .8rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: rgba(255,255,255,.55); font-size: .78rem; }
.network-explainer strong { color: var(--ink); }

.investor-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.data-table th, .data-table td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { position: sticky; top: 0; z-index: 1; color: var(--grey); background: #f1f1eb; font-size: .67rem; letter-spacing: .04em; text-transform: uppercase; }
.data-table td { font-size: .78rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--teal-light); }
.investor-name strong, .investor-name span { display: block; }
.investor-name strong { font-size: .86rem; }
.investor-name span { margin-top: .22rem; color: var(--grey); font-size: .65rem; }
.portfolio-preview { max-width: 460px; color: var(--ink-soft); }

.people-list, .funding-list, .review-list { display: grid; gap: .65rem; }
.person-row, .funding-row, .review-row {
  display: grid;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.person-row:hover, .funding-row:hover, .review-row:hover { border-color: var(--teal); transform: translateX(2px); }
.person-row { grid-template-columns: minmax(190px, 1.15fr) minmax(170px, 1fr) minmax(140px, .8fr) minmax(120px, .7fr) auto; }
.person-row strong, .person-row span, .funding-row strong, .funding-row span { display: block; }
.person-row .sub, .funding-row .sub { margin-top: .2rem; color: var(--grey); font-size: .68rem; }
.person-row .role { color: var(--ink-soft); font-size: .76rem; }
.record-type-tag { justify-self: end; padding: .3rem .55rem; border-radius: 999px; color: var(--teal-dark); background: var(--teal-light); font: 700 .62rem/1 var(--mono); }
.funding-row { grid-template-columns: minmax(190px, 1.1fr) minmax(140px, .75fr) minmax(140px, .7fr) minmax(150px, .8fr) minmax(170px, 1fr); }
.funding-row .amount { font-weight: 760; }
.funding-row .investors { color: var(--ink-soft); font-size: .72rem; }
.review-row { grid-template-columns: 80px minmax(170px, .7fr) minmax(260px, 1.4fr) minmax(260px, 1.4fr); align-items: start; }
.severity { display: inline-flex; justify-content: center; padding: .32rem .5rem; border-radius: 999px; font: 750 .65rem/1 var(--mono); }
.severity-high { color: var(--red); background: var(--red-light); }
.severity-medium { color: var(--amber); background: var(--amber-light); }
.review-row h3 { margin: 0; font-size: .9rem; }
.review-row p { margin: .25rem 0 0; color: var(--ink-soft); font-size: .73rem; }

.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.method-grid article { padding: 1.05rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.method-grid article > span { color: var(--teal); font: 800 .75rem/1 var(--mono); }
.method-grid h3 { margin: .75rem 0 .35rem; font-size: 1rem; }
.method-grid p { margin: 0; color: var(--ink-soft); font-size: .75rem; }
.download-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.download-section h3 { font: 600 1.7rem/1 var(--serif); }
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.download-grid a { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-decoration: none; }
.download-grid a:hover { border-color: var(--teal); }
.download-grid strong, .download-grid span { display: block; }
.download-grid strong { font-size: .86rem; }
.download-grid span { margin-top: .3rem; color: var(--grey); font-size: .7rem; }

.drawer { position: fixed; inset: 0; z-index: 1000; visibility: hidden; pointer-events: none; }
.drawer.open { visibility: visible; pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(7,20,18,.45); opacity: 0; transition: opacity .22s ease; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(620px, 94vw);
  height: 100%;
  overflow: auto;
  padding: 1rem 1.2rem 2rem;
  background: var(--surface);
  box-shadow: -24px 0 65px rgba(0,0,0,.2);
  transform: translateX(105%);
  transition: transform .25s ease;
}
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: .25rem 0 .8rem; background: linear-gradient(var(--surface) 70%, rgba(255,254,250,0)); }
.drawer-header p { margin: 0; color: var(--teal); font: 750 .68rem/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.drawer-content h2 { margin: .2rem 0 .45rem; font: 600 2.5rem/1 var(--serif); letter-spacing: -.035em; }
.drawer-lede { margin: 0; color: var(--ink-soft); }
.drawer-section { margin-top: 1.35rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 .7rem; font-size: .92rem; }
.drawer-dl { display: grid; grid-template-columns: minmax(150px, .65fr) minmax(0, 1.35fr); gap: .5rem 1rem; margin: 0; }
.drawer-dl dt { color: var(--grey); font-size: .7rem; }
.drawer-dl dd { margin: 0; font-size: .78rem; overflow-wrap: anywhere; }
.drawer-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.drawer-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .65rem; border-radius: 9px; background: var(--paper); font-size: .75rem; }
.drawer-list button, .drawer-list a { padding: 0; border: 0; color: var(--ink); background: none; text-align: left; font-weight: 650; cursor: pointer; text-decoration: none; }
.drawer-list button:hover, .drawer-list a:hover { color: var(--teal-dark); }
.drawer-list span { color: var(--grey); text-align: right; }
.drawer-source-list { display: grid; gap: .45rem; margin: 0; padding-left: 1.1rem; }
.drawer-source-list a { color: var(--teal-dark); font-size: .7rem; overflow-wrap: anywhere; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.alert-box { margin-top: 1rem; padding: .8rem; border: 1px solid #e2c3bb; border-radius: 10px; color: #6e3025; background: var(--red-light); font-size: .74rem; }

.site-footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem max(1.25rem, calc((100vw - var(--max)) / 2));
  color: rgba(255,255,255,.75);
  background: var(--navy);
}
.site-footer .brand { color: #fff; }
.site-footer p { max-width: 540px; color: rgba(255,255,255,.55); font-size: .76rem; }
.site-footer h3 { margin: 0 0 .8rem; color: #fff; font-size: .8rem; }
.site-footer > div > a:not(.brand) { display: block; margin: .4rem 0; color: rgba(255,255,255,.62); font-size: .74rem; text-decoration: none; }
.site-footer > div > a:hover { color: #fff; }
.noscript { padding: 2rem; text-align: center; }

/* Static crawlable pages */
.static-page { background: var(--paper); }
.static-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(1.25rem, calc((100vw - 1160px) / 2)); color: #fff; background: var(--navy); }
.static-header nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.static-header nav a { color: rgba(255,255,255,.72); font-size: .76rem; text-decoration: none; }
.static-header nav a:hover { color: #fff; }
.static-main { width: min(1160px, calc(100% - 2.5rem)); min-height: 70vh; margin: auto; padding: 2.5rem 0 4rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.7rem; color: var(--grey); font-size: .72rem; }
.breadcrumbs a { color: var(--teal-dark); }
.record-hero, .listing-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding: 2rem; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, var(--navy), #1d423c); box-shadow: var(--shadow-soft); }
.record-hero h1, .listing-hero h1 { margin: 0; font: 600 clamp(2.2rem, 5vw, 4.5rem)/1 var(--serif); letter-spacing: -.04em; }
.record-hero p:not(.eyebrow), .listing-hero p:not(.eyebrow) { max-width: 720px; margin: .75rem 0 0; color: rgba(255,255,255,.68); }
.record-hero .eyebrow, .listing-hero .eyebrow { color: #79d6c3; }
.record-actions { display: flex; flex-wrap: wrap; gap: .55rem; flex: none; }
.record-hero .button, .listing-hero .button { color: #fff; border-color: rgba(255,255,255,.35); }
.record-hero .button-primary, .listing-hero .button-primary { color: var(--navy); background: #fff; border-color: #fff; }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-top: .9rem; }
.record-section { margin-top: .9rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.record-grid .record-section { margin-top: 0; }
.record-section h2 { margin: 0 0 .8rem; font: 600 1.55rem/1.1 var(--serif); }
.record-section h3 { margin: 1rem 0 .4rem; font-size: .86rem; }
.record-dl { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 1.3fr); gap: .55rem 1rem; margin: 0; }
.record-dl dt { color: var(--grey); font-size: .72rem; }
.record-dl dd { margin: 0; font-size: .8rem; overflow-wrap: anywhere; }
.record-dl a { color: var(--teal-dark); }
.status-explainer { padding: .7rem; border-radius: 9px; color: var(--ink-soft); background: var(--paper); font-size: .76rem; }
.record-list, .source-list, .directory-index { margin: 0; padding: 0; list-style: none; }
.record-list { display: grid; gap: .35rem; }
.record-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .7rem; border-radius: 9px; background: var(--paper); font-size: .76rem; }
.record-list a { color: var(--teal-dark); font-weight: 650; text-decoration: none; }
.record-list span { color: var(--grey); text-align: right; }
.source-list { display: grid; gap: .4rem; }
.source-list a { color: var(--teal-dark); font-size: .72rem; overflow-wrap: anywhere; }
.warning-panel { border-color: #e2c3bb; background: #fff9f7; }
.warning-panel article + article { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #ead8d3; }
.warning-panel p { margin: .3rem 0 0; color: var(--ink-soft); font-size: .75rem; }
.directory-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.directory-index li a { display: block; padding: .75rem; border-radius: 9px; background: var(--paper); text-decoration: none; }
.directory-index li a:hover { background: var(--teal-light); }
.directory-index strong, .directory-index span { display: block; }
.directory-index span { margin-top: .25rem; color: var(--grey); font-size: .68rem; }
.static-footer { padding: 2rem max(1.25rem, calc((100vw - 1160px) / 2)); color: rgba(255,255,255,.6); background: var(--navy); font-size: .72rem; }
.static-footer a { color: #fff; }

@media (max-width: 1180px) {
  .filter-panel { grid-template-columns: repeat(3, 1fr); }
  .field-wide { grid-column: span 2; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .coverage-grid { grid-template-columns: repeat(3, 1fr); }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .network-toolbar { align-items: flex-start; flex-direction: column; }
  .network-controls { width: 100%; flex-wrap: wrap; }
  .search-input-wrap.compact { max-width: none; flex: 1 1 260px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .global-search-card { position: relative; top: auto; }
  .trust-strip { grid-template-columns: repeat(3, 1fr); }
  .trust-strip div:nth-child(3) { border-right: 0; }
  .trust-strip div:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.13); }
  .map-layout { grid-template-columns: 1fr; }
  .map-card, .region-panel { min-height: auto; }
  .region-panel { min-height: 430px; }
  .person-row { grid-template-columns: 1fr 1fr 1fr; }
  .person-row > :nth-child(4) { display: none; }
  .funding-row { grid-template-columns: 1fr 1fr 1fr; }
  .funding-row > :nth-child(4), .funding-row > :nth-child(5) { grid-column: span 1; }
  .review-row { grid-template-columns: 80px 1fr; }
  .review-row > :nth-child(3), .review-row > :nth-child(4) { grid-column: 2; }
  .site-footer { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero { padding-inline: 1rem; }
  .hero-bar { padding-bottom: 1.8rem; }
  .snapshot-pill { font-size: .65rem; }
  .hero h1 { font-size: clamp(2.45rem, 12vw, 4.2rem); }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .button:last-child { grid-column: 1 / -1; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip div { padding: 1rem .5rem; border-top: 1px solid rgba(255,255,255,.13); }
  .trust-strip div:first-child, .trust-strip div:nth-child(2) { border-top: 0; }
  .trust-strip div:nth-child(2), .trust-strip div:nth-child(4) { border-right: 0; }
  .trust-strip div:nth-child(3) { border-right: 1px solid rgba(255,255,255,.13); }
  .trust-strip div:last-child { grid-column: 1 / -1; border-right: 0; }
  .trust-strip span { font-size: .66rem; }
  .tabs { padding-inline: .35rem; }
  .tabs button { padding-inline: .7rem; }
  .tab-panel { width: min(100% - 1.25rem, var(--max)); padding-top: 2rem; }
  .section-heading { display: block; }
  .section-heading .text-link { display: inline-block; margin-top: 1rem; }
  .section-heading h2 { font-size: 2.35rem; }
  .filter-panel, .compact-panel, .review-toolbar { grid-template-columns: 1fr; padding: .75rem; }
  .field-wide { grid-column: auto; }
  .card-grid { grid-template-columns: 1fr; }
  .company-card { min-height: 285px; }
  .coverage-grid { grid-template-columns: repeat(2, 1fr); }
  .uk-map { height: 500px; }
  .network-stage { height: 62vh; min-height: 520px; }
  .lens-switch { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .lens-switch button { flex: none; }
  .network-controls select { width: calc(50% - .25rem); }
  .network-instructions { display: none; }
  .network-explainer { grid-template-columns: 1fr; }
  .person-row, .funding-row { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .person-row > :nth-child(3), .person-row > :nth-child(4) { display: none; }
  .record-type-tag { justify-self: start; }
  .funding-row > :nth-child(4), .funding-row > :nth-child(5) { grid-column: 1 / -1; }
  .review-row { grid-template-columns: 1fr; }
  .review-row > :nth-child(3), .review-row > :nth-child(4) { grid-column: auto; }
  .method-grid, .download-grid { grid-template-columns: 1fr; }
  .drawer-panel { width: 100%; }
  .drawer-dl { grid-template-columns: 1fr; gap: .2rem; }
  .drawer-dl dd { margin-bottom: .55rem; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer > div:first-child { grid-column: 1 / -1; }
  .static-header { align-items: flex-start; flex-direction: column; }
  .static-main { width: calc(100% - 1.25rem); padding-top: 1rem; }
  .record-hero, .listing-hero { align-items: flex-start; flex-direction: column; padding: 1.25rem; }
  .record-grid { grid-template-columns: 1fr; }
  .record-dl { grid-template-columns: 1fr; gap: .2rem; }
  .record-dl dd { margin-bottom: .55rem; }
  .directory-index { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Click-through entity links and expanded investor profiles */
.entity-link {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}
.entity-link:hover { color: var(--teal); }
.company-card h3 .entity-link { color: inherit; text-decoration: none; }
.company-card h3 .entity-link:hover { color: var(--teal-dark); text-decoration: underline; }
.investor-name .entity-link { color: var(--ink); text-decoration: none; }
.investor-name .entity-link:hover { color: var(--teal-dark); text-decoration: underline; }
.inline-preview {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .9rem;
}
.metric-grid article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.metric-grid strong, .metric-grid span { display: block; }
.metric-grid strong { font: 650 1.65rem/1 var(--serif); }
.metric-grid span { margin-top: .35rem; color: var(--grey); font-size: .68rem; }
.investor-analysis-grid { grid-template-columns: repeat(3, 1fr); }
.record-list.compact li { padding-block: .45rem; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.section-title-row h2, .section-title-row p { margin-bottom: 0; }
.section-title-row > span { color: var(--grey); font-size: .72rem; }
.portfolio-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.portfolio-table { width: 100%; min-width: 900px; border-collapse: collapse; background: var(--surface-strong); }
.portfolio-table th, .portfolio-table td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .72rem; }
.portfolio-table th { color: var(--grey); background: var(--paper); font-size: .64rem; letter-spacing: .03em; text-transform: uppercase; }
.portfolio-table tbody tr:last-child td { border-bottom: 0; }
.portfolio-table td > span { display: block; margin-top: .25rem; color: var(--grey); font-size: .66rem; }
.portfolio-table td a + a { margin-left: .4rem; }
.co-investor-list { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 980px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .investor-analysis-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .co-investor-list { grid-template-columns: 1fr; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
}
