@font-face {
  font-family: "Work Sans";
  src: url("./fonts/work-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("./fonts/source-serif-4.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("./fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
}
:root {
  color-scheme: light;
  scrollbar-color: var(--accent) var(--scroll-track);
  --paper: #f8f8fc;
  --sheet: #f8f8fc;
  --ink: #102c50;
  --muted: #43566f;
  --night: #081d39;
  --accent: #002d72;
  --accent-tint: #e1edf9;
  --line: #c8d4e3;
  --pin: #f8f8fc;
  --highlight: #f08087;
  --topic-active: #ffd4a2;
  --scroll-track: #e1edf9;
  --sans: "Work Sans", system-ui, sans-serif;
  --display: "Source Serif 4", Georgia, serif;
  font-family: var(--sans);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb {
  background: var(--accent); border: 2px solid var(--scroll-track); border-radius: 10px;
}
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; font-weight: 550; letter-spacing: -.035em; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 10; top: .4rem; left: .4rem; padding: .5rem; background: var(--sheet); }
.shell { width: min(1500px, calc(100% - clamp(2rem, 5.6vw, 5.5rem))); margin-inline: auto; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: flex-end; min-height: 60px; }
nav { display: flex; align-items: center; gap: clamp(.3rem, 1.3vw, 1.2rem); }
nav a { color: var(--accent); font-size: .91rem; font-weight: 650; text-decoration: none; padding: .46rem .7rem; border: 1px solid transparent; border-radius: 100px; }
nav a:hover { background: var(--accent-tint); }
nav a[aria-current] { background: var(--highlight); }
nav .nav-dataset { border-color: var(--accent); }
.atlas :focus-visible { outline-color: #b5d9ff; }
.intro { padding-block: clamp(1.35rem, 2.8vw, 2.45rem) clamp(1.1rem, 2.1vw, 1.7rem); }
.intro h1 { color: var(--accent); font-size: clamp(3rem, 6.2vw, 6rem); font-weight: 500; }
.intro p { margin-top: .56rem; font-size: clamp(.96rem, 1.3vw, 1.2rem); }
.research-hero {
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: stretch; margin: 1.3rem 0 1.05rem; min-height: clamp(18rem, 27vw, 26rem);
  border: 1px solid var(--line); overflow: hidden; position: relative;
  background: linear-gradient(#002d720c 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, #002d720c 1px, transparent 1px) 0 0 / 32px 32px, var(--paper);
}
.hero-content { align-self: center; padding: clamp(1.45rem, 3.25vw, 3.35rem); }
.project-name, .intro .project-name { color: var(--accent); font-size: .9rem; font-weight: 700; margin: 0 0 .6rem; }
.research-hero h1 { color: var(--accent); font-size: clamp(3.1rem, 6.25vw, 6.7rem); font-weight: 500; line-height: 1; letter-spacing: -.064em; }
mark { background: var(--highlight); color: var(--accent); font-style: italic; padding: 0 .11em .025em; white-space: nowrap; }
.hero-byline {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem;
  max-width: 27rem; margin: 1.15rem 0 .92rem; padding: 0; list-style: none;
  font-size: clamp(.74rem, 1.25vw, .86rem); font-weight: 600; line-height: 1.3;
}
.hero-byline a {
  display: flex; flex-direction: column; align-items: center; gap: .34rem; text-align: center;
}
.hero-byline img {
  display: block; width: clamp(2.7rem, 4.7vw, 3.75rem); height: auto; aspect-ratio: 1;
  border: 1px solid var(--line); border-radius: 50%; object-fit: cover; object-position: center 35%;
}
.hero-question { margin-top: .62rem; max-width: 31rem; font-size: clamp(1.04rem, 1.52vw, 1.35rem); line-height: 1.42; }
.hero-illustration { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .55rem .72rem; align-items: center; margin-top: 1.35rem; }
.hero-actions :is(button, a) {
  display: inline-flex; align-items: center; gap: .55rem; padding: .51rem .87rem; border: 1px solid var(--accent); border-radius: 100px;
  background: var(--sheet); color: var(--accent); text-decoration: none; font-size: .89rem; font-weight: 650;
}
.hero-actions button { color: var(--paper); background: var(--accent); }
.hero-actions span { font-size: 1rem; }
.hero-actions :is(button, a):hover { background: var(--highlight); color: var(--accent); }
.capability-overview {
  display: grid; grid-template-columns: .92fr 1.27fr .81fr; gap: 0; border-block: 1px solid var(--line);
}
.capability-group { --group-ink: var(--accent); --group-line: #d4deec; min-width: 0; padding: .93rem clamp(.8rem, 2vw, 1.65rem) .67rem; }
.capability-group + .capability-group { border-inline-start: 1px solid var(--line); }
.capability-group.higher { --group-ink: #1b648e; }
.capability-group.risks { --group-ink: #9a4132; }
.capability-group h2 { font-size: clamp(1.14rem, 1.95vw, 1.7rem); color: var(--accent); }
.capability-group ul { list-style: none; margin: .45rem 0 0; padding: 0; }
.capability-group li {
  display: flex; align-items: flex-start; gap: .65rem; padding: .58rem .1rem;
  font-size: clamp(.84rem, 1.1vw, 1rem); line-height: 1.32;
}
.capability-group li + li { border-top: 1px solid var(--group-line); }
.capability-group strong, .capability-group small { display: block; }
.capability-group small { margin-top: .15rem; color: var(--muted); font-size: .8rem; font-weight: 450; }
.capability-group svg { width: 24px; height: 24px; flex: none; color: var(--group-ink); }
.explore-intro { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .65rem 1.25rem; padding-block: 1rem .7rem; }
.explore-intro h2 { font-size: clamp(1.6rem, 2.65vw, 2.45rem); }
.coverage-guide {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.1rem;
  margin: 0 0 .8rem; padding: .75rem 0; border-block: 1px solid var(--line);
}
.coverage-guide dt, .metric-definitions dt { color: var(--accent); font-weight: 720; }
.coverage-guide dd, .metric-definitions dd { margin: .13rem 0 0; color: var(--muted); font-size: .84rem; }
.coverage-control > span { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .8rem; font-weight: 690; }
.segmented { display: inline-flex; align-items: center; gap: .16rem; padding: .18rem; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
.segmented button { border: 0; border-radius: 5px; padding: .35rem .62rem; background: transparent; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.segmented button[aria-pressed="true"] { color: white; background: var(--accent); }
.workspace { display: grid; grid-template-columns: minmax(0, .77fr) minmax(0, 1fr); gap: clamp(.85rem, 1.25vw, 1.25rem); align-items: start; }
.atlas {
  position: sticky; top: .85rem; color: #f6f5ff; border: 1px solid #252e4b; border-radius: 16px;
  background: radial-gradient(ellipse at 50% 52%, #173b61 0%, transparent 71%),
    linear-gradient(90deg, #a4b2e411 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(#a4b2e411 1px, transparent 1px) 0 0 / 34px 34px, var(--night);
}
.atlas-heading, .atlas-footer { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: 1rem 1.15rem; }
.atlas-heading h2 { font-size: clamp(1.38rem, 2.25vw, 2rem); white-space: nowrap; }
.topic-field, .language-field, .task-field { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.topic-field { width: min(59%, 21rem); }
label { flex: none; font-size: .81rem; font-weight: 690; }
select {
  width: 100%; min-width: 0; min-height: 2.22rem; border: 1px solid #a6a6be; border-radius: 7px; background: var(--sheet);
  padding: .3rem .55rem; font-size: .87rem; text-overflow: ellipsis;
}
.atlas select { color-scheme: dark; color: #f8f8fc; background: var(--night); border-color: #a9b3d4; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .45rem .65rem; padding: 0 1.15rem .25rem; }
.atlas .segmented { color: #e2e8ff; border-color: #6d789a; background: #19243e; }
.atlas .segmented button[aria-pressed="true"] { background: #215c9f; }
.map-language-field { display: flex; align-items: center; gap: .45rem; }
.map-language-field select { width: 8.75rem; }
.map { width: 100%; aspect-ratio: 1.02; position: relative; overflow: hidden; isolation: isolate; cursor: grab; touch-action: pan-y; }
.globe-orbit { position: absolute; inset: 2.5% 2%; pointer-events: none; }
.globe-orbit i { position: absolute; inset: 2% 0; border: 1px solid #9ccaff49; border-radius: 50%; }
.globe-orbit i + i { inset: 4.5% -1%; border-color: #c1a1ff31; transform: rotate(-28deg); }
.globe-orbit i::after {
  content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #d5e8ff;
  box-shadow: 0 0 10px 2px #7aaaff; offset-path: ellipse(49% 49% at 50% 50%); animation: orbit-sweep 4.6s ease-out both;
}
.globe-orbit i + i::after { background: #e8d2ff; box-shadow: 0 0 11px 2px #a683ff; offset-rotate: 180deg; }
.map:not(.map-ready) .globe-orbit, .map-zoomed .globe-orbit { display: none; }
@keyframes orbit-sweep {
  from { offset-distance: 12%; opacity: 0; }
  20%, 72% { opacity: .9; }
  to { offset-distance: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .globe-orbit i::after { animation: none; display: none; } }
.map:focus-visible { outline-offset: -4px; }
.map.dragging { cursor: grabbing; }
#world, .markers { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.markers { pointer-events: none; }
.map-marker {
  display: flex; gap: .21rem; align-items: center; justify-content: center; position: absolute; transform: translate(-50%, -50%);
  min-width: 25px; min-height: 25px; padding: .2rem .35rem; border: 1px solid #f8f8fc; border-radius: 99px;
  background: var(--pin); color: var(--night); pointer-events: auto; box-shadow: 0 2px 8px #09122980;
  font-size: .72rem; font-weight: 800; line-height: 1;
}
.map-marker:hover, .map-marker:focus-visible { background: #f8f8fc; z-index: 2; }
.map-marker.selected { background: var(--topic-active); z-index: 1; }
.marker-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--night); }
.query-pin {
  position: absolute; display: flex; align-items: center; justify-content: center; gap: .32rem; transform: translate(-50%, -50%);
  min-width: 41px; min-height: 26px; padding: .22rem .4rem; border: 1px solid #edfdff; border-radius: 99px;
  background: #b8f0f6; color: #11324a; box-shadow: 0 2px 7px #091229a0; pointer-events: auto; z-index: 2;
  font-size: .73rem; font-weight: 800; line-height: 1;
}
.query-pin::before {
  content: ""; width: 8px; height: 8px; flex: none; border-radius: 1px; background: #126f86; transform: rotate(45deg);
}
.query-pin.selected { background: #86e0ee; }
.query-pin:hover, .query-pin[aria-expanded="true"] { background: #e5fbff; z-index: 3; }
.map-legend { display: flex; gap: .7rem; margin-bottom: .25rem; font-size: .75rem; }
.map-legend span { display: flex; align-items: center; gap: .33rem; }
.legend-topic, .legend-query { display: inline-block; width: 9px; height: 9px; background: var(--pin); }
.legend-topic { border-radius: 50%; }
.legend-query { border-radius: 1px; background: #8ce1ed; transform: rotate(45deg); }

.pin-label {
  position: absolute; top: 50%; left: calc(100% + 5px); transform: translateY(-50%);
  padding: .36rem .55rem; background: var(--pin); color: var(--night); border-radius: 99px;
  max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;
  box-shadow: 0 2px 8px #09122970;
}
.label-left .pin-label { left: auto; right: calc(100% + 5px); }
.atlas-footer { padding-top: .65rem; padding-bottom: 1rem; }
.atlas-footer p { color: #e4e7f6; font-size: .75rem; }
.map-credit { font-size: .7rem; color: #bcc9e6; }
.zoom { display: flex; gap: .4rem; }
.zoom button {
  width: 35px; height: 35px; border: 1px solid #b9c4e1; border-radius: 7px; background: #202c49;
  font-size: 1.25rem; line-height: 1;
}
.zoom button:hover:not(:disabled) { background: #374975; }
.map-error { position: absolute; inset: 30% 1rem auto; text-align: center; background: #25334f; padding: .7rem; border-radius: 6px; }
.cluster-menu {
  position: absolute; z-index: 4; right: .7rem; bottom: .7rem; width: min(24rem, 92%); max-height: calc(100% - 1.4rem);
  overflow: auto; background: var(--sheet); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: .3rem;
  box-shadow: 0 8px 24px #0a132b60;
}
.cluster-menu button { display: block; width: 100%; text-align: left; border: 0; padding: .52rem .6rem; background: transparent; border-radius: 5px; font-size: .87rem; }
.cluster-menu button:hover, .cluster-menu button[aria-pressed="true"] { background: var(--accent-tint); }

.cluster-heading {
  position: sticky; top: -.3rem; display: flex; justify-content: space-between; align-items: center; gap: .45rem;
  padding: .35rem .35rem .55rem; border-bottom: 1px solid var(--line); background: var(--sheet); z-index: 1;
}
.cluster-heading h3 { font-size: .98rem; }
.cluster-heading button { width: auto; }
.cluster-queries h4 { margin: .55rem .35rem .23rem; font-size: .84rem; }
.cluster-queries button + button { border-top: 1px solid #dfdce9; }
.cluster-queries button span, .cluster-queries button small { display: block; }
.cluster-queries button small { margin-top: .1rem; font-size: .74rem; color: var(--muted); }
#cross-region-queries {
  display: block; padding: .15rem 0; margin: .12rem 0; border: 0; background: transparent; color: #b8f0f6;
  text-align: start; font-size: .76rem; text-decoration: underline; text-underline-offset: .2em;
}
.topic-panel, .plot-frame, .score-method { min-width: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; }
.topic-panel { padding: clamp(.85rem, 1.45vw, 1.35rem); }
.topic-header, .section-heading, .query-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.topic-header { margin-bottom: .8rem; }
.topic-header h2 { font-size: clamp(1.6rem, 2.65vw, 2.6rem); overflow-wrap: anywhere; }
.language-field { flex: 0 0 min(44%, 16rem); justify-content: flex-end; }
.query-heading { align-items: baseline; margin-bottom: .43rem; }
.query-heading h3 { font-size: 1.12rem; }
#query-count { font-size: .77rem; color: var(--muted); }
.query-viewport { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem; align-items: stretch; }
.query-list {
  position: relative; display: grid; grid-auto-rows: max-content; gap: .35rem; max-height: 12rem; overflow-y: auto; scrollbar-width: none;
  padding: .08rem; scroll-padding: .1rem;
}
.query-list::-webkit-scrollbar { display: none; }
.query-scrollbar {
  appearance: none; writing-mode: vertical-lr; direction: ltr; width: 20px; height: 100%; min-height: 0;
  margin: 0; padding: 0; cursor: ns-resize;
  background: linear-gradient(var(--scroll-track), var(--scroll-track)) center / 6px 100% no-repeat;
  border: 0; border-radius: 6px;
}
.query-scrollbar::-webkit-slider-thumb {
  appearance: none; width: 12px; height: 27px; background: var(--accent); border-radius: 8px;
}
.query-scrollbar::-moz-range-thumb {
  width: 12px; height: 27px; background: var(--accent); border: 0; border-radius: 8px;
}
.query-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  margin-top: .3rem; color: var(--muted); font-size: .77rem;
}
.query-pagination button {
  padding: .25rem .35rem; border: 0; background: transparent; color: var(--accent); font-weight: 670;
  text-decoration: underline; text-underline-offset: .17em;
}
.query-list button {
  display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: .42rem .57rem; min-height: 37px;
  text-align: start; border: 1px solid #d9d7e1; border-radius: 7px; background: var(--sheet); font-size: .86rem; line-height: 1.34;
}
.query-list button:hover { background: #edf4fc; }
.query-list button:focus-visible { outline-offset: -2px; }
.query-list button[aria-pressed="true"] { background: var(--accent-tint); border-color: #aac4df; box-shadow: inset 4px 0 var(--accent); }
.query-list button[aria-pressed="true"] span { font-weight: 700; }
.query-list button small { color: var(--muted); padding-top: .15rem; font-size: .7rem; }
.answers { margin-top: .9rem; padding-top: .95rem; border-top: 1px solid #d8d4e0; }
.section-heading { margin-bottom: .55rem; }
.section-heading h3 { font-size: clamp(1.4rem, 2.1vw, 2rem); }
.task-field { flex: 0 0 min(56%, 21.6rem); }
.answer-question { font-size: .9rem; font-weight: 620; overflow-wrap: anywhere; }
.case-details { margin: .7rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); }
.case-details summary, .score-method summary { cursor: pointer; color: var(--accent); width: fit-content; font-size: .86rem; font-weight: 700; }
.case-details h3 { margin-top: .8rem; font-size: .94rem; }
.case-details p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .87rem; max-width: 78ch; }
.case-details ul { margin-block: .4rem; padding-left: 1.2rem; font-size: .85rem; }
.answer-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; align-items: start; }
.answer-view-toggle { display: none; }
.answer-reader-button {
  padding: .32rem .65rem; border: 1px solid var(--line); border-radius: 99px;
  background: var(--sheet); color: var(--accent); font-size: .82rem; font-weight: 680;
}
.answer-reader-button:hover { background: var(--accent-tint); }
#open-answer-reader { display: block; margin: .45rem 0 .5rem auto; }
.answer-reader #open-answer-reader { display: none; }
.answer-reader {
  width: min(1100px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overscroll-behavior: contain;
  padding: 0 1.15rem 1.15rem; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); color: var(--ink);
}
.answer-reader::backdrop { background: #081d3999; }
.answer-reader header {
  display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 3;
  gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); background: var(--sheet);
}
.answer-reader .answer-question { margin: .65rem 0; }
body:has(.answer-reader[open]) { overflow: hidden; }
.answer { min-width: 0; border: 1px solid #c4c4dc; border-radius: 11px; background: #f8f8fc; overflow: hidden; }
.answer-controls { display: flex; flex-direction: column; gap: .2rem; padding: .62rem .7rem .58rem; border-bottom: 1px solid #e2dfec; background: #edf4fc; }
.answer-controls select { background: #f8f8fc; font-weight: 660; }
.answer-content {
  padding: .85rem; max-height: clamp(20rem, 64dvh, 37rem); overflow-y: auto; scrollbar-gutter: stable;
}
.answer-content:focus-visible { outline-offset: -3px; }
.answer-reader .answer-content { max-height: min(65dvh, 43rem); }
.answer-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem; color: var(--muted); font-size: .72rem; margin-bottom: .55rem; }
.answer-meta strong { color: var(--accent); background: var(--accent-tint); border-radius: 5px; padding: .13rem .35rem; }
.answer-text { overflow-wrap: anywhere; font-size: .91rem; line-height: 1.66; unicode-bidi: plaintext; }
.muted { color: var(--muted); font-size: .86rem; }
.retry-answer, #app-error button { background: var(--sheet); border: 1px solid var(--line); border-radius: 5px; }
.ranking-controls {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem .9rem;
  margin-bottom: .85rem; max-width: 72rem;
}
.ranking-controls label { display: block; margin-bottom: .24rem; font-size: .87rem; }
.plot-frame { padding: .65rem .8rem .25rem; }
#ranking-status { padding: .35rem; }
#rank-plot { width: 100%; min-width: 0; }
/* Plotly's essential SVG layering, served under the site's stylesheet policy. */
:is(#rank-plot, #paper-matrix, #source-plot) .main-svg { position: absolute; top: 0; left: 0; pointer-events: none; }
:is(#rank-plot, #paper-matrix, #source-plot) .main-svg .draglayer { pointer-events: all; }
:is(#rank-plot, #paper-matrix, #source-plot) .user-select-none { user-select: none; }
table { border-collapse: collapse; width: 100%; min-width: 38rem; text-align: left; background: #f8f8fc; }
thead { background: var(--accent-tint); }
th, td { padding: .5rem .75rem; border-bottom: 1px solid #d8d6e3; }
thead th { white-space: nowrap; }
tbody th { font-weight: 610; }
tbody tr:nth-child(even) { background: #f9f7fd; }
tbody tr:last-child > * { border-bottom: 0; }
td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }
.score-note { margin: 0 .25rem .65rem; }
.score-method { margin-top: .7rem; padding: .75rem .95rem; border-radius: 11px; }
.score-method p { max-width: 80ch; margin-top: .4rem; font-size: .87rem; }
.score-method h2 { font-size: 1.23rem; }
.metric-definitions {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1rem; margin: .75rem 0;
}
.metric-definitions div { padding: .48rem 0 .15rem; border-top: 1px solid var(--line); }
.metric-definitions dt { font-size: .9rem; }
.source-results { margin-top: 1.2rem; }
.source-results h2 { color: var(--accent); font-size: clamp(1.6rem, 2.65vw, 2.35rem); }
.source-results header {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: .45rem 1rem; margin-bottom: .65rem;
}
.source-results header > div:first-child { flex: 1 1 30rem; }
.source-model-field { width: min(100%, 18rem); }
.source-model-field label { display: block; margin-bottom: .25rem; }
.source-results header p { margin-top: .35rem; color: var(--muted); font-size: .88rem; max-width: 85ch; }
.source-fallback { overflow-x: auto; }
#source-plot { width: 100%; min-width: 0; }
.citation-panel {
  margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet);
}
.citation-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem; }
.citation-heading h2 { font-size: 1.35rem; }
.citation-actions { display: flex; align-items: center; gap: .75rem; font-size: .85rem; }
.citation-actions button {
  padding: .35rem .65rem; color: var(--accent); border: 1px solid #a7bfd9; border-radius: 6px; background: var(--accent-tint); font-weight: 700;
}
.citation-panel pre {
  overflow-x: auto; margin: .7rem 0 .4rem; padding: .75rem; border-radius: 8px; background: #e8eff8;
  color: var(--ink); font-size: .79rem; line-height: 1.55;
}
.footer { margin-top: 1.8rem; padding-block: 1.15rem .8rem; border-top: 1px solid var(--line); }
.authors { scroll-margin-block-start: 1rem; }
.authors h2 { font-size: clamp(1.6rem, 2.65vw, 2.35rem); color: var(--accent); }
.author-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; list-style: none; padding: 0; margin: .75rem 0 1.1rem; }
.author-list li { padding-top: .55rem; border-top: 2px solid var(--highlight); }
.author-list a { font-weight: 650; text-decoration: none; }
.author-list a:hover { text-decoration: underline; }
.author-list li > span { display: block; color: var(--muted); font-size: .85rem; margin-top: .14rem; }
.footer-links {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .45rem 1.25rem; padding-block: .45rem; border-top: 1px solid var(--line);
}
.affiliation-logos {
  display: flex; align-items: center; flex-wrap: wrap; gap: .2rem clamp(.6rem, 2vw, 1.25rem);
  list-style: none; margin: 0; padding: 0;
}
.affiliation-logos a, .affiliation-logos img { display: block; }
.affiliation-logos img { height: auto; }
.footer-links nav { width: auto; }
#app-error { margin-top: 1rem; padding: .7rem; border: 1px solid var(--line); border-radius: 5px; }

@media (max-width: 1140px) {
  .topic-header { align-items: flex-start; }
  .language-field, .task-field { flex-direction: column; align-items: stretch; gap: .15rem; }
}
@media (max-width: 850px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .atlas { position: relative; top: auto; }
  .map { aspect-ratio: auto; height: min(78vw, 435px); }
  .language-field, .task-field { flex-direction: row; align-items: center; gap: .5rem; }
  .topic-header { align-items: center; }
}
@media (max-width: 560px) {
  .research-hero { grid-template-columns: minmax(0, 1fr); margin-top: .8rem; }
  .hero-illustration { height: min(51vw, 15rem); }
  .capability-group + .capability-group { border-inline-start: 0; border-top: 1px solid var(--line); }
  .capability-overview { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
  .capability-group { padding: .65rem .85rem .45rem; }
  .capability-group li { min-height: 2rem; }
  .capability-group svg { width: 19px; height: 19px; }
  .masthead-inner { min-height: 52px; padding-block: .45rem; }
  .masthead-inner nav { flex-wrap: wrap; justify-content: flex-end; gap: .2rem; }
  .masthead-inner nav a { white-space: nowrap; }
  nav a { font-size: .79rem; padding: .33rem .5rem; }
  .atlas-heading, .atlas-footer { padding: .74rem; }
  .map-toolbar { padding-inline: .74rem; }
  .map-toolbar .segmented button { padding-inline: .46rem; }
  .map-language-field select { width: 8rem; }
  .atlas-heading h2 { font-size: 1.25rem; }
  .topic-field { width: 53%; }
  .topic-field label { font-size: .76rem; }
  .atlas-footer p { font-size: .68rem; }
  .zoom { gap: .3rem; }
  .zoom button { width: 30px; height: 32px; }
  .pin-label { max-width: 7rem; }
  .topic-header, .section-heading { align-items: flex-start; flex-direction: column; }
  .language-field, .task-field { width: 100%; }
  .answer-columns { grid-template-columns: minmax(0, 1fr); }
  #open-answer-reader { display: none; }
  .answer-view-toggle { display: inline-flex; position: sticky; top: .35rem; z-index: 2; margin-bottom: .55rem; }
  .answer-grid[data-answer-side="left"] #right-model-card,
  .answer-grid[data-answer-side="right"] #left-model-card { display: none; }
  .plot-frame { padding-inline: .2rem; }
  .ranking-controls, .coverage-guide, .metric-definitions { grid-template-columns: minmax(0, 1fr); }
  .map-legend { flex-wrap: wrap; gap: .18rem .5rem; }
}

.answer-text > * + * { margin-top: .55rem; }
.answer-text :is(h1, h2, h3, h4, h5, h6) { margin-bottom: .35rem; font-size: .93rem; line-height: 1.3; }
.answer-text :is(ul, ol) { padding-inline-start: 1.3rem; margin-bottom: .35rem; }
.answer-text li + li { margin-top: .22rem; }
.answer-text blockquote { margin-inline: 0; border-inline-start: 2px solid var(--line); padding-inline-start: .65rem; }
.answer-text pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.answer-text table { display: block; min-width: 0; overflow-x: auto; font-size: .8rem; }
.answer-text td, .answer-text th { padding: .3rem; }
.plain-answer { white-space: pre-wrap; }

.linked-regions::before {
  content: ""; display: inline-block; width: 1.1rem; margin-inline-end: .42rem;
  vertical-align: .18em; border-bottom: 2px dotted #ffe3b5;
}
.atlas-footer .linked-regions { color: #ffe3b5; margin-block: .15rem; }
.results-intro { padding-bottom: 1.5rem; }
.paper-results { border-block: 1px solid var(--line); padding-block: .95rem; }
.matrix-header { display: flex; justify-content: space-between; align-items: end; gap: .55rem 1rem; flex-wrap: wrap; }
.matrix-header h2, #task-ranking-title { color: var(--accent); font-size: clamp(1.6rem, 2.65vw, 2.35rem); }
.matrix-header p, .matrix-note { color: var(--muted); font-size: .84rem; margin-top: .35rem; }
.matrix-header select { display: block; min-width: 10rem; max-width: min(24rem, 100%); }
.matrix-header > div { min-width: 0; }
.matrix-legend { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; margin-top: 1.15rem; font-size: .78rem; }
.matrix-legend ul { display: flex; flex-wrap: wrap; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.matrix-legend li { background: #fff5f0; color: #182135; padding: .2rem .48rem; border: 1px solid #1821351f; }
.matrix-legend li:nth-child(2) { background: #fdd0bc; }
.matrix-legend li:nth-child(3) { background: #fca082; }
.matrix-legend li:nth-child(4) { background: #fb6a4a; }
.matrix-legend li:nth-child(5) { background: #cb181d; color: var(--sheet); }
.matrix-scroll-hint { margin-inline-start: auto; color: var(--muted); }
.matrix-scroll { overflow-x: auto; margin-top: .8rem; position: relative; }
#paper-matrix, #paper-fallback table { min-width: 1600px; }
#paper-fallback thead th { white-space: normal; padding-block: .85rem; }
#paper-fallback thead th[aria-sort] { background: var(--highlight); color: var(--accent); }
#task-ranking { margin-top: 1.05rem; }
#task-ranking-title { margin-bottom: .4rem; }

.results-preview {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr);
  align-items: center; gap: clamp(1.15rem, 3.6vw, 3.8rem);
  margin-block: 0 clamp(1.25rem, 2.4vw, 2.35rem);
  padding: clamp(1.1rem, 2.55vw, 2.35rem);
  background: var(--sheet); border: 1px solid var(--line); border-top: 3px solid var(--highlight);
  color: var(--accent); text-decoration: none;
}
.results-preview:hover { border-color: var(--accent); border-top-color: var(--highlight); }
.results-preview h2 { max-width: 25ch; font-size: clamp(1.6rem, 2.8vw, 2.7rem); line-height: 1.13; }
.results-preview h2 mark { white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.results-preview p { color: var(--muted); font-size: .93rem; margin-top: .65rem; }
.results-preview .results-preview-lead { color: var(--accent); font-size: 1.05rem; font-weight: 650; }
.results-preview-action {
  display: inline-flex; gap: .7em; align-items: center; margin-top: 1rem;
  padding: .45rem .72rem; border: 1px solid var(--accent); border-radius: 5px;
  font-weight: 700; font-size: .87rem;
}
.results-preview:hover .results-preview-action { background: var(--highlight); }
.results-preview table { min-width: 0; font-size: clamp(.73rem, 1.16vw, .94rem); background: transparent; }
.results-preview caption { text-align: start; font-weight: 700; padding-bottom: .65rem; }
.results-preview :is(th, td) { white-space: normal; padding: .55rem clamp(.28rem, 1vw, .85rem); }
.results-preview tr > :last-child { background: #f9e4e8; }
.results-preview thead tr > :last-child { background: var(--highlight); }
.results-preview tbody th { text-align: left; }
.results-preview tbody td:last-child { font-weight: 700; }

@media (max-width: 690px) {
  .author-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-preview { grid-template-columns: minmax(0, 1fr); }
  .matrix-scroll-hint { margin-inline-start: 0; }
}
