/* Approved refinement batch: keep the content intact while improving scanability
   and spacing across phone, tablet, and desktop. */

/* Phone navigation: language first, then the menu trigger on its right. */
@media (max-width: 767px) {
  .site-header .language-toggle { order: 3; margin-left: auto; }
  .site-header .menu-button { order: 4; }
}

/* The social directory is read as three groups, not as a lined spreadsheet. */
.social-follow { padding-inline: max(24px, calc((100vw - 1440px) / 2)); }
.social-account-directory { width: min(100%, 1360px); }
.social-account-links { gap: 8px; }
.social-account-links a,
.social-account-links a:last-child {
  min-height: 50px;
  padding-block: 9px;
  border: 0;
}

/* Desktop consultation copy fits on one clear line; smaller screens may wrap. */
@media (min-width: 701px) {
  .story-cinematic .st-close p:last-of-type {
    max-width: none;
    white-space: nowrap;
  }
}

/* Make the Little My branch selector easy to scan at a glance. */
.myguru-pet-hint {
  /* Sit at 小 My's upper-left, like a real speech bubble rather than a footer label. */
  right: 118px;
  bottom: 130px;
  display: grid;
  gap: 4px;
  min-width: 244px;
  padding: 14px 17px 14px 19px;
  border: 1px solid #dce3f4;
  border-radius: 16px;
  background: #fff;
  color: #062b9a;
  box-shadow: 0 10px 24px rgba(7, 23, 66, .16);
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
}
.myguru-pet-hint small {
  color: #062b9a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.myguru-pet-hint strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 24px;
  font-weight: 950;
  white-space: nowrap;
}
.myguru-pet-hint b { font-size: 24px; line-height: .8; }
.myguru-pet-hint::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: -10px;
  width: 16px;
  height: 16px;
  border-right: 1px solid #dce3f4;
  border-bottom: 1px solid #dce3f4;
  background: #fff;
  transform: rotate(45deg);
}
@media (max-width: 1100px) { .myguru-pet-hint { display: none; } }
/* Keep the Little My consultation entry available on phones too.  It is
   deliberately compact and stays clear of the primary hero buttons. */
@media (max-width: 600px) {
  .myguru-pet {
    position: fixed;
    right: 10px;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: auto;
    z-index: 90;
    display: block;
    width: 88px;
    height: 96px;
  }
  .myguru-pet-button { width: 88px; height: 96px; }
  /* On phones the assistant stays compact, but it must still clearly say
     what it does.  Keep the greeting beside the 88px character instead of
     using the large desktop speech card. */
  .myguru-pet-hint {
    /* Sit beside the character so the pointer can clearly address 小 My. */
    right: 96px;
    bottom: 44px;
    display: block !important;
    width: max-content;
    min-width: 0;
    max-width: min(178px, calc(100vw - 124px));
    padding: 8px 11px;
    border: 2px solid #062b9a;
    border-radius: 999px;
    background: #fff;
    color: #062b9a;
    box-shadow: 0 10px 22px rgba(7, 23, 66, .22);
    text-align: center;
  }
  .myguru-pet-hint small { display: none; }
  .myguru-pet-hint strong {
    display: flex;
    gap: 6px;
    justify-content: center;
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
  }
  .myguru-pet-hint::after {
    /* A horizontal triangular speech tail that points directly at 小 My. */
    content: '';
    position: absolute;
    right: -10px;
    bottom: 8px;
    width: 0;
    height: 0;
    border: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #062b9a;
    background: transparent;
    clip-path: none;
    transform: none;
  }
  .myguru-pet-bubble {
    right: 0;
    bottom: 92px;
    width: min(344px, calc(100vw - 20px));
  }
  .myguru-pet-branches a { min-height: 72px; padding: 10px; }
}

