/* ── 公式展示区 ── */
.formula-display {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.formula-title {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.formula-expr {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Fira Code', monospace;
    margin-bottom: 0.6rem;
}

.formula-example {
    font-size: 0.88rem;
    color: #555;
}

.formula-example strong {
    color: #2563eb;
}

/* ── 表单2列 ── */
.gongshi-form {
    grid-template-columns: 1fr 1fr;
}

/* ── 计算步骤结果 ── */
.gs-result {
    margin-top: 1.5rem;
}

.gs-result-card {
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    overflow: hidden;
}

.gs-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.gs-step:last-child {
    border-bottom: none;
}

.gs-step-label {
    color: #666;
}

.gs-step-val {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: #333;
}

.gs-step-final {
    background: white;
    border-top: 2px solid #e8eaf0;
}

.gs-step-final .gs-step-label {
    font-weight: 600;
    color: #333;
}

.gs-step-final .gs-step-val {
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 700;
}

/* ── 公式详解 ── */
.formula-detail {
    max-width: 760px;
    margin: 0 auto;
}

.fd-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.fd-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fd-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.6rem;
}

.fd-formula {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Fira Code', monospace;
    background: #f0f4ff;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.fd-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
}

/* ── 计算示例表格 ── */
.example-table-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.bmi-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.bmi-table th {
    background: #f5f7fa;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.bmi-table td {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.bmi-table tr:last-child td {
    border-bottom: none;
}

/* ── 等级标签（复用 bmi.css 样式） ── */
.level-tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
}

.level-thin { background: #dbeafe; color: #2563eb; }
.level-normal { background: #d1fae5; color: #059669; }
.level-over { background: #fef3c7; color: #d97706; }
.level-obese { background: #fee2e2; color: #dc2626; }

/* ── Mobile ── */
@media (max-width: 640px) {
    .gongshi-form {
        grid-template-columns: 1fr;
    }

    .formula-expr {
        font-size: 1.2rem;
    }

    .fd-formula {
        font-size: 1rem;
    }

    .bmi-table {
        font-size: 0.82rem;
    }

    .bmi-table th,
    .bmi-table td {
        padding: 0.6rem 0.6rem;
    }
}