/* SAL Experience Layer pilot 0.1. Reusable, reversible, scoped. No grading access. */
body.salx { --salx-cyan:#8de4db; --salx-gold:#f2ce8c; --salx-surface:#102e3b; --salx-focus:#f5db91; --salx-type:1; }
body.salx.salx-large{--salx-type:1.2}
body.salx.salx-xl{--salx-type:1.38}
body.salx .wrap{max-width:1120px}
body.salx #app{font-size:calc(1rem * var(--salx-type));line-height:1.65}
body.salx #app p{max-width:76ch}
body.salx #app .panel{border-radius:24px;padding:clamp(1.15rem,3vw,2rem);box-shadow:0 13px 36px #0003}
body.salx #app .learn-notes .grid{grid-template-columns:minmax(0,1fr);gap:1rem}
body.salx #app .learn-notes .grid .card{width:100%;max-width:830px;margin-inline:auto;background:linear-gradient(150deg,#18424c,#0e2837);border:1px solid #7db1ac;box-shadow:0 14px 35px #0003;padding:clamp(1.3rem,3vw,2rem);min-height:190px}
body.salx #app .learn-notes .grid .card h2{font-size:clamp(1.25rem,2vw,1.65rem);color:#fef1ce}
body.salx #app .learn-notes .grid .card p{font-size:1.065em;line-height:1.65}
body.salx #app .learn-notes .grid .card .voice button{min-height:48px}
body.salx #app .options .option{font-size:1.03em;padding:1rem 1.2rem;min-height:72px;border-radius:16px}
body.salx #app .options .option strong{min-width:45px;min-height:45px;display:grid;place-items:center}
body.salx #app .seq-bar{background:#102d3b;border:1px solid #83acb3;border-radius:18px;padding:1rem;margin:1.2rem auto;max-width:830px}
body.salx #app .seq-bar button{min-height:50px;font-weight:750}
body.salx .salx-tools{margin:.1rem 0;display:flex;flex-wrap:wrap;gap:.42rem;align-items:center}
body.salx .salx-tools details{position:relative;margin:0;padding:0;border:0}
body.salx .salx-tools summary{border:1px solid #85b4b2;border-radius:12px;min-height:46px;padding:.55rem .85rem;background:#173e4a;color:#fff;list-style:none;display:flex;align-items:center}
body.salx .salx-tools summary::-webkit-details-marker{display:none}
body.salx .salx-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:50;width:min(365px,calc(100vw - 26px));padding:1rem;background:#153c4a;border:2px solid #a5ddd5;border-radius:20px;box-shadow:0 17px 35px #0009}
body.salx .salx-menu strong{display:block;margin:.15rem 0 .8rem;color:white}
body.salx .salx-menu button{min-height:48px;min-width:48px;margin:.17rem;font-weight:720}
body.salx .salx-menu button[aria-pressed=true]{background:#bcefe1;color:#08343d;border-color:#bcefe1}
body.salx .salx-menu p{font-size:.84rem;line-height:1.4;color:#e6eff2}
body.salx .salx-hero{position:relative;overflow:hidden;margin:0 0 1.4rem;padding:clamp(1.5rem,4vw,3rem);min-height:260px;background:radial-gradient(ellipse at 80% 15%,#3b969668,transparent 49%),linear-gradient(135deg,#0a2638,#145669 65%,#0a2533);border:1px solid #77bdb4;border-radius:26px;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(210px,.75fr);gap:1.4rem;align-items:center;box-shadow:0 20px 46px #0005}
body.salx .salx-hero h2{color:#fff;font-size:clamp(1.65rem,4vw,3.2rem);line-height:1.12;margin:.55rem 0}
body.salx .salx-hero .salx-kicker{font-size:.78rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#abe8df;margin:.3rem 0}
body.salx .salx-hero p.salx-intro{color:#e9f5f2;font-size:clamp(1.01rem,1.8vw,1.19rem);line-height:1.55;margin:1rem 0 0;max-width:56ch}
body.salx .salx-hero svg{display:block;width:100%;height:auto;max-height:275px;filter:drop-shadow(0 14px 20px #0026)}
body.salx .salx-photo{margin:0;border:1px solid #b6e9d0;border-radius:18px;overflow:hidden;background:#153e49;box-shadow:0 15px 35px #0007}
body.salx .salx-photo img{display:block;width:100%;height:235px;object-fit:cover}
body.salx .salx-photo figcaption{padding:.55rem .7rem;font-size:.73rem;line-height:1.42;color:#def2ef}

body.salx .salx-hero .salx-es{display:none;}
body.salx .salx-hero.salx-bilingual .salx-es{display:block;font-size:.89em;color:#cde9ea;margin-top:.4rem}
/* SAL r56-fix6 (Muse QA branch) — D8: fix5 pattern ported to U04 (was U05-only). */
/* fix5: Learn-phase hero title ES is a subtitle, not a second headline. The span uses class salx-es (not es), so the fix2-fix4 span.es rules never matched it. Also mute the ES intro paragraph. */
body.salx .salx-hero.salx-bilingual h2>span.salx-es{display:block;font-size:.52em;font-weight:400;color:var(--muted,#c5d6da);margin-top:.35rem;line-height:1.4}
body.salx .salx-hero.salx-bilingual p.salx-intro.salx-es{color:var(--muted,#c5d6da)}
body.salx.salx-focus .salx-hero svg,body.salx.salx-focus .salx-hero .salx-art{display:none}
body.salx.salx-focus .salx-hero{grid-template-columns:1fr;min-height:0;box-shadow:none;background:#102c39}
body.salx.salx-focus::before,body.salx.salx-focus::after{display:none!important}
body.salx.salx-motion-off *,body.salx.salx-motion-off *::before,body.salx.salx-motion-off *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;transform:none!important}
body.salx.salx-contrast{--text:#fff;--muted:#fff;--line:#dbf2ed;--sea:#d6fff8;background:#051018}
body.salx.salx-contrast #app .card,body.salx.salx-contrast #app .panel{border:2px solid #fff;background:#0a202b;color:#fff}
body.salx .salx-science-review{font-size:.75rem;opacity:.83}
body.salx .salx-hidden-qa{display:none!important}
body.salx.salx-celebrations-off #app .notice.success{border:1px solid #426673;background:#193b3f;color:inherit}
body.salx #app .salx-hero + section.panel .steps{margin-top:0}
@media(max-width:720px){body.salx .salx-hero{grid-template-columns:1fr;padding:1.25rem;min-height:auto}body.salx .salx-hero svg{max-height:170px}body.salx .salx-tools{width:100%;justify-content:flex-start}body.salx .salx-menu{right:auto;left:0}body.salx #app .learn-notes .grid .card{padding:1.2rem}}
@media print{body.salx .salx-hero,body.salx .salx-tools{display:none!important}body.salx #app .learn-notes .grid .card{box-shadow:none!important;background:#fff!important;color:#111!important}body.salx #app .learn-notes .grid .card *{color:#111!important}}
@media(prefers-reduced-motion:reduce){body.salx *,body.salx *::before,body.salx *::after{animation:none!important;transition:none!important}}

/* SAL visual demo U04/U05 Silver (branch visual/u04-u05-silver-demo) — F-01/F-02/F-09.
   Per-lesson model as protagonist: intro figure + Learn hero model + numbered
   structure chips. Presentation only; reuses each lesson's own illustration. */
body.salx #app .salx-intro-figure{margin:1.1rem 0;background:#0d2734;border:1px solid #6f9a9e;border-radius:18px;overflow:hidden}
body.salx #app .salx-intro-figure img{display:block;width:100%;height:clamp(220px,38vw,340px);object-fit:contain;background:#0d2734}
body.salx #app .salx-intro-figure figcaption{padding:.6rem .9rem;font-size:.8rem;line-height:1.5;color:#d5e2e3}
body.salx #app .salx-intro-figure figcaption .salx-intro-es{display:none}
body.salx #app .salx-intro-figure.salx-ell-on figcaption .salx-intro-es{display:block;font-size:.92em;color:var(--muted);margin-top:.15rem}
body.salx #app .salx-intro-figure figcaption .salx-intro-credit{display:block;font-size:.92em;color:var(--muted);margin-top:.3rem}
body.salx #app .salx-intro-figure figcaption a{color:#9bf2d6}
body.salx .salx-hero .salx-hero-model{margin:0}
body.salx .salx-hero .salx-art img{display:block;width:100%;height:auto;max-height:320px;object-fit:contain;background:#0d2734;border:1px solid #6f9a9e;border-radius:16px}
body.salx .salx-hero-chips{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.7rem}
body.salx .salx-hero-chips button{display:flex;align-items:center;gap:.5rem;min-height:44px;padding:.45rem .7rem;border-radius:12px;text-align:left;font-size:.88rem;line-height:1.3}
body.salx .salx-hero-chips .salx-chip-num{display:grid;place-items:center;min-width:26px;height:26px;border-radius:50%;background:#244f63;color:#edf8f4;font-weight:800;font-size:.85rem;flex:none}
body.salx .salx-hero-chips .salx-chip-label{display:block;min-width:0}
body.salx .salx-hero-chips .salx-chip-en{display:block}
body.salx .salx-hero-chips .salx-chip-es{display:none}
body.salx .salx-hero.salx-bilingual .salx-hero-chips .salx-chip-es,body.salx .salx-hero.salx-ell-on .salx-hero-chips .salx-chip-es{display:block;font-size:.85em;opacity:.85}
body.salx .salx-hero-chips button[aria-pressed="true"]{background:#bcefe1;color:#08343d;border-color:#bcefe1}
body.salx .salx-hero-chips button[aria-pressed="true"] .salx-chip-num{background:#08343d;color:#bcefe1}
/* Focus mode: the base rule hides .salx-art wholesale. The model is real
   content, not decoration, so keep the art column and hide only a generic SVG. */
body.salx.salx-focus .salx-hero .salx-art{display:block}
body.salx.salx-focus .salx-hero .salx-art svg{display:none}
@media(max-width:720px){
  body.salx .salx-hero .salx-art img{max-height:300px}
  body.salx #app .salx-intro-figure img{height:220px}
  body.salx .salx-hero-chips button{flex:1 1 46%}
}

/* Founder refinements 2026-11-27 (branch visual/u04-u05-silver-demo).
   R5 — nav hierarchy: the pedagogical phase step is the one primary
   action; card navigation (Back / Notes / Unit) is secondary. On narrow
   screens the phase action takes its own full-width row below the card nav.
   R6 — living science, controllable motion only: the Learn hero model
   breathes gently and a slow light sweep crosses the model (photosynthesis
   light / mitosis division); the hero fades in once per phase render and
   success notices fade in discretely. No GIFs, no flashes, no heavy assets.
   All of it is killed by Reduce motion (salx-motion-off, set from Settings
   or the OS preference) and by prefers-reduced-motion — see the existing
   kill rules above. No full-panel fade: the engine re-renders the whole
   panel on every interaction (e.g. selecting an answer), so a panel
   animation would replay on every click; the hero-only fade is the
   phase-transition signal. */
@keyframes salx-phase-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes salx-model-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.018)}}
@keyframes salx-light-sweep{0%{transform:translateX(-130%) skewX(-12deg)}100%{transform:translateX(230%) skewX(-12deg)}}
body.salx .salx-hero{animation:salx-phase-in .35s ease-out}
body.salx .salx-hero .salx-art img{animation:salx-model-breathe 7s ease-in-out infinite;transform-origin:center}
body.salx .salx-hero .salx-art{position:relative;overflow:hidden;border-radius:16px}
body.salx #app .notice.success{animation:salx-phase-in .4s ease-out}
body.salx #app .nav .sal-nav-phase{flex:1 1 auto;justify-content:center;box-shadow:0 4px 18px #0005}
body.salx #app .nav .sal-nav-card{opacity:.94;font-weight:600}
@media(max-width:560px){
  body.salx #app .nav .sal-nav-phase{order:3;flex-basis:100%}
  body.salx #app .nav .sal-nav-card{flex:1 1 40%}
}

/* R5 (founder refinements 2026-11-27): the card sequence bar uses the same
   hierarchy as the phase nav — the forward step is primary, Previous /
   mode are secondary card navigation. */
body.salx #app .seq-bar .sal-nav-phase{flex:1 1 auto;justify-content:center}
body.salx #app .seq-bar .sal-nav-card{opacity:.94;font-weight:600}
