/* Basics: the technique flipbook. Group words across the top are the tabs, the
   stage is a slab window with the pictogram player, the moments run down the
   side, and the cue sits under the stage with the flip arrows. */

.bx { padding: 100px var(--gut) var(--s7); }

/* Pass. Shoot. Dribble. as one display line; each word is a tab */
.bx-groups { font-family: var(--d); font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.035em; line-height: 0.92; font-size: clamp(44px, min(6.6vw, 11svh), 104px); }
.bx-groups [role='tablist'] { display: inline-flex; flex-wrap: wrap; gap: 0 0.28em; }
.bx-groups button {
  font: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: color-mix(in oklch, var(--ink) 44%, var(--ground));
  transition: color 0.3s var(--out);
}
.bx-groups button[aria-selected='true'] { color: var(--ink); }
@media (hover: hover) { .bx-groups button[aria-selected='false']:hover { color: color-mix(in oklch, var(--ink) 66%, var(--ground)); } }

.bx-techs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s4); min-height: 44px; }
.bx-techs .chip { display: inline-flex; align-items: center; gap: 8px; }
.bx-techs .chip .lv { font-size: 12px; font-weight: 600; opacity: 0.6; font-variant-numeric: tabular-nums; }
.bx-techs .chip.is-done::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.55; }

/* the book: stage left (bleeding off the edge), moments right, cue underneath */
.bx-book {
  display: grid; margin-top: var(--s4);
  grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr);
  grid-template-areas: 'stage side' 'cue side';
  column-gap: var(--s7);
}
.bx-stage {
  grid-area: stage; position: relative; margin: 0 0 0 calc(var(--gut) * -1);
  height: clamp(340px, calc(100svh - 430px), 600px);
  background: var(--slab); overflow: hidden; touch-action: pan-y;
}
.bx-stage.can-turn { cursor: grab; }
.bx-stage.is-turning { cursor: grabbing; }
/* camera presets, like a coach walking round the player */
.bx-views { position: absolute; top: var(--s3); right: var(--s3); z-index: 3; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-ctl); background: color-mix(in oklch, var(--ground) 86%, transparent); }
.bx-views[hidden], .bx-drag-hint[hidden] { display: none; }
.bx-views button { height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-ctl); background: transparent; cursor: pointer; font-size: 13px; font-weight: 640; color: var(--ink-2); transition: background-color 0.2s var(--out), color 0.2s var(--out); }
.bx-views button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
@media (hover: hover) { .bx-views button[aria-pressed='false']:hover { color: var(--ink); } }
.bx-drag-hint { position: absolute; left: calc(var(--gut) + var(--s3)); top: var(--s4); z-index: 3; font-size: 13px; font-weight: 600; color: var(--ink-2); pointer-events: none; transition: opacity 0.4s var(--out); }
.bx-drag-hint.is-gone { opacity: 0; }
@media (hover: none) { .bx-drag-hint { display: none; }
}
.bx-canvas { width: 100%; height: 100%; display: block; }
.bx-tags { position: absolute; inset: 0; pointer-events: none; }
.bx-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bx-leaders line { stroke: var(--ink); stroke-width: 1.25; }
.bx-leaders rect { fill: var(--ink); }
.bx-tag {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform;
  font-size: 14px; font-weight: 660; line-height: 1; color: var(--ink);
  padding: 7px 9px; background: var(--paper);
}

.bx-side { grid-area: side; display: flex; flex-direction: column; min-width: 0; padding-top: 2px; }
.bx-name { font-family: var(--d); font-weight: 780; font-stretch: 108%; letter-spacing: -0.025em; font-size: clamp(30px, 2.8vw, 42px); line-height: 1; }

