/* Home page (Components/Pages/Home.razor): the visitor hero, the try question, features, and the student mission view.
   The try question reuses the quiz tiles and verdict (quiz-round.css). */

.section-title { font-size: var(--fs-2xl); text-align: center; margin-bottom: var(--space-5); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Visitor hero: the character next to the title, even on a phone ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: var(--space-3) var(--space-2);
    align-items: center;
    padding: 0 0 var(--space-5);
}
.hero-copy { grid-column: 1; grid-row: 1; min-width: 0; }
.hero-art { grid-column: 2; grid-row: 1; }
.hero-cta { grid-column: 1 / -1; grid-row: 2; }
.hero-copy > *, .hero-cta { animation: rise .6s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-cta { animation-delay: .24s; }
.hero-copy .chip-tilt { margin-bottom: var(--space-3); }
.hero-title { font-size: clamp(1.75rem, 7.6vw, 3.75rem); line-height: 1.25; margin-bottom: var(--space-3); }
.hero-sub { margin: 0; font-size: var(--fs-md); color: var(--text-muted); max-width: 34em; }
.hero-cta .actions { margin-top: 0; }
.hero-cta .actions .btn { flex: 1 1 200px; }
.hero-note { display: flex; align-items: center; gap: 6px; margin: var(--space-3) 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.hero-note .icon { color: var(--success); }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-mascot { position: relative; z-index: 2; width: 104px; height: auto; }
.hero-bubble, .orbit, .float-chip { display: none; }
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 2px dashed color-mix(in srgb, var(--primary) 45%, transparent);
    pointer-events: none;
}
.orbit-1 { animation: spin 40s linear infinite; }
.orbit-2 {
    border-style: solid;
    border-color: transparent;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary) 30%, transparent), transparent 70%);
}
@keyframes spin { to { transform: rotate(360deg); } }
.float-chip {
    position: absolute;
    z-index: 3;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 4px 0 var(--edge);
    font-family: var(--font-title);
    font-size: .95rem;
    white-space: nowrap;
    animation: bob 3s ease-in-out infinite alternate;
}
.fc-1 { top: 40%; inset-inline-start: 4%; background: var(--amber); border-color: var(--accent-edge); color: var(--navy); }
.fc-2 { top: 70%; inset-inline-end: 2%; background: var(--primary); border-color: var(--primary-edge); color: var(--on-primary); animation-delay: .8s; }
.fc-3 { bottom: 4%; inset-inline-start: 12%; animation-delay: 1.5s; }
@keyframes bob { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-10px) rotate(3deg); } }

@media (min-width: 56.25em) {
    .hero { grid-template-columns: 1.15fr .85fr; gap: 0 var(--space-5); padding-top: var(--space-5); min-height: 480px; }
    .hero-copy { align-self: end; }
    .hero-cta { grid-column: 1; align-self: start; margin-top: var(--space-5); }
    .hero-art { grid-row: 1 / span 2; min-height: 420px; padding-top: 56px; }
    .hero-mascot { width: 250px; }
    .hero-bubble { display: inline-block; position: absolute; top: 0; z-index: 3; }
    .orbit { display: block; }
    .float-chip { display: inline-flex; }
    .orbit-1 { width: 360px; height: 360px; margin: -150px 0 0 -180px; }
    .orbit-2 { width: 250px; height: 250px; margin: -95px 0 0 -125px; }
    .hero-cta .actions .btn { flex: 0 1 auto; }
}

/* ---------- Try one question without an account ---------- */
.try { max-width: 720px; margin: 0 auto var(--space-5); scroll-margin-top: 12px; animation: rise .6s var(--ease-out) .3s both; }
.try-head { display: grid; justify-items: start; gap: 6px; margin-bottom: var(--space-4); }
.try-title { margin: 0; font-size: var(--fs-lg); }
.try .qz-stem { flex: 1; min-width: 0; padding: 12px 14px; border: 2px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-2); font-size: var(--fs-md); }
.try .qz-ask-mascot { width: 56px; }
.try .qz-explain { margin-bottom: var(--space-4); }

/* ---------- Feature cards: real game parts on a dark screen ---------- */
.features { padding: var(--space-5) 0; }

