/* --- Moved from <style id=trl-auth-prehide> in privacy.html --- */
#trl-desktop-cta,#trl-mobile-cta{visibility:hidden}


/* --- Moved from <style id=inline-style> in privacy.html --- */
/* -------- TRL shared look & feel (Home/Terms-inspired) -------- */
    html { scroll-behavior: smooth; background-color: #030712; }
    body { background-color: #030712; color: #e5e7eb; font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }

    /* Anti-white flash protection */
    html, body { background: #030712; }
    .preload { visibility: hidden; opacity: 0; transition: visibility 0s linear 200ms, opacity 200ms; }
    .loaded .preload { visibility: visible; opacity: 1; transition-delay: 0s; }

    /* Global subtle grid background */
    .section-grid { position: relative; }
    .section-grid::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      opacity: 0.22;
      pointer-events: none;
      background-image:
        linear-gradient(rgba(30,64,175,0.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,64,175,0.45) 1px, transparent 1px);
      background-size: 80px 80px;
      mask-image: linear-gradient(to bottom, transparent 0%, transparent 18%, black 35%, black 100%);
    }

    /* Sticky header background & scrolled state */
    #site-header {
      background: radial-gradient(circle at top, rgba(15,23,42,0.98), rgba(15,23,42,0.90));
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border-bottom: 1px solid rgba(30,64,175,0.45);
      transition: all .3s;
    }
    #site-header.header-scrolled {
      background: radial-gradient(circle at top, rgba(15,23,42,0.98), rgba(15,23,42,0.96));
      box-shadow: 0 18px 45px rgba(15,23,42,0.95);
      border-bottom-color: rgba(37,99,235,0.7);
    }

    /* Page transition overlay */
    .page-transition-overlay {
      position: fixed;
      inset: 0;
      background-color: #030712;
      opacity: 0;
      pointer-events: none;
      transition: opacity 170ms cubic-bezier(0.22, 1, 0.36, 1);
      z-index: 9999;
    }
    .page-transition-overlay.is-active { opacity: 1; pointer-events: auto; }

    /* Fade-in-up animation */
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px);} to { opacity: 1; transform: translateY(0);} }
    .fade-in-up { opacity: 0; transform: translateY(20px); }
    .fade-in-up.in-view { animation: fadeInUp 0.4s ease-out forwards; }

    /* Slow floating glow blobs */
    @keyframes blobFloat1 { 0% { transform: scale(1) translateX(0);} 50% { transform: scale(1.1) translateX(30px);} 100% { transform: scale(1) translateX(0);} }
    @keyframes blobFloat2 { 0% { transform: scale(1) translateY(0);} 50% { transform: scale(1.15) translateY(-20px);} 100% { transform: scale(1) translateY(0);} }
    .blob-1 { animation: blobFloat1 20s ease-in-out infinite; }
    .blob-2 { animation: blobFloat2 15s ease-in-out infinite; }

    /* CTA background glow fade-in */
    .glow-bg { opacity: 0; transition: opacity 0.8s ease-out; }
    .glow-bg.in-view { opacity: 1; }

    /* CTA buttons hover scale */
    .cta-scale { transition: transform 0.15s ease-out; }
    .cta-scale:hover { transform: scale(1.02); }
    .cta-scale:active { transform: scale(0.98); }

    /* Footer social hover */
    .social-btn { transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease; }
    .social-btn:hover { transform: translateY(-1px) scale(1.05); }

    /* Hero canvas */
    #particleCanvas { pointer-events: none; position:absolute; inset:0; width:100%; height:100%; z-index:0; }

    /* Prose tweaks */
    .prose a { color: #60a5fa; text-decoration: underline; }
    .prose h2 { color: #fff; }
    .backdrop-blur-xl { backdrop-filter: blur(12px); }

    /* Sidebar */
    .sidebar-btn { transition: all .18s; }
    .sidebar-btn.active { color: #60a5fa; background: rgba(96,165,250,0.06); }
    .dot-small { width: 6px; height: 6px; border-radius: 9999px; display:inline-block; }

    @media (min-width: 1024px) { .lg\:sticky { position: sticky; top: 6rem; } }

    /* Bot-safe email copy link */
    .trl-email-contact {
      display: inline;
      white-space: nowrap;
      vertical-align: baseline;
    }

    .trl-email-copy {
      display: inline;
      border: 0;
      background: transparent;
      color: #60a5fa;
      padding: 0;
      font: inherit;
      font-weight: 500;
      line-height: inherit;
      text-decoration: underline;
      text-underline-offset: 2px;
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
      transition: color 0.15s ease;
    }

    .trl-email-copy:hover {
      color: #93c5fd;
    }

    .trl-email-copy:focus-visible {
      outline: 2px solid rgba(96, 165, 250, 0.55);
      outline-offset: 2px;
      border-radius: 0.25rem;
    }

    .trl-email-status {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }


/* --- Moved from <style id=inline-style> in privacy.html --- */
/* --- TRL PATCH: prevent BFCache snapshot content flash on mobile Back (hide restored snapshot) */
  html.trl-bfcache-hide body { opacity: 0 !important; }
  html.trl-bfcache-hide .page-transition-overlay { opacity: 1 !important; pointer-events: auto !important; }


/* --- Moved from inline style="..." attributes in privacy.html --- */

.trl-inline-style-01081384 { background: radial-gradient(circle, rgba(59,130,246,0.10) 0%, transparent 70%); }

.trl-inline-style-28dcd5c7 { background: radial-gradient(circle, rgba(34,211,238,0.08) 0%, transparent 70%); }

.trl-inline-style-acf20f66 { background-image: linear-gradient(rgba(59,130,246,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(59,130,246,0.5) 1px, transparent 1px); background-size:60px 60px; }


/* === TRL HOMEPAGE ACCESSIBILITY SETTINGS + ZOOM PATCH === */
/* Trading Journal-style mobile side menu auth area */
#mobile-menu .trl-mobile-panel {
  background: rgb(15 23 42);
  border-color: rgb(30 41 59);
}

#mobile-menu #trl-mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mobile-menu #trl-mobile-cta > a {
  width: 100%;
}

#mobile-menu .trl-mobile-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === WCAG 2.2 AA accessibility patch === */
.trl-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.trl-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100000;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  border-radius: 0.75rem;
  background: #020617;
  color: #ffffff !important;
  font-weight: 800;
}

.trl-skip-link:focus,
.trl-skip-link:focus-visible {
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  border: 2px solid #67e8f9;
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.35);
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

.trl-motion-toggle {
  --trl-logo-blue: #0ea5e9;
  position: absolute;
  left: 1rem;
  top: 5.1rem;
  z-index: 30;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0.95rem;
  border: 1.5px solid var(--trl-logo-blue);
  background: #0f172a;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  transition: none;
}

.trl-motion-toggle:hover,
.trl-motion-toggle:active {
  transform: none;
  border-color: var(--trl-logo-blue);
  background: #0f172a;
  box-shadow: none;
}

.trl-motion-toggle-icon {
  display: block;
  transform: translateY(-0.02rem);
}

@media (max-width: 640px) {
  .trl-motion-toggle {
    top: 4.75rem;
    left: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    font-size: 0.92rem;
  }
}

.trl-motion-toggle:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
.feature-card[role="link"]:focus-visible {
  outline: 3px solid #67e8f9 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 6px rgba(8, 47, 73, 0.85), 0 0 28px rgba(34, 211, 238, 0.45) !important;
}

.trl-motion-toggle:focus-visible {
  outline: 2px solid #0ea5e9 !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

#main-content:focus-visible {
  outline: 3px solid #67e8f9;
  outline-offset: -3px;
}

/* Hover-revealed content must also be available to keyboard users. */
.feature-card:focus-within .feature-details,
.feature-card[role="link"]:focus .feature-details,
.feature-card[role="link"]:focus-visible .feature-details {
  max-height: 360px;
  opacity: 1;
}

.feature-card[role="link"] {
  -webkit-tap-highlight-color: rgba(34, 211, 238, 0.22);
}

/* Improve contrast for small supporting copy used throughout the dark UI. */
.text-slate-500,
[class*="text-slate-500"] {
  color: #94a3b8 !important;
}
.text-slate-400,
[class*="text-slate-400"] {
  color: #cbd5e1 !important;
}
.border-slate-800,
[class*="border-slate-800"] {
  border-color: rgba(71, 85, 105, 0.92) !important;
}

#billing-toggle[role="switch"] {
  min-height: 44px;
}

