/* =========================================
   codebhavya - COMMON STYLES
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1e293b;
    line-height: 1.7;
}

/* =========================================
   HEADER
   ========================================= */

.top-header {
    background: #1e293b;
    color: white;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 25px;

    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo span {
    color: #60a5fa;
}

/* =========================================
   NAVIGATION
   ========================================= */

.top-nav {
    display: flex;
    gap: 20px;
}

.top-nav a {
    color: white;
    text-decoration: none;
    font-size: 15px;
}

.top-nav a:hover {
    color: #60a5fa;
}

/* =========================================
   DOCUMENTATION LAYOUT
   ========================================= */

.docs-layout {
    display: flex;
    min-height: calc(100vh - 65px);
}

/* =========================================
   SIDEBAR
   ========================================= */

.sidebar {
    width: 260px;

    background: white;

    border-right: 1px solid #e2e8f0;

    padding: 25px 15px;

    position: sticky;

    top: 65px;

    height: calc(100vh - 65px);

    overflow-y: auto;
}

.sidebar-title {
    font-size: 14px;

    font-weight: bold;

    color: #64748b;

    text-transform: uppercase;

    margin-bottom: 12px;

    padding-left: 10px;
}

.sidebar a {
    display: block;

    padding: 9px 12px;

    margin: 3px 0;

    border-radius: 6px;

    color: #334155;

    text-decoration: none;

    font-size: 14px;
}

.sidebar a:hover {
    background: #eff6ff;

    color: #2563eb;
}

.sidebar a.active {
    background: #dbeafe;

    color: #1d4ed8;

    font-weight: bold;
}

/* =========================================
   MAIN CONTENT
   ========================================= */

.main-content {
    flex: 1;

    max-width: 950px;

    padding: 40px;

    margin: 0 auto;
}

.page-title {
    font-size: 38px;

    margin-bottom: 10px;

    color: #0f172a;
}

.page-description {
    color: #64748b;

    margin-bottom: 35px;
}

/* =========================================
   CONTENT CARDS
   ========================================= */

.content-card {
    background: white;

    padding: 28px;

    border-radius: 12px;

    margin-bottom: 25px;

    border: 1px solid #e2e8f0;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.04);
}

.content-card h2 {
    margin-bottom: 15px;

    color: #0f172a;
}

.content-card h3 {
    margin-top: 20px;

    margin-bottom: 10px;
}

/* =========================================
   FORMULA BOX
   ========================================= */

.formula-box {
    background: #eff6ff;

    border-left: 5px solid #2563eb;

    padding: 18px;

    margin: 15px 0;

    font-size: 18px;

    font-weight: bold;

    border-radius: 6px;
}

/* =========================================
   EXAMPLE BOX
   ========================================= */

.example-box {
    background: #f8fafc;

    border: 1px solid #e2e8f0;

    padding: 20px;

    border-radius: 8px;

    margin: 15px 0;
}

.example-box .answer {
    color: #15803d;

    font-weight: bold;

    margin-top: 10px;
}

/* =========================================
   TIP BOX
   ========================================= */

.tip-box {
    background: #ecfdf5;

    border-left: 5px solid #16a34a;

    padding: 18px;

    margin: 15px 0;

    border-radius: 6px;
}

/* =========================================
   WARNING BOX
   ========================================= */

.warning-box {
    background: #fff7ed;

    border-left: 5px solid #f97316;

    padding: 18px;

    margin: 15px 0;

    border-radius: 6px;
}

/* =========================================
   PRACTICE QUESTIONS
   ========================================= */

.practice-question {
    background: #f8fafc;

    border: 1px solid #e2e8f0;

    padding: 18px;

    margin: 12px 0;

    border-radius: 8px;
}

.solution-button {
    background: #2563eb;

    color: white;

    border: none;

    padding: 8px 15px;

    border-radius: 6px;

    cursor: pointer;

    margin-top: 10px;
}

.solution-button:hover {
    background: #1d4ed8;
}

.solution {
    display: none;

    background: #ecfdf5;

    padding: 15px;

    margin-top: 10px;

    border-radius: 6px;
}

/* =========================================
   SEARCH
   ========================================= */

.search-box {
    width: 100%;

    padding: 12px 15px;

    border: 1px solid #cbd5e1;

    border-radius: 8px;

    font-size: 15px;

    margin-bottom: 20px;
}

.search-box:focus {
    outline: none;

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =========================================
   BUTTONS
   ========================================= */

.primary-button {
    display: inline-block;

    background: #2563eb;

    color: white;

    text-decoration: none;

    padding: 10px 18px;

    border-radius: 7px;

    border: none;

    cursor: pointer;
}

.primary-button:hover {
    background: #1d4ed8;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
    background: #1e293b;

    color: white;

    text-align: center;

    padding: 25px;

    margin-top: 40px;
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

    .top-header {
        height: auto;

        padding: 15px;

        flex-direction: column;

        gap: 10px;
    }

    .top-nav {
        flex-wrap: wrap;

        justify-content: center;
    }

    .docs-layout {
        display: block;
    }

    .sidebar {
        width: 100%;

        height: auto;

        position: relative;

        top: 0;

        border-right: none;

        border-bottom: 1px solid #e2e8f0;
    }

    .main-content {
        padding: 20px;
    }

    .page-title {
        font-size: 30px;
    }

}

/* =================================
   HOME PAGE
================================= */

.hero {
    text-align: center;
    padding: 70px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}


.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
}


.hero h1 span {
    color: #2563eb;
}


.hero p {
    max-width: 750px;
    margin: 0 auto 30px;
    font-size: 18px;
    line-height: 1.7;
    color: #64748b;
}


.home-container {
    max-width: 1100px;
    margin: auto;
    padding: 50px 20px;
}


.section-title {
    text-align: center;
    font-size: 30px;
    margin-bottom: 10px;
}


.section-description {
    text-align: center;
    color: #64748b;
    margin-bottom: 35px;
}


.subject-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);

    gap: 22px;
}


.subject-card {
    display: block;
    background: white;
    padding: 28px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;

    text-decoration: none;
    color: inherit;

    transition:
        transform 0.2s,
        box-shadow 0.2s;
}


.subject-card:hover {

    transform: translateY(-5px);

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, 0.08);

}


.subject-icon {
    font-size: 42px;
    margin-bottom: 15px;
}


.subject-card h3 {
    font-size: 21px;
    margin-bottom: 10px;
}


.subject-card p {
    color: #64748b;
    line-height: 1.6;
}


.learn-link {
    display: inline-block;
    margin-top: 15px;

    color: #2563eb;

    font-weight: bold;
}


@media (max-width: 900px) {

    .subject-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .hero h1 {
        font-size: 30px;
    }


    .subject-grid {
        grid-template-columns: 1fr;
    }

}

/* ================================
   VENU LEARNING HOME CARDS
================================ */

.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

.subject-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 25px !important;
    width: 100%;
}

.subject-card {
    display: block !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ec !important;
    border-radius: 16px !important;
    padding: 30px !important;
    min-height: 230px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    color: #1e293b !important;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease !important;
}

.subject-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.10) !important;
}

.subject-icon {
    font-size: 45px !important;
    margin-bottom: 15px !important;
}

.subject-card h3 {
    font-size: 22px !important;
    margin: 0 0 12px 0 !important;
}

.subject-card p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #64748b !important;
    margin: 0 !important;
}

.learn-link {
    display: inline-block !important;
    margin-top: 20px !important;
    color: #2563eb !important;
    font-weight: 600 !important;
}


/* TABLET */

@media (max-width: 900px) {

    .subject-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

}


/* MOBILE */

@media (max-width: 600px) {

    .subject-grid {
        grid-template-columns: 1fr !important;
    }

    .subject-card {
        min-height: auto !important;
    }

}

/* =================================
   COMPARISON TABLE
================================= */

.comparison-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 15px;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #dbe3ec;
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

.comparison-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
}

.comparison-table td {
    color: #475569;
    line-height: 1.5;
}

.comparison-table tr:nth-child(even) {
    background: #f8fafc;
}

.comparison-table tr:hover {
    background: #eff6ff;
}


/* MOBILE */

@media (max-width: 700px) {

    .comparison-table-wrapper {
        overflow-x: auto;
    }

    .comparison-table {
        min-width: 650px;
        font-size: 14px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 11px 12px;
    }

}
.comparison-table th,
.comparison-table td {
    border: 1px solid #dbe3ec;
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background: #f1f5f9;
    font-weight: 700;
}

.comparison-table tr:nth-child(even) {
    background: #f8fafc;
}

.output-box {
    background: #0f172a;
    color: #ffffff;
    padding: 18px;
    border-radius: 8px;
    font-family: monospace;
    margin: 15px 0;
}

/* Pointer Memory Diagram */

.pointer-memory-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px auto;
    padding: 25px;
    width: 100%;
    box-sizing: border-box;
}

.pointer-memory-box {
    text-align: center;
    min-width: 150px;
}

.pm-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.pm-box {
    width: 120px;
    height: 60px;
    margin: 0 auto;
    border: 2px solid currentColor;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: bold;
}

.pm-address {
    margin-top: 10px;
    font-size: 14px;
}

.pm-connection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

.pm-line {
    font-family: monospace;
    font-size: 22px;
    white-space: nowrap;
}

.pm-text {
    font-size: 14px;
    margin-top: 5px;
}


/* Mobile */

@media (max-width: 600px) {

    .pointer-memory-diagram {
        flex-direction: column;
        gap: 20px;
    }

    .pm-connection {
        transform: rotate(90deg);
    }

    .pm-text {
        transform: rotate(-90deg);
    }

}

/* Union Memory Diagram */

.union-memory-diagram {
    width: 100%;
    max-width: 500px;
    margin: 30px auto;
    text-align: center;
}

.union-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
}

.union-memory-box {
    border: 3px solid currentColor;
    border-radius: 8px;
    padding: 20px;
    width: 280px;
    margin: 0 auto;
    box-sizing: border-box;
}

.union-shared-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.union-member {
    border: 1px solid currentColor;
    border-radius: 5px;
    padding: 8px;
    margin: 7px 0;
    font-family: monospace;
    font-weight: bold;
}

.union-note {
    margin-top: 15px;
    font-size: 14px;
    font-style: italic;
}

@media (max-width: 600px) {

    .union-memory-box {
        width: 90%;
        max-width: 280px;
    }

}

/* Dynamic Memory Diagrams */

.memory-diagram {
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
    text-align: center;
}

.memory-section {
    border: 2px solid currentColor;
    border-radius: 8px;
    padding: 15px;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.memory-section strong {
    font-size: 18px;
}

.memory-section span {
    font-family: monospace;
    font-weight: bold;
}

@media (max-width: 600px) {

    .memory-diagram {
        width: 95%;
    }

}

/* Bitwise Programming */

.bit-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 20px auto 8px;
    flex-wrap: wrap;
}

.bit-box {
    width: 42px;
    height: 42px;
    border: 2px solid currentColor;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 20px;
    font-weight: bold;
}

.bit-label {
    text-align: center;
    font-size: 14px;
    margin-bottom: 25px;
}

.bit-operation {
    width: 100%;
    max-width: 500px;
    margin: 25px auto;
    font-family: monospace;
}

.bit-line {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    padding: 8px 12px;
    border-bottom: 1px solid currentColor;
    text-align: right;
}

.bit-line span:first-child {
    text-align: left;
}

.operator-line {
    font-weight: bold;
    border-top: 2px solid currentColor;
}

@media (max-width: 600px) {

    .bit-box {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .bit-line {
        grid-template-columns: 80px 1fr;
        gap: 10px;
        font-size: 14px;
    }

}


/* =================================
   C PRACTICE LEVEL BUTTONS
================================= */

.content-card .practice-level-button {
    width: 70%;
    max-width: 700px;
    margin: 10px auto;
    padding: 14px 18px;
    display: block;
    box-sizing: border-box;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================
   CODEBHAVYA BRAND DESIGN
   ========================================= */

:root {
    --cb-navy: #0D1B2A;
    --cb-navy-light: #1B2A41;
    --cb-gold: #D4AF37;
    --cb-gold-light: #F5D76E;
    --cb-white: #FFFFFF;
    --cb-light: #F8FAFC;
    --cb-text: #1E293B;
    --cb-muted: #64748B;
}


/* =========================================
   CODEBHAVYA HEADER
   ========================================= */

.top-header {
    background: var(--cb-navy);
    height: 72px;
    padding: 0 35px;
    border-bottom: 2px solid var(--cb-gold);
}


.logo {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: 0.3px;
}


.logo-code {
    color: var(--cb-white);
}


.logo-bhavya {
    color: var(--cb-gold);
}


.top-nav {
    gap: 22px;
}


.top-nav a {
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}


.top-nav a:hover {
    color: var(--cb-gold-light);
}


/* =========================================
   CODEBHAVYA HERO
   ========================================= */

.codebhavya-hero {
    position: relative;
    background:
        linear-gradient(
            135deg,
            #0D1B2A 0%,
            #16283D 55%,
            #1B2A41 100%
        );

    color: white;

    min-height: 520px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 80px 20px;

    overflow: hidden;
}


/* Decorative gold glow */

.codebhavya-hero::before {
    content: "";

    position: absolute;

    width: 350px;
    height: 350px;

    border: 1px solid rgba(212, 175, 55, 0.25);

    border-radius: 50%;

    top: -150px;
    right: -100px;
}


.codebhavya-hero::after {
    content: "";

    position: absolute;

    width: 250px;
    height: 250px;

    border: 1px solid rgba(212, 175, 55, 0.18);

    border-radius: 50%;

    bottom: -120px;
    left: -80px;
}


.hero-content {
    position: relative;
    z-index: 2;

    max-width: 850px;

    text-align: center;
}


.hero-small-title {
    color: var(--cb-gold-light);

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 4px;

    margin-bottom: 15px;
}


.hero h1 {
    margin-bottom: 10px;

    font-size: 58px;
}


.hero-brand {
    color: white;

    font-family:
        Georgia,
        "Times New Roman",
        serif;
}


.hero h2 {
    color: var(--cb-gold);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 25px;

    font-weight: 500;

    margin-bottom: 25px;
}


.hero-description {
    max-width: 720px;

    margin: 0 auto 32px;

    color: #D8E0EA;

    font-size: 17px;

    line-height: 1.8;
}


/* =========================================
   HERO BUTTONS
   ========================================= */

.hero-buttons {
    display: flex;

    justify-content: center;

    gap: 15px;

    flex-wrap: wrap;
}


.hero-buttons .primary-button {
    background: var(--cb-gold);

    color: var(--cb-navy);

    font-weight: 700;

    padding: 12px 24px;

    border-radius: 7px;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}


.hero-buttons .primary-button:hover {
    background: var(--cb-gold-light);

    transform: translateY(-2px);
}


.secondary-button {
    display: inline-block;

    padding: 11px 24px;

    border: 1px solid var(--cb-gold);

    border-radius: 7px;

    color: white;

    text-decoration: none;

    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.secondary-button:hover {
    background: var(--cb-gold);

    color: var(--cb-navy);
}


/* =========================================
   SECTION LABEL
   ========================================= */

.section-label {
    text-align: center;

    color: #A98220;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 3px;

    margin-bottom: 8px;
}


/* =========================================
   LEARNING CARDS
   ========================================= */

.subject-card {
    position: relative;

    border-top: 4px solid transparent !important;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease !important;
}


.subject-card:hover {
    border-top-color: var(--cb-gold) !important;

    transform: translateY(-7px) !important;

    box-shadow:
        0 15px 35px rgba(13, 27, 42, 0.12) !important;
}


.subject-icon {
    width: 62px;
    height: 62px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #F8F3E4;

    border-radius: 12px;

    font-size: 32px !important;

    margin-bottom: 18px !important;
}


.subject-card h3 {
    color: var(--cb-navy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;
}


.learn-link {
    color: #A98220 !important;
}


/* =========================================
   WHY CODEBHAVYA
   ========================================= */

.why-codebhavya {
    background: var(--cb-navy);

    color: white;

    padding: 75px 20px;

    margin-top: 30px;
}


.why-container {
    max-width: 1100px;

    margin: auto;

    text-align: center;
}


.why-container .section-label {
    color: var(--cb-gold-light);
}


.why-container h2 {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 34px;

    margin-bottom: 12px;
}


.why-container > p:not(.section-label) {
    color: #CBD5E1;

    margin-bottom: 40px;
}


/* =========================================
   LEARNING STEPS
   ========================================= */

.learning-steps {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;
}


.learning-step {
    padding: 25px 20px;

    border:
        1px solid
        rgba(212, 175, 55, 0.35);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.04);
}


.learning-step span {
    display: block;

    color: var(--cb-gold);

    font-size: 14px;

    font-weight: bold;

    margin-bottom: 12px;
}


.learning-step h3 {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 21px;

    margin-bottom: 8px;
}


.learning-step p {
    color: #CBD5E1;

    font-size: 14px;

    line-height: 1.6;
}


/* =========================================
   CODEBHAVYA FOOTER
   ========================================= */

.footer {
    background: #08131F;

    padding: 35px 20px;

    margin-top: 0;
}


.footer-brand {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 25px;

    font-weight: bold;

    margin-bottom: 5px;
}


.footer-brand span {
    color: var(--cb-gold);
}


.footer-tagline {
    color: #CBD5E1;

    font-size: 14px;

    margin-bottom: 15px;
}


.footer-copy {
    color: #94A3B8;

    font-size: 13px;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 900px) {

    .learning-steps {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 768px) {

    .top-header {
        height: auto;

        padding: 15px 20px;

        gap: 14px;
    }


    .logo {
        font-size: 25px;
    }


    .top-nav {
        gap: 12px 18px;
    }


    .top-nav a {
        font-size: 13px;
    }


    .codebhavya-hero {
        min-height: 500px;

        padding: 65px 20px;
    }


    .hero h1 {
        font-size: 44px;
    }


    .hero h2 {
        font-size: 21px;
    }


    .hero-description {
        font-size: 15px;
    }

}


@media (max-width: 600px) {

    .hero h1 {
        font-size: 38px;
    }


    .hero h2 {
        font-size: 19px;
    }


    .learning-steps {
        grid-template-columns: 1fr;
    }


    .why-container h2 {
        font-size: 28px;
    }

}

/* =========================================
   CODEBHAVYA LEARNING JOURNEY
   ========================================= */

.approach-description {
    color: #CBD5E1;
    max-width: 650px;
    margin: 0 auto 45px;
    font-size: 16px;
}


/* Journey container */

.learning-journey {
    max-width: 1050px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* Individual step */

.journey-step {
    width: 220px;
    min-height: 235px;

    padding: 20px 15px;

    text-align: center;

    border: 1px solid rgba(212, 175, 55, 0.35);

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.04);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}


.journey-step:hover {
    transform: translateY(-6px);

    background: rgba(255, 255, 255, 0.08);

    border-color: #D4AF37;
}


/* Number */

.journey-number {
    color: #D4AF37;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 12px;
}


/* Icon */

.journey-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #F8F3E4;

    font-size: 27px;
}


/* Heading */

.journey-step h3 {
    color: white;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 22px;

    margin-bottom: 10px;
}


/* Description */

.journey-step p {
    color: #CBD5E1;

    font-size: 14px;

    line-height: 1.6;

    margin: 0;
}


/* Connecting line */

.journey-line {
    width: 45px;

    height: 2px;

    background: #D4AF37;

    position: relative;

    flex-shrink: 0;
}


/* Arrow */

.journey-line::after {
    content: "";

    position: absolute;

    right: -1px;

    top: -4px;

    width: 8px;
    height: 8px;

    border-top: 2px solid #D4AF37;
    border-right: 2px solid #D4AF37;

    transform: rotate(45deg);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 950px) {

    .learning-journey {
        flex-wrap: wrap;

        gap: 20px;
    }

    .journey-line {
        display: none;
    }

}


@media (max-width: 600px) {

    .learning-journey {
        flex-direction: column;

        gap: 20px;
    }


    .journey-step {
        width: 100%;

        max-width: 350px;
    }

}

/* =========================================
   CODEBHAVYA PREMIUM BRAND
   ========================================= */

.logo {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
}


/* Code */

.logo-code {
    color: #F8FAFC;
}


/* Bhavya */

.logo-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    background-clip: text;

    font-weight: 700;
}


/* Mobile */

@media (max-width: 600px) {

    .logo {
        font-size: 25px;
    }

}

/* =========================================
   CODEBHAVYA PREMIUM SUBJECT CARDS
   ========================================= */

.subject-grid {
    max-width: 1150px;
    margin: 40px auto 0;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 24px;
}


/* Card */

.subject-card {
    position: relative;

    min-height: 285px;

    padding: 30px 26px;

    background: #FFFFFF;

    border: 1px solid #E5E7EB;

    border-radius: 16px;

    text-decoration: none;

    overflow: hidden;

    box-shadow:
        0 5px 18px rgba(13, 27, 42, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* Gold top accent */

.subject-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: #D4AF37;

    transform: scaleX(0);

    transform-origin: left;

    transition: transform 0.3s ease;
}


/* Hover */

.subject-card:hover {
    transform: translateY(-7px);

    border-color: #D4AF37;

    box-shadow:
        0 15px 35px rgba(13, 27, 42, 0.12);
}


.subject-card:hover::before {
    transform: scaleX(1);
}


/* Icon */

.subject-icon {
    width: 64px;
    height: 64px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    background: #F8F3E4;

    border: 1px solid #E8D9A8;

    border-radius: 14px;

    font-size: 30px;
}


/* Heading */

.subject-card h3 {
    margin: 0 0 12px;

    color: #0D1B2A;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 22px;

    line-height: 1.3;
}


/* Description */

.subject-card p {
    margin: 0;

    color: #64748B;

    font-size: 14px;

    line-height: 1.7;
}


/* Learn link */

.subject-card .learn-link {
    display: inline-block;

    margin-top: 22px;

    color: #A98220;

    font-size: 14px;

    font-weight: 700;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.subject-card:hover .learn-link {
    color: #8B6B16;

    transform: translateX(4px);
}


/* =========================================
   RESPONSIVE CARDS
   ========================================= */

@media (max-width: 950px) {

    .subject-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .subject-grid {
        grid-template-columns: 1fr;

        gap: 18px;

        margin-top: 30px;
    }


    .subject-card {
        min-height: auto;

        padding: 25px 22px;
    }

}

/* =========================================
   CODEBHAVYA PREMIUM NAVIGATION
   ========================================= */

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 1000;

    background: #0D1B2A;

    padding: 0 35px;

    min-height: 72px;

    border-bottom: 2px solid #D4AF37;

    box-shadow:
        0 4px 15px rgba(13, 27, 42, 0.15);
}


/* Logo */

.logo {
    flex-shrink: 0;

    white-space: nowrap;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 29px;

    font-weight: 700;

    text-decoration: none;
}


/* Navigation */

.top-nav {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 6px;
}


/* Navigation links */

.top-nav a {
    position: relative;

    padding: 9px 13px;

    color: #E5E7EB;

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    border-radius: 6px;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}


/* Hover */

.top-nav a:hover {
    color: #F5D76E;

    background:
        rgba(212, 175, 55, 0.08);
}


/* Gold underline */

.top-nav a::after {
    content: "";

    position: absolute;

    left: 13px;
    right: 13px;

    bottom: 3px;

    height: 2px;

    background: #D4AF37;

    transform: scaleX(0);

    transform-origin: center;

    transition: transform 0.2s ease;
}


.top-nav a:hover::after {
    transform: scaleX(1);
}


/* =========================================
   ACTIVE PAGE
   ========================================= */

.top-nav a.active {
    color: #F5D76E;

    font-weight: 700;
}


.top-nav a.active::after {
    transform: scaleX(1);
}


/* =========================================
   MOBILE NAVIGATION
   ========================================= */

@media (max-width: 850px) {

    .top-header {
        flex-direction: column;

        justify-content: center;

        gap: 10px;

        padding: 14px 15px;
    }


    .top-nav {
        width: 100%;

        justify-content: center;

        flex-wrap: wrap;

        gap: 4px;
    }


    .top-nav a {
        padding: 8px 10px;

        font-size: 13px;
    }

}


@media (max-width: 500px) {

    .logo {
        font-size: 25px;
    }


    .top-nav {
        gap: 2px;
    }


    .top-nav a {
        padding: 7px 8px;

        font-size: 12px;
    }

}
/* =========================================
   FINAL CODEBHAVYA HERO BRAND FIX
   ========================================= */

.codebhavya-hero h1.hero-brand {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 58px !important;
    font-weight: 700 !important;
    color: #F8FAFC !important;
}


/* CODE */

.codebhavya-hero h1.hero-brand .hero-code {
    color: #B8D8F0 !important;

    background: none !important;

    -webkit-text-fill-color: #B8D8F0 !important;
}


/* BHAVYA */

.codebhavya-hero h1.hero-brand .hero-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    ) !important;

    -webkit-background-clip: text !important;
    background-clip: text !important;

    -webkit-text-fill-color: transparent !important;

    color: transparent !important;
}


/* MOBILE */

@media (max-width: 768px) {

    .codebhavya-hero h1.hero-brand {
        font-size: 44px !important;
    }

}


@media (max-width: 600px) {

    .codebhavya-hero h1.hero-brand {
        font-size: 38px !important;
    }

}

/* =========================================
   CODEBHAVYA JOURNEY CARD UNIFORMITY
   ========================================= */

.learning-journey {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}


/* All four cards exactly same size */

.journey-step {
    width: 220px;
    height: 245px;
    min-width: 220px;
    min-height: 245px;

    box-sizing: border-box;

    padding: 20px 18px;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    border: 1px solid rgba(212, 175, 55, 0.35);

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.04);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}


