/* Wisor Data Scope — GEODIS Trial */

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/HankenGrotesk-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --acc-50: #EFEBFF; --acc-100: #E1DAFF; --acc-200: #BEADFF;
  --acc-300: #8C70FF; --acc-400: #7350FF; --acc-500: #4620DD;
  --base-0: #FFFFFF; --base-10: #F6F9FC; --base-20: #EBF0F5;
  --base-25: #E0E8F0; --base-50: #CBD6E0; --base-100: #ACB9C5;
  --base-200: #8C9EB1; --base-300: #707F98; --base-400: #2C3A57;
  --base-500: #0A2540;
  --positive-50: #E5F4EB; --positive-500: #1C8642;
  --negative-50: #FBE9E0; --negative-500: #A72C00;
  --warning-100: #FFF3D6; --warning-600: #BF7C03;
  --air-100: #DDEAFF; --air-400: #2A6FDB;
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow-statistics: 0 4px 25px rgba(0, 0, 0, 0.06);
  --shadow-highlight: 0 0 0 1px rgba(115,80,255,0.18), 0 6px 24px rgba(115,80,255,0.10);
  --grad-primary: linear-gradient(95deg, #B700FF -4.52%, #4620DD 44.47%, #4620DD 93.47%);
  --grad-ai-mark: linear-gradient(135deg, #7350FF 24.78%, #453099 100%);
}

html, body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--base-10);
  color: var(--base-500);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 48px 96px;
}

/* ============ HEADER ============ */
.doc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--base-25);
  margin-bottom: 40px;
}
.doc-head h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--base-500);
  margin-bottom: 6px;
}
.doc-head .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acc-400);
  margin-bottom: 12px;
}
.doc-head .subtitle {
  font-size: 16px;
  color: var(--base-300);
  max-width: 580px;
  line-height: 1.5;
}
.doc-head .meta {
  text-align: right;
  font-size: 12px;
  color: var(--base-200);
  line-height: 1.6;
  white-space: nowrap;
}
.doc-head .meta .row { display: flex; gap: 6px; justify-content: flex-end; }
.doc-head .meta strong { color: var(--base-400); font-weight: 600; }
.brand-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.brand-strip img { height: 24px; }
.brand-strip .x { color: var(--base-100); font-size: 14px; }
.brand-strip .client {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--base-500);
  font-size: 16px;
}

/* ============ SECTIONS ============ */
section { margin-bottom: 56px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--base-500);
}
.section-head .num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--acc-400);
  font-variant-numeric: tabular-nums;
}
.section-head .hint {
  font-size: 13px;
  color: var(--base-300);
  margin-left: auto;
}

/* ============ STAT TILES ============ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.stat {
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 12px;
  padding: 18px 20px;
}
.stat .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--base-200);
  margin-bottom: 8px;
}
.stat .value {
  font-size: 30px;
  font-weight: 700;
  color: var(--base-500);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat .sub {
  font-size: 12px;
  color: var(--base-300);
  margin-top: 6px;
}
.stat.accent {
  background: linear-gradient(135deg, #7350FF 0%, #4620DD 100%);
  border-color: transparent;
  color: white;
}
.stat.accent .label, .stat.accent .sub { color: rgba(255,255,255,0.75); }
.stat.accent .value { color: white; }

/* ============ MATRIX TABLE ============ */
.matrix {
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.matrix table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.matrix th, .matrix td {
  padding: 14px 18px;
  text-align: left;
  font-size: 13px;
}
.matrix thead th {
  background: var(--base-10);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--base-300);
  border-bottom: 1px solid var(--base-25);
}
.matrix thead th.imp { border-left: 3px solid var(--acc-200); }
.matrix thead th.exp { border-left: 3px solid var(--air-400); }
.matrix tbody tr { border-top: 1px solid var(--base-20); }
.matrix tbody tr:first-child { border-top: none; }
.matrix tbody td { color: var(--base-400); }
.matrix tbody td.carrier {
  font-weight: 600;
  color: var(--base-500);
  font-size: 14px;
}
.matrix tbody td.num {
  text-align: right;
  font-feature-settings: 'tnum';
  color: var(--base-500);
  font-weight: 500;
}
.matrix tbody td.num.dash { color: var(--base-100); font-weight: 400; }
.matrix tbody td.col-divide { border-left: 1px solid var(--base-20); }
.matrix tfoot td {
  background: var(--base-10);
  font-weight: 700;
  color: var(--base-500);
  border-top: 1px solid var(--base-25);
}
.matrix tfoot td.num { text-align: right; }

