/* Shared responsive safeguards loaded after each page's primary stylesheet. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
main,
section,
header,
footer,
nav,
.wrap,
.section-header-inner,
.section-footer-inner {
  min-width: 0;
}

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

img,
video,
canvas,
iframe {
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

:where(
  .problem-grid,
  .pillars,
  .solutions-grid,
  .buying-grid,
  .stat-grid,
  .why-grid,
  .services-grid,
  .team-grid,
  .inquiry-grid,
  .company-panel,
  .company-details,
  .product-details,
  .home-products-grid,
  .contact-details,
  .process,
  .stage,
  .feed-row
) > * {
  min-width: 0;
}

:where(h1, h2, h3, p, li, dd, address, a, .btn, .contact-value, .product-name) {
  overflow-wrap: anywhere;
}

.btn,
.quick-link,
.linkedin-link,
.section-menu summary,
.section-menu-links a,
.section-footer-links a,
footer a {
  min-height: 44px;
}

.flow-body,
.payload {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.section-menu-links {
  overscroll-behavior: contain;
}

@media (max-width: 1024px) {
  .section-main > section {
    min-height: auto;
  }

  .services-grid.expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-panel,
  .company-panel,
  .compliance-panel {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .section-main > section,
  body > section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .section-main .section-page-title,
  h1 {
    font-size: clamp(32px, 9vw, 48px);
    line-height: 1.08;
  }

  .section-lead,
  .intro,
  .hero-sub {
    font-size: 16px;
  }

  .product-panel,
  .company-panel,
  .compliance-panel,
  .problem-card,
  .pillar,
  .stat-card,
  .service-card,
  .why-card,
  .faq-item,
  .inquiry-card,
  .buying-card {
    padding: 24px;
  }

  .services-grid.expanded,
  .why-grid,
  .faq-list,
  .product-details,
  .company-details {
    grid-template-columns: 1fr;
  }

  .service-actions,
  .product-actions,
  .hero-actions,
  .cta-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .service-actions .btn,
  .product-actions .btn,
  .hero-actions .btn,
  .cta-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .trace-head,
  .trace-legend,
  .live-feed-head {
    gap: 10px;
  }

  .trace-legend > span {
    margin-left: 0 !important;
  }

  .metric-row {
    gap: 16px;
  }

  .metric-row .label {
    min-width: 0;
  }

  .section-page-footer {
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }

  .section-footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
  }

  .section-footer-links a {
    display: flex;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .section-header-inner {
    width: calc(100% - 24px);
    padding-top: env(safe-area-inset-top);
  }

  .section-page-brand {
    min-width: 0;
  }

  .section-menu-links {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 84px - env(safe-area-inset-top));
  }

  .section-main > section,
  body > section {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .section-main .section-page-title,
  h1 {
    font-size: clamp(30px, 10.5vw, 40px);
  }

  h2,
  .privacy-architecture > h3 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .kicker,
  .eyebrow {
    max-width: 100%;
    line-height: 1.45;
  }

  .product-panel,
  .company-panel,
  .compliance-panel,
  .problem-card,
  .pillar,
  .stat-card,
  .service-card,
  .why-card,
  .faq-item,
  .inquiry-card,
  .buying-card,
  .contact-box {
    padding: 20px;
  }

  .product-panel-heading,
  .family-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-status {
    justify-self: start;
  }

  .services-grid,
  .services-grid.expanded,
  .problem-grid,
  .pillars,
  .stat-grid,
  .why-grid,
  .faq-list,
  .inquiry-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .process {
    grid-template-columns: 1fr;
  }

  .process-step,
  .process-step:nth-child(odd) {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .process-step:first-child {
    border-top: 0;
  }

  .contact-item {
    padding: 20px;
  }

  .payload {
    white-space: pre-wrap;
    word-break: break-word;
  }

  .flow-body {
    padding: 16px 10px;
  }

  .flow-body svg {
    min-width: 560px;
  }

  .footer-main,
  footer .wrap,
  footer nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .section-page-brand {
    font-size: 15px;
  }

  .section-page-brand img {
    width: 30px;
    height: 30px;
  }

  .section-menu summary {
    padding-inline: 12px;
  }

  .section-footer-links {
    grid-template-columns: 1fr;
  }

  .trace-head .status,
  .live-feed-count {
    width: 100%;
  }

  .metric-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (pointer: coarse) {
  .btn,
  .quick-link,
  .linkedin-link,
  .back-link,
  .section-menu summary,
  .section-menu-links a,
  .navlinks a,
  footer a {
    min-height: 44px;
  }
}
