/* Family kit — the desktop rail folds to its icons (family rule 15). Extracted from Madar's live pargar.css, "the desktop
 * rail folds to its icons" (2026-09-27), and rewritten for the markup contract (contract.json "rail_markup"):
 *   .rail#rail > .rail-head (.lockup + .rail-toggle) · .nav (.grp, .navb[title] > svg + .lbl + .cnt) ·
 *   .rail-foot (.av, .rail-who, form > .rail-out > svg + .lbl)      -- Madar's own rail keeps `.nav a`; it is the source.
 * Above 861px the rail is open (the app's own width) or folded to a 72px strip of icons. The state is `rail-mini` on <html>,
 * flipped by rail-fold.js and applied before the first paint by rail-prepaint.html. The fold sits inside min-width:861px,
 * so a phone's drawer is untouched whatever the class says. Folded, nothing leaves the page: every label stays in the DOM,
 * visually hidden (not display:none); a keyboard focus shows it beside the rail (.rail-tip). Group titles become hairlines,
 * counts become badges on the icon. The tokens fall back to Madar's values so the file works on a bare page. */
.rail .rail-toggle {
  all: unset; box-sizing: border-box; cursor: pointer; display: none; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px; color: var(--rail-muted, #98b2aa);
}
.rail .rail-toggle:hover { background: var(--rail-hover, rgba(255, 255, 255, .06)); color: var(--rail-ink, #ece5d2); }
.rail .rail-toggle svg { width: 18px; height: 18px; }
.rail :focus-visible { outline: 2px solid var(--bronze-2, #c4a46f); outline-offset: 2px; }
.rail .switcher-fixed .ctx-ic { display: none; }
.rail .rail-foot .rail-out svg { display: none; }
.rail-tip { display: none; }
@media (min-width: 861px) {
  .js .rail .rail-toggle { display: grid; }
  html.rail-mini .app { grid-template-columns: 72px minmax(0, 1fr); }
  html.rail-mini .rail { padding: 18px 10px 14px; gap: 12px; overflow-x: hidden; }
  html.rail-mini .rail .rail-head { flex-direction: column; gap: 8px; }
  html.rail-mini .rail .lockup { flex: none; padding: 2px 0 0; justify-content: center; }
  html.rail-mini .rail .lockup-words, html.rail-mini .rail .ctx-words, html.rail-mini .rail .nav .lbl,
  html.rail-mini .rail .rail-who, html.rail-mini .rail .rail-foot .rail-out .lbl {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  html.rail-mini .rail .ctx > summary, html.rail-mini .rail .switcher-fixed { padding: 0; justify-content: center; min-height: 44px; }
  html.rail-mini .rail .ctx .car { margin: 0; opacity: .85; }
  html.rail-mini .rail .switcher-fixed .ctx-ic { display: grid; }
  html.rail-mini .rail .switcher-fixed .ctx-ic svg { width: 17px; height: 17px; }
  html.rail-mini .rail .nav .grp {
    font-size: 0; line-height: 0; padding: 0; height: 1px; margin: 8px 6px; overflow: hidden;
    background: rgba(255, 255, 255, .08);
  }
  html.rail-mini .rail .nav .navb { justify-content: center; gap: 0; padding: 0; min-height: 40px; }
  html.rail-mini .rail .nav .navb[aria-current="page"]::before { inset-inline-start: -10px; }
  html.rail-mini .rail .nav svg { width: 19px; height: 19px; }
  /* Opaque on the corner of the icon: the open rail's translucent badge would let the icon's strokes show through it. */
  html.rail-mini .rail .nav .cnt {
    position: absolute; top: 1px; inset-inline-end: 3px; margin: 0; font-size: 10px; line-height: 16px;
    padding: 0 4px; min-width: 16px; text-align: center; background: var(--rail-muted, #98b2aa); color: var(--pine-deep, #0f2a24);
  }
  html.rail-mini .rail .nav .cnt.hot { background: var(--bronze-2, #c4a46f); color: #1d160a; }
  html.rail-mini .rail .rail-foot { flex-direction: column; gap: 4px; padding: 10px 0 2px; }
  html.rail-mini .rail .rail-foot form { margin: 0; }
  html.rail-mini .rail .rail-foot .rail-out { width: 40px; padding: 0; justify-content: center; }
  html.rail-mini .rail .rail-foot .rail-out svg { display: block; width: 18px; height: 18px; }
  html.rail-mini .rail-tip {
    display: block; position: fixed; z-index: 70; transform: translateY(-50%); pointer-events: none;
    background: var(--ink, #1b2420); color: var(--surface, #fff); font-size: 12.5px; line-height: 1.5;
    padding: 5px 10px; border-radius: 8px; white-space: nowrap; box-shadow: var(--shadow-3, 0 8px 24px rgba(0, 0, 0, .25));
  }
  html.rail-mini .rail-tip[hidden] { display: none; }
}
