:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --row: #f5f5f5;
  --radius: 14px;
}

.wrap {
 
}

.heading {
  margin: 0 0 16px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.table-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

caption {
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  background: linear-gradient(180deg, #f0f9ff, #fff);
  border-bottom: 1px solid var(--border);
}

thead th {
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

tbody tr:nth-child(even) td {
  background: var(--row);
}

tbody tr:last-child td {
  border-bottom: none;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Responsive: stack rows to cards on small screens */
@media (max-width: 720px) {
  table, thead, tbody, th, td, tr { 
    display: block; 
  }
  
  thead { 
    display: none; 
  }

  caption {
    border-bottom: 0;
    padding-bottom: 8px;
  }

  tbody tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 12px;
    overflow: hidden;
  }

  tbody td {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }

  tbody tr:last-child td:last-child {
    border-bottom: none;
  }

  tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  /* Make first column (Key Factor) look like a section header inside each card */
  tbody td[data-label="Key Factor"] {
    background: #f8fafc;
    font-weight: 700;
    grid-template-columns: 1fr;
  }
  
  tbody td[data-label="Key Factor"]::before {
    content: "Key Factor";
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
  }
}
