/* Learn — the shared stylesheet for /learn/ and every answer page under it.

   One external file instead of a <style> per page: the pages stay small, a
   fix lands everywhere at once, and `style-src 'self'` already covers it.
   The pages carry NO executable JavaScript, so nothing here touches the CSP's
   script hashes (tools/csp-hashes.py). Their only <script> is a JSON-LD data
   block, which browsers never execute.

   Tokens are the landing page's (index.html :root), so a Learn page reads as
   the same site: Vestro blue on cool neutrals, Code Pro Bold for the title
   (the hero's face), Inter for headings and reading, DM Sans for small labels.
   Fonts are self-hosted; never add a font CDN here (font-src 'self'). */

@font-face {
  font-family: 'Code Pro';
  src: url('/assets/fonts/code-pro-bold-lc.woff2') format('woff2'),
       url('/assets/fonts/code-pro-bold-lc.woff') format('woff');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #3d30f6;
  --brand-dark: #1800ad;
  --brand-light: #6a8aff;
  --brand-soft: #b4c2ff;
  --brand-surface: #eae8ff;
  --navy: #080E22;
  --bg: #F6F8F8;
  --bg-alt: #EDF1F2;
  --surface: #FFFFFF;
  --text: #131A22;
  --text-2: #4E5A67;
  --text-3: #64707D;
  --border: #DFE5E8;
  --border-light: #E9EEF0;
  --font-display: 'Code Pro', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-small: 'DM Sans', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --wrap: 1120px;
  --measure: 42rem;
  --wide: 56rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); font-weight: 400;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
::selection { background: var(--brand-surface); color: var(--brand-dark); }
a { color: var(--brand); }
img { max-width: 100%; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--surface); color: var(--brand-dark);
  padding: 12px 18px; border-radius: 0 0 var(--radius-sm) 0;
  font-size: 0.875rem; font-weight: 500;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ── header ── */
header.site-nav {
  position: sticky; top: 0; z-index: 5;
  background: rgba(246,248,248,0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border-light);
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-lockup { display: block; height: 26px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-link {
  font-family: var(--font-small); font-size: 0.9375rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
}
.nav-link:hover, .nav-link[aria-current] { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-small); font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  color: #fff; background: var(--brand);
  padding: 10px 18px; border-radius: 16px;   /* the app's buttons (2026-10-26) */
  transition: background-color 0.2s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn-sm { font-size: 0.875rem; padding: 9px 16px; }

/* ── article head ── */
main { padding: 56px 0 0; }
.crumbs {
  font-family: var(--font-small); font-size: 0.875rem; color: var(--text-3);
  margin-bottom: 28px;
}
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs span[aria-hidden] { padding: 0 8px; }

.article { max-width: var(--measure); margin: 0 auto; }
.article h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.25rem, 5.4vw, 3.5rem); line-height: 1.08;
  letter-spacing: -0.02em; text-wrap: balance;
}
.dek {
  margin-top: 20px; font-size: 1.25rem; line-height: 1.55; color: var(--text-2);
  text-wrap: pretty;
}
.meta {
  margin-top: 24px; font-family: var(--font-small); font-size: 0.875rem;
  color: var(--text-3); font-variant-numeric: tabular-nums;
}
.meta strong { color: var(--text); font-weight: 600; }

/* the focal point of the first screen */
.answer {
  margin: 40px 0 8px; padding: 28px 32px;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  position: relative;
}
/* The landing page's edge light (.bx-card::after): a 1.5px ring over the
   border, a radial gradient centred on the pointer and masked down to the
   ring, so only the edge glows, brightest nearest the cursor. Position comes
   from /assets/learn.js (--mx/--my); it fades in on hover. On touch screens
   the script never runs the light, so the box stays plain white. */
