/* =====================================================================================
   Desktop and tablet layer (2026-11-24). Loaded after the theme, so it can re-flow every theme.
   EVERY rule here sits inside a min-width media query: phones (390) never read this file's rules.
   Grammar copied from the brands' own desktop PDPs captured at 1440 (references/desktop-*):
   - Smooche: sticky gallery left ~58%, buy column right ~40%, 1376px frame, centred ann bar,
     nav left / logo centre / icons right, 4-up review + ingredient carousels, split image|text bands,
     comparison centred, email band with the form on the right.
   - Grüns: heading-left / questions-right FAQ, 4-up stat rows, roomy 88px side margins.
   - Ridge: thin hairline header with text nav, buy column with hairline dividers.
   - Caraway: 1160px inner container, image|accordion splits.
   Tokens only, so the themes restyle it.
   ===================================================================================== */

/* ---------- tablet and up (768+) ---------- */
@media (min-width:768px){
  :root{--cw:1200px;--gut:max(32px,calc((100% - var(--cw)) / 2))}
  body{font-size:16.5px}

  /* announcement: centred group like Smooche, not pinned to the edges */
  .ann{justify-content:center;gap:32px;padding:10px 32px}
  .ann__t{text-align:right}

  /* sections: full-bleed band, inner content held to the container by padding */
  .sec,body[data-theme] .sec{padding-left:var(--gut);padding-right:var(--gut)}
  .sec{padding-top:64px}
  .sec.band{padding-bottom:64px;margin-top:64px}
  .sec h2{font-size:34px;margin-bottom:22px}
  .sec .lead{max-width:640px;margin-left:auto;margin-right:auto;font-size:17px}
  body[data-theme="dark"] .sec{padding-top:72px;padding-bottom:64px}
  body[data-theme="dark"] .sec h2{font-size:56px}
  body[data-theme="dark"] .sec .lead{margin-left:0}

  /* product hero: one centred column on tablets */
  .pdp{max-width:640px;margin:0 auto}

  /* rails: show several cards at once, Smooche's desktop carousels */
  .rail{margin:0;padding:2px 0 8px;scroll-padding:0}
  .rail > *{flex-basis:calc((100% - 12px) / 2)}
  .vids > *{flex-basis:calc((100% - 24px) / 3)}
  .rail.inside > *{flex-basis:calc((100% - 24px) / 3)}
  .vids:not(:has(> :nth-child(4))) + .rail-nav,.rail.inside:not(:has(> :nth-child(4))) + .rail-nav{display:none}

  /* showreel: a full-bleed film strip that glides continuously (site.js autoReel) */
  .reel{display:flex;gap:12px;overflow-x:auto;margin:0 calc(50% - 50vw);padding:0 0 4px;width:100vw}
  .reel img{flex:0 0 calc((100% - 36px) / 4);min-width:0}
  .reel__track{gap:12px}

  /* set cards: a grid, no carousel */
  .vcards{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;overflow:visible}
  .vcards:has(> :nth-child(3)){grid-template-columns:repeat(3,1fr)}
  .vcards:not(:has(> :nth-child(3))){max-width:820px;margin-left:auto;margin-right:auto}
  .vcards + .rail-nav{display:none}
  .vcards:has(> :nth-child(4)){display:flex;overflow-x:auto}
  .vcards:has(> :nth-child(4)) + .rail-nav{display:flex}

  /* benefit panel: photo left, icon rows right (Smooche "best choice") */
  .bene:has(.bene__im){display:grid;grid-template-columns:1fr 1fr;align-items:stretch}
  .bene__im{height:100%;aspect-ratio:auto;min-height:100%}
  .bene ul{padding:14px 32px;align-self:center}
  .bene:not(:has(.bene__im)) ul{display:grid;grid-template-columns:1fr 1fr;column-gap:32px}

  /* three jobs: 3-up tiles */
  .tiles{grid-template-columns:repeat(3,1fr);gap:20px}
  .tile__im img{aspect-ratio:3/2}

  /* how it works: horizontal timeline */
  .tl{grid-auto-flow:column;grid-auto-columns:1fr;border-left:0;border-top:2px solid var(--accent);margin:18px 0 0;padding-top:0}
  .tl div{padding:28px 20px 0 0}
  .tl div:before{left:0;top:-9px}
  body[data-theme="dark"] .tl{border-top-width:2px}

  /* by the numbers / arrival / comparison / host note: centred at a readable width */
  .facts,.arrive,.cmp-wrap,.host,.basis,.arrive__pb{max-width:860px;margin-left:auto;margin-right:auto}
  body[data-theme="dark"] :is(.facts,.arrive,.cmp-wrap,.host,.basis,.arrive__pb,.vcards),
  body[data-theme="calm"] .sec:not(:nth-of-type(4n+1)) :is(.facts,.arrive,.cmp-wrap,.host,.basis,.arrive__pb,.vcards){margin-left:0}
  .facts{gap:16px}
  .facts div{padding:28px 12px}
  .facts b{font-size:44px}
  .facts span{font-size:15px}
  .arrive__pb{margin-top:24px}
  .host{grid-template-columns:120px 1fr;gap:24px;padding:28px}
  .host img{width:120px;height:120px}
  .host p{font-size:17px}
  .cmp{font-size:15.5px}
  .cmp th{font-size:14px;padding:14px 8px}
  .cmp td{padding:15px 8px}

  /* paperback: image left, words right */
  .pb{display:grid;grid-template-columns:1fr 1fr;align-items:center;max-width:1000px;margin:0 auto}
  .pb img{height:100%}
  .pb div{padding:32px 40px}
  .pb h3{font-size:28px}
  .pb p{font-size:17px}

  .sec--buy{max-width:calc(640px + 2 * var(--gut));margin-left:auto;margin-right:auto}

  /* FAQ band: heading left, questions right (Grüns "Any last questions?") */
  #faq{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);column-gap:64px;align-items:start}
  #faq h2,body[data-theme] #faq h2{text-align:left;margin:0}
  #faq .faq summary{font-size:18px}

  /* email capture: one band, words left, form right (Smooche "A little more Smooche in your inbox") */
  .cap,body[data-theme] .cap{margin:64px var(--gut) 0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:40px;align-items:center;text-align:left;padding:40px 44px}
  .cap h2,.cap p{grid-column:1}
  .cap p{margin-bottom:0}
  .cap input,.cap button,.cap small{grid-column:2}
  .cap input{grid-row:1;align-self:end}
  .cap button{grid-row:2;align-self:start}
  .cap small{grid-row:3;margin-top:0}
  body[data-theme="bold"] .cap{margin:0;padding:48px var(--gut);border-radius:0}

  /* footer: brand block left, links right, held to the container */
  .ft{padding:44px var(--gut) 44px;display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);column-gap:48px;font-size:14px}
  .ft > :not(nav){grid-column:1}
  .ft nav{grid-column:2;grid-row:1 / span 4;flex-direction:column;align-items:flex-end;gap:10px;margin:0}

  /* sticky buy bar: content to the container */
  .stick{padding-left:var(--gut);padding-right:var(--gut)}
  .stick div{flex:0 1 auto;margin-right:auto}
  .stick button{padding:0 34px}

  /* bag drawer: wider on a big screen */
  .drawer{width:min(460px,100%)}

  /* "you may also like" */
  .also__row{grid-template-columns:repeat(4,1fr)}
}