/* Number */

.journey-number {
    height: 18px;

    margin-bottom: 10px;

    flex-shrink: 0;
}


/* Icon */

.journey-icon {
    width: 58px;
    height: 58px;

    margin-bottom: 14px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #F8F3E4;

    font-size: 27px;
}


/* Heading area */

.journey-step h3 {
    height: 28px;

    margin: 0 0 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #FFFFFF;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 21px;
}


/* Description area */

.journey-step p {
    height: 68px;

    margin: 0;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    color: #CBD5E1;

    font-size: 14px;

    line-height: 1.6;
}


/* Connecting arrows */

.journey-line {
    width: 42px;
    height: 2px;

    flex-shrink: 0;

    background: #D4AF37;

    position: relative;
}


/* =========================================
   HOVER
   ========================================= */

.journey-step:hover {
    transform: translateY(-6px);

    background: rgba(255, 255, 255, 0.08);

    border-color: #D4AF37;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 950px) {

    .learning-journey {
        flex-wrap: wrap;
        gap: 20px;
    }

    .journey-line {
        display: none;
    }

}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {

    .learning-journey {
        flex-direction: column;
        gap: 20px;
    }

    .journey-step {
        width: 100%;
        max-width: 350px;

        min-width: 0;
    }

}

/* =========================================
   CODEBHAVYA BRAND COLOR CONSISTENCY
   ========================================= */

:root {
    --codebhavya-code-blue: #B8D8F0;
}


/* Header Code */

.logo .logo-code {
    color: var(--codebhavya-code-blue) !important;
    -webkit-text-fill-color: var(--codebhavya-code-blue) !important;
}


/* Hero Code */

.codebhavya-hero .hero-code {
    color: var(--codebhavya-code-blue) !important;
    -webkit-text-fill-color: var(--codebhavya-code-blue) !important;

    background: none !important;
}

/* =========================================
   CODEBHAVYA FOOTER BRAND
   ========================================= */

.footer-brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 700;
    margin-bottom: 5px;
}


/* Code */

.footer-code {
    color: #B8D8F0 !important;
}


/* Bhavya */

.footer-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;

    color: transparent;
}


/* Footer tagline */

.footer-tagline {
    color: #CBD5E1;
}


/* Copyright */

.footer-copy {
    color: #94A3B8;
}

/* =========================================
   FINAL FOOTER BRAND COLOR FIX
   ========================================= */

/* Code = Light Blue */
.footer-brand .footer-code {
    color: #B8D8F0 !important;

    background: none !important;

    -webkit-background-clip: initial !important;
    background-clip: initial !important;

    -webkit-text-fill-color: #B8D8F0 !important;
}


/* Bhavya = Gold */
.footer-brand .footer-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    ) !important;

    -webkit-background-clip: text !important;
    background-clip: text !important;

    -webkit-text-fill-color: transparent !important;

    color: transparent !important;
}

/* ================= FOOTER ================= */

.footer {
    margin-top: 0;
    padding: 40px 8% 20px;
    text-align: center;
}


.footer-brand h2 {
    font-size: 32px;
    margin-bottom: 8px;
}


.footer-brand p {
    font-size: 16px;
    margin-bottom: 35px;
}


.footer-container {
    display: flex;
    justify-content: center;
    gap: 100px;
    text-align: left;
    flex-wrap: wrap;
}


.footer-section {
    min-width: 150px;
}


.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}


.footer-section a {
    display: block;
    text-decoration: none;
    margin-bottom: 10px;
}


.footer-bottom {
    margin-top: 35px;
    padding-top: 15px;
}


.footer-bottom p {
    font-size: 14px;
}


/* Mobile Responsive */

@media(max-width:768px){

    .footer-container{
        flex-direction:column;
        align-items:center;
        text-align:center;
        gap:30px;
    }

}

/* Ensure the footer brand matches the header perfectly */
.footer-brand .logo {
    font-family: Georgia, "Times New Roman", serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    display: inline-block;
    margin-bottom: 8px; /* Matches your footer's spacing layout */
}

/* Force the text-fill effects to render properly in the footer */
.footer-brand .logo-code {
    color: #B8D8F0 !important;
    -webkit-text-fill-color: #F8FAFC !important;
}

.footer-brand .logo-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* =========================================
   TAGLINE GRADIENT COLOR TREATMENT
   ========================================= */

.hero-gradient-tagline,
.footer-gradient-tagline {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    ) !important;

    -webkit-background-clip: text !important;
    background-clip: text !important;

    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    
    display: inline-block; /* Essential for the gradient clip effect */
    font-weight: 600 !important;
}

/* Specific spacing adjustments so they sit nicely in their sections */
.hero-gradient-tagline {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 25px !important;
    margin-bottom: 25px !important;
}

.footer-gradient-tagline {
    font-size: 16px !important;
    margin-bottom: 35px !important;
}

/* =========================================
   CODEBHAVYA PROFESSIONAL FOOTER
   ========================================= */

.footer {
    background: #08131F;

    color: #FFFFFF;

    padding: 55px 30px 0;

    margin-top: 0;
}


/* Main footer */

.footer-container {
    max-width: 1150px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        2fr 1fr 1.2fr 1fr;

    gap: 45px;

    padding-bottom: 45px;
}


/* =========================================
   BRAND SECTION
   ========================================= */

.footer-brand-section {
    max-width: 350px;
}


.footer-brand {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 28px;

    font-weight: 700;

    margin-bottom: 8px;
}


/* Code */

.footer-brand .footer-code {
    color: #B8D8F0 !important;

    background: none !important;

    -webkit-background-clip: initial !important;
    background-clip: initial !important;

    -webkit-text-fill-color: #B8D8F0 !important;
}


/* Bhavya */

.footer-brand .footer-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    );

    -webkit-background-clip: text;

    background-clip: text;

    -webkit-text-fill-color: transparent;

    color: transparent;
}


/* Tagline */

.footer-tagline {
    color: #D4AF37;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 15px;

    line-height: 1.6;

    margin-bottom: 12px;
}


/* Description */

.footer-description {
    color: #94A3B8;

    font-size: 14px;

    line-height: 1.7;

    margin: 0;
}


/* =========================================
   FOOTER COLUMNS
   ========================================= */

.footer-column {
    display: flex;

    flex-direction: column;

    align-items: flex-start;
}


.footer-column h3 {
    color: #FFFFFF;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;

    margin: 3px 0 18px;

    position: relative;
}


/* Small gold line */

.footer-column h3::after {
    content: "";

    display: block;

    width: 28px;

    height: 2px;

    background: #D4AF37;

    margin-top: 7px;
}


.footer-column a {
    color: #94A3B8;

    text-decoration: none;

    font-size: 14px;

    line-height: 1.5;

    margin-bottom: 11px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.footer-column a:hover {
    color: #F5D76E;

    transform: translateX(3px);
}


/* =========================================
   FOOTER BOTTOM
   ========================================= */

.footer-bottom {
    max-width: 1150px;

    margin: 0 auto;

    padding: 20px 0;

    border-top: 1px solid
        rgba(255, 255, 255, 0.10);

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}


.footer-bottom p {
    color: #64748B;

    font-size: 12px;

    margin: 0;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 900px) {

    .footer-container {
        grid-template-columns:
            1.5fr 1fr 1fr;

        gap: 35px;
    }

    .footer-brand-section {
        grid-column: 1 / -1;

        max-width: 600px;
    }

}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {

    .footer {
        padding: 45px 22px 0;
    }


    .footer-container {
        grid-template-columns: 1fr;

        gap: 30px;

        padding-bottom: 35px;
    }


    .footer-brand-section {
        grid-column: auto;

        max-width: 100%;
    }


    .footer-column h3 {
        margin-bottom: 14px;
    }


    .footer-bottom {
        flex-direction: column;

        align-items: center;

        text-align: center;

        padding: 18px 0;
    }

}

/* =========================================
   FINAL CODEBHAVYA FOOTER ALIGNMENT
   ========================================= */

.footer {
    background: #08131F;
    color: #FFFFFF;
    padding: 50px 30px 0;
}


/* Main footer layout */

.footer-container {
    max-width: 1150px;
    margin: 0 auto;

    display: grid;

    grid-template-columns: 2fr 1fr 1.3fr 1fr;

    gap: 55px;

    align-items: start;

    padding-bottom: 42px;
}


/* =========================================
   BRAND
   ========================================= */

.footer-brand-section {
    max-width: 360px;
    padding-top: 0;
}


.footer-brand {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 28px;
    font-weight: 700;

    line-height: 1.2;

    margin: 0 0 8px;
}


.footer-brand .footer-code {
    color: #B8D8F0 !important;

    background: none !important;

    -webkit-background-clip: initial !important;
    background-clip: initial !important;

    -webkit-text-fill-color: #B8D8F0 !important;
}


.footer-brand .footer-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;
}


.footer-tagline {
    color: #D4AF37;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 15px;

    line-height: 1.5;

    margin: 0 0 12px;
}


.footer-description {
    color: #94A3B8;

    font-size: 14px;

    line-height: 1.7;

    margin: 0;

    max-width: 330px;
}


/* =========================================
   LINK COLUMNS
   ========================================= */

.footer-column {
    display: flex;

    flex-direction: column;

    align-items: flex-start;

    padding: 0;
}


.footer-column h3 {
    color: #FFFFFF;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;

    line-height: 1.3;

    margin: 2px 0 17px;
}


.footer-column h3::after {
    content: "";

    display: block;

    width: 28px;

    height: 2px;

    background: #D4AF37;

    margin-top: 7px;
}


.footer-column a {
    color: #94A3B8;

    text-decoration: none;

    font-size: 14px;

    line-height: 1.5;

    margin: 0 0 10px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.footer-column a:hover {
    color: #F5D76E;

    transform: translateX(3px);
}


/* =========================================
   BOTTOM BAR
   ========================================= */

.footer-bottom {
    max-width: 1150px;

    margin: 0 auto;

    padding: 18px 0;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.10);

    display: flex;

    align-items: center;

    justify-content: space-between;
}


.footer-bottom p {
    color: #64748B;

    font-size: 12px;

    line-height: 1.5;

    margin: 0;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 900px) {

    .footer-container {
        grid-template-columns:
            1.5fr 1fr 1fr;

        gap: 35px;
    }

    .footer-brand-section {
        grid-column: 1 / -1;
    }

}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {

    .footer {
        padding: 42px 22px 0;
    }

    .footer-container {
        grid-template-columns: 1fr;

        gap: 30px;

        padding-bottom: 35px;
    }

    .footer-brand-section {
        grid-column: auto;

        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;

        gap: 8px;

        text-align: center;
    }

}

/* =========================================
   CODEBHAVYA MAIN LOGO IMAGE
   ========================================= */

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: 170px;
    height: auto;
    display: block;
    object-fit: contain;
}

/* =========================================
   FINAL HEADER LOGO ALIGNMENT
   ========================================= */

.top-header {
    display: flex;
    align-items: center;
}


/* Logo container */

.top-header .logo {
    display: flex;
    align-items: center;

    height: 52px;

    flex-shrink: 0;
}


/* Logo image */

.top-header .logo img {
    display: block;

    width: 145px;
    height: 52px;

    object-fit: contain;
    object-position: left center;
}


/* Navigation alignment */

.top-header .top-nav {
    display: flex;
    align-items: center;
}


/* Desktop */

@media (min-width: 769px) {

    .top-header .logo {
        margin-right: 25px;
    }

}


/* Mobile */

@media (max-width: 768px) {

    .top-header .logo {
        height: 48px;
    }

    .top-header .logo img {
        width: 140px;
        height: 48px;
    }

}

/* =========================================
   CODEBHAVYA HEADER LOGO
   ========================================= */

.top-header .logo {
    display: flex;
    align-items: center;
    height: 58px;
    flex-shrink: 0;
}

.top-header .logo img {
    display: block;
    width: 190px;
    height: auto;
    max-height: 58px;
    object-fit: contain;
}

/* =========================================
   CODEBHAVYA MATHEMATICS PAGE
   ========================================= */


/* -----------------------------------------
   SUBJECT HERO
----------------------------------------- */

.subject-hero {
    margin-bottom: 30px;
}

.subject-label,
.section-label {
    display: inline-block;

    color: #D4AF37;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.5px;

    margin-bottom: 8px;
}

.subject-hero .page-title {
    margin-bottom: 12px;
}

.subject-hero .page-description {
    max-width: 750px;

    margin-bottom: 0;
}


/* -----------------------------------------
   SECTION
----------------------------------------- */

.content-section {
    margin: 35px 0;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 4px 0 8px;
}

.section-heading p {
    margin: 0;

    color: #64748B;

    line-height: 1.7;
}


/* -----------------------------------------
   TOPIC GRID
----------------------------------------- */

.topic-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;

    margin-top: 22px;
}


/* -----------------------------------------
   TOPIC CARD
----------------------------------------- */

.topic-card {
    background: #FFFFFF;

    border: 1px solid #E2E8F0;

    border-radius: 14px;

    padding: 26px;

    display: flex;

    flex-direction: column;

    min-height: 255px;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.06);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.topic-card:hover {
    transform: translateY(-4px);

    border-color: #B8D8F0;

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.10);
}


/* -----------------------------------------
   TOPIC ICON
----------------------------------------- */

.topic-icon {
    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #F1F7FC;

    font-size: 25px;

    margin-bottom: 16px;
}


/* -----------------------------------------
   TOPIC TITLE
----------------------------------------- */

.topic-card h3 {
    color: #0F172A;

    font-size: 19px;

    margin: 0 0 10px;
}


/* -----------------------------------------
   TOPIC DESCRIPTION
----------------------------------------- */

.topic-card p {
    color: #64748B;

    font-size: 14px;

    line-height: 1.65;

    margin: 0 0 20px;
}


/* -----------------------------------------
   TOPIC BUTTON
----------------------------------------- */

.topic-card .primary-button {
    align-self: flex-start;

    margin-top: auto;

    text-decoration: none;
}


/* -----------------------------------------
   LEARNING METHOD
----------------------------------------- */

.learning-method {
    margin-top: 35px;
}


.learning-method h2 {
    margin-top: 4px;

    margin-bottom: 22px;
}


.learning-steps {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;
}


.learning-step {
    background: #F8FAFC;

    border: 1px solid #E2E8F0;

    border-radius: 10px;

    padding: 16px 12px;

    min-height: 100px;
}


.learning-step > span {
    display: block;

    color: #D4AF37;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;

    margin-bottom: 9px;
}


.learning-step strong {
    color: #334155;

    font-size: 13px;

    line-height: 1.5;
}


/* -----------------------------------------
   SIDEBAR PART B
----------------------------------------- */

