:root{
    --navy:#06285f;
    --darknavy:#03183b;
    --blue:#0d6efd;
    --teal:#00a7b5;
    --green:#16a34a;
    --red:#dc2626;
    --gold:#d6a549;
    --orange:#ff7a1a;
    --purple:#6f42c1;
    --light:#f5f9ff;
    --white:#ffffff;
    --text:#13233f;
    --muted:#5d6b82;
    --border:#dfe8f5;
    --softborder:#eef3fb;
    --shadow:0 14px 35px rgba(3,24,59,.10);
    --smallshadow:0 8px 24px rgba(3,24,59,.06);
    --radius:22px;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:var(--light);
    color:var(--text);
    line-height:1.65;
    padding-top:66px;
    user-select:none;
    -webkit-user-select:none;
    -moz-user-select:none;
    -ms-user-select:none;
}

a{
    text-decoration:none;
    color:inherit;
}

img{
    max-width:100%;
    pointer-events:none;
    -webkit-user-drag:none;
}

.container{
    width:94%;
    max-width:1240px;
    margin:auto;
}

/* ================= FIXED COURSE HEADER ================= */

.course-header,
.aicpe-course-header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(14px);
    border-bottom:1px solid var(--border);
    box-shadow:0 8px 24px rgba(3,24,59,.08);
    z-index:9999;
}

.course-header-inner,
.aicpe-course-header-inner{
    width:94%;
    max-width:1240px;
    margin:auto;
    min-height:66px;
    display:grid;
    grid-template-columns:1.05fr 1.15fr 1.35fr;
    align-items:center;
    gap:16px;
}

.brand,
.aicpe-learning-brand{
    display:flex;
    align-items:center;
    gap:11px;
    min-width:0;
}

.brand-mark{
    width:42px;
    height:42px;
    border-radius:15px;
    background:linear-gradient(135deg,var(--blue),var(--navy));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    box-shadow:0 10px 22px rgba(13,110,253,.22);
    flex:0 0 42px;
}

.brand-text{
    display:flex;
    flex-direction:column;
    line-height:1.15;
    min-width:0;
}

.brand-text strong{
    font-size:19px;
    font-weight:900;
    color:var(--navy);
    white-space:nowrap;
}

.brand-text span{
    font-size:12px;
    font-weight:800;
    color:var(--teal);
    margin-top:4px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.topic-info,
.course-topic-info{
    border-left:1px solid var(--border);
    padding-left:16px;
    min-width:0;
}

.chapter-label{
    display:inline-flex;
    background:#e7f7f7;
    color:var(--teal);
    padding:4px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:900;
    margin-bottom:4px;
}

.topic-title{
    color:var(--text);
    font-size:16px;
    font-weight:900;
    line-height:1.2;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.topic-links,
.topic-nav-links{
    display:flex;
    justify-content:flex-end;
    gap:9px;
    min-width:0;
}

.topic-btn,
.topic-nav-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    border:1px solid #d6e8ff;
    background:#f1f7ff;
    color:var(--navy);
    padding:8px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
    max-width:210px;
    transition:.25s;
}

.topic-btn span,
.topic-nav-btn span{
    display:flex;
    flex-direction:column;
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.topic-btn small,
.topic-nav-btn small{
    color:var(--muted);
    font-size:10px;
    font-weight:800;
    margin-bottom:2px;
}

.topic-btn:hover,
.topic-nav-btn:hover{
    background:var(--navy);
    color:#fff;
}

.topic-btn:hover small,
.topic-nav-btn:hover small{
    color:#d9eaff;
}

/* ================= BUTTONS ================= */

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:11px 18px;
    border-radius:999px;
    border:none;
    font-weight:900;
    cursor:pointer;
    transition:.25s;
    font-size:14px;
}

.btn-primary{
    background:linear-gradient(135deg,var(--blue),var(--navy));
    color:#fff;
}

.btn-primary:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 25px rgba(13,110,253,.25);
}

.btn-light{
    background:#eef7ff;
    color:var(--navy);
}

