/* =========================================================
   EduSphere Home – scoped fixes (icons + responsive)
   ========================================================= */
.edu-home { overflow-x: hidden; }
.edu-home *, .edu-home *::before, .edu-home *::after { box-sizing: border-box; }
.edu-home img { max-width: 100%; display: block; }
.edu-home .container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.edu-home .hero .container { max-width: 1400px; }

/* ---------- SVG helpers ---------- */
.edu-home svg { flex-shrink: 0; }
.edu-home .ico-arrow {
    width: 1.1em; height: 1.1em; margin-left: 8px;
    fill: none; stroke: currentColor; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round;
    transition: transform .25s ease;
}
.edu-home a:hover > .ico-arrow, .edu-home .btn:hover .ico-arrow { transform: translateX(4px); }
.edu-home .ico-star {
    width: 13px; height: 13px; margin-right: 5px;
    fill: currentColor; stroke: currentColor; stroke-width: 1;
    stroke-linejoin: round; vertical-align: -1px;
}

/* ---------- Buttons ---------- */
.edu-home .btn {
    display: inline-flex; align-items: center; justify-content: center;
    white-space: nowrap; text-align: center;
}

/* ---------- Section headings ---------- */
.edu-home .section { padding: 80px 0; }
.edu-home .section-heading { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.edu-home .section-line { width: 70px; height: 4px; border-radius: 4px; margin: 14px auto 0; }
.edu-home .section-description { margin-top: 16px; }

/* ---------- Hero ---------- */
.edu-home .hero { position: relative; overflow: hidden; padding: 76px 0 66px; background: var(--purple); }
.edu-home .hero-grid {
    display: grid; grid-template-columns: 1.1fr .9fr;
    gap: 40px; align-items: center; position: relative; z-index: 2;
}
.edu-home .hero h1 { font-size: clamp(1.4rem, 2.6vw, 2.5rem); line-height: 1.18; white-space: nowrap; }
@media (max-width: 900px) { .edu-home .hero h1 { white-space: normal; } }
.edu-home .hero-description { max-width: 520px; margin-top: 18px; }
.edu-home .hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.edu-home .hero-feature-row {
    display: flex; flex-wrap: wrap; gap: 26px;
    margin-top: 34px; padding-top: 24px; width: 100%;
    border-top: 1px solid rgba(255,255,255,.15);
}
.edu-home .hero-feature-row .feature-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 700; color: #ece3f7;
}
.edu-home .hero-feature-row .feature-icon {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(245,189,50,.16); color: var(--gold);
}
.edu-home .hero-feature-row .feature-icon svg {
    width: 16px; height: 16px; fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Hero visual ---------- */
.edu-home .hero-image {
    position: relative; min-height: 400px;
    display: flex; align-items: center; justify-content: center;
    background: none; clip-path: none; overflow: visible;
}
.edu-home .hero-image img { clip-path: none; }
.edu-home .hero-visual-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 650px; margin: 0 auto;
    background: #fff; border-radius: 24px; padding: 20px;
    box-shadow: 0 30px 60px rgba(10,4,26,.35);
}
.edu-home .hero-image .hero-visual {
    position: relative; inset: auto; z-index: 1;
    width: 100%; height: auto; margin: 0 auto;
    object-fit: contain; object-position: center;
    border-radius: 14px; display: block;
}

