/* Survivorship Bias lesson. All rules scoped under .sv-* */

.sv-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sv-sc > svg { display: block; width: 100%; height: auto; max-height: 46vh; overflow: visible; }
.sv-note { font-size: 12px; color: var(--faint); }
.sv-hero { width: min(92%, 360px); }
.sv-hero img { width: 100%; display: block; }

/* the bomber */
.sv-plane .sv-z { fill: #4B5236; stroke: #6E7650; stroke-width: 1.5; transition: fill .25s, stroke .25s; }
.sv-plane .sv-body { fill: #545C3C; }
.sv-plane .sv-glass { fill: #9FC2D6; opacity: .55; pointer-events: none; }
.sv-plane .sv-eng .sv-hit { fill: transparent; stroke: none; }
.sv-plane .sv-eng .sv-nac { fill: #3E4430; stroke: #6E7650; stroke-width: 1.5; transition: fill .25s, stroke .25s; }
.sv-plane .sv-prop { stroke: #B8B09A; stroke-width: 2.5; stroke-linecap: round; opacity: .7; }
.sv-hole { fill: #E5484D; stroke: #2A0C0C; stroke-width: 1; }
.sv-ghost { fill: rgba(10, 14, 26, .55); stroke: #F2EEE6; stroke-width: 2; animation: svPop .35s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes svPop { from { opacity: 0; transform: scale(2.2); } }
.sv-bomber.sv-ask .sv-z, .sv-bomber.sv-ask .sv-eng .sv-nac { cursor: pointer; stroke: var(--violet-bright); stroke-dasharray: 4 3; }
.sv-bomber.sv-ask .sv-eng:active .sv-nac, .sv-bomber.sv-ask .sv-z:active { fill: #5E6644; }
.sv-plane .sv-armor, .sv-plane .sv-armor .sv-nac { fill: rgba(252, 192, 80, .45); stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: none; }
.sv-bomber.sv-reveal .sv-eng .sv-nac { stroke: #C9C3B8; stroke-width: 2; }
.sv-bomber.sv-fixed .sv-eng .sv-nac { fill: var(--gold); stroke: var(--gold-deep); stroke-width: 2; filter: drop-shadow(0 0 6px rgba(252, 192, 80, .7)); }
.sv-bomber.sv-quiet .sv-hole { opacity: .55; }

.sv-tally { display: flex; gap: 8px; justify-content: center; }
.sv-t { padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--dim); }
.sv-t b { color: var(--text); font-weight: 800; }
.sv-back b { color: #F07A7E; }
.sv-lost { opacity: .45; transition: opacity .3s; }
.sv-lost.on { opacity: 1; }

/* the name: two groups */
.sv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.sv-grp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); text-align: center; }
.sv-grp b { font-size: 16px; }
.sv-grp span { font-size: 13px; color: var(--dim); }
.sv-dim { border-style: dashed; }
.sv-dim b { color: var(--dim); }
.sv-fleet { display: grid; grid-template-columns: repeat(5, 18px); gap: 6px; justify-content: center; min-height: 72px; align-content: center; margin-bottom: 6px; }
.sv-fleet i { width: 18px; height: 18px; background: #6E7650; clip-path: polygon(50% 0, 58% 34%, 100% 46%, 100% 58%, 58% 56%, 56% 82%, 72% 94%, 72% 100%, 28% 100%, 28% 94%, 44% 82%, 42% 56%, 0 58%, 0 46%, 42% 34%); }
.sv-gone i { background: transparent; box-shadow: none; outline: none; background: rgba(201, 195, 184, .22); }

/* the street */
.sv-year { font: 800 28px var(--serif); fill: var(--gold); }
.sv-ground { stroke: var(--line-strong); stroke-width: 2; }
.sv-sturdy rect, .sv-sturdy > path { fill: #8C8175; stroke: #B5AA9B; stroke-width: 1; }
.sv-sturdy .sv-win { fill: #FCC050; opacity: .8; stroke: none; }
.sv-cheap .sv-old rect, .sv-cheap .sv-old path { fill: #6A4A32; stroke: #8E6A4C; stroke-width: 1; }
.sv-cheap .sv-old .sv-pane { fill: #E0B070; stroke: none; opacity: .7; }
.sv-cheap .sv-old .sv-door { fill: #3A2618; stroke: none; }
.sv-cheap .sv-old { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.5, 0, .75, .3), opacity .45s; }
.sv-cheap.down .sv-old { transform: scaleY(0) rotate(4deg); opacity: 0; }
.sv-cheap .sv-new { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.sv-cheap.rebuilt .sv-new { opacity: 1; transform: none; }
.sv-new rect { fill: #3A3570; stroke: var(--violet-bright); stroke-width: 1; }
.sv-new .sv-band { stroke: var(--violet-bright); stroke-width: 1; opacity: .5; }
.sv-legend { display: flex; gap: 14px; justify-content: center; font-size: 13px; font-weight: 700; color: var(--dim); }
.sv-legend span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sv-lg-s::before { background: #8C8175; }
.sv-lg-c::before { background: #6A4A32; }
.sv-lg-n::before { background: #3A3570; border: 1px solid var(--violet-bright); }

/* the letters */
.sv-pile { position: relative; width: 100%; height: 222px; }
.sv-letter { position: absolute; left: 50%; top: calc(var(--i) * 44px); width: 250px; margin-left: -125px; height: 38px; padding: 0 12px; border-radius: 10px; background: #F3EBDD; color: #2A2216; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); display: flex; align-items: center; gap: 12px; transform: rotate(calc((var(--i) - 2) * 1.2deg)); animation: svDeal .38s cubic-bezier(.2, .8, .2, 1) both; }
.sv-letter small { font-size: 13px; font-weight: 700; color: #7A6A50; min-width: 50px; }
.sv-letter b { flex: 1; font: 700 17px var(--serif); }
.sv-stamp { padding: 3px 8px; border-radius: 7px; border: 2px solid #1E8A5E; color: #1E8A5E; font-size: 13px; font-weight: 800; transform: rotate(-6deg); }
@keyframes svDeal { from { opacity: 0; transform: translateY(40px) rotate(-8deg); } }

.sv-count { font-size: 14px; font-weight: 700; color: var(--dim); }
.sv-count b { font: 800 22px var(--serif); color: var(--gold); margin-right: 4px; }
.sv-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 36px)); gap: 6px; justify-content: center; }
.sv-env { position: relative; height: 30px; border-radius: 6px; background: #F3EBDD; display: flex; align-items: center; justify-content: center; transition: opacity .35s, background .35s, transform .35s; }
.sv-env i { font-style: normal; font-size: 15px; font-weight: 800; color: #2A2216; }
.sv-env.sv-flip { animation: svFlip .4s ease-out; }
@keyframes svFlip { 50% { transform: scaleX(.2); } }
.sv-env.out { opacity: .14; transform: scale(.86); }
.sv-env.sv-you { box-shadow: 0 0 0 2.5px var(--gold); }
.sv-env em { position: absolute; bottom: -15px; font-style: normal; font-size: 12px; font-weight: 800; color: var(--gold); }
.sv-env.last { background: var(--gold); transform: scale(1.18); box-shadow: 0 0 16px rgba(252, 192, 80, .8); }
.sv-weeks { display: flex; gap: 4px; justify-content: center; margin-top: 10px; }
.sv-weeks span { padding: 5px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--faint); white-space: nowrap; transition: background .2s, color .2s; }
.sv-weeks span.done { color: var(--text); }
.sv-weeks span.on { background: var(--gold); border-color: var(--gold); color: #2A1B00; }

/* spot it */
.sv-claim { width: 100%; padding: 20px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-strong); position: relative; }
.sv-claim::before { content: '\201C'; position: absolute; top: -8px; left: 14px; font: 800 54px var(--serif); color: var(--violet-bright); opacity: .6; }
.sv-claim p { margin: 0; font: 600 20px/1.35 var(--serif); color: var(--text); }

@media (max-height: 700px) {
  .sv-sc > svg { max-height: 40vh; }
  .sv-pile { height: 200px; }
  .sv-letter { top: calc(var(--i) * 40px); }
  .sv-fleet { min-height: 60px; gap: 4px; }
  .sv-claim p { font-size: 18px; }
}
