/* Home desktop/phone layouts and larger type. Music (#home-music-sec) is left unchanged. */
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec){margin:0 0 1.25rem}
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .home-sec-h,
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .hm-head h2,
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .hm-head h3,
body:has(#home-wx-bundle) .home-wx-place{
  font:700 1.35rem/1.25 var(--serif);margin:0;letter-spacing:-.01em
}
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .hm-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 .7rem
}
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .panel,
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .card,
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .hm-brief,
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .ho-row li{
  border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink)
}
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .card:hover,
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .ho-row li:hover{
  border-color:var(--bn-yellow, #e8a400);box-shadow:var(--shadow)
}

/* Weather: big, simple, high contrast. No empty bars. */
.home-wx-nws .wxn-now{margin:.15rem 0 .35rem;display:flex;flex-wrap:wrap;align-items:baseline;gap:.35rem .6rem}
.home-wx-nws .wxn-temp{font:700 3.1rem/1 var(--serif);letter-spacing:-.03em;color:var(--ink)}
.home-wx-nws .wxn-unit{font:700 1.25rem/1 var(--sans);color:var(--ink)}
.home-wx-nws .wxn-cond{font-size:1.35rem;font-weight:650;color:var(--ink)}
.home-wx-nws .wxn-outlook{margin:0 0 .7rem;font-size:1.05rem;line-height:1.45;color:var(--ink);max-width:42rem}
.home-wx-nws .wxn-alert-line{
  margin:0 0 .7rem;padding:.45rem .7rem;border-radius:10px;
  background:#ffe566;color:#141008;border:1px solid #c9a000;font-size:1rem;line-height:1.4;font-weight:600
}
.home-wx-nws .wxn-alert-line a{color:#141008;text-decoration:underline;font-weight:700}
.home-wx-nws .wxn-days{display:flex;gap:.55rem;overflow-x:auto;list-style:none;padding:.15rem 0 .35rem;margin:0 0 .5rem;scroll-snap-type:x mandatory}
.home-wx-nws .wxn-days li{
  flex:0 0 5.6rem;text-align:center;scroll-snap-align:start;padding:.45rem .25rem;
  border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink)
}
.home-wx-nws .wxn-days b{display:block;font-size:1.05rem;margin:0 0 .15rem}
.home-wx-nws .wxn-icon{font-size:1.7rem;line-height:1.2}
.home-wx-nws .wxn-hl{font-size:1.05rem;margin-top:.15rem}
.home-wx-nws .wxn-hi{font-weight:700}
.home-wx-nws .wxn-lo{color:var(--muted)}
.home-wx-nws .wxn-pick{margin:.55rem 0 0}
.home-wx-nws .wxn-pick summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:1rem}
.home-wx-nws .wxn-pick ul{list-style:none;margin:.3rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.4rem .8rem}

/* Originals package: one brief, then swipe/grid cards */
#home-originals-sec .hm-brief{padding:.85rem 1rem;margin:0 0 .85rem}
#home-originals-sec .hm-brief-h{margin:0 0 .25rem;font:700 1.2rem/1.3 var(--serif)}
#home-originals-sec .hm-brief-dek{margin:0 0 .55rem;font-size:1rem;line-height:1.45}
#home-originals-sec .bc-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:0}
#home-originals-sec .bc-actions .pill{min-height:44px;display:inline-flex;align-items:center;padding:0 14px;font-size:1rem;font-weight:700}
#home-originals-sec .ho-row{display:flex;gap:.7rem;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 0 .35rem;margin:0;list-style:none}
#home-originals-sec .ho-row li{flex:0 0 min(78%,260px);scroll-snap-align:start;padding:.7rem .8rem}
#home-originals-sec #home-briefs{display:block}