/* the moments: a vertical stepper whose ink marker slides */
.bx-steps { position: relative; list-style: none; margin: var(--s4) 0 0; padding: 0; border-top: 1px solid var(--joint); }
.bx-steps li { border-bottom: 1px solid var(--joint); }
.bx-steps button {
  width: 100%; display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 4px 0 18px;
  background: none; border: 0; cursor: pointer; text-align: left;
  font-size: 17px; font-weight: 620; color: var(--ink-3); transition: color 0.25s var(--out);
}
.bx-steps .n { width: 22px; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.bx-steps button[aria-current='step'] { color: var(--ink); }
@media (hover: hover) { .bx-steps button:hover { color: var(--ink); } }
.bx-steps-mark { position: absolute; left: 0; top: 0; width: 4px; height: 44px; background: var(--ink); border-radius: 2px; pointer-events: none; }

.bx-panel { margin-top: var(--s4); min-height: 200px; position: relative; }
.bx-panel .bx-inset { max-height: 190px; }

/* the cue under the stage */
.bx-cue { grid-area: cue; display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding-top: var(--s4); min-height: 104px; }
.bx-cue-text {
  font-family: var(--d); font-weight: 720; font-stretch: 104%; letter-spacing: -0.015em;
  font-size: clamp(21px, 1.9vw, 30px); line-height: 1.15; max-width: 30ch; overflow: hidden;
}
.bx-cue-text .ln { display: block; }
/* one line on why it matters, under the cue */
.bx-cue-copy { min-width: 0; }
.bx-why { margin-top: 8px; font-size: 16px; line-height: 1.4; font-weight: 560; color: var(--ink-2); max-width: 52ch; min-height: 1.4em; }
.bx-flip { display: flex; gap: var(--s2); flex: none; }
.bx-arrow {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid color-mix(in oklch, var(--ink) 22%, transparent); background: transparent; color: var(--ink);
  transition: background-color 0.2s var(--out), color 0.2s var(--out), border-color 0.2s var(--out), transform 0.16s var(--out);
}
.bx-arrow .ic { width: 20px; height: 20px; }
.bx-arrow[data-next] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bx-arrow:active { transform: scale(0.95); }
.bx-arrow[disabled] { opacity: 0.35; cursor: default; }
@media (hover: hover) { .bx-arrow:not([data-next]):not([disabled]):hover { border-color: var(--ink); } }

/* panel contents */
.bx-inset { width: 100%; height: auto; display: block; }
.bx-inset-cap { margin-top: var(--s3); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.bx-read { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s4); transition: opacity 0.4s var(--out); }
.bx-read.is-wait { opacity: 0; }
.bx-read div { display: flex; flex-direction: column; gap: 2px; }
.bx-read dt { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bx-read dd { margin: 0; font-family: var(--d); font-weight: 800; font-stretch: 104%; letter-spacing: -0.03em; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.bx-read dd small { font-family: var(--f); font-size: 14px; font-weight: 600; letter-spacing: 0; margin-left: 4px; color: var(--ink-2); }
.bx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-label { font-size: 14px; font-weight: 640; margin-bottom: var(--s2); }
.bx-row { margin-bottom: var(--s4); }

/* the lab controls */
.bx-face { width: 132px; height: 132px; touch-action: none; cursor: grab; display: block; }
.bx-face:active { cursor: grabbing; }
.bx-lab { display: grid; grid-template-columns: auto 1fr; gap: var(--s4) var(--s5); align-items: start; }
.bx-lab .bx-row { margin: 0; }
.bx-range { width: 100%; accent-color: var(--ink); height: 32px; }
.bx-range-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); font-weight: 560; margin-top: -4px; }
.bx-kick {
  position: relative; overflow: hidden; width: 100%; height: 56px; margin-top: var(--s4); border: 0; border-radius: var(--r-ctl);
  background: var(--ink); color: var(--paper); font-weight: 680; font-size: 16px; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
}
.bx-kick i { position: absolute; inset: 0; background: color-mix(in oklch, var(--paper) 22%, var(--ink)); transform-origin: left center; transform: scaleX(0); }
.bx-kick span { position: relative; }
.bx-verdict { margin-top: var(--s3); min-height: 1.5em; font-weight: 640; }

/* ---------- the path ---------- */
.bx-path { padding: var(--s9) var(--gut) var(--s8); border-top: 1px solid var(--joint); }
.bx-path h2, .bx-drills h2 { font-family: var(--d); font-size: clamp(30px, 3.6vw, 52px); line-height: 0.98; font-weight: 790; font-stretch: var(--wide); letter-spacing: -0.03em; }
.bx-path-lane { list-style: none; margin: var(--s7) 0 0; padding: 0 0 0 10px; display: flex; position: relative; }
.bx-path-lane li { flex: 1; min-width: 0; position: relative; padding: 0 10px 0 0; }
.bx-path-lane li::after { content: ''; position: absolute; left: 10px; right: 0; top: 10px; height: 2px; background: var(--ink); opacity: 0.18; }
.bx-path-lane li.is-done::after { opacity: 1; }
.bx-path-lane button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.bx-path-lane .cone { display: block; position: relative; z-index: 1; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: radial-gradient(circle, var(--ground) 0 3px, var(--cone-top) 3.5px 7px, var(--cone) 7.5px); }
.bx-path-lane li.is-done .cone { background: radial-gradient(circle, var(--ink) 0 3.4px, var(--cone-top) 3.9px 7px, var(--cone) 7.5px); }
.bx-path-lane .nm { display: block; margin-top: var(--s4); font-size: 15px; font-weight: 640; line-height: 1.25; padding-right: var(--s2); }
.bx-path-lane .gp { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); font-weight: 520; }
.bx-path-lane li.is-here .nm { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 2px; }