/* ============ CARRIER CARDS ============ */
.carrier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.card {
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--base-20);
}
.card-head .carrier-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-head .carrier-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--base-500);
  line-height: 1.15;
}

/* ===== Validity block ===== */
.validity-block {
  background: var(--base-10);
  border: 1px solid var(--base-20);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.validity-block .v-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--base-20);
}
.validity-block .v-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--base-300);
}
.validity-block .v-summary {
  font-size: 12px;
  color: var(--base-300);
  font-variant-numeric: tabular-nums;
}
.validity-block .v-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  max-height: 220px;
  overflow-y: auto;
}
.validity-block .v-rows::-webkit-scrollbar { width: 6px; }
.validity-block .v-rows::-webkit-scrollbar-thumb {
  background: var(--base-25);
  border-radius: 3px;
}
.validity-block .v-row {
  display: grid;
  grid-template-columns: 14px 200px 1fr 120px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 2px 0;
}
.validity-block .v-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  justify-self: center;
  flex-shrink: 0;
}
.validity-block .v-dot.live { background: var(--positive-500); }
.validity-block .v-dot.past {
  background: transparent;
  border: 1.5px solid var(--base-100);
}
.validity-block .v-range {
  color: var(--base-500);
  font-weight: 600;
  white-space: nowrap;
}
.validity-block .v-row .v-meta {
  color: var(--base-300);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.validity-block .v-bar {
  height: 4px;
  background: var(--base-25);
  border-radius: 2px;
  overflow: hidden;
  min-width: 40px;
}
.validity-block .v-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
}
.validity-block .v-fill.live { background: var(--acc-400); }
.validity-block .v-fill.past { background: var(--base-100); }
.card-head .badges { display: flex; gap: 6px; }
.card-head .stats {
  margin-left: auto;
  display: flex;
  gap: 28px;
  font-variant-numeric: tabular-nums;
}
.card-head .stats .stat-mini { text-align: right; }
.card-head .stats .stat-mini .v {
  font-size: 18px;
  font-weight: 700;
  color: var(--base-500);
  line-height: 1;
}
.card-head .stats .stat-mini .l {
  font-size: 11px;
  color: var(--base-200);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge.mode-fcl { background: var(--acc-50); color: var(--acc-500); }
.badge.mode-lcl { background: var(--air-100); color: var(--air-400); }
.badge.dir-imp { background: var(--base-20); color: var(--base-400); }
.badge.dir-exp { background: var(--base-20); color: var(--base-400); }

/* Card body: two-column layout */
.card-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}
.card-body.full { grid-template-columns: 1fr; }

/* Region grid */
.region-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--base-300);
  margin-bottom: 12px;
}
.regions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.region {
  background: var(--base-10);
  border: 1px solid var(--base-20);
  border-radius: 10px;
  padding: 12px 14px;
}
.region-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--base-20);
}
.region-head .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--base-500);
}
.region-head .count {
  font-size: 11px;
  color: var(--base-200);
  font-variant-numeric: tabular-nums;
}
.country-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 6px;
  font-size: 12px;
  color: var(--base-400);
}
.chip .ccode {
  font-size: 10px;
  font-weight: 700;
  color: var(--base-200);
  font-variant-numeric: tabular-nums;
}
.chip .nm { font-weight: 500; }
.chip .ln {
  font-size: 10px;
  color: var(--base-200);
  font-variant-numeric: tabular-nums;
}

/* US ports panel */
.us-panel {
  background: var(--base-10);
  border: 1px solid var(--base-20);
  border-radius: 10px;
  padding: 16px;
  align-self: start;
}
.us-panel .region-label { margin-bottom: 12px; }
.us-ports {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.us-port {
  display: inline-flex;
  flex-direction: column;
  padding: 6px 9px;
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.2;
  min-width: 0;
}
.us-port .code {
  font-weight: 700;
  color: var(--base-500);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.us-port .name {
  font-size: 10px;
  color: var(--base-300);
  margin-top: 1px;
}
.us-port.gateway {
  border-color: var(--acc-200);
  background: var(--acc-50);
}
.us-port.gateway .code { color: var(--acc-500); }

/* Direction header */
.direction-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--acc-50) 0%, transparent 100%);
  border-left: 3px solid var(--acc-400);
  border-radius: 6px;
  margin-bottom: 20px;
}
.direction-banner .arrow {
  font-size: 18px;
  color: var(--acc-400);
}
.direction-banner .text {
  font-size: 14px;
  color: var(--base-400);
}
.direction-banner .text strong {
  color: var(--base-500);
  font-weight: 700;
}

