/* ============================================================
   Company pages (/companies). Loads after tokens.css / lr.css and
   the shared data-page styles, re-points the type tokens at the
   brand fonts used by the landing and search pages, then adds the
   pieces only these pages have: the unlock panel and the
   titles-by-year bars.
   ============================================================ */

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/hanken-grotesk-latin-wght.woff2') format('woff2-variations'),
       url('../fonts/hanken-grotesk-latin-wght.woff2') format('woff2');
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('../fonts/spline-sans-mono-latin-wght.woff2') format('woff2-variations'),
       url('../fonts/spline-sans-mono-latin-wght.woff2') format('woff2');
}

:root {
  --font-display: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:    'Spline Sans Mono', SFMono-Regular, Menlo, monospace;
}

body { font-family: var(--font-body); }
.co-page .cp-h1 { font-weight: 800; letter-spacing: -0.035em; }
.co-page .article-prose h2 { font-weight: 700; letter-spacing: -0.02em; }
.co-page .cp-eyebrow { color: var(--gold-700); }
.co-page .co-mono, .co-page .od-table .co-mono { font-family: var(--font-mono); font-size: 0.92em; }

/* ─── Header ─────────────────────────────────────────────────── */
.co-shell { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.co-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.co-head { background: var(--paper); padding: 36px 0 24px; }
.co-crumb { font: 600 11px/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 20px; }
.co-crumb a { color: var(--ink-3); text-decoration: none; }
.co-crumb a:hover { color: var(--ink); }
.co-crumb [aria-current] { color: var(--ink); }
.co-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; }
.co-who { display: flex; gap: 20px; align-items: center; min-width: 0; }
.co-mark {
  flex: none; width: 68px; height: 68px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-700), #0b2413); color: var(--gold-300);
  font: 800 26px/1 var(--font-display); letter-spacing: -0.04em;
}
.co-eyebrow { display: block; font: 700 11px/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-700); }
.co-h1 { font: 800 clamp(1.9rem, 1.2rem + 2vw, 2.6rem)/1.05 var(--font-display); letter-spacing: -0.04em; margin: 8px 0 10px; color: var(--ink); }
.co-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.co-chip { font: 600 12px/1 var(--font-body); padding: 7px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.co-chip a { color: var(--brand-700); text-decoration: none; }
.co-chip a:hover { text-decoration: underline; }
.co-chip[data-tone="gold"] { background: var(--gold-300); border-color: var(--gold-300); color: var(--ink); }
.co-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 700 14px/1 var(--font-body); text-decoration: none; text-align: center;
}
.co-btn[data-tone="forest"] { background: var(--brand-700); color: #fff; }
.co-btn[data-tone="forest"]:hover { background: var(--brand-800); color: #fff; }

/* ─── Bento grid ─────────────────────────────────────────────── */
.co-main { background: var(--paper); padding: 0 0 64px; }
.co-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(160px, auto); gap: 16px; }
.co-tile-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; min-width: 0; }
.co-w2 { grid-column: span 2; } .co-w4 { grid-column: span 4; } .co-h2 { grid-row: span 2; }
.co-label { margin: 0 0 4px; font: 700 11.5px/1.3 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.co-muted { color: var(--ink-4); }
.co-hero-card { background: linear-gradient(150deg, var(--brand-700), #0b2413); border: 0; color: #fff; }
.co-hero-card .co-label { color: rgba(255,255,255,0.6); }
.co-hero-card .co-chip { position: absolute; top: 20px; right: 20px; }
.co-giant { color: #fff; margin: 14px 0 8px; font: 800 clamp(3.4rem, 2rem + 4vw, 5.2rem)/1 var(--font-display); letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.co-hero-card p:not(.co-giant) { margin: 0; color: rgba(255,255,255,0.75); max-width: 340px; font-size: 14px; }
.co-spark { position: absolute; right: 22px; bottom: 18px; }
.co-spark polyline { fill: none; stroke: var(--gold-300); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.co-tenure { display: flex; gap: 16px; align-items: center; }
.co-tenure svg { flex: none; }
.co-ring-v { font: 800 20px var(--font-display); fill: var(--ink); }
.co-ring-l { font: 600 8px var(--font-body); letter-spacing: 1px; fill: var(--ink-4); }
.co-legend { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.co-legend li { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.co-legend i { width: 10px; height: 10px; border-radius: 3px; }
.co-legend i[data-tone="forest"] { background: var(--brand-700); }
.co-legend i[data-tone="gold"] { background: var(--gold-500); }
.co-stat-v { margin: 10px 0 4px; font: 800 2.1rem/1.05 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.co-stat-name { font-size: 1.5rem; }
.co-stat p:not(.co-stat-v) { margin: 0; color: var(--ink-3); font-size: 13px; }
.co-cta { background: var(--gold-50, #f6ecd3); border-color: #ecd9a6; }
.co-cta .co-label { color: var(--gold-700); }
.co-cta-h { margin: 10px 0 8px; font: 800 1.6rem/1.15 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.co-cta ul { list-style: none; padding: 0; margin: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.co-cta li { margin: 5px 0; }
.co-cta li::before { content: '✓ '; color: var(--brand-700); font-weight: 800; }
.co-cta .co-btn { width: 100%; }
.co-cta small { display: block; text-align: center; margin-top: 10px; color: var(--ink-3); font-size: 12px; }
.co-summary p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.6; }
.co-summary p:first-of-type { font-size: 1.125rem; color: var(--ink); line-height: 1.5; }
.co-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 6px 0 0; }
.co-facts > div { padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.co-facts .co-wide { grid-column: span 2; }
.co-facts dt { font: 600 10.5px/1.3 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.co-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.co-mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
.co-note { font: var(--t-body-sm); color: var(--ink-4); margin: 12px 0 0; }
.co-note a { color: var(--brand-700); font-weight: 600; text-decoration: none; }
.co-bars { margin-top: 12px; }

/* Titles added per year */
.co-columns { display: block; width: 100%; height: 180px; }
.co-columns rect { fill: var(--brand-700); }
.co-columns rect[data-peak] { fill: var(--gold-500); }
.co-axis { position: relative; height: 16px; margin-top: 4px; font: 500 10.5px/1 var(--font-body); color: var(--ink-4); }
.co-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* Region tile map */
.co-map-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.co-tilemap { display: grid; grid-template-columns: repeat(4, 70px); grid-auto-rows: 70px; gap: 5px; margin-top: 14px; }
.co-tile {
  border-radius: 8px; padding: 7px 8px; display: flex; flex-direction: column; justify-content: space-between;
  background: rgba(31, 81, 48, var(--shade)); color: var(--ink);
}
.co-tile.is-dark { color: #fff; }
.co-tile b { font: 800 15px/1 var(--font-display); letter-spacing: -0.02em; }
.co-tile span { font: 600 10.5px/1.1 var(--font-body); }
.co-map-key { font: var(--t-body-sm); color: var(--ink-3); margin: 0; }
.co-map-key b { display: block; font: 800 1.6rem/1 var(--font-display); color: var(--ink); margin-bottom: 2px; }

/* Bars: districts and peers */
.co-bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 56px; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; }
.co-bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-bar-row a { color: var(--ink-2); text-decoration: none; }
.co-bar-row a:hover { color: var(--brand-700); text-decoration: underline; }
.co-track { height: 9px; background: var(--paper-soft); border-radius: 5px; overflow: hidden; }
.co-track i { display: block; height: 100%; background: var(--brand-700); border-radius: 5px; }
.co-bar-row .num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-bar-row.is-self > span:first-child { font-weight: 800; color: var(--brand-700); }
.co-bar-row.is-self .co-track i { background: var(--gold-500); }

/* Latest titles, with the locked remainder blurred beneath */
.co-table-wrap { position: relative; overflow: hidden; margin: 12px -22px -22px; border-top: 1px solid var(--line); }
.co-peers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.co-peer { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.co-peer b { display: block; font: 800 1.25rem/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
a.co-peer:hover { border-color: var(--brand-700); }
.co-peer.is-self { background: var(--brand-50, #eef6e8); border-color: #d7ebca; }
.co-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.co-table th {
  text-align: left; font: 700 10.5px/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-4); padding: 12px 14px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.co-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.co-table td small { display: block; color: var(--ink-4); font-size: 12px; }
.co-table .num { text-align: right; white-space: nowrap; }
.co-blur td { filter: blur(5px); user-select: none; }
.co-unlock {
  position: absolute; left: 0; right: 0; bottom: 0; height: 290px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.93) 30%, #fff 55%);
}
.co-unlock b { font: 800 1.3rem/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.co-unlock > span:not(.co-lock) { color: var(--ink-3); font-size: 14px; margin-bottom: 8px; }
.co-unlock small { color: var(--ink-4); font-size: 12px; margin-top: 4px; }
.co-lock { width: 42px; height: 42px; border-radius: 50%; background: var(--gold-500); color: #fff; display: grid; place-items: center; }

.co-caveats ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); columns: 2; column-gap: 40px; font: var(--t-body-sm); }
.co-caveats li { margin: 0 0 8px; break-inside: avoid; }

@media (max-width: 960px) {
  .co-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-w4 { grid-column: span 2; }
  .co-caveats ul { columns: 1; }
}
@media (max-width: 640px) {
  .co-shell { padding: 0 16px; }
  .co-bento { grid-template-columns: minmax(0, 1fr); }
  .co-w2, .co-w4 { grid-column: span 1; }
  .co-h2 { grid-row: auto; }
  .co-who { align-items: flex-start; }
  .co-mark { width: 52px; height: 52px; font-size: 20px; border-radius: 14px; }
  .co-head-row .co-btn { width: 100%; }
  .co-spark { display: none; }
  .co-tilemap { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 62px; }
  .co-table th:nth-child(3), .co-table td:nth-child(3) { display: none; }
  .co-unlock { height: 320px; padding: 16px; }
}

/* ─── Hub pagination ────────────────────────────────────────── */
.co-pager {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 2rem; font: var(--t-body-sm);
}
.co-pager a, .co-pager span {
  min-width: 34px; padding: 7px 10px; border-radius: 8px; text-align: center;
  border: 1px solid var(--line); color: var(--ink-2); text-decoration: none;
}
.co-pager a:hover { border-color: var(--brand-700); color: var(--brand-700); }
.co-pager [aria-current="page"] { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.co-pager .co-gap { border: 0; min-width: 0; padding: 7px 2px; }

/* ─── Area pages (/areas) ───────────────────────────────────── */
.ar-bento { grid-auto-flow: dense; }
.co-chip a, .co-stat-name a { color: inherit; text-decoration: none; }
.co-stat-name a:hover, .co-table td a:hover { color: var(--brand-700); text-decoration: underline; }
.co-table td a { color: var(--ink-2); text-decoration: none; }
a.co-tile { text-decoration: none; transition: transform 0.15s ease; }
a.co-tile:hover { transform: translateY(-2px); }
.co-tile.is-self { box-shadow: 0 0 0 3px var(--gold-500); }
.co-table-open { margin-bottom: -22px; }
.co-faq h3 { margin: 16px 0 4px; font: 700 1.05rem/1.35 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.co-faq p { margin: 0; color: var(--ink-2); line-height: 1.6; max-width: 780px; }
.ar-hub-map { margin: 8px 0 28px; }
.ar-region { margin: 0 0 28px; padding-top: 4px; border-top: 1px solid var(--line); }
.ar-region h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ar-region h2 a { color: var(--ink); text-decoration: none; }
.ar-region h2 a:hover { color: var(--brand-700); }
.ar-region h2 .num { font: 600 0.85rem/1 var(--font-body); color: var(--ink-4); letter-spacing: 0; }
.ar-places { list-style: none; margin: 8px 0 0; padding: 0; columns: 2; column-gap: 32px; }
.ar-places .ar-places { columns: 1; margin: 4px 0 6px 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.ar-places li { break-inside: avoid; margin: 0 0 4px; display: block; }
.ar-places a { color: var(--brand-700); font-weight: 600; text-decoration: none; }
.ar-places a:hover { text-decoration: underline; }
.ar-places .num { color: var(--ink-4); font-size: 0.85em; font-variant-numeric: tabular-nums; }
.ar-places .ar-places a { font-weight: 500; color: var(--ink-2); }
@media (max-width: 640px) { .ar-places { columns: 1; } }
