/*
Theme Name: TDEECalculator
Theme URI: https://tdeecalculator.com
Author: TDEECalculator
Author URI: https://tdeecalculator.com
Description: TDEE Calculator and daily calorie calculator - the most comprehensive free TDEE tool online
Version: 1.0.0
Text Domain: tdeecalculator
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/


/* ==========================================================================
   SECTION 1: CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    --green: #10B981;
    --green-dark: #059669;
    --green-light: #34D399;
    --green-bg: #ECFDF5;
    --amber: #F59E0B;
    --amber-dark: #D97706;
    --red: #EF4444;
    --red-bg: #FEF2F2;
    --blue-info: #3B82F6;
    --blue-bg: #EFF6FF;
    --gray-bg: #F9FAFB;
    --gray-border: #E5E7EB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --text: #111827;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
    --max-width: 1200px;
    --max-content: 800px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}


/* ==========================================================================
   SECTION 2: RESET AND BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--gray-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; color: var(--text); }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background: var(--green);
    color: var(--white);
    font-weight: 600;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }


/* ==========================================================================
   SECTION 3: HEADER AND NAVIGATION
   ========================================================================== */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
}
.site-logo__icon {
    width: 36px;
    height: 36px;
    background: var(--green);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-logo__icon svg {
    width: 22px;
    height: 22px;
    fill: var(--white);
}
.site-logo__text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}
.site-logo__text span {
    color: var(--green);
}
.site-logo__sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: -3px;
}

/* Main Nav */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.main-nav__link {
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
    border: none;
    background: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.main-nav__link:hover {
    background: var(--gray-100);
    color: var(--green);
}
.main-nav__link--has-children {
    cursor: pointer;
}
.main-nav__link--has-children svg {
    transition: transform var(--transition);
}

/* Dropdown */
.main-nav__dropdown {
    position: relative;
}
.main-nav__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 100;
    list-style: none;
    margin: 0;
}
.main-nav__dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav__dropdown.open .main-nav__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav__dropdown.open .main-nav__link--has-children svg {
    transform: rotate(180deg);
}
.main-nav__dropdown-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-size: 0.875rem;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}
.main-nav__dropdown-link:hover {
    background: var(--green-bg);
    color: var(--green);
}
.main-nav__dropdown-link--all {
    border-top: 1px solid var(--gray-border);
    margin-top: 0.25rem;
    padding-top: 0.625rem;
    font-weight: 600;
    color: var(--green);
    gap: 0.25rem;
}

/* CTA button in nav */
.main-nav__cta {
    padding: 0.5rem 1.25rem;
    background: var(--green);
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-full);
    transition: background var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}
.main-nav__cta:hover {
    background: var(--green-dark);
    color: var(--white);
}

/* Menu toggle (mobile) */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    padding: 8px;
    border-radius: var(--radius);
}
.menu-toggle:hover {
    background: var(--gray-100);
}
.menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text);
}


/* ==========================================================================
   SECTION 4: HERO SECTION
   ========================================================================== */

.hero {
    background: var(--white);
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero__inner {
    max-width: var(--max-content);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: var(--green-bg);
    color: var(--green-dark);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
}
.hero__badge-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
}
.hero__title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--text);
}
.hero__title-accent {
    color: var(--green);
}
.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.hero__stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.hero__stat {
    text-align: center;
}
.hero__stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
}
.hero__stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}


/* ==========================================================================
   SECTION 5: CALCULATOR
   ========================================================================== */

/* Calculator section */
.calculator-section {
    padding: 4rem 1.5rem;
    background: var(--gray-bg);
}
.calculator-section__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.section-header__desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator card */
.calculator {
    max-width: 720px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

/* Form groups */
.calc-form-group {
    margin-bottom: 1.5rem;
}
.calc-form-group__label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.calc-form-group__hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Text input */
.calc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.calc-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.calc-input::placeholder {
    color: var(--gray-400);
}

/* Input with unit toggle */
.calc-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.calc-input-group .calc-input {
    flex: 1;
}

/* Unit toggle buttons */
.unit-toggle {
    display: inline-flex;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.unit-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: var(--white);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.unit-btn:not(:last-child) {
    border-right: 1px solid var(--gray-border);
}
.unit-btn.active {
    background: var(--green);
    color: var(--white);
}
.unit-btn:hover:not(.active) {
    background: var(--gray-100);
}

/* Height ft group */
.height-ft-group {
    display: none;
    gap: 0.5rem;
    align-items: center;
}
.height-ft-group .calc-input {
    width: 80px;
    flex: none;
}
.height-ft-group__separator {
    font-weight: 600;
    color: var(--text-muted);
}

/* Gender toggle */
.gender-toggle {
    display: flex;
    gap: 0.75rem;
}
.gender-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.gender-btn:hover {
    border-color: var(--green-light);
    color: var(--text);
}
.gender-btn.active {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green-dark);
}
.gender-btn svg {
    width: 18px;
    height: 18px;
}

/* Activity buttons */
.activity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
.activity-btn {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.activity-btn:hover {
    border-color: var(--green-light);
    background: var(--green-bg);
}
.activity-btn.active {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green-dark);
}
.activity-btn__name {
    font-weight: 600;
}
.activity-btn__desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.activity-btn.active .activity-btn__desc {
    color: var(--green);
}
.activity-btn__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    flex-shrink: 0;
    transition: all var(--transition);
}
.activity-btn.active .activity-btn__dot {
    border-color: var(--green);
    background: var(--green);
}

/* Goal toggle */
.goal-toggle {
    display: flex;
    gap: 0.75rem;
}
.goal-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}
.goal-btn:hover {
    border-color: var(--green-light);
    color: var(--text);
}
.goal-btn.active {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green-dark);
}
.goal-btn[data-goal="cut"].active {
    border-color: var(--red);
    background: var(--red-bg);
    color: var(--red);
}
.goal-btn[data-goal="bulk"].active {
    border-color: var(--blue-info);
    background: var(--blue-bg);
    color: var(--blue-info);
}

/* Body fat optional */
.calc-form-group--optional .calc-form-group__label::after {
    content: '(opzionale)';
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* Error message */
.calc-error {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--red-bg);
    color: var(--red);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Calculate button */
.btn-calculate {
    width: 100%;
    padding: 1rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn-calculate:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}
.btn-calculate:active {
    transform: translateY(0);
}


/* ==========================================================================
   SECTION 6: RESULT PANELS
   ========================================================================== */

/* Result container */
.result {
    display: none;
    max-width: 720px;
    margin: 2rem auto 0;
}
.result.visible {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* TDEE main result */
.result-tdee-panel {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border-top: 4px solid var(--green);
}
.result-tdee-panel__label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.result-tdee-panel__value {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.result-tdee-panel__unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}
.result-tdee-panel__formula {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

/* Result cards grid */
.result-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.result-card__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.375rem;
}
.result-card__value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

/* BMI indicator */
.bmi-indicator {
    margin-top: 0.75rem;
}
.bmi-indicator__bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--blue-info) 0%, var(--green) 30%, var(--amber) 60%, var(--red) 100%);
    position: relative;
    margin-bottom: 0.375rem;
}
.bmi-indicator__marker {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    background: var(--text);
    border: 2px solid var(--white);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.8s ease;
}
.bmi-indicator__class {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
}

