/* =========================================================
   Two-Step Equations Practice
   File:
   /interactive-learning-tools/two-step-equations/
   two-step-equations.css
   ========================================================= */

.two-step-equations-page {
    --tse-ink: #101827;
    --tse-text: #1f2937;
    --tse-muted: #5b6678;
    --tse-border: #dce3eb;
    --tse-soft: #f7f9fc;
    --tse-teal: #0f766e;
    --tse-teal-dark: #0b5f59;
    --tse-teal-light: #f0fdfa;
    --tse-teal-border: #99d5cf;
    --tse-green: #15803d;
    --tse-green-light: #f0fdf4;
    --tse-green-border: #86cda9;
    --tse-red: #dc2626;
    --tse-red-light: #fef2f2;
    --tse-red-border: #f0a7a7;
    --tse-blue: #1e40af;
    --tse-blue-light: #eff6ff;
    --tse-blue-border: #93c5fd;
    --tse-amber: #92400e;
    --tse-amber-light: #fffbeb;
    --tse-amber-border: #f6c86b;
    background: #ffffff;
    color: var(--tse-text);
    font-family: "Inter", sans-serif;
}

.two-step-equations-page *,
.two-step-equations-page *::before,
.two-step-equations-page *::after {
    box-sizing: border-box;
}

.two-step-equations-page [hidden] {
    display: none !important;
}


/* =========================================================
   Shared Section Styles
   ========================================================= */

.two-step-equations-overview,
.two-step-equations-practice-section,
.two-step-equations-reminders,
.two-step-equations-final-cta {
    padding: 5rem 0;
}

.two-step-equations-overview,
.two-step-equations-reminders {
    background: var(--tse-soft);
}

.two-step-equations-practice-section,
.two-step-equations-final-cta {
    background: #ffffff;
}

.two-step-equations-section-heading {
    max-width: 790px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.two-step-equations-section-heading h2 {
    margin-bottom: 1rem;
    color: var(--tse-ink);
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
}

.two-step-equations-section-heading > p:last-child {
    margin-bottom: 0;
    color: var(--tse-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.two-step-equations-eyebrow,
.two-step-equations-card-label {
    margin-bottom: 0.65rem;
    color: var(--tse-teal);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* =========================================================
   Buttons and Focus
   ========================================================= */

.two-step-equations-page .btn-teal {
    border-color: var(--tse-teal);
    background: var(--tse-teal);
    color: #ffffff;
}

.two-step-equations-page .btn-teal:hover,
.two-step-equations-page .btn-teal:focus {
    border-color: var(--tse-teal-dark);
    background: var(--tse-teal-dark);
    color: #ffffff;
}

.two-step-equations-page .btn-outline-teal {
    border-color: var(--tse-teal);
    background: transparent;
    color: var(--tse-teal);
}

.two-step-equations-page .btn-outline-teal:hover,
.two-step-equations-page .btn-outline-teal:focus {
    border-color: var(--tse-teal);
    background: var(--tse-teal);
    color: #ffffff;
}

.two-step-equations-page button:disabled,
.two-step-equations-page input:disabled,
.two-step-equations-page select:disabled {
    cursor: not-allowed;
    opacity: 0.66;
}

.two-step-equations-page button:focus-visible,
.two-step-equations-page select:focus-visible,
.two-step-equations-page input:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.28);
    outline-offset: 2px;
}


/* =========================================================
   Overview Cards
   ========================================================= */

.two-step-equations-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.two-step-equations-overview-card {
    min-height: 100%;
    border: 1px solid var(--tse-border);
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(16, 24, 39, 0.05);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.two-step-equations-overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(16, 24, 39, 0.08);
}

.two-step-equations-overview-card h3 {
    margin-bottom: 0.75rem;
    color: var(--tse-ink);
    font-size: 1.1rem;
    font-weight: 800;
}

.two-step-equations-overview-card p {
    margin-bottom: 0;
    color: var(--tse-muted);
    line-height: 1.65;
}

.two-step-equations-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--tse-teal);
    color: #ffffff;
    font-weight: 800;
}


