/* ── The rail ──────────────────────────────────────────────────────────────
   One navigation on every signed-in page: Home, Blueprints, Knowledge
   sources, Privacy. Built by shared/rail.js; this is its only stylesheet.

   Pages lay themselves out from --rail. It is the rail's width while the rail
   is shown and 0 when it hides, so a page that starts at var(--rail) is right
   at every size without knowing when the rail goes. */

:root {
  --rail: 56px;
  --rail-accent: #22D9E8;
  --rail-accent-soft: rgba(34, 217, 232, 0.12);
  --rail-text: #F2F5F8;
  --rail-faint: rgba(242, 245, 248, 0.38);
}

.sv-rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 0;
  box-sizing: border-box;
  background: rgba(6, 13, 19, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.sv-rail__btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--rail-faint);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.sv-rail__btn:hover { color: var(--rail-text); background: rgba(255, 255, 255, 0.06); }

.sv-rail__btn:focus-visible { outline: 2px solid var(--rail-accent); outline-offset: 2px; }

/* Lit for the page you are on. */
.sv-rail__btn--on { color: var(--rail-accent); background: var(--rail-accent-soft); }

/* The marker sits outside the button so it lines up with the rail's edge
   rather than with the icon's padding. */
.sv-rail__btn--on::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  border-radius: 0 2px 2px 0;
  background: var(--rail-accent);
}

/* ── Narrow screens ─────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  :root { --rail: 0px; }
  .sv-rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-rail__btn { transition: none; }
}
