@media (max-width: 760px) {
  html, body { -webkit-text-size-adjust: 100%; }
  img, video, canvas { max-width: 100% !important; height: auto; }

  /* fixed page widths */
  [style*="width: 1280px"], [style*="width: 1160px"], [style*="width: 1160px"], [style*="width: 820px"], [style*="width: 760px"] { width: auto !important; max-width: 100% !important; }
  [style*="padding: 0px 40px"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* wide visuals scroll sideways instead of zooming the page */
  *:has(> [style*="width: 2400px"]), *:has(> [style*="width: 2220px"]), *:has(> [style*="width: 1632px"]), *:has(> [style*="width: 1400px"]),
  *:has(> [style*="min-width: 1100px"]), *:has(> [style*="min-width: 920px"]), *:has(> [style*="min-width: 820px"]), *:has(> [style*="min-width: 640px"]), *:has(> [style*="min-width: 560px"]),
  *:has(> table), *:has(> x-import), *:has(> [style*="width: 900px"]) { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }

  /* type scale */
  [style*="font-size: 56px"] { font-size: 38px !important; }
  [style*="font-size: 44px"] { font-size: 32px !important; }
  [style*="font-size: 40px"] { font-size: 30px !important; }
  [style*="font-size: 32px"], [style*="font-size: 30px"] { font-size: 26px !important; }
  [style*="font-size: 28px"] { font-size: 21px !important; }
  [style*="font-size: 26px"] { font-size: 21px !important; }
  [style*="font-size: 23px"], [style*="font-size: 24px"] { font-size: 20px !important; }
  [style*="font-size: 19px"], [style*="font-size: 21px"], [style*="font-size: 22px"] { font-size: 17px !important; }

  /* multi-column grids collapse */
  [style*="grid-template-columns: 340px"], [style*="grid-template-columns: 170px"], [style*="grid-template-columns: repeat(3, minmax(0px, 1fr))"], [style*="grid-template-columns: repeat(4, minmax(0px, 1fr))"], [style*="grid-template-columns: repeat(2, minmax(0px, 1fr))"] { grid-template-columns: minmax(0,1fr) !important; }
  [style*="grid-template-columns: 160px minmax(0px, 1fr)"] { grid-template-columns: minmax(0,1fr) !important; row-gap: 4px; }
  [style*="repeat(auto-fit, minmax(320px, 1fr))"] { grid-template-columns: minmax(0,1fr) !important; }
  [style*="display: flex"][style*="justify-content: space-between"] { flex-wrap: wrap; row-gap: 10px; }

  /* home page: side columns join the flow */
  [style*="position: absolute; left: 48px; top: 0px; bottom: 64px; width: 180px"] { position: static !important; width: auto !important; padding: 0 20px 8px; display: flex; flex-direction: column; gap: 24px; }
  [style*="position: absolute; left: 48px; top: 0px; bottom: 64px; width: 180px"] > * { position: static !important; top: auto !important; visibility: visible !important; }
  [style*="position: absolute; left: 48px; top: 0px; bottom: 64px; width: 180px"] > :first-child { order: 2; flex-direction: row !important; gap: 12px; }
  [style*="position: absolute; left: 48px; top: 0px; bottom: 64px; width: 180px"] aside > [style*="flex: 0 0 auto"] { height: 0 !important; }
  [style*="position: absolute; left: 48px; top: 0px; bottom: 64px; width: 180px"] [style*="display: grid; width: max-content"] { margin-top: 12px !important; }
  [style*="max-width: 760px; margin: 0px auto; padding: 0px 40px"] { display: flex; flex-direction: column; }
  [style*="max-width: 760px; margin: 0px auto; padding: 0px 40px"] > main, [style*="max-width: 760px; margin: 0px auto; padding: 0px 40px"] > nav { order: 1; }
  [style*="max-width: 760px; margin: 0px auto; padding: 0px 40px"] > footer { order: 3; height: auto !important; margin-top: 48px !important; }
  [style*="position: absolute; right: 48px"][style*="width: 180px"] { position: static !important; order: 2; width: auto !important; margin-top: 40px; }
  [style*="right: 48px"] [data-gl-grid] { margin-top: 0 !important; grid-template-columns: repeat(9, minmax(0,1fr)) !important; row-gap: 6px; }
  [data-screen-label="1b Front page"] { min-height: 0 !important; }
  main article[style*="padding: 64px 0px"] { padding: 40px 0 !important; }

  footer { display: flex !important; flex-wrap: wrap; gap: 12px 28px; }
  footer > * { position: static !important; width: auto !important; }
  footer > span { display: contents !important; }
  /* home page panels */
  [style*="left: 260px; width: 760px"] { left: 0 !important; right: 0 !important; width: auto !important; }
  [style*="left: 260px; width: 760px"][style*="padding: 40px"] { left: 12px !important; right: 12px !important; padding: 48px 20px 24px !important; }

  /* Last 30 Years: intro flows, chart scrolls sideways */
  [style*="position: relative; width: 2400px; height: 1430px"] { width: auto !important; height: auto !important; overflow-x: auto !important; overflow-y: hidden !important; }
  [style*="position: absolute; right: 90px; top: 96px"] { position: static !important; padding: 56px 20px 12px; }
  [style*="width: 2220px; display: flex; flex-direction: column"] { position: static !important; width: calc(100vw - 40px) !important; }
  [style*="position: relative; width: 2400px; height: 1430px"] > [style*="position: absolute; left: 90px; top: 96px"] { margin: 0 20px; }
  [style*="position: absolute; left: 0px; top: -170px; width: 2400px; height: 1600px"] { position: relative !important; top: auto !important; margin-top: -720px; }

  /* home: mobile-only nav label + jump */
  [data-mobile-only] { display: flex !important; }
  h2[data-mobile-only] { display: block !important; }
}
