/* app/static/css/site.css — THE SINGLE STYLESHEET.
 *
 * 🔴 WHY THIS FILE EXISTS. The site chrome has been ONE definition since
 * 2026-09-14 (templates/_header.html, templates/_footer.html) and the styling
 * for it never was. On 2026-09-15 /refunds rendered "10+ yrEPS History" with no
 * space, because the markup is <strong>10+ yr</strong>EPS History and the value
 * and label only separate when `.hdr-stat strong { display: block }` applies.
 * The rule was not arriving.
 *
 * ROOT CAUSE, measured not guessed: templates/legal.html renders {{ header_css }},
 * app/routers/legal.py never passed it, so it interpolated to an empty string —
 * and site_urls.HEADER_CSS had ZERO consumers anywhere in the codebase. It was
 * written to fix this and never wired up.
 *
 * BEFORE THIS FILE there were FOURTEEN CSS sources, ~48,900 bytes: three Python
 * constants, six <style> blocks in templates/, four more embedded in Python route
 * functions, and one .css file.
 *
 * 🔴 STICKY EVERYWHERE — John's decision, 2026-09-15. `.site-header` genuinely
 * disagreed: app/main.py carried `position: sticky; top: 0; z-index: 100` and
 * HEADER_CSS did not, so the header pinned on the landing page and scrolled away
 * on the legal pages. Nobody chose that and nothing reported it.
 *
 * 🔴 SECTION ORDER IS LOAD-BEARING. The BASE BAR rules are kept separable from
 * the STAT ROW and the HEADER NAV rules, and are not interleaved, because the
 * base-header/add-on split is a later payload: base = bar + logo + Login slot;
 * add-ons = stat row, Pricing, Learn (landing) and account nav (dashboard).
 * Reorganising this file twice would be worse than organising it once.
 *
 * 🔴 ADD, NEVER SUBTRACT. A page never removes from the base. A base defined as
 * "everything minus what this page does not need" makes every new page type a
 * subtraction somebody has to remember, and the one they forget is the defect.
 */

/* ========================================================================
   1. TOKENS — every page. Legal/learn pages had no :root at all, which
      is why HEADER_CSS used literal colours as a workaround.
   ======================================================================== */

:root {
    --bg:       #0d1117;
    --surface:  #161b22;
    --surface2: #1c2128;
    --border:   #30363d;
    --muted:    #8b949e;
    --text:     #c9d1d9;
    --text-hi:  #e6edf3;
    --t1: #f0a500; --t1-dim: rgba(240,165,0,.13);  --t1-bd: rgba(240,165,0,.35);
    --t2: #3fb950; --t2-dim: rgba(63,185,80,.12);  --t2-bd: rgba(63,185,80,.30);
    --t3: #d29922; --t3-dim: rgba(210,153,34,.12); --t3-bd: rgba(210,153,34,.30);
    --t4: #f85149; --t4-dim: rgba(248,81,73,.12);  --t4-bd: rgba(248,81,73,.30);
    --radius: 10px;
  }

/* ========================================================================
   2. BASE BAR — every page that has a header. Do not interleave.
   ======================================================================== */

.site-header { background: #161b22; border-bottom: 1px solid #30363d;
               padding: 0 20px; height: 70px; flex-shrink: 0;
               display: flex; align-items: center; gap: 16px;
               position: sticky; top: 0; z-index: 100; }
