/* =====================================================================
   AXIA — PERFORMANCE PAGE (performance.css)
   ===================================================================== */

/* ---------- Returns table ---------- */
.perf-table-wrap { overflow-x: auto; margin-bottom: clamp(40px, 6vw, 64px); }

.perf-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) * 3);
  overflow: hidden;
}
.perf-table caption {
  text-align: left;
  font-family: var(--ff-body);
  font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-muted);
  padding: 0 0 14px;
  caption-side: top;
}
.perf-table th,
.perf-table td {
  padding: 15px 20px;
  text-align: right;
  border-bottom: 1px solid var(--rule);
  font-size: 0.98rem;
}
.perf-table thead th {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.perf-table th[scope="row"] {
  text-align: left;
  font-weight: 600;
  color: var(--brand-ink);
}
.perf-table tbody tr:last-child th,
.perf-table tbody tr:last-child td { border-bottom: 0; }
.perf-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.perf-table .pos { color: var(--pos); font-weight: 600; }

/* ---------- KPI tiles ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) * 3);
  padding: 26px 22px;
  text-align: center;
}
.kpi .kpi-value {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500; color: var(--brand);
  line-height: 1;
}
.kpi .kpi-label {
  margin-top: 10px;
  font-size: 0.85rem; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ---------- Contributors / Detractors ---------- */
.contrib-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.contrib-block {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) * 3);
  padding: 24px 26px;
}
.contrib-block h2 {
  font-family: var(--ff-body);
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-muted); font-weight: 600; margin: 0 0 16px;
}
.contrib-block ol { padding: 0; margin: 0; counter-reset: rank; }
.contrib-block li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  counter-increment: rank;
}
.contrib-block li:last-child { border-bottom: 0; }
.contrib-block li::before {
  content: counter(rank);
  flex: 0 0 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  font-size: 0.8rem; font-weight: 700;
  border-radius: 50%;
}
.contrib-block.detractor li::before { background: var(--neg); }

/* ---------- Characteristics ---------- */
.characteristics {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) * 3);
  padding: 28px 30px;
}
.characteristics h2 {
  font-family: var(--ff-body);
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-muted); font-weight: 600; margin: 0 0 18px;
}
.char-list { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr) 1fr; gap: 0; }
.char-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; }
.char-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.char-row dt { color: var(--ink-muted); margin: 0; }
.char-row dd { margin: 0; font-weight: 600; color: var(--brand-ink); text-align: right; }

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .contrib-grid { grid-template-columns: 1fr; }
  .char-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Factsheets grid ===== */
.fs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.fs-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.fs-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(5,32,23,.10);
  border-color: var(--brand);
}
.fs-icon { font-size: 1.8rem; }
.fs-title { font-weight: 600; font-size: 1.05rem; }
.fs-go { color: var(--brand); font-weight: 600; font-size: .9rem; }

@media (max-width: 820px) { .fs-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .fs-grid { grid-template-columns: 1fr; } }

.fs-group { margin-bottom: 36px; }
.fs-group:last-child { margin-bottom: 0; }
.fs-group-title {
  font-family: var(--ff-display);
  color: var(--brand);
  font-size: 1.45rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* ===== Returns table — 2-row period header + alignment ===== */
.perf-returns th:first-child,
.perf-returns td:first-child { text-align: left; }
.perf-returns th:not(:first-child),
.perf-returns td:not(:first-child) { text-align: center; }

.perf-returns thead th { border-bottom: 0; vertical-align: middle; }
.perf-returns thead .th-period { padding-bottom: 2px; }
.perf-returns thead .th-asof {
  font-weight: 400;
  font-size: .82rem;
  border-top: 1px solid #ffffff;
  padding-top: 0;
}