:root {
  --bg: #f7f0e6;
  --paper: rgba(255, 251, 245, 0.86);
  --ink: #181614;
  --muted: #5c554c;
  --line: rgba(24, 22, 20, 0.1);
  --accent: #b14a2a;
  --accent-soft: #efb9a5;
  --forest: #2f443b;
  --forest-soft: #d7e3dc;
  --shadow: 0 30px 80px rgba(43, 32, 23, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(177, 74, 42, 0.13), transparent 30%),
    radial-gradient(circle at 90% 15%, rgba(47, 68, 59, 0.15), transparent 25%),
    linear-gradient(180deg, #f8f2e9 0%, var(--bg) 100%);
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 22, 20, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 22, 20, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent);
}

.site-shell {
  width: min(1240px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 20px 0 52px;
}

.hero,
.card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px 30px 34px;
  margin-bottom: 18px;
}

.hero__meta,
.hero__body {
  display: flex;
  gap: 18px;
}

.hero__meta {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.hero__nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__nav a,
.downloads a {
  color: var(--muted);
  text-decoration: none;
}

.hero__nav a:hover,
.downloads a:hover {
  color: var(--accent);
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
}

.hero__copy {
  flex: 1 1 68%;
}

.hero__copy h1,
.card h2,
.chart-card h3,
.timeline-stage__title {
  font-family: "Cormorant Garamond", serif;
  line-height: 0.95;
  margin: 10px 0 16px;
}

.hero__copy h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  max-width: 900px;
}

.hero__copy p,
.lede,
.metric-list,
.structure-grid,
.timeline-panel,
.chart-card p {
  color: var(--muted);
  line-height: 1.75;
}

.hero__card {
  flex: 0 0 320px;
  padding: 20px;
  background:
    linear-gradient(160deg, rgba(47, 68, 59, 0.96), rgba(31, 40, 35, 0.96));
  color: #f5efe7;
  align-self: stretch;
}

.hero__card h3 {
  margin: 8px 0 18px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}

.mini-stats {
  display: grid;
  gap: 12px;
}

.mini-stat {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mini-stat__value {
  font-size: 1.8rem;
  font-family: "Cormorant Garamond", serif;
}

.mini-stat__label {
  font-size: 0.92rem;
  color: rgba(245, 239, 231, 0.72);
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-decoration: none;
  background: var(--ink);
  color: white;
  font-weight: 700;
}

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  grid-column: span 4;
  padding: 28px;
  overflow: hidden;
}

.card--wide {
  grid-column: span 8;
}

.card--media {
  grid-column: span 12;
}

.accent-card {
  background:
    linear-gradient(155deg, rgba(47, 68, 59, 0.96), rgba(36, 48, 43, 0.96));
  color: #f4ede2;
}

.accent-card .eyebrow,
.accent-card .lede,
.accent-card h2,
.accent-card .timeline-panel,
.accent-card .timeline-nav button {
  color: inherit;
}

.accent-card .eyebrow {
  color: var(--accent-soft);
}

.chart-card {
  margin-top: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

.chart-card__header {
  margin-bottom: 16px;
}

.chart-card h3 {
  font-size: 2rem;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 72px;
  gap: 12px;
  align-items: center;
}

.bar-row__label {
  font-weight: 600;
}

.bar-row__track {
  height: 16px;
  background: rgba(24, 22, 20, 0.08);
  position: relative;
}

.bar-row__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #d36e4d);
}

.bar-row__fill--scgpt {
  background: linear-gradient(90deg, var(--forest), #5f8376);
}

.bar-row__value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.metric-list {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.metric-item {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: end;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.metric-item__title {
  font-weight: 600;
}

.metric-item__value {
  justify-self: end;
  font-size: 1.55rem;
  font-family: "Cormorant Garamond", serif;
  color: var(--forest);
}

.timeline-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.timeline-nav button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}

.timeline-nav button.is-active {
  background: rgba(255, 255, 255, 0.1);
}

.timeline-panel {
  margin-top: 18px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.timeline-stage__index {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.timeline-stage__title {
  font-size: 2.3rem;
}

.timeline-stage__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: rgba(244, 237, 226, 0.74);
}

.structure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.structure-item {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.structure-item h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-family: "Cormorant Garamond", serif;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.media {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.media img {
  width: 100%;
  aspect-ratio: 1.15 / 1;
  object-fit: cover;
  display: block;
}

.media figcaption {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 20px;
}

.closing {
  background:
    radial-gradient(circle at right top, rgba(177, 74, 42, 0.12), transparent 32%),
    rgba(255, 251, 245, 0.9);
}

@media (max-width: 1100px) {
  .hero__body {
    flex-direction: column;
  }

  .hero__card {
    flex-basis: auto;
  }
}

@media (max-width: 960px) {
  .card,
  .card--wide,
  .card--media {
    grid-column: span 12;
  }

  .structure-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-shell {
    width: min(100vw - 16px, 1240px);
    padding-top: 10px;
  }

  .hero,
  .card {
    padding: 20px;
  }

  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .bar-row__value {
    text-align: left;
  }
}

/* ── Updated bar chart: dual bars (Accuracy + F1) ── */
.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 160px;
  gap: 12px;
  align-items: center;
}

.bar-row__tracks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-row__track {
  height: 13px;
  background: rgba(24, 22, 20, 0.08);
  position: relative;
}

.bar-row__track--f1 {
  height: 9px;
  opacity: 0.75;
}

.bar-row__fill--top {
  background: linear-gradient(90deg, #1a5c3a, #3a9e6e);
}

.bar-row__fill--f1 {
  background: linear-gradient(90deg, #b14a2a, #d36e4d);
  opacity: 0.7;
}

.bar-row__fill--scgpt-f1 {
  background: linear-gradient(90deg, #2f443b, #5f8376);
  opacity: 0.7;
}

.bar-row__values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.bar-row__value {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.bar-row__value--f1 {
  color: var(--accent);
  opacity: 0.8;
}

/* ── 4-column media grid for figures ── */
@media (min-width: 960px) {
  .media-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
