/* ═══════════════════════════════════════════════════════════════════════════
   Genius Squad — interfața site-ului
   ───────────────────────────────────────────────────────────────────────────
   Temă de bandă desenată: contur gros, umbre „tari" care se apasă la click,
   personaje care clipesc, hârtie cu textură. Patru palete la alegere, toate
   luminoase. Tot ce mișcă se oprește la `prefers-reduced-motion`.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap&subset=latin,latin-ext');

/* ═══ 1. Paleta ═══════════════════════════════════════════════════════════ */

:root {
    color-scheme: light;

    /* ── Curcubeu (implicit) ── */
    --bg:        #fdf6ec;
    --bg-2:      #f7edde;
    --paper-dot: rgba(107, 95, 140, .13);

    --brand:       #6c5ce7;
    --brand-2:     #8b7bf0;
    --brand-dark:  #4b3fc0;
    --brand-soft:  #efecfe;
    --brand-line:  #cec6fb;

    --sun:       #ffc83d;
    --sun-dark:  #d99a05;
    --sun-soft:  #fff6dd;

    --coral:      #ff6b6b;
    --coral-dark: #dd4747;
    --coral-soft: #ffeceb;

    --mint:      #2ec4b6;
    --mint-dark: #1fa093;
    --mint-soft: #e2f8f6;

    --head-1: #6c5ce7;
    --head-2: #8b7bf0;
    --head-3: #b39dfb;

    /* ── Neutre, comune tuturor paletelor ── */
    --surface:   #ffffff;
    --surface-2: #fdf9f3;
    --surface-3: #f6eee2;

    --ink:    #33285a;
    --ink-2:  #6b5f8c;
    --ink-3:  #9d93b8;

    --line:   #e7dff2;
    --line-2: #d3c8ea;
    --edge:   #2b2148;

    --ok:      #2fa05a;
    --ok-dark: #1f8146;
    --ok-soft: #e6f7ed;
    --warn:      #cf8309;
    --warn-soft: #fff4dd;
    --err:      #e2445c;
    --err-dark: #bd2f45;
    --err-soft: #ffecef;

    /* ── Formă ── */
    --r-sm: 12px;
    --r:    18px;
    --r-lg: 26px;
    --r-xl: 34px;
    --bw:   2.5px;                    /* grosimea conturului „de desen" */

    --shadow-1: 0 2px 0 var(--line-2);
    --shadow-2: 0 4px 0 var(--line-2);
    --shadow-3: 0 6px 0 var(--line-2), 0 18px 32px -14px rgba(51, 40, 90, .3);
    --drop:     0 4px 0 var(--edge);  /* umbra „solidă" de sub butoane */
    --ring:     0 0 0 4px rgba(108, 92, 231, .24);

    --font:      'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --display:   'Baloo 2', 'Nunito', 'Segoe UI', Arial, sans-serif;
}

/* Ocean — albastru, pentru cine vrea ceva mai calm */
[data-theme="ocean"] {
    --bg: #eef7fd; --bg-2: #ddeef9;
    --brand: #0f7fd4; --brand-2: #3fa2e8; --brand-dark: #0a5fa3;
    --brand-soft: #e2f1fc; --brand-line: #b8ddf5;
    --sun: #ffd166; --sun-dark: #d9a017; --sun-soft: #fff6e0;
    --coral: #ef476f; --coral-dark: #cc3157; --coral-soft: #ffe9ef;
    --mint: #06d6a0; --mint-dark: #04a97e; --mint-soft: #e0faf3;
    --head-1: #0f7fd4; --head-2: #35a7e0; --head-3: #7fd0ef;
    --ink: #17385a; --ink-2: #4a6c8c; --ink-3: #8ba6bd;
    --line: #d9e9f4; --line-2: #bcd8ea; --edge: #12324f;
    --surface-2: #f6fbfe; --surface-3: #e9f3fa;
    --ring: 0 0 0 4px rgba(15, 127, 212, .24);
    --paper-dot: rgba(18, 50, 79, .12);
}

/* Livadă — verde și portocaliu */
[data-theme="livada"] {
    --bg: #f4f9e8; --bg-2: #e8f2d5;
    --brand: #3f9142; --brand-2: #5cb45f; --brand-dark: #2c6e2f;
    --brand-soft: #eaf6ea; --brand-line: #c2e3c3;
    --sun: #ffb23d; --sun-dark: #d98305; --sun-soft: #fff2dd;
    --coral: #e8573f; --coral-dark: #c33f2a; --coral-soft: #ffeae6;
    --mint: #1fb3a6; --mint-dark: #158e83; --mint-soft: #ddf6f3;
    --head-1: #3f9142; --head-2: #62b25f; --head-3: #9ad08f;
    --ink: #26401f; --ink-2: #56704c; --ink-3: #91a888;
    --line: #dfeccf; --line-2: #c4dcae; --edge: #1f3419;
    --surface-2: #fbfdf6; --surface-3: #eef6e2;
    --ring: 0 0 0 4px rgba(63, 145, 66, .24);
    --paper-dot: rgba(31, 52, 25, .12);
}

/* Bomboană — roz și mov, cea mai jucăușă */
[data-theme="bomboana"] {
    --bg: #fff0f6; --bg-2: #ffe3ef;
    --brand: #d6336c; --brand-2: #ec5f8e; --brand-dark: #ad1f52;
    --brand-soft: #ffe9f1; --brand-line: #ffc2d8;
    --sun: #ffc300; --sun-dark: #d99e00; --sun-soft: #fff7d9;
    --coral: #ff7b54; --coral-dark: #e05a32; --coral-soft: #fff0ea;
    --mint: #8e6bf0; --mint-dark: #6f4bd8; --mint-soft: #f0eafe;
    --head-1: #d6336c; --head-2: #ec5f8e; --head-3: #ff9dbf;
    --ink: #4a1f38; --ink-2: #7d5069; --ink-3: #b48ba2;
    --line: #ffdeeb; --line-2: #ffc2d8; --edge: #3d1229;
    --surface-2: #fffafc; --surface-3: #ffeef5;
    --ring: 0 0 0 4px rgba(214, 51, 108, .24);
    --paper-dot: rgba(61, 18, 41, .12);
}

/* ═══ 2. Bazele ═══════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Textura de hârtie: un caiet cu puncte, discret, fixat în spatele paginii */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 12% 8%,  rgba(108, 92, 231, .06) 0, transparent 40%),
        radial-gradient(circle at 88% 6%,  rgba(255, 200, 61, .12) 0, transparent 36%),
        radial-gradient(circle at 78% 94%, rgba(46, 196, 182, .08) 0, transparent 40%),
        radial-gradient(var(--paper-dot) 1.3px, transparent 1.3px);
    background-size: auto, auto, auto, 26px 26px;
    pointer-events: none;
}

a { color: var(--brand); text-underline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px 80px; }

/*
 * Antetul e `position: relative` și se termină cu un val care intră peste
 * conținut. Ridicăm conținutul paginii deasupra lui, altfel primul card ar fi
 * acoperit parțial acolo unde antetul e mai scund (panoul de administrare).
 */
main.wrap { position: relative; z-index: 1; }

::selection { background: var(--sun); color: var(--edge); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ═══ 3. Iconițe și personaje ═════════════════════════════════════════════ */

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    vertical-align: -.18em;
    stroke-width: 1.9;
}
.icon-lg { width: 24px; height: 24px; }

.mascot { display: block; overflow: visible; }

/* Ochii clipesc din când în când — semnul cel mai ieftin de „e viu" */
.mascot .m-eyes {
    transform-box: view-box;
    transform-origin: 50px 41px;
    animation: blink 6.4s infinite;
}
.m-stelut .m-eyes { animation-delay: 1.1s; }
.m-roco   .m-eyes { animation-delay: 2.7s; }
.m-vulpi  .m-eyes { animation-delay: 4.2s; }

@keyframes blink {
    0%, 93%, 100% { transform: scaleY(1); }
    96%           { transform: scaleY(.08); }
}

@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
    50%      { transform: translateY(-9px) rotate(calc(var(--tilt, 0deg) * -1)); }
}

@keyframes wobble {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}

/* Mâzgălelile care plutesc în spatele paginii */
.floaters {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    color: var(--brand);
    opacity: .13;
}
.floaters .fl {
    position: absolute;
    animation: drift 17s ease-in-out infinite;
}
.floaters .fl:nth-child(3n)   { color: var(--sun-dark); animation-duration: 21s; }
.floaters .fl:nth-child(3n+1) { color: var(--mint-dark); animation-duration: 25s; }

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(18px, -26px) rotate(14deg); }
    66%      { transform: translate(-14px, 16px) rotate(-11deg); }
}

@media (max-width: 760px) { .floaters { display: none; } }

/* ═══ 4. Antetul — o scenă, nu o bandă ════════════════════════════════════ */

