:root {
    --green: #0e7c4a;
    --green-deep: #0a5c38;
    --red: #d64545;
    --cream: #faf7f1;
    --cream-dark: #f0ebe0;
    --ink: #1a1d21;
    --muted: #64748b;
    --card: #ffffff;
    --border: #eae4d8;
    --shadow-sm: 0 1px 3px rgba(26, 29, 33, .06);
    --shadow-md: 0 12px 30px -14px rgba(15, 60, 40, .22);
    --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Cairo", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Italian flag top strip */
body::before {
    content: "";
    position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 100;
    background: linear-gradient(90deg, #009246 0 33.3%, #f4f4f4 33.3% 66.6%, #ce2b37 66.6%);
}

h1, h2, h3, .serif {
    font-family: "Cairo", sans-serif;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.3;
}

.container { max-width: 1020px; margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(250, 247, 241, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.5rem; }
.brand {
    font-family: "Cairo", sans-serif;
    font-weight: 800; font-size: 1.4rem; color: var(--ink);
    display: flex; align-items: center; gap: .55rem;
}
.brand .flag-dot {
    width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
    background: linear-gradient(90deg, #009246 0 33.3%, #fff 33.3% 66.6%, #ce2b37 66.6%);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.main-nav a {
    margin-inline-start: .4rem; color: var(--ink); font-weight: 600; font-size: .95rem;
    padding: .45rem .9rem; border-radius: 999px; transition: all .18s;
}
.main-nav a:hover { color: var(--green-deep); background: var(--cream-dark); }
.main-nav a.nav-cta { background: var(--green); color: #fff; }
.main-nav a.nav-cta:hover { background: var(--green-deep); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(150deg, #0d6b41 0%, #0a4d2f 60%, #083d26 100%);
    color: #fff;
    border-radius: 28px;
    padding: 4.5rem 2.5rem 3rem;
    margin: 2.2rem 0 0;
    text-align: center;
}
.hero .flag-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 7px;
    background: linear-gradient(90deg, #009246 0 33.3%, #fff 33.3% 66.6%, #ce2b37 66.6%);
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%);
}
.hero::before { width: 420px; height: 420px; top: -180px; right: -120px; }
.hero::after { width: 340px; height: 340px; bottom: -160px; left: -100px; }

.eyebrow {
    display: inline-block;
    text-transform: uppercase; letter-spacing: .2em;
    font-size: .72rem; font-weight: 700;
    color: var(--green);
}
.hero .eyebrow { color: #a8e6c5; }
.hero h1 { margin: .6rem 0 .8rem; font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 600; }
.hero h1 em { font-style: italic; color: #ffd9a8; }
.hero p { margin: 0 auto 2rem; max-width: 38rem; opacity: .92; font-size: 1.08rem; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

.hero-stats {
    display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap;
    margin-top: 2.8rem; padding-top: 1.6rem;
    border-top: 1px solid rgba(255,255,255,.18);
    position: relative; z-index: 1;
}
.hero-stats .stat b { font-family: "Cairo", sans-serif; font-weight: 800; font-size: 1.7rem; display: block; }
.hero-stats .stat span { font-size: .75rem; opacity: .75; text-transform: uppercase; letter-spacing: .09em; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .8rem 1.7rem; border-radius: 999px;
    font-weight: 600; font-size: .95rem; font-family: inherit;
    cursor: pointer; border: 0; transition: all .18s ease;
}
.btn-light { background: #fff; color: var(--green-deep); box-shadow: 0 8px 20px -8px rgba(0,0,0,.35); }
.btn-light:hover { transform: translateY(-2px); }
.btn-outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 18px -8px rgba(14,124,74,.55); }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--green); color: var(--green); }

/* ---------- Sections ---------- */
section { margin: 3.6rem 0; }
.section-head { margin-bottom: 1.6rem; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: .35rem 0 .4rem; font-weight: 600; }
.section-sub { color: var(--muted); max-width: 46rem; margin: 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.1rem; margin: 1.5rem 0; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; } }

.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d8d2c4; }
a.card { color: inherit; display: block; }

.cat-card .icon {
    width: 52px; height: 52px; border-radius: 15px;
    background: var(--cream); display: flex; align-items: center; justify-content: center;
    font-size: 1.55rem; margin-bottom: 1rem;
    transition: transform .25s ease;
}
.cat-card:hover .icon { transform: scale(1.12) rotate(-7deg); }
.cat-card h3 { margin: 0 0 .3rem; font-size: 1.2rem; font-weight: 600; }
.cat-card p { margin: 0 0 .9rem; color: var(--muted); font-size: .9rem; }
.cat-card .arrow {
    position: absolute; inset-inline-end: 1.4rem; bottom: 1.35rem;
    color: var(--green); font-weight: 700; transition: transform .2s;
}
.cat-card:hover .arrow { transform: translateX(-5px); }

.pill {
    display: inline-block; padding: .22rem .75rem; border-radius: 999px;
    background: #e6f4ec; color: var(--green-deep);
    font-size: .76rem; font-weight: 600; letter-spacing: .02em;
}
.pill-red { background: #fdeaea; color: #b32f2f; }

/* ---------- Word table ---------- */
.table-wrap {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.table-wrap-inner { overflow-x: auto; }
.word-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.word-table th {
    background: var(--cream); color: var(--muted);
    text-align: start; padding: .85rem 1.1rem;
    font-size: .75rem; letter-spacing: .03em;
    font-family: "Cairo", sans-serif; font-weight: 700;
}
.word-table td { padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.word-table tbody tr { transition: background .12s; }
.word-table tbody tr:hover { background: #f4faf6; }
.word-table tr:last-child td { border-bottom: 0; }
.word-table .it {
    font-weight: 700; font-size: 1.08rem; color: var(--green-deep);
    white-space: nowrap; direction: ltr;
    font-family: "Fraunces", Georgia, serif;
}
.pron-tag {
    display: inline-block; background: var(--cream); border-radius: 7px;
    padding: .18rem .6rem; font-size: .8rem; color: var(--muted); font-style: italic;
}
.word-table .ex { font-size: .85rem; color: var(--muted); }
.word-table .ex em { color: var(--red); }

.speak-btn {
    border: 0; background: var(--cream); cursor: pointer; font-size: .85rem;
    width: 30px; height: 30px; border-radius: 50%; margin-inline-start: .35rem;
    vertical-align: middle; transition: background .15s, transform .15s;
}
.speak-btn:hover { background: #e2dbc9; transform: scale(1.1); }

/* ---------- Flashcards ---------- */
.flashcard-app { margin: 1.6rem 0; }
.flashcard { perspective: 1400px; height: 250px; cursor: pointer; margin-bottom: 1.1rem; }
.flashcard-inner {
    position: relative; width: 100%; height: 100%;
    transition: transform .55s cubic-bezier(.4,.1,.2,1);
    transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
    position: absolute; inset: 0; backface-visibility: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 22px; padding: 1.5rem; text-align: center;
    font-family: "Cairo", sans-serif; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800;
}
.flashcard-front {
    background: var(--card); color: var(--green-deep);
    border: 1px solid var(--border); box-shadow: var(--shadow-md);
    direction: ltr; font-family: "Fraunces", Georgia, serif;
}
.flashcard-back {
    background: linear-gradient(150deg, #0d6b41, #083d26);
    color: #fff; transform: rotateY(180deg); box-shadow: var(--shadow-md);
}
.flashcard-face small {
    font-family: "Cairo", sans-serif;
    font-size: .9rem; font-weight: 500; opacity: .7; margin-top: .7rem;
}
.flashcard-face .face-label {
    position: absolute; top: 1.1rem; inset-inline-start: 1.3rem;
    font-family: "Cairo", sans-serif; font-size: .72rem; font-weight: 700;
    letter-spacing: .06em; opacity: .55;
}

.fc-controls { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; }
.fc-controls .btn { padding: .55rem 1.2rem; font-size: .88rem; }
.fc-bar { height: 6px; background: var(--cream-dark); border-radius: 999px; overflow: hidden; margin-top: 1rem; }
.fc-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #31a06b); border-radius: 999px; transition: width .3s ease; }
.fc-progress { text-align: center; color: var(--muted); font-size: .8rem; margin-top: .55rem; }

/* ---------- Quiz ---------- */
.quiz-box {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm);
}
.quiz-question { font-family: "Cairo", sans-serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 1.2rem; }
.quiz-question b { color: var(--green-deep); direction: ltr; display: inline-block; font-family: "Fraunces", serif; }
.quiz-options { display: grid; gap: .65rem; }
.quiz-options button {
    display: flex; align-items: center; text-align: start;
    padding: .85rem 1.1rem; border: 1.5px solid var(--border);
    border-radius: 14px; background: #fff; cursor: pointer;
    font-size: 1.05rem; font-family: inherit;
    transition: border-color .15s, background .15s, transform .1s;
}
.quiz-options button:hover { border-color: var(--green); transform: translateX(-3px); }
.quiz-options .opt-letter {
    width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
    background: var(--cream); display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; margin-inline-end: .8rem; color: var(--muted);
}
.quiz-options button.correct { background: #e6f7ec; border-color: var(--green); }
.quiz-options button.correct .opt-letter { background: var(--green); color: #fff; }
.quiz-options button.wrong { background: #fdecec; border-color: var(--red); animation: shake .3s; }
.quiz-options button.wrong .opt-letter { background: var(--red); color: #fff; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.quiz-score { margin-top: 1.1rem; font-weight: 600; color: var(--muted); font-size: .88rem; }
.quiz-score b { color: var(--green-deep); }

/* ---------- PDF ---------- */
.pdf-card { display: flex; gap: 1.2rem; align-items: flex-start; }
.pdf-icon {
    flex: 0 0 62px; height: 78px; border-radius: 10px;
    background: linear-gradient(160deg, #d64545, #b32f2f);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .95rem; letter-spacing: .02em;
    position: relative; box-shadow: 0 6px 14px -6px rgba(180,40,40,.5);
    transition: transform .2s;
}
.pdf-icon::before {
    content: ""; position: absolute; top: 0; right: 0;
    border-style: solid; border-width: 0 14px 14px 0;
    border-color: var(--card) var(--card) rgba(0,0,0,.18) rgba(0,0,0,.18);
    border-radius: 0 10px 0 6px;
}
[dir="rtl"] .pdf-icon::before {
    right: auto; left: 0;
    border-width: 0 0 14px 14px;
    border-color: var(--card) rgba(0,0,0,.18) rgba(0,0,0,.18) var(--card);
    border-radius: 10px 6px 0 10px;
}
.pdf-card:hover .pdf-icon { transform: scale(1.06) rotate(-3deg); }
.pdf-card h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.pdf-card .meta { color: var(--muted); font-size: .87rem; margin: 0 0 .6rem; }
.pdf-download-box {
    display: flex; gap: 1.4rem; align-items: center;
    background: linear-gradient(135deg, #fff, #fdf9f3);
    border: 1.5px dashed #d9c9a8;
    border-radius: var(--radius); padding: 1.6rem; margin: 1.8rem 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .82rem; color: var(--muted); margin-top: 1.6rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green); }

.page-title { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: .6rem 0 .8rem; font-weight: 600; }
.page-intro { color: var(--muted); max-width: 48rem; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 5rem; padding: 3rem 0 2rem;
    background: #0b2318; color: #9db8a8;
}
.site-footer .brand { color: #fff; margin-bottom: .8rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-family: "Inter", sans-serif; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 .9rem; }
.footer-col a { display: block; color: #9db8a8; font-size: .9rem; margin-bottom: .45rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Article / blog ---------- */
.article { max-width: 46rem; margin: 0 auto; }
.article-meta { color: var(--muted); font-size: .88rem; margin-bottom: 1.6rem; }
.article-body { font-size: 1.06rem; line-height: 2.05; }
.article-body h2 {
    font-size: 1.45rem; margin: 2.2rem 0 .7rem; font-weight: 700;
    padding-bottom: .5rem; border-bottom: 2px solid var(--cream);
}
.article-body h2::before { content: "✦ "; color: var(--red); font-size: .85em; }
.article-body p { margin: 0 0 1.1rem; }
.article-body b[dir="ltr"] {
    font-family: "Fraunces", serif; color: var(--green); font-weight: 600;
}
.blog-card .eyebrow { color: var(--red); font-size: .72rem; }

/* ---------- Grammar ---------- */
.gram-num { color: var(--red); font-family: "Fraunces", serif; }
.gram-table {
    width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem;
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 14px rgba(20,60,40,.06); font-size: .95rem;
}
.gram-table th { background: var(--green); color: #fff; padding: .7rem .9rem; font-weight: 700; text-align: right; font-size: .85rem; }
.gram-table td { padding: .65rem .9rem; border-bottom: 1px solid #f2ecdf; }
.gram-table tr:last-child td { border-bottom: none; }
.gram-table tr:hover td { background: #fbf8f1; }
.gram-table td[dir="ltr"] { font-family: "Fraunces", serif; color: var(--green); }

/* Speakable Italian examples (.gsay buttons injected on grammar pages) */
.gsay {
    display: inline; background: none; border: none; padding: 0 .1em;
    font: inherit; color: inherit; cursor: pointer; text-align: inherit;
    border-radius: 4px; transition: background .15s;
}
.gsay:hover { background: #e8f5ee; }
.gsay .gsay-ic {
    font-size: .68em; margin-inline-start: .25em; opacity: .55;
    vertical-align: middle;
}
.gsay:hover .gsay-ic { opacity: 1; }
.gram-nav {
    max-width: 46rem; margin: 2.5rem auto 0; display: flex;
    justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap;
}

/* ---------- Contact + misc ---------- */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { font-weight: 700; font-size: .92rem; display: flex; flex-direction: column; gap: .4rem; }
.contact-form input, .contact-form select, .contact-form textarea {
    font-family: inherit; font-size: .98rem; padding: .75rem .9rem;
    border: 1.5px solid var(--cream); border-radius: 10px; background: #fdfbf6;
    transition: border-color .15s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--green);
}
.top100-num { color: var(--red); font-weight: 800; font-family: "Fraunces", serif; width: 2.4rem; }

/* ---------- Dialogue player ---------- */
.dialog-controls { display: flex; gap: .8rem; align-items: center; margin: 1.4rem 0 .6rem; }
.dialogue {
    max-width: 44rem; margin: 0 auto; padding: 1.4rem 0;
    display: flex; flex-direction: column; gap: .9rem;
}
.dlg-line { display: flex; gap: .7rem; align-items: flex-start; }
.dlg-line.dlg-f { flex-direction: row-reverse; text-align: right; }
.dlg-avatar {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; background: var(--cream);
    border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.dlg-bubble {
    max-width: 78%; padding: .8rem 1.1rem; cursor: pointer;
    border-radius: 18px; transition: transform .15s ease, box-shadow .15s ease;
}
.dlg-bubble:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.dlg-f .dlg-bubble { background: var(--green); color: #fff; border-top-right-radius: 5px; }
.dlg-m .dlg-bubble { background: #fff; border: 1.5px solid var(--cream); border-top-left-radius: 5px; }
.dlg-f .dlg-name { color: #ffe9c9; }
.dlg-m .dlg-name { color: var(--red); }
.dlg-name { font-size: .72rem; font-weight: 700; display: block; margin-bottom: .25rem; letter-spacing: .04em; }
.dlg-it { font-family: "Fraunces", serif; font-size: 1.12rem; font-weight: 600; line-height: 1.45; }
.dlg-f .dlg-it { color: #fff; }
.dlg-play {
    background: rgba(255,255,255,.18); border: none; cursor: pointer;
    border-radius: 50%; width: 30px; height: 30px; font-size: .85rem;
    margin-inline-start: .5rem; vertical-align: middle; transition: transform .15s;
}
.dlg-m .dlg-play { background: var(--cream); }
.dlg-play:hover { transform: scale(1.15); }
.dlg-ar { font-size: .9rem; opacity: .82; margin-top: .3rem; }
.dlg-line.dlg-active .dlg-avatar { animation: dlgPulse 1s ease infinite; }
.dlg-line.dlg-active .dlg-bubble { box-shadow: 0 0 0 3px rgba(206,43,55,.25); }
@keyframes dlgPulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.12);} }

/* ---------- Big quiz ---------- */
.quiz-wrap {
    max-width: 42rem; margin: 1.6rem auto 0; background: #fff;
    border-radius: var(--radius); padding: 2rem;
    border: 1.5px solid var(--cream); box-shadow: 0 10px 40px rgba(20,60,40,.07);
}
.bigquiz .quiz-question { font-family: "Cairo", sans-serif; font-size: 1.25rem; font-weight: 700; margin: .8rem 0 1.1rem; }
.bigquiz-listen {
    display: block; width: 100%; margin: 0 0 .4rem; padding: 1.3rem;
    font-size: 1.6rem; background: var(--green); color: #fff; border: none;
    border-radius: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease;
}
.bigquiz-listen:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,60,40,.25); }
.bigquiz-listen:active { transform: scale(.98); }
.bigquiz-reveal {
    font-family: "Fraunces", serif; font-size: 1.3rem; color: var(--green);
    text-align: center; margin: .9rem 0 .2rem; font-weight: 700; direction: ltr;
}
.bigquiz-result {
    font-size: 3rem; font-weight: 800; color: var(--green); text-align: center;
    font-family: "Fraunces", serif; margin: .6rem 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
    body { overflow-x: hidden; }
    .container { padding: 0 1rem; }

    /* الهيدر: شعار في سطر، وتنقّل قابل للتمرير أفقيا */
    .header-inner { flex-wrap: wrap; gap: .35rem 0; padding: .7rem 1rem .55rem; }
    .brand { font-size: 1.18rem; }
    .brand .flag-dot { width: 22px; height: 22px; border-radius: 7px; }
    .main-nav {
        display: flex; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap;
        width: 100%; padding-bottom: .2rem;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
        mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    }
    .main-nav::-webkit-scrollbar { display: none; }
    .main-nav a { margin-inline-start: 0; margin-inline-end: .3rem; padding: .4rem .8rem; font-size: .86rem; flex: 0 0 auto; }

    /* أقسام ومسافات أخف */
    section { margin: 2.4rem 0; }
    .card { padding: 1.15rem; }
    .cat-card .icon { width: 44px; height: 44px; font-size: 1.3rem; margin-bottom: .7rem; }
    .cat-card h3 { font-size: 1.08rem; }

    /* البطل */
    .hero { padding: 2.6rem 1.15rem 2rem; border-radius: 20px; margin-top: 1.4rem; }
    .hero h1 { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }
    .hero p { font-size: .98rem; margin-bottom: 1.5rem; }
    .hero-actions .btn { padding: .7rem 1.35rem; font-size: .9rem; }
    .hero-stats { gap: 1.1rem 1.6rem; margin-top: 1.9rem; padding-top: 1.2rem; }
    .hero-stats .stat b { font-size: 1.35rem; }
    .hero-stats .stat span { font-size: .68rem; }

    /* الجداول */
    .word-table { min-width: 540px; }
    .word-table th, .word-table td { padding: .6rem .7rem; font-size: .88rem; }
    .word-table .it { font-size: .95rem; }
    .word-table .ex { font-size: .8rem; }
    .conj-table { min-width: 0; }
    .gram-table { font-size: .82rem; }
    .gram-table th, .gram-table td { padding: .5rem .55rem; }
    .pron-tag { font-size: .72rem; padding: .12rem .45rem; }
    .speak-btn { width: 36px; height: 36px; font-size: 1rem; }

    /* البطاقات التعليمية */
    .flashcard { height: 210px; }
    .flashcard-face { font-size: 1.55rem; border-radius: 18px; }
    .fc-controls { gap: .45rem; }
    .fc-controls .btn { padding: .55rem 1rem; font-size: .84rem; }

    /* الاختبارات */
    .quiz-box { padding: 1.3rem; }
    .quiz-wrap { padding: 1.3rem; }
    .quiz-question { font-size: 1.2rem; }
    .quiz-options button { padding: .75rem .9rem; font-size: .95rem; }
    .bigquiz-listen { padding: 1rem; font-size: 1.35rem; }

    /* صناديق التحميل والترويج */
    .pdf-download-box { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.25rem; }
    .pdf-card { gap: .9rem; }
    .pdf-icon { flex-basis: 50px; height: 64px; font-size: .8rem; }

    /* الحوارات */
    .dlg-bubble { max-width: 88%; padding: .7rem .9rem; }
    .dlg-avatar { width: 36px; height: 36px; font-size: 1.1rem; }
    .dlg-it { font-size: 1rem; }
    .dialog-controls { flex-wrap: wrap; }

    /* المقالات */
    .article-body { font-size: 1rem; line-height: 1.95; }
    .article-body h2 { font-size: 1.25rem; }

    /* الفوتر */
    .site-footer { padding: 2.2rem 0 1.6rem; margin-top: 3.5rem; }
    .footer-grid { gap: 1.6rem; }
    .footer-col { min-width: 45%; }

    /* متفرقات */
    .page-title { font-size: clamp(1.7rem, 7vw, 2.2rem); }
    .page-intro { font-size: .95rem; }
    .breadcrumb { font-size: .76rem; margin-top: 1.1rem; }
    .top100-num { width: 1.8rem; }
    .contact-form input, .contact-form select, .contact-form textarea { font-size: 16px; } /* يمنع تكبير iOS */
}
