/*
 * Shared LeviLingo guide styles: robot mascot, speech bubbles, guided walkthroughs, app section, motion.
 * Used by the brand page (public/landing) and language hubs (web/home). Tokens only, see docs/BRAND_COLORS.md.
 */
/* Brand landing — tokens only (docs/BRAND_COLORS.md) */
.lx { overflow-x: clip; }
.lx-alt { background: var(--color-surface); }
.lx-kicker {
    font-size: var(--fs-sm); font-weight: var(--fw-bold);
    text-transform: uppercase; letter-spacing: var(--ls-caps);
    color: var(--ll-teal-800); margin-bottom: var(--space-3);
}
[data-bs-theme="dark"] .lx-kicker { color: var(--ll-teal); }
.lx h2 {
    font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
    font-weight: var(--fw-heavy); letter-spacing: -0.03em;
    line-height: var(--lh-tight); color: var(--color-heading);
    margin-bottom: var(--space-4);
    text-wrap: balance;
}
.lx-text { font-size: var(--fs-lead); line-height: var(--lh-body); color: var(--color-text-secondary); max-width: 36rem; margin-bottom: var(--space-5); }
.lx-link { font-weight: var(--fw-bold); text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.lx-link i { transition: transform .2s ease; }
.lx-link:hover i { transform: translateX(3px); }
.lx-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.bg-ll-blue { background: var(--ll-deep-blue); }
.bg-ll-sky { background: var(--ll-sky-700); }
.bg-ll-teal { background: var(--ll-teal-700); }
.bg-ll-purple { background: var(--ll-purple-700); }
.bg-ll-coral { background: var(--ll-coral-700); }
[data-bs-theme="dark"] .bg-ll-blue { background: var(--ll-deep-blue-600); }

/* ---------- Robot ---------- */
.llm { --llm-line: var(--ll-deep-blue); display: block; width: 100%; height: auto; overflow: visible; }
[data-bs-theme="dark"] .llm { --llm-line: var(--ll-ink-300); }
.llm-shadow { fill: var(--ll-deep-blue); opacity: .13; }
[data-bs-theme="dark"] .llm-shadow { fill: var(--ll-night-900); opacity: .6; }
.llm-eye { transform-box: fill-box; transform-origin: center; animation: llmBlink 5s infinite; }
.llm-m1, .llm-m2, .llm-m3 { opacity: 0; }
/* Talking: four mouth shapes take turns, the head nods a little */
.is-talking .llm-m0 { opacity: 0; }
.is-talking .llm-m1 { animation: llmViseme .6s step-end infinite; }
.is-talking .llm-m2 { animation: llmViseme .6s step-end infinite -.2s; }
.is-talking .llm-m3 { animation: llmViseme .6s step-end infinite -.4s; }
.is-talking .llm-head { transform-box: view-box; transform-origin: 248px 320px; animation: llmNod .7s ease-in-out infinite alternate; }
/* Waving hello */
.is-waving .llm-arm-r { transform-box: view-box; transform-origin: 326px 372px; animation: llmWaveArm .9s ease-in-out infinite alternate; }
/* Props come alive only on the robot that is on stage */
.is-on .llm-dot, .is-live .llm-dot { animation: llmDot 1.2s infinite; }
.is-on .llm-dot:nth-child(odd), .is-live .llm-dot:nth-child(odd) { animation-delay: .2s; }
.is-on .llm-note { transform-box: fill-box; animation: llmNote 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -1.2s); }
.is-on .llm-waves path { animation: llmPulse 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * .2s); }
.llm-scribble { stroke-dasharray: 100; stroke-dashoffset: 0; }
.is-on .llm-scribble { animation: llmScribble 2.6s ease-in-out infinite; }
.is-on .llm-pen { animation: llmPen 2.6s ease-in-out infinite; }
.is-on .llm-piece { transform-box: fill-box; animation: llmBob 2.4s ease-in-out infinite; }
.llm-confetti rect { opacity: 0; }
.is-on .llm-confetti rect { transform-box: fill-box; transform-origin: center; animation: llmConfetti 2.2s ease-in infinite; animation-delay: calc(var(--i) * .18s); }
@keyframes llmBlink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes llmViseme { 0% { opacity: 1; } 33.3% { opacity: 0; } }
@keyframes llmNod { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg) translateY(-2px); } }
@keyframes llmWaveArm { from { transform: rotate(-14deg); } to { transform: rotate(12deg); } }
@keyframes llmDot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes llmNote { 0% { opacity: 0; transform: translateY(14px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
@keyframes llmPulse { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes llmScribble { 0% { stroke-dashoffset: 100; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes llmPen { 0%, 100% { translate: 0 0; } 20% { translate: -60px 4px; } 40% { translate: -36px 0; } 60% { translate: 0 2px; } }
@keyframes llmBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(8deg); } }
@keyframes llmConfetti { 0% { opacity: 0; transform: translateY(-14px) rotate(var(--r)); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(46px) rotate(calc(var(--r) + 200deg)); } }

/* ---------- Speech bubble ---------- */
.lx-say {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: .9rem 1.1rem;
    font-weight: var(--fw-semibold);
    color: var(--color-text-primary);
    line-height: 1.5;
}
.lx-say::after {
    content: ""; position: absolute; left: 50%; bottom: -10px; width: 20px; height: 20px;
    background: inherit; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
    transform: translateX(-50%) rotate(45deg);
}
.lx-typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--ll-sky); animation: llmDot .8s infinite; }

/* ---------- Hero ---------- */
.lx-hero {
    min-height: calc(100svh - 72px);
    display: flex; align-items: center; position: relative;
    padding-block: clamp(3rem, 6vw, 4.5rem);
    background:
        radial-gradient(circle at 78% 30%, color-mix(in srgb, var(--ll-sky) 18%, transparent), transparent 40%),
        radial-gradient(circle at 92% 85%, color-mix(in srgb, var(--ll-teal) 14%, transparent), transparent 32%),
        var(--color-background);
}
.lx-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2.5rem 4rem; align-items: center; }
.lx-hero h1 {
    font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.4rem);
    font-weight: var(--fw-heavy); letter-spacing: -0.04em; line-height: 1.04;
    color: var(--color-heading); margin-bottom: var(--space-4);
}
.lx-hero h1 span { color: var(--ll-teal-700); display: block; }
[data-bs-theme="dark"] .lx-hero h1 span { color: var(--ll-teal); }
.lx-hero .lx-text { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); }
.lx-note { margin-top: var(--space-4); font-size: var(--fs-sm); color: var(--color-text-secondary); font-weight: var(--fw-semibold); }
.lx-note i { color: var(--ll-teal-700); margin-right: .35rem; }
[data-bs-theme="dark"] .lx-note i { color: var(--ll-teal); }
.lx-hero-bot { max-width: 24rem; margin-inline: auto; width: 100%; }
.lx-hero-bot .lx-say { margin: 0 auto 1rem; max-width: 19rem; min-height: 4.9rem; text-align: center; }
.lx-hero-bot .llm { width: 86%; margin-inline: auto; animation: lxFloat 6s ease-in-out infinite; }
.lx-scroll {
    position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    color: var(--color-heading); text-decoration: none;
    border: 1px solid var(--color-border); background: var(--color-surface);
    animation: lxNudge 2.4s ease-in-out infinite;
}