.btn-gold{
    background:linear-gradient(135deg,var(--gold),#f5c15d);
    color:var(--navy);
}

.btn-red{
    background:#fee2e2;
    color:#991b1b;
}

.btn-green{
    background:#dcfce7;
    color:#166534;
}

/* ================= HERO ================= */

.hero,
.course-hero,
.html-index-hero{
    background:
        radial-gradient(circle at top right, rgba(255,122,26,.28), transparent 34%),
        radial-gradient(circle at bottom left, rgba(0,167,181,.25), transparent 30%),
        linear-gradient(135deg,var(--navy),var(--darknavy));
    color:#fff;
    padding:68px 0;
    position:relative;
    overflow:hidden;
}

.hero::before,
.course-hero::before,
.html-index-hero::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size:42px 42px;
    opacity:.45;
}

.hero-inner,
.course-hero-inner,
.html-index-hero-inner{
    position:relative;
    z-index:1;
    display:grid;
    grid-template-columns:1.12fr .88fr;
    gap:36px;
    align-items:center;
}

.badge,
.course-badge,
.gurukul-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:rgba(255,255,255,.13);
    border:1px solid rgba(255,255,255,.22);
    padding:8px 14px;
    border-radius:999px;
    font-size:13px;
    font-weight:900;
    color:#e2fbff;
    margin-bottom:18px;
}

.hero h1,
.course-hero h1,
.html-index-hero h1{
    font-size:50px;
    line-height:1.07;
    margin-bottom:16px;
    color:#fff;
}

.hero h1 span,
.course-hero h1 span,
.html-index-hero h1 span{
    color:#f5c15d;
}

.hero p,
.course-hero p,
.html-index-hero p{
    color:#d9eaff;
    font-size:18px;
    max-width:780px;
    margin-bottom:24px;
}

.hero-actions,
.gurukul-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

.overview-strip,
.course-overview-strip{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin-top:26px;
}

.overview-pill{
    background:rgba(255,255,255,.1);
    border:1px solid rgba(255,255,255,.16);
    border-radius:18px;
    padding:16px;
    text-align:center;
}

.overview-pill strong{
    display:block;
    color:#f5c15d;
    font-size:24px;
}

.overview-pill span{
    color:#e6f1ff;
    font-size:13px;
}

.hero-panel,
.html-hero-panel,
.course-hero-card{
    background:rgba(255,255,255,.1);
    border:1px solid rgba(255,255,255,.22);
    border-radius:28px;
    padding:22px;
    box-shadow:var(--shadow);
}

.skill-stack{
    display:grid;
    gap:12px;
}

.skill-item{
    background:#fff;
    color:var(--text);
    border-radius:20px;
    padding:18px;
    display:flex;
    gap:14px;
    align-items:flex-start;
}

.skill-item i{
    width:44px;
    height:44px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    flex:0 0 44px;
    font-size:20px;
}

.skill-item h3{
    color:var(--navy);
    font-size:18px;
    margin-bottom:4px;
}

.skill-item p{
    color:var(--muted);
    font-size:14px;
    margin:0;
}

/* ================= QUICK NAV ================= */

.quick-nav{
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:14px 0;
    position:sticky;
    top:66px;
    z-index:80;
}

.quick-nav-inner{
    display:flex;
    gap:10px;
    overflow-x:auto;
}

.quick-nav a{
    flex:0 0 auto;
    background:#f1f7ff;
    color:var(--navy);
    padding:9px 14px;
    border-radius:999px;
    font-size:13px;
    font-weight:900;
    border:1px solid #d6e8ff;
}

.quick-nav a:hover{
    background:var(--navy);
    color:#fff;
}

/* ================= COMMON SECTIONS ================= */

section{
    padding:58px 0;
}

.section-white{
    background:#fff;
}

.section-soft{
    background:#f8fbff;
}

.section-title{
    text-align:center;
    margin-bottom:34px;
}

.section-title .tag,
.tag{
    display:inline-flex;
    background:#e7f7f7;
    color:var(--teal);
    padding:7px 14px;
    border-radius:999px;
    font-size:13px;
    font-weight:900;
    margin-bottom:12px;
}

.section-title h2{
    color:var(--navy);
    font-size:34px;
    line-height:1.18;
    margin-bottom:10px;
}

.section-title p{
    color:var(--muted);
    max-width:850px;
    margin:auto;
}

/* ================= GRIDS & CARDS ================= */

.grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
}

.grid-3{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
}

.grid-4{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}

.card,
.note-card,
.lesson-box{
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:26px;
    box-shadow:0 12px 30px rgba(3,24,59,.08);
}

