/* ============================================================
   Player layout: shared by blueprint.html and sales.html
   Two columns on wide screens: sticky index + content.
   ============================================================ */

.player {
  display: grid;
  grid-template-columns: 280px minmax(0, 720px);
  gap: 48px;
  justify-content: center;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Section index (left) ---------- */
.player__side {
  position: sticky;
  top: calc(var(--bar-h) + 28px);
  align-self: start;
}
.player__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - var(--bar-h) - 56px);
  overflow-y: auto;
  padding-right: 6px;
}
.player__nav::-webkit-scrollbar { width: 6px; }
.player__nav::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 99px; }

/* Mobile-only toggle bar (hidden on desktop) */
.player__mobtoggle { display: none; }

.nav-eyebrow {
  font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 12px 10px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--ink-mute);
  font-size: 0.9rem;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  line-height: 1.3;
}
.nav-item:not(:disabled):hover { background: var(--bg-2); color: var(--ink-soft); }
.nav-item:disabled { cursor: not-allowed; color: var(--ink-faint); }
.nav-item.is-active { background: var(--bg-2); color: var(--ink); border-color: var(--line); }
.nav-item.is-done { color: var(--ink-soft); }
.nav-item__mark {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700;
  border: 1px solid var(--line-soft);
  color: var(--ink-mute);
}
.nav-item.is-done .nav-item__mark { background: var(--gold); color: #20180a; border-color: transparent; }
.nav-item.is-active .nav-item__mark { border-color: var(--gold); color: var(--gold); }
.nav-item__txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-item.is-commit .nav-item__mark { border-color: var(--red); color: var(--red); }
.nav-item.is-commit.is-done .nav-item__mark { background: var(--red); color: var(--ink); border-color: transparent; }
.nav-item.is-locked .nav-item__mark { border-color: transparent; color: var(--ink-mute); }
.nav-item.is-locked .nav-item__mark .ic { display: grid; place-items: center; }
.nav-lock-note {
  margin: 2px 0 8px 32px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-faint);
}

/* ---------- Section content (right) ---------- */
.player__main { min-width: 0; }
.q-block { margin: 22px 0; }
.rules {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 22px 0;
}
.rules__lead { font-family: var(--serif); color: var(--gold); margin-bottom: 8px; }
.rules p { color: var(--ink-soft); }
.rules p + p { margin-top: 6px; }

.from-line {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-mute); margin-bottom: 8px;
}

/* commitment / contract */
.contract {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(192,70,59,0.05), var(--bg-1));
  padding: 26px;
  margin: 26px 0;
}
.contract__title {
  font-family: var(--serif); font-size: 1.3rem;
  color: var(--ink); margin-bottom: 6px;
}
.contract__summary { margin: 18px 0; }
.contract__summary .cs-item { margin-bottom: 14px; }
.contract__summary .cs-q { font-size: 0.82rem; color: var(--ink-mute); letter-spacing: 0.02em; }
.contract__summary .cs-a { color: var(--ink); font-family: var(--serif); margin-top: 2px; white-space: pre-wrap; }
.confirm-row {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  cursor: pointer;
  transition: border-color var(--t);
}
.confirm-row.is-on { border-color: var(--gold); }
.confirm-box {
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 6px;
  display: grid; place-items: center;
  color: transparent; transition: all var(--t);
}
.confirm-row.is-on .confirm-box { background: var(--gold); color: #20180a; border-color: transparent; }
.confirm-row__label { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }

.after-commit {
  border-left: 2px solid var(--gold);
  padding: 20px 22px; margin-top: 28px;
  background: linear-gradient(90deg, var(--gold-glow), transparent 70%);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.after-commit h4 { font-size: 1.2rem; margin-bottom: 10px; }
.after-commit p { color: var(--ink-soft); }
.after-commit p + p { margin-top: 10px; }

.section-actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-top: 38px; flex-wrap: wrap;
}

/* ---------- Word meter (minimum words) ---------- */
.word-meter {
  font-size: 0.74rem; letter-spacing: 0.03em;
  color: var(--ink-faint); margin-top: 7px;
  transition: color var(--t-fast);
}
.word-meter.is-met { color: var(--gold); }

/* ---------- Required / invalid fields ---------- */
.field.is-invalid .textarea,
.field.is-invalid .input { border-color: var(--red); }
.score-row.is-invalid {
  border: 1px solid var(--red); border-radius: var(--radius-sm);
  padding: 10px; margin-left: -10px; margin-right: -10px;
}
.section-msg {
  min-height: 0; margin: 14px 0 0;
  font-family: var(--serif); font-size: 0.98rem; color: var(--gold-bright);
  opacity: 0; transition: opacity var(--t);
}
.section-msg.is-show { opacity: 1; }

/* ---------- Pattern Profile + completion screens ---------- */
.profile-screen { padding: 8px 0 10px; }
.profile__eyebrow {
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.profile__name {
  font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400; line-height: 1.1; color: var(--ink); margin-bottom: 14px;
}
.profile__lead {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; margin-bottom: 26px;
}
.profile__block {
  border-left: 2px solid var(--line-soft);
  padding: 2px 0 2px 20px; margin: 0 0 22px;
}
.profile__h {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.profile__block p { color: var(--ink-soft); line-height: 1.65; }
.profile__tips { margin: 4px 0 0; padding-left: 20px; }
.profile__tips li { color: var(--ink-soft); line-height: 1.6; margin-bottom: 10px; }
.profile__tips li::marker { color: var(--gold); }
.profile__quote {
  color: var(--ink-soft); line-height: 1.6; margin-bottom: 10px;
  font-family: var(--serif); font-style: italic;
}
.profile__quote-label {
  font-family: var(--sans); font-style: normal;
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-right: 6px;
}

/* Contract-sharing prompt on the completion screen (B7) */
.share-prompt {
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--gold-glow), transparent 80%);
  border-radius: var(--radius);
  padding: 22px 24px; margin: 26px auto 0; max-width: 60ch; text-align: left;
}
.share-prompt h4 { font-size: 1.15rem; margin-bottom: 8px; }
.share-prompt p { color: var(--ink-soft); line-height: 1.6; }

/* ---------- Video gate (final mandatory step) ---------- */
.video-gate { padding: 8px 0 10px; }
.video-gate__body { margin: 6px 0 20px; }
.video-gate__body p { color: var(--ink-soft); line-height: 1.7; }
.video-gate__body p + p { margin-top: 12px; }
.video-gate__discord { margin: 18px 0 6px; }

/* ---------- Post-completion action rows ---------- */
.post-actions {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px;
}

/* ---------- Celebration ---------- */
.celebrate-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 60;
}

