/* =========================================================
   RADIANS VS DEGREES PRACTICE
   ========================================================= */

:root
{
    --rvdp-navy: #0f172a;
    --rvdp-slate: #475569;
    --rvdp-muted: #64748b;

    --rvdp-border: #d7e2ec;

    --rvdp-white: #ffffff;
    --rvdp-surface: #f8fafc;

    --rvdp-teal: #0f766e;
    --rvdp-teal-bright: #159e9c;
    --rvdp-teal-soft: #ecfdf5;

    --rvdp-blue: #2563eb;
    --rvdp-blue-soft: #eff6ff;

    --rvdp-gold: #d97706;
    --rvdp-gold-soft: #fff7ed;

    --rvdp-shadow:
        0 1rem 2.5rem
        rgba(
            15,
            23,
            42,
            0.08
        );

    --rvdp-shadow-small:
        0 0.75rem 2rem
        rgba(
            15,
            23,
            42,
            0.06
        );
}


/* =========================================================
   BASE
   ========================================================= */

#radians-vs-degrees-practice
{
    scroll-margin-top: 5rem;
}

#radians-vs-degrees-practice,
.rvdp-intro-card,
.rvdp-level-heading,
.rvdp-problem-card,
.rvdp-reminder-card,
.rvdp-related-section
{
    color: var(--rvdp-slate);

    font-family:
        Inter,
        Arial,
        sans-serif;
}

#radians-vs-degrees-practice .lead
{
    color: var(--rvdp-slate);

    font-size:
        clamp(
            1.05rem,
            1.8vw,
            1.18rem
        );

    line-height: 1.75;
}


/* =========================================================
   SHARED EYEBROWS
   ========================================================= */

.rvdp-card-eyebrow,
.rvdp-level-label,
.rvdp-problem-number,
.rvdp-solution-label
{
    margin:
        0
        0
        0.45rem;

    color: var(--rvdp-teal);

    font-size: 0.75rem;
    font-weight: 800;

    letter-spacing: 0.1em;

    line-height: 1.3;

    text-transform: uppercase;
}


/* =========================================================
   ESSENTIALS CARD
   ========================================================= */

.rvdp-intro-card
{
    padding:
        clamp(
            1.4rem,
            4vw,
            2rem
        );

    background:
        linear-gradient(
            135deg,
            var(--rvdp-teal-soft),
            var(--rvdp-blue-soft)
        );

    border:
        1px solid
        rgba(
            13,
            148,
            136,
            0.22
        );

    border-radius: 1.25rem;

    box-shadow:
        var(--rvdp-shadow);
}

.rvdp-intro-card h2
{
    color: var(--rvdp-navy);

    font-weight: 800;

    letter-spacing: -0.025em;
}

.rvdp-essentials-grid
{
    display: grid;

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

    gap: 0.85rem;
}

.rvdp-essentials-grid article
{
    min-width: 0;

    padding:
        1rem
        0.8rem;

    text-align: center;

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

    border:
        1px solid
        rgba(
            148,
            163,
            184,
            0.25
        );

    border-radius: 0.9rem;
}

.rvdp-essentials-grid h3
{
    margin-bottom: 0.65rem;

    color: var(--rvdp-navy);

    font-size: 0.78rem;
    font-weight: 800;

    line-height: 1.4;
}

.rvdp-mini-formula
{
    min-width: 0;

    color: var(--rvdp-teal);

    font-size: 1.05rem;
    font-weight: 800;
}

.rvdp-mini-formula mjx-container
{
    max-width: 100%;

    margin: 0 !important;

    overflow-x: auto;
    overflow-y: hidden;
}


/* =========================================================
   RESOURCE ACTIONS
   ========================================================= */

.rvdp-resource-actions
{
    display: flex;

    flex-wrap: wrap;

    gap: 0.75rem;

    align-items: center;
}


/* =========================================================
   LEVEL HEADINGS
   ========================================================= */

.rvdp-level-heading
{
    margin-top:
        clamp(
            3.75rem,
            7vw,
            5.5rem
        );

    margin-bottom: 1.4rem;
}

.rvdp-level-heading h2
{
    color: var(--rvdp-navy);

    font-size:
        clamp(
            1.7rem,
            4vw,
            2.25rem
        );

    font-weight: 800;

    letter-spacing: -0.03em;

    line-height: 1.2;
}

.rvdp-level-heading > p:last-child
{
    max-width: 46rem;

    color: var(--rvdp-slate);

    font-size: 1rem;

    line-height: 1.7;
}


/* =========================================================
   PROBLEM CARDS
   ========================================================= */

