/* Module 1: the Sales Wheel page (2026-09-26). The audio-synced wheel on John's illustration (wheel.js), the print choice and print styles.
   The print-choice and print rules follow training/helicopter/helicopter-print.css
   (copied here so this page does not depend on the Helicopter's files; consolidate into training.css later). */

/* ---------- walkthrough button under the picture ---------- */
.wheel-walk { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; margin: -0.5rem 0 1.75rem; }
.wheel-walk span { font-size: 0.92rem; color: var(--muted); }
html:not(.has-js) .wheel-walk, html:not(.has-js) .wheel-stage .wheel-frame, html:not(.has-js) .wheel-caption { display: none; }

/* ---------- Step 1: wheel stage ---------- */
.wheel-intro { margin-bottom: 1rem; }
.wheel-layout { display: grid; gap: 1.1rem; }
.wheel-stage { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 0.75rem 0.9rem 0.9rem; min-width: 0; }
.wheel-frame { width: 100%; max-width: min(100%, 60vh); aspect-ratio: 1 / 1; margin: 0 auto; }
.wheel-svg { display: block; width: 100%; height: 100%; overflow: hidden; -webkit-tap-highlight-color: transparent; }
/* John's art, a cream wash over the roles not being discussed (shaped to his real wedges) and a terracotta outline */
.wheel-svg .wheel-base, .wheel-mini-svg .wheel-base { fill: #fffdf8; }
.wheel-dim { fill: #f7f3eb; opacity: 0; pointer-events: none; transition: opacity 0.45s ease; }
.wheel-dim.is-on { opacity: 0.64; }
.wheel-outline { opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.wheel-outline.is-on { opacity: 1; }
.wheel-outline path, .wheel-outline circle { fill: none; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wheel-outline .wo-halo { stroke: #fffdf8; stroke-width: 6.5px; stroke-opacity: 0.85; }
.wheel-outline .wo-line { stroke: var(--accent-bright); stroke-width: 3.5px; }
.wheel-svg .wheel-hit { fill: transparent; pointer-events: all; cursor: pointer; outline: none; }
.wheel-svg .wheel-hit:focus-visible { stroke: var(--focus); stroke-width: 3px; stroke-dasharray: 9 6; vector-effect: non-scaling-stroke; }
.wheel-reduced .wheel-dim, .wheel-reduced .wheel-outline { transition: opacity 0.2s linear; }

.wheel-caption { display: flex; align-items: center; gap: 0.85rem; margin: 0.6rem 0 0.1rem; min-height: 5.6rem; }
.wc-art { position: relative; flex: 0 0 5.4rem; width: 5.4rem; height: 5.4rem; border-radius: 50%; overflow: hidden; background: #fffdf8; box-shadow: 0 0 0 1px var(--rule); }
.wc-art .wheel-mini-svg { display: block; width: 100%; height: 100%; }
.wc-art .wheel-outline .wo-halo { stroke-width: 3px; }
.wc-art .wheel-outline .wo-line { stroke-width: 1.75px; }
.wheel-static .wheel-frame, .wheel-static .wc-art { display: none; }
.wc-text { min-width: 0; transition: opacity 0.16s ease, transform 0.16s ease; }
.wheel-caption.is-changing .wc-text { opacity: 0; transform: translateY(3px); }
.wheel-reduced .wc-text { transition: none; }
.training-page .wheel-caption p { margin: 0; max-width: none; }
.training-page .wheel-caption .wc-kicker { font-family: var(--font-head); font-weight: 800; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.training-page .wheel-caption .wc-title { font-family: "Newsreader", Georgia, "Times New Roman", serif; font-weight: 600; font-size: 1.45rem; line-height: 1.15; margin: 0.1rem 0 0.2rem; color: var(--text); }
.training-page .wheel-caption .wc-line { font-size: 0.97rem; line-height: 1.4; color: var(--text); }

.wheel-stage .lesson-audio { margin: 0.7rem 0 0; padding: 0.7rem 0 0; background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; }
.wheel-stage .lesson-audio-title { margin-bottom: 0.45rem; }

.wheel-chapters { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 0.55rem 0.5rem 0.5rem; margin: 0 0 1rem; }
.wheel-chapters[hidden] { display: none; }
.training-page .wheel-chapters-h { font-family: var(--font-head); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0.1rem 0.5rem 0.35rem; }
.wheel-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.wheel-chapters button { display: flex; gap: 0.75rem; align-items: baseline; width: 100%; text-align: left; font: 500 0.97rem var(--font-body); color: var(--text); background: none; border: 0; border-radius: 5px; padding: 0.5rem 0.55rem; cursor: pointer; }
.wheel-chapters button:hover { background: var(--bg-soft); }
.wheel-chapters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wheel-chapters button[aria-current="true"] { background: var(--accent-tint); font-weight: 700; }
.wheel-chapters .ch-time { flex: 0 0 2.7rem; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.88rem; }
.wheel-chapters button[aria-current="true"] .ch-time { color: var(--accent); }

@media (min-width: 1000px) {
  /* Wider walk-around picture on desktop, more compact chapters (John, 2026-09-27 6:25 PM ET). */
  .post.unit > .unit-step.wheel-listen { grid-column: full; max-width: 76rem; }
  .wheel-listen > .wheel-intro { max-width: 47rem; }
  .wheel-layout { grid-template-columns: minmax(0, 40rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .wheel-stage { position: sticky; top: calc(57px + 0.75rem); }
  .wheel-frame { max-width: min(100%, calc(100vh - 24rem)); min-width: 22rem; }   /* walkthrough button + wheel fit one screen (2026-09-28 12:34 PM ET) */
  .wheel-chapters { padding: 0.35rem 0.35rem 0.3rem; margin-bottom: 0.75rem; }
  .training-page .wheel-chapters-h { font-size: 0.72rem; margin: 0.05rem 0.4rem 0.2rem; }
  .wheel-chapters ol { gap: 0; }
  .wheel-chapters button { font-size: 0.86rem; padding: 0.22rem 0.4rem; gap: 0.5rem; line-height: 1.3; }
  .wheel-chapters .ch-time { flex-basis: 2.3rem; font-size: 0.8rem; }
}
@media (max-width: 600px) {
  .wheel-stage { padding: 0.55rem 0.6rem 0.75rem; margin: 0 -0.25rem; }
  .wheel-caption { gap: 0.65rem; min-height: 4.8rem; }
  .wc-art { flex-basis: 4.4rem; width: 4.4rem; height: 4.4rem; }
  .training-page .wheel-caption .wc-title { font-size: 1.22rem; }
  .training-page .wheel-caption .wc-line { font-size: 0.92rem; }
}

/* ---------- print choice (as on the Helicopter page) ---------- */
.print-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: 1rem 0 0; }
.print-choice[hidden] { display: none; }
.print-choice-note { font-size: 0.88rem; color: var(--muted); }
.print-dialog { margin: auto; inset: 0; width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 1.2rem 1.3rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--card, #fffdf8); color: var(--text); }
.print-dialog::backdrop { background: rgba(31, 27, 23, 0.45); }
.print-dialog h2 { font-family: var(--font-head); font-size: 1.25rem; margin: 0 0 0.8rem; }
.print-dialog fieldset { border: 0; padding: 0; margin: 0 0 0.9rem; display: grid; gap: 0.5rem; }
.print-dialog legend { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.print-dialog label { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.97rem; line-height: 1.35; cursor: pointer; }
.print-dialog input { margin-top: 0.2rem; accent-color: var(--accent); flex: 0 0 auto; }
.print-dialog label small { display: block; font-size: 0.85rem; color: var(--muted); }
.print-picks { padding-left: 1.6rem !important; }
.print-picks:disabled { opacity: 0.5; }
.print-hint { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.9rem !important; }
.print-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.print-go { background: var(--accent); color: #fff; border-color: var(--accent); }
.print-go:hover { background: #8a3212; color: #fff; }

/* ---------- print ---------- */
@media print {
  @page { size: letter portrait; margin: 0.5in 0.6in 0.55in; }
  html, body { background: #fff !important; }
  body { color: #111; font-family: Georgia, Cambria, "Times New Roman", "Liberation Serif", "DejaVu Serif", serif; font-size: 10.5pt; line-height: 1.45; }
  main, main * { font-family: Georgia, Cambria, "Times New Roman", "Liberation Serif", "DejaVu Serif", serif !important; box-shadow: none !important; }
  .wrap, main, main article { max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
  main a { color: inherit !important; text-decoration: none !important; }
  .site-header, .site-footer, .nav-toggle, .skip-link, dialog, .print-choice, main audio, main button, .altitude-actions,
  .post-cta, .next-module, .lesson-visual figcaption a, .transcript > summary,
  .wheel-walk, .wheel-stage, .wheel-chapters, .wheel-intro { display: none !important; }
  main details > summary { list-style: none; }
  main details > summary::-webkit-details-marker { display: none; }
  .wheel-layout, .post.unit > .unit-step.wheel-listen { display: block !important; max-width: none !important; }
  .post-header { margin: 0 0 12pt; padding: 0 0 8pt; border-bottom: 1.5pt solid #111; }
  .post-kicker, .step-tag { font-size: 8pt !important; letter-spacing: 0.12em; text-transform: uppercase; color: #444 !important; font-weight: 400 !important; margin: 0 0 3pt !important; }
  .post-title { font-size: 22pt !important; line-height: 1.15; font-weight: 700; margin: 0 0 4pt !important; color: #111; }
  .post-dek { font-size: 11pt !important; font-style: italic; color: #333 !important; margin: 0 !important; }
  main h2 { font-size: 15pt !important; font-weight: 700; margin: 12pt 0 5pt !important; color: #111; }
  main h3, main h4 { font-size: 12.5pt !important; font-weight: 700; margin: 10pt 0 4pt !important; color: #111; }
  main h2, main h3, main h4, .step-tag { break-after: avoid; page-break-after: avoid; }
  main p { orphans: 3; widows: 3; max-width: none !important; color: #111; }
  .unit-step, .unit-step.altitude { margin: 14pt 0 0 !important; padding: 10pt 0 0 !important; border: 0 !important; border-top: 0.75pt solid #999 !important; background: none !important; border-radius: 0 !important; }
  .lesson-visual { break-inside: avoid; margin: 0 0 10pt !important; }
  .lesson-visual img { width: 100%; max-height: 6.4in; object-fit: contain; border: 0.5pt solid #999 !important; border-radius: 0 !important; }
  .lesson-visual figcaption { font-size: 8.5pt; font-style: italic; color: #444 !important; margin-top: 3pt; }
  .transcript { border: 0 !important; background: none !important; margin: 0 !important; }
  .transcript-body { padding: 0 !important; }
  .transcript-body::before { content: "Transcript"; display: block; font-size: 8pt; letter-spacing: 0.12em; text-transform: uppercase; color: #444; margin: 2pt 0 4pt; }
  .read-along p { margin: 0 0 6pt !important; font-size: 10.5pt !important; }
  .altitude-check { background: none !important; padding: 0 !important; margin: 0 0 5pt !important; }
  .lesson-try { background: none !important; border: 0.75pt solid #999 !important; border-radius: 0 !important; padding: 7pt 9pt !important; margin: 0 0 9pt !important; break-inside: avoid; }
  main .step-tag { font: 400 8pt Georgia, Cambria, "Times New Roman", serif !important; letter-spacing: 0.12em; text-transform: uppercase; color: #444 !important; margin: 0 0 3pt !important; }
  main *:focus, main *:focus-visible { outline: none !important; }
  /* print choice: picked sections only */
  body.print-pick .post-dek { display: none !important; }
  body.print-pick:not(.print-picture) main [data-print="picture"],
  body.print-pick:not(.print-listen) main [data-print="listen"] { display: none !important; }
}

/* Walk button sits at the top of the full walkthrough block (John, 2026-09-28 ~10:56 AM ET) */
.wheel-listen .wheel-walk { margin: 0.25rem 0 1rem; }

/* Print-only wheel art (screen uses the moving stage; John, 2026-09-28 12:34 PM ET) */
.wheel-print-only { display: none; }
@media print {
  .wheel-print-only { display: block !important; break-inside: avoid; margin: 0 0 10pt !important; }
  .wheel-print-only img { width: 100%; max-height: 6.4in; object-fit: contain; border: 0.5pt solid #999 !important; border-radius: 0 !important; }
  .wheel-print-only figcaption { font-size: 8.5pt; font-style: italic; color: #444 !important; margin-top: 3pt; }
}

/* The wheel sits right under the "Listen to the full walkthrough" button: no rule between them (John, 2026-09-28 12:34 PM ET) */
.post.unit > .unit-step.wheel-listen { border-top: 0 !important; margin-top: 0.4rem !important; padding-top: 0 !important; }
.wheel-chapters-note { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.5rem !important; }