.sidebar-part-b {
    margin-top: 22px;
}


/* -----------------------------------------
   TABLET
----------------------------------------- */

@media (max-width: 900px) {

    .topic-grid {
        grid-template-columns: 1fr;
    }

    .learning-steps {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* -----------------------------------------
   MOBILE
----------------------------------------- */

@media (max-width: 600px) {

    .subject-hero {
        margin-bottom: 24px;
    }

    .topic-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .topic-card {
        padding: 22px;

        min-height: 230px;
    }

    .learning-steps {
        grid-template-columns: 1fr;
    }

    .learning-step {
        min-height: auto;
    }

}

/* =========================================
   CODEBHAVYA - C PROGRAMMING CODE BLOCKS
   ========================================= */

.main-content pre {
    background: #0F172A;

    border: 1px solid #1E293B;

    border-radius: 12px;

    padding: 20px;

    margin: 18px 0;

    overflow-x: auto;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.08);
}


.main-content pre code {
    display: block;

    color: #E2E8F0;

    font-family:
        "Consolas",
        "Courier New",
        monospace;

    font-size: 14px;

    line-height: 1.7;

    white-space: pre;

    background: transparent;

    padding: 0;
}


/* Code block scrollbar */

.main-content pre::-webkit-scrollbar {
    height: 7px;
}

.main-content pre::-webkit-scrollbar-thumb {
    background: #475569;

    border-radius: 10px;
}


/* Inline code */

.main-content code:not(pre code) {
    background: #F1F5F9;

    color: #0F5E9C;

    padding: 2px 6px;

    border-radius: 5px;

    font-family:
        "Consolas",
        "Courier New",
        monospace;

    font-size: 0.92em;
}

/* =========================================
   CODEBHAVYA - C PROGRAMMING CONTENT BOXES
   ========================================= */


/* -----------------------------------------
   EXAMPLE BOX
----------------------------------------- */

.example-box {
    background: #F8FAFC;

    border: 1px solid #DCE7F0;

    border-left: 4px solid #8CC8F0;

    border-radius: 10px;

    padding: 18px 20px;

    margin: 20px 0;

    color: #334155;

    line-height: 1.7;
}


/* -----------------------------------------
   FORMULA / CONCEPT BOX
----------------------------------------- */

.formula-box {
    background: #F8FAFC;

    border: 1px solid #DCE7F0;

    border-radius: 10px;

    padding: 20px;

    margin: 20px 0;

    text-align: center;

    color: #334155;

    line-height: 1.8;

    font-weight: 500;
}


/* -----------------------------------------
   COMPARISON TABLE
----------------------------------------- */

.comparison-table-wrapper {
    width: 100%;

    overflow-x: auto;

    margin: 20px 0;

    border-radius: 10px;
}


.comparison-table {
    width: 100%;

    border-collapse: collapse;

    background: #FFFFFF;

    border: 1px solid #E2E8F0;
}


.comparison-table th {
    background: #F1F7FC;

    color: #0F172A;

    font-weight: 700;

    text-align: left;

    padding: 14px;

    border: 1px solid #E2E8F0;
}


.comparison-table td {
    padding: 13px 14px;

    color: #475569;

    line-height: 1.6;

    border: 1px solid #E2E8F0;

    vertical-align: top;
}


.comparison-table tr:hover td {
    background: #FAFCFE;
}


/* -----------------------------------------
   MEMORY DIAGRAM
----------------------------------------- */

.memory-diagram {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    margin: 22px 0;
}


.memory-section {
    background: #F8FAFC;

    border: 1px solid #DCE7F0;

    border-radius: 12px;

    padding: 20px;
}


.memory-section strong {
    display: block;

    color: #0F172A;

    font-size: 18px;

    margin-bottom: 12px;
}


.memory-section span {
    display: block;

    color: #64748B;

    font-size: 14px;

    line-height: 1.6;

    margin-top: 5px;
}


/* -----------------------------------------
   MOBILE
----------------------------------------- */

@media (max-width: 600px) {

    .memory-diagram {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        min-width: 600px;
    }

    .example-box,
    .formula-box {
        padding: 16px;
    }

}

/* =========================================
   CODEBHAVYA - C PRACTICE
   ========================================= */

.practice-header {
    margin-bottom: 30px;
}

.practice-header h2 {
    margin: 4px 0 10px;
}

.practice-header > p {
    color: #64748B;

    line-height: 1.7;

    max-width: 750px;

    margin-bottom: 24px;
}


/* Practice feature row */

.practice-intro {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;

    margin-top: 20px;
}


.practice-feature {
    background: #F8FAFC;

    border: 1px solid #E2E8F0;

    border-radius: 12px;

    padding: 18px;

    display: flex;

    flex-direction: column;

    min-height: 120px;
}


.practice-feature > span {
    color: #D4AF37;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;

    margin-bottom: 10px;
}


.practice-feature strong {
    color: #0F172A;

    font-size: 16px;

    margin-bottom: 7px;
}


.practice-feature small {
    color: #64748B;

    font-size: 13px;

    line-height: 1.5;
}


/* Mobile */

@media (max-width: 900px) {

    .practice-intro {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 600px) {

    .practice-intro {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   CODEBHAVYA - FINAL COMPLETE FOOTER
   ========================================= */

.footer {
    width: 100%;
    background: #08131F;
    color: #FFFFFF;
    margin-top: 0;
    padding: 40px 30px 0;
    box-sizing: border-box;
}

.footer-container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr;
    gap: 35px;

    padding-bottom: 30px;
}

.footer-brand-section {
    text-align: left;
}

.footer-brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-code {
    color: #B8D8F0 !important;
}

.footer-bhavya {
    background: linear-gradient(
        90deg,
        #D4AF37,
        #F5D76E,
        #D4AF37
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.footer-tagline {
    color: #CBD5E1;
    font-size: 15px;
    margin: 0 0 12px;
}

.footer-description {
    color: #94A3B8;
    font-size: 14px;
    line-height: 1.7;
    max-width: 300px;
    margin: 0;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-column h3 {
    color: #FFFFFF;
    font-size: 16px;
    margin: 0 0 16px;
}

.footer-column a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #B8D8F0;
}

.footer-bottom {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;

    border-top: 1px solid rgba(255,255,255,0.10);

    padding: 14px 0 16px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

.footer-bottom p {
    margin: 0;

    color: #94A3B8;

    font-size: 13px;
}


/* =========================================
   MOBILE FOOTER
   ========================================= */

@media (max-width: 900px) {

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }

    .footer-brand-section {
        grid-column: 1 / -1;
    }

}


@media (max-width: 600px) {

    .footer {
        padding: 40px 20px 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-brand-section {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-column {
        align-items: flex-start;
    }

}

/* =========================================
   CODEBHAVYA - C PROGRAMMING SIDEBAR
   ========================================= */

.sidebar {
    width: 280px;

    background: #FFFFFF;

    border-right: 1px solid #E2E8F0;

    padding: 24px 14px;

    position: sticky;

    top: 72px;

    height: calc(100vh - 72px);

    overflow-y: auto;

    scrollbar-width: thin;

    scrollbar-color: #CBD5E1 transparent;
}


/* Sidebar scrollbar */

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #CBD5E1;

    border-radius: 10px;
}


/* =========================================
   SIDEBAR MAIN TITLE
   ========================================= */

.sidebar > .sidebar-title:first-child {
    font-size: 17px;

    color: #0D1B2A;

    text-transform: none;

    font-weight: 700;

    padding: 12px 14px;

    margin-bottom: 16px;

    border-radius: 10px;

    background: #F8FAFC;

    border-left: 4px solid #D4AF37;
}


/* =========================================
   SECTION HEADINGS
   ========================================= */

.sidebar .sidebar-title {
    font-size: 12px;

    font-weight: 700;

    letter-spacing: 0.8px;

    color: #64748B;

    text-transform: uppercase;

    padding: 8px 12px;

    margin-top: 20px;

    margin-bottom: 7px;

    border-bottom: 1px solid #E8EEF5;
}


/* =========================================
   SIDEBAR LINKS
   ========================================= */

.sidebar a {
    display: flex;

    align-items: center;

    min-height: 42px;

    padding: 9px 12px;

    margin: 3px 0;

    border-radius: 8px;

    color: #334155;

    text-decoration: none;

    font-size: 14px;

    line-height: 1.45;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


/* Hover */

.sidebar a:hover {
    background: #F1F7FC;

    color: #0F5E9C;

    transform: translateX(2px);
}


/* Active */

.sidebar a.active {
    background: #EAF4FC;

    color: #0F5E9C;

    font-weight: 700;

    border-left: 3px solid #D4AF37;

    padding-left: 9px;
}


/* =========================================
   PRACTICE SECTION
   ========================================= */

.sidebar .sidebar-title:last-of-type {
    margin-top: 28px;
}

.sidebar a[href="#practice"] {
    background: #FFF9E8;

    color: #8A6500;

    font-weight: 600;

    border: 1px solid #F0DF9A;
}

.sidebar a[href="#practice"]:hover {
    background: #FFF3C4;

    color: #6F5200;

    transform: translateX(2px);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

    .sidebar {
        width: 240px;

        padding: 20px 10px;
    }

    .sidebar a {
        font-size: 13px;

        min-height: 40px;

        padding: 8px 10px;
    }

}

.main-logo {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
}

.codebhavya-header-logo {
    width: auto !important;
    justify-content: flex-start !important;
    gap: 10px !important;
}

.codebhavya-header-logo .main-logo {
    width: 72px;
    height: 42px;
    object-fit: contain;
    margin: 0;
}

/* =========================================
   CODEBHAVYA HEADER LOGO + NAME
   ========================================= */

.codebhavya-header-logo {
    justify-content: flex-start !important;
    gap: 0 !important;
}

/* Logo image */
.codebhavya-header-logo .main-logo {
    width: 72px;
    height: 42px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    margin-right: 10px;
}

/* Keep Code + Bhavya together */
.codebhavya-header-logo .brand-name {
    display: inline-flex;
    align-items: center;
    gap: 0 !important;
    white-space: nowrap;
}

/* =========================================
   CODEBHAVYA - FINAL HEADER LOGO SPACING
   ========================================= */

.codebhavya-new-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: fit-content !important;

    gap: 0 !important;
}

/* Logo image */
.codebhavya-new-logo .main-logo {
    width: 72px !important;
    height: 72px !important;

    object-fit: contain;

    display: block;

    margin: 0 10px 0 0 !important;

    flex-shrink: 0;
}

/* Code and Bhavya must stay together */
.codebhavya-new-logo .logo-code,
.codebhavya-new-logo .logo-bhavya {
    margin: 0 !important;
    padding: 0 !important;
}

/* Absolutely no space between Code and Bhavya */
.codebhavya-new-logo .logo-code + .logo-bhavya {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* =========================================
   CODEBHAVYA FINAL MOBILE LAYOUT FIX
   ========================================= */

@media (max-width: 768px) {

    /* ---------- DOCUMENTATION PAGES ---------- */

    .docs-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* ---------- SIDEBAR ---------- */

    .docs-layout .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        max-height: none !important;

        position: relative !important;
        top: auto !important;

        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;

        overflow: visible !important;

        box-sizing: border-box !important;
    }

    /* ---------- SEARCH BOX ---------- */

    .docs-layout .sidebar .search-box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ---------- MAIN CONTENT ---------- */

    .docs-layout .main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        padding: 20px 16px !important;
        margin: 0 !important;

        box-sizing: border-box !important;
    }

    /* ---------- CONTENT CARDS ---------- */

    .docs-layout .content-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ---------- LONG CODE / TABLE CONTENT ---------- */

    .main-content pre {
        max-width: 100% !important;
        overflow-x: auto !important;
    }

    .comparison-table-wrapper {
        max-width: 100% !important;
        overflow-x: auto !important;
    }
}

/* =========================================
   C PROGRAMMING - MOBILE WIDTH FIX
   ========================================= */

@media (max-width: 768px) {

    /* Prevent the C page from becoming wider
       than the phone screen */
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Documentation layout */
    .docs-layout {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Main C content */
    .docs-layout .main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        padding: 16px !important;
        margin: 0 !important;

        box-sizing: border-box !important;
    }

    /* Every C content card */
    .docs-layout .content-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box !important;

        padding: 20px !important;
    }

    /* Headings and paragraphs */
    .docs-layout .content-card h1,
    .docs-layout .content-card h2,
    .docs-layout .content-card h3,
    .docs-layout .content-card p {
        max-width: 100%;
        overflow-wrap: break-word;
    }

    /* Code blocks */
    .docs-layout pre {
        width: 100% !important;
        max-width: 100% !important;

        box-sizing: border-box !important;

        overflow-x: auto !important;
        white-space: pre !important;
    }

    /* Tables scroll INSIDE their container */
    .comparison-table-wrapper {
        width: 100% !important;
        max-width: 100% !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        box-sizing: border-box !important;
    }

    .comparison-table {
        min-width: 650px;
    }

    /* Diagrams */
    .pointer-memory-diagram,
    .memory-diagram,
    .union-memory-diagram {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

}

/* =========================================
   C PROGRAMMING - FINAL MOBILE CONTENT FIX
   ========================================= */

@media (max-width: 768px) {

    /* -----------------------------------------
       1. DATA TYPES TABLE
       Make the 3-column table fit the phone
       ----------------------------------------- */

    #datatypes .comparison-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    #datatypes .comparison-table th,
    #datatypes .comparison-table td {
        padding: 10px 8px !important;
        font-size: 14px !important;
        line-height: 1.5 !important;

        overflow-wrap: break-word !important;
        word-break: normal !important;
    }

    /* Give the columns sensible proportions */
    #datatypes .comparison-table th:nth-child(1),
    #datatypes .comparison-table td:nth-child(1) {
        width: 20%;
    }

    #datatypes .comparison-table th:nth-child(2),
    #datatypes .comparison-table td:nth-child(2) {
        width: 50%;
    }

    #datatypes .comparison-table th:nth-child(3),
    #datatypes .comparison-table td:nth-child(3) {
        width: 30%;
    }


    /* -----------------------------------------
       2. STRUCTURE - PRACTICE QUESTIONS
       Keep all 10 points inside the card
       ----------------------------------------- */

    #structure ol {
        width: 100% !important;
        max-width: 100% !important;

        box-sizing: border-box !important;

        margin: 0 !important;
        padding-left: 30px !important;
    }

    #structure ol li {
        width: auto !important;
        max-width: 100% !important;

        box-sizing: border-box !important;

        padding-right: 4px !important;

        overflow-wrap: break-word !important;
        word-break: normal !important;

        line-height: 1.7 !important;
    }


    /* -----------------------------------------
       3. PREVENT CONTENT FROM MAKING
          THE WHOLE PHONE PAGE WIDER
       ----------------------------------------- */

    .main-content {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .content-card {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

/* =========================================
   DOCUMENTATION - BETTER DESKTOP WIDTH
   ========================================= */

@media (min-width: 769px) {

    .docs-layout .main-content {
        flex: 1;
        width: auto;
        max-width: none;

        margin: 0;
        padding: 30px 35px;

        box-sizing: border-box;
    }

    .docs-layout .content-card {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
}

/* =========================================
   RESPONSIVE TABLES - MOBILE
   ========================================= */

@media (max-width: 768px) {

    /* Prevent the complete webpage from becoming wider */
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Main content must stay inside the phone */
    .main-content,
    .content-card {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /*
       Every table gets its own horizontal
       scrolling area when necessary
    */
    .content-card table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;

        -webkit-overflow-scrolling: touch;

        white-space: normal;
    }

    /*
       Keep table columns readable.
       The table can become wider than the
       phone and will scroll internally.
    */
    .content-card table th,
    .content-card table td {
        white-space: nowrap;
    }

    /*
       Long text inside cells can still wrap
       when appropriate.
    */
    .content-card table td {
        overflow-wrap: break-word;
    }

    /*
       Prevent code/content outside tables
       from creating page-wide overflow.
    */
    .content-card pre {
        max-width: 100%;
        overflow-x: auto;
        box-sizing: border-box;
    }

    /*
       Images and diagrams stay inside the card.
    */
    .content-card img,
    .content-card svg {
        max-width: 100%;
    }
}

/* =========================================
   FINAL MOBILE TABLE FIX
   ALL TABLES SCROLL INDEPENDENTLY
   ========================================= */

@media (max-width: 768px) {

    /* Keep the page itself within the phone */
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    /* Main content must never create page overflow */
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .content-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }


    /* =====================================
       ALL TABLE WRAPPERS
       ===================================== */

    .comparison-table-wrapper,
    .table-wrapper,
    .table-container {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        -webkit-overflow-scrolling: touch !important;

        box-sizing: border-box !important;
    }


    /* =====================================
       ALL TABLES
       ===================================== */

    .content-card table,
    .main-content table {
        width: max-content !important;
        min-width: 600px !important;
        max-width: none !important;

        border-collapse: collapse !important;

        box-sizing: border-box !important;
    }


    /* =====================================
       TABLE CELLS
       ===================================== */

    .content-card table th,
    .content-card table td,
    .main-content table th,
    .main-content table td {

        padding: 10px 12px !important;

        vertical-align: top !important;

        white-space: normal !important;

        overflow-wrap: break-word !important;
        word-break: normal !important;
    }


    /* =====================================
       TABLES WITHOUT A WRAPPER
       ===================================== 

    .content-card table:not(.comparison-table),
    .main-content table:not(.comparison-table) {

        display: block !important;

        width: max-content !important;
        min-width: 600px !important;
        max-width: none !important;

        overflow-x: auto !important;
    }  */


    /* =====================================
       CODE BLOCKS
       ===================================== */

    .content-card pre,
    .main-content pre {
        max-width: 100% !important;
        overflow-x: auto !important;
        box-sizing: border-box !important;
    }

}

/* =========================================
   MOBILE LIST ALIGNMENT
   PRACTICE QUESTIONS + QUICK MCQs
   ========================================= */

@media (max-width: 768px) {

    /* All numbered lists inside content cards */
    .content-card ol {
        padding-left: 28px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    /* Every numbered item gets enough room */
    .content-card ol > li {
        padding-left: 4px !important;
        padding-right: 4px !important;

        box-sizing: border-box;

        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    /* Prevent long question text from crossing the card */
    .content-card ol > li {
        max-width: 100%;
    }

}

/* =========================================
   LIST ALIGNMENT
   PRACTICE QUESTIONS + QUICK MCQs
   DESKTOP + MOBILE
   ========================================= */

/* Desktop and larger screens */
.content-card ol {
    padding-left: 32px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.content-card ol > li {
    padding-left: 6px !important;
    padding-right: 6px !important;
    box-sizing: border-box;

    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

    .content-card ol {
        padding-left: 30px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .content-card ol > li {
        padding-left: 4px !important;
        padding-right: 4px !important;

        overflow-wrap: break-word;
        word-wrap: break-word;
    }

}

/* =========================================
   FINAL MOBILE TABLE SYSTEM
   ========================================= */

@media (max-width: 768px) {

    /* -----------------------------------------
       PAGE MUST NEVER SCROLL SIDEWAYS
       ----------------------------------------- */

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .main-content,
    .content-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }


    /* -----------------------------------------
       TABLE WRAPPERS
       ----------------------------------------- */

    .comparison-table-wrapper {
        width: 100% !important;
        max-width: 100% !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        box-sizing: border-box !important;

        -webkit-overflow-scrolling: touch;
    }


    /* -----------------------------------------
       TABLES
       ----------------------------------------- */

    .comparison-table {
        width: 100%;
        min-width: 0;
        max-width: none;

        border-collapse: collapse;
        box-sizing: border-box;
    }


    /* -----------------------------------------
       TABLE CELLS
       ----------------------------------------- */

    .comparison-table th,
    .comparison-table td {
        box-sizing: border-box;

        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
    }


    /* -----------------------------------------
       TABLES WITHOUT A WRAPPER
       ----------------------------------------- */

    .content-card > table,
    .content-card table:not(.comparison-table) {

        width: 100%;
        max-width: 100%;

        box-sizing: border-box;

        overflow-x: auto;
    }


    /* -----------------------------------------
       LONG CONTENT INSIDE TABLE CELLS
       ----------------------------------------- */

    .content-card table td,
    .content-card table th {

        max-width: 100%;

        overflow-wrap: anywhere;
        word-break: normal;
    }


    /* -----------------------------------------
       CODE BLOCKS
       ----------------------------------------- */

    .content-card pre {
        max-width: 100% !important;
        overflow-x: auto !important;
        box-sizing: border-box !important;
    }
}

/* ============================================================
   CODEBHAVYA FINAL DESKTOP HEADER + SIDEBAR FIX
   Pure CSS — no JavaScript layout controller.
   Header stays fixed.
   Sidebar stays sticky below the fixed header.
   Sidebar is constrained by .docs-layout, so it stops naturally
   before the footer. Footer remains full width and never overlaps
   sidebar content.
   ============================================================ */

@media (min-width: 769px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
    }

    .top-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 72px !important;
        min-height: 72px !important;
        z-index: 2000 !important;
        box-sizing: border-box !important;
    }

    body {
        padding-top: 72px !important;
    }

    .docs-layout {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: calc(100vh - 72px) !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #f5f7fb !important;
    }

    .docs-layout > .sidebar {
        position: sticky !important;
        top: 72px !important;
        align-self: flex-start !important;
        width: 235px !important;
        flex: 0 0 235px !important;
        min-width: 235px !important;
        height: calc(100vh - 72px) !important;
        max-height: calc(100vh - 72px) !important;
        margin: 0 !important;
        padding: 20px 12px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #ffffff !important;
        border-right: 1px solid #e2e8f0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        z-index: 100 !important;
    }

    .docs-layout > .main-content {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 24px 16px 36px 14px !important;
        box-sizing: border-box !important;
    }

    .footer {
        position: relative !important;
        z-index: 10 !important;
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .docs-layout > .sidebar {
        width: 215px !important;
        flex-basis: 215px !important;
        min-width: 215px !important;
    }

    .docs-layout > .main-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 768px) {

    body {
        padding-top: 0 !important;
    }

    .top-header {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .docs-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-height: 0 !important;
    }

    .docs-layout > .sidebar {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .docs-layout > .main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 16px 5px 28px !important;
    }

    .footer {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* =========================================
   CODEBHAVYA - FOOTER / SIDEBAR COLLISION FIX
   ========================================= */

@media (min-width: 769px) {

    .docs-layout {
        position: relative !important;
    }

    .docs-layout > .sidebar {
        z-index: 100 !important;
    }

    .footer {
        position: relative !important;
        z-index: auto !important;

        width: 100% !important;
        margin-left: 0 !important;
    }
}


/* ============================================================
   CODEBHAVYA — C PROGRAMMING TOPIC PAGES
   Dedicated compact stylesheet additions
   ============================================================ */

:root {
    --c-blue:#2563eb;
    --c-green:#15803d;
    --c-orange:#d97706;
    --c-slate:#475569;
    --c-disabled:#94a3b8;
    --c-gold:#d4af37;
    --c-navy:#0d1b2a;
    --c-soft:#f8fafc;
}

.docs-layout {
    position: relative !important;
}

.main-content {
    max-width: 1180px !important;
    padding: 26px 30px !important;
}

.content-card {
    padding: 20px 22px !important;
    margin-bottom: 16px !important;
    border-radius: 10px !important;
}

.content-card h2 {
    margin-bottom: 10px !important;
}

.content-card h3 {
    margin-top: 15px !important;
    margin-bottom: 7px !important;
}

.content-card p,
.content-card li {
    line-height: 1.62 !important;
}

.content-card pre {
    margin: 10px 0 !important;
    padding: 12px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    border-radius: 7px !important;
}

.example-box,
.tip-box,
.warning-box,
.formula-box,
.output-box {
    padding: 13px 14px !important;
    margin: 10px 0 !important;
    border-radius: 7px !important;
}

.comparison-table-wrapper {
    margin: 14px 0 !important;
}

.comparison-table th,
.comparison-table td {
    padding: 9px 10px !important;
}

.pointer-memory-diagram,
.memory-diagram,
.union-memory-diagram {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}

.cb-c-topic-sidebar {
    padding-top: 18px !important;
}

.cb-c-topic-sidebar .sidebar-title {
    margin-top: 9px;
    margin-bottom: 7px;
}

.cb-c-topic-sidebar a {
    padding: 7px 10px !important;
    margin: 2px 0 !important;
}

.cb-topic-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
}

.cb-topic-card {
    display:block;
    padding:12px 13px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    background:#fff;
    color:#0d1b2a;
    text-decoration:none;
    font-weight:800;
    transition:transform .18s ease, box-shadow .18s ease;
}

.cb-topic-card:hover {
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(13,27,42,.08);
    border-color:#d4af37;
}

.cb-added-section {
    border-top:3px solid #e2e8f0 !important;
}

.cb-added-label {
    display:inline-block;
    margin-bottom:6px;
    color:#8a6500;
    font-size:10px;
    font-weight:900;
    letter-spacing:1.8px;
}

.cb-added-note {
    color:#64748b;
    font-size:13px;
}

.cb-interview-list {
    display:grid;
    gap:7px;
}

.cb-interview-item {
    border:1px solid #e2e8f0;
    border-radius:7px;
    background:#f8fafc;
}

.cb-interview-item summary {
    cursor:pointer;
    padding:10px 12px;
    font-weight:800;
    color:#0d1b2a;
}

.cb-interview-answer {
    padding:0 12px 11px;
    color:#334155;
    border-top:1px solid #e2e8f0;
    padding-top:9px;
}

.cb-tip-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    list-style:none;
    padding:0 !important;
}

.cb-tip-grid li {
    padding:10px 11px;
    border:1px solid #dbe3ec;
    border-left:4px solid #d4af37;
    border-radius:7px;
    background:#fffdf7;
}

.cb-extra-practice {
    margin-left:20px;
}

.cb-extra-practice li {
    margin:6px 0;
}

.cb-compact-toggle {
    border:0;
    border-radius:7px;
    padding:8px 13px;
    background:#2563eb;
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

.cb-compact-panel {
    margin-top:10px;
}

.cb-viz-card,
.cb-tracer {
    border:1px solid #dbe3ec;
    border-radius:10px;
    overflow:hidden;
    background:#fff;
}

.cb-viz-top {
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:8px 11px;
    background:#0d1b2a;
    color:#fff;
}

.cb-viz-kicker {
    font-size:9px;
    font-weight:900;
    letter-spacing:1.5px;
}

.cb-viz-brand strong {
    color:#2563eb;
}

.cb-viz-brand b {
    color:#f59e0b;
}

.cb-viz-stage {
    min-height:155px;
    padding:16px 18px;
    text-align:center;
    background:#f8fafc;
}

.cb-viz-step {
    color:#64748b;
    font-size:11px;
    font-weight:800;
}

.cb-viz-stage h3 {
    margin:5px 0 7px !important;
    color:#0d1b2a;
}

.cb-viz-stage p {
    max-width:760px;
    margin:0 auto;
}

.cb-viz-dots {
    display:flex;
    justify-content:center;
    gap:6px;
    margin-top:12px;
}

.cb-viz-dot {
    width:9px;
    height:9px;
    border-radius:50%;
    background:#cbd5e1;
}

.cb-viz-dot.active {
    background:#d4af37;
}

.cb-standard-controls {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    padding:10px 11px;
    border-top:1px solid #e2e8f0;
}

.cb-control {
    border:0;
    border-radius:8px;
    padding:8px 11px;
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

.cb-previous,
.cb-reset {
    background:#475569;
}

.cb-next {
    background:#2563eb;
}

.cb-auto {
    background:#15803d;
}

.cb-pause {
    background:#d97706;
}

.cb-control:disabled {
    background:#94a3b8 !important;
    cursor:not-allowed;
}

.cb-mini-progress {
    height:6px;
    background:#e2e8f0;
}

.cb-mini-progress > div {
    width:0;
    height:100%;
    background:#d4af37;
    transition:width .2s ease;
}

.cb-tracer-grid {
    display:grid;
    grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr);
    min-width:850px;
}

.cb-tracer-code-wrap,
.cb-tracer-state-wrap {
    padding:10px;
    min-width:0;
}

.cb-tracer-code-wrap {
    border-right:1px solid #e2e8f0;
}

.cb-tracer-heading {
    margin-bottom:6px;
    color:#0d1b2a;
    font-weight:900;
    font-size:12px;
}

.cb-tracer-code {
    height:280px;
    margin:0 !important;
    overflow:auto;
    padding:8px 0 !important;
    background:#0b1220;
    color:#e5e7eb;
}

.cb-trace-line {
    display:block;
    min-height:19px;
    padding:0 11px;
    white-space:pre;
}

.cb-trace-line.active {
    background:#1e3a5f;
    border-left:4px solid #d4af37;
    padding-left:7px;
}

.cb-tracer-note {
    min-height:50px;
    padding:9px;
    border:1px solid #e2e8f0;
    border-radius:7px;
    background:#f8fafc;
}

.cb-live-state {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    margin-top:8px;
}

.cb-state-item {
    padding:8px;
    border:1px solid #e2e8f0;
    border-radius:7px;
    background:#fff;
}

.cb-state-item strong {
    display:block;
    color:#64748b;
    font-size:9px;
    text-transform:uppercase;
}

.cb-state-item span {
    font-family:Consolas,"Courier New",monospace;
    font-weight:800;
    color:#0d1b2a;
    word-break:break-word;
}

.cb-tracer-output {
    margin-top:8px;
}

.cb-tracer-output pre {
    min-height:65px;
    max-height:100px;
    overflow:auto;
    background:#0b1220;
    color:#e5e7eb;
}

.cb-tracer-status {
    padding:0 11px 10px;
    color:#64748b;
    font-size:11px;
    font-weight:800;
}

.cb-compact-footer-separator {
    height:16px;
    background:#f5f7fb;
}

/* Desktop: sidebar stops cleanly before footer. */
@media (min-width:769px) {
    .docs-layout > .sidebar {
        z-index:20 !important;
    }

    .footer {
        position:relative !important;
        z-index:30 !important;
        width:100% !important;
        margin-left:0 !important;
        border-top:16px solid #f5f7fb !important;
    }
}

@media (max-width:1000px) {
    .cb-topic-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .cb-tracer-grid {
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:768px) {
    .main-content {
        padding:18px !important;
    }

    .content-card {
        padding:16px !important;
    }

    .cb-topic-grid,
    .cb-tip-grid {
        grid-template-columns:1fr;
    }

    .footer {
        border-top:0 !important;
    }

    .cb-tracer-grid {
        min-width:820px;
    }
}


/* ============================================================
   INTRODUCTION TO C — PAGE-SPECIFIC IMPROVEMENTS
   ============================================================ */

/* Keep bullet and numbered lists equally inside the card border. */
.cb-introduction-page #introduction ul,
.cb-introduction-page #introduction ol {
    margin: 10px 0 14px 0 !important;
    padding-left: 30px !important;
    list-style-position: outside !important;
}

.cb-introduction-page #introduction ul li,
.cb-introduction-page #introduction ol li {
    margin: 6px 0 !important;
    padding-left: 4px !important;
    overflow-wrap: anywhere;
}

/* 1.13 Show Answer format */
.cb-original-qa-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.cb-original-qa-item {
    overflow: hidden;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.cb-original-qa-question {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    background: #f8fafc;
}

.cb-original-qa-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #0d1b2a;
    color: #ffffff;
    font-weight: 900;
}

.cb-show-answer-btn {
    border: 0;
    border-radius: 7px;
    padding: 7px 10px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.cb-original-qa-answer {
    padding: 10px 12px;
    border-top: 1px solid #e2e8f0;
    border-left: 4px solid #7dd3fc;
    background: #f8fafc;
    color: #334155;
}

/* 1.14 DSA-style programming problems */
.cb-intro-problem-list {
    display: grid;
    gap: 11px;
    margin-top: 10px;
}

.cb-intro-problem-card {
    padding: 12px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #ffffff;
}

.cb-intro-problem-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: #0d1b2a;
}

.cb-intro-problem-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 7px;
    background: #0d1b2a;
    color: #ffffff;
    font-weight: 900;
}

.cb-intro-sample-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.cb-intro-sample {
    overflow: hidden;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
}

.cb-intro-sample > strong {
    display: block;
    padding: 6px 8px;
    background: #0d1b2a;
    color: #ffffff;
    font-size: 11px;
}

.cb-intro-sample pre {
    min-height: 44px;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #0b1220;
    color: #e5e7eb;
}

.cb-intro-problem-actions,
.cb-intro-run-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.cb-intro-solve-btn,
.cb-intro-hint-btn,
.cb-intro-show-program-btn,
.cb-intro-run-btn,
.cb-intro-reset-btn {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    font-weight: 800;
    cursor: pointer;
}

.cb-intro-solve-btn {
    background: #d4af37;
    color: #0d1b2a;
}

.cb-intro-solve-btn:hover {
    background: #f5d76e;
}

.cb-intro-hint-btn,
.cb-intro-reset-btn {
    background: #e2e8f0;
    color: #0f172a;
}

.cb-intro-show-program-btn,
.cb-intro-run-btn {
    background: #2563eb;
    color: #ffffff;
}

.cb-intro-hint {
    margin-top: 9px;
    padding: 9px 10px;
    border-left: 4px solid #d4af37;
    border-radius: 6px;
    background: #fff9df;
}

.cb-intro-solution {
    margin-top: 9px;
    overflow: hidden;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
}

.cb-intro-solution-title {
    padding: 7px 9px;
    background: #0d1b2a;
    color: #ffffff;
    font-weight: 900;
}

.cb-intro-solution pre {
    margin: 0 !important;
    max-height: 360px;
    overflow: auto;
    border-radius: 0 !important;
    background: #0b1220;
    color: #e5e7eb;
}

.cb-intro-workspace {
    margin-top: 9px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
}

.cb-intro-editor-grid {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(250px,.8fr);
    gap: 10px;
}

.cb-intro-editor-grid label {
    display: block;
    margin-bottom: 5px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.cb-intro-code,
.cb-intro-input {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid #22304d;
    border-radius: 7px;
    background: #0b1220;
    color: #e5e7eb;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.5;
}

.cb-intro-code {
    min-height: 230px;
    padding: 10px;
}

.cb-intro-input {
    min-height: 90px;
    padding: 9px;
}

.cb-intro-output-label {
    margin-top: 8px;
}

.cb-intro-output {
    min-height: 100px;
    max-height: 200px;
    overflow: auto;
    margin: 0 !important;
    padding: 9px !important;
    background: #0b1220;
    color: #e5e7eb;
}

.cb-intro-run-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

@media (max-width: 800px) {
    .cb-original-qa-question {
        grid-template-columns: 32px minmax(0,1fr);
    }

    .cb-show-answer-btn {
        grid-column: 2;
        justify-self: start;
    }

    .cb-intro-sample-grid,
    .cb-intro-editor-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   INTRODUCTION — DSA-STYLE PRACTICE QUESTION APPEARANCE
   ============================================================ */

.cb-original-qa-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.cb-original-qa-item {
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #ffffff;
    overflow: hidden;
}

.cb-original-qa-question {
    display: grid;
    grid-template-columns: 30px minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 16px;
    font-weight: 500;
}

.cb-original-qa-number {
    display: inline;
    width: auto;
    height: auto;
    min-width: 0;
    border-radius: 0;
    background: transparent;
    color: #334155;
    font-weight: 500;
    text-align: right;
}

.cb-show-answer-btn {
    border: 0;
    border-radius: 7px;
    padding: 7px 11px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.cb-original-qa-answer {
    padding: 10px 14px 11px 44px;
    border-top: 1px solid #e2e8f0;
    border-left: 4px solid #7dd3fc;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}


/* ============================================================
   INTRODUCTION — DSA-STYLE BEGINNER PROGRAMMING PROBLEMS
   ============================================================ */

.cb-intro-problem-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.cb-intro-problem-card {
    padding: 16px 18px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #ffffff;
}

.cb-intro-problem-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    color: #1e293b;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
}

.cb-intro-problem-number {
    display: inline;
    min-width: 0;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #334155;
    font-weight: 500;
}

.cb-intro-problem-title strong {
    font-weight: 600;
    color: #1e293b;
}


/* Smaller Input / Output cards like DSA */
.cb-intro-sample-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 340px));
    gap: 10px;
    justify-content: start;
    margin-top: 12px;
}

.cb-intro-sample {
    overflow: hidden;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

/* Input = light blue */
.cb-intro-sample:first-child {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.cb-intro-sample:first-child > strong {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Output = light green */
.cb-intro-sample:last-child {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.cb-intro-sample:last-child > strong {
    background: #dcfce7;
    color: #15803d;
}

.cb-intro-sample > strong {
    display: block;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
}

.cb-intro-sample pre {
    min-height: auto;
    max-height: 120px;
    margin: 0 !important;
    padding: 9px 10px !important;
    overflow: auto;
    border-radius: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #334155 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}


/* Keep DSA action buttons */
.cb-intro-problem-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.cb-intro-solve-btn {
    background: #d4af37;
    color: #0d1b2a;
}

.cb-intro-solve-btn:hover {
    background: #f5d76e;
}

.cb-intro-hint-btn {
    background: #e2e8f0;
    color: #0f172a;
}

.cb-intro-show-program-btn {
    background: #2563eb;
    color: #ffffff;
}

@media (max-width: 760px) {

    .cb-original-qa-question {
        grid-template-columns: 24px minmax(0,1fr);
        padding: 11px 12px;
    }

    .cb-show-answer-btn {
        grid-column: 2;
        justify-self: start;
    }

    .cb-original-qa-answer {
        padding-left: 36px;
    }

    .cb-intro-sample-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 420px;
    }
}

/* ============================================================
   INTRODUCTION — FINAL QUESTION / PROBLEM EMPHASIS
   ============================================================ */

/* 1.13 — make the complete question text bold */
.cb-original-qa-question {
    font-weight: 700 !important;
}

.cb-original-qa-number {
    font-weight: 700 !important;
}

.cb-original-qa-question > span:nth-child(2) {
    font-weight: 700 !important;
}


/* 1.14 — only the problem statement line is bold */
.cb-intro-problem-title {
    font-weight: 700 !important;
}

.cb-intro-problem-title strong,
.cb-intro-problem-title > span:not(.cb-intro-problem-number) {
    font-weight: 700 !important;
}

.cb-intro-problem-number {
    font-weight: 700 !important;
}


/* ============================================================
   COMPACT TOPIC NAVIGATION
   Whole button text is the navigation label.
   ============================================================ */

.cb-topic-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
}

.cb-topic-nav-btn {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 48%;
    padding: 8px 12px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    transition: transform .15s ease, box-shadow .15s ease;
}

.cb-topic-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(15, 23, 42, .08);
}

/* Previous = slate */
.cb-topic-nav-prev {
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
}

/* Next = soft blue */
.cb-topic-nav-next {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    margin-left: auto;
}

@media (max-width: 700px) {
    .cb-topic-navigation {
        flex-direction: column;
        align-items: stretch;
    }

    .cb-topic-nav-btn {
        max-width: none;
        justify-content: center;
        text-align: center;
    }

    .cb-topic-nav-next {
        margin-left: 0;
    }
}


/* ============================================================
   INTRODUCTION — FINAL INTERVIEW QUESTION STYLE
   Same visual format as 1.13 Practice Questions
   ============================================================ */

.cb-interview-qa-list .cb-original-qa-question {
    font-weight: 700 !important;
}

.cb-interview-qa-list .cb-original-qa-number {
    font-weight: 700 !important;
}

.cb-interview-qa-list .cb-original-qa-question > span:nth-child(2) {
    font-weight: 700 !important;
}


/* ============================================================
   INTRODUCTION — TRUE END-OF-PAGE TOPIC NAVIGATION
   ============================================================ */

.cb-topic-navigation {
    margin-top: 18px !important;
    margin-bottom: 6px !important;
    padding-top: 4px;
}


/* ============================================================
   C TOPIC PAGE STANDARD — SAFE LIST SPACING
   ============================================================ */

.cb-c-topic-page .content-card ul,
.cb-c-topic-page .content-card ol {
    margin-top: 10px !important;
    margin-bottom: 14px !important;
    padding-left: 30px !important;
    list-style-position: outside !important;
}

.cb-c-topic-page .content-card li {
    margin: 6px 0 !important;
    overflow-wrap: anywhere;
}


/* ============================================================
   STRUCTURE OF C PROGRAM — COMPACT FLOW VISUAL
   ============================================================ */

.cb-structure-flow-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.cb-structure-flow-strip span {
    padding: 6px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    font-weight: 800;
}

.cb-structure-flow-strip b {
    color: #d4af37;
}


/* Questions and programming-problem statement lines follow Introduction standard. */

.cb-structure-page .cb-original-qa-question,
.cb-structure-page .cb-original-qa-number,
.cb-structure-page .cb-original-qa-question > span:nth-child(2) {
    font-weight: 700 !important;
}

.cb-structure-page .cb-intro-problem-title,
.cb-structure-page .cb-intro-problem-title strong,
.cb-structure-page .cb-intro-problem-title > span:not(.cb-intro-problem-number),
.cb-structure-page .cb-intro-problem-number {
    font-weight: 700 !important;
}



/* ============================================================
   C PROGRAMMING INDEX — COMPACT CARD SYSTEM
   Same CodeBhavya card language as DSA, optimized for 24 topics.
   ============================================================ */

.cb-c-index-learning {
    background: #f8fafc !important;
}

.cb-c-index-intro {
    max-width: 980px;
    margin-bottom: 18px !important;
    color: #64748b;
}

.cb-c-index-group {
    margin-top: 22px;
}

.cb-c-index-group:first-of-type {
    margin-top: 16px;
}

.cb-c-index-group-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-bottom: 10px;
}

.cb-c-index-group-label {
    display: inline-block;
    margin-bottom: 3px;
    color: #9a7200;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.cb-c-index-group-head h3 {
    margin: 0 0 4px !important;
    color: #0d1b2a;
    font-size: 19px;
}

.cb-c-index-group-head p {
    margin: 0 !important;
    color: #64748b;
    font-size: 13px;
}

.cb-c-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cb-c-index-card {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 16px;
    border: 1px solid #dbe3ec;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .035);
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        border-color .16s ease;
}

.cb-c-index-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 9px 20px rgba(15, 23, 42, .07);
}

.cb-c-index-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #eff6ff;
    font-size: 22px;
}

.cb-c-index-body {
    flex: 1;
}

.cb-c-index-body h3 {
    margin: 0 0 7px !important;
    color: #0d1b2a;
    font-size: 16px;
    line-height: 1.35;
}

.cb-c-index-body p {
    margin: 0 !important;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55 !important;
}

.cb-c-index-start {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 13px;
    padding: 7px 11px;
    border-radius: 7px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: background .15s ease, transform .15s ease;
}

.cb-c-index-start:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

@media (max-width: 1100px) {
    .cb-c-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .cb-c-index-grid {
        grid-template-columns: 1fr;
    }

    .cb-c-index-card {
        min-height: 0;
    }
}


/* ============================================================
   STRUCTURE PAGE — QUICK VISUAL GUIDES
   ============================================================ */

.cb-concept-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 12px 0 18px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.cb-concept-step {
    display: grid;
    grid-template-columns: 36px auto;
    grid-template-rows: auto auto;
    column-gap: 9px;
    align-items: center;
    min-width: 180px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid #dbe3ec;
    background: #ffffff;
}

.cb-concept-step .cb-concept-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 20px;
}

.cb-concept-step strong {
    color: #0d1b2a;
    font-size: 14px;
}

.cb-concept-step small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.cb-visual-input .cb-concept-icon { background: #eff6ff; }
.cb-visual-process .cb-concept-icon { background: #fff7ed; }
.cb-visual-output .cb-concept-icon { background: #f0fdf4; }

.cb-concept-arrow {
    color: #d4af37;
    font-size: 20px;
    font-weight: 900;
}

.cb-flow-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 9px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
}

.cb-flow-chip span {
    font-size: 17px;
}

/* ============================================================
   C VISUALIZER — DSA BRAND STANDARD
   ============================================================ */

.cb-viz-dsa-standard {
    overflow: hidden;
    border: 1px solid #dbe3ec !important;
    border-radius: 11px !important;
    background: #ffffff !important;
}

.cb-viz-dsa-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 8px;
    background: #ffffff;
}

.cb-viz-dsa-label {
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.35px;
}

.cb-viz-dsa-brand {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 900;
}

.cb-viz-dsa-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 7px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 5px 12px rgba(15, 23, 42, .08);
}

.cb-viz-dsa-brand-mark img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.cb-viz-dsa-code { color: #2563eb; }
.cb-viz-dsa-bhavya { color: #f59e0b; }

.cb-viz-dsa-title {
    margin: 4px 18px 3px !important;
    color: #0d1b2a !important;
    font-size: 18px !important;
}

.cb-viz-dsa-intro {
    margin: 0 18px 12px !important;
    color: #64748b !important;
    font-size: 13px !important;
}

.cb-viz-dsa-standard .cb-structure-flow-strip {
    margin: 0;
    padding: 11px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.cb-viz-dsa-standard .cb-structure-flow-strip span {
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cb-viz-dsa-standard .cb-structure-flow-strip span.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(37, 99, 235, .20);
}

@media (max-width: 700px) {
    .cb-viz-dsa-topbar {
        align-items: flex-start;
        padding: 12px 12px 7px;
    }

    .cb-viz-dsa-label {
        font-size: 9px;
    }

    .cb-viz-dsa-brand {
        font-size: 15px;
    }

    .cb-viz-dsa-brand-mark {
        width: 30px;
        height: 30px;
    }

    .cb-viz-dsa-title,
    .cb-viz-dsa-intro {
        margin-left: 12px !important;
        margin-right: 12px !important;
    }

    .cb-concept-arrow {
        transform: rotate(90deg);
    }

    .cb-concept-visual {
        flex-direction: column;
        align-items: stretch;
    }

    .cb-concept-step,
    .cb-flow-chip {
        width: 100%;
        box-sizing: border-box;
    }
}


/* ============================================================
   C PROGRAMMING — DSA-STYLE PRACTICE STANDARD
   Used by 1.14, 2.21 and future C topic programming problems.
   ============================================================ */

.cb-c-dsa-practice-section {
    margin-top: 18px;
}

.cb-c-practice-label {
    display: inline-block;
    margin-bottom: 7px;
    color: #d4a000;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.cb-c-dsa-practice-section > h3 {
    margin: 0 0 10px !important;
    color: #0d1b2a;
    font-size: 21px !important;
    font-weight: 800 !important;
}

.cb-c-practice-guide {
    margin: 0 0 14px !important;
    color: #334155;
    line-height: 1.65 !important;
}

/* Overall progress */
.cb-practice-overall {
    margin: 15px 0 18px;
    padding: 12px;
    border: 1px solid #dbe3ec;
    border-radius: 11px;
    background: #f8fafc;
}

.cb-practice-overall-title {
    margin-bottom: 9px;
    color: #0f172a;
    font-weight: 800;
}

.cb-practice-overall-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.cb-practice-overall-item {
    padding: 9px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.cb-practice-overall-item strong {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.cb-practice-overall-item span {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-weight: 800;
}

.cb-practice-progress-track {
    height: 10px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.cb-practice-progress-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #2563eb;
    transition: width .25s ease;
}

.cb-practice-progress-note {
    margin-top: 7px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

/* Problem cards */
.cb-c-practice-list {
    display: grid;
    gap: 14px;
}

.cb-c-practice-item {
    padding: 18px 22px;
    border: 1px solid #dbe3ec;
    border-radius: 11px;
    background: #f8fafc;
}

.cb-c-practice-problem-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.cb-c-practice-problem-head > strong {
    color: #0d1b2a;
    font-size: 16px;
    font-weight: 800;
}

.cb-c-practice-statement {
    margin: 0 0 6px !important;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.55 !important;
}

.cb-c-practice-item > p {
    margin: 4px 0 !important;
    color: #334155;
}

.cb-c-practice-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.cb-practice-start-button,
.cb-practice-hint-button,
.cb-practice-program-button {
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 800;
}

.cb-practice-start-button {
    background: #d4af37;
    color: #0d1b2a;
}

.cb-practice-start-button:hover {
    background: #f5d76e;
}

.cb-practice-hint-button {
    background: #64748b;
    color: #ffffff;
}

.cb-practice-program-button {
    background: #2563eb;
    color: #ffffff;
}

/* Badges */
.cb-practice-badge {
    display: none;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.cb-practice-badge.solved,
.cb-practice-badge.completed {
    display: inline-flex;
}

.cb-practice-badge.solved {
    background: #dcfce7;
    color: #15803d;
}

.cb-practice-badge.completed {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Hint and solution */
.cb-c-practice-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 4px solid #d4af37;
    border-radius: 7px;
    background: #fffbeb;
    color: #713f12;
}

.cb-c-practice-solution {
    margin-top: 11px;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #ffffff;
}

.cb-c-practice-solution-title {
    padding: 8px 11px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.cb-c-practice-solution pre {
    margin: 0 !important;
    padding: 12px !important;
    overflow: auto;
    border: 0 !important;
    border-radius: 0 !important;
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

/* Workspace */
.cb-c-practice-workspace {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #0f172a;
}

.cb-c-practice-workspace-title {
    margin-bottom: 10px;
    color: #f8fafc;
    font-weight: 800;
}

.cb-c-practice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 10px;
}

.cb-c-practice-panel {
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #111827;
}

.cb-c-practice-panel h4 {
    margin: 0 0 6px !important;
    color: #e2e8f0;
    font-size: 12px !important;
}

.cb-c-code-editor,
.cb-c-practice-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #475569;
    border-radius: 7px;
    background: #020617;
    color: #e2e8f0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.cb-c-code-editor {
    min-height: 280px;
    padding: 11px;
}

.cb-c-practice-input {
    min-height: 82px;
    padding: 9px;
}

.cb-c-practice-output {
    min-height: 84px;
    max-height: 180px;
    margin: 0 !important;
    padding: 9px !important;
    overflow: auto;
    border: 1px solid #475569 !important;
    border-radius: 7px !important;
    background: #020617 !important;
    color: #e2e8f0 !important;
    white-space: pre-wrap;
}

.cb-c-output-heading,
.cb-c-tests-heading {
    margin-top: 10px !important;
}

.cb-c-practice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.cb-c-run-btn,
.cb-c-check-btn,
.cb-c-reset-btn {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    color: #ffffff;
    font-weight: 800;
}

.cb-c-run-btn {
    background: #15803d;
}

.cb-c-check-btn {
    background: #2563eb;
}

.cb-c-reset-btn {
    background: #475569;
}

.cb-c-run-btn:disabled,
.cb-c-check-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Test cases */
.cb-c-test-results {
    display: grid;
    gap: 5px;
}

.cb-c-test-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0b1220;
    color: #cbd5e1;
    font-size: 11px;
}

.cb-c-test-row.pass strong {
    color: #86efac;
}

.cb-c-test-row.fail strong {
    color: #fca5a5;
}

/* Per-problem score */
.cb-c-practice-score {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #334155;
}

.cb-c-practice-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.cb-c-score-item {
    padding: 7px;
    border: 1px solid #334155;
    border-radius: 7px;
    background: #0b1220;
    text-align: center;
}

.cb-c-score-item strong {
    display: block;
    color: #94a3b8;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .45px;
}

.cb-c-score-item span {
    display: block;
    margin-top: 2px;
    color: #f8fafc;
    font-weight: 800;
}

.cb-c-practice-message {
    margin-top: 9px;
    padding: 9px;
    border-radius: 7px;
    background: #172554;
    color: #dbeafe;
    font-weight: 700;
    text-align: center;
    line-height: 1.45;
}

.cb-c-practice-note {
    margin-top: 7px;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.5;
}

@media (max-width: 820px) {
    .cb-practice-overall-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cb-c-practice-grid {
        grid-template-columns: 1fr;
    }

    .cb-c-code-editor {
        min-height: 250px;
    }
}

@media (max-width: 520px) {
    .cb-c-practice-score-grid {
        grid-template-columns: 1fr;
    }

    .cb-c-practice-item {
        padding: 14px;
    }
}


/* ============================================================
   STRUCTURE PAGE — COMPACT INTEGRATED CONCEPT FLOWS
   Icons belong inside the actual step. No duplicate visual row.
   ============================================================ */

.cb-inline-concept-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 14px;
    padding: 10px 12px;
    overflow-x: auto;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
    scrollbar-width: thin;
}

.cb-inline-concept-step {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    min-width: 170px;
    padding: 8px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.cb-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 17px;
}

.cb-inline-concept-step strong {
    display: block;
    margin-bottom: 1px;
    color: #0d1b2a;
    font-size: 13px;
    line-height: 1.25;
}

.cb-inline-concept-step small {
    display: block;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.3;
}

.cb-inline-input .cb-inline-icon {
    background: #eff6ff;
}

.cb-inline-process .cb-inline-icon {
    background: #fff7ed;
}

.cb-inline-output .cb-inline-icon {
    background: #f0fdf4;
}

.cb-inline-flow-arrow {
    flex: 0 0 auto;
    color: #d4af37;
    font-size: 17px;
    font-weight: 900;
}

.cb-inline-execution-flow {
    justify-content: flex-start;
}

.cb-inline-flow-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    white-space: nowrap;
}

.cb-inline-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 14px;
}

.cb-inline-flow-chip strong {
    font-size: 11px;
    font-weight: 800;
}

/* The previous duplicate visual blocks are no longer used on Structure. */
.cb-ipo-visual,
.cb-execution-visual {
    display: none !important;
}

@media (max-width: 700px) {
    .cb-inline-concept-flow {
        justify-content: flex-start;
        padding: 9px;
    }

    .cb-inline-concept-step {
        min-width: 155px;
    }

    .cb-inline-flow-arrow {
        transform: none !important;
    }
}


/* ============================================================
   STRUCTURE 2.17 — COMPACT VERTICAL EXECUTION FLOW
   Direction follows the concept instead of forcing horizontal flow.
   ============================================================ */

.cb-execution-vertical-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 520px);
    margin: 10px auto 14px;
    padding: 11px 14px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
}

.cb-execution-stage {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(100%, 360px);
    padding: 7px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.cb-execution-stage-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    border-radius: 7px;
    background: #eff6ff;
    font-size: 16px;
}

.cb-execution-stage strong {
    display: block;
    color: #0d1b2a;
    font-size: 12.5px;
    line-height: 1.25;
}

.cb-execution-stage small {
    display: block;
    margin-top: 1px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.3;
}

.cb-execution-down-arrow {
    margin: 2px 0;
    color: #d4af37;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 600px) {
    .cb-execution-vertical-flow {
        width: 100%;
        padding: 9px;
    }

    .cb-execution-stage {
        width: 100%;
    }
}


/* VARIABLES & CONSTANTS — COMPACT MEMORY VISUAL */
.cb-variable-memory-visual{display:grid;grid-template-columns:auto minmax(180px,250px) minmax(220px,1fr);align-items:center;gap:12px;margin:10px 0 14px;padding:11px 12px;border:1px solid #dbe3ec;border-radius:9px;background:#f8fafc}.cb-variable-memory-icon{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:9px;background:#eff6ff;font-size:20px}.cb-variable-memory-slot{overflow:hidden;border:1px solid #bfdbfe;border-radius:8px;background:#fff}.cb-variable-memory-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 10px;border-bottom:1px solid #e2e8f0}.cb-variable-memory-row:last-child{border-bottom:0}.cb-variable-memory-row span{color:#64748b;font-size:11px}.cb-variable-memory-row strong{color:#0d1b2a;font-size:12px}.cb-variable-memory-note{color:#475569;font-size:12px;line-height:1.5}.cb-variable-memory-note code{color:#1d4ed8;font-weight:700}
/* VARIABLES VISUALIZER — VARIABLE LIFE CYCLE */
.cb-variable-lifecycle{display:flex;align-items:stretch;justify-content:center;gap:7px;padding:10px 12px;overflow-x:auto;border-bottom:1px solid #e2e8f0;background:#fff}.cb-variable-life-step{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 auto;min-width:118px;padding:8px 9px;border:1px solid #dbe3ec;border-radius:8px;background:#f8fafc;text-align:center;transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease}.cb-variable-life-step.active{border-color:#2563eb;background:#eff6ff;box-shadow:0 0 0 2px rgba(37,99,235,.10);transform:translateY(-1px)}.cb-variable-life-icon{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;margin-bottom:4px;border-radius:7px;background:#fff;font-size:16px}.cb-variable-life-step strong{color:#0d1b2a;font-size:11px}.cb-variable-life-step code{margin-top:3px;color:#475569;font-size:10px}.cb-variable-constant-step.active{border-color:#d4af37;background:#fffbeb;box-shadow:0 0 0 2px rgba(212,175,55,.12)}.cb-variable-life-arrow{display:inline-flex;align-items:center;color:#d4af37;font-size:16px;font-weight:900}.cb-variables-page .cb-original-qa-question,.cb-variables-page .cb-original-qa-number,.cb-variables-page .cb-original-qa-question>span:nth-child(2){font-weight:700!important}@media(max-width:760px){.cb-variable-memory-visual{grid-template-columns:auto 1fr}.cb-variable-memory-note{grid-column:1/-1}.cb-variable-lifecycle{justify-content:flex-start}}@media(max-width:480px){.cb-variable-memory-visual{grid-template-columns:1fr}.cb-variable-memory-icon{justify-self:start}}

/* ============================================================
   QUICK MCQs — INTERACTIVE ANSWER CHECKING
   Paste at the VERY BOTTOM of c-programming.css
   ============================================================ */

.cb-mcq-guide {
    margin: 6px 0 12px !important;
    color: #64748b;
    font-size: 13px;
}

.cb-mcq-list {
    display: grid;
    gap: 12px;
    margin: 10px 0 16px;
}

.cb-mcq-card {
    padding: 14px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
}

.cb-mcq-question {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
    color: #0d1b2a;
    line-height: 1.5;
}

.cb-mcq-number,
.cb-mcq-question strong {
    font-weight: 700;
}

.cb-mcq-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.cb-mcq-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    background: #ffffff;
    cursor: pointer;
    transition:
        border-color .15s ease,
        background .15s ease;
}

.cb-mcq-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.cb-mcq-option input {
    margin: 0;
}

.cb-mcq-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.cb-mcq-option-text {
    color: #334155;
    font-size: 13px;
}

/* Correct answer */
.cb-mcq-option.correct {
    border-color: #22c55e !important;
    background: #f0fdf4 !important;
}

.cb-mcq-option.correct .cb-mcq-letter {
    background: #dcfce7;
    color: #15803d;
}

/* Student selected a wrong answer */
.cb-mcq-option.wrong {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.cb-mcq-option.wrong .cb-mcq-letter {
    background: #fee2e2;
    color: #b91c1c;
}

.cb-mcq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.cb-mcq-check-btn,
.cb-mcq-reset-btn {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.cb-mcq-check-btn {
    background: #2563eb;
    color: #ffffff;
}

.cb-mcq-reset-btn {
    background: #64748b;
    color: #ffffff;
}

.cb-mcq-feedback {
    margin-top: 10px;
}

.cb-mcq-result {
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
}

.cb-mcq-result.correct {
    color: #15803d;
}

.cb-mcq-result.wrong {
    color: #b91c1c;
}

.cb-mcq-explanation {
    padding: 9px 11px;
    border-left: 4px solid #7dd3fc;
    border-radius: 7px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}

.cb-mcq-explanation strong {
    color: #0d1b2a;
}

.cb-mcq-explanation p {
    margin: 4px 0 0 !important;
}

.cb-depth-check {
    margin: 14px 0 18px;
    border-color: #bfdbfe;
    background: #f8fbff;
}

.cb-mcq-selected-rationale {
    margin: 0 0 9px;
    padding: 9px 11px;
    border-left: 4px solid #f59e0b;
    border-radius: 7px;
    background: #fffbeb;
    color: #713f12;
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 600px) {
    .cb-mcq-options {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   VARIABLES & CONSTANTS — CONSTANTS CONTENT + QUICK MCQs
   Paste at the VERY BOTTOM of c-programming.css
   ============================================================ */

/* -----------------------------
   CONSTANT TYPES
   ----------------------------- */

.cb-constant-types-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 12px;
}

.cb-constant-type-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-constant-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    border-radius: 7px;
    background: #eff6ff;
    font-size: 15px;
}

.cb-constant-type-card strong {
    display: block;
    color: #0d1b2a;
    font-size: 11.5px;
}

.cb-constant-type-card code {
    display: inline-block;
    margin-top: 2px;
    color: #1d4ed8;
    font-size: 11px;
}

/* -----------------------------
   VARIABLE / CONST / DEFINE SUMMARY
   ----------------------------- */

.cb-constant-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 14px;
}

.cb-constant-summary > div {
    padding: 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-constant-summary span {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

.cb-constant-summary strong {
    display: block;
    color: #0d1b2a;
    font-size: 12px;
}

.cb-constant-summary small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.4;
}


/* ============================================================
   QUICK MCQs — INTERACTIVE ANSWER CHECKING
   ============================================================ */

.cb-mcq-guide {
    margin: 6px 0 12px !important;
    color: #64748b;
    font-size: 13px;
}

.cb-mcq-list {
    display: grid;
    gap: 12px;
    margin: 10px 0 16px;
}

.cb-mcq-card {
    padding: 14px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
}

.cb-mcq-question {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
    color: #0d1b2a;
    line-height: 1.5;
}

.cb-mcq-number,
.cb-mcq-question strong {
    font-weight: 700;
}

.cb-mcq-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.cb-mcq-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    background: #ffffff;
    cursor: pointer;
    transition:
        border-color .15s ease,
        background .15s ease;
}

.cb-mcq-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.cb-mcq-option input {
    margin: 0;
}

.cb-mcq-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.cb-mcq-option-text {
    color: #334155;
    font-size: 13px;
}

/* Correct option */
.cb-mcq-option.correct {
    border-color: #22c55e !important;
    background: #f0fdf4 !important;
}

.cb-mcq-option.correct .cb-mcq-letter {
    background: #dcfce7;
    color: #15803d;
}

/* Wrong option chosen by student */
.cb-mcq-option.wrong {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.cb-mcq-option.wrong .cb-mcq-letter {
    background: #fee2e2;
    color: #b91c1c;
}

.cb-mcq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.cb-mcq-check-btn,
.cb-mcq-reset-btn {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.cb-mcq-check-btn {
    background: #2563eb;
    color: #ffffff;
}

.cb-mcq-check-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.cb-mcq-reset-btn {
    background: #64748b;
    color: #ffffff;
}

.cb-mcq-feedback {
    margin-top: 10px;
}

.cb-mcq-result {
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
}

.cb-mcq-result.correct {
    color: #15803d;
}

.cb-mcq-result.wrong {
    color: #b91c1c;
}

.cb-mcq-explanation {
    padding: 9px 11px;
    border-left: 4px solid #7dd3fc;
    border-radius: 7px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}

.cb-mcq-explanation strong {
    color: #0d1b2a;
}

.cb-mcq-explanation p {
    margin: 4px 0 0 !important;
}

@media (max-width: 760px) {
    .cb-constant-types-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cb-constant-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .cb-mcq-options,
    .cb-constant-types-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   DATA TYPES — PAGE-SPECIFIC ADDITIONS
   Paste at the VERY BOTTOM of c-programming.css
   ============================================================ */

/* ------------------------------------------------------------
   4.2 MAIN CATEGORIES — COMPACT CLASSIFICATION GRID
   ------------------------------------------------------------ */

.cb-datatype-classification {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 10px 0 14px;
}

.cb-datatype-category {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-datatype-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 7px;
    background: #eff6ff;
    font-size: 17px;
}

.cb-datatype-category strong {
    display: block;
    color: #0d1b2a;
    font-size: 12.5px;
}

.cb-datatype-category small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.35;
}

.cb-datatype-basic {
    border-left: 4px solid #2563eb;
}

.cb-datatype-void {
    border-left: 4px solid #64748b;
}

.cb-datatype-derived {
    border-left: 4px solid #d4af37;
}

.cb-datatype-user {
    border-left: 4px solid #7dd3fc;
}


/* ------------------------------------------------------------
   4.16 TYPE CONVERSION — TWO-PATH CONCEPT GUIDE
   ------------------------------------------------------------ */

.cb-conversion-guide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 10px 0 14px;
}

.cb-conversion-card {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-conversion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #ffffff;
    font-size: 16px;
}

.cb-conversion-card strong {
    display: block;
    color: #0d1b2a;
    font-size: 12px;
}

.cb-conversion-card small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.4;
}

.cb-conversion-card code {
    display: inline-block;
    margin-top: 4px;
    color: #1d4ed8;
    font-size: 10.5px;
    font-weight: 700;
}


/* ------------------------------------------------------------
   DATA TYPES QUESTION EMPHASIS
   ------------------------------------------------------------ */

.cb-data-types-page .cb-original-qa-question,
.cb-data-types-page .cb-original-qa-number,
.cb-data-types-page .cb-original-qa-question > span:nth-child(2) {
    font-weight: 700 !important;
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 650px) {

    .cb-datatype-classification,
    .cb-conversion-guide {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   INPUT & OUTPUT — PAGE-SPECIFIC ADDITIONS
   Paste at the VERY BOTTOM of c-programming.css
   ============================================================ */

/* ------------------------------------------------------------
   5.1 INPUT → PROCESSING → OUTPUT
   ------------------------------------------------------------ */

.cb-io-concept-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 14px;
    padding: 10px 12px;
    overflow-x: auto;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
}

.cb-io-flow-step {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    min-width: 175px;
    padding: 8px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.cb-io-flow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 17px;
}

.cb-io-input-step .cb-io-flow-icon {
    background: #eff6ff;
}

.cb-io-process-step .cb-io-flow-icon {
    background: #fff7ed;
}

.cb-io-output-step .cb-io-flow-icon {
    background: #f0fdf4;
}

.cb-io-flow-step strong {
    display: block;
    color: #0d1b2a;
    font-size: 12.5px;
}

.cb-io-flow-step small {
    display: block;
    margin-top: 1px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.35;
}

.cb-io-flow-arrow {
    flex: 0 0 auto;
    color: #d4af37;
    font-size: 17px;
    font-weight: 900;
}


/* ------------------------------------------------------------
   5.12 scanf() ADDRESS RELATIONSHIP
   ------------------------------------------------------------ */

.cb-scanf-address-visual {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 9px;
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
}

.cb-address-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.cb-address-card-highlight {
    border-color: #93c5fd;
    background: #eff6ff;
}

.cb-address-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #f8fafc;
    font-size: 16px;
}

.cb-address-card strong {
    display: block;
    color: #0d1b2a;
    font-size: 12px;
}

.cb-address-card small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.35;
}

.cb-address-link {
    color: #d4af37;
    font-size: 10.5px;
    font-weight: 800;
    text-align: center;
}


/* ------------------------------------------------------------
   INPUT & OUTPUT QUESTION EMPHASIS
   ------------------------------------------------------------ */

.cb-input-output-page .cb-original-qa-question,
.cb-input-output-page .cb-original-qa-number,
.cb-input-output-page .cb-original-qa-question > span:nth-child(2) {
    font-weight: 700 !important;
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    .cb-io-concept-flow {
        justify-content: flex-start;
    }

    .cb-scanf-address-visual {
        grid-template-columns: 1fr;
    }

    .cb-address-link {
        padding: 1px 0;
    }
}

/* ============================================================
   OPERATORS — PAGE-SPECIFIC ADDITIONS
   Paste at the VERY BOTTOM of c-programming.css
   ============================================================ */


/* ------------------------------------------------------------
   6.2 TYPES OF OPERATORS — COMPACT CLASSIFICATION GRID
   ------------------------------------------------------------ */

.cb-operator-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 14px;
}

.cb-operator-category {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-operator-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #eff6ff;
    font-size: 16px;
}

.cb-operator-category strong {
    display: block;
    color: #0d1b2a;
    font-size: 12px;
}

.cb-operator-category small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.35;
}


/* ------------------------------------------------------------
   6.13 SHORT-CIRCUIT EVALUATION
   ------------------------------------------------------------ */

.cb-short-circuit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 10px 0 14px;
}

