/* In the Media + Data Resources (markup generated by tools/build_media_site.py) */
section.media { padding-bottom: 96px; }
.media .lead { max-width: 760px; }
.media h1 { font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: 40px; line-height: 1.2; margin: 0 0 24px; }
.media h2.mh, .media h2.tier { padding-bottom: 0; }
.media h2.mh::after, .media h2.tier::after { content: none; }
.media h2.mh { font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: 26px; margin: 64px 0 18px; }
.media h2.tier { font-family: inherit; font-size: 14px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 72px 0 0; }
/* homepage: four equal highlight tiles and a link to the archive page */
.mosaic.four .hl:first-child { grid-column: auto; grid-row: auto; }
.mosaic.four .hl:first-child img { aspect-ratio: 16/10; }
.mosaic.four .hl:first-child b { font-size: 17px; font-family: inherit; font-weight: 700; }
.mosaic.four .hl:first-child em { font-size: 14px; }
.media-more { margin: 28px 0 0; }

/* Numbers */
.mstats { display: flex; flex-wrap: wrap; gap: 14px 48px; margin: 28px 0 0; }
.mstats b { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 40px; font-weight: 400; color: var(--wcm-red); line-height: 1.05; }
.mstats span { font-size: 13px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); }

/* Outlet wordmarks */
.wall-h { margin: 40px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; }
.wall { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: baseline; padding: 14px 0 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.wall a { font-family: "Source Serif 4", Georgia, serif; font-size: 22px; font-weight: 600; color: #333; letter-spacing: -.2px; white-space: nowrap; }
.wall a:nth-child(-n+4) { font-size: 27px; color: #111; }
.wall a:hover { color: var(--wcm-red); text-decoration: none; }

/* Highlights mosaic */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 16px; margin-top: 28px; }
.hl { display: flex; flex-direction: column; color: var(--ink); min-width: 0; }
.hl:first-child { grid-column: span 2; grid-row: span 2; }
.hl img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-bottom: 4px solid var(--accent); transition: box-shadow .2s ease; }
.hl:first-child img { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
.hl:hover { text-decoration: none; }
.hl:hover img { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.hl span { display: block; padding-top: 7px; }
.hl small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; }
.hl b { display: block; font-size: 17px; line-height: 1.2; }
.hl:first-child b { font-size: 24px; font-family: "Source Serif 4", Georgia, serif; font-weight: 600; }
.hl em { font-style: normal; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hl:hover em { color: var(--wcm-red); }
.hl:first-child em { font-size: 16px; }

/* Study index */
.sindex { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sx { display: flex; gap: 12px; align-items: center; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--accent); padding: 10px 12px; border-radius: 4px; transition: box-shadow .2s ease; }
.sx:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.sx img { width: 96px; height: 60px; object-fit: cover; object-position: top; flex: 0 0 auto; border: 1px solid var(--rule); }
.sx.cov img { width: 46px; height: 60px; }
.sx span { display: block; min-width: 0; }
.sx b { display: block; font-size: 16px; line-height: 1.2; }
.sx i { display: block; font-style: normal; font-size: 13px; color: var(--wcm-red); font-weight: 600; }
.sx em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx.minor { padding: 8px 12px; }

/* Sticky study nav (follows the reader through the study sections) */
.mnav { position: sticky; top: 77px; z-index: 5; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--rule); margin-top: 48px; backdrop-filter: blur(4px); }
.mnav .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.mnav a { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--muted); padding: 4px 12px; border-radius: 16px; }
.mnav a:hover { text-decoration: none; color: var(--ink); background: var(--tint); }
.mnav a.on { background: var(--wcm-red); color: #fff; }

/* Study block */
.study { margin-top: 36px; padding-top: 6px; scroll-margin-top: 140px; }
.shead { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 3px solid var(--accent); }
.scov { display: flex; gap: 10px; flex: 0 0 auto; }
.scov img { width: 80px; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.shead > div:last-child { flex: 1 1 0; min-width: 0; }
.stag { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #fff; background: var(--accent); padding: 1px 9px; border-radius: 3px; margin-bottom: 5px; }
.shead .jr { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--accent); }
.shead h3 { font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: clamp(19px, 12px + 1vw, 24px); line-height: 1.22; margin: 2px 0 4px; text-wrap: balance; }
.shead h3 a { color: var(--ink); }
.shead h3 a:hover { color: var(--wcm-red); text-decoration: none; }
.shead .also { margin: 0 0 4px; font-size: 15px; }
.shead .also .jr { display: inline; margin-right: 6px; }
.shead .also a { color: var(--ink); }
.shead .impact { display: block; font-size: 15.5px; line-height: 1.45; color: #444; margin: 4px 0 6px; max-width: 880px; text-wrap: pretty; }
.shead .plinks { margin: 0; font-size: 14px; font-weight: 600; display: flex; gap: 6px 18px; flex-wrap: wrap; }
.study:not(.feat) .shead { border-bottom-width: 2px; padding-bottom: 12px; margin-bottom: 5px; }
.study:not(.feat) .shead h3 { font-size: clamp(18px, 12px + .6vw, 20px); }
.study:not(.feat) .impact { font-size: 15px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }   /* a study shows up to 3 cards: keep them on one row */
.mc-card { background: #fff; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,.06); scroll-margin-top: 140px; }
.mc-card .img { display: block; aspect-ratio: 16/9; background: #eee; overflow: hidden; border-bottom: 1px solid var(--rule); }
.mc-card .img img, .mrow .img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; color: #fff; font-size: 20px; font-family: "Source Serif 4", Georgia, serif; }
.mc-card .tx { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.src { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.src b { font-size: 15px; }
.src i { font-style: normal; font-size: 13px; color: var(--muted); }
.mc-card h4 { margin: 0; font-size: 16.5px; line-height: 1.25; font-weight: 600; }
.mc-card h4 a { color: var(--ink); }
.mc-card h4 a:hover { color: var(--wcm-red); }
.mc-card p, .mrow p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #444; }
.bd { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--tint); color: var(--muted); white-space: nowrap; }
blockquote { margin: 6px 0 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent, var(--wcm-red)); color: #333; font-size: 14.5px; line-height: 1.45; font-style: italic; }
.mimg { display: block; margin-top: 6px; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; max-height: 110px; }
.mimg img { width: 100%; display: block; }
.lk { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-weight: 600; align-items: baseline; }
.lk .sv { font-weight: 400; font-size: 13px; color: var(--muted); display: inline-flex; gap: 10px; flex-wrap: wrap; }
.lk .sv a { color: var(--muted); border-bottom: 1px dotted #aaa; }
.lk .sv a:hover { color: var(--wcm-red); text-decoration: none; }

/* Compact rows (expand for image + summary) */
.rows { margin-top: 18px; }
.rows-h { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 0 0 4px; }
.mrow { border-bottom: 1px solid var(--rule); scroll-margin-top: 140px; }
.mrow > summary { cursor: pointer; list-style: none; padding: 9px 0 9px 22px; position: relative; display: grid; grid-template-columns: 210px 92px 1fr auto; gap: 2px 14px; align-items: baseline; font-size: 16px; }
.mrow > summary::-webkit-details-marker { display: none; }
.mrow > summary::before { content: "+"; position: absolute; left: 2px; top: 8px; color: var(--wcm-red); font-weight: 700; }
.mrow[open] > summary::before { content: "\2212"; }
.mrow > summary:hover .t { color: var(--wcm-red); }
.mrow .o { font-weight: 700; line-height: 1.3; }
.mrow .d { color: var(--muted); font-size: 14px; }
.mrow summary .bd + .bd { grid-column: 4; }
.mrow .mrb { display: grid; grid-template-columns: 300px 1fr; gap: 18px; padding: 6px 0 18px 22px; }
.mrow .mrb > div { display: flex; flex-direction: column; gap: 6px; }
.mrow .img { display: block; aspect-ratio: 16/10; border: 1px solid var(--rule); overflow: hidden; background: #eee; }

.mnote { font-size: 13.5px; color: var(--muted); margin-top: 64px; max-width: 820px; }

/* Data resources */
.resources { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.res { display: flex; flex-direction: column; background: #fff; color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.res:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.rimg { display: block; aspect-ratio: 16/9; overflow: hidden; background: #eee; border-bottom: 1px solid var(--rule); }
.rimg img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.rtx { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.rtx small { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--wcm-red); font-weight: 700; }
.rtx b { font-size: 18px; }
.rtx span { font-size: 15px; color: var(--muted); }

@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .hl:first-child { grid-column: span 2; grid-row: auto; }
  .hl:first-child img { aspect-ratio: 16/10; }
  .hl b { font-size: 15px; }
  .mnav { top: 0; }
  .shead { gap: 14px; }
  .scov img { width: 64px; }
  .mrow .mrb { grid-template-columns: 1fr; }
  .mrow > summary { grid-template-columns: auto 1fr; }
  .mrow .t { grid-column: 1 / -1; }
  .mrow summary .bd { display: none; }
  .wall a, .wall a:nth-child(-n+4) { font-size: 19px; }
  .mstats b { font-size: 32px; }
}

/* several papers in one study header: equal weight */
.shead .pp { margin: 2px 0 6px; font-family: "Source Serif 4", Georgia, serif; font-size: clamp(16.5px, 12px + .5vw, 18px); line-height: 1.3; }
.shead .pp .jr { display: block; }
.shead .pp a { color: var(--ink); }
.shead .pp a:hover { color: var(--wcm-red); text-decoration: none; }
/* small closing tile (print front page) */
.hl.mini { align-self: start; }
.hl.mini img { aspect-ratio: 16/9; max-width: 75%; }
.hl.mini b { font-size: 14px; }
.hl.mini em { font-size: 12.5px; }

/* resource inventory labels */
.res .rmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.res .rmeta i { font-style: normal; font-size: 12px; font-weight: 600; color: #555; border: 1px solid var(--rule); border-radius: 3px; padding: 0 6px; background: #fff; }
.more-res { margin-top: 22px; font-size: 16px; }
.more-res summary { cursor: pointer; font-weight: 700; color: var(--wcm-red); }
.more-res ul { margin: 10px 0; padding-left: 20px; }
.more-res li { margin: 4px 0; }
.more-res li span { color: var(--muted); font-size: 15px; }

/* Folding coverage lists (assets/media-fold.js; only active when the script adds .folding) */
#media.folding { overflow-anchor: none; }
#media.folding .sbody { overflow: hidden; }
/* folding is visual only: folded text stays in the page text and accessibility tree for screen readers and AI agents */
#media.folding .study:not(.open) .sbody { height: 0; opacity: 0; }
.sfold::after { display: inline-block; transition: transform .35s ease; }
@media (prefers-reduced-motion: reduce) { .sfold::after { transition: none; } }
.sfold { display: inline-block; align-self: flex-start; width: auto; margin-top: 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: #fff; border: 1px solid var(--accent); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.sfold:hover { background: var(--accent); color: #fff; }
.sfold::after { content: "\25BE"; margin-left: 5px; }
.study.open .sfold::after { transform: rotate(180deg); }
.fold-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 36px 0 0; font-size: 13.5px; color: var(--muted); }
.fold-bar label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.fold-bar button { font: inherit; font-size: 13px; color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 3px 10px; cursor: pointer; }
.fold-bar button:hover { border-color: var(--wcm-red); color: var(--wcm-red); }
@media (max-width: 560px) {
  /* phones: one small cover floated beside the text so the heading uses the full width */
  .shead { display: block; }
  .scov { float: left; margin: 2px 12px 4px 0; }
  .scov img + img { display: none; }
  .scov img { width: 52px; }
  .shead::after { content: ""; display: block; clear: both; }
}
/* long summaries and quoted passages are trimmed on the cards (full text stays in the page and in media.json) */
.mc-card blockquote { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.mc-card .tx > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.mc-card .mimg { max-height: 72px; }
@media (max-width: 900px) { .grid { gap: 12px; } .mc-card .tx { padding: 8px 10px 10px; } .mc-card h4 { font-size: 15.5px; } .mc-card p { font-size: 14px; } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