.card h3,
.note-card h3,
.lesson-box h3{
    color:var(--navy);
    font-size:22px;
    margin-bottom:12px;
}

.card p,
.note-card p,
.lesson-box p{
    color:var(--muted);
    margin-bottom:12px;
}

.lesson-box{
    margin-bottom:24px;
}

.lesson-box h2{
    color:var(--navy);
    font-size:30px;
    margin-bottom:14px;
}

.lesson-number{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--teal),var(--blue));
    color:#fff;
    width:42px;
    height:42px;
    border-radius:50%;
    font-weight:900;
    margin-right:10px;
}

/* ================= ICONS ================= */

.icon-title{
    display:flex;
    gap:12px;
    align-items:center;
    margin-bottom:13px;
}

.icon{
    width:48px;
    height:48px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:22px;
    flex:0 0 48px;
}

.icon.orange{background:var(--orange);}
.icon.blue{background:var(--blue);}
.icon.green{background:var(--green);}
.icon.teal{background:var(--teal);}
.icon.gold{background:var(--gold);}
.icon.purple{background:var(--purple);}
.icon.red{background:var(--red);}
.icon.navy{background:var(--navy);}

/* ================= INFO BOXES ================= */

.important-box,
.warning-box,
.definition-box,
.example-box,
.practice-box,
.shortcut-box{
    border-radius:20px;
    padding:22px;
    margin:22px 0;
}

.important-box{
    background:#fff7e8;
    border:1px solid #ffd69b;
    color:#7c4a00;
    display:flex;
    gap:14px;
}

.important-box i{
    font-size:26px;
    color:#f5a400;
}

.warning-box{
    background:#fff1f2;
    border:1px solid #fecdd3;
    color:#881337;
}

.definition-box{
    background:#eef7ff;
    border-left:5px solid var(--blue);
    color:#24344f;
}

.example-box{
    background:#f0fdf4;
    border:1px solid #bbf7d0;
    border-left:5px solid var(--green);
    color:#14532d;
}

.practice-box{
    background:#faf5ff;
    border:1px solid #e9d5ff;
    border-left:5px solid var(--purple);
    color:#4c1d95;
}

.shortcut-box{
    background:#ecfeff;
    border:1px solid #a5f3fc;
    border-left:5px solid var(--teal);
    color:#164e63;
}

/* ================= LISTS ================= */

.list{
    list-style:none;
    display:grid;
    gap:10px;
}

.list li{
    display:flex;
    gap:10px;
    font-size:15px;
    color:#24344f;
}

.list li::before{
    content:"✓";
    color:var(--teal);
    font-weight:900;
}

.dot-list{
    list-style:none;
    display:grid;
    gap:10px;
}

.dot-list li{
    position:relative;
    padding-left:20px;
    color:#24344f;
}

.dot-list li::before{
    content:"•";
    position:absolute;
    left:0;
    color:var(--blue);
    font-size:24px;
    line-height:18px;
}

.number-list{
    counter-reset:item;
    list-style:none;
    display:grid;
    gap:12px;
}

.number-list li{
    counter-increment:item;
    background:#f8fbff;
    border:1px solid var(--softborder);
    border-radius:14px;
    padding:14px 14px 14px 52px;
    position:relative;
    color:#24344f;
}

.number-list li::before{
    content:counter(item);
    position:absolute;
    left:14px;
    top:12px;
    width:26px;
    height:26px;
    border-radius:50%;
    background:var(--blue);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
    font-weight:900;
}

/* ================= INTERACTIVE BLOCKS ================= */

.interactive-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:16px;
}

.interactive-box{
    background:#fff;
    border:1px solid var(--border);
    border-radius:22px;
    padding:20px;
    box-shadow:var(--smallshadow);
    text-align:center;
}

.interactive-box i{
    width:52px;
    height:52px;
    border-radius:18px;
    background:linear-gradient(135deg,var(--blue),var(--teal));
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    margin-bottom:12px;
}

.interactive-box h3{
    color:var(--navy);
    font-size:17px;
    margin-bottom:7px;
}

.interactive-box p{
    color:var(--muted);
    font-size:14px;
}

/* ================= FILTER BAR ================= */