/* ---------- Guided walkthroughs ---------- */
.lx-guide { padding-block: clamp(3.5rem, 6vw, 5rem); }
.lx-section-line { border-top: 1px solid var(--color-border); }
.lx-guide-grid { display: grid; grid-template-columns: minmax(0, 25rem) minmax(0, 42rem); justify-content: space-between; gap: 2rem clamp(2.5rem, 6vw, 6rem); }
.lx-guide--right .lx-guide-grid { grid-template-columns: minmax(0, 42rem) minmax(0, 25rem); }
.lx-guide--right .lx-guide-side { order: 2; }
/* Title, speech bubble and robot arrive together */
.lx-guide-grid { align-items: center; }
.lx-guide-grid > *, .lx-stage > * { min-width: 0; }
.lx-guide-head h2 { font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.4rem); margin-bottom: var(--space-3); }
.lx-guide-head .lx-text { font-size: var(--fs-body); margin-bottom: var(--space-5); }
.lx-guide-bot .lx-say { margin-bottom: 1rem; min-height: 5.2rem; display: flex; align-items: center; }
.lx-bots { position: relative; aspect-ratio: 540 / 580; max-width: 15rem; margin-inline: auto; }
.lx-bot { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.lx-bot.is-on { opacity: 1; visibility: visible; animation: lxPop .6s cubic-bezier(.2,.9,.3,1.3) both; }
.lx-guide--right .lx-bot.is-on { animation-name: lxPopR; }
/* The robot flies in from its own side the first time the section arrives */
.lx-js .lx-guide-bot.reveal { opacity: 0; transform: translateX(-90px) rotate(-10deg); transition: opacity .6s ease .15s, transform .8s cubic-bezier(.2,.9,.3,1.2) .15s; }
.lx-js .lx-guide--right .lx-guide-bot.reveal { transform: translateX(90px) rotate(10deg); }
.lx-js .lx-guide-bot.reveal.is-in { opacity: 1; transform: none; }

/* Presentation: one item at a time. The robot introduces the topic, then a button reveals each item. */
.lx-guide-grid { position: relative; }
.lx-stage { display: grid; gap: 1.5rem; }
.lx-guide-js .lx-stage { gap: 0; }
.lx-guide-js .lx-stage > .lx-step { grid-area: 1 / 1; align-self: center; visibility: hidden; opacity: 0; transform: translateX(70px) scale(.96); transition: opacity .35s ease, transform .5s ease, visibility 0s linear .5s; }
.lx-guide-js .lx-stage > .lx-step.is-before { transform: translateX(-70px) scale(.96); }
.lx-guide-js .lx-stage > .lx-step.is-on { visibility: visible; opacity: 1; transform: none; transition: none; }
.lx-guide-js .lx-step.is-on .lx-step-label { animation: lxIn .5s cubic-bezier(.2,.7,.2,1) both; }
.lx-guide-js .lx-step.is-on .lx-card { animation: lxCardIn .75s cubic-bezier(.2,.9,.3,1.15) .08s both; }
@keyframes lxCardIn { 0% { opacity: 0; transform: translate(60px, 24px) rotate(2deg) scale(.94); } 65% { opacity: 1; transform: translate(-4px, -3px) rotate(-.4deg) scale(1.01); } 100% { transform: none; } }
.lx-step-label { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; letter-spacing: 0; line-height: 1.4; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-heading); }
.lx-step-label i { color: var(--ll-teal-700); }
[data-bs-theme="dark"] .lx-step-label i { color: var(--ll-teal); }
.lx-step-label small { margin-left: auto; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-secondary); }
.lx-step .lx-card { box-shadow: var(--shadow-lg); }
.lx-step:not(.is-on) .lx-bar i { transform: scaleX(0); }
/* The button under the robot appears once it has finished speaking */
.lx-next-wrap { display: none; }
.lx-guide-js .lx-next-wrap { display: flex; justify-content: center; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin-top: 1.1rem; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .35s ease, transform .45s cubic-bezier(.2,.9,.3,1.2); }
.lx-guide-js .lx-next-wrap.is-ready { opacity: 1; transform: none; pointer-events: auto; }
.lx-next-wrap.is-ready .lx-next { animation: lxNudgeBtn 1.6s ease-in-out .4s 2; }
@keyframes lxNudgeBtn { 0%, 100% { box-shadow: var(--shadow-md); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--ll-sky) 28%, transparent), var(--shadow-md); } }
.lx-next { white-space: nowrap; }
.lx-back { border: 0; background: none; color: var(--color-text-secondary); font-weight: var(--fw-bold); font-size: var(--fs-sm); padding: .4rem .2rem; }
.lx-back:hover { color: var(--color-heading); }
.lx-say { cursor: default; }
.lx-say.is-skippable { cursor: pointer; }
/* Before the first item, the title and robot stand in the middle of the screen */
.lx-guide-js .lx-guide-side { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.lx-guide-js.is-intro .lx-guide-side { transform: translateX(var(--shift, 0px)); }
.lx-guide-js .lx-guide-foot, .lx-guide-js .lx-fine { transition: opacity .4s ease, transform .4s ease; }
.lx-guide-js:not(.is-done) .lx-guide-foot, .lx-guide-js:not(.is-done) .lx-fine { opacity: 0; visibility: hidden; transform: translateY(10px); }
/* Every section fills the screen, like slides */
.lx-guide, .lx-chat-sec, .lx-app, .lx-hello { min-height: 100svh; display: flex; align-items: center; }
.lx-guide > .container, .lx-chat-sec > .container, .lx-app > .container, .lx-hello > .container { width: 100%; }
.lx-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--color-text-primary);
}
.lx-alt .lx-card { background: var(--color-background); }
.lx-card-title { font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--color-text-secondary); margin-bottom: 1rem; }
.lx-guide-foot { margin-top: var(--space-6); }

