/*
 * Mobile pass, batch F: company pages, legal pages and hubs.
 * About, Our work, Our services, Contact, Careers, Guides and playbooks,
 * the blog / insights / reviews / guides / case study archives, the legal
 * pages, the thank you page and single case studies.
 *
 * Loaded on every page, so every rule is scoped to one of those templates.
 * Everything that changes layout sits inside max-width: 767px; the only rules
 * outside it hide phone-only controls at 768px and above.
 */

/* Phone-only controls added by the batch F templates and scripts. */
.f-toc,
#csgrid ~ .cs-more,
.case-study-template .cs-fold-btn { display: none; }

@media (max-width: 767px) {

  /* ================================================================
     Shared: horizontal swipe rows
     ================================================================ */
  .page-template-page-about-us .ab-photos,
  .page-template-page-about-us .ab-beliefs,
  .page-template-page-guides-and-playbooks .tl-authors,
  .contact-template .offices-grid,
  .page-template-thank-you .blogs-grid,
  .single-case-study .the-challenge .cards-3,
  .single-case-study .results-grid,
  .single-case-study .jtq-grid,
  .single-case-study .jtq-shots,
  .single-case-study .jtq-told {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px !important;
    grid-template-columns: none !important;
  }
  .page-template-page-about-us .ab-photos::-webkit-scrollbar,
  .page-template-page-about-us .ab-beliefs::-webkit-scrollbar,
  .page-template-page-guides-and-playbooks .tl-authors::-webkit-scrollbar,
  .contact-template .offices-grid::-webkit-scrollbar,
  .page-template-thank-you .blogs-grid::-webkit-scrollbar,
  .single-case-study .the-challenge .cards-3::-webkit-scrollbar,
  .single-case-study .results-grid::-webkit-scrollbar,
  .single-case-study .jtq-grid::-webkit-scrollbar,
  .single-case-study .jtq-shots::-webkit-scrollbar,
  .single-case-study .jtq-told::-webkit-scrollbar { display: none; }

  .page-template-page-about-us .ab-photos > *,
  .page-template-page-about-us .ab-beliefs > *,
  .contact-template .offices-grid > *,
  .page-template-thank-you .blogs-grid > *,
  .single-case-study .the-challenge .cards-3 > *,
  .single-case-study .results-grid > *,
  .single-case-study .jtq-grid > *,
  .single-case-study .jtq-shots > *,
  .single-case-study .jtq-told > * {
    flex: 0 0 86% !important;
    max-width: 86% !important;
    min-width: 0;
    scroll-snap-align: start;
    grid-row: auto !important;
    grid-column: auto !important;
    margin: 0 !important;
  }
  /* Reveal-on-scroll never fires for cards that start off to the side. */
  .page-template-page-about-us .ab-photos .rv,
  .page-template-page-about-us .ab-photos.rv,
  .page-template-page-about-us .ab-beliefs .rv,
  .page-template-page-guides-and-playbooks .tl-authors.rv,
  .page-template-page-guides-and-playbooks .tl-authors .rv {
    opacity: 1 !important;
    transform: none !important;
  }

  /* ================================================================
     About us  (.page-template-page-about-us)
     ================================================================ */
  .page-template-page-about-us section[data-screen-label] { padding-top: 52px !important; padding-bottom: 52px !important; }
  .page-template-page-about-us section[data-screen-label="Hero"] { padding-top: 40px !important; padding-bottom: 0 !important; }
  .page-template-page-about-us section[data-screen-label="Tech stack"] { padding: 0 !important; }
  .page-template-page-about-us section[data-screen-label] > div[style*="max-width:1240px"],
  .page-template-page-about-us section[data-screen-label="Tech stack"] > div { padding-left: 20px !important; padding-right: 20px !important; }
  .page-template-page-about-us section[data-screen-label="Tech stack"] > div { padding-top: 0 !important; padding-bottom: 52px !important; }
  /* Grid items default to min-width:auto, which let the testimonial column
     push past the screen edge. */
  .page-template-page-about-us .ab-2col,
  .page-template-page-about-us .ab-hero { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  .page-template-page-about-us .ab-2col > *,
  .page-template-page-about-us .ab-hero > * { min-width: 0; }

  /* Hero: headline, one line of what we do, the studio photo. The typed
     tagline repeats the intro, so it goes on phones. */
  .page-template-page-about-us section[data-screen-label="Hero"] nav[aria-label="Breadcrumb"] { margin-bottom: 22px !important; }
  .page-template-page-about-us .ab-hero > div:nth-child(2) { display: none !important; }
  .page-template-page-about-us .ab-hero p { font-size: 17px !important; margin-top: 18px !important; }
  .page-template-page-about-us section[data-screen-label="Hero"] .rv[style*="aspect-ratio:16/8"] { margin-top: 28px !important; aspect-ratio: 16 / 10 !important; }

  /* Why we exist: four of the eight recognisable problems is plenty. */
  .page-template-page-about-us section[data-screen-label="Why we exist"] .ab-2col > div:last-child { gap: 18px !important; }
  .page-template-page-about-us section[data-screen-label="Why we exist"] ul li:nth-child(n+5) { display: none !important; }
  .page-template-page-about-us section[data-screen-label="Why we exist"] .ab-2col > div:last-child > div { padding: 22px 20px !important; }

  /* Team photos: one swipe row instead of eight stacked frames. */
  .page-template-page-about-us section[data-screen-label="Team photos"] .ab-photos > div { aspect-ratio: 4 / 4.6 !important; height: auto !important; }
  .page-template-page-about-us section[data-screen-label="Team photos"] .ab-photos > div:last-child { display: none !important; }

  /* Beliefs: swipe row; the photo after the cards is decoration. */
  .page-template-page-about-us section[data-screen-label="What we believe"] .ab-beliefs > .ab-zoomwrap { display: none !important; }
  .page-template-page-about-us section[data-screen-label="What we believe"] > div > div:first-child { margin-bottom: 28px !important; }
  .page-template-page-about-us .ab-belief { padding: 24px 22px !important; }
  .page-template-page-about-us .ab-belief p { font-size: 16px !important; }

  /* How we work: the portrait repeats "every engagement starts with the number". */
  .page-template-page-about-us section[data-screen-label="How we work"] .ab-2col > .rv:first-child { display: none !important; }
  .page-template-page-about-us section[data-screen-label="How we work"] p[style*="font-size:15px"] { font-size: 16px !important; }

  /* Your team: keep the four departments as tap targets, drop the
     sixteen service rows under them and the large animated wordmark. */
  .page-template-page-about-us section[data-screen-label="Your team"] .ab-2col { margin-bottom: 28px !important; }
  .page-template-page-about-us section[data-screen-label="Your team"] .munro-logo,
  .page-template-page-about-us section[data-screen-label="Your team"] .ab-flow,
  .page-template-page-about-us section[data-screen-label="Your team"] .ab-tree .ab-item,
  .page-template-page-about-us section[data-screen-label="Your team"] .ab-tree .ab-conn { display: none !important; }
  .page-template-page-about-us section[data-screen-label="Your team"] .rv > div:first-child { padding: 0 !important; }
  .page-template-page-about-us .ab-tree { grid-template-columns: 1fr 1fr !important; gap: 10px !important; row-gap: 10px !important; }
  .page-template-page-about-us .ab-tree > * { margin: 0 !important; }
  .page-template-page-about-us .ab-tree .ab-pill-btn { min-height: 64px; width: 100%; }
  .page-template-page-about-us #abTreePanel { margin-top: 16px !important; padding: 22px 20px !important; min-height: 0 !important; }
  /* Until a department is opened the panel repeats the paragraph above it. */
  .page-template-page-about-us section[data-screen-label="Your team"] .rv:not(:has(.ab-pill-btn[aria-expanded="true"])) > #abTreePanel { display: none !important; }
  /* Who we have done it for: the industry list says it more briefly. */
  .page-template-page-about-us section[data-screen-label="Who we have done it for"] .ab-2col > div:last-child > p:nth-child(2) { display: none !important; }

  /* Tech stack: the first nine partners, not thirty-three tiles. */
  .page-template-page-about-us #abStack { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .page-template-page-about-us #abStack .ab-stack-tile:nth-child(n+10) { display: none !important; }
  .page-template-page-about-us #abStack .ab-stack-tile { height: 56px !important; padding: 10px !important; }
  .page-template-page-about-us section[data-screen-label="Tech stack"] p { font-size: 16px !important; }

  /* Testimonials: fits the screen; the long quote box shrinks to its text. */
  .page-template-page-about-us section[data-screen-label="Clients are saying"] .ab-2col > div:last-child > div:first-child { height: auto !important; min-height: 320px; padding: 28px 22px !important; }
  .page-template-page-about-us #abQuote { font-size: 19px !important; }
  .page-template-page-about-us #abDots { display: none !important; }
  .page-template-page-about-us #abDots + div { margin-left: auto; }
  .page-template-page-about-us section[data-screen-label="Clients are saying"] .ab-2col > div:first-child > div:last-child { flex-wrap: wrap; }
  .page-template-page-about-us .ab-ghost { min-height: 44px; }

  /* LinkedIn / Instagram: the embeds are 600px-tall frames. Keep the
     headings and the follow buttons; the feeds stay on desktop. */
  .page-template-page-about-us section[data-screen-label="LinkedIn"] .ab-marquee { display: none !important; }
  .page-template-page-about-us section[data-screen-label="LinkedIn"] .ab-2col { margin-bottom: 28px !important; }
  .page-template-page-about-us section[data-screen-label="LinkedIn"] > div > div:nth-child(2) { margin-bottom: 20px !important; }
  .page-template-page-about-us section[data-screen-label="LinkedIn"] > div > div > div[style*="margin-bottom:26px"] { margin-bottom: 0 !important; }

  /* Body copy floors at 16px. */
  .page-template-page-about-us section[data-screen-label] p[style*="font-size:15"],
  .page-template-page-about-us section[data-screen-label] div[style*="font-size:15"] { font-size: 16px !important; }

  /* ================================================================
     Our work  (.page-template-page-our-work)
     ================================================================ */
  .page-template-page-our-work .hero { padding: 44px 0 40px !important; }
  .page-template-page-our-work .hero-sub { font-size: 16px !important; }
  .page-template-page-our-work .hero-actions .btn-outline { display: none !important; }
  .page-template-page-our-work .allcs-section { padding: 44px 0 52px !important; }
  .page-template-page-our-work .allcs-section .sec-hd { margin-bottom: 20px !important; }
  .page-template-page-our-work .allcs-section .sec-hd p { font-size: 16px; }

  /* Service filter: one swipe row of chips. */
  .page-template-page-our-work .filters { margin-bottom: 20px !important; gap: 8px !important; }
  .page-template-page-our-work .fgroup {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 0 20px 4px;
    scroll-padding-left: 20px;
  }
  .page-template-page-our-work .fgroup::-webkit-scrollbar { display: none; }
  .page-template-page-our-work .fgroup .filter-label { display: none !important; }
  .page-template-page-our-work .fgroup .chip { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }

  /* Case study cards: compact rows (screen left, result right). */
  .page-template-page-our-work .cs-grid { gap: 12px !important; }
  .page-template-page-our-work #csgrid .cs-card { flex-direction: row !important; align-items: stretch; border-radius: 16px; }
  .page-template-page-our-work #csgrid .cs-top {
    flex: 0 0 38%;
    width: 38%;
    height: auto !important;
    min-height: 132px;
    border-bottom: 0 !important;
    border-right: 1px solid var(--hairline);
  }
  .page-template-page-our-work #csgrid .cs-device { width: 84% !important; margin-bottom: 4px; }
  .page-template-page-our-work #csgrid .cs-screen-label { display: none !important; }
  .page-template-page-our-work #csgrid .cs-body { padding: 14px 14px 14px 16px !important; gap: 6px !important; min-width: 0; }
  .page-template-page-our-work #csgrid .cs-industry { font-size: 12px; line-height: 1.35; }
  .page-template-page-our-work #csgrid .cs-result-number { font-size: 34px !important; line-height: 1 !important; }
  .page-template-page-our-work #csgrid .cs-result-label,
  .page-template-page-our-work #csgrid .cs-deliverable { font-size: 16px !important; line-height: 1.3 !important; }
  .page-template-page-our-work #csgrid .cs-link { padding-top: 0 !important; min-height: 44px; align-items: center; }
  .page-template-page-our-work #csgrid.is-clipped .cs-card:nth-child(n+7) { display: none !important; }
  .page-template-page-our-work #csgrid ~ .cs-more:not([hidden]) {
    display: flex;
    width: 100%;
    min-height: 52px;
    margin-top: 16px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(2, 88, 101, .25);
    border-radius: 999px;
    background: #fff;
    color: var(--elephant, #025865);
    font: 700 15px/1 var(--sans, 'DM Sans', sans-serif);
    cursor: pointer;
  }

  /* ================================================================
     Our services  (.sv-page)
     ================================================================ */
  .sv-page .sv-hero-copy { padding-top: 190px !important; padding-bottom: 44px !important; }
  .sv-page .sv-hero p { font-size: 17px !important; }
  .sv-page .sv-hero-link { min-height: 44px; display: inline-flex !important; align-items: center; }
  .sv-page .sv-section { padding: 52px 0 !important; }
  .sv-page .sv-finder { padding: 52px 0 !important; }
  .sv-page .sv-all-fold { gap: 0 !important; }
  .sv-page .sv-all-fold > div { border-bottom: 1px solid rgba(2, 88, 101, .16); }
  .sv-page .sv-all-fold h3 { padding: 0 !important; margin: 0 !important; border: 0 !important; font-size: 21px !important; }
  .sv-page .sv-fold-btn {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .sv-page .sv-fold-n {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    color: #686771;
  }
  .sv-page .sv-fold-n::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    transition: transform .2s;
  }
  .sv-page .sv-all-fold > div.is-open .sv-fold-n::after { transform: rotate(-135deg) translateY(-2px); }
  .sv-page .sv-all-fold > div:not(.is-open) > ul { display: none; }
  .sv-page .sv-all-fold ul { padding-bottom: 12px; }
  .sv-page .sv-all-fold a { min-height: 44px; display: flex !important; align-items: center; }

  /* ================================================================
     Guides and playbooks  (.page-template-page-guides-and-playbooks)
     ================================================================ */
  .page-template-page-guides-and-playbooks section[data-screen-label] { padding-top: 52px !important; padding-bottom: 52px !important; }
  .page-template-page-guides-and-playbooks section[data-screen-label="Hero"] { padding-top: 40px !important; padding-bottom: 44px !important; }
  .page-template-page-guides-and-playbooks section[data-screen-label="Why we give it away"] { padding: 0 !important; }
  .page-template-page-guides-and-playbooks .tl-hero { gap: 28px !important; }
  .page-template-page-guides-and-playbooks .tl-feat { padding: 0 !important; }
  .page-template-page-guides-and-playbooks .tl-feat3d { width: min(200px, 56%) !important; }
  .page-template-page-guides-and-playbooks #shelf .ab-2col { margin-bottom: 28px !important; gap: 16px !important; }

  /* The shelf: eleven tall covers become a list of compact rows. */
  .page-template-page-guides-and-playbooks .tl-shelf,
  .page-template-page-guides-and-playbooks .tl-wide-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
  .page-template-page-guides-and-playbooks .tl-wide-grid { margin-top: 12px !important; }
  .page-template-page-guides-and-playbooks .tl-book {
    flex-direction: row !important;
    align-items: center;
    gap: 16px !important;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(2, 88, 101, .12);
    border-radius: 16px;
    opacity: 1 !important;
    transform: none !important;
  }
  .page-template-page-guides-and-playbooks .tl-book .tl-card { flex: 0 0 92px; width: 92px; aspect-ratio: 1 / 1.41 !important; }
  .page-template-page-guides-and-playbooks .tl-wide-grid .tl-book .tl-card { aspect-ratio: 1 / 1.1 !important; }
  .page-template-page-guides-and-playbooks .tl-book .tl-card img { object-fit: cover; }
  .page-template-page-guides-and-playbooks .tl-book > div:last-child { gap: 6px !important; min-width: 0; }
  .page-template-page-guides-and-playbooks .tl-book > div:last-child > div { font-size: 19px !important; }
  .page-template-page-guides-and-playbooks .tl-book p { display: none !important; }

  /* Authors: swipe row of portraits. */
  .page-template-page-guides-and-playbooks section[data-screen-label="Talk to the team"] .ab-2col { margin-bottom: 28px !important; gap: 20px !important; }
  .page-template-page-guides-and-playbooks .tl-authors > * {
    flex: 0 0 44% !important;
    max-width: 44% !important;
    scroll-snap-align: start;
  }
  /* Studio photo beside "why we give it away" is decoration on a phone. */
  .page-template-page-guides-and-playbooks section[data-screen-label="Why we give it away"] .ab-2col { min-height: 0 !important; }
  .page-template-page-guides-and-playbooks section[data-screen-label="Why we give it away"] .ab-2col > div:first-child { display: none !important; }
  .page-template-page-guides-and-playbooks section[data-screen-label="Why we give it away"] .ab-2col > div:last-child { padding: 52px 20px !important; }
  .page-template-page-guides-and-playbooks section[data-screen-label="Let's talk about the number"] { padding: 60px 0 !important; }

  /* ================================================================
     Archive hubs: blog, insights, reviews, marketing guides, case studies
     (only these five templates use .featured-grid / .article-grid)
     ================================================================ */
  /* The featured post is also the first card in the list below it. */
  section:has(> .featured-grid) { display: none !important; }
  .article-grid { gap: 0 !important; }
  .article-grid article {
    display: grid !important;
    grid-template-columns: 136px minmax(0, 1fr);
    grid-template-areas: "img tag" "img title" "img meta";
    grid-template-rows: auto 1fr auto;
    column-gap: 16px;
    align-items: start;
    padding: 18px 0 !important;
    border-bottom: 1px solid var(--hairline, #dfe5e8);
  }
  .article-grid article:last-child { border-bottom: 0; }
  .article-grid article > .article-img {
    grid-area: img;
    /* 16:9 like the artwork, so the words set into it are not cropped (12 November 2026). */
    height: auto !important;
    aspect-ratio: 16 / 9;
    width: 136px;
    margin: 4px 0 0 !important;
    border-radius: 12px;
  }
  .article-grid article > .article-img img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center; }
  section:has(.article-grid) .section-inner > div:first-child h2 { line-height: 1.15 !important; font-size: 32px !important; }
  section:has(.article-grid) .section-inner { gap: 16px !important; }
  #filter-bar .filter-btn { min-height: 44px; }
  .article-grid article > .cat-tag { grid-area: tag; margin: 0 0 4px !important; gap: 6px !important; overflow: hidden; max-height: 22px; }
  .article-grid article > h3 { grid-area: title; font-size: 19px !important; line-height: 1.25 !important; margin: 0 0 6px !important; }
  .article-grid article > h3 a { display: block; }
  .article-grid article > p { display: none !important; }
  .article-grid article > .author-row { grid-area: meta; }
  .article-grid article > .author-row > div:first-child { display: none !important; }
  .article-grid article > .author-row .author-date { font-size: 12px; }
  .article-grid ~ div[style*="margin-top:50px"] { margin-top: 28px !important; padding: 16px !important; }
  .article-grid ~ div[style*="margin-top:50px"] a,
  .article-grid ~ div[style*="margin-top:50px"] span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  section:has(.article-grid) { padding-top: 28px !important; }

  /* ================================================================
     Contact  (.contact-template)
     ================================================================ */
  .contact-template .contact-left .sub,
  .contact-template .cform-wrap .sub { font-size: 16px; }
  .contact-template .offices-section { padding: 52px 0 !important; }
  .contact-template .offices-hd { margin-bottom: 20px !important; }
  .contact-template .office-card .office-map { height: 150px !important; }

  /* ================================================================
     Careers  (body.page-id-222 on local; scoped by its own classes)
     ================================================================ */
  body:has(.vacancy-list) .section { padding-top: 52px !important; padding-bottom: 52px !important; }
  body:has(.vacancy-list) .benefits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  body:has(.vacancy-list) .benefit { padding: 14px !important; }
  body:has(.vacancy-list) .split-img { display: none !important; }
  body:has(.vacancy-list) .split-row { gap: 0 !important; margin-bottom: 28px !important; }
  body:has(.vacancy-list) .vacancy { min-height: 44px; padding-top: 16px !important; padding-bottom: 16px !important; }

  /* ================================================================
     Thank you  (.page-template-thank-you)
     ================================================================ */
  .page-template-thank-you .section { padding-top: 48px !important; padding-bottom: 48px !important; }
  .page-template-thank-you .blogs-grid > * { flex-basis: 80% !important; max-width: 80% !important; }
  .page-template-thank-you .social-col p { font-size: 16px !important; }

  /* ================================================================
     Single case study  (.single-case-study / .case-study-template)
     ================================================================ */
  .single-case-study .section { padding-top: 52px !important; padding-bottom: 52px !important; }
  .single-case-study .band,
  .single-case-study .jtq-band { max-height: 180px; overflow: hidden; }
  .single-case-study .band img,
  .single-case-study .jtq-band img { height: 180px !important; object-fit: cover; }
  .single-case-study .stats-pill { grid-template-columns: 1fr 1fr !important; }
  .single-case-study .stats-pill .stat-cell { padding: 20px 14px !important; }
  .single-case-study .stats-pill .stat-num { font-size: 40px !important; }
  .single-case-study .stats-pill p { font-size: 14px !important; }

  /* Approach blocks: a shorter screenshot and a "Read more" button. */
  .single-case-study .article { gap: 18px !important; padding: 24px 0 !important; }
  .single-case-study .article .image img { max-height: 220px; width: 100%; object-fit: cover; object-position: top; }
  .single-case-study .article .copy.cs-folded:not(.is-open) > p ~ *:not(.cs-fold-btn) { display: none; }
  /* The screenshot comes back with the rest of the story. */
  .single-case-study .article:has(> .copy.cs-folded:not(.is-open)) > .image { display: none; }
  .single-case-study .cs-fold-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 6px;
    padding: 0 20px;
    border: 1.5px solid rgba(2, 88, 101, .25);
    border-radius: 999px;
    background: transparent;
    color: #025865;
    font: 600 15px/1 'DM Sans', system-ui, sans-serif;
    cursor: pointer;
  }

  /* Swipe cards: even heights, tighter padding. */
  .single-case-study .the-challenge .cards-3 > *,
  .single-case-study .results-grid > * { padding: 24px 20px !important; }
  .single-case-study .results-grid { border: 0 !important; background: none !important; }
  .single-case-study .results-grid > .result-cell { border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14); }
  .single-case-study .jtq-shots > figure .jtq-frame img { max-height: 260px; object-fit: cover; object-position: top; }
  .single-case-study .problem-card p,
  .single-case-study .result-cell p { font-size: 16px !important; }
  .single-case-study .jtq-grid > *,
  .single-case-study .jtq-told > * { padding: 20px !important; }

  /* The illustration beside the FAQs is decoration. */
  .single-case-study .faq-right { display: none !important; }
}

