/* 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: #be123c;  /* Rose 700 - Cor temática para Coração */       
            --secondary: #D97706;      
            --bg-body: #FAFAF9;        
            --bg-card: #FFFFFF;
            --text-main: #1C1917;      
            --text-muted: #57534E;     
            --border-subtle: #E7E5E4;  
            --container-width: 1200px;
            --header-height: 90px;
            
            /* Cores das Zonas */
            --z1: #94a3b8; /* Cinza/Azul */
            --z2: #3b82f6; /* Azul */
            --z3: #10b981; /* Verde */
            --z4: #f59e0b; /* Laranja */
            --z5: #ef4444; /* Vermelho */
        }

        [data-theme="dark"] {
            --bg-body: #0C0A09;
            --bg-card: #1C1917;
            --text-main: #F5F5F4;
            --text-muted: #A8A29E;
            --primary: #38BDF8;
            --accent: #fb7185; /* Rose mais claro */
            --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, #be123c 0%, #881337 100%); /* Vermelho Cardíaco */
            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(190, 18, 60, 0.1); }

        .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: #9f1239; 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;
        }
        
        .max-hr-display {
            display: flex; justify-content: space-around; align-items: center; margin-bottom: 20px;
        }
        .max-hr-item { text-align: center; }
        .max-hr-val { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; color: var(--accent); line-height: 1; }
        .max-hr-label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }

        /* Zonas */
        .zones-list { display: grid; gap: 12px; }
        .zone-card {
            background-color: var(--bg-body); border-radius: 4px; padding: 12px 15px;
            display: flex; align-items: center; justify-content: space-between;
            position: relative; overflow: hidden; border-left: 4px solid #ccc;
        }
        
        /* Cores das Zonas */
        .zone-card.z1 { border-color: var(--z1); }
        .zone-card.z2 { border-color: var(--z2); }
        .zone-card.z3 { border-color: var(--z3); }
        .zone-card.z4 { border-color: var(--z4); }
        .zone-card.z5 { border-color: var(--z5); }

        .zone-info h4 { font-size: 1rem; margin-bottom: 2px; color: var(--text-main); }
        .zone-info span { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
        .zone-bpm { font-family: 'Source Sans 3', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text-main); }

        /* Content */
        .content-section { margin-top: 60px; }
        .highlight-box {
            background-color: rgba(190, 18, 60, 0.05); padding: 25px; border-radius: 4px; border: 1px solid rgba(190, 18, 60, 0.2); margin: 30px 0;
        }

        /* --- 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; }
        }
