/* ==========================================
   Arithmetic Detailed Result
========================================== */

#arithmeticDetails,
#geometricDetails, 
#fibonacci {

    margin-top: 24px;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
}


/* Result lines */

#arithmeticDetails > p,
#geometricDetails > p 
#fibonacci > {

    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.6;
}


#arithmeticDetails>p:last-of-type,
#geometricDetails>p:last-of-type {
    border-bottom: none;
}


/* Labels */

#arithmeticDetails strong,
#geometricDetails strong {
    color: #334155;
}


/* Sequence */

#arithmeticSequence,
#geometricSequence {
    color: #475569;
    font-weight: 500;
}


/* Result values */

#arithmeticTermValue,
#geometricTermValue {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}


/* Sum result */

#arithmeticSum,
#geometricSum {
    font-size: 17px;
    font-weight: 700;
    color: #2563eb;
}


/* Calculation explanation */

.calculation-explanation {
    margin-top: 20px;
    padding: 18px;
    background: #ffffff;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
}


.calculation-explanation>strong {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}


#arithmeticExplanation {
    margin: 0;
    line-height: 1.8;
    font-size: 16px;
    color: #334155;
}


/* Mobile */

@media (max-width: 600px) {

    #arithmeticDetails,
    #geometricDetails {
        padding: 16px;
    }

    .calculation-explanation {
        padding: 14px;
    }

}

/* ==========================================
   Shared Sequence Result Layout
========================================== */

.sequence-details {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #cfd8e3;
    border-radius: 14px;
    background: #f8fafc;
}


/* Each result row */

.sequence-details > p {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid #d9e0e8;
}


/* Remove border from last normal paragraph */

.sequence-details > p:last-of-type {
    border-bottom: none;
}


/* Important labels */

.sequence-details strong {
    font-weight: 700;
}


/* Calculation box */

.calculation-explanation {
    margin-top: 20px;
    padding: 20px;
    border-left: 4px solid #3267c8;
    border-radius: 10px;
    background: #ffffff;
}


/* Calculation text */

.calculation-explanation p {
    margin: 12px 0 0;
    line-height: 1.7;
}

/* Fibonacci important result values */

#fibonacciTermLabel,
#fibonacciTermValue,
#fibonacciSumLabel,
#fibonacciSum {
    color: #3267c8;
    font-weight: 700;
}

/* ==========================================
   BOTTOM STICKY AD
   DESKTOP + MOBILE
========================================== */

.bottom-sticky-ad {
    display: flex;

    position: fixed;

    left: 50%;
    bottom: 0;

    transform: translateX(-50%);

    width: min(970px, calc(100% - 40px));

    min-height: 90px;

    z-index: 9998;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border: 1px solid #d9e0e7;
    border-bottom: none;

    border-radius: 8px 8px 0 0;

    background: #eef1f5;

    color: #94a3b8;

    font-size: 14px;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 768px) {

    .bottom-sticky-ad {
        left: 0;
        right: 0;

        bottom: 0;

        transform: none;

        width: 100%;

        min-height: 60px;

        border-radius: 0;

        border-left: none;
        border-right: none;
        border-bottom: none;

        border-top: 1px solid #d9e0e7;

        z-index: 9999;
    }

}