/* Data pages ("By the numbers"): stat strips, sortable tables, "as of" lines.
   Structural only: colours, fonts and radius come from the theme's tokens, every rule starts with .vv-.
   STOPGAP: these belong in the plugin as a data-table block and a stat-strip module (see the report);
   the pages use this until they land. */

.vv-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 24px 0 32px; padding: 0; list-style: none; border-top: 2px solid var(--wp--preset--color--brass); border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.vv-stats > li { margin: 0; padding: 16px 16px 16px 0; min-width: 0; }
.vv-stats > li + li { padding-left: 16px; }
.vv-stats > li:nth-child(odd) { padding-left: 0; }
.vv-stats > li:nth-child(n+3) { border-top: 1px solid var(--wp--preset--color--accent-6); }
.vv-stat__n { display: block; font-family: var(--wp--preset--font-family--source-serif); font-weight: 600; font-size: 2rem; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; color: var(--wp--preset--color--contrast); }
.vv-stat__l { display: block; margin-top: 4px; font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.9375rem; line-height: 1.4; color: var(--wp--preset--color--accent-4); }
.vv-stats a { text-decoration: none; color: inherit; display: block; }
.vv-stats a:is(:hover, :focus-visible) .vv-stat__l { text-decoration: underline; }
@media (min-width: 782px) {
	.vv-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.vv-stats > li, .vv-stats > li:nth-child(odd) { padding: 16px 24px; border-top: 0; }
	.vv-stats > li:first-child { padding-left: 0; }
	.vv-stats > li + li { border-left: 1px solid var(--wp--preset--color--accent-6); }
}

.vv-asof { margin: 16px 0 0; font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.875rem; line-height: 1.5; color: var(--wp--preset--color--accent-4); }
.vv-asof a { color: inherit; text-decoration: underline; }
.vv-note { margin: 12px 0 0; font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.9375rem; line-height: 1.55; color: var(--wp--preset--color--accent-4); max-width: 68ch; }

