/* /report — the skills section (src/skilldemand.js, renderReportPage).
   Loaded by /report alone, after page.css, so the section ships without a
   PAGE_CSS_VERSION bump rewriting every generated page. `rp-sk` prefixed;
   checked against styles.css, page.css (`.sk-` is the /skills pages'), app.js
   and page.js first. Same single 720px measure as the rest of the page.

   A REAL TABLE, so it keeps its lines: one quiet rule between rows. The share
   is the figure a reader compares, so it is raised; the "79 of 215" under it
   is the denominator that makes it a fact, never dropped. Bars are SVG whose
   width is an ATTRIBUTE (the CSP refuses style=), coloured by `color` on the
   cell, as on /insights. */
.rp-sk-sec { margin-top: 44px; max-width: 720px; }
.rp-sk-sec h2 {
  margin: 0 0 10px; font-family: var(--display); font-weight: 600;
  font-size: 21px; line-height: 1.25; letter-spacing: -.02em; color: var(--ink);
}
.rp-sk-d { margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.rp-sk-d strong { color: var(--ink); font-weight: 650; }
.rp-sk-g {
  margin: 28px 0 8px; font-family: var(--display); font-weight: 600; font-size: 16px;
  letter-spacing: -.01em; color: var(--ink);
}

/* The table scrolls inside its own box when it is wider than the screen, never
   the page. It is focusable so a keyboard can scroll it too. */
.rp-sk-wrap { margin: 0 0 30px; overflow-x: auto; }
.rp-sk-wrap:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* fixed layout: the name column takes a set share and the figure columns split
   the rest evenly, so every group's columns line up down the page. */
.rp-sk { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.rp-sk-name { width: 34%; }
.rp-sk-wide .rp-sk-name { width: 20%; }
/* baseline: a name and its figures share their first line. */
.rp-sk th, .rp-sk td { padding: 8px 0; vertical-align: baseline; text-align: left; }
.rp-sk thead th {
  padding: 0 0 7px; font-family: var(--ui); font-size: 12px; font-weight: 500;
  letter-spacing: 0; line-height: 1.35; color: var(--ink-2);
  vertical-align: bottom; border-bottom: 1px solid var(--rule-2);
}
/* The "Full-time roles" heading over its columns: its rule brackets them. */
.rp-sk thead tr + tr th { padding-top: 7px; }
.rp-sk thead th span { font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-sk tbody th {
  padding-right: 14px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere;
}
/* Every figure cell follows the row's own <th>, so `td + td` would miss the
   first column and put it out of line with its header. */
.rp-sk td, .rp-sk thead th:not(:first-child), .rp-sk thead tr + tr th { padding-left: 16px; }
.rp-sk tbody tr + tr > * { border-top: 1px solid var(--rule); }

.rp-sk-v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.rp-sk-v b {
  min-width: 2.4em; font-family: var(--display); font-weight: 600; font-size: 15px;
  letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.rp-sk-v span {
  font-family: var(--ui); font-size: 12.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rp-sk td svg { display: block; width: 100%; height: 4px; margin-top: 6px; color: var(--accent); }
.rp-sk-tr { fill: var(--rule); }

/* Six figure columns leave ~80px each, where "550 of 1,311" would wrap under
   its share in one column and not the next: the wide table always stacks. */
.rp-sk-wide .rp-sk-v, .rp-sk-wide .rp-sk-v b, .rp-sk-wide .rp-sk-v span { display: block; }
.rp-sk-wide td, .rp-sk-wide thead th:not(:first-child), .rp-sk-wide thead tr + tr th { padding-left: 12px; }
/* …and every column's "of N" takes its own line, so the headers match. */
.rp-sk-wide thead th span { display: block; }

/* On a phone every cell stacks the share over its count and the bar goes (at
   this width a 4% bar is a dot that says nothing the figure does not). The
   wide table keeps a readable width and scrolls; its names stay pinned. */
@media (max-width: 600px) {
  .rp-sk-d { font-size: 14.5px; }
  .rp-sk { font-size: 13.5px; }
  .rp-sk-v, .rp-sk-v b, .rp-sk-v span { display: block; }
  .rp-sk-v span { margin-top: 1px; }
  .rp-sk td svg { display: none; }
  .rp-sk-name { width: 36%; }
  .rp-sk-wide { width: 640px; }
  .rp-sk-wide .rp-sk-name { width: 112px; }
  .rp-sk td, .rp-sk thead th:not(:first-child), .rp-sk thead tr + tr th { padding-left: 12px; }
  .rp-sk tbody th { padding-right: 10px; }
  .rp-sk-wide tbody th, .rp-sk-wide thead tr:first-child th:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--bg);
  }
}