/* ============ LEGEND / FOOTER ============ */
.legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--base-400);
}
.legend h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--base-300);
  margin-bottom: 8px;
}
.legend p { line-height: 1.55; }
.legend code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  background: var(--base-10);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--base-500);
}

.footer-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--base-200);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Responsive — only down to ~880 */
@media (max-width: 980px) {
  .page { padding: 32px 24px 64px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .card-body { grid-template-columns: 1fr; }
  .regions { grid-template-columns: 1fr; }
  .doc-head { flex-direction: column; align-items: flex-start; }
  .doc-head .meta { text-align: left; }
  .doc-head .meta .row { justify-content: flex-start; }
}

/* ============ Tabs ============ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--base-25);
  margin-bottom: 32px;
}
.tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--base-300);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.tab:hover { color: var(--base-500); }
.tab.active {
  color: var(--acc-400);
  border-bottom-color: var(--acc-400);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============ Map shell ============ */
.map-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.map-controls {
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 12px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 28px;
  align-items: center;
}
.control-group { display: flex; flex-direction: column; gap: 8px; }
.control-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--base-300);
}
.seg {
  display: inline-flex;
  background: var(--base-10);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.seg-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--base-300);
  cursor: pointer;
  transition: all 0.15s;
}
.seg-btn:hover { color: var(--base-500); }
.seg-btn.active {
  background: var(--base-0);
  color: var(--base-500);
  box-shadow: var(--shadow-sm);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.carrier-chip {
  padding: 5px 11px;
  background: var(--base-10);
  border: 1px solid var(--base-25);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--base-300);
  cursor: pointer;
  transition: all 0.15s;
}
.carrier-chip:hover { color: var(--base-500); }
.carrier-chip.active {
  background: var(--acc-50);
  border-color: var(--acc-200);
  color: var(--acc-500);
}
.map-stats {
  display: flex;
  gap: 22px;
  padding-left: 24px;
  border-left: 1px solid var(--base-20);
}
.ms-item { text-align: right; font-variant-numeric: tabular-nums; }
.ms-v {
  font-size: 22px;
  font-weight: 700;
  color: var(--base-500);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ms-l {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--base-200);
  margin-top: 4px;
}

/* Grid: map + sidebar */
.map-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  align-items: start;
}
.map-canvas {
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 12px;
  padding: 8px;
  position: relative;
  min-height: 480px;
}
#world-map {
  width: 100%;
  height: auto;
  display: block;
  background: linear-gradient(180deg, #FAFCFE 0%, #F4F8FC 100%);
  border-radius: 8px;
}
#world-map path.country {
  stroke: #FFFFFF;
  stroke-width: 0.6;
  cursor: default;
  transition: fill 0.15s, stroke 0.15s;
}
#world-map path.country.has-data { cursor: pointer; }
#world-map path.country.has-data:hover {
  stroke: var(--acc-500);
  stroke-width: 1.2;
}
#world-map circle.us-port {
  fill: rgba(70, 32, 221, 0.78);
  stroke: white;
  stroke-width: 1;
  cursor: pointer;
  transition: r 0.15s, fill 0.15s, opacity 0.2s;
  mix-blend-mode: multiply;
}
#world-map circle.us-port:hover {
  fill: #B700FF;
  stroke-width: 1.5;
  mix-blend-mode: normal;
}
#world-map circle.us-port.dim { opacity: 0.25; mix-blend-mode: normal; }
#world-map circle.us-port.focused {
  fill: #B700FF;
  stroke-width: 1.8;
  mix-blend-mode: normal;
}
#world-map path.country.dim { opacity: 0.45; }
#world-map path.country.focused {
  stroke: var(--acc-500);
  stroke-width: 1.4;
}

/* Route arcs */
#world-map path.route {
  fill: none;
  stroke: #4620DD;
  stroke-linecap: round;
  pointer-events: none;
}