.hdr-logo { height: 58px; display: block; }
.hdr-divider { width: 1px; height: 36px; background: #30363d; flex-shrink: 0; }

/* ========================================================================
   3. STAT ROW — ADD-ON. Landing and dashboard only, in a later payload.
   ======================================================================== */

.hdr-center { flex: 1; display: flex; justify-content: space-evenly; align-items: center; }
.hdr-stat { font-size: 0.80rem; color: #8b949e; white-space: nowrap; text-align: center; }
.hdr-stat strong { color: #f0a500; font-size: 0.94rem; display: block; }

/* ========================================================================
   4. HEADER NAV — ADD-ON. Landing and dashboard only, in a later payload.
   ======================================================================== */

.site-header a { color: #8b949e; text-decoration: none; }
.nav-cta { background: #f0a500; color: #000 !important; font-weight: 700 !important;
           padding: 7px 18px; border-radius: 6px; font-size: 0.82rem !important;
           text-decoration: none; white-space: nowrap; }

/* ========================================================================
   5. FOOTER — every page.
   ======================================================================== */

.qp-footer { margin-top: 48px; border-top: 1px solid #e2e8f0; padding-top: 20px;
             font-size: 0.82rem; color: #718096; }
.qp-footer-disclaimer { margin-bottom: 12px; }
.qp-footer-nav, .qp-footer-legal { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.qp-footer-nav a, .qp-footer-legal a { color: #4a5568; text-decoration: underline; }
.qp-footer-entity { margin-top: 6px; }

/* ========================================================================
   6. DISCLAIMER — pages that display scores or data.
      Moved from templates/_disclaimer.html.
   ======================================================================== */

.qp-disclaimer { margin-top: 32px; padding-top: 14px; border-top: 1px solid currentColor;
                   font-size: 0.72rem; line-height: 1.55; opacity: 0.7; max-width: 70ch; }
  .qp-disclaimer p { margin: 0; }
  .qp-disclaimer-entity { margin-top: 6px; }

/* ========================================================================
   7. PAGE: legal (/terms /privacy /refunds /disclosures)
      Moved from templates/legal.html.
   ======================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
         background: #f8f9fa; color: #1a1a2e; line-height: 1.65; }
  .qpl-page { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
  .qpl-header { background: #0f0f23; color: #fff; padding: 20px 0; margin: 0 -20px 32px; }
  .qpl-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex;
                      align-items: center; justify-content: space-between;
                      flex-wrap: wrap; gap: 12px; }
  .qpl-brand { display: flex; align-items: center; gap: 14px; }
  .qpl-logo { height: 40px; }
  .qpl-title { font-size: 1.4rem; font-weight: 700; }
  .qpl-subtitle { font-size: 0.85rem; color: #a0aec0; margin-top: 2px; }
  .qpl-cta-btn { background: #6c63ff; color: #fff; padding: 9px 20px; border-radius: 6px;
                 font-weight: 600; font-size: 0.88rem; white-space: nowrap; text-decoration: none; }
  .qpl-nav-section { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
  .qpl-nav-btn { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
                 padding: 8px 16px; font-size: 0.88rem; font-weight: 600; color: #4a5568;
                 text-decoration: none; }
  .qp-legal { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
              padding: 30px 34px; max-width: 820px; }
  .qp-legal h1 { font-size: 1.8rem; line-height: 1.25; margin-bottom: 18px; }
  .qp-legal h2 { font-size: 1.12rem; margin: 26px 0 8px; }
  .qp-legal h3 { font-size: 1rem; margin: 18px 0 6px; }
  .qp-legal p  { margin-bottom: 13px; }
  .qp-legal ul, .qp-legal ol { margin: 0 0 13px 22px; }
  .qp-legal li { margin-bottom: 6px; }
  .qp-legal a  { color: #6c63ff; text-decoration: underline; }
  .qp-legal hr { border: 0; border-top: 1px solid #e2e8f0; margin: 22px 0; }
  .qp-legal table { border-collapse: collapse; margin-bottom: 14px; width: 100%; }
  .qp-legal th, .qp-legal td { border: 1px solid #e2e8f0; padding: 7px 10px;
                               font-size: 0.9rem; text-align: left; }
  /* 🔴 THE DRAFT BANNER. Loud on purpose — see the comment at the top. */
  .qp-legal blockquote { background: #fff8e1; border: 1px solid #f0c36d;
                         border-left: 5px solid #e0a800; border-radius: 6px;
                         padding: 14px 18px; margin: 0 0 26px; font-size: 0.93rem; }
  .qp-legal blockquote p { margin-bottom: 6px; }
  .qp-legal blockquote p:last-child { margin-bottom: 0; }
  .qp-legal blockquote strong { color: #7a5c00; letter-spacing: 0.01em; }
  /* the closing version stamp */
  .qp-legal > p:last-of-type strong { color: #7a5c00; }
{{ footer_css }}
{{ header_css }}

/* ========================================================================
   8. PAGE: /roadmap
      Moved from templates/roadmap.html.
   ======================================================================== */

/* Self-contained on purpose. templates/learn/glossary.html links
       /static/css/glossary.css, which returns 404 on the live site, so this page
       carries its own styles rather than inheriting a stylesheet that is missing. */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: #f8f9fa; color: #1a1a2e; line-height: 1.65;
    }
    a { color: #6c63ff; }
    .rm-header { background: #0f0f23; color: #fff; padding: 20px 0; }
    .rm-header-inner, .rm-page { max-width: 860px; margin: 0 auto; padding: 0 20px; }
    .rm-header-inner { display: flex; align-items: center; justify-content: space-between;
                       flex-wrap: wrap; gap: 12px; }
    .rm-header a { color: #cbd5f5; font-size: 0.9rem; }
    .rm-brand { font-weight: 700; letter-spacing: 0.2px; }
    .rm-page { padding-bottom: 64px; }
    h1 { font-size: 2rem; margin: 36px 0 14px; }
    h2 { font-size: 1.35rem; margin: 40px 0 12px; scroll-margin-top: 24px; }
    h3 { font-size: 1rem; margin: 22px 0 6px; color: #2d3748; }
    p  { margin: 0 0 14px; color: #3d4757; }
    .rm-lede { font-size: 1.05rem; color: #2d3748; }
    .rm-rule { border: 0; border-top: 1px solid #e2e8f0; margin: 34px 0; }
    .rm-pill {
      display: inline-block; font-size: 0.72rem; border-radius: 12px;
      padding: 2px 10px; white-space: nowrap; vertical-align: middle; margin-left: 8px;
    }
    .rm-now  { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
    .rm-dev  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
    .rm-item { margin: 0 0 18px; }
    .rm-item em { font-style: normal; font-weight: 600; color: #1a1a2e; }
    /* 042 §3: the refusals are the strongest content on the page. Boxed, not buried. */
    .rm-refuse {
      background: #fff; border: 2px solid #1a1a2e; border-radius: 10px;
      padding: 22px 24px; margin: 34px 0;
    }
    .rm-refuse h2 { margin-top: 0; }
    .rm-refuse p { color: #1a1a2e; font-weight: 500; }
    .rm-jump { margin: 18px 0 0; font-size: 0.9rem; }
    .rm-jump a { margin-right: 14px; }
    .rm-foot { margin-top: 40px; font-size: 0.85rem; color: #718096; }
      /* 239: the site footer. ONE definition in templates/_footer.html; these five
       rules travel with it. Kept beside the page's own styles because nothing on
       main extends a base template -- see the report for why base.html was not
       taken. */
    .qp-footer { margin-top: 48px; border-top: 1px solid #e2e8f0; padding-top: 20px;
                 font-size: 0.82rem; color: #718096; }
    .qp-footer-disclaimer { margin-bottom: 12px; }
    .qp-footer-nav, .qp-footer-legal { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
    .qp-footer-nav a, .qp-footer-legal a { color: #4a5568; text-decoration: underline; }
    .qp-footer-entity { margin-top: 6px; }

/* ========================================================================
   9. PAGE: /learn/glossary
      Moved from templates/learn/glossary.html.
   ======================================================================== */

/* Base resets */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: #f8f9fa; color: #1a1a2e; line-height: 1.6;
    }
    a { color: inherit; text-decoration: none; }

    /* Layout */
    .qpl-page { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }

    /* Header */
    .qpl-header {
      background: #0f0f23; color: #fff;
      padding: 20px 0; margin: 0 -20px 32px;
    }
    .qpl-header-inner {
      max-width: 1100px; margin: 0 auto; padding: 0 20px;
      display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    }
    .qpl-brand { display: flex; align-items: center; gap: 14px; }
    .qpl-logo { height: 40px; }
    .qpl-title { font-size: 1.4rem; font-weight: 700; }
    .qpl-subtitle { font-size: 0.85rem; color: #a0aec0; margin-top: 2px; }
    .qpl-cta-btn {
      background: #6c63ff; color: #fff; padding: 9px 20px; border-radius: 6px;
      font-weight: 600; font-size: 0.88rem; white-space: nowrap;
    }
    .qpl-cta-btn:hover { background: #5a52d5; }

    /* Search */
    .qpl-search-section { margin-bottom: 24px; }
    .qpl-search-wrap { position: relative; }
    .qpl-search-box {
      display: flex; align-items: center;
      background: #fff; border: 2px solid #e2e8f0; border-radius: 10px;
      padding: 10px 14px; transition: border-color 0.2s;
    }
    .qpl-search-box:focus-within { border-color: #6c63ff; }
    .qpl-search-icon { color: #a0aec0; margin-right: 10px; flex-shrink: 0; }
    .qpl-search-input {
      border: none; outline: none; flex: 1; font-size: 1rem;
      background: transparent; color: #1a1a2e;
    }
    .qpl-search-clear {
      background: none; border: none; cursor: pointer;
      color: #a0aec0; font-size: 1rem; padding: 2px 6px;
    }
    .qpl-search-results {
      position: absolute; top: calc(100% + 6px); left: 0; right: 0;
      background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 100;
      max-height: 360px; overflow-y: auto;
    }
    .qpl-search-hint { font-size: 0.82rem; color: #718096; margin-top: 8px; }

    /* Nav pills */
    .qpl-nav-section { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
    .qpl-nav-btn {
      padding: 8px 16px; border-radius: 8px; font-size: 0.88rem;
      background: #fff; border: 1px solid #e2e8f0; color: #4a5568; cursor: pointer;
    }
    .qpl-nav-btn.active { background: #6c63ff; color: #fff; border-color: #6c63ff; }
    .qpl-nav-btn--product { background: #0f0f23; color: #fff; border-color: #0f0f23; }
    .qpl-nav-btn--product:hover { background: #1a1a3e; }

    /* Browse header */
    .qpl-browse-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 14px; font-size: 0.88rem; color: #718096;
    }

    /* Category pills */
    .qpl-category-pills {
      display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
    }
    .qpl-pill {
      padding: 5px 14px; border-radius: 20px; border: 1px solid #e2e8f0;
      background: #fff; color: #4a5568; font-size: 0.82rem; cursor: pointer;
      transition: all 0.15s;
    }
    .qpl-pill.active, .qpl-pill:hover { background: #6c63ff; color: #fff; border-color: #6c63ff; }

    /* Term cards */
    .qpl-category-group { margin-bottom: 36px; }
    .qpl-category-heading {
      font-size: 1.05rem; font-weight: 700; color: #2d3748;
      border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; margin-bottom: 16px;
    }
    .qpl-term-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
    .qpl-term-card {
      background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
      padding: 18px; transition: box-shadow 0.2s;
    }
    .qpl-term-card:hover { box-shadow: 0 4px 16px rgba(108,99,255,0.1); }
    .qpl-term-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
    .qpl-term-name { font-size: 1rem; font-weight: 700; }
    .qpl-term-name a:hover { color: #6c63ff; }
    .qpl-term-cat-badge {
      font-size: 0.72rem; background: #eef2ff; color: #6c63ff;
      border-radius: 12px; padding: 2px 10px; white-space: nowrap; flex-shrink: 0;
    }
    .qpl-term-definition { font-size: 0.85rem; color: #4a5568; margin-bottom: 8px; }
    .qpl-term-explanation { font-size: 0.82rem; color: #718096; margin-bottom: 12px; font-style: italic; }
    .qpl-term-links { display: flex; gap: 12px; flex-wrap: wrap; }
    .qpl-term-qep-link {
      font-size: 0.78rem; color: #6c63ff; font-weight: 600;
    }
    .qpl-term-qep-link:hover { text-decoration: underline; }
    .qpl-term-wiki-link { font-size: 0.78rem; color: #a0aec0; }
    .qpl-term-wiki-link:hover { color: #4a5568; text-decoration: underline; }

    /* Empty state */
    .qpl-empty-state { text-align: center; padding: 60px 20px; }
    .qpl-empty-icon { font-size: 3rem; margin-bottom: 12px; }
    .qpl-empty-title { font-size: 1.1rem; color: #4a5568; margin-bottom: 6px; }
    .qpl-empty-sub { font-size: 0.9rem; color: #a0aec0; }

    /* Attribution */
    .qpl-attribution {
      margin-top: 48px; font-size: 0.78rem; color: #a0aec0; text-align: center;
    }
    .qpl-attribution a { color: #718096; text-decoration: underline; }
      /* 239: the site footer. ONE definition in templates/_footer.html; these five
       rules travel with it. Kept beside the page's own styles because nothing on
       main extends a base template -- see the report for why base.html was not
       taken. */
    .qp-footer { margin-top: 48px; border-top: 1px solid #e2e8f0; padding-top: 20px;
                 font-size: 0.82rem; color: #718096; }
    .qp-footer-disclaimer { margin-bottom: 12px; }
    .qp-footer-nav, .qp-footer-legal { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
    .qp-footer-nav a, .qp-footer-legal a { color: #4a5568; text-decoration: underline; }
    .qp-footer-entity { margin-top: 6px; }

/* ========================================================================
   10. PAGE: /learn/glossary/<term>
      Moved from templates/learn/term.html.
   ======================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
           background: #f8f9fa; color: #1a1a2e; line-height: 1.6; }
    a { color: inherit; text-decoration: none; }
    .qpl-page { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
    .qpl-header { background: #0f0f23; color: #fff; padding: 20px 0; margin: 0 -20px 32px; }
    .qpl-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex;
                        align-items: center; justify-content: space-between;
                        flex-wrap: wrap; gap: 12px; }
    .qpl-brand { display: flex; align-items: center; gap: 14px; }
    .qpl-logo { height: 40px; }
    .qpl-title { font-size: 1.4rem; font-weight: 700; }
    .qpl-subtitle { font-size: 0.85rem; color: #a0aec0; margin-top: 2px; }
    .qpl-cta-btn { background: #6c63ff; color: #fff; padding: 9px 20px; border-radius: 6px;
                   font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
    .qpl-cta-btn:hover { background: #5a52d5; }
    .qpl-nav-section { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
    .qpl-nav-btn { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
                   padding: 8px 16px; font-size: 0.88rem; font-weight: 600; color: #4a5568; }
    .qpt-article { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
                   padding: 28px 30px; max-width: 760px; }
    .qpt-article h1 { font-size: 1.7rem; line-height: 1.25; margin-bottom: 4px; }
    .qpt-cat { font-size: 0.8rem; color: #718096; margin-bottom: 20px; }
    .qpt-article h2 { font-size: 1.15rem; margin: 24px 0 8px; }
    .qpt-article p { margin-bottom: 14px; }
    .qpt-related { display: flex; flex-wrap: wrap; gap: 10px; }
    .qpt-related a { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px;
                     padding: 6px 12px; font-size: 0.86rem; }
    .qpt-back { display: inline-block; margin-top: 22px; font-size: 0.88rem; color: #6c63ff; }
    .qpt-wiki { font-size: 0.85rem; }
    .qpt-wiki a { color: #6c63ff; text-decoration: underline; }
      /* 239: the site footer. ONE definition in templates/_footer.html; these five
       rules travel with it. Kept beside the page's own styles because nothing on
       main extends a base template -- see the report for why base.html was not
       taken. */
    .qp-footer { margin-top: 48px; border-top: 1px solid #e2e8f0; padding-top: 20px;
                 font-size: 0.82rem; color: #718096; }
    .qp-footer-disclaimer { margin-bottom: 12px; }
    .qp-footer-nav, .qp-footer-legal { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
    .qp-footer-nav a, .qp-footer-legal a { color: #4a5568; text-decoration: underline; }
    .qp-footer-entity { margin-top: 6px; }