.site-head {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, var(--head-1) 0%, var(--head-2) 48%, var(--head-3) 100%);
    color: #fff;
    padding: 26px 0 92px;
    margin-bottom: -56px;
}

/* Buline, confetti fin și un „soare" în colț */
.site-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 16% 82%, rgba(255, 200, 61, .32) 0, transparent 20%),
        radial-gradient(circle at 58% 8%,  rgba(46, 196, 182, .28) 0, transparent 16%),
        radial-gradient(circle at 93% 58%, rgba(255, 107, 107, .3) 0, transparent 20%),
        radial-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.5px);
    background-size: auto, auto, auto, 24px 24px;
    pointer-events: none;
}

/* Marginea de jos, tăiată val — trecerea spre pagină */
.site-head::after {
    content: '';
    position: absolute;
    inset: auto 0 -2px 0;
    height: 66px;
    background: var(--bg);
    -webkit-mask-image: radial-gradient(28px 34px at 50% 0, transparent 98%, #000 100%);
    mask-image: radial-gradient(28px 34px at 50% 0, transparent 98%, #000 100%);
    -webkit-mask-size: 76px 66px;
    mask-size: 76px 66px;
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
}

.site-head .wrap { padding-bottom: 0; position: relative; z-index: 1; }

.site-head .row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.site-head .head-main { display: flex; align-items: flex-start; gap: 20px; flex: 1; min-width: 0; }

/* Corpul antetului pe pagina principală: textul la stânga, echipa la dreapta */
.head-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 26px;
    margin-top: 16px;
}

.site-head .logo { display: flex; align-items: flex-start; gap: 16px; }

/* Cifrele platformei, ca trei jetoane sub titlu */
.head-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}
.head-stats li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    color: var(--edge);
    background: rgba(255, 255, 255, .94);
    border: 2px solid var(--edge);
    border-radius: 20px;
    padding: 4px 13px;
    box-shadow: 0 3px 0 var(--edge);
}
.head-stats .icon { width: 15px; height: 15px; color: var(--brand); }
.head-stats b { font-family: var(--display); font-size: 15px; font-weight: 800; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.logo-mark {
    width: 62px; height: 62px;
    border-radius: 22px;
    background: var(--sun);
    border: 3px solid var(--edge);
    box-shadow: 0 5px 0 var(--edge);
    color: var(--edge);
    display: grid; place-items: center;
    flex: none;
    transform: rotate(-6deg);
    animation: wobble 5s ease-in-out infinite;
}
.logo-mark .icon { width: 30px; height: 30px; stroke-width: 2.1; }

.site-head h1 {
    font-family: var(--display);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -.015em;
    margin: 2px 0 4px;
    line-height: 1.05;
    text-shadow: 0 3px 0 rgba(43, 33, 72, .26);
}

.site-head .tagline {
    margin: 0;
    opacity: .96;
    font-size: 15px;
    font-weight: 700;
    max-width: 46ch;
    line-height: 1.5;
}

/* ── Echipa din antet ── */

.squad-scene {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    flex: none;
    margin: -6px -6px -34px 0;
    filter: drop-shadow(0 10px 16px rgba(43, 33, 72, .3));
}
.squad-one { display: block; animation: bob 4.4s ease-in-out infinite; }
.squad-0 { --tilt: -5deg; animation-delay: 0s;   margin-bottom: 6px; }
.squad-1 { --tilt:  4deg; animation-delay: .55s; margin-bottom: 22px; }
.squad-2 { --tilt: -3deg; animation-delay: 1.1s; margin-bottom: 2px; }
.squad-3 { --tilt:  6deg; animation-delay: 1.7s; margin-bottom: 16px; }
.squad-one .mascot { width: 92px; height: 92px; }

@media (max-width: 980px) { .squad-2, .squad-3 { display: none; } }
@media (max-width: 760px) { .squad-scene { display: none; } }

/* ── Butoanele din antet ── */

.head-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }

.head-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--edge);
    background: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    border: var(--bw) solid var(--edge);
    border-radius: 14px;
    padding: 9px 16px;
    box-shadow: var(--drop);
    transition: transform .1s, box-shadow .1s;
}
.head-link:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge); }
.head-link:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }

/* ── Alegerea paletei ── */

