/* Phone layouts keep the existing artwork and live product surface, while
   giving the next action and touch controls priority. */
.mobile-nav-signin,
.mobile-nav-waitlist,
.demo-route-picker { display: none; }

@media (max-width: 650px) {
  html { scroll-padding-top: 72px; }
  .navigation { height: 66px; padding: 0 12px; gap: 8px; }
  .navigation .brand { flex: 0 1 auto; min-width: 0; font-size: 18px; white-space: nowrap; }
  .navigation .brand-mark { width: 24px; height: 24px; flex: none; }
  .navigation .nav-actions { gap: 7px; margin-left: auto; }
  .navigation .nav-account.is-guest { display: none; }
  .navigation:has(.nav-account:not(.is-guest)) .nav-demo { display: none; }
  .navigation .nav-demo { min-height: 44px; height: 44px; padding: 0 11px; font-size: 12px; line-height: 1; white-space: nowrap; letter-spacing: 0; }
  body:not(.nav-subpage) .navigation .nav-demo { display: none; }
  .navigation .nav-demo svg { display: none; }
  .navigation .menu-toggle { width: 44px; height: 44px; min-width: 44px; padding: 10px; display: grid; place-items: center; }
  .navigation .menu-toggle .icon { width: 22px; height: 22px; }
  .navigation .nav-links { top: 66px; left: 8px; right: 8px; padding: 12px; gap: 2px; background: #121317; border-color: #ffffff30; box-shadow: 0 18px 45px #000b; backdrop-filter: none; }
  .navigation .nav-links a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; }
  .navigation .nav-links .mobile-nav-signin { display: flex; border-top: 1px solid #ffffff20; margin-top: 5px; padding-top: 5px; }
  body:not(.nav-subpage) .navigation .nav-links .mobile-nav-waitlist { display: flex; border-top: 1px solid #ffffff20; margin-top: 5px; padding-top: 5px; }
  .navigation:has(.nav-account:not(.is-guest)) .mobile-nav-signin { display: none; }

  #home .hero-copy .eyebrow { font-size: 9px; }
  #home .hero-copy > p { font-size: 13px; line-height: 1.55; }
  #home .hero .button { min-height: 48px; font-size: 13px; }
  #home .hero-note { font-size: 10px; line-height: 1.5; }

  #landing-page #product.demo-section { padding-top: 25px; }
  #landing-page #product .demo-top h2 { font-size: clamp(27px, 8vw, 34px); line-height: 1.08; }
  #landing-page #product .demo-header-tools { gap: 8px; }
  #landing-page #product .demo-routes,
  #landing-page #product .demo-expand { display: none; }
  #landing-page #product .demo-route-picker { display: flex; align-items: center; gap: 10px; min-width: 0; width: 100%; min-height: 44px; padding: 0 12px; color: #babac6; background: #1d1e22; border: 1px solid #ffffff2e; border-radius: 8px; font-size: 12px; }
  #landing-page #product .demo-route-picker select { flex: 1; min-width: 0; height: 44px; padding: 0 8px; color: #f0f0f4; background: transparent; border: 0; font-size: 14px; font-family: inherit; font-weight: 600; }
  #landing-page #product .demo-route-picker:focus-within { outline: 2px solid #b6dff7; outline-offset: 2px; }
  #landing-page #product .demo-mobile-tabs { height: 44px; gap: 0; }
  #landing-page #product .demo-mobile-tabs button { min-height: 44px; padding: 10px 3px; font-size: 14px; line-height: 1.15; }
  #landing-page #product .browser-tabs,
  #landing-page #product .browser-url { display: none; }
  #landing-page #product .extension-label { min-height: 32px; font-size: 12px; }
  #landing-page #product .browser-stage { height: 760px; min-height: 0; }
  #landing-page #product .scenario-tabs button { min-height: 44px; font-size: 11px; }
  #landing-page #product .demo-actions .j-button { min-height: 44px; font-size: 11px; }
  #landing-page #product .scenario-scroll { width: 44px; height: 44px; }
  #landing-page #product.is-focused .demo-mobile-tabs { height: 44px; }

  .pricing-v9 .price-intro { padding: 18px 0 7px; }
  .pricing-v9 .price-intro .v9-label { display: none; }
  .pricing-v9 .price-intro .v9-heading { font-size: clamp(33px, 10vw, 42px); line-height: 1.07; margin: 4px 0 11px; }
  .pricing-v9 .price-intro .v9-lede { font-size: 14px; line-height: 1.5; }
  .pricing-v9 .price-controls { margin-top: 16px; }
  .pricing-v9 .price-frequency button { min-height: 44px; font-size: 12px; }
  .pricing-v9 .price-controls .v10-yearly-saving { margin-top: 8px; font-size: 11px; }
  .pricing-v9 .b2b-billing-note { margin: 13px auto 0; font-size: 13px; line-height: 1.45; }
  .pricing-v9 .pricing-three { padding-top: 8px; gap: 18px; }
  .pricing-v9 .price-card { display: flex; flex-direction: column; padding: 20px; }
  .pricing-v9 .price-card-top { order: 0; margin-bottom: 12px; }
  .pricing-v9 .price-card h2 { order: 1; margin-top: 0; }
  .pricing-v9 .price-number { order: 2; }
  .pricing-v9 .price-card > .v9-btn { order: 3; min-height: 48px; font-size: 12px; }
  .pricing-v9 .price-summary { order: 4; }
  .pricing-v9 .plan-art { order: 5; height: 125px; margin: 18px auto 13px; width: 100%; }
  .pricing-v9 .access-pass { height: 110px; max-width: 230px; padding: 13px; }
  .pricing-v9 .price-card .feature-title { order: 6; }
  .pricing-v9 .price-features { order: 7; }
  .pricing-v9 .planned-features { order: 8; }

  .b2b-auth-page { padding-top: 70px; }
  .b2b-auth-form-wrap { padding-top: 19px; padding-bottom: 28px; }
  .b2b-auth-form-wrap h1 { font-size: 32px; }
  .b2b-auth-description { margin-bottom: 17px; font-size: 13px; line-height: 1.5; }
  .b2b-auth-switch button { min-height: 44px; }
  .b2b-auth-legal button[data-auth-policy],
  .b2b-auth-foot a { display: inline-flex; align-items: center; min-height: 32px; }
}

@media (max-width: 360px) {
  .navigation .brand { font-size: 17px; }
  .navigation .brand-mark { width: 22px; height: 22px; }
  .navigation .nav-demo { padding-inline: 8px; font-size: 11px; }
  #landing-page #product .demo-mobile-tabs button { font-size: 13px; }
}

@media (max-width: 650px) and (max-height: 700px) {
  #home.hero { height: 680px; min-height: 680px; max-height: 680px; }
  #home .fallback-bot.pink { top: 61%; }
  #home .fallback-bot.cyan { top: 62%; }
  #home .fallback-table { top: 82%; }
  .pricing-v9 .price-intro .v9-lede { display: none; }
}

/* Community must fit the actual viewport, including short landscape windows. */
#page-community.embedded-page.v9-page{height:100dvh;min-height:0}
#page-community.embedded-page.v9-page iframe{height:calc(100dvh - 78px);min-height:0}
@media(max-width:650px){#page-community.embedded-page.v9-page iframe{height:calc(100dvh - 66px)}}

/* Focused mobile fixes; original desktop composition and page contents remain. */
@media (max-width: 1000px) {
  #navigation .nav-links { align-items: stretch; max-height: calc(100dvh - 82px); overflow-y: auto; overscroll-behavior: contain; }
  #navigation .nav-links > a { display: flex; align-items: center; align-self: stretch; box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; }
}
@media (max-width: 760px) {
  .hero-copy { text-shadow: 0 2px 16px #000; }
  .hero-copy > p, .hero-copy .hero-note { color: #d9d9df; }
  .hero-copy { background: linear-gradient(180deg,#08090a85,transparent); border-radius: 16px; }
  .j-heading, .momentum-copy, .conversation-copy, .v10-possibility-copy { position: relative; z-index: 2; }
  .j-heading > div, .momentum-copy, .conversation-copy, .v10-possibility-copy, .usecase-tabs { background: #08090af2; border-radius: 12px; padding: 14px; }
  #landing-page [data-scrub] .scrub-word { opacity: 1 !important; color: inherit !important; }
  .conversation-copy h2 { font-size: clamp(30px,8.5vw,38px); color: #f1f0f4; }
  .conversation-copy > p, .v10-possibility-copy p { color: #c6c5ce; }
  .horizon-main > p, .horizon-main > small { display: block; width: fit-content; max-width: 100%; padding: 8px 12px; border-radius: 8px; background: #08090af2; color: #dedee6; }
  .horizon-main h2 { text-shadow: 0 2px 20px #0009; }
  .j-heading h2, .momentum-copy h2 { color: #f1f0f4; }
  .j-heading p, .momentum-copy > p { color: #c6c5ce; }
  #company:not(.game-mode) { height: auto; min-height: 0 !important; }
  #company .mega-inner { width: calc(100% - 40px); padding: 38px 0 116px; }
  #company .mega-columns { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px 20px; }
  #company .mega-columns > div { min-width: 0; }
  #company .mega-columns a, #company .mega-columns button { width: 100%; max-width: 100%; white-space: normal; text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
  #company .mega-social { margin-top: 30px; padding-top: 22px; }
  #company .mega-social > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 12px; }
  #company .footer-invitation { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 24px 0; }
  #company .footer-game-start { width: 100%; min-height: 48px; margin: 4px 0 0; justify-content: space-between; }
  #company .mega-bottom { display: grid; grid-template-columns: 1fr; align-items: start; gap: 16px; padding-top: 24px; }
  #company .mega-bottom > * { min-width: 0; margin: 0; }
  #company .mega-bottom > button { min-height: 44px; text-align: left; justify-self: start; }
  #company .mega-bottom .footer-mark { flex-wrap: wrap; gap: 10px; }
  #company .mega-bottom .press-label { min-height: 44px; }
  #company:not(.game-mode) .footer-playfield { pointer-events: none; }
}
@media (max-width: 900px) {
  #page-pricing.pricing-v9 .pricing-three { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0; overscroll-behavior-x: contain; padding: 6px 0 16px; }
  #page-pricing.pricing-v9 .price-card { flex: 0 0 calc(100% - 24px); min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; padding: 20px; }
  #page-pricing.pricing-v9 .price-card:last-child { scroll-snap-align: end; }
  #page-pricing.pricing-v9 .price-card-top { order: 0; }
  #page-pricing.pricing-v9 .price-card h2 { order: 1; }
  #page-pricing.pricing-v9 .price-number { order: 2; }
  #page-pricing.pricing-v9 .price-card > .v9-btn { order: 3; margin-top: 18px; min-height: 44px; }
  #page-pricing.pricing-v9 .price-summary { order: 4; margin: 16px 0 0; }
  #page-pricing.pricing-v9 .plan-art { order: 5; margin: 18px 0; }
  #page-pricing.pricing-v9 .feature-title { order: 6; }
  #page-pricing.pricing-v9 .price-features { order: 7; }
  #page-pricing.pricing-v9 .planned-features { order: 8; }
  #page-pricing.pricing-v9 .planned-features > summary { display: flex; align-items: center; min-height: 44px; }
  .mobile-plan-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 4px; }
  .mobile-plan-controls[hidden] { display: none; }
  .mobile-plan-controls button { width: 44px; height: 44px; border: 1px solid #ffffff2c; border-radius: 8px; background: #17171c; color: #eeeeF4; cursor: pointer; }
  .mobile-plan-controls button[aria-disabled=true] { opacity: .45; }
  .mobile-plan-controls span { color: #c3c2ce; font-size: 12px; text-align: center; }
}
.mobile-plan-controls button:focus-visible, #page-pricing .pricing-three:focus-visible { outline: 2px solid #b6dff7; outline-offset: 3px; }
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) {
  html.line-break-open { overflow: hidden; }
  #company.game-mode { position: fixed; inset: 0; width: 100%; height: 100dvh !important; min-height: 0 !important; max-height: none; margin: 0; z-index: 20000; border-radius: 0; }
  #company.game-mode .footer-game-hud { top: max(14px,env(safe-area-inset-top,0px)); left: 16px; right: 16px; gap: 10px; padding: 0; }
  #company.game-mode .footer-game-hud h3 { font-size: 24px; }
  #company.game-mode .footer-game-hud .metrics { gap: 16px; }
  #company.game-mode .footer-game-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  #company.game-mode .footer-game-actions button { min-height: 44px; padding: 8px 12px; font-size: 11px; }
  #company.game-mode .footer-game-controls { left: 14px; right: 14px; bottom: max(14px,env(safe-area-inset-bottom,0px)); gap: 6px; }
  #company.game-mode .footer-game-controls > span { display: none; }
  #company.game-mode .footer-game-controls button { min-width: 54px; min-height: 44px; padding: 8px 14px; }
}
@media (max-width: 1000px) and (max-height: 500px) {
  #company.game-mode .footer-game-hud { display: flex; flex-wrap: nowrap; align-items: start; }
  #company.game-mode .footer-game-hud small { display: none; }
  #company.game-mode .footer-game-actions { width: auto; justify-content: end; }
  #company.game-mode .footer-game-hud .metrics b { font-size: 18px; }
  #company.game-mode .footer-game-hud h3 { font-size: 20px; white-space: nowrap; }
  #company.game-mode #game-overlay { left: 50%; width: min(300px,calc(100% - 32px)); transform: translateX(-50%); padding: 12px; }
  #company.game-mode #game-overlay-copy { font-size: 24px; margin-bottom: 8px; }
  #company.game-mode #game-overlay-detail { font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
}

/* The phone exchange reserves a separate relay row instead of positioning
   the logo against card coordinates that vary with text wrapping. */
@media (max-width: 650px) {
  #conversation .dialogue-sculpture { display: flex; flex-direction: column; align-items: flex-start; height: auto; min-height: 695px; padding-top: 14px; }
  #conversation .reply-card,
  #conversation .relay-token,
  #conversation .direction-chip,
  #conversation .sculpture-caption { position: relative; inset: auto; flex: none; }
  #conversation .reply-b { align-self: flex-end; }
  #conversation .relay-token { margin: 36px 0 36px 6%; }
  #conversation .direction-chip { margin-top: 32px; }
  #conversation .sculpture-caption { margin-top: 12px; }
}


/* Section03: one mobile glass surface carries the heading, choices and detail. */
@media (max-width: 650px) {
  #landing-page #possibilities.possibilities-section {
    box-sizing: border-box;
    width: calc(100% - 24px);
    margin: 16px auto;
    padding: 28px 16px 34px;
    border: 1px solid #ffffff2e;
    border-radius: 22px;
    background: rgba(12, 15, 22, .68);
    -webkit-backdrop-filter: blur(20px) saturate(.8);
    backdrop-filter: blur(20px) saturate(.8);
    box-shadow: inset 0 1px 0 #ffffff12, 0 18px 44px #00000021;
  }
  #landing-page #possibilities .j-heading > div,
  #landing-page #possibilities .usecase-tabs,
  #landing-page #possibilities .v10-possibility-copy {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  #landing-page #possibilities .j-heading > p {
    isolation: auto;
    text-shadow: none;
  }
  #landing-page #possibilities .j-heading > p::before { content: none; }
  #landing-page #possibilities .j-heading h2 { color: #f1f0f4; }
  #landing-page #possibilities .j-heading h2 em { color: #c6c5ce; }
  #landing-page #possibilities .j-heading .eyeline,
  #landing-page #possibilities .j-heading > p,
  #landing-page #possibilities .v10-possibility-copy .eyeline,
  #landing-page #possibilities .v10-possibility-copy > p,
  #landing-page #possibilities .v10-provider-pair,
  #landing-page #possibilities .usecase-tabs button,
  #landing-page #possibilities .usecase-tabs button small { color: #d6d8e2; }
  #landing-page #possibilities .usecase-tabs button { min-height: 48px; white-space: normal; }
  #landing-page #possibilities .usecase-tabs button[aria-selected=true] {
    color: #f1f0f4;
    border-bottom-color: #c0d8e9;
  }
  #landing-page #possibilities .usecase-tabs button:focus-visible,
  #landing-page #possibilities .v10-possibility-copy .j-button:focus-visible {
    outline: 2px solid #b6dff7;
    outline-offset: 3px;
    border-radius: 3px;
  }
  #landing-page #possibilities .v10-possibility-copy .j-button {
    min-height: 44px;
    background: transparent;
    border-radius: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  #landing-page #possibilities .v10-possibility-copy .j-button:hover { color: #fff; }
}


/* Let the existing Docs modal occupy the mobile viewport above site chrome. */
@media (max-width: 760px) {
 body.mobile-docs-nav-open { overflow: hidden; }
 body.mobile-docs-nav-open #page-docs #surface-docs {
  position: fixed; inset: 0; width: 100%; height: 100dvh;
  min-height: 0; z-index: 1000;
 }
}


/* Compact the pricing introduction within the existing mobile plan layout. */
@media (max-width: 900px) {
  #page-pricing .price-intro { padding: 12px 0 6px; }
  #page-pricing .price-intro .v9-label { display: none; }
  #page-pricing .price-intro .v9-heading {
    font-size: clamp(26px, 7.5vw, 34px);
    line-height: 1.08;
    margin: 0 0 8px;
  }
  #page-pricing .price-intro .v9-lede { font-size: 13px; line-height: 1.4; }
  #page-pricing .price-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 10px auto 0;
    gap: 10px !important;
  }
  #page-pricing .price-frequency { flex: 0 0 auto; padding: 3px; }
  #page-pricing .price-frequency button {
    min-width: 72px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 12px;
    line-height: 1.2;
  }
  #page-pricing .price-controls .v10-yearly-saving {
    display: block;
    flex: 1 1 100px;
    margin: 0;
    max-width: 160px;
    font-size: 11px;
    line-height: 1.4;
    text-align: left;
  }
  #page-pricing .v10-yearly-saving i,
  #page-pricing .v10-yearly-saving > [aria-hidden="true"] { display: none; }
  #page-pricing .v10-yearly-saving > span:first-of-type { display: block; }
  #page-pricing .b2b-billing-note { margin: 10px auto 0; font-size: 12px; line-height: 1.45; }
  #page-pricing .mobile-plan-controls { margin: 12px 0 2px; }
}