.answer::after {
  content: ''; position: absolute; inset: -1px; z-index: 2; pointer-events: none;
  border-radius: calc(var(--radius-lg) + 1px);
  padding: 1.5px;
  background: radial-gradient(340px circle at calc(var(--mx, 50%) + 1px) calc(var(--my, 0%) + 1px),
              #3d30f6 0%, #6a8aff 36%, rgba(106,138,255,0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 280ms ease;
}
.answer.is-lit::after { opacity: 1; transition-duration: 160ms; }
.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-small); font-size: 0.8125rem; font-weight: 600;
  color: var(--brand); letter-spacing: 0.01em; margin-bottom: 10px;
}
.answer p { font-size: 1.125rem; line-height: 1.65; }
.answer p + p { margin-top: 12px; }

/* ── article body ── */
.prose { font-size: 1.0625rem; }
.prose > * + * { margin-top: 20px; }
.prose h2 {
  font-family: var(--font-body); font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem); line-height: 1.2;
  letter-spacing: -0.02em; text-wrap: balance;
  margin-top: 72px; scroll-margin-top: 96px;
}
.prose h2 + * { margin-top: 16px; }
.prose h3 { font-weight: 600; font-size: 1.125rem; margin-top: 36px; }
.prose strong { font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--brand-dark); }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li + li { margin-top: 10px; }
.prose ul > li::before {
  content: ''; position: absolute; left: 6px; top: 0.7em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

/* numbered steps */
.steps { list-style: none; counter-reset: step; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 0 52px; min-height: 34px;
}
.steps > li + li { margin-top: 22px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-surface); color: var(--brand-dark);
  font-family: var(--font-small); font-size: 0.9375rem; font-weight: 600;
  line-height: 1;
}
.steps strong { display: block; color: var(--text); }

.tip {
  padding: 18px 22px; border-radius: var(--radius-md);
  background: var(--bg-alt); color: var(--text-2); font-size: 1rem;
}
.tip strong { color: var(--text); }

/* ── the sample portfolio figure ── */
.sample {
  margin: 36px calc((var(--measure) - min(var(--wide), 100vw - 48px)) / 2) 0;
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.sample-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-bottom: 24px;
}
.pill {
  font-family: var(--font-small); font-size: 0.8125rem; font-weight: 600;
  color: var(--brand-dark); background: var(--brand-surface);
  padding: 4px 12px; border-radius: 999px;
}
.sample-head p { font-family: var(--font-small); font-size: 0.875rem; color: var(--text-3); }
.sample-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 760px) {
  .sample-grid { grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
}
.panel-title {
  font-family: var(--font-small); font-size: 0.875rem; font-weight: 600;
  color: var(--text-2); margin-bottom: 12px;
}
.panel-title span { font-weight: 400; color: var(--text-3); }
.rows { list-style: none; font-variant-numeric: tabular-nums; }
.rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--border-light);
  font-size: 0.9375rem;
}
.rows li:last-child { border-bottom: 0; }
.rows li:has(+ .total) { border-bottom: 0; }
.rows .total { font-weight: 600; border-top: 1px solid var(--border); border-bottom: 0; }
.rows .num { color: var(--text-2); white-space: nowrap; }
.rows .muted { color: var(--text-3); }
.rows .total .num { color: var(--text); }

.stack {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden;
  background: var(--bg-alt); margin: 4px 0 18px;
}
.stack span { display: block; height: 100%; }
.stack span + span { box-shadow: -2px 0 0 var(--surface); }
.c1 { background: var(--brand); }
.c2 { background: var(--brand-light); }
.c3 { background: var(--brand-soft); }
.c0 { background: var(--border); }
.key { list-style: none; font-variant-numeric: tabular-nums; }
.key li {
  display: grid; grid-template-columns: 12px 1fr auto auto; gap: 12px;
  align-items: baseline; padding: 7px 0; font-size: 0.9375rem;
}
.key i { width: 10px; height: 10px; border-radius: 3px; display: block; transform: translateY(1px); }
.key .num { color: var(--text-2); white-space: nowrap; }
.key .pct { min-width: 4.2em; text-align: right; font-weight: 600; }
.key .rest { color: var(--text-2); }
.headline-stat {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(2rem, 4.4vw, 2.75rem); line-height: 1; color: var(--brand);
}
.headline-stat.muted { color: var(--text-3); }
.headline-stat + p { margin: 8px 0 16px; font-size: 0.9375rem; color: var(--text-2); }
.country { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border-light); }
.sample-note {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border-light);
  font-family: var(--font-small); font-size: 0.8125rem; line-height: 1.55; color: var(--text-3);
}

