/* Quantitative sections share the paper column. Data regions may scroll independently. */
.experiment-content {
  --q-ink: #263b32;
  --q-muted: #56625a;
  --q-line: #cdd2c7;
  --q-rule: #e1e2d9;
  --q-paper: #fbfaf6;
  --q-accent: #97462e;
  width: 100%;
  min-width: 0;
}
.experiment-content .exp-panel { scroll-margin-top: 1.5rem; }
.experiment-content .exp-panel:not([hidden]) ~ .exp-panel:not([hidden]) {
  border-top: 1px solid var(--q-line);
  margin-top: clamp(2rem, 3.6vw, 3.2rem);
  padding-top: clamp(1.45rem, 2.7vw, 2.35rem);
}
.experiment-content .exp-panel-heading { border: 0; padding: 0; }
.experiment-content .exp-panel-heading h3 {
  margin: .25rem 0 .3rem;
  max-width: 25ch;
  font-size: clamp(1.55rem, 2.55vw, 2.3rem);
  line-height: 1.12;
  color: var(--q-ink);
}
.exp-panel .quant-intro {
  display: grid;
  grid-template-columns: minmax(0, .79fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(1.1rem, 3.5vw, 3.5rem);
  margin-bottom: clamp(.9rem, 1.5vw, 1.35rem);
}
.exp-panel .exp-ref {
  color: var(--q-accent);
  font-size: .78rem;
  letter-spacing: .025em;
  line-height: 1.5;
  margin: 0 0 .4rem;
}
.exp-panel .exp-text, .exp-panel .table-note, .exp-panel .result-table > p {
  color: var(--q-muted);
  font-size: .97rem;
  line-height: 1.63;
  max-width: 82ch;
}
.exp-panel .quant-intro-copy .exp-text { margin: 0; }
.exp-panel .quant-intro-copy .exp-text + .exp-text { margin-top: .55rem; }
.exp-panel .exp-subheading {
  font-size: 1.19rem;
  line-height: 1.32;
  letter-spacing: -.017em;
  margin: 1.55rem 0 .4rem;
  color: var(--q-ink);
}
.exp-panel .experiment-tables { margin: .75rem 0 .9rem; }
.exp-panel .experiment-tables:last-child { margin-bottom: 0; }
.exp-panel .result-table {
  margin: 0;
  border: 0;
  border-block-end: 1px solid var(--q-line);
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.exp-panel .result-table:first-child, .exp-panel #archive-sweeps { border-top: 1px solid var(--q-line); }
.exp-panel .result-table summary {
  align-items: start;
  gap: .7rem;
  border-radius: 0;
  padding: .68rem .35rem;
  color: var(--q-ink);
  font-size: .98rem;
  line-height: 1.38;
}
.exp-panel .result-table summary::after { color: var(--q-muted); font-size: 1.1rem; }
.exp-panel .result-table :is(details[open], details.result-dataset[open]) > summary::after { content: '−'; }
.exp-panel .result-table[open] > summary {
  background: transparent;
  border-bottom: 1px solid var(--q-rule);
}
.exp-panel .result-table summary:hover { background: #eeefe7; }
.exp-panel .table-number { color: var(--q-accent); }
.exp-panel .result-table > p, .exp-panel .result-table > .table-note {
  padding-inline: .35rem;
  margin: .7rem 0;
  font-size: .93rem;
  line-height: 1.55;
}
.exp-panel .result-dataset { margin-inline: .35rem; border-top: 1px solid var(--q-rule); }
.exp-panel .result-dataset > summary { padding: .5rem .3rem; font-size: .92rem; }
.exp-panel .result-dataset[open] > summary { background: #f1f2eb; }
.exp-panel .table-scroll, .exp-panel .bench-scroll, .exp-panel .sweep-grid-scroll {
  max-width: 100%;
  min-width: 0;
  box-shadow: none;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #a9b2a6 #eeeee8;
  background: var(--q-paper);
}
.exp-panel .table-scroll { margin-bottom: .45rem; }
.exp-panel .table-scroll + .table-scroll { margin-top: .6rem; }
.exp-panel .table-scroll table, .exp-panel .bench-table, .exp-panel .sweep-grid {
  width: 100%;
  border-spacing: 0;
  color: var(--q-ink);
  font-variant-numeric: tabular-nums;
}
.exp-panel .table-scroll table { font-size: .87rem; line-height: 1.34; }
.exp-panel .table-scroll caption, .exp-panel .bench-table caption {
  color: var(--q-muted);
  padding: .62rem .55rem .45rem;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
}
.exp-panel .table-scroll :is(th, td), .exp-panel .bench-table :is(th, td) {
  padding: .39rem .55rem;
  border-color: var(--q-rule);
}
.exp-panel .table-scroll thead th, .exp-panel .bench-table thead th {
  background: #eef0e8;
  color: #3e5246;
  padding-block: .43rem;
  letter-spacing: 0;
  font-size: .82rem;
}
.exp-panel .table-scroll th[scope="rowgroup"] {
  color: #395342;
  text-align: left;
  vertical-align: top;
  background: #f2f3eb;
}
.exp-panel .table-scroll tbody + tbody :is(th, td) { border-top: 1px solid var(--q-line); }
.exp-panel :is(#table-5, #table-7) table tr > * { text-align: left; }
.exp-panel :is(#table-5, #table-7) .table-scroll tbody th[scope="row"] { min-width: 11rem; }
.exp-panel .table-scroll :is(strong, b) { color: #87402a; }
.exp-panel .table-scroll u { text-decoration-color: #7c8579; text-underline-offset: .13rem; }
.exp-panel :is(a, button, select, summary, [tabindex="0"]):focus-visible {
  outline: 2px solid var(--q-accent);
  outline-offset: 2px;
}

/* Responsive scientific plates keep their intrinsic aspect ratios, including each Figure 5 panel. */
.exp-panel .figure-grid {
  margin: 1rem 0 1.15rem;
  gap: clamp(.85rem, 2vw, 1.65rem);
  align-items: start;
}
.exp-panel .figure-card {
  margin: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.exp-panel .figure-card h4 {
  margin: 0 0 .52rem;
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--q-ink);
}
.exp-panel .figure-card .figure-preview {
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
  cursor: zoom-in;
}
.exp-panel .figure-card .figure-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  object-fit: initial;
  border: 1px solid var(--q-rule);
}
.exp-panel .figure-card .figure-preview:hover img { border-color: #a99b84; }
.exp-panel .figure-card figcaption {
  padding: 0;
  margin: .52rem 0 0;
  color: var(--q-muted);
  font-size: .88rem;
  line-height: 1.5;
}
.exp-panel .figure-card figcaption p {
  margin: 0 0 .3rem;
  max-width: 84ch;
  color: var(--q-muted);
  font-size: inherit;
  line-height: inherit;
}
.exp-panel .figure-card .figure-file {
  font-size: .83rem;
  line-height: 1.4;
  color: var(--q-accent);
  text-decoration-thickness: 1px;
}
.exp-panel .figure-file + .figure-file { margin-left: .9rem; }
#pruning-sweeps .figure-grid:has(#figure-5) {
  /* 9 and 10 have different aspect ratios and share a common image height. */
  grid-template-columns: minmax(0, .965fr) minmax(0, 1.05fr);
  row-gap: 1.35rem;
}
.exp-panel #figure-5 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .965fr);
  column-gap: clamp(.85rem, 2vw, 1.65rem);
  align-items: start;
}
.exp-panel #figure-5 > :is(h4, figcaption) { grid-column: 1 / -1; }
.exp-panel #figure-5 .figure-panel-label {
  font-size: .83rem;
  font-weight: 550;
  margin: 0 0 .32rem;
  color: var(--q-muted);
}
.exp-panel #figure-5 > .figure-panel-label:nth-of-type(1) { grid-area: 2 / 1; }
.exp-panel #figure-5 > .figure-panel-label:nth-of-type(2) { grid-area: 2 / 2; }
.exp-panel #figure-5 > .figure-preview:nth-of-type(1) { grid-area: 3 / 1; }
.exp-panel #figure-5 > .figure-preview:nth-of-type(2) { grid-area: 3 / 2; }
.exp-panel #figure-5 > figcaption { grid-row: 4; }
.exp-panel .quant-bd-layout { min-width: 0; display: grid; align-items: start; gap: 1.2rem; }
.exp-panel .quant-bd-layout .figure-grid { margin: 0; }
.exp-panel .quant-bd-readout { min-width: 0; }
.exp-panel .quant-bd-readout .bd-table {
  margin: 0;
  border: 0;
  border-block: 1px solid var(--q-line);
  border-radius: 0;
}
.exp-panel .quant-bd-readout .bd-table :is(td,th) { padding: .38rem .4rem; }
.exp-panel .quant-bd-readout .bd-table thead th {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.22;
}
.exp-panel .quant-bd-readout .exp-text { font-size: .92rem; margin: .7rem 0 0; }
@media (min-width: 1080px) {
  .exp-panel .quant-bd-layout { grid-template-columns: minmax(0, 1.29fr) minmax(0, 1fr); gap: clamp(1rem, 1.9vw, 2rem); }
}
@media (min-width: 790px) {
  /* Wide five-benchmark strips gain a caption beside the graphic, without a fixed height. */
  .exp-panel :is(#figure-3,#figure-4) {
    display: grid;
    grid-template-columns: minmax(0, 3.7fr) minmax(0, 1fr);
    gap: .45rem clamp(1rem, 2vw, 1.8rem);
    grid-template-rows: auto 1fr;
  }
  .exp-panel :is(#figure-3,#figure-4) > .figure-preview { grid-area: 1 / 1 / 3 / 2; }
  .exp-panel :is(#figure-3,#figure-4) > h4 { grid-area: 1 / 2; margin: 0; }
  .exp-panel :is(#figure-3,#figure-4) > figcaption { grid-area: 2 / 2; margin: 0; }
}

/* Benchmark explorer. Population/metric controls stay close to the selected comparison. */
.exp-panel #table-1 { margin-top: .8rem; }
.exp-panel #benchmark-explorer {
  border-block: 1px solid var(--q-line);
  padding: .95rem 0 0;
}
.exp-panel .bench-protocol { margin: 0 0 .65rem; }
.exp-panel .bench-protocol > span { color: var(--q-muted); }
.exp-panel .bench-tabs { gap: .18rem; padding-bottom: .63rem; }
.exp-panel .bench-tab {
  min-height: 2.25rem;
  border-radius: 4px;
  padding: .43rem .72rem;
  font-size: .88rem !important;
}
.exp-panel .bench-tab[aria-selected="true"] { background: #335447; border-color: #335447; }
.exp-panel .bench-controls {
  gap: .08rem;
  padding: .12rem;
  border-radius: .25rem;
  border-color: #cdd2c7;
  background: #f1f2eb;
}
.exp-panel .bench-metric { min-height: 2rem; border-radius: .2rem; padding: .34rem .55rem; }
.exp-panel .bench-metric[aria-pressed="true"] { color: #253e31; box-shadow: none; }
.exp-panel .bench-chart { padding: .45rem 0 .25rem; }
.exp-panel .bench-chart-row, .exp-panel .bench-chart-axis {
  grid-template-columns: minmax(6.4rem, 8rem) minmax(0,1fr) 4.55rem;
  padding-inline: .5rem;
  gap: .8rem;
}
.exp-panel .bench-chart-row { min-height: 1.98rem; border-radius: .14rem; }
.exp-panel .bench-chart-row + .bench-chart-row { border-top: 1px solid #e6e7df; }
.exp-panel .bench-chart-row.bench-ours { background: #f1e5da; }
.exp-panel .bench-details { border-bottom: 0; }
.exp-panel .bench-details > summary { padding: .72rem .2rem; }
.exp-panel .bench-readout, .exp-panel .bench-method-label { font-size: .89rem; }
.exp-panel .bench-note { margin: .65rem 0 .9rem; font-size: .92rem; line-height: 1.55; }
.exp-panel .bench-other-tables { margin: .4rem 0 .7rem; }
.exp-panel .bench-table tr.bench-ours > * { color: #823c26; background: #f3e8dd; }
@media (min-width: 860px) {
  .exp-panel #bench-panel {
    display: grid;
    grid-template-columns: minmax(12rem,.75fr) minmax(0,1.8fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "heading chart" "protocol chart" "tables tables";
    align-items: start;
    column-gap: clamp(1.2rem, 3vw, 3rem);
    padding-top: .8rem;
  }
  .exp-panel #bench-panel .bench-heading {
    grid-area: heading;
    flex-direction: column;
    gap: .75rem;
    margin: .65rem 0 0;
  }
  .exp-panel #benchmark-explorer .bench-heading h3 {
    font-family: var(--serif, Georgia, serif);
    font-size: clamp(1.35rem, 1.8vw, 1.75rem);
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -.025em;
  }
  .exp-panel #bench-panel .bench-note { grid-area: protocol; margin: .8rem 0; }
  .exp-panel #bench-panel .bench-chart { grid-area: chart; }
  .exp-panel #bench-panel .bench-details { grid-area: tables; margin-top: .5rem; }
}
.exp-panel #archive-sweeps { margin-top: 1.25rem; }
.exp-panel #sweep-explorer { padding: .85rem .2rem 1rem; }
.exp-panel #sweep-explorer .sweep-source-note {
  margin: 0 0 .82rem;
  padding: .5rem .8rem;
  background: #f2ede3;
  border-left: 2px solid #ae6545;
  color: #535843;
}
.exp-panel .sweep-selectors {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(8rem,1fr));
  align-items: end;
  gap: .6rem .85rem;
}
.exp-panel .sweep-field select { border-radius: .2rem; background-color: var(--q-paper); }
.exp-panel #sweep-explorer .sweep-protocol { margin: .65rem 0 .75rem; }
.exp-panel .sweep-grid-scroll { border: 0; border-block: 1px solid var(--q-line); border-radius: 0; }
.exp-panel #sweep-explorer .sweep-grid caption { padding: .6rem .55rem; background: #f1f2eb; }
.exp-panel #sweep-explorer .sweep-grid :is(th,td) { padding: .38rem .55rem; }
.exp-panel .sweep-downloads { margin-top: .7rem; }

@media (max-width: 789px) {
  .exp-panel .quant-intro { grid-template-columns: minmax(0,1fr); gap: .45rem; margin-bottom: .85rem; }
  .experiment-content .exp-panel-heading h3 { max-width: none; margin-bottom: .1rem; }
  .exp-panel .bench-heading { margin: .9rem 0 .55rem; gap: .65rem; }
}
@media (max-width: 700px) {
  /* Each plot takes the full column when its axis labels would become too small side by side. */
  #pruning-sweeps .figure-grid:has(#figure-5) { grid-template-columns: minmax(0,1fr); gap: 1.15rem; }
  .exp-panel #figure-5 { display: block; }
  .exp-panel #figure-5 > .figure-panel-label { margin-top: .55rem; }
  .exp-panel .figure-file + .figure-file { margin-left: .55rem; }
  .exp-panel .exp-text, .exp-panel .table-note { font-size: .94rem; }
}
@media (max-width: 490px) {
  .exp-panel .bench-tabs { display: none; }
  .exp-panel .bench-mobile-label { margin: 0; padding-block: .2rem .7rem; }
  .exp-panel .bench-chart-row, .exp-panel .bench-chart-axis {
    grid-template-columns: minmax(0,5.8rem) minmax(0,1fr) 3.6rem;
    gap: .45rem;
    padding-inline: .28rem;
  }
  .exp-panel .bench-method-label, .exp-panel .bench-readout { font-size: .83rem; }
  .exp-panel .table-scroll :is(th,td) { padding: .37rem .45rem; }
  .exp-panel :is(#table-5,#table-7) .table-scroll tbody th[scope="row"] { min-width: 6rem; }
  .exp-panel .table-scroll thead th { font-size: .8rem; }
  .exp-panel .bench-ticks span { font-size: .75rem; }
  .exp-panel .sweep-selectors { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media print {
  .exp-panel #bench-panel { display: block; }
  .exp-panel .quant-intro, .exp-panel .quant-bd-layout { display: block; }
  .exp-panel .table-scroll { overflow: visible; }
  .exp-panel .figure-card { break-inside: avoid; }
}