.rvdp-problem-card
{
    overflow: hidden;

    background: var(--rvdp-white);

    border:
        1px solid
        var(--rvdp-border);

    border-radius: 1.2rem;

    box-shadow:
        var(--rvdp-shadow-small);
}

.rvdp-problem-body
{
    padding:
        clamp(
            1.3rem,
            3.5vw,
            1.9rem
        );
}

.rvdp-problem-heading
{
    display: flex;

    gap: 1rem;

    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 0.7rem;
}

.rvdp-problem-number
{
    margin-bottom: 0;
}

.rvdp-problem-skill
{
    flex: 0 0 auto;

    padding:
        0.4rem
        0.7rem;

    color: var(--rvdp-blue);

    font-size: 0.67rem;
    font-weight: 800;

    letter-spacing: 0.06em;

    line-height: 1.3;

    text-transform: uppercase;

    background: var(--rvdp-blue-soft);

    border-radius: 999px;
}

.rvdp-problem-card h3
{
    margin-bottom: 1rem;

    color: var(--rvdp-navy);

    font-weight: 800;

    line-height: 1.45;
}


/* =========================================================
   PROBLEM EXPRESSION
   ========================================================= */

.rvdp-problem-expression
{
    display: grid;

    width: 100%;
    min-width: 0;

    min-height: 5.5rem;

    margin:
        1rem
        0
        1.25rem;

    padding:
        1rem
        1.2rem;

    place-items: center;

    color: var(--rvdp-navy);

    font-size:
        clamp(
            1.25rem,
            3vw,
            1.55rem
        );

    background: var(--rvdp-surface);

    border:
        1px solid
        var(--rvdp-border);

    border-radius: 0.9rem;
}

.rvdp-problem-expression mjx-container
{
    max-width: 100%;

    margin: 0 !important;

    overflow-x: auto;
    overflow-y: hidden;
}


/* =========================================================
   MULTIPLE CHOICE
   ========================================================= */

.rvdp-choice-grid
{
    display: grid;

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

    gap: 0.75rem;

    margin:
        1rem
        0
        1.25rem;
}

.rvdp-choice
{
    display: grid;

    min-width: 0;
    min-height: 4.5rem;

    padding:
        0.8rem
        1rem;

    place-items: center;

    color: var(--rvdp-navy);

    font-size: 1.05rem;
    font-weight: 700;

    background: var(--rvdp-surface);

    border:
        1px solid
        var(--rvdp-border);

    border-radius: 0.85rem;
}

.rvdp-choice mjx-container
{
    max-width: 100%;

    margin: 0 !important;

    overflow-x: auto;
    overflow-y: hidden;
}


/* =========================================================
   SHOW SOLUTION BUTTON
   ========================================================= */

.rvdp-problem-card > .rvdp-problem-body > .btn
{
    min-width: 9rem;
}


/* =========================================================
   COLLAPSIBLE SOLUTIONS
   ========================================================= */

.rvdp-solution
{
    margin-top: 1.25rem;

    padding:
        1.25rem
        1.3rem;

    background:
        var(--rvdp-surface);

    border:
        1px solid
        var(--rvdp-border);

    border-radius: 0.95rem;
}

.rvdp-solution-label
{
    margin-bottom: 0.75rem;
}

.rvdp-solution > p:not(.rvdp-solution-label)
{
    margin-bottom: 0.8rem;

    color: var(--rvdp-slate);

    font-size: 0.95rem;

    line-height: 1.7;
}

.rvdp-solution-math
{
    display: grid;

    width: 100%;
    min-width: 0;

    min-height: 4.5rem;

    margin:
        0.85rem
        0;

    padding:
        0.85rem
        1rem;

    place-items: center;

    color: var(--rvdp-teal);

    font-size:
        clamp(
            1.05rem,
            2.5vw,
            1.3rem
        );

    background: var(--rvdp-white);

    border:
        1px solid
        var(--rvdp-border);

    border-radius: 0.8rem;
}

.rvdp-solution-math mjx-container
{
    max-width: 100%;

    margin: 0 !important;

    overflow-x: auto;
    overflow-y: hidden;
}


/* =========================================================
   FINAL ANSWER
   ========================================================= */

.rvdp-final-answer
{
    display: flex;

    gap: 1rem;

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

    width: 100%;
    min-width: 0;

    margin-top: 1rem;

    padding:
        0.9rem
        1rem;

    color: var(--rvdp-teal);

    background: var(--rvdp-teal-soft);

    border:
        1px solid
        rgba(
            13,
            148,
            136,
            0.25
        );

    border-radius: 0.8rem;
}