/* a sample that stays inside the reading column */
.sample.inline { margin-left: 0; margin-right: 0; }
.sample-grid.one { grid-template-columns: 1fr; }
.sample .rows .up { color: #047857; font-weight: 600; }
.sample .rows .down { color: #B91C1C; font-weight: 600; }

/* ── tables (scroll inside their own box, never the page) ── */
.table-wrap {
  margin-top: 24px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.sample .table-wrap { margin-top: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.table th, .table td {
  text-align: left; vertical-align: top;
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
}
.table thead th {
  font-family: var(--font-small); font-size: 0.8125rem; font-weight: 600;
  color: var(--text-2); background: var(--bg);
}
.table thead .num { white-space: normal; }
.table tbody th { font-weight: 600; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td, .table tfoot th { font-weight: 600; border-top: 1px solid var(--border); border-bottom: 0; }
.table .muted { color: var(--text-2); }
.table th .muted { display: block; font-weight: 400; color: var(--text-3); font-size: 0.875em; }
.table-note {
  margin-top: 10px; font-family: var(--font-small); font-size: 0.8125rem;
  line-height: 1.55; color: var(--text-3);
}

/* ── FAQ ── */
.faq { margin-top: 20px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0; font-weight: 500; font-size: 1.0625rem; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 12px; height: 12px;
  background:
    linear-gradient(var(--brand), var(--brand)) center / 12px 2px no-repeat,
    linear-gradient(var(--brand), var(--brand)) center / 2px 12px no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 22px; color: var(--text-2); }
.faq details > div p + p { margin-top: 12px; }

/* ── the standing notice, sources ── */
.notice {
  margin-top: 72px; padding: 22px 24px; border-radius: var(--radius-md);
  background: var(--bg-alt); font-size: 0.9375rem; line-height: 1.6; color: var(--text-2);
}
.notice strong { color: var(--text); font-weight: 600; }
.sources { margin-top: 40px; font-family: var(--font-small); font-size: 0.875rem; color: var(--text-2); }
.sources h2 {
  font-family: var(--font-small); font-size: 0.875rem; font-weight: 600;
  color: var(--text); margin: 0 0 10px; letter-spacing: 0;
}
.sources ol { padding-left: 20px; }
.sources li + li { margin-top: 6px; }
.sources a { color: var(--text-2); }
.sources a:hover { color: var(--brand); }

/* ── call to action ── */
.cta {
  margin: 72px 0 0; padding: 40px; border-radius: var(--radius-lg);
  background: var(--navy); color: rgba(233,238,255,0.78);
}
.cta h2 {
  font-family: var(--font-body); font-weight: 500; color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem); line-height: 1.2; letter-spacing: -0.02em;
  margin: 0;
}
.cta p { margin: 12px 0 24px; font-size: 1rem; max-width: 34rem; }
.cta .btn { padding: 12px 22px; }
.cta small {
  display: block; margin-top: 18px; font-family: var(--font-small);
  font-size: 0.8125rem; color: rgba(233,238,255,0.55);
}

/* ── keep reading ── */
.related { margin: 64px 0 104px; }
.related h2 {
  font-family: var(--font-small); font-size: 0.875rem; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
}
.related ul { list-style: none; border-top: 1px solid var(--border); }
.related li a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border-light);
  color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.4;
}
.related li a::after { content: '\2192'; color: var(--brand); flex: none; }
.related li a:hover { color: var(--brand); }
.related .all {
  display: inline-block; margin-top: 18px;
  font-family: var(--font-small); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.related .all:hover { text-decoration: underline; }

/* ── the hub ── */
.hub-head { max-width: var(--measure); }
.hub-head h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -0.02em;
}
.hub-head .dek { max-width: 36rem; }
.topic { margin-top: 64px; }
.topic > h2 {
  font-family: var(--font-small); font-size: 0.9375rem; font-weight: 600;
  color: var(--text-2); padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.cards { list-style: none; display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card a {
  display: flex; flex-direction: column; height: 100%;
  padding: 26px 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card); text-decoration: none; color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card a:hover { border-color: var(--brand-soft); transform: translateY(-2px); }
.card h3 { font-weight: 500; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
.card p { margin-top: 10px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.6; }
.card .read {
  margin-top: auto; padding-top: 18px; font-family: var(--font-small);
  font-size: 0.875rem; font-weight: 500; color: var(--brand);
}
.hub-end { margin: 80px 0 104px; }
.start-here { margin-top: 56px; }
.start-here > h2 {
  font-family: var(--font-small); font-size: 0.9375rem; font-weight: 600;
  color: var(--brand); padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.start-here .cards { grid-template-columns: 1fr; }
.card.feature a { padding: 32px 34px; }
.card.feature h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.12; letter-spacing: -0.015em; }
.card.feature p { font-size: 1rem; max-width: 38rem; }

/* ── investment-type cards (a grid inside an article) ── */
.types { list-style: none; display: grid; grid-template-columns: 1fr; gap: 14px; margin: 28px 0 8px; }
@media (min-width: 720px) { .types { grid-template-columns: 1fr 1fr; } }
.type {
  display: flex; flex-direction: column;
  padding: 24px 24px 22px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.type h3 { font-weight: 600; font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; }
.type > p { margin-top: 8px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.6; }
.type dl { margin: 16px 0 18px; font-size: 0.875rem; line-height: 1.5; border-top: 1px solid var(--border-light); }
.type dl > div { padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.type dt { font-family: var(--font-small); font-size: 0.8125rem; color: var(--text-3); }
.type dd { margin-top: 2px; }
.type dd { color: var(--text); }
.type .more {
  margin-top: auto; font-family: var(--font-small); font-size: 0.875rem; font-weight: 500;
  color: var(--brand); text-decoration: none;
}
.type .more:hover { text-decoration: underline; }
.types-note { font-family: var(--font-small); font-size: 0.8125rem; color: var(--text-3); margin-top: 12px; }

/* ── footer ── */
footer.site-footer {
  background: var(--navy); color: rgba(233,238,255,0.75);
  padding: 56px 0 44px; font-family: var(--font-small); font-size: 0.875rem;
}
.site-footer .brand-lockup { height: 22px; margin-bottom: 24px; }
.site-footer ul {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px;
  margin-bottom: 28px; padding: 0;
}
.site-footer li a { color: rgba(233,238,255,0.75); text-decoration: none; }
.site-footer li a:hover { color: #fff; text-decoration: underline; }
.site-footer li a[aria-current] { color: #fff; font-weight: 600; }
.site-footer small {
  display: block; max-width: 62ch; line-height: 1.6;
  font-size: 0.75rem; color: rgba(233,238,255,0.5);
  padding-top: 24px; border-top: 1px solid rgba(233,238,255,0.12);
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  main { padding-top: 36px; }
  .nav-right { gap: 16px; }
  .brand-lockup { height: 22px; }
  .answer { padding: 24px 22px; }
  .answer p { font-size: 1.0625rem; }
  .prose { font-size: 1rem; }
  .prose h2 { margin-top: 56px; }
  .sample { margin-left: 0; margin-right: 0; padding: 22px 20px; }
  .sample .table-wrap { margin-left: -8px; margin-right: -8px; }
  .table { font-size: 0.875rem; }
  .table th, .table td { padding: 10px 10px; }
  .table th:first-child, .table td:first-child { padding-left: 12px; }
  .table th:last-child, .table td:last-child { padding-right: 12px; }
  .cta { padding: 30px 24px; }
  .card.feature a { padding: 26px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  header.site-nav, footer.site-footer, .skip-link, .cta { display: none; }
  body { background: #fff; }
  .faq details > div { display: block; }
}