#trl-flex-modal[aria-hidden="false"] {
  display: block;
}

#trl-flex-modal input[type="checkbox"] {
  min-width: 24px;
  min-height: 24px;
}

#trl-flex-modal label:focus-within {
  outline: 3px solid #67e8f9;
  outline-offset: 3px;
  border-color: rgba(103, 232, 249, 0.95) !important;
}

/* User-triggered and OS-triggered reduced motion. */
html.trl-motion-paused *,
html.trl-motion-paused *::before,
html.trl-motion-paused *::after {
  animation-play-state: paused !important;
  scroll-behavior: auto !important;
}

html.trl-motion-paused .js-progress,
html.trl-motion-paused .trust-badge-marquee,
html.trl-motion-paused .hero-line,
html.trl-motion-paused .underline-hero,
html.trl-motion-paused .hero-orb,
html.trl-motion-paused .markets-orb-1,
html.trl-motion-paused .markets-orb-2,
html.trl-motion-paused .features-orb,
html.trl-motion-paused .how-orb {
  animation: none !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js-animate,
  .fade,
  .fade-up,
  .feature-row {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .trust-badge-marquee,
  .hero-line,
  .underline-hero,
  .hero-orb,
  .markets-orb-1,
  .markets-orb-2,
  .features-orb,
  .how-orb,
  .js-progress {
    animation: none !important;
    transform: none !important;
  }
}

/* Accessible Products disclosure menu: opened by JS for hover, click and keyboard focus. */
.trl-products-dropdown.is-open .trl-products-menu {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}
.trl-products-dropdown.is-open #trl-products-menu-button i,
#trl-products-menu-button:focus-visible i {
  color: #e2e8f0 !important;
}
.trl-products-menu a:focus-visible {
  outline: 3px solid #67e8f9 !important;
  outline-offset: -2px !important;
  background: rgba(15, 23, 42, 0.95) !important;
}

