/* TP MOBILE R2 — targeted Home-only responsive corrections.
   All rules are below 900px: desktop reference imagery / zoom untouched.
   Does not alter Strategy Studio, chart engine, service workers or data handling. */
@media (max-width: 899px) {
  body.tpx-home-active .tpx-home-shell {
    --tp-mobile-border: rgba(75, 143, 186, .30);
    background:
      radial-gradient(ellipse 330px 260px at 6% 9%, rgba(25, 142, 199, .105), transparent 78%),
      radial-gradient(ellipse 290px 260px at 94% 36%, rgba(34, 117, 202, .095), transparent 78%),
      linear-gradient(rgba(55, 133, 182, .055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(55, 133, 182, .055) 1px, transparent 1px),
      linear-gradient(180deg, #06121d, #06101a) !important;
    background-size: auto, auto, 44px 44px, 44px 44px, auto !important;
  }
  body.tpx-home-active .tpx-topnav-inner,
  body.tpx-home-active .tpx-hero,
  body.tpx-home-active .tpx-section,
  body.tpx-home-active .tp-home-content .tp-home-section,
  body.tpx-home-active .tp-home-content .tp-home-footer {
    width: calc(100% - 32px) !important;
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body.tpx-home-active .tpx-hero {
    min-height: 0 !important;
    gap: 24px !important;
    padding: 27px 0 30px !important;
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.tpx-home-active .tpx-hero-copy { min-width:0; padding:0 !important; }
  body.tpx-home-active .tpx-hero h1 {
    max-width: 100% !important;
    font-size: clamp(32px, 8.4vw, 43px) !important;
    line-height: 1.08 !important;
    margin: 13px 0 16px !important;
    overflow-wrap: normal;
  }
  body.tpx-home-active .tpx-hero-copy > p { line-height:1.56 !important; }
  body.tpx-home-active .tpx-hero-trust { gap:12px !important; margin-top:22px !important; }
  body.tpx-home-active .tpx-hero-trust > span { max-width:100%; min-width:0; }
  body.tpx-home-active .tpx-hero-visual {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    transform:none !important;
  }
  body.tpx-home-active .tpx-terminal {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    transform:none !important;
    border-radius:16px !important;
    box-shadow:0 14px 34px rgba(0,0,0,.29),0 0 28px rgba(47,147,220,.07) !important;
  }
  body.tpx-home-active .tpx-terminal-top {
    width:100%;
    display:flex !important;
    flex-wrap:nowrap !important;
    justify-content:space-between;
    gap:3px !important;
    height:46px !important;
    padding:0 8px !important;
    overflow:hidden;
  }
  /* The marketing workstation is illustrative. Its decorative toolbar must fit mobile. */
  body.tpx-home-active .tpx-terminal-logo,
  body.tpx-home-active .tpx-terminal-gear,
  body.tpx-home-active .tpx-terminal-select ~ .tpx-terminal-select,
  body.tpx-home-active .tpx-terminal-spacer,
  body.tpx-home-active .tpx-terminal-rail { display:none !important; }
  body.tpx-home-active .tpx-terminal-tab {
    min-width:0 !important;
    flex:1 1 0;
    padding:0 3px !important;
    font-size:clamp(9px,2.5vw,11px) !important;
    text-align:center;
  }
  body.tpx-home-active .tpx-terminal-select { flex:0 0 auto; min-width:0; padding:0 5px !important; font-size:10px; }
  body.tpx-home-active .tpx-terminal-marketbar,
  body.tpx-home-active .tpx-chart-slot { margin-left:0 !important; width:100% !important; min-width:0 !important; }
  body.tpx-home-active .tpx-terminal-marketbar {
    min-height:42px;
    height:auto;
    flex-wrap:wrap;
    gap:3px 8px;
    padding:9px 12px !important;
  }
  body.tpx-home-active .tpx-terminal-marketbar strong { font-size:12px !important; }
  body.tpx-home-active .tpx-terminal-marketbar > span { min-width:0; overflow-wrap:anywhere; }
  body.tpx-home-active .tpx-chart-slot { height:clamp(220px,70vw,310px) !important; min-height:clamp(220px,70vw,310px) !important; }
  body.tpx-home-active .tpx-chart-slot .tp-demo-chart-shell,
  body.tpx-home-active .tpx-chart-slot .tp-demo-chart-wrap,
  body.tpx-home-active .tpx-chart-slot .tp-hero-chart-root,
  body.tpx-home-active .tpx-chart-slot .tpx-r31-market-chart { min-height:0 !important; }
  body.tpx-home-active .tpx-chart-overlays { left:12px !important; top:100px !important; }
  body.tpx-home-active .tpx-setup-detected { right:12px !important; top:126px !important; min-width:130px; }
  body.tpx-home-active .tpx-how-reference { padding:14px 0 26px !important; }
  body.tpx-home-active .tpx-how-row { min-height:0 !important; display:block !important; }
  body.tpx-home-active .tpx-how-reference .tpx-section-header { padding:0 !important; margin:0 0 22px !important; }
  body.tpx-home-active .tpx-section-header h2 { font-size:clamp(26px,7vw,34px) !important; line-height:1.15; }
  body.tpx-home-active .tpx-process { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:12px !important; }
  body.tpx-home-active .tpx-process-arrow { display:none !important; }
  body.tpx-home-active .tpx-process-card {
    min-height:0 !important;
    padding:19px 16px 19px 83px !important;
    background:linear-gradient(135deg,rgba(18,38,56,.93),rgba(9,23,35,.96)) !important;
    border-color:var(--tp-mobile-border) !important;
  }
  body.tpx-home-active .tpx-process-icon { left:16px !important; top:19px !important; width:51px; height:51px; }
  body.tpx-home-active .tpx-process-number { left:7px !important; top:9px !important; width:29px !important; height:29px !important; font-size:15px !important; }
  body.tpx-home-active .tpx-process-card h3 { font-size:16px !important; line-height:1.36; }
  body.tpx-home-active .tpx-process-card p { font-size:13px !important; line-height:1.5 !important; }
  body.tpx-home-active .tpx-process-card p br { display:none; }
  body.tpx-home-active .tpx-trust-bar {
    display:grid !important;
    grid-template-columns:32px minmax(0,1fr) !important;
    align-items:start !important;
    justify-content:stretch !important;
    gap:8px 12px !important;
    min-height:0 !important;
    height:auto !important;
    margin-top:17px !important;
    padding:17px !important;
    border-color:var(--tp-mobile-border) !important;
    background:linear-gradient(140deg,rgba(17,35,51,.94),rgba(7,20,31,.98)) !important;
  }
  body.tpx-home-active .tpx-trust-shield { grid-column:1; grid-row:1; font-size:25px !important; margin:0 !important; }
  body.tpx-home-active .tpx-trust-bar strong {
    grid-column:2; grid-row:1;
    font-size:16px !important; line-height:1.4; margin:1px 0 0 !important;
  }
  body.tpx-home-active .tpx-trust-bar > span:not(.tpx-trust-shield) {
    grid-column:1 / -1;
    width:auto !important;
    min-width:0;
    flex:none !important;
    font-size:13px !important;
    line-height:1.57 !important;
  }
  body.tpx-home-active .tpx-trust-bar .tp-trust-more {
    grid-column:1 / -1;
    justify-self:start;
    min-height:42px;
    padding:7px 0;
    margin:0 !important;
    font-size:13px !important;
  }
  body.tpx-home-active .tp-home-content { background:transparent !important; }
  body.tpx-home-active .tp-home-content::before { opacity:.7; }
  body.tpx-home-active .tp-home-content .tp-home-section { padding-top:36px !important; padding-bottom:36px !important; }
  body.tpx-home-active .tp-home-content .tp-eyebrow { margin-bottom:13px !important; }
  body.tpx-home-active .tp-home-content .tp-reviews-heading { gap:16px !important; margin-bottom:17px !important; }
  body.tpx-home-active .tp-home-content .tp-carousel { max-width:100%; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; overscroll-behavior-inline:contain; scrollbar-width:none; }
  body.tpx-home-active .tp-home-content .tp-carousel::-webkit-scrollbar { display:none; }
  body.tpx-home-active .tp-home-content .tp-review-track { gap:12px; padding:3px 0 8px; }
  body.tpx-home-active .tp-home-content .tp-testimonial {
    box-sizing:border-box;
    flex:0 0 min(calc(100vw - 36px), 420px) !important;
    width:min(calc(100vw - 36px), 420px) !important;
    min-width:0 !important;
    min-height:0;
    padding:20px !important;
    scroll-snap-align:start;
    scroll-snap-stop:always;
  }
  body.tpx-home-active .tp-home-content .tp-testimonial blockquote { margin:17px 0 !important; font-size:16px !important; line-height:1.55; overflow-wrap:break-word; }
  body.tpx-home-active .tp-home-content .tp-testimonial-head { flex-wrap:wrap; }
  body.tpx-home-active .tp-home-content .tp-testimonial-foot { display:block; }
  body.tpx-home-active .tp-home-content .tp-faq-section { gap:24px !important; }
  body.tpx-home-active .tp-home-content .tp-final-cta { margin:17px auto !important; }
}
@media (max-width: 760px) {
  body.tpx-home-active .tpx-topnav { min-height:0 !important; }
  body.tpx-home-active .tpx-topnav-inner { padding:12px 0 !important; gap:10px !important; }
  body.tpx-home-active .tpx-navlinks { gap:10px !important; }
  body.tpx-home-active .tpx-navlinks :is(a,button) { font-size:11px !important; }
  body.tpx-home-active .tp-home-content h2 { font-size:clamp(28px,7.6vw,35px) !important; line-height:1.15; }
  body.tpx-home-active .tp-home-content .tp-intro h2 { font-size:clamp(32px,8vw,39px) !important; }
  body.tpx-home-active .tp-home-content p { font-size:15px; line-height:1.57; }
  body.tpx-home-active .tp-home-content .tp-plain-definition { font-size:17px; line-height:1.5; }
  body.tpx-home-active .tp-home-content .tp-motion-bar { padding-bottom:21px !important; }
  body.tpx-home-active .tp-home-content .tp-intro-layout,
  body.tpx-home-active .tp-home-content .tp-demo-section,
  body.tpx-home-active .tp-home-content .tp-notification-section { gap:22px !important; }
  body.tpx-home-active .tp-home-content .tp-intro-copy>p { margin-top:15px; }
  body.tpx-home-active .tp-home-content .tp-three-verbs { gap:8px; flex-wrap:wrap; }
  body.tpx-home-active .tp-radar-scene { min-height:345px !important; margin:8px 0 0 !important; }
  body.tpx-home-active .tp-home-content .tp-demo-panel { padding:15px !important; }
  body.tpx-home-active .tp-home-content .tp-demo-status { min-height:0 !important; margin-bottom:14px; padding:16px !important; }
  body.tpx-home-active .tp-home-content .tp-demo-market { flex-wrap:wrap; padding:14px 0 8px; }
  body.tpx-home-active .tp-home-content .tp-demo-market > span { font-size:12px; }
  body.tpx-home-active .tp-home-content .tp-notification-section { padding-bottom:24px !important; }
  body.tpx-home-active .tp-home-content .tp-notification-preview {
    box-sizing:border-box;
    width:min(320px, calc(100% - 24px)) !important;
    min-height:0 !important;
    margin:20px auto 10px !important;
    padding:48px 15px 22px !important;
    transform:rotate(-1.5deg) !important;
    background:radial-gradient(ellipse at 60% 16%,#205677,#10293d 47%,#081724 87%) !important;
    box-shadow:8px 10px 0 #020b13,0 18px 40px #0b57981e !important;
  }
  body.tpx-home-active .tp-home-content .tp-alert-card { transform:none !important; animation:none !important; padding:18px !important; }
  body.tpx-home-active .tp-home-content .tp-alert-card h3 { font-size:19px !important; }
  body.tpx-home-active .tp-home-content .tp-alert-card p { font-size:14px !important; line-height:1.55; }
  body.tpx-home-active .tp-home-content .tp-notification-caption { margin-top:23px; font-size:13px; }
  body.tpx-home-active .tp-home-content .tp-checklist { margin-top:22px; }
  body.tpx-home-active .tp-home-content .tp-checklist li { padding-bottom:16px; }
  body.tpx-home-active .tp-home-content .tp-reviews-section { padding-bottom:31px !important; }
  body.tpx-home-active .tp-home-content .tp-carousel-controls { gap:9px; }
  body.tpx-home-active .tp-home-content .tp-carousel-controls button { min-height:44px; height:44px; }
  body.tpx-home-active .tp-home-content .tp-faq-section { padding-top:31px !important; }
  body.tpx-home-active .tp-home-content .tp-final-cta { padding:34px 19px !important; }
  body.tpx-home-active .tp-home-content .tp-footer-top { gap:24px; }
  body.tpx-home-active .tp-home-content .tp-home-footer { padding-top:24px; }
  body.tpx-home-active #tpHomeQuickActions { padding:24px 0 !important; }
}
@media (max-width: 390px) {
  body.tpx-home-active .tpx-terminal-select { display:none !important; }
  body.tpx-home-active .tpx-hero h1 { font-size:32px !important; }
  body.tpx-home-active .tp-home-content .tp-alert-card>div { flex-wrap:wrap; }
  body.tpx-home-active .tp-home-content .tp-motion-bar { flex-wrap:wrap; }
}
/* Manual swipe and arrow controls on touch devices: no partially moving cards. */
@media (max-width: 899px) and (pointer: coarse) {
  body.tpx-home-active .tp-carousel-controls [data-review-pause] { display:none !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.tpx-home-active .tp-carousel { scroll-behavior:auto !important; }
}
