/* Shared chrome and palette for the country spinout stories from the
   European Spinouts Report 2026: Dutch (/resources/dutch-spinouts-2026/,
   scripts/build-nl-spinouts-story.mjs) and Swiss
   (/resources/swiss-spinouts-2026/, scripts/build-ch-spinouts-story.mjs). Layered on multiples-chart-base.css,
   which carries the --mv-* tokens and the contract canvas (#F1F4F8).

   One palette, light. No [data-theme="dark"] block and no theme branch:
   charts and embeds are light-only as of 2026-09-22 (CLAUDE.md "Theme
   Guardrails"). Netherlands is the one coloured series on every figure, so a
   reader learns the key once; everything else is the neutral bar. */
:root {
  --nl:        #3E64E0;   /* --series-usa: the hero series on every figure */
  --nl-soft:   rgba(62,100,224,0.16);
  --other:     #B8C2D1;
  --proj:      #D6DCE6;
  --rule:      rgba(15,23,42,0.08);
  --grid:      rgba(16,24,40,0.10);
  --axis:      rgba(16,24,40,0.55);
}

* { box-sizing: border-box; }
/* multiples-chart-base.css centres the card in a 100vh flex body. Inside a
   story iframe that sized itself to its content, the two fed each other and
   the frame height oscillated by a few pixels: the page shook. A plain block
   body that is exactly as tall as its content breaks the loop. */
body { -webkit-font-smoothing: antialiased; min-height: 0; display: block; }

/* Ranking-app style table (countries, Dutch institutes). */
.tbl-wrap { overflow-x: auto; }
.rank-tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.rank-tbl th { font-size: 11px; font-weight: 700; color: var(--mv-text-muted); text-align: right; vertical-align: bottom; padding: 0 8px 8px; border-bottom: 1px solid var(--axis); line-height: 1.2; }
.rank-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--rule); text-align: right; color: var(--mv-text); white-space: nowrap; }
.rank-tbl .c-rk { width: 30px; text-align: left; color: var(--mv-text-muted); font-weight: 700; padding-left: 4px; }
.rank-tbl .c-name { text-align: left; font-weight: 600; }
.rank-tbl th.c-name, .rank-tbl th.c-rk { text-align: left; }
.rank-tbl .c-score { text-align: left; min-width: 116px; }
.rank-tbl .c-score b { font-weight: 800; }
.rank-tbl .sbar { display: inline-block; width: 64px; height: 8px; border-radius: 4px; background: var(--rule); margin-right: 8px; vertical-align: 0; overflow: hidden; }
.rank-tbl .sbar i { display: block; height: 100%; background: var(--other); border-radius: 4px; }
.rank-tbl th.c-num { max-width: 78px; white-space: normal; }
.rank-tbl tr.hero td { background: var(--nl-soft); }
.rank-tbl tr.hero .c-name, .rank-tbl tr.hero .c-rk { color: var(--nl); font-weight: 800; }
.rank-tbl tr.hero .sbar i { background: var(--nl); }
.rank-tbl:not(:has(tr.hero)) .sbar i { background: var(--nl); }
/* Profile links: ink, underlined on hover, open the Dealroom profile. */
.rank-tbl a { color: inherit; text-decoration: none; }
.rank-tbl a:hover { color: var(--nl); text-decoration: underline; }

