/* ==========================================================================
   Phone type scale (round 2026-11-20d, PRD Docs/rounds/2026-11-20d-phone-polish.md). Loaded last on every page.
   From the Design Gallery's measured type at 1440 → 393 (Design-Gallery/data/*.json): display type about halves on
   phones (Apple product h2 64→32 and h3 96→48, AirTag 80→40, Sonos 96→54 and 42→32, Leica 54→40, Flos 80→40,
   Porsche 43→26) while body stays 14–18px and labels about 12px. Montserrat runs wider than SF, so our body sits
   one step under Apple's 17. Scale: hero 36 · section title 32 · closing 34 · card/row titles 20–22 · figures 22 ·
   lead and body 16 · captions 14 · labels 12.
   ========================================================================== */
@media (max-width: 767px) {
  /* Hero and display */
  .v8-hero h1, .lc-hero__text :is(h1, h2) { font-size: 36px; line-height: 1.06; }
  .ed .lc-hero__text h2 { font-size: 28px; }
  .lc-hero__text p, .v8-hero p { font-size: 16px; }
  .v8-title, .lc .v8-title, .v8-full .v8-title, .v8-who .v8-title, .v8-trust .v8-title, .pc-head .v8-title, .sx-head .v8-title { font-size: 32px; line-height: 1.1; letter-spacing: -0.03em; }
  .v8-close h2 { font-size: 34px; }
  .v8-lead, .lc-head .v8-lead { font-size: 16px; line-height: 1.5; }
  .v8-close p:not(.hs-meta) { font-size: 16px; }

  /* Card, tile and row titles */
  .v8-tile h3 { font-size: 26px; }
  .v8-tile p { font-size: 15px; }
  .lc-card h3, .lc-car__slide h3, .lc-exp h3, .lc-get h3, .lc main h3 { font-size: 22px; line-height: 1.15; }
  .v8-who .hs-row__title { font-size: 20px; }
  .lc-fig, .lc-prod__card .lc-fig { font-size: 22px; }
  .lc-tile figcaption b { font-size: 16px; }
  .lc-tile figcaption span, .lc-prod__card p { font-size: 14px; }
  .hs-body { font-size: 16px; }
  .lc-car__slide p:not([class]), .hp-ask p, .hp-svc__card p, .hp-svc__card + * p, main .lc-exp p:not([class]) { font-size: 16px; }
  .hp-svc__card h3, main section h3 { font-size: 22px; }

  /* Tech specs: tighter rows, darker lines (Apple specs on phone: 21 headings, 17 body at SF's width) */
  .sx-row { gap: 6px; padding: 20px 0; }
  .sx-row h2 { font-size: 20px; }
  .sx-row li { padding: 3px 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
  .sx-dims figcaption { font-size: 11px; }

  /* Compare: names may wrap to two lines, so every column keeps two lines for the name and the rows stay level */
  .vs-name { min-height: 2.4em; line-height: 1.2; display: flex; align-items: flex-end; justify-content: center; }
}

/* Story page on phone (round 2026-11-20e, the user's screenshot Direction/website/stories layout to fix): the quote sat
   64px under the line with the browser's 40px blockquote indent at 36px; now it starts at the page edge, smaller, and
   the sections sit closer. Desktop unchanged. */
@media (max-width: 767px) {
  .ed-quote { padding: 40px var(--hs-edge) 0; text-align: left; }
  .ed-quote blockquote { margin: 0; }
  .ed-quote p { font-size: 24px; line-height: 1.3; }
  .ed-quote figcaption { margin-top: 14px; font-size: 12px; justify-items: start; }
  .ed .ed-sec { padding-top: 44px; }
  .ed .ed-h2 { font-size: 26px; }
  .ed .ed-worry { font-size: 17px; }
  .ed .ed-beats li > p:last-child { font-size: 15px; }
}

/* Tech specs on phone, balance (round 2026-11-20e): even line breaks, less air above the first row, and the two size
   drawings at the same visual weight with their captions on two short lines each. */
@media (max-width: 767px) {
  .sx-head .v8-title { text-wrap: balance; }
  .sx-rows { margin-top: 28px; }
  .sx-row:first-child { padding-top: 8px; }
  .sx-row h2 { margin-bottom: 4px; }
  .sx-row li { text-wrap: pretty; }
  .sx-dims { grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; justify-items: center; text-align: center; }
  .sx-dims svg { max-width: 112px !important; margin: 0 auto; }
  .sx-dims figure:nth-child(2) svg { max-width: 140px !important; }
  .sx-dims figcaption { text-wrap: balance; max-width: 15ch; margin-inline: auto; line-height: 1.4; }
}

/* 2026-11-21c phone pass: launch-day touch-up on phones (spacing, wrapping and crop only; desktop unchanged).
   Checked with puppeteer at 360 and 393. */
@media (max-width: 767px) {
  /* Hero tabs (Leica tab bar): the labels sat under the pause button and the first one ran off the left edge on long
     labels (Stories, Articles, Our story, App, Why SORVA). Keep them clear of the pause and inside the page. */
  .lc-tabs { gap: 14px; padding-left: 10px; padding-right: 64px; justify-content: space-evenly; }
  .lc-tab { flex: 0 1 auto; min-width: 0; line-height: 1.15; text-align: center; }

  /* Carousel controls: 8 lines plus two arrows were wider than the phone, so the left arrow and the pause went off
     screen (Home stories, SORVA, App, Our story). Shorter line segments, same behaviour. */
  .dots-row { gap: 12px; }
  .dots { gap: 2px; }
  .dots button { width: 20px; }
  .dots button i { width: 14px; }
  .dots button[aria-current="true"] { width: 48px; }
  .dots button[aria-current="true"] i { width: 40px; }

  /* Home stories title had no side padding and touched both edges */
  .v8-ent > .v8-title { padding-inline: var(--hs-edge); }

  /* Home app tile: the phone screenshot in the picture sat under the title. A taller crop of the square picture, held
     left, so the phone stays whole and clear of the text. */
  .v8-tile:has(img[src*="ai-app-tile"]) { aspect-ratio: 4 / 5.6; }
  .v8-tile img[src*="ai-app-tile"] { object-position: 22% 0%; }

  /* App plan story: the tag over the walking person started off the left edge; anchor it nearer its left end so it
     stays inside the plan along the whole walk. */
  .ps-tag { translate: -21% 0; }

  /* Footer: the social circles touched each other; the patent number broke before "B1" */
  .v8-foot .hs-footer__grid ul.v8-social { gap: 10px; }
  .hs-footer__base a[href*="patents"] { white-space: nowrap; }

  /* Stories, Articles: the big "Read the articles / stories" pill ran edge to edge at 17px */
  .ed-more-cta--big { padding-inline: var(--hs-edge); }
  .ed-more-cta--big .hs-pill { min-width: 0; width: 100%; max-width: 360px; padding: 16px 24px; font-size: 14px; }


  /* Why SORVA compare: four columns stay, the 11px cell labels go up to 12px */
  body[data-page="why-sorva"] .vs-cell p { font-size: 12px; line-height: 1.3; }
  body[data-page="why-sorva"] .vs-pick { font-size: 11px; letter-spacing: -0.02em; }

  /* How it works is the one page without data-page and without v8.css, so its v8 footer drew the social icons and
     press logos at full size. Same sizes as v8.css gives every other page on a phone. */
  body:not([data-page]) .v8-foot .v8-social { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
  body:not([data-page]) .v8-foot .v8-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--night-line); display: grid; place-items: center; color: var(--on-night); }
  body:not([data-page]) .v8-foot .v8-social svg { width: 20px; height: 20px; }
  body:not([data-page]) .v8-foot .v8-press { margin-top: 22px; }
  body:not([data-page]) .v8-foot .v8-press ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 12px 18px; }
  body:not([data-page]) .v8-foot .v8-press img { height: 22px; width: auto; display: block; filter: grayscale(1) invert(1); mix-blend-mode: screen; opacity: .7; }
  /* Its app phones row snapped the first phone to the screen edge (scrollLeft 16); snap to the page edge instead */
  body:not([data-page]) .pg-phones { scroll-padding-inline: var(--hs-edge); }
  body:not([data-page]) .v8-foot .v8-link { background: none; border: 0; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
}
@media (max-width: 1023px) {
  /* Visit: "At your visit." sat right on the room picture (phone and tablet) */
  body[data-page="visit"] .vt-head + .lc-sec { padding-top: 48px; }
}
@media (max-width: 400px) {
  /* Home tiles: two pills side by side instead of stacking at 360 */
  .v8-tile .hs-pill { padding-inline: 16px; }
  .lc-tab { font-size: 12px; letter-spacing: 0.03em; }
  /* Why SORVA compare: "Home camera" was cut to "Home cam..." at 360 */
  body[data-page="why-sorva"] .vs-pick { padding: 0 1px; letter-spacing: -0.045em; }
}

