/* 商路 详情 (inspectors.js renderRoute; human 2026-11-02: "the upper and lower table of 详情 in 商路 should reorganize in a
   better way together, with the pop bar of 商人 under the picture of table the same as 区域"; 2026-11-03: "under 商队, first
   directly show the same 详情 as 城市 … then the bar of pop … Then the two side static, then the rest table"): a caravan's
   eight readings in the city page's cards, the caravan as a jobs-table row with its split bar, the table of the two
   directions, then the other readings in two-column cards. */

/* the title "甲⇄乙" as the city page's (18px, regular; human 2026-11-03: "why didn't match my ui/font design rule?"): its two
   city names are buttons, which would take the panel's 15px and the title's bold */
.route-hero h2 { font-weight: 400; }
.route-hero h2 .inspector-link { font: inherit; }

/* the two directions: a row-head column and one column per direction, the direction's two cities' colours as bars; the
   sizes and weights of the shared table (styles.css .route-good-gap-table: 15px, regular; human 2026-11-03: "fontsize
   wrong, bold font wrong") */
.route-direction-table thead th:first-child { width: 24%; }
/* a long pair of names wraps rather than being cut */
.route-direction-table thead th { padding-inline: 4px; white-space: normal; }
.route-direction-table tbody th { text-align: left; color: var(--muted); }
/* (narrow cell padding: "贸易量(份)" and "1.29m份 | 55.1m币" whole at 15px in the 390px panel) */
.route-direction-table :is(tbody th, td) { padding-inline: 4px; }
.route-direction-name {
  display: inline-block;
  max-width: 100%;
  padding: 0 4px;
  border-left: 4px solid var(--route-a, #c8d0c9);
  border-right: 4px solid var(--route-b, #c8d0c9);
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.route-direction-good { color: var(--good, var(--ink)); }
/* a good's cell: the units carried this way on the left, the coins paid this way for the units coming the other way on the
   right (human 2026-11-03: "115k份 for one column, 16.2m币 should in other column, since import goods is export 币"), so
   the units and the coins line up down the column */
.route-direction-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 4px;
}
.route-direction-pair > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the 340px panel: the coins under the units */
@media (max-width: 1050px) {
  .route-direction-pair { grid-template-columns: minmax(0, 1fr); }
}

/* the caravan: one jobs-table row (as 区域), its bar under it split by home city, each side split by a white dot into those
   left in the city (outside) and those on the way (middle) */
/* (the section, row and meter as the city's jobs table: human 2026-11-03: "you should match exactly as 区域") */
.route-caravan-meter {
  display: flex;
  align-items: center;
  overflow: visible;
}
.route-caravan-meter i {
  flex: none;
  border-radius: 0;
}
.route-caravan-meter i:first-of-type { border-radius: 5px 0 0 5px; }
.route-caravan-meter i:last-of-type { border-radius: 0 5px 5px 0; }
.route-caravan-meter i:only-of-type { border-radius: 5px; }
.route-caravan-meter i.is-away { opacity: 0.72; }
.route-caravan-dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 -4.5px;
  border: 1px solid rgba(60, 64, 58, 0.35);
  border-radius: 50%;
  background: #fff;
}

/* the four numbers under the bar, in their cities' colours, centred at 1/8, 3/8, 5/8 and 7/8 of the bar's width (the row
   starts where the bar starts); "+" at the middle joins the two on the way */
.route-caravan-counts {
  position: relative;
  height: 1.5em;
  margin: 3px 0 0 26px;
  font-family: ui-monospace, Consolas, "Cascadia Mono", monospace;
  font-size: var(--font-medium);
}
.route-caravan-counts span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.route-caravan-counts .route-caravan-plus {
  color: var(--muted);
}

/* the caravan's 货币流入 / 货币流出 muted on a day without a port contact (human 2026-11-03: "the 流入流出 should be grey when
   it's not contact day") */
.route-crew-metrics .metric-row.is-quiet .metric-value { color: var(--muted); }

/* the readings: the route's cards, then the caravan's under a small title */
.route-facts { padding: 0; }
.route-facts-title { padding: 10px 12px 4px; }
.route-facts .route-caravan-empty { padding: 8px 12px; }
