/* ETF comparison hub (/etf-comparison/…) — page-specific styles.
   Reuses the quartet tokens and rides alongside calculators-v2.css (linked
   by the same pages) for q2-* / eo-* pieces. Only ec-* lives here. */

.ec-page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.ec-eyebrow {
  font-family: var(--font-quartet-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quartet-cyan);
  margin: 18px 0 6px;
}

.ec-page h1 {
  font-family: var(--font-quartet);
  color: var(--ink-deep);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 10px;
}

.ec-thesis {
  color: var(--muted-deep);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 70ch;
  margin: 0 0 6px;
}

.ec-alias,
.ec-asof {
  color: var(--muted-deep-2);
  font-size: 0.82rem;
  margin: 2px 0;
}

/* Hero stat band */
.ec-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 36px;
  background: var(--surface-deep);
  border: 1px solid var(--line-deep);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 18px 0 26px;
}

.ec-hero-pct {
  font-family: var(--font-quartet-mono);
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 700;
  color: var(--quartet-cyan);
  line-height: 1;
}

.ec-hero-pct span { font-size: 0.5em; }

.ec-hero-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-deep-2);
}

.ec-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.ec-hero-stat .v {
  font-family: var(--font-quartet-mono);
  font-size: 1.25rem;
  color: var(--ink-deep);
  display: block;
}

.ec-hero-stat .k {
  font-size: 0.78rem;
  color: var(--muted-deep-2);
}

/* Sections */
.ec-section { margin: 34px 0; }

.ec-section h2 {
  font-family: var(--font-quartet);
  color: var(--ink-deep);
  font-size: 1.3rem;
  margin: 0 0 12px;
}

.ec-note {
  color: var(--muted-deep-2);
  font-size: 0.82rem;
  margin: 8px 0 0;
}

.ec-note a {
  color: var(--quartet-cyan);
  font-weight: 600;
  text-decoration: none;
}
.ec-note a:hover,
.ec-note a:focus-visible { text-decoration: underline; }

/* Tables */
.ec-tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line-deep);
  border-radius: 12px;
  background: var(--surface-deep);
}

.ec-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  color: var(--ink-deep-2);
}

.ec-table th {
  font-family: var(--font-quartet-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-deep-2);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-deep);
  white-space: nowrap;
}

.ec-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-deep-2);
  vertical-align: top;
}

.ec-table tr:last-child td { border-bottom: none; }

.ec-table td.num,
.ec-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-quartet-mono);
  white-space: nowrap;
}

.ec-table td.lead { color: var(--muted-deep); white-space: nowrap; }
/* Facts-table values: mono + tabular for codes and figures, but left-aligned
   like every other value in that table. Right alignment stays reserved for
   the true numeric ledgers (fees, weights) via .num. */
.ec-table td.mono {
  font-family: var(--font-quartet-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ec-table .pos { color: var(--quartet-pos); }
/* Holding ticker chip inside the shared-holdings table (disambiguates the
   two Alphabet share classes). */
.ec-table .tk {
  font-family: var(--font-quartet-mono);
  font-size: 0.75rem;
  color: var(--muted-deep-2);
  margin-right: 8px;
}
.ec-tilt { margin-bottom: 12px; }

/* Phone width: the at-a-glance table carries two ISINs (nowrap mono), which
   at desktop density pushes the table past 375px and hides the second fund
   behind a scroll. Tighter cells + a smaller numeric size fit it without
   scrolling; the wrap's overflow-x stays as the safety net. */
@media (max-width: 480px) {
  .ec-table { font-size: 0.85rem; }
  .ec-table th { padding: 8px 8px; }
  .ec-table td { padding: 8px 8px; }
  .ec-table td.num, .ec-table th.num { font-size: 0.72rem; }
  .ec-table td.mono { font-size: 0.72rem; }
  .ec-table td.lead { white-space: normal; }
}

/* FAQ */
.ec-faq { max-width: 76ch; }
.ec-faq h3 {
  color: var(--ink-deep);
  font-size: 1rem;
  margin: 18px 0 4px;
}
.ec-faq p {
  color: var(--muted-deep);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

/* Related pairs + hub cards */
.ec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ec-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  box-sizing: border-box;
  background: var(--surface-deep);
  border: 1px solid var(--line-deep);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.ec-card:hover,
.ec-card:focus-visible { border-color: var(--quartet-cyan-dim); }

.ec-card .t {
  color: var(--ink-deep);
  font-weight: 600;
  display: block;
}

.ec-card .m {
  font-family: var(--font-quartet-mono);
  color: var(--muted-deep-2);
  font-size: 0.8rem;
}

.ec-group-title {
  font-family: var(--font-quartet-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-deep-2);
  margin: 26px 0 10px;
}

@media (max-width: 640px) {
  .ec-hero { padding: 16px; gap: 10px 22px; }
}
