/* =========================================================
   POINT-SLOPE FORM PRACTICE PAGE
   ========================================================= */

:root
{
    --psf-navy: #102a43;
    --psf-navy-dark: #081c2f;
    --psf-blue: #1f6f8b;
    --psf-teal: #159a9c;
    --psf-teal-dark: #117b7d;
    --psf-green: #198754;
    --psf-green-dark: #157347;
    --psf-red: #c0392b;
    --psf-orange: #d97706;
    --psf-purple: #6f42c1;
    --psf-light: #f5f8fb;
    --psf-lighter: #fbfcfe;
    --psf-border: #dbe5ee;
    --psf-text: #243b53;
    --psf-muted: #627d98;
    --psf-white: #ffffff;
    --psf-shadow: 0 18px 45px rgba(16, 42, 67, 0.12);
    --psf-shadow-small: 0 8px 24px rgba(16, 42, 67, 0.09);
}


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

.psf-practice-page
{
    background: var(--psf-white);
    color: var(--psf-text);
    font-family: "Inter", sans-serif;
}

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

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

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


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

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

.psf-app
{
    width: min(100%, 1040px);
    margin: 0 auto;
}


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

.psf-toolbar
{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;

    margin-bottom: 2rem;
}

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

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

    color: var(--psf-navy);

    font-size: clamp(1.8rem, 4vw, 2.55rem);
    font-weight: 800;
    line-height: 1.15;
}

.psf-toolbar-heading p:last-child
{
    max-width: 640px;
    margin: 0;

    color: var(--psf-muted);

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

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

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

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

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

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

    margin-bottom: 0.45rem;

    color: var(--psf-navy);

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

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

    padding: 0.7rem 2.5rem 0.7rem 0.95rem;

    border: 1px solid var(--psf-border);
    border-radius: 0.75rem;

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

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

    outline: none;

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

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

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

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

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


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

.psf-mode-selector
{
    margin-bottom: 1.7rem;
    padding: 1.25rem;

    border: 1px solid var(--psf-border);
    border-radius: 1rem;

    background: var(--psf-white);

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

.psf-mode-heading
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;

    margin-bottom: 0.9rem;
}

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

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

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

    font-size: 0.8rem;
}

.psf-mode-tabs
{
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.7rem;
}

.psf-mode-button
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;

    min-height: 56px;
    padding: 0.8rem 0.75rem;

    border: 2px solid var(--psf-border);
    border-radius: 0.85rem;

    background: var(--psf-lighter);
    color: var(--psf-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;
}

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

    width: 18px;
    height: 18px;
}

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

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

    background: rgba(21, 154, 156, 0.055);
    color: var(--psf-teal-dark);
}

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

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

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

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


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

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

.psf-progress-text
{
    display: flex;
    justify-content: space-between;
    gap: 1rem;

    margin-bottom: 0.6rem;

    color: var(--psf-navy);

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

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

    overflow: hidden;

    border-radius: 999px;

    background: #dfe9f1;
}

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

    border-radius: inherit;

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

    transition: width 0.35s ease;
}


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

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

    border: 1px solid rgba(219, 229, 238, 0.9);
    border-radius: 1.35rem;

    background: var(--psf-white);

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

.psf-card-top
{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;

    margin-bottom: 1.5rem;
}

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

    color: var(--psf-navy);

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

.psf-step-instruction
{
    margin: 0;

    color: var(--psf-muted);

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

.psf-card-badges
{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.psf-mode-badge,
.psf-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;
}

.psf-mode-badge
{
    background: rgba(31, 111, 139, 0.11);
    color: var(--psf-blue);
}

.psf-difficulty-badge
{
    background: rgba(21, 154, 156, 0.11);
    color: var(--psf-teal-dark);
}


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

.psf-current-problem-area
{
    margin-bottom: 1.5rem;
    padding: 1.35rem;

    border: 1px solid var(--psf-border);
    border-radius: 1rem;

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

.psf-problem-label
{
    display: block;

    margin-bottom: 0.75rem;

    color: var(--psf-muted);

    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

    font-size: clamp(1.55rem, 5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.5;

    text-align: center;

    overflow-wrap: anywhere;
}

.psf-problem-display strong
{
    color: var(--psf-teal-dark);
    font-weight: 800;
}


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

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

.psf-step-marker
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;

    min-width: 72px;

    text-align: center;
}

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

    width: 38px;
    height: 38px;

    border: 2px solid var(--psf-border);
    border-radius: 50%;

    background: var(--psf-white);
    color: var(--psf-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;
}

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

    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

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

    background: var(--psf-teal);
    color: var(--psf-white);

    transform: scale(1.05);
}

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

    font-weight: 800;
}

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

    background: var(--psf-green);
    color: var(--psf-white);
}

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

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

    border-radius: 999px;

    background: var(--psf-border);

    transition: background-color 0.25s ease;
}

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


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

