/* Mobile layer for all pages (authored desktop-first at 1280px).
   Inline styles are serialized React-style ("grid-template-columns: 1fr 1fr"), selectors follow that. */
@media (max-width: 900px) {
  html{-webkit-text-size-adjust:100%}
  body{min-width:0!important;overflow-x:hidden}
  body>div[style*="width: 1280px"],x-dc>div[style*="width: 1280px"],div[style*="width: 1280px; margin: 0px auto"]{width:100%!important;min-height:0!important}

  /* nav: logo + actions on first row, page links as a scrollable strip below */
  nav{flex-wrap:wrap!important;height:auto!important;padding:12px 18px 0!important;row-gap:10px}
  nav>a:first-child{order:1}
  nav>div:last-child{order:2;margin-left:auto;gap:10px!important}
  nav>div:last-child>a:first-child{display:none}            /* "Adaylar için" / "Für Arbeitgeber" moves to footer */
  nav>div:last-child>a:last-child{padding:10px 14px!important;font-size:14px!important;white-space:nowrap}
  nav>div[style*="gap: 30px"]{order:3;width:100%;overflow-x:auto;gap:18px!important;font-size:14px!important;padding:6px 0 12px;white-space:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  nav>div[style*="gap: 30px"]::-webkit-scrollbar{display:none}
  nav>div[style*="gap: 30px"]>a{flex:none}
  nav>a:first-child span{font-size:18px!important}
  nav>a:first-child svg{width:28px;height:28px}

  /* layout: every grid becomes one column, every horizontal flex may wrap */
  [style*="grid-template-columns"]{grid-template-columns:1fr!important}
  [style*="grid-template-rows"]{grid-template-rows:auto!important;height:auto!important}
  [style*="grid-column: 1 / 3"],[style*="grid-column: 1 / 4"]{grid-column:auto!important}
  section [style*="display: flex"]:not([style*="flex-direction: column"]){flex-wrap:wrap}
  section[style*="display: flex"]{flex-wrap:wrap;row-gap:12px}
  [style*="height: 36px; padding: 0px 18px"]{height:auto!important;padding:8px 12px!important;text-align:center}
  button[style*="justify-content: space-between"]{flex-wrap:nowrap!important}
  [style*="grid-template-columns: 1fr 1fr 1fr; gap: 10px"]{grid-template-columns:1fr 1fr 1fr!important}
  /* icon + text rows (check lists, numbered rows) never wrap */
  [style*="display: flex; gap: 10px"],[style*="display: flex; gap: 12px"],[style*="display: flex; gap: 16px"],[style*="display: flex; gap: 14px; align-items: baseline"],[style*="display: flex; align-items: center; gap: 14px"]{flex-wrap:nowrap!important}
  [style*="position: sticky"]{position:static!important}
  section,footer{padding-left:20px!important;padding-right:20px!important}
  section[style*="padding: 72px"],section[style*="padding: 80px"],section[style*="padding: 88px"],section[style*="padding: 96px"]{padding-top:40px!important;padding-bottom:40px!important}
  section[style*="padding: 0px 56px"]{padding-top:0!important}
  [style*="margin: 0px 56px"]{margin-left:20px!important;margin-right:20px!important}
  [style*="padding: 64px"],[style*="padding: 56px"],[style*="padding: 72px"]{padding:28px 20px!important}
  [style*="padding: 40px"]{padding:24px 20px!important}
  [style*="padding: 32px 28px"],[style*="padding: 32px"]{padding:20px 16px!important}
  [style*="gap: 64px"],[style*="gap: 56px"],[style*="gap: 48px"]{gap:24px!important}
  [style*="max-width: 540px"],[style*="max-width: 520px"],[style*="max-width: 600px"]{max-width:none!important}

  /* type scale */
  h1{font-size:40px!important;line-height:1.05!important;letter-spacing:-.03em!important}
  h2{font-size:28px!important;line-height:1.15!important}
  h3{font-size:22px!important;line-height:1.2!important}
  p{font-size:16px!important;line-height:1.55!important}
  [style*="font: 800 76px"],[style*="font: 800 54px"],[style*="font: 800 44px"],[style*="font: 800 40px"]{font-size:36px!important;line-height:1!important}
  [style*="font: 700 34px"],[style*="font: 400 30px"]{font-size:26px!important}
  [style*="font: italic 26px"],[style*="font: italic 40px"],[style*="font: italic 22px"]{font-size:20px!important;line-height:1.35!important}
  [style*="font: 400 46px"]{font-size:26px!important;line-height:1.25!important}
  [style*="font-size: 22px"],[style*="font-size: 19px"],[style*="font-size: 18px"]{font-size:16px!important}
  [style*="font-size: 17px"]{font-size:15.5px!important}

  /* media */
  img{height:auto!important;max-height:340px}
  img[style*="aspect-ratio: 1 / 1"]{max-height:none}
  img[style*="border-radius: 50%"]{width:48px!important;height:48px!important}
  section[style*="position: relative; height: 560px"]{height:auto!important;min-height:380px}
  section[style*="position: relative; height: 560px"] img{position:absolute;inset:0;height:100%!important;max-height:none}
  section[style*="position: relative; height: 560px"]>div:last-child{position:relative!important;left:auto!important;bottom:auto!important;padding:40px 20px 32px;max-width:none!important}
  [style*="position: absolute; left: -28px"]{position:static!important;width:100%!important;margin-top:12px;box-shadow:none!important;border:1px solid var(--border)}
  [style*="height: 320px"]{height:220px!important}

  /* buttons and pills */
  a[style*="padding: 16px 26px"],a[style*="padding: 17px 28px"],a[style*="padding: 18px 28px"],a[style*="padding: 20px 34px"],a[style*="padding: 15px 24px"]{padding:14px 20px!important;font-size:15px!important;white-space:nowrap}
  a[style*="padding: 16px 22px"],a[style*="padding: 17px 24px"],a[style*="padding: 18px 24px"]{padding:14px 18px!important;font-size:15px!important;white-space:nowrap}
  [style*="justify-content: end"]{justify-content:flex-start!important}
  [style*="justify-content: space-between"][style*="align-items: end"]{align-items:flex-start!important;flex-direction:column;gap:12px}

  /* nav theme dropdown stays on screen */
  nav [style*="position: absolute; right: 0px; top: 44px"]{right:-60px!important}

  /* footer */
  footer{flex-direction:column;align-items:flex-start!important;gap:14px;padding-top:28px!important;padding-bottom:28px!important}
  footer>div{flex-wrap:wrap;gap:12px 18px!important}

  /* Startseite 1b: dark hero image below text */
  [style*="grid-template-columns: 1.1fr 1fr"] img{max-height:300px}
  /* Prozess timeline strip: stack the four blocks */
  [style*="grid-template-columns: 1fr 12fr 3fr 1fr"]{height:auto!important}
  [style*="grid-template-columns: 1fr 12fr 3fr 1fr"]>div{padding:10px 12px}
  /* comparison table: the three columns become label / old / new rows */
  [style*="grid-template-columns: 1.2fr 1fr 1fr"]{gap:6px!important;padding:14px 16px!important}
  /* forms: two-column field rows stack, count buttons keep two per row */
  [style*="grid-template-columns: repeat(4, 1fr)"]{grid-template-columns:1fr 1fr!important}
  input,select,textarea{font-size:16px!important}
}