.filter-bar,
.course-filter-bar{
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    padding:18px;
    box-shadow:var(--smallshadow);
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    margin-bottom:24px;
}

.filter-bar input,
.course-filter-bar input{
    flex:1;
    min-width:240px;
    border:1px solid var(--border);
    border-radius:999px;
    padding:13px 16px;
    font-size:14px;
    outline:none;
}

.filter-bar input:focus,
.course-filter-bar input:focus{
    border-color:var(--blue);
    box-shadow:0 0 0 4px rgba(13,110,253,.08);
}

.filter-tags{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.filter-tag{
    border:none;
    border-radius:999px;
    padding:10px 13px;
    font-weight:900;
    font-size:12px;
    background:#f1f7ff;
    color:var(--navy);
    cursor:pointer;
}

.filter-tag.active,
.filter-tag:hover{
    background:var(--navy);
    color:#fff;
}

/* ================= CHAPTER CARDS ================= */

.chapter-card{
    position:relative;
    overflow:hidden;
    transition:.25s;
}

.chapter-card:hover{
    transform:translateY(-4px);
    box-shadow:0 18px 38px rgba(3,24,59,.12);
}

.chapter-card::after{
    content:"";
    position:absolute;
    width:120px;
    height:120px;
    right:-44px;
    top:-44px;
    border-radius:50%;
    background:rgba(13,110,253,.08);
}

.chapter-top{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    margin-bottom:14px;
    position:relative;
    z-index:1;
}

.chapter-icon{
    width:54px;
    height:54px;
    border-radius:18px;
    background:linear-gradient(135deg,var(--orange),var(--gold));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    flex:0 0 54px;
}

.chapter-badge{
    background:#e7f7f7;
    color:var(--teal);
    border-radius:999px;
    padding:6px 10px;
    font-size:11px;
    font-weight:900;
    white-space:nowrap;
}

.chapter-card h3,
.chapter-card p,
.chapter-meta,
.chapter-actions{
    position:relative;
    z-index:1;
}

.chapter-card h3{
    min-height:56px;
}

.chapter-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:16px 0 20px;
}

.chapter-meta span{
    background:#f1f7ff;
    border:1px solid #d6e8ff;
    color:var(--navy);
    border-radius:999px;
    padding:6px 10px;
    font-size:12px;
    font-weight:900;
}

.chapter-actions .btn{
    width:100%;
}

/* ================= PROJECT PATH ================= */

.project-path{
    background:#fff;
    border:1px solid var(--border);
    border-radius:28px;
    padding:30px;
    box-shadow:var(--shadow);
}

.project-path-row{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
}

.project-step{
    background:#f8fbff;
    border:1px solid var(--softborder);
    border-radius:22px;
    padding:20px;
}

.project-step strong{
    width:42px;
    height:42px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--gold),#f5c15d);
    color:var(--navy);
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:12px;
    font-weight:900;
}

.project-step h3{
    color:var(--navy);
    font-size:17px;
    margin-bottom:8px;
}

.project-step p{
    color:var(--muted);
    font-size:14px;
}

/* ================= TABLES ================= */

.table-responsive{
    width:100%;
    overflow-x:auto;
}

.notes-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:var(--smallshadow);
    margin:20px 0;
}

.notes-table th{
    background:var(--navy);
    color:#fff;
    padding:14px;
    text-align:left;
    font-size:15px;
}

.notes-table td{
    padding:14px;
    border-bottom:1px solid var(--border);
    color:#334155;
}

.notes-table tr:nth-child(even){
    background:#f8fbff;
}

/* ================= QUIZ ================= */

.quiz{
    background:#fff;
    border:1px solid var(--border);
    border-radius:26px;
    padding:30px;
    box-shadow:var(--shadow);
}

.quiz-item{
    border-bottom:1px solid var(--border);
    padding:20px 0;
}

.quiz-item:first-child{
    padding-top:0;
}

.quiz-item:last-child{
    border-bottom:none;
}

.quiz-item h4{
    color:var(--navy);
    margin-bottom:12px;
    font-size:18px;
}

