/* ============================================================
   DIRECTIVE · site v10 · mobile finish (2026-10-29)
   Loaded last on every page. Phone widths only.
   ============================================================ */
@media (max-width:760px){
  /* review panel: desktop only, it covers the content on a phone */
  .rv{display:none}
}
@media (max-width:600px){
  /* hub cards: minis are too narrow at this width; number on top, title and hook pinned to the bottom (no dead block) */
  .hub9-d.hub9-d .hub8-face2.f .hub8-fc-t{margin-top:auto}
}
/* header above everything that animates under it (the Away logo plate used to slide over it) */
.hdr{z-index:60}
@media (max-width:700px){
  /* Away: no orbit on a phone (section.js stays static); the cards become a swipe row, wide enough to read */
  .away-d.away-d:not(.is-3d) .away-stage{--cw:min(232px,64vw);gap:20px;padding:0}
  /* [MOBILE] orbit back on phones (Math 2026-10-30): smaller cards so the ring fits the screen */
  .away-d.away-d.is-3d .away-stage{--cw:150px}
  .away-d.away-d:not(.is-3d) .away-ring{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;
    padding:4px var(--gut,20px) 28px;scroll-padding-inline:var(--gut,20px);-webkit-overflow-scrolling:touch}
  .away-d .away-ring .away-card{scroll-snap-align:start}
}
@media (max-width:760px){
  /* inner pages: no scroll reveal on a phone, content is there from the start (no empty blocks) */
  .p10-rv-on [data-rv]:not(.is-in){opacity:1;transform:none}
  .p10-rv-on [data-rv]:not(.is-in) .p10-num{color:var(--ink)}
}