.cb-short-circuit-card {
    padding: 10px 11px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-short-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: #0d1b2a;
    font-size: 12px;
}

.cb-short-path {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
    color: #475569;
    font-size: 10.5px;
    white-space: nowrap;
}

.cb-short-path b {
    color: #d4af37;
}

.cb-short-skip {
    padding: 3px 6px;
    border-radius: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.cb-short-circuit-card small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.4;
}


/* ------------------------------------------------------------
   6.16 PRE-INCREMENT / POST-INCREMENT
   ------------------------------------------------------------ */

.cb-inc-process {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 12px;
    padding: 9px 10px;
    overflow-x: auto;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-inc-step {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-width: 165px;
    padding: 7px 8px;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    background: #ffffff;
}

.cb-inc-step strong {
    display: block;
    color: #0d1b2a;
    font-size: 11px;
}

.cb-inc-step small {
    display: block;
    margin-top: 1px;
    color: #64748b;
    font-size: 10px;
}

.cb-inc-arrow {
    flex: 0 0 auto;
    color: #d4af37;
    font-weight: 900;
}

.cb-inc-result {
    flex: 0 0 auto;
    padding: 6px 8px;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 10.5px;
    font-weight: 800;
}


/* ------------------------------------------------------------
   PREMIUM OPERATOR EVALUATION VISUALIZER
   ------------------------------------------------------------ */

.cb-operator-evaluation-flow {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    overflow-x: auto;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.cb-operator-eval-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 125px;
    padding: 8px 9px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.cb-operator-eval-step > span:first-child {
    margin-bottom: 3px;
    font-size: 16px;
}

.cb-operator-eval-step strong {
    color: #0d1b2a;
    font-size: 11px;
}

.cb-operator-eval-step code {
    margin-top: 3px;
    color: #475569;
    font-size: 10px;
}

.cb-operator-eval-step.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
    transform: translateY(-1px);
}

.cb-operator-eval-arrow {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: #d4af37;
    font-size: 16px;
    font-weight: 900;
}


/* ------------------------------------------------------------
   QUESTION EMPHASIS
   ------------------------------------------------------------ */

.cb-operators-page .cb-original-qa-question,
.cb-operators-page .cb-original-qa-number,
.cb-operators-page .cb-original-qa-question > span:nth-child(2) {
    font-weight: 700 !important;
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    .cb-operator-category-grid,
    .cb-short-circuit-grid {
        grid-template-columns: 1fr;
    }

    .cb-inc-process,
    .cb-operator-evaluation-flow {
        justify-content: flex-start;
    }
}/* ============================================================
   OPERATORS — PAGE-SPECIFIC ADDITIONS
   Paste at the VERY BOTTOM of c-programming.css
   ============================================================ */


/* ------------------------------------------------------------
   6.2 TYPES OF OPERATORS — COMPACT CLASSIFICATION GRID
   ------------------------------------------------------------ */

.cb-operator-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 14px;
}

