/* site-e1102: batch E, Amir 2 Nov 2026 (msgs 973-979, 974, 975, 976, 1005, 1011). One file, loaded last on every page.
   Hand-written port note: these rules belong in design/portal-build/tools/site-move.mjs as declared PATCHes. */

/* m975 Blog category chips (and Legal's doc tabs, the same kind of control): a horizontal pill track scrolls on ONE
   axis. The chips' tap areas (::after inset -4px) gave the track 1px of vertical scroll, so a sideways swipe on an
   iPhone also moved the labels up and down; and the track's own backdrop blur on an overflow scroller made iOS
   drop the chips' paint mid-swipe (blank track, then the labels without their pills). Glass inside glass draws no
   blur (the rule Legal's tab row already follows); the track keeps its fill. */
:root:not(#_#_#_#_#_#_) .posts-tools .chips,
:root:not(#_#_#_#_#_#_) .doc-tabs-row{overflow-y:hidden!important;overscroll-behavior-x:contain}
:root:not(#_#_#_#_#_#_) .posts-tools .chips{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  background:linear-gradient(180deg,rgba(241,244,255,.94),rgba(228,234,254,.86))!important}

/* m1011 Blog: the filter row stays pinned under the nav while the posts scroll, as Legal's doc tabs and the
   Brokers tabs do. The head sticks with a negative top so only its chips row stays in view (blog-head-e1102.js
   measures --ph-off, the chips row's offset inside the head). */
html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #posts .posts-head{position:sticky;top:calc(var(--nav-h) - var(--ph-off,0px));z-index:15}
html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #posts .posts-head.ph-stuck::after{content:'';position:absolute;z-index:-1;pointer-events:none;
  left:calc(50% - 50vw);width:100vw;top:calc(var(--ph-off,0px) - 8px);bottom:-10px;
  background:rgba(240,245,255,.9);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
  box-shadow:0 1px 0 rgba(18,69,186,.08)}
html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #posts .posts-head.ph-stuck{border-image:none!important}
html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #posts .posts-head.ph-stuck::before{opacity:0}

/* m974 Blog article: one column. The title runs the article's width (it sat in a 472px column beside the cover on
   desktop, three lines in a corner) at a size that reads as the page title on a phone (it was 25px there), and the
   cover card follows under it at the same width. */
html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #hero.post-top .post-hero{display:flex!important;flex-direction:column;align-items:stretch;max-width:1200px!important;margin-inline:auto}
html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #hero.post-top .post-hero>.display{grid-column:auto;max-width:18em!important;margin:0!important;
  font-size:clamp(30px,3.2vw + 14px,60px)!important;line-height:1.06!important;letter-spacing:-.035em!important;text-wrap:balance}
html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #hero.post-top .post-art{width:100%;margin:clamp(24px,2.6vw + 12px,44px) 0 0!important}
@media (min-width:720px){html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #hero.post-top .post-card .cover{aspect-ratio:2/1!important}}
@media (min-width:1024px){html[data-tf-tab=blog]:not(#_#_#_#_#_#_) #hero.post-top .post-card .cover{aspect-ratio:12/5!important}}

/* m976 Cashback calculator: 'View <broker> Cashback details' hangs under the frame (absolute, top 100% + 14px), so
   nothing kept room for it and it sat on the section's bottom edge. The frame now keeps that room below itself. */
:root:not(#_#_#_#_#_#_) #calculator .tfe:has(>.cmore){margin-bottom:calc(14px + 20px + 18px)}

/* m1005 Results Compare TPs: the four lines draw on the same way. TP3 and TP4 carried their old dash patterns
   (7 5, 2 5) in a path whose length is 1, so their dash covered the whole line and the draw-on did nothing:
   they appeared at once while TP1 and TP2 drew. All four are solid lines told apart by colour, as at rest. */
html:root:not(#_#_#_#_#_#_) #hero .compare-path.tp3,html:root:not(#_#_#_#_#_#_) #hero .compare-path.tp4{stroke-dasharray:1}

/* Responsive sweep (Amir msg 979): on phones a one-column grid was '1fr', i.e. minmax(auto,1fr), so its column grew to
   the widest child's min-content. On Cashback the calculator frame made it 378px in a 342px grid: the heading, its
   copy and the details link ran off the right edge and the page scrolled sideways (45px at 360). Phone columns
   may shrink to the screen. */
@media (max-width:719px){:root:not(#_#_#_#_#_#_) :is(.hero-grid,.grid2,.mech-grid,.calc-grid,.record-grid){grid-template-columns:minmax(0,1fr)}}
:root:not(#_#_#_#_#_#_) #calculator .tfe .stp{grid-template-columns:minmax(0,1fr) 40px 64px 40px}
/* phones up to 430: the market gets its own row above the − lots + stepper, so its name is never cut ('Gol…' at 360) */
@media (max-width:430px){:root:not(#_#_#_#_#_#_) #calculator .tfe .stp{grid-template-columns:40px minmax(0,1fr) 40px;height:auto;row-gap:6px;padding:8px;border-radius:24px}
 :root:not(#_#_#_#_#_#_) #calculator .tfe .stp .mpk{grid-column:1 / -1;justify-self:stretch}
 :root:not(#_#_#_#_#_#_) #calculator .tfe .stp>input{width:100%;text-align:center}}
:root:not(#_#_#_#_#_#_) #calculator .tfe .stp .mpk{min-width:0;max-width:100%}
:root:not(#_#_#_#_#_#_) #calculator .tfe .stp .mpk>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* site-e1102.js: a section shown as it rests (it came from above) draws in its final state at once */
.in-now,.in-now *,.in-now *::before,.in-now *::after{transition:none!important}

@media (max-width:680px){
  :root:not(#_#_#_) #calculator .tfe a.cmore{min-height:44px;transform:translateY(-12px)}
  :root:not(#_#_#_) #calculator .tfe a.cmore::after,
  :root body #hero.post-top .post-by a.post-cat::after{content:none}
}
/* Phone tap targets: the type and color stay the same; only the clickable box grows. */
@media (max-width:680px){
  :is(a.post-cat, #sort, #sort-value, a.record-link){
    display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;
  }
}
