/* Mobile layer for the exported site. Desktop is untouched. */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  #dc-root { overflow-x: hidden; }

  /* Boards use fixed heights for the 1440px canvas: let content decide on phones */
  #dc-root [style*="height:"]:not(img):not(video):not(span):not(button),
  #dc-root [style*="height: "]:not(img):not(video):not(span):not(button) { height: auto !important; }
  #dc-root section, #top { height: auto !important; }

  /* Side gutters */
  #dc-root [style*="padding:"][style*="40px"], #dc-root [style*="padding: "][style*="40px"] {
    padding-left: 20px !important; padding-right: 20px !important;
  }

  /* Multi-column grids collapse to one column */
  #dc-root [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  #dc-root .lab2 { display: flex !important; }

  /* Type scale */
  #dc-root h1 { font-size: clamp(34px, 10vw, 52px) !important; white-space: normal !important; line-height: 1 !important; }
  #dc-root h2 { font-size: clamp(28px, 8vw, 40px) !important; white-space: normal !important; }
  #dc-root h3 { font-size: clamp(22px, 6.5vw, 30px) !important; }
  #dc-root p { font-size: 16px !important; max-width: none !important; }
  #dc-root .m { font-size: 11px !important; }

  /* Media never overflows */
  #dc-root img, #dc-root video { max-width: 100% !important; }
  #dc-root [style*="width:"][style*="px"]:not(img):not(video):not(span):not(button):not(a) { max-width: 100% !important; }

  /* Flex rows wrap */
  #dc-root [style*="display:flex"], #dc-root [style*="display: flex"] { flex-wrap: wrap; }
  #dc-root .sxl-car { flex-wrap: nowrap !important; }

  /* Header + menu */
  header { position: relative; flex-wrap: nowrap !important; }
  header .nav-m { position: relative; }
  header .nav-m > nav {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
    background: #F1F1F1; color: #1D1D1D; border: 1px solid #1D1D1D;
    min-width: 200px; padding: 16px 20px !important; gap: 14px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
  }
  .signpost { display: none !important; }
}
@media (max-width: 760px) {
  #dc-root .lab2 h2 { font-size: 22px !important; overflow-wrap: anywhere; }
  #dc-root .lab2 .m { font-size: 10px !important; }
}
@media (max-width: 760px) {
  #dc-root .badge { display: none !important; }
  #dc-root a[href^="mailto"][style*="font-size"] { font-size: 26px !important; overflow-wrap: anywhere; }
}
@media (max-width: 760px) {
  /* AI Lab collage: stage on top, the other visuals as equal small tiles */
  #dc-root .collage { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 16px 12px !important; margin-top: 24px !important; }
  #dc-root .collage .col-side { display: contents !important; }
  #dc-root .collage .col-stage { grid-column: 1 / -1; order: -1; }
  #dc-root .collage .col-side > a { width: 100% !important; align-self: stretch !important; gap: 6px !important; }
  #dc-root .collage .col-side > a > div:first-child { aspect-ratio: 1 / 1 !important; }
  #dc-root .collage .col-side .m { font-size: 9px !important; }
  /* Less empty space at the top of AI Lab sections */
  #dc-root #lab > div:not(.lab2) { padding-top: 24px !important; padding-bottom: 48px !important; gap: 24px !important; }
}
@media (max-width: 760px) {
  #dc-root .collage .col-stage { align-self: start !important; }
  #dc-root .collage .col-stage > a { flex: none !important; width: 100% !important; aspect-ratio: 16 / 9 !important; height: auto !important; }
}
@media (max-width: 760px) {
  /* Project pages: hide the Company / My role / Tags details table on mobile */
  #dc-root section:has([style*="minmax(140px,1fr) minmax(0,3fr)"]) { display: none !important; }
}
@media (max-width: 760px) {
  /* Chapters list: one compact line per chapter */
  #dc-root a[style*="64px minmax(0,1fr) 24px"] { grid-template-columns: 44px minmax(0,1fr) 16px !important; gap: 10px !important; padding: 10px 0 !important; }
  #dc-root a[style*="64px minmax(0,1fr) 24px"] > span:nth-child(2) { font-size: 16px !important; line-height: 1.25; }
  #dc-root a[style*="64px minmax(0,1fr) 24px"] .m { font-size: 11px !important; }
  #dc-root section:has(> div > a[style*="64px minmax(0,1fr) 24px"]) { padding-top: 32px !important; }
}
@media (max-width: 760px) {
  /* Project pages: hide the Background / The moment / My job trio on mobile */
  #dc-root div[style*="grid"]:has(> div[style*="border-top:1px solid #4A4A4A;padding-top:20px"] > div.m:first-child + p) { display: none !important; }
}
@media (max-width: 760px) {
  /* Arrow lists: keep the arrow beside its line */
  #dc-root li[style*="grid-template-columns"] { grid-template-columns: 18px minmax(0,1fr) !important; gap: 6px !important; }
  #dc-root li[style*="grid-template-columns"] > * { font-size: inherit; }
  #dc-root ul:has(> li[style*="grid-template-columns"]) { gap: 8px !important; }
  #dc-root li[style*="grid-template-columns"] { font-size: 15px !important; line-height: 1.4 !important; }
  #dc-root li[style*="grid-template-columns"] > .m { font-size: 11px !important; padding-top: 3px; }
}
@media (max-width: 760px) {
  /* Footer: consistent headline size, less black space above */
  #dc-root footer h2 span { font-size: inherit !important; letter-spacing: inherit !important; }
  #dc-root footer > div { padding-top: 32px !important; }
  #dc-root section[style*="background:#000"] > div[style*="padding:96px 40px"] { padding-top: 56px !important; padding-bottom: 8px !important; }
}
@media (max-width: 760px) {
  /* Padding after intro copy when the details table is hidden */
  #dc-root section:has(+ section [style*="minmax(140px,1fr) minmax(0,3fr)"]) { padding-bottom: 48px !important; }
  /* Stat rows: three compact columns */
  #dc-root div[style*="minmax(220px,1fr)"]:has(> div[style*="border-top:1px solid #4A4A4A"]):has(> div:nth-child(3)) { grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 12px !important; margin-top: 8px !important; }
  #dc-root div[style*="minmax(220px,1fr)"]:has(> div:nth-child(3)) > div[style*="border-top:1px solid #4A4A4A"] { padding-top: 12px !important; }
  #dc-root div[style*="minmax(220px,1fr)"]:has(> div:nth-child(3)) > div[style*="border-top:1px solid #4A4A4A"] > div:first-child { font-size: 22px !important; letter-spacing: -.02em !important; }
  #dc-root div[style*="minmax(220px,1fr)"]:has(> div:nth-child(3)) > div[style*="border-top:1px solid #4A4A4A"] > .m { font-size: 9px !important; margin-top: 6px !important; }
  #dc-root section[style*="background:#000"] > div[style*="padding:24px 40px 72px"] { padding-bottom: 32px !important; }
}
@media (max-width: 760px) {
  /* Project pages: hide the 4-up capability blurbs under videos */
  #dc-root div[style*="display:grid"]:has(> div[style*="border-top:1px solid #4A4A4A;padding-top:18px;display:flex;flex-direction:column;gap:12px"]) { display: none !important; }
}
@media (max-width: 760px) {
  /* One headline scale on mobile: 3 to 4 lines */
  #dc-root h1 { font-size: clamp(28px, 7.4vw, 42px) !important; line-height: .98 !important; }
  #dc-root h2 { font-size: clamp(26px, 6.8vw, 38px) !important; }
}
@media (max-width: 760px) {
  /* One tag size on mobile: pills, square tags and filter buttons all match */
  #dc-root .pill:not(header *), #dc-root .sq:not(header *), #dc-root button.pill:not(header *) {
    font-size: 10px !important; letter-spacing: .05em !important; line-height: 1 !important;
    min-height: 28px !important; height: auto !important; padding: 0 11px !important; box-sizing: border-box;
  }
}
@media (max-width: 760px) {
  /* All stat rows: compact, 3 per row */
  #dc-root div[style*="display:grid"]:has(> div:nth-child(3)):has(> div[style*="border-top:1px solid"][style*="padding-top:20px"] > div[style*="font-size:clamp(4"]:first-child + div.m) { grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 14px 12px !important; margin-top: 24px !important; }
  #dc-root div[style*="border-top:1px solid"][style*="padding-top:20px"]:has(> div[style*="font-size:clamp(4"]:first-child + div.m) { padding-top: 10px !important; }
  #dc-root div[style*="border-top:1px solid"][style*="padding-top:20px"] > div[style*="font-size:clamp(4"]:first-child { font-size: 22px !important; letter-spacing: -.02em !important; }
  #dc-root div[style*="border-top:1px solid"][style*="padding-top:20px"] > div[style*="font-size:clamp(4"]:first-child + div.m { font-size: 9px !important; margin-top: 6px !important; }
  /* Project pages: hide the "Brand to business / What it proves" lists */
  #dc-root div[style*="display:grid"]:has(> div > div.m[style^="padding-bottom:16px;border-bottom:1px solid #1D1D1D"] + div.m[style*="padding:14px 0"]) { display: none !important; }
}
@media (max-width: 760px) {
  /* Even vertical rhythm on mobile: big desktop section paddings become 44px */
  #dc-root [style*="padding: 104px 40px 0;"],
  #dc-root [style*="padding: 120px 40px 0;"],
  #dc-root [style*="padding: 64px 40px 0;"],
  #dc-root [style*="padding: 74px 40px 0;"],
  #dc-root [style*="padding:104px 40px;"],
  #dc-root [style*="padding:104px 40px 0;"],
  #dc-root [style*="padding:104px 40px 120px;"],
  #dc-root [style*="padding:104px 40px 56px;"],
  #dc-root [style*="padding:104px 40px 96px;"],
  #dc-root [style*="padding:120px 40px 0;"],
  #dc-root [style*="padding:120px 40px 120px;"],
  #dc-root [style*="padding:140px 40px 0;"],
  #dc-root [style*="padding:64px 40px;"],
  #dc-root [style*="padding:64px 40px 0;"],
  #dc-root [style*="padding:64px 40px 120px;"],
  #dc-root [style*="padding:64px 40px 72px;"],
  #dc-root [style*="padding:64px 40px 96px;"],
  #dc-root [style*="padding:72px 40px;"],
  #dc-root [style*="padding:80px 40px;"],
  #dc-root [style*="padding:88px 40px 0;"],
  #dc-root [style*="padding:88px 40px 104px;"],
  #dc-root [style*="padding:96px 40px;"],
  #dc-root [style*="padding:96px 40px 0;"],
  #dc-root [style*="padding:96px 40px 40px;"] { padding-top: 44px !important; }
  #dc-root [style*="padding:104px 40px;"],
  #dc-root [style*="padding:104px 40px 120px;"],
  #dc-root [style*="padding:104px 40px 56px;"],
  #dc-root [style*="padding:104px 40px 96px;"],
  #dc-root [style*="padding:120px 40px 120px;"],
  #dc-root [style*="padding:24px 40px 120px;"],
  #dc-root [style*="padding:24px 40px 72px;"],
  #dc-root [style*="padding:56px 40px;"],
  #dc-root [style*="padding:56px 40px 64px;"],
  #dc-root [style*="padding:64px 40px;"],
  #dc-root [style*="padding:64px 40px 120px;"],
  #dc-root [style*="padding:64px 40px 72px;"],
  #dc-root [style*="padding:64px 40px 96px;"],
  #dc-root [style*="padding:72px 40px;"],
  #dc-root [style*="padding:80px 40px;"],
  #dc-root [style*="padding:88px 40px 104px;"],
  #dc-root [style*="padding:96px 40px;"] { padding-bottom: 44px !important; }
  /* Adyen: hide the strategic shift ovals */
  #dc-root div.m[style*="margin-top:104px;text-align:center"], #dc-root div.m[style*="margin-top:104px;text-align:center"] + div { display: none !important; }
}
@media (max-width: 760px) {
  /* A Results section left with only its headline (its lists are hidden) goes too */
  #dc-root section:has(> div.m:first-child + h2 + div[style*="gap:40px 48px;margin-top:64px"]:last-child) { display: none !important; }
}
@media (max-width: 760px) {
  #dc-root section:empty, #dc-root section[style*="padding:0 40px 120px"]:not(:has(*)) { display: none !important; }
  #dc-root a > div[style*="padding:72px 40px"] { padding-top: 44px !important; padding-bottom: 44px !important; }
}
@media (max-width: 760px) {
  /* Even spacing: big desktop gaps between blocks become 32px */
  #dc-root [style*="margin-top:56px"],#dc-root [style*="margin-top: 56px"],
  #dc-root [style*="margin-top:64px"],#dc-root [style*="margin-top: 64px"],
  #dc-root [style*="margin-top:72px"],#dc-root [style*="margin-top: 72px"],
  #dc-root [style*="margin-top:88px"],#dc-root [style*="margin-top: 88px"],
  #dc-root [style*="margin-top:96px"],#dc-root [style*="margin-top: 96px"],
  #dc-root [style*="margin-top:104px"],#dc-root [style*="margin-top: 104px"],
  #dc-root [style*="margin-top:180px"],#dc-root [style*="margin-top: 180px"] { margin-top: 32px !important; }
  /* Stat rows with two numbers too */
  #dc-root div[style*="display:grid"]:has(> div:nth-child(2)):has(> div[style*="border-top:1px solid"][style*="padding-top:20px"] > div[style*="font-size:clamp(4"]:first-child + div.m) { grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 14px 12px !important; margin-top: 24px !important; }
  /* Jasper Cannes: hide the Discovery Lab station list */
  #dc-root div[style*="margin-top:0px;padding:16px 0;border-top:1px solid #818181;display:grid"] { display: none !important; }
}
@media (max-width: 760px) {
  /* Step-by-step chain: compact 2-column tiles, no arrows */
  #dc-root div[style*="repeat(11,auto)"] { grid-template-columns: 1fr 1fr !important; gap: 8px !important; margin-top: 24px !important; }
  #dc-root div[style*="repeat(11,auto)"] > span[aria-hidden] { display: none !important; }
  #dc-root div[style*="repeat(11,auto)"] > a { min-height: 0 !important; padding: 10px 12px !important; gap: 4px !important; }
  #dc-root div[style*="repeat(11,auto)"] > a > span:last-child { font-size: 15px !important; }
  #dc-root div[style*="repeat(11,auto)"] > a > span:first-child { font-size: 10px !important; }
}
