/* ===========================================
   FFMI & BODY RECOMPOSITION CALCULATOR - AMBER THEME
   Primary: #f59e0b | Dark: #d97706
   Light: #fffbeb | Border: #fde68a
   =========================================== */

/* ---- CONTAINER ---- */
.ffmi-calculator-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    line-height: 1.6;
}

.ffmi-calculator-container *,
.ffmi-calculator-container *::before,
.ffmi-calculator-container *::after {
    box-sizing: border-box;
}

/* ---- HERO ---- */
.ffmi-hero {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    text-align: center;
    padding: 48px 32px 40px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.ffmi-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.2;
}

.ffmi-hero .hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.92;
    margin: 0 0 20px;
    font-weight: 400;
}

.ffmi-calculator-container .hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ffmi-calculator-container .badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
}

.ffmi-calculator-container .badge-icon {
    font-size: 0.95rem;
}

/* ---- STATS ROW ---- */
.ffmi-calculator-container .stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ffmi-calculator-container .stat-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
}

.ffmi-calculator-container .stat-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: #d97706;
    margin-bottom: 4px;
}

.ffmi-calculator-container .stat-label {
    display: block;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
}

/* ---- PRIVACY NOTICE ---- */
.ffmi-calculator-container .privacy-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 28px;
    font-size: 0.9rem;
    color: #334155;
}

/* ---- FORM SECTION ---- */
.ffmi-calculator-container .calculator-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px 28px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ffmi-calculator-container .form-group {
    margin-bottom: 28px;
}

.ffmi-calculator-container .form-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #1e293b;
}

.ffmi-calculator-container .form-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ---- RADIO TOGGLE ---- */
.ffmi-calculator-container .radio-toggle {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    max-width: 320px;
}

.ffmi-calculator-container .toggle-btn {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.ffmi-calculator-container .toggle-btn input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ffmi-calculator-container .toggle-btn span {
    display: block;
    text-align: center;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
    background: #f8fafc;
    transition: all 0.2s ease;
    border-right: 1px solid #e2e8f0;
}

.ffmi-calculator-container .toggle-btn:last-child span {
    border-right: none;
}

.ffmi-calculator-container .toggle-btn input:checked + span {
    background: #f59e0b;
    color: #fff;
}

.ffmi-calculator-container .toggle-btn:hover span {
    background: #fffbeb;
}

.ffmi-calculator-container .toggle-btn input:checked + span:hover {
    background: #d97706;
}

/* ---- UNIT TOGGLE ---- */
.ffmi-calculator-container .unit-toggle-wrapper {
    margin-bottom: 14px;
}

.ffmi-calculator-container .unit-toggle {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.ffmi-calculator-container .unit-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffmi-calculator-container .unit-btn + .unit-btn {
    border-left: 1px solid #e2e8f0;
}

.ffmi-calculator-container .unit-btn.active {
    background: #f59e0b;
    color: #fff;
}

.ffmi-calculator-container .unit-btn:hover:not(.active) {
    background: #fffbeb;
}

/* ---- INPUT WITH SUFFIX ---- */
.ffmi-calculator-container .input-with-suffix {
    position: relative;
    max-width: 260px;
}

.ffmi-calculator-container .input-with-suffix input {
    width: 100%;
    padding: 12px 50px 12px 14px;
    font-size: 0.95rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s ease;
}

.ffmi-calculator-container .input-with-suffix input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.ffmi-calculator-container .input-with-suffix .input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    pointer-events: none;
}

/* ---- HEIGHT INPUTS ---- */
.ffmi-calculator-container .height-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ffmi-calculator-container .height-field {
    flex: 1;
    position: relative;
}

.ffmi-calculator-container .height-field.full-width {
    max-width: 260px;
    position: relative;
}

.ffmi-calculator-container .height-field select,
.ffmi-calculator-container .height-field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.ffmi-calculator-container .height-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.ffmi-calculator-container .height-field input:focus,
.ffmi-calculator-container .height-field select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.ffmi-calculator-container .height-field .input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    pointer-events: none;
}