/* Word demos */
.lx-word { font-size: 2.4rem; font-weight: var(--fw-heavy); color: var(--color-heading); letter-spacing: -0.02em; line-height: 1.1; }
.lx-ipa { color: var(--color-text-secondary); margin: .3rem 0 .9rem; }
.lx-chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.lx-chip { font-size: var(--fs-xs); font-weight: var(--fw-bold); border-radius: var(--radius-pill); padding: .3rem .7rem; background: var(--color-primary-soft); color: var(--color-heading); }
.lx-meaning { font-size: 1.25rem; font-weight: var(--fw-bold); margin: 1rem 0; }
.lx-forms { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.lx-forms div { background: var(--color-surface-muted); border-radius: var(--radius-md); padding: .6rem .75rem; }
.lx-forms small { display: block; color: var(--color-text-secondary); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.lx-forms strong { color: var(--color-heading); }
.lx-examples { display: grid; gap: .75rem; }
.lx-example { border-left: 3px solid var(--ll-teal); background: var(--color-surface-muted); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: .75rem 1rem; }
.lx-example-de { font-weight: var(--fw-semibold); }
.lx-example-de mark { background: color-mix(in srgb, var(--ll-amber) 35%, transparent); color: inherit; padding: 0 .15em; border-radius: 4px; }
.lx-example-en { color: var(--color-text-secondary); font-size: var(--fs-sm); margin-top: .15rem; }
.lx-tree { display: grid; justify-items: center; gap: 1.5rem; }
.lx-tree-root { font-size: 1.5rem; font-weight: var(--fw-heavy); color: var(--ll-white); background: var(--ll-deep-blue); border-radius: var(--radius-lg); padding: .5rem 1.4rem; position: relative; }
[data-bs-theme="dark"] .lx-tree-root { background: var(--ll-deep-blue-600); }
.lx-tree-root::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: .75rem; background: var(--color-border-strong); }
.lx-tree-kids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; width: 100%; padding-top: .75rem; border-top: 2px solid var(--color-border-strong); }
.lx-tree-kid { text-align: center; background: var(--color-surface-muted); border-radius: var(--radius-md); padding: .6rem .5rem; }
.lx-tree-kid strong { display: block; color: var(--color-heading); }
.lx-tree-kid small { color: var(--color-text-secondary); }
.lx-rel { display: grid; gap: 1rem; }
.lx-rel-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.lx-rel-label { width: 6.5rem; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-text-secondary); }
.lx-pill { border-radius: var(--radius-pill); padding: .4rem .9rem; font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.lx-pill--syn { background: var(--color-success-soft); color: var(--ll-teal-800); }
.lx-pill--ant { background: var(--color-danger-soft); color: var(--ll-coral-700); }
[data-bs-theme="dark"] .lx-pill--syn { color: var(--ll-teal); }
[data-bs-theme="dark"] .lx-pill--ant { color: var(--ll-coral); }

/* Vocabulary demos */
.lx-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.lx-topic { display: flex; flex-direction: column; gap: .35rem; padding: .9rem; border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.lx-topic:hover { transform: translateY(-2px); border-color: var(--ll-sky); }
.lx-topic-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ll-white); font-size: .9rem; }
.lx-topic strong { color: var(--color-heading); font-size: var(--fs-sm); line-height: 1.3; }
.lx-topic small { color: var(--color-text-secondary); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.lx-wordlist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.lx-wordlist li { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border-radius: var(--radius-md); background: var(--color-surface-muted); }
.lx-wordlist strong { color: var(--color-heading); }
.lx-wordlist span { color: var(--color-text-secondary); }
.lx-levels { display: grid; gap: .55rem; }
.lx-level { display: grid; grid-template-columns: 3rem 1fr auto; align-items: center; gap: .9rem; text-decoration: none; padding: .45rem .6rem; border-radius: var(--radius-md); }
.lx-level:hover { background: var(--color-surface-muted); }
.lx-level b { height: 2.1rem; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-heading); font-size: var(--fs-sm); }
.lx-level-label { display: block; color: var(--color-text-primary); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.lx-bar { display: block; height: 8px; border-radius: var(--radius-pill); background: var(--color-surface-muted); overflow: hidden; margin-top: .35rem; }
.lx-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--ll-sky), var(--ll-teal)); transform-origin: left; transition: transform 1.1s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.lx-js .lx-card:not(.is-in) .lx-bar i { transform: scaleX(0); }

