/* Topical Map. Colours come from the theme tokens only. */
.tm-views { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tm-svg { width: 100%; }
.tm-svg-el { display: block; width: 100%; height: auto; max-height: 82vh; max-height: max(560px, 82vh); }
.tm-link { stroke: var(--line); stroke-width: 2; }
.tm-node { cursor: default; }
.tm-node.tm-cl, .tm-node.tm-seed { cursor: pointer; }
.tm-seed circle { fill: var(--accent); }
.tm-seed-t { fill: var(--surface); font-size: 17px; font-weight: 800; }
.tm-cl circle { stroke: var(--surface); stroke-width: 4; }
.tm-cl-t { fill: var(--ink); font-size: 19px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; }
.tm-top-t { fill: var(--muted); font-size: 13px; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.tm-node.sel circle { stroke: var(--ink); stroke-width: 5; }
.tm-dot circle { stroke: var(--surface); stroke-width: 2; }
.tm-k0 circle { fill: var(--chart-1); } .tm-k1 circle { fill: var(--chart-2); } .tm-k2 circle { fill: var(--chart-3); } .tm-k3 circle { fill: var(--chart-4); }
.tm-k4 circle { fill: var(--chart-5); } .tm-k5 circle { fill: var(--chart-6); } .tm-k6 circle { fill: var(--chart-7); } .tm-k7 circle { fill: var(--chart-8); }
.tm-node.tm-c circle { fill: var(--cov-fg); } .tm-node.tm-p circle { fill: var(--gap-fg); } .tm-node.tm-g circle { fill: var(--can-fg); }
.tm-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.tm-badge.tm-c { background: var(--cov-bg); color: var(--cov-fg); }
.tm-badge.tm-p { background: var(--gap-bg); color: var(--gap-fg); }
.tm-badge.tm-g { background: var(--can-bg); color: var(--can-fg); }
.tm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-top: 12px; }
.tm-card { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); border-top: 5px solid var(--k, var(--accent)); background: var(--surface); }
.tm-card.sel { outline: 2px solid var(--accent); }
.tm-card ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.tm-card.tm-k0 { --k: var(--chart-1); } .tm-card.tm-k1 { --k: var(--chart-2); } .tm-card.tm-k2 { --k: var(--chart-3); } .tm-card.tm-k3 { --k: var(--chart-4); }
.tm-card.tm-k4 { --k: var(--chart-5); } .tm-card.tm-k5 { --k: var(--chart-6); } .tm-card.tm-k6 { --k: var(--chart-7); } .tm-card.tm-k7 { --k: var(--chart-8); }
.tm-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
/* The first column of a .tbl has a 300px minimum (tool.css), which is right here: it holds the page idea. Pages are listed one per row, so no card width rules are needed beyond the shared ones. */
.tm-table > thead th:first-child, .tm-table > tbody > tr > td:first-child { min-width: 260px; width: auto; white-space: normal; }

/* Phones and small laptops: each page idea becomes a card */
@media (max-width: 1100px) {
  .tm-table { min-width: 0; display: block; }
  .tm-table > thead { display: none; }
  .tm-table > tbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tm-table > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  .tm-table > tbody > tr > td { display: block; width: auto !important; min-width: 0 !important; padding: 0; border: 0; white-space: normal !important; text-align: left; }
  .tm-table > tbody > tr > td:first-child { grid-column: 1 / -1; }
  .tm-table > tbody > tr > td:not(:first-child)::before { content: attr(data-label); display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
}
.tm-node.tm-n circle { fill: var(--muted); }