.quiz-options{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.quiz-options label{
    background:#f6f9ff;
    border:1px solid var(--border);
    border-radius:14px;
    padding:13px;
    cursor:pointer;
    transition:.25s;
}

.quiz-options label:hover{
    background:#eaf5ff;
}

.quiz-options label.correct{
    background:#dcfce7;
    border-color:#86efac;
    color:#166534;
    font-weight:800;
}

.quiz-options label.wrong{
    background:#fee2e2;
    border-color:#fecaca;
    color:#991b1b;
    font-weight:800;
}

.explanation{
    display:none;
    margin-top:10px;
    padding:12px;
    border-radius:12px;
    background:#f8fafc;
    color:#475569;
    font-size:14px;
}

/* ================= NEXT BOX & FOOTER ================= */

.next-box{
    background:linear-gradient(135deg,var(--navy),var(--teal));
    color:#fff;
    border-radius:26px;
    padding:34px;
    display:grid;
    grid-template-columns:1.3fr .7fr;
    gap:22px;
    align-items:center;
}

.next-box h2{
    font-size:30px;
    margin-bottom:10px;
}

.next-box p{
    color:#e6faff;
}

.next-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.footer{
    background:var(--darknavy);
    color:#dbeafe;
    text-align:center;
    padding:22px;
    font-size:14px;
}

/* ================= SCREEN GUARD ================= */

.screen-guard{
    position:fixed;
    inset:0;
    background:linear-gradient(135deg,var(--navy),var(--darknavy));
    color:#fff;
    z-index:99999;
    display:none;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:30px;
}

.screen-guard-box{
    max-width:560px;
}

.screen-guard i{
    font-size:54px;
    color:#f5c15d;
    margin-bottom:18px;
}

.screen-guard h2{
    font-size:32px;
    margin-bottom:10px;
}

.screen-guard p{
    color:#d9eaff;
}

/* ================= UTILITIES ================= */

.text-center{text-align:center;}
.mt-10{margin-top:10px;}
.mt-20{margin-top:20px;}
.mt-22{margin-top:22px;}
.mt-30{margin-top:30px;}
.mb-10{margin-bottom:10px;}
.mb-20{margin-bottom:20px;}
.mb-30{margin-bottom:30px;}
.hidden{display:none;}

/* ================= PRINT PROTECTION ================= */

@media print{
    body *{
        visibility:hidden !important;
    }

    .screen-guard,
    .screen-guard *{
        visibility:visible !important;
    }

    .screen-guard{
        display:flex !important;
    }
}

/* ================= RESPONSIVE ================= */

@media(max-width:1000px){
    body{
        padding-top:155px;
    }

    .course-header-inner,
    .aicpe-course-header-inner,
    .hero-inner,
    .course-hero-inner,
    .html-index-hero-inner,
    .overview-strip,
    .course-overview-strip,
    .grid-2,
    .grid-3,
    .grid-4,
    .interactive-grid,
    .project-path-row,
    .next-box,
    .quiz-options{
        grid-template-columns:1fr;
    }

    .course-header-inner,
    .aicpe-course-header-inner{
        gap:8px;
        padding:10px 0;
    }

    .topic-info,
    .course-topic-info{
        border-left:none;
        padding-left:0;
    }

    .topic-links,
    .topic-nav-links{
        justify-content:flex-start;
        width:100%;
    }

    .topic-btn,
    .topic-nav-btn{
        flex:1;
        max-width:none;
        justify-content:center;
    }

    .quick-nav{
        top:155px;
    }

    .hero h1,
    .course-hero h1,
    .html-index-hero h1{
        font-size:36px;
    }

    .next-actions{
        justify-content:flex-start;
    }
}

@media(max-width:600px){
    body{
        padding-top:170px;
    }

    .hero,
    .course-hero,
    .html-index-hero{
        padding:44px 0;
    }

    .hero h1,
    .course-hero h1,
    .html-index-hero h1{
        font-size:31px;
    }

    .section-title h2{
        font-size:27px;
    }

    .filter-bar input,
    .course-filter-bar input{
        min-width:100%;
    }

    .hero-actions .btn,
    .gurukul-actions .btn,
    .chapter-actions .btn,
    .next-actions .btn{
        width:100%;
    }

    .brand-text strong{
        font-size:17px;
    }

    .topic-title{
        font-size:14px;
    }

    .topic-btn,
    .topic-nav-btn{
        font-size:11px;
        padding:8px 10px;
    }

    .card,
    .lesson-box,
    .note-card,
    .quiz{
        padding:20px;
    }
}