/* Station results explorer: shared tabbed frame for v1 domains and v2 discoveries.
   Data-bearing inline widths/positions are never overridden here. */
.research-explorer{
  --rx-ink:#242447;--rx-ink-2:#4d5175;--rx-muted:#64667b;--rx-line:#d6d3e0;--rx-line-soft:#e7e5ee;
  --rx-wash:#f6f5fa;--rx-indigo:#343474;--rx-station:#b7502c;--rx-station-ink:#a34422;--rx-orange:#d47b48;--rx-ref:#676f8c;
  --rx-pad:clamp(20px,3vw,40px);
  box-sizing:border-box;margin:clamp(1.75rem,3vw,2.5rem) 0;background:#fff;border:1px solid var(--rx-line);border-radius:6px;
  color:var(--rx-ink);font:400 18px/1.55 "Source Sans 3",sans-serif;min-width:0
}
.research-explorer *,.research-explorer *::before,.research-explorer *::after{box-sizing:border-box}
.research-explorer [hidden]{display:none!important}

/* Tabs */
.research-explorer .rx-tabs{display:flex;gap:.25rem;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;
  padding:0 calc(var(--rx-pad) - .75rem);background:var(--rx-wash);border-radius:6px 6px 0 0;border-bottom:1px solid var(--rx-line)}
.research-explorer .rx-tab{position:relative;flex:0 0 auto;margin:0;border:0;background:none;cursor:pointer;
  padding:1.05rem .9rem 1rem;font:600 16px/1.3 Manrope,sans-serif;letter-spacing:-.01em;color:var(--rx-ink-2);
  border-radius:4px 4px 0 0;transition:color .15s,background-color .15s}
