/* =========================================================
   SPECIAL RIGHT TRIANGLES PRACTICE
   Core styles
   ========================================================= */

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

    --srtp-border: #dbe4ee;
    --srtp-border-strong: #cbd5e1;

    --srtp-surface: #ffffff;
    --srtp-surface-soft: #f8fafc;
    --srtp-surface-blue: #eff6ff;
    --srtp-surface-teal: #ecfdfb;

    --srtp-teal: #0f766e;
    --srtp-teal-dark: #115e59;
    --srtp-teal-light: #14b8a6;

    --srtp-blue: #2563eb;
    --srtp-violet: #7c3aed;
    --srtp-gold: #d97706;
    --srtp-green: #15803d;

    --srtp-radius: 1.1rem;
    --srtp-radius-small: 0.8rem;

    --srtp-shadow:
        0 16px 35px rgba(15, 23, 42, 0.08);

    --srtp-shadow-small:
        0 8px 22px rgba(15, 23, 42, 0.06);
}


/* =========================================================
   GENERAL TYPOGRAPHY
   ========================================================= */

#special-right-triangles-practice {
    scroll-margin-top: 6rem;
}

#special-right-triangles-practice > .container > .row > div > .lead {
    color: var(--srtp-navy);

    font-size:
        clamp(
            1.08rem,
            1.8vw,
            1.25rem
        );

    font-weight: 500;
    line-height: 1.75;
}

.srtp-card-eyebrow,
.srtp-level-label,
.srtp-problem-number,
.srtp-solution-label {
    color: var(--srtp-teal);

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

    letter-spacing: 0.09em;
    line-height: 1.35;

    text-transform: uppercase;
}

.srtp-card-eyebrow,
.srtp-level-label,
.srtp-problem-number,
.srtp-solution-label {
    margin-bottom: 0.6rem;
}


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

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

    background:
        linear-gradient(
            135deg,
            var(--srtp-surface-teal),
            var(--srtp-surface-blue)
        );

    border: 1px solid #bfe3e2;

    border-radius:
        calc(
            var(--srtp-radius) + 0.15rem
        );

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

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

    font-weight: 800;

    letter-spacing: -0.02em;
}

.srtp-essentials-grid {
    display: grid;

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

    gap: 1rem;
}

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

    padding: 1.15rem;

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

    border:
        1px solid
        rgba(
            190,
            220,
            225,
            0.95
        );

    border-radius:
        var(--srtp-radius-small);
}

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

    color: var(--srtp-teal-dark);

    font-weight: 800;
}

.srtp-essentials-grid p {
    color: var(--srtp-slate);

    line-height: 1.65;
}

.srtp-mini-formula {
    color: var(--srtp-navy);

    overflow-x: auto;

    text-align: center;
}

.srtp-mini-formula mjx-container[display="true"] {
    margin: 0.4rem 0 !important;
}


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

.srtp-resource-actions {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 0.85rem;
}

.srtp-resource-actions .btn {
    display: inline-flex;

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

    min-height: 2.8rem;
}


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

.srtp-level-heading {
    position: relative;

    margin-bottom: 1.25rem;

    padding: 1.4rem 1.5rem;

    overflow: hidden;

    color: #ffffff;

    background:
        var(--srtp-navy);

    border-radius:
        var(--srtp-radius);

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

.srtp-level-heading::after {
    position: absolute;

    top: -5rem;
    right: -3rem;

    width: 12rem;
    height: 12rem;

    content: "";

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(
                45,
                212,
                191,
                0.2
            ) 0,
            rgba(
                45,
                212,
                191,
                0
            ) 70%
        );
}

.srtp-level-label {
    position: relative;

    z-index: 1;

    color: #5eead4;
}

.srtp-level-heading h2 {
    position: relative;

    z-index: 1;

    color: #ffffff;

    font-weight: 800;

    letter-spacing: -0.02em;
}

.srtp-level-heading > p:last-child {
    position: relative;

    z-index: 1;

    max-width: 44rem;

    color: #cbd5e1;

    line-height: 1.65;
}


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