.rvdp-final-answer > strong
{
    flex: 0 0 auto;

    color: var(--rvdp-navy);

    font-size: 0.74rem;
    font-weight: 800;

    letter-spacing: 0.07em;

    text-transform: uppercase;
}

.rvdp-final-answer mjx-container
{
    max-width: 100%;

    margin: 0 !important;

    overflow-x: auto;
    overflow-y: hidden;
}

.rvdp-final-answer > p
{
    color: var(--rvdp-slate);

    line-height: 1.65;
}


/* =========================================================
   FINAL REMINDER
   ========================================================= */

.rvdp-reminder-card
{
    margin-top:
        clamp(
            3.5rem,
            7vw,
            5rem
        );

    padding:
        clamp(
            1.4rem,
            4vw,
            2rem
        );

    background:
        linear-gradient(
            135deg,
            var(--rvdp-teal-soft),
            var(--rvdp-blue-soft)
        );

    border:
        1px solid
        rgba(
            13,
            148,
            136,
            0.22
        );

    border-radius: 1.2rem;

    box-shadow:
        var(--rvdp-shadow-small);
}

.rvdp-reminder-card h2
{
    color: var(--rvdp-navy);

    font-weight: 800;

    letter-spacing: -0.025em;
}

.rvdp-process-list
{
    display: grid;

    gap: 0.75rem;

    padding-left: 1.4rem;
}

.rvdp-process-list li
{
    padding-left: 0.3rem;

    color: var(--rvdp-slate);

    line-height: 1.65;
}

.rvdp-process-list li::marker
{
    color: var(--rvdp-teal);

    font-weight: 800;
}


/* =========================================================
   RELATED RESOURCES
   ========================================================= */

.rvdp-related-section
{
    margin-top:
        clamp(
            3.5rem,
            7vw,
            5.5rem
        );
}

.rvdp-related-section h2
{
    color: var(--rvdp-navy);

    font-size:
        clamp(
            1.7rem,
            4vw,
            2.35rem
        );

    font-weight: 800;

    letter-spacing: -0.03em;

    line-height: 1.2;
}

.rvdp-related-section > p
{
    max-width: 46rem;

    color: var(--rvdp-slate);

    line-height: 1.7;
}

.rvdp-related-grid
{
    display: grid;

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

    gap: 1rem;
}

