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;
}

.tutorial-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;
}

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

.tutorial-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%;
    }

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

    .Tutorial-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;
    }

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

    .Tutorial-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;
    }

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

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

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

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

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

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

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

    .tutorial-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%;
    }

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

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

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

    .Tutorial-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;
    }

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

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

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

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

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

    .tutorial-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;
    }

    .Tutorial-details {
        width: 100vw;
    }

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

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

    .Tutorial-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;
    }

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

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

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

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

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

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

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

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

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

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

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

/* ── Hero ── */
.tut-hero {
    background: linear-gradient(135deg, #020e38 0%, #0d2a6e 55%, #1a6fc4 100%);
    position: relative;
    overflow: hidden;
    padding: 2.8rem 2rem 2.4rem;
    text-align: center;
}
.tut-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='50' height='50' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='2' fill='rgba(0,198,255,0.07)'/%3E%3Ccircle cx='30' cy='10' r='2' fill='rgba(0,198,255,0.07)'/%3E%3Ccircle cx='10' cy='30' r='2' fill='rgba(0,198,255,0.07)'/%3E%3Ccircle cx='30' cy='30' r='2' fill='rgba(0,198,255,0.07)'/%3E%3Cline x1='10' y1='10' x2='30' y2='10' stroke='rgba(0,198,255,0.05)' stroke-width='1'/%3E%3Cline x1='10' y1='10' x2='10' y2='30' stroke='rgba(0,198,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
}
.tut-hero__inner  { position: relative; max-width: 720px; margin: 0 auto; }
.tut-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    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;
}
.tut-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);
}
.tut-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;
}

/* ── Section label ── */
.tut-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 ── */
.tut-topic-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.tut-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;
}
.tut-topic-card:hover {
    transform: translateX(6px) !important;
    box-shadow: 0 6px 22px rgba(2,14,56,0.18) !important;
}
.tut-topic-card.active {
    background: linear-gradient(135deg,#1a6fc4,#3498db) !important;
    border-color: #1a6fc4 !important;
}
.tut-topic-card.active h2,
.tut-topic-card.active p,
.tut-topic-card.active .tut-topic-card__tags span,
.tut-topic-card.active .tut-topic-card__arrow { color: #fff !important; }
.tut-topic-card.active .tut-topic-card__tags span {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.3) !important;
}
.tut-topic-card__icon {
    width: 52px; height: 52px; min-width: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff;
    box-shadow: 0 4px 12px rgba(2,14,56,0.25);
}
.tut-topic-card.active .tut-topic-card__icon {
    background: rgba(255,255,255,0.25) !important;
    box-shadow: none;
}
.tut-topic-card__body { flex: 1; min-width: 0; }
.tut-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;
}
.tut-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;
}
.tut-topic-card__tags {
    display: flex; flex-wrap: wrap; gap: 0.3rem;
}
.tut-topic-card__tags span {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.62rem;
    color: #1a6fc4;
    background: rgba(26,111,196,0.1);
    border: 1px solid rgba(26,111,196,0.25);
    border-radius: 10px;
    padding: 2px 8px;
}
.tut-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;
}
.tut-topic-card:hover .tut-topic-card__arrow { color: #1a6fc4; transform: translateX(3px); }

/* =========================================================
   CONTENT PAGE STYLES — Tutorial1–4 pages
   ========================================================= */

/* ── Table of contents ── */
.tut-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;
}
.tut-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;
}
.tut-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;
}
.tut-toc__list {
    list-style: none;
    padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.3rem 1rem;
}
.tut-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;
}
.tut-toc__list li a::before {
    content: '›';
    font-weight: 900;
    font-size: 1rem;
    color: #3498db;
}
.tut-toc__list li a:hover { color: #020e38; }

/* ── h2 title ── */
.Tutorial-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;
}
/* ── h3 section ── */
.Tutorial-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;
}
/* ── h4 sub-section ── */
.Tutorial-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;
}
.Tutorial-modal h4::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    background: #3498db;
    border-radius: 50%;
    flex-shrink: 0;
}
/* ── paragraph ── */
.Tutorial-modal p {
    font-family: 'Exo 2', sans-serif;
    color: #2d3a4e;
    line-height: 1.75;
    margin: 0 0 0.8rem;
}
/* ── hr ── */
.Tutorial-modal hr {
    border: none;
    border-top: 2px solid rgba(2,14,56,0.1);
    margin: 1.4rem 0;
}
/* ── inline code ── */
.Tutorial-modal code {
    font-family: 'Share Tech Mono', monospace;
    background: rgba(26,111,196,0.1);
    color: #1a6fc4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid rgba(26,111,196,0.2);
}