.srtp-problem-card {
    overflow: hidden;

    background:
        var(--srtp-surface);

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

    border-radius:
        var(--srtp-radius);

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

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

.srtp-problem-card:hover {
    border-color: #acdcd6;

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

    transform:
        translateY(-2px);
}

.srtp-problem-body {
    padding:
        clamp(
            1.25rem,
            4vw,
            1.7rem
        );
}

.srtp-problem-heading {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    justify-content: space-between;

    gap: 0.65rem 1rem;

    margin-bottom: 0.9rem;
}

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

.srtp-problem-skill {
    padding:
        0.4rem
        0.7rem;

    color:
        var(--srtp-teal-dark);

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

    letter-spacing: 0.025em;

    background:
        var(--srtp-surface-teal);

    border:
        1px solid
        #b9e6df;

    border-radius: 999px;
}

.srtp-problem-card h3 {
    color: var(--srtp-navy);

    font-weight: 750;

    line-height: 1.45;
}


/* =========================================================
   PROBLEM EXPRESSIONS
   ========================================================= */

.srtp-problem-expression {
    display: flex;

    flex-direction: column;

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

    min-height: 5.5rem;

    margin:
        1.15rem
        0
        1.25rem;

    padding:
        1rem
        1.2rem;

    color: var(--srtp-navy);

    font-size: 1.08rem;

    overflow-x: auto;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            var(--srtp-surface-soft),
            var(--srtp-surface-blue)
        );

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

    border-radius:
        var(--srtp-radius-small);
}

.srtp-problem-expression mjx-container[display="true"] {
    margin: 0.35rem 0 !important;
}

.srtp-problem-card > .srtp-problem-body > .btn {
    min-width: 9.5rem;
}

.srtp-problem-card > .srtp-problem-body > .btn[aria-expanded="true"] {
    color: #ffffff;

    background:
        var(--srtp-navy);

    border-color:
        var(--srtp-navy);
}


/* =========================================================
   TRIANGLE / GEOMETRY DIAGRAM CONTAINERS
   ========================================================= */

.srtp-problem-diagram {
    display: flex;

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

    width: 100%;

    min-height: 18rem;

    margin:
        1.15rem
        0
        1.25rem;

    padding:
        1rem;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            var(--srtp-surface-soft),
            var(--srtp-surface-blue)
        );

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

    border-radius:
        var(--srtp-radius-small);
}


/* =========================================================
   SVG SIZE
   ========================================================= */

.srtp-triangle-svg,
.srtp-figure-svg {
    display: block;

    width: 100%;
    height: auto;

    max-width: 30rem;

    overflow: visible;
}


/* =========================================================
   SVG TRIANGLE STYLING
   ========================================================= */