.rvdp-related-card
{
    display: flex;

    flex-direction: column;

    min-width: 0;
    min-height: 100%;

    padding: 1.2rem;

    color: var(--rvdp-navy);

    text-decoration: none;

    background: var(--rvdp-white);

    border:
        1px solid
        var(--rvdp-border);

    border-radius: 1.05rem;

    box-shadow:
        var(--rvdp-shadow-small);

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.rvdp-related-card:hover
{
    color: var(--rvdp-navy);

    text-decoration: none;

    border-color:
        rgba(
            13,
            148,
            136,
            0.5
        );

    box-shadow:
        var(--rvdp-shadow);

    transform:
        translateY(-3px);
}

.rvdp-related-icon
{
    display: grid;

    width: 2.75rem;
    height: 2.75rem;

    margin-bottom: 0.85rem;

    place-items: center;

    color: var(--rvdp-teal);

    background: var(--rvdp-teal-soft);

    border-radius: 0.8rem;
}

.rvdp-related-card h3
{
    margin:
        0
        0
        0.45rem;

    color: inherit;

    font-size: 1.02rem;
    font-weight: 800;

    line-height: 1.4;
}

.rvdp-related-card p
{
    margin: 0;

    color: var(--rvdp-slate);

    font-size: 0.89rem;

    line-height: 1.6;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.rvdp-resource-actions a:focus-visible,
.rvdp-problem-card .btn:focus-visible,
.rvdp-related-card:focus-visible
{
    outline:
        3px solid
        rgba(
            37,
            99,
            235,
            0.38
        );

    outline-offset: 4px;
}


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

@media (max-width: 991.98px)
{
    .rvdp-essentials-grid
    {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

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


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

@media (max-width: 767.98px)
{
    /* -----------------------------------------
       General spacing
       ----------------------------------------- */

    #radians-vs-degrees-practice
    {
        overflow-x: hidden;
    }

    #radians-vs-degrees-practice .lead
    {
        font-size: 1rem;

        line-height: 1.7;
    }

    .rvdp-level-heading
    {
        margin-top: 3.5rem;
    }


    /* -----------------------------------------
       Essentials
       ----------------------------------------- */

    .rvdp-intro-card
    {
        padding: 1.15rem;

        border-radius: 1rem;
    }

    .rvdp-essentials-grid
    {
        grid-template-columns: 1fr;

        gap: 0.7rem;
    }

    .rvdp-essentials-grid article
    {
        padding: 0.9rem;
    }


    /* -----------------------------------------
       Resource buttons
       ----------------------------------------- */

    .rvdp-resource-actions
    {
        display: grid;

        grid-template-columns: 1fr;

        width: 100%;
    }

    .rvdp-resource-actions .btn
    {
        width: 100%;
    }


    /* -----------------------------------------
       Problem cards
       ----------------------------------------- */

    .rvdp-problem-card
    {
        border-radius: 1rem;
    }

    .rvdp-problem-body
    {
        min-width: 0;

        padding: 1.1rem;
    }

    .rvdp-problem-heading
    {
        flex-direction: column;

        gap: 0.55rem;
    }

    .rvdp-problem-skill
    {
        align-self: flex-start;
    }

    .rvdp-problem-card h3
    {
        font-size: 1.05rem;

        line-height: 1.5;
    }


    /* -----------------------------------------
       Main expression
       ----------------------------------------- */

    .rvdp-problem-expression
    {
        min-height: 4.75rem;

        padding:
            0.85rem
            0.7rem;
    }

    .rvdp-problem-expression mjx-container
    {
        width: 100%;
        max-width: 100%;

        overflow-x: auto;
        overflow-y: hidden;
    }


    /* -----------------------------------------
       Choices
       ----------------------------------------- */

    .rvdp-choice-grid
    {
        grid-template-columns: 1fr;
    }

    .rvdp-choice
    {
        min-height: 4rem;
    }


    /* -----------------------------------------
       Solution button
       ----------------------------------------- */

    .rvdp-problem-card > .rvdp-problem-body > .btn
    {
        width: 100%;
    }


    /* -----------------------------------------
       Solution
       ----------------------------------------- */

    .rvdp-solution
    {
        min-width: 0;

        padding: 1rem;

        border-radius: 0.85rem;
    }

    .rvdp-solution-math
    {
        min-height: 4rem;

        padding:
            0.8rem
            0.65rem;
    }

    .rvdp-solution-math mjx-container
    {
        width: 100%;
        max-width: 100%;

        overflow-x: auto;
        overflow-y: hidden;
    }


    /* -----------------------------------------
       Final answer
       ----------------------------------------- */

    .rvdp-final-answer
    {
        align-items: flex-start;

        flex-direction: column;

        gap: 0.5rem;

        width: 100%;
        min-width: 0;

        padding: 0.85rem;
    }

    .rvdp-final-answer mjx-container
    {
        width: 100%;
        max-width: 100%;

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

        text-align: left !important;
    }

    .rvdp-final-answer > p
    {
        width: 100%;
    }


    /* -----------------------------------------
       Reminder
       ----------------------------------------- */

    .rvdp-reminder-card
    {
        padding: 1.15rem;

        border-radius: 1rem;
    }


    /* -----------------------------------------
       Related resources
       ----------------------------------------- */

    .rvdp-related-grid
    {
        grid-template-columns: 1fr;
    }

    .rvdp-related-card
    {
        padding: 1.1rem;
    }
}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 399.98px)
{
    .rvdp-intro-card,
    .rvdp-problem-body,
    .rvdp-reminder-card
    {
        padding: 1rem;
    }

    .rvdp-problem-expression
    {
        padding:
            0.75rem
            0.5rem;
    }

    .rvdp-solution
    {
        padding: 0.85rem;
    }

    .rvdp-solution-math
    {
        padding:
            0.7rem
            0.45rem;
    }

    .rvdp-final-answer
    {
        padding: 0.75rem;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce)
{
    .rvdp-related-card
    {
        transition: none;
    }

    .rvdp-related-card:hover
    {
        transform: none;
    }
}


/* =========================================================
   PRINT
   ========================================================= */

@media print
{
    .rvdp-resource-actions,
    .rvdp-related-section
    {
        display: none !important;
    }

    .rvdp-intro-card,
    .rvdp-problem-card,
    .rvdp-reminder-card
    {
        break-inside: avoid;

        box-shadow: none;
    }

    .rvdp-problem-card .collapse
    {
        display: block !important;
        height: auto !important;
    }

    .rvdp-problem-card button
    {
        display: none !important;
    }

    .rvdp-problem-expression,
    .rvdp-solution-math,
    .rvdp-final-answer
    {
        overflow: visible;
    }
}