/* Native disclosure controls keep the FAQ usable without JavaScript. */
.home-plans { padding: 24px 0 clamp(40px, 6vw, 64px); }
.home-plans .section-title { margin-bottom: 12px; }
.home-plans-intro { max-width: 660px; margin: 0 auto 28px; text-align: center; color: var(--text-muted); line-height: 1.8; }
.home-plans-action { margin-top: 28px; text-align: center; }
.home-plans-action p, .home-plans-note { margin: 12px 0 0; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.8; }
.home-faq { max-width: 820px; margin: 0 auto; padding: 32px 0 clamp(40px, 6vw, 64px); }
.home-faq .section-title { margin-bottom: 12px; }
.home-faq-intro { text-align: center; color: var(--text-muted); margin: 0 0 28px; }
.home-faq-list { display: grid; gap: 12px; }
.home-faq-item { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; }
.home-faq-item[open] { border-color: var(--primary); }
.home-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 20px; font-family: var(--font-title); font-size: var(--fs-md); cursor: pointer; list-style: none; }
.home-faq-item summary::-webkit-details-marker { display: none; }
.home-faq-item summary:hover { color: var(--primary); }
.home-faq-item summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; border-radius: 18px; }
.home-faq-toggle { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--primary); font: 400 1.5rem/1 sans-serif; }
.home-faq-item[open] .home-faq-toggle { transform: rotate(45deg); color: var(--amber); }
.home-faq-answer { padding: 0 20px 20px; color: var(--text-muted); line-height: 1.9; }
.home-faq-answer p { margin: 0; }
@media (prefers-reduced-motion: no-preference) { .home-faq-toggle { transition: transform .2s ease; } }
.study-steps { padding-bottom: clamp(40px, 6vw, 64px); }
.study-steps .section-title { margin-bottom: 12px; }
.study-subtitle { margin: 0 0 52px; text-align: center; color: var(--text-muted); font-family: var(--font-title); font-size: var(--fs-lg); }
.study-grid { display: grid; grid-template-columns: 1fr; gap: 48px; margin: 0; padding: 0; list-style: none; }
.study-step { min-width: 0; text-align: center; }
.study-scene { --scene-color: var(--turquoise); position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 280px; padding: 22px 18px; margin: 0 4px 24px; border: 1px solid color-mix(in srgb, var(--scene-color) 55%, transparent); border-radius: 40px 22px 40px 22px; background: radial-gradient(ellipse at 80% 15%, color-mix(in srgb, var(--scene-color) 13%, transparent), transparent 75%), var(--console); color: var(--on-console); box-shadow: 0 16px 40px -24px var(--scene-color); }
.study-scene-video { --scene-color: var(--amber); }
.study-number { position: absolute; z-index: 2; inset-inline-start: -8px; top: -22px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--scene-color); color: var(--navy); font: 700 1.8rem var(--font-title); box-shadow: 0 0 24px color-mix(in srgb, var(--scene-color) 20%, transparent); }
.study-number::after { content: ""; position: absolute; top: -10px; inset-inline-end: -10px; width: 18px; height: 18px; border-top: 4px solid var(--scene-color); border-inline-end: 4px solid var(--scene-color); transform: rotate(-20deg); }
.study-screen { overflow: hidden; border: 1px solid var(--on-console-muted); border-radius: 18px; background: var(--navy); transform: rotate(2deg); }
.study-screen-bar { display: flex; gap: 4px; padding: 8px 12px; }
.study-screen-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--on-console-muted); }
.study-video-preview { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.study-video-preview img { width: 100%; height: 100%; object-fit: cover; }
.study-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--turquoise); color: var(--navy); box-shadow: 0 0 0 7px #0004; }
.study-video-preview:hover .study-play { background: var(--amber); }
.study-play { width: auto; height: auto; min-height: 44px; padding: 8px 14px; display: flex; gap: 8px; border-radius: var(--radius-pill); white-space: nowrap; font-family: var(--font-title); }
.study-video-title { font-size: .8rem; margin: 6px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.study-player-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--turquoise); }
.study-player-bar > span { flex: 1; height: 4px; border-radius: 6px; background: linear-gradient(to left, var(--turquoise) 35%, #ffffff25 35%); }
.study-video-empty { display: grid; place-content: center; justify-items: center; gap: 12px; min-height: 170px; color: var(--turquoise); text-decoration: none; }
.study-mini-quiz { text-align: start; }
.study-mini-quiz > p:first-child { font-family: var(--font-title); margin: 0 0 12px; }
.study-mini-quiz fieldset { display: grid; gap: 7px; padding: 0; margin: 0; border: 0; min-width: 0; }
.study-mini-quiz label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 40px; border: 1px solid #ffffff25; border-radius: 12px; background: #ffffff08; cursor: pointer; }
.study-mini-quiz input { accent-color: var(--turquoise); width: 18px; height: 18px; flex-shrink: 0; }
.study-mini-quiz label:has(input:checked) { border-color: var(--amber); }
.study-mini-quiz .study-correct:has(input:checked) { border-color: var(--turquoise); background: #20b8a61a; }
.study-answer { display: none; align-items: center; gap: 6px; margin: 10px 0 0; font-size: .8rem; }
.study-mini-quiz:has(.study-correct input:checked) .study-answer-correct { display: flex; color: var(--turquoise); }
.study-mini-quiz:has(label:not(.study-correct) input:checked) .study-answer-retry { display: block; color: var(--amber); }
.study-reward-top { display: flex; align-items: center; justify-content: center; gap: 16px; }
.study-trophy { color: var(--amber); filter: drop-shadow(0 6px 18px #ffbf4733); transform: rotate(-12deg); }
.study-reward-top > div { display: grid; gap: 8px; text-align: start; }
.study-reward-top strong { font: 700 1.5rem var(--font-title); }
.study-reward-top div > span { font-size: .8rem; }
.study-points { display: flex; align-items: center; gap: 6px; color: var(--amber); }
.study-progress-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; margin-top: 24px; border: 1px solid #ffffff25; border-radius: 16px; font-size: .75rem; }
.study-progress-demo > span { display: flex; align-items: center; gap: 4px; color: var(--amber); }
.study-progress-track { flex: 1; min-width: 55px; height: 10px; border-radius: 20px; background: #ffffff15; overflow: hidden; }
.study-progress-track > span { display: block; width: 70%; height: 100%; border-radius: inherit; background: var(--turquoise); }
.study-example { margin-top: 10px; color: var(--on-console-muted); font-size: .7rem; }
.study-label { margin: 0 0 8px; color: var(--primary); font-family: var(--font-title); }
.study-step h3 { margin: 0 0 18px; font-size: var(--fs-lg); }
.study-step h3::after { content: ""; display: block; width: 40px; height: 4px; margin: 12px auto 0; border-radius: 4px; background: var(--turquoise); }
.study-step:first-child h3::after { background: var(--amber); }
.study-description { margin: 0 auto; max-width: 32ch; color: var(--text-muted); line-height: 1.8; }
@media (min-width: 56.25em) {
    .study-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
    .study-scene { height: 300px; }
    .study-step:not(:last-child) .study-scene::after { content: "←"; position: absolute; inset-inline-end: -29px; top: 45%; color: var(--scene-color); font-size: 2rem; }
}
.feature-grid { display: grid; gap: var(--space-4); }
.feature-card { display: flex; flex-direction: column; transition: transform .2s var(--ease-out); animation: rise .6s var(--ease-out) both; }
.feature-card:nth-child(2) { animation-delay: .08s; }
.feature-card:nth-child(3) { animation-delay: .16s; }
.feature-card:nth-child(4) { animation-delay: .24s; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.feature-card h3 { font-size: var(--fs-lg); margin: var(--space-4) 0 var(--space-2); }
.feature-card p { color: var(--text-muted); }
.feature-demo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 150px;
    padding: 14px;
    overflow: hidden;
    border-radius: var(--radius);
    background:
        radial-gradient(14rem 8rem at 100% 0%, color-mix(in srgb, var(--turquoise) 28%, transparent), transparent 70%),
        radial-gradient(color-mix(in srgb, var(--on-console) 8%, transparent) 1.2px, transparent 1.4px) 0 0 / 16px 16px,
        var(--console);
    color: var(--on-console);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--turquoise) 35%, transparent);
}
.demo-xp { flex: 1; min-width: 0; display: grid; gap: 6px; max-width: 170px; }
.demo-level .level-badge-lg { --size: 58px; }
.demo-xp-text { display: flex; justify-content: space-between; gap: 6px; font-size: .8rem; color: var(--on-console-muted); white-space: nowrap; }
.demo-xp-text b { color: var(--on-console); font-family: var(--font-title); font-weight: 700; }
.demo-level .xp-bar { background: #0A1220; }
.demo-level .pop-chip { position: absolute; top: 14px; inset-inline-end: 14%; }

.demo-podium { display: grid; grid-template-columns: repeat(3, 76px); align-items: end; gap: 8px; height: 100%; }
.demo-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.demo-step-1 { grid-column: 2; grid-row: 1; }
.demo-step-2 { grid-column: 1; grid-row: 1; }
.demo-step-3 { grid-column: 3; grid-row: 1; }
.demo-step .lb-av { width: 44px; height: 44px; font-size: 1.2rem; }
.demo-step-1 .lb-av { box-shadow: 0 0 0 3px var(--console), 0 0 0 5px var(--gold), var(--glow-accent); }
.demo-step .lb-crown { position: static; margin-bottom: -6px; fill: var(--gold); animation: lb-crown 2.4s ease-in-out 1s infinite; }
.demo-step .chip { position: absolute; top: 34px; }
.demo-block {
    display: grid;
    place-items: start center;
    width: 100%;
    padding-top: 4px;
    border-radius: 12px 12px 4px 4px;
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 1.4rem;
    line-height: 1.2;
    transform-origin: 50% 100%;
    animation: lb-rise .6s var(--ease-spring) .2s both;
}
.demo-step-1 .demo-block { height: 62px; background: linear-gradient(170deg, var(--gold), var(--accent-edge)); }
.demo-step-2 .demo-block { height: 44px; background: linear-gradient(170deg, var(--silver), color-mix(in srgb, var(--silver) 70%, var(--navy))); }
.demo-step-3 .demo-block { height: 32px; background: linear-gradient(170deg, var(--bronze), color-mix(in srgb, var(--bronze) 75%, var(--navy))); }

.demo-map { justify-content: space-around; }
.demo-road {
    position: absolute;
    inset-inline: 15%;
    top: 50%;
    height: 12px;
    margin-top: -6px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--on-console) 14%, transparent);
}
.demo-road::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 50%; border-radius: inherit; background: var(--primary); }
.demo-stop {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 3px dashed color-mix(in srgb, var(--on-console) 40%, transparent);
    border-radius: 50%;
    background: var(--console-2);
    font-family: var(--font-title);
}
.demo-stop.is-done { border: 3px solid var(--accent-edge); background: var(--amber); color: var(--navy); box-shadow: 0 4px 0 var(--accent-edge), var(--glow-accent); }
.demo-stop.is-current { width: 66px; height: 66px; border: 3px solid var(--primary-edge); background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 0 var(--primary-edge), var(--glow); }
.demo-stop.is-current::after { content: ""; position: absolute; inset: -10px; border: 3px solid var(--primary); border-radius: 50%; opacity: 0; animation: ring 1.8s var(--ease-out) infinite; }
.demo-stop .stars, .demo-stop .chip { position: absolute; top: -26px; }
.demo-stop .stars .icon { width: 16px; height: 16px; }

.demo-video { flex-direction: column; gap: 10px; }
.demo-video .lp-screen-dots { position: absolute; top: 12px; inset-inline-start: 14px; }
.demo-video .lp-slot-play { width: 64px; height: 64px; }
.demo-video .lp-page { background: var(--console-2); border-color: color-mix(in srgb, var(--amber) 60%, transparent); color: var(--amber); }

@media (min-width: 40em) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62.5em) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- How it works: one stop per column on wide screens ---------- */
.how { max-width: 560px; margin: var(--space-5) auto; padding-bottom: 8px; }
.how .section-title { font-size: var(--fs-xl); }
@media (min-width: 56.25em) {
    .how { max-width: none; }
    .how .level-map-steps { --row: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
    .how .map-node { height: auto; padding: 0 !important; }
    .how .map-node::before { display: none; }
    .how .map-stop { height: auto; flex-direction: column; text-align: center; }
    .how .map-label { -webkit-line-clamp: unset; }
}

/* ---------- Call to action band and the channels ---------- */
.cta-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-4) var(--space-5);
    margin: var(--space-6) 0 var(--space-4);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(30rem 12rem at 80% 0%, rgba(32, 184, 166, .35), transparent 70%),
        var(--console);
    color: var(--on-console);
    border: 2px solid rgba(32, 184, 166, .45);
    box-shadow: var(--shadow-2);
    text-align: center;
}
.cta-band > div { flex: 1 1 240px; }
.cta-title { font-size: var(--fs-xl); margin-bottom: 4px; }
.cta-band p { margin: 0; color: var(--on-console-muted); }
@media (min-width: 43.75em) { .cta-band { flex-wrap: nowrap; text-align: start; } }
/* «نزّل التطبيق» for visitors (gone in the installed app, pwa.css). */
.home-app { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin: 0 0 var(--space-5); }
.home-app-icon { flex: none; border-radius: var(--radius-sm); }
.home-app-text { flex: 1 1 200px; min-width: 0; }
.home-app-title { margin: 0 0 2px; font-size: var(--fs-md); }
.home-app-text p { margin: 0; }
.home-app .btn { flex: 1 1 100%; }
@media (min-width: 35em) { .home-app .btn { flex: none; } }
.channels { display: grid; justify-items: center; gap: var(--space-3); margin-bottom: var(--space-4); text-align: center; }
.channels-title { margin: 0; font-size: var(--fs-md); color: var(--text-muted); }
.social-lg a { width: 52px; height: 52px; }

