/* Goalboard — SUPERHERO / POSTER ink
   Type: Archivo Black (display) + Barlow (UI) + Space Mono
   Color: ink black + electric crimson — anti-AI-slop, not Nordic beige SaaS. */
:root {
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --ink-muted: #4A4A4A;
  --ink-faint: #7A7A7A;
  --paper: #F0EEE8;
  --paper-2: #FFFFFF;
  --paper-3: #E4E1D8;
  --stone: #C8C4B8;
  --stone-2: #A8A498;
  /* Electric crimson — poster punch, not forest/teal */
  --accent: #E10600;
  --accent-dark: #B00000;
  --accent-soft: rgba(225, 6, 0, 0.08);
  --accent-line: rgba(225, 6, 0, 0.35);
  /* legacy aliases */
  --teal: var(--accent);
  --teal-dark: var(--accent-dark);
  --teal-soft: var(--accent-soft);
  --danger-soft: #F8E8E6;
  --radius: 0px;
  --radius-sm: 0px;
  --shadow: none;
  --font: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1180px;
  --nav-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
img, svg { display: block; }
button, input, select { font: inherit; }

.nums, .money, td.money, th.money, .kpi-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-family: var(--mono);
}

/* Shell */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Black chrome topbar — decisive block, not frosted beige */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: var(--ink);
  border-bottom: 4px solid var(--accent);
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none !important;
  flex-shrink: 0;
}
.brand-glyph {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.02em;
  clip-path: polygon(50% 0%, 100% 18%, 100% 62%, 50% 100%, 0% 62%, 0% 18%);
  flex: 0 0 28px;
  text-indent: 0;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
}
.brand-tag {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: none;
  padding-left: 12px;
  border-left: 2px solid rgba(255,255,255,0.2);
  margin-left: 2px;
  line-height: 1.2;
  max-width: 240px;
}
@media (min-width: 1100px) {
  .brand-tag { display: inline; }
}

/* Nav: hard block tabs on black — weight, not underline-only */
.nav {
  display: flex; align-items: stretch; gap: 2px;
  margin-left: auto;
  height: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 0;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: rgba(255,255,255,0.62);
  text-decoration: none !important;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 0;
  background: transparent;
  border: 2px solid transparent;
}
.nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  text-decoration: none !important;
}
.nav a.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
  font-weight: 800;
}

.main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.footer {
  border-top: 3px solid var(--ink);
  padding: 16px 20px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--paper-3);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* Typography — dramatic hierarchy */
.page-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 10px;
  color: var(--ink);
  text-transform: uppercase;
}
.page-lead {
  margin: 0 0 28px;
  color: var(--ink-muted);
  font-size: 15.5px;
  max-width: 62ch;
  line-height: 1.5;
  font-weight: 500;
}

h2.section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--ink);
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--ink);
}
.section-meta { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }

/* KPI strip — ink rules, crimson strike */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
@media (max-width: 900px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
.kpi {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 14px 16px;
  box-shadow: none;
  border-top: 4px solid var(--accent);
}
.kpi-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px;
}
.kpi-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.kpi-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--font);
  font-weight: 500;
}

/* Cards / panels — bordered ink panels, no soft shadow */
.panel {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.panel-flush { padding: 0; overflow: hidden; }
.grid-2 {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.narrative {
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  border-left: 6px solid var(--accent);
  border-radius: 0;
  padding: 14px 18px;
  margin-bottom: 20px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
  font-weight: 500;
}
.narrative strong { font-weight: 800; }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.filters label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--ink-muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.filters input[type="search"],
.filters select {
  min-width: 160px;
  padding: 8px 11px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 500;
}
.filters input[type="search"] { min-width: 220px; }
.filters input:focus, .filters select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--ink);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px;
  border-radius: 0;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:hover { background: var(--paper-3); }
.btn-primary {
  background: var(--accent);
  border-color: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.filters .btn { align-self: flex-end; margin-bottom: 1px; }

/* Tables */
.table-wrap { overflow: auto; max-height: min(70vh, 720px); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th, table.data td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--stone);
  white-space: nowrap;
}
table.data th {
  position: sticky; top: 0; z-index: 2;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--accent);
}
table.data td.money, table.data th.money { text-align: right; }
table.data tbody tr:hover { background: var(--accent-soft); }
table.data tbody tr.clickable { cursor: pointer; }
table.data .muted { color: var(--ink-faint); }
table.data .name-cell {
  white-space: normal;
  min-width: 160px;
  font-weight: 650;
  color: var(--ink);
}
table.data a.row-link {
  color: inherit; text-decoration: none !important;
  display: block;
}
table.data a.row-link:hover .name-cell { color: var(--accent-dark); }

.badge {
  display: inline-flex; align-items: center;
  padding: 1px 0;
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 700;
  background: transparent;
  color: var(--ink-muted);
  border: none;
  border-bottom: 2px solid var(--stone-2);
}
.badge-teal {
  background: transparent;
  color: var(--accent-dark);
  border-color: var(--accent-line);
  border-bottom: 2px solid var(--accent);
}
.badge-stone { background: transparent; }
.badge-amber {
  background: transparent;
  color: #92400e;
  border-bottom: 2px solid rgba(146, 64, 14, 0.55);
  margin-left: 4px;
}
.page-note { font-size: 13px; margin: -4px 0 14px; max-width: 52rem; font-weight: 500; }
.muted { color: var(--ink-muted); }