/* ---------- drills that train it ---------- */
.bx-drills { padding: var(--s8) var(--gut) var(--s9); border-top: 1px solid var(--joint); }
.bx-drill-row { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
/* the same card build as the Drills page: a paper band for the name, the drill on a slab window under it */
.bx-drill { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--paper); border: 1px solid color-mix(in oklch, var(--ink) 10%, transparent); transition: border-color 0.2s var(--out); }
.bx-drill-meta { display: flex; flex-direction: column; gap: 1px; padding: var(--s3) 64px var(--s3) var(--s4); }
.bx-drill-meta b { font-family: var(--d); font-weight: 740; font-stretch: 104%; font-size: 18px; line-height: 1.2; }
.bx-drill-meta span { font-size: 13px; color: var(--ink-2); font-weight: 560; }
.bx-drill-win { display: block; margin: 0 var(--s2) var(--s2); background: var(--slab); overflow: hidden; }
.bx-drill .field { display: block; width: 100%; aspect-ratio: 1000 / 560; }
.bx-drill .go { position: absolute; right: var(--s3); top: var(--s3); width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; transition: transform 0.25s var(--out); }
.bx-drill .go .ic { width: 16px; height: 16px; }
@media (hover: hover) { .bx-drill:hover { border-color: var(--ink); } .bx-drill:hover .go { transform: translateX(3px); } }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .bx { padding-top: 88px; }
  .bx-book { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'cue' 'side'; }
  .bx-stage { margin: 0 calc(var(--gut) * -1); height: min(66vw, 520px); }
  .bx-cue { min-height: 0; padding-top: var(--s3); }
  .bx-side { margin-top: var(--s4); }
  .bx-steps { display: flex; border: 0; gap: 4px; margin-top: var(--s4); overflow-x: auto; scrollbar-width: none; }
  .bx-steps li { border: 0; flex: none; }
  .bx-steps button { height: 44px; padding: 0 16px; border-radius: var(--r-ctl); border: 1.5px solid color-mix(in oklch, var(--ink) 18%, transparent); font-size: 15px; gap: 8px; }
  .bx-steps button[aria-current='step'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .bx-steps-mark { display: none; }
  .bx-drill-row { grid-template-columns: minmax(0, 1fr); }
  .bx-path-lane { flex-direction: column; padding: 0 0 0 10px; }
  .bx-path-lane li { padding: 0 0 var(--s4) 26px; }
  .bx-path-lane li::after { left: -1px; right: auto; top: 10px; bottom: -10px; width: 2px; height: auto; }
  .bx-path-lane .cone { position: absolute; left: 0; top: 0; }
  .bx-path-lane .nm { margin-top: 0; }
}
@media (max-width: 560px) {
  .bx-groups { font-size: clamp(34px, 11vw, 48px); }
  .bx-stage { height: 78vw; }
  .bx-cue-text { font-size: 20px; }
  .bx-why { font-size: 15px; }
  .bx-arrow { width: 48px; height: 48px; }
  .bx-lab { grid-template-columns: 1fr; }
}
