/* Nobel Prize visualisation only.
   Shared page geometry, typography, masthead, source, tabs, methodology and footer
   are defined in ../charts.css. */

.nobel-page{
  --physics:var(--blue);
  --chem:var(--green);
  --medicine:var(--red);
}

html,.nobel-page{overflow-x:clip}
.nobel-page .no-js-note{padding:14px;font:14px var(--sans)}

/* Position the title at the shared podcast title baseline.
   On large screens the plot starts at the same vertical level; the label row aligns
   with the title. Pointer events pass through the non-interactive introduction. */
.nobel-page.editorial-layout main:not(.archive-main){padding-top:0}
.nobel-page .hero{position:relative;display:flex;flex:1 1 auto;flex-direction:column;min-height:0}
.nobel-page .nobel-intro{position:absolute;z-index:2;top:0;left:0;width:310px;max-width:calc(100% - 16px);padding:9px 0 0;pointer-events:none}
.nobel-page .nobel-intro h1{max-width:310px}
.nobel-page .nobel-intro button{pointer-events:auto}
.nobel-page .nobel-subtitle{flex:none;max-width:none;margin:12px 0 0;line-height:1.5}
/* At smaller widths there is no safe empty wedge: place the intro before the plot. */
@media(max-width:1399px){
  .nobel-page .nobel-intro{position:relative;top:auto;left:auto;width:auto;max-width:none;padding:9px 0 0;pointer-events:auto}
  .nobel-page .nobel-intro h1{max-width:900px}
  .nobel-page .nobel-subtitle{margin:10px 0 8px}
}
/* Keep the three rankings and Show all together within the descriptive line. */
.nobel-page .age-explore.chart-tabs{display:flex;align-items:baseline;gap:12px;width:max-content;max-width:none;margin:6px 0 0;border:0;white-space:nowrap}
.nobel-page .age-explore .chart-tab{flex:none;padding:3px 0 4px;font-size:12px;line-height:1.2;white-space:nowrap}
.nobel-page .age-explore .lede-filter.all{margin:0;padding:3px 0 4px;font:600 12px/1.2 var(--sans);color:var(--muted);border-bottom:2px solid transparent;box-shadow:none}
.nobel-page .age-explore .lede-filter.all.active{color:var(--ink);border-bottom-color:var(--ink)}
/* Axis insets. The upper labels line up with the title; the bottom source gap is unchanged. */
.nobel-page .viz-wrap{--nobel-axis-top-inset:26px;--nobel-axis-bottom-inset:28px;position:relative;flex:1 1 auto;min-height:clamp(350px,45vh,600px);width:100%;overflow:hidden}
@media(max-width:1399px){.nobel-page .viz-wrap{--nobel-axis-top-inset:34px}}
.nobel-page #curveCanvas,.nobel-page #viz{position:absolute;inset:0;display:block;width:100%;height:100%}
.nobel-page #curveCanvas{pointer-events:none}
.nobel-page .chart-credit{flex:none;position:static;display:block;text-align:left;white-space:normal}
.nobel-page .chart-credit .method-wrap{white-space:normal}
.nobel-page .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Select disciplines from the descriptive chart subtitle. */
.nobel-page .filter-final{white-space:nowrap}
.nobel-page .lede-filter{appearance:none;border:0;border-radius:0;background:transparent;padding:0 2px;margin:0;font:inherit;font-weight:600;line-height:inherit;cursor:pointer;color:var(--ink);box-shadow:inset 0 -.55em 0 transparent}
.nobel-page .lede-filter.physics{box-shadow:inset 0 -.55em 0 color-mix(in srgb,var(--physics) 22%,transparent)}
.nobel-page .lede-filter.chemistry{box-shadow:inset 0 -.55em 0 color-mix(in srgb,var(--chem) 22%,transparent)}
.nobel-page .lede-filter.medicine{box-shadow:inset 0 -.55em 0 color-mix(in srgb,var(--medicine) 20%,transparent)}
.nobel-page .lede-filter.all{margin-left:5px;color:var(--muted);font-size:.85em;font-weight:400;box-shadow:none;border-bottom:1px solid var(--rule)}
.nobel-page .lede-filter:hover{filter:brightness(.9)}
.nobel-page .lede-filter:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.nobel-page .lede-filter.physics.active{color:var(--physics);box-shadow:inset 0 -.78em 0 color-mix(in srgb,var(--physics) 24%,transparent)}
.nobel-page .lede-filter.chemistry.active{color:var(--chem);box-shadow:inset 0 -.78em 0 color-mix(in srgb,var(--chem) 24%,transparent)}
.nobel-page .lede-filter.medicine.active{color:var(--medicine);box-shadow:inset 0 -.78em 0 color-mix(in srgb,var(--medicine) 22%,transparent)}
.nobel-page .lede-filter.all.active{color:var(--ink);border-bottom-color:var(--ink);box-shadow:none}

