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

:root {
    /* MODERN WELLNESS PALETTE - GREEN THEMED */
    --bg: #f0fdf4;
    --bg-mint: #ecfdf5;
    --bg-soft: #f7fef9;
    --bg-card: #ffffff;
    --bg-card-hover: #f0fdf4;
    --bg-warm: #fff7ed;
    --bg-glass: rgba(255, 255, 255, 0.7);

    --text: #052e16;
    --text-body: #374151;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --text-faint: #d1d5db;

    --emerald: #059669;
    --emerald-hover: #047857;
    --emerald-soft: rgba(5, 150, 105, 0.08);
    --emerald-glow: rgba(5, 150, 105, 0.15);

    --coral: #f97316;
    --coral-hover: #ea580c;
    --coral-soft: rgba(249, 115, 22, 0.08);
    --coral-glow: rgba(249, 115, 22, 0.15);

    --rose: #e11d48;
    --rose-soft: rgba(225, 29, 72, 0.08);
    --rose-glow: rgba(225, 29, 72, 0.15);

    --sky: #0284c7;
    --sky-soft: rgba(2, 132, 199, 0.08);
    --sky-glow: rgba(2, 132, 199, 0.15);

    --violet: #7c3aed;
    --violet-soft: rgba(124, 58, 237, 0.08);
    --violet-glow: rgba(124, 58, 237, 0.15);

    --amber: #d97706;
    --amber-soft: rgba(217, 119, 6, 0.08);
    --amber-glow: rgba(217, 119, 6, 0.15);

    --teal: #0d9488;
    --teal-soft: rgba(13, 148, 136, 0.08);
    --teal-glow: rgba(13, 148, 136, 0.15);

    --pink: #db2777;
    --pink-soft: rgba(219, 39, 119, 0.08);
    --pink-glow: rgba(219, 39, 119, 0.15);

    --indigo: #4338ca;
    --indigo-soft: rgba(67, 56, 202, 0.08);
    --indigo-glow: rgba(67, 56, 202, 0.15);

    --border: #d1fae5;
    --border-hover: #a7f3d0;
    --border-bright: #6ee7b7;

    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
    --shadow-xs: 0 1px 3px rgba(5, 46, 22, 0.04);
    --shadow-sm: 0 2px 8px rgba(5, 46, 22, 0.05);
    --shadow: 0 4px 24px rgba(5, 46, 22, 0.07);
    --shadow-lg: 0 12px 48px rgba(5, 46, 22, 0.10);
    --shadow-glow: 0 0 40px;
    --max-width: 900px;
    --max-width-index: 1200px;

    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* GRADIENT MESH BACKGROUND */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 600px 400px at 10% 0%, rgba(5, 150, 105, 0.06), transparent 60%),
        radial-gradient(ellipse 500px 350px at 90% 10%, rgba(249, 115, 22, 0.05), transparent 60%),
        radial-gradient(ellipse 700px 500px at 50% 100%, rgba(225, 29, 72, 0.04), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ORGANIC BLOB SHAPES */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    animation: blob-float 20s infinite ease-in-out;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 25px) scale(0.95); }
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--emerald-soft); color: var(--emerald-hover); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--emerald); }

