/* Cognitive reframing lesson. All rules scoped under .cfr-* */

.cfr-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cfr-hero { width: min(84%, 330px); }
.cfr-hero img { width: 100%; display: block; }
.cfr-note { font-size: 12px; color: var(--faint); text-align: center; }

/* the mirror and its sticky note */
.cfr-mirror { position: relative; width: 100%; max-width: 330px; height: 250px; }
.cfr-glass { position: absolute; left: 50%; top: 30px; width: 170px; height: 210px; translate: -50% 0; border-radius: 90px 90px 18px 18px; border: 6px solid #C9A46A;
  background: linear-gradient(150deg, #2B3A5C 0%, #1A2238 45%, #2E3F63 60%, #1A2238 100%); box-shadow: 0 0 30px rgba(252,192,80,.15), inset 0 0 30px rgba(0,0,0,.4); }
.cfr-sticky { position: absolute; left: 50%; top: 110px; width: 124px; translate: -50% 0; rotate: -4deg; padding: 14px 10px; background: #FFE27A; color: #3A2A00;
  font: 700 17px/1.25 var(--serif); text-align: center; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.cfr-but { position: absolute; padding: 6px 10px; border-radius: 14px; background: var(--raised); border: 2px solid var(--streak); color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; animation: cfrPop .35s cubic-bezier(.34,1.56,.64,1) both; }
.cfr-b0 { left: 0; top: 6px; } .cfr-b1 { right: 0; top: 44px; } .cfr-b2 { left: 0; bottom: 0; }
@keyframes cfrPop { from { scale: .3; opacity: 0; } }

/* the trial */
.cfr-trial { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cfr-claim { padding: 6px 14px; border-radius: 12px; background: rgba(123,92,253,.14); border: 2px solid var(--violet-bright); font: 700 17px/1.25 var(--serif); text-align: center; }
.cfr-scale { width: 100%; max-width: 310px; display: block; overflow: visible; }
.cfr-post { fill: none; stroke: #C9A46A; stroke-width: 6; stroke-linecap: round; }
.cfr-pivot { fill: var(--gold); }
.cfr-beam line { stroke: var(--gold); stroke-width: 6; stroke-linecap: round; }
.cfr-pan line { stroke: rgba(252,192,80,.6); stroke-width: 2; }
.cfr-bowl { fill: #C9A46A; }
.cfr-paper { fill: #F4EEDF; stroke: rgba(0,0,0,.25); stroke-width: 1; }
.cfr-paper.cfr-in { animation: cfrDrop .35s ease-out both; }
@keyframes cfrDrop { from { transform: translateY(-30px); opacity: 0; } }
.cfr-plab { font: 800 15px var(--sans); fill: var(--text); }
.cfr-fact { font: 600 17px/1.3 var(--serif); }

/* the verdict */
.cfr-rw { width: 100%; max-width: 340px; padding: 9px 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; transition: border-color .3s; }
.cfr-rw b { font: 600 16px/1.3 var(--serif); }
.cfr-rw.cfr-win { border-color: var(--mint); }
.cfr-bel { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.cfr-bel span { font-size: 12px; font-weight: 700; color: var(--dim); }
.cfr-bel i { height: 9px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.cfr-bel s { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--gold); }

/* the last puzzle */
.cfr-true { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; font-size: 22px; border-color: var(--mint); background: rgba(63,214,154,.1); }
.cfr-true small { font: 800 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }

@media (max-height: 700px) {
  .cfr-hero { width: min(70%, 260px); }
  .cfr-mirror { height: 226px; }
  .cfr-glass { top: 30px; height: 190px; width: 150px; }
  .cfr-sticky { top: 92px; }
  .cfr-scale { max-width: 270px; }
  .cfr-rw { padding: 7px 12px; }
  .cfr-rw b { font-size: 15px; }
}
