/* --- Moved from <style id=inline-style> in terms-of-service.html --- */
html,
    body {
      scroll-behavior: smooth;
      background-color: #030712;
    }

    /* Fade-in-up animation (for former framer-motion elements) */
    @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 (replacing framer-motion animated divs) */
    @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 (whileInView) */
    .glow-bg {
      opacity: 0;
      transition: opacity 0.8s ease-out;
    }
    .glow-bg.in-view {
      opacity: 1;
    }

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

    /* Sidebar nav bullet animation */
    .nav-bullet {
      transition: all 0.2s ease-out;
    }

    /* For the canvas to sit behind content but inside section */
    #hero-canvas {
      pointer-events: none;
    }
  
    /* ---- Imported from  header/footer styles ---- */

    html {
      scroll-behavior: smooth;
    }

    body {
      background-color: #030712;
      color: #e5e7eb;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    }
    /* 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);
    }

    #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);
    }

    /* 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);
    }

    /* 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%);
    }

    /* 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;
    }



    /* 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=trl-auth-prehide> in terms-of-service.html --- */
#trl-desktop-cta,
    #trl-mobile-cta {
      visibility: hidden;
    }


/* --- Moved from <style id=inline-style> in terms-of-service.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 terms-of-service.html --- */

.trl-inline-style-529a226d { background: transparent; }

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

.trl-inline-style-3e4ff05e { background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%); }

.trl-inline-style-59c0f042 { 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; }


/* === WCAG/accessibility utilities from homepage === */
.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;
}

/* === 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.35rem;
    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-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 .blob-1,
html.trl-reduced-motion .blob-2,
html.trl-reduced-motion .glow-bg,
html.trl-reduced-motion .fade-in-up,
html.trl-reduced-motion .cta-scale,
html.trl-reduced-motion .nav-bullet,
html.trl-reduced-motion .animate-pulse,
html.trl-reduced-motion .float-slow,
html.trl-reduced-motion .float-slower {
  animation: none !important;
  transition: none !important;
}

html.trl-reduced-motion .fade-in-up {
  opacity: 1 !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. */

#mobile-menu,
#mobile-menu .trl-mobile-panel,
.trl-a11y-settings-panel,
.trl-a11y-panel-inner,
main,
main * {
  box-sizing: border-box;
}

main p,
main li,
main a,
main button,
main h1,
main h2,
main h3,
main span {
  overflow-wrap: anywhere;
}

@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;
  }
}

@media (max-width: 480px) {
  main {
    overflow-x: clip;
  }

  main > section > .relative.z-10,
  main > section .max-w-7xl,
  main > section .max-w-5xl,
  main > section .max-w-3xl {
    max-width: 100%;
  }

  .prose,
  .prose * {
    max-width: 100%;
  }
}