/* ============ HEADER ============ */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(240, 253, 244, 0.80);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max-width-index); margin: 0 auto;
    padding: 14px 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: relative; z-index: 1;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap;
    color: var(--text);
}
.logo-icon { font-size: 1.5rem; filter: drop-shadow(0 0 8px var(--emerald-glow)); }
.logo .accent { color: var(--emerald); }
.header-search { flex: 1; max-width: 380px; position: relative; }
.header-search input {
    width: 100%; padding: 10px 16px 10px 40px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 100px; color: var(--text); font-size: 0.88rem; font-family: var(--font-sans);
    transition: all 0.2s;
}
.header-search input::placeholder { color: var(--text-dim); }
.header-search input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.header-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--text-dim); fill: none; stroke-width: 2; }
.header-nav { display: flex; gap: 24px; font-size: 0.88rem; }
.header-nav a { color: var(--text-muted); transition: color 0.2s; font-weight: 500; white-space: nowrap; }
.header-nav a:hover { color: var(--emerald); }
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 100;
}
.menu-toggle .bar {
    width: 20px;
    height: 2px;
    background-color: var(--text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ============ INDEX / LANDING ONLY ============ */
.hero {
    max-width: var(--max-width-index); margin: 0 auto;
    padding: 80px 28px 56px; text-align: center;
    position: relative; z-index: 1;
}
.hero-pulse {
    position: absolute; top: 50%; left: 0; right: 0; height: 2px;
    pointer-events: none; opacity: 0.3; z-index: -1;
}
.hero-pulse svg { width: 100%; height: 60px; }
.hero-pulse path {
    fill: none; stroke: var(--emerald); stroke-width: 2;
    stroke-dasharray: 1000; stroke-dashoffset: 1000;
    animation: draw-pulse 4s ease-in-out infinite;
}
@keyframes draw-pulse {
    0% { stroke-dashoffset: 1000; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1000; }
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 18px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 100px; font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted); margin-bottom: 28px; letter-spacing: 0.3px;
    box-shadow: var(--shadow-xs);
}
.hero-eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald-glow); animation: heartbeat 1.5s infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
.hero h1 {
    font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 900; letter-spacing: -1.5px; line-height: 1.05;
    margin-bottom: 24px; color: var(--text);
}
.hero h1 em {
    font-style: normal; font-weight: 400;
    background: linear-gradient(135deg, var(--emerald), var(--coral));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { color: var(--text-body); font-size: 1.1rem; max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stat-num {
    font-family: var(--font-display); font-size: 1.8rem; font-weight: 800;
    background: linear-gradient(135deg, var(--emerald), var(--coral));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; letter-spacing: -0.5px;
}
.hero-stat-label { font-size: 0.74rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

.search-section { max-width: 640px; margin: 0 auto 64px; padding: 0 28px; position: relative; z-index: 1; }
.search-bar {
    width: 100%; padding: 18px 24px 18px 56px; background: var(--bg-card);
    border: 1.5px solid var(--border); border-radius: var(--radius);
    color: var(--text); font-size: 1.05rem; font-family: var(--font-sans);
    transition: all 0.25s; box-shadow: var(--shadow-sm);
}
.search-bar::placeholder { color: var(--text-dim); }
.search-bar:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 4px var(--emerald-soft), var(--shadow); }
.search-section > svg { position: absolute; left: 46px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; stroke: var(--text-dim); fill: none; stroke-width: 2; }
.search-hint { position: absolute; right: 42px; top: 50%; transform: translateY(-50%); padding: 4px 12px; background: var(--bg-mint); border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 0.75rem; color: var(--text-dim); font-family: var(--font-mono); pointer-events: none; }
.search-results-info { text-align: center; margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); display: none; }
.search-results-info.visible { display: block; }

.featured-banner { max-width: var(--max-width-index); margin: 0 auto; padding: 0 28px 64px; position: relative; z-index: 1; }
.featured-inner { background: linear-gradient(135deg, var(--bg-mint), var(--bg-warm)); border: 1px solid var(--border); border-radius: var(--radius); padding: 44px; display: flex; align-items: center; gap: 40px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.featured-inner::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 L200,50 L220,20 L240,80 L260,50 L400,50 L420,10 L440,90 L460,50 L600,50 L620,20 L640,80 L660,50 L800,50 L820,10 L840,90 L860,50 L1000,50 L1020,20 L1040,80 L1060,50 L1200,50' fill='none' stroke='%23059669' stroke-width='1.5' opacity='0.06'/%3E%3C/svg%3E"); background-size: 100% 100%; pointer-events: none; }
.featured-content { flex: 1; position: relative; z-index: 1; }
.featured-label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; background: var(--emerald); color: #fff; border-radius: 100px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 18px; }
.featured-content h3 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--text); margin-bottom: 12px; letter-spacing: -0.5px; }
.featured-content p { color: var(--text-body); font-size: 0.96rem; line-height: 1.7; margin-bottom: 24px; max-width: 520px; }
.featured-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: var(--emerald); color: #fff; border-radius: 100px; font-size: 0.9rem; font-weight: 600; transition: all 0.2s; box-shadow: 0 4px 16px var(--emerald-glow); }
.featured-link:hover { background: var(--emerald-hover); transform: translateY(-2px); box-shadow: 0 8px 24px var(--emerald-glow); }
.featured-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.categories { max-width: var(--max-width-index); margin: 0 auto; padding: 0 28px 80px; position: relative; z-index: 1; }
.category { margin-bottom: 64px; scroll-margin-top: 80px; }
.category-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.category-icon-wrap { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 1.5rem; flex-shrink: 0; }
.category-header h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.category-desc { font-size: 0.85rem; color: var(--text-dim); margin-left: 4px; font-weight: 500; }
.category-count { margin-left: auto; font-size: 0.76rem; color: var(--text-muted); background: var(--bg-card); padding: 5px 14px; border-radius: 100px; border: 1px solid var(--border); font-weight: 600; font-family: var(--font-mono); box-shadow: var(--shadow-xs); }