.ffmi-calculator-container .height-field input[type="number"] {
    padding-right: 44px;
}

/* Remove number spinners */
.ffmi-calculator-container input[type="number"]::-webkit-outer-spin-button,
.ffmi-calculator-container input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ffmi-calculator-container input[type="number"] {
    -moz-appearance: textfield;
}

/* ---- SUBMIT BUTTON ---- */
.ffmi-calculator-container .form-submit {
    text-align: center;
    margin-top: 8px;
}

.ffmi-calculator-container .submit-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.ffmi-calculator-container .submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.ffmi-calculator-container .submit-btn:active {
    transform: translateY(0);
}

/* ---- ERROR MESSAGE ---- */
.ffmi-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---- RESULTS SECTION ---- */
.ffmi-calculator-container .results-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 36px 28px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ffmi-calculator-container .results-section h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #92400e;
    margin: 0 0 28px;
}

/* ---- FFMI SCORE CARD ---- */
.ffmi-score-card {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 14px;
    padding: 32px 24px 24px;
    text-align: center;
    margin-bottom: 28px;
}

.ffmi-score-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ffmi-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ffmi-score-label {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ffmi-score-value {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
}

.ffmi-score-unit {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 2px;
}

.ffmi-score-divider {
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
}

.ffmi-category-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.ffmi-category-badge.cat-below {
    background: rgba(148, 163, 184, 0.3);
}

.ffmi-category-badge.cat-average {
    background: rgba(255, 255, 255, 0.25);
}

.ffmi-category-badge.cat-above {
    background: rgba(52, 211, 153, 0.3);
}

.ffmi-category-badge.cat-excellent {
    background: rgba(96, 165, 250, 0.35);
}

.ffmi-category-badge.cat-superior {
    background: rgba(167, 139, 250, 0.35);
}

.ffmi-category-badge.cat-suspicious {
    background: rgba(239, 68, 68, 0.3);
}

.ffmi-category-badge.cat-not-natural {
    background: rgba(239, 68, 68, 0.45);
}

/* ---- FFMI GAUGE ---- */
.ffmi-gauge-section {
    margin-bottom: 28px;
}

.ffmi-gauge-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    text-align: center;
}

.ffmi-gauge {
    position: relative;
    margin: 0 auto 12px;
    max-width: 700px;
}

.ffmi-gauge .gauge-track {
    display: flex;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.ffmi-gauge .gauge-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
}

.ffmi-gauge .gauge-below {
    background: #94a3b8;
}

.ffmi-gauge .gauge-average {
    background: #60a5fa;
}

.ffmi-gauge .gauge-above {
    background: #34d399;
}

.ffmi-gauge .gauge-excellent {
    background: #f59e0b;
}

.ffmi-gauge .gauge-superior {
    background: #a78bfa;
}

.ffmi-gauge .gauge-suspicious {
    background: #ef4444;
}

.ffmi-gauge .gauge-needle {
    position: absolute;
    top: -6px;
    width: 4px;
    height: 48px;
    background: #1e293b;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.8s ease;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ffmi-gauge .gauge-needle::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #1e293b;
}

.ffmi-gauge .gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.gauge-note {
    text-align: center;
    font-size: 0.88rem;
    color: #475569;
    margin: 12px auto 0;
    max-width: 600px;
    line-height: 1.5;
}

/* ---- BODY COMPOSITION SECTION ---- */
.composition-section {
    margin-bottom: 28px;
}

.composition-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    text-align: center;
}

.composition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.composition-card {
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: transform 0.2s ease;
}

.composition-card:hover {
    transform: translateY(-2px);
}

.composition-card .composition-icon {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.composition-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 8px;
}