/* ============================================================
   Sales reading experience (lessons, blocks, checklist)
   ============================================================ */
.lesson { margin-top: 16px; }
.lesson.is-locked { opacity: 0.55; }
.lesson__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lesson__title { font-size: 1.15rem; flex: 1; min-width: 0; }
.lesson__body { padding-top: 14px; color: var(--ink-soft); }
.lesson__body p + p { margin-top: 10px; }
.lesson__locked { color: var(--ink-mute); margin-top: 12px; font-size: 0.86rem; }
.lesson__done { color: var(--gold); margin-top: 14px; font-size: 0.85rem; }

/* Callout tones */
.callout--red {
  border-left-color: var(--red);
  background: linear-gradient(90deg, var(--red-soft), transparent 70%);
}
.callout--green {
  border-left-color: var(--green);
  background: linear-gradient(90deg, rgba(111,154,94,0.14), transparent 70%);
}

/* Clean table */
.l-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.94rem; }
.l-table th, .l-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.l-table th {
  color: var(--gold); font-family: var(--sans);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
}
.l-table td { color: var(--ink-soft); vertical-align: top; }

/* Diagram rendered as a clean flow of steps (no raw diagram code) */
.flow { margin: 18px 0; }
.flow__title { font-family: var(--serif); color: var(--gold); margin-bottom: 12px; }
.flow__step {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; background: var(--bg-1);
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.flow__num {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 700;
  background: var(--gold); color: #20180a;
}
.flow__txt { color: var(--ink-soft); line-height: 1.5; }
.flow__arrow { color: var(--gold); text-align: center; font-size: 1rem; padding: 5px 0; }

/* "You have this when" checklist */
.checklist {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 20px 0; background: var(--bg-1);
}
.checklist__lead {
  font-family: var(--serif); color: var(--gold); font-size: 1.05rem; margin-bottom: 12px;
}
.checklist ul { list-style: none; }
.checklist li {
  display: flex; gap: 11px; align-items: flex-start;
  color: var(--ink-soft); line-height: 1.55; margin-bottom: 9px;
}
.checklist li::before { content: "\2713"; color: var(--gold); flex-shrink: 0; font-weight: 700; }

/* Mastery green-light notice + per-phase drills reference + notes */
.mastery-note { margin-top: 24px; }
.drills-ref { margin-top: 22px; }
.phase-notes { margin-top: 26px; }
.phase-notes__label {
  font-family: var(--serif); font-size: 1rem; color: var(--ink); margin-bottom: 8px; display: block;
}
.phase-notes__hint { color: var(--ink-mute); font-size: 0.82rem; margin-bottom: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .player { grid-template-columns: 1fr; gap: 18px; }

  /* The side column becomes a sticky compact bar with a collapsible menu. */
  .player__side {
    position: sticky;
    top: var(--bar-h);
    z-index: 30;
    margin: 0 -2px;
  }

  .player__mobtoggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: rgba(20, 20, 23, 0.92);
    backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    min-height: 52px;
    color: var(--ink);
  }
  .player__mobtoggle-pos {
    font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold); flex-shrink: 0;
  }
  .player__mobtoggle-title {
    flex: 1; min-width: 0;
    font-family: var(--serif); font-size: 1rem; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .player__mobtoggle-chev {
    color: var(--ink-mute); flex-shrink: 0;
    transition: transform var(--t) var(--ease);
  }
  .player__side.is-open .player__mobtoggle-chev { transform: rotate(180deg); }

  /* The full section list is a dropdown panel, hidden until opened. */
  .player__nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 8px;
    padding: 10px;
    background: rgba(14, 14, 16, 0.98);
    backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.9);
  }
  .player__side.is-open .player__nav { display: flex; }

  .nav-eyebrow { display: none; }
  .nav-item { width: 100%; min-height: 44px; }
  .nav-item__txt { display: block; white-space: normal; }
}