/* ---------- Course carousel ---------- */
.edu-home .course-carousel { position: relative; }
.edu-home .course-viewport { overflow: hidden; }
.edu-home .course-track {
    display: flex; flex-wrap: nowrap; gap: 26px;
    transition: transform .5s ease;
}
.edu-home .course-track .course-card {
    flex: 0 0 calc((100% - 52px) / 3);
    min-width: 0;
}
.edu-home .carousel-arrow {
    position: absolute; top: 42%; transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #e8ecf3; color: var(--purple);
    box-shadow: 0 10px 24px rgba(15,35,70,.14); cursor: pointer; z-index: 5;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.edu-home .carousel-arrow:hover { background: var(--purple); color: #fff; box-shadow: 0 14px 30px rgba(15,35,70,.22); }
.edu-home .carousel-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.edu-home .carousel-arrow.prev { left: -23px; }
.edu-home .carousel-arrow.next { right: -23px; }

/* ---------- Course cards ---------- */
.edu-home .course-grid {
    display: grid; gap: 26px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.edu-home .course-card {
    display: flex; flex-direction: column; height: 100%;
    background: var(--light-bg); border: 1px solid #e8ecf3; border-radius: 18px;
    overflow: hidden; box-shadow: 0 8px 26px rgba(15,35,70,.07);
    transition: transform .3s ease, box-shadow .3s ease;
}
.edu-home .course-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,35,70,.14); }
.edu-home .course-image { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eef1f6; }
.edu-home .course-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.edu-home .course-card:hover .course-image img { transform: scale(1.06); }
.edu-home .course-label {
    position: absolute; top: 14px; left: 14px; z-index: 2;
    display: inline-flex; align-items: center;
    padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .3px;
    background: var(--gold); color: var(--purple-dark); box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.edu-home .course-content { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.edu-home .course-category { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.edu-home .course-title {
    margin: 8px 0; font-size: 1.15rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.edu-home .course-description { font-size: .93rem; line-height: 1.6; opacity: .8; margin-bottom: 14px; }
.edu-home .course-meta {
    display: flex; flex-wrap: wrap; gap: 8px 16px;
    font-size: .85rem; padding-top: 14px; margin-top: auto;
    border-top: 1px dashed #dfe5ef;
}
.edu-home .course-meta span { display: inline-flex; align-items: center; gap: 6px; }
.edu-home .course-meta svg {
    width: 15px; height: 15px; fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7;
}
.edu-home .course-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 16px;
}
.edu-home .course-price { font-size: 1.3rem; font-weight: 800; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.edu-home .course-old-price { font-size: .85rem; font-weight: 500; text-decoration: line-through; opacity: .5; }
.edu-home .course-actions .btn { padding: 10px 18px; font-size: .85rem; }
.edu-home .empty-state { grid-column: 1 / -1; text-align: center; padding: 50px 20px; border: 2px dashed #d7deea; border-radius: 18px; }
.edu-home .featured-cta { text-align: center; margin-top: 38px; }

/* ---------- Learning goals ---------- */
.edu-home .learning-goals-section {
    padding: 10px 0 90px;
    background: #fff;
}
.edu-home .featured-section { padding-bottom: 30px; }
.edu-home .goals-heading { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.edu-home .goals-kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--gold-dark); margin-bottom: 12px; }
.edu-home .goals-heading h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.2; color: var(--purple); margin: 0 0 14px; }
.edu-home .goals-heading p { color: var(--muted); line-height: 1.7; margin: 16px 0 0; }
.edu-home .goals-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: stretch; }
.edu-home .goals-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-content: start; }
.edu-home .goal-feature {
    background: var(--light-bg); border: 1px solid var(--border); border-radius: 16px;
    padding: 22px 24px; transition: all .3s ease;
    display: flex; flex-direction: column; min-height: 300px;
}
.edu-home .goal-feature:hover, .edu-home .goal-feature.active {
    border-color: var(--gold); box-shadow: 0 14px 34px rgba(35,15,84,.1); transform: translateY(-2px);
}
.edu-home .goal-feature-title { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.edu-home .goal-feature-title h3 { margin: 0; font-size: 1.1rem; color: var(--purple); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.edu-home .goal-icon {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: linear-gradient(135deg, var(--purple), var(--purple-light));
    box-shadow: 0 8px 18px rgba(35,15,84,.25);
}
.edu-home .goal-feature:nth-child(2) .goal-icon { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); box-shadow: 0 8px 18px rgba(245,189,50,.28); }
.edu-home .goal-feature:nth-child(3) .goal-icon { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); box-shadow: 0 8px 18px rgba(245,189,50,.28); }
.edu-home .goal-feature:nth-child(4) .goal-icon { background: linear-gradient(135deg, var(--purple-light), var(--purple)); box-shadow: 0 8px 18px rgba(35,15,84,.28); }
.edu-home .goal-icon svg, .edu-home .panel-icon svg, .edu-home .panel-bottom-icon svg, .edu-home .progress-emoji svg {
    width: 24px; height: 24px; fill: none; stroke: currentColor;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.edu-home .goal-feature p { margin: 0 0 12px; color: var(--muted); line-height: 1.65; font-size: .95rem; }
.edu-home .goal-feature > a { display: inline-flex; align-items: center; font-weight: 700; font-size: .9rem; color: var(--purple); text-decoration: none; margin-top: auto; }
.edu-home .goal-feature > a:hover { color: var(--gold-dark); }
.edu-home .plan-label {
    font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
    background: #FFF4E5; color: var(--gold-dark); letter-spacing: .3px; white-space: nowrap;
}

.edu-home .learning-panel {
    background: linear-gradient(145deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: #fff; border-radius: 22px; padding: 28px;
    box-shadow: 0 24px 50px rgba(35,15,84,.3);
    border: 1px solid rgba(245,189,50,.2);
    position: sticky; top: 100px;
    overflow: hidden; isolation: isolate;
}
.edu-home .learning-panel::before {
    content: ""; position: absolute; z-index: -1;
    top: -60px; right: -60px; width: 220px; height: 220px;
    border-radius: 50%; background: rgba(245,189,50,.16); filter: blur(10px);
    pointer-events: none;
}
.edu-home .learning-panel > * { position: relative; z-index: 1; }
.edu-home .panel-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.edu-home .panel-label, .edu-home .progress-label { font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: var(--gold); }
.edu-home .panel-top h3 { margin: 8px 0 6px; font-size: 1.5rem; color: #fff; }
.edu-home .panel-top p { margin: 0; color: rgba(255,255,255,.75); }
.edu-home .panel-icon {
    width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); color: var(--gold);
}
.edu-home .panel-icon svg { width: 28px; height: 28px; }
.edu-home .progress-card {
    margin-top: 22px; padding: 22px; border-radius: 16px;
    background: linear-gradient(135deg, #f3e8f7 0%, #f7e9d7 100%);
    border: 1px solid rgba(245,189,50,.4);
    box-shadow: 0 10px 24px rgba(35,15,84,.18);
}
.edu-home .progress-card .progress-label { color: var(--purple); }
.edu-home .progress-card-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.edu-home .progress-card h4 { margin: 8px 0 0; font-size: 1.1rem; color: var(--purple-dark); line-height: 1.4; }
.edu-home .progress-emoji {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff;
}
.edu-home .progress-track { height: 9px; background: rgba(50,16,95,.12); border-radius: 99px; margin: 18px 0; overflow: hidden; }
.edu-home .progress-track span {
    display: block; height: 100%; width: 38%; border-radius: 99px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    animation: eduProgress 2.4s ease-in-out infinite alternate;
}
@keyframes eduProgress { from { width: 30%; } to { width: 62%; } }
.edu-home .progress-note { margin: 0 0 18px; color: var(--muted); line-height: 1.6; font-size: .93rem; }
.edu-home .goals-button {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px; border-radius: 10px; font-weight: 800; font-size: .9rem;
    background: var(--gold); color: var(--purple-dark); text-decoration: none; transition: all .25s ease;
}
.edu-home .goals-button:hover { background: var(--gold-dark); transform: translateY(-2px); }
.edu-home .panel-bottom { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; }
.edu-home .panel-bottom-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); color: var(--gold);
}
.edu-home .panel-bottom strong { display: block; color: #fff; margin-bottom: 4px; }
.edu-home .panel-bottom p { margin: 0; color: rgba(255,255,255,.72); font-size: .9rem; line-height: 1.55; }

/* ---------- Category + Benefit cards ---------- */
.edu-home #categories.categories-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
}
.edu-home #categories .section-kicker { color: var(--gold); }
.edu-home #categories .section-title { color: #fff; }
.edu-home #categories .section-description { color: rgba(255,255,255,.75); }
.edu-home #categories .dot-grid {
    position: absolute;
    width: 110px; height: 110px;
    background-image: radial-gradient(rgba(255,255,255,.35) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    opacity: .9;
    pointer-events: none;
}
.edu-home #categories .dot-grid.top-left { top: 28px; left: 4%; }
.edu-home #categories .dot-grid.bottom-right { bottom: 28px; right: 4%; }
.edu-home #categories .bg-blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(245,189,50,.16);
    filter: blur(6px);
    pointer-events: none;
}
.edu-home #categories .bg-blob.one { width: 150px; height: 150px; bottom: -60px; left: -40px; }
.edu-home #categories .bg-blob.two { width: 90px; height: 90px; top: 20%; right: 2%; }
.edu-home #categories .category-card { box-shadow: 0 14px 34px rgba(10,4,26,.35); }
.edu-home #categories .categories-cta { position: relative; z-index: 1; text-align: center; margin-top: 36px; }

.edu-home .category-grid {
    position: relative; z-index: 1;
    display: grid; gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.edu-home .category-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 30px 22px; background: #fff; border: 1px solid #e8ecf3;
    border-radius: 18px; text-decoration: none; color: inherit;
    box-shadow: 0 8px 24px rgba(35,15,84,.08);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.edu-home .category-card:hover { transform: translateY(-6px); box-shadow: 0 18px 38px rgba(35,15,84,.16); border-color: var(--gold); }
.edu-home .category-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--purple); }
.edu-home .category-card p { margin: 0; font-size: .92rem; line-height: 1.6; opacity: .75; }
.edu-home .category-icon {
    width: 86px; height: 86px; margin: 0 auto 18px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.1rem; line-height: 1; color: var(--purple);
    background: var(--light-bg);
    box-shadow: inset 0 0 0 1px var(--border);
    transition: transform .3s ease, box-shadow .3s ease;
}
.edu-home .category-icon i::before {
    background: linear-gradient(135deg, var(--purple) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.edu-home .category-icon img { width: 100%; height: 100%; object-fit: contain; box-sizing: border-box; padding: 10px; }
.edu-home .category-icon svg {
    width: 32px; height: 32px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.edu-home .category-card:hover .category-icon { transform: translateY(-4px) scale(1.06); box-shadow: inset 0 0 0 1px var(--gold); }
.edu-home #benefits.categories-section { position: relative; overflow: hidden; background: var(--light-bg); }
.edu-home #benefits .section-title { color: var(--purple); }
.edu-home #benefits .dot-grid {
    position: absolute;
    width: 110px; height: 110px;
    background-image: radial-gradient(var(--border) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    opacity: .9;
    pointer-events: none;
}
.edu-home #benefits .dot-grid.top-left { top: 28px; left: 4%; }
.edu-home #benefits .dot-grid.bottom-right { bottom: 28px; right: 4%; }
.edu-home #benefits .bg-blob {
    position: absolute;
    border-radius: 50%;
    background: var(--border);
    opacity: .5;
    filter: blur(2px);
    pointer-events: none;
}
.edu-home #benefits .bg-blob.one { width: 150px; height: 150px; bottom: -60px; left: -40px; }
.edu-home #benefits .bg-blob.two { width: 90px; height: 90px; top: 20%; right: 2%; }
.edu-home #benefits .category-grid { position: relative; z-index: 1; }
.edu-home #benefits .icon-goal    { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.edu-home #benefits .icon-explore { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.edu-home #benefits .icon-pace    { background: linear-gradient(135deg, #f59e0b, #f97316); }
.edu-home #benefits .icon-grow    { background: linear-gradient(135deg, #10b981, #22c55e); }
.edu-home .categories-empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; }
.edu-home #categories .categories-empty { color: #fff; }
.edu-home #categories .categories-empty p { color: rgba(255,255,255,.75); }

/* ---------- About ---------- */
.edu-home .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.edu-home .about-image img { width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; border-radius: 22px; box-shadow: 0 22px 50px rgba(15,35,70,.18); }
.edu-home .about-content h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); line-height: 1.2; margin: 10px 0 16px; }
.edu-home .about-content p { line-height: 1.75; margin-bottom: 14px; }
.edu-home .about-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; margin: 22px 0 28px; }
.edu-home .about-point { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.edu-home .about-point .check {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e7f8ee; color: #16a34a;
}
.edu-home .about-point .check svg {
    width: 14px; height: 14px; fill: none; stroke: currentColor;
    stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- CTA ---------- */
.edu-home .cta-section { padding: 30px 0 80px; }
.edu-home .cta-box {
    display: flex; align-items: center; justify-content: space-between; gap: 28px;
    padding: 44px 48px; border-radius: 24px;
    background: linear-gradient(135deg, #f3e8f7 0%, #f7e9d7 100%);
    border: 1px solid rgba(245,189,50,.4);
    box-shadow: 0 24px 54px rgba(35,15,84,.18);
}
.edu-home .cta-copy h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--purple-dark); line-height: 1.25; }
.edu-home .cta-copy p { margin: 0; color: var(--muted); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .edu-home .section { padding: 64px 0; }
    .edu-home .learning-goals-section { padding: 30px 0 64px; }
    .edu-home .hero { padding: 60px 0; }
    .edu-home .hero-grid, .edu-home .about-grid { gap: 36px; }
    .edu-home .goals-layout { grid-template-columns: 1fr; }
    .edu-home .learning-panel { position: static; }
    .edu-home .course-track .course-card { flex-basis: calc((100% - 26px) / 2); }
}
@media (max-width: 820px) {
    .edu-home .hero-grid, .edu-home .about-grid { grid-template-columns: 1fr; }
    .edu-home .hero-content { text-align: center; align-items: center; }
    .edu-home .hero-description { margin-inline: auto; }
    .edu-home .hero-buttons { justify-content: center; }
    .edu-home .hero-feature-row { justify-content: center; }
    .edu-home .hero-image { order: -1; max-width: 460px; min-height: 0; margin: 0 auto 20px; }
    .edu-home .about-image { max-width: 560px; margin-inline: auto; }
    .edu-home .cta-box { flex-direction: column; text-align: center; padding: 38px 28px; }
}
@media (max-width: 600px) {
    .edu-home .container { padding-inline: 16px; }
    .edu-home .section { padding: 52px 0; }
    .edu-home .learning-goals-section { padding: 24px 0 52px; }
    .edu-home .hero { padding: 44px 0; }
    .edu-home .hero-image { max-width: 320px; }
    .edu-home .section-heading, .edu-home .goals-heading { margin-bottom: 32px; }
    .edu-home .course-grid { grid-template-columns: 1fr; }
    .edu-home .course-track .course-card { flex-basis: 100%; }
    .edu-home .carousel-arrow { display: none; }
    .edu-home .category-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .edu-home .category-card { padding: 22px 14px; }
    .edu-home .category-icon { width: 58px; height: 58px; border-radius: 15px; }
    .edu-home .category-icon svg { width: 28px; height: 28px; }
    .edu-home .about-points { grid-template-columns: 1fr; }
    .edu-home .hero-buttons .btn, .edu-home .about-content .btn, .edu-home .cta-box .btn { width: 100%; }
    .edu-home .learning-panel { padding: 22px 18px; }
    .edu-home .goals-features { grid-template-columns: 1fr; }
    .edu-home .goal-feature { padding: 18px; }
    .edu-home .goal-icon { width: 42px; height: 42px; }
    .edu-home .cta-box { padding: 32px 20px; border-radius: 18px; }
}
@media (max-width: 380px) {
    .edu-home .category-grid { grid-template-columns: 1fr; }
    .edu-home .course-actions { flex-direction: column; align-items: stretch; }
    .edu-home .course-actions .btn { width: 100%; }
}


/* =========================================================

   Course detail — scoped, collision-free (all classes: cd-*)

   ========================================================= */

.cd {

    --cd-purple: var(--purple, #32105f);

    --cd-purple-2: var(--purple-light, #4a2677);

    --cd-dark: var(--purple-dark, #250b49);

    --cd-gold: var(--gold, #f5bd32);

    --cd-gold-d: var(--gold-dark, #d8a017);

    --cd-ink: #211735;

    --cd-text: #4a3e5c;

    --cd-muted: #6f6883;

    --cd-line: #e9e3f0;

    --cd-bg: #f8f5fd;

    --cd-card: #ffffff;

    --cd-green: #059669;

    --cd-sky: #0284c7;

    --cd-amber: #d97706;

    --cd-radius: 16px;

    --cd-shadow: 0 10px 30px rgba(50, 16, 95, .08);

    --cd-side: 380px;

    --cd-gap: 40px;

    --cd-pull: 220px;

    --cd-ease: cubic-bezier(.22, 1, .36, 1);

    background: var(--cd-bg);

    color: var(--cd-ink);

    padding-bottom: 80px;

    overflow-x: clip;

}

.cd *, .cd *::before, .cd *::after { box-sizing: border-box; }

.cd h1, .cd h2, .cd h3, .cd h4, .cd p, .cd ul { margin: 0; padding: 0; }

.cd ul { list-style: none; }

.cd a { color: inherit; text-decoration: none; }

.cd button { font-family: inherit; }

.cd svg { display: inline-block; flex-shrink: 0; width: 1em; height: 1em; vertical-align: middle; }

.cd :focus-visible { outline: 3px solid rgba(245, 189, 50, .8); outline-offset: 2px; border-radius: 6px; }

.cd-container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }

html.cd-lock { overflow: hidden; }



@keyframes cdRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@keyframes cdFadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes cdSpin { to { transform: rotate(360deg); } }

@keyframes cdShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

@keyframes cdPop { 0% { transform: scale(.96); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }



/* ---------- Hero ---------- */

.cd-hero {

    position: relative; overflow: hidden; color: #fff; padding: 44px 0 96px;

    background:

        radial-gradient(700px 380px at 90% 0%, rgba(245, 189, 50, .16), transparent 60%),

        radial-gradient(600px 400px at 0% 100%, rgba(122, 79, 208, .4), transparent 60%),

        linear-gradient(130deg, var(--cd-dark) 0%, var(--cd-purple) 50%, var(--cd-purple-2) 100%);

}

.cd-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .12); pointer-events: none; }

.cd-hero__copy { position: relative; z-index: 1; max-width: calc(100% - var(--cd-side) - var(--cd-gap)); min-width: 0; }

.cd-hero__copy > * { animation: cdRise .7s var(--cd-ease) both; }

.cd-hero__copy > *:nth-child(2) { animation-delay: .06s; }

.cd-hero__copy > *:nth-child(3) { animation-delay: .12s; }

.cd-hero__copy > *:nth-child(4) { animation-delay: .18s; }

.cd-hero__copy > *:nth-child(5) { animation-delay: .24s; }



.cd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 20px; font-size: .84rem; color: rgba(255, 255, 255, .72); }

.cd-crumbs a { color: #fff; opacity: .9; }

.cd-crumbs a:hover { color: var(--cd-gold); opacity: 1; }

.cd-crumbs .sep { opacity: .5; }

.cd-crumbs .current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }



.cd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.cd-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff; }

.cd-badge svg { width: 13px; height: 13px; }

.cd-badge--gold { background: var(--cd-gold); border-color: var(--cd-gold); color: var(--cd-dark); }



.cd-title { font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere; }

.cd-lead { margin-top: 16px; max-width: 680px; font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.7; color: rgba(255, 255, 255, .88); }



.cd-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: .92rem; color: rgba(255, 255, 255, .9); }

.cd-meta li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

.cd-meta svg { width: 17px; height: 17px; color: var(--cd-gold); }

.cd-meta .rate svg { fill: var(--cd-gold); stroke: var(--cd-gold); }

.cd-meta strong { font-weight: 700; }



/* ---------- Body grid ---------- */

.cd-body { padding-top: 40px; }

.cd-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--cd-side); gap: var(--cd-gap); align-items: start; }