/* Goal calories card */
.result-card--goal {
    grid-column: 1 / -1;
}
.result-card--goal .result-card__value {
    color: var(--green);
}
.result-card__goal-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.result-card__goal-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Macro breakdown */
.result-macros {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.result-macros__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.macro-bar {
    height: 20px;
    border-radius: 10px;
    display: flex;
    overflow: hidden;
    margin-bottom: 1rem;
}
.macro-bar__segment {
    transition: width 0.8s ease;
    min-width: 2%;
}
.macro-bar__segment--protein {
    background: var(--green);
}
.macro-bar__segment--carbs {
    background: var(--amber);
}
.macro-bar__segment--fat {
    background: var(--red);
}
.macro-legend {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.macro-legend__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.macro-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.macro-legend__dot--protein { background: var(--green); }
.macro-legend__dot--carbs { background: var(--amber); }
.macro-legend__dot--fat { background: var(--red); }
.macro-legend__grams {
    font-weight: 700;
    font-family: var(--font-mono);
}
.macro-legend__pct {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Meal plan */
.result-meals {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.result-meals__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.result-meals__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.meal-card {
    background: var(--gray-bg);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.meal-card__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.meal-card__cal {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 0.25rem;
}
.meal-card__macros {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Result actions */
.result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
}
.btn-primary:hover {
    background: var(--green-dark);
    color: var(--white);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--text);
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-secondary:hover {
    border-color: var(--green);
    color: var(--green);
}


/* ==========================================================================
   SECTION 7: HOW IT WORKS
   ========================================================================== */

.how-it-works {
    padding: 4rem 1.5rem;
    background: var(--white);
}
.how-it-works__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.how-it-works__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}
.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}
.step-card__number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 auto 0.75rem;
}
.step-card__number::before {
    content: 'Step ';
}
.step-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.step-card__desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}


/* ==========================================================================
   SECTION 8: GOALS GRID
   ========================================================================== */

.goals-section {
    padding: 4rem 1.5rem;
    background: var(--gray-bg);
}
.goals-section__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}
.goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}
.goal-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: var(--text);
    display: block;
    border-top: none;
}
.goal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}
/* goal-card variants - no top border */
.goal-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.goal-card--cut .goal-card__icon { background: var(--red-bg); color: var(--red); }
.goal-card--maintain .goal-card__icon { background: var(--green-bg); color: var(--green); }
.goal-card--bulk .goal-card__icon { background: var(--blue-bg); color: var(--blue-info); }
.goal-card__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.goal-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.goal-card__desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}
.goal-card__link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--green);
}


/* ==========================================================================
   SECTION 9: GUIDES SECTION
   ========================================================================== */

.guides-section {
    padding: 4rem 1.5rem;
    background: var(--white);
}
.guides-section__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}
.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}
.guide-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition), transform var(--transition);
    text-align: left;
}
.guide-card:hover {
    background: var(--green-bg);
    transform: translateY(-2px);
    color: var(--text);
}
.guide-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--green-bg);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guide-card__icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.guide-card:hover .guide-card__icon {
    background: var(--green);
    color: var(--white);
}
.guide-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.guide-card__desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}


/* ==========================================================================
   SECTION 10: FAQ
   ========================================================================== */

.faq-section {
    padding: 4rem 1.5rem;
    background: var(--gray-bg);
}
.faq-section__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.faq-list {
    margin-top: 2.5rem;
}
.faq-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: color var(--transition);
}
.faq-question:hover {
    color: var(--green);
}
.faq-question__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform var(--transition);
}
.faq-question__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.faq-item.open .faq-question__icon {
    transform: rotate(180deg);
}
.faq-item.open .faq-question {
    color: var(--green);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer {
    max-height: 500px;
}
.faq-answer__content {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}


/* ==========================================================================
   SECTION 11: FOOTER
   ========================================================================== */

.site-footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.footer-brand__logo svg {
    width: 20px;
    height: 20px;
    fill: var(--green);
}
.footer-brand__logo span {
    color: var(--green);
}
.footer-brand__tagline {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}
.footer-col__title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.footer-col a,
.footer-col .menu-item a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    padding: 0.25rem 0;
    transition: color var(--transition);
    text-decoration: none;
}
.footer-col a:hover,
.footer-col .menu-item a:hover {
    color: var(--green-light);
}

/* Footer disclaimer */
.footer-disclaimer {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-disclaimer p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin: 0;
}

/* Footer bottom */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}
.footer-bottom__lang {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.footer-bottom__lang .icon-inline {
    width: 16px;
    height: 12px;
}


/* ==========================================================================
   SECTION 12: COOKIE BANNER
   ========================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.cookie-banner p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    flex: 1;
}
.cookie-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.btn-cookie-accept {
    padding: 0.5rem 1.25rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background var(--transition);
}
.btn-cookie-accept:hover {
    background: var(--green-dark);
}
.btn-cookie-decline {
    padding: 0.5rem 1.25rem;
    background: none;
    color: var(--text-muted);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-cookie-decline:hover {
    border-color: var(--text-muted);
    color: var(--text);
}


/* ==========================================================================
   SECTION 13: SINGLE POST TEMPLATE
   ========================================================================== */

.single-post {
    padding: 2rem 1.5rem 4rem;
}
.single-post__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--green);
}
.breadcrumb__sep {
    color: var(--gray-300);
    margin: 0 0.25rem;
}