/* ---------- Conversation (messages arrive as you scroll) ---------- */
.lx-chat-sec { padding-block: clamp(3.5rem, 6vw, 5rem); }
.lx-chat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: center; }
.lx-chat-guide { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: end; margin-top: var(--space-5); max-width: 32rem; }
.lx-chat-guide .lx-say::after { left: -10px; bottom: 22px; transform: rotate(135deg); }
.lx-chat { max-width: 28rem; margin-inline: auto; width: 100%; display: grid; gap: .75rem; min-height: 22rem; align-content: start; }
.lx-chat-head { display: flex; align-items: center; gap: .6rem; font-weight: var(--fw-bold); color: var(--color-heading); margin-bottom: .25rem; }
.lx-chat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ll-white); }
.lx-msg { max-width: 82%; padding: .75rem 1rem; border-radius: 18px; box-shadow: var(--shadow-sm); transition: opacity .35s ease, transform .45s cubic-bezier(.2,.9,.3,1.2); }
.lx-msg-de { font-weight: var(--fw-semibold); }
.lx-msg small { display: block; margin-top: .15rem; }
.lx-msg--a { justify-self: start; background: var(--color-surface); border: 1px solid var(--color-border); border-bottom-left-radius: 6px; color: var(--color-text-primary); transform-origin: bottom left; }
.lx-msg--a small { color: var(--color-text-secondary); }
.lx-msg--b { justify-self: end; background: var(--ll-teal-700); color: var(--ll-white); border-bottom-right-radius: 6px; transform-origin: bottom right; }
.lx-msg--b small { color: var(--ll-white); }
.lx-chat-js .lx-msg:not(.is-in) { opacity: 0; transform: translateY(12px) scale(.9); position: absolute; visibility: hidden; }
.lx-dots { display: none; justify-self: start; gap: .3rem; padding: .8rem 1rem; border-radius: 18px; background: var(--color-surface); border: 1px solid var(--color-border); }
.lx-dots.is-b { justify-self: end; background: var(--ll-teal-700); border-color: var(--ll-teal-700); }
.lx-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-secondary); animation: llmDot 1s infinite; }
.lx-dots.is-b i { background: var(--ll-white); }
.lx-dots i:nth-child(2) { animation-delay: .15s; }
.lx-dots i:nth-child(3) { animation-delay: .3s; }
.lx-chat-js .lx-dots.is-shown { display: inline-flex; }