/* Final rendered contrast guard for small helper/footer/mockup text on dark cards. */
.text-slate-500,
[class~="text-slate-500"] {
  color: #94a3b8 !important;
}
.text-slate-400,
[class~="text-slate-400"] {
  color: #cbd5e1 !important;
}
.bg-slate-800 .text-slate-500,
.bg-slate-800\/30 .text-slate-500,
.bg-slate-800\/50 .text-slate-500,
[class*="bg-slate-800"] [class~="text-slate-500"] {
  color: #cbd5e1 !important;
}


/* WCAG PATCH: semantic link groups use real lists without changing visual layout. */
.trl-products-menu ul,
#mobile-menu nav ul,
.popular-tools-list,
.direct-tool-links-list {
  list-style: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
}

.popular-tools-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.direct-tool-links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.popular-tools-list > li,
.direct-tool-links-list > li {
  display: inline-flex;
}

#mobile-menu nav ul.space-y-2 > li + li {
  margin-top: 0.5rem;
}

/* WCAG PATCH: primary navigation is also a semantic list. */
nav[aria-label="Primary navigation"] > ul {
  list-style: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
}


/* === Global accessibility settings control === */
.trl-a11y-settings-button {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  margin-left: 0.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  box-sizing: border-box;
  overflow: visible;
  transition: background-color 160ms ease, color 160ms ease;
}

.trl-a11y-settings-button:hover,
.trl-a11y-settings-button:active {
  background: rgba(255, 255, 255, 0.05);
  border-color: transparent;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}


#trl-desktop-cta.trl-a11y-nav-host {
  position: relative;
}

@media (min-width: 1024px) {
  #trl-desktop-cta.trl-a11y-nav-host .trl-a11y-settings-button {
    position: absolute;
    right: calc(100% + 0.5rem);
    left: auto;
    top: 50%;
    margin-left: 0;
    transform: translateY(-50%);
  }

  #trl-desktop-cta.trl-a11y-nav-host .trl-a11y-settings-button:hover,
  #trl-desktop-cta.trl-a11y-nav-host .trl-a11y-settings-button:active {
    transform: translateY(-50%);
  }
}

@media (max-width: 1023px) {
  .trl-a11y-settings-button {
    margin-left: auto;
    margin-right: 0.25rem;
    position: relative;
    z-index: 55;
  }
}

.trl-a11y-pause-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  width: 1rem;
  height: 1rem;
}

.trl-a11y-pause-icon span {
  display: block;
  width: 0.22rem;
  height: 0.88rem;
  border-radius: 999px;
  background: #ffffff;
}

