/* learn.hadri.us — shared stylesheet for SEO/AEO content pages
   Design language reused from hi.hadri.us (_shared/style.css):
   brand purple #4c3dab, Satoshi body / DM Serif Display headings, dark hero.
   These are LIGHT, READABLE content pages (white bg, serif headings, generous
   type) — not lead-capture. Optimized for answer extractability + scannability.
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:       #4c3dab;
  --purple-dark:  #513ccd;
  --purple-tint:  #f3f1fb;
  --ink:          #1a1830;
  --body:         #33314a;
  --muted-ink:    #6b6982;
  --line:         #e6e4f0;
  --dark:         #111;
  --hero-grad:    linear-gradient(135deg, #0d0d1a 0%, #1e1a3f 45%, #3d3270 100%);
  --font-body:    'Satoshi', 'Inter', Arial, sans-serif;
  --font-heading: 'DM Serif Display', 'TT Livret Text', Georgia, serif;
  --maxw:         760px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: #fff;
  color: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 999;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-logo {
  text-decoration: none; color: #fff;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -.01em;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: rgba(255,255,255,.7); text-decoration: none;
  font-size: .9rem; font-weight: 500; transition: color .15s;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  display: inline-flex; align-items: center;
  padding: .5rem 1.1rem;
  background: var(--purple);
  color: #fff !important; text-decoration: none;
  font-weight: 600; font-size: .875rem;
  border-radius: .5rem; transition: background .15s;
}
.nav-cta:hover { background: var(--purple-dark); }

/* ── Hero band (compact — content pages) ── */
.hero {
  background: var(--hero-grad);
  color: #fff;
  padding: 56px 32px 60px;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 2rem; padding: .3rem .85rem;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  font-weight: 400; line-height: 1.12;
  color: #fff; margin-bottom: 1rem; letter-spacing: -.01em;
}
.hero-sub {
  font-size: 1.1rem; line-height: 1.6;
  color: rgba(255,255,255,.72); max-width: 640px;
}
.hero-meta {
  margin-top: 1.5rem; font-size: .8rem; color: rgba(255,255,255,.5);
  display: flex; flex-wrap: wrap; gap: 8px 18px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ── Breadcrumb ── */
.breadcrumb {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 32px 0;
  font-size: .8rem; color: var(--muted-ink);
}
.breadcrumb a { color: var(--purple); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--muted-ink); margin: 0 6px; }

/* ── Article ── */
.article {
  max-width: var(--maxw); margin: 0 auto;
  padding: 40px 32px 72px;
}

/* Answer-first snippet block */
.answer {
  background: var(--purple-tint);
  border-left: 4px solid var(--purple);
  border-radius: 0 .6rem .6rem 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.answer p { font-size: 1.15rem; line-height: 1.6; color: var(--ink); margin: 0; }
.answer p + p { margin-top: .75rem; }

.article h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem; font-weight: 400; line-height: 1.2;
  color: var(--ink);
  margin: 2.75rem 0 1rem; letter-spacing: -.01em;
  scroll-margin-top: 80px;
}
.article h3 {
  font-size: 1.2rem; font-weight: 700; line-height: 1.3;
  color: var(--ink); margin: 2rem 0 .75rem;
  scroll-margin-top: 80px;
}
.article p { margin-bottom: 1.1rem; }
.article a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
.article a:hover { color: var(--purple-dark); }

.article ul, .article ol { margin: 0 0 1.25rem 1.25rem; }
.article li { margin-bottom: .55rem; padding-left: .25rem; }
.article strong { color: var(--ink); font-weight: 700; }

.lede { font-size: 1.15rem; color: var(--body); }

/* Table of contents */
.toc {
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  background: #fbfbfe;
}
.toc-head {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-ink); margin-bottom: .75rem;
}
.toc ol { margin: 0 0 0 1.1rem; }
.toc li { margin-bottom: .4rem; }
.toc a { color: var(--purple); text-decoration: none; font-size: .95rem; }
.toc a:hover { text-decoration: underline; }

/* Data / checklist table */
.table-wrap { overflow-x: auto; margin: 0 0 1.75rem; }
table {
  width: 100%; border-collapse: collapse; font-size: .95rem;
  border: 1px solid var(--line); border-radius: .6rem; overflow: hidden;
}
thead th {
  background: var(--purple-tint); color: var(--ink);
  text-align: left; font-weight: 700; font-size: .85rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line);
}
tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #fafaff; }

/* Checklist */
.checklist { list-style: none; margin: 0 0 1.75rem !important; padding: 0; }
.checklist li {
  position: relative; padding-left: 2rem; margin-bottom: .75rem;
}
.checklist li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--purple); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Callout */
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--purple);
  background: #fbfbfe; border-radius: 0 .6rem .6rem 0;
  padding: 1rem 1.35rem; margin: 0 0 1.75rem;
  font-size: .98rem;
}
.callout-title { font-weight: 700; color: var(--ink); margin-bottom: .25rem; }

