@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-400.ttf") format("truetype");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-500.ttf") format("truetype");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-600.ttf") format("truetype");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-700.ttf") format("truetype");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/JetBrainsMono-800.ttf") format("truetype");
}

:root {
  --ink: #1B2337;
  --muted: #51657D;
  --line: #C9D3DE;
  --grid: #E6EAF0;
  --paper: #EFF3F7;
  --panel: #FFFFFF;
  --navy: #1B2337;
  --navy-2: #51657D;
  --blue: #5B7DBE;
  --secondary-blue: #89A9D8;
  --teal: #2E9C9A;
  --deep-teal: #1F6F78;
  --green: #5F9D68;
  --violet: #7C6ACF;
  --gold: #E58B2E;
  --red: #D45452;
  --neutral: #A7B1BC;
  --soft-blue: #EDF4FB;
  --soft-green: rgba(95, 157, 104, .12);
  --soft-gold: rgba(229, 139, 46, .13);
  --shadow: 0 8px 22px rgba(20, 31, 50, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 "JetBrains Mono", "SF Mono", Monaco, Consolas, monospace;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

.container {
  width: min(1320px, calc(100vw - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 254, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--navy);
}

.brand span {
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 5px;
  color: #344054;
}

.nav-links a:hover {
  background: #eef3f8;
}

.menu-button {
  display: none;
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}

.hero {
  background: var(--navy);
  color: #fff;
  border-bottom: 6px solid var(--green);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 32px;
  align-items: end;
  padding: 58px 0 40px;
}

.eyebrow {
  color: #b9d4ca;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 8px 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 820px;
  margin-bottom: 24px;
  color: #d8e2ef;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  color: #eef5ff;
  background: rgba(255, 255, 255, 0.08);
}

.btn.primary {
  color: var(--navy);
  border-color: #d8eadf;
  background: #d8eadf;
  font-weight: 750;
}

.hero-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-stat {
  display: grid;
  gap: 4px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.label,
.hero-stat .label {
  color: var(--muted);
  font-size: 12px;
}

.hero-stat .label {
  color: #c9d6e5;
}

.hero-stat strong {
  font-size: 20px;
  line-height: 1.2;
}

main {
  padding-bottom: 64px;
}

section {
  padding: 34px 0;
}

.band {
  background: #f3f6fa;
  border-top: 1px solid #e7edf4;
  border-bottom: 1px solid #e7edf4;
}

.section-head,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

h2 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 5px;
  color: #263648;
  font-size: 16px;
}

.section-head p,
.panel-head p,
.prose p {
  margin-bottom: 0;
  color: var(--muted);
}

.source-pill {
  max-width: 420px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #344054;
  font-size: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kpi:nth-child(2) {
  border-left-color: var(--blue);
}

.kpi:nth-child(3) {
  border-left-color: var(--gold);
}

.kpi:nth-child(4) {
  border-left-color: var(--teal);
}

.kpi:nth-child(5) {
  border-left-color: var(--violet);
}

.kpi:nth-child(6) {
  border-left-color: var(--red);
}

.kpi-value {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
  align-items: end;
}

.podium-card {
  min-height: 180px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(237,244,251,.96)),
    #fff;
  box-shadow: var(--shadow);
}

.podium-card.rank-1 {
  min-height: 220px;
  border-top: 6px solid var(--teal);
}

.podium-card.rank-2 {
  border-top: 6px solid var(--blue);
}

.podium-card.rank-3 {
  border-top: 6px solid var(--gold);
}

.podium-rank {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.podium-card h3 {
  margin: 14px 0 5px;
  font-size: 18px;
}

.podium-card p {
  color: var(--muted);
}

.podium-score {
  margin: 12px 0;
  color: var(--teal);
  font-size: 34px;
  font-weight: 800;
}

.podium-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.podium-meta span {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-panel .panel-head {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.controls.compact select {
  min-width: 280px;
}

select {
  min-width: 150px;
  height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf0f5;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

td:nth-child(2),
td:nth-child(3),
th:nth-child(2),
th:nth-child(3) {
  text-align: left;
}

.model-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.rank {
  display: inline-flex;
  min-width: 28px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #eef3f8;
  color: var(--ink);
  font-weight: 800;
}

.score {
  color: var(--green);
  font-weight: 800;
}

.grid.two {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(130px, 210px) 1fr 58px;
  gap: 10px;
  align-items: center;
}

.bar-label {
  overflow: hidden;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 13px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edf4;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.bar-value {
  color: var(--ink);
  text-align: right;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.scatter {
  position: relative;
  min-height: 360px;
  border: 1px solid #e7edf4;
  border-radius: 6px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20% 100%,
    #fff;
}

.scatter-point {
  position: absolute;
  width: 14px;
  height: 14px;
  transform: translate(-50%, 50%);
  border: 2px solid #fff;
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.scatter-point:hover,
.scatter-point:focus-visible,
.scatter-point.active {
  z-index: 3;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.shape-circle {
  border-radius: 50%;
}

.scatter-point.shape-diamond {
  transform: translate(-50%, 50%) rotate(45deg);
}

.shape-square {
  border-radius: 3px;
}

.shape-triangle {
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.shape-star {
  clip-path: polygon(50% 0, 61% 34%, 98% 34%, 68% 55%, 79% 90%, 50% 68%, 21% 90%, 32% 55%, 2% 34%, 39% 34%);
}

.shape-hex {
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.shape-plus {
  clip-path: polygon(38% 0, 62% 0, 62% 38%, 100% 38%, 100% 62%, 62% 62%, 62% 100%, 38% 100%, 38% 62%, 0 62%, 0 38%, 38% 38%);
}

.shape-x {
  clip-path: polygon(18% 0, 50% 32%, 82% 0, 100% 18%, 68% 50%, 100% 82%, 82% 100%, 50% 68%, 18% 100%, 0 82%, 32% 50%, 0 18%);
}

.shape-pentagon {
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.scatter-tooltip {
  position: absolute;
  z-index: 6;
  display: none;
  max-width: min(310px, calc(100% - 16px));
  padding: 8px 10px;
  border: 1px solid rgba(27, 35, 55, .18);
  border-radius: 5px;
  background: rgba(27, 35, 55, .95);
  color: #fff;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 8px 18px rgba(20, 31, 50, .2);
  pointer-events: none;
}

.scatter-tooltip.visible {
  display: block;
}

.scatter-axis {
  position: absolute;
  color: var(--muted);
  font-size: 12px;
}

.scatter-axis.x {
  right: 12px;
  bottom: 8px;
}

.scatter-axis.y {
  left: 10px;
  top: 8px;
}

.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: #344054;
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.shape-legend {
  padding-top: 4px;
}

.legend-label {
  color: var(--muted);
  font-weight: 750;
}

.legend-shape {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(27, 35, 55, .18);
  flex: 0 0 auto;
}

.heatmap {
  overflow-x: auto;
}

.heat-row {
  display: grid;
  grid-template-columns: minmax(128px, 1.2fr) repeat(5, minmax(92px, 1fr));
  gap: 4px;
  min-width: 680px;
}

.heat-row + .heat-row {
  margin-top: 4px;
}

.heat-row > * {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 4px;
}

.heat-head > * {
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.heat-cell {
  justify-content: flex-end;
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.distribution-bars,
.dimension-bars,
.mini-board {
  display: grid;
  gap: 9px;
}

.dist-row,
.dim-row {
  display: grid;
  grid-template-columns: 86px 1fr 52px;
  gap: 10px;
  align-items: center;
}

.dist-track,
.dim-track {
  height: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--grid);
}

.dist-track i,
.dim-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary-blue), var(--deep-teal));
}

.radar-wrap {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(180px, .7fr);
  gap: 12px;
  align-items: center;
}

.dimension-context {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.radar {
  width: 100%;
  min-height: 260px;
}

.radar text {
  fill: var(--muted);
  font-size: 11px;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.class-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.class-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.class-title h3 {
  margin: 0;
  font-size: 15px;
}

.class-score {
  color: var(--green);
  font-size: 21px;
  font-weight: 800;
}

.class-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid #dce3ed;
  border-radius: 4px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
}

.mini-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.follow-grid {
  margin-top: 16px;
}

.mini-board-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #E6EAF0;
  border-radius: 5px;
  background: #fff;
}

.mini-board-row div {
  display: grid;
  gap: 3px;
}

.mini-board-row span:not(.rank) {
  color: var(--muted);
  font-size: 12px;
}

.mini-board-row b {
  color: var(--deep-teal);
  font-variant-numeric: tabular-nums;
}

.funnel-view {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.funnel-step {
  min-width: 260px;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary, #5B7DBE), var(--teal));
  color: #fff;
}

.funnel-step:nth-child(2n) {
  --primary: #89A9D8;
}

.funnel-step:nth-child(3n) {
  --primary: #2E9C9A;
}

.funnel-step span {
  font-weight: 700;
}

.funnel-step strong {
  font-size: 18px;
}

.funnel-step em {
  grid-column: 1 / -1;
  font-style: normal;
  opacity: .88;
  font-size: 12px;
}

.artifact-insights {
  overflow-x: auto;
}

.artifact-heatmap {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) repeat(var(--cols), minmax(74px, 1fr));
  gap: 3px;
  min-width: 760px;
}

.artifact-head,
.artifact-model,
.artifact-cell {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.artifact-head {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.artifact-model {
  background: #F7F9FB;
  color: var(--ink);
  font-weight: 700;
}

.artifact-cell {
  justify-content: flex-end;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid #edf0f5;
  border-radius: 5px;
  background: #fbfcfe;
}

.task-row strong {
  display: block;
  margin-bottom: 3px;
}

.task-row span {
  color: var(--muted);
  font-size: 12px;
}

.case-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.case-tab {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #344054;
  cursor: pointer;
}

.case-tab.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.case-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.case-copy {
  display: grid;
  gap: 10px;
}

.case-copy p {
  color: var(--muted);
}

.case-image {
  overflow: hidden;
  border: 1px solid #dce3ed;
  border-radius: 6px;
  background: #f8fafc;
}

.case-image img {
  display: block;
  width: 100%;
  height: auto;
}

.empty-asset {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.prose h3 {
  margin-top: 18px;
}

.prose h3:first-child {
  margin-top: 0;
}

.prose ol {
  margin: 0;
  padding-left: 18px;
  color: #344054;
}

.source-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.source-list div {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 8px;
}

.source-list dt {
  color: var(--muted);
}

.source-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #344054;
}

footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

footer .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid.two,
  .case-panel {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100vw - 24px, 1320px);
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-grid {
    padding: 42px 0 30px;
  }

  .section-head,
  .panel-head {
    flex-direction: column;
  }

  .kpi-grid,
  .class-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .bar-value {
    text-align: left;
  }
}