/* Post header */
.single-post__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.single-post__reading-time {
    color: var(--green);
    font-weight: 500;
}
.single-post__title {
    font-size: 2.25rem;
    line-height: 1.25;
    margin-bottom: 1rem;
}
.single-post__excerpt {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* TOC */
.toc {
    background: var(--gray-bg);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.toc__title {
    font-size: 0.9375rem;
    font-weight: 700;
}
.toc__toggle-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.toc__toggle-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.toc.open .toc__toggle-icon {
    transform: rotate(180deg);
}
.toc__list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc.open .toc__list {
    max-height: 1000px;
    margin-top: 0.75rem;
}
.toc__list li {
    padding: 0;
}
.toc__list a {
    display: block;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    padding-left: 0.75rem;
    transition: color var(--transition);
}
.toc__list a:hover {
    color: var(--green);
}
.toc__list .toc-h3 a {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
}

/* Post content */
.single-post__content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
}
.single-post__content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.single-post__content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text);
}
.single-post__content ul,
.single-post__content ol {
    margin-bottom: 1.5rem;
}
.single-post__content li {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.single-post__content blockquote {
    border-left: 4px solid var(--green);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--green-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-muted);
}
.single-post__content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}
.single-post__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.single-post__content th,
.single-post__content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-border);
    text-align: left;
    font-size: 0.9375rem;
}
.single-post__content th {
    background: var(--gray-100);
    font-weight: 600;
}
.single-post__content a {
    color: var(--green);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.single-post__content a:hover {
    color: var(--green-dark);
}

/* CTA in post */
.single-post__cta {
    background: var(--green-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin: 2.5rem 0;
}
.single-post__cta h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.single-post__cta p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Author box */
.author-box {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    margin: 2.5rem 0;
}
.author-box__avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}
.author-box__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.author-box__name {
    display: block;
    font-size: 1rem;
    margin-top: 0.125rem;
}
.author-box__bio {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.375rem 0 0;
    line-height: 1.5;
}

/* Related articles */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-border);
}
.related-articles__title {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
}
.related-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}


/* ==========================================================================
   SECTION 14: PAGE TEMPLATE
   ========================================================================== */

.page-content {
    padding: 2rem 1.5rem 4rem;
}
.page-content__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.page-content__title {
    font-size: 2.25rem;
    margin-bottom: 2rem;
}
.page-content__body h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.page-content__body h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.page-content__body p { font-size: 1.0625rem; line-height: 1.8; }
.page-content__body ul,
.page-content__body ol { margin-bottom: 1.5rem; }
.page-content__body li { font-size: 1.0625rem; line-height: 1.7; margin-bottom: 0.5rem; }
.page-content__body blockquote {
    border-left: 4px solid var(--green);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--green-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.page-content__body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.page-content__body th, .page-content__body td { padding: 0.75rem 1rem; border: 1px solid var(--gray-border); text-align: left; font-size: 0.9375rem; }
.page-content__body th { background: var(--gray-100); font-weight: 600; }
.page-content__body a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.page-content__body a:hover { color: var(--green-dark); }
.page-content__body img { border-radius: var(--radius); margin: 1.5rem 0; }


/* ==========================================================================
   SECTION 15: PILLAR PAGE (Hub Template)
   ========================================================================== */

/* ---- Hero ---- */
.pillar-hero {
    padding: 3rem 1.5rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
}
.pillar-hero__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.pillar-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.pillar-hero__breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.pillar-hero__breadcrumb a:hover {
    color: var(--green);
}
.pillar-hero__breadcrumb-sep {
    display: flex;
    color: var(--gray-300);
}
.pillar-hero__title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}
.pillar-hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 640px;
}

/* ---- Calculator CTA Card ---- */
.pillar-cta {
    padding: 2rem 1.5rem;
}
.pillar-cta__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.pillar-cta__card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 2rem;
    background: var(--green-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition), box-shadow var(--transition);
}
.pillar-cta__card:hover {
    background: rgba(16, 185, 129, 0.12);
    box-shadow: var(--shadow-md);
    color: var(--text);
}
.pillar-cta__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--green);
    color: var(--white);
    border-radius: var(--radius);
    flex-shrink: 0;
}
.pillar-cta__icon svg {
    width: 24px;
    height: 24px;
}
.pillar-cta__text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}
.pillar-cta__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--green-dark);
}
.pillar-cta__heading {
    font-size: 1.125rem;
    font-weight: 700;
}
.pillar-cta__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.pillar-cta__arrow {
    display: flex;
    color: var(--green);
    flex-shrink: 0;
}
.pillar-cta__arrow svg {
    width: 24px;
    height: 24px;
}

/* ---- Content area (reuses pillar-page styles) ---- */
.pillar-content {
    padding: 0 1.5rem 2rem;
}
.pillar-content__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.pillar-content__inner h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.pillar-content__inner h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.pillar-content__inner p { font-size: 1.0625rem; line-height: 1.8; }
.pillar-content__inner ul, .pillar-content__inner ol { margin-bottom: 1.5rem; }
.pillar-content__inner li { font-size: 1.0625rem; line-height: 1.7; margin-bottom: 0.5rem; }
.pillar-content__inner a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.pillar-content__inner a:hover { color: var(--green-dark); }
.pillar-content__inner blockquote {
    border-left: 4px solid var(--green); padding: 1rem 1.5rem;
    margin: 1.5rem 0; background: var(--green-bg); border-radius: 0 var(--radius) var(--radius) 0;
}
.pillar-content__inner table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.pillar-content__inner th, .pillar-content__inner td { padding: 0.75rem 1rem; border: 1px solid var(--gray-border); text-align: left; font-size: 0.9375rem; }
.pillar-content__inner th { background: var(--gray-100); font-weight: 600; }
.pillar-content__inner img { border-radius: var(--radius); margin: 1.5rem 0; }

/* ---- Silo articles section ---- */
.pillar-articles {
    padding: 3rem 1.5rem;
    background: var(--gray-bg);
}
.pillar-articles__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.pillar-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.pillar-articles__more {
    margin-top: 2rem;
    text-align: center;
}
.pillar-articles__more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--green);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
}
.pillar-articles__more-link:hover {
    color: var(--green-dark);
}

/* Article card (used in pillar articles grid) */
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow var(--transition), transform var(--transition);
    box-shadow: var(--shadow-sm);
}
.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text);
}
.article-card__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
}
.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--gray-300);
}
.article-card__placeholder svg {
    width: 40px;
    height: 40px;
}
.article-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.article-card__category {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--green);
    margin-bottom: 0.5rem;
}
.article-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.article-card__excerpt {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}
.article-card__meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}

/* ---- Cross-linked pillar pages ---- */
.pillar-cross {
    padding: 3rem 1.5rem;
}
.pillar-cross__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.pillar-cross__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.pillar-cross__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition), transform var(--transition);
}
.pillar-cross__card:hover {
    background: var(--green-bg);
    transform: translateY(-2px);
    color: var(--text);
}
.pillar-cross__card-icon {
    display: flex;
    color: var(--green);
    flex-shrink: 0;
}
.pillar-cross__card-icon svg {
    width: 20px;
    height: 20px;
}
.pillar-cross__card-body {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}
.pillar-cross__card-title {
    font-size: 1rem;
    font-weight: 700;
}
.pillar-cross__card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.pillar-cross__card-arrow {
    display: flex;
    color: var(--gray-300);
    flex-shrink: 0;
    transition: color var(--transition);
}
.pillar-cross__card-arrow svg {
    width: 20px;
    height: 20px;
}
.pillar-cross__card:hover .pillar-cross__card-arrow {
    color: var(--green);
}

