.average-hero {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), #ffffff);
}

.average-hero h1 {
    letter-spacing: -0.02em;
}

.max-w-760 {
    max-width: 760px;
}

.max-w-820 {
    max-width: 820px;
}

.quick-note {
    background: rgba(13, 110, 253, 0.07);
    border: 1px solid rgba(13, 110, 253, 0.12);
}

.calculator-sticky {
    position: sticky;
    top: 12px;
    z-index: 1;
}

.average-values-input {
    min-height: 11rem;
    resize: vertical;
    font-variant-numeric: tabular-nums;
}

.average-result-mark {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(13, 110, 253, 0.1);
    color: #084298;
    font-size: 1.65rem;
    font-weight: 700;
}

.number-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.035);
}

.number-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(13, 110, 253, 0.16);
    color: #084298;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
}

.number-chip-muted {
    color: #495057;
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(15, 23, 42, 0.04);
}

.metric-card {
    min-height: 106px;
    padding: 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: #fff;
}

.metric-card [data-result-key] {
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.formula-box {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.step-number {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.12);
    color: #084298;
    font-weight: 700;
}

.table th,
.table td {
    min-width: 9rem;
}

.table th {
    white-space: nowrap;
}

button,
select,
input,
textarea {
    touch-action: manipulation;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.35);
    outline-offset: 2px;
}

@media (max-width: 991.98px) {
    .calculator-sticky {
        position: static;
        top: auto;
    }
}

@media (max-width: 575.98px) {
    .average-values-input {
        min-height: 9rem;
    }

    .average-result-mark {
        width: 2.7rem;
        height: 2.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
