/* Always show vertical scrollbar to prevent layout jump/blinking between short and long pages */
html {
    overflow-y: scroll;
}

:root {
    --bg-main: #f8f6fc; 
    --text-dark: #1e293b; 
    --text-light: #475569;
    --primary: #5b21b6; 
    --primary-light: #8b5cf6; 
    --primary-dark: #4c1d95;
    --accent-gold: #d97706; 
    --card-bg: #ffffff; 
    --border-line: #e9d8f4;
    --highlight-green: #059669; 
    --highlight-red: #e11d48; 
    --cell-bg: #faf5ff;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body { background-color: var(--bg-main); color: var(--text-dark); font-family: 'Inter', sans-serif; line-height: 1.7; display: flex; flex-direction: column; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, .btn-submit, .value, .badge, .matrix-cell { font-family: 'Poppins', sans-serif; }

/* ==============================================================
   1200px GLOBAL CENTERING & SPACING
============================================================== */
.main-content, .container, .page-container { 
    max-width: 1200px !important; 
    margin-top: 40px !important;
    margin-bottom: 50px !important;
    margin-left: auto !important; 
    margin-right: auto !important; 
    padding-left: 20px; 
    padding-right: 20px; 
    width: 100%; 
    flex: 1; 
    position: relative; 
    z-index: 5;
}

.content-narrow { 
    max-width: 850px !important; 
    margin-left: auto !important; 
    margin-right: auto !important; 
}

.landing-hero, .hero-layout {
    margin-top: 15px !important;
}

/* ==============================================================
   TOP NAVBAR & DESKTOP ALIGNMENT FIX
============================================================== */
.top-navbar { 
    width: 100%;
    box-sizing: border-box;
    background: var(--primary-dark); 
    padding: 12px max(20px, calc((100% - 1200px) / 2)) !important;
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    border-bottom: 3px solid var(--accent-gold); 
    box-shadow: 0 4px 15px rgba(76, 29, 149, 0.15); 
    position: relative; 
    z-index: 100; 
}

.logo-box { cursor: pointer; flex-shrink: 0; }
.logo-title { margin: 0; font-size: 20px; font-weight: 700; color: #fff; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; font-family: 'Poppins', sans-serif; }
.logo-box p { margin: 0; color: #d8b4fe; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }

/* Perfect baseline & height matching for links and dropdowns */
.nav-links { 
    display: flex; 
    gap: 6px; 
    align-items: center; 
}

.nav-links a { 
    text-decoration: none; 
    color: #e9d8f4; 
    font-family: 'Poppins', sans-serif; 
    font-weight: 500; 
    font-size: 13px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px; 
    border-radius: 20px; 
    transition: all 0.25s ease; 
    line-height: 1;
}

.nav-links > a:hover, 
.nav-links > a.active, 
.dropdown-trigger:hover, 
.dropdown-trigger.active { 
    color: #fff; 
    background: rgba(255, 255, 255, 0.12); 
}

.nav-links > a.active,
.dropdown-trigger.active {
    background: var(--primary-light) !important;
    color: #fff !important;
}

/* Dropdown: inline-flex eliminates vertical baseline misalignments */
.dropdown { 
    position: relative; 
    display: inline-flex; 
    align-items: center; 
    height: 38px;
}

.dropdown-trigger {
    cursor: pointer;
    gap: 4px;
}

.arrow-indicator {
    font-size: 11px;
    margin-left: 2px;
    opacity: 0.8;
}

.dropdown-content { 
    display: none; 
    position: absolute; 
    background-color: var(--primary-dark); 
    min-width: 220px; 
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.45); 
    z-index: 999; 
    border-radius: 12px; 
    top: calc(100% + 5px); 
    left: 0; 
    padding: 8px 0; 
    border: 1px solid var(--primary-light); 
    flex-direction: column; 
}

.dropdown::after { 
    content: ''; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    height: 8px; 
}

/* Hover activates dropdown on desktop */
@media (min-width: 901px) {
    .dropdown:hover .dropdown-content { 
        display: flex !important; 
    }
}

.dropdown-content a { 
    height: auto !important;
    padding: 12px 18px !important; 
    border-radius: 0 !important; 
    text-align: left; 
    display: block !important; 
    width: 100%; 
    font-size: 13px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    color: #e9d8f4;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { 
    background-color: var(--primary) !important; 
    color: #fff;
    padding-left: 22px !important; 
}

/* Mobile Toggle Hamburger Button (Hidden on Desktop) */
.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.mobile-toggle-btn .icon-close { display: none; }
.mobile-toggle-btn.open .icon-hamburger { display: none; }
.mobile-toggle-btn.open .icon-close { display: block; }

/* ==============================================================
   FOOTER STYLING
============================================================== */
footer { 
    width: 100%;
    box-sizing: border-box;
    background: var(--primary-dark); 
    color: #d8b4fe; 
    padding: 40px max(20px, calc((100% - 1200px) / 2)) 30px !important;
    text-align: center; 
    margin-top: auto; 
    border-top: 4px solid var(--primary-light); 
}

/* Background Pattern */
.bg-pattern { 
    position: fixed; 
    top: 90px;  
    left: 40px; 
    width: 600px; 
    max-width: 90vw; 
    height: 600px; 
    max-height: 90vh; 
    background-image: url("data:image/svg+xml,%3Csvg width='500' height='500' viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='rgba(107,33,168,0.06)' fill='none' stroke-width='1.5'%3E%3Ccircle cx='250' cy='250' r='230'/%3E%3Ccircle cx='250' cy='250' r='140' stroke-dasharray='6 6'/%3E%3C/g%3E%3Cpath d='M250 170 Q250 250 330 250 Q250 250 250 330 Q250 250 170 250 Q250 250 250 170 Z' fill='rgba(217,119,6,0.12)'/%3E%3Cg fill='rgba(107,33,168,0.12)' font-family='Arial, sans-serif' font-weight='bold' font-size='28' text-anchor='middle' dominant-baseline='middle'%3E%3Ctext x='250' y='50'%3E1%3C/text%3E%3Ctext x='390' y='110'%3E2%3C/text%3E%3Ctext x='450' y='250'%3E3%3C/text%3E%3Ctext x='390' y='390'%3E4%3C/text%3E%3Ctext x='250' y='450'%3E5%3C/text%3E%3Ctext x='110' y='390'%3E6%3C/text%3E%3Ctext x='50' y='250'%3E7%3C/text%3E%3Ctext x='110' y='110'%3E8%3C/text%3E%3Ctext x='250' y='250' font-size='40' fill='rgba(217,119,6,0.2)'%3E✦%3C/text%3E%3C/g%3E%3C/svg%3E"); 
    background-position: center; 
    background-repeat: no-repeat; 
    background-size: contain; 
    z-index: -1; 
    pointer-events: none; 
    opacity: 0.85; 
}

/* ==============================================================
   UI BLOCKS & CARDS
============================================================== */
.section-block { margin-bottom: 32px; }
.body-content { font-size: 15px; color: var(--text-light); line-height: 1.7; margin-bottom: 16px; }

.content-panel, .content-card, .chart-panel { 
    background: var(--card-bg); 
    border-radius: 16px; 
    border: 1px solid var(--border-line); 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); 
    padding: 24px 30px; 
    margin-bottom: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.content-card:hover, .content-panel:hover, .chart-panel:hover { border-color: var(--primary-light); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.1); }

.chart-panel { display: flex; flex-direction: column; align-items: center; text-align: center; }
.chart-panel h3 { width: 100%; text-align: left; }

.content-panel h3, .chart-panel h3 { margin-top: 0; color: var(--primary-dark); font-size: 18px; border-bottom: 1px solid var(--border-line); padding-bottom: 12px; }
.section-heading, .section-title { font-size: 20px; color: var(--primary-dark); border-bottom: 2px solid var(--border-line); padding-bottom: 12px; display: flex; align-items: center; gap: 12px; font-weight: 600; margin: 0 0 20px 0; }

.analysis-layout { display: grid; grid-template-columns: minmax(300px, 1fr) 1.5fr; gap: 30px; margin-bottom: 30px; align-items: stretch; }
.responsive-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 30px; }
.dual-col { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 15px; }