/* ---------- Phone fixes, 2026-11-21 (user's staging check). Touch-up details only, no new sections. ---------- */
@media (max-width: 767px) {
  /* App hero, first slide: the man stood off the right edge at 62%; he sits at about 74% of the picture */
  .lc-hero__slide img[src*="ai-app-hero"] { object-position: 81% 50% !important; }

  /* App "The alert, in detail": the How you're notified line ran to six lines; smaller type and one shared text
     height so the four cards' pictures start at the same line */
  body[data-page="app"] .lc-detail .lc-prod__card > .lc-fig--line { font-size: 17px; line-height: 1.3; min-height: calc(4 * 1.3em); }

  /* Home stories rows: tighter on a phone */
  .v8-ent { padding: 56px 0 36px; }
  .v8-ent .v8-actions { margin: 16px 0 24px; }
  .v8-ent .car { gap: 10px; }
  .v8-ent .car--small { margin-top: 10px; }
  .v8-ent .dots-row { padding-top: 18px; }

  /* Visit us (SORVA) and Visit us (Fitting and setup): the Book a visit button in the middle */
  .lc-car--one .lc-car__slide .hs-pill, .hp-big__txt .hs-pill { display: flex; width: fit-content; margin-inline: auto; }

  /* Footer: the round social links were made inline-block by the link-list rule, so the icons sat top left */
  .v8-foot .hs-footer__grid ul.v8-social a { display: grid; place-items: center; padding: 0; }
  /* Press logos: four in one row squeezed into each other; two rows that wrap */
  .v8-foot .v8-press ul { flex-wrap: wrap; gap: 14px 22px; }
  .v8-foot .v8-press img { height: 20px; }
  /* Base: company and patent, then the legal links, each on its own line, no dots */
  .v8-foot .hs-footer__base { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--night-line); font-size: 11px; line-height: 1.5; }
  .v8-foot .hs-footer__base .v8-sep { display: none; }
  .v8-foot .v8-base__own { display: grid; gap: 4px; }
  .v8-foot .v8-base__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
}

/* Newsletter: the Subscribe pill runs full width on a phone and its label sat at the left (user, 2026-11-21) */
.hs-news__form .hs-pill { justify-content: center; }
