/* Shared styles for the four story charts at /resources/scientist-founders/,
   generated by scripts/build-scientist-founders.mjs. Tokens and the canvas
   come from multiples-chart-base.css; light only. */
body { padding: 0; display: block; min-height: 0; }
[hidden] { display: none !important; }
.card { position: relative; max-width: none; }
h2.chart-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; padding-right: 64px; }
.subtitle { margin: 6px 0 16px; }
.note { margin: 4px 0 0; font-size: 12px; color: var(--mv-text-muted); }

/* View pills: two groups in one [data-chart-toolbar-controls] node */
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--mv-toggle-bg); }
.seg-btn { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--mv-text-muted); }
.seg-btn.active { background: var(--mv-toggle-active); color: var(--mv-text); box-shadow: 0 1px 2px var(--mv-grid); }

/* Line chart */
.line-svg { display: block; width: 100%; height: auto; overflow: visible; }
.line-svg .grid { stroke: var(--mv-border); stroke-width: 1; }
.line-svg .ytick { fill: var(--mv-text-muted); font-size: 12px; text-anchor: end; font-variant-numeric: tabular-nums; }
.line-svg .xtick { fill: var(--mv-text-muted); font-size: 12px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.line-svg .ln { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.line-svg .ln.dash { stroke-dasharray: 4 5; }
.line-svg .pt { stroke: var(--mv-card); stroke-width: 1.5; cursor: default; }
.line-svg .l-dtls { stroke: var(--mv-blue); }
.line-svg .pt.l-dtls, .line-svg .end-v.l-dtls { fill: var(--mv-blue); }
.line-svg .l-vc { stroke: var(--mv-green); }
.line-svg .pt.l-vc, .line-svg .end-v.l-vc { fill: var(--mv-green); }
.line-svg .l-mba { stroke: var(--mv-purple); }
.line-svg .pt.l-mba, .line-svg .end-v.l-mba { fill: var(--mv-purple); }
.line-svg .l-all { stroke: var(--mv-text-muted); }
.line-svg .pt.l-all, .line-svg .end-v.l-all { fill: var(--mv-text-muted); }
.line-svg .ln.l-all { stroke-width: 2.25; opacity: .75; }
.line-svg .end-v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.line-svg .end-l { fill: var(--mv-text); font-size: 13px; font-weight: 700; }
.line-svg .end-s { fill: var(--mv-text-muted); font-size: 11.5px; }

/* Ranked tables */
.table { display: grid; grid-template-columns: 28px minmax(150px, 1.1fr) 110px minmax(260px, 2.6fr); column-gap: 16px; }
.t-row { display: contents; }
.t-row > span { padding: 10px 0; border-bottom: 1px solid var(--mv-border); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.t-head > span { padding: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mv-text-muted); }
.rk { font-size: 13px; font-weight: 700; color: var(--mv-text-muted); font-variant-numeric: tabular-nums; }
.co b { font-size: 15px; font-weight: 800; color: var(--mv-text); line-height: 1.2; }
.meta { font-size: 12px; color: var(--mv-text-muted); margin-top: 2px; }
.m b { font-size: 18px; font-weight: 800; color: var(--mv-text); font-variant-numeric: tabular-nums; line-height: 1; }
.fs { gap: 3px; }
.f { font-size: 13px; line-height: 1.35; color: var(--mv-text-sec); }
.f b { color: var(--mv-text); font-weight: 700; }
.f .bg { color: var(--mv-text-muted); }
.f.more { font-size: 12px; color: var(--mv-text-muted); }

.tip { position: fixed; z-index: 10; max-width: 300px; pointer-events: none; opacity: 0; background: var(--mv-card); border: 1px solid var(--mv-border); border-radius: 8px; box-shadow: 0 6px 20px var(--mv-grid); padding: 9px 11px; font-size: 12.5px; line-height: 1.45; color: var(--mv-text-sec); transition: opacity .1s; }
.tip b { display: block; margin-bottom: 3px; font-size: 13px; color: var(--mv-text); }
.footer svg.dr-logo { width: 110px; height: 26px; }
.dr-logo-wrap { display: inline-flex; }

.dl-png-btn {
  position: absolute; top: 16px; right: 18px; z-index: 5;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 7px; cursor: pointer;
  font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--mv-toggle-bg); color: var(--mv-text-muted); border: 1px solid var(--mv-border);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.card:hover .dl-png-btn, .dl-png-btn:focus-visible { opacity: 1; pointer-events: auto; }
.dl-png-btn[disabled] { opacity: 1; cursor: progress; }
.dl-png-btn svg { width: 12px; height: 12px; }

@media (max-width: 640px) {
  h2.chart-title { font-size: 20px; padding-right: 0; }
  .table { grid-template-columns: 22px 1fr 84px; column-gap: 10px; }
  .t-head > span:nth-child(4) { display: none; }
  .t-row > .fs { grid-column: 2 / -1; padding-top: 0; }
  .t-row > .co, .t-row > .m, .t-row > .rk { border-bottom: 0; padding-bottom: 4px; }
}
