/* Salvo quick rail — quick links above the floating enquiry controls.
   Pairs with salvo-quick-rail.js. Ships as a file (not inline) because the Hub's
   Content-Security-Policy only allows same-origin stylesheets. */

#salvo-quick-rail {
  box-sizing: border-box;
  position: fixed;
  left: max(10px, env(safe-area-inset-left, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  bottom: var(--sqr-bottom, 84px);
  z-index: 57;
  display: flex;
  padding: 7px 6px;
  background: rgba(11, 15, 7, .96);
  border: 1px solid rgba(210, 255, 72, .18);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(11, 15, 7, .22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: "Space Grotesk", Inter, sans-serif;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, bottom .2s ease;
}

@media (min-width: 761px) {
  #salvo-quick-rail {
    left: auto;
    right: max(20px, env(safe-area-inset-right, 0px));
    width: 340px;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  #salvo-quick-rail { right: max(14px, env(safe-area-inset-right, 0px)); }
}

#salvo-quick-rail.sqr-hide {
  visibility: hidden;
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
}

#salvo-quick-rail a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #A8B49A;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  min-height: 44px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

#salvo-quick-rail .sqr-t {
  width: 44px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #D2FF48;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

#salvo-quick-rail svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Only hover-capable pointers get the lift: touch taps must not leave a sticky tile. */
@media (hover: hover) and (pointer: fine) {
  #salvo-quick-rail a:hover { color: #D2FF48; }
  #salvo-quick-rail a:hover .sqr-t {
    background: #D2FF48;
    color: #0B0F07;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(210, 255, 72, .18);
  }
}

#salvo-quick-rail a:active .sqr-t {
  background: #D2FF48;
  color: #0B0F07;
  transform: scale(.94);
}

/* The page you are on lights up as a lime tile. */
#salvo-quick-rail a[aria-current] { color: #D2FF48; }
#salvo-quick-rail a[aria-current] .sqr-t { background: #D2FF48; color: #0B0F07; }

#salvo-quick-rail a:focus-visible {
  outline: 2px solid #D2FF48;
  outline-offset: 2px;
  border-radius: 12px;
}
#salvo-quick-rail a:focus-visible .sqr-t { background: #D2FF48; color: #0B0F07; }

#salvo-quick-rail .sqr-links { display:flex; flex:1; min-width:0; }
#salvo-quick-rail .sqr-links[hidden] { display:none; }
#salvo-quick-rail .sqr-toggle {
  appearance:none; display:flex; align-items:center; justify-content:center; gap:6px;
  flex:0 0 44px; align-self:center; min-height:44px; margin:0; padding:0;
  border:0; border-left:1px solid rgba(210,255,72,.18); border-radius:0 12px 12px 0;
  background:transparent; color:#D2FF48; font:700 12px/1.2 "Space Grotesk",Inter,sans-serif;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
#salvo-quick-rail .sqr-toggle:hover { background:#1B2210; }
#salvo-quick-rail .sqr-toggle:focus-visible { outline:2px solid #D2FF48; outline-offset:2px; }
#salvo-quick-rail .sqr-toggle-text { display:none; }
#salvo-quick-rail.sqr-collapsed { left:auto; width:max-content; max-width:calc(100% - 20px); padding:2px 8px; border-radius:999px; }
#salvo-quick-rail.sqr-collapsed .sqr-toggle { flex:0 1 auto; padding:0 6px; border:0; border-radius:999px; }
#salvo-quick-rail.sqr-collapsed .sqr-toggle-text { display:inline; }
#salvo-quick-rail.sqr-collapsed .sqr-toggle svg { transform:rotate(180deg); }

/* On desktop, the quick links sit between the two corner controls. */
@media (min-width: 1101px) {
  #salvo-quick-rail,
  #salvo-quick-rail.sqr-collapsed {
    left: 0;
    right: 0;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    margin-inline: auto;
  }
}

/* Step aside in the same situations the other floating controls do. */
body:has(#nav.nav-open) #salvo-quick-rail,
body:has(.salvo-consent-layer:not([hidden])) #salvo-quick-rail,
body:has(.salvo-consent-bar:not([hidden])) #salvo-quick-rail,
body:has(input:focus, textarea:focus, select:focus, [contenteditable]:focus) #salvo-quick-rail,
body[data-weekly-article] #salvo-quick-rail {
  visibility: hidden;
  pointer-events: none;
}

/* Lift the website-activity toast so it sits above the rail instead of on top of it. */
body.sqr-on .salvo-social-proof { bottom: var(--sqr-clear, 160px) !important; }

@media (prefers-reduced-motion: reduce) {
  #salvo-quick-rail, #salvo-quick-rail .sqr-t { transition: none; }
  #salvo-quick-rail a:is(:hover, :active) .sqr-t { transform: none; }
}