.myguru-pet-branches a {
  min-height: 88px;
  padding: 13px 14px;
}
.myguru-pet-branches b {
  color: #062b9a;
  font-size: 15px;
  line-height: 1.25;
}
.myguru-pet-bubble .myguru-pet-branches span {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 30px;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #ffd21c;
  color: #071742 !important;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: .01em;
}
.myguru-pet-branches a:hover b,
.myguru-pet-branches a:focus-visible b { color: #fff; }
.myguru-pet-bubble .myguru-pet-branches a:hover span,
.myguru-pet-bubble .myguru-pet-branches a:focus-visible span {
  background: #ffd21c;
  color: #071742 !important;
}

@media (max-width: 600px) {
  .myguru-pet .myguru-pet-branches a { min-height: 72px; padding: 10px; }
}

/* A compact, border-free shared footer. */
footer.site-bottom-bar {
  min-height: 0;
  padding-top: 24px;
  padding-bottom: 24px;
}
footer.site-bottom-bar .bottom-brand,
footer.site-bottom-bar > p { transform: none; }
footer.site-bottom-bar .bottom-brand img {
  padding: 0;
  background: transparent;
}

/* Let the footer fill its width with a clear brand lockup, rather than
   concentrating all of the information toward its centre. */
@media (min-width: 821px) {
  footer.site-bottom-bar {
    grid-template-columns: minmax(430px, 1.2fr) minmax(480px, 1.5fr) minmax(230px, .7fr);
    gap: clamp(36px, 4vw, 76px);
    padding: 30px clamp(36px, 4.8vw, 96px);
  }
  footer.site-bottom-bar .bottom-brand { gap: 24px; }
  footer.site-bottom-bar .bottom-brand img { width: 94px; }
  footer.site-bottom-bar .bottom-brand strong { font-size: clamp(24px, 1.6vw, 30px); }
  footer.site-bottom-bar .bottom-brand span { font-size: clamp(16px, 1.05vw, 19px); }
  footer.site-bottom-bar > p { font-size: clamp(24px, 1.85vw, 34px); }
  footer.site-bottom-bar small { font-size: clamp(16px, 1.08vw, 19px); }
}
@media (max-width: 600px) {
  footer.site-bottom-bar { padding: 22px 20px 34px; }
}

/* Mobile award labels need a full line in English: two narrow columns clip
   the longer programme-quality wording. */
.awards .awards-summary span { display: block; }
@media (max-width: 680px) {
  html.is-english .awards .award-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px;
  }
  html.is-english .awards .award-values span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 8px 9px;
    font-size: clamp(12px, 3.7vw, 15px);
    line-height: 1.18;
    letter-spacing: -.025em;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Desktop footer and consultation copy remain complete, without orphan words. */
@media (min-width: 701px) {
  footer.site-bottom-bar > p {
    font-size: clamp(24px, 2vw, 38px);
    letter-spacing: -.035em;
    white-space: nowrap;
  }
  .teachers-consult > div > p:last-of-type {
    max-width: none;
    white-space: nowrap;
  }
}

/* On compact laptops, retain the same one-line footer promise without
   crowding the brand lockup or copyright. */
@media (min-width: 701px) and (max-width: 1200px) {
  footer.site-bottom-bar > p { font-size: clamp(21px, 2.2vw, 27px); }
}

/* Picture sources keep the image itself contained while each breakpoint owns
   its own banner proportion. */
.hero-slide picture,
.d-hero-slide picture { display: block; width: 100%; height: 100%; }
.hero-slide picture img,
.d-hero-slide picture img { display: block; width: 100%; height: 100%; }
@media (max-width: 767px) {
  #mobile-home .hero-carousel { height: auto !important; background: #fff; }
  #mobile-home .hero-carousel .hero-slide picture { position: absolute; inset: 0; display: block; }
  #mobile-home .hero-carousel .hero-slide-building > img:first-child,
  #mobile-home .hero-carousel .hero-slide-poster > picture img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
  }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .d-hero-carousel { aspect-ratio: 16 / 10; }
}

/* Desktop keeps the two trust statements intentional: one complete sentence
   per line, without changing phone or iPad copy. */
@media (min-width: 1101px) {
  #desktop-home .d-proof .d-copy-rail > p:not(.d-eyebrow):not(.d-proof-summary) {
    max-width: none;
  }
  #desktop-home .d-proof .d-copy-rail > p:not(.d-eyebrow):not(.d-proof-summary) span {
    display: block;
    white-space: nowrap;
  }
  .teachers-consult h2 {
    font-size: clamp(48px, 4.3vw, 72px);
    white-space: nowrap;
  }
  .teachers-consult h2 br { display: none; }
}