.research-explorer .rx-tab::after{content:"";position:absolute;left:.9rem;right:.9rem;bottom:-1px;height:3px;border-radius:2px 2px 0 0;background:transparent;transition:background-color .15s}
.research-explorer .rx-tab:hover{color:var(--rx-indigo);background:#ecebf4}
.research-explorer .rx-tab:hover::after{background:#c9c7de}
.research-explorer .rx-tab[aria-selected=true]{color:var(--rx-indigo);background:#fff;box-shadow:inset 1px 0 var(--rx-line),inset -1px 0 var(--rx-line)}
.research-explorer .rx-tab[aria-selected=true]::after{background:var(--rx-orange)}
.research-explorer .rx-tab:focus-visible{outline:2px solid var(--rx-indigo);outline-offset:-3px}
.research-explorer .rx-tab:first-child[aria-selected=true]{box-shadow:inset -1px 0 var(--rx-line)}

.research-explorer .rx-panel{padding:var(--rx-pad);margin:0;scroll-margin-top:0}
.research-explorer .rx-panel:focus-visible{outline:2px solid var(--rx-indigo);outline-offset:-4px}

/* ---------- v1 domain panels ---------- */
.research-explorer .rx-intro{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:.5rem clamp(1.5rem,4vw,3.5rem);align-items:baseline;
  margin:0 0 clamp(1.5rem,2.5vw,2rem);padding:0 0 clamp(1.25rem,2vw,1.5rem);border-bottom:1px solid var(--rx-line-soft)}
.research-explorer .rx-intro h3{margin:0;font:600 clamp(24px,2.2vw,30px)/1.2 Manrope,sans-serif;letter-spacing:-.03em;color:var(--rx-ink);text-wrap:balance}
.research-explorer .rx-intro p{margin:0;max-width:62ch;font-size:18px;line-height:1.6;color:var(--rx-ink-2)}
.research-explorer .rx-figure{margin:0;padding:0;border:0;background:none;max-width:none}
.research-explorer .rx-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(1.75rem,4vw,3.5rem);align-items:start}
.research-explorer .rx-chart{min-width:0;container-type:inline-size}
/* Two charts side by side only when each column can hold readable axis type. */
.research-explorer .rx-figure{container-type:inline-size}
@container (max-width:880px){.research-explorer .rx-chart-grid{grid-template-columns:1fr}.research-explorer .rx-chart+.rx-chart{padding-top:1.5rem;border-top:1px solid var(--rx-line-soft)}}
.research-explorer .rx-chart h4{text-align:center;margin:0 0 .75rem;font:600 18px/1.35 Manrope,sans-serif;letter-spacing:-.015em;color:var(--rx-ink)}

/* Line charts (viewBox 600 wide). Type is set in user units, tuned per breakpoint so
   it renders at ~14-16px regardless of the column width. */
.research-explorer .rx-svg{display:block;width:100%;height:auto;overflow:visible}
.research-explorer .rx-svg text{font:500 14px "Source Sans 3",sans-serif;fill:var(--rx-muted);font-variant-numeric:tabular-nums}
.research-explorer .rx-chart-grid .rx-svg{max-width:680px}
/* SVG text is in viewBox units (600 wide): step size so rendered type stays ~14.5-16px. */
@container (max-width:600px){.research-explorer .rx-svg text{font-size:16px}}
@container (max-width:520px){.research-explorer .rx-svg text{font-size:18.5px}}
@container (max-width:440px){.research-explorer .rx-svg text{font-size:22px}}
@container (max-width:370px){.research-explorer .rx-svg text{font-size:25px}}
@container (max-width:320px){.research-explorer .rx-svg text{font-size:28px}}
.research-explorer .rx-svg .rx-axis-title{font-weight:600;fill:var(--rx-ink-2)}
.research-explorer .rx-grid{stroke:#e6e4ec;stroke-width:1}
.research-explorer .rx-line{stroke:var(--rx-station);stroke-width:2.75;fill:none;stroke-linejoin:round;stroke-linecap:round}
.research-explorer .rx-reference{stroke:var(--rx-ref);stroke-width:1.75;fill:none;stroke-dasharray:7 5}
.research-explorer .rx-point{fill:var(--rx-station);stroke:#fff;stroke-width:1.25}
.research-explorer .rx-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:.35rem 1.25rem;margin:.6rem 0 0;font-size:16px;line-height:1.4;color:var(--rx-ink-2)}
.research-explorer .rx-legend span{display:inline-flex;align-items:center;gap:.5rem}
.research-explorer .rx-legend i{display:inline-block;width:24px;border-top:3px solid var(--rx-station)}
.research-explorer .rx-legend .rx-key-reference{border-top:2px dashed var(--rx-ref)}
.research-explorer .rx-chart-stat{margin:.85rem 0 0;padding:.7rem 0 0;border-top:1px solid var(--rx-line-soft);font-size:16px;line-height:1.45;color:var(--rx-muted);font-variant-numeric:tabular-nums;max-width:none}
.research-explorer .rx-chart-stat strong{margin-right:.2rem;font:600 20px/1.2 Manrope,sans-serif;letter-spacing:-.02em;color:var(--rx-station-ink)}

/* Bar charts */
.research-explorer .rx-bars{min-width:0}
.research-explorer .rx-figure>.rx-bars{max-width:52rem}
.research-explorer .rx-bar-row{margin:0 0 .7rem}
.research-explorer .rx-bar-label{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin:0 0 .25rem;font-size:17px;line-height:1.35;color:var(--rx-ink)}
.research-explorer .rx-bar-label strong{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--rx-ink-2)}
.research-explorer .rx-track{position:relative;height:14px;background:repeating-linear-gradient(to right,#e6e4ec 0,#e6e4ec 1px,transparent 1px,transparent 25%) #fafafc;border-right:1px solid #e6e4ec}
.research-explorer .rx-fill{display:block;height:100%;background:#9a9cb8;border-radius:0 2px 2px 0}
.research-explorer .rx-error{position:absolute;top:2px;height:10px;border-inline:1.5px solid var(--rx-ink);min-width:3px}
.research-explorer .rx-error::after{content:"";position:absolute;left:0;right:0;top:4px;border-top:1.5px solid var(--rx-ink)}
.research-explorer .rx-featured .rx-bar-label,.research-explorer .rx-featured .rx-bar-label strong{color:var(--rx-station-ink);font-weight:600}
.research-explorer .rx-featured .rx-fill{background:var(--rx-station)}
.research-explorer .rx-axis{display:flex;justify-content:space-between;margin:.3rem 0 0;font-size:15px;line-height:1.3;color:var(--rx-muted);font-variant-numeric:tabular-nums}

/* Paired score tables */
.research-explorer .rx-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-top:2px solid var(--rx-ink)}
.research-explorer .rx-table-wrap:focus-visible{outline:2px solid var(--rx-indigo);outline-offset:3px}
.research-explorer .rx-table{width:100%;border-collapse:collapse;font-size:17px;line-height:1.35;font-variant-numeric:tabular-nums}
.research-explorer .rx-table caption{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.research-explorer .rx-table th,.research-explorer .rx-table td{padding:.62rem .5rem;border-bottom:1px solid var(--rx-line-soft);text-align:right;vertical-align:baseline}
.research-explorer .rx-table th:first-child{padding-left:0;text-align:left}
.research-explorer .rx-table tr>:last-child{padding-right:0}
.research-explorer .rx-table thead th{font:600 15px/1.3 "Source Sans 3",sans-serif;color:var(--rx-muted);letter-spacing:.02em;border-bottom:1px solid var(--rx-line)}
.research-explorer .rx-table thead th:nth-child(2){color:var(--rx-station-ink)}
.research-explorer .rx-table tbody th{font-weight:400;color:var(--rx-ink)}
.research-explorer .rx-table td{color:var(--rx-ink-2);white-space:nowrap}
.research-explorer .rx-table td:nth-child(2){color:var(--rx-station-ink);font-weight:600}
.research-explorer .rx-table tbody tr:hover>*{background:#faf9fc}

.research-explorer .rx-figure>figcaption{margin:clamp(1.25rem,2vw,1.6rem) 0 0;padding:.9rem 0 0;border-top:1px solid var(--rx-line-soft);
  font:400 16px/1.55 "Source Sans 3",sans-serif;color:var(--rx-muted);max-width:80ch;text-align:left}

/* v1 article: break out of the ~800px prose measure to a centred results width. */
.research-page .research-explorer{width:min(1160px,calc(100vw - 64px));margin-left:50%;transform:translateX(-50%)}

/* ---------- v2 native discoveries ---------- */
.research-explorer .rx-native{min-width:0}
.research-explorer .rx-native .finding{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:clamp(1.75rem,3.5vw,3rem);align-items:center;
  border:0;border-radius:0;box-shadow:none;transform:none;background:#fff;overflow:visible}
.research-explorer .rx-native .finding:hover{transform:none;box-shadow:none}
.research-explorer .rx-native .finding-fig,
.research-explorer .rx-native .finding:nth-child(even) .finding-fig{order:0;background:#fff;border:0;padding:0;min-height:0}
.research-explorer .rx-native .finding-fig--erdos{padding:0}
.research-explorer .rx-native .finding-body{padding:0}
.research-explorer .rx-native .finding--wide{grid-template-columns:1fr;row-gap:clamp(1.5rem,2.5vw,2rem)}
.research-explorer .rx-native .finding--wide .finding-body{padding:clamp(1.25rem,2vw,1.6rem) 0 0;border-top:1px solid var(--rx-line-soft);
  display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);column-gap:clamp(1.5rem,4vw,3.5rem);align-content:start}
.research-explorer .rx-native .finding--wide .finding-body>.tag{grid-column:1;grid-row:1}
.research-explorer .rx-native .finding--wide .finding-body>h3{grid-column:1;grid-row:2}
.research-explorer .rx-native .finding--wide .finding-body>.headline{grid-column:1;grid-row:3}
.research-explorer .rx-native .finding--wide .finding-body>p:not(.headline){grid-column:2;grid-row:1/4;align-self:start}
.research-explorer .rx-native .finding--wide .finding-body>.prov{grid-column:2;grid-row:4}

.research-explorer .rx-native .finding .tag{display:block;margin:0 0 .7rem;font:600 14px/1.4 "Source Sans 3",sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#6a6c8a}
.research-explorer .rx-native .finding h3{margin:0 0 .75rem;font:600 clamp(24px,2.3vw,30px)/1.18 Manrope,sans-serif;letter-spacing:-.03em;color:var(--rx-ink);white-space:normal}
.research-explorer .rx-native .finding .headline{margin:0 0 .75rem;font-size:19px;line-height:1.45;font-weight:500;color:var(--rx-ink)}
.research-explorer .rx-native .finding .headline b{color:var(--rx-indigo);font-weight:700}
.research-explorer .rx-native .finding p{font-size:18px;line-height:1.6;color:var(--rx-ink-2)}
.research-explorer .rx-native .finding .prov{display:flex;flex-wrap:wrap;align-items:baseline;gap:.35rem 1rem;margin-top:1.1rem;padding-top:.85rem;border-top:1px solid var(--rx-line-soft);
  font:400 16px/1.4 "Source Sans 3",sans-serif;color:var(--rx-muted);font-variant-numeric:tabular-nums}
.research-explorer .rx-native .finding .prov .delta{color:#1d7d48;font-weight:600}
.research-explorer .rx-native .finding .prov .proof-link{margin-left:auto;font-weight:600;color:var(--rx-indigo);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:4px}
.research-explorer .rx-native .finding .prov .proof-link:hover,
.research-explorer .rx-native .finding .prov .proof-link:focus-visible{text-decoration-color:var(--rx-orange)}
/* Native figure legibility (figures keep their own palette). */
.research-explorer .rx-native .kiss-panel figcaption{font-size:16px}
.research-explorer .rx-native .kiss-panel figcaption b{font-size:17px}
.research-explorer .rx-native .kiss-panel figcaption span{font-size:15px}
.research-explorer .rx-native .kiss-legend{flex-wrap:wrap;gap:.35rem 1.1rem;margin-top:1.1rem;font:400 15px/1.4 "Source Sans 3",sans-serif;letter-spacing:0;color:var(--rx-ink-2)}
.research-explorer .rx-native .kiss-legend i{width:10px;height:10px}

/* Kissing comparison: a continuation of the kissing tab, not a second card. */
.research-explorer .station-result.rx-comparison{margin:clamp(1.75rem,3vw,2.5rem) 0 0;padding:clamp(1.5rem,2.5vw,2rem) 0 0;border:0;border-top:1px solid var(--rx-line);border-radius:0;background:none;width:auto;transform:none}
.research-explorer .rx-comparison .result-panels{gap:clamp(1.75rem,4vw,3.5rem)}
.research-explorer .rx-comparison .result-panel h4{font-size:18px}
.research-explorer .rx-comparison .result-unit{min-height:0;font-size:16px;margin-bottom:.75rem}
.research-explorer .rx-comparison svg text{font-size:16px;font-weight:500}
.research-explorer .rx-comparison svg .axis-title{font-size:16px;font-weight:600;fill:var(--rx-ink-2)}
.research-explorer .rx-comparison .result-outcome{padding:.65rem 0;font-size:17px}
.research-explorer .rx-comparison .result-keyline{font-size:18px;margin-top:1rem}
.research-explorer .rx-comparison figcaption{margin-top:1.25rem;padding-top:.9rem}

/* ---------- Responsive ---------- */
@media(max-width:1100px){
  .research-explorer .rx-intro{grid-template-columns:1fr}
  .research-explorer .rx-native .finding--wide .finding-body{display:block}
}
@media(max-width:820px){
  .research-explorer .rx-native .finding{grid-template-columns:1fr;row-gap:1.5rem}
  .research-explorer .rx-native .finding-fig .plot{max-width:none}
  .research-explorer .rx-native .finding-body{padding:1.25rem 0 0;border-top:1px solid var(--rx-line-soft)}
}
@media(max-width:760px){
  .research-page .research-explorer{width:auto;margin-left:0;transform:none}
  .research-explorer .rx-comparison .result-panel+.result-panel{border-top:1px solid var(--rx-line-soft)}
}
@media(max-width:600px){
  .research-explorer{--rx-pad:16px;border-radius:4px}
  .research-explorer .rx-tabs{padding:0 .25rem}
  .research-explorer .rx-tab{padding:.9rem .75rem .85rem;font-size:16px}
  .research-explorer .rx-tab::after{left:.75rem;right:.75rem}
  .research-explorer .rx-line{stroke-width:3.5}
  .research-explorer .rx-point{r:4}
  .research-explorer .rx-bar-label{font-size:16px}
  .research-explorer .rx-table{font-size:16px}
  .research-explorer .rx-native .kiss-legend{font-size:14px;gap:.25rem .8rem}
  .research-explorer .rx-comparison svg text,.research-explorer .rx-comparison svg .axis-title{font-size:22px}
  .research-explorer .rx-native .finding .prov .proof-link{margin-left:0}
}

.research-explorer .v1-copy .result-external,
.research-explorer .rx-native .finding .result-external{margin:16px 0 0;font:600 17px/1.5 "Source Sans 3",sans-serif}
.research-explorer .result-external a{color:#343474;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:4px;text-decoration-thickness:2px}
.research-explorer .result-external a:hover,
.research-explorer .result-external a:focus-visible{text-decoration-color:#c94d26}