.srtp-triangle-line,
.srtp-shape-line {
    fill: none;

    stroke:
        var(--srtp-navy);

    stroke-width: 4;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.srtp-right-angle {
    fill: none;

    stroke:
        var(--srtp-teal);

    stroke-width: 3;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.srtp-side-label {
    fill:
        var(--srtp-navy);

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

    font-size: 19px;
    font-weight: 800;

    dominant-baseline: middle;
}

.srtp-angle-label {
    fill:
        var(--srtp-teal-dark);

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

    font-size: 17px;
    font-weight: 800;

    dominant-baseline: middle;
}


/* =========================================================
   OPTIONAL SVG HIGHLIGHTING
   ========================================================= */

.srtp-highlight-line {
    fill: none;

    stroke:
        var(--srtp-teal);

    stroke-width: 5;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.srtp-helper-line {
    fill: none;

    stroke:
        var(--srtp-border-strong);

    stroke-width: 2.5;

    stroke-dasharray:
        7
        7;
}


/* =========================================================
   EXPANDABLE SOLUTIONS
   ========================================================= */

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

    padding:
        clamp(
            1.1rem,
            4vw,
            1.5rem
        );

    background:
        var(--srtp-surface-soft);

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

    border-radius:
        var(--srtp-radius-small);
}

.srtp-solution-label {
    color:
        var(--srtp-teal);
}

.srtp-solution > p:not(.srtp-solution-label) {
    color:
        var(--srtp-slate);

    line-height: 1.72;
}

.srtp-solution h4 {
    color:
        var(--srtp-navy);

    font-weight: 800;
}


/* =========================================================
   SOLUTION MATH
   ========================================================= */

.srtp-solution-math {
    margin:
        1rem
        0;

    padding:
        0.9rem
        1.1rem;

    color:
        var(--srtp-navy);

    overflow-x: auto;

    background:
        #ffffff;

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

    border-left:
        4px solid
        var(--srtp-blue);

    border-radius:
        var(--srtp-radius-small);
}

.srtp-solution-math mjx-container[display="true"] {
    margin:
        0.45rem
        0 !important;
}


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

.srtp-final-answer {
    margin-top: 1.1rem;

    padding:
        1rem
        1.15rem;

    color:
        var(--srtp-teal-dark);

    line-height: 1.65;

    overflow-x: auto;

    background:
        var(--srtp-surface-teal);

    border:
        1px solid
        #a7e4da;

    border-left:
        5px solid
        var(--srtp-teal);

    border-radius:
        var(--srtp-radius-small);
}

.srtp-final-answer strong {
    color:
        var(--srtp-teal-dark);
}

.srtp-final-answer mjx-container[display="true"] {
    margin:
        0.45rem
        0 !important;
}


/* =========================================================
   COLLAPSE MOTION
   ========================================================= */

.srtp-problem-card .collapsing {
    transition:
        height 250ms ease;
}

@media (prefers-reduced-motion: reduce) {

    .srtp-problem-card,
    .srtp-problem-card .collapsing {
        transition: none;
    }

    .srtp-problem-card:hover {
        transform: none;
    }
}


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

.srtp-reminder-card {
    margin-top:
        clamp(
            2.75rem,
            6vw,
            5rem
        );

    padding:
        clamp(
            1.5rem,
            4vw,
            2.5rem
        );

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(
                20,
                184,
                166,
                0.1
            ),
            rgba(
                59,
                130,
                246,
                0.08
            )
        );

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

    border-radius: 1.4rem;
}

.srtp-reminder-card h2 {
    margin:
        0
        0
        0.75rem;

    color:
        var(--srtp-navy);

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

    font-weight: 800;

    line-height: 1.15;
}

.srtp-reminder-card > p {
    max-width: 52rem;

    margin: 0;

    color:
        var(--srtp-slate);

    font-size:
        clamp(
            1rem,
            1.7vw,
            1.1rem
        );

    line-height: 1.75;
}


/* =========================================================
   PROCESS LIST
   ========================================================= */

.srtp-process-list {
    display: grid;

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

    gap: 0.85rem;

    margin:
        1.75rem
        0
        0;

    padding: 0;

    list-style: none;

    counter-reset:
        special-right-process;
}

.srtp-process-list li {
    position: relative;

    min-height: 100%;

    padding:
        3.5rem
        1rem
        1.1rem;

    color:
        var(--srtp-navy);

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

    line-height: 1.5;

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

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

    border-radius: 1rem;

    counter-increment:
        special-right-process;
}

.srtp-process-list li::before {
    position: absolute;

    top: 1rem;
    left: 1rem;

    display: grid;

    width: 2rem;
    height: 2rem;

    place-items: center;

    content:
        counter(
            special-right-process
        );

    color: #ffffff;

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

    background:
        var(--srtp-teal);

    border-radius: 50%;
}


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

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

.srtp-related-section h2 {
    margin:
        0
        0
        0.6rem;

    color:
        var(--srtp-navy);

    font-size:
        clamp(
            1.8rem,
            4vw,
            2.55rem
        );

    font-weight: 800;

    line-height: 1.15;
}

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

    margin:
        0
        0
        1.75rem;

    color:
        var(--srtp-slate);

    font-size: 1.05rem;

    line-height: 1.7;
}

.srtp-related-grid {
    display: grid;

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

    gap: 1.15rem;
}


/* =========================================================
   RELATED RESOURCE CARD
   ========================================================= */

.srtp-related-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 100%;

    padding: 1.35rem;

    color:
        var(--srtp-navy);

    text-decoration: none;

    background:
        #ffffff;

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

    border-radius: 1.15rem;

    box-shadow:
        0 0.65rem 1.8rem
        rgba(
            15,
            23,
            42,
            0.06
        );

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

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

    text-decoration: none;

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

    box-shadow:
        0 1rem 2.2rem
        rgba(
            15,
            23,
            42,
            0.1
        );

    transform:
        translateY(-3px);
}


/* =========================================================
   RELATED RESOURCE ICON
   ========================================================= */

.srtp-related-icon {
    display: grid;

    width: 2.85rem;
    height: 2.85rem;

    margin-bottom: 1rem;

    place-items: center;

    color:
        var(--srtp-teal-dark);

    background:
        var(--srtp-surface-teal);

    border-radius: 0.85rem;

    flex: 0 0 auto;
}

.srtp-related-icon svg {
    width: 1.35rem;
    height: 1.35rem;

    stroke-width: 2.25;
}

.srtp-related-card h3 {
    margin:
        0
        0
        0.5rem;

    color: inherit;

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

    line-height: 1.3;
}

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

    color:
        var(--srtp-slate);

    font-size: 0.94rem;

    line-height: 1.6;
}


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

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

    outline-offset: 4px;
}


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

