/* ═══ REFERENCE DATA PAGES ═══ */

.ref-section {
  margin-bottom: 48px;
}

.ref-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}

.ref-section .ref-section-source {
  font-size: 0.78rem;
  color: var(--text-3);
  font-style: italic;
  margin-bottom: 20px;
  display: block;
  line-height: 1.4;
}

.ref-section p {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Tables */
.ref-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--bg-surface);
}

.ref-table th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  background: var(--bg-section);
  color: var(--text-3);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.ref-table td {
  padding: 0.55rem 0.75rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.ref-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

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

.ref-table tr:hover td {
  background: rgba(126, 169, 164, 0.06);
}

/* Highlight values in accent */
.ref-table .val {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Source footnote below table */
.ref-footnote {
  font-size: 0.78rem;
  color: var(--text-3);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.4;
}

/* Filter / search input */
.ref-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ref-filter input {
  flex: 1;
  max-width: 320px;
  min-width: 200px;
  padding: 0.45rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-1);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ref-filter input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(126, 169, 164, 0.18);
}

.ref-filter input::placeholder {
  color: var(--text-3);
}

/* Category tabs */
.ref-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ref-tab {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ref-tab:hover {
  color: var(--text-1);
  border-color: var(--text-3);
}

.ref-tab.active {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
  font-weight: 500;
}

/* Highlight box for key values */
.ref-highlight {
  background: var(--bg-section);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}

.ref-highlight p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Bottom CTA */
.ref-cta {
  background: var(--bg-section);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: var(--space-6) var(--space-4);
  text-align: center;
  margin-top: var(--space-4);
}

.ref-cta p {
  color: var(--text-2);
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.55;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.ref-cta .btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  margin: 4px 8px;
  transition: background 0.15s;
}

.ref-cta .btn:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

.ref-cta .btn--secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-2);
}

.ref-cta .btn--secondary:hover {
  border-color: var(--accent);
  color: var(--text-1);
  background: transparent;
}

@media (max-width: 768px) {
  .ref-hero h1 { font-size: 1.4rem; }
  .ref-table { font-size: 0.82rem; }
  .ref-table th, .ref-table td { padding: 0.45rem 0.55rem; }
  .ref-cta { padding: var(--space-4); }
}