/* ---------- telc B1 cards ---------- */
.lx-tag { display: inline-block; font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ll-deep-blue); background: var(--ll-amber); border-radius: var(--radius-pill); padding: .25rem .7rem; margin-bottom: var(--space-3); }
.lx-skill { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.lx-skill-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--ll-white); font-size: 1.05rem; flex: 0 0 auto; }
.lx-skill strong { display: block; color: var(--color-heading); font-size: 1.15rem; }
.lx-skill small { color: var(--color-text-secondary); font-weight: var(--fw-semibold); }
.lx-task { background: var(--color-surface-muted); border-radius: var(--radius-lg); padding: 1rem; }
.lx-task-q { font-weight: var(--fw-bold); margin: .75rem 0 .5rem; color: var(--color-text-primary); }
.lx-opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.lx-opt { border: 2px solid var(--color-border-strong); border-radius: var(--radius-pill); padding: .3rem .9rem; font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--color-text-primary); }
.lx-opt.is-right { border-color: var(--ll-teal-700); background: var(--color-success-soft); color: var(--ll-teal-800); }
[data-bs-theme="dark"] .lx-opt.is-right { border-color: var(--ll-teal-700); background: var(--ll-teal-700); color: var(--ll-white); }
.lx-gap { display: inline-block; min-width: 3.2rem; border-bottom: 2px solid var(--ll-teal-700); text-align: center; color: var(--ll-teal-800); font-weight: var(--fw-heavy); }
[data-bs-theme="dark"] .lx-gap { color: var(--ll-teal); border-color: var(--ll-teal); }
.lx-wave { display: flex; align-items: center; gap: 3px; height: 44px; }
.lx-wave i { width: 5px; border-radius: 3px; background: var(--ll-sky-700); height: calc(var(--h) * 1%); }
.is-on .lx-wave i { animation: lxWave 1s ease-in-out infinite alternate; animation-delay: calc(var(--h) * -12ms); }
@keyframes lxWave { to { transform: scaleY(.45); } }
.lx-play { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ll-sky-700); color: var(--ll-white); flex: 0 0 auto; }
.lx-checklist { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .45rem; }
.lx-checklist li { display: flex; gap: .6rem; align-items: center; font-weight: var(--fw-semibold); }
.lx-checklist i { color: var(--ll-teal-700); }
[data-bs-theme="dark"] .lx-checklist i { color: var(--ll-teal); }
.lx-mail { font-size: var(--fs-sm); line-height: 1.6; }
.lx-parts { display: grid; gap: .6rem; }
.lx-part { display: flex; gap: .75rem; align-items: center; padding: .7rem .9rem; border-radius: var(--radius-md); background: var(--color-surface-muted); }
.lx-part b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ll-deep-blue); color: var(--ll-white); font-size: var(--fs-xs); flex: 0 0 auto; }
[data-bs-theme="dark"] .lx-part b { background: var(--ll-sky-700); }
.lx-part small { display: block; color: var(--color-text-secondary); }
.lx-path { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.lx-path span { font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: .3rem .65rem; border-radius: var(--radius-pill); background: var(--color-success-soft); color: var(--ll-teal-800); }
[data-bs-theme="dark"] .lx-path span { color: var(--ll-teal); }
.lx-path i { color: var(--color-text-secondary); font-size: .7rem; }
.lx-exam { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--radius-lg); background: var(--gradient-primary); color: var(--ll-white); }
.lx-exam-badge { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--ll-amber); color: var(--ll-deep-blue); font-weight: var(--fw-heavy); font-size: 1.2rem; flex: 0 0 auto; }
.lx-exam small { display: block; color: var(--color-text-secondary); }
.lx-fine { font-size: var(--fs-xs); color: var(--color-text-secondary); margin-top: var(--space-4); }

