/* Loaded only by Contact; shared homepage chrome remains authoritative. */
:root { --cream: #FFFFFF; --warm-white: #FFFFFF; --sand: #FFFFFF; --ink: #000000; --muted: rgba(0,0,0,.55); }
* { box-sizing: border-box; margin: 0; padding: 0; }
body.contact-site a { color: inherit; text-decoration: none; }
body.contact-site img { display: block; max-width: 100%; }
body.contact-site main.contact-page > section { padding-block: 16px; background-color: #FFFFFF; }
body.contact-site main.contact-page > .contact-intro { padding-top: 32px; }
body.contact-site main.contact-page > section:last-child { padding-bottom: 32px; }
body.contact-site main.contact-page > #location { scroll-margin-top: clamp(104px, 18vh, 180px); }
body.contact-site .contact-page h1 { font-size: clamp(32px, 3.4vw, 44px); font-weight: 500; line-height: 1.14; letter-spacing: -.035em; margin-bottom: 16px; }
body.contact-site .contact-page h2 { margin-bottom: 12px; font-size: 28px; }
body.contact-site .contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
body.contact-site :is(.contact-card, .contact-schedule-card) { min-width: 0; padding: 24px; border: 1px solid #E8E8E8; border-radius: 10px; background: #FFFFFF; box-shadow: 0 6px 20px rgba(0,0,0,.11); }
body.contact-site .contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
body.contact-site .contact-card-heading { display: flex; align-items: center; gap: 12px; }
body.contact-site .contact-card h2 { margin: 0; font-size: 24px; }
body.contact-site .contact-icon { display: block; width: 24px; height: 24px; flex: 0 0 24px; color: var(--theme-icon, #087F91); }
body.contact-site .contact-card p { overflow-wrap: anywhere; }
body.contact-site .contact-card .cta-primary { margin-top: auto; }
body.contact-site .contact-page a.cta-primary { background-color: #087F91; border-color: #087F91; color: #F7F5F0; }
body.contact-site .contact-page a.cta-primary:hover { background-color: #087485; border-color: #087485; }
body.contact-site .contact-qr-feature { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 24px; border: 1px solid #E8E8E8; border-radius: 10px; background: #F3F6F6; box-shadow: 0 6px 20px rgba(0,0,0,.11); }
body.contact-site .contact-qr-frame { padding: 12px; background: #FFFFFF; border-radius: 6px; }
body.contact-site .contact-qr { width: 200px; height: auto; background: #FFFFFF; object-fit: contain; }
body.contact-site .contact-schedule-card { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 16px; }
body.contact-site .contact-schedule-card .section-label { margin-bottom: 8px; }
body.contact-site .contact-schedule-card h2 { margin-bottom: 12px; font-size: 22px; }
body.contact-site .contact-page .contact-hours { margin-bottom: 8px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; line-height: 1.3; color: inherit; }
body.contact-site .contact-schedule-card p:last-child { max-width: 80ch; }
body.contact-site .contact-map { display: block; width: 100%; height: 350px; border: 0; border-radius: 10px; margin-block: 16px; }
html[data-theme="dark"] body.contact-site :is(.contact-card, .contact-schedule-card, .contact-qr-feature) { background-color: var(--theme-surface); border-color: var(--theme-line); color: var(--theme-text); }
@media (max-width: 650px) {
  body.contact-site .contact-cards { grid-template-columns: minmax(0, 1fr); }
  body.contact-site :is(.contact-card, .contact-schedule-card, .contact-qr-feature) { padding: 20px; }
  body.contact-site .contact-qr-feature { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  body.contact-site .contact-qr-frame { justify-self: center; }
  body.contact-site .contact-map { height: 300px; }
}

/* The card QR is a mobile placement of the existing desktop QR asset. */
body.contact-site .contact-card-qr { display: none; }

@media (max-width: 480px) {
  body.contact-site main.contact-page .contact-card-qr {
    display: block;
    align-self: center;
    margin-inline: auto;
  }
  body.contact-site main.contact-page > section[aria-labelledby="contact-qr-title"] { display: none; }
  body.contact-site main.contact-page .contact-card a.cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    min-height: 42px;
    height: 42px;
    padding: 0 22px;
    margin-inline: auto;
    white-space: nowrap;
    background-color: #087F91 !important;
    border-color: #087F91 !important;
  }
  body.contact-site main.contact-page .contact-card a.cta-primary:hover {
    background-color: #087485 !important;
    border-color: #087485 !important;
  }
}

/* EN Contact: centered editorial main content on phones only. */
@media (max-width: 480px) {
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page { text-align: center; }
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page :is(h1, h2, p) { text-align: center; margin-inline: auto; }
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page .contact-card { align-items: center; }
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page .contact-card-heading { justify-content: center; }
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page .contact-schedule-card { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page :is(.contact-qr-frame, .cta-primary) { margin-inline: auto; }
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page .contact-location > .contact-map + a.cta-primary { display: none; }
  html:is([lang="en"], [data-en-mobile]) body.contact-site main.contact-page .contact-map { margin-bottom: 0; }
}

/* Match the Homepage UK toggle framing at this exact viewport. */
@media (width: 1200px) and (height: 900px) {
  @layer bjm-chrome-priority {
    html[lang="en"] body.contact-site > header .language-toggle > img.language-flag[src$="language-flag-gb.svg"] {
      object-fit: cover !important;
    }
  }
}