/* Benchmarks (starter suite) page — inherits tokens from styles.css.
   Aesthetic: the research-hub rhythm. Section heads are simple left-aligned
   openers (kicker + serif h2 + one-line lede); the body below each head fills
   the full width on its own grid, so nothing floats. */

.mast__title em { color: var(--forest); }

/* mode key: two-line legend directly above the six cases */
.modekey {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding: 0 var(--gutter) clamp(2rem, 5vh, 3rem);
}
.modekey__item { display: flex; gap: 0.7rem; align-items: baseline; max-width: 44ch; }
.modekey__tag {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap;
}
.modekey__item p { font-size: 0.85rem; color: var(--ink-soft); }

.tag-art { color: var(--forest); border: 1px solid rgba(29, 74, 56, 0.4); }
.tag-act { color: var(--terracotta); border: 1px solid rgba(201, 131, 107, 0.5); }
.tag-fill-art { background: var(--forest); color: var(--parchment); border: 0; }
.tag-fill-act { background: var(--terracotta); color: var(--parchment); border: 0; }

/* ---- the six cases: full-width rows (hub .contents__list rhythm) ---- */
.cases { padding: 0 var(--gutter) clamp(3rem, 7vh, 5rem); }
.cases__head { margin-bottom: 2rem; }
.cases__list { list-style: none; }
.cases__list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(143, 168, 147, 0.4);
}
.cases__list li:last-child { border-bottom: 1px solid rgba(143, 168, 147, 0.4); }
.case__num {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em;
  color: var(--terracotta);
}
.case__body { display: grid; gap: 0.45rem; }
.case__title-row { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.case__title {
  font-family: var(--serif); font-weight: 480;
  font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.15;
}
.case__title-row .tag-act,
.case__title-row .tag-art {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap;
}
.case__gate { font-family: var(--mono); font-size: 0.75rem; line-height: 1.5; color: var(--terracotta); }
.case__gate .lbl { color: var(--sage); letter-spacing: 0.12em; margin-right: 0.6rem; }
.case__ref {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  color: var(--sage); text-align: right; white-space: nowrap;
}

/* new-vs-mapped pip beside a case title */
.bcard__pip {
  display: inline-block; font-family: var(--mono); font-size: 0.55rem;
  letter-spacing: 0.1em; color: var(--forest);
  border: 1px solid rgba(29,74,56,0.3); border-radius: 999px;
  padding: 0.12rem 0.5rem;
}

/* ---- scoring strip (the page's one dark band) ---- */
.score {
  padding: clamp(3rem, 7vh, 5rem) var(--gutter);
  background: var(--forest-deep);
  color: var(--parchment);
}
.score__head { max-width: 60ch; margin-bottom: 2.25rem; }
.score__head .kicker { color: var(--sage); }
.score__head h2 { color: var(--parchment); }
.score__head p { color: rgba(246, 241, 232, 0.82); margin-top: 0.75rem; font-size: 0.95rem; }

.score__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.score__block h3 {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  color: var(--sage); font-weight: 400; margin-bottom: 1rem;
}
.dims { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dims li {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em;
  color: rgba(246,241,232,0.9);
  border: 1px solid rgba(246, 241, 232, 0.25);
  border-radius: 999px; padding: 0.3rem 0.7rem;
}
.gates { list-style: none; display: grid; gap: 0.5rem; }
.gates li {
  font-size: 0.85rem; color: rgba(246,241,232,0.85);
  padding-left: 1.1rem; position: relative;
}
.gates li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta);
}
.levels { list-style: none; display: grid; gap: 0.9rem; }
.levels li { display: grid; gap: 0.15rem; }
.levels .lv {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--sage);
}
.levels .ld { font-size: 0.85rem; color: rgba(246,241,232,0.85); }

/* ---- public benchmark bar chart ---- */
.pubbench { padding: clamp(3rem, 7vh, 5rem) var(--gutter); }
.pubbench__head { max-width: 60ch; }
.pubbench__head h2 {
  font-family: var(--serif); font-weight: 460;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.08;
  color: var(--ink); margin: 0.6rem 0 0;
}
.pubbench__head h2 em { color: var(--forest); font-style: italic; }
.pubbench__head p { margin-top: 0.6rem; font-size: 1.02rem; line-height: 1.62; color: var(--ink-soft); }

