/* ==========================================================================
   Lectia interactiva: cursurile publice si premium.
   Cursurile institutionale NU incarca fisierul asta (vezi lessons/show).

   Componentele se scriu in continutul lectiei doar cu clase (`csk-*`), fiindca
   CuratareHtml pastreaza `class` si sterge orice atribut data-* sau script.
   JS-ul le transforma in exercitii; fara JS, raman text citibil.
   ========================================================================== */

:root {
    --lp-ink: #0f1f3d;
    --lp-text: #2b3440;
    --lp-mut: #5b6675;
    --lp-line: #e3e7ee;
    --lp-soft: #f6f8fb;
    --lp-acc: #007f15;
    --lp-acc-ink: #05421a;
    --lp-acc-soft: #eefdf2;
    --lp-acc-line: #b0f1c6;
    --lp-bad: #b42318;
    --lp-bad-soft: #fef3f2;
    --lp-bad-line: #fecdca;
    --lp-mid: #b54708;
    --lp-mid-soft: #fffaeb;
    --lp-mid-line: #fedf89;
    --lp-prem: #3b52c4;
    --lp-prem-soft: #eef1fb;
    --lp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --lp-ease: cubic-bezier(.32, .72, 0, 1);
}

/* --- Bara de lectura (sus, subtire) --------------------------------------- */
.lp-citire {
    position: fixed; left: 0; top: 0; z-index: 70;
    height: 3px; width: 100%;
    transform-origin: 0 50%; transform: scaleX(0);
    background: var(--lp-acc);
    pointer-events: none;
}

/* --- Marime text (setarea cursantului) ------------------------------------ */
/* Totul pe pagina lectiei e in rem, deci schimbam radacina: textul, exercitiile,
   titlurile si testul cresc impreuna, ca la marirea textului din browser. */
html[data-lp-marime="mic"] { font-size: 93.75%; }
html[data-lp-marime="mare"] { font-size: 112.5%; }