.cd-main { min-width: 0; display: grid; gap: 24px; }

.cd-side { min-width: 0; position: sticky; top: 96px; margin-top: calc(var(--cd-pull) * -1); z-index: 5; align-self: start; }
.cd-side--quiz { margin-top: 0; }



.cd-js .cd-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--cd-ease), transform .6s var(--cd-ease); }

.cd-js .cd-reveal.is-in { opacity: 1; transform: none; }



/* ---------- Alerts ---------- */

.cd-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: .94rem; line-height: 1.5; border: 1px solid; animation: cdRise .5s var(--cd-ease) both; }

.cd-alert svg { width: 20px; height: 20px; margin-top: 1px; }

.cd-alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

.cd-alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.cd-alert ul { display: grid; gap: 4px; }



/* ---------- Panels ---------- */

.cd-panel { background: var(--cd-card); border: 1px solid var(--cd-line); border-radius: var(--cd-radius); padding: 28px; box-shadow: var(--cd-shadow); min-width: 0; }

.cd-h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--cd-purple); }

.cd-h2::before { content: ""; width: 5px; height: 1.1em; border-radius: 4px; background: var(--cd-gold); flex-shrink: 0; }



.cd-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }

.cd-checks li { display: flex; align-items: flex-start; gap: 12px; font-size: .95rem; line-height: 1.6; color: var(--cd-text); }

.cd-checks .tick { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #fdf0c9; color: var(--cd-purple); }

.cd-checks .tick svg { width: 12px; height: 12px; stroke-width: 3.2; }

.cd-checks span:last-child { min-width: 0; overflow-wrap: anywhere; }

.cd-checks--single { grid-template-columns: 1fr; }



/* ---------- Curriculum ---------- */

.cd-cur__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 18px; }

.cd-cur__head .cd-h2 { margin: 0; }

.cd-cur__stats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--cd-muted); }

.cd-link-btn { border: 0; background: none; padding: 0; color: var(--cd-purple-2); font-weight: 700; font-size: .88rem; cursor: pointer; }

.cd-link-btn:hover { color: var(--cd-gold-d); text-decoration: underline; }



.cd-sections { display: grid; gap: 12px; }

.cd-sec { border: 1px solid var(--cd-line); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .25s, box-shadow .25s; }

.cd-sec[open] { border-color: #d9cbee; box-shadow: 0 6px 18px rgba(50, 16, 95, .06); }

.cd-sec__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; background: #f6f1fc; color: var(--cd-purple); font-weight: 700; line-height: 1.45; user-select: none; transition: background .2s; }

.cd-sec__head::-webkit-details-marker { display: none; }

.cd-sec__head:hover { background: #f0e8fa; }

.cd-sec__chev { width: 20px; height: 20px; transition: transform .3s var(--cd-ease); color: var(--cd-purple-2); }

.cd-sec[open]:not(.is-closing) .cd-sec__chev { transform: rotate(180deg); }

.cd-sec__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.cd-sec__count { flex-shrink: 0; font-size: .8rem; font-weight: 600; color: var(--cd-muted); white-space: nowrap; }

.cd-sec__body { overflow: hidden; }



.cd-lesson { position: relative; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 18px; border: 0; border-top: 1px solid #f0eaf6; background: #fff; text-align: left; font-size: .94rem; line-height: 1.45; color: var(--cd-text); cursor: pointer; transition: background .2s, color .2s, padding-left .25s var(--cd-ease); }

.cd-lesson::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cd-gold); transform: scaleY(0); transition: transform .25s var(--cd-ease); }

.cd-lesson:hover { background: #fcfaff; color: var(--cd-purple); padding-left: 22px; }

.cd-lesson:hover::before, .cd-lesson.is-active::before { transform: scaleY(1); }

.cd-lesson.is-active { background: #fff8e1; color: var(--cd-purple); }

.cd-lesson__icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cd-purple); color: #fff; transition: transform .25s var(--cd-ease), box-shadow .25s; }

.cd-lesson__icon svg { width: 14px; height: 14px; }

.cd-lesson[data-kind="video"] .cd-lesson__icon svg { margin-left: 2px; }

.cd-lesson[data-kind="document"] .cd-lesson__icon { background: var(--cd-sky); }

.cd-lesson[data-kind="quiz"] .cd-lesson__icon { background: var(--cd-amber); }

.cd-lesson[data-kind="quiz"] .cd-lesson__icon svg { width: 16px; height: 16px; }

.cd-lesson:hover .cd-lesson__icon, .cd-lesson.is-active .cd-lesson__icon { transform: scale(1.1); box-shadow: 0 6px 14px rgba(50, 16, 95, .22); }

.cd-lesson__text { min-width: 0; }

.cd-lesson__title { display: block; font-weight: 600; overflow-wrap: anywhere; }

.cd-lesson__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: .76rem; font-weight: 500; color: var(--cd-muted); }

.cd-lesson__sub span { display: inline-flex; align-items: center; gap: 5px; }

.cd-lesson__sub svg { width: 12px; height: 12px; }

.cd-lesson__time { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--cd-muted); white-space: nowrap; }

.cd-lesson__time svg { width: 13px; height: 13px; }

.cd-lesson--empty { cursor: default; display: block; color: var(--cd-muted); }