/* ==================================================================
   Legal pages (all share .legal .legal-grid / .prose / .side)
   ================================================================== */
@media (max-width: 767px) {
  .legal { padding: 36px 0 52px !important; }
  .legal .legal-grid { gap: 20px !important; grid-template-columns: minmax(0, 1fr) !important; }
  .legal .legal-grid > * { min-width: 0; }
  body:has(.legal-grid) .hero-sub,
  body:has(.legal-grid) .hero p { font-size: 16px !important; }

  /* "Legal & policies" list becomes one swipe row of pills. */
  .legal .side-inner { position: static !important; flex-direction: row !important; overflow-x: auto; scrollbar-width: none; gap: 8px !important; margin: 0 -20px; padding: 0 20px 4px; }
  .legal .side-inner::-webkit-scrollbar { display: none; }
  .legal .side-label { display: none !important; }
  .legal .side a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(2, 88, 101, .14) !important;
    white-space: nowrap;
    font-size: 15px !important;
  }
  .legal .side a.active::after { display: none; }
  /* The same links repeat as pills at the foot of the page. */
  .legal .legal-grid:has(.side) .related { display: none !important; }
  .legal .related-links a { min-height: 44px; }

  /* "On this page" contents, built by assets/js/legal-mobile-toc.js. */
  .legal .f-toc {
    display: block;
    border: 1px solid rgba(2, 88, 101, .16);
    border-radius: 16px;
    background: #f4faf9;
  }
  .legal .f-toc > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 700;
    color: #025865;
    cursor: pointer;
    list-style: none;
  }
  .legal .f-toc > summary::-webkit-details-marker { display: none; }
  .legal .f-toc .f-toc-count { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: #686771; }
  .legal .f-toc .f-toc-count::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
  }
  .legal .f-toc[open] .f-toc-count::after { transform: rotate(-135deg) translateY(-2px); }
  .legal .f-toc ol { margin: 0; padding: 0 18px 10px; list-style: none; border-top: 1px solid rgba(2, 88, 101, .1); }
  .legal .f-toc li { margin: 0; padding: 0; border-bottom: 1px solid rgba(2, 88, 101, .08); }
  .legal .f-toc li:last-child { border-bottom: 0; }
  .legal .f-toc li::before { display: none !important; }
  .legal .f-toc a { display: flex; align-items: center; min-height: 44px; padding: 8px 0; font-size: 16px; line-height: 1.35; color: #025865; text-decoration: none; }
  .legal .f-toc-target { scroll-margin-top: 90px; }

  /* Readable text. */
  .legal .prose p,
  .legal .prose li { font-size: 16px !important; line-height: 1.75 !important; }
  .legal .prose a { overflow-wrap: anywhere; }
  .legal .prose .f-empty { display: none; }
  .legal .ptable { font-size: 16px !important; }
  .legal .ptable th,
  .legal .ptable td { padding: 10px 10px !important; }
  .legal .cookie-settings { min-height: 44px; }
}