/* ---------- desktop (1024+) ---------- */
@media (min-width:1024px){
  :root{--gut:max(40px,calc((100% - var(--cw)) / 2))}

  /* header: logo centre, bag right (the menu button stays until there is room for the links) */
  .hd{padding:12px var(--gut);min-height:76px}
  .hd .logo{font-size:26px}

  /* product hero: sticky gallery left ~57%, buy column right */
  .pdp{max-width:1400px;padding:28px 40px 0;display:grid;grid-template-columns:minmax(0,1.32fr) minmax(0,1fr);column-gap:56px;align-items:start}
  .pdp__media{position:sticky;top:20px}
  .pdp .gal{padding:0}
  .pdp .thumbs button{flex-basis:calc((100% - 40px) / 6)}
  .pdp__buy > *{margin-left:0;margin-right:0}
  .pdp__buy > :first-child{margin-top:0}
  .pdp__buy .chips{padding:0;flex-wrap:wrap;overflow:visible}
  .pdp__buy .cta{width:100%}
  .pdp__buy h1{font-size:38px;margin-top:14px}
  .pdp__buy .price strong{font-size:32px}
  .pdp__buy .sub h2{font-size:20px}
  .pdp__buy .faq{margin-top:22px}
  .pdp__buy .guar-wrap{margin-top:24px}
  body[data-theme="dark"] .pdp__buy h1{font-size:32px}
  body[data-theme="calm"] .pdp__buy .pill{margin-left:0}

  /* final buy block: photo left, picker right */
  .sec--buy{max-width:none;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);column-gap:48px;align-items:start;grid-auto-flow:row dense}
  .sec--buy .buy__im{grid-column:1;grid-row:1 / span 6;margin:0;height:auto;position:sticky;top:24px}
  .sec--buy > :not(.buy__im){grid-column:2}
  .sec--buy h2,body[data-theme] .sec--buy h2{text-align:left;margin-top:4px}
  .sec--buy:not(:has(.buy__im)){grid-template-columns:minmax(0,640px);justify-content:center}
  .sec--buy:not(:has(.buy__im)) > *{grid-column:1}

  /* sections: a larger type ladder */
  .sec{padding-top:88px}
  .sec.band{padding-bottom:88px;margin-top:88px}
  .sec h2{font-size:40px;margin-bottom:28px}
  body[data-theme="dark"] .sec h2{font-size:64px}
  body[data-theme="calm"] .sec h2{font-size:42px}

  .rail > *{flex-basis:calc((100% - 24px) / 3)}
  .vids > *{flex-basis:calc((100% - 36px) / 4)}
  .rail.inside > *{flex-basis:calc((100% - 36px) / 4)}
  .vids:not(:has(> :nth-child(5))) + .rail-nav,.rail.inside:not(:has(> :nth-child(5))) + .rail-nav{display:none}
  .proof-rail:not(:has(> :nth-child(4))) + .rail-nav{display:none}
  .vcards:has(> :nth-child(4)){display:grid;grid-template-columns:repeat(4,1fr)}
  .vcards:has(> :nth-child(4)) + .rail-nav{display:none}
  .cmt--card{min-height:200px;padding:20px}
  .cmt--card blockquote{font-size:17.5px}

  .reel{gap:16px}
  .reel img{flex-basis:calc((100% - 64px) / 5)}
  .reel__track{gap:16px}
  .tiles{gap:24px}
  .tile h3{font-size:20px}
  .bene ul{padding:20px 48px}
  .bene li b{font-size:17px}
  .bene li{font-size:15.5px;padding:16px 0}
  .arrive li{font-size:15px}
  .arrive b{font-size:17px}
  .arrive__ic{width:72px;height:72px}
  .arrive:before{top:36px}
  .cap h2{font-size:32px}
}

