/* =============================================================================
   landing.css — US ETF comparison + "best of" roundup landing pages
   Surfaces: page-compare-pair.php (/compare/{a}-vs-{b}/), page-best-etfs.php
             (/best/{cat}-etfs/). Composes primitives + semantic tokens only.
   ========================================================================== */

.lp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-6) var(--gutter) var(--sp-8);
  color: var(--text-2);
}
@media (max-width: 720px) {
  .lp-wrap { padding: var(--sp-5) var(--gutter-mobile) var(--sp-7); }
}

/* breadcrumb */
.lp-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-small); color: var(--text-muted);
  margin-bottom: var(--sp-5);
}
.lp-crumbs a { color: var(--text-muted); text-decoration: none; }
.lp-crumbs a:hover { color: var(--accent); }
.lp-crumbs span[aria-hidden] { opacity: 0.5; }

/* hero */
.lp-hero { margin-bottom: var(--sp-6); }
.lp-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  color: var(--text);
  margin: var(--sp-2) 0;
}
.lp-sub {
  font-size: var(--fs-h3); color: var(--text-muted);
  margin: 0 0 var(--sp-4);
}
.lp-lead {
  font-size: var(--fs-h3); line-height: var(--lh-body);
  color: var(--text-2); max-width: 70ch;
}

/* card wrapper around a table */
.lp-card { padding: 0; overflow: hidden; margin-bottom: var(--sp-6); }
.lp-card.card { border-color: var(--border); }

/* ---- comparison + rank tables (hairline rows, no striping) ---- */
.cmp-table, .rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
}
.cmp-table th, .cmp-table td,
.rank-table th, .rank-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.cmp-table thead th, .rank-table thead th {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.cmp-table tbody tr:last-child td,
.cmp-table tbody tr:last-child th,
.rank-table tbody tr:last-child td { border-bottom: 0; }

/* comparison table: metric label column + two value columns */
.cmp-table th[scope="row"] { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.cmp-table td { color: var(--text); font-weight: 600; }
.cmp-table thead th:not(:first-child),
.cmp-table tbody td { text-align: right; }
.cmp-table thead th:first-child { text-align: left; }
.cmp-table td.is-better {
  color: var(--pos);
  background: color-mix(in srgb, var(--pos) 9%, transparent);
}

/* rank table */
.rank-table .rk-num { text-align: right; white-space: nowrap; }
.rank-table thead th.rk-num { text-align: right; }
.rank-table .rk-tick a { font-weight: 700; color: var(--accent); text-decoration: none; }
.rank-table .rk-tick a:hover { text-decoration: underline; }
.rank-table .rk-name { color: var(--text-2); text-decoration: none; }
.rank-table .rk-name:hover { color: var(--accent); }
.rank-table tbody tr:hover { background: var(--surface-2); }

/* make wide tables scroll rather than overflow on phones */
@media (max-width: 720px) {
  .lp-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cmp-table, .rank-table { min-width: 560px; }
}

/* ---- holdings two-up ---- */
.lp-holdings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
@media (max-width: 720px) { .lp-holdings { grid-template-columns: 1fr; } }
.lp-hold-col h2 { font-size: var(--fs-h2); color: var(--text); margin: 0 0 var(--sp-3); }
.lp-hold-list { list-style: none; margin: 0; padding: 0; }
.lp-hold-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.lp-hold-list li:last-child { border-bottom: 0; }
.lp-hold-name { color: var(--text-2); }
.lp-hold-pct { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- notes, links, footer line ---- */
.lp-note {
  font-size: var(--fs-h3); color: var(--text-2);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.lp-compare-links { margin-bottom: var(--sp-6); }
.lp-compare-links h2 { font-size: var(--fs-h2); color: var(--text); margin: 0 0 var(--sp-4); }
.lp-links { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.lp-updated { font-size: var(--fs-small); color: var(--text-muted); margin-top: var(--sp-5); }

/* 404 / empty state */
.lp-empty { max-width: 620px; margin: var(--sp-8) auto; text-align: center; }
.lp-empty h1 { font-family: var(--font-display); font-size: var(--fs-h1); color: var(--text); margin-bottom: var(--sp-3); }
.lp-empty a { color: var(--accent); }
