/* Vestral — Learn pages */
/* Matches the design tokens used in client/src/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;800&family=DM+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #08101f;
  --bg2: #0d1628;
  --text: #eff4ff;
  --text2: #b4c1d9;
  --text3: #7a8aa8;
  --blue: #4f8cff;
  --blue2: #3a7aff;
  --border: rgba(255,255,255,.08);
  --border2: rgba(255,255,255,.14);
  --red: #f87171;
  --green: #4ade80;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue2); text-decoration: underline; }

.wrap { max-width: 820px; margin: 0 auto; padding: 58px 1.75rem 0; }

/* ── Nav ─────────────────────────────────────────────────── */
.learn-nav {
  position: fixed; inset: 0 0 auto;
  height: 58px;
  display: flex; align-items: center;
  padding: 0 1.75rem;
  background: rgba(8,14,26,0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.learn-nav-inner {
  display: flex; align-items: center; width: 100%;
}
.learn-logo { display: block; }
.learn-logo img { height: 52px; width: auto; display: block; object-fit: contain; }
.learn-logo:hover { text-decoration: none; }
.learn-nav-links {
  display: flex; gap: 1.75rem; align-items: center; margin-left: auto;
}
.learn-nav-links a {
  font-size: .9rem; color: var(--text2); font-weight: 500;
}
.learn-nav-links a:hover { color: var(--text); text-decoration: none; }
.learn-cta {
  padding: .55rem 1rem;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff !important;
  border-radius: 9px;
  font-weight: 600; font-size: .85rem;
  box-shadow: 0 4px 18px rgba(26,92,255,.28);
  transition: transform .15s, box-shadow .15s;
}
.learn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(26,92,255,.38);
  text-decoration: none !important;
  color: #fff !important;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  padding: 1.5rem 0 0;
  font-size: .82rem;
  color: var(--text3);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumb li { display: flex; align-items: center; gap: .35rem; }
.breadcrumb li + li::before { content: "/"; color: var(--text3); margin-right: .35rem; }
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--text2); }
.breadcrumb [aria-current="page"] { color: var(--text2); }

/* ── Page header ─────────────────────────────────────────── */
.page-header { padding: 2rem 0 2.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.page-label {
  font-family: 'Inter', system-ui;
  font-size: .75rem; font-weight: 700;
  color: var(--blue); letter-spacing: .15em; text-transform: uppercase;
  margin-bottom: .85rem;
}
h1.page-h {
  font-family: 'Inter', system-ui;
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.08; letter-spacing: -.035em;
  color: var(--text);
  margin-bottom: 1rem;
}
.page-intro {
  color: var(--text2);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 680px;
}

/* ── Table of contents ───────────────────────────────────── */
.toc {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin: 0 0 3rem;
}
.toc-title {
  font-family: 'Inter', system-ui;
  font-size: .8rem; font-weight: 700;
  color: var(--text3); letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: .85rem;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex; flex-direction: column; gap: .5rem;
}
.toc li {
  counter-increment: toc;
  padding-left: 2rem;
  position: relative;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: 'Inter', system-ui;
  font-size: .8rem; font-weight: 700;
  color: var(--blue);
}
.toc a { color: var(--text2); font-size: .93rem; }
.toc a:hover { color: var(--text); text-decoration: none; }

/* ── Content blocks ──────────────────────────────────────── */
article.content { padding-bottom: 4rem; }
.content section { margin-bottom: 3rem; scroll-margin-top: 5rem; }
.content h2 {
  font-family: 'Inter', system-ui;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15; letter-spacing: -.02em;
  margin: 0 0 1.25rem;
  color: var(--text);
}
.content h3 {
  font-family: 'Inter', system-ui;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 2rem 0 .85rem;
  color: var(--text);
}
.content p {
  color: var(--text2);
  line-height: 1.78;
  margin-bottom: 1.1rem;
  font-size: .98rem;
}
.content strong { color: var(--text); font-weight: 600; }
.content ul, .content ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text2);
}
.content li { margin-bottom: .5rem; line-height: 1.75; }

/* Callout / key facts */
.callout {
  background: rgba(79,140,255,.06);
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0;
  color: var(--text2);
  font-size: .93rem;
  line-height: 1.72;
}
.callout strong { color: var(--text); }

/* Source citation */
.source {
  font-size: .78rem;
  color: var(--text3);
  font-style: italic;
  margin: .25rem 0 1.25rem;
}
.source a { color: var(--text3); text-decoration: underline; }
.source a:hover { color: var(--text2); }

/* Cross-links */
.cross-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--blue);
  font-weight: 500;
}
.cross-link::after { content: "→"; transition: transform .15s; }
.cross-link:hover::after { transform: translateX(2px); }

/* ── Hub card grid ───────────────────────────────────────── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem 0 3rem;
}
.topic-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color .15s, background .15s, transform .15s;
  display: block;
  color: inherit;
}
.topic-card:hover {
  border-color: var(--border2);
  background: rgba(255,255,255,.05);
  text-decoration: none;
  color: inherit;
  transform: translateY(-1px);
}
.topic-card h3 {
  font-family: 'Inter', system-ui;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: .6rem;
}
.topic-card p {
  color: var(--text2);
  font-size: .88rem;
  line-height: 1.65;
  margin: 0 0 .85rem;
}
.topic-card-status {
  font-family: 'Inter', system-ui;
  font-size: .72rem; font-weight: 700;
  color: var(--blue); letter-spacing: .1em; text-transform: uppercase;
}
.topic-card[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.topic-card[aria-disabled="true"] .topic-card-status { color: var(--text3); }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-section { margin: 3rem 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.25rem;
  background: none; border: none;
  padding: 1.2rem 0;
  font-family: 'Inter', system-ui;
  font-size: 1rem; font-weight: 600;
  color: var(--text);
  text-align: left; cursor: pointer;
  transition: color .15s;
}
.faq-q:hover { color: var(--blue); }
.faq-icon {
  font-family: 'Inter', system-ui;
  font-weight: 300; font-size: 1.4rem;
  color: var(--text3); line-height: 1; flex-shrink: 0;
  transition: color .15s;
}
.faq-item.open .faq-icon { color: var(--blue); }
.faq-a {
  padding: 0 0 1.5rem;
  color: var(--text2);
  font-size: .93rem;
  line-height: 1.78;
  max-width: 720px;
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* ── Disclaimer / footer ─────────────────────────────────── */
.learn-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 4rem;
  margin-top: 4rem;
}
.learn-footer-inner { max-width: 820px; margin: 0 auto; padding: 0 1.75rem; }
.disclaimer {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  color: var(--text3);
  font-size: .78rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.disclaimer strong { color: var(--text2); font-weight: 600; }
.learn-footer-links {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text3);
}
.learn-footer-links a { color: var(--text3); }
.learn-footer-links a:hover { color: var(--text2); text-decoration: none; }

@media (max-width: 640px) {
  .learn-nav-links { gap: 1rem; }
  .learn-nav-links a:not(.learn-cta) { display: none; }
  .toc { padding: 1.2rem; }
}