.psf-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)
        );
}

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

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

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

    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

    color: var(--psf-navy);

    font-size: clamp(1.2rem, 3vw, 1.55rem);
    font-weight: 800;
    line-height: 1.3;
}

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

    color: var(--psf-muted);

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


/* =========================================================
   EQUATION DISPLAY
   ========================================================= */

.psf-equation-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(--psf-white);
    color: var(--psf-navy-dark);

    font-size: clamp(1.5rem, 5vw, 2.15rem);
    font-weight: 800;
    line-height: 1.5;

    text-align: center;

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

    overflow-wrap: anywhere;
}


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

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

.psf-input-label
{
    display: block;

    margin-bottom: 0.6rem;

    color: var(--psf-navy);

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

.psf-input-row
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
}

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

    padding: 0.85rem 1rem;

    border: 2px solid var(--psf-border);
    border-radius: 0.85rem;

    background: var(--psf-white);
    color: var(--psf-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;
}

.psf-step-input::placeholder
{
    color: #9aabba;
    font-weight: 500;
}

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

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

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

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

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

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

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


/* =========================================================
   GIVEN VALUES
   ========================================================= */

.psf-given-values
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;

    margin: 1.25rem 0;
}

.psf-value-card
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;

    min-height: 110px;

    padding: 1rem;

    border: 1px solid var(--psf-border);
    border-radius: 0.9rem;

    background: var(--psf-white);

    text-align: center;

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

.psf-value-card span
{
    color: var(--psf-muted);

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.psf-value-card strong
{
    color: var(--psf-navy-dark);

    font-size: clamp(1.3rem, 4vw, 1.75rem);
    font-weight: 800;
}


/* =========================================================
   TWO POINTS MODE
   ========================================================= */

.psf-two-points-layout
{
    display: grid;
    gap: 1.25rem;
}

.psf-two-points-layout .psf-given-values
{
    margin-top: 0;
}

.psf-graph
{
    width: 100%;
    height: 430px;

    border: 1px solid var(--psf-border) !important;
    border-radius: 0.9rem;

    background: #ffffff;

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


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

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

    padding: 1rem 1.1rem;

    border: 1px solid var(--psf-border);
    border-left-width: 4px;
    border-radius: 0.8rem;

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

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

    background: rgba(31, 111, 139, 0.05);
    color: var(--psf-text);
}

.psf-feedback-correct
{
    border-color: rgba(25, 135, 84, 0.25);
    border-left-color: var(--psf-green);

    background: rgba(25, 135, 84, 0.065);
    color: #12663f;
}

.psf-feedback-incorrect
{
    border-color: rgba(192, 57, 43, 0.22);
    border-left-color: var(--psf-red);

    background: rgba(192, 57, 43, 0.055);
    color: #8f2e24;
}


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

.psf-submit-button,
.psf-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(--psf-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;
}

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

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

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

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

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

    filter: brightness(1.04);
}

.psf-submit-button:hover
{
    box-shadow: 0 12px 24px rgba(21, 154, 156, 0.28);
}

.psf-next-button:hover
{
    box-shadow: 0 12px 24px rgba(25, 135, 84, 0.28);
}

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

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

    opacity: 0.58;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   ACTION ROW
   ========================================================= */

.psf-action-row
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;

    margin-top: 1.25rem;
}

.psf-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(--psf-border);
    border-radius: 0.7rem;

    background: var(--psf-white);
    color: var(--psf-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;
}

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

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

    background: rgba(21, 154, 156, 0.055);
    color: var(--psf-teal-dark);
}


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

.psf-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);
}

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