.composition-card .composition-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.composition-card .composition-secondary {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.composition-lean {
    background: #f0fdf4;
    border-color: #86efac;
}

.composition-lean .composition-icon {
    color: #16a34a;
}

.composition-lean .composition-value {
    color: #16a34a;
}

.composition-fat {
    background: #fff7ed;
    border-color: #fdba74;
}

.composition-fat .composition-icon {
    color: #ea580c;
}

.composition-fat .composition-value {
    color: #ea580c;
}

.composition-total {
    background: #eff6ff;
    border-color: #93c5fd;
}

.composition-total .composition-icon {
    color: #2563eb;
}

.composition-total .composition-value {
    color: #2563eb;
}

/* ---- COMPOSITION BAR ---- */
.composition-bar-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.composition-bar {
    display: flex;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.composition-bar-lean {
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.8s ease;
    min-width: 0;
}

.composition-bar-fat {
    background: linear-gradient(90deg, #f97316, #fb923c);
    transition: width 0.8s ease;
    min-width: 0;
}

.composition-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.82rem;
    color: #475569;
}

.bar-label-lean strong {
    color: #16a34a;
}

.bar-label-fat strong {
    color: #ea580c;
}

/* ---- BODY FAT CATEGORY CARD ---- */
.bf-category-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 28px;
}

.bf-category-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.bf-category-value {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1e293b;
}

.bf-category-description {
    font-size: 0.88rem;
    color: #475569;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.5;
}

.bf-category-card.bf-essential {
    border-color: #fbbf24;
    background: #fffbeb;
}

.bf-category-card.bf-essential .bf-category-value {
    color: #d97706;
}

.bf-category-card.bf-athletes {
    border-color: #34d399;
    background: #f0fdf4;
}

.bf-category-card.bf-athletes .bf-category-value {
    color: #059669;
}

.bf-category-card.bf-fitness {
    border-color: #60a5fa;
    background: #eff6ff;
}

.bf-category-card.bf-fitness .bf-category-value {
    color: #2563eb;
}

.bf-category-card.bf-average {
    border-color: #94a3b8;
    background: #f8fafc;
}

.bf-category-card.bf-average .bf-category-value {
    color: #475569;
}

.bf-category-card.bf-obese {
    border-color: #f87171;
    background: #fef2f2;
}

.bf-category-card.bf-obese .bf-category-value {
    color: #dc2626;
}

/* ---- COMPARISON SECTION ---- */
.comparison-section {
    margin-bottom: 28px;
}

.comparison-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    text-align: center;
}

.comparison-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.comparison-tbl th {
    background: #f8fafc;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.comparison-tbl td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.comparison-tbl .active-row {
    background: #fffbeb;
    font-weight: 600;
}

.comparison-tbl .active-row td {
    border-bottom-color: #fde68a;
}

.comparison-tbl .row-below td:first-child {
    border-left: 3px solid #94a3b8;
}

.comparison-tbl .row-average td:first-child {
    border-left: 3px solid #60a5fa;
}

.comparison-tbl .row-above td:first-child {
    border-left: 3px solid #34d399;
}

.comparison-tbl .row-excellent td:first-child {
    border-left: 3px solid #f59e0b;
}

.comparison-tbl .row-superior td:first-child {
    border-left: 3px solid #a78bfa;
}

.comparison-tbl .row-suspicious td:first-child {
    border-left: 3px solid #ef4444;
}

.comparison-tbl .row-not-natural td:first-child {
    border-left: 3px solid #dc2626;
}

.comparison-marker {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* ---- NATURAL POTENTIAL CARD ---- */
.natural-potential-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
}

.natural-potential-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px;
    text-align: center;
}

.natural-bar-wrapper {
    margin-bottom: 16px;
}

.natural-bar-track {
    position: relative;
    background: #e2e8f0;
    border-radius: 8px;
    height: 28px;
    overflow: visible;
}

.natural-bar-fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    transition: width 0.8s ease;
    min-width: 0;
}

.natural-bar-limit {
    position: absolute;
    top: -4px;
    height: 36px;
    width: 3px;
    background: #1e293b;
    border-radius: 1px;
    transform: translateX(-50%);
}