.bchart__title {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--sage); text-transform: uppercase; margin-bottom: 1.1rem;
}
.bchart__rows { display: grid; gap: 0.8rem; }
.brow { display: grid; grid-template-columns: 9.5rem 1fr 2rem; align-items: center; gap: 0.9rem; }
.brow__name {
  font-family: var(--serif); font-size: 0.92rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brow__track { height: 0.7rem; background: rgba(29, 74, 56, 0.09); border-radius: 2px; overflow: hidden; }
.brow__fill { display: block; height: 100%; width: var(--w); background: var(--forest); border-radius: 2px; }
.brow__fill--open { background: var(--terracotta); }
.brow__val { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); text-align: right; }

.pubbench__note {
  font-family: var(--mono); font-size: 0.68rem; line-height: 1.65;
  color: var(--sage); margin-top: 1.8rem;
}

/* Animate the bars in when JS is on; full bars if JS is off. */
html.js-enabled .brow__fill { width: 0; transition: width 1s var(--ease); }
html.js-enabled .reveal.is-visible .brow__fill { width: var(--w); }

/* problem section: single chart + one hub-style stat cell */
.pubbench__problem {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 4vw, 4rem); margin-top: 1.6rem; align-items: start;
}
.bfind { border-top: 1px solid var(--sage); padding-top: 1.25rem; }
.bfind .n {
  font-family: var(--serif); font-weight: 460; font-size: clamp(2.3rem, 5vw, 3rem);
  line-height: 0.95; color: var(--forest); display: block;
}
.bfind .l {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--sage); margin-top: 0.6rem; display: block; line-height: 1.6; max-width: 34ch;
}

/* per-task Pareto explorer: the frontier moves with the workflow */
.pubbench--variance { border-top: 1px solid rgba(29, 74, 56, 0.1); padding-top: clamp(2rem, 4vh, 3rem); }
.tpareto { margin-top: 1.6rem; }
.tpareto__tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.tpareto__bar { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.3rem; font-size: 0.92rem; color: var(--ink-soft); }
.tp-tag { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em; padding: 0.22rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.tp-why { max-width: 66ch; }
.tpareto__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 3rem); margin-bottom: 1.5rem; max-width: 46rem; }
.tp-stat { border-top: 2px solid var(--forest); padding-top: 0.7rem; }
.tp-stat .k { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; color: var(--sage); margin-bottom: 0.45rem; }
.tp-stat .v { display: block; font-family: var(--serif); font-weight: 460; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.05; color: var(--forest); }
.tpareto .chart__plot { display: block; width: 100%; height: auto; overflow: visible; }
.tp-num { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.tp-bar-lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; fill: var(--millie-teal); }
.tp-fanlbl { font-family: var(--serif); font-size: 15px; fill: var(--forest); }
.tpareto__key { display: flex; flex-wrap: wrap; gap: 0.5rem 1.3rem; margin-top: 1.1rem; }
.tp-key__item { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.03em; color: var(--ink-soft); display: flex; align-items: center; gap: 0.45rem; }
.tp-key__item b { color: var(--ink); font-weight: 500; }
.tp-key__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.tpareto__cap { margin-top: 1.4rem; font-size: 1.02rem; line-height: 1.62; color: var(--ink-soft); max-width: 66ch; }
.tpareto__cap em { font-family: var(--serif); font-style: italic; color: var(--forest); }
.tpareto__fanhead { margin: 2.6rem 0 0.5rem; }
.tpareto__fanhead h3 { font-family: var(--serif); font-weight: 460; font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--ink); margin-top: 0.2rem; }
.leg__bar { width: 16px; height: 0; display: inline-block; border-top: 1.6px dashed var(--millie-teal); transform: translateY(-3px); }
.leg__dot--val { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--millie-teal); background: transparent; }
.tpareto__nojs { display: none; font-family: var(--mono); font-size: 0.72rem; color: var(--sage); }
html:not(.js-enabled) .tpareto__nojs { display: block; }
html.js-enabled .tp-dot, html.js-enabled .tp-ring, html.js-enabled .tp-barg { transition: transform 550ms var(--ease), opacity 400ms var(--ease); }
html.js-enabled .tp-fanline { transition: stroke 300ms var(--ease), stroke-width 300ms var(--ease), opacity 300ms var(--ease); }

@media (max-width: 860px) {
  .score__cols { grid-template-columns: 1fr; }
  .pubbench__problem { grid-template-columns: 1fr; }
  .brow { grid-template-columns: 8rem 1fr 2rem; }
  .tpareto__stats { grid-template-columns: 1fr; gap: 1.25rem; }
  .cases__list li { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .case__ref { grid-column: 2; text-align: left; margin-top: 0.4rem; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html.js-enabled .brow__fill { transition: none !important; width: var(--w); }
  html.js-enabled .tp-dot, html.js-enabled .tp-ring, html.js-enabled .tp-barg, html.js-enabled .tp-fanline { transition: none !important; }
}
