/*
 * The Founders Magazine v52.3.1 — mobile masthead only.
 * Loaded with media="(max-width: 760px)" after mobile-v48.css.
 * No desktop selectors are changed.
 */

@media (max-width:760px){
  :root{--tfm45-header:107px}

  /* Exactly two mobile rows. Product-specific section navigation remains in
     the hamburger drawer instead of creating a third sticky header row. */
  body.tfm-v48 .tfm42-site-header[data-tfm-product] .tfm42-nav-row,
  body.tfm-v48 .tfm42-site-header[data-tfm-product].is-compact .tfm42-nav-row,
  body.tfm-v48 .tfm44-site-header[data-tfm-product] .tfm42-nav-row,
  body.tfm-v48 .tfm44-site-header[data-tfm-product].is-compact .tfm42-nav-row{
    display:none!important;
    height:0!important;
    min-height:0!important;
    border:0!important;
    overflow:hidden!important;
  }

  body.tfm-v48 .tfm42-productbar{
    border-bottom:1px solid #e5e6e8!important;
    background:#fff!important;
  }
  body.tfm-v48 .tfm44-site-header.has-scrolled,
  body.tfm-v48 .tfm42-site-header.has-scrolled{
    box-shadow:0 1px 0 rgba(16,17,20,.06),0 8px 24px rgba(16,17,20,.035)!important;
  }

  /* Override the older header-inner width with equal/higher specificity so the
     five first-row controls never overflow because of a second inherited gutter. */
  body.tfm-v48 .tfm44-site-header .tfm42-product-inner,
  body.tfm-v48 .tfm44-site-header.is-compact .tfm42-product-inner,
  body.tfm-v48 .tfm42-site-header .tfm42-product-inner,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm42-product-inner{
    width:100%!important;
    max-width:none!important;
    min-height:107px!important;
    height:107px!important;
    margin:0!important;
    padding-left:max(12px,env(safe-area-inset-left))!important;
    padding-right:max(12px,env(safe-area-inset-right))!important;
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:42px minmax(92px,122px) 42px minmax(70px,auto) 42px!important;
    grid-template-rows:62px 45px!important;
    align-items:center!important;
    justify-content:space-between!important;
    column-gap:clamp(2px,1vw,5px)!important;
    row-gap:0!important;
  }

  /* Hide the desktop-only controls even if another compiled header rule changes. */
  body.tfm-v48 .tfm42-universal-search,
  body.tfm-v48 .tfm42-workspace,
  body.tfm-v48 .tfm42-member,
  body.tfm-v48 .tfm45-mobile-product-trigger,
  html.tfm48-js body.tfm-v48 .tfm45-mobile-product-trigger{
    display:none!important;
  }

  /* Row 1 — menu / masthead / search / subscribe / My TFM. */
  body.tfm-v48 .tfm42-mobile-toggle,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm42-mobile-toggle{
    grid-column:1!important;
    grid-row:1!important;
    width:42px!important;
    height:44px!important;
    min-width:42px!important;
    margin:0!important;
    padding:0!important;
    justify-self:start!important;
    align-self:center!important;
    gap:5px!important;
  }
  body.tfm-v48 .tfm42-mobile-toggle>span:not(.screen-reader-text){
    width:26px!important;
    height:1.6px!important;
    border-radius:2px!important;
    background:#101114!important;
  }

  body.tfm-v48 .tfm42-brand,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm42-brand,
  body.tfm-v48 .tfm44-site-header .tfm42-brand,
  body.tfm-v48 .tfm44-site-header.is-compact .tfm42-brand{
    grid-column:2!important;
    grid-row:1!important;
    width:100%!important;
    max-width:122px!important;
    height:54px!important;
    margin:0!important;
    justify-self:center!important;
    align-self:center!important;
    overflow:hidden!important;
    flex:0 1 auto!important;
  }
  body.tfm-v48 .tfm42-brand-mobile,
  body.tfm-v48 .tfm48-brand-mobile{
    width:100%!important;
    height:54px!important;
    padding:0!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  body.tfm-v48 .tfm48-mobile-brand-picture{
    width:100%!important;
    height:100%!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body.tfm-v48 .tfm48-mobile-logo{
    width:auto!important;
    max-width:100%!important;
    max-height:40px!important;
    object-fit:contain!important;
    object-position:center center!important;
  }
  body.tfm-v48 .tfm48-mobile-brand-monogram{
    width:40px!important;
    height:40px!important;
    font-size:24px!important;
  }

  body.tfm-v48 .tfm42-mobile-search{
    grid-column:3!important;
    grid-row:1!important;
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    height:44px!important;
    min-width:42px!important;
    margin:0!important;
    padding:0!important;
    justify-self:center!important;
    align-self:center!important;
  }
  body.tfm-v48 .tfm42-mobile-search svg{
    width:23px!important;
    height:23px!important;
    stroke-width:1.75!important;
  }

  body.tfm-v48 .tfm53-mobile-subscribe{
    grid-column:4!important;
    grid-row:1!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:70px!important;
    max-width:100%!important;
    height:35px!important;
    margin:0!important;
    padding:0 11px!important;
    border:1px solid var(--tfm45-red,#b51224)!important;
    border-radius:7px!important;
    background:var(--tfm45-red,#b51224)!important;
    color:#fff!important;
    box-shadow:none!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    font:600 14px/1 var(--tfm29-serif,var(--tfm-serif,Newsreader,Georgia,serif))!important;
    letter-spacing:-.01em!important;
    justify-self:center!important;
    align-self:center!important;
  }
  body.tfm-v48 .tfm53-mobile-subscribe:hover,
  body.tfm-v48 .tfm53-mobile-subscribe:focus{
    background:#94101d!important;
    border-color:#94101d!important;
    color:#fff!important;
  }

  body.tfm-v48 .tfm53-mobile-account{
    grid-column:5!important;
    grid-row:1!important;
    position:relative!important;
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    height:44px!important;
    min-width:42px!important;
    margin:0!important;
    padding:0!important;
    color:#111317!important;
    text-decoration:none!important;
    justify-self:end!important;
    align-self:center!important;
  }
  body.tfm-v48 .tfm53-mobile-account-mark{
    display:grid!important;
    place-items:center!important;
    width:36px!important;
    height:36px!important;
    box-sizing:border-box!important;
    border:1.25px solid #15171a!important;
    border-radius:50%!important;
    background:#fff!important;
    color:#111317!important;
    font:650 11px/1 var(--tfm29-serif,var(--tfm-serif,Newsreader,Georgia,serif))!important;
    letter-spacing:-.02em!important;
  }
  body.tfm-v48 .tfm53-mobile-account-dot{
    position:absolute!important;
    top:2px!important;
    right:-1px!important;
    width:8px!important;
    height:8px!important;
    border:2px solid #fff!important;
    border-radius:50%!important;
    background:var(--tfm45-red,#b51224)!important;
    box-sizing:content-box!important;
    pointer-events:none!important;
  }

  /* Row 2 — all three products, directly accessible. */
  body.tfm-v48 .tfm44-product-switch,
  html.tfm48-js body.tfm-v48 .tfm44-product-switch,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm44-product-switch{
    grid-column:1 / -1!important;
    grid-row:2!important;
    display:flex!important;
    align-items:stretch!important;
    justify-content:space-between!important;
    width:100%!important;
    height:45px!important;
    min-height:45px!important;
    margin:0!important;
    padding:0 clamp(14px,4.4vw,28px)!important;
    box-sizing:border-box!important;
    gap:clamp(9px,2.7vw,24px)!important;
    overflow:hidden!important;
    scrollbar-width:none!important;
  }
  body.tfm-v48 .tfm44-product-switch::-webkit-scrollbar{display:none!important}
  body.tfm-v48 .tfm44-product-switch .tfm43-product-long{display:inline!important}
  body.tfm-v48 .tfm44-product-switch .tfm43-product-short{display:none!important}
  body.tfm-v48 .tfm44-product-switch>a,
  body.tfm-v48 .tfm44-product-switch .tfm43-economy-product{
    position:relative!important;
    flex:0 1 auto!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:45px!important;
    min-height:45px!important;
    margin:0!important;
    padding:1px 0 0!important;
    color:#55585d!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    font:500 clamp(13px,3.8vw,16px)/1 var(--tfm29-serif,var(--tfm-serif,Newsreader,Georgia,serif))!important;
    letter-spacing:-.018em!important;
  }
  body.tfm-v48 .tfm44-product-switch>a:hover,
  body.tfm-v48 .tfm44-product-switch .tfm43-economy-product:hover{color:#17191c!important}
  body.tfm-v48 .tfm44-product-switch>a.is-active,
  body.tfm-v48 .tfm44-product-switch .tfm43-economy-product.is-active{
    color:#111317!important;
    font-weight:650!important;
  }
  body.tfm-v48 .tfm44-product-switch>a.is-active:after,
  body.tfm-v48 .tfm44-product-switch .tfm43-economy-product.is-active:after{
    content:""!important;
    position:absolute!important;
    left:-4px!important;
    right:-4px!important;
    bottom:0!important;
    height:2px!important;
    border-radius:2px 2px 0 0!important;
    background:var(--tfm45-red,#b51224)!important;
  }

  body.tfm-v48 .tfm53-mobile-subscribe:focus-visible,
  body.tfm-v48 .tfm53-mobile-account:focus-visible{
    outline:2px solid var(--tfm45-red,#b51224)!important;
    outline-offset:2px!important;
  }

  /* Existing article reading progress must sit below the complete two-row header. */
  body.tfm-v48 .tfm22-reading-progress{top:107px!important}
  .admin-bar.tfm-v48 .tfm22-reading-progress{top:153px!important}
}

@media (max-width:359px){
  :root{--tfm45-header:101px}
  body.tfm-v48 .tfm44-site-header .tfm42-product-inner,
  body.tfm-v48 .tfm44-site-header.is-compact .tfm42-product-inner,
  body.tfm-v48 .tfm42-site-header .tfm42-product-inner,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm42-product-inner{
    min-height:101px!important;
    height:101px!important;
    padding-left:max(8px,env(safe-area-inset-left))!important;
    padding-right:max(8px,env(safe-area-inset-right))!important;
    grid-template-columns:38px minmax(78px,92px) 38px minmax(62px,auto) 38px!important;
    grid-template-rows:58px 43px!important;
    column-gap:1px!important;
  }
  body.tfm-v48 .tfm42-mobile-toggle,
  body.tfm-v48 .tfm42-mobile-search,
  body.tfm-v48 .tfm53-mobile-account{
    width:38px!important;
    min-width:38px!important;
    height:42px!important;
  }
  body.tfm-v48 .tfm42-mobile-toggle>span:not(.screen-reader-text){width:23px!important}
  body.tfm-v48 .tfm42-brand,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm42-brand,
  body.tfm-v48 .tfm44-site-header .tfm42-brand,
  body.tfm-v48 .tfm44-site-header.is-compact .tfm42-brand{max-width:92px!important;height:48px!important}
  body.tfm-v48 .tfm42-brand-mobile,
  body.tfm-v48 .tfm48-brand-mobile{height:48px!important}
  body.tfm-v48 .tfm48-mobile-logo{max-height:33px!important}
  body.tfm-v48 .tfm53-mobile-subscribe{
    min-width:62px!important;
    height:31px!important;
    padding:0 7px!important;
    border-radius:6px!important;
    font-size:12px!important;
  }
  body.tfm-v48 .tfm53-mobile-account-mark{width:33px!important;height:33px!important;font-size:10px!important}
  body.tfm-v48 .tfm53-mobile-account-dot{top:2px!important;right:-1px!important;width:7px!important;height:7px!important}
  body.tfm-v48 .tfm44-product-switch,
  html.tfm48-js body.tfm-v48 .tfm44-product-switch{
    height:43px!important;
    min-height:43px!important;
    padding:0 2px!important;
    gap:6px!important;
  }
  body.tfm-v48 .tfm44-product-switch>a,
  body.tfm-v48 .tfm44-product-switch .tfm43-economy-product{
    height:43px!important;
    min-height:43px!important;
    font-size:12px!important;
    letter-spacing:-.025em!important;
  }
  body.tfm-v48 .tfm22-reading-progress{top:101px!important}
  .admin-bar.tfm-v48 .tfm22-reading-progress{top:147px!important}
}

@media (min-width:560px) and (max-width:760px){
  :root{--tfm45-header:110px}
  body.tfm-v48 .tfm44-site-header .tfm42-product-inner,
  body.tfm-v48 .tfm44-site-header.is-compact .tfm42-product-inner,
  body.tfm-v48 .tfm42-site-header .tfm42-product-inner,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm42-product-inner{
    min-height:110px!important;
    height:110px!important;
    padding-left:max(20px,env(safe-area-inset-left))!important;
    padding-right:max(20px,env(safe-area-inset-right))!important;
    grid-template-columns:44px 128px 44px auto 44px!important;
    grid-template-rows:64px 46px!important;
    column-gap:8px!important;
  }
  body.tfm-v48 .tfm42-brand,
  body.tfm-v48 .tfm42-site-header.is-compact .tfm42-brand,
  body.tfm-v48 .tfm44-site-header .tfm42-brand,
  body.tfm-v48 .tfm44-site-header.is-compact .tfm42-brand{max-width:128px!important}
  body.tfm-v48 .tfm53-mobile-subscribe{height:36px!important;padding-inline:15px!important;font-size:14.5px!important}
  body.tfm-v48 .tfm44-product-switch,
  html.tfm48-js body.tfm-v48 .tfm44-product-switch{height:46px!important;min-height:46px!important;padding-inline:70px!important}
  body.tfm-v48 .tfm44-product-switch>a,
  body.tfm-v48 .tfm44-product-switch .tfm43-economy-product{height:46px!important;min-height:46px!important;font-size:16px!important}
  body.tfm-v48 .tfm22-reading-progress{top:110px!important}
  .admin-bar.tfm-v48 .tfm22-reading-progress{top:156px!important}
}

/* AMP keeps direct product links but hides controls that require JS overlays. */
@media (max-width:760px){
  body.tfm-amp.tfm-v48 .tfm42-mobile-search,
  body.tfm-amp.tfm-v48 .tfm42-mobile-toggle{display:none!important}
}
