/* Crisp Epoch/editorial single-column research article. Zero external dependencies. */
.research-page {
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #f1f3f4;
  --ink: #202124;
  --ink-2: #3c4043;
  --muted: #5f6368;
  --line: #dadce0;
  --line-soft: #e8eaed;
  --accent: #1a73e8;
  --accent-hover: #1967d2;
  --link-line: rgba(26, 115, 232, 0.35);
  --tint: #eef4fe;
  --tint-ink: #0b57d0;
  --green: #125c4b;
  --green-soft: #edf7f4;
  --orange: #d18a30;
  --blue: #5c85a6;
  --red: #b5473c;
  --tok-k: #1967d2;
  --tok-s: #137333;
  --tok-n: #8430ce;
  --tok-c: #5f6368;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16.5px/1.75 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html { scroll-behavior: smooth; scrollbar-width: thin; }
.research-page * { box-sizing: border-box; }
.research-page a { color: inherit; text-decoration: none; }
.research-page a:hover { color: var(--accent); }
.research-page button, .research-page select, .research-page input { font-family: var(--sans); color: inherit; }
.research-page button, .research-page select { cursor: pointer; }
.research-page button { border: 0; background: none; }
.research-page :is(button, a, select, input, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.research-page ::selection { background: #d3e3fd; color: #041e49; }

.research-page .wrap { width: min(820px, calc(100% - 40px)); margin-inline: auto; }
.research-page .site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 58px;
  border-top: 3px solid var(--green);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.research-page .header-inner { width: min(1080px, calc(100% - 40px)); height: 100%; display: flex; align-items: center; gap: 28px; }
.research-page .brand { font: 700 20px/1 var(--serif); letter-spacing: -.2px; color: var(--ink); }
.research-page .site-nav { display: flex; gap: 20px; font: 500 13px/1 var(--sans); color: var(--ink-2); }
.research-page .site-nav a {
  padding: 6px 0;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  transition: background-size .24s cubic-bezier(.2, .7, .3, 1), color .15s;
}
.research-page .site-nav a:hover { color: var(--ink); background-size: 100% 2px; }

.research-page .language-toggle { display: flex; margin-left: auto; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; font-family: var(--sans); background: var(--surface); }
.research-page .language-toggle button { font-size: 11.5px; font-weight: 500; padding: 5px 10px; color: var(--ink-2); transition: background .15s, color .15s; }
.research-page .language-toggle button:hover { background: var(--surface-3); }
.research-page .language-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.research-page .hero { padding: 38px 0 0; text-align: left; }
.research-page h1 { font: 700 38px/1.16 var(--serif); letter-spacing: -.6px; margin: 0 0 14px; color: var(--ink); text-wrap: balance; }
.research-page .hero-subtitle { font: 18px/1.62 var(--serif); color: var(--ink-2); margin: 0 0 20px; text-wrap: pretty; }
.research-page .authors { font: 13.5px/1.75 var(--sans); color: var(--ink); margin: 0 0 12px; text-wrap: balance; }
.research-page sup { font-size: .66em; vertical-align: super; line-height: 0; }

.research-page .resource-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; font-family: var(--sans); }
.research-page .resource-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.research-page .resource-link:hover { background: var(--tint); border-color: #c2d7fb; color: var(--tint-ink); transform: translateY(-1px); }
.research-page .resource-link svg { width: 15px; height: 15px; flex: none; display: block; }

.research-page .article-layout { padding-top: 6px; }
.research-page .contents {
  position: fixed;
  top: 108px;
  left: max(18px, calc((100vw - 820px) / 2 - 220px));
  width: 188px;
  border-left: 2px solid var(--line-soft);
  padding-left: 0;
  color: var(--muted);
  font: 13px/1.45 var(--sans);
}
.research-page .contents-title { font: 600 10.5px/1 var(--sans); letter-spacing: .8px; color: var(--muted); margin: 0 0 10px 14px; }
.research-page .contents a {
  display: block;
  padding: 5.5px 0 5.5px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  transition: color .15s, border-color .15s;
}
.research-page .contents a:hover { color: var(--ink); }
.research-page .contents a.active { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.research-page .contents b { font-weight: inherit; }

.research-page .article-section { margin-top: 46px; scroll-margin-top: 76px; }
.research-page h2 { font: 700 27px/1.25 var(--serif); letter-spacing: -.3px; margin: 0 0 14px; color: var(--ink); text-wrap: balance; }
.research-page h3 { font: 700 19px/1.38 var(--serif); margin: 26px 0 10px; color: var(--ink); text-wrap: balance; }
.research-page p { margin: 0 0 16px; color: var(--ink-2); text-wrap: pretty; }
.research-page .section-lead { font: 16.5px/1.75 var(--serif); color: var(--ink-2); }
.research-page .section-kicker {
  display: inline-block;
  font: 600 11px/1 var(--sans);
  letter-spacing: .8px;
  color: var(--green);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.research-page .chart-card {
  padding: 20px 22px;
  margin-top: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(32, 33, 36, 0.04);
}
.research-page .chart-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--sans);
}
.research-page .chart-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; margin: 0; color: var(--ink); text-wrap: balance; }
.research-page .chart-subtitle { font: 12px/1.5 var(--sans); color: var(--muted); margin-top: 3px; }
.research-page .figure-id {
  font: 600 10px/1 var(--sans);
  letter-spacing: .5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.research-page .controls { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-bottom: 14px; font-family: var(--sans); }
.research-page .segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 8px; width: fit-content; }
.research-page .segmented button { font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 6px; color: var(--muted); transition: background .15s, color .15s, box-shadow .15s; }
.research-page .segmented button:hover { color: var(--ink); }
.research-page .segmented button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(32, 33, 36, 0.12); }

.research-page select {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  padding: 5.5px 24px 5.5px 9px;
  max-width: 100%;
}
.research-page select:hover { border-color: #bdc1c6; }
.research-page .control-label { font: 500 12px var(--sans); color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }

.research-page .chart { width: 100%; position: relative; }
.research-page .chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.research-page .chart text { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.research-page .chart .axis { fill: #5f6368; font-size: 11px; }
.research-page .chart .grid-line { stroke: #eceff1; stroke-width: 1; }
.research-page .chart .mark { cursor: pointer; transition: filter .12s, opacity .12s; }
.research-page .chart .mark:hover, .research-page .chart .mark:focus-visible { filter: brightness(.92); stroke: #202124; stroke-width: 1.5; }

.research-page .legend { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font: 11.5px var(--sans); color: var(--muted); margin: 10px 0 4px; }
.research-page .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.research-page .swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2.5px; flex: none; }
.research-page .figure-caption { font: 12.5px/1.65 var(--sans); color: var(--muted); margin: 14px 0 0; text-wrap: pretty; }
.research-page .figure-caption strong { color: var(--ink); }

.research-page .callout {
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: #f4f8fe;
  padding: 13px 18px;
  margin: 20px 0;
  font: 13.5px/1.65 var(--sans);
  color: var(--ink-2);
}
.research-page .callout strong { color: var(--ink); }
.research-page .callout p { margin: 0; color: inherit; }

.research-page .two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.research-page .two-column > .chart-card { margin-top: 0; display: flex; flex-direction: column; }
.research-page .two-column > div { min-width: 0; }

.research-page .table-scroll { overflow-x: auto; margin-top: 12px; }
.research-page table { border-collapse: collapse; width: 100%; font: 12px/1.5 var(--sans); font-variant-numeric: tabular-nums; text-align: right; }
.research-page :is(th, td) { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.research-page th { font-weight: 600; color: var(--ink-2); font-size: 11px; background: var(--surface-2); border-bottom: 1.5px solid var(--ink-2); }
.research-page tbody tr:hover td { background: #f8f9fa; }
.research-page :is(th, td):first-child { text-align: left; }
.research-page td.positive { color: var(--green); }
.research-page td.negative { color: var(--red); }
.research-page tr.highlight td { background: var(--green-soft); color: #0c4437; font-weight: 600; }
.research-page tr.highlight:hover td { background: #e3f2ec; }

.research-page .tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: #202124;
  color: #fff;
  padding: 9px 12px;
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(32, 33, 36, 0.24);
  font: 11.5px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  max-width: 310px;
  white-space: pre-line;
}
.research-page .tip[hidden] { display: none; }

.research-page .citation {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}
.research-page .citation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line-soft);
  font: 600 11.5px/1 var(--sans);
  color: var(--ink-2);
}
.research-page .citation-lang { letter-spacing: .3px; }
.research-page .citation pre {
  font: 12px/1.68 var(--mono);
  white-space: pre;
  overflow-x: auto;
  padding: 14px 16px;
  margin: 0;
  color: var(--ink);
}
.research-page .citation .tok-k { color: var(--tok-k); font-weight: 600; }
.research-page .citation .tok-f { color: var(--ink-2); }
.research-page .citation .tok-s { color: var(--tok-s); }
.research-page .citation .tok-n { color: var(--tok-n); }
.research-page .copy-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  background: #fff;
  font: 600 11.5px/1.2 var(--sans);
  color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.research-page .copy-button:hover { background: var(--tint); border-color: #c2d7fb; color: var(--tint-ink); }
.research-page .copy-button.copied { background: var(--green-soft); border-color: #b7dfd4; color: var(--green); }

.research-page .site-footer { margin-top: 48px; padding: 24px 0 32px; border-top: 1px solid var(--line-soft); font: 12px var(--sans); color: var(--muted); }
.research-page .footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.research-page .skip-link { position: fixed; top: -80px; left: 16px; background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px; font: 600 13px var(--sans); z-index: 100; }
.research-page .skip-link:focus { top: 12px; }
.research-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; }
.research-page .svg-label { font-size: 11.5px; fill: var(--ink-2); font-weight: 500; }

@media (max-width: 1240px) { .research-page .contents { display: none; } }
@media (max-width: 760px) {
  .research-page .two-column { grid-template-columns: 1fr; gap: 16px; }
  .research-page .site-header { height: 54px; }
  .research-page .header-inner { gap: 14px; }
  .research-page .brand { font-size: 18px; }
  .research-page .site-nav { display: none; }
  .research-page .hero { padding-top: 26px; }
  .research-page h1 { font-size: 29px; line-height: 1.18; letter-spacing: -.4px; }
  .research-page .hero-subtitle { font-size: 16.5px; }
  .research-page .authors { font-size: 12.5px; }
  .research-page .article-section { margin-top: 34px; }
  .research-page h2 { font-size: 23px; }
  .research-page .section-lead { font-size: 15.8px; }
  .research-page .figure-id { display: none; }
  .research-page .chart-card { padding: 15px 15px; }
  .research-page .controls { gap: 8px; }
  .research-page .chart-title { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .research-page * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