.psf-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(--psf-orange);

    font-size: 1rem;
}

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

    margin-bottom: 0.25rem;

    color: var(--psf-navy);

    font-size: 0.9rem;
}

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

    color: var(--psf-text);

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


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

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

    padding: 1.25rem;

    border: 1px solid var(--psf-border);
    border-radius: 1rem;

    background: var(--psf-white);

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

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

.psf-reference-panel-heading
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    margin-bottom: 1rem;
}

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

    color: var(--psf-navy);

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

.psf-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(--psf-border);
    border-radius: 50%;

    background: var(--psf-white);
    color: var(--psf-muted);

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

.psf-close-button:hover
{
    border-color: rgba(192, 57, 43, 0.35);

    background: rgba(192, 57, 43, 0.04);
    color: var(--psf-red);
}


/* =========================================================
   REFERENCE HERO
   ========================================================= */

.psf-reference-hero
{
    margin-bottom: 1rem;

    padding: 1.2rem;

    border: 1px solid rgba(21, 154, 156, 0.2);
    border-radius: 0.9rem;

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

    text-align: center;
}

.psf-reference-main-equation
{
    display: block;

    margin-bottom: 0.45rem;

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

    font-size: clamp(1.65rem, 5vw, 2.2rem);
    font-weight: 800;
}

.psf-reference-hero p
{
    max-width: 620px;

    margin: 0 auto;

    color: var(--psf-muted);

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


/* =========================================================
   REFERENCE GRID
   ========================================================= */

.psf-reference-grid
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

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

    border: 1px solid var(--psf-border);
    border-radius: 0.85rem;

    background: var(--psf-light);
}

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

    margin-bottom: 0.55rem;

    color: var(--psf-navy);

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

.psf-reference-equation
{
    display: block;

    margin-bottom: 0.55rem;

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

    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.5;
}

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

    color: var(--psf-muted);

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


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

.psf-problem-complete
{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.2rem;

    margin-top: 1.5rem;

    padding: 1.3rem;

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

    background:
        linear-gradient(
            135deg,
            rgba(25, 135, 84, 0.08),
            rgba(25, 135, 84, 0.025)
        );
}

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