.cb-operator-category {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-operator-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #eff6ff;
    font-size: 16px;
}

.cb-operator-category strong {
    display: block;
    color: #0d1b2a;
    font-size: 12px;
}

.cb-operator-category small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.35;
}


/* ------------------------------------------------------------
   6.13 SHORT-CIRCUIT EVALUATION
   ------------------------------------------------------------ */

.cb-short-circuit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 10px 0 14px;
}

.cb-short-circuit-card {
    padding: 10px 11px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-short-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: #0d1b2a;
    font-size: 12px;
}

.cb-short-path {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
    color: #475569;
    font-size: 10.5px;
    white-space: nowrap;
}

.cb-short-path b {
    color: #d4af37;
}

.cb-short-skip {
    padding: 3px 6px;
    border-radius: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.cb-short-circuit-card small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.4;
}


/* ------------------------------------------------------------
   6.16 PRE-INCREMENT / POST-INCREMENT
   ------------------------------------------------------------ */

.cb-inc-process {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 12px;
    padding: 9px 10px;
    overflow-x: auto;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
}

.cb-inc-step {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-width: 165px;
    padding: 7px 8px;
    border: 1px solid #dbe3ec;
    border-radius: 7px;
    background: #ffffff;
}

.cb-inc-step strong {
    display: block;
    color: #0d1b2a;
    font-size: 11px;
}

