/* Skip link (acessibilidade) */
        .skip-link { position: absolute; top: -40px; left: 0; background: #0A4D68; color: #fff; padding: 8px 16px; z-index: 9999; font-size: 14px; border-radius: 0 0 4px 0; transition: top .2s; text-decoration: none; }
        .skip-link:focus { top: 0; }
        /* --- DESIGN SYSTEM (Padrão Medical Journal) --- */
        :root {
            --primary: #0A4D68;        
            --primary-dark: #06384d;
            --accent: #4f46e5;  /* Indigo 600 - Cor temática para Composição/Tecnologia */       
            --secondary: #D97706;      
            --bg-body: #FAFAF9;        
            --bg-card: #FFFFFF;
            --text-main: #1C1917;      
            --text-muted: #57534E;     
            --border-subtle: #E7E5E4;  
            --container-width: 1200px;
            --header-height: 90px;
            
            /* Cores de Classificação */
            --fat-essential: #3b82f6;
            --fat-athlete: #10b981;
            --fat-fitness: #84cc16;
            --fat-acceptable: #f59e0b;
            --fat-obese: #ef4444;
        }

        [data-theme="dark"] {
            --bg-body: #0C0A09;
            --bg-card: #1C1917;
            --text-main: #F5F5F4;
            --text-muted: #A8A29E;
            --primary: #38BDF8;
            --accent: #818cf8;
            --border-subtle: #292524;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'Source Sans 3', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-main);
            line-height: 1.7;
            transition: background-color 0.5s ease, color 0.5s ease;
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: 'Playfair Display', serif;
            font-weight: 700;
            color: var(--primary);
            letter-spacing: -0.02em;
        }

        .container {
            max-width: var(--container-width);
            margin: 0 auto;
            padding: 0 24px;
        }

        a { text-decoration: none; color: inherit; transition: 0.3s ease; }
        ul { list-style: none; }

        /* --- ANIMAÇÕES --- */
        @keyframes rotate-scale {
            0% { transform: rotate(0) scale(1); }
            50% { transform: rotate(180deg) scale(1.2); }
            100% { transform: rotate(360deg) scale(1); }
        }
        .animate-theme-switch i, .animate-theme-switch svg { animation: rotate-scale 0.5s ease-in-out; }

        /* --- HEADER (Links Relativos) --- */
        .top-bar {
            background-color: #0A4D68;
            color: #fff;
            padding: 8px 0;
            font-size: 0.85rem;
            position: relative;
            z-index: 1002;
        }
        .top-bar .container { display: flex; justify-content: flex-end; gap: 20px; }
        
        .lang-selector { display: flex; align-items: center; gap: 5px; }
        .lang-selector select { background: transparent; color: #fff; border: none; font-size: 0.85rem; cursor: pointer; outline: none; }
        .lang-selector select option { color: #000; }

        .main-header {
            background-color: var(--bg-card);
            border-bottom: 1px solid var(--border-subtle);
            width: 100%;
            z-index: 1000;
            height: var(--header-height);
            position: sticky;
            top: 0;
        }
        .main-header .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }

        .logo {
            font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--primary);
            display: flex; align-items: center; gap: 12px; letter-spacing: -0.03em;
        }

        .nav-menu { display: flex; gap: 32px; }
        .nav-link {
            font-family: 'Source Sans 3', sans-serif; font-weight: 600; color: var(--text-muted);
            font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; position: relative;
        }
        .nav-link:hover::after { width: 100%; }
        .nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0; background-color: var(--secondary); transition: width 0.3s; }
        .nav-link:hover { color: var(--primary); }

        .btn-outline-white {
            border: 1px solid var(--primary); color: var(--primary); padding: 8px 24px;
            border-radius: 2px; text-transform: uppercase; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em;
        }
        .btn-outline-white:hover { background-color: var(--primary); color: #fff; }

        /* --- HERO --- */
        .tool-hero {
            background: linear-gradient(135deg, #4338ca 0%, #312e81 100%); /* Indigo Profundo */
            color: #fff;
            padding: 60px 0 100px;
            text-align: center;
        }
        .tool-hero h1 { color: #fff; font-size: 3rem; margin-bottom: 15px; }
        .tool-hero p { max-width: 700px; margin: 0 auto; opacity: 0.9; font-size: 1.2rem; font-weight: 300; }
        .tool-badge {
            background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
            padding: 5px 15px; border-radius: 50px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;
            display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
        }

        /* --- TOOL LAYOUT --- */
        .tool-layout {
            display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
            margin-top: -60px; margin-bottom: 80px; align-items: start;
        }

        .calc-card {
            background-color: var(--bg-card); padding: 40px; border-radius: 4px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-top: 5px solid var(--accent);
        }

        /* Inputs */
        .input-group { margin-bottom: 20px; }
        .input-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-main); }
        .input-wrapper { position: relative; }
        .input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
        .form-control {
            width: 100%; padding: 15px 15px 15px 45px;
            border: 1px solid var(--border-subtle); border-radius: 4px;
            font-size: 1.05rem; font-family: 'Source Sans 3', sans-serif;
            background-color: var(--bg-body); color: var(--text-main); transition: 0.3s;
        }
        .form-control:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

        /* Radios */
        .radio-group { display: flex; gap: 20px; margin-bottom: 25px; }
        .radio-option { flex: 1; position: relative; }
        .radio-option input { position: absolute; opacity: 0; cursor: pointer; }
        .radio-tile {
            display: flex; align-items: center; justify-content: center; gap: 10px;
            padding: 12px; border: 1px solid var(--border-subtle); border-radius: 4px;
            cursor: pointer; transition: 0.3s; font-weight: 600; color: var(--text-muted);
        }
        .radio-option input:checked + .radio-tile {
            background-color: rgba(79, 70, 229, 0.1); border-color: var(--accent); color: var(--accent);
        }

        .btn-calc {
            width: 100%; background-color: var(--accent); color: #fff;
            border: none; padding: 18px; font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
            border-radius: 4px; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; gap: 10px; margin-top: 15px;
        }
        .btn-calc:hover { background-color: #4338ca; transform: translateY(-2px); }

        /* RESULT */
        .result-container { display: none; animation: fadeIn 0.8s ease forwards; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

        .result-box {
            background-color: var(--bg-card); border: 1px solid var(--border-subtle);
            padding: 30px; border-radius: 4px; text-align: center; position: relative; overflow: hidden;
            margin-bottom: 25px;
        }
        .result-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background-color: var(--accent); }
        
        .bf-value { font-family: 'Playfair Display', serif; font-size: 3.5rem; font-weight: 700; color: var(--accent); line-height: 1; margin: 10px 0; }
        .bf-unit { font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

        /* Composition Bars */
        .comp-bar-container {
            display: flex; height: 30px; width: 100%; background-color: #e5e7eb; border-radius: 15px; overflow: hidden; margin: 25px 0 10px;
        }
        .comp-bar-fat { background-color: var(--accent); height: 100%; transition: width 1s ease; }
        .comp-bar-lean { background-color: #d1d5db; height: 100%; flex-grow: 1; }

        .comp-details {
            display: flex; justify-content: space-between; margin-top: 20px; text-align: left;
        }
        .comp-item { flex: 1; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 4px; margin: 0 5px; }
        .comp-item h5 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 5px; }
        .comp-item span { font-weight: 700; font-size: 1.1rem; color: var(--text-main); }

        /* Content */
        .content-section { margin-top: 60px; }
        .highlight-box {
            background-color: rgba(79, 70, 229, 0.05); padding: 25px; border-radius: 4px; border: 1px solid rgba(79, 70, 229, 0.2); margin: 30px 0;
        }
        .highlight-box h4 { color: var(--primary); margin-bottom: 10px; }

        /* --- FOOTER --- */
        footer {
            background-color: #1C1917; color: #A8A29E; padding: 80px 0 0; font-size: 0.95rem; font-family: 'Source Sans 3', sans-serif;
            border-top: 4px solid var(--accent);
        }
        .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 50px; padding-bottom: 60px; }
        .footer-grid h4 { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 25px; position: relative; }
        .footer-grid h4::after { content: ''; display: block; width: 30px; height: 2px; background-color: var(--accent); margin-top: 10px; }
        .footer-grid ul li { margin-bottom: 12px; }
        .footer-grid ul li a:hover { color: #fff; transform: translateX(5px); }
        .footer-bottom { border-top: 1px solid #333; padding: 30px 0; text-align: center; background-color: #151312; }

        @media (max-width: 900px) {
            .tool-layout { grid-template-columns: 1fr; margin-top: 0; }
            .nav-menu { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
            .hero h1 { font-size: 2.5rem; }
        }