/* ── Info box ── */
.tut-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;
}

/* ── Tip box ── */
.tut-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;
}
.tut-tip::before { content: '💡 Tip: '; font-weight: 700; }

/* ── Formula / key fact box ── */
.tut-formula {
    background: linear-gradient(160deg, #d4e4f5, #c4d5eb);
    border: 2px solid #020e38;
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    margin: 0.8rem 0 1.2rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: #020e38;
    text-align: center;
}
.tut-formula__label {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a6fc4;
    display: block;
    margin-bottom: 0.35rem;
}

/* ── Concept cards grid ── */
.tut-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
    margin: 0.8rem 0 1.4rem;
}
.tut-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;
}
.tut-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;
}
.tut-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(2,14,56,0.18); }
.tut-card__title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 900;
    font-size: 0.9rem;
    color: #020e38;
    margin: 0 0 0.4rem;
}
.tut-card__body {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    color: #2d3a4e;
    line-height: 1.55;
    margin: 0;
}

/* ── Truth table / data table ── */
.tut-table-wrap { overflow-x: auto; margin: 0.8rem 0 1.4rem; }
.tut-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.82rem;
    min-width: 260px;
}
.tut-table th {
    background: #020e38;
    color: #fff;
    padding: 0.5rem 0.8rem;
    text-align: center;
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}
.tut-table td {
    padding: 0.4rem 0.8rem;
    text-align: center;
    border: 1px solid rgba(2,14,56,0.15);
    color: #020e38;
}
.tut-table tr:nth-child(even) td { background: rgba(26,111,196,0.07); }
.tut-table tr:hover td { background: rgba(26,111,196,0.15); }