/* ============================================================
   Sales lesson rich content: subheads, pull-quotes, checkpoint
   ============================================================ */
.lesson__subhead {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin: 22px 0 10px;
}
.lesson__body strong, .callout strong, .l-quote strong { color: var(--ink); font-weight: 600; }

.l-quote {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 20px;
  margin: 20px 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}
.l-quote p + p { margin-top: 8px; }

.checkpoint-banner {
  border: 1px solid rgba(111, 154, 94, 0.4);
  background: linear-gradient(90deg, rgba(111, 154, 94, 0.14), transparent 70%);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.checkpoint-banner__eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}
.checkpoint-banner p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

/* ============================================================
   Golf 0: stepped "Quiet Reveal" reading mode (proof lesson).
   One step at a time; transform/opacity only. Timing tokens come
   from css/motion.css (fallbacks keep it sane if a page ever
   loads player.css without motion.css).
   ============================================================ */
.lstep-rail {
  height: 1px;
  background: var(--line-soft);
  margin: 16px 0 20px;
}
.lstep-rail__fill {
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-progress, 480ms) var(--ease-settle, ease);
}

.lstep { display: none; }
.lstep.is-cur {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--dur-enter, 280ms) var(--ease-arrive, ease),
    transform var(--dur-enter, 280ms) var(--ease-arrive, ease);
}
.lstep.is-cur.is-pre {
  opacity: 0;
  transform: translateY(var(--motion-distance, 8px));
  transition: none;
}
.lstep.is-cur.is-exit {
  opacity: 0;
  /* -4px normally; collapses to 0 with --motion-distance under reduced motion */
  transform: translateY(calc(var(--motion-distance, 8px) * -0.5));
  transition:
    opacity var(--dur-exit, 200ms) var(--ease-settle, ease),
    transform var(--dur-exit, 200ms) var(--ease-settle, ease);
}
.lstep > :first-child { margin-top: 0; }

.lstep-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
}
.lstep-back {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 6px 2px;
  color: var(--ink-mute);
  font-size: 0.9rem;
  transition: color var(--dur-micro, 160ms) var(--ease-settle, ease);
}
.lstep-back:hover { color: var(--ink); }
.lstep-continue {
  width: 100%;
  min-height: 44px;
}
.lstep-count {
  margin-top: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* "Go deeper": the existing grid 0fr -> 1fr panel, quicker chevron. */
.lstep-deep .panel__chev {
  transition: transform var(--dur-micro, 160ms) var(--ease-settle, ease);
}
.lstep-deep .panel__body {
  transition: grid-template-rows var(--dur-enter, 280ms) var(--ease-settle, ease);
}
.lstep-deep__tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Golf 2 (B): a step change lands the lesson/section top clear of the fixed
   topbar, and on mobile also clear of the sticky section bar. scroll-margin
   only steers scrollIntoView; nothing animates, nothing reflows. */
.lesson, .lstep-shell { scroll-margin-top: calc(var(--bar-h, 64px) + 14px); }
@media (max-width: 900px) {
  .lesson, .lstep-shell { scroll-margin-top: calc(var(--bar-h, 64px) + 66px); }
}
