/*
 * hosp-pictogram — hospital choice as one pictogram block, after Irene de la Torre's Nobel Prize pictogram
 * (assets/js/charts/hosp-pictogram.js; page chart-lab/hospital-pictogram.html, on the ?bg=blend theme).
 * A flat light panel with square corners; dashed grey gridlines, a solid baseline; bold small chart titles;
 * colours from the page's mood tokens (specialty = --cat-primary, chain = --cat-3, local private = --cat-2,
 * the smallest types = --cat-ghost).
 */
.np-page .chapter { max-width: 1080px; }
.np-intro { max-width: 720px; margin: 7vh auto 32px; }
.np-intro .t-kicker { margin: 0 0 10px; }
.np-intro h1 { font: 400 clamp(32px, 4.4vw, 50px)/1.08 var(--font-display); letter-spacing: -.025em; margin: 0 0 14px; }
.np-intro p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.np-intro a { color: inherit; }

.np {
  position: relative; color: var(--ink);
  background: var(--np-card);
  padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 52px) clamp(20px, 3vw, 32px);
  box-shadow: 0 24px 70px rgba(var(--ink-rgb), .14);
}
/* the header breathes (17 Nov, round 2): kicker 14 · title 18 · dek 30 · legend 28, and looser lines.
   The kicker and the title are written as .np .np-…, so the age chapter's margin reset (.age-chapter h2, p) does not flatten them */
.np-head { max-width: none; margin-bottom: 30px; }   /* the title may use the card's full width (it wrapped at 760px, about 60% of a wide card) */
.np .np-kicker { margin: 0 0 14px; font: 500 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--label-ink); }
.np .np-title { margin: 0 0 18px; font: 400 clamp(26px, 3.2vw, 38px)/1.2 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.np-title em { font-style: normal; color: var(--cat-primary); }
.np-dek { margin: 0; max-width: 70ch; font-size: 16px; line-height: 1.6; color: var(--label-ink); }

.np-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 28px; padding: 0; font-size: 15px; }
.np-legend li { display: inline-flex; align-items: center; gap: 8px; cursor: default; outline: none; transition: opacity .25s; }
.np-legend i { width: 12px; height: 12px; border-radius: 50%; }
.np.has-hot .np-legend li:not(.hot) { opacity: .4; }

.np-svg { display: block; width: 100%; height: auto; overflow: visible; }
.np-ctitle { font: 700 14px var(--font-sans); fill: var(--ink); }
.np-geo-ic { fill: var(--ink); }   /* the metro / non-metro icon beside a chart title */
.np-grid { stroke: var(--label-ink); stroke-dasharray: 2 2; stroke-width: 1px; opacity: .55; }
.np-base { stroke: var(--ink); stroke-width: 1px; }
.np-tick { font: 13px var(--font-sans); fill: var(--label-ink); }
.np-x { font: 14px var(--font-sans); fill: var(--ink); }
.np-spec { font: 700 14px var(--font-sans); fill: var(--cat-primary); }
.np-n { font: 12px var(--font-sans); fill: var(--label-ink); }
.np-note { font: 12px var(--font-sans); fill: var(--cat-primary); }
.np-dot { cursor: pointer; transition: opacity .25s; }
.np-dot.dim { opacity: .1; }
.np-dot:hover { stroke: var(--ink); stroke-width: 1.5px; }

.np-hatch-l { stroke: var(--cat-primary); stroke-width: 1.6px; }
.np-a { mix-blend-mode: multiply; }
.np-a.metro { fill: var(--cat-primary); opacity: .55; }
.np-a.nonmetro { fill: url(#np-hatch); opacity: .9; }
.np-l { fill: none; stroke: var(--cat-primary); stroke-width: 2px; }
.np-l.nonmetro { stroke-dasharray: 5 4; }
.np-p { fill: var(--cat-primary); stroke: var(--np-card); stroke-width: 2px; }
.np-p.nonmetro { fill: var(--np-card); stroke: var(--cat-primary); }
.np-pv { font: 700 13px var(--font-sans); fill: var(--ink); paint-order: stroke; stroke: var(--np-card); stroke-width: 4px; stroke-linejoin: round; }
.np-pv.nonmetro { font-weight: 400; }
.np-end { font: 600 13px var(--font-sans); fill: var(--cat-primary); }
.np-end.nonmetro { font-weight: 400; }
.np-key3 text { font: 13px var(--font-sans); fill: var(--ink); }

.np-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; }
.np-replay { font: 13px var(--font-sans); color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0; padding: 6px 14px; cursor: pointer; }
.np-replay:hover { background: var(--ink); color: var(--np-card); }
.np-src { margin: 0; font-size: 12px; line-height: 1.5; color: var(--label-ink); max-width: 70ch; }

/* the Nobel tooltip: a black box, white text */
.np-tip {
  position: absolute; z-index: 5; pointer-events: none; display: grid; gap: 4px; min-width: 180px;
  padding: 10px 12px; background: #222; color: #fafafa; font-size: 12px; line-height: 1.35;
  opacity: 0; transition: opacity .12s;
}
.np-tip.on { opacity: 1; }
.np-tip b { font-weight: 700; }
.np-tip span { display: flex; align-items: center; gap: 6px; }
.np-tip i { width: 9px; height: 9px; border-radius: 50%; }

@media (width < 640px) {
  .np-legend { font-size: 13px; gap: 8px 16px; margin-bottom: 22px; }
  .np-head { margin-bottom: 24px; }
  .np .np-title { font-size: 25px; margin-bottom: 14px; }
  .np-ctitle { font-size: 13px; }
  .np-x { font-size: 12px; }
  .np-spec { font-size: 12px; }
  .np-n, .np-tick { font-size: 11px; }
}