.theme-pick {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .96);
    border: var(--bw) solid var(--edge);
    border-radius: 16px;
    padding: 6px 8px;
    box-shadow: var(--drop);
}
.theme-pick .lbl {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--edge);
    margin: 0 3px 0 2px;
}
.swatch {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2.5px solid var(--edge);
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: transform .14s;
}
.swatch:hover { transform: scale(1.16) rotate(8deg); }
.swatch[aria-pressed="true"]::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2.5px solid var(--edge);
    border-radius: 50%;
}
.sw-curcubeu { background: linear-gradient(135deg, #6c5ce7 0 50%, #ffc83d 50% 100%); }
.sw-ocean    { background: linear-gradient(135deg, #0f7fd4 0 50%, #06d6a0 50% 100%); }
.sw-livada   { background: linear-gradient(135deg, #3f9142 0 50%, #ffb23d 50% 100%); }
.sw-bomboana { background: linear-gradient(135deg, #d6336c 0 50%, #8e6bf0 50% 100%); }

@media (max-width: 560px) { .theme-pick .lbl { display: none; } }

/* ═══ 5. Harta pașilor ════════════════════════════════════════════════════ */

/*
 * Bara stă fixată în afara fluxului: apare la derulare, fără să lase un gol
 * în pagină cât timp e ascunsă.
 */
.quest {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 30;
    padding: 10px 0;
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(12px) saturate(1.3);
    border-bottom: var(--bw) solid var(--line-2);
    transform: translateY(-140%);
    transition: transform .3s cubic-bezier(.2, .9, .3, 1.2);
}
.quest.on { transform: none; }

.quest-rail {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 0;
}

.q-step {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: none;
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}
.q-dot {
    width: 30px; height: 30px;
    border-radius: 11px;
    border: 2.5px solid var(--line-2);
    background: #fff;
    display: grid; place-items: center;
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-3);
    flex: none;
    transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.q-dot .icon { width: 16px; height: 16px; }

.q-link { flex: 1; height: 4px; border-radius: 4px; background: var(--line); margin: 0 10px; overflow: hidden; }
.q-link i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .45s ease; }

.q-step.done { color: var(--brand-dark); }
.q-step.done .q-dot { background: var(--brand); border-color: var(--edge); color: #fff; transform: rotate(-6deg); }
.q-step.now  { color: var(--edge); }
.q-step.now .q-dot {
    background: var(--sun);
    border-color: var(--edge);
    color: var(--edge);
    box-shadow: 0 0 0 5px var(--sun-soft);
}

@media (max-width: 760px) {
    .q-step .q-txt { display: none; }
    .quest-rail { padding: 0 14px; }
}

/* ═══ 6. Carduri ══════════════════════════════════════════════════════════ */

.card {
    position: relative;
    background: var(--surface);
    border: var(--bw) solid var(--line-2);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: 26px 28px;
    margin-bottom: 24px;
    animation: pop .34s cubic-bezier(.2, .9, .3, 1.25) both;
}

/* Bandă de scotch în colț — foaia arată lipită pe perete */
.card--taped::before {
    content: '';
    position: absolute;
    top: -11px; left: 34px;
    width: 86px; height: 24px;
    background: rgba(255, 200, 61, .55);
    border: 1.5px solid rgba(43, 33, 72, .18);
    border-radius: 2px;
    transform: rotate(-4deg);
    box-shadow: 0 2px 5px rgba(43, 33, 72, .14);
}

@keyframes pop {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

.step-title {
    display: flex;
    align-items: center;
    gap: 13px;
    font-family: var(--display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0 0 20px;
}

.step-num {
    width: 46px; height: 46px;
    border-radius: 16px;
    background: var(--sun-soft);
    border: var(--bw) solid var(--edge);
    box-shadow: 0 3px 0 var(--edge);
    color: var(--edge);
    display: grid; place-items: center;
    flex: none;
    transform: rotate(-4deg);
    transition: background .22s, color .22s, transform .22s;
}
.step-num .icon { width: 23px; height: 23px; stroke-width: 2; }

.card.is-done { border-color: var(--brand-line); }
.card.is-done .step-num {
    background: var(--brand);
    color: #fff;
    transform: rotate(4deg) scale(1.04);
}

.step-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-dark);
    background: var(--brand-soft);
    border: 2px solid var(--brand-line);
    border-radius: 20px;
    padding: 3px 12px;
    white-space: nowrap;
    animation: pop .26s cubic-bezier(.2, .9, .3, 1.4) both;
}

.step-title .hint {
    font-family: var(--font);
    font-weight: 700;
    color: var(--ink-3);
    font-size: 13px;
    margin-left: auto;
    text-align: right;
    line-height: 1.4;
}

/* ── Ghidul pasului: personaj + bulă de vorbire ── */

.guide {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: -4px 0 20px;
}
.guide .mascot { width: 62px; height: 62px; flex: none; animation: bob 5.2s ease-in-out infinite; }

.bubble {
    position: relative;
    background: var(--sun-soft);
    border: 2.5px solid var(--edge);
    border-radius: 18px;
    padding: 10px 16px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--edge);
    box-shadow: 0 3px 0 var(--edge);
}
.bubble::before,
.bubble::after {
    content: '';
    position: absolute;
    left: -11px;
    top: 50%;
    margin-top: -9px;
    border: 9px solid transparent;
    border-right-color: var(--edge);
}
.bubble::after {
    left: -7px;
    border-right-color: var(--sun-soft);
}

/* ═══ 7. Selectorul de clasă ══════════════════════════════════════════════ */

.grade-groups { display: grid; gap: 22px; }

.grade-group-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ink-3);
    margin: 0 0 11px;
}
.grade-group-label::after {
    content: '';
    flex: 1;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
    border-radius: 2px;
}

/*
 * Cinci coloane fixe pentru ambele cicluri: cele patru clase de gimnaziu se
 * aliniază sub primele patru din primar, în loc să rămână o clasă orfană.
 */
.grades {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 13px;
}

.grade-btn {
    position: relative;
    border: var(--bw) solid var(--edge);
    background: #fff;
    border-radius: 20px;
    padding: 14px 8px 12px;
    font: inherit;
    color: var(--edge);
    cursor: pointer;
    text-align: center;
    box-shadow: var(--drop);
    overflow: hidden;
    transition: transform .13s, box-shadow .13s, background .18s;

    --tone: var(--brand);
}
/* Insignele stau ușor strâmb pe raft, alternativ stânga-dreapta */
.grade-btn:nth-child(odd)  { transform: rotate(-1.6deg); }
.grade-btn:nth-child(even) { transform: rotate(1.4deg); }

.grade-btn:hover {
    transform: translateY(-3px) rotate(0deg) scale(1.03);
    box-shadow: 0 7px 0 var(--edge);
    background: var(--surface-2);
}
.grade-btn:active { transform: translateY(3px) rotate(0deg); box-shadow: 0 1px 0 var(--edge); }

/* Medalia cu numărul clasei */
.grade-btn .g-num {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: var(--tone);
    border: 2.5px solid var(--edge);
    color: #fff;
    font-family: var(--display);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    transition: transform .2s;
}
.grade-btn:hover .g-num { transform: rotate(-10deg) scale(1.08); }

.grade-btn .g-lbl {
    display: block;
    font-size: 10.5px;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 900;
}

.grade-btn[aria-pressed="true"] {
    background: var(--tone);
    color: #fff;
    transform: rotate(0deg) translateY(-2px);
    box-shadow: 0 6px 0 var(--edge);
}
.grade-btn[aria-pressed="true"] .g-num {
    background: #fff;
    color: var(--edge);
    transform: rotate(-8deg);
}
.grade-btn[aria-pressed="true"] .g-lbl { color: rgba(255, 255, 255, .92); }

/* Steluța-ștampilă care apare pe clasa aleasă */
.grade-btn::after {
    content: '';
    position: absolute;
    top: 6px; right: 7px;
    width: 17px; height: 17px;
    background: var(--sun);
    border: 2px solid var(--edge);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: transform .25s cubic-bezier(.2, .9, .3, 1.6), opacity .2s;
}
.grade-btn[aria-pressed="true"]::after { opacity: 1; transform: scale(1); }

/*
 * Creșa și grădinița: tonuri calde, deschise, ca să se vadă din prima că sunt
 * alt ciclu decât școala. Medalia nu poartă cifră, ci o pictogramă, așa că e
 * puțin mai mare și cu literă mai mică.
 */
.grade-btn[data-grade="-5"] { --tone: #ffb3c1; }
.grade-btn[data-grade="-4"] { --tone: #ffc09f; }
.grade-btn[data-grade="-3"] { --tone: #ffd670; }
.grade-btn[data-grade="-2"] { --tone: #a0e8af; }
.grade-btn[data-grade="-1"] { --tone: #7fd8be; }

.grade-btn[data-grade^="-"] .g-num {
    width: 50px; height: 50px;
    font-size: 13px;
    letter-spacing: -.02em;
}
.grade-btn[data-grade^="-"] .g-lbl { letter-spacing: .04em; }

/* Fiecare clasă are culoarea ei — copiii o rețin mai ușor decât cifra */
.grade-btn[data-grade="0"] { --tone: #ff8fab; }
.grade-btn[data-grade="1"] { --tone: #ff6b6b; }
.grade-btn[data-grade="2"] { --tone: #ff9f1c; }
.grade-btn[data-grade="3"] { --tone: #e8ab00; }
.grade-btn[data-grade="4"] { --tone: #3fbf5f; }
.grade-btn[data-grade="5"] { --tone: #2ec4b6; }
.grade-btn[data-grade="6"] { --tone: #00b4d8; }
.grade-btn[data-grade="7"] { --tone: #6c5ce7; }
.grade-btn[data-grade="8"] { --tone: #9b5de5; }
/* Liceul păstrează familia de culori, dar mai adânc — se vede că e alt ciclu */
.grade-btn[data-grade="9"]  { --tone: #7048c4; }
.grade-btn[data-grade="10"] { --tone: #5a3fa8; }
.grade-btn[data-grade="11"] { --tone: #3f5aa8; }
.grade-btn[data-grade="12"] { --tone: #2c4a78; }

/* ═══ 8. Materii — cartonașe de colecție ══════════════════════════════════ */

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 14px;
}

.subject {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    border: var(--bw) solid var(--edge);
    background: #fff;
    border-radius: 20px;
    padding: 15px 15px 15px 14px;
    cursor: pointer;
    font: inherit;
    text-align: left;
    color: var(--ink);
    box-shadow: var(--drop);
    overflow: hidden;
    transition: transform .13s, box-shadow .13s, background .18s;

    --tint: var(--brand);
    --tint-soft: var(--brand-soft);
}

/* Bandă colorată în capul cartonașului + filigran uriaș în fundal */
.subject::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    background: var(--tint);
}
.subject:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--edge); background: var(--tint-soft); }
.subject:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }

.subject .ico {
    width: 50px; height: 50px;
    border-radius: 17px;
    background: var(--tint);
    border: 2.5px solid var(--edge);
    color: #fff;
    display: grid; place-items: center;
    flex: none;
    margin-top: 4px;
    transform: rotate(-5deg);
    transition: transform .2s;
}
.subject:hover .ico { transform: rotate(6deg) scale(1.08); }
.subject .ico .icon { width: 26px; height: 26px; stroke-width: 2; }

.subject .txt { min-width: 0; margin-top: 4px; }
.subject .nm {
    font-family: var(--display);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.2;
    display: block;
}
.subject .cnt {
    display: inline-block;
    font-size: 11.5px;
    color: var(--ink-2);
    margin-top: 3px;
    font-weight: 800;
    background: var(--surface-3);
    border-radius: 20px;
    padding: 1px 9px;
}

.subject.active { background: var(--tint-soft); }
.subject.active .ico { transform: rotate(6deg); }
.subject.active .cnt { background: var(--tint); color: #fff; }
.subject.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid var(--tint);
    border-radius: 17px;
    pointer-events: none;
}

/* Culoarea fiecărei materii */
.subject[data-subject="matematica"] { --tint: #4f7cff; --tint-soft: #eaf0ff; }
.subject[data-subject="romana"]     { --tint: #ff6b6b; --tint-soft: #ffeded; }
.subject[data-subject="stiinte"]    { --tint: #2ec4b6; --tint-soft: #e2f8f6; }
.subject[data-subject="biologie"]   { --tint: #3fbf5f; --tint-soft: #e8f8ec; }
.subject[data-subject="fizica"]     { --tint: #9b5de5; --tint-soft: #f3ebfd; }
.subject[data-subject="chimie"]     { --tint: #ff9f1c; --tint-soft: #fff3e2; }
.subject[data-subject="istorie"]    { --tint: #c98a4b; --tint-soft: #fbf1e6; }
.subject[data-subject="geografie"]  { --tint: #00b4d8; --tint-soft: #e2f7fc; }
.subject[data-subject="engleza"]    { --tint: #f15bb5; --tint-soft: #fdebf6; }

/* ═══ 9. Teme ═════════════════════════════════════════════════════════════ */

.topics { display: flex; flex-direction: column; gap: 10px; }

.topic {
    position: relative;
    border: var(--bw) solid var(--line-2);
    border-radius: var(--r);
    background: #fff;
    transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
    overflow: hidden;
}
.topic::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--brand);
    transition: width .2s;
}
.topic:hover { border-color: var(--brand-line); background: var(--surface-2); }
.topic.checked {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 3px 0 var(--brand-line);
}
.topic.checked::before { width: 6px; }

.topic-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px 14px 18px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
}

/* Bifă desenată, nu cea a sistemului */
.topic-head input {
    appearance: none;
    -webkit-appearance: none;
    width: 24px; height: 24px;
    border: 2.5px solid var(--edge);
    border-radius: 8px;
    background: #fff;
    flex: none;
    cursor: pointer;
    position: relative;
    transition: background .16s, transform .16s;
}
.topic-head input::after {
    content: '';
    position: absolute;
    left: 6.5px; top: 2.5px;
    width: 6px; height: 11px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .2s cubic-bezier(.2, .9, .3, 1.8);
}
.topic-head input:checked { background: var(--brand); }
.topic-head input:checked::after { transform: rotate(45deg) scale(1); }
.topic-head input:hover { transform: scale(1.08); }

.topic-name { font-weight: 700; }
.topic.checked .topic-name { color: var(--brand-dark); }

.gen-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    font-size: 11.5px;
    font-weight: 900;
    color: var(--warn);
    background: var(--sun-soft);
    border: 2px solid #f4dfa8;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
    flex: none;
}
.gen-tag .icon { width: 13px; height: 13px; }

.topic-opts {
    display: none;
    gap: 14px;
    flex-wrap: wrap;
    padding: 15px 16px 16px 52px;
    border-top: 2px dashed var(--brand-line);
    background: rgba(255, 255, 255, .75);
}
.topic.checked .topic-opts { display: flex; }

.opt-field { display: flex; flex-direction: column; gap: 5px; min-width: 178px; }
.opt-field > label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-2);
}
.opt-field > label .icon { width: 14px; height: 14px; color: var(--brand); }
.opt-field select {
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 11px;
    border: 2px solid var(--line-2);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}
.opt-field select:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }

.opt-help {
    flex-basis: 100%;
    font-size: 13px;
    color: var(--ink-2);
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
    font-weight: 600;
}
.opt-help .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--brand); }

/* ═══ 10. Formulare ═══════════════════════════════════════════════════════ */

.opts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.field > label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-2);
    margin-bottom: 7px;
}
.field > label .icon { width: 15px; height: 15px; color: var(--brand); }

.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
    width: 100%;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 14px;
    border: var(--bw) solid var(--line-2);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: var(--ring);
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.55; font-weight: 600; }
.field .note { font-size: 13px; color: var(--ink-3); margin-top: 6px; }

/*
 * Avertizarea „temele alese nu ajung pentru atâtea cerințe".
 * Apare doar când e cazul, deci merită să fie vizibilă: fundal cald și bară
 * la stânga, nu încă un rând cenușiu de ajutor pe care nimeni nu-l citește.
 */
.field .capacity {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 9px 12px;
    font-size: 13.5px;
    line-height: 1.5;
    font-weight: 600;
    border-radius: var(--r-sm);
    border-left: 4px solid var(--warn);
    background: var(--warn-soft);
    color: var(--ink-2);
}
.field .capacity b { color: var(--warn); font-weight: 900; }
.field .capacity .icon {
    width: 17px; height: 17px; flex: none;
    color: var(--warn); stroke-width: 2.2; margin-top: 1px;
}

/* Aceeași casetă, dar ca informație, nu ca avertisment: la varianta de
   bacalaureat structura e fixă, nu e nimic de corectat */
.field .capacity.capacity-info {
    border-left-color: var(--brand);
    background: var(--brand-soft);
}
.field .capacity.capacity-info b,
.field .capacity.capacity-info .icon { color: var(--brand-dark); }

/* Câmpul dezactivat, ca să se vadă că nu e o scăpare, ci o regulă */
.field.is-locked label { color: var(--ink-3); }

.switch {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    font-size: 15px;
    cursor: pointer;
    padding: 16px 18px;
    border: var(--bw) solid var(--line-2);
    border-radius: var(--r);
    background: var(--surface-2);
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.switch:hover { border-color: #f4dfa8; }
.switch:has(input:checked) {
    border-color: var(--sun-dark);
    background: var(--sun-soft);
    box-shadow: 0 3px 0 #f4dfa8;
}
.switch input { accent-color: var(--sun-dark); width: 21px; height: 21px; margin-top: 2px; flex: none; }
.switch.disabled { opacity: .58; cursor: not-allowed; }
.switch small { color: var(--ink-2); font-weight: 600; }
.switch strong {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--display); font-weight: 700; font-size: 17px;
}
.switch strong .icon { color: var(--sun-dark); }

/* ═══ 11. Butoane ═════════════════════════════════════════════════════════ */

.actions { display: flex; gap: 11px; flex-wrap: wrap; align-items: center; }

.btn {
    position: relative;
    overflow: hidden;
    font-family: var(--display);
    font-size: 16.5px;
    font-weight: 700;
    border: var(--bw) solid var(--edge);
    border-radius: 15px;
    padding: 11px 22px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #fff;
    color: var(--edge);
    box-shadow: var(--drop);
    transition: transform .1s, box-shadow .1s, background .15s;
}

/* Sclipirea care traversează butonul la hover */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .5) 50%, transparent 58%);
    transform: translateX(-130%);
    transition: transform .6s ease;
    pointer-events: none;
}
.btn:hover::after { transform: translateX(130%); }

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn .icon { width: 19px; height: 19px; stroke-width: 2; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }

.btn-gold { background: var(--sun); color: var(--edge); }
.btn-ghost { background: #fff; color: var(--edge); }
.btn-ghost:hover { background: var(--brand-soft); }

.btn:disabled {
    opacity: .55; cursor: not-allowed;
    transform: none; box-shadow: var(--drop);
}
.btn:disabled::after { display: none; }

.btn-sm {
    font-size: 14.5px; padding: 8px 15px; border-radius: 12px;
    border-width: 2px; box-shadow: 0 3px 0 var(--edge);
}
.btn-sm:hover { box-shadow: 0 4px 0 var(--edge); }
.btn-sm:active { box-shadow: 0 1px 0 var(--edge); }
.btn-sm .icon { width: 16px; height: 16px; }

/* Butonul mare de generare — cel mai vizibil lucru din pagină */
.btn-hero {
    font-size: 21px;
    padding: 15px 34px;
    border-radius: 20px;
    border-width: 3px;
    background: linear-gradient(140deg, var(--sun) 0%, #ff9f1c 100%);
    color: var(--edge);
    box-shadow: 0 6px 0 var(--edge);
}
.btn-hero:hover { box-shadow: 0 9px 0 var(--edge); transform: translateY(-3px); }
.btn-hero:active { box-shadow: 0 2px 0 var(--edge); transform: translateY(4px); }
.btn-hero .icon { width: 24px; height: 24px; }

/* ═══ 12. Mesaje ══════════════════════════════════════════════════════════ */

.msg {
    border-radius: var(--r);
    padding: 15px 18px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    border: var(--bw) solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    line-height: 1.5;
}
.msg > .icon { width: 20px; height: 20px; margin-top: 1px; stroke-width: 2; flex: none; }
.msg-err  { background: var(--err-soft);   color: var(--err-dark);   border-color: #f6bcc5; }
.msg-ok   { background: var(--ok-soft);    color: var(--ok-dark);    border-color: #b3e2c6; }
.msg-warn { background: var(--warn-soft);  color: var(--warn);       border-color: #f4dfa8; }
.msg-info { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-line); }
.msg code { background: rgba(0, 0, 0, .06); padding: 1px 6px; border-radius: 6px; font-size: .92em; }

.spinner {
    width: 17px; height: 17px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
    flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { color: var(--ink-3); font-size: 15px; padding: 20px 0; text-align: center; }

/* Bara de lucru cât se generează fișa */
.working {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border: var(--bw) dashed var(--brand-line);
    border-radius: var(--r-lg);
    background: var(--brand-soft);
    margin-top: 18px;
}
.working .mascot { width: 58px; height: 58px; flex: none; animation: bob 1.1s ease-in-out infinite; }
.working-txt { font-weight: 800; color: var(--brand-dark); }
.working-bar { height: 8px; border-radius: 8px; background: #fff; overflow: hidden; margin-top: 8px; }
.working-bar i {
    display: block; height: 100%; width: 40%;
    background: linear-gradient(90deg, var(--brand), var(--sun));
    border-radius: 8px;
    animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

/* ═══ 13. Rezultatul ══════════════════════════════════════════════════════ */

.result-card {
    border-color: var(--ok);
    box-shadow: 0 6px 0 #b3e2c6;
    background:
        radial-gradient(circle at 96% 4%, rgba(255, 200, 61, .22) 0, transparent 24%),
        var(--surface);
}

.result-head { display: flex; align-items: center; gap: 18px; margin-bottom: 4px; }
.result-head .mascot { width: 78px; height: 78px; flex: none; animation: bob 3.2s ease-in-out infinite; }

.result-title {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 700;
    margin: 2px 0 3px;
    line-height: 1.2;
}
.result-meta { font-size: 14.5px; color: var(--ink-2); margin: 0; font-weight: 700; }

.result-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 24px; }
.stat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: var(--bw) solid var(--line-2);
    border-radius: var(--r);
    padding: 12px 18px;
}
.stat .icon { width: 22px; height: 22px; color: var(--brand); stroke-width: 2; }
.stat b {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 800;
    display: block;
    line-height: 1.05;
}
.stat span { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; font-weight: 900; }

/* ── Confetti ── */

.confetti {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    overflow: hidden;
}
.confetti i {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 16px;
    border-radius: 2px;
    animation: fall linear forwards;
}
@keyframes fall {
    0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate3d(var(--dx, 0), 106vh, 0) rotate(880deg); opacity: .15; }
}

/* ═══ 14. Fișe recente ════════════════════════════════════════════════════ */

.recent-list { display: grid; gap: 10px; }
.recent-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    border: var(--bw) solid var(--line-2);
    border-radius: var(--r);
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    font-size: 14.5px;
    font-weight: 700;
    transition: border-color .15s, transform .14s, background .15s, box-shadow .14s;
}
.recent-item:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: translateX(6px);
    box-shadow: -4px 4px 0 var(--brand-line);
}
.recent-item > .icon { color: var(--brand); width: 19px; height: 19px; }
.recent-item .badge {
    font-family: var(--display);
    font-size: 13.5px;
    font-weight: 700;
    background: var(--sun);
    color: var(--edge);
    border: 2px solid var(--edge);
    border-radius: 20px;
    padding: 1px 11px;
    white-space: nowrap;
    flex: none;
    min-width: 58px;
    text-align: center;
}
/*
 * `min-width: 0` este obligatoriu: fără el, un element de flex nu coboară sub
 * lățimea conținutului, iar un titlu lung împinge rândul în afara ecranului
 * în loc să fie tăiat cu „…". Este cauza clasică a derulării orizontale.
 */
.recent-item .rtitle {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recent-item time { margin-left: auto; font-size: 12.5px; color: var(--ink-3); flex: none; font-weight: 800; }

/* ═══ 15. Bara fișei și hârtia ════════════════════════════════════════════ */

.toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px) saturate(1.25);
    border-bottom: var(--bw) solid var(--line-2);
    padding: 11px 0;
    margin-bottom: 26px;
}
.toolbar .wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding-bottom: 0;
}
.toolbar .sep { flex: 1; }
.toolbar .ws-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 15.5px;
    color: var(--ink-2);
    margin: 0 8px;
    max-width: 32ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hârtia: colț îndoit + umbră, ca să arate ca o foaie adevărată */
.paper-wrap {
    position: relative;
    max-width: 210mm;
    margin: 0 auto 52px;
    background: #fff;
    border: var(--bw) solid var(--line-2);
    border-radius: 10px;
    box-shadow: 0 8px 0 var(--line-2), 0 28px 54px -20px rgba(51, 40, 90, .34);
}
.paper-wrap::before {
    content: '';
    position: absolute;
    top: -14px; left: 50%;
    width: 120px; height: 26px;
    margin-left: -60px;
    background: rgba(255, 200, 61, .5);
    border: 1.5px solid rgba(43, 33, 72, .16);
    border-radius: 2px;
    transform: rotate(-1.5deg);
}

/* ═══ 16. Scor (mod interactiv) ═══════════════════════════════════════════ */

.progress-live {
    position: sticky;
    top: 58px;
    z-index: 15;
    max-width: 210mm;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: var(--bw) solid var(--line-2);
    border-radius: var(--r);
    padding: 10px 16px;
    box-shadow: var(--shadow-1);
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ink-2);
}
.progress-live .bar { flex: 1; height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.progress-live .bar i {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brand), var(--mint));
    border-radius: 10px;
    transition: width .35s ease;
}

.score-card { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.score-ring {
    position: relative;
    width: 124px; height: 124px;
    flex: none;
    display: grid;
    place-items: center;
}
.score-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .track { stroke: var(--surface-3); }
.score-ring .fill {
    stroke: var(--brand);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.1s cubic-bezier(.3, .9, .3, 1);
}
.score-ring.good .fill { stroke: var(--ok); }
.score-ring.mid  .fill { stroke: var(--sun-dark); }
.score-ring.low  .fill { stroke: var(--coral); }
.score-ring b {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    z-index: 1;
}
.score-ring small { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); z-index: 1; }

.score-detail { font-size: 15.5px; font-weight: 700; flex: 1; min-width: 220px; }
.score-detail strong { font-family: var(--display); font-size: 21px; font-weight: 800; }
.score-mascot { width: 86px; height: 86px; flex: none; animation: bob 3.4s ease-in-out infinite; }

/* ═══ 17. Panoul profesorului și zona elevului ═══════════════════════════ */

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }

.sub-title {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--display); font-size: 16.5px; font-weight: 700;
    margin: 0 0 12px; color: var(--ink);
}
.sub-title .icon { color: var(--brand); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.two-col > div { min-width: 0; }

.steps-list { margin: 0; padding-left: 22px; font-weight: 600; color: var(--ink-2); }
.steps-list li { margin-bottom: 8px; }
.steps-list strong { color: var(--ink); }

/* Bifele pentru clase — o grilă de pastile mici */
.pick-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
    display: inline-flex; align-items: center; gap: 7px;
    border: 2px solid var(--line-2); border-radius: 12px;
    padding: 7px 13px; cursor: pointer;
    font-weight: 800; font-size: 14px;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.pick:hover { border-color: var(--brand-line); background: var(--surface-2); }
.pick input { accent-color: var(--brand); width: 17px; height: 17px; cursor: pointer; }
.pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }

/* ── Tabele ── */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }

table.data {
    width: 100%; border-collapse: collapse; font-size: 14px;
    min-width: 480px;
}
table.data th, table.data td {
    border-bottom: 1px solid var(--line);
    padding: 10px 10px; text-align: left; vertical-align: middle;
}
table.data th {
    font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink-3); font-weight: 900; white-space: nowrap;
}
table.data tr:hover td { background: var(--surface-2); }
table.data code { font-size: 13px; background: var(--surface-3); padding: 2px 7px; border-radius: 6px; }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.row-actions .btn { padding: 6px 9px; }
.row-actions .btn .icon { margin: 0; }

/* ── Codurile de acces ── */

.codes-card { border-color: var(--sun-dark); box-shadow: 0 5px 0 #f4dfa8; }
.codes-table code { font-size: 14px; }
.code-big {
    font-size: 16px !important; font-weight: 800; letter-spacing: .08em;
    background: var(--sun-soft) !important; border: 1.5px solid #f4dfa8;
}
.code-input {
    font-size: 20px !important; letter-spacing: .14em; text-align: center;
    text-transform: uppercase; font-weight: 800;
}

/* ── Rezultate în timp real ── */

.live-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px; font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.live-dot {
    width: 11px; height: 11px; border-radius: 50%; flex: none;
    background: var(--ok); box-shadow: 0 0 0 0 rgba(47, 160, 90, .6);
    animation: pulse 2s infinite;
}
.live-dot.off { background: var(--ink-3); animation: none; }
@keyframes pulse {
    70%  { box-shadow: 0 0 0 9px rgba(47, 160, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 160, 90, 0); }
}

.pill {
    display: inline-block; font-size: 12px; font-weight: 800;
    border-radius: 20px; padding: 3px 10px; white-space: nowrap;
}
.pill-ok   { background: var(--ok-soft);   color: var(--ok-dark); }
.pill-work { background: var(--sun-soft);  color: var(--warn); }
.pill-none { background: var(--surface-3); color: var(--ink-3); }

.timer-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13.5px; font-weight: 800; color: var(--ink-2);
    font-variant-numeric: tabular-nums;
}

/* ── Mici ajustări reutilizate ── */

.badge-soft { background: var(--surface-3) !important; color: var(--ink-2) !important;
    border-color: var(--line-2) !important; }
.badge-ok { background: var(--ok) !important; color: #fff !important; border-color: var(--edge) !important; }

.recent-item.is-static { cursor: default; }
.recent-item.is-static:hover { transform: none; border-color: var(--line-2);
    background: #fff; box-shadow: none; }

.note.err { color: var(--err-dark); font-weight: 700; }

.field input[type="file"] {
    width: 100%; font: inherit; font-size: 14px; font-weight: 600;
    padding: 10px; border: var(--bw) dashed var(--line-2);
    border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer;
}
.field input:disabled { background: var(--surface-3); color: var(--ink-3); cursor: not-allowed; }

/* ═══ 18. Pagina de prezentare ════════════════════════════════════════════ */

/*
 * „/" nu mai e generatorul, ci o pagină care explică ce primești. Cine intră
 * prima oară are nevoie de context; cine știe deja apasă „Generează" din bara
 * de sus și sare peste tot. De aceea butonul apare de trei ori pe pagină.
 */

.page-home { background: var(--bg); }
.wrap-narrow { max-width: 760px; }

/* ── Bara de sus ────────────────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 2px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.topbar.is-stuck {
    border-bottom-color: var(--line);
    box-shadow: 0 6px 20px -14px rgba(43, 33, 72, .5);
}
/*
 * Selectorul e compus înadins.
 *
 * Bara, hero-ul, îndemnul final și subsolul folosesc `.wrap` pentru lățime și
 * marginile laterale, dar `.wrap` are și un `padding-bottom` mare — e gândit
 * pentru conținutul paginii, nu pentru o bară. Fără `.topbar .wrap`, regula de
 * telefon a lui `.wrap` câștiga și bara ieșea de 98 px înălțime pe iPhone.
 */
.topbar .topbar-in {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 11px 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--display);
    font-weight: 800;
    font-size: 18px;
    white-space: nowrap;
    /* Nu se strânge: e cutie flexibilă, iar dacă ar ajunge la lățime zero,
       pastila cu sigla i-ar ieși în afară și ar împinge pagina lateral */
    flex: 0 0 auto;
    min-width: 0;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 13px;
    background: var(--brand);
    border: var(--bw) solid var(--edge);
    color: #fff;
    box-shadow: 0 3px 0 var(--edge);
    flex: none;
}
.brand-mark .icon { width: 20px; height: 20px; }
.brand-txt { overflow: hidden; text-overflow: ellipsis; }

/* „de la Genius Squad" — legătura spre site-ul firmei, lângă siglă */
.by-company {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-3);
    text-decoration: none;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 999px;
    border: 2px solid transparent;
}
.by-company b { color: var(--brand); font-weight: 900; }
.by-company:hover { border-color: var(--brand-line); background: var(--brand-soft); }

.topnav {
    display: flex;
    gap: 20px;
    margin-left: auto;
    font-weight: 800;
    font-size: 14.5px;
}
.topnav a {
    color: var(--ink-2);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2.5px solid transparent;
    white-space: nowrap;
}
.topnav a:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* Ambele grupuri au marginea automată: spațiul liber se împarte între ele,
   iar dacă meniul e ascuns pe telefon butoanele rămân lipite de margine */
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-right .theme-pick { padding: 4px 7px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background:
        radial-gradient(1100px 460px at 12% -10%, var(--brand-soft), transparent 62%),
        radial-gradient(900px 420px at 92% 6%, var(--sun-soft), transparent 60%);
    padding: 56px 0 0;
    overflow: hidden;
}
.hero .hero-in {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 40px;
    align-items: center;
    padding-bottom: 92px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 2.5px solid var(--edge);
    border-radius: 999px;
    padding: 6px 15px;
    font-size: 13px;
    font-weight: 900;
    color: var(--ink);
    box-shadow: 0 3px 0 var(--edge);
    margin-bottom: 20px;
}
.kicker .icon { width: 16px; height: 16px; color: var(--sun-dark); }

.hero-title {
    font-family: var(--display);
    font-size: clamp(34px, 5.6vw, 58px);
    line-height: 1.04;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 16px;
    letter-spacing: -.01em;
}
/* Sublinierea de marker: desenată în spatele textului, ușor strâmbă */
/* `z-index: 0` face din cuvânt un context propriu, ca marker-ul de dedesubt
   să nu cadă în spatele fundalului secțiunii */
.hero-title .hl { position: relative; z-index: 0; white-space: nowrap; }
.hero-title .hl::after {
    content: '';
    position: absolute;
    left: -2%; right: -2%; bottom: .06em;
    height: .34em;
    background: var(--sun);
    border-radius: 999px;
    transform: rotate(-1.1deg);
    z-index: -1;
    opacity: .75;
}

.hero-lead {
    font-size: 17.5px;
    line-height: 1.65;
    color: var(--ink-2);
    font-weight: 600;
    max-width: 52ch;
    margin: 0 0 26px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
}
.hero-facts li {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 2.5px solid var(--edge);
    border-radius: var(--r-sm);
    padding: 9px 16px;
    box-shadow: 0 3px 0 var(--edge);
    min-width: 78px;
}
.hero-facts b {
    font-family: var(--display);
    font-size: 22px;
    color: var(--brand);
    line-height: 1;
}
.hero-facts span {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 900;
    color: var(--ink-3);
    margin-top: 3px;
}

/* ── Teancul de foi din dreapta ─────────────────────────────────────────── */

/*
 * Foaia din față stă în flux, nu absolut.
 *
 * Prima variantă le avea pe toate trei absolute, iar containerul se baza pe un
 * `min-height`. Pe telefon, unde hero-ul devine o singură coloană, containerul
 * se micșora la conținut — adică la zero, fiindcă nimic din el nu era în flux —
 * și teancul se strângea într-o fâșie de 50 px. Acum înălțimea vine din foaia
 * din față, iar celelalte două se așază după ea, la orice lățime.
 */
.hero-art { position: relative; }

.paper {
    background: #fff;
    border: 2.5px solid var(--edge);
    border-radius: var(--r-sm);
    box-shadow: 0 6px 0 var(--edge);
}

.paper-front {
    position: relative;
    z-index: 2;
    margin: 22px 20px 34px 28px;
    min-height: 250px;
    transform: rotate(-1.2deg);
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

/* Celelalte două copiază cutia foii din față și se răsfiră în spate */
.paper-back, .paper-mid {
    position: absolute;
    top: 22px; left: 28px; right: 20px; bottom: 34px;
}
.paper-mid  { z-index: 1; opacity: .8;  transform: rotate(3.4deg)  translate(9px, -5px); }
.paper-back { z-index: 0; opacity: .55; transform: rotate(-6.4deg) translate(-11px, 7px); }

.pp-head { display: flex; align-items: center; gap: 10px; }
.pp-badge {
    background: var(--brand);
    color: #fff;
    border: 2px solid var(--edge);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.pp-title { height: 13px; width: 62%; border-radius: 999px; background: var(--ink); opacity: .82; }
.pp-line  { height: 8px; flex: 1; border-radius: 999px; background: var(--line-2); }
.pp-w40 { max-width: 40%; } .pp-w55 { max-width: 55%; }
.pp-w70 { max-width: 70%; } .pp-w75 { max-width: 75%; } .pp-w85 { max-width: 85%; }

.pp-row { display: flex; align-items: center; gap: 9px; }
.pp-num {
    display: grid;
    place-items: center;
    width: 20px; height: 20px;
    flex: none;
    border-radius: 7px;
    background: var(--sun);
    border: 2px solid var(--edge);
    font-size: 11px;
    font-weight: 900;
    color: var(--edge);
}
.pp-row .pp-num:empty { background: transparent; border-color: transparent; }

.pp-boxes { display: flex; gap: 8px; margin-top: auto; }
.pp-boxes i {
    width: 26px; height: 26px;
    border: 2px dashed var(--line-2);
    border-radius: 7px;
}

.hero-mascot { position: absolute; bottom: -18px; left: -14px; z-index: 2; }
.hero-mascot-2 { bottom: auto; top: -22px; left: auto; right: -10px; }

/* Valul care leagă hero-ul de restul paginii */
.hero-wave {
    height: 46px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    margin-top: -46px;
    position: relative;
}

/* ── Benzi de conținut ──────────────────────────────────────────────────── */
.band { padding: 66px 0; }
.band-alt { background: var(--surface-2); border-block: 2px solid var(--line); }
.band > .wrap { padding-bottom: 0; }

.band-kicker {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .11em;
    font-weight: 900;
    color: var(--brand);
    margin: 0 0 8px;
}
.band-title {
    font-family: var(--display);
    font-size: clamp(26px, 3.6vw, 38px);
    line-height: 1.15;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 12px;
}
.band-lead {
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--ink-2);
    font-weight: 600;
    max-width: 62ch;
    margin: 0 0 32px;
}

/*
 * Apariția la derulare.
 *
 * Ascunderea e legată de clasa `.js-reveal`, pusă de un script din <head> doar
 * când browserul chiar poate observa derularea. Fără ea — JavaScript oprit,
 * IntersectionObserver lipsă, mișcare redusă — nimic nu se ascunde vreodată,
 * deci pagina nu poate rămâne albă din cauza unui efect decorativ.
 */
.js-reveal .feat,
.js-reveal .cycle,
.js-reveal .how-step,
.js-reveal .subj-chip,
.js-reveal .split-art {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .45s ease, transform .45s cubic-bezier(.2, .9, .3, 1.2);
    transition-delay: calc(var(--i, 0) * 70ms);
}
.js-reveal .feat.is-in,
.js-reveal .cycle.is-in,
.js-reveal .how-step.is-in,
.js-reveal .subj-chip.is-in,
.js-reveal .split-art.is-in {
    opacity: 1;
    transform: none;
}

/* ── Ce primești ────────────────────────────────────────────────────────── */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.feat {
    background: #fff;
    border: var(--bw) solid var(--edge);
    border-radius: var(--r);
    padding: 22px 20px;
    box-shadow: 0 5px 0 var(--edge);
    min-width: 0;
}
.feat:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--edge); }
.feat-ico {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 15px;
    background: var(--brand-soft);
    border: 2.5px solid var(--edge);
    color: var(--brand-dark);
    margin-bottom: 14px;
}
.feat-ico .icon { width: 24px; height: 24px; stroke-width: 2; }
.feat h3 { font-family: var(--display); font-size: 19px; margin: 0 0 6px; color: var(--ink); }
.feat p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); font-weight: 600; }

/* Fiecare card își ia altă culoare, ca să nu pară un rând de cutii identice */
.feat:nth-child(2) .feat-ico { background: var(--sun-soft);   color: var(--sun-dark); }
.feat:nth-child(3) .feat-ico { background: var(--mint-soft);  color: var(--mint-dark); }
.feat:nth-child(4) .feat-ico { background: var(--coral-soft); color: var(--coral-dark); }

/* ── Ciclurile ──────────────────────────────────────────────────────────── */
.cycle-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.cycle {
    --tone: var(--brand);
    background: #fff;
    border: var(--bw) solid var(--edge);
    border-radius: var(--r);
    border-top-width: 7px;
    border-top-color: var(--tone);
    padding: 18px;
    box-shadow: 0 5px 0 var(--edge);
    min-width: 0;
}
.cycle--sun   { --tone: var(--sun); }
.cycle--coral { --tone: var(--coral); }
.cycle--mint  { --tone: var(--mint); }
.cycle--brand { --tone: var(--brand); }
.cycle--edge  { --tone: var(--ink-2); }

.cycle-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cycle-n {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    flex: none;
    border-radius: 50%;
    background: var(--tone);
    border: 2.5px solid var(--edge);
    color: #fff;
    font-family: var(--display);
    font-size: 18px;
    font-weight: 800;
}
.cycle h3 { font-family: var(--display); font-size: 19px; margin: 0; color: var(--ink); }
.cycle-range {
    margin: 1px 0 0;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-3);
}
.cycle-desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); font-weight: 600; }

/* ── Materiile ──────────────────────────────────────────────────────────── */
.subj-cloud { display: flex; flex-wrap: wrap; gap: 11px; }
.subj-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 2.5px solid var(--edge);
    border-radius: 999px;
    padding: 8px 16px 8px 9px;
    text-decoration: none;
    box-shadow: 0 3px 0 var(--edge);
    min-width: 0;
}
.subj-chip:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--edge); background: var(--brand-soft); }
.sc-ico {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    flex: none;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dark);
}
.sc-ico .icon { width: 17px; height: 17px; }
.sc-name { font-weight: 800; color: var(--ink); font-size: 14.5px; }
.sc-range { font-size: 11.5px; font-weight: 900; color: var(--ink-3); white-space: nowrap; }