/* ── Quiz block ── */
.quiz-block {
    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;
}
.quiz-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e67e22, #f39c12);
}
.quiz-block__label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e67e22;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.quiz-block__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;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.quiz-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;
}
.quiz-opt:hover { background: rgba(26,111,196,0.1); border-color: #1a6fc4; }
.quiz-opt.correct { background: rgba(16,185,129,0.15); border-color: #10b981; color: #065f46; font-weight: 700; }
.quiz-opt.wrong   { background: rgba(239,68,68,0.12); border-color: #ef4444; color: #7f1d1d; }
.quiz-opt.disabled { pointer-events: none; }
.quiz-opt__letter {
    width: 24px; height: 24px; min-width: 24px;
    border-radius: 50%;
    background: #020e38;
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.quiz-opt.correct .quiz-opt__letter { background: #10b981; }
.quiz-opt.wrong   .quiz-opt__letter { background: #ef4444; }
.quiz-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;
}
.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: rgba(16,185,129,0.15); color: #065f46; border: 1px solid rgba(16,185,129,0.3); }
.quiz-feedback.wrong   { background: rgba(239,68,68,0.1);   color: #7f1d1d; border: 1px solid rgba(239,68,68,0.25); }
.quiz-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;
}
.quiz-reset.show { display: inline-block; }
.quiz-reset:hover { background: rgba(26,111,196,0.1); }

/* ── Tutorial resource strip ── */
.tut-resource {
    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);
}

/* ── Inline resource link ── */
.tut-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    background: #1a6fc4;
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.15s ease;
}
.tut-link:hover {
    background: #155fa0;
    transform: translateY(-1px);
}

/* =========================================================
   MOBILE  (max-width: 480px)
   ========================================================= */
@media (max-width: 480px) {
    /* Hero */
    .tut-hero           { padding: 1.6rem 1rem 1.4rem; }
    .tut-hero__tag      { font-size: 0.6rem; padding: 3px 10px; margin-bottom: 0.6rem; }
    .tut-hero__title    { font-size: 1.35rem; margin-bottom: 0.5rem; }
    .tut-hero__sub      { font-size: 0.78rem; }

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

    /* Topic cards */
    .tut-topic-grid     { gap: 0.6rem; }
    .tut-topic-card     { gap: 0.7rem !important; padding: 0.75rem 0.85rem !important; }
    .tut-topic-card:hover { transform: none !important; }
    .tut-topic-card__icon { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; border-radius: 9px; }
    .tut-topic-card__body h2 { font-size: max(13px, 3.8vw); }
    .tut-topic-card__body p  { display: none; }
    .tut-topic-card__tags    { display: none; }
    .tut-topic-card__arrow   { font-size: 0.7rem; }

    /* Content */
    .Tutorial-modal h3  { font-size: 4.2vw; padding-left: 0.5rem; margin: 1.2rem 0 0.4rem; }
    .Tutorial-modal h4  { font-size: 3.8vw; margin: 0.9rem 0 0.25rem; }
    .Tutorial-modal h4::before { width: 6px; height: 6px; }

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

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

    .tut-info           { font-size: 0.78rem; padding: 0.75rem 0.9rem; }
    .tut-tip            { font-size: 0.74rem; padding: 0.7rem 0.85rem; }
    .tut-formula        { font-size: 0.78rem; padding: 0.75rem 0.9rem; }

    .tut-table          { font-size: 0.7rem; }
    .tut-table th       { padding: 0.4rem 0.5rem; font-size: 0.68rem; }
    .tut-table td       { padding: 0.3rem 0.5rem; }

    .quiz-block         { padding: 0.9rem 0.95rem; }
    .quiz-block__q      { font-size: 0.82rem; }
    .quiz-opt           { font-size: 0.75rem; padding: 0.5rem 0.7rem; gap: 0.55rem; min-height: 44px; }
    .quiz-opt__letter   { width: 20px; height: 20px; min-width: 20px; font-size: 0.65rem; }
    .quiz-feedback      { font-size: 0.74rem; }

    .tut-resource       { padding: 0.75rem 0.9rem; gap: 0.5rem; }
    .tutorial-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; }

    /* Disable hover on touch */
    .tut-card:hover     { transform: none; box-shadow: none; }
}

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

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

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

    .tut-card-grid      { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .tut-card__title    { font-size: 0.85rem; }
    .tut-card__body     { font-size: 0.76rem; }

    .quiz-opt           { font-size: 0.82rem; }
    .tutorial-link      { font-size: 1.5vw; }
}

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

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

/* ── Mobile ── */
@media (max-width: 480px) {
    .quiz-reset            { font-size: 0.72rem; padding: 3px 12px; }
    .tut-link              { font-size: 0.72rem; padding: 0.4rem 0.85rem; }
}

/* ── Tablet ── */
@media (min-width: 481px) and (max-width: 1000px) {
    .tut-toc               { padding: 0.85rem 1rem; }
    .tut-toc__list         { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .tut-toc__list li a    { font-size: 0.78rem; }
    .tut-info              { font-size: 0.88rem; padding: 0.9rem 1rem; }
    .tut-tip               { font-size: 0.84rem; padding: 0.8rem 1rem; }
    .tut-formula           { font-size: 0.84rem; padding: 0.8rem 1rem; }
    .tut-card              { padding: 0.9rem 0.85rem; }
    .tut-table             { font-size: 0.78rem; }
    .tut-table th          { padding: 0.45rem 0.75rem; }
    .tut-table td          { padding: 0.4rem 0.75rem; }
    .quiz-block            { padding: 1rem 1.1rem; }
    .quiz-opt              { font-size: 0.82rem; padding: 0.52rem 0.8rem; }
    .quiz-feedback         { font-size: 0.8rem; }
    .quiz-reset            { font-size: 0.75rem; }
    .tut-resource          { padding: 0.85rem 1rem; gap: 0.65rem; }
    .tut-link              { font-size: 0.79rem; padding: 0.4rem 0.9rem; }
}