/* Académie Finance — sobre, inspiré des plateformes de cours (Udemy) : blanc, gris clair, une seule couleur d'accent.
   Police unique : Figtree. Pour changer l'accent, modifier --brand / --brand-2 / --brand-soft. */
:root {
  --bg: #ffffff; --surface: #ffffff; --sunken: #f6f7f9; --ink: #2d2f31; --muted: #595c73; --line: #d1d2e0; --line-strong: #9194ac;
  --brand: #0a6b50; --brand-2: #07513c; --brand-deep: #1d1e27; --brand-soft: #e6f2ed;
  --gold: #0a6b50; --gold-fill: #0a6b50; --gold-soft: #f6f7f9;
  --danger: #a8322a; --danger-soft: #f7e4e0; --warning: #8a5a00; --warning-soft: #f8edd4;
  --success: #17704a; --success-soft: #e1efe5; --info: #24557f; --info-soft: #e4edf5;
  --radius: 6px; --radius-lg: 10px;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans); --mono: var(--sans);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px;
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: 3px; transition: color .15s var(--ease), text-decoration-color .15s var(--ease); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.18rem; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.ico { flex-shrink: 0; vertical-align: -0.2em; }
.eyebrow { font: 700 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: 0 0 14px; display: block; }

/* Header */
.site-header { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; gap: 28px; min-height: 68px; flex-wrap: wrap; }
.logo { font: 800 1.2rem/1 var(--sans); color: var(--ink); display: flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: -.01em; }
.logo span { width: 28px; height: 28px; display: inline-grid; place-items: center; background: var(--brand); color: var(--gold-fill);
  border-radius: 3px; font: 600 .78rem/1 var(--mono); letter-spacing: 0; }
.logo img { width: 34px; height: 34px; display: block; }
.nav-links { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .93rem; text-decoration: none; padding: 8px 10px; border-radius: var(--radius);
  position: relative; }
.nav-links a:hover { color: var(--ink); background: var(--sunken); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -15px; height: 2px; background: var(--ink); }
.nav-user { display: flex; gap: 8px; align-items: center; }
.nav-user form { margin: 0; }
.nav .menu-toggle { display: none; }
@media (max-width: 980px) {
  .nav { gap: 12px; }
  .nav .menu-toggle { display: inline-flex; margin-left: auto; }
  .nav-links, .nav-user { display: none; width: 100%; flex-direction: column; gap: 2px; padding-bottom: 14px; }
  .nav-links a { padding: 12px 10px; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--sunken); }
  .nav.open .nav-links, .nav.open .nav-user { display: flex; align-items: stretch; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--brand); font: 700 .94rem/1.2 var(--sans); cursor: pointer; background: var(--brand); color: #fff;
  text-decoration: none; transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--sunken); }
.btn-gold { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-gold:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .86rem; }
.btn-link { background: none; border: none; color: var(--danger); cursor: pointer; padding: 0; font: inherit; }
.btn .ico { transition: transform .2s var(--ease); }
.btn:hover .ico-move { transform: translateX(3px); }

/* Layout pieces */
main { padding: 40px 0 80px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: end;
  padding: 24px 0 48px; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { font-size: 1.12rem; color: var(--muted); max-width: 560px; margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 36px; } }