/* =========================================================
   Main Tool Shell and Header
   ========================================================= */

.two-step-equations-tool {
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--tse-border);
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(16, 24, 39, 0.1);
}

.two-step-equations-tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-bottom: 1px solid #273449;
    background: var(--tse-ink);
    color: #ffffff;
    padding: 1.75rem 2rem;
}

.two-step-equations-tool-header h2 {
    margin-bottom: 0;
    color: #ffffff;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
}

.two-step-equations-tool-header
.two-step-equations-eyebrow {
    color: #5eead4;
}

.two-step-equations-scoreboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 0.75rem;
}

.two-step-equations-score-item {
    min-width: 90px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.75rem 0.9rem;
    text-align: center;
}

.two-step-equations-score-label {
    display: block;
    margin-bottom: 0.2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.two-step-equations-score-item strong {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
}


/* =========================================================
   Settings
   ========================================================= */

.two-step-equations-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto;
    gap: 1rem;
    align-items: end;
    border-bottom: 1px solid var(--tse-border);
    background: var(--tse-soft);
    padding: 1.5rem 2rem;
}

.two-step-equations-setting-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: #273449;
    font-size: 0.9rem;
    font-weight: 700;
}

.two-step-equations-setting-group .form-select {
    min-height: 3rem;
    border-color: #cfd8e3;
    border-radius: 0.75rem;
    background-color: #ffffff;
}

.two-step-equations-setting-group .form-select:focus {
    border-color: var(--tse-teal);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.14);
}

.two-step-equations-setting-actions {
    display: flex;
    gap: 0.65rem;
}

.two-step-equations-setting-actions .btn {
    min-height: 3rem;
    white-space: nowrap;
}


/* =========================================================
   Main Problem Display
   ========================================================= */

.two-step-equations-problem-panel {
    scroll-margin-top: 7rem;
    border-bottom: 1px solid var(--tse-border);
    background: #ffffff;
    padding: 2.25rem 2rem 2rem;
    text-align: center;
}

.two-step-equations-problem-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.two-step-equations-problem-label {
    margin-bottom: 0;
    color: var(--tse-teal);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.two-step-equations-difficulty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    padding: 0.32rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.two-step-equations-difficulty-badge.easy {
    background: #dcfce7;
    color: #166534;
}

.two-step-equations-difficulty-badge.medium {
    background: #dbeafe;
    color: #1e40af;
}

.two-step-equations-difficulty-badge.hard {
    background: #fef3c7;
    color: #92400e;
}

.two-step-equations-problem-instruction {
    max-width: 760px;
    margin: 0 auto 1.3rem;
    color: #64748b;
    line-height: 1.65;
}

.two-step-equations-problem-equation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12rem;
    min-height: 6.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--tse-teal-border);
    border-radius: 1rem;
    background: var(--tse-teal-light);
    color: var(--tse-teal);
    padding: 1rem 2rem;
    font-size: clamp(2.4rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.two-step-equations-problem-equation sup,
.two-step-equations-final-answer sup,
.two-step-equations-example sup,
.two-step-equations-mini-example sup,
.two-step-equations-work-summary sup,
.two-step-equations-completed-work sup {
    position: relative;
    top: -0.32em;
    font-size: 0.62em;
    line-height: 0;
}

.two-step-equations-problem-relationship {
    max-width: 700px;
    margin: 0 auto 1.75rem;
    color: #356b67;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.65;
}


/* =========================================================
   Progress Rail
   ========================================================= */

.two-step-equations-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.two-step-equations-progress li {
    position: relative;
    display: grid;
    gap: 0.5rem;
    justify-items: center;
    color: #8290a3;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.two-step-equations-progress li::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 1rem;
    right: 50%;
    width: 100%;
    height: 2px;
    background: #dce3eb;
}

.two-step-equations-progress li:first-child::before {
    display: none;
}

.two-step-equations-progress li span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #ffffff;
    color: #64748b;
}

.two-step-equations-progress li.is-current {
    color: var(--tse-teal);
}

