/* Course cards (Friendly Coach): one lesson card at a time, phone-first.
   Layout: a single column deck: top row (card count + Listen), progress bar, the current
   card, then Back/Next. Without JavaScript every card shows in order as plain sections. */
.course-deck{display:grid;gap:12px;margin:22px 0;max-width:40rem}
.course-deck .course-card{background:var(--card);border:1px solid var(--hair);border-radius:20px;padding:20px 18px;box-shadow:var(--shadow-sm,0 4px 18px rgba(23,51,44,.08));display:grid;gap:12px;align-content:start;min-width:0}
.course-deck:not(.is-cards) .course-card+.course-card{margin-top:4px}
.course-deck.is-cards .course-card{min-height:24rem}
.course-card h3{font-size:1.4rem;line-height:1.2;margin:0;overflow-wrap:break-word}
.course-card h3:focus{outline:none}.course-card h3:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
.course-card p{margin:0;font-size:1rem;line-height:1.55}
.course-card .eyebrow{margin:0;color:var(--brand);font-size:.875rem;font-weight:700}
.cc-enter{animation:cc-in .28s ease-out}
@keyframes cc-in{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}
.cc-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;font-size:.875rem;font-weight:600;color:var(--muted)}
.cc-listen{border:2px solid var(--hair);background:var(--card);color:var(--ink);border-radius:999px;padding:6px 14px;min-height:44px;font:700 .9rem 'Figtree',sans-serif}
.cc-listen[aria-pressed=true]{border-color:var(--brand);background:var(--tile-mint)}
.cc-bar{height:8px;border-radius:99px;background:var(--hair);overflow:hidden}.cc-bar i{display:block;height:100%;width:0;background:var(--brand);border-radius:99px;transition:width .35s}
.cc-nav{display:flex;gap:10px}.cc-nav .btn{flex:1;min-height:48px;font-weight:700;font-size:1rem;border-radius:14px}.cc-nav .btn:disabled{opacity:.45;cursor:default}
.cc-list{margin:0;padding-left:1.2rem}.cc-list li{margin:6px 0;line-height:1.5}
/* Guess first */
.cc-guess{display:grid;gap:8px}
.cc-opt{border:2px solid var(--hair);background:var(--card);color:var(--ink);border-radius:14px;padding:12px 14px;min-height:48px;font:600 1rem 'Figtree',sans-serif;text-align:left}
@media (hover:hover){.cc-guess:not(:has([data-state])) .cc-opt:hover{border-color:var(--brand)}}
.cc-opt[data-state=right]{border-color:var(--brand);background:var(--tile-mint)}.cc-opt[data-state=wrong]{border-color:var(--danger);background:var(--tile-peach)}
.cc-tag{font-weight:700}
.cc-reveal{background:var(--tile-mint);border-radius:14px;padding:12px 14px;font-weight:600}
/* Interactives */
.cc-widget{display:grid;gap:12px;min-width:0}
.cc-field{display:grid;gap:4px}
.cc-field label{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-weight:700;font-size:.95rem}
.cc-field output{font-variant-numeric:tabular-nums;color:var(--brand)}
.cc-widget input[type=range]{width:100%;min-height:44px;accent-color:var(--brand);margin:0}
.cc-big{font:800 1.9rem/1.1 'Bricolage Grotesque','Figtree',sans-serif;color:var(--brand);font-variant-numeric:tabular-nums}
.cc-result{font-weight:600}.cc-result .cc-big{display:inline-block}
.cc-note-stage{display:grid;place-items:center;height:9rem}
.cc-bill{--cc-scale:1;width:12rem;height:6rem;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#4cae7a,#2f8f63);color:#fff;font:800 1.6rem 'Bricolage Grotesque',sans-serif;box-shadow:0 6px 14px rgba(0,0,0,.15);transform:scale(var(--cc-scale));transition:transform .3s}
.cc-meter{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:10px}
.cc-pill{border-radius:14px;padding:10px 12px;background:var(--tile-sky);font-weight:700}
[data-out=real][data-state=losing]{color:var(--danger)}
.cc-chart{display:flex;align-items:flex-end;gap:6px;height:9rem;border-bottom:2px solid var(--hair);padding-top:6px}
.cc-chart div{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:2px;position:relative}
.cc-chart small{position:absolute;bottom:-1.4rem;left:0;right:0;text-align:center;font-size:.875rem;color:var(--muted)}
.cc-chart .cc-in,.cc-legend .cc-in{background:var(--sun);border-radius:4px 4px 0 0;display:block}.cc-chart .cc-gr,.cc-legend .cc-gr{background:var(--brand);border-radius:4px 4px 0 0;display:block;opacity:.75}
.cc-chart span{transition:height .3s}
.cc-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:.875rem;color:var(--muted);margin-top:1.2rem!important}.cc-legend i{display:inline-block!important;width:10px;height:10px;border-radius:3px;margin-right:5px}
.cc-chips{display:flex;flex-wrap:wrap;gap:8px}
.cc-chip{border:2px solid var(--hair);border-radius:99px;padding:8px 14px;min-height:44px;font:600 .95rem 'Figtree',sans-serif;background:var(--card);color:var(--ink)}
.cc-chip[aria-pressed=true]{border-color:var(--brand);background:var(--tile-mint)}
.cc-bins{display:grid;grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr));gap:10px}
.cc-bin{border:2px dashed var(--hair);border-radius:14px;padding:10px;display:grid;gap:6px;align-content:start}
.cc-bin-btn{width:100%;font-size:.875rem;white-space:normal}
.cc-bin-list{list-style:none;margin:0;padding:0;display:grid;gap:4px}.cc-bin-list li{background:var(--tile-mint);border-radius:8px;padding:4px 8px;font-weight:600;font-size:.9rem}
.cc-feedback{font-weight:600;min-height:1.2em}
.cc-done{background:var(--tile-butter);border-radius:14px;padding:12px 14px;font-weight:600}
.cc-ladder{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.cc-ladder li{display:grid;gap:2px;border:2px solid var(--hair);border-radius:12px;padding:8px 12px;opacity:.7;transition:background .3s,opacity .3s}
.cc-ladder li span{font-size:.875rem;color:var(--muted)}
.cc-ladder li[data-met=true]{opacity:1;border-color:var(--brand);background:var(--tile-mint)}
.cc-ladder li[data-met=true] strong::before{content:"✓ ";color:var(--brand)}
.cc-flips{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.cc-flip{width:100%;text-align:left;border:2px solid var(--hair);border-radius:14px;padding:12px 14px;min-height:56px;background:var(--tile-peach);color:var(--ink);font:500 .98rem/1.45 'Figtree',sans-serif;display:grid;gap:6px}
.cc-flip[aria-pressed=true]{background:var(--tile-mint);border-color:var(--brand)}
.is-cards .cc-flip .cc-truth{display:none}.is-cards .cc-flip[aria-pressed=true] .cc-truth{display:block}.is-cards .cc-flip[aria-pressed=true] .cc-myth{text-decoration:line-through;opacity:.7}
.is-cards .cc-flip[aria-pressed=false]::after{content:"Tap to flip ↻";font-size:.875rem;font-weight:700;color:var(--muted)}
.cc-sub{border:1px solid var(--hair);border-radius:12px;padding:8px 12px;margin:0;display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center}
.cc-sub legend{float:left;width:100%;font-weight:600;font-size:.95rem;padding:0}
.cc-sub label,.cc-events label{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:600}
.cc-sub input,.cc-events input{width:20px;height:20px;accent-color:var(--brand)}
.cc-events{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:4px 14px}.cc-events legend{font-weight:700;padding:0;margin-bottom:2px}
.cc-fact{background:var(--tile-sky);border-radius:12px;padding:10px 12px;font-size:.95rem}
.cc-round{display:grid;gap:10px;border-top:1px solid var(--hair);padding-top:10px}.cc-round h4{margin:0;font-size:1.1rem}.cc-round fieldset{border:0;margin:0;padding:0;display:grid;gap:6px}.cc-round legend{font-weight:700;margin-bottom:4px}
.cc-outcome{font-weight:600}
.cc-steps{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.cc-step{width:100%;display:flex;justify-content:space-between;gap:10px;align-items:center;border:2px solid var(--hair);border-radius:12px;padding:10px 12px;min-height:48px;background:var(--card);color:var(--ink);font:700 1rem 'Figtree',sans-serif;text-align:left}
.cc-step[aria-expanded=true]{border-color:var(--brand);background:var(--tile-mint)}
.cc-risk{color:var(--brand);letter-spacing:2px;white-space:nowrap}
.cc-step-panel{padding:8px 12px 2px;display:grid;gap:6px}.cc-step-panel p{font-size:.95rem}
.cc-bars{display:grid;gap:8px}.cc-bars div{display:grid;grid-template-columns:5.5rem 1fr;gap:8px;align-items:center;font-size:.875rem;font-weight:600}
.cc-bars i{display:block;height:18px;border-radius:6px;background:var(--brand);width:var(--cc-w,100%);transition:width .3s}.cc-bars [data-bar=fee]{background:var(--sun)}
.cc-selects{display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:10px}.cc-selects label{display:block;font-weight:700;font-size:.9rem;margin-bottom:4px}.cc-selects select{min-height:44px}
.cc-dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));gap:8px;margin:0}
.cc-dl div{background:var(--soft);border-radius:12px;padding:8px 10px;min-width:0}.cc-dl dt{font-size:.875rem;color:var(--muted)}.cc-dl dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.cc-gauge{height:14px;border-radius:99px;background:var(--hair);overflow:hidden}.cc-gauge i{display:block;height:100%;width:var(--cc-w,0%);background:var(--sun);transition:width .3s}.cc-gauge i[data-state=wiped]{background:var(--danger)}
.cc-flags{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.cc-flag{width:100%;text-align:left;border:2px solid var(--hair);border-radius:14px;padding:10px 14px;min-height:48px;background:var(--card);color:var(--ink);font:600 .98rem/1.4 'Figtree',sans-serif}
.cc-flag[data-state=flag]{border-color:var(--danger);background:var(--tile-peach)}.cc-flag[data-state=ok]{border-color:var(--brand);background:var(--tile-mint)}
.cc-plan{display:grid;gap:8px;margin:0}.cc-plan div{border-left:4px solid var(--sun);background:var(--soft);border-radius:0 12px 12px 0;padding:8px 12px}.cc-plan dt{font-size:.875rem;font-weight:700;color:var(--muted)}.cc-plan dd{margin:0;font-weight:600}
.course-plan .action-row{display:flex;flex-wrap:wrap;gap:8px}.course-plan .action-row .btn{flex:1 1 10rem}
.cc-key{border-left:5px solid var(--sun);padding:10px 14px;background:var(--tile-butter);border-radius:0 12px 12px 0;font-weight:700;font-size:1.05rem}
.course-badge{display:grid;place-items:center}
.course-badge-icon{width:5.5rem;height:5.5rem;border-radius:50%;background:var(--sun);color:var(--sun-ink);display:inline-grid;place-items:center;font:800 2.2rem 'Bricolage Grotesque',sans-serif;box-shadow:0 0 0 7px var(--tile-mint)}
.course-badge-line{font-weight:600}.course-badge-line .course-badge-icon{width:1.8rem;height:1.8rem;font-size:1rem;box-shadow:none;vertical-align:middle}
.course-card .course-quest{margin:0;padding:0;border:0}.course-card .course-quest>h3{margin-bottom:8px}
.course-card .course-action{margin:0;display:grid;gap:10px}.course-card .course-action h3{display:none}
.course-card .course-webinars{margin:0;border:0;padding:0}
.cc-revisit{margin:6px 0 0;padding-left:1.2rem}.cc-revisit li{margin:6px 0}.cc-revisit a{font-weight:700}
.course-quiz-q{border:0;margin:0;padding:0;display:grid;gap:8px}.course-quiz-q legend{font-weight:700;font-size:1.05rem;line-height:1.4;margin-bottom:6px}
.course-quiz-options{display:grid;gap:6px}
.course-card [data-quiz-badge]{background:var(--tile-butter);border-radius:14px;padding:12px;display:flex;gap:12px;align-items:center}.course-card [data-quiz-badge] .course-badge-icon{width:3rem;height:3rem;font-size:1.4rem;box-shadow:none}
/* Badge shelf and course-level pieces */
.course-badge-shelf{margin:10px 0 4px}.course-badge-shelf summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:700}
.course-badges{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:8px}
.course-badges li{display:flex;align-items:center;gap:8px;border:1px solid var(--hair);border-radius:12px;padding:6px 8px;font-size:.875rem;font-weight:600;opacity:.55}
.course-badges li .course-badge-icon{width:2rem;height:2rem;font-size:.95rem;box-shadow:none;background:var(--hair);flex:0 0 auto}
.course-badges li[data-earned=true]{opacity:1;background:var(--tile-mint)}.course-badges li[data-earned=true] .course-badge-icon{background:var(--sun)}
.course-nav .course-nav-quiz a{background:var(--tile-butter)}
.course-text{margin:8px 0 16px;max-width:40rem}.course-text>summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:700}
.course-complete input[type=text]{max-width:20rem;margin:4px 0 12px}.course-complete label[for]{display:block;font-weight:700}
.course-badges-line{font-weight:600}
@media (max-width:480px){.course-deck .course-card{padding:18px 14px;border-radius:18px}.course-card h3{font-size:1.25rem}.cc-big{font-size:1.6rem}.course-deck.is-cards .course-card{min-height:0}}
/* 1 Oct design review. One card surface: the lesson is plain page, the card is the only box. */
.course-layout .course-lesson{padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.course-lesson:focus{outline:none}:where(.course-card fieldset){min-width:0;margin:0;padding:0;border:0}
/* Compact syllabus: a collapsed list on phones (membership.js opens it on wider screens, where it is the sidebar). */
.course-syllabus{min-width:0}
.course-syllabus>summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:2px 10px;min-height:48px;padding:10px 14px;border:1px solid var(--hair);border-radius:12px;background:var(--card);cursor:pointer;font-weight:700;overflow-wrap:anywhere}
.course-syllabus-now{font-size:.875rem;font-weight:600;color:var(--muted)}
.course-syllabus[open]>summary{border-radius:12px 12px 0 0;border-bottom:0}
.course-syllabus[open]>.course-nav{border-radius:0 0 12px 12px}
@media(min-width:701px){.course-syllabus[open]>summary{display:none}.course-syllabus[open]>.course-nav{border-radius:12px}}
.course-nav a{overflow-wrap:anywhere}
/* Back/Next sit directly under the card and stay in reach: sticky above the phone tab bar and the safe area. */
.course-deck.is-cards>.cc-nav{position:sticky;bottom:0;z-index:5;padding:8px 0 calc(8px + env(safe-area-inset-bottom));background:var(--paper)}
@media(max-width:767px){.course-deck.is-cards>.cc-nav{bottom:calc(66px + env(safe-area-inset-bottom));padding-bottom:8px}}
/* 200% text (about 188px wide): nothing sideways. */
.course-deck,.course-deck>*,.cc-top,.cc-bar{min-width:0;max-width:100%}
/* The card entrance slides 14px; clip it so the page never scrolls sideways mid-animation (clip keeps Back/Next sticky). */
.course-deck.is-cards{overflow-x:clip}
.cc-nav .btn{min-width:0;padding-left:8px;padding-right:8px;white-space:normal}
@media (prefers-reduced-motion:reduce){.cc-enter{animation:none}.cc-bar i,.cc-bill,.cc-chart span,.cc-bars i,.cc-gauge i,.cc-ladder li{transition:none}}
@media print{body.cc-printing *{visibility:hidden}body.cc-printing .cc-print-target,body.cc-printing .cc-print-target *{visibility:visible}body.cc-printing .cc-print-target{position:absolute;left:0;top:0;width:100%}body.cc-printing .cc-print-target .action-row{display:none}}
