/* Prototype harness: design-version switcher. Deliberately neutral so it doesn't
   read as part of any design. */
.ps {
  --ps-bg: rgb(24 24 27 / 0.92);
  --ps-fg: #f4f4f5;
  --ps-muted: #a1a1aa;
  --ps-line: rgb(255 255 255 / 0.12);
  --ps-hover: rgb(255 255 255 / 0.08);
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  translate: -50% 0;
  max-width: calc(100vw - 24px);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.2;
  color: var(--ps-fg);
  letter-spacing: 0;
}
html { scroll-padding-bottom: 80px; }
body { padding-bottom: 72px; }
html.ps-collapsed body { padding-bottom: 0; }

.ps-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--ps-bg);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 12px 32px -8px rgb(0 0 0 / 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.ps.is-collapsed .ps-bar,
.ps.is-collapsed .ps-menu { display: none; }

.ps-title {
  padding: 0 8px 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ps-muted);
}

.ps button,
.ps a {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ps :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ps-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ps-opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}
.ps-num {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.1);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ps-muted);
}
.ps-opt[aria-current="true"] {
  background: #fafafa;
  color: #18181b;
}
.ps-opt[aria-current="true"] .ps-num { background: #18181b; color: #fafafa; }

.ps-step,
.ps-collapse,
.ps-current {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: background-color 140ms ease-out;
}
.ps svg { width: 16px; height: 16px; fill: currentColor; }
.ps-collapse { color: var(--ps-muted); }
.ps-step:active,
.ps-collapse:active,
.ps-current:active,
.ps-opt:active { background: rgb(255 255 255 / 0.14); }

.ps-keys {
  padding: 0 6px;
  color: var(--ps-muted);
  font-size: 11px;
  white-space: nowrap;
}
.ps-keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--ps-line);
  font: inherit;
  font-weight: 600;
  color: var(--ps-fg);
}

.ps-current {
  display: none;
  grid-auto-flow: column;
  gap: 8px;
  padding: 0 10px 0 12px;
  font-weight: 600;
}
.ps-current-num { color: var(--ps-muted); font-weight: 500; font-variant-numeric: tabular-nums; }

.ps-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--ps-bg);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 16px 40px -8px rgb(0 0 0 / 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform-origin: bottom center;
}
.ps-menu[hidden] { display: none; }
.ps-menu-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  border-radius: 9px;
  text-decoration: none;
}
.ps-menu-opt strong { display: block; font-weight: 600; }
.ps-menu-opt small { display: block; margin-top: 2px; color: var(--ps-muted); font-size: 12px; }
.ps-menu-opt[aria-current="true"] { background: rgb(255 255 255 / 0.12); }
.ps-menu-opt[aria-current="true"] .ps-num { background: #fafafa; color: #18181b; }

.ps-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ps-bg);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 8px 24px -8px rgb(0 0 0 / 0.45);
  font-weight: 600;
  cursor: pointer;
}
.ps-pill[hidden] { display: none; }
.ps-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #a3e635; }
.ps.is-collapsed { left: auto; right: 12px; translate: none; }

.ps-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .ps-opt:not([aria-current="true"]):hover,
  .ps-step:hover,
  .ps-collapse:hover,
  .ps-current:hover,
  .ps-menu-opt:not([aria-current="true"]):hover { background: var(--ps-hover); }
  .ps-collapse:hover { color: var(--ps-fg); }
}

@media (prefers-reduced-motion: no-preference) {
  .ps-menu:not([hidden]) { animation: ps-menu-in 160ms ease-out; }
}
@keyframes ps-menu-in {
  from { opacity: 0; scale: 0.97; translate: 0 4px; }
  to { opacity: 1; scale: 1; translate: 0 0; }
}

/* Compact: previous / current (opens list) / next */
@media (max-width: 56rem) {
  .ps { width: min(420px, calc(100vw - 24px)); }
  .ps-bar { justify-content: space-between; }
  .ps-title,
  .ps-list,
  .ps-keys { display: none; }
  .ps-current { display: inline-grid; flex: 1; justify-content: center; }
}

@media (forced-colors: active) {
  .ps-bar, .ps-menu, .ps-pill { border: 1px solid CanvasText; }
  .ps-opt[aria-current="true"], .ps-menu-opt[aria-current="true"] { outline: 2px solid Highlight; }
}
