/* The /data pages (generated by scripts/build-insights.mjs), on the site's tokens. */

.data-head { padding-bottom: 8px; }
.data-head .h2 { max-width: 860px; text-wrap: balance; }
.data-lead { max-width: 760px; font-size: 18px; line-height: 1.8; }
.data-asof { margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--faint); }
.data-back { display: inline-block; margin-bottom: 18px; font-size: 14px; font-weight: 700; }

.data-body { padding-bottom: 72px; }

.data-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 28px 0 36px; }
.data-tile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--card);
}
.data-tile b { font-size: clamp(24px, 6vw, 32px); font-weight: 900; color: var(--accent); direction: ltr; text-align: right; }
.data-tile span { font-size: 13.5px; font-weight: 500; color: var(--muted); line-height: 1.45; }
.data-tile b.is-range { font-size: clamp(20px, 4.8vw, 25px); line-height: 1.5; white-space: nowrap; }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table caption { caption-side: bottom; padding: 12px 16px; font-size: 13px; color: var(--faint); text-align: right; }
.data-table th, .data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.data-table thead th { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody th a { color: var(--text); font-weight: 700; }
.data-table tbody th a:hover { color: var(--accent); }
.data-table .num { direction: ltr; font-variant-numeric: tabular-nums; color: #cbd3df; }

.data-section { padding: 0; margin-top: 44px; font-size: 17px; line-height: 1.85; color: #cbd3df; }
.data-section h2 { margin: 0 0 12px; font-size: clamp(21px, 5.2vw, 26px); font-weight: 800; line-height: 1.3; color: var(--text); }
.data-section p { margin: 0 0 16px; }
.data-section ul:not(.data-bars) { margin: 0; padding: 0; list-style: none; }
.data-section ul:not(.data-bars) li { position: relative; margin-bottom: 10px; padding-inline-start: 22px; }
.data-section ul:not(.data-bars) li::before {
  content: ''; position: absolute; inset-inline-start: 4px; top: 0.78em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.data-note { font-size: 13.5px; color: var(--faint); }

.data-bars { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.data-bars li { display: grid; grid-template-columns: 88px 1fr 48px; align-items: center; gap: 12px; }
.data-bar-label { font-size: 14.5px; font-weight: 600; color: var(--text); }
.data-bar { position: relative; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.data-bar::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); border-radius: 99px; background: var(--accent); }
.data-bar-val { font-size: 13.5px; font-weight: 700; color: var(--muted); direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }

.data-section .data-table-wrap { margin: 4px 0 14px; }
.data-table-cost tbody th { font-weight: 700; color: var(--text); }
.data-after-table { font-size: 15.5px; color: var(--muted); }

/* Keyword links to every destination page, as chips. */
.data-section ul.data-links { display: flex; flex-wrap: wrap; gap: 8px; }
.data-section ul.data-links li { margin: 0; padding: 0; }
.data-section ul.data-links li::before { content: none; }
.data-links a {
  display: inline-block; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 99px; background: var(--card);
  font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.4;
}
.data-links a:hover { border-color: var(--accent); color: var(--accent); }

/* The FAQ reuses the landing page's accordion, aligned with the text. This
   file loads before site.css, so these rules need the extra class to win. */
.faq-wrap.data-faq { max-width: 760px; margin-inline: 0; }
.data-faq .faq-item .answer { font-size: 15.5px; line-height: 1.8; max-width: none; }

@media (max-width: 560px) {
  .data-table { font-size: 14px; }
  .data-table th, .data-table td { padding: 11px 10px; }
  .data-bars li { grid-template-columns: 76px 1fr 44px; gap: 10px; }
}

.data-cta {
  margin-top: 48px; padding: 24px;
  border: 1px solid var(--border); border-radius: 20px; background: var(--card);
}
.data-cta p { margin: 0 0 16px; font-size: 17px; line-height: 1.7; color: var(--text); font-weight: 600; }
.data-cta-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cards for the page engine's stories and guides (the /data hub, country
   pages, /guides); the cover photo on top when the page has one. */
.data-section ul.kbz-cards, .kbz-cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .data-section ul.kbz-cards, .kbz-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.data-section ul.kbz-cards li { margin: 0; padding: 0; }
.data-section ul.kbz-cards li::before { content: none; }
.kbz-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border: 1px solid var(--border); border-radius: 18px; background: var(--card);
  color: var(--text); transition: border-color 0.2s, background 0.2s;
}
.kbz-card:hover { border-color: var(--border-hi); background: var(--card-hi); color: var(--text); }
.kbz-card-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--card-hi); }
.kbz-card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.kbz-card:hover .kbz-card-image { transform: scale(1.03); }
.kbz-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.kbz-card-title { font-size: 17px; font-weight: 800; line-height: 1.35; color: var(--text); text-wrap: balance; }
.kbz-card-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .kbz-card-image { transition: none; } .kbz-card:hover .kbz-card-image { transform: none; } }