/* Section label + title (shared between pillar and sub-calc) */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.section-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* ==========================================================================
   SECTION 15B: TDEE SUB-CALCULATOR PAGE
   ========================================================================== */

/* ---- Breadcrumb ---- */
.sub-calc-breadcrumb {
    padding: 1rem 1.5rem 0;
    background: var(--white);
}
.sub-calc-breadcrumb__inner {
    max-width: var(--max-content);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.sub-calc-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.sub-calc-breadcrumb a:hover {
    color: var(--green);
}
.sub-calc-breadcrumb__sep {
    display: flex;
    color: var(--gray-300);
}

/* ---- Sub-calc hero ---- */
.sub-calc-hero {
    padding: 1.5rem 1.5rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
}
.sub-calc-hero__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.sub-calc-hero__tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--green-bg);
    color: var(--green-dark);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
}
.sub-calc-hero__title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}
.sub-calc-hero__description {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 640px;
}

/* ---- Two-column layout ---- */
.sub-calc-main {
    padding: 2.5rem 1.5rem;
    background: var(--gray-bg);
}
.sub-calc-main__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}
.sub-calc-main__calculator {
    min-width: 0;
}

/* ---- Calculator form card ---- */
.sub-calc-form {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}
.sub-calc-form__title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}
.sub-calc-form__group {
    margin-bottom: 1.25rem;
}
.sub-calc-form__label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.sub-calc-form__input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.sub-calc-form__input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.sub-calc-form__input::placeholder {
    color: var(--gray-400);
}
.sub-calc-form__select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%239CA3AF' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 12px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.sub-calc-form__select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.sub-calc-form__row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.sub-calc-form__group--third {
    margin-bottom: 1.25rem;
}

/* Gender toggle */
.sub-calc-form__gender {
    display: flex;
    gap: 0.5rem;
}
.sub-calc-form__gender-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.sub-calc-form__gender-btn:hover {
    border-color: var(--green);
    color: var(--text);
}
.sub-calc-form__gender-btn.active {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green-dark);
    font-weight: 600;
}
.sub-calc-form__gender-btn svg {
    width: 16px;
    height: 16px;
}

/* Activity range slider */
.sub-calc-form__range {
    width: 100%;
    height: 22px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 0.5rem;
}
.sub-calc-form__range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
}
.sub-calc-form__range::-moz-range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    border: none;
}
.sub-calc-form__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
    margin-top: -8px;
}
.sub-calc-form__range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}
.sub-calc-form__range-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--green-dark);
    text-align: center;
    margin-bottom: 0.25rem;
}
.sub-calc-form__range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--text-light);
}

/* Goal pills */
.sub-calc-form__goals {
    display: flex;
    gap: 0.5rem;
}
.sub-calc-form__goal-pill {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.sub-calc-form__goal-pill:hover {
    border-color: var(--green);
    color: var(--text);
}
.sub-calc-form__goal-pill.active {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green-dark);
    font-weight: 600;
}

/* Error + button */
.sub-calc-form__error {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--red-bg);
    color: var(--red);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
.sub-calc-form__btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background var(--transition), transform var(--transition);
}
.sub-calc-form__btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}
.sub-calc-form__btn:active {
    transform: translateY(0);
}
.sub-calc-form__btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ---- Result panel ---- */
.sub-calc-result {
    display: none;
    margin-top: 1.5rem;
    animation: fadeInUp 0.5s ease;
}
.sub-calc-result.visible {
    display: block;
}
.sub-calc-result__header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.sub-calc-result__main,
.sub-calc-result__goal {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
}
.sub-calc-result__main {
    border-top: 3px solid var(--green);
}
.sub-calc-result__goal {
    border-top: 3px solid var(--amber);
}
.sub-calc-result__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.sub-calc-result__value {
    display: block;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1.1;
}
.sub-calc-result__goal .sub-calc-result__value,
.sub-calc-result__goal-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--amber);
    line-height: 1.1;
}
.sub-calc-result__goal-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.sub-calc-result__unit {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Macro bars */
.sub-calc-result__macros {
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.sub-calc-result__macros-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.sub-calc-macro-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.sub-calc-macro-bar__header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}
.sub-calc-macro-bar__name {
    font-weight: 600;
}
.sub-calc-macro-bar__amount {
    font-family: var(--font-mono);
    color: var(--text-muted);
}
.sub-calc-macro-bar__track {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}
.sub-calc-macro-bar__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.sub-calc-macro-bar__fill--p { background: var(--green); }
.sub-calc-macro-bar__fill--c { background: var(--amber); }
.sub-calc-macro-bar__fill--f { background: var(--blue-info); }

/* ---- Sidebar ---- */
.sub-calc-main__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 5rem;
}
.sub-calc-sidebar__card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}
.sub-calc-sidebar__card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

/* Key numbers */
.sub-calc-key-numbers {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sub-calc-key-numbers__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.sub-calc-key-numbers__item:last-child {
    border-bottom: none;
}
.sub-calc-key-numbers__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.sub-calc-key-numbers__value {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--green-dark);
}

/* TOC sidebar */
.sub-calc-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sub-calc-toc__item {
    margin-bottom: 0;
}
.sub-calc-toc__item a {
    display: block;
    padding: 0.375rem 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}
.sub-calc-toc__item a:hover {
    color: var(--green);
}
.sub-calc-toc__item--nested a {
    padding-left: 1rem;
    font-size: 0.75rem;
}

/* ---- Sub-calc content section ---- */
.sub-calc-content {
    padding: 2.5rem 1.5rem;
}
.sub-calc-content__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.sub-calc-content__inner h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.sub-calc-content__inner h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.sub-calc-content__inner p { font-size: 1.0625rem; line-height: 1.8; }
.sub-calc-content__inner ul, .sub-calc-content__inner ol { margin-bottom: 1.5rem; }
.sub-calc-content__inner li { font-size: 1.0625rem; line-height: 1.7; margin-bottom: 0.5rem; }
.sub-calc-content__inner a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.sub-calc-content__inner a:hover { color: var(--green-dark); }
.sub-calc-content__inner blockquote {
    border-left: 4px solid var(--green); padding: 1rem 1.5rem;
    margin: 1.5rem 0; background: var(--green-bg); border-radius: 0 var(--radius) var(--radius) 0;
}
.sub-calc-content__inner table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.sub-calc-content__inner th, .sub-calc-content__inner td { padding: 0.75rem 1rem; border: 1px solid var(--gray-border); text-align: left; font-size: 0.9375rem; }
.sub-calc-content__inner th { background: var(--gray-100); font-weight: 600; }