/* ---------- Student home ---------- */
.greet { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.greet .bubble { font-size: 1.15rem; }
.home-grid { display: grid; gap: var(--space-4); }
/* A phone: the two columns are one list, the mission first and the level second (Home.razor). */
.home-main, .home-side { display: contents; }
.home-main > :first-child { order: -2; }
.home-side > .level-card { order: -1; }
.home-soon { display: grid; gap: var(--space-3); align-content: start; }
.home-soon .gr-soon { margin-bottom: 0; }
.mission-card { display: grid; gap: var(--space-3); justify-items: start; padding: 22px 20px; animation: rise .5s var(--ease-out) both; }
.mission-card .btn-block { justify-self: stretch; margin-top: var(--space-2); }
.mission-todo {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: stretch;
    min-height: 44px;
    padding: 6px 12px;
    border: 2px solid var(--accent-edge);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-text);
    font-weight: 500;
    text-decoration: none;
}
.mission-todo span { flex: 1; }
.mission-todo-arrow { flex: none; }
/* The arrow of the todo line nudges once:
   one move toward where the arrow points (the left), 600 ms after the page loads. It never repeats. */
@keyframes todo-nudge { 50% { transform: translateX(-6px); } }
@media (prefers-reduced-motion: no-preference) {
    .mission-todo-arrow { animation: todo-nudge .4s var(--ease-out) .6s; }
}
.mission-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: var(--fs-xl); margin: 0; }
.mission-unit { margin: 0; }
.mission-progress { justify-self: stretch; }
.lesson-number {
    font-family: var(--font-title);
    color: var(--link);
}
.mission-title .lesson-number {
    padding: 0 10px;
    border-radius: 10px;
    background: var(--primary-soft);
    font-size: .8em;
}
.level-card { display: flex; align-items: center; gap: var(--space-4); animation: rise .5s var(--ease-out) .08s both; }
.level-card-body { flex: 1; min-width: 0; }
.level-card-title { font-size: var(--fs-lg); margin: 0; }
.level-card-next { margin: 0 0 var(--space-2); }
.level-card-next .num { color: var(--accent-text); }
.map-card { animation: rise .5s var(--ease-out) .16s both; }
.map-title { display: flex; align-items: center; gap: 8px; }
.map-title .icon { color: var(--link); }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); align-content: start; }
.shortcut { display: flex; align-items: center; gap: 10px; padding: 14px; }
.shortcut b { display: block; font-family: var(--font-title); font-size: 1.05rem; }
.shortcut .muted { font-size: var(--fs-sm); line-height: 1.4; }
.shortcut-icon.amber { color: var(--accent-text); }
.shortcut-icon.turq { color: var(--link); }
/* «مساعد المذاكرة» (Features/Helper), a student's card under the level card. On a phone the columns are one list: it
   comes right after the level card, before the map. */