/* ── Cum funcționează ───────────────────────────────────────────────────── */
.how {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: how;
}
.how-step {
    position: relative;
    background: #fff;
    border: var(--bw) solid var(--edge);
    border-radius: var(--r);
    padding: 26px 18px 20px;
    box-shadow: 0 5px 0 var(--edge);
    min-width: 0;
}
.how-n {
    position: absolute;
    top: -16px; left: 18px;
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--sun);
    border: 2.5px solid var(--edge);
    font-family: var(--display);
    font-size: 17px;
    font-weight: 800;
    color: var(--edge);
    box-shadow: 0 3px 0 var(--edge);
}
.how-ico { display: block; color: var(--brand); margin-bottom: 10px; }
.how-ico .icon { width: 28px; height: 28px; stroke-width: 2; }
.how-step h3 { font-family: var(--display); font-size: 18px; margin: 0 0 6px; color: var(--ink); }
.how-step p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); font-weight: 600; }
.how-cta { margin-top: 34px; text-align: center; }

/* ── Secțiuni pe două coloane ───────────────────────────────────────────── */
.split {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 44px;
    align-items: center;
}
.split-rev .split-txt { order: 2; }
.split-txt { min-width: 0; }
.split-art { display: flex; justify-content: center; min-width: 0; }

.ticks { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 9px; }
.ticks li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-2);
}
.ticks .icon { width: 19px; height: 19px; flex: none; color: var(--ok); stroke-width: 2.6; margin-top: 2px; }