/* ---- Sub-calc FAQ ---- */
.sub-calc-faq {
    padding: 3rem 1.5rem;
    background: var(--gray-bg);
}
.sub-calc-faq__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.sub-calc-faq__list {
    margin-top: 1.5rem;
}
.sub-calc-faq__item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.sub-calc-faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    gap: 1rem;
}
.sub-calc-faq__question:hover {
    color: var(--green);
}
.sub-calc-faq__arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.sub-calc-faq__question[aria-expanded="true"] .sub-calc-faq__arrow {
    transform: rotate(180deg);
}
.sub-calc-faq__answer {
    display: none;
    padding: 0 1.25rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---- Sub-calc CTA banner ---- */
.sub-calc-cta {
    padding: 2rem 1.5rem;
}
.sub-calc-cta__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.sub-calc-cta__card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 2rem;
    background: var(--green-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition), box-shadow var(--transition);
}
.sub-calc-cta__card:hover {
    background: rgba(16, 185, 129, 0.12);
    box-shadow: var(--shadow-md);
    color: var(--text);
}
.sub-calc-cta__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--green);
    color: var(--white);
    border-radius: var(--radius);
    flex-shrink: 0;
}
.sub-calc-cta__icon svg {
    width: 24px;
    height: 24px;
}
.sub-calc-cta__text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}
.sub-calc-cta__heading {
    font-size: 1.125rem;
    font-weight: 700;
}
.sub-calc-cta__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.sub-calc-cta__arrow {
    display: flex;
    color: var(--green);
    flex-shrink: 0;
}
.sub-calc-cta__arrow svg {
    width: 24px;
    height: 24px;
}

/* ---- Related sub-calculators grid ---- */
.sub-calc-related {
    padding: 3rem 1.5rem;
}
.sub-calc-related__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.sub-calc-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.sub-calc-related__card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition), transform var(--transition);
}
.sub-calc-related__card:hover {
    background: var(--green-bg);
    transform: translateY(-2px);
    color: var(--text);
}
.sub-calc-related__card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}
.sub-calc-related__card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}
.sub-calc-related__card-link {
    font-size: 0.8125rem;
    color: var(--green);
    font-weight: 600;
    margin-top: 0.75rem;
}

/* ---- Formula comparison panel ---- */
.formula-panel {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.formula-panel__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.formula-panel__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.formula-panel__row:last-child {
    border-bottom: none;
}
.formula-panel__name {
    font-size: 0.875rem;
    font-weight: 500;
}
.formula-panel__value {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--green);
}


/* ==========================================================================
   SECTION 16: OBIETTIVO (GOAL) PAGE — NEW DESIGN
   ========================================================================== */

/* ---- Hero ---- */
.obi-hero {
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
}
.obi-hero__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.obi-hero__breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.obi-hero__breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.obi-hero__breadcrumb a:hover { color: var(--green); }
.obi-hero__breadcrumb-sep { opacity: 0.5; display: flex; }
.obi-hero__tag {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.obi-hero__tag--red { background: var(--red-bg); color: var(--red); }
.obi-hero__tag--blue { background: var(--blue-bg); color: var(--blue-info); }
.obi-hero__tag--green { background: var(--green-bg); color: var(--green-dark); }
.obi-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.obi-hero--red .obi-hero__title { color: var(--red); }
.obi-hero--blue .obi-hero__title { color: var(--blue-info); }
.obi-hero--green .obi-hero__title { color: var(--green-dark); }
.obi-hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- Stats Strip ---- */
.obi-stats {
    padding: 0 1.5rem;
    margin-top: -1rem;
    position: relative;
    z-index: 2;
}
.obi-stats__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.obi-stats__card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.obi-stats__value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}
.obi-stats__number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}
.obi-stats__unit {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.obi-stats__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Two-Column Main Layout ---- */
.obi-main {
    padding: 2.5rem 1.5rem;
}
.obi-main__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

/* ---- Calculator Card ---- */
.obi-calc {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.obi-calc__title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.obi-calc__group {
    margin-bottom: 1.25rem;
}
.obi-calc__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.obi-calc__row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.obi-calc__group--third { margin-bottom: 1.25rem; }

/* Gender toggle */
.obi-calc__gender {
    display: flex;
    gap: 0.5rem;
}
.obi-calc__gender-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-bg);
    border: 2px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.obi-calc__gender-btn:hover { border-color: var(--green); }
.obi-calc__gender-btn.active {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green-dark);
}

/* Input */
.obi-calc__input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--gray-bg);
    border: 2px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    color: var(--text);
    transition: border-color var(--transition);
}
.obi-calc__input:focus {
    outline: none;
    border-color: var(--green);
    background: var(--white);
}

/* Range slider */
.obi-calc__range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
    margin: 0.75rem 0 0.5rem;
}
.obi-calc__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green);
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.obi-calc__range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green);
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.obi-calc__range--red::-webkit-slider-thumb { background: var(--red); }
.obi-calc__range--red::-moz-range-thumb { background: var(--red); }
.obi-calc__range--blue::-webkit-slider-thumb { background: var(--blue-info); }
.obi-calc__range--blue::-moz-range-thumb { background: var(--blue-info); }
.obi-calc__range-label {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.obi-calc__range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--text-light);
}

/* Goal pills */
.obi-calc__goals {
    display: flex;
    gap: 0.5rem;
}
.obi-calc__goal-pill {
    flex: 1;
    padding: 0.625rem 0.5rem;
    border: 2px solid var(--gray-border);
    border-radius: var(--radius-full);
    background: var(--white);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}
.obi-calc__goal-pill:hover { border-color: var(--green); color: var(--text); }
.obi-calc__goal-pill.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}

/* Error */
.obi-calc__error {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--red-bg);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    color: var(--red);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Calculate button */
.obi-calc__btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.obi-calc__btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.obi-calc__btn--red { background: var(--red); }
.obi-calc__btn--red:hover { background: #DC2626; }
.obi-calc__btn--blue { background: var(--blue-info); }
.obi-calc__btn--blue:hover { background: #2563EB; }

/* Results panel */
.obi-calc__result {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-border);
    animation: fadeInUp 0.4s ease;
}
.obi-calc__result.visible { display: block; }
.obi-calc__result-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.obi-calc__result-main,
.obi-calc__result-goal {
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
}
.obi-calc__result-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.obi-calc__result-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1.2;
}
.obi-calc__result-goal-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.obi-calc__result-goal-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.obi-calc__result-unit {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* Macro bars */
.obi-calc__result-macros { margin-top: 0.5rem; }
.obi-calc__result-macros-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.obi-calc__macro-bar { margin-bottom: 0.875rem; }
.obi-calc__macro-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}
.obi-calc__macro-bar-header span:last-child {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
}
.obi-calc__macro-bar-track {
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}
.obi-calc__macro-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    width: 0%;
}
.obi-calc__macro-bar-fill--p { background: var(--green); }
.obi-calc__macro-bar-fill--c { background: var(--amber); }
.obi-calc__macro-bar-fill--g { background: var(--red); }