.cb-inc-step small {
    display: block;
    margin-top: 1px;
    color: #64748b;
    font-size: 10px;
}

.cb-inc-arrow {
    flex: 0 0 auto;
    color: #d4af37;
    font-weight: 900;
}

.cb-inc-result {
    flex: 0 0 auto;
    padding: 6px 8px;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 10.5px;
    font-weight: 800;
}


/* ------------------------------------------------------------
   PREMIUM OPERATOR EVALUATION VISUALIZER
   ------------------------------------------------------------ */

.cb-operator-evaluation-flow {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    overflow-x: auto;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.cb-operator-eval-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 125px;
    padding: 8px 9px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.cb-operator-eval-step > span:first-child {
    margin-bottom: 3px;
    font-size: 16px;
}

.cb-operator-eval-step strong {
    color: #0d1b2a;
    font-size: 11px;
}

.cb-operator-eval-step code {
    margin-top: 3px;
    color: #475569;
    font-size: 10px;
}

.cb-operator-eval-step.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .10);
    transform: translateY(-1px);
}

.cb-operator-eval-arrow {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: #d4af37;
    font-size: 16px;
    font-weight: 900;
}


/* ------------------------------------------------------------
   QUESTION EMPHASIS
   ------------------------------------------------------------ */

.cb-operators-page .cb-original-qa-question,
.cb-operators-page .cb-original-qa-number,
.cb-operators-page .cb-original-qa-question > span:nth-child(2) {
    font-weight: 700 !important;
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    .cb-operator-category-grid,
    .cb-short-circuit-grid {
        grid-template-columns: 1fr;
    }

    .cb-inc-process,
    .cb-operator-evaluation-flow {
        justify-content: flex-start;
    }
}

/* ============================================================
   CODEBHAVYA C PROGRAMMING — COMMON UI STANDARD
   Paste ONCE at the VERY BOTTOM of c-programming.css

   Applies to all C topic pages:
   1. Clear colored lesson headings
   2. CodeBhavya branding on Program Tracing
   3. CodeBhavya branding on Solve It Yourself workspaces
   4. Reusable attractive step boxes with arrows
   ============================================================ */


/* ============================================================
   1. COMMON LESSON HEADING COLORS
   ============================================================ */

.cb-c-topic-page .content-card > h2,
.cb-c-topic-page .content-card > h3,
.cb-c-topic-page .content-card > h4,
.cb-c-topic-page .cb-c-dsa-practice-section > h3 {
    color: #153b6f;
}

.cb-c-topic-page .content-card > h2 {
    font-weight: 800;
}

.cb-c-topic-page .content-card > h3,
.cb-c-topic-page .cb-c-dsa-practice-section > h3 {
    font-weight: 800;
}

.cb-c-topic-page .content-card > h4 {
    font-weight: 700;
}


/* ============================================================
   2. COMMON PROGRAM TRACING BRAND BAR
   CSS-only: works on existing tracers without changing old HTML.

   If a tracer already contains the real branded topbar and has
   class .cb-tracer-branded, this pseudo topbar is not added.
   ============================================================ */

.cb-c-topic-page .cb-tracer:not(.cb-tracer-branded)::before {
    content: "PROGRAM TRACING";
    display: block;

    min-height: 52px;
    padding: 16px 210px 14px 16px;

    background-color: #061b37;
    background-image: url("../images/codebhavya-main-logo.png");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: auto 36px;

    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;

    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
}

.cb-c-topic-page .cb-tracer {
    overflow: hidden;
}


/* ============================================================
   3. COMMON SOLVE IT YOURSELF BRAND BAR
   CSS-only: automatically appears on every existing
   .cb-c-practice-workspace in all C pages.
   ============================================================ */

.cb-c-topic-page .cb-c-practice-workspace::before {
    content: "INTERACTIVE CODING PRACTICE";
    display: block;

    min-height: 52px;
    padding: 16px 210px 14px 16px;

    background-color: #061b37;
    background-image: url("../images/codebhavya-main-logo.png");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: auto 36px;

    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;

    box-sizing: border-box;
}

.cb-c-topic-page .cb-c-practice-workspace {
    overflow: hidden;
}

.cb-c-topic-page .cb-c-practice-workspace-title {
    margin: 0;
    padding: 12px 14px;

    border-bottom: 1px solid #dbe3ec;

    background: #f8fafc;
    color: #0d1b2a;

    font-weight: 800;
}


/* ============================================================
   4. COMMON ATTRACTIVE STEP BOXES
   Use this same HTML class system whenever a concept needs
   sequential visual steps.
   ============================================================ */

.cb-mini-step-flow {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 8px;

    width: min(100%, 440px);
    margin: 14px auto;
}

.cb-mini-step-card {
    width: 100%;

    padding: 13px 15px;

    border: 1px solid #dbe3ec;
    border-radius: 12px;

    box-shadow: 0 5px 16px rgba(2, 12, 27, 0.04);

    box-sizing: border-box;
}

.cb-mini-step-badge {
    display: inline-block;

    margin-bottom: 6px;
    padding: 4px 9px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.72);

    color: #153b6f;

    font-size: 11px;
    font-weight: 800;
}

.cb-mini-step-text {
    color: #0d1b2a;

    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;

    text-align: center;
}

.cb-mini-step-subtext {
    margin-top: 5px;

    color: #64748b;

    font-size: 12px;
    line-height: 1.45;

    text-align: center;
}

.cb-mini-step-arrow {
    color: #d4af37;

    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}


/* Reusable light backgrounds */

.cb-mini-step-card-blue {
    background: #eff6ff;
}

.cb-mini-step-card-green {
    background: #f0fdf4;
}

.cb-mini-step-card-gold {
    background: #fff7ed;
}

.cb-mini-step-card-purple {
    background: #f5f3ff;
}

.cb-mini-step-card-pink {
    background: #fdf2f8;
}

.cb-mini-step-card-sky {
    background: #f0f9ff;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .cb-c-topic-page .cb-tracer:not(.cb-tracer-branded)::before,
    .cb-c-topic-page .cb-c-practice-workspace::before {
        min-height: 48px;

        padding: 14px 145px 12px 12px;

        background-position: right 10px center;
        background-size: auto 28px;

        font-size: 10px;
        letter-spacing: 0.10em;
    }

    .cb-mini-step-flow {
        width: 100%;
    }

    .cb-mini-step-card {
        padding: 11px 12px;
    }

    .cb-mini-step-text {
        font-size: 16px;
    }
}

/* ============================================================
   CODEBHAVYA C PROGRAMMING — COMMON UI FIX v2
   Paste ONCE at the VERY BOTTOM of c-programming.css

   This replaces the earlier common branding patch.
   ============================================================ */


/* ============================================================
   1. ALL C LESSON HEADINGS
   ============================================================ */

.main-content .content-card > h2,
.main-content .content-card > h3,
.main-content .content-card > h4,
.main-content .cb-c-dsa-practice-section > h3 {
    color: #153b6f !important;
}

.main-content .content-card > h2 {
    font-weight: 800;
}

.main-content .content-card > h3,
.main-content .cb-c-dsa-practice-section > h3 {
    font-weight: 800;
}

.main-content .content-card > h4 {
    font-weight: 700;
}


/* ============================================================
   2. REMOVE THE OLD CSS-ONLY LOGO BARS
   The new common JS inserts the REAL logo + CodeBhavya wordmark.
   ============================================================ */

.cb-tracer::before,
.cb-c-practice-workspace::before {
    content: none !important;
    display: none !important;
}


/* ============================================================
   3. COMMON REAL CODEBHAVYA BRAND BAR
   Same visual family for:
   - Visualizer
   - Program Tracing
   - Solve It Yourself
   ============================================================ */

.cb-common-brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 14px 18px;

    border-bottom: 1px solid #e2e8f0;

    background: #ffffff;
}

.cb-common-brand-label {
    color: #2563eb;

    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.15em;

    text-transform: uppercase;
}

