/* Side rail navigation: page icons on the left edge (desktop), names appear on hover or focus. Below 1200px the rail is the top bar and the menu button is used instead. */
.header__support { display: none !important; }

.rail-nav { display: none; }

@media (min-width: 1200px) {
  /* Slimmer rail; --tm-rail-width (theme.css) is the single width every page offsets by. */
  .header__area { width: var(--tm-rail-width) !important; }
  .header__inner { padding: 16px 0 30px; justify-content: flex-start; } /* bottom space keeps the last (contact) icon off the screen edge */
  .header__logo__icon { width: 40px; height: 40px; padding: 4px; }
  .header__logo__icon .logo-primary { height: 32px; }

  /* The menu button is not needed on the rail any more. */
  .header__nav-icon { display: none; }

  .rail-nav {
    flex: 1 1 auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .14); /* divider under the logo */
  }
  .rail-nav ul { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
  .rail-nav li { position: relative; list-style: none; }
  /* Divider above the contact icon. Needs ul specificity: ".rail-nav ul" above resets padding to 0, which let the icon touch the line. */
  .rail-nav ul.rail-nav__end { margin-top: 12px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); }

  .rail-nav a {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    transition: background-color var(--tm-duration-normal) var(--tm-ease), color var(--tm-duration-normal) var(--tm-ease);
  }
  .rail-nav__icon { display: block; width: 20px; height: 20px; }
  .rail-nav a:hover, .rail-nav a:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
  .rail-nav a:focus-visible { outline: 2px solid var(--tm-color-accent); outline-offset: 2px; }
  .rail-nav a[aria-current="page"] { background: var(--tm-color-accent); color: var(--tm-color-ink); animation: rail-active-in .55s var(--tm-ease) both; }
  /* A soft amber ring that expands and fades once when the page loads, then a gentle idle pulse. */
  .rail-nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--tm-color-accent);
    pointer-events: none;
    animation: rail-active-ring 1.1s .25s ease-out 1 both, rail-active-pulse 3.2s 1.6s ease-in-out infinite;
  }
  .rail-nav li.rail-nav__cta { margin-top: -6px; } /* tighter gap between Life and Start your project */
  .rail-nav__cta a:not([aria-current="page"]) { color: var(--tm-color-accent); }

  /* Name pill to the right of the icon. */
  .rail-nav__label {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    z-index: 5;
    padding: 8px 14px;
    border-radius: var(--tm-control-radius);
    background: var(--tm-color-ink);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    font-family: var(--tm-font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-6px, -50%);
    transition: opacity var(--tm-duration-fast) var(--tm-ease), transform var(--tm-duration-fast) var(--tm-ease);
  }
  .rail-nav a:hover .rail-nav__label, .rail-nav a:focus-visible .rail-nav__label { opacity: 1; transform: translate(0, -50%); }
}
@media (min-width: 1920px) {
  .rail-nav a { width: 44px; height: 44px; }
  .rail-nav__icon { width: 22px; height: 22px; }
}
@keyframes rail-active-in { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rail-active-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
@keyframes rail-active-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 172, 11, 0); } 50% { box-shadow: 0 0 0 6px rgba(255, 172, 11, .16); } }
@media (prefers-reduced-motion: reduce) {
  .rail-nav a, .rail-nav__label { transition: none; }
  .rail-nav a[aria-current="page"], .rail-nav a[aria-current="page"]::after { animation: none; }
  .rail-nav a[aria-current="page"]::after { display: none; }
}