/* ============ CARD GRID ============ */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card.featured { grid-column: span 2; grid-row: span 2; }
.tool-card.wide { grid-column: span 2; }
.tool-card { display: flex; flex-direction: column; padding: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; position: relative; overflow: hidden; box-shadow: var(--shadow-xs); }
.tool-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 50% 0%, var(--card-glow, var(--emerald-glow)), transparent 50%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.tool-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--card-accent, var(--emerald)), transparent 80%); opacity: 0; transition: opacity 0.3s; border-radius: var(--radius) var(--radius) 0 0; }
.tool-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-card:hover::before { opacity: 1; }
.tool-card:hover::after { opacity: 1; }
.tool-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; position: relative; z-index: 1; }
.tool-card-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--card-bg-soft, var(--emerald-soft)); border-radius: var(--radius-xs); font-size: 1.3rem; line-height: 1; flex-shrink: 0; transition: transform 0.3s; }
.tool-card:hover .tool-card-icon { transform: scale(1.1); }
.tool-card-title { font-family: var(--font-display); font-size: 0.98rem; font-weight: 700; letter-spacing: -0.2px; color: var(--text); line-height: 1.3; }
.tool-card-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; flex-grow: 1; margin-bottom: 14px; position: relative; z-index: 1; }
.tool-card.featured .tool-card-desc { font-size: 0.92rem; line-height: 1.75; }
.tool-card.featured .tool-card-title { font-size: 1.2rem; }
.tool-card.featured .tool-card-icon { width: 52px; height: 52px; font-size: 1.6rem; }
.tool-card-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700; color: var(--card-accent, var(--emerald)); text-transform: uppercase; letter-spacing: 0.6px; position: relative; z-index: 1; }
.tool-card-arrow svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; transition: transform 0.2s; }
.tool-card:hover .tool-card-arrow svg { transform: translateX(4px); }
.tool-card.hidden { display: none; }

.no-results { text-align: center; padding: 80px 20px; color: var(--text-dim); font-family: var(--font-display); font-size: 1.4rem; font-weight: 300; display: none; }
.no-results.visible { display: block; }

