/* Small-screen composition. Loaded after page styles so every page shares
   the same gutters, touch targets and navigation clearance. */
@media (max-width: 900px) {
  :root {
    --gut: 20px;
    --mobile-mast: calc(80px + env(safe-area-inset-top, 0px));
    scroll-padding-top: calc(var(--mobile-mast) + 16px);
  }
  .wrap {
    padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
  }
  .mast-inner, .mast.has-scrolled .mast-inner {
    height: var(--mobile-mast);
    padding-top: env(safe-area-inset-top, 0px);
    gap: 8px;
  }
  .desktop-nav { display: none; }
  .menu-open { overflow: hidden; }
  .menu-open .mast { background: var(--sheet) !important; color: var(--ink) !important; }
  .mast .brand-lockup { font-size: 1.65rem; flex-shrink: 0; }
  .brand-lockup > .brand-descriptor { font-size: 12px; line-height: 1.3; }
  .header-contact { margin-left: auto; min-height: 44px; font-size: 14px; gap: 10px; }
  .menu-toggle { display: flex; flex-shrink: 0; flex-direction: column; justify-content: center;
    gap: 6px; border: 0; background: none; color: inherit; padding: 0;
    width: 44px; min-width: 44px; height: 44px; align-items: center; }
  .menu-toggle span { width: 24px; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
  .menu-toggle span + span { width: 18px; }
  .menu-toggle[aria-expanded=true] span { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span + span { width: 24px; transform: translateY(-3.5px) rotate(-45deg); }
  .mobile-menu {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 50;
    background: var(--sheet); color: var(--ink); overflow: auto;
    opacity: 0; transition: opacity .4s var(--ease);
    height: 100dvh;
    padding: calc(var(--mobile-mast) + 32px) max(var(--gut), env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-bottom, 0px));
    justify-content: flex-start;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-menu.is-open { opacity: 1; }
  .mobile-menu nav { display: flex; flex-direction: column; margin-block: auto; gap: 12px; flex-shrink: 0; }
  .mobile-menu nav a { font-size: clamp(2rem, 8vw, 3.5rem); line-height: 1.25; letter-spacing: -.055em; padding-block: 8px; min-height: 44px; }
  .mobile-menu-location { position: static; margin-top: 32px; padding-top: 12px; flex-shrink: 0; }

}
@media (max-width: 700px) {
  /* Let the hero grow when text is enlarged or the phone is turned sideways. */
  .cover { height: auto; min-height: 100svh; max-height: none; }
  .cover-content {
    height: auto; min-height: 100svh;
    padding-top: calc(var(--mobile-mast) + 52px);
    padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  }
  .cover h1 { font-size: clamp(2.7rem, 11.8vw, 5rem); line-height: 1.08; }
  .cover-bottom { gap: 24px; padding-top: 28px; }
  .cover-bottom p { font-size: 16px; line-height: 1.65; }
  .cover-discover { min-height: 48px; font-size: 14px; }
  .cover-discover .circle-arrow { width: 44px; height: 44px; }
  .home-approach { padding-block: 56px; gap: 32px; }
  .home-method-heading h2 { font-size: clamp(2.2rem, 8vw, 3rem); line-height: 1.13; }
  .home-method-intro { margin-top: 22px; line-height: 1.7; }
  .home-method-links > a { grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 12px; padding-block: 24px; }
  .home-method-links h3 { font-size: clamp(1.55rem, 6.6vw, 2rem); }
  .home-method-links p, .home-method-intro, .system-name p { font-size: 16px; line-height: 1.7; }
  .work-section { padding-block: 56px; }
  .system-feature { grid-template-columns: minmax(0, 1fr) 44px; column-gap: 16px; }
  .system-name { min-width: 0; }
  .system-name h3 { font-size: clamp(1.6rem, 6.5vw, 2rem); line-height: 1.2; }
  .system-feature .circle-arrow { width: 44px; height: 44px; }
  .home-origin { padding-block: 48px; }
  .name-feature-title { left: 20px; right: 20px; gap: 12px; }
  .name-feature-title h2 { font-size: clamp(2.65rem, 10.8vw, 3.7rem); }
  .technology-layout { gap: 32px; }
  .technology-layout h2 { font-size: clamp(2.1rem, 7.8vw, 3rem); }
  .technology-partner { gap: 0 16px; }
  .technology-partner > a { font-size: 14px; line-height: 1.6; }
  .inline-link, .image-attribution summary { min-height: 44px; padding-block: 10px; }

  /* One clear reading column with consistent space beneath the fixed mast. */
  .system-page main, .pillar-page #main { padding-top: calc(var(--mobile-mast) + 28px); }
  .studio-opening, .origin-opening { padding-top: calc(var(--mobile-mast) + 28px); }
  .breadcrumb { font-size: 14px; gap: 4px 12px; }
  .breadcrumb > a { min-height: 44px; }
  .breadcrumb > [aria-current] { min-width: 0; overflow-wrap: anywhere; }
  .breadcrumb-rule { width: 20px; }
  .product-hero .breadcrumb { margin-bottom: 28px; }
  .product-heading h1, .pillar-page #main h1 { font-size: clamp(2.35rem, 8.5vw, 3.8rem); line-height: 1.1; }
  .product-heading > div { margin-top: 24px; }
  .product-heading > div > p { font-size: 17px; line-height: 1.7; }
  .product-explanation { padding-block: 48px; }
  .product-how { padding-block: 40px 48px; }
  .product-how-heading { margin-bottom: 32px; }
  .product-prose p { line-height: 1.75; }
  .product-project .system-delivery { padding-block: 32px 48px; }
  .brain-practical summary { min-height: 44px; align-items: center; }
  .brain-practical details p { padding-right: 0; }
  .pillar-page .pillar-wayfinding { padding-bottom: 24px; }
  .pillar-hero { padding-bottom: 48px; }

  /* Example workspaces stay readable and easy to operate with a thumb. */
  .chat-top { gap: 12px; flex-wrap: wrap; padding: 16px; }
  .chat-conversation { padding: 24px 16px 16px; }
  .chat-user { max-width: 100%; }
  .chat-user > p, .chat-answer [data-chat-answer] > .chat-answer-second { font-size: 16px; line-height: 1.7; }
  .chat-presets { gap: 10px; }
  .chat-presets button { font-size: 15px; padding: 12px; }
  .chat-citations button { max-width: 100%; text-align: left; line-height: 1.4; overflow-wrap: anywhere; padding: 10px; }
  .chat-citations button > span { flex-shrink: 0; }
  .chat-composer { padding: 8px 8px 8px 12px; gap: 8px; }
  .chat-composer input { font-size: 16px; min-height: 44px; }
  .chat-composer button, .chat-source button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .chat-source { padding: 16px; }
  .chat-source > div { gap: 8px; }
  .chat-source, .chat-user { scroll-margin-top: calc(var(--mobile-mast) + 20px); }
  .oa-priority-project p, .oa-prerequisite p, .oa-invoice-action p, .oa-document > p { font-size: 16px; line-height: 1.65; }
  .oa-brief-paper { padding-inline: 17px; }
  .oa-case-reference > div { grid-template-columns: minmax(0, 80px) minmax(0, 1fr); }
  .oa-permission { flex-wrap: wrap; }
  .oa-permission > span:last-child { max-width: 100%; }
  .outcome-artifact :where(p, dd, td, th) { overflow-wrap: anywhere; }

  .foot { padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)); }
  .contact-invitation { gap: 16px; }
  .contact-invitation h2 { font-size: clamp(3rem, 12vw, 4.8rem); }
  .contact-invitation .contact-arrow { width: 56px; height: 56px; flex-shrink: 0; }
  .footer-email { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; }
  .footer-bottom { gap: 20px 12px; }
  .footer-bottom > a, .vibelab-credit { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 420px) {
  .header-contact .circle-arrow { display: none; }
  .header-contact { padding-inline: 6px; }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-bottom > :nth-child(n) { text-align: left; justify-self: start; }
  .footer-bottom > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
}
@media (max-width: 900px) and (max-height: 500px) {
  .mobile-menu { padding-top: calc(var(--mobile-mast) + 12px); }
  .mobile-menu nav { gap: 0; }
  .mobile-menu nav a { font-size: 1.75rem; padding-block: 6px; }
  .mobile-menu-location { margin-top: 16px; }
  .cover { height: auto; min-height: 100svh; max-height: none; }
  .cover-content { height: auto; min-height: 100svh; padding-top: calc(var(--mobile-mast) + 32px); }
  .cover h1 { font-size: clamp(2.7rem, 8vw, 4rem); }
}
@media (hover: none), (pointer: coarse) {
  .cover-image, [data-parallax] { will-change: auto; }
}
