/* ==========================================================================
   UNDER THE THUMB — phones and small tablets (to 900 px)
   A phone is held at its foot, and the thumb reaches the lower half of the screen. So the way round the site
   is there, on every page and at every moment of reading it:
   - the dock: a bar that floats at the foot of the screen with the menu's button and the page that follows
     (markup: build_fa.py dock(); behaviour: the PHONES part of fa.js). The header keeps the brand, the sound
     and the language, and has no menu button of its own. Over the home page's scene, which fills the screen
     and has its own way on, the dock is the menu's button alone (.is-mini).
   - the map: the menu as a sheet that rises from the foot of the screen with the whole site on it as a route
     (markup: build_fa.py site_map()): the pages in the order the «next page» links walk them, the one you
     are on lit, the four businesses branching off the page they live on. It is closed where it was opened
     (the dock's button), by a pull down, or by a touch on the page above it.
   Also here: what arrives on a phone arrives at once (reveals), since a page scrolled by hand is read as it comes.
   Loaded after fa-menu.css (whose wide layout it replaces on phones) and before fa-touch.css.
   ========================================================================== */

.dock, .pmap { display: none; }

@media (max-width: 900px) {
  /* ---------- What arrives, arrives at once: a short rise, no wait (fa.js starts it just before it is seen) ---------- */
  .js .reveal { transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.55s var(--ease); }
  .js .reveal[data-delay="1"] { transition-delay: 0.04s; }
  .js .reveal[data-delay="2"] { transition-delay: 0.08s; }
  .js .reveal[data-delay="3"] { transition-delay: 0.12s; }
  .split-line > span { transition-duration: 0.6s; }

  /* ---------- The header: the brand, the sound, the language (the menu's button is in the dock) ---------- */
  .site-header .burger { display: none; }
  /* under the open map the header is away: the sheet has the screen */
  .menu-open .site-header, .menu-open .site-header.is-away { transform: translateY(-104%); visibility: hidden; transition: transform 0.4s var(--ease), visibility 0s linear 0.4s; }

  /* ---------- The dock ---------- */
  .dock {
    --glass: rgba(16, 44, 108, 0.8); --glass-line: rgba(226, 231, 234, 0.2);
    position: fixed; z-index: 610; inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: stretch; gap: 8px; height: 50px; color: var(--mist); pointer-events: none;
    opacity: 0; transform: translateY(26px); transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  }
  .dock.is-live, .no-js .dock { opacity: 1; transform: none; }
  /* (a field has the keyboard: the dock is out of its way) */
  .dock.is-off { opacity: 0; transform: translateY(150%); transition-duration: 0.25s; }
  .dock.is-off > * { pointer-events: none; }
  .dock > * {
    pointer-events: auto; position: relative; border-radius: 99px; border: 1px solid var(--glass-line);
    background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
    box-shadow: 0 16px 34px -16px rgba(2, 8, 26, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s var(--ease), opacity 0.35s var(--ease), background-color 0.4s, color 0.4s, border-color 0.4s, visibility 0s;
  }
  .dock > *:active { transform: scale(0.96); }
  .dock > *:focus-visible { outline: 2px solid var(--mist); outline-offset: 3px; }

  /* the menu's button: three lines and the word; a cross and «close» while the map is open */
  .dock__menu { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; }
  .no-js .dock__menu { display: none; }
  .dock__ico { position: relative; flex: none; width: 18px; height: 14px; }
  .dock__ico i { position: absolute; inset-inline-start: 0; width: 100%; height: 1.7px; border-radius: 2px; background: currentColor; transition: transform 0.45s var(--ease), opacity 0.25s; }
  .dock__ico i:nth-child(1) { top: 0; }
  .dock__ico i:nth-child(2) { top: 6.15px; width: 66%; }
  .dock__ico i:nth-child(3) { top: 12.3px; }
  .menu-open .dock__ico i:nth-child(1) { transform: translateY(6.15px) rotate(45deg); }
  .menu-open .dock__ico i:nth-child(2) { opacity: 0; }
  .menu-open .dock__ico i:nth-child(3) { transform: translateY(-6.15px) rotate(-45deg); }
  .dock__open, .dock__shut { overflow: hidden; max-width: 5.2em; padding-inline-start: 10px; padding-block: 4px; transition: max-width 0.45s var(--ease), padding 0.45s var(--ease), opacity 0.3s; }
  .dock__shut, .menu-open .dock__open { display: none; }
  .menu-open .dock__shut { display: block; }
  .menu-open .dock__menu { background: rgba(226, 231, 234, 0.14); border-color: rgba(226, 231, 234, 0.32); }

  /* the page that follows: a caption, its name, and the arrow in a disc of light */
  .dock__next { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: 10px; padding-inline: 18px 6px; text-align: start; }
  .dock__cap { grid-area: 1 / 1; font-size: 11.5px; font-weight: 500; line-height: 1.3; color: rgba(226, 231, 234, 0.66); transition: color 0.4s; }
  .dock__next b { grid-area: 2 / 1; font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.4s; }
  .dock__go { grid-area: 1 / 2 / 3 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mist); color: var(--navy); transition: background-color 0.4s, color 0.4s; }
  .dock__go svg { width: 17px; height: 17px; }
  [dir="ltr"] .dock__go svg { transform: scaleX(-1); }
  /* a long name on a narrow phone (fa.js measures it, a step at a time): the menu's button gives its word's room
     to it (.is-tight); then the name is set a size smaller (.is-small); then it takes two lines, without the
     caption (.is-two) */
  html:not(.menu-open) .dock.is-tight .dock__open { max-width: 0; padding-inline-start: 0; opacity: 0; }
  .dock.is-fitting .dock__open, .dock.is-fitting .dock__shut { transition: none; }
  .dock.is-small .dock__next b { font-size: 12.5px; }
  .dock.is-two .dock__cap { display: none; }
  .dock.is-two .dock__next b { grid-row: 1 / 3; line-height: 1.35; white-space: normal; text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  /* the page has been read to its end: the way on is lit */
  .dock.is-end .dock__next { background: var(--mist); border-color: var(--mist); }
  .dock.is-end .dock__cap { color: rgba(14, 49, 121, 0.7); }
  .dock.is-end .dock__next b { color: var(--navy); }
  .dock.is-end .dock__go { background: var(--navy); color: var(--mist); }
  /* under the open map only the button that closes it stays */
  .menu-open .dock__next { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s, visibility 0s linear 0.2s; }

  /* over a scene that fills the screen (the home page's): the menu's button alone, round, in the corner */
  html:not(.menu-open) .dock.is-mini .dock__next { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px); transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0s linear 0.3s; }
  html:not(.menu-open) .dock.is-mini .dock__open { max-width: 0; padding-inline-start: 0; opacity: 0; }

  /* the page's own «next page» button is the dock's on a phone */
  .hubfoot__next, .footer__next { display: none !important; }
  /* the last lines of a page clear the dock */
  .footer .footer__bottom { padding-bottom: calc(20px + 62px + env(safe-area-inset-bottom, 0px)); }
  footer.hubfoot { padding-bottom: calc(24px + 62px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }

  /* ---------- The map: the menu as a sheet from the foot of the screen ---------- */
  .menu__sheet, .menu__grid, .menu__foot, .menu__panel::before { display: none; }
  .menu .menu__panel {
    inset: auto 0 0; display: flex; flex-direction: column; max-height: calc(100% - 8px); border-radius: 28px 28px 0 0;
    transform: translateY(104%); transition: transform 0.36s var(--menu-back);
    box-shadow: 0 -30px 70px -30px rgba(2, 8, 26, 0.9);
  }
  .menu-open .menu .menu__panel { transform: none; transition: transform 0.62s var(--ease); }
  .menu .menu__panel.is-held { transition: none; }
  .menu .menu__in { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; transform: none; transition: none; }
  /* (a hair of light along the sheet's top edge) */
  .menu .menu__panel::after {
    inset: 0 0 auto; width: auto; height: 1px; opacity: 1; animation: none; box-shadow: none;
    background: linear-gradient(90deg, rgba(214, 228, 255, 0), rgba(214, 228, 255, 0.7) 30%, rgba(214, 228, 255, 0.7) 70%, rgba(214, 228, 255, 0));
  }
  .menu .menu__scroll {
    position: relative; inset: auto; flex: 1 1 auto; min-height: 0; display: block;
    padding: 8px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    -webkit-mask-image: none; mask-image: none;
  }
  .menu__veil { background: rgba(4, 13, 38, 0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

  .pmap { display: block; max-width: 520px; margin-inline: auto; outline: none; }
  .pmap__grab { display: block; width: 40px; height: 4px; margin: 0 auto 8px; border-radius: 4px; background: rgba(226, 231, 234, 0.3); }
  .pmap__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
  .pmap__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.6; color: var(--ice); }
  .pmap__title::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
  .pmap__lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 99px; border: 1px solid var(--menu-line); background: rgba(226, 231, 234, 0.04); }
  .pmap__lang > * { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 99px; font-size: 13.5px; font-weight: 500; line-height: 1; }
  .pmap__lang > [aria-current] { background: var(--blue); color: var(--white); }
  .pmap__lang a { font-family: "Inter", system-ui, sans-serif; font-size: 13px; letter-spacing: 0.02em; opacity: 0.85; }

  /* the route: a rail down the side, a numbered stop for every page */
  .pmap__route { position: relative; margin: 0; padding: 0; list-style: none; }
  .pmap__route::before { content: ""; position: absolute; inset-block: 24px; inset-inline-start: 15px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgba(169, 193, 245, 0.55), rgba(169, 193, 245, 0.16)); }
  .pstop__a { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 56px; padding: 4px 0; border-radius: 16px; -webkit-tap-highlight-color: transparent; }
  .pstop__a:active .pstop__t { transform: translateX(-3px); }
  [dir="ltr"] .pstop__a:active .pstop__t { transform: translateX(3px); }
  .pstop__n { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(169, 193, 245, 0.5); background: #0d2c70; color: var(--ice); font-size: 13.5px; font-weight: 500; line-height: 1; }
  .pstop__t { display: grid; min-width: 0; transition: transform 0.25s var(--ease); }
  .pstop__t b { font-size: 16.5px; font-weight: 500; line-height: 1.5; color: var(--white); text-wrap: balance; }
  .pstop__t small { font-size: 12px; line-height: 1.55; color: var(--menu-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pstop__go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(226, 231, 234, 0.2); color: rgba(226, 231, 234, 0.75); }
  .pstop__go svg { width: 15px; height: 15px; }
  [dir="ltr"] .pstop__go svg { transform: scaleX(-1); }
  /* you are here: the stop is lit and says so; on a business's page the stop it branches from keeps a ring */
  .pstop__a[aria-current="page"] .pstop__n { background: #dce7ff; border-color: #dce7ff; color: var(--navy); font-weight: 700; box-shadow: 0 0 0 5px rgba(169, 193, 245, 0.16), 0 0 18px 2px rgba(150, 182, 240, 0.55); }
  .pstop__a[aria-current="page"] .pstop__t b { font-weight: 700; color: var(--ice); }
  .pstop__a.is-parent .pstop__n { border-color: #dce7ff; box-shadow: 0 0 0 4px rgba(169, 193, 245, 0.14); }
  .pstop__here { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; border: 1px solid rgba(169, 193, 245, 0.45); background: rgba(169, 193, 245, 0.1); color: var(--ice); font-size: 11.5px; font-weight: 500; white-space: nowrap; }

  /* the four businesses: a branch off the rail, two by two */
  .pmap__biz { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 0 8px; padding: 0; padding-inline-start: 44px; list-style: none; }
  .pmap__biz::before { content: ""; position: absolute; top: 22px; inset-inline-start: 16px; width: 22px; height: 2px; border-radius: 2px; background: rgba(169, 193, 245, 0.3); }
  .pmap__biz > li { display: flex; min-width: 0; }
  .pbiz { flex: 1; min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; column-gap: 9px; min-height: 46px; padding: 6px 9px; border-radius: 14px; border: 1px solid var(--menu-line); background: linear-gradient(160deg, rgba(27, 66, 152, 0.75), rgba(13, 43, 109, 0.75)); -webkit-tap-highlight-color: transparent; transition: transform 0.25s var(--ease); }
  .pbiz:active { transform: scale(0.97); }
  .pbiz__viz { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgba(78, 114, 184, 0.34); color: var(--mist); }
  .pbiz__viz svg { width: 66%; height: 66%; overflow: visible; }
  .pbiz__viz circle[stroke-dasharray] { stroke-dasharray: none; opacity: 0.3; }
  .pbiz__t { display: grid; min-width: 0; }
  .pbiz__t b { font-size: 14.5px; line-height: 1.4; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pbiz__t small { font-size: 11px; line-height: 1.45; color: var(--menu-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pbiz[aria-current="page"] { border-color: rgba(169, 193, 245, 0.65); background: rgba(169, 193, 245, 0.16); }
  .pbiz[aria-current="page"] .pbiz__viz { background: #dce7ff; color: var(--navy); }
  .pbiz[aria-current="page"] .pbiz__t b { color: var(--ice); }

  /* the quick ways to reach Karun share the sheet's last row with the dock's button, which closes the map */
  .pmap__quick { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 50px; margin: 8px 0 0; padding: 0; padding-inline-start: 112px; list-style: none; }
  .pquick { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(226, 231, 234, 0.24); color: var(--mist); -webkit-tap-highlight-color: transparent; transition: transform 0.25s var(--ease), background-color 0.3s; }
  .pquick:active { transform: scale(0.94); background: rgba(226, 231, 234, 0.12); }
  .pquick svg { width: 19px; height: 19px; }

  /* a narrow phone: the businesses' cards a little tighter, so each keeps its two words whole */
  @media (max-width: 350px) {
    .pmap__biz { gap: 5px; padding-inline-start: 36px; }
    .pmap__biz::before { width: 16px; }
    .pbiz { grid-template-columns: 24px minmax(0, 1fr); column-gap: 6px; padding: 6px; }
    .pbiz__viz { width: 24px; height: 24px; border-radius: 8px; }
    .pstop__t b { font-size: 15.5px; }
  }
  /* a short screen: the stops without their few words, so the whole map is on it */
  @media (max-height: 619px) {
    .pstop__a { min-height: 48px; }
    .pstop__t small { display: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock, .dock > *, .dock__ico i, .dock__open, .dock__shut { transition: none !important; }
  .dock { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .dock > * { background: Canvas; border-color: CanvasText; }
}
