/* Best time to send pillar page CSS */

:root {
    --bg: #ffffff; --bg-soft: #f7f7f5; --bg-darker: #050510;
    --ink: #0a0a14; --ink-2: #2a2a35; --muted: #6b6b78;
    --line: #e8e8e3;
    --brand: #5b3df5; --brand-2: #8b6dff; --brand-soft: #efeaff;
    --good: #16a34a; --gold: #f59e0b;
    --radius-lg: 18px; --radius-md: 12px;
    --shadow-md: 0 12px 24px -10px rgba(20,20,40,0.10);
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  section[id], header[id], div[id] { scroll-margin-top: 80px; }
  html, body { margin: 0; padding: 0; }
  body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink); background: var(--bg);
    font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased; }
  a { color: inherit; text-decoration: none; }
  img { max-width: 100%; }
  .wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
  .wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
  .serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; }
  .eyebrow { display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--brand);
    background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; }
  .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
  .nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; }
  .logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
  .logo-img { height: 56px; display: block; }
  .logo-img.invert { filter: invert(1) brightness(2); }
  .nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--ink-2); font-weight: 500; }
  .nav-links a:hover { color: var(--brand); }
  .nav-cta { display: flex; gap: 10px; }
  .btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
    font-size: 14px; font-weight: 600; line-height: 1; border: 1px solid transparent; transition: all 0.15s ease;
    cursor: pointer; white-space: nowrap; }
  .btn-ghost { background: transparent; color: var(--ink-2); }
  .btn-ghost:hover { background: var(--bg-soft); }
  .btn-primary { background: var(--brand); color: #fff; }
  .btn-primary:hover { background: #4a30d4; }

  /* HERO */
  .pillar-hero { background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
    padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
  .breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
  .breadcrumb a { color: var(--brand); font-weight: 600; }
  .pillar-hero h1 { font-size: var(--fs-h1); font-weight: 800;
    letter-spacing: -0.025em; line-height: 1.08; margin: 18px 0 18px; }
  .pillar-hero h1 em { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; color: var(--brand); }
  .pillar-hero .lede { color: var(--muted); font-size: var(--fs-lede); line-height: 1.55; margin: 0 0 22px; }
  .meta-row { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
  .meta-row .avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #2c1798); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
  .meta-row .author { font-weight: 700; color: var(--ink); }

  /* TLDR Box */
  .tldr { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 24px 28px; margin: 0 0 36px; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
  .tldr .lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--brand); text-transform: uppercase; margin-bottom: 8px; }
  .tldr p { font-size: 17px; line-height: 1.5; color: var(--ink); margin: 0 0 8px; }
  .tldr p:last-child { margin: 0; }
  .tldr strong { color: var(--brand); }

  /* TOC */
  .toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px 26px; margin: 0 0 40px; }
  .toc-title { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin: 0 0 12px; }
  .toc ol { margin: 0; padding-left: 22px; }
  .toc li { font-size: 14px; line-height: 1.85; }
  .toc li a { color: var(--ink-2); font-weight: 500; }
  .toc li a:hover { color: var(--brand); }

  /* BODY */
  .pillar-body { padding: 48px 0 64px; }
  .pillar-body h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 56px 0 16px; line-height: 1.15; }
  .pillar-body h2 em { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; color: var(--brand); }
  .pillar-body h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 36px 0 12px; line-height: 1.55; }
  .pillar-body p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0 0 20px; }
  .pillar-body ul, .pillar-body ol { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0 0 22px; padding-left: 22px; }
  .pillar-body li { margin-bottom: 8px; }
  .pillar-body strong { color: var(--ink); font-weight: 700; }
  .pillar-body a { color: var(--brand); text-decoration: underline; text-decoration-color: rgba(91,61,245,0.30); }
  .pillar-body a:hover { text-decoration-color: var(--brand); }
  .pillar-body blockquote { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 20px 26px; border-radius: 8px; margin: 30px 0; font-style: italic; }

  /* DATA TABLE */
  .data-table { width: 100%; border-collapse: collapse; margin: 24px 0 32px; font-size: 14px; }
  .data-table th { text-align: left; padding: 12px 14px; background: var(--bg-soft); border-bottom: 2px solid var(--line); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
  .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
  .data-table tr:hover { background: var(--bg-soft); }
  .data-table .best { background: var(--brand-soft); color: var(--brand); font-weight: 700; }

  /* CALLOUT */
  .callout { background: var(--bg-soft); border-radius: var(--radius-lg); padding: 24px 28px; margin: 28px 0; border: 1px solid var(--line); }
  .callout .h { font-weight: 800; font-size: 15px; margin-bottom: 8px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
  .callout .h::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
  .callout p { font-size: 14px; margin: 0; color: var(--ink-2); }

  /* MID CTA */
  .mid-cta { background: var(--bg-darker); color: #fff; border-radius: var(--radius-lg); padding: 36px; margin: 48px 0; text-align: center; }
  .mid-cta h3 { color: #fff; font-size: 22px; font-weight: 800; margin: 0 0 12px; line-height: 1.55; letter-spacing: normal; }
  .mid-cta h3 em { color: var(--brand-2); font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-style: italic; }
  .mid-cta p { color: rgba(255,255,255,0.7); margin: 0 0 22px; font-size: 15px; }

  /* FAQ */
  .faq-section { padding: 48px 0; background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .faq-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .faq-item:last-child { border-bottom: none; }
  .faq-q { font-weight: 700; font-size: 16px; color: var(--ink); margin-bottom: 8px; }
  .faq-a { font-size: 15px; line-height: 1.65; color: var(--muted); }

  /* AUTHOR CARD */
  .author-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: flex; gap: 20px; align-items: flex-start; margin: 48px 0; }
  .author-card .avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #2c1798); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex-shrink: 0; }
  .author-card .a-name { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
  .author-card .a-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
  .author-card .a-bio { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 0; }
  .author-card .a-bio a { color: var(--brand); font-weight: 600; }

  /* FOOTER (same as other pages) */
  footer { background: var(--bg-darker); color: rgba(255,255,255,0.60); padding: 64px 0 28px; }
  .footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 48px; }
  .footer-cta-card { color: rgba(255,255,255,0.80); }
  .footer-cta-card .lede { font-size: 14px; line-height: 1.5; margin: 14px 0 18px; color: rgba(255,255,255,0.65); }
  footer .footer-heading { font-size: 11px; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 16px; line-height: 1.55; }
  footer ul { list-style: none; padding: 0; margin: 0; }
  footer ul li { margin-bottom: 10px; }
  footer ul li a { color: rgba(255,255,255,0.60); font-size: 14px; }
  footer ul li a:hover { color: #fff; }
  .footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.45); }

  @media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
  }

  /* Nav dropdown — Resources */
  .nav-links .has-submenu { position: relative; }
  .nav-links .submenu-trigger {
    display: inline-flex; align-items: center; gap: 4px;
    cursor: pointer;
  }
  .nav-links .submenu-trigger .caret {
    font-size: 10px; transition: transform 0.15s ease;
    margin-top: 1px; color: var(--muted);
  }
  .nav-links .has-submenu:hover .submenu-trigger .caret,
  .nav-links .has-submenu:focus-within .submenu-trigger .caret {
    transform: rotate(180deg); color: var(--brand);
  }
  .nav-links .submenu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 16px 40px -12px rgba(20,20,40,0.18);
    padding: 8px;
    min-width: 240px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 100;
  }
  .nav-links .submenu::before {
    content: ''; position: absolute; top: -4px; left: 0; right: 0; height: 12px;
  }
  .nav-links .has-submenu:hover .submenu,
  .nav-links .has-submenu:focus-within .submenu {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateX(-50%) translateY(4px);
  }
  .nav-links .submenu a {
    display: block; padding: 10px 14px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--ink-2);
    transition: all 0.12s ease;
  }
  .nav-links .submenu a:hover { background: var(--brand-soft); color: var(--brand); }


  /* Ensure .btn-primary text stays white inside content areas */
  .pillar-body .btn-primary,
  .pillar-body .btn-primary:hover,
  .mid-cta .btn-primary,
  .mid-cta .btn-primary:hover { color: #fff !important; text-decoration: none !important; }
