/* 2026-11-01 (back): Back beside the trail, the trail's last item and a Top button to the top of the page, and on a phone the
   path of a page opened from a list (next-back.js). Colours are the v8 tokens, so both themes follow the theme switch. */

.vbn-back { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 32px; padding: 0 10px 0 6px; margin: 0; border: 0; border-radius: var(--v8-r-ctl, 10px); background: none; color: var(--v8-t2, #525252); font: 500 14px/20px var(--v8-sans, inherit); cursor: pointer; white-space: nowrap; }
.vbn-back[hidden] { display: none !important; }
.vbn-back svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.vbn-back:hover { background: var(--v8-raised, #f4f4f5); color: var(--v8-t1, #171717); }
.vbn-back:focus-visible { outline: 2px solid var(--v8-accent, #1764f5); outline-offset: 2px; }

/* the page you are on, in the trail: a click takes you to its top */
header.top .vk-crumb > b, #vbnPath > b { cursor: pointer; }
#view .page > :is(.crumbs, .v89-crumbs) > :last-child:not(a) { cursor: pointer; }

/* Top: appears once the page is a screen down */
.vbn-top { position: fixed; right: 24px; bottom: 24px; z-index: 45; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px; border: 0; border-radius: 18px; background: var(--v8-card, #fff); color: var(--v8-t1, #171717); box-shadow: 0 0 0 1px var(--v8-hair, rgba(23, 23, 23, .08)), 0 6px 16px rgba(16, 24, 40, .10); font: 500 13px/20px var(--v8-sans, inherit); cursor: pointer; }
.vbn-top[hidden] { display: none !important; }
.vbn-top svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.vbn-top:hover { background: var(--v8-raised, #f4f4f5); }
.vbn-top:focus-visible { outline: 2px solid var(--v8-accent, #1764f5); outline-offset: 2px; }
:root[data-theme="dark"] .vbn-top { box-shadow: 0 0 0 1px var(--v8-hair), 0 8px 20px rgba(0, 0, 0, .45); }
/* the guided tour's card holds that corner while it is open */
body.vdt-on .vbn-top { display: none !important; }

/* a phone's path row: only where the top bar has no room for the trail */
.vbn-path { display: none; }

@media (min-width: 700px) {
  .shell .main > header.top > .vbn-back { order: 1; margin-right: -2px; }
}
/* a tablet's bar holds the trail and every control: Back is its arrow alone, a 36px control like the others */
@media (min-width: 700px) and (max-width: 1099px) {
  .shell .main > header.top > .vbn-back { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .shell .main > header.top > .vbn-back > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 699px) {
  /* the phone's top bar is full: Back takes the gutter between the mark and the bar, a 44px target */
  .shell .main > header.top > .vbn-back { position: absolute; top: 50%; left: -46px; width: 44px; height: 44px; margin-top: -22px; padding: 0; justify-content: center; border-radius: 22px; color: var(--v8-t1, #171717); }
  .shell .main > header.top > .vbn-back > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shell .main > header.top > .vbn-back svg.i { width: 22px; height: 22px; }
  .vbn-top { right: 16px; bottom: calc(var(--vbn-tab, 0px) + 16px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 22px; }
  .vbn-top > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vbn-path { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 0; padding: 14px 16px 0; font: 400 14px/20px var(--v8-sans, inherit); color: var(--v8-t3, #737373); }
  .vbn-path a { color: var(--v8-t2, #525252); text-decoration: none; padding: 12px 0; margin: -12px 0; }
  .vbn-path a:hover { color: var(--v8-t1, #171717); text-decoration: underline; text-underline-offset: 3px; }
  .vbn-path em { font-style: normal; margin: 0 8px; opacity: .6; }
  .vbn-path b { font-weight: 500; color: var(--v8-t1, #171717); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
}
