.mobile-collection-menu { display: none; }
.mobile-utility-menu { display: none; }
.mobile-field-app { display: none; }
@media (max-width: 650px), (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
  .site-header .site-nav .page-share > summary { color: #111; }
  .site-header .mobile-field-app { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 8px 0 18px; padding: 18px 16px; border: 2px solid var(--red); background: #b60000; color: #fff; text-decoration: none; }
  .site-header .mobile-field-app-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #fff; }
  .site-header .mobile-field-app strong { display: block; font-size: 17px; line-height: 1.3; }
  .site-header .mobile-field-app strong + span { display: block; margin-top: 3px; font-size: 14px; }
  .site-header .mobile-field-app-arrow { font-size: 24px; }
  .site-header .mobile-field-app:hover { background: #900000; }
  .site-header .mobile-field-app:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
  .site-header .mobile-collection-menu { margin-bottom: 0; }
  .site-header .mobile-utility-menu { display: block; margin: 0 0 18px; }
  .site-header .mobile-utility-group { border-bottom: 1px solid var(--line); }
  .site-header .mobile-utility-group > summary { color: var(--ink); }
  .site-header .mobile-utility-group > summary::marker { color: currentColor; }
  .site-header .mobile-utility-group > p { margin: 0 0 8px; color: #555; font-size: 14px; line-height: 1.5; }
  .site-header .mobile-utility-links { display: grid; padding-bottom: 12px; }
  .site-header .mobile-utility-links > a { display: grid; grid-template-columns: 3.5em minmax(0, 1fr); gap: 10px; align-items: center; min-height: 48px; padding: 12px 0; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
  .site-header .mobile-utility-reference { color: var(--red); font-size: 12px; font-weight: 800; }
  .site-header .mobile-utility-links > a:hover { text-decoration: underline; text-underline-offset: 4px; }
  .site-header .mobile-utility-links > a:focus-visible, .site-header .mobile-utility-group > summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
}
.mobile-hero-divisions { display: none; }
.site-header .mobile-division-menu .mobile-collection-options { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
.site-header .mobile-division-menu .mobile-collection-options > a { display: grid; grid-template-columns: 3em minmax(0, 1fr); align-items: center; gap: 12px; }
.mobile-division-reference { color: var(--red); font-weight: 800; letter-spacing: .08em; }
.mobile-division-name { min-width: 0; text-align: right; }
@media (max-width: 650px) {
  /* These links belong to the hero, not the fixed rail. They scroll away
     naturally while the independent red line remains on the page. */
  .hero > .mobile-hero-divisions {
    position: absolute;
    z-index: 6;
    top: calc(var(--header-h) + 12px);
    left: calc(var(--linea-rail-x) + 12px);
    width: 44px;
    height: min(720px, calc(100svh - var(--header-h) - 28px));
    max-width: calc(100% - 40px);
    display: grid;
    justify-items: stretch;
    grid-template-rows: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1.2fr);
    gap: 6px;
    pointer-events: none;
  }
  .mobile-hero-divisions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 0;
    padding: 3px 5px;
    max-width: 100%;
    color: #fff;
    background: transparent;
    font: 800 clamp(9px, calc((100svh - var(--header-h) - 28px) / 48), 18px)/1 var(--sans);
    letter-spacing: .1em;
    word-spacing: .16em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-decoration: none;
    white-space: nowrap;
    pointer-events: auto;
  }
  .mobile-hero-divisions a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .mobile-hero-divisions a:hover { color: #ff6666; }
  .walking-intro-review body.walking-intro-rail .mobile-hero-divisions a {
    animation: home-division-appear .25s ease var(--walking-rail-delay, 0s) both;
  }
  .walking-intro-review body.walking-intro-rail .mobile-hero-divisions a.is-spoken,
  .walking-intro-review body.walking-rail-return .mobile-hero-divisions a { color: #ff6666; }
  html body main > .hero.hero--knowledge-slideshow[data-page-intro]:has(> .mobile-hero-divisions) { padding-top: calc(var(--header-h) + 48px); padding-left: calc(var(--linea-rail-x) + 68px); }
  .hero:has(> .mobile-hero-divisions) .hero-division-links { display: none; }
  body.nav-open .mobile-hero-divisions { visibility: hidden; pointer-events: none; }
}
@media (max-width: 650px) and (prefers-reduced-motion: reduce) {
  .walking-intro-review body.walking-intro-rail .mobile-hero-divisions a { animation: none; }
}
/* During the portrait introduction only, use a narrow vertical title rail
   inside the video, just to the right of the red line. */
@media (max-width: 650px) and (orientation: portrait) {
  .hero.is-walking-intro-active > .mobile-hero-divisions {
    top: calc(var(--header-h) + 8px);
    left: calc(var(--linea-rail-x) + 4px);
    width: 44px;
    height: min(560px, calc(100svh - var(--header-h) - 100px));
    grid-template-rows: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1.2fr);
    gap: 6px;
  }
  .hero.is-walking-intro-active > .mobile-hero-divisions a {
    writing-mode: vertical-rl;
    justify-content: center;
    min-width: 44px;
    min-height: 0;
    padding: 6px;
    font-size: clamp(8px, calc((100svh - var(--header-h) - 100px) / 48), 12px);
    font-weight: 850;
    letter-spacing: .1em;
    line-height: 1;
    text-transform: uppercase;
    background: transparent;
  }
}
@media (max-width: 650px) and (max-height: 700px) {
  /* Keep the welcome countdown below the four links on compact phones. */
  .hero .walking-welcome { padding: 196px 0 68px; }
  .hero .walking-welcome-copy { gap: 12px; }
  .hero .walking-countdown { width: 72px; font-size: 48px; }
  .hero .walking-welcome-copy p { font-size: 20px; }
  .hero .walking-welcome-logo { width: 140px; }
}
@media (max-width: 650px) {
  .page-share-panel { left: 0; right: auto; width: min(360px, 100%); }
}
@media (max-width: 650px) {
  .header-breadcrumb { right: calc(var(--gutter) + 70px); }
  .site-header { padding-left: 76px; }
  .site-header .site-nav:not(.is-open) { pointer-events: none; }
  .site-header .site-nav.is-open { pointer-events: auto; }
  .site-nav .nav-link, .site-nav .nav-trigger { display: flex; align-items: center; min-height: 48px; }
}
@media (max-width: 900px) {
  .relationship-row { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; }
  .relationship-row p { grid-column: 2; }
  .motion-enabled .relationship-row.reveal,
  .motion-enabled .division-grid .reveal:nth-child(n),
  .motion-enabled .work-grid .reveal:nth-child(n),
  .motion-enabled .portfolio-grid .reveal:nth-child(n) { --reveal-x: 0; --reveal-y: 26px; }
  .home-hero-knowledge .knowledge-hero-brandmark { opacity: 1; }
}
@media (min-width: 651px) and (max-width: 900px) {
  .hero, .page-hero, .section, .cta, .site-footer { padding-left: max(96px, calc(var(--linea-rail-x) + 24px)); }
}
@media (max-width: 650px) {
  /* Phone navigation lives in one menu; the brand rule underlines the header. */
  :root { --header-h: 124px; --linea-rail-x: 8px !important; --linea-rail-width: 2px !important; }
  .linea-rail { inset: calc(var(--header-h) - 2px) 0 auto; width: 100%; height: 2px; transform: none; clip-path: inset(0); }
  .motion-enabled body.linea-rail-ready .linea-rail,
  .motion-enabled body.is-scrolled.linea-rail-ready .linea-rail { clip-path: inset(0); transform: none; }
  .motion-enabled body.rail-intro-pending .linea-rail { clip-path: inset(0 100% 0 0); }
  .motion-enabled body.rail-intro-running .linea-rail { animation: phone-rail-draw var(--rail-draw-duration, 4500ms) linear both; }
  @keyframes phone-rail-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
  /* Sharing travels with the contact icons; keep logo and menu touch targets separate. */
  .site-header, .site-header:has(.brand--division) { grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; padding-left: 24px; padding-right: 18px; border-bottom-color: transparent; }
  .site-header .brand { grid-column: 1; grid-row: 1; --header-brand-width: 145px; width: min(145px, 100%); }
  .header-breadcrumb { display: none; }
  .mobile-view-note { display: block; grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 14px; line-height: 1.25; text-align: left; color: #555; }
  .site-header.is-scrolled:not(.is-on-light) .mobile-view-note { color: #eee; }
  .menu-toggle { grid-column: 2; grid-row: 1; }
  .page-share > summary { min-height: 44px; font-size: 10px; letter-spacing: .04em; gap: 3px; white-space: nowrap; }
  /* Preserve the 145px wordmark and its full lockup; controls use their own row. */
  :root:has(.brand--division) { --header-h: 162px; }
  .site-header:has(.brand--division) { grid-template-rows: 51px 1fr; }
  .site-header .brand--division { grid-column: 1 / -1; grid-row: 1; }
  .site-header:has(.brand--division) .menu-toggle { grid-row: 2; }
  .site-header:has(.brand--division) .mobile-view-note { grid-column: 2; }
  .mobile-collections-ready .division-rail-nav,
  .mobile-collections-ready .focus-viewer .focus-rail,
  .mobile-collections-ready .project-route-rail,
  .mobile-collections-ready .portfolio-route-rail { display: none; }
  .mobile-collection-menu { display: grid; gap: 0; margin-bottom: 18px; }
  .mobile-collection-menu details, .mobile-utility-menu details { border-bottom: 1px solid var(--line); }
  .mobile-division-menu { border-bottom: 1px solid var(--line); }
  .mobile-collection-heading { margin: 0; padding: 15px 0; min-height: 48px; font: inherit; font-size: 16px; font-weight: 800; }
  .mobile-collection-menu summary, .mobile-utility-menu summary { padding: 15px 0; min-height: 48px; cursor: pointer; font-size: 16px; font-weight: 800; }
  .mobile-collection-options { display: grid; padding: 0 0 14px 12px; }
  .mobile-collection-options a,
  .mobile-collection-options button { display: block; width: 100%; min-height: 48px; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; font: inherit; font-size: 16px; text-align: left; line-height: 1.4; }
  .mobile-collection-options [aria-current="page"],
  .mobile-collection-options [aria-pressed="true"] { color: var(--red); font-weight: 800; }
  .mobile-collection-options :is(a, button):focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
  .site-nav { padding: 12px 24px 32px; max-height: calc(100dvh - var(--header-h)); overscroll-behavior: contain; }
  .hero, .page-hero, .section, .cta, .site-footer { padding-left: 24px; padding-right: 24px; }
  .hero { min-height: 660px; }
  .page-hero { min-height: 580px; }
  .hero-title, .page-hero h1 { font-size: clamp(40px, 12vw, 64px); }
  .hero-slideshow-controls { gap: 12px; margin-top: 24px; }
  .hero-slideshow-countdown { display: none; }
  .hero-slideshow-selectors { gap: 6px; }
  .hero-slideshow-selectors button { min-width: 40px; padding-inline: 10px; }
  .knowledge-hero-brandmark::after { display: none; }
  .page-hero-content, .section-inner { min-width: 0; }
  .page-hero .summary, .hero-summary { font-size: 18px; }
  .focus-viewer, .focus-stage { min-width: 0; }
  .project-overview-grid { padding: 20px; }
  .portfolio-entry-card { --entry-card-padding: 24px; padding: var(--entry-card-padding); }
  .portfolio-type-control { min-width: 0; }
  .portfolio-type-control select { width: 100%; min-width: 0; }
  .video-grid { grid-template-columns: minmax(0, 1fr); }
  .video-card { min-width: 0; overflow-wrap: anywhere; }
  .youtube-frame, .youtube-frame iframe { min-height: 0; }
  .design-gallery-dialog img { height: auto; max-height: 58dvh; }
  .partners-intro { padding-top: calc(var(--header-h) + 48px); }
  .portfolio-page-links { gap: 8px 18px; }
  .portfolio-page-links a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 650px) and (prefers-reduced-motion: reduce) {
  .motion-enabled body.rail-intro-running .linea-rail { animation: none; clip-path: inset(0); }
}