.home-side > .home-helper { order: -1; }
.home-helper { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.home-helper-avatar { flex: none; display: block; }
.home-helper-text { flex: 1; min-width: 0; }
.home-helper-text b { display: block; font-family: var(--font-title); font-size: 1.1rem; }
.home-helper-text .muted { display: block; font-size: var(--fs-sm); line-height: 1.5; }
.home-helper-arrow { flex: none; color: var(--link); }

@media (min-width: 56.25em) {
    .home-grid { grid-template-columns: 1.25fr 1fr; align-items: start; }
    .home-main, .home-side { display: grid; gap: var(--space-4); align-content: start; }
}

/* «مساعد المذاكرة» for a visitor, between «هنذاكر إزاي؟» and the parent section. */
.helper-showcase { padding: clamp(24px, 4vw, 40px) 0 clamp(40px, 6vw, 64px); }
.helper-showcase-heading { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.helper-showcase-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-pill);
    color: var(--link);
    font-family: var(--font-title);
}
.helper-showcase-heading .section-title { margin: 16px 0 12px; }
.helper-showcase-heading > p { margin: 0; color: var(--text-muted); font-family: var(--font-title); font-size: var(--fs-lg); }
.helper-showcase-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; max-width: 980px; margin: 0 auto; }

/* The three points: an icon on the console disc (as the parent section), a title and one line. */
.helper-points { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.helper-point { display: flex; align-items: center; gap: 14px; }
.helper-point-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    border: 2px solid var(--turquoise);
    border-radius: 50%;
    background: var(--console);
    color: var(--turquoise);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--turquoise) 6%, transparent);
}
.helper-point:nth-child(even) .helper-point-icon { border-color: var(--amber); color: var(--amber); }
.helper-point strong { display: block; margin-bottom: 2px; font: 700 1.1rem/1.5 var(--font-title); }
.helper-point strong + span { display: block; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.7; }