/* Panneau de séance (accueil) */
.tape { background: var(--brand-deep); color: #f1f1f5; border-radius: var(--radius-lg); padding: 22px 22px 14px; }
.tape-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px;
  font: 600 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #b4b6c8; }
.tape-index { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.14); }
.tape-index strong { font: 700 2.3rem/1 var(--sans); color: #fff; letter-spacing: -.01em; }
.tape-index small { color: #b4b6c8; font-size: .85rem; width: 100%; }
.tape .up { color: #7fd6a4; } .tape .down { color: #f2a196; }
.tape-rows { list-style: none; margin: 0; padding: 0; }
.tape-rows li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08); font-size: .9rem; }
.tape-rows li:last-child { border-bottom: 0; }
.tape-rows a { color: inherit; text-decoration: none; display: contents; }
.tape-rows .sym { font: 700 .85rem/1 var(--sans); color: #fff; }
.tape-rows .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d1d2e0; }
.tape-rows .chg { font-family: var(--mono); font-size: .85rem; }
.tape-foot { display: block; margin-top: 8px; font-size: .84rem; color: #fff; }

/* Chiffres clés */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--sunken); border-radius: var(--radius-lg); margin-bottom: 8px; }
.figures div { padding: 24px; border-left: 1px solid var(--line); }
.figures div:first-child { border-left: 0; }
.figures strong { display: block; font: 700 2.2rem/1 var(--sans); color: var(--ink); margin-bottom: 6px; }
.figures span { color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) {
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figures div { padding: 18px; border-left: 0; border-top: 1px solid var(--line); }
  .figures div:nth-child(-n+2) { border-top: 0; }
  .figures div:nth-child(odd) { padding-left: 18px; }
  .figures strong { font-size: 1.9rem; }
}

/* Parcours en liste numérotée */
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: idx; }
.index-list li { counter-increment: idx; border-bottom: 1px solid var(--line); }
.index-list a { display: grid; grid-template-columns: 56px 44px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 22px 8px; color: inherit; text-decoration: none; transition: background .15s var(--ease); }
.index-list a::before { content: counter(idx, decimal-leading-zero); font: 700 1rem/1 var(--sans); color: var(--line-strong); }
.index-list a:hover { background: var(--sunken); }
.index-list a:hover h3 { color: var(--brand); }
.index-list h3 { margin: 0 0 4px; font-size: 1.35rem; transition: color .15s var(--ease); }
.index-list p { margin: 0; color: var(--muted); font-size: .94rem; }
.index-list .count { font-size: .85rem; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.icon-box { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); display: grid; place-items: center; color: var(--brand); background: var(--surface); }
@media (max-width: 640px) {
  .index-list a { grid-template-columns: 32px minmax(0, 1fr); gap: 4px 12px; padding: 18px 0; }
  .index-list .icon-box, .index-list .count .ico { display: none; }
  .index-list .count { grid-column: 2; }
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (max-width: 560px) { .grid { gap: 12px; } .card { padding: 18px; } .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s var(--ease), background .15s var(--ease); }
.card-link:hover { border-color: var(--ink); }
.card-link:hover h3 { color: var(--brand); }
.card-link h3 { transition: color .15s var(--ease); }
.stat { text-align: left; }
.stat strong { display: block; font: 700 clamp(1.3rem, 2.3vw, 1.9rem)/1.2 var(--sans); color: var(--ink); overflow-wrap: break-word; margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: .88rem; }
.section { margin: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 500; font-size: .93rem; display: inline-flex; gap: 6px; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; font-size: 1.3rem; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 3px;
  background: var(--brand-soft); color: var(--brand); vertical-align: middle; }
.tag-gold { background: #fdecea; color: #a8322a; }
.tag-grey { background: var(--sunken); color: var(--muted); }
.meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 12px; }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }

/* Outils */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.tools a { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.tools a:hover h3 { color: var(--brand); }
.tools h3 { font-size: 1.08rem; margin: 0 0 4px; transition: color .15s var(--ease); }
.tools p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Progress */
.progress { background: var(--sunken); border-radius: 2px; height: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.progress.gold > span { background: var(--gold-fill); }
.progress.over > span { background: var(--danger); }

/* Lists */
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lesson-list li:last-child { border-bottom: 0; }
.num { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
  font: 500 .8rem/1 var(--mono); flex-shrink: 0; }
.num.done { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Lesson content */
.prose { font-size: 1.07rem; line-height: 1.75; max-width: 68ch; }
.prose h2 { margin-top: 1.6em; } .prose h3 { margin-top: 1.4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { border-bottom: 1px solid var(--ink); font-weight: 600; }
.prose blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 3px solid var(--brand); background: var(--sunken); color: var(--ink); }
.prose blockquote p { margin: 0; }
.keypoints { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 20px 24px; margin: 32px 0; }
.keypoints h3 { color: var(--brand); display: flex; gap: 8px; align-items: center; }
.keypoints ul { margin: 0; padding-left: 20px; }
.keypoints li { margin: 4px 0; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.lesson-side { position: sticky; top: 92px; }
.lesson-side ol { padding-left: 20px; margin: 0; font-size: .92rem; }
.lesson-side li { margin: 8px 0; }
.lesson-side li a { color: var(--muted); text-decoration: none; }
.lesson-side li a:hover { color: var(--ink); }
.lesson-side li.current a { font-weight: 600; color: var(--ink); }
@media (max-width: 900px) { .lesson-layout { grid-template-columns: 1fr; } .lesson-side { position: static; } }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Forms */
form p, .field { margin: 0 0 16px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=month], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.helptext, .field small { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 4px 0; font-size: .88rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.form-inline p { margin: 0; }

/* Alerts */
.messages { list-style: none; padding: 0; margin: 0 0 24px; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 10px; border: 1px solid transparent; border-left-width: 3px; }
.alert-success { background: var(--success-soft); color: var(--success); border-left-color: var(--success); }
.alert-info { background: var(--info-soft); color: var(--info); border-left-color: var(--info); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-left-color: var(--warning); }
.alert-danger, .alert-error { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); }

/* Quiz */
.question { margin-bottom: 28px; }
.question legend { font: 700 1.12rem/1.35 var(--sans); margin-bottom: 12px; }
.question fieldset { border: 0; padding: 0; margin: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px;
  cursor: pointer; font-weight: 400; background: var(--surface); transition: border-color .15s var(--ease), background .15s var(--ease); }
label.choice:hover { border-color: var(--ink); }
label.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input { margin-top: 4px; accent-color: var(--brand); width: 16px; height: 16px; flex-shrink: 0; }
.choice .ico { margin-top: 3px; }
.choice.correct { border-color: var(--success); background: var(--success-soft); }
.choice.wrong { border-color: var(--danger); background: var(--danger-soft); }
.score-ring { width: 148px; height: 148px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 2.4rem/1 var(--sans); margin: 0 auto 16px; border: 3px solid currentColor; }
.score-pass { background: var(--success-soft); color: var(--success); }
.score-fail { background: var(--warning-soft); color: var(--warning); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; border-bottom-color: var(--ink); }
.table tbody tr { transition: background .12s var(--ease); }
.table tbody tr:hover { background: color-mix(in srgb, var(--sunken) 50%, transparent); }
.table td.num-cell, .table th.num-cell { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.big-number { font: 700 2rem/1.15 var(--sans); color: var(--ink); }
.positive { color: var(--success); } .negative { color: var(--danger); }

details.solution { margin-top: 24px; border: 1px solid var(--line); border-left: 3px solid var(--gold-fill); border-radius: var(--radius); background: var(--surface); padding: 16px 20px; }
details.solution summary { cursor: pointer; font-weight: 600; color: var(--ink); }

.site-footer { background: var(--brand-deep); padding: 40px 0 48px; color: #b4b6c8; font-size: .88rem; }
.site-footer .logo { color: #fff; }
.disclaimer { font-size: .8rem; color: #b4b6c8; max-width: 820px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 120px; gap: 10px; align-items: center; margin: 8px 0; font-size: .92rem; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr; gap: 4px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Animations pédagogiques (static/js/animations.js) */
.anim { margin: 32px 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--sunken); }
.anim figcaption { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; }
.anim-svg { width: 100%; height: auto; display: block; background: var(--surface); border-radius: var(--radius); }
.anim-bar { opacity: 0; transition: opacity .2s var(--ease); }
.anim-bar.on { opacity: 1; }
.anim-paid { fill: #9fb8ad; } .anim-gain { fill: var(--brand); } .anim-cost { fill: #d9776c; }
.anim-axis { stroke: var(--line-strong); stroke-width: 1; } .anim-axis.dashed { stroke-dasharray: 4 4; }
.anim-tick { font-size: 11px; fill: var(--muted); font-family: var(--sans); }
.anim-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.anim-line.gain { stroke: var(--brand); } .anim-line.cost { stroke: #d9776c; }
.anim-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 4px; font-size: .85rem; color: var(--muted); }
.anim-legend .key::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.key-paid::before { background: #9fb8ad; } .key-gain::before { background: var(--brand); } .key-cost::before { background: #d9776c; }
.anim-readout { margin: 8px 0 0; font-size: .93rem; min-height: 3em; }
.anim-controls { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; }
.anim-controls select { width: auto; min-height: 36px; padding: 4px 10px; display: inline-block; }
.anim-field { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-weight: 500; }
.anim-dots { color: var(--muted); font-size: .85rem; }
.anim-book { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.anim-book.flash .row-new, .anim-book.flash .row-done, .anim-book.flash .row-warn { animation: anim-flash .6s var(--ease); }
.anim-side { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; }
.anim-side h4 { margin: 0 0 6px; font-size: .9rem; } .anim-side.buy h4 { color: var(--success); } .anim-side.sell h4 { color: var(--danger); }
.anim-side .row-new td { background: var(--brand-soft); font-weight: 700; }
.anim-side .row-done td { background: #fff4d6; font-weight: 700; }
.anim-side .row-warn td { background: var(--danger-soft); }
.anim-last { margin: 12px 0 0; }
@keyframes anim-flash { from { background: #ffe9a8; } }
@media (max-width: 560px) { .anim { padding: 14px; } .anim-book { grid-template-columns: 1fr; } }

/* Leçon en vidéo (static/js/lesson-video.js) */
.lesson-video { margin: 0 0 24px; }
.lv-player { background: var(--brand-deep); color: #f1f1f5; border-radius: var(--radius-lg); overflow: hidden; outline: none; }
.lv-player:fullscreen { display: flex; flex-direction: column; justify-content: center; border-radius: 0; }
.lv-stage { aspect-ratio: 16 / 9; display: grid; grid-template-columns: 38% 1fr; gap: 4%; align-items: center; padding: 5% 6%; position: relative;
  background: radial-gradient(120% 90% at 0% 100%, rgba(10,107,80,.55), transparent 60%), var(--brand-deep); }
.lv-player:fullscreen .lv-stage { flex: 1; aspect-ratio: auto; }
.lv-visual { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4%; }
.lv-prop { flex: 0 1 44%; min-height: 0; width: 100%; display: grid; place-items: center; }
.lv-prop > * { max-height: 100%; }
.lv-presenter { flex: 0 0 52%; width: 100%; display: grid; place-items: end center; }
.lv-presenter svg { height: 100%; max-height: 260px; width: auto; display: block; }
.lv-awa .awa-body { animation: awa-idle 3.2s ease-in-out infinite; transform-origin: 100px 240px; }
.lv-awa .awa-eyes { animation: awa-blink 4.2s infinite; transform-origin: 100px 108px; }
.lv-awa .awa-mouth-open { opacity: 0; transform-origin: 100px 133px; }
.talking .awa-mouth-closed { opacity: 0; }
.talking .awa-mouth-open { animation: awa-talk .32s ease-in-out infinite alternate; }
.talking .awa-head { animation: awa-nod 1.6s ease-in-out infinite; transform-origin: 100px 150px; }
@keyframes awa-idle { 50% { transform: translateY(2px); } }
@keyframes awa-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes awa-talk { from { opacity: 1; transform: scaleY(.35); } to { opacity: 1; transform: scaleY(1); } }
@keyframes awa-nod { 50% { transform: rotate(-2deg); } }
.lv-icon, .lv-figure, .lv-grid { animation: lv-pop .5s var(--ease) both; }
.lv-icon { width: min(46%, 120px); aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.07); display: grid; place-items: center; color: #7fd6a4; }
.lv-icon svg { width: 52%; height: 52%; }
.lv-figure { font: 800 clamp(1.6rem, 5vw, 3.4rem)/1.05 var(--sans); color: #fff; text-align: center; letter-spacing: -.02em; padding: 10px;
  border-bottom: 4px solid #7fd6a4; }
.lv-grid { width: min(92%, 260px); }
.lv-grid rect { fill: rgba(255,255,255,.14); animation: lv-cell .3s var(--ease) both; }
.lv-grid rect.me { fill: #7fd6a4; }
.lv-grid text { fill: #d1d2e0; font: 600 7px var(--sans); }
.lv-text { min-width: 0; align-self: center; }
.lv-kicker { font: 700 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #7fd6a4; margin-bottom: 10px; }
.lv-title { font: 800 clamp(1.1rem, 2.8vw, 1.9rem)/1.15 var(--sans); color: #fff; margin-bottom: 14px; letter-spacing: -.01em; }
.is-intro .lv-title { font-size: clamp(1.5rem, 4.4vw, 2.8rem); }
.lv-beats { display: grid; gap: 8px; font-size: clamp(.8rem, 1.6vw, 1.02rem); line-height: 1.45; }
.lv-beat { display: flex; gap: 10px; color: #9a9db3; animation: lv-in .45s var(--ease) both; }
.lv-beat.now { color: #fff; }
.lv-beat.quote { font-style: italic; border-left: 3px solid #7fd6a4; padding-left: 12px; }
.lv-beat mark { background: none; color: #7fd6a4; font-weight: 700; }
.lv-beat:not(.now) mark { color: inherit; }
.lv-bullet { flex-shrink: 0; width: 1.5em; height: 1.5em; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-grid; place-items: center; font-size: .75em; font-weight: 700; }
.lv-beat .lv-table { display: block; width: 100%; margin-top: 6px; color: #f1f1f5; font-size: .82em; }
.lv-beat .lv-table th { color: #b4b6c8; border-bottom-color: rgba(255,255,255,.3); }
.lv-beat .lv-table td { border-bottom-color: rgba(255,255,255,.1); padding: 5px 6px; }
.lv-beat:has(.lv-table) { flex-direction: column; }
.lv-sub { min-height: 3.2em; padding: 10px 18px; background: #111219; color: #fff; font-size: .95rem; text-align: center; }
.lv-progress { height: 4px; background: rgba(255,255,255,.12); }
.lv-progress span { display: block; height: 100%; width: 0; background: #7fd6a4; transition: width .4s var(--ease); }
.lv-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: #111219; }
.lv-btn { min-width: 40px; min-height: 40px; border: 0; border-radius: var(--radius); background: transparent; color: #f1f1f5; cursor: pointer;
  display: inline-grid; place-items: center; font: 600 .85rem var(--sans); padding: 0 10px; }
.lv-btn:hover { background: rgba(255,255,255,.1); }
.lv-btn:disabled { opacity: .4; cursor: not-allowed; }
.lv-speed { width: auto; min-height: 36px; padding: 4px 8px; background: #1d1e27; color: #f1f1f5; border-color: rgba(255,255,255,.2); }
.lv-count { margin-left: auto; color: #9a9db3; font-size: .82rem; padding: 0 6px; }
.lv-stage.enter .lv-title { animation: lv-in .5s var(--ease) both; }
@keyframes lv-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes lv-pop { from { opacity: 0; transform: scale(.85); } }
@keyframes lv-cell { from { opacity: 0; } }
@media (max-width: 640px) {
  .lv-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; aspect-ratio: auto; min-height: 440px; gap: 16px; padding: 20px 18px; align-items: start; }
  .lv-visual { height: auto; flex-direction: row; align-items: flex-end; justify-content: center; }
  .lv-presenter { flex: 0 0 120px; } .lv-presenter svg { height: 140px; }
  .lv-prop { flex: 1 1 auto; }
  .lv-icon { width: 84px; } .lv-grid { width: 130px; } .lv-figure { font-size: 1.8rem; }
  .lv-title { font-size: 1.3rem; } .is-intro .lv-title { font-size: 1.7rem; }
  .lv-beats { font-size: 1rem; }
  .lv-count { margin-left: 0; }
}