/* ---- Sidebar ---- */
.obi-main__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.obi-sidebar__card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.obi-sidebar__card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Progress ring */
.obi-progress-ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}
.obi-progress-ring__svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.obi-progress-ring__bg {
    fill: none;
    stroke: var(--gray-100);
    stroke-width: 8;
}
.obi-progress-ring__fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 0.8s ease;
}
.obi-progress-ring__fill--green { stroke: var(--green); }
.obi-progress-ring__fill--red { stroke: var(--red); }
.obi-progress-ring__fill--blue { stroke: var(--blue-info); }
.obi-progress-ring__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.obi-progress-ring__pct {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.obi-progress-ring__sub {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Weight tracker */
.obi-tracker__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.obi-tracker__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.obi-tracker__input-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.obi-tracker__input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: var(--font-mono);
    text-align: right;
    color: var(--text);
    background: var(--gray-bg);
}
.obi-tracker__input:focus {
    outline: none;
    border-color: var(--green);
    background: var(--white);
}
.obi-tracker__unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.obi-tracker__btn {
    width: 100%;
    padding: 0.625rem;
    margin-top: 0.5rem;
    background: var(--green-bg);
    color: var(--green-dark);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.obi-tracker__btn:hover { background: var(--green); color: var(--white); }
.obi-tracker__btn--red {
    background: var(--red-bg); color: var(--red);
    border-color: rgba(239, 68, 68, 0.3);
}
.obi-tracker__btn--red:hover { background: var(--red); color: var(--white); }
.obi-tracker__btn--blue {
    background: var(--blue-bg); color: var(--blue-info);
    border-color: rgba(59, 130, 246, 0.3);
}
.obi-tracker__btn--blue:hover { background: var(--blue-info); color: var(--white); }

/* Milestones */
.obi-milestones {
    list-style: none;
    padding: 0;
    margin: 0;
}
.obi-milestones__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0;
    position: relative;
}
.obi-milestones__item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.75rem;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}
.obi-milestones__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-200);
    flex-shrink: 0;
    margin-top: 0.25rem;
}
.obi-milestones__dot--green { background: var(--green); }
.obi-milestones__dot--red { background: var(--red); }
.obi-milestones__dot--blue { background: var(--blue-info); }
.obi-milestones__content { flex: 1; }
.obi-milestones__week {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.obi-milestones__text {
    display: block;
    font-size: 0.8125rem;
    color: var(--text);
    font-weight: 500;
}

/* ---- Page Content ---- */
.obi-content {
    padding: 0 1.5rem 2rem;
}
.obi-content__inner {
    max-width: var(--max-content);
    margin: 0 auto;
}
.obi-content__inner h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.obi-content__inner h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.obi-content__inner p { font-size: 1.0625rem; line-height: 1.8; }
.obi-content__inner ul, .obi-content__inner ol { margin-bottom: 1.5rem; }
.obi-content__inner li { font-size: 1.0625rem; line-height: 1.7; margin-bottom: 0.5rem; }
.obi-content__inner a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.obi-content__inner a:hover { color: var(--green-dark); }
.obi-content__inner blockquote {
    border-left: 4px solid var(--green);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--green-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---- Timeline ---- */
.obi-timeline {
    padding: 3rem 1.5rem;
    background: var(--white);
}
.obi-timeline__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}
.obi-timeline__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}
.obi-timeline__card {
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
}
.obi-timeline__phase {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
.obi-timeline__phase--green { background: var(--green-bg); color: var(--green-dark); }
.obi-timeline__phase--red { background: var(--red-bg); color: var(--red); }
.obi-timeline__phase--blue { background: var(--blue-bg); color: var(--blue-info); }
.obi-timeline__weeks {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.obi-timeline__card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.obi-timeline__card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---- Info Cards ---- */
.obi-info {
    padding: 3rem 1.5rem;
}
.obi-info__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}
.obi-info__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}
.obi-info__card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.obi-info__card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.obi-info__card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---- Mini Cards ---- */
.obi-mini {
    padding: 0 1.5rem 3rem;
}
.obi-mini__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.obi-mini__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow var(--transition), transform var(--transition);
}
.obi-mini__card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text);
}
.obi-mini__card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    display: block;
}
.obi-mini__card-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: block;
}
.obi-mini__card-arrow {
    margin-left: auto;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ---- Cross-Goal Links ---- */
.obi-related {
    padding: 3rem 1.5rem;
    background: var(--white);
}
.obi-related__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}
.obi-related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.obi-related__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow var(--transition), transform var(--transition);
    text-align: left;
}
.obi-related__card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text);
}
.obi-related__card-body { flex: 1; }
.obi-related__card-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.obi-related__card-subtitle {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.obi-related__card-arrow {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ---- Silo Articles ---- */
.obi-articles {
    padding: 3rem 1.5rem;
}
.obi-articles__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}
.obi-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}
.obi-articles__more {
    margin-top: 2rem;
    text-align: center;
}
.obi-articles__more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--green);
    font-weight: 600;
    font-size: 0.9375rem;
}
.obi-articles__more-link:hover { color: var(--green-dark); }


/* ==========================================================================
   SECTION 17: POST CARD
   ========================================================================== */

.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.post-card__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}
.post-card:hover .post-card__img {
    transform: scale(1.03);
}
.post-card__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-card__cat {
    display: inline-block;
    align-self: flex-start;
    padding: 0.125rem 0.5rem;
    background: var(--green-bg);
    color: var(--green-dark);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.post-card__cat:hover {
    background: var(--green);
    color: var(--white);
}
.post-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}
.post-card__title a {
    color: var(--text);
    text-decoration: none;
}
.post-card__title a:hover {
    color: var(--green);
}
.post-card__excerpt {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 auto;
}
.post-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}


/* ==========================================================================
   SECTION 18: ARCHIVE AND SEARCH
   ========================================================================== */