/* ---- [MOBILE] round 2 · Math 2026-10-30 ---- */
@media (max-width:760px){
  /* hero: the tagline is the statement, the logo steps back */
  html[data-look] .hx h1{font-size:clamp(64px,19.5vw,96px);line-height:.86;letter-spacing:-.055em;margin-bottom:22px}
  .hx .hx-logo{height:22px}
  .hx-name{margin-top:20px}
  /* steps 01-04 above the demo, so they show on the first screen */
  .hx-media{display:flex;flex-direction:column}
  .hx-media .hx-steps,.hx-media .hx-cap{order:-1}
  html[data-look][data-hero] .hx .hx-media .hx-steps{margin:0 0 4px;max-width:none;width:100%;gap:0 12px}
  /* on the blue now: light ink (hero 3 steps were drawn for the white section) */
  html[data-look][data-hero] .hx .hx-media .hx-steps::before{background:rgba(157,176,255,.28)}
  html[data-look][data-hero] .hx .hx-media .hx-step:not(.on):not(.done)::before{background:#0B1230;border-color:rgba(201,212,255,.5)}
  html[data-look][data-hero] .hx .hx-media .hx-step .hx-n{font-size:26px;color:rgba(201,212,255,.5)}
  html[data-look][data-hero] .hx .hx-media .hx-step b{font-size:14px;color:#C2CBE6}
  html[data-look][data-hero] .hx .hx-media .hx-step.on .hx-n,html[data-look][data-hero] .hx .hx-media .hx-step.on b{color:#fff}
  html[data-look][data-hero] .hx .hx-media .hx-cap{margin:12px 0 18px;color:#C6CEE2}
  /* demo: only what tells the story (write → rule → armed → placed), larger text */
  .hd .hd-app{--f:14px;grid-template-areas:"inp" "rules"}
  .hd .hd-inp{padding:1em 1.1em 0}
  .hd :is(.hd-top,.hd-tabs,.hd-log),.hd .hd-card>p:not([class]){display:none}
  .hd .hd-rules{padding-top:1em}
  /* section titles closer to the desktop scale, eyebrows smaller */
  main section h2.d{font-size:clamp(48px,13.6vw,64px)!important;line-height:.93!important;letter-spacing:-.045em}
  main .hub9-d h3.d{font-size:clamp(30px,8.6vw,38px)!important;line-height:1!important;letter-spacing:-.035em}
  main section .eyebrow:not(.hx-eb-plain){font-size:11px;letter-spacing:.13em;gap:8px 9px}
  main section .eyebrow:not(.hx-eb-plain)::before{width:calc(13px * var(--i-ratio));height:13px}
}

/* ---- [MOBILE] Think first · Trade sharp: less scrolling, condition → effect on one screen (Math 2026-10-30) ---- */
@media (max-width:640px){
  .pl10 .pl10-sub{font-size:15px;line-height:1.5}
  /* conditions: 3 per row, icon above the label */
  .pl10 .pl10-caps{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .pl10 .pl10-cap{grid-template-columns:1fr;grid-template-rows:auto auto auto;justify-items:start;row-gap:4px;padding:8px 8px 9px;border-radius:11px}
  .pl10 .pl10-g{grid-row:auto;width:24px;height:24px;border-radius:7px}
  .pl10 .pl10-g svg{width:15px;height:15px}
  .pl10 .pl10-cap b{font-size:12.5px;line-height:1.15}
  .pl10 .pl10-ex{font-size:9.5px;line-height:1.25}
  /* "You write": smaller sentence */
  .pl10 .pl10-q{font-size:15px;line-height:1.45}
  .pl10 .pl10-said{margin:22px 0 14px;gap:8px}
  /* the tree: two per row, wires off, compact cards */
  .pl10 .pl10-stage{--gap:8px;padding:14px}
  .pl10 .pl10-chain{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}
  .pl10 .pl10-yes ul{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pl10 .pl10-chain>li::before,.pl10 .pl10-chain>li::after,.pl10 .pl10-yes li::before,.pl10 .pl10-br::before{display:none}
  .pl10 .pl10-fork{margin-top:12px;gap:10px}
  .pl10 .pl10-n{padding:9px 10px 10px;gap:3px;border-radius:12px}
  .pl10 .pl10-num{font-size:20px;margin-bottom:1px}
  .pl10 .pl10-n .kw{font-size:9.5px}
  .pl10 .pl10-n .tx{font-size:12.5px;line-height:1.35}
  .pl10 .pl10-o{font-size:9px;margin-top:3px}
  .pl10 .pl10-bk{margin:0 0 6px;padding-left:2px;font-size:10px}
  /* Else and Until: one line each */
  .pl10 .pl10-no .pl10-n,.pl10 .pl10-lane .pl10-n{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 10px}
  .pl10 .pl10-lane{margin-top:8px}
  .pl10 .pl10-live{margin-top:12px;padding-top:10px;font-size:11px}
}
@media (max-width:640px){
  /* 10 conditions on 3 columns: the last one takes the full row, laid flat */
  .pl10 .pl10-caps>li:last-child:nth-child(3n+1){grid-column:1/-1}
  .pl10 .pl10-caps>li:last-child:nth-child(3n+1) .pl10-cap{grid-template-columns:24px auto minmax(0,1fr);grid-template-rows:auto;align-items:center;column-gap:9px}
  .pl10 .pl10-q{font-size:14px}
}
@media (max-width:640px){
  /* [MOBILE] Trader Hub · Math 2026-10-30: 3 perks per row, tighter type */
  .hub9-d.hub9-d .hub8-deck{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;grid-auto-rows:auto}
  .hub9-d.hub9-d .hub8-fc{height:128px}
  .hub9-d.hub9-d .hub8-face2{padding:9px 8px;border-radius:11px}
  .hub9-d.hub9-d .hub8-fc-n{font-size:8.5px}
  .hub9-d.hub9-d .hub8-face2.f .hub8-fc-t{font-size:14.5px;line-height:1.02;letter-spacing:-.03em;margin:auto 0 4px}
  .hub9-d.hub9-d .hub9-hook{font-size:10.5px;line-height:1.3;margin:0}
  .hub9-d.hub9-d .hub8-face2.f .hub8-mini{display:none}
  .hub9-d.hub9-d .hub8-face2.b .hub8-fc-t{font-size:12px;line-height:1.08;margin:0 0 5px}
  .hub9-d.hub9-d .hub8-face2.b p{font-size:9.5px;line-height:1.35}
  .hub9-d.hub9-d .hub8-face2.b .hub8-fc-s{display:none}
  .hub9-d.hub9-d .hub8-lede{font-size:16px}
  .hub9-d.hub9-d .hub8-nums{gap:10px}
}
@media (max-width:640px){
  /* [MOBILE] Trader Hub numbers: the three on one line */
  .hub9-d.hub9-d .hub8-open4-r .hub8-nums{flex-wrap:nowrap;gap:10px;justify-content:space-between}
  .hub9-d.hub9-d .hub8-num b{font-size:38px}
  .hub9-d.hub9-d .hub8-num span{font-size:11px;line-height:1.3}
}
@media (max-width:640px){
  .hub9-d.hub9-d .hub10-deckbox .hub8-fc:last-child{grid-column:auto}
}
@media (max-width:640px){
  /* [MOBILE] conditions 4 per row (Math 2026-10-30); the last two share the final row */
  .pl10 .pl10-caps{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
  .pl10 .pl10-caps>li:last-child:nth-child(3n+1){grid-column:auto}
  .pl10 .pl10-caps>li:last-child:nth-child(3n+1) .pl10-cap{grid-template-columns:none;grid-template-rows:none;align-items:initial;column-gap:normal}
  .pl10 .pl10-caps>li:nth-last-child(-n+2):nth-child(4n+1),.pl10 .pl10-caps>li:nth-last-child(-n+2):nth-child(4n+1)~li{grid-column:span 2}
  .pl10 .pl10-cap{padding:7px 6px}
  .pl10 .pl10-g{width:22px;height:22px}
  .pl10 .pl10-cap b{font-size:11px;line-height:1.15}
  .pl10 .pl10-ex{font-size:9.5px;line-height:1.3}
}
@media (max-width:760px){
  /* [MOBILE] "Any hour. Any place. Your setups." at the same size as the section titles (Math 2026-10-30) */
  .away-d.away-d .away-fig{font-size:clamp(48px,13.6vw,64px);line-height:.93;letter-spacing:-.045em}
}
@media (max-width:640px){
  /* [MOBILE] Less is more · comparator compacted (Math 2026-10-30): 3 modes on one line, meters 2 by 2 */
  .less-d.less-d .less-ctrl{padding:14px;gap:14px;border-radius:16px}
  .less-d.less-d .less-hint{font-size:12.5px;margin-bottom:8px}
  .less-d.less-d .less-stops{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .less-d.less-d .less-stops button{padding:9px 8px;border-radius:10px;gap:3px;transform:none}
  .less-d.less-d .less-stops button::after{display:none}
  .less-d.less-d .less-stops button b{font-size:14px;line-height:1.05}
  .less-d.less-d .less-stops button span{font-size:10px;line-height:1.25}
  .less-d.less-d .less-logo{height:12px}
  .less-d.less-d .less-meters{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px}
  .less-d.less-d .less-meters li{gap:6px 8px}
  .less-d.less-d .less-ml{font-size:12.5px!important}
  .less-d.less-d .less-mv{font-size:12.5px}
  .less-d.less-d .less-mb{height:7px}
  .less-d.less-d .less-verdict{font-size:18px;padding-top:12px}
}
/* [MOBILE] Trader Hub game plan (Math 2026-10-30): one white pill for the TradingView alert, no price block, no extra card */
.hub9-d .hub11-tv{display:none}
@media (max-width:640px){
  .hub9-d.hub9-d .hub11-plan4 .hub11-px,.hub9-d.hub9-d .hub11-plan4 .hub11-tv+.hub11-l,.hub9-d.hub9-d .hub11-plan4 .hub8-frag.f2{display:none}
  .hub9-d.hub9-d .hub11-tv{display:block;margin:10px 0 0}
  .hub9-d.hub9-d .hub11-tv span{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;border-radius:999px;background:#fff;color:#0D0B0A;font:600 12px/1.2 var(--sans)}
  .hub9-d.hub9-d .hub11-tv span::before{content:"";width:7px;height:7px;border-radius:50%;background:#3F63FF}
}
/* [DESKTOP] same game plan as the phone (Math 2026-10-30, "shoot") */
@media (min-width:641px){
  .hub9-d.hub9-d .hub11-plan4 .hub11-px,.hub9-d.hub9-d .hub11-plan4 .hub11-tv+.hub11-l,.hub9-d.hub9-d .hub11-plan4 .hub8-frag.f2{display:none}
  .hub9-d.hub9-d .hub11-tv{display:block;margin:12px 0 0}
  .hub9-d.hub9-d .hub11-tv span{display:inline-flex;align-items:center;gap:8px;padding:8px 15px;border-radius:999px;background:#fff;color:#0D0B0A;font:600 13px/1.2 var(--sans)}
  .hub9-d.hub9-d .hub11-tv span::before{content:"";width:7px;height:7px;border-radius:50%;background:#3F63FF}
}
@media (max-width:640px){
  /* [MOBILE] Trader Hub perks, round 2 (Math 2026-10-30): mini visual back on the front, back title bold and above the text size */
  .hub9-d.hub9-d .hub10-deckbox .hub8-fc{height:178px}
  .hub9-d.hub9-d .hub10-deckbox .hub8-face2.f .hub8-fc-t{margin:6px 0 3px}
  .hub9-d.hub9-d .hub10-deckbox .hub9-hook{margin:0 0 6px}
  .hub9-d.hub9-d .hub10-deckbox .hub8-face2.f .hub8-mini{display:block;flex:1;min-height:0;max-height:none;padding:6px;border-radius:8px;zoom:.62}
  .hub9-d.hub9-d .hub10-deckbox .hub8-face2.b{padding:10px 9px}
  .hub9-d.hub9-d .hub10-deckbox .hub8-face2.b .hub8-fc-t{font:800 13.5px/1.1 var(--display);letter-spacing:-.02em;margin:0 0 6px}
  .hub9-d.hub9-d .hub10-deckbox .hub8-face2.b p:not(.hub8-fc-t){font:500 10.5px/1.35 var(--sans)}
}
@media (max-width:700px){
  /* [MOBILE] Away orbit tilted in 3D (Math 2026-10-30): the logo sits mid-depth, front cards pass over it */
  .away-d.away-d.is-tilt .away-core{z-index:6} /* front cards (depth > .55) pass in front of the logo */
  .away-d.away-d.is-tilt .away-stage{--cw:118px;overflow:hidden;margin-left:-16px;margin-right:-16px}
  .away-d.away-d.is-tilt .away-core::before{width:300px;height:180px;margin:-90px 0 0 -150px}
}
@media (max-width:760px){
  /* [MOBILE] hero typing: each sentence on its own line, no wrap, so the left-to-right reveal never shows line 2 early */
  .hd .hd-typed .hd-ty{display:block}
  .hd .hd-typed .hd-ty>span{white-space:nowrap;font-size:.92em}
}
@media (max-width:640px){
  /* [MOBILE] the two wide conditions (In position, Expiry): content centred in their box */
  .pl10 .pl10-caps>li:nth-last-child(-n+2):nth-child(4n+1) .pl10-cap,.pl10 .pl10-caps>li:nth-last-child(-n+2):nth-child(4n+1)~li .pl10-cap{justify-items:center;align-content:center;text-align:center}
}

/* ---- [MOBILE] header: logo + Menu in the bar; sections and beta button in a dropdown (Math 2026-10-30) ---- */
.nav-tog{display:none}
@media (max-width:760px){
  .hdr-in{flex-wrap:wrap;height:auto;min-height:56px;padding-top:0;padding-bottom:0;row-gap:0}
  .nav-tog{display:inline-flex;align-items:center;gap:10px;margin-left:auto;height:56px;padding:0 4px 0 12px;
    background:none;border:0;color:var(--ink);font:600 14px/1 var(--sans);cursor:pointer}
  .nav-tog i{position:relative;width:18px;height:12px}
  .nav-tog i::before,.nav-tog i::after{content:"";position:absolute;left:0;right:0;height:2px;border-radius:1px;background:currentColor;transition:transform .2s ease,top .2s ease}
  .nav-tog i::before{top:2px}
  .nav-tog i::after{top:8px}
  .hdr.is-open .nav-tog i::before{top:5px;transform:rotate(45deg)}
  .hdr.is-open .nav-tog i::after{top:5px;transform:rotate(-45deg)}
  .hdr .nav,.hdr .hdr-r{display:none}
  .hdr.is-open .nav{display:flex;order:3;flex-direction:column;align-items:stretch;width:100%;margin:0;gap:0;padding:4px 0 0;border-top:1px solid var(--line)}
  .hdr.is-open .nav a{font-size:17px;padding:14px 0;border-bottom:1px solid var(--line)}
  .hdr.is-open .nav a[aria-current="page"]{color:var(--cobalt-ink);border-bottom-color:var(--line)}
  .hdr.is-open .hdr-r{display:flex;order:4;width:100%;margin:0;padding:16px 0 18px}
  .hdr.is-open .hdr-r .btn{width:100%;justify-content:center;height:48px;font-size:16px}
}
@media (max-width:760px) and (prefers-reduced-motion:reduce){.nav-tog i::before,.nav-tog i::after{transition:none}}

/* ---- [MOBILE] comparator gauges: one line each in every mode (short wording in sections/less-d/section.js) ---- */
@media (max-width:760px){
  .less-d.less-d .less-meters li{grid-template-columns:auto auto;justify-content:space-between}
  .less-d.less-d .less-ml,.less-d.less-d .less-mv{white-space:nowrap}
  .less-d.less-d .less-ml{font-size:12px!important}
  .less-d.less-d .less-mv{font-size:12px}
}