/* Routes toggle */
.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 14px 3px 3px;
  background: var(--base-10);
  border: 1px solid var(--base-25);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--base-300);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.toggle-btn .tb-knob {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--base-0);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--base-25);
  position: relative;
  transition: all 0.18s;
}
.toggle-btn .tb-knob::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--base-100);
  transition: background 0.18s;
}
.toggle-btn.on {
  background: var(--acc-50);
  border-color: var(--acc-300);
  color: var(--acc-500);
}
.toggle-btn.on .tb-knob {
  background: var(--acc-400);
  border-color: var(--acc-400);
}
.toggle-btn.on .tb-knob::after {
  background: var(--base-0);
}
.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--base-300);
  font-size: 13px;
  background: var(--base-10);
  border-radius: 8px;
  z-index: 1;
}

/* Map legend */
.map-legend {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--base-25);
  border-radius: 8px;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legend-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--base-300);
}
.legend-scale {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 3px;
  overflow: hidden;
}
.ls-band {
  width: 22px;
  height: 10px;
  display: block;
}
.ls-range {
  margin-left: 8px;
  font-size: 11px;
  color: var(--base-400);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--base-400);
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.us-port-dot { background: rgba(70, 32, 221, 0.85); border: 1.5px solid white; box-shadow: 0 0 0 1px var(--base-25); }

/* Sidebar */
.map-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 16px;
}
.side-section {
  background: var(--base-0);
  border: 1px solid var(--base-25);
  border-radius: 12px;
  overflow: hidden;
}
.side-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--base-20);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-weight: 700;
  color: var(--base-500);
  font-size: 14px;
}
.side-cc {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  background: var(--base-10);
  color: var(--base-400);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.side-reset {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--acc-400);
  cursor: pointer;
  padding: 2px 4px;
}
.side-reset:hover { color: var(--acc-500); text-decoration: underline; }
.side-body { padding: 14px 16px; }
.side-empty {
  color: var(--base-300);
  font-size: 13px;
  line-height: 1.55;
}
.side-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--base-20);
  font-variant-numeric: tabular-nums;
}
.ss-v {
  font-size: 28px;
  font-weight: 700;
  color: var(--base-500);
  letter-spacing: -0.02em;
  line-height: 1;
}
.ss-l {
  font-size: 12px;
  color: var(--base-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.side-block { margin-bottom: 14px; }
.side-block:last-child { margin-bottom: 0; }
.sb-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--base-300);
  margin-bottom: 8px;
}
.sb-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--base-200);
  letter-spacing: 0;
  margin-left: 4px;
}
.sb-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.sb-list::-webkit-scrollbar { width: 5px; }
.sb-list::-webkit-scrollbar-thumb { background: var(--base-25); border-radius: 3px; }
.sb-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--base-500);
}
.sb-row:hover { background: var(--base-10); }
.sb-name { color: var(--base-500); }
.sb-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--base-200);
  margin-right: 4px;
}
.sb-num { font-variant-numeric: tabular-nums; color: var(--base-400); font-weight: 500; }
.sb-more {
  margin-top: 6px;
  padding: 4px 6px;
  font-size: 11px;
  color: var(--base-200);
}

/* Top list */
.top-list { padding: 8px 0; }
.top-row {
  display: grid;
  grid-template-columns: 1fr 80px 60px;
  gap: 10px;
  align-items: center;
  padding: 6px 14px;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--base-500);
}
.top-row:hover { background: var(--base-10); }
.tr-name { display: flex; align-items: baseline; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--base-200);
}
.tr-bar {
  height: 5px;
  background: var(--base-20);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.tr-fill {
  display: block;
  height: 100%;
  background: var(--acc-400);
  border-radius: 3px;
}
.tr-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--base-400);
  font-size: 12px;
}

@media (max-width: 1080px) {
  .map-controls { grid-template-columns: 1fr; gap: 16px; }
  .map-stats { padding-left: 0; border-left: none; border-top: 1px solid var(--base-20); padding-top: 16px; justify-content: space-between; }
  .map-grid { grid-template-columns: 1fr; }
  .map-side { position: static; }
}
  body { background: white; }
  .page { padding: 24px; max-width: none; }
  .card, .matrix, .stat { box-shadow: none; }
  section { page-break-inside: avoid; }
}