.trl-a11y-settings-button:focus-visible {
  outline: 2px solid #67e8f9 !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

.trl-a11y-settings-panel {
  position: fixed;
  top: 5.75rem;
  right: max(1rem, calc((100vw - 80rem) / 2 + 1rem));
  z-index: 2500;
  width: min(24rem, calc(100vw - 2rem));
  color: #ffffff;
}

.trl-a11y-settings-panel[hidden] {
  display: none !important;
}

.trl-a11y-panel-inner {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.25rem;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.55);
  padding: 1rem;
}

.trl-a11y-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.trl-a11y-panel-header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.trl-a11y-panel-close {
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0;
  line-height: 1;
  font-weight: 800;
  text-align: center;
}

.trl-a11y-panel-close::before {
  content: "×";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -53%);
  color: #e2e8f0;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 800;
}

.trl-a11y-panel-copy {
  margin: 0.55rem 0 0.875rem;
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.trl-a11y-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.trl-a11y-switch-row:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(148, 163, 184, 0.22);
}

.trl-a11y-switch-row strong,
.trl-a11y-switch-row small {
  display: block;
}

.trl-a11y-switch-row strong {
  color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 900;
}

.trl-a11y-switch-row small {
  margin-top: 0.25rem;
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.75rem;
  line-height: 1.35;
}

.trl-a11y-switch-row input[role="switch"] {
  width: 2.875rem;
  height: 1.625rem;
  flex: 0 0 auto;
  accent-color: #38bdf8;
}

.trl-a11y-reset-button {
  margin-top: 0.875rem;
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 900;
}

.trl-a11y-reset-button:hover,
.trl-a11y-panel-close:hover {
  background: rgba(255, 255, 255, 0.10);
}

@media (max-width: 1023px) {
  .trl-a11y-settings-button {
    margin-left: auto;
    margin-right: 0.35rem;
  }

  .trl-a11y-settings-panel {
    top: 4.75rem;
    right: 1rem;
  }
}

/* New global class name, kept alongside trl-motion-paused for older page scripts. */
html.trl-reduced-motion *,
html.trl-reduced-motion *::before,
html.trl-reduced-motion *::after {
  animation-play-state: paused !important;
  scroll-behavior: auto !important;
}

html.trl-reduced-motion .js-progress,
html.trl-reduced-motion .trust-badge-marquee,
html.trl-reduced-motion .hero-line,
html.trl-reduced-motion .underline-hero,
html.trl-reduced-motion .hero-orb,
html.trl-reduced-motion .markets-orb-1,
html.trl-reduced-motion .markets-orb-2,
html.trl-reduced-motion .features-orb,
html.trl-reduced-motion .how-orb {
  animation: none !important;
  transform: none !important;
}


/* === TRL zoom/reflow patch: scrollable overlays at 200%-400% zoom === */
/* Normal desktop/mobile appearance stays unchanged. These rules only help when
   browser zoom or a very small viewport makes overlays taller than the screen. */

@media (max-height: 700px), (max-width: 480px) {
  body.trl-mobile-menu-open,
  body.trl-modal-open {
    overflow: hidden;
  }

  #mobile-menu {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #mobile-menu .trl-mobile-panel {
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .trl-a11y-settings-panel {
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    left: max(0.75rem, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .trl-a11y-panel-inner {
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #trl-flex-modal {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* === Privacy page reduced-motion and zoom/reflow support === */
html.trl-motion-paused .fade-in-up,
html.trl-reduced-motion .fade-in-up,
html.trl-motion-paused .glow-bg,
html.trl-reduced-motion .glow-bg {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

html.trl-motion-paused .blob-1,
html.trl-motion-paused .blob-2,
html.trl-reduced-motion .blob-1,
html.trl-reduced-motion .blob-2 {
  animation: none !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up,
  .glow-bg {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .blob-1,
  .blob-2 {
    animation: none !important;
    transform: none !important;
  }
}

@media (max-width: 480px) {
  main,
  main section,
  main .prose,
  main .prose *,
  footer,
  footer * {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  main .grid,
  main [class*="grid"],
  main [class*="flex"] {
    min-width: 0;
  }

  main aside,
  main .prose,
  main .prose > div,
  main [class*="max-w-"] {
    max-width: 100%;
  }

  main .lg\:sticky {
    position: static !important;
    top: auto !important;
  }
}