@media (max-width: 991.98px) {

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

    .srtp-process-list {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

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

    .srtp-problem-diagram {
        min-height: 16rem;
    }

    .srtp-triangle-svg,
    .srtp-figure-svg {
        max-width: 27rem;
    }
}


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

@media (max-width: 767.98px) {

    .srtp-intro-card {
        padding: 1.35rem;

        border-radius: 1.1rem;
    }

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

        gap: 0.8rem;
    }

    .srtp-mini-formula {
        padding:
            0.5rem
            0;
    }


    /* -----------------------------------------
       Buttons
       ----------------------------------------- */

    .srtp-resource-actions {
        display: grid;

        grid-template-columns: 1fr;

        gap: 0.75rem;
    }

    .srtp-resource-actions .btn {
        width: 100%;

        justify-content: center;
    }


    /* -----------------------------------------
       Level headings
       ----------------------------------------- */

    .srtp-level-heading {
        margin-top: 3rem;

        padding:
            1.3rem
            1.2rem;
    }

    .srtp-level-label {
        font-size: 0.72rem;
    }


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

    .srtp-problem-card {
        margin-bottom: 1rem;

        border-radius: 1.1rem;
    }

    .srtp-problem-body {
        padding: 1.2rem;
    }

    .srtp-problem-heading {
        align-items: flex-start;

        gap: 0.75rem;
    }

    .srtp-problem-number {
        font-size: 0.72rem;
    }

    .srtp-problem-skill {
        font-size: 0.72rem;
    }

    .srtp-problem-card h3 {
        font-size: 1.08rem;

        line-height: 1.45;
    }


    /* -----------------------------------------
       Math expressions
       ----------------------------------------- */

    .srtp-problem-expression {
        margin-top: 1.15rem;

        padding:
            1rem
            0.8rem;

        font-size:
            clamp(
                1.1rem,
                5vw,
                1.45rem
            );

        overflow-wrap: anywhere;
    }


    /* -----------------------------------------
       Diagrams
       ----------------------------------------- */

    .srtp-problem-diagram {
        min-height: 14rem;

        padding:
            0.65rem
            0.25rem;
    }

    .srtp-triangle-svg,
    .srtp-figure-svg {
        width: 100%;

        max-width: 23rem;
    }

    .srtp-side-label {
        font-size: 18px;
    }

    .srtp-angle-label {
        font-size: 16px;
    }


    /* -----------------------------------------
       Show solution button
       ----------------------------------------- */

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

        min-height: 3rem;

        justify-content: center;
    }


    /* -----------------------------------------
       Solutions
       ----------------------------------------- */

    .srtp-solution {
        padding: 1rem;
    }

    .srtp-solution-math {
        padding: 0.9rem;

        font-size: 1rem;

        overflow-x: auto;
    }

    .srtp-final-answer {
        padding: 0.95rem;

        font-size: 1rem;
    }


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

    .srtp-reminder-card {
        margin-top: 3rem;

        padding: 1.35rem;

        border-radius: 1.1rem;
    }

    .srtp-process-list {
        grid-template-columns: 1fr;

        gap: 0.75rem;
    }

    .srtp-process-list li {
        padding:
            1rem
            1rem
            1rem
            3.8rem;
    }

    .srtp-process-list li::before {
        top: 50%;
        left: 1rem;

        transform:
            translateY(-50%);
    }


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

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

    .srtp-related-card {
        padding: 1.15rem;
    }
}


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

@media (max-width: 399.98px) {

    .srtp-problem-body {
        padding: 1rem;
    }

    .srtp-problem-expression {
        font-size: 1.08rem;
    }

    .srtp-problem-diagram {
        min-height: 12.5rem;
    }

    .srtp-side-label {
        font-size: 17px;
    }

    .srtp-angle-label {
        font-size: 15px;
    }

    .srtp-related-card h3 {
        font-size: 1rem;
    }
}


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

@media print {

    .srtp-resource-actions,
    .srtp-related-section {
        display: none !important;
    }

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

        box-shadow: none;
    }

    .srtp-problem-card .collapse {
        display: block !important;

        height: auto !important;
    }

    .srtp-problem-card > .srtp-problem-body > .btn {
        display: none !important;
    }

    .srtp-problem-diagram {
        min-height: 13rem;

        background: #ffffff;
    }

    .srtp-triangle-svg,
    .srtp-figure-svg {
        max-width: 24rem;
    }
}