.limit-label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    background: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.natural-bar-labels {
    display: flex;
    justify-content: flex-start;
    margin-top: 8px;
}

.natural-pct {
    font-size: 0.88rem;
    font-weight: 700;
    color: #d97706;
}

.natural-interpretation p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* ---- ACTION BUTTONS ---- */
.ffmi-calculator-container .result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 28px 0 20px;
    flex-wrap: wrap;
}

.ffmi-calculator-container .mdcv2-print-btn,
.ffmi-calculator-container .mdcv2-share-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffmi-calculator-container .mdcv2-print-btn:hover,
.ffmi-calculator-container .mdcv2-share-btn:hover {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #d97706;
}

/* ---- HISTORY ---- */
.ffmi-calculator-container .mdcv2-history-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 20px;
}

.ffmi-calculator-container .mdcv2-history-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.ffmi-calculator-container .history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.ffmi-calculator-container .history-date {
    color: #64748b;
    font-weight: 500;
}

.ffmi-calculator-container .history-result {
    color: #d97706;
    font-weight: 600;
}

.ffmi-calculator-container .mdcv2-clear-history {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 6px;
}

.ffmi-calculator-container .mdcv2-clear-history:hover {
    text-decoration: underline;
}

/* ---- RETAKE ---- */
.ffmi-calculator-container .retake-wrapper {
    text-align: center;
    margin-top: 24px;
}

.ffmi-calculator-container .retake-btn {
    background: #fff;
    border: 2px solid #f59e0b;
    color: #d97706;
    padding: 12px 36px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffmi-calculator-container .retake-btn:hover {
    background: #f59e0b;
    color: #fff;
}

/* ---- EDUCATION TABS ---- */
.ffmi-calculator-container .education-tabs {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0;
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ffmi-calculator-container .tab-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ffmi-calculator-container .tab-btn {
    flex: 1;
    padding: 14px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.ffmi-calculator-container .tab-btn:hover {
    color: #d97706;
    background: #fffbeb;
}

.ffmi-calculator-container .tab-btn.active {
    color: #d97706;
    background: #fff;
    border-bottom-color: #f59e0b;
}

.ffmi-calculator-container .tab-content {
    display: none;
    padding: 28px 24px;
}

.ffmi-calculator-container .tab-content.active {
    display: block;
}

.ffmi-calculator-container .tab-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 14px;
}

.ffmi-calculator-container .tab-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 20px 0 8px;
}

.ffmi-calculator-container .tab-content p {
    font-size: 0.92rem;
    color: #334155;
    margin: 0 0 12px;
}

.ffmi-calculator-container .tab-content ul,
.ffmi-calculator-container .tab-content ol {
    padding-left: 20px;
    margin: 0 0 14px;
}

.ffmi-calculator-container .tab-content li {
    font-size: 0.92rem;
    color: #334155;
    margin-bottom: 6px;
    line-height: 1.55;
}

/* ---- FAQ ACCORDION ---- */
.ffmi-calculator-container .faq-section {
    margin-bottom: 28px;
}

.ffmi-calculator-container .faq-section h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 18px;
    text-align: center;
}

.ffmi-calculator-container .faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ffmi-calculator-container .faq-question {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.ffmi-calculator-container .faq-question::after {
    content: "+";
    font-size: 1.3rem;
    font-weight: 400;
    color: #f59e0b;
    flex-shrink: 0;
    margin-left: 12px;
    transition: transform 0.2s ease;
}

.ffmi-calculator-container .faq-item.open .faq-question::after {
    content: "\2212";
}

.ffmi-calculator-container .faq-question:hover {
    background: #fffbeb;
}

.ffmi-calculator-container .faq-answer {
    display: none;
    padding: 0 20px 16px;
    background: #fff;
}

.ffmi-calculator-container .faq-item.open .faq-answer {
    display: block;
}

.ffmi-calculator-container .faq-answer p {
    font-size: 0.9rem;
    color: #475569;
    margin: 12px 0 0;
    line-height: 1.6;
}

/* ---- MEDICAL DISCLAIMER ---- */
.ffmi-calculator-container .medical-disclaimer {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.ffmi-calculator-container .medical-disclaimer h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 8px;
}

.ffmi-calculator-container .medical-disclaimer p {
    font-size: 0.85rem;
    color: #78350f;
    margin: 0;
    line-height: 1.6;
}

/* ---- RELATED CALCULATORS ---- */
.ffmi-calculator-container .related-calculators {
    margin-bottom: 28px;
}

.ffmi-calculator-container .related-calculators h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 18px;
    text-align: center;
}

