/* V10 responsive and legibility guardrails.
   Loaded last so every route benefits without changing the established art direction. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
}

:where(h1, h2, h3) {
  text-wrap: balance;
  overflow-wrap: anywhere;
}

:where(p, li, figcaption) {
  text-wrap: pretty;
}

:where(button, a, summary, input) {
  touch-action: manipulation;
}

:where(img, video, iframe, table) {
  max-width: 100%;
}

.pc-tools-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pc-tools-actions .pc-icon > span {
  display: none;
}

/* Utility panels must remain interactive after the automatic hero film pauses. */
.hero-film[data-film-running="false"] .pc-panel {
  animation: none;
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 58px;
  }

  body {
    font-size: 16px;
    line-height: 1.6;
  }

  .shell {
    width: min(100% - 40px, 1360px);
  }

  .nav {
    height: 56px;
  }

  .nav-inner {
    width: calc(100% - 40px);
    gap: 10px;
  }

  .nav .brand {
    font-size: 31px;
  }

  .nav-actions {
    gap: 4px;
    margin-inline-start: auto;
  }

  .nav .btn,
  .lang,
  .login-link,
  .menu-button,
  .auth-language {
    min-height: 44px;
  }

  .nav-actions > .btn.white {
    display: none !important;
  }

  .lang,
  .login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }

  .menu-button {
    min-width: 44px;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu {
    top: 56px;
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 16px;
  }

  .mobile-menu .mobile-menu-start {
    justify-content: center;
    margin-top: 8px;
    border-radius: 8px;
    background: var(--orange);
    color: #080808;
    font-weight: 650;
  }

  .hero-film .pc-nav {
    justify-content: flex-start;
    gap: 28px;
    padding-inline: 20px;
    scroll-padding-inline: 20px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  .hero-film .pc-nav button {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .hero-film :is(.pc-menu, .pc-mic, .pc-send) {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    padding: 0;
    aspect-ratio: 1;
  }

  .hero-film .pc-pill {
    min-height: 56px;
    padding-block: 5px;
    padding-inline: 12px 6px;
    gap: 4px;
  }

  .reading-progress {
    inset-block-start: 73px;
  }

  .eyebrow,
  .cv-eyebrow,
  .action-label,
  .case-number,
  .case-card-image > div > span,
  .case-detail-hero small,
  .story-business-label,
  .story-window-top,
  .story-window-bottom,
  .owner-immersive-copy .eyebrow,
  .owner-live-summary > span,
  .owner-demo-note,
  .nh-topline,
  .nh-business-label,
  .nh-try > span,
  .nh-bottom-meta,
  .nh-sample,
  .flow-fine,
  .case-finished > small,
  .living-hero-note,
  .experience-note,
  .auth-kicker,
  .auth-divider,
  .auth-terms,
  .auth-preview-note,
  .auth-powered,
  .article-toc > span,
  .journal-meta,
  .pricing-fine,
  .estimate-note,
  .form-note,
  .case-disclaimer {
    font-size: 13px !important;
    line-height: 1.55;
  }

  .text-link,
  .breadcrumb,
  .back-top,
  .article-byline button,
  .journal-filters button,
  .case-type-filters button,
  .playground-businesses button,
  .nh-scenarios button,
  .offering-tabs button,
  .pricing-controls button,
  .case-player-tabs button,
  .auth-social button,
  .auth-forgot,
  .auth-referral summary,
  .auth-submit {
    min-height: 44px;
  }

  .case-open,
  .image-arrow,
  .motion-button,
  .hero-film-controls button,
  .pc-tools button,
  .pc-compose button,
  .cv-send,
  .quantity-row button {
    min-width: 44px;
    min-height: 44px;
  }

  .case-type-filters,
  .journal-filters,
  .playground-businesses,
  .nh-scenarios,
  .offering-tabs,
  .capability-nav > .shell {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: inline proximity;
  }

  .case-type-filters,
  .journal-filters {
    width: 100%;
    max-width: 100%;
    margin-inline-end: 0 !important;
    padding-inline-end: 16px;
  }

  .case-type-filters > *,
  .journal-filters > *,
  .playground-businesses > *,
  .nh-scenarios > *,
  .offering-tabs > * {
    scroll-snap-align: start;
  }

  .article-body p,
  .story-grid p,
  .contact-copy > p,
  .case-context .lead,
  .case-outcomes p,
  .pricing-mode-caption > p,
  .calculator-heading > p,
  .credits-section .section-head > p,
  .faq-answer p {
    max-width: 65ch;
  }

  .auth-field > span:first-child,
  .auth-referral,
  .auth-forgot,
  .auth-social button,
  .auth-switch {
    font-size: 14px;
  }

  .auth-input-wrap > input,
  .auth-referral > input,
  .journal-search input,
  .volume-input input,
  textarea {
    font-size: 16px;
  }

  .footer-directory a {
    display: flex;
    align-items: center;
    min-height: 40px;
    font-size: 14px;
  }

  .footer-bottom,
  .footer-bottom > span {
    font-size: 13px !important;
    line-height: 1.55;
  }

  .paka-canvas small {
    font-size: 13px !important;
    line-height: 1.45;
  }

  .paka-canvas :is(.pc-eyebrow, .pc-status, .pc-example, .powered, .offer-ui-kicker),
  .paka-canvas .pc-business > span,
  .paka-canvas .pc-powered > span,
  .product-intro-caption > span,
  .about-panorama span {
    font-size: 13px !important;
    line-height: 1.45;
  }

  .paka-canvas .pc-foot button {
    min-height: 32px;
    padding-block: 7px;
    font-size: 13px;
  }

  .auth-terms button {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
  }

  .paka-canvas .pc-nav button,
  .paka-canvas .pc-pill button,
  .paka-canvas .pc-compose button {
    min-height: 44px;
    font-size: 13px !important;
  }

  .paka-canvas .pc-nav {
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: inline proximity;
    padding-inline: 16px;
  }

  .paka-canvas .pc-nav::-webkit-scrollbar {
    display: none;
  }

  .paka-canvas .pc-nav button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .case-type-filters button span,
  .journal-filters button span,
  .offer-options button span,
  .appointment-times span,
  .course-preview-list small,
  .finish-access small {
    font-size: 13px !important;
  }

  table {
    display: table;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .owner-immersive {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 320px auto auto;
    gap: 0;
    min-height: 0;
    padding: 0 20px 32px;
    align-items: start;
    background: #101110;
  }

  .owner-immersive > img {
    position: relative;
    inset: auto;
    z-index: 0;
    grid-row: 1;
    width: calc(100% + 40px);
    max-width: none;
    height: 320px;
    margin-inline: -20px;
    object-position: 68% 42%;
  }

  .owner-immersive-shade {
    display: none;
  }

  .owner-immersive-copy {
    grid-row: 2;
    max-width: none;
    padding-top: 30px;
  }

  .owner-immersive-copy h2 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 13vw, 54px);
    letter-spacing: -.045em;
  }

  .owner-immersive-copy > p {
    max-width: none;
  }

  .owner-live-summary {
    grid-row: 3;
    max-width: none;
    margin: 28px 0 0;
  }

  .return-demo .pc-nav,
  .return-demo .pc-powered {
    display: none;
  }

  .return-demo .pc-body {
    height: 580px;
  }

  .return-demo .return-offer > img {
    height: 120px;
  }

  .return-demo .pc-pill .pc-send {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border-radius: 50%;
  }
}

@media (max-width: 430px) {
  .nav-inner,
  .shell {
    width: calc(100% - 40px);
  }

  .nav .login-link {
    display: none;
  }

  .nav .btn {
    padding-inline: 14px;
    gap: 8px;
    font-size: 14px;
  }

  .nav .btn svg {
    display: none;
  }

  .nav-actions {
    gap: 2px;
  }

  .footer-directory {
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 40px;
  }

  .footer-purpose {
    grid-column: 1 / -1;
  }

  .article-byline {
    gap: 12px 18px;
    flex-wrap: wrap;
  }

  .article-byline button {
    margin-inline-start: 0;
  }
}

@media (max-width: 360px) {
  .nav-inner,
  .shell {
    width: calc(100% - 32px);
  }

  .nav .brand {
    font-size: 28px;
  }

  .nav .btn {
    padding-inline: 11px;
    font-size: 13px;
  }

  .lang {
    min-width: 38px;
    padding-inline: 7px;
  }

  .menu-button {
    min-width: 40px;
    padding-inline: 8px;
  }

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

  .footer-purpose {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