/* Curves, axes and pointer interaction. */
.nobel-page .curve{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke;stroke-width:.88;opacity:.2;pointer-events:none}
.nobel-page .curve.physics{stroke:var(--physics)}
.nobel-page .curve.chemistry{stroke:var(--chem)}
.nobel-page .curve.medicine{stroke:var(--medicine)}
.nobel-page .curve.dim{opacity:.012}
.nobel-page .curve.muted{opacity:.018}
.nobel-page .curve.filtered{opacity:.3;stroke-width:1.04}
.nobel-page .curve.focus{opacity:.98;stroke-width:1.95}
.nobel-page .curve.ranked{opacity:.75;stroke-width:1.85}
.nobel-page .curve.ranked.focus{opacity:1;stroke-width:2.7}
.nobel-page .curve:focus-visible{stroke-width:2.8;opacity:1}
.nobel-page .axis-line{stroke:var(--ink);stroke-width:1;opacity:.5}
.nobel-page .tick line{stroke:var(--rule);stroke-width:1}
.nobel-page .tick text{fill:var(--muted);font-size:10px}
.nobel-page .axis-title{fill:var(--muted);font-size:9px;font-weight:700;letter-spacing:.055em;text-transform:uppercase}
.nobel-page .plot-pointer-surface{fill:transparent;pointer-events:all;touch-action:pan-y}
.nobel-page .plot-pointer-surface:focus-visible{outline:none}

/* Nobel-specific popup, distinct from the shared source-line methodology. */
.nobel-page .tip{position:fixed;z-index:30;width:244px;max-width:calc(100vw - 16px);padding:14px 16px 15px;background:var(--paper);color:var(--ink);border:1px solid var(--rule);font-size:12px;line-height:1.4;pointer-events:none;opacity:0;transform:translateY(4px)}
.nobel-page .tip.show{opacity:1;transform:none;pointer-events:none}
.nobel-page .tip.show.pinned{pointer-events:auto}
.nobel-page .tip.show.touch-tracking{pointer-events:none}
.nobel-page .tip-meta{display:flex;align-items:baseline;gap:5px;margin-bottom:8px;font-size:10px;letter-spacing:.045em}
.nobel-page .tip-discipline{color:var(--tip-accent);font-weight:700;text-transform:uppercase}
.nobel-page .tip-age{color:var(--muted)}
.nobel-page .tip-name{display:block;margin:0 0 12px;font-family:var(--serif);font-size:21px;font-weight:400;line-height:1.12;letter-spacing:-.025em}
/* Labels occupy the first row; the years and arrow occupy the second.
   Identical typography for all three values. The centre track fills the space
   between the two date blocks, so its content is horizontally centred. */
.nobel-page .tip-bottom{display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;grid-template-rows:auto auto;row-gap:2px;align-items:baseline}
.nobel-page .tip-fact-label{color:var(--muted);font-size:9px;line-height:1.2;letter-spacing:.045em;text-transform:uppercase}
.nobel-page .tip-value{font:400 19px/1.1 var(--serif);color:var(--ink)}
.nobel-page .tip-bottom > :nth-child(3n + 2){justify-self:center}
.nobel-page .tip-name-link{color:inherit;text-decoration:none}
.nobel-page .tip-name-link .tip-name-text{text-decoration:underline;text-decoration-color:transparent;text-decoration-thickness:1px;text-underline-offset:3px}
.nobel-page .tip-name-link:hover .tip-name-text,.nobel-page .tip-name-link:focus-visible .tip-name-text{text-decoration-color:currentColor}
.nobel-page .tip-name-link:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.nobel-page .tip-external{display:inline-block;width:13px;height:13px;margin-left:5px;color:var(--muted);vertical-align:baseline;overflow:visible}
.nobel-page .tip-external path{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* Allow shorter screens to scroll rather than squeezing the plotting area. */
@media(max-width:720px){
  .nobel-page .nobel-subtitle{font-size:12px;line-height:1.5}
  .nobel-page .age-explore.chart-tabs{gap:10px}
  .nobel-page .viz-wrap{--nobel-axis-top-inset:32px;min-height:320px}
  .nobel-page .tick text{font-size:9px}
}
@media(max-width:380px){
  .nobel-page .viz-wrap{min-height:300px}
  .nobel-page .age-explore.chart-tabs{flex-wrap:wrap;max-width:100%;gap:4px 10px}
}
@media(max-height:560px){.nobel-page .viz-wrap{min-height:270px}}
@media print{.nobel-page .viz-wrap{flex:none;height:570px;min-height:0}}