.archive-page { padding: 2rem 1.5rem 4rem; }
.archive-page__inner { max-width: var(--max-width); margin: 0 auto; }
.archive-page__title { font-size: 2rem; margin-bottom: 0.5rem; }
.archive-page__desc { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.0625rem; line-height: 1.7; }
.archive-page__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Search page */
.search-page { padding: 2rem 1.5rem 4rem; }
.search-page__inner { max-width: var(--max-width); margin: 0 auto; }
.search-page__header { margin-bottom: 2rem; }
.search-page__header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.search-page__header p { color: var(--text-muted); }
.search-page__form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    max-width: 500px;
}
.search-page__form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
}
.search-page__form input[type="search"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.search-page__form button {
    padding: 0.75rem 1.5rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.search-page__form button:hover {
    background: var(--green-dark);
}
.search-page__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.search-page__empty {
    text-align: center;
    padding: 4rem 2rem;
}
.search-page__empty p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}


/* ==========================================================================
   SECTION 19: 404 PAGE
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: 6rem 1.5rem;
}
.error-404__inner {
    max-width: 500px;
    margin: 0 auto;
}
.error-404__code {
    font-family: var(--font-mono);
    font-size: 6rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    display: block;
    margin-bottom: 1rem;
}
.error-404__title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}
.error-404__text {
    color: var(--text-muted);
    font-size: 1.0625rem;
    margin-bottom: 2rem;
}
.error-404__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}


/* ==========================================================================
   SECTION 20: ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   SECTION 21: UTILITY CLASSES
   ========================================================================== */

.icon-inline {
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.entry-content .alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.entry-content .alignfull { max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.entry-content .aligncenter { text-align: center; }
.entry-content .alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.entry-content .alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.wp-block-image { margin: 1.5rem 0; }
.wp-block-image img { border-radius: var(--radius); }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8125rem; color: var(--text-muted); text-align: center; margin-top: 0.5rem; }


/* ==========================================================================
   SECTION 22: RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero__title { font-size: 2.25rem; }
    .how-it-works__grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
    .goals-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .guides-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .archive-page__grid { grid-template-columns: repeat(2, 1fr); }
    .search-page__grid { grid-template-columns: repeat(2, 1fr); }
    .related-articles__grid { grid-template-columns: repeat(2, 1fr); }
    .pillar-articles__grid { grid-template-columns: repeat(2, 1fr); }
    .pillar-cross__grid { grid-template-columns: repeat(2, 1fr); }
    .sub-calc-related__grid { grid-template-columns: repeat(2, 1fr); }
    .obi-articles__grid { grid-template-columns: repeat(2, 1fr); }
    .obi-timeline__grid { grid-template-columns: repeat(2, 1fr); }
    .obi-main__inner { grid-template-columns: 1fr 300px; }
}

/* Mobile menu (max-width: 768px) */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-border);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }
    .main-nav.open { display: flex; }
    .main-nav__link {
        width: 100%;
        padding: 0.75rem;
        justify-content: space-between;
    }
    .main-nav__cta {
        margin: 0.75rem 0 0;
        text-align: center;
        justify-content: center;
    }
    .main-nav__dropdown { width: 100%; }
    .main-nav__dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--gray-bg);
        border-radius: var(--radius);
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        padding: 0.5rem;
    }
    .main-nav__dropdown.open .main-nav__dropdown-menu { display: block; }

    .hero { padding: 3rem 1.5rem 2.5rem; }
    .hero__title { font-size: 2rem; }
    .hero__subtitle { font-size: 1rem; }
    .hero__stats { gap: 1.5rem; }

    .calculator { padding: 1.5rem; }
    .how-it-works__grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .goals-grid { grid-template-columns: 1fr; }
    .guides-grid { grid-template-columns: 1fr; }
    .result-cards { grid-template-columns: 1fr; }
    .result-meals__list { grid-template-columns: 1fr; }
    .macro-legend { flex-direction: column; gap: 0.5rem; }

    .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    .cookie-banner__actions { justify-content: center; }

    .single-post__title { font-size: 1.75rem; }
    .pillar-hero__title { font-size: 1.75rem; }
    .sub-calc-hero__title { font-size: 1.75rem; }
    .page-content__title { font-size: 1.75rem; }
    .obi-hero__title { font-size: 1.75rem; }
    .archive-page__grid { grid-template-columns: 1fr; }
    .search-page__grid { grid-template-columns: 1fr; }
    .related-articles__grid { grid-template-columns: 1fr; }
    .pillar-articles__grid { grid-template-columns: 1fr; }
    .pillar-cross__grid { grid-template-columns: 1fr; }
    .sub-calc-related__grid { grid-template-columns: 1fr; }
    .sub-calc-main__inner { grid-template-columns: 1fr; }
    .sub-calc-main__sidebar { position: static; }
    .sub-calc-result__header { grid-template-columns: 1fr; }
    .sub-calc-form__row { grid-template-columns: 1fr; }
    .sub-calc-form__goals { flex-direction: column; }
    .sub-calc-cta__card { flex-direction: column; text-align: center; }
    .sub-calc-cta__arrow { display: none; }
    .pillar-cta__card { flex-direction: column; text-align: center; }
    .pillar-cta__arrow { display: none; }
    .obi-related__grid { grid-template-columns: 1fr; }
    .obi-articles__grid { grid-template-columns: 1fr; }
    .obi-stats__inner { grid-template-columns: 1fr; }
    .obi-main__inner { grid-template-columns: 1fr; }
    .obi-timeline__grid { grid-template-columns: 1fr; }
    .obi-info__grid { grid-template-columns: 1fr; }
    .obi-mini__inner { grid-template-columns: 1fr; }
    .obi-calc__row { grid-template-columns: 1fr; }
    .obi-calc__goals { flex-direction: column; }
    .obi-calc__result-header { grid-template-columns: 1fr; }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero__title { font-size: 1.75rem; }
    .hero__stats { flex-direction: column; gap: 1rem; }
    .section-header__title { font-size: 1.5rem; }
    .calculator { padding: 1.25rem; border-radius: var(--radius-lg); }
    .result-tdee-panel { padding: 2rem 1.25rem; }
    .result-tdee-panel__value { font-size: 3rem; }
    .gender-toggle { flex-direction: column; gap: 0.5rem; }
    .goal-toggle { flex-direction: column; gap: 0.5rem; }
    .error-404__code { font-size: 4rem; }
    .error-404__actions { flex-direction: column; }
    .error-404__actions .btn-primary,
    .error-404__actions .btn-secondary { width: 100%; justify-content: center; }
    .sub-calc-hero__title { font-size: 1.75rem; }
    .sub-calc-form { padding: 1.25rem; }
    .sub-calc-form__gender { flex-direction: column; }
    .sub-calc-result__value { font-size: 2rem; }
    .sub-calc-result__goal-value { font-size: 2rem; }
}