.two-step-equations-progress li.is-current span {
    border-color: var(--tse-teal);
    background: var(--tse-teal);
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.12);
}

.two-step-equations-progress li.is-complete,
.two-step-equations-progress li.completed {
    color: #166534;
}

.two-step-equations-progress li.is-complete::before,
.two-step-equations-progress li.completed::before {
    background: #86cda9;
}

.two-step-equations-progress li.is-complete span,
.two-step-equations-progress li.completed span {
    border-color: var(--tse-green);
    background: var(--tse-green);
    color: #ffffff;
}


/* =========================================================
   Workspace and Step Cards
   ========================================================= */

.two-step-equations-workspace {
    display: grid;
    gap: 1.25rem;
    background: var(--tse-soft);
    padding: 2rem;
}

.two-step-equations-step-card {
    border: 1px solid var(--tse-border);
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(16, 24, 39, 0.035);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.two-step-equations-step-card[aria-disabled="true"] {
    background: #f8fafc;
    color: #6b7280;
}

.two-step-equations-step-card.is-active {
    border-color: var(--tse-teal-border);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.two-step-equations-step-card.is-complete,
.two-step-equations-step-card.completed {
    border-color: var(--tse-green-border);
}

.two-step-equations-step-heading {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.two-step-equations-step-heading h3 {
    margin-bottom: 0;
    color: var(--tse-ink);
    font-size: clamp(1.2rem, 2.6vw, 1.55rem);
    font-weight: 800;
}

.two-step-equations-step-card[aria-disabled="true"]
.two-step-equations-step-heading h3 {
    color: #64748b;
}

.two-step-equations-card-label {
    margin-bottom: 0.2rem;
}

.two-step-equations-work-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.8rem;
    background: #e6fffb;
    color: var(--tse-teal);
    font-size: 1.05rem;
    font-weight: 800;
}

.two-step-equations-step-card.is-active
.two-step-equations-work-step-number {
    background: var(--tse-teal);
    color: #ffffff;
}

.two-step-equations-step-card.is-complete
.two-step-equations-work-step-number,
.two-step-equations-step-card.completed
.two-step-equations-work-step-number {
    background: var(--tse-green);
    color: #ffffff;
}

.two-step-equations-step-status {
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.two-step-equations-step-card.is-active
.two-step-equations-step-status {
    background: #ccfbf1;
    color: var(--tse-teal);
}

.two-step-equations-step-card.is-complete
.two-step-equations-step-status,
.two-step-equations-step-card.completed
.two-step-equations-step-status {
    background: #dcfce7;
    color: #166534;
}

.two-step-equations-step-card > p,
.two-step-equations-step-card > div > p {
    color: var(--tse-muted);
    line-height: 1.65;
}


/* =========================================================
   Repeated Equation Panels
   ========================================================= */

.two-step-equations-step-problem-panel {
    display: block;
    visibility: visible;
    opacity: 1;
    margin: 0 0 1.25rem;
    border: 1px solid var(--tse-border);
    border-radius: 1rem;
    background: #ffffff;
    color: var(--tse-ink);
    padding: 1.4rem;
}

.two-step-equations-step-card[aria-disabled="true"]
.two-step-equations-step-problem-panel {
    display: block;
    visibility: visible;
    opacity: 1;
}

.two-step-equations-step-problem-panel
.two-step-equations-problem-equation {
    width: auto;
    min-width: 10rem;
    min-height: 4.5rem;
    margin-bottom: 0.85rem;
    padding: 0.85rem 1.5rem;
    font-size: clamp(2rem, 6vw, 3rem);
}

.two-step-equations-step-problem-panel
.two-step-equations-problem-instruction {
    margin-bottom: 1rem;
}

.two-step-equations-step-problem-panel
.two-step-equations-problem-relationship {
    margin-bottom: 0;
}


/* =========================================================
   Choice Buttons
   ========================================================= */

.two-step-equations-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1.25rem 0;
}

.two-step-equations-choice-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-step-equations-choice-grid button,
.two-step-equations-choice-grid .choice-button {
    width: 100%;
    min-height: 4rem;
    border: 2px solid var(--tse-border);
    border-radius: 0.9rem;
    background: #ffffff;
    color: #273449;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.two-step-equations-choice-grid button:hover,
.two-step-equations-choice-grid button:focus-visible,
.two-step-equations-choice-grid .choice-button:hover,
.two-step-equations-choice-grid .choice-button:focus-visible {
    transform: translateY(-2px);
    border-color: #5eead4;
    background: var(--tse-teal-light);
}

.two-step-equations-choice-grid button.selected,
.two-step-equations-choice-grid button[aria-pressed="true"],
.two-step-equations-choice-grid .choice-button.selected {
    border-color: var(--tse-teal);
    background: #ccfbf1;
    color: var(--tse-teal-dark);
}

.two-step-equations-choice-grid button.correct,
.two-step-equations-choice-grid .choice-button.correct {
    border-color: var(--tse-green);
    background: #dcfce7;
    color: #166534;
}

.two-step-equations-choice-grid button.incorrect,
.two-step-equations-choice-grid .choice-button.incorrect {
    border-color: var(--tse-red);
    background: var(--tse-red-light);
    color: #991b1b;
}


/* =========================================================
   Inputs
   ========================================================= */

.two-step-equations-page .form-control {
    min-height: 3.15rem;
    border: 2px solid #cfd8e3;
    border-radius: 0.75rem;
    background: #ffffff;
    color: var(--tse-ink);
    font-size: 1.12rem;
    font-weight: 800;
    text-align: center;
}

.two-step-equations-page .form-control:focus {
    border-color: var(--tse-teal);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.14);
}

.two-step-equations-page .form-control.correct,
.two-step-equations-page .input-correct {
    border-color: var(--tse-green);
    background: var(--tse-green-light);
}

.two-step-equations-page .form-control.incorrect,
.two-step-equations-page .input-incorrect {
    border-color: var(--tse-red);
    background: var(--tse-red-light);
}


/* =========================================================
   Balance Display
   ========================================================= */

.two-step-equations-balance-display {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0;
    border: 1px solid var(--tse-teal-border);
    border-radius: 1rem;
    background: var(--tse-teal-light);
    padding: 1.25rem;
}

.two-step-equations-balance-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(70px, 110px);
    gap: 0.6rem;
    align-items: center;
    border: 1px solid #cde9e5;
    border-radius: 0.85rem;
    background: #ffffff;
    padding: 0.9rem;
}

.two-step-equations-balance-side > span:first-child {
    color: var(--tse-ink);
    font-size: clamp(1.2rem, 4vw, 1.75rem);
    font-weight: 800;
    text-align: center;
    overflow-wrap: anywhere;
}

.two-step-equations-balance-side > span:nth-child(2) {
    color: var(--tse-teal);
    font-size: 1.5rem;
    font-weight: 800;
}

.two-step-equations-equals-sign {
    color: var(--tse-teal);
    font-size: 2rem;
    font-weight: 800;
}


/* =========================================================
   Solution Row
   ========================================================= */

.two-step-equations-solution-row {
    display: grid;
    grid-template-columns: auto auto minmax(110px, 180px);
    gap: 0.75rem;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 1.5rem 0;
    border: 1px solid var(--tse-teal-border);
    border-radius: 0.9rem;
    background: var(--tse-teal-light);
    padding: 1rem 1.15rem;
}

.two-step-equations-solution-row > span {
    color: var(--tse-teal);
    font-size: 1.65rem;
    font-weight: 800;
}


/* =========================================================
   Calculation Trail and Check Display
   ========================================================= */

.two-step-equations-calculation-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin: 1.25rem 0;
    border: 1px solid var(--tse-teal-border);
    border-radius: 0.9rem;
    background: var(--tse-teal-light);
    color: #355d59;
    padding: 1rem 1.15rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.6;
}

