/* ─────────────────────────────────────────────────────────────
   RunsLeft article styling.
   Server-rendered /articles and /articles/:slug pages share this
   stylesheet. Visual language matches the SPA (theme.js tokens,
   Barlow Condensed + Share Tech Mono) but stays team-neutral so
   future pieces about other clubs don't look out of place.
   ───────────────────────────────────────────────────────────── */

:root {
  --rl-bg0: #060910;
  --rl-bg1: #0b1018;
  --rl-bg2: #111a26;
  --rl-surf1: #14202f;
  --rl-surf2: #192838;
  --rl-surf3: #1f2f42;
  --rl-border: #1a2a3e;
  --rl-border-hi: #243a55;
  --rl-text: #e4e9f0;
  --rl-text-dim: #5b6d82;
  --rl-text-med: #8194a8;
  --rl-accent: #2ec4b6;       /* primary site accent (teal) */
  --rl-accent-warm: #f4a261;
  --rl-accent-blue: #6ea8fe;
  --rl-positive: #2ec4b6;
  --rl-negative: #e63946;     /* used ONLY for negative cell values */
  --rl-font-head: 'Barlow Condensed', sans-serif;
  --rl-font-body: 'Barlow Condensed', sans-serif;
  --rl-font-mono: 'Share Tech Mono', monospace;
  --rl-content-width: 760px;
  --rl-page-pad: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.rl-article-page {
  background: var(--rl-bg0);
  color: var(--rl-text);
  font-family: var(--rl-font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rl-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Header / nav ─────────────────────────────────────────── */

.rl-article-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 18px 28px;
  border-bottom: 1px solid var(--rl-border);
  background: rgba(11,16,24,0.85);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.rl-article-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--rl-text); text-decoration: none;
  font-family: var(--rl-font-head);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.rl-article-logo:hover { text-decoration: none; }
.rl-article-logo-mark {
  width: 14px; height: 14px; border-radius: 3px;
  background: linear-gradient(135deg, var(--rl-accent) 0%, var(--rl-accent-blue) 100%);
  box-shadow: 0 0 10px -2px var(--rl-accent);
}
.rl-article-logo-text { font-size: 18px; }

.rl-article-nav {
  display: inline-flex; align-items: center; gap: 18px;
  font-family: var(--rl-font-head);
}
.rl-article-nav a {
  color: var(--rl-text-med);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 0 5px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color 0.12s, border-color 0.12s;
}
.rl-article-nav a:hover { color: var(--rl-text); text-decoration: none; }
.rl-article-nav-active {
  color: var(--rl-text) !important;
  border-bottom-color: var(--rl-accent) !important;
}

/* ── Index page ───────────────────────────────────────────── */

.rl-article-index {
  max-width: 1100px; margin: 0 auto;
  padding: 32px var(--rl-page-pad) 64px;
}
.rl-article-index-header {
  text-align: center;
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--rl-border);
  margin-bottom: 32px;
}
.rl-article-index-header h1 {
  font-family: var(--rl-font-head);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.04;
  text-transform: uppercase;
  margin: 12px 0 14px;
}
.rl-article-index-header p {
  max-width: 620px; margin: 0 auto;
  color: var(--rl-text-med);
  font-size: 16px;
}

.rl-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.rl-article-card {
  display: block;
  background: var(--rl-surf1);
  border: 1px solid var(--rl-border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--rl-text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.rl-article-card:hover {
  border-color: var(--rl-border-hi);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(46,196,182,0.5);
  text-decoration: none;
}
.rl-article-card-img {
  aspect-ratio: 16 / 9;
  background: var(--rl-bg2);
  overflow: hidden;
}
.rl-article-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.rl-article-card-body { padding: 18px 20px 20px; }
.rl-article-card-eyebrow {
  font-family: var(--rl-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--rl-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rl-article-card-title {
  font-family: var(--rl-font-head);
  font-size: 22px; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
  color: var(--rl-text);
}
.rl-article-card-subtitle {
  font-size: 14px; color: var(--rl-text-med);
  margin: 0 0 10px; line-height: 1.4;
}
.rl-article-card-summary {
  font-size: 15px; color: var(--rl-text-med);
  margin: 0; line-height: 1.5;
}
.rl-article-card-tags {
  margin-top: 12px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rl-article-empty {
  grid-column: 1 / -1;
  padding: 60px 20px; text-align: center;
  color: var(--rl-text-med);
  border: 1px dashed var(--rl-border); border-radius: 8px;
}

/* ── Detail page ──────────────────────────────────────────── */

.rl-article {
  max-width: var(--rl-content-width);
  margin: 0 auto;
  padding: 28px var(--rl-page-pad) 80px;
}
.rl-article article { display: block; }

.rl-article-eyebrow {
  font-family: var(--rl-font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--rl-accent);
  text-transform: uppercase;
  margin: 12px 0 14px;
}

.rl-article-title {
  font-family: var(--rl-font-head);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.06;
  margin: 0 0 14px;
  color: var(--rl-text);
}
.rl-article-subtitle {
  font-size: 19px; color: var(--rl-text-med);
  font-weight: 400; line-height: 1.4;
  margin: 0 0 20px;
}
.rl-article-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-family: var(--rl-font-mono);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--rl-text-dim);
  text-transform: uppercase;
  padding: 14px 0;
  border-top: 1px solid var(--rl-border);
  border-bottom: 1px solid var(--rl-border);
}
.rl-article-byline { color: var(--rl-text-med); }

.rl-article-hero {
  margin: 28px 0 0;
}
.rl-article-hero img {
  width: 100%; height: auto; display: block;
  border-radius: 8px;
  border: 1px solid var(--rl-border);
}

.rl-article-body {
  margin-top: 28px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--rl-text);
}
.rl-article-body p {
  margin: 0 0 18px;
}
.rl-article-body h2 {
  font-family: var(--rl-font-head);
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.15;
  margin: 44px 0 16px;
  text-transform: uppercase;
  color: var(--rl-text);
  border-top: 1px solid var(--rl-border);
  padding-top: 28px;
}
.rl-article-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.rl-article-body h3 {
  font-family: var(--rl-font-head);
  font-size: 22px; font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 32px 0 12px;
  color: var(--rl-text);
}
.rl-article-body h4 {
  font-family: var(--rl-font-mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rl-accent);
  margin: 24px 0 10px;
}
.rl-article-body strong { color: var(--rl-text); font-weight: 700; }
.rl-article-body em { color: var(--rl-text); font-style: italic; }
.rl-article-body a {
  color: var(--rl-accent);
  border-bottom: 1px dotted currentColor;
}
.rl-article-body a:hover { text-decoration: none; color: var(--rl-text); border-bottom-color: var(--rl-text); }
.rl-article-body ul, .rl-article-body ol {
  margin: 0 0 20px; padding-left: 22px;
}
.rl-article-body li { margin-bottom: 8px; }
.rl-article-body code {
  font-family: var(--rl-font-mono);
  font-size: 0.92em;
  background: var(--rl-surf1);
  border: 1px solid var(--rl-border);
  border-radius: 4px;
  padding: 1px 6px;
}
.rl-article-body hr {
  border: none;
  border-top: 1px solid var(--rl-border);
  margin: 36px 0;
}

/* Callouts (lede + bottom-line) — accent border, slightly raised
   surface so they read as breakouts without going Phillies-red. */
.rl-article-body .article-callout {
  background: var(--rl-surf1);
  border: 1px solid var(--rl-border);
  border-left: 4px solid var(--rl-accent);
  border-radius: 6px;
  padding: 18px 22px;
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--rl-text);
}
.rl-article-body .article-callout p { margin: 0 0 10px; }
.rl-article-body .article-callout p:last-child { margin: 0; }
.rl-article-body .article-callout strong { color: var(--rl-accent); }
.rl-article-body .article-callout--lede {
  font-size: 18px;
  border-left-color: var(--rl-accent-warm);
}
.rl-article-body .article-callout--lede strong { color: var(--rl-accent-warm); }

/* Pull quote — large, no full-bleed treatment, accent left rule. */
.rl-article-body .article-pullquote {
  margin: 28px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--rl-accent);
  font-family: var(--rl-font-head);
  font-size: 22px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.35;
  color: var(--rl-text);
}
.rl-article-body .article-pullquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rl-text-dim);
  font-family: var(--rl-font-mono);
}