/* Source citation note */
.sources { font-size: .9rem; color: var(--muted-ink); }
.sources ul { margin-left: 1.25rem; }

/* FAQ (details/summary — extractable + accessible without JS) */
.faq { margin-top: 1rem; }
.faq details {
  border: 1px solid var(--line); border-radius: .6rem;
  margin-bottom: .75rem; overflow: hidden; background: #fff;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1rem 1.25rem; font-weight: 700; color: var(--ink);
  font-size: 1.02rem; display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--purple); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq-body { padding: 1rem 1.25rem 1.25rem; color: var(--body); }
.faq-body p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: var(--hero-grad); border-radius: 1rem;
  padding: 2.25rem 2rem; margin: 3rem 0 0; text-align: center;
}
.cta-band h2 {
  font-family: var(--font-heading); color: #fff; font-weight: 400;
  font-size: 1.6rem; margin: 0 0 .5rem; letter-spacing: -.01em;
}
.cta-band p { color: rgba(255,255,255,.72); margin: 0 auto 1.5rem; max-width: 460px; }
.cta-btn {
  display: inline-flex; align-items: center;
  padding: .8rem 1.6rem; background: #fff; color: var(--purple) !important;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border-radius: .6rem; transition: transform .15s;
}
.cta-btn:hover { transform: translateY(-1px); }

/* Related links */
.related { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.75rem; }
.related-head {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-ink); margin-bottom: 1rem;
}
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.related-card {
  border: 1px solid var(--line); border-radius: .75rem;
  padding: 1.1rem 1.25rem; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; display: block;
}
.related-card:hover { border-color: var(--purple); box-shadow: 0 6px 20px rgba(76,61,171,.08); }
.related-card .rc-kicker {
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--purple); margin-bottom: .35rem;
}
.related-card .rc-title { font-weight: 700; font-size: 1rem; line-height: 1.3; margin-bottom: .25rem; }
.related-card .rc-desc { font-size: .85rem; color: var(--muted-ink); line-height: 1.45; }

/* ── Glossary hub grid ── */
.glossary-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem; margin: 1.5rem 0 0;
}
.glossary-card {
  border: 1px solid var(--line); border-radius: .75rem;
  padding: 1.25rem 1.35rem; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; display: block;
}
.glossary-card:hover { border-color: var(--purple); box-shadow: 0 6px 20px rgba(76,61,171,.08); }
.glossary-card .gc-term {
  font-family: var(--font-heading); font-size: 1.25rem; font-weight: 400;
  color: var(--ink); margin-bottom: .35rem; letter-spacing: -.01em;
}
.glossary-card .gc-def { font-size: .88rem; color: var(--muted-ink); line-height: 1.5; }
.glossary-card .gc-tag {
  display: inline-block; margin-top: .75rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--purple); background: var(--purple-tint);
  padding: .2rem .6rem; border-radius: 1rem;
}
.section-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-ink);
  margin: 2.5rem 0 .5rem;
}

/* ── Footer ── */
.footer { background: var(--dark); color: rgba(255,255,255,.55); padding: 3rem 32px 2rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 24px; padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1.5rem;
}
.footer-logo { color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; }
.footer-tagline { font-size: .82rem; color: rgba(255,255,255,.4); margin-top: .5rem; max-width: 260px; line-height: 1.5; }
.footer-links { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.55); text-decoration: none; font-size: .85rem; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-legal { font-size: .75rem; color: rgba(255,255,255,.3); line-height: 1.6; }
.footer-legal a { color: rgba(255,255,255,.45); }

/* ── Nav wordmark tag + button-as-cta ── */
.nav-logo-tag {
  font-weight: 500; font-size: .82rem; color: rgba(255,255,255,.5);
  padding-left: 6px; margin-left: 4px; border-left: 1px solid rgba(255,255,255,.22);
}
button.nav-cta { border: none; cursor: pointer; font-family: var(--font-body); }
.footer-linkbtn {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-body); color: rgba(255,255,255,.55);
  font-size: .85rem; transition: color .15s;
}
.footer-linkbtn:hover { color: #fff; }
button.cta-btn { border: none; cursor: pointer; font-family: var(--font-body); font-size: .95rem; }

/* ── Doc layout: sticky left TOC + content column (content pages only) ── */
.hero--doc .hero-inner { max-width: 1100px; padding-left: 276px; }

.doc-grid {
  max-width: 1100px; margin: 0 auto;
  padding: 36px 32px 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 56px;
  align-items: start;
}
.toc-sidebar { grid-column: 1; }
.doc-main { grid-column: 2; min-width: 0; }
.doc-main .breadcrumb { max-width: none; margin: 0; padding: 0 0 8px; }
.doc-main .article { max-width: none; margin: 0; padding: 0; }

/* Sticky TOC panel */
.toc-panel { position: sticky; top: 84px; }
.toc-panel .toc-head {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-ink); margin-bottom: .85rem;
}
.toc-panel ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc-panel li { margin: 0; }
.toc-panel a {
  display: block; padding: .4rem 0 .4rem 1rem; margin-left: -2px;
  border-left: 2px solid transparent; color: var(--muted-ink);
  text-decoration: none; font-size: .88rem; line-height: 1.4;
  transition: color .15s, border-color .15s;
}
.toc-panel a:hover { color: var(--ink); }
.toc-panel a.active { color: var(--purple); border-left-color: var(--purple); font-weight: 600; }