/* Phone: stacked, 17px body type */
@media (max-width: 1023px){
  body:has(#home-wx-bundle) #main{font-size:17px;line-height:1.55}
  body:has(#home-wx-bundle) #main #home-music-sec{font-size:16px;line-height:1.55}
  body:has(#home-wx-bundle) #home-news .cols{display:flex;flex-direction:column;gap:1.1rem}
  body:has(#home-wx-bundle) #home-news .home-feed-grid{display:flex;flex-direction:column;gap:20px}
  body:has(#home-wx-bundle) #home-news .card h3{font-size:1.2rem;line-height:1.3}
  body:has(#home-wx-bundle) #home-news .snip{font-size:1rem;line-height:1.5;color:var(--ink)}
  body:has(#home-wx-bundle) .home-wx-nws .wxn-temp{font-size:2.6rem}
}
/* Desktop: full width, multi-column feed, 18px body type */
@media (min-width: 1024px){
  body:has(#home-wx-bundle) .wrap{max-width:min(1320px,100%)}
  body:has(#home-wx-bundle) #main{font-size:18px;line-height:1.55}
  body:has(#home-wx-bundle) #main #home-music-sec{font-size:16px;line-height:1.55}
  body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .home-sec-h,
  body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .hm-head h2,
  body:has(#home-wx-bundle) .home-wx-place{font-size:1.6rem}
  body:has(#home-wx-bundle) #home-news .cols{display:block}
  body:has(#home-wx-bundle) #home-news .primary{width:100%;max-width:none}
  body:has(#home-wx-bundle) #home-news .home-feed-grid{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch
  }
  body:has(#home-wx-bundle) #home-news .home-feed-grid>.card{margin:0;height:100%;display:flex;flex-direction:column}
  body:has(#home-wx-bundle) #home-news .home-feed-grid>.card .snip{flex:1 1 auto}
  body:has(#home-wx-bundle) #home-news .home-feed-grid>.card .foot{margin-top:auto}
  body:has(#home-wx-bundle) #home-news .card h3{font-size:1.28rem;line-height:1.3}
  body:has(#home-wx-bundle) #home-news .snip{font-size:1.02rem;line-height:1.5;color:var(--ink)}
  body:has(#home-wx-bundle) #home-originals-sec .ho-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:1rem}
  body:has(#home-wx-bundle) #home-originals-sec .ho-row li{flex:none}
  body:has(#home-wx-bundle) #home-sports-sec .hm-stories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem 1.2rem}
  .home-wx-nws .wxn-temp{font-size:3.4rem}
}

/* Tight, clean home: hide leftover chrome, no empty gaps. Music layout is unchanged. */
body:has(#home-wx-bundle) #tick-stack,
body:has(#home-wx-bundle) .prefsbar,
body:has(#home-wx-bundle) #v4-strip,
body:has(#home-wx-bundle) #token-meter,
body:has(#home-wx-bundle) #since-banner{display:none!important}
body:has(#home-wx-bundle) .home-sec{margin:0 0 .85rem;padding:0}
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .panel{margin:0}
body:has(#home-wx-bundle) .home-sec:not(#home-music-sec) .hm-head{margin:0 0 .45rem}
body:has(#home-wx-bundle) #main{padding-top:.4rem}
.home-about-compact{display:flex;gap:.75rem;align-items:flex-start;padding:.65rem .8rem;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink);max-width:40rem}
.home-about-compact img{width:72px;height:72px;border-radius:12px;object-fit:cover;flex:0 0 72px}
.home-about-compact p{margin:0 0 .3rem;font-size:1rem;line-height:1.45}
.home-about-compact p:last-child{margin:0}

.home-about-compact picture{flex:0 0 72px;width:72px;height:72px;display:block}
.home-about-compact:not(:has(img)){gap:0}
.home-about-compact:not(:has(img)) picture{display:none;width:0;height:0;flex:none}
.home-feed-tools:not(:has(button:not(.hidden))){display:none}

body:has(#home-wx-bundle) #top-5-5,
body:has(#home-wx-bundle) #clip-rail,
body:has(#home-wx-bundle) .sotd-mini{display:none!important}
body:has(#home-wx-bundle) #home-news .home-feed-upsell .upsell{
  display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .85rem;
  padding:.55rem .9rem;margin:20px 0 0
}
body:has(#home-wx-bundle) #home-news .home-feed-upsell .upsell h3,
body:has(#home-wx-bundle) #home-news .home-feed-upsell .upsell p{margin:0;font-size:1rem;line-height:1.4}
body:has(#home-wx-bundle) #home-news .home-feed-upsell .upsell h3{font-weight:700}
body:has(#home-wx-bundle) #home-news .home-feed-upsell .upsell p{flex:1 1 16rem}
body:has(#home-wx-bundle) #home-news .home-feed-upsell .upsell .btn{margin:0;white-space:nowrap}
body:has(#home-wx-bundle) #home-news .home-feed-more{
  display:flex;flex-wrap:wrap;align-items:center;gap:.55rem 1rem;margin:20px 0 0
}
body:has(#home-wx-bundle) #home-news .home-feed-more .chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:0}
body:has(#home-wx-bundle) #home-news .home-feed-more .datepick{margin:0;gap:6px}
body:has(#home-wx-bundle) #home-news .home-feed-more .datepick input{font-size:1rem;padding:6px 8px}
body:has(#home-wx-bundle) #home-news .home-feed-more .datepick button{font-size:1rem;padding:6px 14px}

/* Phone keeps page_size in the upsell; desktop shows the visible (trimmed) count. */
body:has(#home-wx-bundle) #home-news .upsell-n-desk{display:none}

/* Desktop: Watch cards span the row instead of a short swipe with empty space. */
@media (min-width: 1024px) {
  body:has(#home-wx-bundle) #home-watch-sec .v4sw-wrap{display:block}
  body:has(#home-wx-bundle) #home-watch-sec .v4sw-nav{display:none}
  body:has(#home-wx-bundle) #home-watch-sec .v4sw-track{
    display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:20px;overflow:visible;padding-bottom:0
  }
  body:has(#home-wx-bundle) #home-watch-sec .v4sw-track li{width:auto;flex:auto;min-width:0}
  body:has(#home-wx-bundle) #home-watch-sec .v4sw-card,
  body:has(#home-wx-bundle) #home-watch-sec .v4sw-see,
  body:has(#home-wx-bundle) #home-watch-sec .v4sw-seebox{width:100%}
  /* Trim an incomplete last row of live-feed cards so the grid is only full rows of 3.
     Paywall page_size is unchanged; the upsell count on desktop matches the visible cards. */
  body:has(#home-wx-bundle) #home-news .home-feed-grid>.card:last-child:nth-child(3n+1),
  body:has(#home-wx-bundle) #home-news .home-feed-grid>.card:nth-last-child(2):nth-child(3n+1),
  body:has(#home-wx-bundle) #home-news .home-feed-grid>.card:last-child:nth-child(3n+2){display:none}
  body:has(#home-wx-bundle) #home-news .upsell-n-phone{display:none}
  body:has(#home-wx-bundle) #home-news .upsell-n-desk{display:inline}
}
/* v5.0.1 V5_COUNTER (flag OFF = no .v5-count class, rules inert): desktop keeps every free headline; a short last row
   stretches instead of being hidden, so the single upsell number matches what is on screen at every width. */
@media (min-width: 1024px) {
  body:has(#home-wx-bundle) #home-news .home-feed-grid.v5-count>.card:last-child:nth-child(3n+1),
  body:has(#home-wx-bundle) #home-news .home-feed-grid.v5-count>.card:nth-last-child(2):nth-child(3n+1),
  body:has(#home-wx-bundle) #home-news .home-feed-grid.v5-count>.card:last-child:nth-child(3n+2){display:flex}
  body:has(#home-wx-bundle) #home-news .home-feed-grid.v5-count>.card:last-child:nth-child(3n+1){grid-column:1 / -1}
  body:has(#home-wx-bundle) #home-news .home-feed-grid.v5-count>.card:last-child:nth-child(3n+2){grid-column:span 2}
}

/* Banana Desk showcase: phone stacks after Originals; desktop is a full-width bar under the brief. */
#home-desk-widget{
  display:flex;flex-wrap:wrap;align-items:center;gap:.8rem 1rem;
  margin:.15rem 0 0;padding:.9rem 1rem;
  background:#F2F2F0;color:#5B3A1A;
  border:2px solid #2E7D32;border-radius:16px;
  box-shadow:inset 6px 0 0 #D62828
}
#home-desk-widget img{
  width:72px;height:72px;flex:0 0 72px;border-radius:14px;
  background:#FFC107;object-fit:cover
}
#home-desk-widget .hdw-body{flex:1 1 12rem;min-width:0}
#home-desk-widget h2{
  margin:0 0 .3rem;font:700 1.4rem/1.2 var(--serif);color:#5B3A1A;letter-spacing:-.01em
}
#home-desk-widget .hdw-tag,
#home-desk-widget .hdw-dek{
  margin:0 0 .35rem;font-size:1.05rem;line-height:1.45;color:#5B3A1A
}
#home-desk-widget .hdw-dek{margin-bottom:.55rem}
#home-desk-widget .hdw-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:48px;padding:.4rem 1.2rem;width:100%;box-sizing:border-box;
  background:#FFC107;color:#5B3A1A;border:2px solid #5B3A1A;border-radius:999px;
  font:800 1.12rem/1.2 var(--sans);text-decoration:none;text-align:center
}
#home-desk-widget .hdw-btn:hover,
#home-desk-widget .hdw-btn:focus-visible{background:#ffca28;color:#5B3A1A}

@media (max-width: 1023px){
  #home-desk-widget{
    display:grid;grid-template-columns:72px minmax(0,1fr);
    align-items:start;gap:.55rem .85rem;margin:.15rem 0 0
  }
  #home-desk-widget img{grid-column:1;grid-row:1/span 3;width:72px;height:72px;flex:none}
  #home-desk-widget .hdw-body{display:contents}
  #home-desk-widget h2{grid-column:2;margin:0;font-size:1.45rem}
  #home-desk-widget .hdw-tag,
  #home-desk-widget .hdw-dek{grid-column:2;margin:0;font-size:1.08rem}
  #home-desk-widget .hdw-btn{grid-column:1/-1;width:100%;margin:.25rem 0 0}
}

@media (min-width: 1024px){
  /* Heading, brief, then a width-matched Desk bar, then the Originals cards. No side gaps. */
  #home-originals-sec{
    display:flex;flex-direction:column;gap:.7rem
  }
  #home-originals-sec>.hm-head{order:1;margin:0}
  #home-originals-sec #home-briefs{order:2;margin:0}
  #home-originals-sec #home-desk-widget{order:3;margin:0}
  #home-originals-sec #home-social-widget{order:4;margin:0}
  #home-originals-sec #home-originals{order:5}
  #home-desk-widget{
    display:grid;grid-template-columns:80px minmax(0,1fr) auto;
    align-items:center;gap:.7rem 1.2rem;padding:.85rem 1.15rem
  }
  #home-desk-widget img{width:80px;height:80px;flex:none;grid-column:1;grid-row:1/span 3}
  #home-desk-widget .hdw-body{display:contents}
  #home-desk-widget h2{grid-column:2;margin:0;font-size:1.5rem}
  #home-desk-widget .hdw-tag,
  #home-desk-widget .hdw-dek{grid-column:2;margin:0;font-size:1.05rem}
  #home-desk-widget .hdw-btn{
    grid-column:3;grid-row:1/span 3;width:auto;min-width:13.5rem;margin:0
  }
}

/* Banana Social showcase: phone stacks under Banana Desk; desktop is a full-width bar under Desk, above the Originals cards. */
#home-social-widget{
  display:flex;flex-wrap:wrap;align-items:center;gap:.8rem 1rem;
  margin:.15rem 0 0;padding:.9rem 1rem;
  background:#F2F2F0;color:#5B3A1A;
  border:2px solid #FFC107;border-radius:16px;
  box-shadow:inset 6px 0 0 #2E7D32
}
#home-social-widget .hsw-mark{
  width:72px;height:72px;flex:0 0 72px;border-radius:14px;
  background:#FFC107;color:#5B3A1A;
  display:grid;place-items:center;font-size:2.1rem;line-height:1
}
#home-social-widget .hsw-body{flex:1 1 12rem;min-width:0}
#home-social-widget h2{
  margin:0 0 .3rem;font:700 1.4rem/1.2 var(--serif);color:#5B3A1A;letter-spacing:-.01em
}
#home-social-widget .hsw-tag,
#home-social-widget .hsw-dek{
  margin:0 0 .35rem;font-size:1.05rem;line-height:1.45;color:#5B3A1A
}
#home-social-widget .hsw-dek{margin-bottom:.55rem}
#home-social-widget .hsw-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:48px;padding:.4rem 1.2rem;width:100%;box-sizing:border-box;
  background:#FFC107;color:#5B3A1A;border:2px solid #5B3A1A;border-radius:999px;
  font:800 1.12rem/1.2 var(--sans);text-decoration:none;text-align:center
}
#home-social-widget .hsw-btn-soon{
  margin:0;background:#F2F2F0;cursor:default
}

@media (max-width: 1023px){
  #home-social-widget{
    display:grid;grid-template-columns:72px minmax(0,1fr);
    align-items:start;gap:.55rem .85rem;margin:.35rem 0 0
  }
  #home-social-widget .hsw-mark{grid-column:1;grid-row:1/span 3;width:72px;height:72px;flex:none}
  #home-social-widget .hsw-body{display:contents}
  #home-social-widget h2{grid-column:2;margin:0;font-size:1.45rem}
  #home-social-widget .hsw-tag,
  #home-social-widget .hsw-dek{grid-column:2;margin:0;font-size:1.08rem}
  #home-social-widget .hsw-btn{grid-column:1/-1;width:100%;margin:.25rem 0 0}
}

@media (min-width: 1024px){
  #home-social-widget{
    display:grid;grid-template-columns:80px minmax(0,1fr) auto;
    align-items:center;gap:.7rem 1.2rem;padding:.85rem 1.15rem;margin:0
  }
  #home-social-widget .hsw-mark{width:80px;height:80px;flex:none;grid-column:1;grid-row:1/span 3;font-size:2.3rem}
  #home-social-widget .hsw-body{display:contents}
  #home-social-widget h2{grid-column:2;margin:0;font-size:1.5rem}
  #home-social-widget .hsw-tag,
  #home-social-widget .hsw-dek{grid-column:2;margin:0;font-size:1.05rem}
  #home-social-widget .hsw-btn{
    grid-column:3;grid-row:1/span 3;width:auto;min-width:13.5rem;margin:0
  }
}
