/* Case study pages. Loaded after styles.css. */
.page-cs { --accent-text: #8FB0D4; --bar: #8FB0D4; --bar-dim: #5D6483; --track: rgba(228,229,235,0.08); }
.page-cs .eyebrow, .page-cs .card-link, .page-cs .card-label { color: var(--accent-text); }

.the { font-weight: 800; letter-spacing: 0.02em; }

.hero-cs { min-height: 64vh; }
.hero-cs h1 { max-width: 20ch; }
.cs-sub { color: var(--text); font-weight: 600; font-size: 1.15rem; max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; }
.tag { font-size: 0.8rem; border: 1px solid rgba(228,229,235,0.25); border-radius: 999px; padding: 0.25rem 0.75rem; color: var(--text-dim); }

.cs-section { padding: 4rem 0; }
.cs-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1rem; }
.sub { font-size: 1.05rem; margin: 2.5rem 0 1rem; }
.prose > p, .prose > ul, .prose > .limits { max-width: 68ch; }
.prose p, .prose li { color: var(--text-dim); font-size: 1.05rem; line-height: 1.7; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }

/* Stat tiles */
.cs-tiles-wrap { padding: 3rem 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1rem; }
.tile { background: rgba(244,245,247,0.03); border: 1px solid rgba(228,229,235,0.12); border-radius: 10px; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.tile-value { font-size: clamp(2.4rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.05; color: var(--text); }
.tile-label { font-size: 1rem; font-weight: 700; color: var(--accent-text); }
.tile-detail { font-size: 0.92rem; color: var(--text-dim); }

/* Leaderboard: emphasis bars, one track per row = 40 checks */
.lb { display: grid; gap: 0.85rem; margin: 1.5rem 0 1rem; }
.lb-row { display: grid; grid-template-columns: 11rem 1fr 4.5rem; align-items: center; gap: 1rem; }
.lb-name { font-size: 0.95rem; color: var(--text-dim); }
.lb-me .lb-name { color: var(--text); font-weight: 700; }
.lb-track { height: 20px; background: var(--track); border-radius: 0 4px 4px 0; position: relative; }
.lb-bar { display: block; height: 100%; background: var(--bar-dim); border-radius: 0 4px 4px 0; }
.lb-me .lb-bar { background: var(--bar); }
.lb-val { font-size: 1rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.lb-of { font-weight: 400; color: var(--text-dim); font-size: 0.85rem; }
.lb-others { color: var(--text-dim); font-size: 0.95rem; max-width: 68ch; }
.lb-others strong { color: var(--text); }

.engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.eng { border-top: 2px solid rgba(228,229,235,0.15); padding-top: 0.75rem; display: flex; flex-direction: column; }
.eng-v { font-size: 1.6rem; font-weight: 700; }
.eng-l { color: var(--text-dim); font-size: 0.9rem; }

/* Screenshot */
.shot { margin: 2rem 0 1rem; }
.shot img { width: 100%; height: auto; border-radius: 8px; border: 1px solid rgba(228,229,235,0.15); display: block; }
.shot figcaption { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.75rem; max-width: 68ch; }

/* Features list */
.features { padding-left: 1.2rem; margin: 0; }
.features li { margin-bottom: 0.6rem; }
.features strong { color: var(--text); }
.kicker { color: var(--text) !important; font-weight: 700; font-size: 1.15rem !important; margin-top: 1.5rem; }

/* Replication table */
.rep { width: 100%; border-collapse: collapse; margin: 1.5rem 0 0.75rem; font-size: 0.98rem; }
.rep th, .rep td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid rgba(228,229,235,0.12); }
.rep thead th { color: var(--text-dim); font-weight: 600; font-size: 0.85rem; vertical-align: bottom; }
.rep .unit { font-weight: 400; font-size: 0.78rem; }
.rep td { font-variant-numeric: tabular-nums; }
.rep .verdict { color: var(--text-dim); }
.rep .weak th, .rep .weak .verdict { color: var(--accent-text); font-weight: 700; }
.note { color: var(--text-dim); font-size: 0.9rem; max-width: 68ch; }

.limits { margin-top: 2.5rem; border-left: 3px solid var(--accent-text); padding: 0.25rem 0 0.25rem 1.25rem; }
.limits h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.limits p { margin: 0; }

.cs-cta { text-align: left; }
.cs-cta .lede { margin-bottom: 1.5rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr; }
  .engines { grid-template-columns: repeat(2, 1fr); }
  .lb-row { grid-template-columns: 1fr 4rem; row-gap: 0.3rem; }
  .lb-name { grid-column: 1 / -1; }
  .rep { font-size: 0.85rem; }
  .rep th, .rep td { padding: 0.6rem 0.3rem; }
  .cs-section { padding: 3rem 0; }
}