.cb-common-brand {
    display: flex;
    align-items: center;
    gap: 9px;

    white-space: nowrap;

    font-size: 18px;
    font-weight: 900;
}

.cb-common-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border: 1px solid #dbe3ec;
    border-radius: 10px;

    background: #ffffff;

    box-shadow: 0 5px 16px rgba(2, 12, 27, 0.08);
}

.cb-common-brand-mark img {
    display: block;

    width: 28px;
    height: 28px;

    object-fit: contain;
}

.cb-common-brand-code {
    color: #2563eb;
}

.cb-common-brand-bhavya {
    color: #f59e0b;
}


/* ============================================================
   4. PROGRAM TRACING — COMMON WORKING DESIGN
   ============================================================ */

.cb-tracer {
    overflow: hidden;

    border: 1px solid #dbe3ec;
    border-radius: 13px;

    background: #ffffff;
}

.cb-tracer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);

    border-top: 0;
}

.cb-tracer-code-wrap,
.cb-tracer-state-wrap {
    min-width: 0;
    padding: 14px;
}

.cb-tracer-code-wrap {
    border-right: 1px solid #dbe3ec;
}

.cb-tracer-heading {
    margin-bottom: 9px;

    color: #0d1b2a;

    font-size: 14px;
    font-weight: 800;
}

.cb-tracer-code {
    display: block;

    height: 340px;
    min-height: 340px;
    max-height: 340px;

    margin: 0;
    padding: 12px 0;

    overflow: auto;

    border: 1px solid #17233c;
    border-radius: 10px;

    background: #07152f !important;
    color: #e5eefc !important;

    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.cb-trace-line {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);

    min-width: max-content;
}

.cb-trace-line-no {
    padding: 4px 8px 4px 12px;

    color: #7186aa;

    text-align: right;
    user-select: none;
}

.cb-trace-line-code {
    padding: 4px 16px 4px 10px;

    color: #e5eefc;

    white-space: pre;
}

.cb-trace-line-active {
    background: rgba(37, 99, 235, 0.20);
    box-shadow: inset 4px 0 0 #2563eb;
}

.cb-tracer-note {
    min-height: 62px;

    margin-bottom: 11px;
    padding: 11px 13px;

    border: 1px solid #dbe3ec;
    border-left: 4px solid #d4af37;
    border-radius: 9px;

    background: #f8fafc;

    color: #475569;

    font-size: 12px;
    line-height: 1.5;
}

.cb-live-state {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));

    gap: 8px;

    margin-bottom: 13px;
}

.cb-live-state-card {
    padding: 9px 10px;

    border: 1px solid #dbe3ec;
    border-radius: 8px;

    background: #eff6ff;
}

.cb-live-state-name {
    display: block;

    margin-bottom: 3px;

    color: #64748b;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;

    text-transform: uppercase;
}

.cb-live-state-value {
    display: block;

    color: #0d1b2a;

    font-size: 17px;
    font-weight: 900;
}

.cb-tracer-output strong {
    display: block;

    margin-bottom: 7px;

    color: #153b6f;
}

.cb-tracer-output pre {
    min-height: 82px;

    margin: 0;
    padding: 12px;

    border-radius: 9px;

    background: #07152f !important;
    color: #e5eefc !important;

    white-space: pre-wrap;
}

.cb-tracer .cb-standard-controls {
    padding: 12px 14px;

    border-top: 1px solid #dbe3ec;

    background: #ffffff;
}

.cb-tracer-status {
    padding: 0 14px 12px;

    color: #64748b;

    font-size: 12px;
    font-weight: 800;
}


/* ============================================================
   5. SOLVE IT YOURSELF — COMMON BRANDING
   ============================================================ */

.cb-c-practice-workspace {
    overflow: hidden;

    border-radius: 12px;
}

.cb-c-practice-workspace > .cb-common-brandbar {
    border-bottom: 1px solid #1e293b;
}

.cb-c-practice-workspace-title {
    margin: 0 !important;

    padding: 11px 14px !important;

    background: #0d1b2a !important;
    color: #ffffff !important;

    font-weight: 800 !important;
}


/* ============================================================
   6. VISUALIZER — CLEAR MOVEMENT / CURRENT STEP
   ============================================================ */

[data-cb-viz] [data-cb-flow-step] {
    opacity: 0.62;

    transition:
        opacity .22s ease,
        transform .22s ease,
        border-color .22s ease,
        background .22s ease,
        box-shadow .22s ease;
}

[data-cb-viz] [data-cb-flow-step].active {
    opacity: 1;

    transform: translateY(-4px) scale(1.035);

    border-color: #2563eb !important;

    background: #eff6ff !important;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10),
        0 10px 24px rgba(37, 99, 235, 0.12);
}

.cb-expression-visual-flow,
.cb-operator-evaluation-flow {
    display: flex !important;
    align-items: stretch;
    justify-content: center;

    gap: 8px;

    padding: 13px 14px;

    overflow-x: auto;

    background: #ffffff;
}

.cb-expression-visual-step,
.cb-operator-eval-step {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-width: 135px;

    padding: 10px 11px;

    border: 1px solid #dbe3ec;
    border-radius: 10px;

    background: #f8fafc;

    text-align: center;
}

.cb-expression-visual-step strong,
.cb-operator-eval-step strong {
    color: #153b6f;

    font-size: 12px;
}

.cb-expression-visual-step code,
.cb-operator-eval-step code {
    margin-top: 4px;

    color: #075985;

    font-size: 11px;
}

.cb-expression-visual-arrow,
.cb-operator-eval-arrow {
    display: inline-flex !important;
    align-items: center;

    flex: 0 0 auto;

    color: #d4af37;

    font-size: 19px;
    font-weight: 900;
}


/* ============================================================
   7. COMMON ATTRACTIVE STEP BOXES
   ============================================================ */

.cb-mini-step-flow {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 8px;

    width: min(100%, 460px);
    margin: 13px auto;
}

.cb-mini-step-card {
    width: 100%;

    padding: 13px 15px;

    border: 1px solid #dbe3ec;
    border-radius: 11px;

    box-sizing: border-box;

    box-shadow: 0 5px 16px rgba(2, 12, 27, 0.05);
}

.cb-mini-step-badge {
    display: inline-block;

    margin-bottom: 6px;
    padding: 4px 9px;

    border-radius: 999px;

    background: rgba(255,255,255,.82);

    color: #153b6f;

    font-size: 11px;
    font-weight: 900;
}

.cb-mini-step-text {
    color: #0d1b2a;

    font-size: 17px;
    font-weight: 900;

    line-height: 1.4;

    text-align: center;
}

.cb-mini-step-subtext {
    margin-top: 5px;

    color: #64748b;

    font-size: 12px;

    line-height: 1.45;

    text-align: center;
}

.cb-mini-step-arrow {
    color: #d4af37;

    font-size: 21px;
    font-weight: 900;
    line-height: 1;
}

.cb-mini-step-card-blue {
    background: #eff6ff;
}

.cb-mini-step-card-green {
    background: #f0fdf4;
}

.cb-mini-step-card-gold {
    background: #fff7ed;
}

.cb-mini-step-card-purple {
    background: #f5f3ff;
}

.cb-mini-step-card-pink {
    background: #fdf2f8;
}


/* ============================================================
   8. EXISTING EXPRESSIONS 7.21 STEP FLOW
   Make it attractive even without changing old HTML.
   ============================================================ */

.cb-expression-eval-vertical {
    display: flex !important;
    flex-direction: column;
    align-items: center;

    width: min(100%, 470px);

    margin: 13px auto;
    padding: 12px;

    border: 1px solid #dbe3ec;
    border-radius: 12px;

    background: #f8fafc;
}

.cb-expression-eval-stage {
    display: flex !important;
    align-items: center;

    gap: 10px;

    width: 100%;

    padding: 11px 12px;

    border: 1px solid #dbe3ec;
    border-radius: 10px;

    background: #eff6ff;
}

.cb-expression-eval-stage:nth-of-type(2) {
    background: #f5f3ff;
}

.cb-expression-eval-stage:nth-of-type(3) {
    background: #fff7ed;
}

.cb-expression-eval-stage:nth-of-type(4) {
    background: #f0f9ff;
}

.cb-expression-eval-stage.cb-expression-eval-final {
    background: #f0fdf4;
    border-color: #86efac;
}

.cb-expression-eval-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 29px;
    height: 29px;

    border-radius: 8px;

    background: #ffffff;

    color: #2563eb;

    font-size: 12px;
    font-weight: 900;
}

.cb-expression-eval-stage strong {
    display: block;

    color: #153b6f;

    font-size: 12px;
}

.cb-expression-eval-stage code {
    display: block;

    margin-top: 2px;

    color: #075985;

    font-size: 11px;
}

.cb-expression-eval-down {
    margin: 2px 0;

    color: #d4af37;

    font-size: 20px;
    font-weight: 900;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 850px) {

    .cb-tracer-grid {
        grid-template-columns: 1fr;
    }

    .cb-tracer-code-wrap {
        border-right: 0;
        border-bottom: 1px solid #dbe3ec;
    }

    .cb-expression-visual-flow,
    .cb-operator-evaluation-flow {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {

    .cb-common-brandbar {
        padding: 11px 12px;
    }

    .cb-common-brand-label {
        font-size: 9px;
        letter-spacing: 0.10em;
    }

    .cb-common-brand {
        gap: 6px;
        font-size: 14px;
    }

    .cb-common-brand-mark {
        width: 34px;
        height: 34px;
    }

    .cb-common-brand-mark img {
        width: 24px;
        height: 24px;
    }
}

/* ============================================================
   CODEBHAVYA C — FINAL TRACER + PRACTICE BRAND REPAIR
   Paste at the VERY BOTTOM of c-programming.css

   IMPORTANT:
   - No JS change is required.
   - This intentionally overrides the earlier Common UI v1/v2 tracer rules.
   ============================================================ */


/* ============================================================
   A. USE ONE BRAND SYSTEM ONLY
   Hide the earlier JS-inserted brandbar if present.
   The real common brand is created below with CSS pseudo-elements.
   ============================================================ */

.cb-common-brandbar {
    display: none !important;
}


/* ============================================================
   B. PROGRAM TRACING — SAME BRAND FAMILY AS VISUALIZER
   ============================================================ */

.cb-tracer {
    position: relative !important;

    padding-top: 64px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    border: 1px solid #dbe3ec !important;
    border-radius: 12px !important;

    background: #ffffff !important;
}


/* White branding bar + left label + logo */

.cb-tracer::before {
    content: "PROGRAM TRACING" !important;

    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    display: flex !important;
    align-items: center !important;

    height: 64px !important;

    padding: 0 185px 0 18px !important;

    box-sizing: border-box !important;

    border-bottom: 1px solid #e2e8f0 !important;

    background-color: #ffffff !important;
    background-image: url("../images/codebhavya-icon-32.png") !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 132px) center !important;
    background-size: 40px 40px !important;

    color: #2563eb !important;

    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 0.15em !important;

    text-transform: uppercase !important;

    z-index: 2 !important;
}


/* CodeBhavya wordmark on right */

.cb-tracer::after {
    content: "CodeBhavya" !important;

    position: absolute !important;
    top: 17px !important;
    right: 18px !important;

    display: block !important;

    font-size: 21px !important;
    font-weight: 900 !important;
    line-height: 30px !important;

    letter-spacing: -0.02em !important;

    color: transparent !important;

    background:
        linear-gradient(
            90deg,
            #2563eb 0%,
            #2563eb 43%,
            #f59e0b 43%,
            #f59e0b 100%
        ) !important;

    -webkit-background-clip: text !important;
    background-clip: text !important;

    z-index: 3 !important;
}


/* ============================================================
   C. RESTORE THE OLD PROGRAM TRACER PROPERTIES
   Works with both the old and the later V2 tracer markup.
   ============================================================ */

.cb-tracer-grid {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(300px, .9fr) !important;

    min-width: 850px !important;

    border-top: 0 !important;
}

.cb-tracer-code-wrap,
.cb-tracer-state-wrap {
    min-width: 0 !important;
    padding: 10px !important;
}

.cb-tracer-code-wrap {
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 0 !important;
}

.cb-tracer-heading {
    margin-bottom: 6px !important;

    color: #0d1b2a !important;

    font-size: 12px !important;
    font-weight: 900 !important;
}


/* Original compact dark code window */

.cb-tracer-code {
    display: block !important;

    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;

    margin: 0 !important;
    padding: 8px 0 !important;

    overflow: auto !important;

    border: 0 !important;
    border-radius: 7px !important;

    background: #0b1220 !important;
    color: #e5e7eb !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-size: 13px !important;
    line-height: 1.45 !important;
}


/* V2 JS adds line number/code child spans.
   Hide the extra line number so the tracer returns to the
   clean CodeBhavya style used before the branding patch. */

.cb-trace-line {
    display: block !important;

    min-width: 0 !important;
    min-height: 19px !important;

    padding: 0 11px !important;

    white-space: pre !important;

    box-shadow: none !important;
}

.cb-trace-line-no {
    display: none !important;
}

.cb-trace-line-code {
    display: block !important;

    padding: 0 !important;

    color: #e5e7eb !important;

    white-space: pre !important;
}


/* Support both old .active and V2 .cb-trace-line-active */

.cb-trace-line.active,
.cb-trace-line.cb-trace-line-active {
    padding-left: 7px !important;

    border-left: 4px solid #d4af37 !important;

    background: #1e3a5f !important;

    box-shadow: none !important;
}


/* Explanation */

.cb-tracer-note {
    min-height: 50px !important;

    margin: 0 !important;
    padding: 9px !important;

    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #d4af37 !important;
    border-radius: 7px !important;

    background: #f8fafc !important;

    color: #475569 !important;

    font-size: 12px !important;
    line-height: 1.45 !important;
}


/* Live variables */

.cb-live-state {
    display: grid !important;

    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;

    gap: 7px !important;

    margin-top: 8px !important;
    margin-bottom: 0 !important;
}


/* Old renderer cards */

.cb-state-item {
    padding: 8px !important;

    border: 1px solid #e2e8f0 !important;
    border-radius: 7px !important;

    background: #ffffff !important;
}

.cb-state-item strong {
    display: block !important;

    color: #64748b !important;

    font-size: 9px !important;

    text-transform: uppercase !important;
}

.cb-state-item span {
    color: #0d1b2a !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-weight: 800 !important;

    word-break: break-word !important;
}


/* V2 renderer cards — make them match the same old style */

.cb-live-state-card {
    padding: 8px !important;

    border: 1px solid #e2e8f0 !important;
    border-radius: 7px !important;

    background: #ffffff !important;
}

.cb-live-state-name {
    display: block !important;

    margin: 0 !important;

    color: #64748b !important;

    font-size: 9px !important;
    font-weight: 800 !important;

    text-transform: uppercase !important;
}

.cb-live-state-value {
    display: block !important;

    margin-top: 2px !important;

    color: #0d1b2a !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-size: 14px !important;
    font-weight: 800 !important;
}


/* Output */

.cb-tracer-output {
    margin-top: 8px !important;
}

.cb-tracer-output strong {
    display: block !important;

    margin-bottom: 6px !important;

    color: #153b6f !important;
}

.cb-tracer-output pre {
    min-height: 65px !important;
    max-height: 100px !important;

    margin: 0 !important;
    padding: 10px !important;

    overflow: auto !important;

    border-radius: 7px !important;

    background: #0b1220 !important;
    color: #e5e7eb !important;
}


/* Controls/status stay like our approved tracer */

.cb-tracer .cb-standard-controls {
    padding: 10px !important;

    border-top: 1px solid #e2e8f0 !important;

    background: #ffffff !important;
}

.cb-tracer-status {
    padding: 0 11px 10px !important;

    color: #64748b !important;

    font-size: 11px !important;
    font-weight: 800 !important;
}


/* ============================================================
   D. SOLVE IT YOURSELF — SAME LOGO + CODEBHAVYA WORDMARK
   Applies automatically to ALL C pages.
   ============================================================ */

.cb-c-practice-workspace {
    position: relative !important;

    padding:
        76px
        12px
        12px
        12px !important;

    overflow: hidden !important;

    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;

    background: #0f172a !important;
}


/* White brand bar */

.cb-c-practice-workspace::before {
    content: "INTERACTIVE CODING PRACTICE" !important;

    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    display: flex !important;
    align-items: center !important;

    height: 64px !important;

    padding: 0 185px 0 18px !important;

    box-sizing: border-box !important;

    border-bottom: 1px solid #e2e8f0 !important;

    background-color: #ffffff !important;
    background-image:
        url("../images/codebhavya-icon-32.png") !important;

    background-repeat: no-repeat !important;

    background-position:
        calc(100% - 132px)
        center !important;

    background-size:
        40px
        40px !important;

    color: #2563eb !important;

    font-size: 12px !important;
    font-weight: 900 !important;

    letter-spacing: 0.15em !important;

    text-transform: uppercase !important;

    z-index: 2 !important;
}


/* CodeBhavya wordmark */

.cb-c-practice-workspace::after {
    content: "CodeBhavya" !important;

    position: absolute !important;
    top: 17px !important;
    right: 18px !important;

    display: block !important;

    font-size: 21px !important;
    font-weight: 900 !important;
    line-height: 30px !important;

    letter-spacing: -0.02em !important;

    color: transparent !important;

    background:
        linear-gradient(
            90deg,
            #2563eb 0%,
            #2563eb 43%,
            #f59e0b 43%,
            #f59e0b 100%
        ) !important;

    -webkit-background-clip: text !important;
    background-clip: text !important;

    z-index: 3 !important;
}


/* Keep the old dark Solve It Yourself properties */

.cb-c-practice-workspace-title {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;

    background: transparent !important;

    color: #f8fafc !important;

    font-weight: 800 !important;
}

.cb-c-practice-grid {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(280px, .85fr) !important;

    gap: 10px !important;
}

.cb-c-practice-panel {
    padding: 10px !important;

    border: 1px solid #334155 !important;
    border-radius: 8px !important;

    background: #111827 !important;
}

.cb-c-practice-panel h4 {
    margin: 0 0 6px !important;

    color: #e2e8f0 !important;

    font-size: 12px !important;
}


/* ============================================================
   E. MOBILE
   Tracer intentionally remains horizontal/two-pane.
   ============================================================ */

@media (max-width: 850px) {

    .cb-tracer-grid {
        grid-template-columns:
            minmax(0, 1.1fr)
            minmax(300px, .9fr) !important;

        min-width: 850px !important;
    }

    .cb-tracer-code-wrap {
        border-right:
            1px solid #e2e8f0 !important;

        border-bottom:
            0 !important;
    }
}


@media (max-width: 600px) {

    .cb-tracer::before,
    .cb-c-practice-workspace::before {
        height: 56px !important;

        padding-left: 12px !important;

        background-position:
            calc(100% - 105px)
            center !important;

        background-size:
            32px
            32px !important;

        font-size: 9px !important;

        letter-spacing:
            .09em !important;
    }

    .cb-tracer::after,
    .cb-c-practice-workspace::after {
        top: 14px !important;
        right: 10px !important;

        font-size: 16px !important;
    }

    .cb-tracer {
        padding-top: 56px !important;
    }

    .cb-c-practice-workspace {
        padding-top: 68px !important;
    }
}

/* ============================================================
   CODEBHAVYA — FINAL TWO SMALL FIXES
   Paste at the VERY BOTTOM of c-programming.css

   Fix 1: remove large gaps between tracer code lines
   Fix 2: separate logo and CodeBhavya wordmark
   ============================================================ */


/* ============================================================
   1. PROGRAM TRACER — NORMAL COMPACT LINE SPACING

   The current tracer JS creates formatted HTML inside a <pre>.
   The indentation/newline text nodes inside that <pre> can create
   unwanted vertical space.

   Setting the PRE's own font-size/line-height to zero removes only
   those whitespace text nodes. Actual program lines immediately
   restore the normal code size.
   ============================================================ */

.cb-tracer-code {
    font-size: 0 !important;
    line-height: 0 !important;
}

.cb-trace-line {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    min-height: 19px !important;

    font-size: 13px !important;
    line-height: 19px !important;
}

.cb-trace-line-code {
    display: block !important;

    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    font-size: 13px !important;
    line-height: 19px !important;
}


/* Keep highlighted line compact too */

.cb-trace-line.active,
.cb-trace-line.cb-trace-line-active {
    min-height: 19px !important;

    font-size: 13px !important;
    line-height: 19px !important;
}


/* ============================================================
   2. BRAND — GIVE THE LOGO AND WORDMARK PROPER SPACE

   Previous logo center was too close to the text.
   Move the logo farther left and give the wordmark a fixed area.
   Applies to BOTH:
   - Program Tracing
   - Solve It Yourself
   ============================================================ */

.cb-tracer::before,
.cb-c-practice-workspace::before {
    background-position:
        calc(100% - 185px)
        center !important;

    background-size:
        38px
        38px !important;
}

.cb-tracer::after,
.cb-c-practice-workspace::after {
    right: 18px !important;

    width: 135px !important;

    text-align: left !important;

    white-space: nowrap !important;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .cb-tracer::before,
    .cb-c-practice-workspace::before {
        background-position:
            calc(100% - 135px)
            center !important;

        background-size:
            30px
            30px !important;
    }

    .cb-tracer::after,
    .cb-c-practice-workspace::after {
        right: 8px !important;

        width: 100px !important;

        font-size: 16px !important;
    }
}

/* ============================================================
   CODEBHAVYA COMMON C UI — FINAL v3
   Paste this at the VERY BOTTOM of c-programming.css

   Fixes:
   1. Program tracer code lines become compact again.
   2. Uses the REAL JS-inserted logo + CodeBhavya wordmark.
   3. Removes pseudo-element branding that caused logo/text overlap.
   4. Applies the same clean brand bar to Solve It Yourself.
   ============================================================ */


/* ============================================================
   A. REMOVE THE OLD PSEUDO BRAND SYSTEM
   ============================================================ */

.cb-tracer::before,
.cb-tracer::after,
.cb-c-practice-workspace::before,
.cb-c-practice-workspace::after {
    content: none !important;
    display: none !important;
}


/* ============================================================
   B. SHOW THE REAL BRAND BAR CREATED BY c-programming.js
   ============================================================ */

.cb-common-brandbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 18px !important;

    min-height: 62px !important;
    padding: 10px 18px !important;

    border-bottom: 1px solid #e2e8f0 !important;

    background: #ffffff !important;

    box-sizing: border-box !important;
}