/* ── Broker-dealer / marketing-page components ── */
.stat-band { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 1.75rem; }
.stat .stat-num { font-family: var(--font-heading); font-size: 2rem; color: #fff; line-height: 1; }
.stat .stat-label { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: .4rem; max-width: 180px; line-height: 1.4; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 0; }
.feature-card {
  border: 1px solid var(--line); border-radius: .75rem;
  padding: 1.35rem 1.4rem; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.feature-card:hover { border-color: var(--purple); box-shadow: 0 6px 20px rgba(76,61,171,.08); }
.feature-card .fc-title { font-weight: 700; font-size: 1.02rem; color: var(--ink); margin-bottom: .4rem; line-height: 1.3; }
.feature-card .fc-desc { font-size: .92rem; color: var(--body); line-height: 1.55; }

.quote {
  border-left: 4px solid var(--purple); background: var(--purple-tint);
  border-radius: 0 .6rem .6rem 0; padding: 1.5rem 1.75rem; margin: 1.75rem 0;
}
.quote p { font-size: 1.15rem; line-height: 1.55; color: var(--ink); font-style: italic; margin: 0 0 .85rem; }
.quote cite { font-style: normal; font-size: .9rem; color: var(--muted-ink); font-weight: 600; }

/* ── Request-a-demo slide-out drawer ── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(10,8,30,.5);
  opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 1000;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
  background: #fff; z-index: 1001; box-shadow: -16px 0 48px rgba(0,0,0,.25);
  padding: 2rem 2rem 2.5rem; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 2.25rem; height: 2.25rem; border: none; background: var(--purple-tint);
  color: var(--purple); font-size: 1.4rem; line-height: 1; border-radius: .5rem; cursor: pointer;
}
.drawer-close:hover { background: #e7e2f8; }
.drawer-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); margin-bottom: .5rem; }
.drawer-title { font-family: var(--font-heading); font-weight: 400; font-size: 1.9rem; color: var(--ink); margin-bottom: .6rem; line-height: 1.1; }
.drawer-sub {
  font-size: .95rem; color: var(--muted-ink); line-height: 1.55;
  margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line);
}

/* HubSpot embedded form (rendered in the drawer as .hs-* classes) */
.hs-form, .hs-form * { font-family: var(--font-body); box-sizing: border-box; }
.hs-form-field { margin-bottom: 1rem; }
.hs-form-field > label { display: block; font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: .35rem; }
.hs-form-field .hs-field-desc { font-size: .75rem; color: #6b7280; margin-bottom: .35rem; }
.hs-form-required { color: #dc2626; }
.hs-input:not([type=checkbox]):not([type=radio]),
.hs-form textarea.hs-input, .hs-form select.hs-input {
  width: 100% !important; display: block;
  padding: .7rem .85rem; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid #d7d5e3; border-radius: .55rem;
  transition: border-color .15s, box-shadow .15s;
}
.hs-input:focus, .hs-form select.hs-input:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(76,61,171,.15);
}
.hs-input::placeholder { color: #9ca3af; }
.hs-form select.hs-input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23514c68' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem;
}
.hs-button.primary, .hs-form input[type=submit] {
  width: 100%; margin-top: .5rem; padding: .85rem 1.25rem;
  background: var(--purple); color: #fff; font-weight: 700; font-size: .95rem;
  border: none; border-radius: .6rem; cursor: pointer; transition: background .15s;
}
.hs-button.primary:hover, .hs-form input[type=submit]:hover { background: var(--purple-dark); }
.hs-error-msg, .hs-error-msgs label { color: #dc2626; font-size: .75rem; margin-top: .25rem; }
.legal-consent-container, .hs-richtext { font-size: .72rem; color: #6b7280; line-height: 1.4; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero--doc .hero-inner { max-width: var(--maxw); padding-left: 0; }
  .doc-grid { grid-template-columns: 1fr; padding: 24px 20px 56px; row-gap: 8px; }
  .toc-sidebar, .doc-main { grid-column: 1; }
  .toc-panel {
    position: static; top: auto;
    border: 1px solid var(--line); border-radius: .75rem;
    padding: 1.1rem 1.35rem; margin-bottom: 1.75rem; background: #fbfbfe;
  }
  .toc-panel ol { border-left: none; }
  .toc-panel a { padding: .3rem 0; margin-left: 0; border-left: none; }
  .toc-panel a.active { border-left: none; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 40px 20px 44px; }
  .breadcrumb { padding: 16px 20px 0; }
  .article { padding: 32px 20px 56px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer { padding: 2.5rem 20px; }
  .stat-band { gap: 1.5rem; }
}