/* Empty */
.empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--ink-muted);
  border: 2px dashed var(--ink);
  border-radius: 0;
  background: var(--paper-2);
}
.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Company header */
.entity-head {
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.entity-meta {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  margin: 10px 0 0;
}
.meta-chip {
  font-size: 12px;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  border-bottom: 2px solid var(--stone);
  font-weight: 600;
}
.meta-chip strong { color: var(--ink); font-weight: 800; }
.back-link {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 14px;
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.source-note {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 10px;
}

/* Chart */
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: min(520px, 70vh); }

.quiet-note {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 8px;
}

.stack { display: flex; flex-direction: column; gap: 16px; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--stone);
}
.doc-list li:last-child { border-bottom: 0; }
.doc-list .doc-title { font-weight: 700; color: var(--ink); }
.doc-list .doc-sub { font-size: 12.5px; color: var(--ink-faint); }

.bar-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-muted); margin-top: 8px; font-weight: 600;
}
.bar-legend span::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 0;
  margin-right: 6px;
  vertical-align: -1px;
  background: var(--accent);
}
.bar-legend .med::before { background: var(--ink); height: 2px; vertical-align: 3px; }

/* Board look-through star panel */
.panel-star {
  border-color: var(--ink);
  border-width: 2px;
  box-shadow: 6px 6px 0 0 var(--accent);
}
.section-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-weight: 500;
}
.section-head-right { display: flex; align-items: center; gap: 10px; }
.fy-pills {
  display: inline-flex; align-items: center; gap: 0;
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--paper-2);
}
.fy-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 8px;
}
.fy-pill {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 0;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border-right: 1px solid var(--stone);
}
.fy-pill:last-child { border-right: none; }
.fy-pill:hover { background: var(--paper-3); color: var(--ink); }
.fy-pill.is-active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
.coverage-note {
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-left: 6px solid var(--ink);
  border-radius: 0;
  padding: 10px 14px;
  margin: 0 0 18px;
  line-height: 1.45;
  font-weight: 500;
}

/* Inflation deltas */
.delta-up { color: var(--accent-dark); font-weight: 700; }
.delta-down { color: #6B5344; }

/* —— Company logos + initials —— */
.co {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.co-sm .co-logo, .co-sm .co-avatar {
  width: 32px; height: 32px;
  flex: 0 0 32px;
}
.co-lg .co-logo, .co-avatar-lg, .co-logo-lg {
  width: 48px; height: 48px;
  flex: 0 0 48px;
}
.co-logo {
  border-radius: 0;
  object-fit: contain;
  background: var(--paper-2);
  border: 2px solid var(--ink);
}
.co-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 2px solid var(--ink);
  font-family: var(--font-display);
}
.co-avatar-lg { font-size: 15px; border-radius: 0; }
.co-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.co-name {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-sub {
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 500;
}
.entity-head-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.entity-head-main .page-title {
  margin-bottom: 4px;
}

/* —— Type chips: hard rules —— */
.chip-row, .chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 700;
  background: transparent;
  color: var(--ink-muted);
  border: none;
  border-bottom: 2px solid var(--stone-2);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip-saas {
  background: transparent;
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}
.chip-cap {
  background: transparent;
  color: var(--ink-2);
  border-bottom-color: var(--ink-2);
  font-weight: 800;
}

/* Checkbox filter */
.check-label .check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.check-label input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
}

/* Category multi-select — hard segmented blocks */
.cat-filter {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.cat-filter-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cat-filter-hint {
  font-weight: 500;
  opacity: 0.75;
}
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 2px solid var(--ink);
  border-radius: 0;
  overflow: hidden;
  background: var(--paper-2);
  width: fit-content;
  max-width: 100%;
}
.filters .cat-chip,
.cat-chip {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 6px 12px;
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--ink);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.filters .cat-chip:last-child,
.cat-chip:last-child { border-right: none; }
.filters .cat-chip input,
.cat-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.filters .cat-chip:hover,
.cat-chip:hover { background: var(--paper-3); }
.filters .cat-chip.is-on,
.filters .cat-chip:has(input:checked),
.cat-chip.is-on,
.cat-chip:has(input:checked) {
  background: var(--accent);
  border-color: var(--ink);
  color: #fff;
}
.filters .cat-chip.is-on:hover,
.filters .cat-chip:has(input:checked):hover,
.cat-chip.is-on:hover,
.cat-chip:has(input:checked):hover {
  background: var(--accent-dark);
  border-color: var(--ink);
  color: #fff;
  opacity: 1;
}

/* Busy directors — company seats */
.seat-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.seat-co {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none !important;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}
.seat-co:hover .seat-ticker { color: var(--accent-dark); }
.seat-ticker { letter-spacing: 0.02em; }