.psf-problem-complete-icon
{
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: rgba(25, 135, 84, 0.12);
    color: var(--psf-green);

    font-size: 1.25rem;
}

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

    color: var(--psf-green);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.psf-problem-complete h3
{
    margin: 0 0 0.25rem;

    color: var(--psf-navy);

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

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

    color: var(--psf-muted);

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


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

.psf-stats
{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;

    margin-top: 1.25rem;
}

.psf-stat
{
    padding: 1rem;

    border: 1px solid var(--psf-border);
    border-radius: 0.9rem;

    background: var(--psf-white);

    text-align: center;

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

.psf-stat span
{
    display: block;

    margin-bottom: 0.35rem;

    color: var(--psf-muted);

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

.psf-stat strong
{
    display: block;

    color: var(--psf-navy);

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


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

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

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

    border: 1px solid var(--psf-border);
    border-radius: 1.2rem;

    background: var(--psf-white);

    text-align: center;

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

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

.psf-results-label
{
    margin: 0 0 0.4rem;

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

    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.psf-results h2
{
    margin: 0 0 0.6rem;

    color: var(--psf-navy);

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

.psf-results > p:not(.psf-results-label)
{
    max-width: 600px;

    margin: 0 auto 1.4rem;

    color: var(--psf-muted);

    line-height: 1.6;
}

.psf-results-grid
{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;

    margin-bottom: 1.4rem;
}

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

    border: 1px solid var(--psf-border);
    border-radius: 0.85rem;

    background: var(--psf-light);
}

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

    margin-bottom: 0.35rem;

    color: var(--psf-muted);

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

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

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

.psf-result-accuracy
{
    background: rgba(21, 154, 156, 0.07);
}


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

.psf-info
{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;

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

.psf-info article
{
    padding: 1.5rem;

    border: 1px solid var(--psf-border);
    border-radius: 1rem;

    background: var(--psf-white);

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

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

    width: 48px;
    height: 48px;

    margin-bottom: 1rem;

    border-radius: 0.85rem;

    background: rgba(21, 154, 156, 0.1);
    color: var(--psf-teal-dark);

    font-size: 1.1rem;
}

.psf-info article h2
{
    margin: 0 0 0.55rem;

    color: var(--psf-navy);

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

.psf-info article p
{
    margin: 0;

    color: var(--psf-muted);

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


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

.psf-example-section
{
    padding: 5rem 0;

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

.psf-example-content
{
    max-width: 900px;
    margin: 0 auto;
}

.psf-example-heading
{
    margin-bottom: 1.6rem;
}

.psf-example-heading h2
{
    margin: 0 0 0.7rem;

    color: var(--psf-navy);

    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
}

.psf-example-heading p:last-child
{
    margin: 0;

    color: var(--psf-muted);

    line-height: 1.65;
}

.psf-example-equation
{
    margin-bottom: 1.25rem;

    padding: 1.25rem;

    border: 1px solid rgba(21, 154, 156, 0.2);
    border-radius: 0.9rem;

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

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

    font-size: clamp(1.6rem, 5vw, 2.15rem);
    font-weight: 800;

    text-align: center;
}

.psf-example-steps
{
    display: grid;
    gap: 0.9rem;
}

.psf-example-step
{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;

    padding: 1rem 1.1rem;

    border: 1px solid var(--psf-border);
    border-radius: 0.9rem;

    background: var(--psf-white);

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

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

    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--psf-teal);
    color: var(--psf-white);

    font-weight: 800;
}

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

    margin-bottom: 0.2rem;

    color: var(--psf-muted);

    font-size: 0.76rem;
    font-weight: 750;
}

.psf-example-step strong
{
    display: block;

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

    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.5;
}

.psf-example-note
{
    margin: 1.3rem 0 0;

    padding: 1rem 1.1rem;

    border-left: 4px solid var(--psf-teal);
    border-radius: 0.6rem;

    background: rgba(21, 154, 156, 0.055);
    color: var(--psf-text);

    line-height: 1.65;
}


/* =========================================================
   SEO CONTENT
   ========================================================= */

.psf-seo-section
{
    padding: 5rem 0;

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

.psf-seo-content
{
    max-width: 900px;
    margin: 0 auto;
}

.psf-seo-content h2
{
    margin: 0 0 1rem;

    color: var(--psf-navy);

    font-size: clamp(1.8rem, 4vw, 2.45rem);
    font-weight: 800;
    line-height: 1.2;
}

.psf-seo-content h3
{
    margin: 2rem 0 0.7rem;

    color: var(--psf-navy);

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

.psf-seo-content p
{
    margin: 0 0 1rem;

    color: var(--psf-text);

    font-size: 0.98rem;
    line-height: 1.75;
}

.psf-seo-links
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem 1.1rem;

    margin-top: 2rem;
}

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

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

    text-decoration: none;
}

.psf-resource-link:hover
{
    color: var(--psf-blue);

    text-decoration: underline;
}


/* =========================================================
   JSXGRAPH CLEANUP
   ========================================================= */

.psf-graph .JXGtext
{
    font-family: "Inter", sans-serif !important;
}

.psf-graph svg
{
    display: block;
}


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

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

    .psf-controls
    {
        width: 100%;
    }

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

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

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

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


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

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

    .psf-card
    {
        padding: 1.2rem;
    }

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

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

    .psf-mode-heading
    {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

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

    .psf-mode-button
    {
        min-height: 62px;
    }

    .psf-mode-button:last-child
    {
        grid-column: 1 / -1;
    }

    .psf-step-progress
    {
        gap: 0.3rem;
    }

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

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

    .psf-step-marker small
    {
        font-size: 0.6rem;
    }

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

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

    .psf-given-values
    {
        grid-template-columns: 1fr;
    }

    .psf-graph
    {
        min-width: 520px;
        height: 400px;
    }

    .psf-two-points-layout
    {
        overflow-x: auto;
    }

    .psf-action-row
    {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

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

    .psf-problem-complete .psf-next-button
    {
        grid-column: 1 / -1;
        width: 100%;
    }

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

    .psf-info
    {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .psf-example-section,
    .psf-seo-section
    {
        padding: 3.5rem 0;
    }

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

    .psf-seo-links .btn
    {
        width: 100%;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px)
{
    .psf-mode-tabs
    {
        grid-template-columns: 1fr;
    }

    .psf-mode-button:last-child
    {
        grid-column: auto;
    }

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