:root {
  --ink: #252525;
  --navy: #142a3a;
  --canvas: #f7f7f4;
  --muted: #727272;
  --line: #e9e9e9;
  --teal: #286c66;
  --orange: #f3613c;
  --lavender: #c9c8fb;
  --ivory: #f1ede7;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
p { margin: 0 0 12px; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 600; }
h1 { font-size: 28px; letter-spacing: -.7px; }
h2 { font-size: 18px; letter-spacing: -.35px; }
h3 { font-size: 15px; }
strong { font-weight: 600; }
small, .small { font-size: 11px; }
small { display: block; color: var(--muted); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 10; background: white; padding: 12px; }
.skip:focus { top: 10px; }
.icon { display: block; flex-shrink: 0; }
.topbar { display: grid; grid-template-columns: 224px minmax(0,1fr); height: 96px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; border-bottom: 1px solid var(--line); margin: -34px -12px 24px; padding-left: 28px; min-height: 96px; flex: 0 0 96px; color: #fff; background: var(--navy); font-size: 24px; font-weight: 650; letter-spacing: -.7px; }
.topbar-main { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 32px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.search { display: flex; align-items: center; gap: 10px; background: #fafafa; padding: 0 16px; height: 48px; width: 274px; border-radius: 4px; }
.search .icon { width: 18px; height: 18px; }
.search input { min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: #898989; }
.search button { display: none; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex-shrink: 0; background: #fafafa; border: 0; border-radius: 3px; }
.sidebar { width: 224px; position: fixed; top: 0; bottom: 0; left: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 34px 12px 24px; background: var(--navy); }
.sidebar nav { display: grid; gap: 12px; }
.sidebar nav a { display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 12px 16px; font-size: 14px; color: #d6e0e7; border-radius: 3px; }
.sidebar nav a:hover { background: #203f52; color: #fff; }
.sidebar nav a[aria-current] { background: var(--teal); color: #fff; }
.sidebar nav .icon { width: 21px; height: 21px; }
.nav-count { margin-left: auto; font-size: 11px; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin: auto 6px 0; padding: 12px; background: #203f52; color: #fff; border-radius: 3px; }
.sidebar-foot strong { font-size: 11px; }
.sidebar-foot small { color: #d6e0e7; font-size: 10px; margin-top: 2px; }
.workspace-avatar { display: grid; place-items: center; width: 30px; height: 30px; background: #e8eeee; color: var(--teal); border-radius: 50%; font-size: 12px; }
.workspace { margin-left: 224px; }
main { padding: 34px 32px 48px; max-width: 1640px; margin: auto; }
main:focus { outline: none; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.14fr) minmax(0,1fr); gap: 28px; align-items: start; }
.dashboard-main { min-width: 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading > a:not(.icon-button) { font-size: 11px; color: var(--muted); }
.chart-tabs { display: flex; justify-content: space-between; border-bottom: 1px solid #dedede; margin-top: 14px; }
.chart-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 0 12px 12px; font-size: 13px; }
.chart-tabs button[aria-pressed="true"] { border-bottom-color: var(--ink); color: var(--ink); }
.chart-summary { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 18px 0 20px; }
.chart-summary p { font-size: 11px; margin-bottom: 4px; }
.chart-summary strong { font-size: 19px; letter-spacing: -.5px; }
.chart-caption { color: var(--teal); font-size: 10px; text-align: right; }
.priority-chart { position: relative; height: 190px; padding: 0 0 35px 32px; }
.chart-grid { position: absolute; top: 0; left: 0; bottom: 35px; right: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { color: var(--muted); font-size: 10px; display: flex; align-items: center; line-height: 0; gap: 8px; }
.chart-grid span::after { content: ""; height: 1px; flex: 1; background: #e4e4e4; }
.chart-bars { position: relative; display: flex; gap: 18px; height: 100%; padding: 0 4px 0 6px; }
.chart-item { flex: 1; min-width: 0; max-width: 130px; position: relative; display: flex; flex-direction: column; }
.bar-track { height: 100%; display: flex; align-items: flex-end; }
.bar-fill { position: relative; display: block; width: 100%; background: var(--teal); border-radius: 4px 4px 0 0; }
.chart-item:nth-child(2) .bar-fill { background: var(--orange); }
.chart-item:nth-child(3) .bar-fill { background: var(--lavender); }
.chart-item:nth-child(4) .bar-fill { background: var(--ivory); }
.bar-fill strong { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; text-align: center; color: #252525; font-size: 11px; }
.bar-label { position: absolute; top: calc(100% + 12px); left: -6px; right: -6px; text-align: center; color: #737373; font-size: 10px; line-height: 1.25; }
.dashboard-summary { min-width: 0; background: #fff; border: 1px solid #ededed; border-radius: 8px; padding: 24px; }
.metric { display: block; }
.metric > span { font-size: 11px; }
.metric > strong { display: block; font-size: 18px; line-height: 1.3; margin-top: 7px; font-weight: 500; font-variant-numeric: tabular-nums; }
.primary-metric > strong { font-size: 34px; font-weight: 650; letter-spacing: -1px; }
.summary-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 30px 0 28px; }
.summary-metrics .metric > span { color: var(--muted); font-size: 10px; }
.focus-section { border-top: 1px solid #ddd; padding-top: 22px; }
.focus-section h2 { margin-bottom: 20px; }
.opportunity-card { display: flex; min-height: 158px; border-radius: 10px; overflow: hidden; color: #fff; background: var(--teal); }
.opportunity-card:hover { color: #fff; }
.card-main { display: flex; flex-direction: column; gap: 10px; padding: 22px; min-width: 0; flex: 1; }
.card-main > span:first-child { font-size: 14px; }
.card-main > strong { font-size: 20px; letter-spacing: -.3px; }
.card-main small { color: #e4eeeb; font-size: 10px; }
.card-foot { color: #e4eeeb; font-size: 10px; margin-top: auto; }
.card-side { display: flex; flex-direction: column; align-items: center; justify-content: space-between; background: #151515; padding: 20px 12px; width: 82px; }
.card-side strong { font-size: 27px; font-weight: 500; }
.card-side small { color: #ddd; font-size: 9px; }
.comparison-section, .sources-section { margin-top: 28px; }
.state-list { display: grid; gap: 10px; }
.state-row { display: grid; grid-template-columns: 1fr 1fr 16px; align-items: center; gap: 12px; border: 1px solid #ededed; border-radius: 6px; padding: 11px 12px; font-size: 11px; }
.state-row strong { font-size: 11px; font-weight: 400; text-align: right; }
.state-track { height: 4px; background: #e6edeb; }
.state-fill { display: block; width: 0; height: 100%; background: var(--teal); }
.state-row:nth-child(2) .state-fill { background: var(--orange); }
.state-row:nth-child(3) .state-fill { background: #b2b0e9; }
.source-list a { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.source-list .badge { margin-left: auto; }
.source-status { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.source-status.failed { background: #b06150; }
.source-status.stale { background: #b59a66; }
.opportunity-section { margin-top: 26px; }
.result-summary { font-size: 10px; color: var(--muted); margin: -7px 0 16px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
th { color: var(--muted); font-size: 9px; font-weight: 400; text-transform: uppercase; letter-spacing: .3px; }
th, td { padding: 14px 8px; border-bottom: 1px solid #dedede; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; text-align: right; }
td:first-child { width: 35%; }
td:nth-child(2) { width: 33%; }
td:nth-child(3) { width: 24%; }
.row-title { display: flex; align-items: center; gap: 9px; font-weight: 600; line-height: 1.4; }
.row-title small { font-size: 9px; margin-top: 4px; font-weight: 400; }
.club-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; background: #f3f4f3; border-radius: 50%; font-size: 9px; color: #546460; font-weight: 500; }
td small { margin-top: 5px; font-size: 9px; }
.score { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.badge { font-size: 10px; color: #737373; }
.badge.new_need, .badge.interesting, .badge.healthy { color: var(--teal); }
.badge.possible_update, .badge.possible_match, .badge.stale { color: #806536; }
.badge.failed { color: #994d42; }
.empty { border-bottom: 1px solid var(--line); padding: 30px 0; font-size: 12px; }
.empty a { color: var(--teal); text-decoration: underline; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-title { font-size: 27px; letter-spacing: -.7px; }
.lede { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.eyebrow { margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 15px; background: var(--teal); color: white; border: 1px solid var(--teal); border-radius: 3px; font-size: 12px; }
.button:hover { color: white; background: #205c56; }
.button.secondary { background: #fff; color: var(--ink); border-color: #dedede; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: 11px; }
.position { padding-left: 8px; margin-left: 5px; border-left: 1px solid #dedede; font-size: 12px; color: var(--muted); font-weight: 400; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 26px; padding-bottom: 14px; margin: 26px 0; border-bottom: 1px solid #dedede; font-size: 12px; }
.tabs span { margin-left: 5px; color: var(--muted); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 32px; }
.detail-grid > * { min-width: 0; }
.panel { min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #ddd; }
.panel-head p { font-size: 11px; color: var(--muted); margin: 5px 0 0; }
.panel-head a { color: var(--teal); font-size: 11px; }
.panel-body { padding: 18px 0; }
.section { margin-top: 30px; }
.callout { border-left: 2px solid #dce6e2; padding-left: 16px; }
.callout p { font-size: 13px; color: var(--muted); margin-top: 10px; }
.evidence { border-bottom: 1px solid var(--line); padding: 18px 0; }
.evidence-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.evidence-heading small { font-size: 10px; }
blockquote { margin: 12px 0; font-size: 14px; line-height: 1.65; }
.evidence p { margin: 10px 0; }
details { font-size: 12px; margin-top: 12px; }
summary { color: var(--teal); font-size: 11px; cursor: pointer; padding: 4px 0; }
details p { margin-top: 10px; }
.explanations { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; align-self: start; }
.explanations .panel-body { padding-top: 0; }
.explanations p, .explanations a { font-size: 11px; }
.explanations a { color: var(--teal); }
.explanations .section { padding-top: 22px; border-top: 1px solid #dedede; }
.priority-number { font-size: 43px; font-weight: 600; line-height: 1.2; letter-spacing: -1px; margin: 16px 0 10px; }
.priority-number span { font-size: 13px; color: var(--muted); margin-left: 7px; letter-spacing: 0; font-weight: 400; }
.spaced { margin-top: 12px; }
.factors { margin: 18px 0; }
.factors div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.factors dd { margin: 0; font-variant-numeric: tabular-nums; }
.factors .total { font-weight: 600; }
.comparison-state { font-size: 17px !important; color: var(--teal); margin-top: 16px; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 10px; margin: 18px 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.note { color: var(--muted); }
.squad-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.squad-metrics strong { display: block; font-size: 26px; font-weight: 500; }
.squad-metrics span { font-size: 11px; color: var(--muted); }
.route-flow { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.route-flow a { color: var(--teal); padding-bottom: 5px; border-bottom: 1px solid #dce6e2; font-size: 12px; }
.inventory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.inventory-grid p { margin-top: 14px; font-size: 13px; }
code { display: block; background: #fafafa; padding: 10px; font-size: 11px; overflow-wrap: anywhere; white-space: normal; }
.scenario { border-bottom: 1px solid var(--line); padding: 20px 0; }
.scenario p { margin: 12px 0; }
[id] { scroll-margin-top: 24px; }
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 190px minmax(0,1fr); }
  .sidebar { width: 190px; }
  .sidebar nav a { gap: 12px; padding-left: 12px; font-size: 12px; }
  .workspace { margin-left: 190px; }
  .dashboard-grid, .detail-grid { grid-template-columns: minmax(0,1fr); }
  .dashboard-summary { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; }
  .focus-section { grid-column: 1/-1; }
  .summary-metrics { margin-top: 0; }
  .detail-heading { flex-wrap: wrap; }
  .inventory-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { display: block; height: auto; }
  .topbar-main { padding: 18px 20px; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  h1 { font-size: 24px; }
  .header-actions { width: 100%; gap: 10px; }
  .search { flex: 1; min-width: 0; width: auto; }
  .sidebar { position: static; width: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { min-height: 0; margin: 0 0 8px; padding: 10px 8px 12px; border-right: 0; font-size: 20px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .sidebar nav a { min-height: 34px; padding: 8px; font-size: 11px; gap: 6px; }
  .sidebar nav .icon { width: 16px; height: 16px; }
  .sidebar-foot { display: none; }
  .workspace { margin: 0; }
  main { padding: 26px 20px; }
  .dashboard-grid { gap: 30px; }
  .chart-tabs button { padding-left: 7px; padding-right: 7px; font-size: 12px; }
  .chart-summary { gap: 10px; }
  .chart-summary strong { font-size: 17px; }
  .chart-bars { gap: 12px; }
  .bar-label { font-size: 9px; }
  .dashboard-summary { display: block; padding: 20px; }
  .summary-metrics { margin: 24px 0; }
  .state-row { grid-template-columns: 1fr 1fr 16px; }
  table { min-width: 500px; }
  .page-heading { flex-wrap: wrap; }
  .tabs { flex-wrap: wrap; gap: 16px; }
  .panel-head { flex-wrap: wrap; }
  .evidence-heading { align-items: flex-start; }
  .explanations { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.data-as-of { color: #626262; font-size: 11px; margin-bottom: 22px; }
.data-warning { padding: 14px; border-left: 3px solid #9a722d; background: #fbf5e9; font-size: 12px; }
.data-warning p { margin: 7px 0 0; }
.source-link { color: var(--teal); text-decoration: underline; }
.detail-grid > div { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.meta dd, .lede, .evidence h3 { overflow-wrap: anywhere; }
.table-scroll:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
@media (max-width: 760px) { .dashboard-main, .detail-grid > div { padding: 18px; } }