.seo-content { max-width: 800px; margin: 0 auto; padding: 80px 28px; position: relative; z-index: 1; }
.seo-content h2 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -0.5px; color: var(--text); }
.seo-content h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin: 36px 0 14px; color: var(--text); }
.seo-content p { color: var(--text-body); margin-bottom: 18px; font-size: 0.97rem; line-height: 1.85; }
.seo-content strong { color: var(--text); font-weight: 600; }
.seo-content a { color: var(--emerald); text-decoration: underline; text-decoration-color: var(--emerald-soft); text-underline-offset: 2px; }
.seo-content a:hover { text-decoration-color: var(--emerald); }
.seo-content ul { margin: 14px 0 22px 20px; color: var(--text-body); }
.seo-content li { margin-bottom: 10px; font-size: 0.94rem; line-height: 1.7; }
.seo-content code { background: var(--emerald-soft); color: var(--emerald-hover); padding: 2px 7px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.85em; }

/* ============ TOOL PAGES COMMON ============ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 32px 28px 60px; position: relative; z-index: 1; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-dim); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--emerald); }
.breadcrumb span { color: var(--text-faint); }

.tool-box {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 36px; margin-bottom: 48px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.tool-box::before {
    content: ''; position: absolute; top: -100px; right: -100px; width: 300px; height: 300px;
    background: radial-gradient(circle, var(--emerald-glow), transparent 70%); opacity: 0.5; pointer-events: none;
}
.tool-header { margin-bottom: 28px; position: relative; z-index: 1; }
.tool-header h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 900; letter-spacing: -0.8px; line-height: 1.15; margin-bottom: 8px; }
.tool-header p { color: var(--text-muted); font-size: 1rem; }
.tool-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tool-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; background: var(--bg-mint); border: 1px solid var(--border);
    border-radius: 100px; font-size: 0.76rem; color: var(--text-muted);
}
.tool-badge .dot { width: 7px; height: 7px; border-radius: 50%; }

.unit-toggle {
    display: inline-flex; gap: 4px; margin-bottom: 24px;
    background: var(--bg-input, var(--bg-soft)); border: 1px solid var(--border);
    border-radius: 100px; padding: 4px; position: relative; z-index: 1;
}
.unit-btn {
    padding: 8px 20px; background: transparent; border: none;
    border-radius: 100px; color: var(--text-muted); font-size: 0.85rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: var(--font-sans);
}
.unit-btn:hover { color: var(--text); }
.unit-btn.active { background: var(--emerald); color: #fff; }

/* TABS */
.tab-container { margin-bottom: 24px; position: relative; z-index: 1; }
.tab-nav { display: flex; border-bottom: 1.5px solid var(--border); margin-bottom: 24px; gap: 8px; flex-wrap: wrap; }
.tab-btn {
    padding: 12px 20px; background: transparent; border: none;
    border-bottom: 2.5px solid transparent; color: var(--text-muted); font-size: 0.92rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: var(--font-sans);
}
.tab-btn:hover { color: var(--emerald); }
.tab-btn.active { color: var(--emerald); border-bottom-color: var(--emerald); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.input-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; position: relative; z-index: 1; }
.input-group { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input {
    width: 100%; padding: 14px 16px; background: var(--bg-soft);
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
    font-size: 1.1rem; font-family: var(--font-mono); font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-wrap input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.input-unit { position: absolute; right: 14px; font-size: 0.85rem; color: var(--text-dim); font-family: var(--font-sans); font-weight: 500; pointer-events: none; }

/* BMI CALCULATOR SPECIFIC GAUGE */
.bmi-gauge-wrap { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 28px; margin-bottom: 24px; position: relative; z-index: 1; text-align: center; }
.bmi-gauge-label { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
.bmi-value { font-family: var(--font-display); font-size: 3.5rem; font-weight: 900; letter-spacing: -1.5px; line-height: 1; margin-bottom: 8px; transition: color 0.3s; }
.bmi-category { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; padding: 6px 18px; border-radius: 100px; display: inline-block; margin-bottom: 20px; transition: all 0.3s; }
.bmi-gauge-bar { position: relative; height: 12px; border-radius: 100px; background: linear-gradient(90deg, #3b82f6 0%, #3b82f6 16.6%, #10b981 16.6%, #10b981 50%, #f59e0b 50%, #f59e0b 66.6%, #f97316 66.6%, #f97316 83.3%, #ef4444 83.3%, #ef4444 100%); margin-bottom: 12px; }
.bmi-indicator { position: absolute; top: -6px; width: 4px; height: 24px; background: var(--text); border-radius: 2px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1); transform: translateX(-50%); }
.bmi-gauge-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-dim); font-family: var(--font-mono); }

.result-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; position: relative; z-index: 1; }
.result-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; }
.result-card-label { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.result-card-value { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; color: var(--text); }
.result-card-sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }

.formula-display { background: var(--bg-warm); border: 1px solid #fed7aa; border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 20px; position: relative; z-index: 1; font-family: var(--font-mono); font-size: 0.88rem; color: var(--text-body); line-height: 1.8; }
.formula-display strong { color: var(--coral-hover); }

.tool-buttons { display: flex; gap: 10px; position: relative; z-index: 1; }
.btn { padding: 12px 24px; border: none; border-radius: 100px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 4px 16px var(--emerald-glow); }
.btn-primary:hover { background: var(--emerald-hover); transform: translateY(-1px); box-shadow: 0 8px 24px var(--emerald-glow); }
.btn-secondary { background: var(--bg-mint); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ============ DEEP-DIVE ARTICLE PRESENTATION ============ */
.article { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 44px; box-shadow: var(--shadow-sm); position: relative; z-index: 1; }
.article h2 { font-family: var(--font-display); font-size: 1.55rem; font-weight: 800; margin: 40px 0 16px; letter-spacing: -0.5px; color: var(--text); scroll-margin-top: 80px; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-family: var(--font-sans); font-size: 1.1rem; font-weight: 700; margin: 28px 0 12px; color: var(--text); }
.article p { color: var(--text-body); margin-bottom: 16px; line-height: 1.8; font-size: 0.96rem; }
.article p strong { color: var(--text); font-weight: 600; }
.article p em { font-style: italic; color: var(--text); }
.article code { background: var(--emerald-soft); color: var(--emerald-hover); padding: 2px 7px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.85em; }
.article pre { background: #052e16; border-radius: var(--radius-sm); padding: 20px 24px; margin: 16px 0; overflow-x: auto; }
.article pre code { background: none; color: #d1fae5; padding: 0; font-size: 0.88rem; line-height: 1.7; font-family: var(--font-mono); }
.article blockquote { border-left: 4px solid var(--coral); background: var(--coral-soft); padding: 14px 20px; margin: 16px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.article blockquote p { margin: 0; color: var(--text); }
.article blockquote strong { color: var(--coral-hover); }
.article table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.9rem; }
.article th, .article td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; }
.article th { background: var(--bg-mint); font-weight: 700; color: var(--text); font-family: var(--font-display); }
.article td { color: var(--text-body); }
.article ul { margin: 12px 0 20px 20px; color: var(--text-body); }
.article li { margin-bottom: 8px; font-size: 0.93rem; line-height: 1.65; }
.article a { color: var(--emerald); text-decoration: underline; text-decoration-color: var(--emerald-soft); text-underline-offset: 2px; }
.article a:hover { text-decoration-color: var(--emerald); }

.article .toc { background: var(--bg-mint); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px 24px; margin-bottom: 32px; }
.article .toc-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.article .toc ol { margin: 0; padding-left: 20px; }
.article .toc li { margin-bottom: 6px; }
.article .toc a { color: var(--text-body); text-decoration: none; }
.article .toc a:hover { color: var(--emerald); }
.article .meta-block { background: #052e16; border-radius: var(--radius-sm); padding: 20px; margin-top: 36px; }
.article .meta-block pre { background: none; padding: 0; margin: 0; }
.article .meta-block code { background: none; color: #d1fae5; font-size: 0.82rem; line-height: 1.8; font-family: var(--font-mono); }

/* MEDICAL DISCLAIMER */
.medical-disclaimer {
    background: var(--bg-warm); border: 1px solid #fed7aa; border-left: 4px solid var(--coral);
    border-radius: var(--radius-sm); padding: 20px 24px; margin: 32px 0;
}
.medical-disclaimer strong { color: var(--coral-hover); font-family: var(--font-display); font-size: 1rem; display: block; margin-bottom: 8px; }
.medical-disclaimer p { font-size: 0.88rem; color: var(--text-muted); margin: 0; line-height: 1.7; }

/* ============ FOOTER ============ */
footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 56px 28px 32px; position: relative; z-index: 1; }
.footer-inner { max-width: var(--max-width-index); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .logo { margin-bottom: 14px; font-size: 1.2rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-dim); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-body); font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--emerald); }
.footer-bottom { max-width: var(--max-width-index); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { color: var(--text-dim); font-size: 0.8rem; }

/* Breadcrumb wrapping and table responsiveness */
.breadcrumb { flex-wrap: wrap; line-height: 1.5; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .tool-grid { grid-template-columns: repeat(3, 1fr); }
    .tool-card.featured { grid-column: span 2; grid-row: span 1; }
    .tool-card.wide { grid-column: span 2; }
    .featured-inner { flex-direction: column; text-align: center; padding: 36px; }
    .featured-content p { margin: 0 auto 24px; }
}

@media (max-width: 768px) {
    .header-search { display: none; }
    table, .article table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: collapse;
    }
    th, td, .article th, .article td {
        white-space: nowrap;
    }
    .menu-toggle { display: flex; }
    .header-nav {
        display: none;
        position: absolute;
        top: 60px;
        right: 28px;
        background: var(--bg-card);
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        flex-direction: column;
        padding: 16px 20px;
        gap: 12px;
        box-shadow: var(--shadow);
        z-index: 99;
    }
    .header-nav.active {
        display: flex;
    }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .tool-card.featured, .tool-card.wide { grid-column: span 2; }
    .hero-stats { gap: 28px; }
    .search-hint { display: none; }
    .tool-box { padding: 24px 20px; }
    .tool-header h1 { font-size: 1.5rem; }
    .article { padding: 28px 20px; }
    .article h2 { font-size: 1.3rem; }
    .result-details { grid-template-columns: 1fr; }
    .bmi-value { font-size: 2.8rem; }
    .container { padding: 24px 16px 48px; }
}

@media (max-width: 480px) {
    .header-inner { padding: 10px 12px; gap: 8px; }
    .logo { font-size: 1.1rem; gap: 6px; }
    .logo-icon { font-size: 1.25rem; }
    .hero { padding: 48px 16px 32px; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; }
    .search-section { padding: 0 16px; margin-bottom: 40px; }
    .categories { padding: 0 16px 40px; }
    .tool-grid { grid-template-columns: 1fr; }
    .tool-card.featured, .tool-card.wide { grid-column: span 1; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .seo-content { padding: 48px 16px; }
    .featured-banner { padding: 0 16px 32px; }
    .featured-inner { padding: 28px 20px; }
    .hero-pulse { display: none; }
    .input-row { flex-direction: column; }
    .bmi-gauge-labels { font-size: 0.62rem; }
    .tool-box { padding: 20px 16px; }
    .unit-toggle { display: flex; width: 100%; }
    .unit-btn { flex: 1; padding: 8px 4px; font-size: 0.8rem; text-align: center; }
    .tab-nav { display: flex; flex-direction: column; width: 100%; gap: 4px; border-bottom: none; }
    .tab-btn { width: 100%; text-align: left; padding: 10px 12px; border-bottom: none; border-left: 3px solid transparent; }
    .tab-btn.active { border-left-color: var(--emerald); border-bottom-color: transparent; background: var(--bg-soft); }
    .bmi-value { font-size: 2.3rem; }
    .formula-display { padding: 12px 14px; font-size: 0.8rem; }
    .tool-buttons { flex-direction: column; width: 100%; }
    .tool-buttons .btn { width: 100%; justify-content: center; }
}
