@font-face {
  font-family: "Albert Sans"; src: url("./assets/albert-sans.woff2") format("woff2");
  font-style: normal; font-weight: 400 700; font-display: swap;
}
@font-face {
  font-family: Piazzolla; src: url("./assets/piazzolla.woff2") format("woff2");
  font-style: normal; font-weight: 400 600; font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f5f2e5;
  --surface: #fdfbf1;
  --ink: #00261e;
  --night: #00231c;
  --muted: #365149;
  --rule: #c9cfc0;
  --light: #f9f6e4;
  --light-muted: #b0c4b0;
  --accent: #dced79;
  --research: #d0e9d4;
  --rust: #983b23;
  --body: "Albert Sans", "Avenir Next", sans-serif;
  --display: Piazzolla, Baskerville, Georgia, serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  font: 400 1rem/1.55 var(--body);
  color: var(--ink);
  background: var(--paper) url("./assets/paper-grain.svg");
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, dl, dd { margin: 0; }
button, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; letter-spacing: -.034em; word-spacing: .045em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.53rem; }
section[id] { scroll-margin-top: 1.4rem; }
.shell { width: min(100% - clamp(2rem, 8vw, 7rem), 1280px); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 5; background: var(--surface); padding: .65rem; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.topbar { border-bottom: 1px solid var(--rule); }
.topbar-inner, .footer .shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar-inner { min-height: 70px; }
.brand-lockup { display: flex; align-items: center; gap: .9rem; }
.oeran-home img, .footer img { display: block; object-fit: contain; object-position: left center; }
.brand { border-left: 1px solid var(--rule); padding-left: .9rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
nav { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.7rem); font-size: .88rem; font-weight: 600; }
nav a { text-decoration: none; white-space: nowrap; }
nav a:hover { text-decoration: underline; }
.source-link { padding: .35rem .65rem; border: 1px solid var(--rule); }
.intro {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center; gap: clamp(1.6rem, 6vw, 6rem);
  padding-block: clamp(2.5rem, 5.5vw, 5rem);
  border-bottom: 1px solid var(--rule);
}
.category { font-size: .87rem; font-weight: 600; color: var(--muted); }
.category span { margin-inline: .24rem; }
h1 { font-size: clamp(3.6rem, 7.6vw, 7.25rem); max-width: 9.6ch; margin: .62rem 0 .9rem; line-height: .91; }
h1 em { font-weight: inherit; }
.intro-copy { color: var(--muted); font-size: clamp(1rem, 1.65vw, 1.2rem); max-width: 42ch; }
.intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.25rem; margin-top: 1.4rem; font-size: .9rem; font-weight: 650; }
.primary-link { display: inline-block; padding: .66rem .9rem; background: var(--accent); border: 1px solid #a1ad5b; text-decoration: none; }
.primary-link:hover { background: #e9f599; }
.case-preview { min-width: 0; padding: clamp(1.1rem, 3vw, 2.4rem); background: var(--night); color: var(--light); align-self: center; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-bottom: .75rem; border-bottom: 1px solid #557268; font-weight: 650; font-size: .9rem; }
#preview-id { color: var(--accent); font: .8rem var(--mono); }
.preview-content { min-height: 165px; padding-top: .8rem; }
.preview-content > p { color: var(--light-muted); }
.preview-origin { font-size: .82rem; margin-bottom: .65rem; }
.preview-stats { display: grid; grid-template-columns: .85fr 1.15fr; gap: .8rem; margin-bottom: 1rem; }
.preview-stats dt, .preview-ledger span { color: var(--light-muted); font-size: .8rem; }
.preview-stats dd { font: 400 clamp(1.4rem, 2.6vw, 2.13rem)/1.07 var(--display); margin-top: .16rem; overflow-wrap: anywhere; }
.preview-stats > div + div { border-left: 1px solid #557268; padding-left: .8rem; }
.preview-fail { color: #ffccab; }
.preview-ledger { border-top: 1px solid #557268; }
.preview-ledger p { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem .65rem; align-items: baseline; padding: .42rem 0; border-bottom: 1px solid #557268; }
.preview-ledger strong { font-size: .94rem; font-weight: 600; }
.comparison-head, .section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.comparison-head { padding-block: clamp(1.4rem, 4vw, 2.7rem) 1.2rem; }
.comparison-head p, .section-head p { color: var(--muted); margin-top: .42rem; }
.dataset-control { width: min(100%, 320px); flex-shrink: 0; }
label { display: block; margin-bottom: .32rem; font-size: .86rem; font-weight: 650; }
select { width: 100%; min-height: 44px; padding: .55rem .65rem; border: 1px solid #a6b6a7; border-radius: 3px; background: var(--surface); font-size: .9rem; font-weight: 600; }
.caption, .panel-head p, .pool-note { font-size: .86rem; color: var(--muted); }
.status { border: 1px solid var(--rule); background: var(--surface); padding: .8rem 1rem; margin-bottom: 1rem; }
.status button { margin-left: .7rem; }
.metrics { display: grid; grid-template-columns: 1.25fr 1fr 1fr .85fr; border-block: 1px solid #a6b6a7; margin-bottom: 1.05rem; }
.metric { padding: .8rem 1rem; border-right: 1px solid var(--rule); min-width: 0; }
.metric:last-child { border-right: 0; }
.metric:first-child { background: var(--research); }
.metric-label { font-weight: 650; font-size: .8rem; }
.metric-value { font: 400 clamp(1.45rem, 3.2vw, 2.65rem)/1.12 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-note { font-size: .75rem; color: var(--muted); margin-top: .24rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(265px, 1fr); align-items: start; gap: 1.1rem; }
.panel { border: 1px solid var(--rule); background: var(--surface); min-width: 0; }
.chart-panel, .compare-panel { padding: clamp(.8rem, 2vw, 1.35rem); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: .7rem; margin-bottom: .8rem; }
.panel-head p { margin-top: .28rem; }
.segments { display: inline-flex; padding: 3px; gap: 3px; background: #ebece0; border: 1px solid var(--rule); border-radius: 3px; }
.segments button { border: 0; border-radius: 2px; background: transparent; padding: .31rem .6rem; white-space: nowrap; font-size: .82rem; font-weight: 650; min-height: 36px; }
.segments button:hover { background: #dce5d5; }
.segments button[aria-pressed="true"] { background: var(--ink); color: var(--light); }
.chart-svg { display: block; width: 100%; height: auto; min-height: 168px; }
.chart-svg text { font-family: var(--body); fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .35rem; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; gap: .4rem; align-items: center; }
.legend i { width: 16px; border-top: 3px solid var(--series); }
.legend .bound { border-top-style: dashed; }
.chart-details, .tie-details { border-top: 1px solid var(--rule); margin-top: .85rem; padding-top: .55rem; font-size: .87rem; }
summary { font-weight: 650; min-height: 32px; }
.overflow { overflow: auto; }
table { width: 100%; border-collapse: collapse; color: var(--ink); font-size: .84rem; font-variant-numeric: tabular-nums; }
th, td { border-top: 1px solid var(--rule); padding: .47rem .6rem; text-align: left; white-space: nowrap; }
thead th { border: 0; background: #e9ede1; }
.pool-sizes { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: .64rem; }
.selector-list { display: grid; }
.selector { text-align: left; width: 100%; min-width: 0; border: 0; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; background: transparent; padding: .6rem .55rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .13rem .45rem; }
.selector:hover, .selector[aria-pressed="true"] { background: #e6ecdd; border-left-color: var(--series); }
.selector-name { font-weight: 650; font-size: .9rem; }
.selector strong { font-size: 1rem; }
.selector small { color: var(--muted); grid-column: 1 / -1; font-size: .78rem; }
.pool-note { margin-top: .65rem; }
.replay-section, .method { margin-top: clamp(2.4rem, 6vw, 5rem); }
.section-head { margin-bottom: 1rem; }
.section-head > div:last-child:not(:first-child) { min-width: 105px; }
.replay-layout { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0, 2fr); }
.candidate-list { padding: 1.1rem; border-right: 1px solid var(--rule); background: #edf0e4; min-width: 0; }
.task-request { color: var(--muted); font-size: .88rem; margin: .4rem 0 .8rem; }
.candidate-button { width: 100%; display: flex; align-items: center; text-align: left; gap: .45rem; min-height: 43px; margin-top: .25rem; padding: .35rem .5rem; background: transparent; border: 1px solid transparent; border-bottom-color: var(--rule); }
.candidate-button:hover, .candidate-button[aria-pressed="true"] { border-color: #81998a; background: var(--surface); }
.candidate-button strong { font: .78rem var(--mono); }
.candidate-button .pill { margin-left: auto; }
.pill { display: inline-flex; align-items: center; background: var(--research); color: #164e33; padding: .125rem .4rem; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.pill.bad { background: #f4dfd0; color: #81321f; }
.chosen { color: var(--muted); font-size: .72rem; }
.inspector { padding: clamp(.85rem, 3vw, 1.6rem); min-width: 0; }
.inspector-head { display: flex; gap: .65rem; align-items: center; }
.inspector h3 { font-size: 1.9rem; }
.inspector h4 { margin: .9rem 0 .35rem; font-size: 1rem; }
.inspector .caption { margin: .25rem 0 .55rem; overflow-wrap: anywhere; }
.inspector ol { display: grid; gap: .3rem; padding-left: 1.4rem; margin: .25rem 0 .75rem; }
.inspector li { padding-left: .2rem; overflow-wrap: anywhere; }
.rejected { color: var(--rust); }
.credits { margin-bottom: .6rem; }
.raw-actions { max-height: 16rem; overflow: auto; font: .8rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; background: #edf0e4; padding: .65rem; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.method-panel { border: 0; border-top: 1px solid var(--rule); background: transparent; padding-block: .85rem; }
.method-panel p { color: var(--muted); margin-top: .55rem; max-width: 56ch; }
#sensitivity, .downloads { margin-top: .65rem; }
.downloads { display: flex; flex-wrap: wrap; gap: .55rem .9rem; font-size: .88rem; font-weight: 650; }
.footer { border-top: 1px solid var(--rule); margin-top: 3rem; padding-block: 1.2rem; font-size: .86rem; }
@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .selector-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
}
@media (max-width: 690px) {
  .intro { grid-template-columns: minmax(0, 1fr); gap: 1.7rem; padding-block: 1.8rem; }
  .comparison-head { align-items: start; flex-direction: column; }
  .comparison-head .dataset-control { width: 100%; }
  .source-link { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .metric { padding: .7rem .65rem; }
  .chart-panel .panel-head { flex-wrap: wrap; }
  .chart-svg text { font-size: 19px; }
  .method-grid, .replay-layout, .selector-list { grid-template-columns: minmax(0, 1fr); }
  .candidate-list { border-right: 0; border-bottom: 1px solid var(--rule); }
  .candidate-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .5rem; }
  .candidate-button { flex-wrap: wrap; }
  .section-head { align-items: start; }
  .section-head > div:last-child:not(:first-child) { min-width: 76px; }
}
@media (max-width: 410px) {
  .topbar-inner { gap: .55rem; min-height: 60px; }
  .oeran-home img { width: 66px; height: auto; }
  .brand-lockup { gap: .45rem; }
  .brand { font-size: .83rem; padding-left: .45rem; }
  nav { font-size: .78rem; gap: .5rem; }
}
@media (max-width: 359px) {
  .oeran-home img { width: 50px; }
  .brand-lockup { gap: .3rem; }
  .brand { font-size: .75rem; padding-left: .3rem; }
  nav { font-size: .73rem; gap: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