.two-step-equations-calculation-trail > span,
.two-step-equations-calculation-trail .calculation-step {
    display: inline-flex;
    align-items: center;
    border-radius: 0.55rem;
    background: #ffffff;
    color: var(--tse-teal-dark);
    padding: 0.45rem 0.7rem;
}

.two-step-equations-check-display {
    margin: 1.25rem 0;
    border: 1px solid var(--tse-blue-border);
    border-radius: 0.9rem;
    background: var(--tse-blue-light);
    color: var(--tse-blue);
    padding: 1.15rem;
    text-align: center;
    font-size: clamp(1.5rem, 5vw, 2.3rem);
    font-weight: 800;
    overflow-wrap: anywhere;
}


/* =========================================================
   Step Actions
   ========================================================= */

.two-step-equations-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}


/* =========================================================
   Feedback and Work Summaries
   ========================================================= */

.two-step-equations-feedback {
    margin-top: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.85rem;
    background: #f8fafc;
    color: #334155;
    padding: 1rem 1.15rem;
    font-weight: 600;
    line-height: 1.6;
}

.two-step-equations-feedback.success,
.two-step-equations-feedback.correct {
    border-color: var(--tse-green-border);
    background: var(--tse-green-light);
    color: #166534;
}

.two-step-equations-feedback.error,
.two-step-equations-feedback.incorrect {
    border-color: var(--tse-red-border);
    background: var(--tse-red-light);
    color: #991b1b;
}

