/* =========================================================
   INEQUALITIES & INTERVAL NOTATION PRACTICE PAGE
   ========================================================= */

:root
{
    --iin-navy: #102a43;
    --iin-navy-dark: #081c2f;
    --iin-blue: #1f6f8b;
    --iin-teal: #159a9c;
    --iin-teal-dark: #117b7d;
    --iin-green: #198754;
    --iin-green-dark: #157347;
    --iin-red: #c0392b;
    --iin-orange: #d97706;
    --iin-purple: #6f42c1;
    --iin-light: #f5f8fb;
    --iin-lighter: #fbfcfe;
    --iin-border: #dbe5ee;
    --iin-text: #243b53;
    --iin-muted: #627d98;
    --iin-white: #ffffff;

    --iin-shadow:
        0 18px 45px rgba(16, 42, 67, 0.12);

    --iin-shadow-small:
        0 8px 24px rgba(16, 42, 67, 0.09);
}


/* =========================================================
   GENERAL PAGE
   ========================================================= */

.iin-practice-page
{
    background: var(--iin-white);
    color: var(--iin-text);

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


.iin-practice-page *,
.iin-practice-page *::before,
.iin-practice-page *::after
{
    box-sizing: border-box;
}


.iin-practice-page button,
.iin-practice-page input,
.iin-practice-page select
{
    font-family: inherit;
}


.iin-practice-page button
{
    cursor: pointer;
}


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

.iin-section
{
    position: relative;

    padding: 5rem 1.5rem;

    background:
        radial-gradient(
            circle at top left,
            rgba(21, 154, 156, 0.08),
            transparent 32rem
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f5f8fb 100%
        );
}


.iin-app
{
    width: min(100%, 1040px);

    margin: 0 auto;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.iin-toolbar
{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 2rem;

    margin-bottom: 2rem;
}


.iin-toolbar-heading
{
    max-width: 680px;
}


.iin-toolbar-heading h2
{
    margin: 0 0 0.75rem;

    color: var(--iin-navy);

    font-size:
        clamp(
            1.65rem,
            3.2vw,
            2.2rem
        );

    font-weight: 800;
    line-height: 1.15;
}


.iin-toolbar-heading p:last-child
{
    max-width: 650px;

    margin: 0;

    color: var(--iin-muted);

    font-size: 1rem;
    line-height: 1.7;
}


.iin-eyebrow
{
    margin: 0 0 0.5rem;

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

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

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


.iin-controls
{
    flex: 0 0 auto;
}


.iin-control-group
{
    min-width: 190px;
}


.iin-control-group label
{
    display: block;

    margin-bottom: 0.45rem;

    color: var(--iin-navy);

    font-size: 0.85rem;
    font-weight: 700;
}


.iin-select
{
    width: 100%;
    min-height: 48px;

    padding:
        0.7rem
        2.5rem
        0.7rem
        0.95rem;

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

    border-radius: 0.75rem;

    background-color: var(--iin-white);
    color: var(--iin-navy);

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

    outline: none;

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

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


.iin-select:hover
{
    border-color:
        rgba(21, 154, 156, 0.6);
}


.iin-select:focus
{
    border-color:
        var(--iin-teal);

    box-shadow:
        0 0 0 4px
        rgba(21, 154, 156, 0.14),
        var(--iin-shadow-small);
}


/* =========================================================
   MODE SELECTOR
   ========================================================= */

.iin-mode-selector
{
    margin-bottom: 1.7rem;

    padding: 1.25rem;

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

    border-radius: 1rem;

    background:
        var(--iin-white);

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


.iin-mode-heading
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 0.9rem;
}


.iin-mode-label
{
    color: var(--iin-navy);

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


.iin-mode-help
{
    color: var(--iin-muted);

    font-size: 0.8rem;
}


.iin-mode-tabs
{
    display: grid;

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

    gap: 0.7rem;
}


.iin-mode-button
{
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 0.55rem;

    min-height: 62px;

    padding: 0.8rem 0.7rem;

    border:
        2px solid var(--iin-border);

    border-radius: 0.85rem;

    background: var(--iin-lighter);
    color: var(--iin-navy);

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

    line-height: 1.3;
    text-align: center;

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


.iin-mode-button svg
{
    flex: 0 0 auto;

    width: 18px;
    height: 18px;
}


.iin-mode-button:hover
{
    transform:
        translateY(-1px);

    border-color:
        rgba(21, 154, 156, 0.5);

    background:
        rgba(21, 154, 156, 0.055);

    color:
        var(--iin-teal-dark);
}


.iin-mode-button.is-active
{
    border-color:
        var(--iin-teal);

    background:
        linear-gradient(
            135deg,
            rgba(21, 154, 156, 0.13),
            rgba(31, 111, 139, 0.07)
        );

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

    box-shadow:
        0 6px 18px
        rgba(21, 154, 156, 0.14);
}


/* =========================================================
   ROUND PROGRESS
   ========================================================= */

.iin-progress-area
{
    margin-bottom: 1.25rem;
}


.iin-progress-text
{
    display: flex;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 0.6rem;

    color: var(--iin-navy);

    font-size: 0.88rem;
    font-weight: 700;
}


.iin-progress-track
{
    width: 100%;
    height: 12px;

    overflow: hidden;

    border-radius: 999px;

    background: #dfe9f1;
}


.iin-progress-bar
{
    width: 10%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--iin-teal),
            var(--iin-blue)
        );

    transition:
        width 0.35s ease;
}


/* =========================================================
   MAIN PRACTICE CARD
   ========================================================= */

.iin-card
{
    padding:
        clamp(
            1.4rem,
            4vw,
            2.5rem
        );

    border:
        1px solid
        rgba(219, 229, 238, 0.9);

    border-radius: 1.35rem;

    background:
        var(--iin-white);

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


.iin-card-top
{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 1.5rem;
}


.iin-card-label
{
    margin: 0 0 0.3rem;

    color: var(--iin-navy);

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


.iin-step-instruction
{
    margin: 0;

    color: var(--iin-muted);

    font-size: 0.92rem;
    line-height: 1.5;
}


.iin-card-badges
{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 0.5rem;
}


.iin-mode-badge,
.iin-difficulty-badge
{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 0.45rem 0.8rem;

    border-radius: 999px;

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

    letter-spacing: 0.03em;

    white-space: nowrap;
}


.iin-mode-badge
{
    background:
        rgba(31, 111, 139, 0.11);

    color: var(--iin-blue);
}


.iin-difficulty-badge
{
    background:
        rgba(21, 154, 156, 0.11);

    color: var(--iin-teal-dark);
}


/* =========================================================
   CURRENT PROBLEM
   ========================================================= */

.iin-current-problem-area
{
    margin-bottom: 1.5rem;

    padding: 1.35rem;

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

    border-radius: 1rem;

    background:
        linear-gradient(
            135deg,
            rgba(21, 154, 156, 0.055),
            rgba(31, 111, 139, 0.03)
        );
}


.iin-problem-label
{
    display: block;

    margin-bottom: 0.75rem;

    color: var(--iin-muted);

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

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.iin-problem-display
{
    color:
        var(--iin-navy-dark);

    font-size:
        clamp(
            1.65rem,
            5vw,
            2.4rem
        );

    font-weight: 800;
    line-height: 1.5;

    text-align: center;

    overflow-wrap: anywhere;
}


/* =========================================================
   THREE STEP PROGRESS
   ========================================================= */

.iin-step-progress
{
    display: grid;

    grid-template-columns:
        auto
        minmax(20px, 1fr)
        auto
        minmax(20px, 1fr)
        auto;

    align-items: center;

    gap: 0.55rem;

    margin: 1.8rem 0;
}


.iin-step-marker
{
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 0.35rem;

    min-width: 72px;

    text-align: center;
}


.iin-step-marker span
{
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border:
        2px solid var(--iin-border);

    border-radius: 50%;

    background:
        var(--iin-white);

    color:
        var(--iin-muted);

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

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


.iin-step-marker small
{
    color:
        var(--iin-muted);

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

    line-height: 1.2;
}


.iin-step-marker.is-active span
{
    border-color:
        var(--iin-teal);

    background:
        var(--iin-teal);

    color:
        var(--iin-white);

    transform:
        scale(1.05);
}


.iin-step-marker.is-active small
{
    color:
        var(--iin-teal-dark);

    font-weight: 800;
}


.iin-step-marker.is-complete span
{
    border-color:
        var(--iin-green);

    background:
        var(--iin-green);

    color:
        var(--iin-white);
}


.iin-step-marker.is-complete small
{
    color:
        var(--iin-green);
}


.iin-step-connector
{
    height: 3px;

    border-radius: 999px;

    background:
        var(--iin-border);

    transition:
        background-color 0.25s ease;
}


.iin-step-connector.is-complete
{
    background:
        var(--iin-green);
}


/* =========================================================
   ACTIVE WORK AREA
   ========================================================= */

.iin-work-area
{
    margin-top: 1rem;

    padding:
        clamp(
            1.25rem,
            3vw,
            1.8rem
        );

    border:
        2px solid
        rgba(21, 154, 156, 0.2);

    border-radius: 1rem;

    background:
        linear-gradient(
            135deg,
            rgba(21, 154, 156, 0.065),
            rgba(31, 111, 139, 0.035)
        );
}


.iin-work-mode[hidden]
{
    display: none !important;
}


.iin-work-step-number
{
    margin: 0 0 0.35rem;

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

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

    letter-spacing: 0.1em;

    text-transform: uppercase;
}


.iin-work-mode h3
{
    margin: 0 0 0.55rem;

    color:
        var(--iin-navy);

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

    font-weight: 800;
    line-height: 1.3;
}


.iin-work-description
{
    margin: 0 0 1.3rem;

    color:
        var(--iin-muted);

    font-size: 0.9rem;
    line-height: 1.65;
}


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

.iin-expression-display
{
    margin: 1.2rem 0 1.4rem;

    padding: 1.2rem 1.4rem;

    border:
        1px solid
        rgba(21, 154, 156, 0.22);

    border-radius: 0.9rem;

    background:
        var(--iin-white);

    color:
        var(--iin-navy-dark);

    font-size:
        clamp(
            1.45rem,
            4vw,
            2rem
        );

    font-weight: 800;
    line-height: 1.6;

    text-align: center;

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

    overflow-wrap: anywhere;
}


/* =========================================================
   NUMBER LINE CARD
   ========================================================= */

.iin-number-line-card
{
    margin-top: 1.25rem;

    padding:
        clamp(
            1rem,
            3vw,
            1.5rem
        );

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

    border-radius: 1rem;

    background:
        var(--iin-white);

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


/* =========================================================
   NUMBER LINE STAGE
   ========================================================= */

.iin-number-line-stage
{
    position: relative;

    width: 100%;
    height: 150px;

    margin-bottom: 1.25rem;

    overflow: visible;

    user-select: none;
    touch-action: manipulation;
}


/* =========================================================
   NUMBER LINE TRACK
   ========================================================= */

.iin-number-line-track
{
    position: absolute;

    top: 67px;
    left: 6%;
    right: 6%;

    height: 4px;

    border-radius: 999px;

    background:
        var(--iin-navy);

    z-index: 2;
}


.iin-number-line-track::before,
.iin-number-line-track::after
{
    content: "";

    position: absolute;

    top: 50%;

    width: 0;
    height: 0;

    transform:
        translateY(-50%);

    border-top:
        8px solid transparent;

    border-bottom:
        8px solid transparent;
}


.iin-number-line-track::before
{
    left: -1px;

    border-right:
        12px solid var(--iin-navy);
}


.iin-number-line-track::after
{
    right: -1px;

    border-left:
        12px solid var(--iin-navy);
}


/* =========================================================
   NUMBER LINE TICKS
   ========================================================= */

.iin-number-line-ticks
{
    position: absolute;

    inset: 0;

    /*
     * The tick layer is visual only.
     *
     * During Step 1, the individual invisible
     * hitbox buttons opt back into pointer events.
     *
     * During Steps 2 and 3, this prevents the
     * full-size tick layer from blocking the
     * endpoint and solution-region interactions.
     */
    pointer-events: none;

    z-index: 5;
}


.iin-number-line-tick
{
    position: absolute;

    top: 57px;

    width: 2px;
    height: 24px;

    transform:
        translateX(-50%);

    background:
        var(--iin-navy);

    cursor: pointer;
}


.iin-number-line-tick-label
{
    position: absolute;

    top: 86px;

    transform:
        translateX(-50%);

    color:
        var(--iin-text);

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

    white-space: nowrap;
}


.iin-number-line-tick-hitbox
{
    position: absolute;

    top: 36px;

    width: 34px;
    height: 62px;

    transform:
        translateX(-50%);

    border: 0;

    background: transparent;

    pointer-events: auto;

    cursor: pointer;

    z-index: 12;
}

.iin-number-line-tick-hitbox:hover
{
    background:
        rgba(21, 154, 156, 0.06);

    border-radius: 0.5rem;
}


/* =========================================================
   NUMBER LINE SELECTION / SHADING
   ========================================================= */

.iin-number-line-selection
{
    position: absolute;

    top: 64px;
    left: 0;
    right: 0;

    height: 10px;

    pointer-events: none;

    z-index: 3;
}


.iin-shaded-region
{
    position: absolute;

    top: 1px;

    height: 8px;

    border-radius: 999px;

    background:
        rgba(21, 154, 156, 0.5);

    box-shadow:
        0 0 0 1px
        rgba(21, 154, 156, 0.15);
}


.iin-shaded-region-left
{
    left: 0;
}


.iin-shaded-region-right
{
    right: 0;
}


.iin-shaded-region-between
{
    border-radius: 999px;
}


.iin-shaded-region-union-left,
.iin-shaded-region-union-right
{
    position: absolute;

    top: 1px;

    height: 8px;

    border-radius: 999px;

    background:
        rgba(111, 66, 193, 0.44);
}


/* =========================================================
   ENDPOINT LAYER
   ========================================================= */

.iin-number-line-endpoints
{
    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 15;
}


.iin-number-line-endpoint
{
    position: absolute;

    top: 68px;

    width: 20px;
    height: 20px;

    transform:
        translate(
            -50%,
            -50%
        );

    border:
        3px solid var(--iin-teal);

    border-radius: 50%;

    background:
        var(--iin-white);

    box-shadow:
        0 2px 7px
        rgba(16, 42, 67, 0.16);
}


.iin-number-line-endpoint.is-open
{
    background:
        var(--iin-white);
}


.iin-number-line-endpoint.is-closed
{
    background:
        var(--iin-teal);
}


.iin-number-line-endpoint.is-secondary
{
    border-color:
        var(--iin-purple);
}


.iin-number-line-endpoint.is-secondary.is-closed
{
    background:
        var(--iin-purple);
}


/* =========================================================
   SELECTED ENDPOINT MARKER
   ========================================================= */

.iin-number-line-candidate
{
    position: absolute;

    top: 67px;

    width: 26px;
    height: 26px;

    transform:
        translate(
            -50%,
            -50%
        );

    border:
        3px solid var(--iin-orange);

    border-radius: 50%;

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

    box-shadow:
        0 0 0 5px
        rgba(217, 119, 6, 0.1);

    pointer-events: none;
}


/* =========================================================
   ENDPOINT / SHADING CONTROLS
   ========================================================= */

.iin-endpoint-controls,
.iin-shading-controls
{
    margin-top: 1.1rem;
}


.iin-control-label
{
    display: block;

    margin-bottom: 0.55rem;

    color:
        var(--iin-navy);

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


.iin-choice-row
{
    display: grid;

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

    gap: 0.75rem;
}


.iin-choice-row-three
{
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


.iin-choice-button
{
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 0.55rem;

    min-height: 48px;

    padding:
        0.7rem
        0.85rem;

    border:
        2px solid var(--iin-border);

    border-radius: 0.8rem;

    background:
        var(--iin-lighter);

    color:
        var(--iin-navy);

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

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


.iin-choice-button:hover
{
    transform:
        translateY(-1px);

    border-color:
        rgba(21, 154, 156, 0.5);

    background:
        rgba(21, 154, 156, 0.055);

    color:
        var(--iin-teal-dark);
}


.iin-choice-button.is-selected
{
    border-color:
        var(--iin-teal);

    background:
        rgba(21, 154, 156, 0.1);

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

    box-shadow:
        0 5px 15px
        rgba(21, 154, 156, 0.12);
}


.iin-choice-button.is-correct
{
    border-color:
        var(--iin-green);

    background:
        rgba(25, 135, 84, 0.08);

    color:
        var(--iin-green-dark);
}


.iin-choice-button.is-incorrect
{
    border-color:
        var(--iin-red);

    background:
        rgba(192, 57, 43, 0.06);

    color:
        var(--iin-red);
}


/* =========================================================
   ENDPOINT PREVIEWS
   ========================================================= */

.iin-endpoint-preview
{
    display: inline-block;

    flex: 0 0 auto;

    width: 16px;
    height: 16px;

    border:
        2px solid currentColor;

    border-radius: 50%;
}


.iin-endpoint-preview-open
{
    background:
        var(--iin-white);
}


.iin-endpoint-preview-closed
{
    background:
        currentColor;
}


/* =========================================================
   ANSWER FORMS
   ========================================================= */

.iin-answer-form
{
    margin-top: 1.3rem;
}


.iin-input-label
{
    display: block;

    margin-bottom: 0.6rem;

    color:
        var(--iin-navy);

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


.iin-input-row
{
    display: grid;

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

    gap: 0.8rem;
}


.iin-step-input
{
    width: 100%;
    min-height: 56px;

    padding:
        0.85rem
        1rem;

    border:
        2px solid var(--iin-border);

    border-radius: 0.85rem;

    background:
        var(--iin-white);

    color:
        var(--iin-navy-dark);

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

    outline: none;

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


.iin-step-input::placeholder
{
    color: #9aabba;

    font-weight: 500;
}


.iin-step-input:hover
{
    border-color:
        #b9cad8;
}


.iin-step-input:focus
{
    border-color:
        var(--iin-teal);

    box-shadow:
        0 0 0 4px
        rgba(21, 154, 156, 0.13);
}


.iin-step-input.is-correct
{
    border-color:
        var(--iin-green);

    background:
        rgba(25, 135, 84, 0.045);
}


.iin-step-input.is-incorrect
{
    border-color:
        var(--iin-red);

    background:
        rgba(192, 57, 43, 0.045);
}


/* =========================================================
   FEEDBACK
   ========================================================= */

.iin-feedback
{
    margin-top: 1.35rem;

    padding: 1rem 1.1rem;

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

    border-left-width: 4px;

    border-radius: 0.8rem;

    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.6;
}


.iin-feedback-neutral
{
    border-left-color:
        var(--iin-blue);

    background:
        rgba(31, 111, 139, 0.05);

    color:
        var(--iin-text);
}


.iin-feedback-correct
{
    border-color:
        rgba(25, 135, 84, 0.25);

    border-left-color:
        var(--iin-green);

    background:
        rgba(25, 135, 84, 0.065);

    color:
        #12663f;
}


.iin-feedback-incorrect
{
    border-color:
        rgba(192, 57, 43, 0.22);

    border-left-color:
        var(--iin-red);

    background:
        rgba(192, 57, 43, 0.055);

    color:
        #8f2e24;
}


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

.iin-submit-button,
.iin-next-button
{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0.45rem;

    min-height: 56px;

    padding:
        0.85rem
        1.4rem;

    border: 0;

    border-radius: 0.85rem;

    color:
        var(--iin-white);

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

    white-space: nowrap;

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


.iin-submit-button
{
    background:
        linear-gradient(
            135deg,
            var(--iin-teal),
            var(--iin-blue)
        );

    box-shadow:
        0 8px 20px
        rgba(21, 154, 156, 0.22);
}


.iin-next-button
{
    background:
        linear-gradient(
            135deg,
            var(--iin-green),
            var(--iin-green-dark)
        );

    box-shadow:
        0 8px 20px
        rgba(25, 135, 84, 0.22);
}


.iin-submit-button:hover,
.iin-next-button:hover
{
    transform:
        translateY(-2px);

    filter:
        brightness(1.04);
}


.iin-submit-button:active,
.iin-next-button:active
{
    transform:
        translateY(0);
}


.iin-submit-button:disabled
{
    cursor: not-allowed;

    opacity: 0.58;

    transform: none;

    box-shadow: none;
}


.iin-number-line-card > .iin-submit-button
{
    width: 100%;

    margin-top: 1.25rem;
}


/* =========================================================
   SECONDARY ACTIONS
   ========================================================= */

.iin-action-row
{
    display: flex;
    flex-wrap: wrap;

    gap: 0.7rem;

    margin-top: 1.25rem;
}


.iin-secondary-button
{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0.45rem;

    min-height: 42px;

    padding:
        0.6rem
        0.9rem;

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

    border-radius: 0.7rem;

    background:
        var(--iin-white);

    color:
        var(--iin-navy);

    font-size: 0.82rem;
    font-weight: 750;

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


.iin-secondary-button:hover
{
    transform:
        translateY(-1px);

    border-color:
        rgba(21, 154, 156, 0.5);

    background:
        rgba(21, 154, 156, 0.055);

    color:
        var(--iin-teal-dark);
}


/* =========================================================
   HELP PANEL
   ========================================================= */

.iin-help-panel
{
    display: grid;

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

    gap: 1rem;

    margin-top: 1.25rem;

    padding: 1.1rem;

    border:
        1px solid
        rgba(217, 119, 6, 0.24);

    border-radius: 0.9rem;

    background:
        rgba(217, 119, 6, 0.055);
}


.iin-help-panel[hidden]
{
    display: none !important;
}


.iin-help-panel-icon
{
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background:
        rgba(217, 119, 6, 0.12);

    color:
        var(--iin-orange);

    font-size: 1rem;
}


.iin-help-panel strong
{
    display: block;

    margin-bottom: 0.25rem;

    color:
        var(--iin-navy);

    font-size: 0.9rem;
}


.iin-help-panel p
{
    margin: 0;

    color:
        var(--iin-text);

    font-size: 0.86rem;
    line-height: 1.6;
}


/* =========================================================
   REFERENCE PANEL
   ========================================================= */

.iin-reference-panel
{
    margin-top: 1.25rem;

    padding: 1.25rem;

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

    border-radius: 1rem;

    background:
        var(--iin-white);

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


.iin-reference-panel[hidden]
{
    display: none !important;
}


.iin-reference-panel-heading
{
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 1rem;
}


.iin-reference-panel-heading h3
{
    margin: 0;

    color:
        var(--iin-navy);

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


.iin-close-button
{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    padding: 0;

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

    border-radius: 50%;

    background:
        var(--iin-white);

    color:
        var(--iin-muted);
}


.iin-close-button:hover
{
    border-color:
        rgba(21, 154, 156, 0.5);

    color:
        var(--iin-teal-dark);
}


.iin-reference-grid
{
    display: grid;

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

    gap: 1rem;
}


.iin-reference-item
{
    padding: 1rem;

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

    border-radius: 0.85rem;

    background:
        var(--iin-lighter);
}


.iin-reference-item strong
{
    display: block;

    margin-bottom: 0.45rem;

    color:
        var(--iin-navy);

    font-size: 0.9rem;
}


.iin-reference-expression
{
    display: block;

    margin-bottom: 0.35rem;

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

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


.iin-reference-interval
{
    display: block;

    margin-top: 0.45rem;

    color:
        var(--iin-purple);

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


.iin-reference-item p
{
    margin: 0;

    color:
        var(--iin-muted);

    font-size: 0.82rem;
    line-height: 1.55;
}


.iin-reference-note
{
    margin: 1rem 0 0;

    padding: 0.9rem 1rem;

    border-left:
        4px solid var(--iin-orange);

    border-radius: 0.65rem;

    background:
        rgba(217, 119, 6, 0.055);

    color:
        var(--iin-text);

    font-size: 0.84rem;
    line-height: 1.6;
}


/* =========================================================
   PROBLEM COMPLETE
   ========================================================= */

.iin-problem-complete
{
    display: grid;

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

    align-items: center;

    gap: 1rem;

    margin-top: 1.4rem;

    padding: 1.2rem;

    border:
        1px solid
        rgba(25, 135, 84, 0.25);

    border-radius: 1rem;

    background:
        rgba(25, 135, 84, 0.06);
}


.iin-problem-complete[hidden]
{
    display: none !important;
}


.iin-problem-complete-icon
{
    color:
        var(--iin-green);

    font-size: 1.8rem;
}


.iin-problem-complete-label
{
    margin: 0 0 0.2rem;

    color:
        var(--iin-green);

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

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.iin-problem-complete h3
{
    margin: 0 0 0.2rem;

    color:
        var(--iin-navy);

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


.iin-problem-complete p:last-child
{
    margin: 0;

    color:
        var(--iin-muted);

    font-size: 0.86rem;
    line-height: 1.55;
}


/* =========================================================
   STATS
   ========================================================= */

.iin-stats
{
    display: grid;

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

    gap: 1rem;

    margin-top: 1.25rem;
}


.iin-stat
{
    padding: 1rem;

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

    border-radius: 0.9rem;

    background:
        var(--iin-white);

    text-align: center;

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


.iin-stat span
{
    display: block;

    margin-bottom: 0.3rem;

    color:
        var(--iin-muted);

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


.iin-stat strong
{
    color:
        var(--iin-navy-dark);

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


/* =========================================================
   RESULTS
   ========================================================= */

.iin-results
{
    margin-top: 1.5rem;

    padding: 2rem;

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

    border-radius: 1.2rem;

    background:
        var(--iin-white);

    text-align: center;

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


.iin-results[hidden]
{
    display: none !important;
}


.iin-results-label
{
    margin-bottom: 0.4rem;

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

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

    letter-spacing: 0.09em;

    text-transform: uppercase;
}


.iin-results h2
{
    color:
        var(--iin-navy);

    font-weight: 800;
}


.iin-results-grid
{
    display: grid;

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

    gap: 1rem;

    margin: 1.5rem 0;
}


.iin-result-item
{
    padding: 1rem;

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

    border-radius: 0.85rem;

    background:
        var(--iin-lighter);
}


.iin-result-item span
{
    display: block;

    margin-bottom: 0.35rem;

    color:
        var(--iin-muted);

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


.iin-result-item strong
{
    color:
        var(--iin-navy);

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


.iin-result-accuracy strong
{
    color:
        var(--iin-teal-dark);
}


/* =========================================================
   INFO CARDS
   ========================================================= */

.iin-info
{
    display: grid;

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

    gap: 1.25rem;

    padding-top: 4rem;
    padding-bottom: 4rem;
}


.iin-info article
{
    padding: 1.35rem;

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

    border-radius: 1rem;

    background:
        var(--iin-white);

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


.iin-info-icon
{
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    margin-bottom: 1rem;

    border-radius: 0.8rem;

    background:
        rgba(21, 154, 156, 0.1);

    color:
        var(--iin-teal-dark);
}


.iin-info h2
{
    margin-bottom: 0.5rem;

    color:
        var(--iin-navy);

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


.iin-info p
{
    margin: 0;

    color:
        var(--iin-muted);

    font-size: 0.9rem;
    line-height: 1.65;
}


/* =========================================================
   EXAMPLE SECTION
   ========================================================= */

.iin-example-section
{
    padding: 4.5rem 0;

    background:
        linear-gradient(
            180deg,
            #f7fafc,
            #ffffff
        );
}


.iin-example-content
{
    width:
        min(
            100%,
            900px
        );

    margin: 0 auto;
}


.iin-example-heading
{
    margin-bottom: 1.5rem;
}


.iin-example-heading h2
{
    color:
        var(--iin-navy);

    font-weight: 800;
}


.iin-example-heading p:last-child
{
    color:
        var(--iin-muted);

    line-height: 1.7;
}


.iin-example-expression
{
    margin-bottom: 1.5rem;

    padding: 1.3rem;

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

    border-radius: 1rem;

    background:
        var(--iin-white);

    color:
        var(--iin-navy-dark);

    font-size:
        clamp(
            1.5rem,
            4vw,
            2.1rem
        );

    font-weight: 800;
    line-height: 1.5;

    text-align: center;

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


.iin-example-steps
{
    display: grid;

    gap: 0.85rem;
}


.iin-example-step
{
    display: grid;

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

    align-items: center;

    gap: 1rem;

    padding: 1rem;

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

    border-radius: 0.85rem;

    background:
        var(--iin-white);
}


.iin-example-step-number
{
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    background:
        var(--iin-teal);

    color:
        var(--iin-white);

    font-weight: 800;
}


.iin-example-step-label
{
    display: block;

    margin-bottom: 0.2rem;

    color:
        var(--iin-muted);

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

    text-transform: uppercase;
}


.iin-example-step strong
{
    color:
        var(--iin-navy);
}


.iin-example-note
{
    margin-top: 1.2rem;

    padding: 1rem;

    border-left:
        4px solid var(--iin-teal);

    border-radius: 0.7rem;

    background:
        rgba(21, 154, 156, 0.06);

    color:
        var(--iin-text);

    line-height: 1.65;
}


/* =========================================================
   SEO SECTION
   ========================================================= */

.iin-seo-section
{
    padding: 4.5rem 0;
}


.iin-seo-content
{
    width:
        min(
            100%,
            900px
        );

    margin: 0 auto;
}


.iin-seo-content h2
{
    margin-bottom: 1rem;

    color:
        var(--iin-navy);

    font-weight: 800;
}


.iin-seo-content h3
{
    margin-top: 2rem;
    margin-bottom: 0.65rem;

    color:
        var(--iin-navy);

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


.iin-seo-content p
{
    color:
        var(--iin-text);

    line-height: 1.75;
}


.iin-seo-links
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 0.8rem;

    margin-top: 2rem;
}


.iin-resource-link
{
    color:
        var(--iin-teal-dark);

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

    text-decoration: none;
}


.iin-resource-link:hover
{
    text-decoration: underline;
}


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

@media (max-width: 900px)
{
    .iin-toolbar
    {
        align-items: stretch;
        flex-direction: column;
    }


    .iin-controls
    {
        width: 100%;
    }


    .iin-control-group
    {
        width: 100%;
    }


    .iin-mode-tabs
    {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .iin-stats,
    .iin-results-grid
    {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .iin-info
    {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 767.98px)
{
    .iin-section
    {
        padding:
            3.5rem
            1rem;
    }


    .iin-card
    {
        padding:
            1.25rem;
    }


    .iin-card-top
    {
        flex-direction: column;
    }


    .iin-card-badges
    {
        justify-content: flex-start;
    }


    .iin-step-progress
    {
        gap: 0.25rem;
    }


    .iin-step-marker
    {
        min-width: 55px;
    }


    .iin-step-marker span
    {
        width: 34px;
        height: 34px;
    }


    .iin-input-row
    {
        grid-template-columns: 1fr;
    }


    .iin-submit-button
    {
        width: 100%;
    }


    .iin-reference-grid
    {
        grid-template-columns: 1fr;
    }


    .iin-choice-row-three
    {
        grid-template-columns: 1fr;
    }


    .iin-problem-complete
    {
        grid-template-columns:
            auto
            minmax(0, 1fr);
    }


    .iin-problem-complete
    .iin-next-button
    {
        grid-column:
            1 / -1;

        width: 100%;
    }


    .iin-number-line-stage
    {
        height: 140px;
    }


    .iin-number-line-tick-label
    {
        font-size: 0.7rem;
    }
}


@media (max-width: 575.98px)
{
    .iin-mode-heading
    {
        flex-direction: column;
        align-items: flex-start;
    }


    .iin-mode-tabs
    {
        grid-template-columns: 1fr;
    }


    .iin-mode-button
    {
        justify-content: flex-start;

        padding-left: 1rem;
    }


    .iin-step-progress
    {
        grid-template-columns:
            auto
            minmax(10px, 1fr)
            auto
            minmax(10px, 1fr)
            auto;
    }


    .iin-step-marker
    {
        min-width: 46px;
    }


    .iin-step-marker small
    {
        max-width: 66px;

        font-size: 0.61rem;
    }


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


    .iin-action-row
    {
        display: grid;

        grid-template-columns: 1fr;
    }


    .iin-secondary-button
    {
        width: 100%;
    }


    .iin-stats,
    .iin-results-grid
    {
        grid-template-columns:
            1fr
            1fr;
    }


    .iin-number-line-card
    {
        padding:
            0.9rem
            0.65rem;
    }


    .iin-seo-links
    {
        align-items: stretch;
        flex-direction: column;
    }


    .iin-seo-links .btn,
    .iin-resource-link
    {
        width: 100%;
    }
}

.iin-number-line-endpoints
{
    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 15;
}

/* =========================================================
   DIRECTLY INTERACTIVE NUMBER-LINE ENDPOINTS
   ========================================================= */

.iin-interactive-endpoint
{
    width: 28px;
    height: 28px;

    padding: 0;

    pointer-events: auto;

    cursor: pointer;

    z-index: 25;

    outline: none;

    appearance: none;
    -webkit-appearance: none;

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


.iin-interactive-endpoint:hover
{
    transform:
        translate(
            -50%,
            -50%
        )
        scale(1.16);

    box-shadow:
        0 0 0 7px
        rgba(21, 154, 156, 0.13),
        0 3px 10px
        rgba(16, 42, 67, 0.2);
}


.iin-interactive-endpoint:focus-visible
{
    box-shadow:
        0 0 0 7px
        rgba(21, 154, 156, 0.2),
        0 3px 10px
        rgba(16, 42, 67, 0.2);
}


.iin-interactive-endpoint.is-secondary:hover
{
    box-shadow:
        0 0 0 7px
        rgba(111, 66, 193, 0.13),
        0 3px 10px
        rgba(16, 42, 67, 0.2);
}

/* =========================================================
   DIRECT SOLUTION-REGION INTERACTION
   ========================================================= */

.iin-solution-region
{
    position: absolute;

    /*
     * The selection layer itself sits at the number line,
     * so keep the hit area tightly centered on the line
     * instead of creating a large rectangular hover box.
     */
    top: -10px;

    height: 30px;

    padding: 0;

    border: 0;
    border-radius: 999px;

    background: transparent;

    pointer-events: auto;

    cursor: pointer;

    z-index: 18;

    outline: none;
}


/*
 * This pseudo-element IS the visual preview.
 * It lies directly on top of the number-line segment.
 */
.iin-solution-region::before
{
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    top: 50%;

    height: 8px;

    transform:
        translateY(-50%);

    border-radius: 999px;

    background:
        transparent;

    transition:
        height 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}


/*
 * Hover previews the exact region that would be shaded.
 */
.iin-solution-region:hover::before
{
    height: 12px;

    background:
        rgba(21, 154, 156, 0.38);

    box-shadow:
        0 0 0 4px
        rgba(21, 154, 156, 0.08);
}


/*
 * Once selected, leave the region visibly active.
 */
.iin-solution-region.is-selected::before
{
    height: 12px;

    background:
        rgba(21, 154, 156, 0.62);

    box-shadow:
        0 0 0 4px
        rgba(21, 154, 156, 0.09);
}


/*
 * We no longer need floating Left / Between / Right labels.
 */
.iin-solution-region-label
{
    display: none;
}


.iin-solution-region:focus-visible::before
{
    height: 12px;

    background:
        rgba(21, 154, 156, 0.38);

    box-shadow:
        0 0 0 4px
        rgba(21, 154, 156, 0.16);
}