.ffmi-calculator-container .related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.ffmi-calculator-container .related-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ffmi-calculator-container .related-card:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
}

.ffmi-calculator-container .related-card h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #d97706;
    margin: 0 0 6px;
}

.ffmi-calculator-container .related-card p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

/* ---- REFERENCES ---- */
.ffmi-calculator-container .references-section {
    margin-bottom: 16px;
}

.ffmi-calculator-container .references-section h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 14px;
}

.ffmi-calculator-container .references-section ol {
    padding-left: 20px;
    margin: 0;
}

.ffmi-calculator-container .references-section li {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ffmi-calculator-container .references-section em {
    font-style: italic;
}

.ffmi-calculator-container .references-section a {
    color: #d97706;
    text-decoration: none;
}

.ffmi-calculator-container .references-section a:hover {
    text-decoration: underline;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .ffmi-hero {
        padding: 32px 20px 28px;
    }

    .ffmi-hero h1 {
        font-size: 1.5rem;
    }

    .ffmi-hero .hero-subtitle {
        font-size: 0.92rem;
    }

    .ffmi-calculator-container .stats-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ffmi-calculator-container .stat-card {
        padding: 14px;
    }

    .ffmi-calculator-container .calculator-form-section {
        padding: 24px 18px;
    }

    .ffmi-calculator-container .results-section {
        padding: 28px 18px;
    }

    .ffmi-score-main {
        flex-direction: column;
        gap: 16px;
    }

    .ffmi-score-divider {
        width: 60px;
        height: 2px;
    }

    .ffmi-score-value {
        font-size: 2.2rem;
    }

    .composition-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ffmi-gauge .gauge-segment {
        font-size: 0.55rem;
        letter-spacing: 0;
    }

    .comparison-tbl {
        font-size: 0.8rem;
    }

    .comparison-tbl th,
    .comparison-tbl td {
        padding: 8px 10px;
    }

    .ffmi-calculator-container .tab-nav {
        flex-wrap: nowrap;
    }

    .ffmi-calculator-container .tab-btn {
        font-size: 0.78rem;
        padding: 12px 10px;
    }

    .ffmi-calculator-container .tab-content {
        padding: 20px 16px;
    }

    .ffmi-calculator-container .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ffmi-calculator-container {
        padding: 0 10px;
    }

    .ffmi-hero {
        padding: 24px 16px 22px;
        border-radius: 12px;
    }

    .ffmi-hero h1 {
        font-size: 1.3rem;
    }

    .ffmi-calculator-container .hero-badges {
        gap: 6px;
    }

    .ffmi-calculator-container .badge {
        font-size: 0.78rem;
        padding: 5px 12px;
    }

    .ffmi-score-value {
        font-size: 2rem;
    }

    .composition-card .composition-value {
        font-size: 1.3rem;
    }

    .ffmi-gauge .gauge-segment {
        font-size: 0;
    }

    .natural-potential-card {
        padding: 18px 14px;
    }

    .limit-label {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .comparison-tbl th:last-child,
    .comparison-tbl td:last-child {
        min-width: 80px;
    }

    .comparison-marker {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .ffmi-calculator-container .related-grid {
        grid-template-columns: 1fr;
    }

    .ffmi-calculator-container .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .ffmi-calculator-container .mdcv2-print-btn,
    .ffmi-calculator-container .mdcv2-share-btn {
        width: 100%;
        max-width: 280px;
    }
}