/* The sample chat: the robot's screen, dark in both themes, in the shape of the «هنذاكر إزاي؟» scenes. Not interactive. */
.helper-demo {
    order: -1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--turquoise) 55%, transparent);
    border-radius: 40px 22px 40px 22px;
    background:
        radial-gradient(ellipse at 80% 10%, color-mix(in srgb, var(--turquoise) 14%, transparent), transparent 70%),
        var(--console);
    color: var(--on-console);
    box-shadow: 0 16px 40px -24px var(--turquoise);
}
.helper-demo-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--on-console) 12%, transparent);
}
.helper-demo-head img { flex: none; display: block; }
.helper-demo-head > div { flex: 1; min-width: 0; }
.helper-demo-head strong { display: block; font-family: var(--font-title); line-height: 1.3; }
.helper-demo-head div > span { display: block; font-size: .75rem; color: var(--on-console-muted); }
.helper-demo-example {
    flex: none;
    padding: 2px 10px;
    border: 1px dashed var(--on-console-soft);
    border-radius: var(--radius-pill);
    color: var(--on-console-muted);
    font-size: .7rem;
}
.helper-demo-log { display: flex; flex-direction: column; gap: 14px; padding: 16px 0 4px; }
.helper-demo-q {
    align-self: flex-end;
    max-width: 85%;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--turquoise) 50%, transparent);
    border-radius: var(--radius);
    border-end-end-radius: 6px;
    background: color-mix(in srgb, var(--turquoise) 18%, transparent);
    line-height: 1.7;
}
.helper-demo-a { display: flex; align-items: flex-start; gap: 8px; }
.helper-demo-a > img { flex: none; display: block; }
.helper-demo-card {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--on-console) 16%, transparent);
    border-radius: var(--radius);
    border-start-start-radius: 6px;
    background: color-mix(in srgb, var(--on-console) 6%, transparent);
}
.helper-demo-card p { margin: 0; line-height: 1.8; }
.helper-demo-lesson {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin-top: 10px;
    padding: 4px 12px;
    border: 1px solid color-mix(in srgb, var(--turquoise) 45%, transparent);
    border-radius: var(--radius-pill);
    color: var(--turquoise);
    font-size: var(--fs-xs);
    font-weight: 500;
}
.helper-demo-ai { margin: 12px 0 0; font-size: .75rem; line-height: 1.5; text-align: center; color: var(--on-console-muted); }

