/* ============================================================
   research-bands.css — section blocks for research-paper sites.

   Reusable primitives: hypothesis scorecard grid, dataset metric
   strip, conclusion callout, cover gallery, explore grid.

   Consumers opt in by adding a `.band--<variant>` class on a section
   wrapping `<section class="band band--<variant>">`.

   Conventions:
     - .score-card (NOT .band-card — name your primitives after the
       thing, not the location).
     - All colors come from theme tokens.
     - Responsive @media at the bottom of each variant.
   ============================================================ */

/* ---------- generic score grid ---------------------------------- */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.score-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface-1, var(--bg-1, transparent));
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.score-label { font-size: .75rem; color: var(--text-3); text-transform: uppercase; }
.score-value { font-size: 1.25rem; color: var(--herman-color-brass); }
.score-value--positive { color: var(--herman-color-positive); }
.score-value--danger { color: var(--herman-color-danger); }
.score-value--warning { color: var(--herman-color-warning); }
.score-value--info { color: var(--herman-color-info); }
.score-note { font-size: .85rem; color: var(--text-3); }
.band--hypotheses { padding: 64px 0; }
.band--hypotheses .band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.score-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--herman-color-brass);
}
.score-card--refuted::after  { background: var(--herman-color-danger); }
.score-card--partial::after  { background: var(--herman-color-warning); }
.score-card--confirmed::after { background: var(--herman-color-positive); }
.score-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.score-card-id { color: var(--text-4); font-weight: 700; }
.verdict {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid currentColor;
}
.verdict--confirmed { color: var(--herman-color-positive); }
.verdict--refuted   { color: var(--herman-color-danger); }
.verdict--partial   { color: var(--herman-color-warning); }
.score-card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}
.score-card-prediction {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-4);
  margin: 0;
}
.score-card-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 4px 0;
}
.score-card-metric .metric-num {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.score-card-metric .metric-delta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.04em;
}
.score-card-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-3);
  margin: 0;
}
.score-card-body em { color: var(--herman-color-brass); font-style: italic; }

/* ---------- metric strip --------------------------------------- */
.band--dataset { padding: 64px 0; }
.band--dataset .band-inner--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.metric-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.metric-strip li {
  background: var(--bg-1, var(--bg, transparent));
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-strip li > .metric-num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.metric-strip li > .metric-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- conclusion callout band --------------------------- */
.band--callout {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 30% 50%,
      color-mix(in srgb, var(--herman-color-warning) 6%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 50%,
      color-mix(in srgb, var(--herman-color-danger) 5%, transparent), transparent 70%);
}
.band--callout .band-inner--narrow { max-width: 760px; }

/* ---------- cover gallery ------------------------------------- */
.band--figures { padding: 64px 0; }
.cover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cover-card {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 4 / 3;
}
.cover-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.cover-card:hover img { transform: scale(1.04); }
.cover-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .9);
}
.cover-card .cover-no { font-weight: 700; color: var(--herman-color-brass); }

/* ---------- explore grid -------------------------------------- */
.band--explore { padding: 64px 0; border-bottom: 1px solid var(--border); }
.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.explore-card {
  position: relative;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px 20px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--surface-1, var(--bg-1, transparent));
  transition: border-color .2s ease, transform .15s ease;
}
.explore-card:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 165, 95, .4);
}
.explore-card .explore-no {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 22px;
  color: var(--herman-color-brass);
  line-height: 1;
}
.explore-card .explore-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
  display: block;
}
.explore-card .explore-name {
  font-size: 16px;
  font-weight: 600;
  grid-column: 1 / 3;
}
.explore-card .explore-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  grid-column: 1 / 3;
}
.explore-card::after {
  content: '→';
  color: var(--text-4);
  grid-column: 3;
  grid-row: 1 / 3;
  font-size: 18px;
}
.explore-card:hover::after { color: var(--herman-color-brass); }

/* ---------- universal responsive ------------------------------- */
@media (max-width: 880px) {
  .band--dataset .band-inner--split {
    grid-template-columns: 1fr; gap: 28px;
  }
  .band--hypotheses .band-grid,
  .cover-grid,
  .explore-grid { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .band--hypotheses,
  .band--dataset,
  .band--callout,
  .band--figures,
  .band--explore { padding: 48px 0; }
  .cover-grid { grid-template-columns: 1fr; }
}

/* ---------- generic split-band + figure primitives ------------
   Promoted from Tornado Alley's site-deltas so any research site can use a
   text-left / figure-right split band and width-safe figures without a child
   override. Lifted to apply globally (the canonical .band--dataset scope keeps
   its own tuned columns above). All colors on v2 --herman-color-* tokens; the
   min-width:0 + max-width:100% guards prevent wide matplotlib exports from
   forcing horizontal page overflow. */
.band, .band-inner { min-width: 0; }
.band-inner--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
}
.band-figure {
  display: block;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  text-align: left;
}
.band-figure img,
.band-figure figure,
.band-figure picture {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--herman-color-border);
  background: var(--herman-color-surface);
}
.band-figure figcaption {
  margin-top: 10px;
  font-family: var(--herman-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--herman-color-text-subtle);
  text-transform: uppercase;
}
.band-figure--full {
  width: 100%;
  margin: 0;
}
.band-figure--full img {
  width: 100%;
  max-width: 100%;
  height: auto;
}
@media (max-width: 900px) {
  .band-inner--split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 720px) {
  .band-figure img { max-height: 360px; object-fit: contain; object-position: top center; }
}
.hero--data .hero-headline {
  font-family: var(--herman-font-mono);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.hero--data .hero-lede {
  max-width: 640px;
  color: var(--herman-color-text-muted);
}
.hero--data .hero-cta { margin-top: 18px; }

.stats-grid--data {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1080px;
  margin: 28px auto;
  padding: 0 24px;
}
@media (max-width: 980px) {
  .stats-grid--data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .stats-grid--data { grid-template-columns: 1fr; }
}
.stat-card--accent { border-color: var(--herman-color-brass); }
.stat-card--accent .stat-value {
  color: var(--herman-color-brass);
  font-family: var(--herman-font-mono);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.stat-card--accent .stat-label {
  font-family: var(--herman-font-mono);
  font-size: 11px;
  color: var(--herman-color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-card--accent .stat-card-sub {
  color: var(--herman-color-text-subtle);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 6px;
}

.prose--data table {
  border: 1px solid var(--herman-color-border);
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0;
  font-size: 13px;
}
.prose--data table th,
.prose--data table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--herman-color-border);
  text-align: left;
}
.prose--data table th {
  background: var(--herman-color-surface-raised);
  color: var(--herman-color-text-muted);
  font-weight: 500;
  border-bottom: 2px solid var(--herman-color-border);
}
.prose--data table tbody tr:hover {
  background: var(--herman-color-surface-raised);
}
