/* Article "Why do women live longer than men?" (/articles/why-women-live-longer/), on top of style.css and
   articles.css. Men are blue (--s1), women orange (--s2) on every chart. Classes start with .wl-. */

.wl-plot-scatter { min-height: 300px; }
.wl-plot-bells, .wl-plot-ages { min-height: 220px; }
.wl-plot-dec { min-height: 300px; }
.wl-plot-pairs { min-height: 0; }
.wl-plot-scatter svg, .wl-plot-bells svg, .wl-plot-ages svg, .wl-plot-dec svg { display: block; width: 100%; }
.wl-plot-scatter svg, .wl-plot-bells svg { cursor: pointer; }
.wl .wl-set, .wl .wl-span { margin-top: 4px; }

/* the controls above a chart: the country to mark, the year slider */
.wl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 12px; padding-right: 46px; }   /* room for the full-screen button */
.wl-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.wl-pick .dd { padding: 3px 11px; }
.wl-pick select { font: 600 15px var(--font); color: var(--ink); background: transparent; border: 0; padding: 2px 0; margin: 0; cursor: pointer; max-width: 46vw; }
.wl-pick select:focus { outline: none; }
.wl-pick .dd:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.wl-year { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; }
.wl-year input[type="range"] { flex: 1 1 auto; min-width: 80px; accent-color: var(--solid, var(--ink)); cursor: pointer; }
.wl-year output { font: 650 19px/1 var(--mono); color: var(--ink); min-width: 4ch; text-align: right; }
.wl .wl-play { padding: 9px 14px; font-size: 14.5px; white-space: nowrap; }

/* legends with round swatches */
.wl-legend svg { width: 12px; height: 12px; }

/* every country as a dot */
.wl-dot { fill: var(--s1); fill-opacity: 0.5; stroke: var(--surface); stroke-width: 0.8; }
.wl-dot.wl-below { fill: var(--s2); fill-opacity: 0.85; }
.wl-dot.wl-on { fill-opacity: 0.95; stroke: var(--ink); stroke-width: 2; }
.wl-dot.wl-hov { fill-opacity: 0.9; stroke: var(--ink); stroke-width: 1.4; }
.wl-diag { stroke: var(--ink); stroke-width: 1.4; opacity: 0.7; }
.wl-diag.wl-par { stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.4; }
.wl-diag-t { fill: var(--muted); font: 500 11px/1 var(--font); }
.wl-ax { fill: var(--muted); font: 600 11.5px/1 var(--font); }
.wl-lab { fill: var(--ink-2); font: 500 11.5px/1 var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.wl-lab-on { fill: var(--ink); font-weight: 700; font-size: 12.5px; }

/* dumbbells */
.wl-m { fill: var(--s1); stroke: var(--surface); stroke-width: 1.4; }
.wl-f { fill: var(--s2); stroke: var(--surface); stroke-width: 1.4; }
.wl-bell { stroke: var(--axis, var(--muted)); stroke-width: 3; stroke-linecap: round; opacity: 0.7; }
.wl-name { fill: var(--ink-2); font: 500 12.5px/1 var(--font); }
.wl-name-on { fill: var(--ink); font-weight: 700; }
.wl-val { fill: var(--muted); font: 500 11px/1 var(--mono); }
.wl-gap { fill: var(--ink); font: 650 12.5px/1 var(--mono); }
.wl-row-on { fill: var(--hover, rgba(127, 127, 127, 0.12)); }
.wl-sep { stroke: var(--axis, var(--muted)); stroke-width: 1; stroke-dasharray: 2 4; }
@media (max-width: 640px) { .wl-name { font-size: 11.5px; } .wl-gap { font-size: 11.5px; } .wl-diag-t { font-size: 10px; } .wl-lab { font-size: 10.5px; } .wl-lab-on { font-size: 11.5px; } }

/* the gap by year: the marked country's own line */
.ln.wl-pk { stroke: var(--ink); stroke-width: 3; }
.dot.wl-pk { fill: var(--ink); }

/* men's death rate as a multiple of women's */
.wl-one { stroke: var(--ink); stroke-width: 1.4; opacity: 0.7; }
.wl-a-bar { stroke: var(--s1); stroke-width: 4; stroke-linecap: round; opacity: 0.35; }
.wl-a-w { fill: var(--surface); stroke: var(--s6); stroke-width: 2.2; }
.wl-a-c { fill: var(--s1); stroke: var(--surface); stroke-width: 1.4; }
.wl-tip-h { margin-top: 6px; }

/* the gap by the age group it comes from */
.wl-area { fill-opacity: 0.88; stroke: var(--surface); stroke-width: 0.5; stroke-linejoin: round; }
.wl-g0 { fill: var(--s1); } .wl-g1 { fill: var(--s2); } .wl-g2 { fill: var(--s3); } .wl-g3 { fill: var(--s4); } .wl-g4 { fill: var(--s5); } .wl-g5 { fill: var(--s6); }

/* a hundred pairs */
.wl-pairs { display: flex; flex-wrap: wrap; gap: 22px 56px; padding: 6px 2px 2px; }
.wl-pair { flex: 1 1 220px; min-width: 0; max-width: 300px; }
.wl-pair-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; }
.wl-pair-h b { font: 700 26px/1 var(--mono); color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.wl-pair-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.wl-pair-grid i { display: block; aspect-ratio: 1; border-radius: 22%; }
.wl-p-m { background: var(--s1); }
.wl-p-f { background: var(--s2); opacity: 0.55; }
.sw-sq.wl-p-f { opacity: 0.55; }

/* the table of every country */
.wl-table th button { all: unset; cursor: pointer; font: inherit; color: inherit; }
.wl-table th button:hover { color: var(--ink); text-decoration: underline; }
.wl-table th[aria-sort="ascending"] button::after { content: " ↑"; }
.wl-table th[aria-sort="descending"] button::after { content: " ↓"; }
.wl-table td:first-child { color: var(--muted); }
.wl-table tr.wl-tr-on > * { background: var(--hover, rgba(127, 127, 127, 0.12)); font-weight: 650; }
.wl .art-details .table-wrap { max-height: 70vh; overflow: auto; }