/* ---------- App ---------- */
.lx-app {
    padding-block: clamp(3.5rem, 7vw, 5.5rem);
    background:
        radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--ll-sky) 14%, transparent), transparent 40%),
        radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--ll-teal) 14%, transparent), transparent 40%),
        var(--color-background);
    --p: 0;
}
.lx-app-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem 4rem; align-items: center; }
.lx-app-list { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; gap: .6rem; }
.lx-app-list li { display: flex; gap: .65rem; align-items: center; font-weight: var(--fw-semibold); color: var(--color-text-primary); }
.lx-app-list i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ll-white); font-size: .8rem; flex: 0 0 auto; }
.lx-stores { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.lx-store { display: inline-flex; align-items: center; gap: .65rem; padding: .55rem 1.1rem .55rem .8rem; border-radius: var(--radius-lg); background: var(--ll-night-900); color: var(--ll-white); text-decoration: none; box-shadow: var(--shadow-md); transition: transform .2s ease, background .2s ease; }
.lx-store:hover { transform: translateY(-2px); background: var(--ll-deep-blue); color: var(--ll-white); }
.lx-store img { width: 30px; height: 30px; object-fit: contain; }
.lx-store span { display: flex; flex-direction: column; font-weight: var(--fw-bold); font-size: 1.05rem; line-height: 1.15; text-align: left; }
.lx-store small { font-size: .68rem; font-weight: var(--fw-semibold); opacity: .85; }
.lx-store span { color: var(--ll-white); }
[data-bs-theme="dark"] .lx-store { background: var(--ll-white); }
[data-bs-theme="dark"] .lx-store span { color: var(--ll-night-900); }
[data-bs-theme="dark"] .lx-store:hover { background: var(--ll-ink-100); }
.lx-qr { display: flex; gap: 1.25rem; margin-top: var(--space-5); }
.lx-qr figure { margin: 0; text-align: center; }
.lx-qr-code { background: var(--ll-white); border-radius: var(--radius-md); padding: 8px; box-shadow: var(--shadow-md); width: 104px; height: 104px; }
.lx-qr-code img, .lx-qr-code canvas { width: 88px !important; height: 88px !important; }
.lx-qr figcaption { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--color-text-secondary); margin-top: .4rem; }
.lx-phone-stage { position: relative; height: 34rem; max-width: 28rem; margin-inline: auto; width: 100%; }
.lx-phone {
    position: absolute; left: 50%; top: 50%; width: 15.5rem; height: 31rem; margin: -15.5rem 0 0 -7.75rem;
    border-radius: 2.6rem; background: var(--ll-night-900); padding: .65rem; box-shadow: var(--shadow-lg), 0 30px 60px -20px color-mix(in srgb, var(--ll-deep-blue) 45%, transparent);
    transform: rotate(calc(-9deg + var(--p) * 12deg)) translateY(calc((1 - var(--p)) * 40px));
    transition: transform .1s linear;
}
.lx-phone-screen { height: 100%; border-radius: 2rem; background: var(--ll-ink-50); overflow: hidden; display: flex; flex-direction: column; color: var(--ll-ink-900); }
.lx-phone-notch { width: 5.5rem; height: 1.25rem; border-radius: 0 0 .9rem .9rem; background: var(--ll-night-900); margin: 0 auto .6rem; }
.lx-phone-top { display: flex; align-items: center; justify-content: space-between; padding: 0 1rem .7rem; }
.lx-phone-top img { height: 22px; width: auto; }
.lx-phone-search { margin: 0 .9rem .8rem; border-radius: var(--radius-pill); background: var(--ll-white); border: 1px solid var(--ll-ink-200); padding: .45rem .8rem; font-size: .75rem; color: var(--ll-ink-600); display: flex; gap: .4rem; align-items: center; }
.lx-phone-card { margin: 0 .9rem .6rem; border-radius: 1rem; background: var(--ll-white); padding: .8rem; box-shadow: 0 6px 16px color-mix(in srgb, var(--ll-deep-blue) 10%, transparent); font-size: .78rem; }
.lx-phone-card strong { font-size: 1.25rem; color: var(--ll-deep-blue); display: block; }
.lx-phone-card .lx-chip { font-size: .62rem; padding: .15rem .5rem; background: var(--ll-deep-blue-50); color: var(--ll-deep-blue); }
.lx-phone-msg { margin: 0 .9rem .45rem; max-width: 78%; padding: .45rem .7rem; border-radius: 14px; font-size: .74rem; font-weight: var(--fw-semibold); }
.lx-phone-msg--a { background: var(--ll-white); border: 1px solid var(--ll-ink-200); }
.lx-phone-msg--b { margin-left: auto; background: var(--ll-teal-700); color: var(--ll-white); }
.lx-phone-nav { margin-top: auto; display: flex; justify-content: space-around; padding: .7rem .5rem .9rem; background: var(--ll-white); border-top: 1px solid var(--ll-ink-100); color: var(--ll-ink-600); font-size: .95rem; }
.lx-phone-nav .is-active { color: var(--ll-deep-blue); }
.lx-app-bot { position: absolute; width: 9.5rem; right: -1rem; bottom: .5rem; z-index: 2; }
.lx-float-chip {
    position: absolute; z-index: 2; display: flex; align-items: center; gap: .5rem;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); padding: .5rem .8rem; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-text-primary);
    transform: translateY(calc((1 - var(--p)) * var(--shift, 60px)));
}
.lx-float-chip .lx-dot-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ll-white); font-size: .8rem; }
.lx-float-chip--1 { left: -1.5rem; top: 7rem; --shift: 80px; }
.lx-float-chip--2 { left: 0; bottom: 6rem; --shift: 40px; }

/* ---------- Goodbye: robot waves, greetings fly in ---------- */
.lx-hello { padding-block: clamp(3.5rem, 7vw, 5.5rem); text-align: center; }
.lx-hello-stage { position: relative; height: 32rem; max-width: 72rem; margin: 0 auto 1rem; }
.lx-hello-bot { position: absolute; left: 50%; top: 50%; width: 13rem; transform: translate(-50%, -46%); }
.lx-hello-bot .lx-say { margin: 0 auto .75rem; width: max-content; max-width: 16rem; }
.lx-greet {
    position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
    transition: left .9s cubic-bezier(.2,.9,.3,1.15), top .9s cubic-bezier(.2,.9,.3,1.15), opacity .5s ease;
    transition-delay: calc(var(--i) * 80ms);
}
.lx-js .lx-hello-stage:not(.is-in) .lx-greet { left: 50%; top: 50%; opacity: 0; }
.lx-greet-in {
    display: inline-flex; flex-direction: column; align-items: center; gap: .1rem;
    padding: .55rem 1rem; border-radius: var(--radius-lg); background: var(--color-surface);
    border: 1px solid var(--color-border); box-shadow: var(--shadow-md);
    rotate: var(--r); animation: lxDrift var(--dur) ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.7s);
}
.lx-greet-in strong { font-size: 1.25rem; line-height: 1.2; color: var(--color-heading); white-space: nowrap; }
.lx-greet-in small { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-text-secondary); white-space: nowrap; }
.lx-greet--sky .lx-greet-in { border-color: color-mix(in srgb, var(--ll-sky) 55%, transparent); }
.lx-greet--teal .lx-greet-in { border-color: color-mix(in srgb, var(--ll-teal) 55%, transparent); }
.lx-greet--amber .lx-greet-in { border-color: color-mix(in srgb, var(--ll-amber) 70%, transparent); }
.lx-greet--coral .lx-greet-in { border-color: color-mix(in srgb, var(--ll-coral) 55%, transparent); }
.lx-greet--purple .lx-greet-in { border-color: color-mix(in srgb, var(--ll-purple) 55%, transparent); }
@keyframes lxDrift { from { translate: 0 -8px; } to { translate: 0 8px; } }
.lx-hello .lx-text { margin-inline: auto; }
.lx-btn-amber {
    --bs-btn-bg: var(--ll-amber); --bs-btn-border-color: var(--ll-amber); --bs-btn-color: var(--ll-deep-blue);
    --bs-btn-hover-bg: var(--ll-deep-blue); --bs-btn-hover-border-color: var(--ll-deep-blue); --bs-btn-hover-color: var(--ll-white);
}