/* List cards (largest rounds, most valuable, top Signal). */
.list-tbl td { white-space: normal; vertical-align: middle; }
.list-tbl .c-name { font-weight: 700; }
.list-tbl .via { display: block; font-size: 12px; font-weight: 400; color: var(--mv-text-muted); margin-top: 1px; }
.list-tbl .via a { color: inherit; }
.list-tbl .secs { display: block; font-size: 11px; font-weight: 700; color: var(--nl); margin-top: 2px; letter-spacing: .01em; }
.list-tbl .amt-note { display: block; font-size: 11px; color: var(--mv-text-muted); margin-top: 3px; white-space: normal; }
.list-tbl td.c-num { white-space: nowrap; }
.list-tbl .est { display: block; font-size: 11px; color: var(--mv-text-muted); font-weight: 400; }
.list-tbl .c-txt { text-align: left; color: var(--mv-text-sec); white-space: nowrap; }
.list-tbl th.c-txt { text-align: left; }
.list-tbl .c-amt { text-align: left; min-width: 220px; white-space: nowrap; }
.list-tbl th.c-amt { text-align: left; }
.list-tbl .abar { display: inline-block; width: 150px; height: 14px; background: var(--rule); vertical-align: -2px; margin-right: 8px; }
.list-tbl .abar i { display: block; height: 100%; background: var(--nl); }
.list-tbl .sig { display: inline-block; min-width: 42px; padding: 2px 6px; border-radius: 5px; background: var(--nl-soft); color: var(--nl); font-weight: 800; text-align: center; }
.list-tbl .c-status { font-size: 12px; white-space: nowrap; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pane-h { font-family: var(--font-display, 'Source Sans 3', system-ui, sans-serif); font-size: 15px; font-weight: 800; margin: 0 0 8px; color: var(--mv-text); }
.pane-note { font-size: 12px; color: var(--mv-text-muted); margin: 8px 0 0; }

/* Report partner logos beside the Dealroom logo, as in the Spinout Ranking app. */
.brand-row { display: inline-flex; align-items: center; gap: 18px; flex-wrap: nowrap; justify-content: flex-end; flex: none; }
.foot .src { flex: 1 1 auto; min-width: 0; }
.brand-row .partners { display: inline-flex; align-items: center; gap: 16px; padding-right: 18px; border-right: 1px solid var(--rule); }
.brand-row .partners img { display: block; width: auto; }

.seg-toggle { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 12px; border-radius: 9px; background: var(--mv-toggle-bg); }
.seg-toggle button { appearance: none; border: 0; background: transparent; color: var(--mv-text-muted); font: inherit; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.seg-toggle button.on { background: var(--mv-toggle-active); color: var(--mv-text); box-shadow: 0 1px 2px rgba(15,23,42,0.12); }
.period-label { font-size: 12px; font-weight: 700; color: var(--mv-text-muted); margin: 0 0 6px; }
.rank-tbl .up { color: var(--mv-green); font-weight: 800; }
.rank-tbl .down { color: var(--mv-red); font-weight: 800; }
.rank-tbl .cc { font-size: 10px; font-weight: 700; color: var(--mv-text-muted); letter-spacing: .04em; margin-left: 4px; }
.rank-tbl tr.grp td { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mv-text-muted); padding-top: 14px; border-bottom: 1px solid var(--rule); }
.rank-tbl tbody tr.grp:first-child td { padding-top: 8px; }

.card { position: relative; }

/* Title inside the card: the card is the unit people screenshot. An h2, so
   soft rule S4 (h1/#title) still passes. SKILL-Resources.md § "A story whose
   charts are a set". */
h2.dl-title { font-family: var(--font-display, 'Source Sans 3', system-ui, sans-serif); font-size: 21px; font-weight: 800; line-height: 1.25; margin: 0 0 4px; letter-spacing: -0.01em; padding-right: 64px; color: var(--mv-text); }
.sub { font-size: 14px; color: var(--mv-text-muted); margin: 0 0 16px; }

/* PNG download, inside the card, on hover. data-export-hide keeps it out of
   its own capture. */
.dl-png-btn {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  appearance: none; border: 1px solid var(--rule); background: var(--mv-card);
  color: var(--mv-text-muted); font: inherit; font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 7px; cursor: pointer;
  opacity: 0; transition: opacity .15s ease, color .15s ease;
}
.card:hover .dl-png-btn, .dl-png-btn:focus-visible { opacity: 1; }
.dl-png-btn:hover { color: var(--mv-text); }
@media (hover: none) { .dl-png-btn { opacity: 1; } }

/* Column chart (funding by year). */
.cols svg { display: block; width: 100%; height: auto; overflow: visible; }
.cols text { font-family: var(--font-display, 'Source Sans 3', system-ui, sans-serif); }
.cols .yr { font-size: 13px; fill: var(--mv-text-muted); }
.cols .val { font-size: 13px; font-weight: 700; fill: var(--mv-text); }
.cols .val.hero { fill: var(--nl); font-size: 15px; font-weight: 800; }
.cols .val.proj { fill: var(--mv-text-muted); font-weight: 600; }
.cols .gl { stroke: var(--grid); stroke-width: 1; }
.cols .base { stroke: var(--axis); stroke-width: 1; }

/* Ranked rows. One grid for all rows, so every bar starts at the same x. */
.rows { display: grid; grid-template-columns: max-content 1fr; column-gap: 14px; row-gap: 7px; align-items: center; }
.row { display: contents; }
.row .name { font-size: 14px; font-weight: 600; color: var(--mv-text); white-space: nowrap; display: flex; align-items: center; gap: 8px; min-height: 26px; }
.row.hero .name { color: var(--nl); font-weight: 800; }
.rows.plain .row .name { color: var(--mv-text); font-weight: 600; }
.row .track { --aside-w: 190px; display: flex; align-items: center; gap: 10px; height: 22px; position: relative; }
.row .bar { flex: none; height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; min-width: 34px; background: var(--other); }
.row.hero .bar { background: var(--nl); }
.row .bar b { font-size: 12px; font-weight: 800; color: var(--mv-text); white-space: nowrap; }
.row.hero .bar b { color: #FFFFFF; }
.row .aside { font-size: 12px; color: var(--mv-text-muted); white-space: nowrap; }
.row.hero .aside { color: var(--mv-text); font-weight: 600; }
.group-h { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mv-text-muted); margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); }
.group-h:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rank { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 6px; border-radius: 5px; background: var(--nl-soft); color: var(--nl); font-size: 12px; font-weight: 800; }