.two-step-equations-feedback.info {
    border-color: var(--tse-blue-border);
    background: var(--tse-blue-light);
    color: var(--tse-blue);
}

.two-step-equations-feedback.warning {
    border-color: var(--tse-amber-border);
    background: var(--tse-amber-light);
    color: var(--tse-amber);
}

.two-step-equations-work-summary {
    margin-top: 1rem;
    border-left: 4px solid var(--tse-green);
    border-radius: 0.75rem;
    background: var(--tse-green-light);
    color: #166534;
    padding: 1rem 1.15rem;
    font-weight: 700;
    line-height: 1.65;
    animation: two-step-equations-fade-in 0.24s ease;
}


/* =========================================================
   Hint
   ========================================================= */

.two-step-equations-hint-area {
    margin-top: 1.25rem;
}

.two-step-equations-hint-button {
    border: 0;
    background: transparent;
    color: var(--tse-teal);
    padding: 0;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.two-step-equations-hint-button:hover,
.two-step-equations-hint-button:focus {
    color: var(--tse-teal-dark);
}

.two-step-equations-hint {
    margin-top: 0.85rem;
    border: 1px solid var(--tse-amber-border);
    border-radius: 0.85rem;
    background: var(--tse-amber-light);
    color: var(--tse-amber);
    padding: 1rem 1.15rem;
    font-weight: 600;
    line-height: 1.65;
}


/* =========================================================
   Completion
   ========================================================= */

.two-step-equations-completion {
    scroll-margin-top: 7rem;
    border: 1px solid var(--tse-green-border);
    border-radius: 1rem;
    background: var(--tse-green-light);
    padding: 2rem;
    text-align: center;
    animation: two-step-equations-fade-in 0.28s ease;
}

.two-step-equations-completion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--tse-green);
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 800;
}

.two-step-equations-completion h3 {
    margin-bottom: 0.85rem;
    color: #14532d;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 800;
}

