/* =========================================================
   NFL Analysis – Dark Professional Theme (Single-column charts)
   ========================================================= */

:root {
  --bg: #0b0f14;              /* near-black background */
  --panel: #111826;           /* section background */
  --card: #e6e6e6;            /* light grey cards */
  --card-text: #111;          /* text on light cards */
  --border: rgba(255,255,255,0.12);

  --text: #e8eef7;            /* main text */
  --muted: rgba(232,238,247,0.75);

  --nfl-blue: #013369;
  --nfl-red: #D50A0A;
}

/* ===== Base ===== */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.45;
  overflow-x: hidden; /* prevent horizontal scrolling */
}

main {
  max-width: 1100px; /* slightly narrower to avoid overflow */
  margin: 0 auto;
  padding: 18px 14px 40px;
}

/* ===== Header / Nav ===== */
header {
  background: linear-gradient(90deg, #0f1623, #0b0f14);
  border-bottom: 1px solid var(--border);
  padding: 16px 14px;
}

header h1 {
  margin: 0 0 10px 0;
  font-size: 1.35rem;
  letter-spacing: 0.3px;
}

nav a {
  color: var(--text);
  text-decoration: none;
  margin-right: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}

nav a:hover {
  background: rgba(255,255,255,0.06);
}

/* ===== Sections ===== */
section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

section h2 {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
}

section p {
  margin: 0 0 12px 0;
  color: var(--muted);
}

/* ===== Explanation block ===== */
.explanation h3 {
  margin: 12px 0 6px 0;
  font-size: 1rem;
}

/* =========================================================
   SINGLE COLUMN CHART LAYOUT (one plot per line)
   ========================================================= */
.chart-row {
  display: grid;
  grid-template-columns: 1fr; /* one per row */
  gap: 14px;
}

/* ===== Chart cards ===== */
.chart-card {
  background: var(--card);
  color: var(--card-text);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.15);
}

.chart-card h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: var(--card-text);
}

/* Ensure images never overflow horizontally */
.chart-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;

  /* keep charts from feeling gigantic */
  max-height: 420px;
  object-fit: contain;

  border-radius: 8px;
  background: #f2f2f2;
  padding: 6px;
}

/* ===== Footer ===== */
footer {
  max-width: 1100px;
  margin: 22px auto 30px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}
