/*
 * The phone's floor (V27's task 2; docs/batches/v27.md Q369; docs/decisions.md D194): the premium mockups' (concordia-brands'
 * mockups/navigatus/site/assets/css/nvg-mobile.css, each rule a finding of their phone audit at 320, 360, 375 and 414 px)
 * written against navigatus's own classes, the site kit's (`cw-*`, `cc-*`) and the Shell's (`shl-*`). On every public
 * page in the site's frame and never the back office: a page the Cms draws (Shell's Site\SiteStyles, on
 * `cms.page.rendering`, its editor's canvas too) and a visitor's frame on every other page of the site (Site\MemberFrame,
 * the composer on `site::layouts/*`). A member's own pages keep the member space's phone design. On a phone:
 * - every control is a thumb's size, 44 px (Apple's guidelines; WCAG 2.5.5), its look unchanged where it can be: the
 *   header's buttons, buttons and links standing alone, pills, chips, tabs, the pager, lists of links; the footer's rows 40;
 * - nothing a visitor reads is under 11 px; what informs (a count, a date, a place, a mark) is 12 px; the uppercase mono
 *   eyebrows keep their 11 px;
 * - a field is 16 px, so iOS does not zoom into it;
 * - the header keeps its buttons in view: the section label beside the logo gives way below 768, and below 360 the bar
 *   holds the brand and three buttons, the colour style's switch staying in the footer;
 * - a film's controls are 44 px, its scrubber a 32 px strip to drag, its captions 13 px.
 * Pictures (a member's screens drawn inert and aria-hidden, the drawings) keep their own scale.
 */

@media (max-width: 767.98px) {
  /* ---------------------------------------------------------------------------------------------------- the header */
  .cw-brand-label { display: none; }
  .cw-header-actions :is(.btn-icon, .cw-find-btn, .cw-menu-btn) { --cc-btn-size: 44px; width: 44px; min-width: 44px; height: 44px; }
  .cc-brand:not([aria-hidden="true"] *) { min-height: 44px; }

  /* --------------------------------------------------------------------------- buttons, and links that stand alone */
  :is(a, button).btn:not([aria-hidden="true"] *, [inert] *) { min-height: 44px; }
  :is(a, button).btn.btn-icon:not([aria-hidden="true"] *, [inert] *) { min-width: 44px; }
  :is(.cw-link, .cw-rss, .cw-status, .cw-link-btn, .cw-qb-link, .cw-vp-trlink):not([aria-hidden="true"] *, [inert] *) { display: inline-flex; align-items: center; min-height: 44px; }

  /* --------------------------------------------------------------------- pills, chips, tabs, the pager, a toggle */
  :is(.cw-subnav a, .cw-chip-btn, .cw-jtab, .cw-cat-tabs :is(a, button), .cw-pager :is(a, button), .cw-ts-tab, .cw-hero-chip,
      .cw-ba-toggle button, .cw-cr-nav button, .cw-xp-tab):not([aria-hidden="true"] *, [inert] *) { min-height: 44px; }
  :is(.cw-pager :is(a, button), .cw-cat-tabs :is(a, button), .cw-subnav a):not([aria-hidden="true"] *, [inert] *) { min-width: 44px; justify-content: center; }
  /* ANR's centres as pills on Certificatul and on a centre's page (Journey's) */
  .jrn-centres a { display: inline-flex; align-items: center; min-height: 44px; }

  /* ------------------------------------------------------- lists of links: a page's contents, a slide's, a summary */
  :is(.cw-toc a, .cw-jslide-body a):not([aria-hidden="true"] *, [inert] *) { display: flex; align-items: center; min-height: 44px; }
  main details > summary:not([aria-hidden="true"] *, [inert] *) { min-height: 44px; }

  /* --------------- a link inside a line of facts, or beside a field's label (Ați uitat parola?): a bigger place to tap,
     the line unmoved */
  :is(li small a, form label + a):not([aria-hidden="true"] *, [inert] *) { padding: 12px 4px; margin: -12px -4px; }

  /* -------------------------------------------------------------------------------------- the footer: a row a link */
  .cw-footer-cols li a { display: flex; align-items: center; min-height: 40px; }
  .cw-footer-legal :is(a, .cw-link-btn) { display: inline-flex; align-items: center; min-height: 40px; }

  /* ---------------------------------------------------------------- fields: 44 px, and 16 px so iOS keeps its zoom */
  :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"]), select, textarea):not([aria-hidden="true"] *, [inert] *) { min-height: 44px; font-size: 16px; }

  /* ---------------------------------------------------------------------------------------------- the type floor */
  main small:not([aria-hidden="true"] *, [inert] *) { font-size: max(12px, .875em); }
  :is(.cc-count, .badge-sm, .cw-chip, .cw-chip-btn .cc-mono, .cw-hero-chip .cc-mono, .table > thead > tr > th, .cw-steps .cc-mono,
      .cw-person-city, .cw-slot-day :is(b, small), .cw-event-date .cc-mono, .cw-book-top, .cw-book-foot):not([aria-hidden="true"] *, [inert] *) { font-size: 12px; }
  /* the uppercase mono labels keep the eyebrows' 11 px, never less */
  :is(.cw-post-kicker, .cw-art-label, .cw-ba-label, .cw-card-float .cc-eyebrow, .cw-vp-ch .cc-mono):not([aria-hidden="true"] *, [inert] *) { font-size: 11px; }

  /* the quote band (E7): a rule's long words at a phone's size, where the band's 30 px floor ran a rule to thirteen lines */
  .cw-qb blockquote p { font-size: clamp(22px, 6.2vw, 30px); line-height: 1.16; letter-spacing: -.03em; }

  /* a page's side column, under the article on a phone: its one column may shrink, and long words wrap */
  .cw-aside-sticky { grid-template-columns: minmax(0, 1fr); }
  .cw-side-card { min-width: 0; overflow-wrap: anywhere; }

  /* a scene's glow bleeds up and down, never past the screen's sides */
  .cw-scene-glow { inset: -6% 0; }

  /* -------------------------------------------------------------------------------------------------------- the films */
  .cw-vp-row { gap: 0; }
  .cw-vp-btn { min-width: 44px; height: 44px; }
  .cw-vp-btn[data-cw-speed] { min-width: 48px; }
  .cw-vp-time { margin: 0 6px 0 2px; }
  :is(.cw-vp-scrub, .cw-vp-range) { height: 32px; }
  .cw-vp-cap { font-size: 13px; }
  :is(.cw-vp-loopbtn, .cw-vp-dialog-x) { width: 44px; height: 44px; }
  :is(.cw-vp-ch, .cw-vp-ln) button { min-height: 44px; }
}

/* a touch screen wider than a phone (a tablet) still gets the films' thumb-sized controls */
@media (min-width: 768px) and (pointer: coarse) {
  .cw-vp-btn { min-width: 44px; height: 44px; }
  :is(.cw-vp-scrub, .cw-vp-range) { height: 32px; }
}

/* the smallest phones (under 360): the brand and three 44 px buttons fill the bar, so the colour style's switch stays in
   the footer alone */
@media (max-width: 359.98px) {
  .cw-header-bar .cc-style-toggle { display: none; }
  .cw-header-actions { gap: 2px; }
}