.hero-layout { display: grid; grid-template-columns: 1.2fr 400px; gap: 60px; align-items: center; margin: 20px auto 40px auto; padding: 0; }
.landing-hero { text-align: center; max-width: 850px; margin: 40px auto 40px auto; padding: 0; position: relative; z-index: 5; }
.hero-title { font-size: 42px; line-height: 1.2; color: var(--primary-dark); margin-bottom: 16px; font-family: 'Poppins', sans-serif; }
.hero-title span, .hero-text h2 span { color: var(--primary-light); }
.hero-text h2 { font-size: 38px; line-height: 1.25; color: var(--primary-dark); margin-bottom: 15px; letter-spacing: -0.5px; }
.hero-text p { font-size: 16px; color: var(--text-light); margin-bottom: 20px; line-height: 1.8; }
.hero-features { list-style: none; padding: 0; }
.hero-features li { display: flex; align-items: center; font-size: 15px; margin-bottom: 12px; color: var(--text-dark); font-weight: 500; }
.hero-features li svg { width: 20px; height: 20px; color: var(--primary-light); margin-right: 12px; flex-shrink: 0; }

/* Input Panels */
.input-panel { background: var(--card-bg); padding: 35px; border-radius: 20px; box-shadow: 0 15px 40px rgba(107, 33, 168, 0.08); border: 1px solid var(--border-line); }
.input-panel h3 { margin-top: 0; color: var(--primary-dark); font-size: 20px; margin-bottom: 20px; text-align: center; }
.input-group { margin-bottom: 15px; }
.input-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-light); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.input-group input, .input-group select { width: 100%; padding: 14px; border: 2px solid var(--border-line); border-radius: 10px; font-size: 15px; background: #fdfcff; color: var(--text-dark); transition: 0.3s; }
.input-group input:focus, .input-group select:focus { border-color: var(--primary-light); outline: none; background: #fff; box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1); }

/* Buttons */
.btn-submit { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; border: none; padding: 16px 30px; font-size: 15px; border-radius: 10px; cursor: pointer; width: 100%; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; box-shadow: 0 8px 20px rgba(147, 51, 234, 0.25); margin-top: 15px; }
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(147, 51, 234, 0.35); }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; padding: 16px 35px; border-radius: 30px; text-decoration: none; font-weight: 600; font-family: 'Poppins', sans-serif; transition: 0.3s; box-shadow: 0 8px 20px rgba(147, 51, 234, 0.25); display: inline-flex; align-items: center; gap: 10px; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(147, 51, 234, 0.35); color: #fff; }
.btn-secondary { background: #fff; color: var(--primary-dark); border: 2px solid var(--border-line); padding: 14px 35px; border-radius: 30px; text-decoration: none; font-weight: 600; font-family: 'Poppins', sans-serif; transition: 0.3s; display: inline-flex; align-items: center; gap: 10px; }
.btn-secondary:hover { border-color: var(--primary-light); color: var(--primary); }
.btn-back, .btn-print { background: #fff; border: 1px solid var(--border-line); color: var(--text-dark); padding: 8px 16px; border-radius: 30px; font-weight: 500; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; font-size: 13px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.btn-back:hover { border-color: var(--primary-light); color: var(--primary); }
.btn-print { background: var(--primary-dark); color: #fff; border: none; padding: 8px 20px; box-shadow: 0 4px 10px rgba(76,29,149,0.2); }
.btn-print:hover { background: var(--primary); }

/* Report Profile Hero */
#workspace-area, #report-output { display: none; margin: 40px auto; }
.report-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.profile-hero { display: flex; align-items: center; gap: 20px; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); padding: 25px 30px; border-radius: 16px; color: #fff; margin-bottom: 30px; box-shadow: 0 10px 25px rgba(76, 29, 149, 0.12); position: relative; overflow: hidden; }
.profile-hero::after { content: "✦"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 80px; color: rgba(255,255,255,0.05); line-height: 1; }
.profile-avatar { width: 70px; height: 70px; background: linear-gradient(135deg, var(--accent-gold) 0%, #f59e0b 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: #fff; box-shadow: 0 5px 15px rgba(217, 119, 6, 0.3); border: 3px solid rgba(255,255,255,0.2); flex-shrink: 0; z-index: 2; }
.profile-info { z-index: 2; }
.profile-info h2 { margin: 0 0 8px 0; font-size: 28px; font-weight: 700; letter-spacing: 0.5px; text-shadow: 0 2px 4px rgba(0,0,0,0.2); text-transform: uppercase; }
.profile-meta { display: flex; gap: 12px; flex-wrap: wrap; }

.meta-item { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: rgba(255,255,255,0.15); 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 13px; 
    font-weight: 500; 
    backdrop-filter: blur(5px); 
    border: 1px solid rgba(255,255,255,0.1); 
}
.meta-item svg { 
    width: 16px !important; 
    height: 16px !important; 
    flex-shrink: 0; 
    display: block !important;
}
.meta-highlight { background: rgba(217, 119, 6, 0.2) !important; border-color: rgba(217, 119, 6, 0.4) !important; }

/* Grid Components */
.core-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.core-card, .result-card { flex: 1; min-width: 130px; background: var(--card-bg); padding: 20px 10px; border-radius: 12px; text-align: center; border: 1px solid var(--border-line); box-shadow: 0 4px 15px rgba(0,0,0,0.02); position: relative; overflow: hidden; }
.core-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--primary-light); }
.core-card.highlight::before { background: var(--accent-gold); }
.core-card h4 { margin: 0; font-size: 11px; color: var(--text-light); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; line-height: 1.4; }
.core-card .value { font-size: 36px; font-weight: 700; color: var(--primary-dark); margin: 8px 0; line-height: 1; }
.core-card .subtitle { font-size: 11px; font-weight: 600; color: var(--accent-gold); text-transform: uppercase; }

.loshu-matrix { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 8px; background: linear-gradient(135deg, var(--border-line) 0%, #d8b4fe 100%); padding: 8px; border-radius: 12px; margin: 20px auto; width: 220px; height: 220px; }
.matrix-cell { background: var(--cell-bg); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: var(--primary-dark); position: relative; border-radius: 6px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.02); }
.matrix-cell small { position: absolute; top: 4px; left: 6px; font-size: 10px; color: #a78bfa; font-weight: normal; font-family: 'Inter', sans-serif; }

/* Alerts & Status */
.icon-box { background: var(--cell-bg); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-line); color: var(--primary); flex-shrink: 0; }
.icon-box svg { width: 18px; height: 18px; }
.badge { display: inline-flex; align-items: center; justify-content: center; background: var(--primary-light); color: #fff; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 13px; }

.alert-box { padding: 15px 20px; border-radius: 8px; font-size: 14px; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; border: 1px solid transparent; line-height: 1.6; }
.alert-box.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-box.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-box.danger { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.alert-box svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }

.health-score-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #faf5ff; border: 1px solid #e9d8f4; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(107, 33, 168, 0.03); }
.score-circle { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; font-family: 'Poppins', sans-serif; border: 5px solid #e2e8f0; flex-shrink: 0; background: #fff; transition: 0.5s ease-in-out; }
.score-circle.excellent { border-color: var(--highlight-green); color: var(--highlight-green); }
.score-circle.good { border-color: var(--accent-gold); color: var(--accent-gold); }
.score-circle.poor { border-color: var(--highlight-red); color: var(--highlight-red); }
.score-details h4 { margin: 0 0 5px 0; font-size: 16px; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; }
.score-details p { margin: 0; font-size: 13px; color: var(--text-light); line-height: 1.5; }
.status-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px dashed var(--border-line); margin-bottom: 20px; }
.status-header h3 { margin: 0; font-size: 20px; color: var(--primary-dark); }
.dob-info { background: var(--cell-bg); padding: 8px 15px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--primary); border: 1px solid var(--border-line); }

/* Components (Yogas, Missing Numbers, Elements) */
.yoga-box { background: #fffbeb; padding: 15px; border-radius: 10px; border: 1px solid #fde68a; margin-top: 10px; text-align: left; width: 100%; }
.yoga-box h4 { margin: 0 0 8px 0; color: #b45309; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.yoga-box ul { margin: 0; padding-left: 20px; font-size: 13px; color: #78350f; line-height: 1.6; }

.missing-box-inner { background: #fff1f2; padding: 18px; border-radius: 12px; border: 1px solid #fecdd3; margin-top: auto; text-align: left; width: 100%; }
.missing-box-inner h4 { margin: 0 0 10px 0; color: #be123c; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.missing-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.missing-pill { background: #fff; border: 1px solid #fda4af; color: #be123c; padding: 4px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }

.complete-chart-box { background: #f0fdf4; padding: 18px; border-radius: 12px; border: 1px solid #bbf7d0; margin-top: auto; text-align: left; width: 100%; }
.complete-chart-box h4 { margin: 0; color: #15803d; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }

.elements-list { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }
.element-row { display: flex; align-items: center; padding: 15px 20px; border-radius: 12px; border: 1px solid var(--border-line); background: #fff; gap: 20px; }
.element-row.positive { background: #f0fdf4; border-color: #bbf7d0; }
.element-row.neutral { background: #f8fafc; border-color: #e2e8f0; }
.element-row.caution { background: #fff1f2; border-color: #fecdd3; }
.element-header { width: 160px; flex-shrink: 0; }
.element-header h4 { margin: 0; font-family: 'Poppins', sans-serif; font-size: 14px; white-space: nowrap; }
.element-row.positive h4 { color: var(--highlight-green); }
.element-row.neutral h4 { color: #475569; }
.element-row.caution h4 { color: var(--highlight-red); }
.element-content { display: flex; flex-wrap: wrap; gap: 20px; flex: 1; align-items: center; }
.element-item { display: flex; align-items: center; gap: 8px; }
.element-item .label { font-weight: 600; color: var(--text-light); font-size: 13px; }

.value-container { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }
.number-text { font-weight: 700; font-size: 15px; line-height: 1; }
.color-swatch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-dark); background: #fff; padding: 4px 10px; border-radius: 20px; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.02); white-space: nowrap; }
.color-circle { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0; }
#res-neutral-col span { display: inline-flex; background: #fff; padding: 4px 10px; border-radius: 20px; border: 1px solid #e2e8f0; font-size: 12px; font-weight: 500; color: var(--text-light); text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.02); white-space: nowrap; }

.spiritual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.spiritual-box { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--cell-bg); border: 1px solid var(--border-line); border-radius: 8px; transition: 0.3s; }
.spiritual-icon { color: var(--primary); background: #fff; min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 0 2px 6px rgba(107, 33, 168, 0.06); }
.spiritual-icon svg { width: 18px; height: 18px; }
.spiritual-text strong { display: block; color: var(--primary-dark); font-size: 13px; margin-bottom: 2px; }
.spiritual-text span { font-size: 12px; color: var(--text-light); line-height: 1.2; display: block; }

.name-breakdown { display: flex; flex-wrap: wrap; gap: 6px; margin: 15px 0; min-height: 52px; justify-content: center; }
.name-char-box { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-line); border-radius: 6px; width: 40px; text-align: center; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.name-char { background: var(--primary); color: white; padding: 6px 0; font-weight: 600; font-size: 14px; font-family: 'Poppins', sans-serif; }
.name-val { padding: 4px 0; font-size: 13px; color: var(--text-dark); font-weight: 600; background: var(--cell-bg); }
.name-total-box { margin-top: 15px; padding: 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; font-size: 14px; color: #92400e; text-align: center; }

.forecast-wrapper { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.forecast-box { background: var(--card-bg); border: 1px solid var(--border-line); border-radius: 10px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.forecast-box.current-year { background: var(--cell-bg); border-color: var(--primary-light); box-shadow: 0 4px 15px rgba(107, 33, 168, 0.04); }
.forecast-box h4 { margin: 0 0 10px 0; font-size: 16px; color: var(--text-dark); display: flex; align-items: center; flex-wrap: wrap; }
.year-highlight { font-size: 16px; color: var(--primary-dark); font-weight: 700; margin: 0 5px; }
.theme-highlight { color: var(--accent-gold); margin-left: auto; font-size: 15px; font-weight: 600; }
.forecast-box.current-year .theme-highlight { color: var(--primary); font-size: 16px; }
.forecast-box p { margin: 0; color: var(--text-light); font-size: 14px; line-height: 1.7; text-align: justify; }

.remedies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; margin-top: 15px; }
.remedy-card { background: var(--cell-bg); border: 1px solid var(--border-line); border-radius: 10px; padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.remedy-header { display: flex; align-items: center; gap: 10px; border-bottom: 1px dashed rgba(107,33,168,0.15); padding-bottom: 8px; }
.remedy-planet { font-size: 13px; color: var(--text-light); font-weight: 600; text-transform: uppercase; }
.remedy-controls { font-size: 13px; color: var(--primary-dark); font-weight: 600; }
.remedy-action { font-size: 13px; color: var(--text-dark); line-height: 1.6; }

.trait-list { margin: 0; padding-left: 20px; color: var(--text-dark); }
.trait-list li { margin-bottom: 10px; font-size: 14px; line-height: 1.6; text-align: justify; }
.rules-list { list-style: none; padding: 0; margin: 0; }
.rules-list li { display: flex; align-items: flex-start; gap: 15px; padding: 15px; border-bottom: 1px dashed var(--border-line); font-size: 14px; color: var(--text-dark); line-height: 1.6; }
.rules-list li:last-child { border-bottom: none; }
.rules-list li svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }

.chaldean-reference-chart { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; background: var(--cell-bg); padding: 12px; border-radius: 10px; border: 1px dashed var(--border-line); justify-content: center; }
.chaldean-col { display: flex; flex-direction: column; align-items: center; background: #fff; border: 1px solid var(--border-line); border-radius: 6px; padding: 4px 8px; min-width: 50px; }
.chaldean-num { font-weight: 700; color: var(--primary); font-size: 14px; border-bottom: 1px solid #eee; width: 100%; text-align: center; padding-bottom: 2px; margin-bottom: 2px; }
.chaldean-chars { font-size: 11px; color: var(--text-light); font-weight: 600; white-space: nowrap; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.tool-card { background: var(--card-bg); border: 1px solid var(--border-line); border-radius: 20px; padding: 40px 30px; text-align: center; transition: 0.3s; box-shadow: 0 10px 30px rgba(107, 33, 168, 0.04); position: relative; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; align-items: center; }
.tool-card:hover { transform: translateY(-10px); border-color: var(--primary-light); box-shadow: 0 20px 40px rgba(107, 33, 168, 0.1); }
.tool-icon-wrapper { width: 80px; height: 80px; background: var(--cell-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 25px; border: 1px solid var(--border-line); transition: 0.3s; }
.tool-icon-wrapper svg { width: 36px; height: 36px; }
.tool-card:hover .tool-icon-wrapper { background: var(--primary); color: #fff; border-color: var(--primary); }
.tool-card h3 { margin: 0 0 15px 0; color: var(--primary-dark); font-size: 22px; }
.tool-card p { color: var(--text-light); font-size: 14px; margin: 0 0 25px 0; line-height: 1.7; flex: 1; }
.tool-link { font-weight: 600; color: var(--primary-light); display: flex; align-items: center; gap: 5px; font-size: 14px; font-family: 'Poppins', sans-serif; }
.tool-card:hover .tool-link { color: var(--primary); }
.badge-soon { position: absolute; top: 20px; right: -35px; background: var(--accent-gold); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 5px 40px; transform: rotate(45deg); font-family: 'Poppins', sans-serif; letter-spacing: 1px; }

/* ==============================================================
   MOBILE RESPONSIVENESS & SLIDE-DOWN DRAWER
============================================================== */
@media (max-width: 900px) {
    .bg-pattern { top: 70px; left: -5vw; width: 100vw; height: 100vw; opacity: 0.3; }
    
    .top-navbar { 
        padding: 14px 20px !important; 
        position: relative; 
    }
    
    .mobile-toggle-btn { 
        display: block; 
    }

    /* Mobile Navigation Drawer */
    .nav-links { 
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-dark);
        border-bottom: 3px solid var(--accent-gold);
        flex-direction: column;
        align-items: stretch;
        padding: 15px 20px 25px 20px;
        gap: 8px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }
    
    .nav-links.open { 
        display: flex; 
    }

    .nav-links a { 
        width: 100%;
        height: 44px;
        justify-content: flex-start;
        padding: 0 16px;
        border-radius: 8px;
        font-size: 14px;
    }

    .dropdown { 
        width: 100%; 
        height: auto; 
        flex-direction: column; 
        align-items: stretch; 
    }

    .dropdown-trigger { 
        width: 100%; 
        justify-content: space-between !important; 
    }

    .dropdown-content { 
        position: static !important; 
        transform: none !important; 
        box-shadow: none !important; 
        border: none !important; 
        background: rgba(255, 255, 255, 0.05) !important; 
        width: 100% !important; 
        padding: 4px 0 !important; 
        margin-top: 4px;
        border-radius: 8px !important;
        display: none !important;
    }

    /* Expand dropdown on tap in mobile */
    .dropdown.expanded .dropdown-content {
        display: flex !important;
    }

    .dropdown-content a { 
        padding-left: 28px !important; 
        font-size: 13px !important;
    }

    .hero-layout { grid-template-columns: 1fr; gap: 30px; margin: 15px auto; }
    .hero-text { text-align: center; }
    .hero-text h2 { font-size: 28px; }
    .health-score-card { flex-direction: column; text-align: center; gap: 15px; padding: 20px; }
    .analysis-layout, .responsive-grid, .dual-col, .workbench-grid { grid-template-columns: 1fr; gap: 20px; }
    .core-grid { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
    .core-card.highlight { grid-column: 1 / -1; }
    .profile-hero { flex-direction: column; text-align: center; padding: 25px 15px; }
    .profile-meta { justify-content: center; }
    .element-row { flex-direction: column; align-items: flex-start; gap: 12px; padding: 15px; }
    .element-header { width: auto; }
}

/* Print Styles */
@media print {
    body { background: #fff; color: #000; }
    header, footer, .top-navbar, .hero-layout, .report-controls { display: none !important; }
    #report-output, #workspace-area { display: block !important; margin: 0; max-width: 100%; padding: 0; }
    .content-panel, .content-card, .chart-panel, .core-card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
    .bg-pattern, .profile-hero::after { display: none; }
    .profile-hero { background: none; color: #000; box-shadow: none; padding: 0; margin-bottom: 20px; align-items: flex-start; border: none; }
    .profile-avatar { border: 2px solid #000; color: #000; background: #fff; }
    .profile-info h2 { color: #000; text-shadow: none; }
    .meta-item { color: #000; border: 1px solid #ccc; background: transparent; }
    .meta-item strong { color: #000; }
    .forecast-box, .remedy-card { page-break-inside: avoid; border: 1px solid #ccc; }
}