.helper-showcase-action { margin-top: 32px; text-align: center; }
.helper-showcase-action .actions { justify-content: center; margin-top: 0; }
.helper-showcase-action p { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.helper-showcase-action p .icon { color: var(--success); }

@media (max-width: 39.9375em) {
    .helper-showcase-heading { margin-bottom: 28px; }
    .helper-showcase-action .btn { width: 100%; }
}
@media (min-width: 56.25em) {
    .helper-showcase-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; }
    .helper-demo { order: initial; padding: 20px; transform: rotate(-1.5deg); }
    .helper-points { gap: 28px; }
    .helper-point-icon { width: 60px; height: 60px; }
}

/* Parent overview: a connected family dashboard, distinct from the grade cards. */
.parent-showcase { display: block; padding: clamp(40px, 6vw, 72px) 0; }
.parent-showcase-heading { text-align: center; max-width: 850px; margin: 0 auto 32px; }
.parent-showcase-tag { display: inline-flex; align-items: center; gap: 10px; padding: 8px 20px; border: 1px solid var(--primary); border-radius: var(--radius-pill); color: var(--primary); font-family: var(--font-title); }
.parent-showcase-heading h2 { font: 700 clamp(1.6rem, 3vw, 2.3rem)/1.6 var(--font-title); margin: 16px 0 8px; }
.parent-showcase-heading h2 > span { color: var(--primary); }
.parent-showcase-heading h2 em { font-style: normal; color: var(--amber); }
.parent-showcase-heading > p { margin: 0; color: var(--text-muted); }
.parent-showcase-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
.parent-connections { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; fill: none; stroke: var(--turquoise); stroke-width: 1.5; stroke-dasharray: 6 7; }
.parent-connections path:nth-child(2) { stroke: var(--amber); }
.parent-feature-list { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; min-width: 0; }
.parent-feature button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 120px; padding: 16px; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); border-radius: 28px; background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 5%, transparent), transparent), var(--surface); color: var(--text); text-align: start; font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.parent-feature button:hover, .parent-feature button[aria-pressed="true"] { border-color: var(--primary); transform: translateY(-3px); }
.parent-feature button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.parent-feature-icon { display: grid; place-items: center; flex-shrink: 0; width: 60px; height: 60px; border: 2px solid var(--turquoise); border-radius: 50%; color: var(--turquoise); background: var(--console); box-shadow: 0 0 0 7px #20b8a609; }
.parent-feature:nth-child(even) .parent-feature-icon { border-color: var(--amber); color: var(--amber); }
.parent-feature strong { display: block; font: 700 1.1rem/1.5 var(--font-title); margin-bottom: 6px; }
.parent-feature strong + span { display: block; font-size: .85rem; line-height: 1.7; color: var(--text-muted); }
.parent-preview-center { position: relative; min-width: 0; max-width: 360px; width: 100%; margin: auto; order: -1; }
.parent-family { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin-bottom: -110px; position: relative; z-index: 1; }
.parent-dashboard-demo { position: relative; z-index: 2; width: 94%; margin-inline: auto; padding: 12px; border: 1px solid var(--turquoise); border-radius: 24px; background: linear-gradient(130deg, #0d2635, var(--navy)); color: var(--on-console); box-shadow: 0 20px 45px #0004; }
.parent-demo-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.parent-demo-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--turquoise); color: var(--navy); }
.parent-demo-avatar { flex-shrink: 0; }
.parent-demo-heading > div { min-width: 0; }
.parent-demo-example { flex-shrink: 0; }
.parent-demo-heading strong { display: block; font-family: var(--font-title); }
.parent-demo-heading div > span { display: block; font-size: .7rem; color: var(--on-console-muted); }
.parent-demo-example { margin-inline-start: auto; font-size: .65rem; color: var(--on-console-muted); }
.parent-demo-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.parent-demo-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 100px; padding: 10px 6px; border: 1px solid #ffffff10; border-radius: 16px; background: #ffffff05; transition: border-color .3s, background .3s; }
.parent-demo-tile.is-highlighted { border-color: var(--turquoise); background: #20b8a61a; }
.parent-demo-tile > span { font-size: .7rem; text-align: center; }
.parent-demo-tile > .icon { color: var(--turquoise); }
.parent-demo-tile small { font-size: .65rem; color: var(--on-console-muted); }
.parent-demo-bar { width: 90%; height: 8px; border-radius: 8px; background: #ffffff15; overflow: hidden; }
.parent-demo-bar > span { display: block; height: 100%; width: 75%; background: var(--turquoise); border-radius: inherit; transform-origin: right; }
.parent-demo-ring { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--turquoise) 85%, #ffffff15 0); }
.parent-demo-ring b { display: grid; place-items: center; width: 46px; height: 46px; border-radius: inherit; background: var(--navy); font-size: .85rem; }
.parent-demo-time { display: flex; gap: 3px; align-items: end; color: var(--turquoise); }
.parent-demo-time i { width: 5px; height: 16px; border-radius: 3px; background: currentColor; }
.parent-demo-time i:nth-child(2) { height: 23px; }
.parent-demo-time i:nth-child(3) { height: 30px; }
.parent-demo-time i:nth-child(4) { height: 38px; }
.parent-demo-time b { color: var(--on-console); font-size: .8rem; margin-inline-start: 6px; }
.parent-demo-rewards { display: flex; gap: 12px; color: var(--amber); }
.parent-demo-caption { margin: 14px 0 0; min-height: 3.4em; font-size: .75rem; line-height: 1.7; color: var(--on-console-muted); }
.parent-showcase-action { text-align: center; margin-top: 32px; }
.parent-showcase-action p { margin: 12px 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
@media (min-width: 56.25em) {
    .parent-showcase-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; }
    .parent-preview-center { order: initial; }
    .parent-connections { display: block; }
    .parent-feature { position: relative; z-index: 1; }
    .parent-feature button { padding: 14px 12px; gap: 12px; min-height: 136px; }
    .parent-feature-icon { width: 48px; height: 48px; }
    .parent-feature-left button { flex-direction: row-reverse; text-align: end; }
    .parent-feature strong { font-size: 1rem; }
    .parent-family { margin-bottom: -90px; }
}
@media (min-width: 40em) and (max-width: 56.1875em) {
    .parent-showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .parent-preview-center { grid-column: 1 / -1; }
}
@keyframes parent-reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (max-width: 39.9375em) {
    .parent-feature-list { gap: 12px; }
    .parent-feature button { min-height: 100px; padding: 14px; gap: 12px; border-radius: 22px; }
    .parent-feature-icon { width: 48px; height: 48px; }
    .parent-feature button > span:last-child { min-width: 0; }
    .parent-demo-heading { flex-wrap: wrap; }
    .parent-demo-heading > div { flex: 1; }
    .parent-demo-example { flex-basis: 100%; text-align: end; }
    .parent-demo-time { flex-wrap: wrap; justify-content: center; }
    .parent-demo-time b { flex-basis: 100%; margin-inline-start: 0; text-align: center; }
    .parent-family { margin-bottom: -80px; }
    .home-plans-action .btn, .parent-showcase-action .btn { width: 100%; }
    .home-faq-item summary { padding: 14px 16px; gap: 12px; }
    .home-faq-answer { padding-inline: 16px; }
    .study-mini-quiz label { min-height: 44px; }
}
@keyframes parent-draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
@keyframes parent-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
    .parent-motion-ready:not(.is-revealed) .parent-feature,
    .parent-motion-ready:not(.is-revealed) .parent-preview-center { opacity: 0; }
    .parent-motion-ready.is-revealed .parent-feature { animation: parent-reveal .7s both; animation-delay: var(--reveal-delay); }
    .parent-motion-ready.is-revealed .parent-preview-center { animation: parent-reveal .9s both; }
    .parent-motion-ready.is-revealed .parent-connections { animation: parent-draw 3s ease-out both; }
    .parent-motion-ready.is-revealed .parent-demo-bar > span { animation: parent-fill 1.5s .5s both; }
}