/* Stat-card grids — 2-up / 3-up / 4-up via auto-fit.
   Each child is .article-stat with .article-stat-value + .article-stat-label. */
.rl-article-body .article-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.rl-article-body .article-stat {
  background: var(--rl-surf1);
  border: 1px solid var(--rl-border);
  border-top: 3px solid var(--rl-accent);
  border-radius: 6px;
  padding: 16px 14px 14px;
  text-align: center;
}
.rl-article-body .article-stat-value {
  display: block;
  font-family: var(--rl-font-head);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--rl-text);
  letter-spacing: -0.01em;
}
.rl-article-body .article-stat-label {
  display: block;
  margin-top: 8px;
  font-family: var(--rl-font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rl-text-med);
}
.rl-article-body .article-stat--negative { border-top-color: var(--rl-negative); }
.rl-article-body .article-stat--negative .article-stat-value { color: var(--rl-negative); }
.rl-article-body .article-stat--positive { border-top-color: var(--rl-positive); }
.rl-article-body .article-stat--positive .article-stat-value { color: var(--rl-positive); }

/* Tables — right-align numerics, accent header rule, +/- cells. */
.rl-article-body .article-table-wrap { overflow-x: auto; margin: 24px 0; }
.rl-article-body .article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--rl-surf1);
  border: 1px solid var(--rl-border);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--rl-font-body);
}
.rl-article-body .article-table th,
.rl-article-body .article-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rl-border);
  vertical-align: top;
}
.rl-article-body .article-table thead th {
  background: var(--rl-surf2);
  border-bottom: 2px solid var(--rl-accent);
  font-family: var(--rl-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rl-text);
}
.rl-article-body .article-table tbody tr:last-child td { border-bottom: none; }
.rl-article-body .article-table tbody tr:hover td { background: var(--rl-surf2); }
.rl-article-body .article-table .num,
.rl-article-body .article-table th.num,
.rl-article-body .article-table td.num {
  text-align: right;
  font-family: var(--rl-font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rl-article-body .article-table .pos { color: var(--rl-positive); }
.rl-article-body .article-table .neg { color: var(--rl-negative); }
.rl-article-body .article-table tfoot td {
  background: var(--rl-surf2);
  border-top: 1px solid var(--rl-border-hi);
  font-weight: 700;
}

/* Figures + captions. */
.rl-article-body .article-figure {
  margin: 28px 0;
  padding: 0;
}
.rl-article-body .article-figure img {
  width: 100%; height: auto; display: block;
  border-radius: 6px;
  border: 1px solid var(--rl-border);
}
.rl-article-body .article-figure figcaption {
  margin-top: 10px;
  font-family: var(--rl-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rl-text-dim);
  text-align: center;
}

/* Verdict box — two-column comparison at the article's end. */
.rl-article-body .article-verdict {
  margin: 36px 0 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--rl-surf1);
  border: 1px solid var(--rl-border-hi);
  border-radius: 8px;
  padding: 22px;
}
.rl-article-body .article-verdict-col {
  padding: 0 6px;
}
.rl-article-body .article-verdict-col + .article-verdict-col {
  border-left: 1px solid var(--rl-border);
}
.rl-article-body .article-verdict-name {
  font-family: var(--rl-font-head);
  font-size: 22px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 4px;
}
.rl-article-body .article-verdict-role {
  font-family: var(--rl-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rl-text-dim);
  margin-bottom: 14px;
}
.rl-article-body .article-verdict-grade {
  font-family: var(--rl-font-head);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  color: var(--rl-accent);
  margin: 6px 0 12px;
}
.rl-article-body .article-verdict-grade--negative { color: var(--rl-negative); }
.rl-article-body .article-verdict ul {
  margin: 8px 0 0; padding-left: 18px;
  font-size: 14px;
  color: var(--rl-text-med);
}
.rl-article-body .article-verdict li { margin-bottom: 6px; line-height: 1.4; }

@media (max-width: 640px) {
  .rl-article-body .article-verdict {
    grid-template-columns: 1fr;
  }
  .rl-article-body .article-verdict-col + .article-verdict-col {
    border-left: none;
    border-top: 1px solid var(--rl-border);
    padding-top: 16px;
    margin-top: 4px;
  }
}

/* Tags + back link. */
.rl-article-tags {
  margin: 36px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rl-article-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--rl-surf1);
  border: 1px solid var(--rl-border);
  border-radius: 999px;
  font-family: var(--rl-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rl-text-med);
}
.rl-article-back {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--rl-border);
  font-family: var(--rl-font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Footer ───────────────────────────────────────────────── */

.rl-article-footer {
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 18px 24px 28px;
  border-top: 1px solid var(--rl-border);
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
  gap: 12px;
  font-family: var(--rl-font-mono);
  font-size: 10px; letter-spacing: 0.06em;
  color: var(--rl-text-dim);
  text-transform: uppercase;
}
.rl-article-footer-links { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.rl-article-footer-links a {
  color: var(--rl-text-med);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.rl-article-footer-links a:hover { color: var(--rl-accent); }

/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 640px) {
  .rl-article-header { padding: 14px 16px; gap: 14px; }
  .rl-article-nav { gap: 12px; }
  .rl-article-nav a { font-size: 11px; letter-spacing: 0.12em; }
  .rl-article { padding: 18px 18px 60px; }
  .rl-article-body { font-size: 16px; }
  .rl-article-body h2 { font-size: 24px; margin: 32px 0 12px; padding-top: 22px; }
  .rl-article-body h3 { font-size: 19px; }
  .rl-article-body .article-stat-value { font-size: 26px; }
  .rl-article-body .article-table th,
  .rl-article-body .article-table td { padding: 8px 10px; font-size: 13px; }
}