/* ---------- header links (1180+) ---------- */
@media (min-width:1180px){
  /* header: nav left, logo centre, contact + bag right (Smooche / Ridge) */
  .hd{grid-template-columns:1fr auto 1fr}
  .hd > button[aria-label="Menu"]{display:none}
  .hd .logo{grid-column:2;grid-row:1}
  .hd .bag{grid-column:3;grid-row:1;justify-self:end}
  .hd--nav .hd__nav{display:flex;grid-column:1;grid-row:1;gap:28px}
  .hd--nav .hd__aux{display:block;grid-column:3;grid-row:1;justify-self:end;margin-right:60px}
  .hd__nav a,.hd__aux{text-decoration:none;font:600 13px/1 var(--f);letter-spacing:.08em;text-transform:uppercase;padding:14px 0}
  .hd__nav a:hover,.hd__aux:hover{color:var(--accent)}
  body[data-theme="dark"] .hd__nav a,body[data-theme="dark"] .hd__aux{font:500 15px/1 var(--f);letter-spacing:0;text-transform:none}
  body[data-theme="bold"] .hd{margin:12px var(--gut) 0;padding:10px 20px}
  body[data-theme="bold"] .hd__nav a,body[data-theme="bold"] .hd__aux{font-weight:700;letter-spacing:.02em;text-transform:none;font-size:15px}
  body[data-theme="calm"] .hd__nav a,body[data-theme="calm"] .hd__aux{letter-spacing:.06em;font-weight:500}

}

/* ---------- wide (1280+) ---------- */
@media (min-width:1280px){
  .pdp{column-gap:72px}
}

/* =====================================================================================
   Funnel and post-purchase pages on desktop
   ===================================================================================== */