/* --- Antetul lectiei ------------------------------------------------------ */
.lp-eticheta-prem {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .18rem .55rem; border-radius: 999px;
    background: var(--lp-prem-soft); color: var(--lp-prem);
    font-size: .7rem; font-weight: 800; letter-spacing: .08em;
}
.lp-bara {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    margin: 1.1rem 0 2rem;
}
.lp-bara__btn {
    display: inline-flex; align-items: center; gap: .4rem;
    min-height: 38px; padding: .45rem .8rem;
    border: 1px solid var(--lp-line); border-radius: 10px; background: #fff;
    font: 600 .82rem/1.2 Inter, sans-serif; color: var(--lp-text);
    cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.lp-bara__btn:hover { border-color: #c5ccd8; background: var(--lp-soft); }
.lp-bara__btn[aria-pressed="true"] { border-color: var(--lp-acc); background: var(--lp-acc-soft); color: var(--lp-acc-ink); }
.lp-bara__btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.lp-bara__stare {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .8rem; color: var(--lp-mut); font-weight: 600;
}
.lp-bara__stare b { color: var(--lp-acc-ink); }
.lp-inel { width: 26px; height: 26px; transform: rotate(-90deg); }
.lp-inel circle { fill: none; stroke-width: 3.2; }
.lp-inel .lp-inel__fond { stroke: #e7ebf1; }
.lp-inel .lp-inel__val { stroke: var(--lp-acc); stroke-linecap: round; transition: stroke-dashoffset .6s var(--lp-ease); }
@media (max-width: 520px) {
    .lp-bara__stare { margin-left: 0; width: 100%; }
    .lp-bara__btn span.lp-ascuns-mobil { display: none; }
}

/* --- Panou plutitor (cuprins, notite, text) -------------------------------- */
.lp-panou {
    position: fixed; z-index: 65; right: 1rem; bottom: 5.2rem;
    width: min(23rem, calc(100vw - 2rem)); max-height: min(70vh, 34rem);
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--lp-line); border-radius: 14px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
    animation: lpUrca .26s var(--lp-ease) both;
}
.lp-panou[hidden] { display: none; }
@keyframes lpUrca { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
.lp-panou__cap {
    display: flex; align-items: center; justify-content: space-between;
    padding: .8rem 1rem; border-bottom: 1px solid var(--lp-line);
    font: 700 .78rem/1 Roboto, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--lp-mut);
}
.lp-panou__inchide {
    width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
    display: grid; place-items: center; cursor: pointer; color: var(--lp-mut);
}
.lp-panou__inchide:hover { background: var(--lp-soft); }
.lp-panou__corp { overflow-y: auto; padding: .5rem; }
.lp-cuprins { list-style: none; margin: 0; padding: 0; }
.lp-cuprins a {
    display: flex; gap: .65rem; align-items: baseline;
    padding: .55rem .6rem; border-radius: 8px;
    font-size: .88rem; line-height: 1.35; color: var(--lp-text); text-decoration: none;
}
.lp-cuprins a:hover { background: var(--lp-soft); }
.lp-cuprins a span:first-child {
    flex: 0 0 auto; width: 1.4rem; font: 700 .72rem/1.35 var(--lp-mono); color: #9aa3b1;
}
.lp-cuprins a.is-aici { background: var(--lp-acc-soft); color: var(--lp-acc-ink); font-weight: 600; }
.lp-cuprins a.is-aici span:first-child { color: var(--lp-acc); }
.lp-notite { padding: .5rem; }
.lp-notite textarea {
    width: 100%; min-height: 11rem; resize: vertical;
    border: 1px solid var(--lp-line) !important; border-radius: 10px;
    padding: .75rem !important; font: 400 .92rem/1.55 Inter, sans-serif; color: var(--lp-text);
}
.lp-notite__jos { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .55rem; font-size: .75rem; color: var(--lp-mut); }
.lp-marimi { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: .5rem; }
.lp-marimi button {
    min-height: 48px; border: 1px solid var(--lp-line); border-radius: 10px; background: #fff;
    font-family: Roboto, sans-serif; font-weight: 700; color: var(--lp-ink); cursor: pointer;
}
.lp-marimi button[aria-pressed="true"] { border-color: var(--lp-acc); background: var(--lp-acc-soft); color: var(--lp-acc-ink); }
.lp-link-mic {
    border: 0; background: none; padding: .25rem 0; cursor: pointer;
    font: 600 .78rem/1.2 Inter, sans-serif; color: var(--lp-acc); text-decoration: underline; text-underline-offset: 3px;
}

/* --- Blocuri de cod: eticheta + copiere ------------------------------------ */
.lp-cod { position: relative; }
.lp-cod__copiaza {
    position: absolute; top: 8px; right: 8px; z-index: 1;
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .55rem; border-radius: 7px; border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08); color: #cbd5e1;
    font: 600 .7rem/1 Inter, sans-serif; cursor: pointer;
    opacity: .85; transition: opacity .15s ease, background-color .15s ease;
}
.lp-cod__copiaza:hover { opacity: 1; background: rgba(255,255,255,.16); }
.lp-cod__copiaza svg { width: 13px; height: 13px; }
.lp-cod pre { padding-top: 2.4rem !important; }
.lp-cod .lp-com { color: #7f8ea3; font-style: italic; }

/* --- Glosar ----------------------------------------------------------------- */
.lectie-corp abbr.lp-termen {
    text-decoration: none; cursor: help;
    border-bottom: 1.5px dotted var(--lp-acc);
    color: inherit;
}
.lectie-corp abbr.lp-termen:focus-visible { outline: 2px solid var(--lp-acc); outline-offset: 2px; }
.lp-balon {
    position: absolute; z-index: 80; max-width: min(20rem, calc(100vw - 2rem));
    padding: .7rem .85rem; border-radius: 10px;
    background: var(--lp-ink); color: #e8edf6;
    font: 400 .85rem/1.5 Inter, sans-serif;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .28);
    animation: lpUrca .18s var(--lp-ease) both;
}
.lp-balon b { display: block; color: #fff; font-weight: 700; margin-bottom: .15rem; }

/* ==========================================================================
   EXERCITIILE
   ========================================================================== */
.lectie-corp .csk-ex {
    margin: 2.4rem 0; padding: 0; list-style: none;
    border: 1px solid var(--lp-line); border-radius: 14px; background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    overflow: hidden;
    font-size: 1rem; line-height: 1.6;
}
.csk-ex__cap {
    display: flex; align-items: center; gap: .6rem;
    padding: .75rem 1.1rem;
    background: var(--lp-soft); border-bottom: 1px solid var(--lp-line);
}
.csk-ex__ico {
    width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
    display: grid; place-items: center; background: var(--lp-acc); color: #fff;
}
.csk-ex__ico svg { width: 16px; height: 16px; }
.csk-ex__tip { font: 800 .72rem/1.2 Roboto, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--lp-acc-ink); }
.csk-ex__stare { margin-left: auto; font: 600 .75rem/1.2 Inter, sans-serif; color: var(--lp-mut); white-space: nowrap; }
.csk-ex__stare.is-gata { color: var(--lp-acc); }
.csk-ex__corp { padding: 1.1rem 1.1rem 1.2rem; }
.lectie-corp .csk-ex p { margin: 0 0 .75rem; }
.lectie-corp .csk-ex .csk-titlu { font: 700 1.05rem/1.35 Roboto, sans-serif; color: var(--lp-ink); margin-bottom: .5rem; }
.lectie-corp .csk-ex .csk-intrebare { font-weight: 650; color: var(--lp-ink); font-size: 1.04rem; line-height: 1.5; }
.lectie-corp .csk-ex ul, .lectie-corp .csk-ex ol { list-style: none; margin: 0; padding: 0; }
.lectie-corp .csk-ex li { margin: 0; padding: 0; }
.lectie-corp .csk-ex li::before { content: none !important; }

/* Explicatiile raman ascunse pana raspunzi, dar numai daca JS-ul a pornit. */
.lp-js .csk-ex .csk-explica { display: none; }
.lp-js .csk-ex .csk-explica.is-vazut { display: block; }

/* Variantele de raspuns */
.csk-varianta {
    display: flex; gap: .75rem; align-items: flex-start; width: 100%;
    margin: 0 0 .55rem; padding: .8rem .9rem;
    border: 1.5px solid var(--lp-line); border-radius: 10px; background: #fff;
    text-align: left; font: 500 .96rem/1.5 Inter, sans-serif; color: var(--lp-text);
    cursor: pointer; transition: border-color .15s ease, background-color .15s ease, transform .15s var(--lp-ease);
}
.csk-varianta:hover:not([disabled]) { border-color: #aeb8c7; background: var(--lp-soft); }
.csk-varianta:active:not([disabled]) { transform: scale(.995); }
.csk-varianta[disabled] { cursor: default; }
.csk-varianta__lit {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px;
    display: grid; place-items: center;
    background: #edf0f5; color: var(--lp-mut); font: 700 .75rem/1 Roboto, sans-serif;
}
.csk-varianta__text { flex: 1; min-width: 0; }
.csk-varianta__text .csk-explica { margin-top: .45rem; font-size: .9rem; line-height: 1.55; font-weight: 400; }
.csk-varianta.is-bine { border-color: #17b26a; background: #f0fdf4; }
.csk-varianta.is-bine .csk-varianta__lit { background: #17b26a; color: #fff; }
.csk-varianta.is-bine .csk-explica { color: #05603a; }
.csk-varianta.is-rau { border-color: #f04438; background: var(--lp-bad-soft); }
.csk-varianta.is-rau .csk-varianta__lit { background: #f04438; color: #fff; }
.csk-varianta.is-rau .csk-explica { color: #912018; }
.csk-varianta.is-partial { border-color: #f79009; background: var(--lp-mid-soft); }
.csk-varianta.is-partial .csk-varianta__lit { background: #f79009; color: #fff; }
.csk-varianta.is-partial .csk-explica { color: #93370d; }
.csk-varianta.is-stins { opacity: .55; }
.csk-verdict {
    display: flex; gap: .6rem; align-items: flex-start;
    margin-top: .4rem; padding: .75rem .9rem; border-radius: 10px;
    font-size: .93rem; line-height: 1.5; animation: lpUrca .25s var(--lp-ease) both;
}
.csk-verdict.is-bine { background: #ecfdf3; color: #05603a; }
.csk-verdict.is-rau { background: var(--lp-bad-soft); color: #912018; }
.csk-verdict.is-partial { background: var(--lp-mid-soft); color: #93370d; }
.csk-verdict strong { color: inherit; }
.csk-actiuni { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; align-items: center; }
.csk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 40px; padding: .5rem 1rem; border-radius: 10px;
    border: 1px solid var(--lp-acc); background: var(--lp-acc); color: #fff;
    font: 600 .86rem/1.2 Inter, sans-serif; cursor: pointer;
}
.csk-btn:hover { background: #00590f; border-color: #00590f; }
.csk-btn[disabled] { opacity: .45; cursor: not-allowed; }
/* Unele pagini (vechile, pe Tailwind Play) nu au regula [hidden] globala: fara ea,
   display-ul componentei bate atributul si butoanele ascunse raman pe ecran. */
.csk-btn[hidden], .csk-ex [hidden], .lp-final [hidden], .lp-bara [hidden], .lp-cum [hidden] { display: none !important; }
.csk-btn--sec { background: #fff; color: var(--lp-text); border-color: var(--lp-line); }
.csk-btn--sec:hover { background: var(--lp-soft); border-color: #c5ccd8; }
.csk-btn svg { width: 15px; height: 15px; }

/* --- Artefacte realiste ------------------------------------------------------ */
/* SMS: un telefon redus la esential, bula gri a expeditorului. */
.lectie-corp .csk-sms {
    max-width: 23rem; margin: 1rem auto; padding: 1rem .9rem 1.1rem;
    border-radius: 22px; background: #f2f2f7; border: 1px solid #e2e2ea;
    font-family: -apple-system, "SF Pro Text", Inter, sans-serif;
}
.lectie-corp .csk-sms .csk-de {
    margin: 0 0 .7rem; text-align: center; font-size: .78rem; font-weight: 600; color: #6b6b76;
}
.lectie-corp .csk-sms .csk-de::before {
    content: ""; display: block; width: 38px; height: 38px; margin: 0 auto .35rem;
    border-radius: 999px; background: linear-gradient(#a7acb9, #858a97);
}
.lectie-corp .csk-sms > p:not(.csk-de), .lectie-corp .csk-sms > div > p {
    margin: 0 0 .35rem; max-width: 88%; padding: .55rem .8rem;
    border-radius: 18px 18px 18px 5px; background: #e5e5ea; color: #111;
    font-size: .93rem; line-height: 1.42; overflow-wrap: anywhere;
}
.lectie-corp .csk-sms .csk-ora { background: none !important; padding: 0 !important; margin: 0 0 .5rem !important; max-width: none !important; text-align: center; font-size: .72rem !important; color: #8e8e93 !important; }

/* Email: fereastra unui client de mail. */
.lectie-corp .csk-email {
    margin: 1rem 0; border: 1px solid #d8dde6; border-radius: 12px; overflow: hidden; background: #fff;
    font-size: .94rem; line-height: 1.55;
}
.lectie-corp .csk-email .csk-de, .lectie-corp .csk-email .csk-subiect, .lectie-corp .csk-email .csk-catre {
    margin: 0; padding: .5rem 1rem; background: #f7f8fa; border-bottom: 1px solid #eceff4;
    font-size: .85rem; color: #3f4652; overflow-wrap: anywhere;
}
.lectie-corp .csk-email .csk-subiect { font-weight: 700; color: #111827; }
.lectie-corp .csk-email > p:not(.csk-de):not(.csk-subiect):not(.csk-catre), .lectie-corp .csk-email > div > p { margin: .75rem 1rem; overflow-wrap: anywhere; }

/* Bara de adresa a browserului. */
.lectie-corp .csk-url {
    display: flex; align-items: center; gap: .6rem;
    margin: 1rem 0; padding: .55rem .9rem;
    border-radius: 999px; background: #eef1f5; border: 1px solid #dde2ea;
    font: 500 .92rem/1.4 var(--lp-mono); color: #1f2937; overflow-wrap: anywhere;
}
.lectie-corp .csk-url::before {
    content: ""; flex: 0 0 auto; width: 14px; height: 14px;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}
.lectie-corp .csk-url p { margin: 0 !important; min-width: 0; }

/* Conversatie (chat / DM). */
.lectie-corp .csk-chat { max-width: 26rem; margin: 1rem auto; display: flex; flex-direction: column; gap: .35rem; }
.lectie-corp .csk-chat p { margin: 0 !important; max-width: 85%; padding: .55rem .8rem; font-size: .93rem; line-height: 1.42; overflow-wrap: anywhere; }
.lectie-corp .csk-chat .csk-ei { align-self: flex-start; background: #eceff4; color: #111; border-radius: 16px 16px 16px 5px; }
.lectie-corp .csk-chat .csk-eu { align-self: flex-end; background: #0b84ff; color: #fff; border-radius: 16px 16px 5px 16px; }
.lectie-corp .csk-chat .csk-de { align-self: center; max-width: none; padding: 0; font-size: .75rem; font-weight: 600; color: #8e8e93; background: none; }

/* --- Recapitulare ---------------------------------------------------------------- */
.lectie-corp .csk-ex.csk-recap { margin-top: .5rem; border-style: dashed; border-color: #c5ccd8; }
.lectie-corp .csk-ex.csk-recap .csk-ex__ico { background: var(--lp-ink); }
.lectie-corp .csk-ex.csk-recap .csk-ex__tip { color: var(--lp-ink); }
.lectie-corp .csk-ex .csk-recap-sursa { margin: 0 0 .4rem; font-size: .78rem; font-weight: 600; color: var(--lp-mut); }
.lectie-corp .csk-ex.csk-predictie .csk-ex__ico { background: var(--lp-prem); }
.lectie-corp .csk-ex.csk-predictie .csk-ex__tip { color: var(--lp-prem); }

/* --- Gaseste semnalele -------------------------------------------------------- */
.lp-js .csk-gaseste mark.csk-semnal {
    background: transparent; color: inherit; padding: 0 .08em; border-radius: 4px;
    cursor: pointer; transition: background-color .2s ease, box-shadow .2s ease;
}
.lp-js .csk-gaseste .csk-zona { cursor: crosshair; position: relative; }
.lp-js .csk-gaseste mark.csk-semnal.is-gasit {
    background: #fee4e2; box-shadow: inset 0 -2px 0 #f04438; color: #7a271a;
}
.lp-js .csk-gaseste mark.csk-semnal.is-gasit[data-nr]::after {
    content: attr(data-nr);
    display: inline-grid; place-items: center; vertical-align: super;
    width: 17px; height: 17px; margin-left: 2px; border-radius: 999px;
    background: #f04438; color: #fff; font: 700 10px/1 Roboto, sans-serif;
}
.csk-ratare {
    position: absolute; z-index: 5; pointer-events: none;
    width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 999px;
    border: 2px solid #98a2b3; animation: lpRatare .6s ease-out forwards;
}
@keyframes lpRatare { from { transform: scale(.4); opacity: 1 } to { transform: scale(1.5); opacity: 0 } }
.csk-contor {
    display: flex; align-items: center; gap: .7rem; margin: .9rem 0 .2rem;
    font-size: .88rem; font-weight: 600; color: var(--lp-mut);
}
.csk-contor__puncte { display: flex; gap: 5px; }
.csk-contor__puncte i { width: 10px; height: 10px; border-radius: 999px; background: #e3e7ee; transition: background-color .25s ease, transform .25s var(--lp-ease); }
.csk-contor__puncte i.is-plin { background: #f04438; transform: scale(1.15); }
.csk-semnale-lista { counter-reset: s; margin-top: .6rem !important; }
.csk-semnale-lista li {
    overflow-wrap: anywhere; min-width: 0;
    display: flex; gap: .65rem; align-items: flex-start;
    padding: .6rem .1rem; border-top: 1px dashed var(--lp-line);
    font-size: .92rem; line-height: 1.5; animation: lpUrca .25s var(--lp-ease) both;
}
.csk-semnale-lista li b.csk-nr {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 999px;
    display: grid; place-items: center; background: #f04438; color: #fff; font: 700 .72rem/1 Roboto, sans-serif;
}
.csk-semnale-lista li > span { min-width: 0; }
.csk-semnale-lista li q { font-style: normal; font-weight: 650; color: var(--lp-ink); }
.csk-semnale-lista li q::before { content: "„"; } .csk-semnale-lista li q::after { content: "”"; }

/* --- Mit sau adevar --------------------------------------------------------------- */
.csk-teanc { position: relative; min-height: 12rem; }
.csk-carte {
    padding: 1.4rem 1.3rem; border-radius: 14px; border: 1px solid var(--lp-line);
    background: #fff; box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
    font: 600 1.08rem/1.5 Inter, sans-serif; color: var(--lp-ink);
    animation: lpCarte .35s var(--lp-ease) both;
}
@keyframes lpCarte { from { opacity: 0; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }
.csk-carte__nr { display: block; margin-bottom: .6rem; font: 700 .75rem/1 var(--lp-mono); letter-spacing: .05em; color: #5b6675; }
.csk-carte.is-pleaca-st { animation: lpPleacaSt .3s ease-in both; }
.csk-carte.is-pleaca-dr { animation: lpPleacaDr .3s ease-in both; }
@keyframes lpPleacaSt { to { opacity: 0; transform: translateX(-30px) rotate(-3deg) } }
@keyframes lpPleacaDr { to { opacity: 0; transform: translateX(30px) rotate(3deg) } }
.csk-alege { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .9rem; }
.csk-alege button {
    min-height: 52px; border-radius: 10px; cursor: pointer;
    font: 800 .9rem/1 Roboto, sans-serif; letter-spacing: .06em; text-transform: uppercase;
    border: 1.5px solid; background: #fff;
}
.csk-alege .csk-alege__mit { border-color: #fda29b; color: #b42318; }
.csk-alege .csk-alege__mit:hover { background: var(--lp-bad-soft); }
.csk-alege .csk-alege__adev { border-color: #75e0a7; color: #067647; }
.csk-alege .csk-alege__adev:hover { background: #ecfdf3; }
.csk-bilant { list-style: none; }
.csk-bilant li { display: flex; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--lp-line); font-size: .93rem; line-height: 1.5; }
.csk-bilant li:first-child { border-top: 0; }
.csk-eticheta {
    flex: 0 0 auto; align-self: flex-start; margin-top: .1rem;
    padding: .15rem .45rem; border-radius: 6px; font: 800 .66rem/1.3 Roboto, sans-serif; letter-spacing: .07em; text-transform: uppercase;
}
.csk-eticheta--mit { background: var(--lp-bad-soft); color: var(--lp-bad); }
.csk-eticheta--adev { background: #ecfdf3; color: #067647; }
.csk-bilant .csk-bilant__ok { color: #067647; font-weight: 700; }
.csk-bilant .csk-bilant__ko { color: var(--lp-bad); font-weight: 700; }
.csk-bilant .csk-explica { display: block !important; margin-top: .25rem; color: var(--lp-mut); }

/* --- Carduri de intors -------------------------------------------------------------- */
.csk-grila { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: .75rem; }
.csk-card { perspective: 900px; min-height: 8.5rem; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; font: inherit; }
.csk-card__in {
    position: relative; display: grid; height: 100%; min-height: 8.5rem;
    transform-style: preserve-3d; transition: transform .55s var(--lp-ease);
}
.csk-card.is-intors .csk-card__in { transform: rotateY(180deg); }
.csk-card__fata, .csk-card__spate {
    grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: 1rem 1.05rem; border-radius: 12px; border: 1px solid var(--lp-line);
}
.csk-card__fata { background: #fff; }
.csk-card__fata b { font: 800 1.08rem/1.3 Roboto, sans-serif; color: var(--lp-ink); }
.csk-card__fata small { margin-top: .6rem; font-size: .75rem; color: #98a2b3; font-weight: 600; }
.csk-card__spate { transform: rotateY(180deg); background: var(--lp-ink); border-color: var(--lp-ink); color: #e3e9f3; font-size: .9rem; line-height: 1.5; }

@media (max-width: 560px) {
    .csk-grila { grid-template-columns: 1fr 1fr; gap: .55rem; }
    .csk-card__fata, .csk-card__spate { padding: .85rem .8rem; }
    .csk-card__fata b { font-size: .98rem; }
    .csk-card__spate { font-size: .84rem; line-height: 1.45; }
}

/* Codul se rupe doar unde nu incape un cuvant intreg, nu in mijlocul fiecarui
   identificator. Blocurile premium au `word-break` in stil inline, de aici !important. */
.lectie-corp pre, .lectie-corp pre code { word-break: normal !important; overflow-wrap: break-word !important; }
.lectie-corp .csk-ex, .lp-cum, .lp-mostra { min-width: 0; max-width: 100%; }
/* Pe pagina cursului, coloana de grila care contine exercitiul are `min-width:auto`:
   un token lung de cod ar lati toata coloana (si pagina) pe telefon. */
:has(> .lp-cum) { min-width: 0; }

/* Codul fara stil propriu (scris direct in exercitii): acelasi aspect ca blocurile premium. */
.lectie-corp pre:not([style*="background"]) {
    margin: .8rem 0; padding: 14px 16px; background: #0f172a; color: #e6edf6; border-radius: 10px;
    font: 400 12.5px/1.65 var(--lp-mono); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.lectie-corp pre:not([style*="background"]) code { background: none; color: inherit; padding: 0; font: inherit; }
.lectie-corp pre:not([style*="background"]) code::before, .lectie-corp pre:not([style*="background"]) code::after { content: none; }
.lp-js .csk-gaseste pre mark.csk-semnal { color: inherit; }
.lp-js .csk-gaseste pre mark.csk-semnal.is-gasit { background: rgba(240, 68, 56, .28); color: #fff; box-shadow: inset 0 -2px 0 #f97066; }

/* --- Ordine ------------------------------------------------------------------------ */
.csk-ordine-sir { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .9rem; min-height: 1rem; }
.csk-ordine-sir .csk-pas {
    display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border-radius: 10px;
    background: var(--lp-acc-soft); border: 1.5px solid var(--lp-acc-line); font-size: .94rem; line-height: 1.45;
    animation: lpUrca .22s var(--lp-ease) both;
}
.csk-ordine-sir .csk-pas b {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center;
    background: var(--lp-acc); color: #fff; font: 700 .75rem/1 Roboto, sans-serif;
}
.csk-ordine-sir .csk-pas.is-rau { background: var(--lp-bad-soft); border-color: var(--lp-bad-line); }
.csk-ordine-sir .csk-pas.is-rau b { background: #f04438; }
.csk-gol { padding: .7rem .8rem; border-radius: 10px; border: 1.5px dashed #cfd5df; color: #98a2b3; font-size: .88rem; }
.csk-ordine-rezerva .csk-varianta { margin-bottom: .45rem; }

/* --- Checklist ----------------------------------------------------------------------- */
.csk-bifa {
    display: flex; gap: .8rem; align-items: flex-start; width: 100%;
    padding: .7rem .4rem; border: 0; border-top: 1px solid var(--lp-line); background: none;
    text-align: left; font: 500 .96rem/1.5 Inter, sans-serif; color: var(--lp-text); cursor: pointer;
}
.csk-bifa:first-child { border-top: 0; }
.csk-bifa__cutie {
    flex: 0 0 auto; width: 22px; height: 22px; margin-top: .08rem; border-radius: 6px;
    border: 2px solid #c1c9d6; display: grid; place-items: center; color: #fff;
    transition: background-color .18s ease, border-color .18s ease;
}
.csk-bifa__cutie svg { width: 14px; height: 14px; opacity: 0; transform: scale(.4); transition: opacity .18s ease, transform .25s var(--lp-ease); }
.csk-bifa[aria-checked="true"] .csk-bifa__cutie { background: var(--lp-acc); border-color: var(--lp-acc); }
.csk-bifa[aria-checked="true"] .csk-bifa__cutie svg { opacity: 1; transform: none; }
.csk-bifa[aria-checked="true"] .csk-bifa__text { color: var(--lp-mut); text-decoration: line-through; text-decoration-color: #b8c0cc; }
.csk-bara-mica { height: 6px; border-radius: 999px; background: #eceff4; overflow: hidden; margin: .2rem 0 .8rem; }
.csk-bara-mica span { display: block; height: 100%; width: 0; background: var(--lp-acc); border-radius: 999px; transition: width .4s var(--lp-ease); }

/* --- Estimeaza --------------------------------------------------------------------- */
.csk-slider { margin: .6rem 0 .2rem; }
.csk-slider input[type="range"] { width: 100%; accent-color: var(--lp-acc); height: 30px; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
.csk-slider__val { font: 900 2.4rem/1 Roboto, sans-serif; color: var(--lp-ink); letter-spacing: -.02em; }
.csk-slider__val small { font-size: 1.1rem; font-weight: 700; color: var(--lp-mut); margin-left: .15rem; }
.csk-slider__cap { display: flex; justify-content: space-between; font: 600 .75rem/1 var(--lp-mono); color: #5b6675; }
.csk-compara { margin-top: 1rem; display: grid; gap: .55rem; }
.csk-compara__rand { display: grid; grid-template-columns: 6.2rem 1fr 3.6rem; gap: .6rem; align-items: center; font-size: .82rem; font-weight: 600; color: var(--lp-mut); }
.csk-compara__bara { height: 12px; border-radius: 999px; background: #eceff4; overflow: hidden; }
.csk-compara__bara span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .9s var(--lp-ease); }
.csk-compara__rand--tu .csk-compara__bara span { background: #98a2b3; }
.csk-compara__rand--real .csk-compara__bara span { background: var(--lp-acc); }
.csk-compara__nr { text-align: right; font: 800 .95rem/1 Roboto, sans-serif; color: var(--lp-ink); }

/* --- Rezumatul de la finalul lectiei ------------------------------------------------ */
.lp-final {
    margin: 3rem 0 1rem; padding: 1.3rem 1.3rem 1.2rem;
    border-radius: 14px; background: var(--lp-ink); color: #dfe6f1;
}
.lp-final h2 { margin: 0 0 .35rem !important; padding: 0 !important; font: 800 1.2rem/1.3 Roboto, sans-serif !important; color: #fff !important; }
.lp-final h2::before { content: none !important; }
.lp-final p { margin: 0 0 1rem !important; font-size: .95rem !important; color: #b9c5d8; }
.lp-final__stat { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.1rem; }
.lp-final__stat span { padding: .4rem .7rem; border-radius: 8px; background: rgba(255,255,255,.08); font-size: .82rem; font-weight: 600; color: #e7edf6; }
.lp-final__stat span b { color: #7ee2a8; }
.lp-incredere { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.lp-incredere button {
    min-height: 58px; padding: .5rem; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); color: #e7edf6;
    font: 600 .82rem/1.3 Inter, sans-serif;
}
.lp-incredere button:hover { background: rgba(255,255,255,.1); }
.lp-incredere button[aria-pressed="true"] { background: #fff; color: var(--lp-ink); border-color: #fff; }
.lp-incredere__raspuns { margin-top: .8rem; font-size: .88rem; color: #c9d4e4; min-height: 1.3em; }
@media (max-width: 420px) { .lp-incredere button { font-size: .76rem; } }

/* --- Testul pas cu pas -------------------------------------------------------------- */
.lp-test { max-width: 46rem; margin: 0 auto; }
.lp-test__sus { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; font-size: .85rem; color: var(--lp-mut); font-weight: 600; }
.lp-test__puncte { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.4rem; }
.lp-test__puncte button {
    width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--lp-line); background: #fff;
    font: 700 .75rem/1 Roboto, sans-serif; color: var(--lp-mut); cursor: pointer;
}
.lp-test__puncte button.is-raspuns { background: var(--lp-acc-soft); border-color: var(--lp-acc-line); color: var(--lp-acc-ink); }
.lp-test__puncte button.is-aici { border-color: var(--lp-ink); color: var(--lp-ink); box-shadow: 0 0 0 2px rgba(15,31,61,.12); }
.lp-test__puncte button.is-lipsa { background: var(--lp-mid-soft); border-color: #f79009; color: #93370d; }
.lp-test__puncte button.is-gresit { background: var(--lp-bad-soft); border-color: var(--lp-bad-line); color: var(--lp-bad); }
.lp-test .lp-intrebare { animation: lpCarte .3s var(--lp-ease) both; }
.lp-test .lp-intrebare[hidden] { display: none; }
.lp-test .lp-intrebare__text { font: 700 1.25rem/1.4 Roboto, sans-serif; color: var(--lp-ink); margin: 0 0 .35rem; }
.lp-test .lp-intrebare__ind { font-size: .82rem; color: var(--lp-mut); margin: 0 0 1rem; }
.lp-test label.lp-opt {
    display: flex; gap: .8rem; align-items: flex-start; margin-bottom: .55rem; padding: .85rem .95rem;
    border: 1.5px solid var(--lp-line); border-radius: 10px; cursor: pointer; background: #fff;
    font-size: .98rem; line-height: 1.5; color: var(--lp-text);
    transition: border-color .15s ease, background-color .15s ease;
}
.lp-test label.lp-opt:hover { border-color: #aeb8c7; background: var(--lp-soft); }
.lp-test label.lp-opt:has(input:checked) { border-color: var(--lp-acc); background: var(--lp-acc-soft); color: var(--lp-acc-ink); }
.lp-test label.lp-opt input { margin-top: .22rem; accent-color: var(--lp-acc); width: 18px; height: 18px; flex: 0 0 auto; }
.lp-test__jos { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.4rem; }
.lp-test__revizie { padding: 1.2rem; border-radius: 14px; border: 1px solid var(--lp-line); background: var(--lp-soft); }
.lp-rezultat {
    display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center;
    margin: 0 auto 2rem; max-width: 46rem; padding: 1.3rem; border-radius: 14px;
}
.lp-rezultat.is-trecut { background: #ecfdf3; border: 1px solid #abefc6; }
.lp-rezultat.is-picat { background: var(--lp-bad-soft); border: 1px solid var(--lp-bad-line); }
.lp-rezultat__inel { position: relative; width: 96px; height: 96px; }
.lp-rezultat__inel svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.lp-rezultat__inel circle { fill: none; stroke-width: 9; }
.lp-rezultat__inel b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 1.5rem/1 Roboto, sans-serif; color: var(--lp-ink); }
.lp-rezultat h2 { margin: 0 0 .25rem; font: 800 1.2rem/1.3 Roboto, sans-serif; color: var(--lp-ink); }
.lp-rezultat p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--lp-text); }
@media (max-width: 480px) { .lp-rezultat { grid-template-columns: 1fr; justify-items: start; } }

/* --- Butonul de finalizare cu inel de timp ------------------------------------------- */
.lp-asteapta { display: inline-flex; align-items: center; gap: .5rem; }
.lp-asteapta svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.lp-asteapta circle { fill: none; stroke-width: 3; }

/* --- Artificii ------------------------------------------------------------------------ */
.lp-confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }

/* --- Scurtaturi ------------------------------------------------------------------------ */
.lp-taste { display: grid; grid-template-columns: auto 1fr; gap: .45rem .8rem; padding: .7rem .8rem; font-size: .86rem; }
.lp-taste kbd { font: 700 .75rem/1 var(--lp-mono); padding: .3rem .45rem; border-radius: 6px; background: var(--lp-soft); border: 1px solid var(--lp-line); color: var(--lp-ink); text-align: center; }

@media (prefers-reduced-motion: reduce) {
    .lp-panou, .csk-carte, .csk-verdict, .csk-semnale-lista li, .csk-ordine-sir .csk-pas, .lp-balon, .lp-test .lp-intrebare { animation: none !important; }
    .csk-card__in, .csk-compara__bara span, .csk-bara-mica span { transition: none !important; }
}

@media print {
    .lp-citire, .lp-bara, .lp-panou, .lp-final, header, .fixed { display: none !important; }
}

/* Codul din text: fara apostroafele inverse pe care le adauga pluginul typography. */
.lectie-corp :not(pre) > code::before, .lectie-corp :not(pre) > code::after { content: none !important; }
.lectie-corp :not(pre) > code {
    padding: .1em .35em; border-radius: 5px; background: #eef1f5; color: #1d2b4f;
    font: 600 .86em/1.4 var(--lp-mono); overflow-wrap: anywhere;
}

/* ==========================================================================
   Pagina cursului: „Cum inveti in cursul asta” + exercitiul de incercat.
   ========================================================================== */
.lp-cum { margin-top: 2.6rem; }
.lp-cum__titlu { display: flex; align-items: center; gap: .625rem; font: 700 1.25rem/1.3 Roboto, sans-serif; color: var(--lp-ink); margin: 0; }
.lp-cum__ico { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; flex: 0 0 auto; }
.lp-cum__text { margin: .45rem 0 1.1rem; color: var(--lp-mut); line-height: 1.6; max-width: 44rem; }
.lp-cum__grila { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.lp-cum__item {
    flex: 1 1 9.5rem; min-width: 0;
    display: flex; flex-direction: column; gap: .15rem;
    padding: .85rem .95rem; border-radius: 12px; border: 1px solid var(--lp-line); background: #fff;
}
.lp-cum__item b { font: 900 1.7rem/1 Roboto, sans-serif; color: var(--lp-acc); letter-spacing: -.02em; }
.lp-cum__item span { font-size: .84rem; line-height: 1.35; color: var(--lp-text); font-weight: 600; }
.lp-cum__mostra { margin-top: 1.4rem; }
.lp-cum__eticheta {
    display: flex; align-items: center; gap: .5rem; margin: 0 0 -.9rem;
    font: 800 .72rem/1.2 Roboto, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--lp-mut);
}
.lp-cum__eticheta::after { content: ""; flex: 1; height: 1px; background: var(--lp-line); }
.lp-mostra.lectie-corp { font-size: 1rem; color: var(--lp-text); }
.lp-mostra .csk-ex { margin: 1.4rem 0 0 !important; }
.lp-mostra p { margin: 0 0 .75rem; }
@media (max-width: 420px) { .lp-cum__item { flex-basis: 8rem; } .lp-cum__item b { font-size: 1.45rem; } }

/* Tabelele importate din WordPress pastreaza uneori `width: 34%` inline: tabelul
   ramanea o fereastra minuscula. Pe lectiile noi, tabelul ia toata coloana. */
.lectie-corp.prose table[style*="width"] { width: 100% !important; }
.lp-test__tasta { margin: -.4rem 0 1rem; font-size: .78rem; color: var(--lp-mut); }
@media (hover: none) { .lp-test__tasta { display: none; } }
.lp-test-reia { margin: 0 auto 2rem; max-width: 46rem; }
.lp-test-reia > summary { list-style: none; cursor: pointer; }
.lp-test-reia > summary::-webkit-details-marker { display: none; }
.lp-test-reia[open] > summary { margin-bottom: 1.4rem; }
.lp-rezultat__cta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.lp-rezultat__cta a { text-decoration: none; }