/* Language picker (only rendered once a second language is live) */
.lx-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.lx-lang { display: flex; align-items: center; gap: .85rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: 1rem 1.1rem; text-decoration: none; box-shadow: var(--shadow-md); }
.lx-lang strong { display: block; color: var(--color-heading); }
.lx-lang small { color: var(--color-text-secondary); }
.lx-lang-code { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ll-deep-blue); color: var(--ll-white); font-weight: var(--fw-heavy); font-size: var(--fs-xs); text-transform: uppercase; }

/* Dark mode: app.css forces every .btn to sky (!important) and recolours links in main */
[data-bs-theme="dark"] .lx-actions .btn-primary { background: var(--ll-sky-700) !important; border-color: var(--ll-sky-700) !important; color: var(--ll-white) !important; }
[data-bs-theme="dark"] .lx-actions .btn-primary:hover { background: var(--ll-deep-blue-600) !important; border-color: var(--ll-deep-blue-600) !important; }
[data-bs-theme="dark"] .lx-actions .btn-outline-primary { background: transparent !important; border-color: color-mix(in srgb, var(--ll-sky) 55%, transparent) !important; color: var(--ll-sky) !important; }
[data-bs-theme="dark"] .lx-actions .btn-outline-primary:hover { background: var(--ll-sky-700) !important; border-color: var(--ll-sky-700) !important; color: var(--ll-white) !important; }
[data-bs-theme="dark"] .lx-actions .lx-btn-amber { background: var(--ll-amber) !important; border-color: var(--ll-amber) !important; color: var(--ll-deep-blue) !important; }
[data-bs-theme="dark"] .lx-actions .lx-btn-amber:hover { background: var(--ll-white) !important; border-color: var(--ll-white) !important; }

/* ---------- Motion ---------- */
.intro { animation: lxIn .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }
/* The message itself appears at once (readers and LCP); only the robot and decoration animate in */
.lx-hero h1.intro, .lx-hero .lx-text.intro, .lx-hero .lx-actions.intro, .lx-hero .lx-kicker.intro, .lx-hero .lx-note.intro { animation: none; }
.lx-js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.lx-js .reveal.is-in { opacity: 1; transform: none; }
@keyframes lxIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes lxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes lxNudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
@keyframes lxPop { 0% { opacity: 0; transform: translate(-24px, 18px) scale(.82) rotate(-8deg); } 70% { opacity: 1; transform: translate(2px, -4px) scale(1.04) rotate(1deg); } 100% { transform: none; } }
@keyframes lxPopR { 0% { opacity: 0; transform: translate(24px, 18px) scale(.82) rotate(8deg); } 70% { opacity: 1; transform: translate(-2px, -4px) scale(1.04) rotate(-1deg); } 100% { transform: none; } }
/* Dark mode: stronger card edges so cards stay distinct from the navy page */
[data-bs-theme="dark"] .lx { --color-border: color-mix(in srgb, var(--ll-white) 14%, transparent); }
[data-bs-theme="dark"] .lx :is(.lx-card, .lx-tool, .lx-lvl, .lx-topic, .lx-convo, .lx-strip, .lx-say, .lx-greet-in, .lx-float-chip) { border-color: color-mix(in srgb, var(--ll-white) 16%, transparent); box-shadow: 0 1px 0 color-mix(in srgb, var(--ll-white) 6%, transparent) inset, var(--shadow-md); }

/* Plain section spacing (also used by shared partials on the landing page) */
.lx-sec { padding-block: clamp(3.5rem, 6vw, 5rem); }