@media (min-width:768px){
  /* offer block (advertorial, vsl): wider than the reading column, picker left | pay right */
  body .fx-offer,body[data-theme] .fx-offer{padding-left:max(32px,calc((100% - 980px) / 2));padding-right:max(32px,calc((100% - 980px) / 2))}
  body .fx-offer > h2,body .fx-offer > .lead{text-align:center}

  /* advertorial, story: a ~720px reading column (resetdigestion / NYT story pages), bands stay full-bleed */
  body .adv-story > *:not(.fx-offer):not(.sec):not(.adv-hero):not(.adv-intro),body .adv-story .adv-top{padding-left:max(24px,calc((100% - 720px) / 2));padding-right:max(24px,calc((100% - 720px) / 2))}
  body .adv-story .adv-top{padding-top:40px}
  body .adv-story .adv-hero{max-width:720px;margin:0 auto;padding:0;border-radius:12px;overflow:hidden}
  body .adv-story .adv-hero img{aspect-ratio:4/3}
  body .adv-story .adv-hero{margin-bottom:28px}
  body .adv-story .adv-img{width:100%;margin:6px 0 22px;border-radius:12px}
  body .adv-story .adv-h1{font-size:52px}
  body .adv-story .adv-sec{padding-top:44px;padding-bottom:20px}
  body .adv-story .adv-band{padding-top:36px;padding-bottom:16px}
  body .adv-story .adv-intro{padding:0 max(24px,calc((100% - 980px) / 2));display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:48px;align-items:center}
  body .adv-story .adv-intro img{grid-column:1;grid-row:1 / span 2;border-radius:12px;margin:40px 0}
  body .adv-story .adv-intro__t,body .adv-story .adv-intro__b{grid-column:2;padding-left:0;padding-right:0}
  body .adv-story .adv-intro__t{align-self:end}
  body .adv-story .adv-intro__b{align-self:start}
  body .adv-story .adv-in{grid-template-columns:1fr 1fr;gap:28px 24px}
  body .adv-story .adv-in h3{font-size:19px}
  body .adv-story .sec:not(.fx-offer){padding-left:max(24px,calc((100% - 720px) / 2));padding-right:max(24px,calc((100% - 720px) / 2))}
  body .adv-story .fx-btn{max-width:420px;margin-left:auto;margin-right:auto}

  /* advertorial, listicle (Ridge): cards 2-up, hero shorter, product split */
  body .lst-hero{min-height:560px;padding:64px 32px}
  body .lst-hero h1{font-size:56px;max-width:900px}
  body .lst-hero p{max-width:620px}
  body .lst-qs figure{padding:0 max(32px,calc((100% - 720px) / 2))}
  body .lst-qs blockquote{font-size:20px}
  body .lst-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:48px max(32px,calc((100% - 1100px) / 2)) 40px;gap:28px}
  body .lst-say{padding:64px max(32px,calc((100% - 820px) / 2))}
  body .lst-say blockquote{font-size:34px}
  body .lst-prod{padding:56px max(32px,calc((100% - 1100px) / 2)) 8px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:56px;align-items:center}
  body .lst-prod img{grid-column:1;grid-row:1 / span 6;margin:0}
  body .lst-prod > :not(img){grid-column:2}
  body .lst-prod h2{font-size:44px}
  body .lst-dark{padding:64px max(32px,calc((100% - 900px) / 2))}
  body .lst-dark h2{font-size:44px}
  body .lst-dark p{max-width:560px}
  body .lst-dark__row{grid-template-columns:repeat(4,1fr)}
  body .lst-dark .lst-btn{min-width:320px}
  body .adv-list .sec:not(.fx-offer){padding-left:max(32px,calc((100% - 820px) / 2));padding-right:max(32px,calc((100% - 820px) / 2))}

  /* VSL: big centred video (ClickFunnels VSL pages run the player ~960px), text at a reading width */
  body .vsl-top{max-width:880px;margin:0 auto;padding-top:36px}
  body .vsl-h1{font-size:44px}
  body .vsl-vid{max-width:960px;margin:22px auto 0}
  body .vsl-bul{max-width:720px;margin-left:auto;margin-right:auto}
  body .vsl-strip-sec .vsl-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;overflow:visible}
  body .vsl-strip-sec .vsl-strip > *{width:auto;flex:none}
  body .vsl-from,body .vsl-from + .sec,body[data-theme] .vsl-from,body[data-theme] .vsl-from + .sec{padding-left:max(32px,calc((100% - 820px) / 2));padding-right:max(32px,calc((100% - 820px) / 2))}
  body .vsl-stack{max-width:720px;margin-left:auto;margin-right:auto}
  [data-vsl=tall] body .vsl-vid{max-width:720px}

  /* quiz: one centred card column (Prose / Factor quizzes) */
  body[data-page="quiz"] main{max-width:760px;margin:0 auto;padding-top:28px}
  body .quiz-img{border-radius:12px}
  body .quiz-prog,body .quiz-pad{padding-left:0;padding-right:0}
  body .quiz-nav{padding-left:max(32px,calc((100% - 760px) / 2));padding-right:max(32px,calc((100% - 760px) / 2))}
  body .quiz-q{font-size:30px}

  /* post-purchase and support pages: centred at a sensible width */
  body[data-page="thanks"] main{max-width:720px;margin:0 auto;padding-top:24px}
  body[data-page="library"] main{max-width:800px;margin:0 auto;padding-top:24px}
  body[data-page="review"] main{max-width:640px;margin:0 auto;padding-top:24px}
  body[data-page="legal"] main{max-width:800px;margin:0 auto;padding-top:16px}
  body[data-page="thanks"] main,body[data-page="library"] main,body[data-page="review"] main,body[data-page="upsell"] main,body[data-page="bonus"] main{min-height:calc(100vh - 300px)}

  /* bonus: photo of the pages left, promise + form right */
  body[data-page="bonus"] main{max-width:1100px;margin:0 auto;padding:40px 32px 0;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);column-gap:56px;align-items:start;align-content:start}
  body[data-page="bonus"] main > *{grid-column:2;margin-left:0;margin-right:0}
  body[data-page="bonus"] .bn-img{grid-column:1;grid-row:1 / span 6;margin:0;position:sticky;top:24px;aspect-ratio:4/3}
  body[data-page="bonus"] .bn-hero{text-align:left;padding:0}
  body[data-page="bonus"] .bn-hero p{margin-left:0;max-width:none}
  body[data-page="bonus"] .bn-hero h1{font-size:40px}
  body[data-page="bonus"] .bn-get h2,body[data-page="bonus"] .bn-free,body[data-page="bonus"] .bn-how{text-align:left}
  body[data-page="bonus"] main:not(:has(.bn-img)){display:block;max-width:640px}
  body[data-page="bonus"] main:not(:has(.bn-img)) .bn-hero,body[data-page="bonus"] main:not(:has(.bn-img)) :is(.bn-get h2,.bn-free,.bn-how){text-align:center}
  body[data-page="bonus"] main:not(:has(.bn-img)) .bn-hero p{margin-left:auto;margin-right:auto}
  html[data-v=b] body[data-page="bonus"] main{display:block;max-width:640px;padding:0}
  html[data-v=b] body[data-page="bonus"] .bn-hero{text-align:center;padding:48px 32px 90px;box-shadow:0 0 0 100vmax #141110;clip-path:inset(0 -100vmax)}
  html[data-v=b] body[data-page="bonus"] .bn-hero p{margin-left:auto;margin-right:auto}

  /* tripwire (Kindle / Gumroad product page): cover left, buy column right */
  body .tw{max-width:1100px;margin:0 auto;padding:36px 32px 0;display:grid;grid-template-columns:minmax(0,0.9fr) minmax(0,1fr);column-gap:56px;align-items:start}
  body .tw > *{grid-column:2}
  body .tw > .tw-cover{grid-column:1;grid-row:1 / span 12;position:sticky;top:24px;margin:0;padding:48px 0}
  body .tw-h1{font-size:40px}

  /* upsell: product picture left, offer right */
  body .up-ban{padding:18px 32px}
  body .up-o{max-width:1040px;margin:0 auto;padding:36px 32px 0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:56px;align-content:start}
  body .up-o[hidden]{display:none}
  body .up-o > *{grid-column:2}
  body .up-o > .up-img{grid-column:1;grid-row:1 / span 14;align-self:start}
  body .up-o h1{margin-top:0;font-size:34px}
  body[data-page="upsell"] .ps[data-none]{max-width:720px;margin:0 auto}
  html[data-v=b] body .up-o{max-width:640px}
}
@media (min-width:1024px){
  /* quiz (Prose consultation): photo left, the question right, one screen per step */
  body[data-page="quiz"] main{max-width:1160px;padding:32px 40px 0}
  body .quiz-step,body .quiz-res{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:56px;align-items:center;margin-top:24px}
  body .quiz-step .quiz-img,body .quiz-res .quiz-img{height:100%;min-height:520px;aspect-ratio:auto}
  body .quiz-res{align-items:start}
  body .quiz-res .quiz-img{position:sticky;top:24px;height:auto;aspect-ratio:4/5;min-height:0}
  body .quiz-pad{padding-top:0}
  body .quiz-q{font-size:36px}
  /* Back / Next sit under the answers (right column), not pinned to the bottom of a big screen */
  body .quiz-nav{position:static;max-width:1080px;margin:28px auto 48px;padding:0;border-top:0;background:none;justify-content:flex-end}
  body .quiz-next{flex:0 0 calc(50% - 28px)}
  body .quiz-back{flex:0 0 140px}
  body .fx-flush{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:40px;align-items:start}
  body .fx-flush .fx-pay > .cta:first-child{margin-top:16px}
}
