/* =========================================================
   THEME (Design tokens)
   - Change these once to update the whole page.
   ========================================================= */
:root{
  --bg: #f6f8fb;          /* page background */
  --card: #ffffff;        /* card background */
  --text: #1f2937;        /* primary text */
  --muted: #6b7280;       /* secondary text */
  --border: #e5e7eb;      /* borders/dividers */

  --brand: #1e3a8a;       /* primary blue */
  --brand-2: #3b82f6;     /* accent blue */

  --shadow: 0 10px 25px rgba(0,0,0,.08);
  --radius: 14px;
}

/* =========================================================
   BASE / RESET
   ========================================================= */
*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

/* Keyboard focus ring (accessibility) */
*:focus-visible{
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

/* Small helper */
.muted{ color: var(--muted); }

/* =========================================================
   HERO HEADER
   ========================================================= */
header{
  text-align: center;
  padding: 3.25rem 1rem 2.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

header h1{
  margin: 0 0 .5rem;
  font-size: clamp(1.8rem, 3vw + 1rem, 3rem);
  letter-spacing: -0.02em;
}

header p{
  margin: 0 auto;
  max-width: 68ch;
  font-size: clamp(1rem, .6vw + .9rem, 1.25rem);
  opacity: .95;
}

/* =========================================================
   LAYOUT CONTAINER
   ========================================================= */
.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* =========================================================
   CARDS (your main content blocks)
   ========================================================= */
.status-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: box-shadow .2s ease, transform .2s ease;
}

.status-card:hover{
  box-shadow: 0 15px 35px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* Headings inside cards */
.status-card h2{
  margin: 0 0 .75rem;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.status-card h3{
  margin: 1.25rem 0 .5rem;
  font-size: 1.1rem;
  color: #111827;
}

/* Text + lists inside cards */
.status-card p{ margin: .5rem 0; }

.status-card ul{
  margin: .5rem 0 0;
  padding-left: 1.2rem;
}

.status-card li{
  margin: .35rem 0;
  color: #374151;
}

/* Callout note (blue stripe box) */
.note{
  margin-top: 1.25rem;
  padding: .75rem 1rem;
  border-left: 4px solid var(--brand);
  background: #dbeafe;
  color: var(--brand);
  border-radius: 10px;
}

/* =========================================================
   BUTTONS / ACTIONS
   ========================================================= */
.actions{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.btn{
  display: inline-block;
  padding: .6rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: box-shadow .2s ease, transform .2s ease;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
}

.btn.primary{
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

/* =========================================================
   KPI ROW (small stats blocks)
   ========================================================= */
.kpis{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.kpi{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem 1rem;
  background: #f9fafb;
}

.kpi .label{
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}

.kpi .value{
  margin: .15rem 0 0;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Inline code pills (pandas/matplotlib) */
code{
  background: #eef2ff;
  padding: .1rem .35rem;
  border-radius: 6px;
  font-size: .95em;
}

/* =========================================================
   HIGHLIGHTS STYLES
   ========================================================= */
.highlights{
  margin: .75rem 0 0;
  padding-left: 1.2rem;
}

.highlights li{
  margin: .6rem 0;
  color: #374151;
}

.highlights a{
  margin-left: .5rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.highlights a:hover{
  text-decoration: underline;
}

.status-card + .status-card{
  margin-top: 1.25rem;
}

/* Small-screen card padding */
@media (max-width: 520px){
  .status-card{ padding: 1.2rem; }
}

/* =========================================================
   CHART GRID (thumbnail gallery)
   ========================================================= */
.chart-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.chart-item{
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
  background: #f9fafb;
  transition: transform .2s ease, box-shadow .2s ease;
}

.chart-item:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.chart-item a{
  display: block;
  margin-bottom: 1rem;  /* This adds the padding between image and text */
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.chart-item img{
  width: 100%;
  height: auto;
  display: block;
  transition: opacity .2s ease;
}

.chart-item a:hover img{
  opacity: .85;
}

.chart-item p{
  margin: auto 0 0;  /* This pushes the text to the bottom */
  font-size: .95rem;
  line-height: 1.5;
  color: #374151;
}

.chart-item strong{
  color: var(--brand);
}

/* Responsive: single column on small screens */
@media (max-width: 520px){
  .chart-grid{
    grid-template-columns: 1fr;
  }
}