.two-step-equations-final-answer {
    margin-bottom: 0.9rem;
    color: #166534;
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.two-step-equations-completion-explanation {
    max-width: 720px;
    margin: 0 auto 1.25rem;
    color: #2f6b46;
    line-height: 1.7;
}

.two-step-equations-completed-work {
    display: grid;
    gap: 0.75rem;
    max-width: 760px;
    margin: 0 auto 1.5rem;
    text-align: left;
}

.two-step-equations-completed-work > div,
.two-step-equations-completed-work .completed-step {
    border: 1px solid #bbdfc7;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #24583a;
    padding: 0.85rem 1rem;
    font-weight: 700;
    line-height: 1.55;
}


/* =========================================================
   Reference Card
   ========================================================= */

.two-step-equations-reference-card {
    border: 1px solid var(--tse-border);
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.5rem;
}

.two-step-equations-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.two-step-equations-card-heading h3 {
    margin-bottom: 0;
    color: var(--tse-ink);
    font-size: clamp(1.25rem, 2.6vw, 1.6rem);
    font-weight: 800;
}

.two-step-equations-reference-note {
    max-width: 360px;
    margin-bottom: 0;
    color: var(--tse-muted);
    line-height: 1.6;
    text-align: right;
}

.two-step-equations-rule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.two-step-equations-rule-grid article {
    display: grid;
    gap: 0.45rem;
    min-height: 100%;
    border: 1px solid var(--tse-border);
    border-radius: 0.85rem;
    background: var(--tse-soft);
    padding: 1.15rem;
}

.two-step-equations-rule-grid strong {
    color: var(--tse-ink);
    font-size: 1rem;
    font-weight: 800;
}

.two-step-equations-rule-grid span {
    color: var(--tse-muted);
    line-height: 1.55;
}

.two-step-equations-mini-example {
    margin-top: 0.35rem;
    border-top: 1px solid var(--tse-border);
    padding-top: 0.65rem;
    color: var(--tse-teal-dark) !important;
    font-weight: 700;
}


/* =========================================================
   Reminder Cards
   ========================================================= */

.two-step-equations-reminders-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.two-step-equations-reminder-card {
    min-height: 100%;
    border: 1px solid var(--tse-border);
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 10px 24px rgba(16, 24, 39, 0.04);
}

.two-step-equations-reminder-card h3 {
    margin-bottom: 0.75rem;
    color: var(--tse-ink);
    font-size: 1.08rem;
    font-weight: 800;
}

.two-step-equations-reminder-card p {
    color: var(--tse-muted);
    line-height: 1.65;
}

.two-step-equations-example {
    border-left: 4px solid var(--tse-teal);
    border-radius: 0.65rem;
    background: var(--tse-teal-light);
    color: var(--tse-teal-dark);
    padding: 0.8rem 0.9rem;
    font-weight: 700;
    line-height: 1.55;
}


/* =========================================================
   Final CTA
   ========================================================= */

.two-step-equations-final-cta-card {
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--tse-teal-border);
    border-radius: 1.25rem;
    background:
        linear-gradient(
            135deg,
            rgba(240, 253, 250, 0.98),
            rgba(236, 254, 255, 0.92)
        );
    padding: clamp(2rem, 5vw, 3.25rem);
    text-align: center;
    box-shadow: 0 18px 45px rgba(15, 118, 110, 0.08);
}

.two-step-equations-final-cta-card h2 {
    margin-bottom: 1rem;
    color: var(--tse-ink);
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    font-weight: 800;
}

