/* yasserlengliz.tn — shared design system.
   Components are prefixed .yl- so they also render correctly on the admin
   pages that still load Bootstrap/Tailwind. Base element styles only apply
   under body.yl (the rebuilt public pages). */

:root {
    --yl-navy: #14324a;
    --yl-navy-2: #1d4563;
    --yl-brand: #376581;
    --yl-brand-ink: #24506c;
    --yl-chalk: #f4b740;
    --yl-ink: #15232e;
    --yl-text: #3a4a56;
    --yl-muted: #6b7a86;
    --yl-line: #e2e8ec;
    --yl-soft: #eef3f6;
    --yl-bg: #f6f8fa;
    --yl-card: #ffffff;
    --yl-math: #2563a8;
    --yl-math-bg: #e8f0fa;
    --yl-svt: #2d7a4f;
    --yl-svt-bg: #e6f3eb;
    --yl-lab: #a45d12;
    --yl-lab-bg: #fbf0e1;
    --yl-exam: #8a3b52;
    --yl-exam-bg: #f7e9ee;
    --yl-radius: 18px;
    --yl-head-h: 68px;
    --yl-tab-h: 64px;
    --yl-font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* ---------- base (public pages) ---------- */
body.yl {
    margin: 0;
    background: var(--yl-bg);
    color: var(--yl-ink);
    font-family: var(--yl-font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
/* :where() keeps these at zero specificity so component rules always win */
:where(body.yl) *, :where(body.yl) *::before, :where(body.yl) *::after { box-sizing: border-box; }
:where(body.yl) img { max-width: 100%; }
:where(body.yl) :where(h1, h2, h3, h4) { font-family: var(--yl-font); color: var(--yl-ink); line-height: 1.35; margin: 0; }
:where(body.yl) p { margin: 0; }
:where(body.yl) a { color: inherit; text-decoration: none; }
:where(body.yl) button { font-family: inherit; }
body.yl [hidden] { display: none !important; }
body.yl :focus-visible { outline: 3px solid var(--yl-chalk); outline-offset: 2px; border-radius: 6px; }

.yl-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .yl-wrap { padding: 0 16px; } }
.yl-main { min-height: 50vh; }
.yl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.yl-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--yl-navy);
    color: #fff;
    font-family: var(--yl-font);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.yl-header * { box-sizing: border-box; }
.yl-header-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: var(--yl-head-h); display: flex; align-items: center; gap: 20px; }
.yl-brand { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; flex: none; }
.yl-brand img { width: 58px; height: 34px; object-fit: contain; }
.yl-brand b { display: block; font-size: 1.02rem; font-weight: 800; line-height: 1.2; color: #fff; }
.yl-brand small { display: block; font-size: .74rem; color: #a9bfcf; line-height: 1.3; }

.yl-menu { display: flex; align-items: center; gap: 2px; margin-inline-start: 8px; flex: 1; }
.yl-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 13px; border-radius: 10px; border: 0; background: transparent;
    color: #d6e2ea !important; font: 600 .95rem/1.4 var(--yl-font); text-decoration: none !important;
    cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.yl-link:hover, .yl-dd.open > .yl-link { background: rgba(255, 255, 255, .08); color: #fff !important; }
.yl-link.is-active { color: #fff !important; background: rgba(255, 255, 255, .1); box-shadow: inset 0 -2px 0 var(--yl-chalk); }
.yl-link svg { width: 14px; height: 14px; transition: transform .2s; }
.yl-dd { position: relative; }
.yl-dd.open > .yl-link svg { transform: rotate(180deg); }
.yl-dd-panel {
    position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 220px;
    background: #fff; color: var(--yl-ink); border-radius: 14px; padding: 6px;
    box-shadow: 0 12px 32px rgba(10, 30, 45, .18), 0 0 0 1px rgba(10, 30, 45, .06);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility 0s linear .15s;
}
.yl-dd.open .yl-dd-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.yl-dd-panel a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px; border-radius: 9px; color: var(--yl-ink) !important; text-decoration: none !important;
    font: 600 .93rem/1.4 var(--yl-font);
}
.yl-dd-panel a:hover { background: var(--yl-soft); }
.yl-dd-panel a small { color: var(--yl-muted); font-weight: 400; font-size: .8rem; }

.yl-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.yl-btn-login, .yl-account {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
    font: 700 .9rem/1 var(--yl-font); text-decoration: none !important; white-space: nowrap;
}
.yl-btn-login { background: var(--yl-chalk); color: #1d1606 !important; }
.yl-btn-login:hover { background: #f7c45f; }
.yl-account { background: rgba(255, 255, 255, .08); color: #fff !important; border: 1px solid rgba(255, 255, 255, .14); }
.yl-account:hover { background: rgba(255, 255, 255, .14); }
.yl-account .av { width: 26px; height: 26px; border-radius: 50%; background: var(--yl-chalk); color: #1d1606; display: grid; place-items: center; font-size: .8rem; }
.yl-account .lbl { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.yl-burger { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.yl-burger svg { width: 22px; height: 22px; }

@media (max-width: 1020px) {
    .yl-menu { display: none; }
    .yl-burger { display: inline-flex; }
}
@media (max-width: 600px) {
    :root { --yl-head-h: 60px; }
    .yl-header-in { padding: 0 14px; gap: 10px; }
    .yl-brand img { width: 48px; height: 28px; }
    .yl-brand small { display: none; }
    .yl-account .lbl { display: none; }
    .yl-account { padding: 0 8px; }
    .yl-btn-login { padding: 0 12px; }
}

/* ---------- mobile drawer ---------- */
.yl-drawer { position: fixed; inset: 0; z-index: 1100; font-family: var(--yl-font); }
.yl-drawer * { box-sizing: border-box; }
.yl-drawer-bg { position: absolute; inset: 0; background: rgba(8, 22, 33, .5); opacity: 0; transition: opacity .25s; }
.yl-drawer-panel {
    position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(330px, 88vw);
    background: #fff; color: var(--yl-ink); display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    padding-bottom: env(safe-area-inset-bottom);
}
.yl-drawer.open .yl-drawer-bg { opacity: 1; }
.yl-drawer.open .yl-drawer-panel { transform: none; }
.yl-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--yl-navy); color: #fff; }
.yl-drawer-head b { font-weight: 800; }
.yl-drawer-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.yl-drawer-close svg { width: 20px; height: 20px; }
.yl-drawer-body { overflow-y: auto; padding: 12px; flex: 1; }
.yl-drawer-body > a, .yl-acc > summary {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
    font: 700 1rem/1.4 var(--yl-font); color: var(--yl-ink) !important; text-decoration: none !important; cursor: pointer; list-style: none;
}
.yl-acc > summary::-webkit-details-marker { display: none; }
.yl-drawer-body > a:hover, .yl-acc > summary:hover { background: var(--yl-soft); }
.yl-drawer-body > a.is-active { background: var(--yl-soft); }
.yl-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.yl-ico svg { width: 20px; height: 20px; }
.yl-acc > summary .chev { margin-inline-start: auto; width: 16px; height: 16px; color: var(--yl-muted); transition: transform .2s; }
.yl-acc[open] > summary .chev { transform: rotate(180deg); }
.yl-acc-links { display: grid; gap: 2px; padding: 0 12px 8px 0; margin-inline-start: 48px; }
.yl-acc-links a { padding: 9px 12px; border-radius: 10px; color: var(--yl-text) !important; text-decoration: none !important; font: 600 .94rem/1.4 var(--yl-font); }
.yl-acc-links a:hover { background: var(--yl-soft); }
.yl-drawer-foot { padding: 12px 16px 16px; border-top: 1px solid var(--yl-line); display: grid; gap: 8px; }
.yl-drawer-foot a { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 12px; font: 700 .95rem/1 var(--yl-font); text-decoration: none !important; }
.yl-drawer-foot .primary { background: var(--yl-navy); color: #fff !important; }
.yl-drawer-foot .ghost { border: 1px solid var(--yl-line); color: var(--yl-text) !important; }
body.yl-lock { overflow: hidden; }

/* subject colour chips used across nav, cards, lists */
.c-math { background: var(--yl-math-bg); color: var(--yl-math); }
.c-svt { background: var(--yl-svt-bg); color: var(--yl-svt); }
.c-lab { background: var(--yl-lab-bg); color: var(--yl-lab); }
.c-exam { background: var(--yl-exam-bg); color: var(--yl-exam); }
.c-home { background: var(--yl-soft); color: var(--yl-brand-ink); }

/* ---------- bottom tab bar (phones) ---------- */
.yl-tabbar { display: none; }
@media (max-width: 760px) {
    .yl-tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 990;
        height: calc(var(--yl-tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, .97); border-top: 1px solid var(--yl-line);
        box-shadow: 0 -4px 16px rgba(10, 30, 45, .06); font-family: var(--yl-font);
        backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
    }
    .yl-tabbar a {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        color: var(--yl-muted) !important; text-decoration: none !important; font: 700 .72rem/1.1 var(--yl-font);
        position: relative;
    }
    .yl-tabbar a svg { width: 23px; height: 23px; }
    .yl-tabbar a.is-active { color: var(--yl-navy) !important; }
    .yl-tabbar a.is-active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--yl-chalk); }
    .yl-footer { padding-bottom: calc(var(--yl-tab-h) + env(safe-area-inset-bottom)); }
}

/* ---------- buttons ---------- */
.yl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 22px; border-radius: 12px; border: 0; cursor: pointer;
    font: 700 1rem/1 var(--yl-font); text-decoration: none !important; transition: background .15s, transform .15s, border-color .15s;
}
.yl-btn:active { transform: translateY(1px); }
.yl-btn svg { width: 18px; height: 18px; }
.yl-btn-primary { background: var(--yl-navy); color: #fff !important; }
.yl-btn-primary:hover { background: var(--yl-navy-2); }
.yl-btn-chalk { background: var(--yl-chalk); color: #1d1606 !important; }
.yl-btn-chalk:hover { background: #f7c45f; }
.yl-btn-ghost { background: #fff; color: var(--yl-ink) !important; border: 1px solid var(--yl-line); }
.yl-btn-ghost:hover { border-color: #c5d0d8; }
.yl-btn-sm { height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.yl-btn-block { width: 100%; }

/* ---------- page header (inner pages) ---------- */
.yl-pagehead { background: var(--yl-navy); color: #fff; padding: 26px 0 30px; }
.yl-pagehead h1 { color: #fff; font-size: clamp(1.6rem, 4.4vw, 2.4rem); font-weight: 800; }
.yl-pagehead p { color: #b9cbd8; margin-top: 6px; max-width: 46rem; }
.yl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .85rem; color: #9fb5c5; }
.yl-crumbs li + li::before { content: '‹'; margin-inline-end: 6px; color: #6f8ba0; }
.yl-crumbs a { color: #cfdde7 !important; }
.yl-crumbs a:hover { color: #fff !important; }
.yl-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.yl-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: #dbe6ee; background: rgba(255, 255, 255, .08); border-radius: 8px; padding: 4px 10px; }
.yl-meta svg { width: 15px; height: 15px; opacity: .8; }

/* ---------- cards & sections ---------- */
.yl-section { padding: 48px 0; }
.yl-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.yl-section-head h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); font-weight: 800; }
.yl-section-head p { color: var(--yl-muted); margin-top: 2px; }
.yl-more { color: var(--yl-brand-ink) !important; font-weight: 700; font-size: .93rem; display: inline-flex; align-items: center; gap: 4px; }
.yl-more svg { width: 16px; height: 16px; }
.yl-card { background: var(--yl-card); border: 1px solid var(--yl-line); border-radius: var(--yl-radius); }

/* ---------- home ---------- */
.yl-hero { background: var(--yl-navy); color: #fff; overflow: hidden; }
.yl-hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 56px; }
.yl-hero h1 { color: #fff; font-size: clamp(2rem, 5.4vw, 3.3rem); font-weight: 800; line-height: 1.25; }
.yl-hero h1 em { font-style: normal; color: var(--yl-chalk); }
.yl-hero p { color: #c3d3de; font-size: 1.1rem; margin-top: 14px; max-width: 34rem; }
.yl-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.yl-hero-cta .yl-btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .25); }
.yl-hero-cta .yl-btn-ghost:hover { border-color: rgba(255, 255, 255, .5); }
.yl-hero-stats { display: flex; gap: 28px; margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); }
.yl-hero-stats b { display: block; font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1.2; }
.yl-hero-stats span { font-size: .85rem; color: #9fb5c5; }
.yl-hero-img { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 11; background: #0d2436; }
.yl-hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: block; }
.yl-hero-note { position: absolute; inset-inline-start: 14px; bottom: 14px; background: #fff; color: var(--yl-ink); border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: calc(100% - 28px); }
.yl-hero-note .yl-ico { width: 34px; height: 34px; }
.yl-hero-note b { display: block; font-size: .92rem; line-height: 1.3; }
.yl-hero-note small { color: var(--yl-muted); font-size: .78rem; }
@media (max-width: 900px) {
    .yl-hero-in { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; padding-bottom: 32px; }
    .yl-hero-img { aspect-ratio: 16 / 9; order: -1; }
    .yl-hero p { font-size: 1rem; }
}
@media (max-width: 600px) {
    .yl-hero-cta .yl-btn { flex: 1 1 140px; }
    .yl-hero-stats { gap: 18px; justify-content: space-between; }
    .yl-hero-stats b { font-size: 1.35rem; }
    .yl-hero-note { display: none; }
    .yl-hero-img { border-radius: 16px; }
    .yl-section { padding: 34px 0; }
}

.yl-subjects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1020px) { .yl-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .yl-subjects { grid-template-columns: 1fr; gap: 12px; } }
.yl-subject { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.yl-subject:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(10, 30, 45, .08); }
.yl-subject-top { display: flex; align-items: center; gap: 12px; padding: 18px 18px 0; }
.yl-subject-top .yl-ico { width: 46px; height: 46px; border-radius: 13px; }
.yl-subject-top .yl-ico svg { width: 24px; height: 24px; }
.yl-subject h3 { font-size: 1.15rem; font-weight: 800; }
.yl-subject-top small { display: block; color: var(--yl-muted); font-size: .85rem; }
.yl-subject > p { color: var(--yl-text); font-size: .93rem; padding: 12px 18px 0; }
.yl-terms { display: flex; gap: 6px; padding: 16px 18px 18px; margin-top: auto; }
.yl-terms a { flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--yl-soft); color: var(--yl-ink) !important; font-weight: 700; font-size: .88rem; transition: background .15s, color .15s; }
.yl-terms a:hover { background: var(--yl-navy); color: #fff !important; }
.yl-subject .yl-go { margin: auto 18px 18px; margin-top: 16px; }
@media (max-width: 520px) {
    .yl-subject > p { display: none; }
    .yl-subject-top { padding: 14px 14px 0; }
    .yl-terms { padding: 12px 14px 14px; }
    .yl-subject .yl-go { margin: 12px 14px 14px; }
}

/* lesson list rows (home latest + term pages) */
.yl-lessons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .yl-lessons { grid-template-columns: 1fr; gap: 10px; } }
.yl-lesson { display: flex; align-items: center; gap: 14px; padding: 12px; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.yl-lesson:hover { border-color: #c5d3dd; box-shadow: 0 6px 18px rgba(10, 30, 45, .06); }
.yl-thumb { width: 84px; height: 64px; flex: none; border-radius: 12px; overflow: hidden; background: var(--yl-soft); display: grid; place-items: center; color: var(--yl-muted); position: relative; }
.yl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yl-thumb svg { width: 26px; height: 26px; }
.yl-thumb.pdf { background: #fdecea; color: #c0392b; }
.yl-thumb.video { background: #e9eef8; color: var(--yl-math); }
.yl-thumb .pages { position: absolute; bottom: 4px; inset-inline-start: 4px; background: rgba(15, 30, 40, .75); color: #fff; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.yl-lesson-body { min-width: 0; flex: 1; }
.yl-lesson-body b { display: block; font-size: 1rem; font-weight: 700; color: var(--yl-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yl-lesson-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: .82rem; color: var(--yl-muted); }
.yl-lesson-meta span { display: inline-flex; align-items: center; gap: 4px; }
.yl-lesson-meta svg { width: 14px; height: 14px; }
.yl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.yl-lesson-arrow { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--yl-soft); color: var(--yl-ink); }
.yl-lesson-arrow svg { width: 16px; height: 16px; }
@media (max-width: 420px) {
    .yl-thumb { width: 64px; height: 54px; }
    .yl-lesson { gap: 12px; padding: 10px; }
    .yl-lesson-arrow { display: none; }
}

.yl-about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; padding: 22px; }
.yl-about img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; }
.yl-about h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); font-weight: 800; }
.yl-about p { color: var(--yl-text); margin-top: 10px; }
.yl-about ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.yl-about li { display: flex; gap: 10px; align-items: flex-start; color: var(--yl-text); }
.yl-about li svg { width: 20px; height: 20px; flex: none; color: var(--yl-svt); margin-top: 3px; }
@media (max-width: 820px) { .yl-about { grid-template-columns: 1fr; gap: 18px; padding: 16px; } }

/* ---------- term page ---------- */
.yl-termtabs { display: flex; gap: 6px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.yl-termtabs::-webkit-scrollbar { display: none; }
.yl-termtabs a { flex: none; padding: 8px 16px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #dbe6ee !important; font-weight: 700; font-size: .92rem; }
.yl-termtabs a:hover { background: rgba(255, 255, 255, .14); }
.yl-termtabs a.is-active { background: #fff; color: var(--yl-navy) !important; }
.yl-module { margin-top: 28px; }
.yl-module:first-child { margin-top: 0; }
.yl-module-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.yl-module-head h2 { font-size: 1.2rem; font-weight: 800; }
.yl-module-head span { color: var(--yl-muted); font-size: .88rem; }
.yl-empty { text-align: center; padding: 40px 20px; }
.yl-empty .yl-ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; }
.yl-empty .yl-ico svg { width: 28px; height: 28px; }
.yl-empty h2 { font-size: 1.2rem; font-weight: 800; }
.yl-empty p { color: var(--yl-muted); margin-top: 6px; }
.yl-empty .yl-btn { margin-top: 18px; }

/* ---------- forms ---------- */
.yl-field { display: grid; gap: 6px; position: relative; }
.yl-field label { font-weight: 700; font-size: .93rem; color: var(--yl-ink); }
.yl-input {
    width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid #d3dce2; background: #fff;
    font: 500 1rem/1 var(--yl-font); color: var(--yl-ink); transition: border-color .15s, box-shadow .15s;
}
.yl-input:focus { outline: none; border-color: var(--yl-brand); box-shadow: 0 0 0 3px rgba(55, 101, 129, .18); }
.yl-input::placeholder { color: #9aa8b2; }

/* ---------- tables ---------- */
.yl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--yl-radius); border: 1px solid var(--yl-line); background: #fff; }
.yl-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.yl-table th, .yl-table td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--yl-line); white-space: nowrap; }
.yl-table th { background: var(--yl-soft); color: var(--yl-text); font-weight: 700; font-size: .88rem; position: sticky; top: 0; }
.yl-table tbody tr:last-child td { border-bottom: 0; }
.yl-table tbody tr:hover { background: #fafcfd; }
.yl-table .sticky-col { position: sticky; inset-inline-start: 0; background: #fff; font-weight: 800; z-index: 1; }
.yl-table th.sticky-col { background: var(--yl-soft); z-index: 2; }

/* ---------- prose ---------- */
.yl-prose { padding: 28px; color: var(--yl-text); line-height: 1.95; }
.yl-prose h2 { font-size: 1.15rem; font-weight: 800; margin: 26px 0 8px; color: var(--yl-ink); }
.yl-prose h2:first-child { margin-top: 0; }
.yl-prose p { margin: 0 0 12px; }
@media (max-width: 600px) { .yl-prose { padding: 18px; font-size: .97rem; } }

/* ---------- footer ---------- */
.yl-footer { background: #0f2638; color: #a9bfcf; font-family: var(--yl-font); margin-top: 56px; }
.yl-footer * { box-sizing: border-box; }
.yl-footer-in { max-width: 1180px; margin: 0 auto; padding: 44px 20px 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.yl-footer h4 { color: #fff; font: 800 1rem/1.4 var(--yl-font); margin: 0 0 12px; }
.yl-footer p { margin: 0; font-size: .93rem; line-height: 1.8; }
.yl-footer a { color: #cddbe5 !important; text-decoration: none !important; }
.yl-footer a:hover { color: #fff !important; }
.yl-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; }
.yl-footer li { display: flex; align-items: center; gap: 8px; }
.yl-footer li svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.yl-footer-brand img { width: 74px; height: 42px; object-fit: contain; margin-bottom: 10px; }
.yl-social { display: flex; gap: 8px; margin-top: 14px; }
.yl-social a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); display: grid; place-items: center; }
.yl-social a:hover { background: rgba(255, 255, 255, .08); }
.yl-social svg { width: 18px; height: 18px; }
.yl-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.yl-footer-bottom > div { max-width: 1180px; margin: 0 auto; padding: 16px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .85rem; color: #7f97a8; }
@media (max-width: 900px) { .yl-footer-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) {
    .yl-footer { margin-top: 40px; }
    .yl-footer-in { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding: 32px 16px 20px; }
    .yl-footer-brand { grid-column: 1 / -1; }
    .yl-footer-contact { grid-column: 1 / -1; }
}

/* ---------- entrance animation ---------- */
@keyframes yl-rise { from { opacity: 0; transform: translateY(10px); } }
.yl-rise { animation: yl-rise .5s ease both; }
@media (prefers-reduced-motion: reduce) {
    .yl-rise, .yl-subject, .yl-drawer-panel, .yl-dd-panel { animation: none !important; transition: none !important; }
}

/* subject-coloured thumbnails (must come after .yl-thumb) */
.yl-thumb.c-math { background: var(--yl-math-bg); color: var(--yl-math); }
.yl-thumb.c-svt { background: var(--yl-svt-bg); color: var(--yl-svt); }
.yl-thumb.c-lab { background: var(--yl-lab-bg); color: var(--yl-lab); }

/* light-on-navy text, pinned so no base rule can darken it */
body.yl .yl-hero h1, body.yl .yl-pagehead h1, .yl-footer h4 { color: #fff; }
body.yl .yl-hero h1 em { color: var(--yl-chalk); }
body.yl .yl-hero p { color: #c3d3de; }
body.yl .yl-pagehead p { color: #b9cbd8; }
