/* TABLETS LOOK LIKE DESKTOP (600–1279 CSS px, portrait and landscape; never phones).
   Section 1 — header.
   Owner order 2026-11-23: tablets copy the DESKTOP header exactly — black contact strip on top
   (phones, email, EN/ES/FR, Get Quote, Start Patient Form), then one row with the logo on the
   left and the full menu on the right. No "Menu" button, no hamburger, no phone header.
   Loaded through `tabletViewport` in src/lib/viewport.js, after every other sheet. */
html body:not(#_):not(#__) .site-masthead {
  --tab-edge:clamp(16px,3.2vw,41px);
  display:block; padding:0; row-gap:0;
}
/* ---- black contact strip (desktop look, scaled) ---- */
html body:not(#_):not(#__) .site-masthead .contact-strip {
  display:flex!important; align-items:center; justify-content:flex-start;
  gap:clamp(6px,1.1vw,12px); height:44px!important; min-height:44px!important;
  padding:0 var(--tab-edge)!important; font-size:clamp(11px,1.25vw,14px);
  background:#000!important; background-image:none!important; border-bottom:1px solid #8fe6ec33;
  white-space:nowrap; overflow:hidden;
}
html body:not(#_):not(#__) .site-masthead .contact-strip>a:not(.header-action) { display:inline-flex!important; align-items:center; line-height:1; }
html body:not(#_):not(#__) .site-masthead .contact-strip>a span { display:inline; margin:0 4px 0 0; font-size:.86em; letter-spacing:0; }
html body:not(#_):not(#__) .site-masthead .contact-strip>.header-email+.header-lang,
html body:not(#_):not(#__) .site-masthead .contact-strip>.header-lang { display:flex!important; margin-left:auto; flex:0 0 auto; }
html body:not(#_):not(#__) .site-masthead .contact-strip>.header-action {
  display:inline-flex!important; border:0; padding:0; margin-block:0!important; min-height:0!important;
}
html body:not(#_):not(#__) .site-masthead .contact-strip>.header-action.satin-button {
  --satin-width:clamp(136px,14vw,168px)!important; width:clamp(136px,14vw,168px)!important;
  flex:0 0 clamp(136px,14vw,168px)!important;
}
/* email drops first when space runs out; the two phone numbers always stay */
@media (max-width:1099px) { html body:not(#_):not(#__) .site-masthead .contact-strip>a.header-email { display:none!important; } }
@media (max-width:719px) { /* small tablets: shorter phone labels so EN/ES/FR and both buttons still fit */
  html body:not(#_):not(#__) .site-masthead .contact-strip>a span { display:none; }
}

/* ---- logo + menu row ---- */
html body:not(#_):not(#__) .site-masthead .site-header {
  display:flex!important; flex-direction:row; flex-wrap:nowrap; align-items:center; justify-content:space-between;
  position:relative; width:auto; height:auto!important; min-height:0; margin:0 var(--tab-edge);
  padding:clamp(8px,1vw,10px) 0; gap:clamp(12px,2.2vw,28px);
  border:0; border-radius:0; background:none; box-shadow:none; backdrop-filter:none;
}
html body:not(#_):not(#__) .site-masthead .site-brand {
  display:block; flex:0 0 auto; width:clamp(168px,21vw,270px); margin:0;
}
html body:not(#_):not(#__) .site-masthead .site-brand img { display:block; width:100%; height:auto; max-height:none; }
html body:not(#_):not(#__) .site-masthead .site-menu-toggle,
html body:not(#_):not(#__) .site-masthead .site-ctas { display:none!important; }
html body:not(#_):not(#__) .site-masthead #site-navigation {
  display:flex!important; position:static; flex:1 1 auto; flex-direction:row; flex-wrap:nowrap;
  align-items:center; justify-content:flex-end; gap:clamp(10px,1.75vw,22px);
  max-height:none; overflow:visible; margin:0; padding:0;
  border:0; border-radius:0; background:none; box-shadow:none;
}
html body:not(#_):not(#__) .site-masthead #site-navigation>a,
html body:not(#_):not(#__) .site-masthead .more-menu summary {
  display:flex; align-items:center; gap:4px; min-height:44px; padding:0;
  font-size:clamp(14px,1.55vw,17px); font-weight:700; line-height:1.4; white-space:nowrap;
}
html body:not(#_):not(#__) .site-masthead .more-menu { position:relative; }
html body:not(#_):not(#__) .site-masthead .more-links {
  position:absolute; top:100%; right:0; z-index:40; width:min(310px,80vw); max-height:64dvh; overflow:auto;
  margin:0; background:#103349; box-shadow:0 18px 35px #00131e88; border-radius:12px;
}
html body:not(#_):not(#__) .site-masthead .more-links a { display:block; padding:12px 14px; min-height:44px; font-size:16px; }
html body:not(#_):not(#__) .site-masthead :is(a,summary):focus-visible { outline:3px solid #8ee8e8; outline-offset:2px; }

/* Narrow portrait tablets (600–739): the menu cannot share the row with the logo, so it sits
   on its own full-width line under the logo — still the desktop menu, never a Menu button. */
@media (max-width:739px) {
  html body:not(#_):not(#__) .site-masthead .site-header { flex-wrap:wrap; row-gap:2px; }
  html body:not(#_):not(#__) .site-masthead #site-navigation { flex:1 0 100%; justify-content:space-between; border-top:1px solid #8bc6cd38; }
}

/* ---- Section 2 — homepage hero, desktop look ----
   Desktop: headline, price pill and stars on the left, glass $5,499 card on the right, the three
   lead buttons side by side at full desktop size. Up to 1050px wide (and every portrait tablet)
   the card and the text share the top row and the buttons get their own full-width row, so they
   never shrink, stack or collide with the card. Wider landscape tablets use the desktop hero as is. */
@media (max-width:1050px), (orientation:portrait) {
  html body.sota-home #mobile-introduction.hero {
    display:grid; grid-template-columns:minmax(0,1fr) clamp(196px,27vw,256px);
    grid-template-areas:". proof" "h proof" "p proof" "t proof" ". proof" "a a";
    grid-template-rows:minmax(0,1fr) auto auto auto minmax(0,1fr) auto; align-items:center; align-content:center;
    column-gap:clamp(18px,4vw,48px); height:auto; min-height:0;
    padding:clamp(30px,4.6vw,54px) clamp(22px,5vw,64px) clamp(52px,6vw,70px);
  }
  html body.sota-home #mobile-introduction .hero-content { display:contents; }
  html body.sota-home #mobile-introduction .hero-content>* { position:relative; z-index:2; min-width:0; }
  html body.sota-home #mobile-introduction h1 {
    grid-area:h; margin:0; font-size:clamp(38px,5.6vw,58px); line-height:1.04; letter-spacing:-.03em; font-weight:800; text-wrap:balance;
  }
  html body.sota-home #mobile-introduction .hero-price {
    grid-area:p; justify-self:start; display:inline-block; margin:clamp(14px,2vw,20px) 0 0; padding:8px 16px;
    border:1px solid #82e2df55; border-radius:999px; background:#06283b99; backdrop-filter:blur(6px);
    font-size:clamp(16px,2.1vw,22px); line-height:1.35;
  }
  html body.sota-home #mobile-introduction .hero-price strong { color:#b9f6f1; }
  html body.sota-home #mobile-introduction .trust { grid-area:t; display:flex; flex-wrap:nowrap; align-items:center; gap:4px 10px; margin:clamp(14px,2vw,22px) 0 0; font-size:clamp(13px,1.75vw,16px); white-space:nowrap; }
  html body.sota-home #mobile-introduction .trust>span:last-child { white-space:normal; }
  html body.sota-home #mobile-introduction .trust br { display:none; }
  html body.sota-home #mobile-introduction .actions {
    grid-area:a; display:flex; flex-wrap:nowrap; justify-content:flex-start; gap:10px; margin:clamp(22px,3.4vw,34px) 0 0;
  }
  html body:not(#_):not(#__).sota-home #mobile-introduction .actions>.satin-button {
    --satin-width:min(260px,calc((100% - 20px)/3)); width:min(260px,calc((100% - 20px)/3))!important; flex:0 1 auto!important; margin:0!important;
  }
  html body.sota-home #mobile-introduction .hero-proof {
    grid-area:proof; display:block; position:relative; inset:auto; z-index:2; transform:none; align-self:center; justify-self:end;
    width:100%; max-width:256px; height:auto; min-height:0; margin:0; padding:14px clamp(12px,2vw,20px) 18px; text-align:center;
    border:1px solid #b5e4ea55; border-radius:18px; background:linear-gradient(160deg,#0a3248cc,#05202f99);
    backdrop-filter:blur(10px); box-shadow:inset 0 1px #ffffff2e,0 18px 40px #00101c88;
  }
  html body.sota-home #mobile-introduction .hero-proof-copy { display:block; padding:0; text-align:center; }
  html body.sota-home #mobile-introduction .hero-proof-copy>span { display:block; font-size:clamp(22px,2.8vw,30px); }
  html body.sota-home #mobile-introduction .hero-proof-copy p { display:block; margin:4px 0; font-size:clamp(14px,1.7vw,18px); }
  html body.sota-home #mobile-introduction .hero-proof-copy strong { display:block; color:#b9f6f1; line-height:1.05; font-size:clamp(34px,4.4vw,46px); }
  html body.sota-home #mobile-introduction .hero-proof .denture-art { display:block; width:100%; height:auto; max-height:150px; margin:6px 0 0; object-fit:contain; }
  html body.sota-home #mobile-introduction .scroll-cue { bottom:10px; }
}

/* ---- Section 3 — interior pages ----
   From 740px the desktop layouts (desktop-balance.css, review-layout.css, component desktop rules)
   now run on tablets too. These rules only make the desktop pieces fit a narrower screen. */
@media (min-width:740px) {
  /* Bottom "How to start" bar: doctors' picture left, title and the two standard 260px buttons right
     (desktop look). The buttons keep their standard size; the picture column gives way. */
  html body:not(#_):not(#__) .interior-cta { grid-template-columns:minmax(0,1fr) auto; gap:clamp(16px,3vw,32px); padding:24px clamp(20px,4vw,32px); }
  html body:not(#_):not(#__) .interior-cta .actions { grid-template-columns:260px 260px; gap:10px; }
  /* About: featured doctors in one row of five, as on desktop (no lone card left on a row). */
  html body:not(#_):not(#__) .doc-cards { grid-template-columns:repeat(5,minmax(0,1fr)); gap:clamp(8px,1.3vw,16px); }
  html body:not(#_):not(#__) .doc-card { padding:8px 7px 4px; }
  html body:not(#_):not(#__) .doc-info { padding:10px 2px 0; }
  html body:not(#_):not(#__) .doc-info h4 { font-size:clamp(14px,1.65vw,19px); }
  html body:not(#_):not(#__) .doc-focus { font-size:clamp(12px,1.35vw,15px); }
  html body:not(#_):not(#__) .doc-place { font-size:clamp(11px,1.2vw,13px); padding:2px 8px 2px 5px; }
}
@media (min-width:740px) and (max-width:859px) {
  /* Not enough room beside the picture: picture on top, title and buttons centred under it. */
  html body:not(#_):not(#__) .interior-cta { grid-template-columns:1fr; justify-items:center; text-align:center; }
  html body:not(#_):not(#__) .interior-cta img { max-width:440px; max-height:150px; }
  html body:not(#_):not(#__) .interior-cta h2 { margin-bottom:14px; }
}

/* ---- Section 4 — rows of three lead buttons (Start Patient Form / Talk Now / Price List) ----
   Desktop shows them side by side. On a tablet they stay in one row: full 260px wherever the row
   has room, and only on screens too narrow for 3 x 260px do they scale down together (never wrap 2+1). */
html body:not(#_):not(#__) :is(.actions.actions-grid,.actions:has(>.satin-button:nth-child(3):last-child)) { box-sizing:border-box; width:100%!important; max-width:100%!important; flex-wrap:nowrap!important; justify-content:center; gap:10px!important; }
html body:not(#_):not(#__):not(#___) :is(.actions.actions-grid,.actions:has(>.satin-button:nth-child(3):last-child))>.satin-button {
  --satin-width:min(260px,calc((100% - 20px)/3))!important; width:min(260px,calc((100% - 20px)/3))!important; flex:0 1 auto!important; margin-block:0!important;
}
html body:not(#_):not(#__).sota-home #mobile-introduction .actions { justify-content:flex-start; }
/* Pairs of buttons (page heroes: "Explore …" + "2026 Price Lists"): side by side as on desktop,
   scaled together only when the column is narrower than 2 x 260px — never cut off by the photo. */
html body:not(#_):not(#__) :is(.hero-shortcuts,.actions,.cx-actions):has(>.satin-button:nth-child(2):last-child) { display:flex!important; box-sizing:border-box; width:100%!important; max-width:100%; flex-wrap:nowrap!important; gap:10px!important; }
html body:not(#_):not(#__):not(#___) :is(.hero-shortcuts,.actions,.cx-actions):has(>.satin-button:nth-child(2):last-child)>.satin-button {
  --satin-width:min(260px,calc((100% - 10px)/2))!important; width:min(260px,calc((100% - 10px)/2))!important; flex:0 1 auto!important;
}
html body:not(#_):not(#__) .interior-hero-copy { min-width:0; }

/* ---- Section 5 — treatment pages (All-on-4, Dental Implants, What are implants…) ----
   Desktop layout: text left, photos right. On tablets the text column is taller than on desktop,
   so the lead photo must not stretch to that height (that left big empty boxes): photos keep their
   natural shape, sit at the top of the column, and the text is a touch smaller so the two columns
   stay balanced. Nothing is cropped. */
@media (min-width:740px) {
  html body:not(#_):not(#__) .treatment-content .treatment-section :is(.all-media,.implant-media) { align-self:start; }
  html body:not(#_):not(#__) .treatment-content .treatment-section .all-media>.content-image,
  html body:not(#_):not(#__) .treatment-content .treatment-section .implant-head:has(>.content-image) {
    flex:0 0 auto; aspect-ratio:auto; height:auto; display:block;
  }
  html body:not(#_):not(#__) .treatment-content .treatment-section .all-media>.content-image img,
  html body:not(#_):not(#__) .treatment-content .treatment-section .implant-head>.content-image img {
    position:static; inset:auto; display:block; width:100%; height:auto; max-height:none; object-fit:contain;
  }
  html body:not(#_):not(#__) .treatment-content .treatment-section .implant-head>.content-image { height:auto; }
}
@media (min-width:740px) and (max-width:1099px) {
  html body:not(#_):not(#__) .treatment-content .treatment-section { grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); }
  html body:not(#_):not(#__) .treatment-content :is(.all-copy,.implant-copy,.rich-copy) :is(p,li) { font-size:16px; line-height:1.55; }
}

/* ---- Section 6 — Clinical Excellence program pages: hero text column a little wider on tablets
   so the three fact boxes read on one or two lines like desktop. */
@media (min-width:740px) and (max-width:1099px) {
  html body:not(#_):not(#__) .cx-hero-grid { grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); }
  html body:not(#_):not(#__) .cx-facts { gap:8px; }
  html body:not(#_):not(#__) .cx-facts>* { padding:10px 12px; font-size:13px; line-height:1.3; }
  html body:not(#_):not(#__) .cx-facts>* :is(b,strong) { font-size:17px; }
}

/* ---- Section 7 — patient form: file choices in two columns, as on desktop. */
@media (min-width:740px) {
  html body:not(#_):not(#__).patient-intake .patient-card #field_2_41 .gfield_checkbox { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* ---- Section 8 — header on 740–899px tablets in Spanish/French: longer menu words, so the logo and
   menu spacing tighten slightly to keep the whole menu on the logo row. */
@media (min-width:740px) and (max-width:899px) {
  html:not([lang="en"]) body:not(#_):not(#__) .site-masthead .site-brand { width:clamp(146px,19vw,200px); }
  html:not([lang="en"]) body:not(#_):not(#__) .site-masthead #site-navigation { gap:clamp(8px,1.3vw,14px); }
  html:not([lang="en"]) body:not(#_):not(#__) .site-masthead #site-navigation>a,
  html:not([lang="en"]) body:not(#_):not(#__) .site-masthead .more-menu summary { font-size:13.5px; }
}

/* ---- Section 9 — bottom "How to start with SOTA Dental?" bar on tablets (600px and up) ----
   Centered: picture, title, then ONE row of all three buttons (Start Patient Form / Talk Now / 2026 Price Lists).
   Buttons stay 260px where the row has room and scale down together (never wrap) on narrower screens. */
@media (min-width:600px) {
  html body:not(#_):not(#__) .interior-cta { grid-template-columns:1fr; justify-items:center; text-align:center; padding:24px clamp(14px,3vw,32px); gap:10px; }
  html body:not(#_):not(#__) .interior-cta img { max-width:440px; max-height:150px; margin:0 auto; }
  html body:not(#_):not(#__) .interior-cta > div { width:100%; text-align:center; }
  html body:not(#_):not(#__) .interior-cta h2 { text-align:center; margin:0 0 14px; }
  html body:not(#_):not(#__) .interior-cta .actions { display:flex!important; flex-direction:row!important; flex-wrap:nowrap!important; justify-content:center!important; align-items:center; gap:10px!important; width:100%; box-sizing:border-box; }
  html body:not(#_):not(#__) .interior-cta .actions>.talk-now { display:inline-flex!important; }
  html body:not(#_):not(#__):not(#___) .interior-cta .actions>* { --satin-width:min(260px,calc((100% - 20px)/3))!important; width:min(260px,calc((100% - 20px)/3))!important; min-width:0; flex:0 1 auto!important; margin-block:0!important; box-sizing:border-box; font-size:clamp(14px,2.1vw,17px); }
}