/* Reference line across the rows (Europe-wide share). */
.refline { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1.5px dashed var(--mv-text); opacity: .55; pointer-events: none; z-index: 1; }
.reflabel { font-size: 12px; color: var(--mv-text-muted); margin: 0 0 10px; }
.reflabel i { display: inline-block; width: 14px; border-top: 1.5px dashed var(--axis); vertical-align: 3px; margin-right: 6px; }

/* Range rows (spinout terms). */
.ranges { display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; row-gap: 14px; align-items: center; }
.ranges .lbl { font-size: 14px; font-weight: 700; color: var(--mv-text); line-height: 1.25; }
.ranges .lbl span { display: block; font-size: 12px; font-weight: 400; color: var(--mv-text-muted); }
.ranges .lbl.hero { color: var(--nl); }
.ranges .scale { position: relative; height: 26px; }
.ranges .scale .note { position: absolute; left: 0; top: 28px; font-size: 12px; color: var(--mv-text-muted); white-space: nowrap; }
.ranges .scale:has(.note) { height: 44px; }
.ranges .seg { position: absolute; top: 3px; height: 20px; border-radius: 10px; background: var(--other); display: flex; align-items: center; justify-content: center; }
.ranges .seg.hero { background: var(--nl); }
.ranges .seg.pt { width: 14px; height: 14px; top: 6px; border-radius: 50%; margin-left: -7px; }
.ranges .seg b { position: absolute; left: calc(100% + 8px); font-size: 12px; font-weight: 800; color: var(--mv-text); white-space: nowrap; }
.ranges .axis { grid-column: 2; position: relative; height: 18px; border-top: 1px solid var(--axis); }
.ranges .axis span { position: absolute; top: 3px; font-size: 11px; color: var(--mv-text-muted); transform: translateX(-50%); }

.foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rule); }
.src { font-size: 12px; color: var(--mv-text-muted); }
.dr-logo svg { width: 110px; height: 26px; display: block; }

@media (max-width: 760px) {
  .pair { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .foot { flex-wrap: wrap; }
  .brand-row { flex: 1 1 100%; min-width: 0; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
  .brand-row .partners { flex-wrap: wrap; gap: 10px 12px; border-right: 0; padding-right: 0; }
  .list-tbl .abar { width: 70px; }
  .card { padding: 18px 14px 12px; border-radius: 10px; }
  h2.dl-title { font-size: 18px; }
  .sub { font-size: 13px; }
  .rows { column-gap: 10px; }
  .row .name { font-size: 12px; }
  .row .aside { display: none; }
  .row .track { --aside-w: 0px; }
  .ranges .lbl { font-size: 12px; }
}