/* Panoul-demonstrativ de rezultate */
.mini-panel {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: var(--bw) solid var(--edge);
    border-radius: var(--r);
    box-shadow: 0 6px 0 var(--edge);
    padding: 16px;
}
.mp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.mp-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--coral); border: 2px solid var(--edge); }
.mp-title { font-family: var(--display); font-weight: 800; color: var(--ink); font-size: 15.5px; margin-right: auto; }
.mp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.mp-name { font-size: 13.5px; font-weight: 800; color: var(--ink-2); width: 76px; flex: none;
           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-bar { flex: 1; height: 11px; background: var(--surface-3); border-radius: 999px; overflow: hidden; min-width: 0; }
.mp-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.mp-row:nth-child(3) .mp-bar i { background: var(--mint); }
.mp-row:nth-child(4) .mp-bar i { background: var(--sun); }
.mp-row:nth-child(5) .mp-bar i { background: var(--coral); }
.mp-score { font-family: var(--display); font-weight: 800; color: var(--ink); width: 26px; text-align: right; flex: none; }
.mp-foot { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-3); font-weight: 800; text-align: center; }

/* Telefonul din secțiunea elevilor */
.phone {
    width: 218px;
    background: var(--edge);
    border-radius: 30px;
    padding: 12px 10px;
    box-shadow: 0 8px 0 rgba(43, 33, 72, .35);
}
.ph-notch { width: 62px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.4); margin: 0 auto 10px; }
.ph-screen { background: #fff; border-radius: 20px; padding: 16px 13px; }
.ph-q { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--ink); margin-bottom: 12px; }
.ph-opt {
    border: 2.5px solid var(--line-2);
    border-radius: 12px;
    padding: 9px 12px;
    margin-bottom: 8px;
    font-weight: 800;
    font-size: 14.5px;
    color: var(--ink-2);
    display: flex;
    align-items: center;
    gap: 7px;
}
.ph-opt.is-ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-dark); }
.ph-opt .icon { width: 17px; height: 17px; margin-left: auto; stroke-width: 3; }
.ph-score {
    margin-top: 14px;
    text-align: center;
    background: var(--sun-soft);
    border: 2.5px solid var(--edge);
    border-radius: 14px;
    padding: 9px;
}
.ph-score span { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; }
.ph-score small { font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }

/* ── Întrebări frecvente ────────────────────────────────────────────────── */
.faq { display: grid; gap: 11px; }
.faq details {
    background: #fff;
    border: 2.5px solid var(--edge);
    border-radius: var(--r-sm);
    box-shadow: 0 4px 0 var(--edge);
    overflow: hidden;
}
.faq summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    cursor: pointer;
    font-family: var(--display);
    font-weight: 700;
    font-size: 16.5px;
    color: var(--ink);
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-x { margin-left: auto; color: var(--brand); display: flex; transition: transform .2s; }
.faq-x .icon { width: 20px; height: 20px; stroke-width: 2.6; }
.faq details[open] .faq-x { transform: rotate(180deg); }
.faq details p {
    margin: 0;
    padding: 0 18px 16px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--ink-2);
    font-weight: 600;
}

/* ── Îndemnul final ─────────────────────────────────────────────────────── */
.cta-final {
    background: linear-gradient(135deg, var(--head-1), var(--head-2));
    color: #fff;
    padding: 44px 0;
    border-block: var(--bw) solid var(--edge);
}
.cta-final .cta-in {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 0;
    flex-wrap: wrap;
}
.cta-in > div { flex: 1; min-width: 200px; }
.cta-in h2 { font-family: var(--display); font-size: clamp(22px, 3vw, 30px); margin: 0 0 5px; }
.cta-in p { margin: 0; font-size: 15.5px; font-weight: 700; opacity: .92; }
.cta-in .mascot { flex: none; }
.cta-final .btn-hero { background: #fff; color: var(--brand-dark); }

/* ── Subsolul mare ──────────────────────────────────────────────────────── */
.foot-big { text-align: left; padding: 40px 0 0; }
.foot-big .foot-in {
    display: flex;
    gap: 28px;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 26px;
    border-bottom: 2px solid var(--line);
}
.foot-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--display);
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 6px;
}
.foot-brand .icon { width: 20px; height: 20px; color: var(--brand); }
.foot-note { margin: 0; max-width: 46ch; font-size: 13.5px; line-height: 1.6; color: var(--ink-3); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.foot-links a { font-size: 14px; font-weight: 800; color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--brand); }
.foot-company { display: inline-flex; align-items: center; gap: 6px; color: var(--brand) !important; }
.foot-company .icon { width: 16px; height: 16px; }
.foot-legal { text-align: center; padding: 20px 22px 40px; font-size: 13px; color: var(--ink-3); font-weight: 800; margin: 0; }

