/* ---- Playbook page: the stage slider, on the site VDL. Mono, Aeonik,
   hairlines from --border, no accent colour — state is carried by ink. ---- */

/* back arrow top-left; the theme toggle steps right to make room */
.back-btn {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: var(--z-sticky);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--bg-deep);
  color: var(--ink-dim);
  transition: color 160ms ease;
}
.back-btn:hover { color: var(--ink); }
.back-btn svg { width: 16px; height: 16px; }
.theme-toggle { left: 56px; }

.pb-page {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  column-gap: var(--s-7);
  align-items: start;
}
.pb-body { max-width: 960px; }
/* label cap-height sits on the lede's first line */
.pb-page .section-label { line-height: 1; padding-top: 4px; }

.pb-meta {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.pb-strong { color: var(--ink); }

.pb-lede {
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.004em;
  color: var(--ink);
  max-width: 58ch;
  margin: 0 0 var(--s-8);
}

/* ---- track ---- */
.pb-stage-track {
  position: relative;
  height: 72px;
  margin: var(--s-4) 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.pb-stage-track.is-dragging { cursor: grabbing; }
.pb-stage-line {
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.pb-stage-progress {
  position: absolute; top: 50%; left: 0;
  height: 1px; background: var(--ink);
  width: 0%;
  transition: width 0.5s var(--e-out, cubic-bezier(0.16, 1, 0.3, 1));
}
.is-dragging .pb-stage-progress { transition: none; }

.pb-stage-stop {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: var(--r-full);
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  z-index: 2;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.pb-stage-stop.is-passed,
.pb-stage-stop.is-active {
  background: var(--ink);
  border-color: var(--ink);
}
.pb-stage-stop.is-active { z-index: 3; }

.pb-stage-stop .stop-label {
  position: absolute; top: 24px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.4s ease;
}
.pb-stage-stop:first-child .stop-label { transform: translateX(0); left: 0; }
.pb-stage-stop.is-last .stop-label { transform: translateX(-100%); left: 100%; }
.pb-stage-stop.is-active .stop-label { color: var(--ink); }

/* oversized invisible thumb: 32px hit area on a 14px dot */
.pb-stage-thumb {
  position: absolute; top: 50%; left: 0%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: transparent;
  cursor: grab;
  z-index: 4;
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.pb-stage-thumb:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}
.is-dragging .pb-stage-thumb { cursor: grabbing; transition: none; }

/* ---- detail panel ---- */
.pb-stage-panel {
  margin-top: var(--s-8);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--s-8);
  align-items: start;
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.pb-stage-id-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: var(--s-5);
}
.pb-stage-id-head .rule { flex: 1; height: 1px; background: var(--border); }
.pb-stage-title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 var(--s-2);
}
.pb-stage-strap {
  font-size: 15px;
  font-style: italic;
  letter-spacing: 0.004em;
  color: var(--ink-dim);
  margin-bottom: var(--s-5);
}
.pb-stage-desc {
  font-size: 12px; line-height: 1.55; letter-spacing: 0.004em;
  color: var(--ink); max-width: 40ch; margin: 0;
}
.pb-stage-role-label { margin: var(--s-5) 0 var(--s-2); }
.pb-stage-role {
  font-size: 12px; line-height: 1.55; letter-spacing: 0.004em;
  color: var(--ink); max-width: 42ch; margin: 0;
}

.pb-stage-tier { padding: var(--s-5) 0; transition: opacity 0.5s ease; }
.pb-stage-tier:first-child { padding-top: 0; }
.pb-stage-tier.is-prior {
  opacity: 0.45;
  border-bottom: 1px solid var(--border);
}
.pb-stage-tier .tier-head { margin-bottom: var(--s-2); }
.pb-stage-tier ul {
  list-style: none; margin: 0; padding: 0;
  font-size: 12px; line-height: 1.55; letter-spacing: 0.004em;
  color: var(--ink);
}
.pb-stage-tier li { padding-left: 14px; position: relative; }
.pb-stage-tier li::before {
  content: "\00B7";
  position: absolute; left: 0; color: var(--ink-dim);
}

/* ---- collapsible sections (Thesis, How I work) ---- */
.pb-fold-head {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.004em;
  color: var(--ink);
  transition: opacity var(--d-fast, 160ms) ease;
}
.pb-fold-head:hover { opacity: 0.7; }
.pb-fold-head .caret {
  display: inline-flex;
  width: 0.82em;
  height: 0.82em;
  transform: rotate(-90deg);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pb-fold-head .caret svg { width: 100%; height: 100%; }
.pb-fold.open .pb-fold-head .caret { transform: none; }
.pb-fold-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 620ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pb-fold.open .pb-fold-body { grid-template-rows: 1fr; }
.pb-fold-body > * { overflow: hidden; }
.pb-fold .pb-thesis { padding-top: var(--s-5); }
.pb-fold-sub {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.004em;
  color: var(--ink);
  margin-bottom: 0.9em;
}
.pb-fold-sub:not(:first-child) { margin-top: var(--s-5); }

/* ---- Thesis: the why, below the stage journey ---- */
.pb-divider {
  grid-column: 2; /* content column only, matching the stage panel's top rule */
  max-width: 960px;
  height: 1px;
  background: var(--border);
  margin-top: var(--s-10);
}
/* label and its fold share one top margin so they sit on the same line */
.pb-thesis-label, .pb-fold { margin-top: var(--s-9); }
/* the second collapsed section sits closer to the first */
#howFold, .pb-thesis-label.locked-only { margin-top: var(--s-6); }
.pb-thesis-label { line-height: 1; padding-top: 3px; }
.pb-thesis p {
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.004em;
  color: var(--ink);
  max-width: 58ch;
  margin: 0 0 2.2em;
}
.pb-thesis p:last-child { margin-bottom: 0; }

/* Open Conversation dock: in flow beneath the stage panel, clear of every stage */
.pb-dock { margin: var(--s-8) 0 0; }

@media (prefers-reduced-motion: reduce) {
  .pb-stage-progress, .pb-stage-thumb, .pb-stage-stop, .pb-stage-tier {
    transition: none;
  }
}

@media (max-width: 720px) {
  .pb-page { grid-template-columns: 1fr; row-gap: var(--s-2); }
  .pb-stage-panel { grid-template-columns: 1fr; gap: var(--s-6); }
}