.cd-lesson--empty:hover { background: #fff; color: var(--cd-muted); padding-left: 18px; }

.cd-empty { padding: 32px 22px; text-align: center; border: 2px dashed #d9cbee; border-radius: 12px; background: #fcfaff; color: var(--cd-muted); }



/* ---------- About / prose ---------- */

.cd-prose { font-size: 1rem; line-height: 1.85; color: var(--cd-text); overflow-wrap: anywhere; max-width: none; }

.cd-prose > *:first-child { margin-top: 0; }

.cd-prose > *:last-child { margin-bottom: 0; }

.cd-prose p { margin: 0 0 16px; }

.cd-prose h1, .cd-prose h2, .cd-prose h3, .cd-prose h4 { margin: 26px 0 12px; color: var(--cd-purple); line-height: 1.35; font-weight: 800; }

.cd-prose h2 { font-size: 1.35rem; } .cd-prose h3 { font-size: 1.15rem; } .cd-prose h4 { font-size: 1rem; }

.cd-prose ul, .cd-prose ol { margin: 0 0 18px; padding-left: 24px; }

.cd-prose ul { list-style: disc; }

.cd-prose li { margin-bottom: 8px; }

.cd-prose a { color: var(--cd-purple-2); text-decoration: underline; }

.cd-prose img, .cd-prose video, .cd-prose iframe { max-width: 100%; height: auto; border-radius: 10px; }

.cd-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 18px; }

.cd-prose th, .cd-prose td { padding: 10px 14px; border: 1px solid var(--cd-line); }

.cd-prose pre { max-width: 100%; overflow-x: auto; padding: 14px 16px; border-radius: 10px; background: #1e1433; color: #f3ecff; font-size: .9rem; }

.cd-prose blockquote { margin: 0 0 18px; padding: 8px 18px; border-left: 4px solid var(--cd-gold); background: #fdf9ec; border-radius: 0 10px 10px 0; }



/* ---------- Instructor ---------- */

.cd-inst { display: flex; align-items: flex-start; gap: 18px; }

.cd-inst__avatar { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--cd-dark); background: linear-gradient(135deg, var(--cd-gold), #fde68a); box-shadow: 0 8px 18px rgba(216, 160, 23, .3); }

.cd-inst__name { font-size: 1.1rem; font-weight: 800; color: var(--cd-purple); }

.cd-inst__role { font-size: .85rem; color: var(--cd-muted); margin-top: 2px; }

.cd-inst__bio { margin-top: 10px; font-size: .94rem; line-height: 1.75; color: var(--cd-text); }



/* ---------- Screen (preview + modal) ---------- */

.cd-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #150826; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #e6dcf3; text-align: center; padding: 0; }

.cd-screen iframe, .cd-screen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; display: block; }

.cd-screen img { width: 100%; height: 100%; object-fit: cover; }

.cd-screen__note { padding: 20px; font-size: .94rem; }



/* ---------- Purchase card ---------- */

.cd-card { background: #fff; border: 1px solid var(--cd-line); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 54px rgba(37, 11, 73, .2); }

.cd-card__ph { display: grid; place-items: center; gap: 10px; color: #cbb9f0; font-size: .9rem; padding: 20px; }

.cd-card__ph svg { width: 44px; height: 44px; opacity: .8; }

.cd-card__body { padding: 24px; }

.cd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }

.cd-price__now { font-size: 2.1rem; line-height: 1.1; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }

.cd-price__now\.is-free { color: var(--cd-green); }

.cd-price__old { font-size: 1.05rem; color: #a59cb4; text-decoration: line-through; }

.cd-price__off { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .76rem; font-weight: 800; }

.cd-actions { display: grid; gap: 12px; margin-top: 20px; }

.cd-actions form { margin: 0; }



.cd-btn { width: 100%; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 12px; border: 2px solid transparent; font-size: .98rem; font-weight: 800; line-height: 1.2; cursor: pointer; text-align: center; transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease; }

.cd-btn svg { width: 19px; height: 19px; }

.cd-btn:hover { transform: translateY(-2px); }

.cd-btn[disabled] { opacity: .7; cursor: wait; transform: none; }

.cd-btn--gold { background: var(--cd-gold); color: var(--cd-dark); box-shadow: 0 10px 22px rgba(245, 189, 50, .35); }

.cd-btn--gold:hover { background: var(--cd-gold-d); }

.cd-btn--outline { background: #fff; color: var(--cd-purple); border-color: #cdbde6; }

.cd-btn--outline:hover { border-color: var(--cd-purple); background: #f8f5fd; }

.cd-btn--success { background: var(--cd-green); color: #fff; }

.cd-btn--success:hover { background: #047857; }

.cd-btn--sm { width: auto; min-height: 44px; padding: 10px 18px; font-size: .9rem; }



.cd-includes { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--cd-line); }

.cd-includes h4 { font-size: .95rem; font-weight: 800; color: var(--cd-purple); margin-bottom: 14px; }

.cd-includes ul { display: grid; gap: 12px; }

.cd-includes li { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--cd-text); line-height: 1.4; }

.cd-includes li svg { width: 18px; height: 18px; color: var(--cd-gold-d); }

/* ---------- Quiz scores sidebar card ---------- */

.cd-quizscore { background: var(--cd-card); border: 1px solid var(--cd-line); border-radius: var(--cd-radius); box-shadow: var(--cd-shadow); padding: 22px; }
.cd-quizscore__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--cd-line); }
.cd-quizscore__head h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; font-weight: 800; color: var(--cd-purple); }
.cd-quizscore__head h4 svg { width: 18px; height: 18px; color: var(--cd-gold-d); }
.cd-quizscore__total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cd-quizscore__total span { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cd-muted); }
.cd-quizscore__total strong { font-size: 1.3rem; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }
.cd-quizscore__total strong em { font-style: normal; font-size: .9rem; font-weight: 700; color: var(--cd-muted); }
.cd-quizscore__list { display: grid; gap: 10px; }
.cd-quizscore__list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #faf8fd; }
.cd-quizscore__name { font-size: .88rem; font-weight: 700; color: var(--cd-text); overflow-wrap: anywhere; }
.cd-quizscore__score { flex-shrink: 0; font-size: .82rem; font-weight: 800; color: var(--cd-green); padding: 3px 10px; border-radius: 999px; background: #e9f9f2; }
.cd-quizscore__score.is-pending { color: var(--cd-muted); background: #eee7f5; font-weight: 700; }

/* ---------- Mobile buy bar ---------- */

.cd-bar { display: none; }



/* =========================================================

   Lesson popup (modal)

   ========================================================= */

.cd-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }

.cd-modal[hidden] { display: none; }

.cd-modal__backdrop { position: absolute; inset: 0; background: rgba(21, 8, 38, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s ease; }

.cd-modal.is-open .cd-modal__backdrop { opacity: 1; }



.cd-dialog {

    position: relative;

    width: min(900px, 100%);

    max-height: calc(100vh - 80px);

    max-height: calc(100dvh - 80px);

    display: flex;

    flex-direction: column;

    background: #fff;

    border-radius: 22px;

    overflow: hidden;

    outline: none;

    box-shadow: 0 40px 100px rgba(10, 2, 25, .55);

    opacity: 0;

    transform: translateY(28px) scale(.96);

    transition: opacity .3s ease, transform .4s var(--cd-ease);

}

.cd-modal.is-open .cd-dialog { opacity: 1; transform: none; }

.cd-dialog__grip { display: none; }



.cd-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--cd-line); background: #fff; }

.cd-dialog__titles { min-width: 0; }

.cd-dialog__tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cd-gold-d); }

.cd-dialog__title { font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 800; line-height: 1.35; color: var(--cd-purple); overflow-wrap: anywhere; }

.cd-dialog__close { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f3edfa; color: var(--cd-purple); cursor: pointer; transition: background .2s, transform .25s var(--cd-ease); }

.cd-dialog__close:hover { background: #e8dcf7; transform: rotate(90deg); }

.cd-dialog__close svg { width: 18px; height: 18px; }



.cd-dialog__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.cd-dialog .cd-screen { max-height: min(66vh, 640px); }

.cd-screen--card { aspect-ratio: auto; min-height: 260px; max-height: none !important; padding: 36px 20px; background: linear-gradient(135deg, #2a1348, #46247a); }

.cd-doc { display: grid; justify-items: center; gap: 12px; max-width: 460px; animation: cdFadeIn .4s ease both; }

.cd-doc__icon { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }

.cd-doc__icon svg { width: 36px; height: 36px; }

.cd-doc h4 { font-size: 1.1rem; font-weight: 800; color: #fff; }

.cd-doc p { font-size: .92rem; line-height: 1.6; color: rgba(255, 255, 255, .8); overflow-wrap: anywhere; }

.cd-doc__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.cd-doc .cd-btn--outline { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .4); }

.cd-doc .cd-btn--outline:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }

.cd-loader { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--cd-gold); animation: cdSpin .8s linear infinite; }



.cd-dialog__info { padding: 20px; display: grid; gap: 16px; }

.cd-dialog__info:empty { display: none; }

.cd-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.cd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f3edfa; color: var(--cd-purple); font-size: .8rem; font-weight: 700; }

.cd-chip svg { width: 14px; height: 14px; }

.cd-chip--best { background: #fff4d6; color: #8a5a00; }

.cd-dialog__summary h4 { font-size: .95rem; font-weight: 800; color: var(--cd-purple); margin-bottom: 6px; }

.cd-dialog__summary p { font-size: .95rem; line-height: 1.75; color: var(--cd-text); white-space: pre-line; overflow-wrap: anywhere; }



.cd-dialog__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--cd-line); background: #fbf9fe; }

.cd-nav { display: inline-flex; align-items: center; justify-self: start; gap: 8px; max-width: 100%; padding: 10px 16px; border-radius: 10px; border: 1.5px solid #d9cbee; background: #fff; color: var(--cd-purple); font-size: .88rem; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, transform .2s, opacity .2s; }

.cd-nav svg { width: 16px; height: 16px; }

.cd-nav:hover:not([disabled]) { background: #f3edfa; border-color: var(--cd-purple-2); transform: translateY(-1px); }

.cd-nav[disabled] { opacity: .4; cursor: not-allowed; }

.cd-nav--next { justify-self: end; }

.cd-dialog__count { font-size: .8rem; font-weight: 600; color: var(--cd-muted); text-align: center; white-space: nowrap; }

/* Lesson popup layout fix */

.cd-modal .cd-dialog {

    width: min(960px, calc(100vw - 32px));

    height: min(82vh, 760px);

    height: min(82dvh, 760px);

    max-height: calc(100dvh - 32px);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    background: #fff;

    border-radius: 22px;

}



.cd-dialog__head,

.cd-dialog__foot {

    flex-shrink: 0;

}



.cd-dialog__scroll {

    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

}



.cd-dialog .cd-screen {

    position: relative;

    width: 100%;

    height: auto;

    max-height: none;

    aspect-ratio: 16 / 9;

    padding: 0;

    overflow: hidden;

    background: #080808;

}

.cd-dialog .cd-screen--quiz,
.cd-modal .cd-dialog__scroll > .cd-screen--quiz {
    background: linear-gradient(180deg, #fbf9fe, #f4eefb) !important;
    color: var(--cd-ink);
}



.cd-dialog .cd-screen iframe,

.cd-dialog .cd-screen video {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    display: block;

    border: 0;

}



.cd-dialog .cd-dialog__foot {

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 12px;

    padding: 12px 20px;

    background: #fcfaff;

    border-top: 1px solid #eee5f5;

}



.cd-dialog #cdPrev {

    justify-self: start;

}



.cd-dialog #cdNext {

    justify-self: end;

}



.cd-dialog__count {

    text-align: center;

}



@media (max-width: 640px) {

    .cd-modal .cd-dialog {

        width: 100%;

        height: min(85dvh, 760px);

        max-height: 94dvh;

        border-radius: 22px 22px 0 0;

    }



    .cd-dialog .cd-dialog__foot {

        grid-template-columns: 1fr 1fr;

        padding: 12px 16px;

    }



    .cd-dialog .cd-dialog__count {

        grid-column: 1 / -1;

        grid-row: 1;

    }

}

/* =========================================================

   Quiz (inside popup)

   ========================================================= */

.cd-screen--quiz { display: block; aspect-ratio: auto; max-height: none !important; overflow: visible; text-align: left; padding: 24px; color: var(--cd-ink); background: linear-gradient(180deg, #fbf9fe, #f4eefb); }

.cd-quiz { max-width: 760px; margin-inline: auto; }

.cd-quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .82rem; font-weight: 700; color: var(--cd-muted); }

.cd-quiz__score { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--cd-line); color: var(--cd-purple); }

.cd-quiz__bar { height: 8px; border-radius: 99px; background: #e6dcf3; overflow: hidden; margin-bottom: 22px; }

.cd-quiz__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cd-gold), #fde68a); transition: width .55s var(--cd-ease); }

.cd-quiz__q { font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 800; line-height: 1.45; color: var(--cd-purple); margin-bottom: 18px; outline: none; overflow-wrap: anywhere; animation: cdRise .45s var(--cd-ease) both; }

.cd-quiz__opts { display: grid; gap: 12px; }

.cd-opt {

    position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 12px 16px;

    border-radius: 14px; border: 2px solid #e3d9f1; background: #fff; text-align: left; font-size: .98rem; line-height: 1.45; color: var(--cd-text);

    cursor: pointer; animation: cdRise .45s var(--cd-ease) both;

    transition: border-color .2s, background .2s, transform .2s, box-shadow .2s, opacity .25s, color .2s;

}

.cd-opt__key { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: #f3edfa; color: var(--cd-purple); font-weight: 800; font-size: .85rem; transition: background .2s, color .2s; }

.cd-opt__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.cd-opt__mark { width: 24px; height: 24px; flex-shrink: 0; display: none; place-items: center; border-radius: 50%; color: #fff; }

.cd-opt__mark svg { width: 14px; height: 14px; stroke-width: 3.2; }

.cd-opt:hover:not(:disabled) { border-color: var(--cd-purple-2); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(50, 16, 95, .1); }

.cd-opt:hover:not(:disabled) .cd-opt__key { background: var(--cd-purple); color: #fff; }

.cd-opt:disabled { cursor: default; }

.cd-opt.is-picked { border-color: var(--cd-purple-2); background: #f3edfa; }

.cd-opt.is-correct { border-color: #10b981; background: #ecfdf5; color: #065f46; animation: cdPop .4s var(--cd-ease); }

.cd-opt.is-correct .cd-opt__key { background: #10b981; color: #fff; }

.cd-opt.is-correct .cd-opt__mark { display: grid; background: #10b981; }

.cd-opt.is-wrong { border-color: #ef4444; background: #fef2f2; color: #991b1b; animation: cdShake .4s ease; }

.cd-opt.is-wrong .cd-opt__key { background: #ef4444; color: #fff; }

.cd-opt.is-wrong .cd-opt__mark { display: grid; background: #ef4444; }

.cd-opt.is-dim { opacity: .55; }

.cd-quiz__fb { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: .92rem; line-height: 1.6; animation: cdRise .35s var(--cd-ease) both; }

.cd-quiz__fb strong { display: block; margin-bottom: 2px; }

.cd-quiz__fb--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

.cd-quiz__fb--no { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.cd-quiz__fb--neutral { background: #f3edfa; color: var(--cd-purple); border: 1px solid #e3d9f1; }

.cd-quiz__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.cd-quiz__type { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--cd-gold-d); margin-bottom: 10px; }
.cd-opt.is-picked .cd-opt__mark { display: grid; background: var(--cd-purple); }
.cd-result__note { font-size: .85rem; color: var(--cd-muted); margin-top: -6px; }

.cd-quiz__foot .cd-btn { width: auto; min-width: 190px; animation: cdRise .35s var(--cd-ease) both; }

.cd-quiz__empty { display: grid; justify-items: center; gap: 10px; padding: 36px 16px; text-align: center; color: var(--cd-muted); }

.cd-quiz__empty svg { width: 44px; height: 44px; color: var(--cd-amber); }



.cd-result { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 8px 0 4px; animation: cdRise .5s var(--cd-ease) both; }

.cd-ring { position: relative; width: 150px; height: 150px; }

.cd-ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }

.cd-ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }

.cd-ring .track { stroke: #e6dcf3; }

.cd-ring .bar { stroke: var(--cd-gold); stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.1s var(--cd-ease); }

.cd-ring.is-good .bar { stroke: #10b981; }

.cd-ring.is-low .bar { stroke: #f97316; }

.cd-ring__num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }

.cd-result h4 { font-size: 1.35rem; font-weight: 800; color: var(--cd-purple); }

.cd-result p { color: var(--cd-text); font-size: .96rem; }

.cd-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.cd-result__actions .cd-btn { width: auto; }

.cd-review { width: 100%; margin-top: 12px; display: grid; gap: 10px; text-align: left; }

.cd-review__item { padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--cd-line); border-left-width: 4px; font-size: .9rem; line-height: 1.55; animation: cdRise .4s var(--cd-ease) both; }

.cd-review__item.ok { border-left-color: #10b981; }

.cd-review__item.no { border-left-color: #ef4444; }

.cd-review__item strong { display: block; color: var(--cd-purple); margin-bottom: 4px; overflow-wrap: anywhere; }

.cd-review__item span { display: block; overflow-wrap: anywhere; }

.cd-review__item .good { color: #047857; }

.cd-review__item .bad { color: #b91c1c; }



/* =========================================================

   Responsive

   ========================================================= */

@media (min-width: 1500px) {

    .cd-container { max-width: 1360px; }

}

@media (max-width: 1180px) {

    .cd { --cd-side: 350px; --cd-gap: 32px; }

}

@media (max-width: 1023px) {

    .cd { padding-bottom: 104px; }

    .cd-hero { padding: 36px 0 72px; }

    .cd-hero__copy { max-width: none; }

    .cd-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }

    .cd-side { order: -1; position: static; margin-top: -44px; max-width: 640px; width: 100%; margin-inline: auto; }

    .cd-side--quiz { margin-top: 0; }

    .cd-body { padding-top: 0; }

    .cd-card { box-shadow: 0 18px 44px rgba(37, 11, 73, .22); }



    .cd-bar {

        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;

        display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));

        background: rgba(255, 255, 255, .98); border-top: 1px solid var(--cd-line);

        box-shadow: 0 -10px 30px rgba(37, 11, 73, .12);

        transform: translateY(110%); transition: transform .3s ease; visibility: hidden;

    }

    .cd-bar.is-visible { transform: none; visibility: visible; }

    .cd-bar__price { flex: 1; min-width: 0; line-height: 1.2; }

    .cd-bar__price strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }

    .cd-bar__price s { font-size: .8rem; color: #a59cb4; }

    .cd-bar form { margin: 0; }

    .cd-bar .cd-btn { min-height: 46px; width: auto; padding: 10px 18px; font-size: .9rem; }

}

@media (max-width: 767px) {

    .cd-container { padding-inline: 16px; }

    .cd-hero { padding: 28px 0 64px; }

    .cd-crumbs { margin-bottom: 16px; }

    .cd-meta { gap: 10px 16px; font-size: .86rem; margin-top: 20px; }

    .cd-panel { padding: 22px 18px; border-radius: 14px; }

    .cd-checks { grid-template-columns: minmax(0, 1fr); gap: 12px; }

    .cd-main { gap: 20px; }

    .cd-side { margin-top: -36px; }

    .cd-side--quiz { margin-top: 0; }

    .cd-card { border-radius: 16px; }

    .cd-card__body { padding: 20px 18px 22px; }

    .cd-price__now { font-size: 1.85rem; }

    .cd-sec__head { padding: 14px; gap: 10px; }

    .cd-lesson { padding: 12px 14px; gap: 12px; }

    .cd-inst { gap: 14px; }

    .cd-inst__avatar { width: 54px; height: 54px; font-size: 1.3rem; }

}

/* Popup becomes a bottom sheet on phones */

@media (max-width: 640px) {

    .cd-modal { align-items: flex-end; padding: 0; }

    .cd-dialog {

        width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0;

        transform: translateY(100%); opacity: 1; transition: transform .45s var(--cd-ease);

    }

    .cd-modal.is-open .cd-dialog { transform: none; }

    .cd-dialog__grip { display: block; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 4px; background: #d9cbee; flex-shrink: 0; }

    .cd-dialog__head { padding: 12px 16px; }

    .cd-dialog__info { padding: 16px; }

    .cd-dialog__foot { grid-template-columns: 1fr 1fr; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }

    .cd-dialog__count { grid-column: 1 / -1; grid-row: 1; }

    .cd-nav { justify-content: center; justify-self: stretch; }

    .cd-nav--next { justify-self: stretch; }

    .cd-screen--card { min-height: 220px; padding: 28px 16px; }

    .cd-screen--quiz { padding: 18px 16px 22px; }

    .cd-opt { padding: 11px 12px; gap: 12px; min-height: 56px; font-size: .95rem; }

    .cd-quiz__foot .cd-btn { width: 100%; }

    .cd-result__actions .cd-btn { flex: 1 1 100%; }

}

@media (max-width: 480px) {

    .cd-hero { padding-bottom: 60px; }

    .cd-lead { font-size: .98rem; line-height: 1.65; }

    .cd-lesson { grid-template-columns: auto minmax(0, 1fr); }

    .cd-lesson__time { grid-column: 2; margin-top: -6px; }

    .cd-sec__head { flex-wrap: wrap; }

    .cd-sec__count { width: 100%; padding-left: 32px; margin-top: -6px; }

    .cd-bar .cd-btn--outline { display: none; }

    .cd-bar .cd-btn { padding-inline: 22px; }

    .cd-doc__actions .cd-btn { width: 100%; }

    .cd-ring, .cd-ring svg { width: 128px; height: 128px; }

}

/* Landscape phones */

@media (max-height: 520px) and (orientation: landscape) {

    .cd-modal { padding: 0; align-items: stretch; }

    .cd-dialog { width: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0; transform: none; }

    .cd-dialog .cd-screen { max-height: 72vh; }

    .cd-dialog__head { padding: 8px 16px; }

    .cd-dialog__foot { padding: 8px 16px; }

}

@media (prefers-reduced-motion: reduce) {

    .cd *, .cd *::before, .cd *::after { transition: none !important; animation: none !important; }

}



/* =========================================================
   Final lesson modal fix: remove the extra outer scrollbar
   Keep the document/PDF viewer fitted inside the popup.
   ========================================================= */
.cd-modal .cd-dialog {
    height: min(82dvh, 760px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cd-modal .cd-dialog__head,
.cd-modal .cd-dialog__foot {
    flex: 0 0 auto;
}

.cd-modal .cd-dialog__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

.cd-modal .cd-dialog__scroll > .cd-screen {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
}

.cd-modal .cd-dialog__scroll > .cd-screen--quiz {
    flex: 0 0 auto;
    height: auto;
}

.cd-modal .cd-dialog__scroll > .cd-screen--document {
    position: relative;
    width: 100%;
    min-height: 0;
    max-height: none !important;
    aspect-ratio: auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.cd-modal .cd-dialog__scroll > .cd-screen--document iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

.cd-modal .cd-dialog__info {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .cd-modal .cd-dialog {
        height: 85dvh;
        max-height: 94dvh;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .cd-modal .cd-dialog {
        height: 100dvh;
        max-height: 100dvh;
    }
}


/* =========================================================
   Course detail page styles (moved from show.blade.php)
   Scoped to .cd to avoid affecting homepage styles.
   ========================================================= */

/* =========================================================

   Course detail — scoped, collision-free (all classes: cd-*)

   ========================================================= */

.cd {

    --cd-purple: var(--purple, #32105f);

    --cd-purple-2: var(--purple-light, #4a2677);

    --cd-dark: var(--purple-dark, #250b49);

    --cd-gold: var(--gold, #f5bd32);

    --cd-gold-d: var(--gold-dark, #d8a017);

    --cd-ink: #211735;

    --cd-text: #4a3e5c;

    --cd-muted: #6f6883;

    --cd-line: #e9e3f0;

    --cd-bg: #f8f5fd;

    --cd-card: #ffffff;

    --cd-green: #059669;

    --cd-sky: #0284c7;

    --cd-amber: #d97706;

    --cd-radius: 16px;

    --cd-shadow: 0 10px 30px rgba(50, 16, 95, .08);

    --cd-side: 380px;

    --cd-gap: 40px;

    --cd-pull: 220px;

    --cd-ease: cubic-bezier(.22, 1, .36, 1);

    background: var(--cd-bg);

    color: var(--cd-ink);

    padding-bottom: 80px;

    overflow-x: clip;

}

.cd *, .cd *::before, .cd *::after { box-sizing: border-box; }

.cd h1, .cd h2, .cd h3, .cd h4, .cd p, .cd ul { margin: 0; padding: 0; }

.cd ul { list-style: none; }

.cd a { color: inherit; text-decoration: none; }

.cd button { font-family: inherit; }

.cd svg { display: inline-block; flex-shrink: 0; width: 1em; height: 1em; vertical-align: middle; }

.cd :focus-visible { outline: 3px solid rgba(245, 189, 50, .8); outline-offset: 2px; border-radius: 6px; }

.cd-container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }

html.cd-lock { overflow: hidden; }



@keyframes cdRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@keyframes cdFadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes cdSpin { to { transform: rotate(360deg); } }

@keyframes cdShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

@keyframes cdPop { 0% { transform: scale(.96); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }



/* ---------- Hero ---------- */

.cd-hero {

    position: relative; overflow: hidden; color: #fff; padding: 44px 0 96px;

    background:

        radial-gradient(700px 380px at 90% 0%, rgba(245, 189, 50, .16), transparent 60%),

        radial-gradient(600px 400px at 0% 100%, rgba(122, 79, 208, .4), transparent 60%),

        linear-gradient(130deg, var(--cd-dark) 0%, var(--cd-purple) 50%, var(--cd-purple-2) 100%);

}

.cd-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .12); pointer-events: none; }

.cd-hero__copy { position: relative; z-index: 1; max-width: calc(100% - var(--cd-side) - var(--cd-gap)); min-width: 0; }

.cd-hero__copy > * { animation: cdRise .7s var(--cd-ease) both; }

.cd-hero__copy > *:nth-child(2) { animation-delay: .06s; }

.cd-hero__copy > *:nth-child(3) { animation-delay: .12s; }

.cd-hero__copy > *:nth-child(4) { animation-delay: .18s; }

.cd-hero__copy > *:nth-child(5) { animation-delay: .24s; }



.cd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 20px; font-size: .84rem; color: rgba(255, 255, 255, .72); }

.cd-crumbs a { color: #fff; opacity: .9; }

.cd-crumbs a:hover { color: var(--cd-gold); opacity: 1; }

.cd-crumbs .sep { opacity: .5; }

.cd-crumbs .current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }



.cd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.cd-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff; }

.cd-badge svg { width: 13px; height: 13px; }

.cd-badge--gold { background: var(--cd-gold); border-color: var(--cd-gold); color: var(--cd-dark); }



.cd-title { font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere; }

.cd-lead { margin-top: 16px; max-width: 680px; font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.7; color: rgba(255, 255, 255, .88); }



.cd-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: .92rem; color: rgba(255, 255, 255, .9); }

.cd-meta li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

.cd-meta svg { width: 17px; height: 17px; color: var(--cd-gold); }

.cd-meta .rate svg { fill: var(--cd-gold); stroke: var(--cd-gold); }

.cd-meta strong { font-weight: 700; }



/* ---------- Body grid ---------- */

.cd-body { padding-top: 40px; }

.cd-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--cd-side); gap: var(--cd-gap); align-items: start; }

.cd-main { min-width: 0; display: grid; gap: 24px; }

.cd-side { min-width: 0; position: sticky; top: 96px; margin-top: calc(var(--cd-pull) * -1); z-index: 5; align-self: start; }
.cd-side--quiz { margin-top: 0; }



.cd-js .cd-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--cd-ease), transform .6s var(--cd-ease); }

.cd-js .cd-reveal.is-in { opacity: 1; transform: none; }



/* ---------- Alerts ---------- */

.cd-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-size: .94rem; line-height: 1.5; border: 1px solid; animation: cdRise .5s var(--cd-ease) both; }

.cd-alert svg { width: 20px; height: 20px; margin-top: 1px; }

.cd-alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

.cd-alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.cd-alert ul { display: grid; gap: 4px; }



/* ---------- Panels ---------- */

.cd-panel { background: var(--cd-card); border: 1px solid var(--cd-line); border-radius: var(--cd-radius); padding: 28px; box-shadow: var(--cd-shadow); min-width: 0; }

.cd-h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--cd-purple); }

.cd-h2::before { content: ""; width: 5px; height: 1.1em; border-radius: 4px; background: var(--cd-gold); flex-shrink: 0; }



.cd-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }

.cd-checks li { display: flex; align-items: flex-start; gap: 12px; font-size: .95rem; line-height: 1.6; color: var(--cd-text); }

.cd-checks .tick { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #fdf0c9; color: var(--cd-purple); }

.cd-checks .tick svg { width: 12px; height: 12px; stroke-width: 3.2; }

.cd-checks span:last-child { min-width: 0; overflow-wrap: anywhere; }

.cd-checks--single { grid-template-columns: 1fr; }



/* ---------- Curriculum ---------- */

.cd-cur__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 18px; }

.cd-cur__head .cd-h2 { margin: 0; }

.cd-cur__stats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--cd-muted); }

.cd-link-btn { border: 0; background: none; padding: 0; color: var(--cd-purple-2); font-weight: 700; font-size: .88rem; cursor: pointer; }

.cd-link-btn:hover { color: var(--cd-gold-d); text-decoration: underline; }



.cd-sections { display: grid; gap: 12px; }

.cd-sec { border: 1px solid var(--cd-line); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .25s, box-shadow .25s; }

.cd-sec[open] { border-color: #d9cbee; box-shadow: 0 6px 18px rgba(50, 16, 95, .06); }

.cd-sec__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; background: #f6f1fc; color: var(--cd-purple); font-weight: 700; line-height: 1.45; user-select: none; transition: background .2s; }

.cd-sec__head::-webkit-details-marker { display: none; }

.cd-sec__head:hover { background: #f0e8fa; }

.cd-sec__chev { width: 20px; height: 20px; transition: transform .3s var(--cd-ease); color: var(--cd-purple-2); }

.cd-sec[open]:not(.is-closing) .cd-sec__chev { transform: rotate(180deg); }

.cd-sec__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.cd-sec__count { flex-shrink: 0; font-size: .8rem; font-weight: 600; color: var(--cd-muted); white-space: nowrap; }

.cd-sec__body { overflow: hidden; }



.cd-lesson { position: relative; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 18px; border: 0; border-top: 1px solid #f0eaf6; background: #fff; text-align: left; font-size: .94rem; line-height: 1.45; color: var(--cd-text); cursor: pointer; transition: background .2s, color .2s, padding-left .25s var(--cd-ease); }

.cd-lesson::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cd-gold); transform: scaleY(0); transition: transform .25s var(--cd-ease); }

.cd-lesson:hover { background: #fcfaff; color: var(--cd-purple); padding-left: 22px; }

.cd-lesson:hover::before, .cd-lesson.is-active::before { transform: scaleY(1); }

.cd-lesson.is-active { background: #fff8e1; color: var(--cd-purple); }

.cd-lesson__icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cd-purple); color: #fff; transition: transform .25s var(--cd-ease), box-shadow .25s; }

.cd-lesson__icon svg { width: 14px; height: 14px; }

.cd-lesson[data-kind="video"] .cd-lesson__icon svg { margin-left: 2px; }

.cd-lesson[data-kind="document"] .cd-lesson__icon { background: var(--cd-sky); }

.cd-lesson[data-kind="quiz"] .cd-lesson__icon { background: var(--cd-amber); }

.cd-lesson[data-kind="quiz"] .cd-lesson__icon svg { width: 16px; height: 16px; }

.cd-lesson:hover .cd-lesson__icon, .cd-lesson.is-active .cd-lesson__icon { transform: scale(1.1); box-shadow: 0 6px 14px rgba(50, 16, 95, .22); }

.cd-lesson__text { min-width: 0; }

.cd-lesson__title { display: block; font-weight: 600; overflow-wrap: anywhere; }

.cd-lesson__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: .76rem; font-weight: 500; color: var(--cd-muted); }

.cd-lesson__sub span { display: inline-flex; align-items: center; gap: 5px; }

.cd-lesson__sub svg { width: 12px; height: 12px; }

.cd-lesson__time { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--cd-muted); white-space: nowrap; }

.cd-lesson__time svg { width: 13px; height: 13px; }

.cd-lesson--empty { cursor: default; display: block; color: var(--cd-muted); }

.cd-lesson--empty:hover { background: #fff; color: var(--cd-muted); padding-left: 18px; }

.cd-empty { padding: 32px 22px; text-align: center; border: 2px dashed #d9cbee; border-radius: 12px; background: #fcfaff; color: var(--cd-muted); }



/* ---------- About / prose ---------- */

.cd-prose { font-size: 1rem; line-height: 1.85; color: var(--cd-text); overflow-wrap: anywhere; max-width: none; }

.cd-prose > *:first-child { margin-top: 0; }

.cd-prose > *:last-child { margin-bottom: 0; }

.cd-prose p { margin: 0 0 16px; }

.cd-prose h1, .cd-prose h2, .cd-prose h3, .cd-prose h4 { margin: 26px 0 12px; color: var(--cd-purple); line-height: 1.35; font-weight: 800; }

.cd-prose h2 { font-size: 1.35rem; } .cd-prose h3 { font-size: 1.15rem; } .cd-prose h4 { font-size: 1rem; }

.cd-prose ul, .cd-prose ol { margin: 0 0 18px; padding-left: 24px; }

.cd-prose ul { list-style: disc; }

.cd-prose li { margin-bottom: 8px; }

.cd-prose a { color: var(--cd-purple-2); text-decoration: underline; }

.cd-prose img, .cd-prose video, .cd-prose iframe { max-width: 100%; height: auto; border-radius: 10px; }

.cd-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 18px; }

.cd-prose th, .cd-prose td { padding: 10px 14px; border: 1px solid var(--cd-line); }

.cd-prose pre { max-width: 100%; overflow-x: auto; padding: 14px 16px; border-radius: 10px; background: #1e1433; color: #f3ecff; font-size: .9rem; }

.cd-prose blockquote { margin: 0 0 18px; padding: 8px 18px; border-left: 4px solid var(--cd-gold); background: #fdf9ec; border-radius: 0 10px 10px 0; }



/* ---------- Instructor ---------- */

.cd-inst { display: flex; align-items: flex-start; gap: 18px; }

.cd-inst__avatar { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--cd-dark); background: linear-gradient(135deg, var(--cd-gold), #fde68a); box-shadow: 0 8px 18px rgba(216, 160, 23, .3); }

.cd-inst__name { font-size: 1.1rem; font-weight: 800; color: var(--cd-purple); }

.cd-inst__role { font-size: .85rem; color: var(--cd-muted); margin-top: 2px; }

.cd-inst__bio { margin-top: 10px; font-size: .94rem; line-height: 1.75; color: var(--cd-text); }



/* ---------- Screen (preview + modal) ---------- */

.cd-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #150826; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #e6dcf3; text-align: center; padding: 0; }

.cd-screen iframe, .cd-screen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; display: block; }

.cd-screen img { width: 100%; height: 100%; object-fit: cover; }

.cd-screen__note { padding: 20px; font-size: .94rem; }



/* ---------- Purchase card ---------- */

.cd-card { background: #fff; border: 1px solid var(--cd-line); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 54px rgba(37, 11, 73, .2); }

.cd-card__ph { display: grid; place-items: center; gap: 10px; color: #cbb9f0; font-size: .9rem; padding: 20px; }

.cd-card__ph svg { width: 44px; height: 44px; opacity: .8; }

.cd-card__body { padding: 24px; }

.cd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }

.cd-price__now { font-size: 2.1rem; line-height: 1.1; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }

.cd-price__now\.is-free { color: var(--cd-green); }

.cd-price__old { font-size: 1.05rem; color: #a59cb4; text-decoration: line-through; }

.cd-price__off { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .76rem; font-weight: 800; }

.cd-actions { display: grid; gap: 12px; margin-top: 20px; }

.cd-actions form { margin: 0; }



.cd-btn { width: 100%; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 12px; border: 2px solid transparent; font-size: .98rem; font-weight: 800; line-height: 1.2; cursor: pointer; text-align: center; transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease; }

.cd-btn svg { width: 19px; height: 19px; }

.cd-btn:hover { transform: translateY(-2px); }

.cd-btn[disabled] { opacity: .7; cursor: wait; transform: none; }

.cd-btn--gold { background: var(--cd-gold); color: var(--cd-dark); box-shadow: 0 10px 22px rgba(245, 189, 50, .35); }

.cd-btn--gold:hover { background: var(--cd-gold-d); }

.cd-btn--outline { background: #fff; color: var(--cd-purple); border-color: #cdbde6; }

.cd-btn--outline:hover { border-color: var(--cd-purple); background: #f8f5fd; }

.cd-btn--success { background: var(--cd-green); color: #fff; }

.cd-btn--success:hover { background: #047857; }

.cd-btn--sm { width: auto; min-height: 44px; padding: 10px 18px; font-size: .9rem; }



.cd-includes { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--cd-line); }

.cd-includes h4 { font-size: .95rem; font-weight: 800; color: var(--cd-purple); margin-bottom: 14px; }

.cd-includes ul { display: grid; gap: 12px; }

.cd-includes li { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--cd-text); line-height: 1.4; }

.cd-includes li svg { width: 18px; height: 18px; color: var(--cd-gold-d); }

/* ---------- Quiz scores sidebar card ---------- */

.cd-quizscore { background: var(--cd-card); border: 1px solid var(--cd-line); border-radius: var(--cd-radius); box-shadow: var(--cd-shadow); padding: 22px; }
.cd-quizscore__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--cd-line); }
.cd-quizscore__head h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; font-weight: 800; color: var(--cd-purple); }
.cd-quizscore__head h4 svg { width: 18px; height: 18px; color: var(--cd-gold-d); }
.cd-quizscore__total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cd-quizscore__total span { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cd-muted); }
.cd-quizscore__total strong { font-size: 1.3rem; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }
.cd-quizscore__total strong em { font-style: normal; font-size: .9rem; font-weight: 700; color: var(--cd-muted); }
.cd-quizscore__list { display: grid; gap: 10px; }
.cd-quizscore__list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #faf8fd; }
.cd-quizscore__name { font-size: .88rem; font-weight: 700; color: var(--cd-text); overflow-wrap: anywhere; }
.cd-quizscore__score { flex-shrink: 0; font-size: .82rem; font-weight: 800; color: var(--cd-green); padding: 3px 10px; border-radius: 999px; background: #e9f9f2; }
.cd-quizscore__score.is-pending { color: var(--cd-muted); background: #eee7f5; font-weight: 700; }

/* ---------- Mobile buy bar ---------- */

.cd-bar { display: none; }



/* =========================================================

   Lesson popup (modal)

   ========================================================= */

.cd-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }

.cd-modal[hidden] { display: none; }

.cd-modal__backdrop { position: absolute; inset: 0; background: rgba(21, 8, 38, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s ease; }

.cd-modal.is-open .cd-modal__backdrop { opacity: 1; }



.cd-dialog {

    position: relative;

    width: min(900px, 100%);

    max-height: calc(100vh - 80px);

    max-height: calc(100dvh - 80px);

    display: flex;

    flex-direction: column;

    background: #fff;

    border-radius: 22px;

    overflow: hidden;

    outline: none;

    box-shadow: 0 40px 100px rgba(10, 2, 25, .55);

    opacity: 0;

    transform: translateY(28px) scale(.96);

    transition: opacity .3s ease, transform .4s var(--cd-ease);

}

.cd-modal.is-open .cd-dialog { opacity: 1; transform: none; }

.cd-dialog__grip { display: none; }



.cd-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--cd-line); background: #fff; }

.cd-dialog__titles { min-width: 0; }

.cd-dialog__tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cd-gold-d); }

.cd-dialog__title { font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 800; line-height: 1.35; color: var(--cd-purple); overflow-wrap: anywhere; }

.cd-dialog__close { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f3edfa; color: var(--cd-purple); cursor: pointer; transition: background .2s, transform .25s var(--cd-ease); }

.cd-dialog__close:hover { background: #e8dcf7; transform: rotate(90deg); }

.cd-dialog__close svg { width: 18px; height: 18px; }



.cd-dialog__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.cd-dialog .cd-screen { max-height: min(66vh, 640px); }

.cd-screen--card { aspect-ratio: auto; min-height: 260px; max-height: none !important; padding: 36px 20px; background: linear-gradient(135deg, #2a1348, #46247a); }

.cd-doc { display: grid; justify-items: center; gap: 12px; max-width: 460px; animation: cdFadeIn .4s ease both; }

.cd-doc__icon { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }

.cd-doc__icon svg { width: 36px; height: 36px; }

.cd-doc h4 { font-size: 1.1rem; font-weight: 800; color: #fff; }

.cd-doc p { font-size: .92rem; line-height: 1.6; color: rgba(255, 255, 255, .8); overflow-wrap: anywhere; }

.cd-doc__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.cd-doc .cd-btn--outline { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .4); }

.cd-doc .cd-btn--outline:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }

.cd-loader { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--cd-gold); animation: cdSpin .8s linear infinite; }



.cd-dialog__info { padding: 20px; display: grid; gap: 16px; }

.cd-dialog__info:empty { display: none; }

.cd-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.cd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f3edfa; color: var(--cd-purple); font-size: .8rem; font-weight: 700; }

.cd-chip svg { width: 14px; height: 14px; }

.cd-chip--best { background: #fff4d6; color: #8a5a00; }

.cd-dialog__summary h4 { font-size: .95rem; font-weight: 800; color: var(--cd-purple); margin-bottom: 6px; }

.cd-dialog__summary p { font-size: .95rem; line-height: 1.75; color: var(--cd-text); white-space: pre-line; overflow-wrap: anywhere; }



.cd-dialog__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--cd-line); background: #fbf9fe; }

.cd-nav { display: inline-flex; align-items: center; justify-self: start; gap: 8px; max-width: 100%; padding: 10px 16px; border-radius: 10px; border: 1.5px solid #d9cbee; background: #fff; color: var(--cd-purple); font-size: .88rem; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, transform .2s, opacity .2s; }

.cd-nav svg { width: 16px; height: 16px; }

.cd-nav:hover:not([disabled]) { background: #f3edfa; border-color: var(--cd-purple-2); transform: translateY(-1px); }

.cd-nav[disabled] { opacity: .4; cursor: not-allowed; }

.cd-nav--next { justify-self: end; }

.cd-dialog__count { font-size: .8rem; font-weight: 600; color: var(--cd-muted); text-align: center; white-space: nowrap; }

/* Lesson popup layout fix */

.cd-modal .cd-dialog {

    width: min(960px, calc(100vw - 32px));

    height: min(82vh, 760px);

    height: min(82dvh, 760px);

    max-height: calc(100dvh - 32px);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    background: #fff;

    border-radius: 22px;

}



.cd-dialog__head,

.cd-dialog__foot {

    flex-shrink: 0;

}



.cd-dialog__scroll {

    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

}



.cd-dialog .cd-screen {

    position: relative;

    width: 100%;

    height: auto;

    max-height: none;

    aspect-ratio: 16 / 9;

    padding: 0;

    overflow: hidden;

    background: #080808;

}

.cd-dialog .cd-screen--quiz,
.cd-modal .cd-dialog__scroll > .cd-screen--quiz {
    background: linear-gradient(180deg, #fbf9fe, #f4eefb) !important;
    color: var(--cd-ink);
}



.cd-dialog .cd-screen iframe,

.cd-dialog .cd-screen video {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    display: block;

    border: 0;

}



.cd-dialog .cd-dialog__foot {

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 12px;

    padding: 12px 20px;

    background: #fcfaff;

    border-top: 1px solid #eee5f5;

}



.cd-dialog #cdPrev {

    justify-self: start;

}



.cd-dialog #cdNext {

    justify-self: end;

}



.cd-dialog__count {

    text-align: center;

}



@media (max-width: 640px) {

    .cd-modal .cd-dialog {

        width: 100%;

        height: min(85dvh, 760px);

        max-height: 94dvh;

        border-radius: 22px 22px 0 0;

    }



    .cd-dialog .cd-dialog__foot {

        grid-template-columns: 1fr 1fr;

        padding: 12px 16px;

    }



    .cd-dialog .cd-dialog__count {

        grid-column: 1 / -1;

        grid-row: 1;

    }

}

/* =========================================================

   Quiz (inside popup)

   ========================================================= */

.cd-screen--quiz { display: block; aspect-ratio: auto; max-height: none !important; overflow: visible; text-align: left; padding: 24px; color: var(--cd-ink); background: linear-gradient(180deg, #fbf9fe, #f4eefb); }

.cd-quiz { max-width: 760px; margin-inline: auto; }

.cd-quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .82rem; font-weight: 700; color: var(--cd-muted); }

.cd-quiz__score { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--cd-line); color: var(--cd-purple); }

.cd-quiz__bar { height: 8px; border-radius: 99px; background: #e6dcf3; overflow: hidden; margin-bottom: 22px; }

.cd-quiz__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cd-gold), #fde68a); transition: width .55s var(--cd-ease); }

.cd-quiz__q { font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 800; line-height: 1.45; color: var(--cd-purple); margin-bottom: 18px; outline: none; overflow-wrap: anywhere; animation: cdRise .45s var(--cd-ease) both; }

.cd-quiz__opts { display: grid; gap: 12px; }

.cd-opt {

    position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 12px 16px;

    border-radius: 14px; border: 2px solid #e3d9f1; background: #fff; text-align: left; font-size: .98rem; line-height: 1.45; color: var(--cd-text);

    cursor: pointer; animation: cdRise .45s var(--cd-ease) both;

    transition: border-color .2s, background .2s, transform .2s, box-shadow .2s, opacity .25s, color .2s;

}

.cd-opt__key { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: #f3edfa; color: var(--cd-purple); font-weight: 800; font-size: .85rem; transition: background .2s, color .2s; }

.cd-opt__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.cd-opt__mark { width: 24px; height: 24px; flex-shrink: 0; display: none; place-items: center; border-radius: 50%; color: #fff; }

.cd-opt__mark svg { width: 14px; height: 14px; stroke-width: 3.2; }

.cd-opt:hover:not(:disabled) { border-color: var(--cd-purple-2); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(50, 16, 95, .1); }

.cd-opt:hover:not(:disabled) .cd-opt__key { background: var(--cd-purple); color: #fff; }

.cd-opt:disabled { cursor: default; }

.cd-opt.is-picked { border-color: var(--cd-purple-2); background: #f3edfa; }

.cd-opt.is-correct { border-color: #10b981; background: #ecfdf5; color: #065f46; animation: cdPop .4s var(--cd-ease); }

.cd-opt.is-correct .cd-opt__key { background: #10b981; color: #fff; }

.cd-opt.is-correct .cd-opt__mark { display: grid; background: #10b981; }

.cd-opt.is-wrong { border-color: #ef4444; background: #fef2f2; color: #991b1b; animation: cdShake .4s ease; }

.cd-opt.is-wrong .cd-opt__key { background: #ef4444; color: #fff; }

.cd-opt.is-wrong .cd-opt__mark { display: grid; background: #ef4444; }

.cd-opt.is-dim { opacity: .55; }

.cd-quiz__fb { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: .92rem; line-height: 1.6; animation: cdRise .35s var(--cd-ease) both; }

.cd-quiz__fb strong { display: block; margin-bottom: 2px; }

.cd-quiz__fb--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

.cd-quiz__fb--no { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.cd-quiz__fb--neutral { background: #f3edfa; color: var(--cd-purple); border: 1px solid #e3d9f1; }

.cd-quiz__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.cd-quiz__type { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--cd-gold-d); margin-bottom: 10px; }
.cd-opt.is-picked .cd-opt__mark { display: grid; background: var(--cd-purple); }
.cd-result__note { font-size: .85rem; color: var(--cd-muted); margin-top: -6px; }

.cd-quiz__foot .cd-btn { width: auto; min-width: 190px; animation: cdRise .35s var(--cd-ease) both; }

.cd-quiz__empty { display: grid; justify-items: center; gap: 10px; padding: 36px 16px; text-align: center; color: var(--cd-muted); }

.cd-quiz__empty svg { width: 44px; height: 44px; color: var(--cd-amber); }



.cd-result { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 8px 0 4px; animation: cdRise .5s var(--cd-ease) both; }

.cd-ring { position: relative; width: 150px; height: 150px; }

.cd-ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }

.cd-ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }

.cd-ring .track { stroke: #e6dcf3; }

.cd-ring .bar { stroke: var(--cd-gold); stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.1s var(--cd-ease); }

.cd-ring.is-good .bar { stroke: #10b981; }

.cd-ring.is-low .bar { stroke: #f97316; }

.cd-ring__num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }

.cd-result h4 { font-size: 1.35rem; font-weight: 800; color: var(--cd-purple); }

.cd-result p { color: var(--cd-text); font-size: .96rem; }

.cd-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.cd-result__actions .cd-btn { width: auto; }

.cd-review { width: 100%; margin-top: 12px; display: grid; gap: 10px; text-align: left; }

.cd-review__item { padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--cd-line); border-left-width: 4px; font-size: .9rem; line-height: 1.55; animation: cdRise .4s var(--cd-ease) both; }

.cd-review__item.ok { border-left-color: #10b981; }

.cd-review__item.no { border-left-color: #ef4444; }

.cd-review__item strong { display: block; color: var(--cd-purple); margin-bottom: 4px; overflow-wrap: anywhere; }

.cd-review__item span { display: block; overflow-wrap: anywhere; }

.cd-review__item .good { color: #047857; }

.cd-review__item .bad { color: #b91c1c; }



/* =========================================================

   Responsive

   ========================================================= */

@media (min-width: 1500px) {

    .cd-container { max-width: 1360px; }

}

@media (max-width: 1180px) {

    .cd { --cd-side: 350px; --cd-gap: 32px; }

}

@media (max-width: 1023px) {

    .cd { padding-bottom: 104px; }

    .cd-hero { padding: 36px 0 72px; }

    .cd-hero__copy { max-width: none; }

    .cd-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }

    .cd-side { order: -1; position: static; margin-top: -44px; max-width: 640px; width: 100%; margin-inline: auto; }

    .cd-side--quiz { margin-top: 0; }

    .cd-body { padding-top: 0; }

    .cd-card { box-shadow: 0 18px 44px rgba(37, 11, 73, .22); }



    .cd-bar {

        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;

        display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));

        background: rgba(255, 255, 255, .98); border-top: 1px solid var(--cd-line);

        box-shadow: 0 -10px 30px rgba(37, 11, 73, .12);

        transform: translateY(110%); transition: transform .3s ease; visibility: hidden;

    }

    .cd-bar.is-visible { transform: none; visibility: visible; }

    .cd-bar__price { flex: 1; min-width: 0; line-height: 1.2; }

    .cd-bar__price strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--cd-purple); font-family: "Plus Jakarta Sans", sans-serif; }

    .cd-bar__price s { font-size: .8rem; color: #a59cb4; }

    .cd-bar form { margin: 0; }

    .cd-bar .cd-btn { min-height: 46px; width: auto; padding: 10px 18px; font-size: .9rem; }

}

@media (max-width: 767px) {

    .cd-container { padding-inline: 16px; }

    .cd-hero { padding: 28px 0 64px; }

    .cd-crumbs { margin-bottom: 16px; }

    .cd-meta { gap: 10px 16px; font-size: .86rem; margin-top: 20px; }

    .cd-panel { padding: 22px 18px; border-radius: 14px; }

    .cd-checks { grid-template-columns: minmax(0, 1fr); gap: 12px; }

    .cd-main { gap: 20px; }

    .cd-side { margin-top: -36px; }

    .cd-side--quiz { margin-top: 0; }

    .cd-card { border-radius: 16px; }

    .cd-card__body { padding: 20px 18px 22px; }

    .cd-price__now { font-size: 1.85rem; }

    .cd-sec__head { padding: 14px; gap: 10px; }

    .cd-lesson { padding: 12px 14px; gap: 12px; }

    .cd-inst { gap: 14px; }

    .cd-inst__avatar { width: 54px; height: 54px; font-size: 1.3rem; }

}

/* Popup becomes a bottom sheet on phones */

@media (max-width: 640px) {

    .cd-modal { align-items: flex-end; padding: 0; }

    .cd-dialog {

        width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0;

        transform: translateY(100%); opacity: 1; transition: transform .45s var(--cd-ease);

    }

    .cd-modal.is-open .cd-dialog { transform: none; }

    .cd-dialog__grip { display: block; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 4px; background: #d9cbee; flex-shrink: 0; }

    .cd-dialog__head { padding: 12px 16px; }

    .cd-dialog__info { padding: 16px; }

    .cd-dialog__foot { grid-template-columns: 1fr 1fr; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }

    .cd-dialog__count { grid-column: 1 / -1; grid-row: 1; }

    .cd-nav { justify-content: center; justify-self: stretch; }

    .cd-nav--next { justify-self: stretch; }

    .cd-screen--card { min-height: 220px; padding: 28px 16px; }

    .cd-screen--quiz { padding: 18px 16px 22px; }

    .cd-opt { padding: 11px 12px; gap: 12px; min-height: 56px; font-size: .95rem; }

    .cd-quiz__foot .cd-btn { width: 100%; }

    .cd-result__actions .cd-btn { flex: 1 1 100%; }

}

@media (max-width: 480px) {

    .cd-hero { padding-bottom: 60px; }

    .cd-lead { font-size: .98rem; line-height: 1.65; }

    .cd-lesson { grid-template-columns: auto minmax(0, 1fr); }

    .cd-lesson__time { grid-column: 2; margin-top: -6px; }

    .cd-sec__head { flex-wrap: wrap; }

    .cd-sec__count { width: 100%; padding-left: 32px; margin-top: -6px; }

    .cd-bar .cd-btn--outline { display: none; }

    .cd-bar .cd-btn { padding-inline: 22px; }

    .cd-doc__actions .cd-btn { width: 100%; }

    .cd-ring, .cd-ring svg { width: 128px; height: 128px; }

}

/* Landscape phones */

@media (max-height: 520px) and (orientation: landscape) {

    .cd-modal { padding: 0; align-items: stretch; }

    .cd-dialog { width: 100%; max-height: 100vh; max-height: 100dvh; border-radius: 0; transform: none; }

    .cd-dialog .cd-screen { max-height: 72vh; }

    .cd-dialog__head { padding: 8px 16px; }

    .cd-dialog__foot { padding: 8px 16px; }

}

@media (prefers-reduced-motion: reduce) {

    .cd *, .cd *::before, .cd *::after { transition: none !important; animation: none !important; }

}



/* =========================================================
   Final lesson modal fix: remove the extra outer scrollbar
   Keep the document/PDF viewer fitted inside the popup.
   ========================================================= */
.cd-modal .cd-dialog {
    height: min(82dvh, 760px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cd-modal .cd-dialog__head,
.cd-modal .cd-dialog__foot {
    flex: 0 0 auto;
}

.cd-modal .cd-dialog__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

.cd-modal .cd-dialog__scroll > .cd-screen {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
}

.cd-modal .cd-dialog__scroll > .cd-screen--quiz {
    flex: 0 0 auto;
    height: auto;
}

.cd-modal .cd-dialog__scroll > .cd-screen--document {
    position: relative;
    width: 100%;
    min-height: 0;
    max-height: none !important;
    aspect-ratio: auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.cd-modal .cd-dialog__scroll > .cd-screen--document iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

.cd-modal .cd-dialog__info {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .cd-modal .cd-dialog {
        height: 85dvh;
        max-height: 94dvh;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .cd-modal .cd-dialog {
        height: 100dvh;
        max-height: 100dvh;
    }
}
