body {
    margin: 0;
    padding: 0;
    background-color: #7a92b0;
}

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 16px;
    border: 4px solid #020e38;
    box-shadow: 0 8px 24px rgba(2, 14, 56, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

@media (hover: hover) {
    .responsive-img:hover {
        transform: scale(1.02);
        box-shadow: 0 12px 32px rgba(2, 14, 56, 0.35);
    }
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    margin: 1.5rem auto;
    border-radius: 16px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 0;
}

.programming-link {
    display: inline-block;
    margin: 1.2rem 0;
    padding: 0.7rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #3498db;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
}

.programming-link:hover {
    background-color: #217dbb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.programming-link:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ############################################################################################################################################################################################################################################################################################# */

/* Mobile */
@media (max-width: 480px) {

    .container {
        display: flex;
        flex-direction: column;
        padding-top: 2%;
        padding-right: 0;
        box-sizing: border-box;
        width: 100%;
    }

    .Programming-details {
        width: 100%;
        box-sizing: border-box;
        padding: 0;
    }

    .Programming-list {
        width: 100%;
        margin: 4% 0 0 0;
        padding: 0 2%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2%;
        box-sizing: border-box;
    }

    .Programming-list h2 {
        font-size: 3.8vw;
        text-align: center;
        margin-top: 0;
    }

    .Programming-box {
        cursor: pointer;
        border: 1px solid #020e38;
        padding: 3%;
        flex: 1 1 45%;
        box-sizing: border-box;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #c4d5eb;
        border-radius: 4px;
    }

    .Programming-box:hover {
        background-color: #a8bfd8;
    }

    .Programming-box.active {
        background-color: #3498db;
        color: #fff;
    }

    .Programming-modal {
        display: none;
        padding: 4%;
        border: 1px solid #020e38;
        margin: 2% 0;
        border-radius: 6px;
        background: #c4d5eb;
        width: 100%;
        box-sizing: border-box;
    }

    .Programming-modal h2 {
        font-size: 5.5vw;
        margin-top: 0;
    }

    .Programming-modal p {
        font-size: 3.8vw;
        line-height: 1.6;
        font-family: 'Exo 2', sans-serif;
    }

    .Programming-modal.active {
        display: block;
    }

    .responsive-img {
        max-width: 100%;
    }

    .programming-link {
        font-size: max(12px, 3vw);
        padding: 0.6rem 1.2rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* ############################################################################################################################################################################################################################################################################################# */

/* Tablet */
@media (min-width: 481px) and (max-width: 1000px) {

    .container {
        display: flex;
        flex-direction: column;
        padding-top: 1.5%;
    }

    .Programming-details {
        width: 90%;
        margin: 0 auto;
    }

    .Programming-list {
        width: 90%;
        margin: 3% auto 0 auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5%;
    }

    .Programming-list h2 {
        font-size: 2vw;
        text-align: center;
        margin-top: 0;
    }

    .Programming-box {
        cursor: pointer;
        border: 1px solid #020e38;
        padding: 1.5%;
        flex: 1 1 22%;
        box-sizing: border-box;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #c4d5eb;
        border-radius: 4px;
        transition: background-color 0.2s ease;
    }

    .Programming-box:hover {
        background-color: #a8bfd8;
    }

    .Programming-box.active {
        background-color: #3498db;
        color: #fff;
    }

    .Programming-modal {
        display: none;
        padding: 1%;
        border: 1px solid #020e38;
        margin: 2%;
        background: #c4d5eb;
        border-radius: 6px;
    }

    .Programming-modal.active {
        display: block;
    }

    .responsive-img {
        max-width: 80%;
    }

    .programming-link {
        font-size: 1.5vw;
        padding: 0.6rem 1.2rem;
    }
}

/* Styles for screen height below 480px */
@media (max-height: 480px) {

}

/* ############################################################################################################################################################################################################################################################################################# */

/* Desktop */
@media (min-width: 1001px) {

    .container {
        display: flex;
        flex-direction: column;
        padding-top: 1%;
        align-items: center;
    }

    .Programming-details {
        width: 100vw;
    }

    .Programming-list {
        width: 80vw;
        margin-top: 2%;
        margin-bottom: 2%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1%;
    }

    .Programming-list h2 {
        font-size: 1.2vw;
        text-align: center;
        margin: 0;
    }

    .Programming-box {
        cursor: pointer;
        border: 1px solid #020e38;
        padding: 2%;
        flex: 1 1 20%;
        box-sizing: border-box;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #c4d5eb;
        border-radius: 4px;
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

    .Programming-box:hover {
        background-color: #a8bfd8;
        box-shadow: 0 4px 12px rgba(2, 14, 56, 0.15);
    }

    .Programming-box.active {
        background-color: #3498db;
        color: #fff;
    }

    .Programming-modal {
        display: none;
        padding: 1% 3%;
        border: 1px solid #020e38;
        margin: 1%;
        background: #c4d5eb;
        border-radius: 6px;
    }

    .Programming-modal h2 {
        font-size: 1.8rem;
    }

    .Programming-modal h3 {
        font-size: 1.3rem;
    }

    .Programming-modal h4 {
        font-size: 1.1rem;
    }

    .Programming-modal p {
        font-size: 1rem;
        line-height: 1.7;
        font-family: 'Exo 2', sans-serif;
    }

    .Programming-modal.active {
        display: block;
    }

    .responsive-img {
        max-width: 95%;
    }

    .programming-link {
        font-size: 1rem;
        padding: 0.6rem 1.4rem;
    }
}

/* -------------------------  Loading state  ------------------------- */
.programming-loading {
    text-align: center;
    padding: 2rem;
    color: #555;
    font-size: 1rem;
    font-family: 'Exo 2', sans-serif;
}
/* =========================================================
   PROGRAMMING.HTML PAGE DESIGN
   ========================================================= */

/* ── Hero ── */
.prog-hero {
    background: linear-gradient(135deg, #020e38 0%, #071a50 40%, #1a3a8f 75%, #1a6fc4 100%);
    position: relative;
    overflow: hidden;
    padding: 2.8rem 2rem 2.4rem;
    text-align: center;
}
.prog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='24' viewBox='0 0 80 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='2' y='18' font-family='monospace' font-size='12' fill='rgba(0,198,255,0.06)'%3E01 10 11%3C/text%3E%3C/svg%3E");
    pointer-events: none;
}
.prog-hero__inner   { position: relative; max-width: 760px; margin: 0 auto; }
.prog-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Fira Code', 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: #00c6ff;
    background: rgba(0,198,255,0.1);
    border: 1px solid rgba(0,198,255,0.25);
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 0.9rem;
}
.prog-hero__title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    color: #fff;
    margin: 0 0 0.7rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.prog-hero__sub {
    font-family: 'Exo 2', sans-serif;
    font-size: clamp(0.82rem, 1.8vw, 1rem);
    color: rgba(255,255,255,0.75);
    line-height: 1.65;
    margin: 0 0 1.2rem;
}
.prog-hero__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
}
.prog-hero__badges span {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ── Section label ── */
.prog-section-label {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #020e38;
    background: rgba(2,14,56,0.07);
    border-radius: 20px;
    padding: 5px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.8rem;
}

/* ── Topic card grid ── */
.prog-topic-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.prog-topic-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1.1rem;
    padding: 1.1rem 1.2rem !important;
    text-align: left;
    min-height: unset !important;
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.22s ease,
                background 0.2s ease !important;
}
.prog-topic-card:hover {
    transform: translateX(6px) !important;
    box-shadow: 0 6px 22px rgba(2,14,56,0.18) !important;
}
.prog-topic-card.active {
    background: linear-gradient(135deg, #1a6fc4, #3498db) !important;
    border-color: #1a6fc4 !important;
}
.prog-topic-card.active h2,
.prog-topic-card.active p,
.prog-topic-card.active .prog-topic-card__tags span,
.prog-topic-card.active .prog-topic-card__arrow { color: #fff !important; }
.prog-topic-card.active .prog-topic-card__tags span {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.3) !important;
}
.prog-topic-card__icon {
    width: 54px; height: 54px; min-width: 54px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(2,14,56,0.3);
}
.prog-topic-card.active .prog-topic-card__icon {
    background: rgba(255,255,255,0.22) !important;
    box-shadow: none;
}
.prog-lang-label {
    font-family: 'Fira Code', 'Share Tech Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}
.prog-topic-card__body { flex: 1; min-width: 0; }
.prog-topic-card__body h2 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: #020e38;
    margin: 0 0 0.25rem;
}
.prog-topic-card__body p {
    font-family: 'Exo 2', sans-serif;
    font-size: clamp(0.72rem, 1.3vw, 0.85rem);
    color: #4a5568;
    margin: 0 0 0.45rem;
    line-height: 1.5;
}
.prog-topic-card__tags {
    display: flex; flex-wrap: wrap; gap: 0.3rem;
}
.prog-topic-card__tags span {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: #1a6fc4;
    background: rgba(26,111,196,0.1);
    border: 1px solid rgba(26,111,196,0.25);
    border-radius: 10px;
    padding: 2px 8px;
}
.prog-topic-card__arrow {
    color: rgba(2,14,56,0.3);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}
.prog-topic-card:hover .prog-topic-card__arrow { color: #1a6fc4; transform: translateX(3px); }

/* =========================================================
   CONTENT PAGE STYLES — Programming1–4
   ========================================================= */

/* ── TOC ── */
.prog-toc {
    background: linear-gradient(160deg, #d4e4f5, #c4d5eb);
    border: 2px solid #020e38;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin: 0.8rem 0 1.4rem;
    position: relative;
    overflow: hidden;
}
.prog-toc::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a6fc4, #00c6ff);
    border-radius: 12px 12px 0 0;
}
.prog-toc__title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    font-size: 0.88rem;
    color: #020e38;
    margin: 0 0 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.prog-toc__list {
    list-style: none;
    padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.25rem 1rem;
}
.prog-toc__list li a {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.82rem;
    color: #1a6fc4;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 0;
    transition: color 0.2s ease;
}
.prog-toc__list li a::before { content: '›'; font-weight: 900; font-size: 1rem; color: #3498db; }
.prog-toc__list li a:hover { color: #020e38; }

/* ── Typography ── */
.Programming-modal h2 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    color: #020e38;
    border-bottom: 3px solid #1a6fc4;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.Programming-modal h3 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    color: #1a6fc4;
    padding-left: 0.75rem;
    border-left: 4px solid #1a6fc4;
    margin: 1.8rem 0 0.5rem;
    scroll-margin-top: 80px;
}
.Programming-modal h4 {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    color: #020e38;
    margin: 1.1rem 0 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.Programming-modal h4::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    background: #3498db;
    border-radius: 50%;
    flex-shrink: 0;
}
.Programming-modal p {
    font-family: 'Exo 2', sans-serif;
    color: #2d3a4e;
    line-height: 1.75;
    margin: 0 0 0.8rem;
}
.Programming-modal hr {
    border: none;
    border-top: 2px solid rgba(2,14,56,0.1);
    margin: 1.4rem 0;
}
.Programming-modal code {
    font-family: 'Fira Code', 'Share Tech Mono', monospace;
    background: rgba(26,111,196,0.1);
    color: #1a6fc4;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
    border: 1px solid rgba(26,111,196,0.2);
}

/* ── Code block ── */
.code-block {
    background: #0d1117;
    border-radius: 12px;
    margin: 0.9rem 0 1.3rem;
    overflow: hidden;
    border: 1.5px solid rgba(2,14,56,0.3);
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.code-block__header {
    background: #161b22;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.code-block__lang {
    font-family: 'Fira Code', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    color: #8b949e;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.code-block__dots {
    display: flex;
    gap: 5px;
}
.code-block__dots span {
    width: 11px; height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.code-block__dots span:nth-child(1) { background: #ff5f57; }
.code-block__dots span:nth-child(2) { background: #febc2e; }
.code-block__dots span:nth-child(3) { background: #28c840; }
.code-block pre {
    margin: 0;
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    font-family: 'Fira Code', 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #e6edf3;
    tab-size: 4;
}
/* Syntax colours */
.kw  { color: #ff7b72; font-weight: 600; }   /* keywords */
.ty  { color: #79c0ff; }                       /* types */
.fn  { color: #d2a8ff; }                       /* functions */
.st  { color: #a5d6ff; }                       /* strings */
.cm  { color: #8b949e; font-style: italic; }   /* comments */
.nm  { color: #79c0ff; }                       /* numbers */
.pp  { color: #ffa657; }                       /* preprocessor */
.op  { color: #ff7b72; }                       /* operators */
.va  { color: #e6edf3; }                       /* variables */

/* ── Terminal / output block ── */
.term-block {
    background: #0d1117;
    border-radius: 10px;
    margin: 0.8rem 0 1.2rem;
    overflow: hidden;
    border: 1.5px solid #30363d;
}
.term-block__header {
    background: #161b22;
    padding: 0.45rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #30363d;
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #8b949e;
    letter-spacing: 0.06em;
}
.term-block__header i { color: #28c840; font-size: 0.7rem; }
.term-block pre {
    margin: 0;
    padding: 0.85rem 1rem;
    font-family: 'Fira Code', 'Share Tech Mono', monospace;
    font-size: 0.82rem;
    color: #28c840;
    line-height: 1.65;
    overflow-x: auto;
}
.term-block pre .prompt { color: #58a6ff; }
.term-block pre .out    { color: #e6edf3; }
.term-block pre .err    { color: #ff7b72; }

/* ── Info / tip / warn boxes ── */
.prog-info {
    background: linear-gradient(135deg, rgba(26,111,196,0.1), rgba(0,198,255,0.07));
    border: 1.5px solid rgba(26,111,196,0.3);
    border-left: 5px solid #1a6fc4;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 0.8rem 0 1.2rem;
    font-family: 'Exo 2', sans-serif;
    color: #2d3a4e;
    line-height: 1.7;
}
.prog-tip {
    background: rgba(16,185,129,0.08);
    border: 1.5px solid rgba(16,185,129,0.35);
    border-left: 5px solid #10b981;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin: 0.8rem 0 1.2rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    color: #065f46;
    line-height: 1.65;
}
.prog-tip::before { content: '💡 Tip: '; font-weight: 700; }
.prog-warn {
    background: rgba(251,191,36,0.09);
    border: 1.5px solid rgba(251,191,36,0.4);
    border-left: 5px solid #f59e0b;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin: 0.8rem 0 1.2rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    color: #78350f;
    line-height: 1.65;
}
.prog-warn::before { content: '⚠️ Note: '; font-weight: 700; }

/* ── Step cards ── */
.prog-steps { display: flex; flex-direction: column; gap: 0.75rem; margin: 0.8rem 0 1.4rem; }
.prog-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(160deg, #d4e4f5, #c4d5eb);
    border: 1.5px solid rgba(2,14,56,0.2);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    transition: box-shadow 0.2s ease;
}
.prog-step:hover { box-shadow: 0 4px 14px rgba(2,14,56,0.14); }
.prog-step__num {
    background: linear-gradient(135deg, #1a6fc4, #00c6ff);
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.prog-step__body { flex: 1; }
.prog-step__title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #020e38;
    margin: 0 0 0.2rem;
}
.prog-step__desc {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.82rem;
    color: #2d3a4e;
    line-height: 1.55;
    margin: 0;
}

/* ── Concept cards ── */
.prog-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
    margin: 0.8rem 0 1.4rem;
}
.prog-card {
    background: linear-gradient(160deg, #d4e4f5, #c4d5eb);
    border: 2px solid #020e38;
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.prog-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a6fc4, #00c6ff);
    border-radius: 12px 12px 0 0;
}
.prog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(2,14,56,0.18); }
.prog-card__title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    font-size: 0.9rem;
    color: #020e38;
    margin: 0 0 0.4rem;
}
.prog-card__body {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    color: #2d3a4e;
    line-height: 1.55;
    margin: 0;
}

/* ── Tool table ── */
.prog-table-wrap { overflow-x: auto; margin: 0.8rem 0 1.4rem; }
.prog-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.82rem;
    min-width: 320px;
}
.prog-table th {
    background: #020e38;
    color: #fff;
    padding: 0.5rem 0.9rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}
.prog-table td {
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(2,14,56,0.12);
    color: #020e38;
    vertical-align: top;
}
.prog-table td code { font-family: 'Fira Code', monospace; font-size: 0.78rem; }
.prog-table tr:nth-child(even) td { background: rgba(26,111,196,0.06); }
.prog-table tr:hover td { background: rgba(26,111,196,0.13); }

/* ── Quiz ── */
.prog-quiz {
    background: linear-gradient(160deg, #d4e4f5, #c4d5eb);
    border: 2px solid #020e38;
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
    margin: 1.4rem 0;
    position: relative;
    overflow: hidden;
}
.prog-quiz::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e67e22, #f39c12);
}
.prog-quiz__label {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e67e22;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.prog-quiz__q {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    color: #020e38;
    margin: 0 0 0.9rem;
    line-height: 1.5;
}
.prog-quiz__code {
    font-family: 'Fira Code', monospace;
    background: #0d1117;
    color: #e6edf3;
    font-size: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    display: block;
    margin: 0.5rem 0 0.9rem;
    overflow-x: auto;
    line-height: 1.6;
    border: 1px solid #30363d;
}
.prog-opts { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.prog-opt {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255,255,255,0.5);
    border: 1.5px solid rgba(2,14,56,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    color: #020e38;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
}
.prog-opt:hover  { background: rgba(26,111,196,0.1); border-color: #1a6fc4; }
.prog-opt.correct { background: rgba(16,185,129,0.15); border-color: #10b981; color: #065f46; font-weight: 700; }
.prog-opt.wrong   { background: rgba(239,68,68,0.12); border-color: #ef4444; color: #7f1d1d; }
.prog-opt.disabled { pointer-events: none; }
.prog-opt__letter {
    width: 24px; height: 24px; min-width: 24px;
    border-radius: 50%;
    background: #020e38;
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.prog-opt.correct .prog-opt__letter { background: #10b981; }
.prog-opt.wrong   .prog-opt__letter { background: #ef4444; }
.prog-feedback {
    display: none;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    margin-top: 0.4rem;
    line-height: 1.5;
}
.prog-feedback.show    { display: block; }
.prog-feedback.correct { background: rgba(16,185,129,0.15); color: #065f46; border: 1px solid rgba(16,185,129,0.3); }
.prog-feedback.wrong   { background: rgba(239,68,68,0.1);   color: #7f1d1d; border: 1px solid rgba(239,68,68,0.25); }
.prog-reset {
    display: none;
    margin-top: 0.6rem;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a6fc4;
    background: none;
    border: 1.5px solid #1a6fc4;
    border-radius: 6px;
    padding: 4px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.prog-reset.show  { display: inline-block; }
.prog-reset:hover { background: rgba(26,111,196,0.1); }

/* ── Resource strip ── */
.prog-resources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0 0.5rem;
    padding: 1rem 1.2rem;
    background: rgba(2,14,56,0.05);
    border-radius: 10px;
    border: 1.5px solid rgba(2,14,56,0.1);
}

/* =========================================================
   MOBILE  (max-width: 480px)
   ========================================================= */
@media (max-width: 480px) {
    .prog-hero              { padding: 1.6rem 1rem 1.3rem; }
    .prog-hero__tag         { font-size: 0.6rem; padding: 3px 10px; margin-bottom: 0.6rem; }
    .prog-hero__title       { font-size: 1.3rem; margin-bottom: 0.45rem; }
    .prog-hero__sub         { font-size: 0.77rem; margin-bottom: 0.9rem; }
    .prog-hero__badges span { font-size: 0.62rem; padding: 3px 9px; }

    .prog-section-label     { font-size: 0.7rem; padding: 4px 12px; margin-bottom: 0.6rem; }

    .prog-topic-grid        { gap: 0.6rem; }
    .prog-topic-card        { gap: 0.65rem !important; padding: 0.7rem 0.8rem !important; }
    .prog-topic-card:hover  { transform: none !important; }
    .prog-topic-card__icon  { width: 42px; height: 42px; min-width: 42px; border-radius: 9px; }
    .prog-lang-label        { font-size: 0.82rem; }
    .prog-topic-card__body h2 { font-size: max(13px, 3.8vw); }
    .prog-topic-card__body p  { display: none; }
    .prog-topic-card__tags    { display: none; }
    .prog-topic-card__arrow   { font-size: 0.7rem; }

    .Programming-modal h3   { font-size: 4.2vw; padding-left: 0.5rem; margin: 1.2rem 0 0.4rem; }
    .Programming-modal h4   { font-size: 3.8vw; margin: 0.9rem 0 0.25rem; }
    .Programming-modal h4::before { width: 6px; height: 6px; }
    .Programming-modal code { font-size: 0.8em; }

    .prog-toc               { padding: 0.75rem 0.9rem; }
    .prog-toc__list         { grid-template-columns: 1fr; }
    .prog-toc__list li a    { font-size: 0.75rem; }

    .code-block pre         { font-size: 0.72rem; padding: 0.8rem 0.9rem; }
    .code-block__header     { padding: 0.45rem 0.8rem; }
    .code-block__dots span  { width: 9px; height: 9px; }
    .term-block pre         { font-size: 0.7rem; padding: 0.7rem 0.85rem; }

    .prog-card-grid         { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .prog-card              { padding: 0.7rem 0.65rem; border-radius: 9px; }
    .prog-card__title       { font-size: 0.75rem; }
    .prog-card__body        { font-size: 0.67rem; }

    .prog-step              { gap: 0.7rem; padding: 0.75rem 0.8rem; }
    .prog-step__num         { width: 26px; height: 26px; font-size: 0.7rem; }
    .prog-step__title       { font-size: 0.78rem; }
    .prog-step__desc        { font-size: 0.7rem; }

    .prog-info, .prog-tip, .prog-warn { font-size: 0.77rem; padding: 0.75rem 0.9rem; }

    .prog-table             { font-size: 0.7rem; }
    .prog-table th          { padding: 0.4rem 0.55rem; font-size: 0.67rem; }
    .prog-table td          { padding: 0.35rem 0.55rem; }

    .prog-quiz              { padding: 0.9rem 0.95rem; }
    .prog-quiz__q           { font-size: 0.82rem; }
    .prog-quiz__code        { font-size: 0.68rem; padding: 0.55rem 0.75rem; }
    .prog-opt               { font-size: 0.75rem; padding: 0.5rem 0.7rem; gap: 0.5rem; min-height: 44px; }
    .prog-opt__letter       { width: 20px; height: 20px; min-width: 20px; font-size: 0.62rem; }
    .prog-feedback          { font-size: 0.73rem; }

    .prog-resources         { padding: 0.75rem 0.9rem; gap: 0.5rem; }
    .programming-link       { font-size: max(12px, 3vw); padding: 0.5rem 1rem; margin: 0.5rem 0.5rem 0.5rem 0; min-height: 44px; display: inline-flex; align-items: center; }

    .prog-card:hover        { transform: none; box-shadow: none; }
    .prog-step:hover        { box-shadow: none; }
    .prog-topic-card:hover  { transform: none !important; }
}

/* =========================================================
   TABLET  (481px – 1000px)
   ========================================================= */
@media (min-width: 481px) and (max-width: 1000px) {
    .prog-hero              { padding: 2rem 1.5rem 1.8rem; }
    .prog-hero__title       { font-size: 1.8rem; }
    .prog-hero__sub         { font-size: 0.9rem; }

    .prog-topic-grid        { gap: 0.75rem; }
    .prog-topic-card        { padding: 0.9rem 1rem !important; gap: 0.9rem; }
    .prog-topic-card__icon  { width: 46px; height: 46px; min-width: 46px; }
    .prog-topic-card__body h2 { font-size: 1.05rem; }
    .prog-topic-card__body p  { font-size: 0.8rem; }

    .Programming-modal h3   { font-size: 2.2vw; }
    .Programming-modal h4   { font-size: 1.9vw; }

    .code-block pre         { font-size: 0.8rem; }
    .prog-card-grid         { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .prog-card__title       { font-size: 0.85rem; }
    .prog-card__body        { font-size: 0.76rem; }
    .prog-opt               { font-size: 0.82rem; }
    .programming-link       { font-size: 1.5vw; }
}

/* =========================================================
   DESKTOP  (min-width: 1001px)
   ========================================================= */
@media (min-width: 1001px) {
    .prog-section-label     { align-self: flex-start; }
    .prog-topic-grid        { width: 80vw; }
}

/* =========================================================
   RESPONSIVE FIXES — content classes
   ========================================================= */

/* ── Tablet ── */
@media (min-width: 481px) and (max-width: 1000px) {
    .prog-toc              { padding: 0.85rem 1rem; }
    .prog-toc__list        { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .prog-toc__list li a   { font-size: 0.78rem; }
    .prog-info             { font-size: 0.88rem; padding: 0.9rem 1rem; }
    .prog-tip              { font-size: 0.84rem; padding: 0.8rem 1rem; }
    .prog-warn             { font-size: 0.84rem; padding: 0.8rem 1rem; }
    .prog-card             { padding: 0.9rem 0.85rem; }
    .prog-step             { gap: 0.8rem; padding: 0.8rem 0.9rem; }
    .prog-step__title      { font-size: 0.86rem; }
    .prog-step__desc       { font-size: 0.78rem; }
    .term-block pre        { font-size: 0.78rem; padding: 0.8rem 0.9rem; }
    .prog-quiz             { padding: 1rem 1.1rem; }
    .prog-opt              { font-size: 0.82rem; padding: 0.52rem 0.8rem; }
    .prog-feedback         { font-size: 0.8rem; }
    .prog-table            { font-size: 0.78rem; }
    .prog-table th         { padding: 0.45rem 0.75rem; }
    .prog-table td         { padding: 0.4rem 0.75rem; }
    .programming-link      { font-size: 1.5vw; }
}

/* ── prog-step-list responsive fix ── */
@media (max-width: 480px) {
    .prog-step-list { gap: 0.6rem; }
}
@media (min-width: 481px) and (max-width: 1000px) {
    .prog-step-list { gap: 0.7rem; }
}