/* Desktop renders at the equivalent of 125% browser zoom: content is scaled up
   and the column narrows to match, so nothing overflows horizontally. */
@media (min-width: 1100px) {
  body > div[style*="max-width:1280px"] {
    zoom: 1.25;
    width: 80%;
  }
}

/* Tablet band: the header link row has to tighten before it wraps. */
@media (max-width: 1180px) and (min-width: 861px) {
  [style*="display:flex"][style*="align-items:center"][style*="gap:24px"] {
    gap: 13px !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }
  a[style*="font-size:14px"][style*="color:#0E0E0E"] { font-size: 13px !important; }
  a[style*="padding:12px 20px"] {
    padding: 10px 14px !important;
    font-size: 12px !important;
    letter-spacing: 0.06em !important;
  }
  img[style*="height:62px"] { height: 52px !important; }
}

/* Phone and small-tablet layout. Desktop layout is untouched above 860px. */
@media (max-width: 860px) {

  /* Multi-column grids become one column */
  [style*="grid-template-columns:minmax(0,1fr) minmax"],
  [style*="grid-template-columns:minmax(0,1.1fr)"],
  [style*="grid-template-columns:minmax(0,1.15fr)"],
  [style*="grid-template-columns:minmax(0,1.2fr)"],
  [style*="grid-template-columns:minmax(0,1.25fr)"],
  [style*="grid-template-columns:minmax(0,1.35fr)"],
  [style*="grid-template-columns:minmax(0,1.4fr)"],
  [style*="grid-template-columns:minmax(0,220px)"],
  [style*="grid-template-columns:minmax(0,260px)"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* Tighter gutters */
  [style*="padding:10px 56px"],
  [style*="padding:20px 56px"],
  [style*="padding:28px 56px"],
  [style*="padding:0 56px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  [style*="padding:56px 56px 34px"],
  [style*="padding:64px 56px"],
  [style*="padding:72px 56px"],
  [style*="padding:76px 56px"],
  [style*="padding:80px 56px"] {
    padding: 44px 20px !important;
  }
  [style*="padding:76px 56px 0"] {
    padding: 44px 20px 0 !important;
  }
  [style*="padding:30px 26px"],
  [style*="padding:30px 28px"],
  [style*="padding:32px 28px"],
  [style*="padding:44px 40px"] {
    padding: 26px 20px !important;
  }

  /* Column gaps close up when stacked */
  [style*="gap:64px"] { gap: 30px !important; }
  [style*="gap:56px"] { gap: 28px !important; }
  [style*="gap:44px"] { gap: 26px !important; }

  /* Header links read as a deliberate block once stacked */
  [style*="display:flex"][style*="align-items:center"][style*="gap:24px"] {
    gap: 10px 14px !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }
  a[style*="padding:12px 20px"] { padding: 11px 16px !important; }

  /* Rows of links, buttons and contact details wrap */
  [style*="display:flex"][style*="gap:32px"],
  [style*="display:flex"][style*="gap:28px"],
  [style*="display:flex"][style*="gap:24px"],
  [style*="display:flex"][style*="gap:14px"] {
    flex-wrap: wrap !important;
  }

  /* Display type steps down */
  [style*="font-size:62px"],
  [style*="font-size:60px"],
  [style*="font-size:58px"],
  [style*="font-size:56px"] { font-size: 34px !important; }
  [style*="font-size:50px"],
  [style*="font-size:42px"],
  [style*="font-size:40px"] { font-size: 28px !important; }
  [style*="font-size:38px"],
  [style*="font-size:36px"],
  [style*="font-size:34px"] { font-size: 26px !important; }
  [style*="font-size:32px"],
  [style*="font-size:31px"],
  [style*="font-size:30px"],
  [style*="font-size:27px"] { font-size: 23px !important; }
  [style*="font-size:25px"],
  [style*="font-size:24px"],
  [style*="font-size:23px"] { font-size: 21px !important; }
  [style*="font-size:22px"],
  [style*="font-size:21px"],
  [style*="font-size:20px"],
  [style*="font-size:19px"] { font-size: 18px !important; }

  /* Tall photo panels and cards shrink rather than stretch */
  [style*="min-height:640px"],
  [style*="min-height:620px"],
  [style*="min-height:560px"],
  [style*="min-height:520px"],
  [style*="min-height:460px"],
  [style*="min-height:440px"],
  [style*="min-height:420px"] { min-height: 260px !important; }
  [style*="min-height:250px"],
  [style*="min-height:230px"],
  [style*="min-height:220px"],
  [style*="min-height:190px"],
  [style*="min-height:180px"],
  [style*="min-height:172px"] { min-height: 0 !important; }

  /* Heroes get shorter so the headline sits above the fold */
  [style*="height:480px"],
  [style*="height:460px"],
  [style*="height:440px"] { height: 400px !important; }

  /* Wide bands stop being letterbox slivers */
  [style*="aspect-ratio:21/9"] { aspect-ratio: 16 / 10 !important; }

  /* Comfortable tap targets on the buttons */
  [style*="padding:21px 38px"] { padding: 18px 26px !important; }
}

@media (max-width: 520px) {
  [style*="padding:64px 56px"],
  [style*="padding:72px 56px"],
  [style*="padding:76px 56px"],
  [style*="padding:80px 56px"] { padding: 36px 16px !important; }
  [style*="padding:10px 56px"],
  [style*="padding:20px 56px"],
  [style*="padding:0 56px"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  [style*="font-size:62px"],
  [style*="font-size:58px"],
  [style*="font-size:56px"] { font-size: 29px !important; }
  img[style*="height:62px"] { height: 46px !important; }
}