/* ═══ 19. Subsol ══════════════════════════════════════════════════════════ */

.site-foot {
    text-align: center;
    color: var(--ink-3);
    font-size: 14px;
    font-weight: 800;
    padding: 34px 22px 56px;
}
.site-foot a { color: var(--ink-2); }

/* ═══ 20. Ecrane mici ═════════════════════════════════════════════════════ */

/*
 * Regulă de siguranță pentru tot ce e pus în flex: fără ea, un cuvânt lung
 * sau un titlu netăiat împinge pagina în lateral pe telefon.
 */
.card, .msg, .recent-item, .stat, .score-detail, .bubble, .field,
.topic, .subject, .step-title, .feat, .cycle, .how-step, .subj-chip,
.mini-panel, .foot-in > div, .cta-in > div { min-width: 0; }

.card, .msg, .bubble, .steps-list, .note { overflow-wrap: anywhere; }

/* Pe tabletă hero-ul și secțiunile pe două coloane trec una sub alta */
@media (max-width: 900px) {
    .hero .hero-in, .split { grid-template-columns: 1fr; gap: 30px; }
    .hero .hero-in { padding-bottom: 62px; }
    .split-rev .split-txt { order: 0; }
    /* Teancul nu se mai întinde pe toată lățimea: la 900 px ar arăta ca o foaie
       A4 turtită. Rămâne centrat, la o lățime în care se vede că e o fișă. */
    .hero-art { max-width: 440px; width: 100%; justify-self: center; }
    .topnav { display: none; }
    .band { padding: 52px 0; }
    /* „de la Genius Squad" rămâne în subsol: de aici încolo bara nu-l mai poate
       ține fără să împingă butoanele afară din ecran */
    .topbar .by-company { display: none; }
}