.two-step-equations-final-cta-card
> p:not(.two-step-equations-eyebrow) {
    max-width: 720px;
    margin: 0 auto 1.5rem;
    color: var(--tse-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}


/* =========================================================
   Animation
   ========================================================= */

@keyframes two-step-equations-fade-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   Responsive Layout
   ========================================================= */

@media (max-width: 991.98px) {
    .two-step-equations-overview-grid,
    .two-step-equations-reminders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-step-equations-settings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-step-equations-setting-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .two-step-equations-rule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-step-equations-balance-display {
        grid-template-columns: 1fr;
    }

    .two-step-equations-equals-sign {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .two-step-equations-overview,
    .two-step-equations-practice-section,
    .two-step-equations-reminders,
    .two-step-equations-final-cta {
        padding: 3.75rem 0;
    }

    .two-step-equations-tool-header {
        display: grid;
        gap: 1.35rem;
        padding: 1.5rem;
    }

    .two-step-equations-scoreboard {
        width: 100%;
    }

    .two-step-equations-settings {
        grid-template-columns: 1fr;
        padding: 1.25rem 1.5rem;
    }

    .two-step-equations-setting-actions {
        grid-column: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-step-equations-setting-actions .btn {
        white-space: normal;
    }

    .two-step-equations-problem-panel {
        padding: 1.75rem 1.25rem;
    }

    .two-step-equations-problem-equation {
        width: 100%;
        min-width: 0;
        min-height: 5.25rem;
        padding: 1rem;
        font-size: clamp(2rem, 12vw, 3.2rem);
    }

    .two-step-equations-progress {
        gap: 0.35rem;
    }

    .two-step-equations-progress li {
        font-size: 0.66rem;
    }

    .two-step-equations-workspace {
        padding: 1.25rem;
    }

    .two-step-equations-step-card {
        padding: 1.25rem;
    }

    .two-step-equations-step-heading {
        grid-template-columns: auto 1fr;
    }

    .two-step-equations-step-status {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .two-step-equations-step-problem-panel {
        padding: 1.15rem;
    }

    .two-step-equations-step-problem-panel
    .two-step-equations-problem-equation {
        width: 100%;
        min-width: 0;
    }

    .two-step-equations-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-step-equations-rule-grid {
        grid-template-columns: 1fr;
    }

    .two-step-equations-card-heading {
        display: grid;
        gap: 0.75rem;
    }

    .two-step-equations-reference-note {
        max-width: none;
        text-align: left;
    }

    .two-step-equations-balance-side {
        grid-template-columns: minmax(0, 1fr) auto minmax(65px, 95px);
    }
}

@media (max-width: 575.98px) {
    .two-step-equations-overview-grid,
    .two-step-equations-reminders-grid {
        grid-template-columns: 1fr;
    }

    .two-step-equations-scoreboard {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .two-step-equations-score-item {
        min-width: 0;
        padding: 0.65rem 0.45rem;
    }

    .two-step-equations-score-label {
        font-size: 0.64rem;
    }

    .two-step-equations-score-item strong {
        font-size: 1.15rem;
    }

    .two-step-equations-setting-actions {
        grid-template-columns: 1fr;
    }

    .two-step-equations-problem-header {
        flex-wrap: wrap;
    }

    .two-step-equations-progress li {
        font-size: 0.58rem;
        letter-spacing: 0.02em;
    }

    .two-step-equations-progress li span {
        width: 1.8rem;
        height: 1.8rem;
    }

    .two-step-equations-progress li::before {
        top: 0.9rem;
    }

    .two-step-equations-choice-grid,
    .two-step-equations-choice-grid.two-column {
        grid-template-columns: 1fr;
    }

    .two-step-equations-balance-display {
        padding: 0.85rem;
    }

    .two-step-equations-balance-side {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .two-step-equations-balance-side > span:nth-child(2) {
        line-height: 1;
    }

    .two-step-equations-balance-side .form-control {
        width: 100%;
    }

    .two-step-equations-solution-row {
        grid-template-columns: auto auto minmax(0, 1fr);
        width: 100%;
    }

    .two-step-equations-step-actions .btn,
    .two-step-equations-completion .btn {
        width: 100%;
    }
}

.fraction-inline
{
    display:inline-flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    vertical-align:middle;
    margin:0 .15em;
    line-height:1;
}

.fraction-top
{
    display:block;
    padding:0 .22em .06em;
    border-bottom:4px solid currentColor;
}

.fraction-bottom
{
    display:block;
    padding:.06em .22em 0;
}

.two-step-equations-page .equation-fraction {
    display: inline-grid;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: stretch;
    min-width: 1.35em;
    margin: 0 0.12em;
    vertical-align: middle;
    line-height: 1;
}

.two-step-equations-page .equation-fraction-numerator,
.two-step-equations-page .equation-fraction-denominator {
    display: block;
    min-width: 100%;
    padding-right: 0.14em;
    padding-left: 0.14em;
    text-align: center;
    line-height: 0.92;
}

.two-step-equations-page .equation-fraction-numerator {
    border-bottom: 0.075em solid currentColor;
    padding-top: 0;
    padding-bottom: 0.08em;
}

.two-step-equations-page .equation-fraction-denominator {
    padding-top: 0.08em;
    padding-bottom: 0;
}

/* =========================================================
   Two-Step Equation-Specific Additions
   ========================================================= */

.two-step-equations-page .two-step-equations-problem-equation,
.two-step-equations-page .two-step-equations-check-display,
.two-step-equations-page .two-step-equations-calculation-trail,
.two-step-equations-page .two-step-equations-work-summary,
.two-step-equations-page .two-step-equations-completed-work {
    font-variant-numeric: tabular-nums;
}

.two-step-equations-page .two-step-equations-second-operation-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.two-step-equations-page .two-step-equations-intermediate-equation {
    margin: 1rem 0 1.25rem;
    border: 1px solid var(--tse-blue-border);
    border-radius: 0.9rem;
    background: var(--tse-blue-light);
    color: var(--tse-blue);
    padding: 1rem 1.15rem;
    text-align: center;
    font-size: clamp(1.45rem, 5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.two-step-equations-page .two-step-equations-balance-display + 
.two-step-equations-balance-display {
    margin-top: 1rem;
}

.two-step-equations-page .two-step-equations-step-card.is-active
.two-step-equations-step-problem-panel {
    border-color: var(--tse-teal-border);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.06);
}

.two-step-equations-page .two-step-equations-step-card.is-complete
.two-step-equations-step-problem-panel,
.two-step-equations-page .two-step-equations-step-card.completed
.two-step-equations-step-problem-panel {
    border-color: var(--tse-green-border);
}

.two-step-equations-page .two-step-equations-solution-row {
    margin-right: auto;
    margin-left: auto;
}

.two-step-equations-page .two-step-equations-solution-row .form-control {
    min-width: 110px;
}

.two-step-equations-page .two-step-equations-operation-note {
    margin: 1rem 0 0;
    border-left: 4px solid var(--tse-teal);
    border-radius: 0.7rem;
    background: var(--tse-teal-light);
    color: var(--tse-teal-dark);
    padding: 0.9rem 1rem;
    font-weight: 700;
    line-height: 1.6;
}


/* =========================================================
   Fraction Display
   ========================================================= */

.two-step-equations-page .equation-fraction {
    display: inline-grid;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: stretch;
    min-width: 1.35em;
    margin: 0 0.12em;
    vertical-align: middle;
    line-height: 1;
}

.two-step-equations-page .equation-fraction-numerator,
.two-step-equations-page .equation-fraction-denominator {
    display: block;
    min-width: 100%;
    padding-right: 0.14em;
    padding-left: 0.14em;
    text-align: center;
    line-height: 0.92;
}

.two-step-equations-page .equation-fraction-numerator {
    border-bottom: 0.075em solid currentColor;
    padding-top: 0;
    padding-bottom: 0.08em;
}

.two-step-equations-page .equation-fraction-denominator {
    padding-top: 0.08em;
    padding-bottom: 0;
}

.two-step-equations-page .two-step-equations-step-problem-panel
.equation-fraction-numerator,
.two-step-equations-page .two-step-equations-step-problem-panel
.equation-fraction-denominator {
    line-height: 0.9;
}


/* =========================================================
   Two-Step Progress Emphasis
   ========================================================= */

.two-step-equations-page .two-step-equations-progress li:nth-child(1).is-current span,
.two-step-equations-page .two-step-equations-progress li:nth-child(2).is-current span {
    box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.12);
}

.two-step-equations-page .two-step-equations-progress li:nth-child(3).is-current span {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.two-step-equations-page .two-step-equations-progress li:nth-child(3).is-current {
    color: var(--tse-blue);
}

.two-step-equations-page .two-step-equations-progress li:nth-child(3).is-current span {
    border-color: var(--tse-blue);
    background: var(--tse-blue);
}


/* =========================================================
   Mobile Refinements for Two Operations
   ========================================================= */

@media (max-width: 767.98px) {
    .two-step-equations-page .two-step-equations-intermediate-equation {
        font-size: clamp(1.3rem, 7vw, 1.9rem);
    }

    .two-step-equations-page .two-step-equations-balance-display {
        gap: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .two-step-equations-page .two-step-equations-solution-row {
        width: 100%;
    }

    .two-step-equations-page .two-step-equations-solution-row .form-control {
        min-width: 0;
    }

    .two-step-equations-page .equation-fraction {
        margin-right: 0.08em;
        margin-left: 0.08em;
    }
}