/* fix-mode-switch (Luca, Forma note 0o4m8tqsrsmm, 26 Nov on v67, phone): "on mobile the gradient on top is too
   intense, and we should remove the full rome new media text and just keep the logo, on the top right put the glance
   and constellation in a drop down option section where you can click on the name of the mode you are on right now to
   see the other options to select and switch to". Phone only (<=700px); the desk header is unchanged. */
@media (max-width: 720px) {
  /* the logo alone, top left */
  .hd .name { display: none !important; }
  .hd { flex-wrap: nowrap !important; align-items: flex-start !important; }
  .hd .bar { padding: 4px 0 !important; }

  /* a lighter shade under the header: enough to read the logo and the mode name, not a dark band */
  /* note qvpqbj3c8100 (on v68): "still too high and intense": only as tall as the bar, and faint */
  html body .hd::before { inset: -10px -12px -6px -12px !important;
    background: linear-gradient(180deg, rgba(10,10,10,.3) 0%, rgba(10,10,10,.12) 60%, rgba(10,10,10,0) 100%) !important; }
  .hd .logo, .hd nav a[aria-current="page"] { text-shadow: 0 1px 8px rgba(0,0,0,.85); }
  .hd .logo { filter: brightness(0) invert(1) drop-shadow(0 1px 6px rgba(0,0,0,.8)) !important; }

  /* the mode switch, top right: the current mode's name; tap it for the others */
  .hd nav { flex: 0 0 auto !important; margin: 4px 0 0 auto !important; display: flex !important; flex-direction: column !important;
    align-items: stretch !important; gap: 0 !important; overflow: visible !important; -webkit-mask-image: none !important; mask-image: none !important;
    min-width: 0; border-radius: 10px; transition: background-color .18s ease, box-shadow .18s ease; }
  .hd:not(.ms-open) nav a:not([aria-current="page"]) { display: none !important; }
  .hd nav { position: relative !important; top: auto !important; right: auto !important; }
  .hd .bar { margin-right: 0 !important; }
  /* v68 (glance-rail.css) drew the two modes as icons; the note asks for their names in a drop-down */
  .hd nav a { width: auto !important; height: auto !important; display: block !important; place-items: initial !important;
    font: 400 11px/1 "Space Mono", monospace !important; letter-spacing: .06em !important; text-transform: uppercase;
    padding: 10px 12px !important; min-height: 24px; text-align: right; text-decoration: none !important; }
  .hd nav a .ni { display: none !important; }
  .hd nav a .nt { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; }
  .hd nav a .lk { position: static !important; }
  .hd nav a[aria-current="page"] { color: var(--cream, #F4F1EE) !important; }
  .hd.ms-multi nav a[aria-current="page"]::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg);
    transition: transform .18s ease; }
  .hd.ms-open nav { background: rgba(14,13,20,.92); box-shadow: 0 0 0 1px rgba(244,241,238,.14), 0 10px 30px rgba(0,0,0,.5);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .hd.ms-open nav a[aria-current="page"] { order: -1; }
  .hd.ms-open nav a[aria-current="page"]::after { transform: translateY(1px) rotate(225deg); }
  .hd.ms-open nav a:not([aria-current="page"]) { border-top: 1px solid rgba(244,241,238,.1) !important; color: var(--silver, #B9B6C2); }
  .hint { top: calc(58px + var(--safe-t, 0px)) !important; }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .hd nav, .hd nav a::after { transition: none !important; }
}

/* fix-sheet-fade (Luca, note ngpj1ec20fh0, 26 Nov on v70, phone): the open drop-down is invisible too: no panel, no
   rim, no blur, no rule between the rows; the other mode's name appears under the current one, shaded to read on
   any photo. */
@media (max-width: 720px) {
  .hd.ms-open nav { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .hd.ms-open nav a:not([aria-current="page"]) { border-top: 0 !important; color: var(--silver, #B9B6C2);
    text-shadow: 0 1px 8px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.7); }
  .hd.ms-open nav a:not([aria-current="page"]):active { color: var(--cream, #F4F1EE); }
}

/* fix-mode-tools (Luca, Forma notes on v76, 27 Nov): see landing-hub/modetools_fix.py */
/* ynxrq9a0idk0 + dgo9hws2e350: the map's legend bottom left, phone and desk; a node's caption sits above it.
   (The phone rule is the same, value for value, as fix-mobile-motion's.) */
@media (min-width: 601px) {
  .cg-key { right: auto; left: 18px; top: auto; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .cg-cap { left: 18px; bottom: calc(22px + 100px + env(safe-area-inset-bottom, 0px)); }
  /* v1g619vkrr00: 3D / Flat next to the view switch (Your network / Members' map), on its line, just left of it */
  .cg-dim { top: var(--cg-top, 72px); right: calc(14px + var(--cg-vw, 150px) + 8px); }
}
@media (max-width: 600px) {
  .cg-key { right: auto; left: 10px; top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .cg-cap { left: 10px; bottom: calc(14px + 92px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 96px); }
}

/* sg7g5qc1ad00, desk: the tools after the two modes, behind a thin rule, quieter than the modes */
@media (min-width: 721px) {
  .hd nav .ms-sep { flex: none; align-self: center; width: 1px; height: 14px; margin: 0 8px; background: rgba(244,241,238,.22);
    font-size: 0; overflow: hidden; }
  .hd nav a.ms-tool { color: var(--silver, #B9B6C2); opacity: .82; }
  .hd nav a.ms-tool:hover, .hd nav a.ms-tool:focus-visible { opacity: 1; color: var(--cream, #F4F1EE); }
  .hd nav a.ms-tool[aria-disabled="true"] { opacity: .5; cursor: default; }
  .hd nav a.ms-tool small { display: none; }
}

/* kn4aofkbon80, phone: the mode drop-down reads as a control. Closed: the mode name in a faint glass pill with a thin
   rim. Open: a dark glass panel, rim and shadow, 44 px rows, the tools under a small label. */
@media (max-width: 720px) {
  html body .hd:not(.ms-open) nav a[aria-current="page"] {
    padding: 9px 13px 9px 15px !important; border-radius: 999px; border: 1px solid rgba(244,241,238,.3) !important;
    background: rgba(14,13,20,.58) !important; box-shadow: 0 4px 16px rgba(0,0,0,.35) !important;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-shadow: none; }
  html body .hd.ms-open nav {
    min-width: 200px; padding: 4px 0 6px; border-radius: 14px;
    background: rgba(14,13,20,.9) !important;
    box-shadow: 0 0 0 1px rgba(244,241,238,.16), 0 14px 36px rgba(0,0,0,.6) !important;
    -webkit-backdrop-filter: blur(14px) !important; backdrop-filter: blur(14px) !important; }
  html body .hd.ms-open nav a { min-height: 44px; box-sizing: border-box; display: flex !important; align-items: center !important;
    justify-content: flex-end !important; padding: 0 16px !important; font-size: 12px !important; text-shadow: none !important; }
  html body .hd.ms-open nav a[aria-current="page"] { color: var(--cream, #F4F1EE) !important;
    border-bottom: 1px solid rgba(244,241,238,.1) !important; }
  html body .hd.ms-open nav a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
    margin-right: auto; background: var(--blue-hi, #8C95F0); box-shadow: 0 0 8px var(--blue-hi, #8C95F0); }
  html body .hd.ms-open nav a:not([aria-current="page"]) { color: #E4E0EA !important; }
  html body .hd.ms-open nav a:not([aria-current="page"]):active { background: rgba(244,241,238,.08); }
  html body .hd nav .ms-sep { display: none; }
  html body .hd.ms-open nav .ms-sep { display: block; margin-top: 4px; padding: 12px 16px 6px; text-align: right;
    border-top: 1px solid rgba(244,241,238,.1); font: 400 10px/1 "Space Mono", monospace; letter-spacing: .14em;
    text-transform: uppercase; color: #8E8A99; }
  html body .hd.ms-open nav a.ms-tool { color: #CFCBD6 !important; }
  html body .hd.ms-open nav a.ms-tool[aria-disabled="true"] { color: #7C7886 !important; }
  html body .hd.ms-open nav a.ms-tool small { font: inherit; font-size: 9.5px; letter-spacing: .08em; color: #7C7886; margin-right: 8px; }
}