@media (max-width: 760px) {
    body { font-size: 15.5px; }
    .site-head { padding: 20px 0 78px; }

    /* Pagina de prezentare pe telefon */
    .topbar .topbar-in { padding: 9px 14px; gap: 10px; }
    .brand-txt { display: none; }
    .topbar-right { gap: 8px; }
    .topbar-right .theme-pick { display: none; }
    .hero { padding-top: 26px; }
    .hero .hero-in { padding-bottom: 46px; gap: 20px; }
    .hero-lead { font-size: 16px; margin-bottom: 20px; }
    .hero-facts { margin-top: 22px; }
    .hero-facts li { padding: 7px 13px; min-width: 68px; }
    .hero-facts b { font-size: 19px; }
    .paper-front { margin: 16px 12px 26px 18px; min-height: 210px; }
    .paper-back, .paper-mid { top: 16px; left: 18px; right: 12px; bottom: 26px; }
    .hero-mascot { display: none; }
    .band-lead { font-size: 15.5px; margin-bottom: 24px; }
    .feat, .cycle, .how-step { padding: 18px 16px; }
    .how { gap: 26px; }
    .cta-final .cta-in { gap: 16px; }
    .cta-in .mascot { display: none; }
    .foot-big .foot-in { flex-direction: column; gap: 20px; padding-bottom: 22px; }

    /* Legăturile din subsol erau linii de 22 px — greu de nimerit cu degetul */
    .foot-links { gap: 6px 18px; }
    .foot-links a, .foot-company, .foot-legal a {
        display: inline-block;
        padding: 7px 0;
    }
    .two-col { grid-template-columns: 1fr; gap: 22px; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .tabs .btn { flex: none; }
    .result-stats { gap: 8px; }
    .stat { padding: 10px 13px; gap: 9px; }
    .stat b { font-size: 20px; }
    .pick { padding: 6px 11px; font-size: 13px; }
    .site-head h1 { font-size: 28px; }
    .site-head .tagline { font-size: 14px; }
    .head-body { margin-top: 12px; }
    .head-stats { gap: 6px; margin-top: 11px; }
    .head-stats li { font-size: 12px; padding: 3px 10px; }
    .head-stats b { font-size: 13.5px; }
    .logo-mark { width: 52px; height: 52px; border-radius: 18px; }
    .logo-mark .icon { width: 26px; height: 26px; }
    .card { padding: 20px 17px; border-radius: var(--r); }
    .card--taped::before { left: 22px; width: 66px; }
    .wrap { padding: 0 14px 56px; }
    .step-title { font-size: 20px; gap: 10px; }
    .step-num { width: 40px; height: 40px; }
    .grades { grid-template-columns: repeat(3, 1fr); }
    .grade-btn .g-num { width: 40px; height: 40px; font-size: 17px; }
    .subject-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
    .topic-opts { padding-left: 16px; }
    .toolbar .ws-title { display: none; }
    .step-title .hint { flex-basis: 100%; text-align: left; margin-left: 50px; }
    .guide .mascot { width: 52px; height: 52px; }
    .bubble { font-size: 13.5px; padding: 9px 13px; }
    .btn-hero { font-size: 18px; padding: 13px 24px; }
    .progress-live { top: 54px; font-size: 12.5px; gap: 9px; padding: 9px 12px; }
}

/* Telefoane înguste: rândurile lungi au voie să treacă pe două linii */
@media (max-width: 520px) {
    .recent-item { flex-wrap: wrap; row-gap: 6px; padding: 12px 13px; }
    .recent-item .rtitle { flex: 1 1 100%; order: 3; white-space: normal; }
    .recent-item time { margin-left: auto; order: 2; }
    .recent-item .badge { order: 1; }

    .toolbar .wrap { gap: 7px; }
    .toolbar .btn-sm { padding: 7px 11px; font-size: 13.5px; }

    .score-card { gap: 16px; }
    .score-ring { width: 96px; height: 96px; }
    .score-ring b { font-size: 24px; }
    .score-mascot { display: none; }

    .head-tools { gap: 7px; }
    .theme-pick { padding: 5px 7px; gap: 5px; }
    .swatch { width: 21px; height: 21px; }

    .row-actions { flex-wrap: wrap; }
    .code-input { font-size: 18px !important; letter-spacing: .1em; }

    /* Chipsurile de materie: numele pe un rând, intervalul dedesubt */
    .subj-chip { padding: 7px 13px 7px 8px; gap: 8px; }
    .sc-name { font-size: 13.5px; }
    .sc-range { display: none; }
    .hero-facts { gap: 8px; }
    .hero-facts li { flex: 1 1 calc(50% - 8px); }
    .phone { width: 190px; }
    .faq summary { font-size: 15.5px; padding: 13px 15px; }
    .faq details p { padding: 0 15px 14px; }
}

/* Telefoane foarte înguste: în bară rămâne doar butonul care contează */
@media (max-width: 360px) {
    .topbar-right .btn-ghost { display: none; }
    .hero-title { font-size: 30px; }
    .hero-facts li { flex: 1 1 100%; flex-direction: row; gap: 8px; justify-content: center; }
}

/* ═══ 21. Mișcare redusă ══════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .card, .step-pick { animation: none; }
    .mascot .m-eyes, .squad-one, .logo-mark, .floaters .fl,
    .working .mascot, .working-bar i,
    .result-head .mascot, .score-mascot { animation: none !important; }
    .confetti { display: none; }
    .btn::after { display: none; }
    .quest { transition: none; }

    /* Pagina de prezentare rămâne întreagă, doar fără apariții */
    .js-reveal .feat, .js-reveal .cycle, .js-reveal .how-step,
    .js-reveal .subj-chip, .js-reveal .split-art {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .hero-mascot .mascot { animation: none !important; }

    * { scroll-behavior: auto !important; }
}

/* ═══ 22. Tipar ═══════════════════════════════════════════════════════════ */

@media print {
    .site-head, .toolbar, .site-foot, .quest, .progress-live,
    .confetti, .floaters, .no-print { display: none !important; }
    body { background: #fff; }
    body::before { display: none; }
    .paper-wrap {
        box-shadow: none; border: 0; margin: 0;
        max-width: none; border-radius: 0;
    }
    .paper-wrap::before { display: none; }
}
