:root {
  --ink: #161616;
  --soft: #4d4d4d;
  --muted: #7a7a7a;
  --line: #dcdcd7;
  --paper: #ffffff;
  --tint: #f5f4f0;
  --accent: #a63d1f;
  --serif: "IBM Plex Serif", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Menlo, Consolas, monospace;
  --wrap: 1040px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Header */
#progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; z-index: 20; }
.site-header { border-bottom: 1px solid var(--ink); position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: box-shadow .3s; view-transition-name: header; }
html.scrolled .site-header { box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.site-header .wrap { transition: padding .3s; }
html.scrolled .site-header .wrap { padding-top: 14px; padding-bottom: 10px; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 22px; font-weight: 600; text-decoration: none; }
.nav { display: flex; gap: 26px; }
.nav a { font-size: 15px; text-decoration: none; color: var(--soft); }
.nav a:hover, .nav a.active { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.label { font-family: var(--mono); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); }
.label a { color: var(--accent); text-decoration: none; }

/* Home intro */
.intro { border-bottom: 1px solid var(--line); }
.intro .wrap { padding-top: 56px; padding-bottom: 44px; }
.intro h1 { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.15; margin: 0 0 18px; max-width: 760px; }
.intro-text { font-size: 19px; color: var(--soft); max-width: 680px; margin: 0 0 12px; }
.intro-more { margin: 0; font-size: 15px; }

/* Blocks */
.block { padding: 40px 0 48px; }
.block-chart { background: var(--tint); border-top: 1px solid var(--line); }
.block-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.block-head h2 { font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin: 0; }
.block-head a { font-size: 14px; }

.page-head + .block { padding-top: 0; }
.page-head + .block .rows { border-top: 1px solid var(--ink); }

/* Rows (research list) */
.row { position: relative; display: grid; grid-template-columns: 90px 1fr 240px; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: start; }
.row:hover h3, .row:hover h3 a { color: var(--accent); }
.row-link { text-decoration: none; }
.row-link::after { content: ""; position: absolute; inset: 0; }
.row-actions { position: relative; z-index: 1; display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; font-weight: 500; }
.row-actions a { text-decoration-color: var(--line); }
.pdf-link { color: var(--accent); }
.pdf-link span { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.row-date { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.row h3 { font-family: var(--serif); font-size: 23px; line-height: 1.3; font-weight: 600; margin: 6px 0 8px; }
.row p { margin: 0; color: var(--soft); font-size: 16px; }
.row-art svg { display: block; width: 100%; height: auto; }
.now { margin-top: 22px; font-size: 15px; color: var(--soft); }
.now .label { margin-right: 10px; }

/* Figures */
.figure { margin: 18px 0 30px; }
.figure-wide { margin: 18px 0 0; }
.fig-title { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Page head */
.page-head .wrap { padding-top: 48px; padding-bottom: 28px; }
.page-head h1 { font-family: var(--serif); font-size: 40px; font-weight: 600; margin: 0 0 12px; }
.page-head p { font-size: 18px; color: var(--soft); max-width: 720px; margin: 0; }
.filters { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.filters button { font: 500 14px var(--sans); background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 7px 14px; cursor: pointer; }
.filters button span { color: var(--muted); margin-left: 4px; font-family: var(--mono); font-size: 12px; }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters button.on span { color: #bdbdbd; }

/* Report */
.report-head { padding: 48px 0 26px; max-width: 820px; }
.report-head h1 { font-family: var(--serif); font-size: 40px; line-height: 1.17; font-weight: 600; margin: 12px 0 16px; }
.byline { font-size: 15px; color: var(--soft); }
.facts { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.fact { padding: 16px 14px 16px 0; }
.fact-num { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.fact-label { font-size: 13px; color: var(--muted); }
.report-body { max-width: 700px; padding: 12px 0 64px; }
.report-body h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 36px 0 12px; }
.report-body p, .report-body li { font-size: 17px; }
.report-body ol { padding-left: 22px; }
.report-body li { margin-bottom: 6px; }
.view { margin: 0; border-left: 3px solid var(--accent); padding: 4px 0 4px 22px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.6; }
.sources { font-size: 15px; color: var(--soft); padding-left: 18px; }
.pdf-frame { width: 100%; height: 820px; border: 1px solid var(--line); }

/* About */
.prose { max-width: 700px; }
.prose p { font-size: 18px; margin: 0 0 20px; }
.prose h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 44px 0 12px; }
.note { font-size: 15px; color: var(--soft); border-top: 1px solid var(--line); padding-top: 16px; }
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.contact-list li { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list li span { width: 90px; color: var(--muted); font-family: var(--mono); font-size: 13px; padding-top: 3px; }

/* Footer */
.site-footer { border-top: 1px solid var(--ink); font-size: 14px; color: var(--soft); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 30px; flex-wrap: wrap; }

/* Motion */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .25s ease both; }
::view-transition-new(root) { animation: vt-in .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

h1.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
h1.split .w > span { display: inline-block; animation: word-up .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d); }
@keyframes word-up { from { transform: translateY(105%); opacity: 0; } }

html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--stagger, 0ms); }
html.js .reveal.in { opacity: 1; transform: none; }

html.js .chart .bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 90ms + 150ms); }
html.js .chart .val { opacity: 0; transition: opacity .5s ease; transition-delay: calc(var(--i) * 90ms + 700ms); }
html.js .chart.in .bar { transform: scaleY(1); }
html.js .chart.in .val { opacity: 1; }

.row { transition: background .25s, padding .25s; }
.row h3 { transition: color .2s; }
.row:hover { background: var(--tint); padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
.row:hover .bar { filter: brightness(.92); }
.nav a { transition: color .2s; }
.filters button { transition: background .2s, color .2s, border-color .2s; }
#rows .row { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .chart .bar { transform: none; }
  html.js .chart .val { opacity: 1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .intro h1, .page-head h1, .report-head h1 { font-size: 30px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .row-art { max-width: 280px; margin-top: 10px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .pdf-frame { height: 560px; }
}