/* Apps coming soon note */
.lx-app-soon { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem 1.5rem; align-items: center; padding: 1.4rem 1.6rem; border-radius: var(--radius-xl); border: 1px dashed var(--color-border-strong); background: var(--color-surface); }
.lx .lx-app-soon h2 { font-size: var(--fs-h4); margin-bottom: .25rem; }
.lx-app-soon p { margin: 0; color: var(--color-text-secondary); }
.lx-app-soon-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-heading); font-size: 1.3rem; }
.lx-app-soon-tag { font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ll-deep-blue); background: var(--ll-amber); border-radius: var(--radius-pill); padding: .3rem .75rem; white-space: nowrap; }
@media (max-width: 767.98px) { .lx-app-soon { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* ---------- B1 course promo (landing + language hub) ---------- */
.lx-b1promo { padding-block: clamp(3rem, 6vw, 5rem); }
.lx-b1promo-card {
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 2rem 3rem; align-items: center;
    padding: clamp(1.6rem, 4vw, 3rem); border-radius: var(--radius-2xl); border: 1px solid var(--color-border); box-shadow: var(--shadow-lg);
    background:
        radial-gradient(circle at 95% 10%, color-mix(in srgb, var(--ll-amber) 18%, transparent), transparent 40%),
        radial-gradient(circle at 5% 100%, color-mix(in srgb, var(--ll-sky) 12%, transparent), transparent 45%),
        var(--color-surface);
}
.lx .lx-b1promo h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); }
.lx-b1promo-points { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.5rem; }
.lx-b1promo-points li { display: flex; gap: .7rem; align-items: flex-start; color: var(--color-text-secondary); font-size: var(--fs-sm); line-height: 1.5; }
.lx-b1promo-points strong { color: var(--color-heading); }
.lx-b1promo-points i { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-heading); }
.lx-b1promo-bot { max-width: 16rem; margin-inline: auto; width: 100%; text-align: center; }
.lx-b1promo-bot .lx-say { margin: 0 auto 1rem; }
@media (max-width: 991.98px) {
    .lx-b1promo-card { grid-template-columns: 1fr; }
    .lx-b1promo-bot { order: -1; max-width: 11rem; }
    .lx-b1promo-copy { text-align: center; }
    .lx-b1promo-points { text-align: left; }
}
@media (max-width: 575.98px) { .lx-b1promo-points { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    .lx *, .lx *::before, .lx *::after { animation: none !important; transition: none !important; }
    .lx-js .reveal, .lx-js .lx-guide-bot.reveal { opacity: 1; transform: none; }
    .lx-bar i { transform: none !important; }
    .lx-phone, .lx-float-chip { transform: none; }
}

@media (max-width: 991.98px) {
    .lx-hero { min-height: 0; }
    .lx-hero-grid, .lx-guide-grid, .lx-guide--right .lx-guide-grid, .lx-chat-grid, .lx-app-grid { grid-template-columns: 1fr; }
    .lx-guide--right .lx-guide-side { order: 0; }
    .lx-hero-copy, .lx-guide-head, .lx-app-copy { text-align: center; margin-inline: auto; }
    .lx-text { margin-inline: auto; }
    .lx-actions, .lx-stores { justify-content: center; }
    .lx-scroll, .lx-qr { display: none; }
    .lx-guide-bot { display: grid; grid-template-columns: 5.5rem 1fr; align-items: end; gap: .75rem; max-width: 30rem; margin: 0 auto 1.5rem; text-align: left; }
    .lx-guide-bot .lx-bots { max-width: none; width: 100%; margin: 0; order: -1; }
    .lx-guide-bot .lx-say { margin: 0; min-height: 0; }
    .lx-guide-bot .lx-say::after { left: -10px; bottom: 18px; transform: rotate(135deg); }
    .lx-guide-js .lx-next-wrap { margin-bottom: 1.25rem; }
    .lx-guide-bot > .lx-next-wrap { grid-column: 1 / -1; }
    .lx-guide-foot, .lx-fine { text-align: center; justify-content: center; }
    .lx-chat-guide { margin-inline: auto; grid-template-columns: 6rem 1fr; text-align: left; }
    .lx-app-list { justify-items: center; }
    .lx-hello-stage { height: 34rem; }
}
@media (max-width: 575.98px) {
    /* A real side gutter on phones so cards never touch the screen edge */
    .lx .container { padding-inline: 1.25rem; }
    .lx-topics { grid-template-columns: 1fr 1fr; }
    .lx-wordlist, .lx-forms { grid-template-columns: 1fr; }
    .lx-tree-kids { grid-template-columns: 1fr 1fr; }
    .lx-phone-stage { height: 30rem; }
    .lx-phone { transform: scale(.9) rotate(calc(-9deg + var(--p) * 12deg)); }
    .lx-app-bot { width: 7.5rem; right: -.5rem; }
    .lx-hello-stage { height: 30rem; }
    .lx-hello-bot { width: 9.5rem; }
    .lx-greet-in { padding: .35rem .65rem; }
    .lx-greet-in strong { font-size: 1rem; }
    .lx-greet-in small { display: none; }
}

/* "Notify me" when the apps are out */
.lx-app-notify { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; max-width: 30rem; margin-top: .9rem; }
.lx-app-notify-consent { grid-column: 1 / -1; font-size: .8125rem; color: var(--color-text-secondary); display: flex; gap: .4rem; align-items: flex-start; }
.lx-app-notify-consent input { margin-top: .2rem; }
.lx-app-notify .lx-field-error { grid-column: 1 / -1; margin: 0; }
.lx-app-notify-done { margin: .75rem 0 0; font-weight: var(--fw-semibold); color: var(--color-text-primary); }
.lx-app-notify-done i { color: var(--ll-teal-700); }