/* ==========================================================================
   SECTION 23: PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .cookie-banner,
    .menu-toggle,
    .main-nav__cta,
    .single-post__cta,
    .pillar-page__cta,
    .obi-mini,
    .related-articles,
    .pillar-page__related,
    .obi-related,
    .result-actions,
    .skip-link { display: none !important; }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    .single-post__inner,
    .page-content__inner,
    .pillar-page__inner,
    .obi-main__inner {
        max-width: 100%;
        padding: 0;
    }
    .result { display: block !important; }
    .result-tdee-panel { box-shadow: none; border: 1px solid #ccc; }
    .result-card { box-shadow: none; border: 1px solid #ccc; }
    .result-macros { box-shadow: none; border: 1px solid #ccc; }
    .result-meals { box-shadow: none; border: 1px solid #ccc; }
    a { color: black; text-decoration: underline; }
    a[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
}


/* ==========================================================================
   SECTION 24: WORDPRESS SPECIFIC CLASSES
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    clip: auto !important;
    display: block;
    height: auto;
    left: 5px;
    top: 5px;
    width: auto;
    z-index: 100000;
    background-color: var(--white);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    box-shadow: var(--shadow);
}
.sticky .post-card { border-left: 3px solid var(--green); }
.gallery-caption { font-size: 0.8125rem; color: var(--text-muted); }
.bypostauthor { border-left: 3px solid var(--green); }
.wp-block-separator { border-top: 1px solid var(--gray-border); margin: 2rem 0; }
.has-small-font-size { font-size: 0.875rem; }
.has-medium-font-size { font-size: 1.125rem; }
.has-large-font-size { font-size: 1.5rem; }
.has-x-large-font-size { font-size: 2rem; }


/* ==========================================================================
   SECTION 25: FRONT-PAGE CLASS ALIASES
   Classes used in front-page.php that differ from the base style.css names.
   ========================================================================== */

/* Calculator section */
.calc-section {
    padding: 4rem 1.5rem;
    background: var(--gray-bg);
}
.calc-section__inner {
    max-width: 720px;
    margin: 0 auto;
}
.calc-top {
    text-align: center;
    margin-bottom: 2.5rem;
}
.calc-top__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.calc-top__sub {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}
.section-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--green-bg);
    color: var(--green-dark);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
}

/* Form elements */
.tdee-form {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group--full {
    margin-bottom: 1.5rem;
    border: none;
    padding: 0;
}
.form-group--full legend {
    padding: 0;
    border: 0;
}
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.form-label__optional {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.form-input::placeholder {
    color: var(--gray-400);
}
.input-with-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.input-with-toggle .form-input {
    flex: 1;
}

/* Height cm/ft groups */
.height-cm-group {
    flex: 1;
}
.height-cm-group .form-input {
    width: 100%;
}
.height-ft-group {
    display: none;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}
.height-ft-group .form-input {
    width: 70px;
    flex: none;
}
.height-ft-group__separator {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Activity button icon/label/desc structure */
.activity-btn__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition);
}
.activity-btn__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.activity-btn.active .activity-btn__icon {
    color: var(--green);
}
.activity-btn__label {
    font-weight: 600;
}

/* Calculate button */
.calc-btn {
    width: 100%;
    padding: 1rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.calc-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.calc-btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}
.calc-btn:active {
    transform: translateY(0);
}

/* Calc error */
#calcError {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--red-bg);
    color: var(--red);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Result panel */
.result-panel {
    display: none;
    margin-top: 2rem;
}
.result-panel.visible {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* Primary TDEE result */
.result-primary {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border-top: 4px solid var(--green);
}
.result-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.result-amount {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--green);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.result-unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}
.result-formula {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

/* Result grid */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.result-grid .result-card:last-child {
    grid-column: 1 / -1;
}

/* BMI indicator in result card */
.bmi-indicator {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--blue-info) 0%, var(--green) 30%, var(--amber) 60%, var(--red) 100%);
    position: relative;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}
.bmi-indicator__marker {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    background: var(--text);
    border: 2px solid var(--white);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.8s ease;
}
.result-card__badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
}
.result-card__note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Macro dot */
.macro-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.macro-dot--protein { background: var(--green); }
.macro-dot--carbs { background: var(--amber); }
.macro-dot--fat { background: var(--red); }

/* Macro bar segment Italian names */
.macro-bar__segment--protein { background: var(--green); }
.macro-bar__segment--carbs { background: var(--amber); }
.macro-bar__segment--fat { background: var(--red); }

/* Result action buttons */
.btn-recalc {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--text);
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-recalc:hover {
    border-color: var(--green);
    color: var(--green);
}
.btn-salva {
    padding: 0.75rem 1.5rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background var(--transition);
}
.btn-salva:hover {
    background: var(--green-dark);
}

/* Hero stat number */
.hero__stat-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
}

/* How section */
.how-section {
    padding: 4rem 1.5rem;
    background: var(--white);
}
.how-section__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}
.how-section__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.how-section__sub {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}
.step-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.step-card__icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Goals section aliases */
.goals-section__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}
.goals-section__sub {
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.goal-card--cut .goal-card__icon { background: var(--red-bg); color: var(--red); }
.goal-card--maintain .goal-card__icon { background: var(--green-bg); color: var(--green); }
.goal-card--bulk .goal-card__icon { background: var(--blue-bg); color: var(--blue-info); }

/* Guide card body/arrow structure */
.guide-card__body {
    flex: 1;
}
.guide-card__arrow {
    display: flex;
    align-items: center;
    color: var(--green);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--transition);
}
.guide-card__arrow svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.guide-card:hover .guide-card__arrow {
    opacity: 1;
}

/* Guides section aliases */
.guides-section__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}
.guides-section__sub {
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* FAQ aliases */
.faq-section__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}
.faq-section__sub {
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.faq-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform var(--transition);
    fill: currentColor;
}
.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}
.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* Animate helpers */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}
.animate-fade-up--delay-1 { animation-delay: 0.1s; }
.animate-fade-up--delay-2 { animation-delay: 0.2s; }
.animate-fade-up--delay-3 { animation-delay: 0.3s; }

/* Responsive for new classes */
@media (max-width: 768px) {
    .calc-section__inner { padding: 0; }
    .tdee-form { padding: 1.5rem; border-radius: var(--radius-lg); }
    .result-amount { font-size: 3rem; }
    .result-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .result-actions { flex-direction: column; align-items: stretch; }
    .result-actions button { width: 100%; }
}
@media (max-width: 480px) {
    .tdee-form { padding: 1.25rem; }
    .result-amount { font-size: 2.5rem; }
    .result-primary { padding: 2rem 1.25rem; }
}
