/* Tour pilot chrome — the proposal TOUR BANNER (pages/_tour-bar.twig), its
   collapsed tab, and the stub toast. Neutral ink/white on purpose: it must read
   as a proposal wrapper around the issuer's design, never as part of it.
   Everything visible here is hidden under html.tourbar-off (automation /
   ?tour=off — set before paint by the head script in _layout.twig). */

.tour-bar {
  position: relative;
  z-index: 70;              /* above the sticky site header (z-50) so the Pages panel overlays it */
  background: #0f172a;
  color: #fff;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.2;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}
.tour-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;      /* 44px */
  padding: 0 0.5rem 0 1rem;
  max-width: 100%;
}
.tour-bar__brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 2.75rem;
  color: #fff;
  text-decoration: none;
}
.tour-bar__logo { display: block; width: auto; height: 1.375rem; max-width: 7rem; }
.tour-bar__logo--plate { background: #fff; padding: 0.1875rem 0.5rem; border-radius: 0.25rem; box-sizing: content-box; }
.tour-bar__wordmark { font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.01em; }

.tour-bar__context {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
}
.tour-bar__eyebrow { color: #cbd5e1; flex: none; }
.tour-bar__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tour-bar__title::before { content: '/'; margin-right: 0.625rem; color: #94a3b8; font-weight: 400; }

.tour-bar__controls { display: flex; align-items: center; gap: 0.25rem; flex: none; margin-left: auto; }
.tour-bar__pager { display: flex; align-items: center; }
.tour-bar__count { min-width: 3.25rem; text-align: center; font-variant-numeric: tabular-nums; color: #e2e8f0; }

.tour-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.tour-bar__btn--text { padding: 0 0.625rem; }
.tour-bar__btn:hover { background: rgb(255 255 255 / 0.14); }
.tour-bar a:focus-visible, .tour-bar button:focus-visible, .tour-bar summary:focus-visible,
.tour-tab:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.tour-bar__panel a:focus-visible { outline-color: #0f172a; }

/* Pages ▾ */
.tour-bar__menu { position: relative; }
.tour-bar__menu > summary { list-style: none; }
.tour-bar__menu > summary::-webkit-details-marker { display: none; }
.tour-bar__menu[open] > summary { background: rgb(255 255 255 / 0.14); }
.tour-bar__chev { transition: transform 0.15s ease; }
.tour-bar__menu[open] .tour-bar__chev { transform: rotate(180deg); }
.tour-bar__panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1;
  width: 18rem;
  max-width: calc(100vw - 1rem);
  max-height: min(70vh, 26rem);
  overflow-y: auto;
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  list-style: none;
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.28);
}
.tour-bar__panel a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  color: #0f172a;
  font-size: 0.9375rem;
  text-decoration: none;
}
.tour-bar__panel a:hover { background: #f1f5f9; }
.tour-bar__panel a[aria-current='page'] { background: #e2e8f0; font-weight: 700; }
.tour-bar__num { flex: none; width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: #0f172a; color: #fff; font-size: 0.75rem; font-weight: 700; }

/* Collapsed tab — shown only after the bar is dismissed. */
.tour-tab {
  display: none;
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 70;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 9999px;
  background: #0f172a;
  color: #fff;
  font: 600 0.8125rem/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 6px 18px rgb(15 23 42 / 0.3);
  cursor: pointer;
}
.tour-tab:hover { background: #1e293b; }
.tourbar-min .tour-bar { display: none; }
.tourbar-min .tour-tab { display: inline-flex; }

/* Hidden for automation, ?tour=off, and print — never in a capture. */
.tourbar-off .tour-bar, .tourbar-off .tour-tab { display: none !important; }
@media print { .tour-bar, .tour-tab { display: none !important; } }

/* Condense: 390px must fit brand + pager + Pages + ✕ with no horizontal scroll. */
@media (max-width: 899px) { .tour-bar__eyebrow { display: none; } }
@media (max-width: 639px) {
  .tour-bar { position: relative; }
  .tour-bar__inner { gap: 0.25rem; padding-left: 0.625rem; }
  .tour-bar__context { display: none; }
  .tour-bar__controls { gap: 0; }
  .tour-bar__logo { max-width: 5.25rem; height: 1.25rem; }
  .tour-bar__count { min-width: 2.75rem; }
  .tour-bar__btn--text { padding: 0 0.5rem; }
  .tour-bar__menu { position: static; }
  .tour-bar__panel { left: 0.5rem; right: 0.5rem; width: auto; max-width: none; }
}

/* Stub toast — a click to a route outside the showcase. */
.tour-stub-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 80;
  transform: translate(-50%, 1rem);
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 0.875rem 1.125rem;
  border-radius: 0.75rem;
  background: rgb(15 23 42);
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 25px rgb(15 23 42 / 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tour-stub-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
