:root {
  --bg: #F7F4EE;
  --bg-2: #EFEBE2;
  --ink: #14150F;
  --ink-2: #2C2E27;
  --ink-3: #6B6D63;
  --rule: #1415140F;
  --rule-strong: #1415142A;
  --paper: #FBFAF6;
  --accent: oklch(0.46 0.10 152);
  --pos: oklch(0.55 0.13 152);
  --neg: oklch(0.55 0.16 28);
  --maxw: 1280px;
  --gutter: 28px;
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

body:not(.sttw-clean-builder) .td-header-wrap,
body:not(.sttw-clean-builder) .td-header-template-wrap,
body:not(.sttw-clean-builder) #td-header-menu {
  display: none !important;
}

.ticker {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.ticker-track {
  display: flex;
  gap: 56px;
  padding: 10px 0;
  animation: tick 60s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.ticker-item { display: inline-flex; gap: 10px; align-items: baseline; }
.ticker-item .sym { color: var(--ink-2); font-weight: 600; }
.ticker-item .px { color: var(--ink); }
.ticker-item .ch { font-size: 11px; }
.ch.up { color: var(--pos); }
.ch.dn { color: var(--neg); }

@keyframes tick {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 16px;
}

.brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: block;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px var(--rule-strong);
}

.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--ink-2); list-style: none; margin: 0; padding: 0; }
.nav-links li { list-style: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { justify-self: end; display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.btn:hover { background: var(--bg-2); }

/* Armor-plated Primary CTA (Start free) */
.nav-cta .btn-dark { 
  background-color: var(--ink) !important; 
  color: var(--paper) !important; 
  border-color: var(--ink) !important; 
}
.nav-cta .btn-dark:hover { 
  background-color: #000 !important; 
  border-color: #000 !important; 
}

/* Automatic Sign In Button Styling (Targets the non-dark button in the header) */
.nav-cta .btn:not(.btn-dark) {
  background-color: rgba(20, 21, 15, 0.06) !important;
  color: var(--ink) !important;
  border: 1px solid rgba(20, 21, 15, 0.1) !important;
}
.nav-cta .btn:not(.btn-dark):hover {
  background-color: rgba(20, 21, 15, 0.12) !important;
}

.btn-ghost { border-color: transparent; }
.btn .arr { font-family: var(--f-mono); transform: translateY(-0.5px); }

/* Hamburger is desktop-hidden; revealed inside the mobile breakpoint below.
   It is only output in markup on non-funnel pages (header.php gates it). */
.nav-toggle { display: none; }

@media (max-width: 920px) {
  /* Flex (not the 1fr/auto/1fr grid) so brand + CTA take only the width they
     need. The grid forced three equal columns once .nav-links was hidden, which
     pushed the CTA buttons past the right edge ("out of the border"). */
  .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

  .brand { min-width: 0; font-size: 15px; gap: 8px; }
  .brand .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand .mark { width: 28px; height: 28px; flex: 0 0 auto; }

  .nav-cta { gap: 8px; flex: 0 0 auto; }
  .nav-cta .btn { height: 34px; padding: 0 13px; font-size: 13px; }

  /* Hamburger button */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(20, 21, 15, 0.1);
    background: rgba(20, 21, 15, 0.06);
  }
  .nav-toggle:hover { background: rgba(20, 21, 15, 0.12); }
  .nav-toggle-bar {
    display: block;
    width: 17px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  /* Mobile dropdown panel — collapsed until the hamburger is toggled. Absolutely
     positioned against the sticky .nav so it spans the full header width. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 6px var(--gutter) 14px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 22px 44px -30px rgba(20, 21, 15, 0.45);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 13px 2px;
    font-size: 15px;
    color: var(--ink-2);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a:hover { color: var(--ink); }
}

@media (max-width: 520px) {
  .nav .wrap { padding-left: 18px; padding-right: 18px; }
}

/* Ticker update highlight pulse */
@keyframes price-flash {
  0% { 
    background-color: rgba(105, 211, 107, 0.35); 
    color: var(--ink); 
  }
  100% { 
    background-color: transparent; 
  }
}

.ticker-item.pulse-update .px {
  animation: price-flash 1.2s ease-out;
  border-radius: 3px;
  padding: 0 4px;
  margin: 0 -4px;
}

/* Go-to-top button — recolor tagDiv's stock light blue (#4db2ec) to the theme
   green so it matches the palette. Body prefix + !important beat the parent
   theme's .td-scroll-up rule regardless of stylesheet load order. */
body .td-scroll-up {
  background-color: var(--accent) !important;
  transition: background-color .15s ease;
}
body .td-scroll-up:hover {
  background-color: color-mix(in oklch, var(--accent) 82%, #000) !important;
}
body .td-scroll-up .td-icon-menu-up {
  color: var(--paper) !important;
}

/* Close the gap between the sticky header and the first section on every PAGE.
   Newspaper puts padding-top:48px on .td-main-content-wrap - sensible for a blog
   post, wrong for these pages, which are full-bleed raw-HTML builds whose first
   element (dark ribbon, hero band, tool shell) must butt straight up against the
   header. Measured live 2026-07-26: that 48px was the ENTIRE gap; every other
   ancestor between the header and the first section computes to 0 margin AND 0
   padding, so this one declaration is the whole fix.

   Scoped to body.page - WordPress' own class for a Page - NOT to slugs and NOT
   to body.sttw-funnel. Verified live across all 10 pages (privacy-policy,
   the-operators-mindset, thank-you, terms-of-service, dca-simulator-pro,
   contact, about + the 3 funnel pages): every one carries body.page AND
   .td-main-content-wrap, so one rule covers the whole site and any Page added
   later. Deliberately EXCLUDES posts and archives (body.single-post /
   .post-template-default / .archive), which keep Newspaper's 48px breathing
   room - there are 0 published posts today but the blog is coming, and a post
   butted against the header would read as cramped.

   The front page is unaffected either way: it renders through front-page.php
   and has no .td-main-content-wrap at all.

   Safe with the sticky header: position:sticky still occupies layout space, so
   removing the padding cannot make content slide underneath the nav.
   !important because this sheet must beat Newspaper's own .td-main-content-wrap
   rule, and the theme panel injects its custom CSS inline (later still).
   :not(.sttw-clean-builder) leaves the tagDiv page-builder view on stock
   spacing, matching the convention used in footer.css and style.css. */
body.page:not(.sttw-clean-builder) .td-main-content-wrap,
body.page:not(.sttw-clean-builder) .td-main-content-wrap > .tdc-content-wrap {
  padding-top: 0 !important;
}