.cb-common-brand-label {
    flex: 1 1 auto !important;

    color: #2563eb !important;

    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 0.15em !important;

    text-transform: uppercase !important;
}

.cb-common-brand {
    display: flex !important;
    align-items: center !important;

    flex: 0 0 auto !important;

    gap: 9px !important;

    margin-left: auto !important;

    white-space: nowrap !important;

    font-size: 20px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.cb-common-brand-mark {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 40px !important;

    width: 40px !important;
    height: 40px !important;

    margin-right: 1px !important;

    border: 1px solid #dbe3ec !important;
    border-radius: 10px !important;

    background: #ffffff !important;

    box-shadow: 0 5px 16px rgba(2, 12, 27, 0.08) !important;

    overflow: hidden !important;
}

.cb-common-brand-mark img {
    display: block !important;

    width: 28px !important;
    height: 28px !important;

    max-width: 28px !important;

    object-fit: contain !important;
}

.cb-common-brand-code {
    display: inline-block !important;

    color: #2563eb !important;
}

.cb-common-brand-bhavya {
    display: inline-block !important;

    margin-left: -7px !important;

    color: #f59e0b !important;
}


/* ============================================================
   C. PROGRAM TRACING — REMOVE ARTIFICIAL TOP PADDING
   ============================================================ */

.cb-tracer {
    position: relative !important;

    padding-top: 0 !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    border: 1px solid #dbe3ec !important;
    border-radius: 12px !important;

    background: #ffffff !important;
}


/* ============================================================
   D. PROGRAM CODE — COMPACT NORMAL LINE SPACING

   IMPORTANT:
   The V2 JS writes <div> lines into a <pre>. Because <pre> preserves
   whitespace, indentation/newline text nodes between those DIVs can
   create large blank gaps.

   white-space: normal on the parent collapses those extra text nodes.
   Actual code indentation is restored on each real code line below.
   ============================================================ */

.cb-tracer-code {
    display: block !important;

    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;

    margin: 0 !important;
    padding: 8px 0 !important;

    overflow: auto !important;

    border: 0 !important;
    border-radius: 7px !important;

    background: #0b1220 !important;
    color: #e5e7eb !important;

    white-space: normal !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-size: 13px !important;
    line-height: 19px !important;
}

.cb-trace-line {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    min-height: 19px !important;

    margin: 0 !important;
    padding: 0 11px !important;

    box-sizing: border-box !important;

    font-size: 13px !important;
    line-height: 19px !important;

    white-space: normal !important;
}

.cb-trace-line-no {
    display: none !important;
}

.cb-trace-line-code {
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #e5e7eb !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-size: 13px !important;
    line-height: 19px !important;

    white-space: pre !important;
}

.cb-trace-line.active,
.cb-trace-line.cb-trace-line-active {
    min-height: 19px !important;

    padding-left: 7px !important;

    border-left: 4px solid #d4af37 !important;

    background: #1e3a5f !important;

    box-shadow: none !important;
}


/* Keep the original horizontal tracer layout */

.cb-tracer-grid {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(300px, .9fr) !important;

    min-width: 850px !important;
}

.cb-tracer-code-wrap,
.cb-tracer-state-wrap {
    min-width: 0 !important;
    padding: 10px !important;
}

.cb-tracer-code-wrap {
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 0 !important;
}


/* ============================================================
   E. SOLVE IT YOURSELF — REAL BRAND BAR WITHOUT OVERLAP
   Restore the original 12px workspace padding and place the brand
   bar cleanly at the top.
   ============================================================ */

.cb-c-practice-workspace {
    position: relative !important;

    margin-top: 12px !important;
    padding: 12px !important;

    overflow: hidden !important;

    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;

    background: #0f172a !important;
}


/* Let the white brand bar extend across the full workspace width */

.cb-c-practice-workspace > .cb-common-brandbar {
    margin:
        -12px
        -12px
        12px
        -12px !important;

    border-bottom:
        1px solid #334155 !important;
}


/* Restore the approved dark workspace title */

.cb-c-practice-workspace-title {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;

    border: 0 !important;

    background: transparent !important;
    color: #f8fafc !important;

    font-weight: 800 !important;
}


/* ============================================================
   F. MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .cb-common-brandbar {
        min-height: 54px !important;

        padding: 8px 10px !important;

        gap: 8px !important;
    }

    .cb-common-brand-label {
        font-size: 9px !important;
        letter-spacing: 0.08em !important;
    }

    .cb-common-brand {
        gap: 6px !important;

        font-size: 15px !important;
    }

    .cb-common-brand-mark {
        flex-basis: 32px !important;

        width: 32px !important;
        height: 32px !important;
    }

    .cb-common-brand-mark img {
        width: 23px !important;
        height: 23px !important;

        max-width: 23px !important;
    }

    .cb-common-brand-bhavya {
        margin-left: -5px !important;
    }
}

/* ============================================================
   CODEBHAVYA COMMON C UI — FINAL v4
   Paste at the ABSOLUTE BOTTOM of c-programming.css

   Fixes only:
   1. Brand spacing exactly like the existing visualizer.
   2. Program tracer lines forced to compact 19px rows.
   ============================================================ */


/* ============================================================
   1. BRAND — MATCH THE VISUALIZER EXACTLY
   ============================================================ */

.cb-common-brandbar .cb-common-brand {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    flex: 0 0 auto !important;

    width: auto !important;
    min-width: 0 !important;

    gap: 0 !important;

    margin: 0 0 0 auto !important;
    padding: 0 !important;

    white-space: nowrap !important;

    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}


/* Same icon box dimensions as .cb-viz-dsa-brand-mark */

.cb-common-brandbar .cb-common-brand-mark {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 34px !important;

    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;

    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;

    margin:
        0
        7px
        0
        0 !important;

    padding: 0 !important;

    border:
        1px solid
        #dbe3ec !important;

    border-radius:
        9px !important;

    background:
        #ffffff !important;

    box-shadow:
        0 5px 12px
        rgba(15, 23, 42, .08) !important;

    overflow:
        hidden !important;
}

.cb-common-brandbar .cb-common-brand-mark img {
    display: block !important;

    flex: 0 0 auto !important;

    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;

    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain !important;
}


/* Code + Bhavya touch each other exactly as in visualizer */

.cb-common-brandbar .cb-common-brand-code {
    display: inline !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #2563eb !important;
}

.cb-common-brandbar .cb-common-brand-bhavya {
    display: inline !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #f59e0b !important;
}


/* ============================================================
   2. PROGRAM TRACER — FORCE EVERY SOURCE LINE TO 19px

   Using FLEX here removes all whitespace/newline text-node gaps
   created by the later JS template.
   ============================================================ */

.cb-tracer-code {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;

    gap: 0 !important;
    row-gap: 0 !important;

    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;

    margin: 0 !important;
    padding: 8px 0 !important;

    overflow: auto !important;

    white-space: normal !important;

    font-size: 0 !important;
    line-height: 0 !important;
}


/* Every real C source line gets exactly one compact row */

.cb-tracer-code > .cb-trace-line {
    display: block !important;

    flex:
        0
        0
        19px !important;

    width: 100% !important;

    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;

    margin: 0 !important;
    padding:
        0
        11px !important;

    box-sizing:
        border-box !important;

    overflow:
        hidden !important;

    font-size:
        13px !important;

    line-height:
        19px !important;

    white-space:
        normal !important;
}


/* Later JS line numbers remain hidden */

.cb-tracer-code > .cb-trace-line > .cb-trace-line-no {
    display:
        none !important;
}


/* Actual source code preserves indentation */

.cb-tracer-code > .cb-trace-line > .cb-trace-line-code {
    display:
        block !important;

    height:
        19px !important;

    margin:
        0 !important;

    padding:
        0 !important;

    overflow:
        hidden !important;

    color:
        #e5e7eb !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-size:
        13px !important;

    line-height:
        19px !important;

    white-space:
        pre !important;
}


/* Support old tracer renderer too */

.cb-tracer-code > span.cb-trace-line {
    display:
        block !important;

    height:
        19px !important;

    min-height:
        19px !important;

    max-height:
        19px !important;

    margin:
        0 !important;

    padding:
        0
        11px !important;

    box-sizing:
        border-box !important;

    color:
        #e5e7eb !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-size:
        13px !important;

    line-height:
        19px !important;

    white-space:
        pre !important;
}


/* Active row remains compact */

.cb-tracer-code > .cb-trace-line.active,
.cb-tracer-code > .cb-trace-line.cb-trace-line-active {
    height:
        19px !important;

    min-height:
        19px !important;

    max-height:
        19px !important;

    padding-left:
        7px !important;

    border-left:
        4px solid
        #d4af37 !important;

    background:
        #1e3a5f !important;

    box-shadow:
        none !important;
}


/* ============================================================
   MOBILE BRAND — SAME PROPORTIONS, SMALLER
   ============================================================ */

@media (max-width: 600px) {

    .cb-common-brandbar .cb-common-brand {
        font-size:
            15px !important;
    }

    .cb-common-brandbar .cb-common-brand-mark {
        flex-basis:
            30px !important;

        width:
            30px !important;

        min-width:
            30px !important;

        max-width:
            30px !important;

        height:
            30px !important;

        min-height:
            30px !important;

        max-height:
            30px !important;

        margin-right:
            6px !important;
    }

    .cb-common-brandbar .cb-common-brand-mark img {
        width:
            23px !important;

        min-width:
            23px !important;

        max-width:
            23px !important;

        height:
            23px !important;

        min-height:
            23px !important;

        max-height:
            23px !important;
    }
}

/* Compact concept flow boxes */
.concept-flow,
.compact-concept-flow,
.step-flow {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 18px 0 24px;
}

.concept-flow-step,
.compact-flow-step,
.step-box {
    position: relative;
    border: 1px solid #cfd8e3;
    border-radius: 16px;
    padding: 20px 22px 18px;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.concept-flow-step h4,
.compact-flow-step h4,
.step-box h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    text-align: center;
    color: #0f2747;
}

.concept-flow-step p,
.compact-flow-step p,
.step-box p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    color: #5b6b82;
}

.step-label,
.flow-step-badge,
.step-badge {
    position: absolute;
    top: 14px;
    left: 16px;
    background: rgba(255,255,255,0.85);
    color: #0f4a8a;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 999px;
}

.flow-arrow,
.step-arrow {
    text-align: center;
    font-size: 24px;
    line-height: 1;
    color: #d4a017;
    margin: -4px 0 -2px;
}

/* Mobile compact */
@media (max-width: 768px) {
    .concept-flow-step,
    .compact-flow-step,
    .step-box {
        padding: 16px 16px 14px;
        min-height: 78px;
        border-radius: 14px;
    }

    .concept-flow-step h4,
    .compact-flow-step h4,
    .step-box h4 {
        font-size: 16px;
    }

    .concept-flow-step p,
    .compact-flow-step p,
    .step-box p {
        font-size: 13px;
    }

    .step-label,
    .flow-step-badge,
    .step-badge {
        top: 10px;
        left: 12px;
        font-size: 12px;
        padding: 6px 10px;
    }

    .flow-arrow,
    .step-arrow {
        font-size: 20px;
    }
}

/* ============================================================
   CODEBHAVYA — MOBILE SOLVE IT YOURSELF HARD FIX v2
   Paste at the ABSOLUTE BOTTOM of c-programming.css

   Why this version is stronger:
   Earlier common CSS contains a two-column practice grid with
   !important. These selectors intentionally have HIGHER
   specificity, so mobile stacking wins even against that rule.
   ============================================================ */

@media screen and (max-width: 1000px) {

    /* Workspace must grow naturally with both panels */
    body.cb-c-topic-page
    .cb-c-practice-workspace {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        box-sizing: border-box !important;

        overflow: hidden !important;
    }


    /* IMPORTANT:
       Do NOT use the desktop two-column grid on mobile.
       display:block guarantees normal document flow:
       Code Editor first, Input/Output second.
    */
    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-grid {
        display: block !important;

        grid-template-columns: none !important;
        grid-template-rows: none !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: visible !important;
    }


    /* Each panel gets its own row in normal flow */
    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-grid
    > .cb-c-practice-panel {
        position: static !important;

        display: block !important;

        float: none !important;
        clear: both !important;

        transform: none !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 !important;

        box-sizing: border-box !important;

        overflow: hidden !important;
    }


    /* Visible separation between Code Editor and Input/Output */
    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-grid
    > .cb-c-practice-panel
    + .cb-c-practice-panel {
        margin-top: 14px !important;
    }


    /* Every editable/output window must remain inside the panel */
    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-code-editor,

    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-input,

    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-output {
        position: static !important;

        display: block !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box !important;

        transform: none !important;
    }


    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-code-editor {
        min-height: 230px !important;
    }


    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-input {
        min-height: 82px !important;
    }


    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-output {
        min-height: 84px !important;
        max-height: 180px !important;

        overflow-x: auto !important;
        overflow-y: auto !important;

        white-space: pre-wrap !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }


    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-test-results,

    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-test-row {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box !important;
    }


    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-actions {
        display: flex !important;
        flex-wrap: wrap !important;

        width: 100% !important;
        max-width: 100% !important;

        gap: 8px !important;
    }
}


/* Small phones */
@media screen and (max-width: 520px) {

    body.cb-c-topic-page
    .cb-c-practice-workspace {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-bottom: 10px !important;
    }

    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-practice-grid
    > .cb-c-practice-panel {
        padding: 9px !important;
    }

    body.cb-c-topic-page
    .cb-c-practice-workspace
    .cb-c-code-editor {
        min-height: 210px !important;
    }
}


/* ===== CodeBhavya C Course: deep-explanation teaching blocks ===== */
body.cb-c-topic-page .cb-deep-dive{margin:30px 0;padding:24px;border:1px solid rgba(13,148,136,.24);border-radius:18px;background:linear-gradient(180deg,rgba(240,253,250,.72),rgba(255,255,255,.98));box-shadow:0 10px 28px rgba(15,23,42,.06)}
body.cb-c-topic-page .cb-deep-dive-title{margin:-24px -24px 22px;padding:15px 20px;border-radius:18px 18px 0 0;background:#0d1b2a;color:#fff;font-weight:800;font-size:1.05rem;border-bottom:3px solid #d4af37}
body.cb-c-topic-page .cb-deep-dive h3{margin-top:26px}
body.cb-c-topic-page .cb-why-box,body.cb-c-topic-page .cb-confusion-box,body.cb-c-topic-page .cb-important-box,body.cb-c-topic-page .cb-memory-diagram{margin:18px 0;padding:16px 18px;border-radius:12px;background:#fff;border-left:5px solid #0f766e;box-shadow:0 4px 14px rgba(15,23,42,.05)}
body.cb-c-topic-page .cb-confusion-box{border-left-color:#d4af37;background:#fffdf5}
body.cb-c-topic-page .cb-important-box{border-left-color:#1e3a5f;background:#f8fbff}
body.cb-c-topic-page .cb-concept-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}
body.cb-c-topic-page .cb-concept-grid>div{padding:12px 8px;text-align:center;border:1px solid #dbe4ea;border-radius:10px;background:#fff}
body.cb-c-topic-page .cb-concept-grid strong,body.cb-c-topic-page .cb-concept-grid span{display:block}
body.cb-c-topic-page .cb-concept-grid span{margin-top:4px;font-size:.84rem;color:#475569}
body.cb-c-topic-page .cb-deep-dive table{width:100%;border-collapse:collapse;margin:16px 0;background:#fff}
body.cb-c-topic-page .cb-deep-dive th,body.cb-c-topic-page .cb-deep-dive td{padding:11px 12px;border:1px solid #dbe4ea;text-align:left;vertical-align:top}
body.cb-c-topic-page .cb-deep-dive th{background:#eef6f5;color:#0f172a}
@media(max-width:680px){body.cb-c-topic-page .cb-deep-dive{padding:16px;margin:22px 0}body.cb-c-topic-page .cb-deep-dive-title{margin:-16px -16px 18px;padding:13px 14px}body.cb-c-topic-page .cb-concept-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body.cb-c-topic-page .cb-deep-dive table{display:block;overflow-x:auto;white-space:normal}}


/* CODEBHAVYA TEACHING-COMPLETE V1 */
.cb-c-topic-page .cb-teaching-standard {
    margin: 20px 0 26px;
    padding: 18px 20px;
    border: 1px solid rgba(212,175,55,.38);
    border-left: 5px solid var(--cb-gold, #d4af37);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(13,27,42,.055), rgba(15,118,110,.055));
}
.cb-c-topic-page .cb-teaching-standard strong {
    display: block;
    margin-bottom: 8px;
    color: #0d1b2a;
    font-size: 1.05rem;
}
.cb-c-topic-page .cb-teaching-standard p { margin: 0; }
.cb-c-topic-page .cb-concept-tree {
    margin: 16px 0;
    padding: 15px 17px;
    overflow-x: auto;
    border: 1px solid rgba(15,118,110,.24);
    border-radius: 12px;
    background: rgba(15,118,110,.045);
}
.cb-c-topic-page .cb-concept-tree pre {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    line-height: 1.65;
}
@media (max-width: 680px) {
    .cb-c-topic-page .cb-teaching-standard { padding: 15px 14px; }
    .cb-c-topic-page .cb-concept-tree { padding: 12px; }
    .cb-c-topic-page .cb-concept-tree pre { font-size: .86rem; }
}

/* =========================================================
   C PROGRAMMING — STRUCTURE DIAGRAM TEXT VISIBILITY FIX
   ========================================================= */

.cb-memory-diagram,
.cb-memory-diagram * {
    color: #f1f5f9 !important;
}

.cb-memory-diagram code,
.cb-memory-diagram pre,
.cb-memory-diagram .code,
.cb-memory-diagram .diagram-code {
    color: #f1f5f9 !important;
}

.cb-memory-diagram strong,
.cb-memory-diagram b {
    color: #ffffff !important;
}
