/* Shared responsive layer for every KLOKIO route. Desktop styling remains page-owned. */
html,
body,
#dc-root,
#dc-root > .sc-host {
  max-width: 100%;
}

img,
video,
canvas {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

header > nav > nav a,
header > nav > div a,
#top > nav > div a {
  color: #1B2340 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  line-height: 1.35;
  text-decoration: none !important;
}

@media (max-width: 780px) {
  :root {
    --klokio-mobile-gutter: max(16px, env(safe-area-inset-left));
  }

  html,
  body,
  #dc-root,
  #dc-root > .sc-host {
    width: 100%;
    overflow-x: clip !important;
  }

  body {
    min-width: 0;
    -webkit-text-size-adjust: 100%;
  }

  .klokio-site-header,
  #top {
    width: 100%;
  }

  .klokio-site-header > div:first-child,
  #top > div:first-child {
    padding: 8px 14px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  header > nav,
  #top > nav,
  nav.site-nav {
    width: 100%;
    min-height: 62px !important;
    padding: 11px max(14px, env(safe-area-inset-right)) 11px max(14px, env(safe-area-inset-left)) !important;
    gap: 9px !important;
  }

  header > nav > a:first-child,
  #top > nav > a:first-child,
  nav.site-nav > a:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  header > nav > a:first-child img:last-child,
  #top > nav > a:first-child img:last-child,
  nav.site-nav > a:first-child img:last-child {
    max-width: min(105px, 29vw) !important;
    object-fit: contain;
  }

  header > nav > a:last-child,
  #top > nav > a:last-child,
  nav.site-nav > a:last-child {
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  body .klokio-mobile-menu-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border: 1px solid rgba(27, 35, 64, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .28);
    color: #12141A;
    cursor: pointer;
    font: 800 22px/1 system-ui, sans-serif;
    touch-action: manipulation;
  }

  body .klokio-mobile-menu-links {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 10px !important;
    right: 10px !important;
    z-index: 70;
    padding: 10px !important;
    border: 1px solid rgba(27, 35, 64, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 46px -18px rgba(20, 26, 60, .55);
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    max-height: calc(100dvh - 112px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* Beat the legacy ID-based desktop-menu hide rule when the drawer is open. */
  #top > nav > .klokio-mobile-menu-links.is-open,
  header > nav > .klokio-mobile-menu-links.is-open,
  nav.site-nav > .klokio-mobile-menu-links.is-open {
    display: flex !important;
  }

  body .klokio-mobile-menu-links a {
    min-height: 46px;
    display: flex !important;
    align-items: center;
    padding: 12px 14px !important;
  }

  main,
  section,
  footer,
  main > *,
  section > * {
    min-width: 0;
    max-width: 100%;
  }

  main {
    padding-left: var(--klokio-mobile-gutter) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }

  section {
    padding-left: var(--klokio-mobile-gutter) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }

  section[style*="max-width:840px"],
  section[style*="max-width: 840px"],
  .hero {
    padding-top: 48px !important;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(36px, 10.5vw, 44px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.035em !important;
    overflow-wrap: break-word;
  }

  h2 {
    max-width: 100%;
    font-size: clamp(27px, 7.5vw, 34px) !important;
    line-height: 1.15 !important;
    overflow-wrap: break-word;
  }

  h3,
  p,
  li,
  summary,
  label,
  a,
  span {
    overflow-wrap: break-word;
  }

  p {
    line-height: 1.62 !important;
  }

  [style*="min-width:340px"],
  [style*="min-width: 340px"] {
    min-width: 0 !important;
    width: 100% !important;
  }

  [style*="grid-template-columns"] {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [style*="padding:52px 44px"],
  [style*="padding: 52px 44px"],
  [style*="padding:44px 48px"],
  [style*="padding: 44px 48px"],
  [style*="padding:48px"],
  [style*="padding: 48px"] {
    padding: 28px 20px !important;
  }

  [style*="padding:34px"],
  [style*="padding: 34px"],
  [style*="padding:32px"],
  [style*="padding: 32px"] {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  /* Landing hero: copy first, then a contained phone, dial and four complete badges. */
  #top > nav + div {
    padding: 38px 16px 58px !important;
    gap: 44px !important;
    align-items: stretch !important;
  }

  #top > nav + div > div:first-child {
    width: 100%;
  }

  #top h1 {
    font-size: clamp(39px, 11vw, 48px) !important;
  }

  #top #download,
  #top #download > a {
    width: 100%;
  }

  #top #download > a {
    min-height: 50px;
    justify-content: center;
    text-align: center;
  }

  #hero-phone {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    width: min(100%, 360px) !important;
    max-width: 360px !important;
    margin-inline: auto !important;
  }

  #hero-phone > div[aria-hidden="true"] {
    width: 520px !important;
    height: 520px !important;
  }

  #hero-phone > div[aria-hidden="true"] img {
    width: 520px !important;
    height: auto !important;
  }

  #hero-phone [data-float] {
    order: 1;
    flex: 0 0 100%;
    width: min(78vw, 300px) !important;
    margin-inline: auto !important;
    margin-bottom: 8px;
  }

  #hero-phone [data-badge] {
    display: flex !important;
    position: static !important;
    order: 2;
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    min-height: 62px;
    padding: 10px 11px !important;
    transform: none !important;
    animation: none !important;
  }

  #hero-phone [data-badge] > div {
    min-width: 0;
  }

  #demo {
    margin-top: 0 !important;
    padding-top: 64px !important;
    padding-bottom: 68px !important;
  }

  /* The four genuine screenshots stay present and become a touch-friendly rail. */
  #demo > div > div[style*="grid-template-columns:repeat(4"],
  #demo > div > div[style*="grid-template-columns: repeat(4"] {
    display: flex !important;
    gap: 16px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    padding: 4px max(16px, env(safe-area-inset-right)) 14px 2px;
    margin-right: calc(-1 * max(16px, env(safe-area-inset-right)));
    -webkit-overflow-scrolling: touch;
  }

  #demo > div > div[style*="grid-template-columns:repeat(4"]::-webkit-scrollbar,
  #demo > div > div[style*="grid-template-columns: repeat(4"]::-webkit-scrollbar {
    display: none;
  }

  #demo > div > div[style*="grid-template-columns:repeat(4"] > div,
  #demo > div > div[style*="grid-template-columns: repeat(4"] > div {
    flex: 0 0 min(78vw, 286px);
    scroll-snap-align: start;
  }

  .sample-report-card {
    grid-template-columns: minmax(0, 1fr) !important;
    text-align: center;
  }

  .sample-report-card > div > p {
    margin-inline: auto !important;
  }

  /* Forms and controls remain usable without iOS input zoom. */
  input,
  textarea,
  select {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    font-size: 16px !important;
  }

  textarea {
    min-height: 132px;
  }

  button,
  .button,
  [role="button"] {
    min-height: 44px;
    touch-action: manipulation;
  }

  .actions {
    align-items: stretch;
  }

  .actions .button {
    flex: 1 1 100%;
    text-align: center;
  }

  details[data-acc] {
    padding-inline: 18px !important;
  }

  details[data-acc] summary {
    min-height: 62px;
  }

  details[data-acc] p {
    margin-right: 0 !important;
  }

  aside[style*="position:sticky"],
  aside[style*="position: sticky"] {
    position: static !important;
    top: auto !important;
    width: 100%;
    max-height: none;
    overflow: visible;
  }

  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  pre,
  code {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  footer {
    margin-top: 68px !important;
  }

  footer > div:first-child {
    padding: 38px 18px 34px !important;
    gap: 32px !important;
  }

  footer [style*="gap:56px"],
  footer [style*="gap: 56px"] {
    align-items: start;
  }

  footer a {
    display: inline-flex;
    align-items: center;
    min-height: 32px !important;
    line-height: 1.35;
  }

  .klokio-cookie-notice {
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 16px !important;
  }

  .klokio-cookie-notice__actions {
    gap: 10px !important;
  }

  .klokio-cookie-notice__button {
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  footer [style*="gap:56px"],
  footer [style*="gap: 56px"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
  }
}

@media (max-width: 370px) {
  header > nav > a:last-child,
  #top > nav > a:last-child,
  nav.site-nav > a:last-child {
    font-size: 11.5px !important;
    padding-inline: 8px !important;
  }

  header > nav > a:first-child img:last-child,
  #top > nav > a:first-child img:last-child,
  nav.site-nav > a:first-child img:last-child {
    max-width: 88px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* Accessible keyboard navigation without changing the approved visual design. */
.skip-link{position:fixed;left:16px;top:12px;z-index:9999;padding:10px 14px;border-radius:9px;background:#12141A;color:#fff;font-weight:700;text-decoration:none;transform:translateY(-160%);transition:transform .15s ease}
.skip-link:focus{transform:translateY(0)}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #173FBC;outline-offset:3px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