/* The table sits in its own box: it scrolls inside, so a phone never gets a sideways page. */
.vv-tablewrap { margin: 24px 0; }
.vv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 12px; }
.vv-search { flex: 1 1 240px; max-width: 420px; }
.vv-search input { box-sizing: border-box; width: 100%; height: 40px; padding: 0 12px; font: inherit; font-family: var(--wp--preset--font-family--plex-sans); font-size: 1rem; color: var(--wp--preset--color--contrast); background: var(--wp--preset--color--accent-5); border: 1px solid var(--wp--preset--color--accent-4); border-radius: 4px; }
.vv-search input:focus-visible { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 1px; }
.vv-count { margin: 0; font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.9375rem; color: var(--wp--preset--color--accent-4); }
.vv-scroll { overflow: auto; max-height: min(72vh, 720px); border: 1px solid var(--wp--preset--color--accent-6); border-radius: 4px; background: var(--wp--preset--color--accent-5); }
.vv-scroll:focus-visible { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 2px; }
table.vv-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; margin: 0; font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.9375rem; line-height: 1.45; font-variant-numeric: lining-nums tabular-nums; }
.vv-table th, .vv-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.vv-table thead th { position: sticky; top: 0; z-index: 1; padding: 0; background: var(--wp--preset--color--accent-2); border-bottom: 1px solid var(--wp--preset--color--accent-4); font-weight: 600; white-space: nowrap; }
.vv-table thead th > button, .vv-table thead th > span { display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 12px; margin: 0; font: inherit; font-weight: 600; text-align: left; color: var(--wp--preset--color--contrast); background: none; border: 0; border-radius: 0; cursor: pointer; }
.vv-table thead th > span { cursor: default; }
.vv-table thead th > button:is(:hover, :focus-visible) { background: var(--wp--preset--color--accent-6); }
.vv-table thead th > button:focus-visible { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: -2px; }
.vv-table th[aria-sort] > button::after { content: ""; flex: none; width: 0; height: 0; border: 5px solid transparent; }
.vv-table th[aria-sort="ascending"] > button::after { border-bottom: 6px solid currentColor; border-top-width: 0; }
.vv-table th[aria-sort="descending"] > button::after { border-top: 6px solid currentColor; border-bottom-width: 0; }
.vv-table th[aria-sort="none"] > button::after { border: 0; width: 10px; height: 10px; background: linear-gradient(currentColor, currentColor) center / 8px 1px no-repeat; opacity: .5; }
.vv-table tbody tr:last-child td { border-bottom: 0; }
.vv-table tbody tr:hover td { background: var(--wp--preset--color--base); }
.vv-table td[data-num], .vv-table th.vv-numh { text-align: right; }
.vv-table thead th.vv-numh > button { justify-content: flex-end; }
.vv-table td a { color: var(--wp--preset--color--accent-1); text-decoration: underline; text-underline-offset: 2px; }
.vv-table td.vv-sub { color: var(--wp--preset--color--accent-4); }
.vv-table .vv-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 0.8125rem; line-height: 1.5; border: 1px solid var(--wp--preset--color--accent-4); color: var(--wp--preset--color--contrast); white-space: nowrap; }
.vv-table .vv-tag--on { background: var(--wp--preset--color--accent-1); border-color: var(--wp--preset--color--accent-1); color: #fff; }
.vv-more { margin: 12px 0 0; }
.vv-more button { min-height: 40px; padding: 0 16px; font: inherit; font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.9375rem; color: var(--wp--preset--color--contrast); background: var(--wp--preset--color--accent-5); border: 1px solid var(--wp--preset--color--accent-4); border-radius: 4px; cursor: pointer; }
.vv-more button:is(:hover, :focus-visible) { background: var(--wp--preset--color--accent-2); }
.vv-empty { padding: 24px 12px; color: var(--wp--preset--color--accent-4); font-family: var(--wp--preset--font-family--plex-sans); }

/* Facts box on a station, company or person page. */
.vv-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 24px; row-gap: 0; max-width: 760px; margin: 24px 0; padding: 0; border-top: 2px solid var(--wp--preset--color--brass); font-family: var(--wp--preset--font-family--plex-sans); font-size: 1rem; }
.vv-facts > div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding: 10px 0; border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.vv-facts dt { margin: 0; font-weight: 600; color: var(--wp--preset--color--accent-4); }
.vv-facts dd { margin: 0; }
@media (max-width: 480px) { .vv-facts { grid-template-columns: minmax(0, 1fr); } .vv-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* A row of link tiles on the hub. */
.vv-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .vv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .vv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vv-tile { margin: 0; }
.vv-tile > a { display: flex; flex-direction: column; gap: 8px; height: 100%; box-sizing: border-box; padding: 20px; text-decoration: none; color: inherit; background: var(--wp--preset--color--accent-5); border: 1px solid var(--wp--preset--color--accent-6); border-top: 2px solid var(--wp--preset--color--brass); border-radius: 4px; }
.vv-tile > a:is(:hover, :focus-visible) { border-color: var(--wp--preset--color--accent-4); border-top-color: var(--wp--preset--color--brass); }
.vv-tile > a:focus-visible { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 2px; }
.vv-tile__n { font-family: var(--wp--preset--font-family--source-serif); font-weight: 600; font-size: 1.75rem; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.vv-tile__t { font-family: var(--wp--preset--font-family--source-serif); font-weight: 600; font-size: 1.25rem; line-height: 1.25; }
.vv-tile__d { font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.9375rem; line-height: 1.5; color: var(--wp--preset--color--accent-4); }

/* Home strip: the same stats, with a heading row. */
.sm-numbers .vv-stats { margin-top: 12px; }

/* The data pages' reading text keeps a comfortable line length inside the wide column. */
.fgw-data .entry-content > .wp-block-group > :is(p, h2, h3, .vv-note) { max-width: 68ch; }
.fgw-data .entry-content > .wp-block-group > h2 { margin-top: 48px; }
.fgw-data { padding-top: var(--wp--preset--spacing--50); }
.fgw-data .vv-crumb { margin: 0 0 16px; font-family: var(--wp--preset--font-family--plex-sans); font-size: 0.9375rem; color: var(--wp--preset--color--accent-4); }
.fgw-data .vv-crumb a { color: inherit; }
.fgw-data .wp-block-post-title { margin-bottom: 16px; }
.sm-numbers .vv-stats { border-top: 0; }
