/* Mobile-only corrections. Desktop styles and content remain unchanged. */
@media (max-width: 720px) {
  html:root body :is(a[class*="cta"], button[class*="cta"], .blog-see-all) {
    touch-action: manipulation;
  }
  html:root body .cta-swap,
  html:root body .cta-label {
    pointer-events: none;
  }
  html:root body .cta-label-default {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }
  html:root body .cta-label-hover {
    display: none !important;
  }
  html:root { --page-gutter: 20px; --pandect-nav-gutter: 20px; }
  html:root body .hero-image-media img { object-position: 28% center !important; }
  html:root body .banking-fit-section .banking-fit-visual {
    opacity: 1 !important;
    visibility: visible !important;
  }
  html:root body .banking-fit-section .banking-fit-visual img {
    transform: none !important;
  }
  html:root body .hero-video-content { width: calc(100% - 40px) !important; max-width: calc(100% - 40px) !important; min-width: 0 !important; margin-inline: 20px !important; padding-inline: 0 !important; box-sizing: border-box; }
  html:root body .hero-video-title { width: 100% !important; max-width: 100% !important; font-size: clamp(28px, 8vw, 44px) !important; line-height: 1.08 !important; }
  html:root body .hero-title-line { white-space: normal !important; }
  html:root body .hero-outcome-rotator { min-width: 0 !important; width: 100% !important; font-size: clamp(20px, 5.8vw, 30px) !important; }
  html:root body .hero-video-subtitle { width: 100% !important; max-width: 100% !important; font-size: 16px !important; line-height: 1.5 !important; }
  html:root body .hero-video-subtitle > span { white-space: normal !important; }
  html:root body .site-footer { min-height: 0 !important; --page-gutter: 20px; padding-top: 32px !important; }
  html:root body .site-footer > .content-shell { width: 100% !important; max-width: 100% !important; min-height: 0 !important; padding: 0 20px 120px !important; box-sizing: border-box !important; }
  html:root body .site-footer .footer-outro { min-width: 0 !important; margin-top: 20px !important; }
  html:root body .site-footer .footer-outro h2 { width: 100% !important; max-width: 100% !important; font-size: clamp(28px, 8vw, 34px) !important; line-height: 1.15 !important; white-space: normal !important; }
  html:root body .site-footer .footer-outro h2 span { white-space: normal !important; }
  html:root body .site-footer .footer-navigation { position: static !important; width: 100% !important; max-width: 100% !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 28px 20px !important; margin-top: 36px !important; }
  html:root body .site-footer .footer-navigation-group { min-width: 0 !important; }
  html:root body .site-footer .footer-navigation a { overflow-wrap: anywhere; }
  html:root body .site-footer .footer-meta { width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin-top: 36px !important; box-sizing: border-box; }
  html:root body .site-footer .footer-meta > div { min-width: 0; flex-wrap: wrap !important; justify-content: flex-start !important; gap: 14px !important; }
  html:root body .site-footer .footer-brand span { line-height: 1.6; }
  html:root body .imprint-content, html:root body .imprint-content section, html:root body .imprint-details, html:root body .imprint-detail { min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
  html:root body .imprint-content h1 { font-size: 34px !important; overflow-wrap: anywhere; }
  html:root body .imprint-content p, html:root body .imprint-content h2 { overflow-wrap: anywhere; }
  html:root body .imprint-details { padding-top: 32px; gap: 28px; }
  html:root body .talk-copy h1 { font-size: 34px !important; line-height: 1.12 !important; }
  html:root body .talk-main-shell { padding-inline: 20px !important; }
  html:root body .talk-layout { gap: 32px !important; }
  html:root body .talk-form-panel { min-width: 0; }
  html:root body .talk-form-panel input, html:root body .talk-form-panel select, html:root body .talk-form-panel textarea { min-width: 0; width: 100%; font-size: 16px !important; }
  html:root body .main-faq { padding-top: 48px; padding-bottom: 56px; }
  html:root body .main-faq__shell { gap: 28px; }
  html:root body .main-faq summary { grid-template-columns: 32px minmax(0,1fr) 24px; gap: 10px; }
  html:root body :is(.main-faq__number, .ansatz-workflow-number),
  html:root body :is(.main-faq__number, .ansatz-workflow-number) .pandect-text-row {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  html:root body .main-faq .main-faq__answer { padding: 0 0 24px 32px; }
  html:root body .main-faq h2 br { display: none; }
  html:root body .operation-fields--static .operation-process-row { min-width: 0; }
  html:root body .operation-fields--static .operation-process { display: grid; grid-template-columns: 34px minmax(0,1fr); width: 100%; min-width: 0; }
  html:root body .operation-fields--static .operation-process-label { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  html:root body .operation-fields--static .operation-process-category { grid-column: 2; grid-row: 2; justify-self: start; }
  html:root body .operation-fields--static .operation-process-cta { grid-column: 2; margin-left: 0; max-width: 100%; }
  html:root body .operation-fields--static .operation-process-row--own .operation-process-cta { opacity: 1; visibility: visible; }
  html:root body .regulatory-infrastructure__intro { padding-right: 0 !important; }
  html:root body .regulatory-infrastructure__copy p { max-width: 100% !important; }
  html:root body .regulatory-infrastructure h3 { margin-top: 12px; }
  html:root body .operations-engineering h3 { font-size: 23px; }
  html:root body .action-section, html:root body .banking-fit-section, html:root body .about-story, html:root body .about-experience, html:root body .about-people, html:root body .about-standards, html:root body .operations-engineering, html:root body .ansatz-workflows, html:root body .approach-loop, html:root body .deployment-team-section { padding-top: 56px !important; padding-bottom: 56px !important; }
}

@media(max-width:420px) {
  html:root body header { gap: 8px !important; }
  html:root body header > a:first-child { gap: 6px !important; }
  html:root body header > nav:last-child { gap: 8px !important; }
  html:root body header .nav-cta { box-sizing: border-box; width: 136px !important; min-width: 136px !important; padding-inline: 8px !important; }
  html:root body header .nav-cta, html:root body header .cta-label { font-size: 12px !important; }
}

@media(max-width:420px) {
  html:root body header > a:first-child img { width: 84px !important; }
  html:root body .site-footer .footer-navigation-group:nth-child(1) { order: 0; }
  html:root body .site-footer .footer-navigation-group:nth-child(3) { order: 1; }
  html:root body .site-footer .footer-navigation-group:nth-child(2) { order: 2; grid-column: 1 / -1; }
}

/* Let the mobile navigation CTA fit both labels instead of clipping a fixed width. */
@media (max-width: 720px) {
  html:root body header > nav:last-child { min-width: 0; flex-shrink: 0; }
  html:root body header .nav-cta {
    box-sizing: border-box;
    width: max-content !important;
    min-width: max-content !important;
    flex-shrink: 0;
    padding-inline: 10px !important;
    font-size: clamp(11px, 3.2vw, 14px) !important;
  }
  html:root body header .nav-cta .cta-swap { width: max-content; min-width: 0; flex: none; }
  html:root body header .nav-cta .cta-label { font-size: inherit !important; white-space: nowrap; }
}

/* Shared mobile navbar: language switch immediately before the compact menu. */
.pandect-mobile-menu { display: none; }
@media (max-width: 720px) {
  html:root body header.pandect-site-nav {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding-inline: 16px !important;
    gap: 6px !important;
  }
  html:root body .pandect-site-nav > a:first-child { min-width: 0; gap: 6px !important; }
  html:root body .pandect-site-nav > nav[aria-label="Primary"] { display: none !important; }
  html:root body .pandect-site-nav > nav:last-child { justify-content: flex-end !important; gap: 14px !important; min-width: 0; flex-shrink: 0; }
  html:root body .pandect-site-nav > nav:last-child .lang-switch { order: 0; }
  html:root body .pandect-site-nav > nav:last-child .pandect-mobile-menu { order: 1; }
  html:root body .pandect-site-nav .nav-cta {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 34px !important;
    padding: 0 8px !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
    font-size: clamp(11px, 3vw, 13px) !important;
    line-height: 1.2 !important;
  }
  html:root body .pandect-site-nav .nav-cta .cta-swap { display: block !important; width: auto !important; min-width: 0 !important; }
  html:root body .pandect-site-nav .nav-cta .cta-label-default { display: block !important; width: auto !important; opacity: 1 !important; transform: none !important; font-size: inherit !important; line-height: 1.2 !important; white-space: nowrap !important; }
  html:root body .pandect-site-nav .nav-cta .cta-label-hover { display: none !important; }
  html:root body .pandect-site-nav .lang-switch__button { font-size: 12px !important; }
  .pandect-site-nav .pandect-mobile-menu { display: block; flex: 0 0 32px; }
  .pandect-mobile-menu summary { width: 32px; height: 34px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; color: inherit; cursor: pointer; list-style: none; }
  .pandect-mobile-menu summary::-webkit-details-marker { display: none; }
  .pandect-mobile-menu summary::marker { content: ''; }
  .pandect-mobile-menu summary > span { display: block; width: 19px; height: 1px; background: currentColor; }
  .pandect-mobile-menu summary:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; border-radius: 4px; }
  .pandect-mobile-panel { position: absolute; top: calc(100% + 8px); right: 16px; left: 16px; max-height: calc(100dvh - 88px); overflow-y: auto; padding: 16px; border: 1px solid #ddd; border-radius: 7px; box-shadow: 0 12px 30px rgba(0,0,0,.12); background: #fff; color: #121212; white-space: normal; }
  .pandect-mobile-panel nav { display: grid; gap: 2px; }
  html body .pandect-site-nav .pandect-mobile-panel a { display: block; padding: 12px 8px; font-size: 16px; line-height: 1.25; font-weight: 400; color: #121212 !important; opacity: 1 !important; text-decoration: none; }
  html body .pandect-site-nav .pandect-mobile-panel a:hover, html body .pandect-site-nav .pandect-mobile-panel a:focus-visible { background: #f2f2f2; border-radius: 4px; }
  .pandect-mobile-languages { display: flex; gap: 12px; border-top: 1px solid #ddd; padding-top: 8px; margin-top: 8px; }
  html body .pandect-site-nav:has(.pandect-mobile-menu[open]) { transform: none !important; }
}
@media (max-width: 360px) {
  html:root body header.pandect-site-nav { padding-inline: 12px !important; }
  html:root body .pandect-site-nav > a:first-child img { width: 72px !important; }
  .pandect-mobile-panel { right: 12px; left: 12px; }
}
