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

html {
    -webkit-text-size-adjust: 100%; /* Prevents iOS text size adjustment */
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
}

@media (max-width: 360px) {
    body {
        padding: 0;
    }
    
    .container {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

.container {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 1.5px 8px rgba(0,0,0,0.04), 0 8px 32px rgba(110,90,66,0.06);
    max-width: 520px;
    width: 100%;
    padding: 40px 36px 32px 36px;
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 30px 24px 24px 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
        border-radius: 8px;
    }
}

.header {
    margin-bottom: 38px;
    text-align: center;
    border-bottom: 1.5px solid #f3f3f3;
    padding-bottom: 20px;
    position: relative;
}

.header-icon {
    width: 40px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.header h1 {
    font-size: 1.7rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.3rem;
        letter-spacing: -0.2px;
    }
}

.header h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #292929;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .header h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header h2 {
        font-size: 1rem;
    }
}

.subtitle {
    font-size: 15px;
    color: #666;
    font-weight: 400;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 13px;
    }
}

.kundli-form {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-top: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1.2px solid #d1d1d1;
    border-radius: 7px;
    font-size: 15px;
    font-family: inherit;
    background-color: white;
    color: #1a1a1a;
    transition: border-color 0.15s ease;
}

.form-group select {
    width: 100%;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group input:hover,
.form-group select:hover { border-color: #aaa; }
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a1a1a;
}
.form-group input::placeholder { color: #bbb; }

.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-dropdown > input {
    width: 100%;
}

#dropdownList {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1.2px solid #d1d1d1;
    border-radius: 7px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#dropdownList.hidden {
    display: none;
}

.dropdown-item {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 15px;
    color: #1a1a1a;
    transition: background-color 0.1s ease;
    border-bottom: 1px solid #f3f3f3;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
    .dropdown-item {
        padding: 14px 12px;
        font-size: 16px;
        min-height: 44px; /* Better touch target */
        display: flex;
        align-items: center;
    }
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item:active {
    background-color: #e8e8e8;
}

.dropdown-item.loading-item,
.dropdown-item.error-item {
    cursor: default;
}

.dropdown-item.loading-item:hover,
.dropdown-item.error-item:hover {
    background-color: transparent;
}

.dropdown-item.loading-item {
    color: #666;
    font-style: italic;
}

.dropdown-item.error-item {
    color: #d32f2f;
}

.submit-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 13px 0;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s, box-shadow 0.12s;
    margin-top: 8px;
    letter-spacing: 0.02em;
    width: 100%;
    box-shadow: 0 2px 9px rgba(30,30,30,0.09);
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* Better touch target for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover { background: #333; }
.submit-btn:active { background: #000; }

.loading {
    text-align: center;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.loading.hidden { display: none; }

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e5e5;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading p {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

.result {
    margin-top: 34px;
    padding: 21px 19px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 9px rgba(110,90,66,0.04);
}
.result.hidden { display: none; }

.result h2 {
    font-size: 17px;
    color: #1a1a1a;
    margin-bottom: 11px;
    font-weight: 500;
}
.result-content {
    color: #333;
    line-height: 1.7;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.result-content p { margin-bottom: 8px; }
.result-content strong { font-weight: 500; color: #1a1a1a; }
.result-content table { margin: 15px 0; }
.result-content table tr:hover { background-color: #f9f9f9; }
.result-content table th, 
.result-content table td { 
    border: 1px solid #e5e5e5;
}

.article-view {
    display: none;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    background: #fff;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

.article-view.active {
    display: block;
}

.article-view.hidden {
    display: none;
}

/* Hide main container when article is shown */
body:has(.article-view.active) #mainContainer {
    display: none;
}

body:has(.article-view.active) {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    width: 100%;
}

body:has(.article-view.active) .container {
    display: none;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
    font-family: 'Charter', 'Crimson Text', Georgia, serif; /* Serif for article/report */
    line-height: 1.82;
    color: #201e1d;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .article-content {
        padding: 120px 20px 80px 20px;
        padding-top: calc(120px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 110px 16px 100px 16px;
        padding-top: calc(110px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
        line-height: 1.7;
    }
}


.article-header {
    text-align: center;
    padding: 0 0 50px 0;
    border-bottom: 3px solid #1a1a1a;
}

@media (max-width: 768px) {
    .article-header {
        padding: 0 0 35px 0;
        border-bottom-width: 2px;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 0 0 25px 0;
        border-bottom-width: 2px;
    }
}

.article-header h1 {
    font-size: 52px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 36px;
        letter-spacing: -0.5px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 28px;
        letter-spacing: -0.3px;
        margin-bottom: 12px;
    }
}

.article-meta {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.article-body {
    margin: 60px auto;
}

@media (max-width: 768px) {
    .article-body {
        margin: 40px auto;
    }
}

@media (max-width: 480px) {
    .article-body {
        margin: 30px auto;
    }
}

.article-intro {
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .article-intro {
        margin-bottom: 35px;
    }
}

@media (max-width: 480px) {
    .article-intro {
        margin-bottom: 28px;
    }
}

.article-intro p {
    font-size: 21px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #2c2c2c;
}

@media (max-width: 768px) {
    .article-intro p {
        font-size: 18px;
        line-height: 1.75;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .article-intro p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 14px;
    }
}

.birth-details-box {
    font-family: 'Inter', sans-serif;
    background: #f9f9f9;
    padding: 30px;
    border-left: 4px solid #1a1a1a;
    margin: 40px 0;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .birth-details-box {
        padding: 20px;
        margin: 30px 0;
    }
}

@media (max-width: 480px) {
    .birth-details-box {
        padding: 16px 14px;
        margin: 24px 0;
        border-left-width: 3px;
    }
}

.birth-details-box h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #666;
    font-weight: 600;
}

.birth-details-box p {
    font-size: 17px;
    line-height: 1.6;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .birth-details-box p {
        font-size: 15px;
        margin: 8px 0;
    }
}

@media (max-width: 480px) {
    .birth-details-box p {
        font-size: 14px;
        line-height: 1.5;
        margin: 6px 0;
    }
}

.planets-section {
    margin: 50px 0;
}

@media (max-width: 768px) {
    .planets-section {
        margin: 40px 0;
    }
}

@media (max-width: 480px) {
    .planets-section {
        margin: 30px 0;
    }
}

.planets-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.5px;
}

@media (max-width: 768px) {
    .planets-section h2 {
        font-size: 26px;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .planets-section h2 {
        font-size: 22px;
        margin-bottom: 20px;
        letter-spacing: -0.3px;
    }
}

.planets-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.planets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.planets-table thead {
    background: #1a1a1a;
    color: white;
}

.planets-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #1a1a1a;
}

@media (max-width: 768px) {
    .planets-table th {
        padding: 12px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .planets-table th {
        padding: 10px 8px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }
}

.planets-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
}

@media (max-width: 768px) {
    .planets-table td {
        padding: 12px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .planets-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

.planets-table tbody tr:hover {
    background-color: #f9f9f9;
}

.planets-table tbody tr:last-child td {
    border-bottom: none;
}

.planet-name {
    font-size: 16px;
}

@media (max-width: 768px) {
    .planet-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .planet-name {
        font-size: 14px;
    }
}

.planets-table th:nth-child(1),
.planets-table td:nth-child(1) {
    width: 25%;
}

.planets-table th:nth-child(2),
.planets-table td:nth-child(2) {
    width: 30%;
}

.planets-table th:nth-child(3),
.planets-table td:nth-child(3) {
    width: 20%;
    text-align: center;
}

.planets-table th:nth-child(4),
.planets-table td:nth-child(4) {
    width: 25%;
    text-align: center;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 2px solid #e5e5e5;
    text-align: center;
    color: #999;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .article-footer {
        margin-top: 60px;
        padding-top: 30px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .article-footer {
        margin-top: 40px;
        padding-top: 24px;
        font-size: 11px;
    }
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    z-index: 1000;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* Better touch target for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .back-button {
        top: calc(15px + env(safe-area-inset-top, 0px));
        left: 15px;
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .back-button {
        top: calc(10px + env(safe-area-inset-top, 0px));
        left: 10px;
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 4px;
        min-height: 44px;
    }
}

.back-button:hover {
    background: #333;
}

/* Responsive Design - Enhanced */
@media (max-width: 768px) {
    .kundli-form {
        gap: 22px;
    }
    
    .form-group input {
        padding: 11px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        font-size: 14px;
        padding: 12px 0;
    }
}

@media (max-width: 640px) {
    .container { 
        padding: 24px 16px; 
    }
    .header h1 { 
        font-size: 1.48rem; 
    }
    .header h2 { 
        font-size: 1.06rem; 
    }
    .subtitle { 
        font-size: 13px; 
    }
    .kundli-form { 
        gap: 20px; 
    }
    .submit-btn { 
        font-size: 14px; 
        padding: 12px 0; 
    }
}

@media (max-width: 480px) {
    .kundli-form {
        gap: 18px;
        margin-top: 20px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        font-size: 14px;
        padding: 11px 0;
    }
    
    .result {
        margin-top: 24px;
        padding: 16px 14px;
    }
    
    .result h2 {
        font-size: 16px;
    }
    
    .result-content {
        font-size: 13px;
        line-height: 1.6;
    }
}
/* Improved House Analysis Card */
.ascendant-lord-section {
    background: #f6faff;
    box-shadow: 0 2px 10px rgba(30,60,130,0.07), 0 6px 22px rgba(108,130,170,0.10);
    border-radius: 18px;
    border: 1.3px solid #e8eefa;
    margin-bottom: 38px;
    padding: 35px 30px 28px 30px;
    font-family: 'Inter', 'Crimson Text', serif;
    transition: box-shadow .16s;
}
@media (max-width:640px) {
    .ascendant-lord-section {
        padding: 22px 10px 18px 10px;
    }
}
.ascendant-lord-section h2 {
    font-size: 28px;
    color: #234183;
    margin-bottom: 19px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .ascendant-lord-section h2 {
        font-size: 24px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h2 {
        font-size: 20px;
        margin-bottom: 14px;
    }
}
.ascendant-lord-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #152b51;
    margin-top: 18px;
    margin-bottom: 13px;
}

@media (max-width: 768px) {
    .ascendant-lord-section h3 {
        font-size: 16px;
        margin-top: 16px;
        margin-bottom: 11px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h3 {
        font-size: 15px;
        margin-top: 14px;
        margin-bottom: 10px;
    }
}

.ascendant-lord-section p {
    color: #223;
    font-size: 16px;
    margin-bottom: 9px;
}

@media (max-width: 768px) {
    .ascendant-lord-section p {
        font-size: 15px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section p {
        font-size: 14px;
        margin-bottom: 7px;
        line-height: 1.7;
    }
}

.fundamental-note {
    border-left: 7px solid #fcbc38 !important;
    box-shadow: 0 1px 6px #ffeecc;
    background: #fff7e1 !important;
}
.fundamental-note p {
    font-size: 18px !important;
    color: #996915 !important;
    font-family: 'Inter', serif;
}

.summary-section {
    background: linear-gradient(108deg, #e7f3fb 44%, #fffbe8 100%);
    border: 1.7px solid #bad7fa;
    padding: 30px 24px 32px 22px;
    margin: 35px 0 44px 0;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(30,60,130,0.07), 0 6px 22px rgba(180,180,140,0.06);
}

@media (max-width: 768px) {
    .summary-section {
        padding: 24px 18px 26px 18px;
        margin: 28px 0 36px 0;
    }
}

@media (max-width: 480px) {
    .summary-section {
        padding: 20px 14px 22px 14px;
        margin: 24px 0 30px 0;
        border-radius: 12px;
    }
}

.summary-section h2 {
    color: #195fa3;
    font-size: 26px;
    margin-bottom: 13px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .summary-section h2 {
        font-size: 22px;
        margin-bottom: 11px;
    }
}

@media (max-width: 480px) {
    .summary-section h2 {
        font-size: 19px;
        margin-bottom: 10px;
    }
}

.summary-section p {
    color: #21374a;
    font-size: 17.5px;
    letter-spacing: .01em;
    line-height: 1.75;
}

@media (max-width: 768px) {
    .summary-section p {
        font-size: 16px;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .summary-section p {
        font-size: 14px;
        line-height: 1.65;
    }
}

.planets-section h2 {
    color: #395596;
    border-bottom: 1.5px solid #dae8f7;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.planets-table th, .planets-table td {
    font-size: 15px;
    letter-spacing: .03em;
}
.planets-table th {
    background: #e2e6f3 !important;
    color: #133864 !important;
}
.planets-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 .5px 6px #f2f4fa;
}
.planet-name {
    font-weight: 600;
    color: #3c3772;
}
.article-footer {
    background: #f4f6f9;
    color: #6b7b85;
    margin-top: 90px;
    font-size: 14.5px;
    padding: 30px 0 10px 0;
    border-radius: 4px;
    font-style: italic;
    border-top: 2.5px solid #f4e6bf;
}

@media (max-width: 768px) {
    .article-footer {
        margin-top: 60px;
        font-size: 13px;
        padding: 24px 0 8px 0;
    }
}

@media (max-width: 480px) {
    .article-footer {
        margin-top: 40px;
        font-size: 12px;
        padding: 20px 0 6px 0;
    }
}
.ascendant-lord-section {
    background: #f9f7f2;
    box-shadow: 0 1px 7px rgba(44,36,23,0.03), 0 8px 24px rgba(180,150,66,0.06);
    border-radius: 13px;
    border: 1.2px solid #e8e4d9;
    margin-bottom: 38px;
    padding: 32px 30px 26px 30px;
    font-family: 'Charter', 'Georgia', serif;
    transition: box-shadow .16s;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .ascendant-lord-section {
        padding: 24px 20px 20px 20px;
        margin-bottom: 30px;
    }
}

@media (max-width: 640px) {
    .ascendant-lord-section { 
        padding: 20px 14px 18px 14px; 
        margin-bottom: 28px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section {
        padding: 18px 12px 16px 12px;
        margin-bottom: 24px;
        border-radius: 10px;
    }
}

.ascendant-lord-section h2 {
    font-size: 26px;
    color: #201e1d;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.25px;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .ascendant-lord-section h2 {
        font-size: 22px;
        margin-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h2 {
        font-size: 19px;
        margin-bottom: 12px;
        letter-spacing: -0.2px;
    }
}

.ascendant-lord-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #4d3a25;
    margin-top: 17px;
    margin-bottom: 11px;
    letter-spacing: 0;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .ascendant-lord-section h3 {
        font-size: 16px;
        margin-top: 15px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section h3 {
        font-size: 15px;
        margin-top: 13px;
        margin-bottom: 9px;
    }
}

.ascendant-lord-section p {
    color: #20160f;
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.93;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .ascendant-lord-section p {
        font-size: 16px;
        margin-bottom: 11px;
        line-height: 1.85;
    }
}

@media (max-width: 480px) {
    .ascendant-lord-section p {
        font-size: 14px;
        margin-bottom: 10px;
        line-height: 1.8;
    }
}

/* Highlighted Classical Source Note */
.fundamental-note {
    border-left: 7px solid #d7b97b !important;
    background: #f9f6ed !important;
    padding: 20px 18px !important;
    margin: 20px 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}
.fundamental-note p {
    font-size: 17.5px !important;
    color: #7d5a23 !important;
    font-family: 'Merriweather', 'Charter', serif !important;
    font-style: italic;
    line-height: 1.55;
}

@media (max-width: 768px) {
    .fundamental-note p {
        font-size: 16px !important;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .fundamental-note {
        padding: 16px 14px !important;
    }
    .fundamental-note p {
        font-size: 14px !important;
        line-height: 1.45;
    }
}

/* Summary Card */
.summary-section {
    background: #f8f3ea;
    border: 1.5px solid #e8d4b0;
    padding: 27px 18px 30px 19px;
    margin: 32px 0 40px 0;
    border-radius: 12px;
    font-family: 'Charter', 'Georgia', serif;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .summary-section {
        padding: 22px 16px 26px 16px;
        margin: 28px 0 35px 0;
    }
}

@media (max-width: 480px) {
    .summary-section {
        padding: 18px 14px 22px 14px;
        margin: 24px 0 30px 0;
        border-radius: 10px;
    }
}

.summary-section h2 {
    color: #262220;
    font-size: 22.5px;
    margin-bottom: 10px;
    font-weight: 800;
    font-family: 'Charter', 'Georgia', serif;
}

@media (max-width: 768px) {
    .summary-section h2 {
        font-size: 20px;
        margin-bottom: 9px;
    }
}

@media (max-width: 480px) {
    .summary-section h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }
}

.summary-section p {
    color: #272016;
    font-size: 18px;
    letter-spacing: 0.01em;
    line-height: 1.98;
}

@media (max-width: 768px) {
    .summary-section p {
        font-size: 16px;
        line-height: 1.85;
    }
}

@media (max-width: 480px) {
    .summary-section p {
        font-size: 14px;
        line-height: 1.75;
    }
}

/* Section Titles */
.planets-section h2 {
    color: #222;
    border-bottom: 1px solid #e7dbbc;
    padding-bottom: 9px;
    margin-bottom: 16px;
    font-family: 'Charter', 'Georgia', serif;
    letter-spacing: -0.14px;
    font-size: 23px;
}

@media (max-width: 768px) {
    .planets-section h2 {
        font-size: 20px;
        padding-bottom: 8px;
        margin-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .planets-section h2 {
        font-size: 18px;
        padding-bottom: 7px;
        margin-bottom: 12px;
        letter-spacing: -0.1px;
    }
}

.planet-name {
    font-weight: 700;
    color: #242121;
    font-size: 18px;
}

@media (max-width: 768px) {
    .planet-name {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .planet-name {
        font-size: 15px;
    }
}

/* Tables remain modern sans for contrast */
.planets-table th, .planets-table td {
    font-size: 15px;
    letter-spacing: .03em;
}

@media (max-width: 768px) {
    .planets-table th, .planets-table td {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .planets-table th, .planets-table td {
        font-size: 12px;
        letter-spacing: .02em;
    }
}

/* Enhanced table responsiveness */
.planets-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

@media (max-width: 480px) {
    .planets-table-wrapper {
        margin: 16px 0;
        padding: 0;
    }
    
    .planets-table {
        min-width: 500px;
    }
}

/* Ensure table columns are properly sized on mobile */
@media (max-width: 480px) {
    .planets-table th:nth-child(1),
    .planets-table td:nth-child(1) {
        width: 28%;
        min-width: 80px;
    }
    
    .planets-table th:nth-child(2),
    .planets-table td:nth-child(2) {
        width: 32%;
        min-width: 100px;
    }
    
    .planets-table th:nth-child(3),
    .planets-table td:nth-child(3) {
        width: 20%;
        min-width: 60px;
    }
    
    .planets-table th:nth-child(4),
    .planets-table td:nth-child(4) {
        width: 20%;
        min-width: 70px;
        font-size: 11px;
    }
}

.article-footer {
    background: #f4f6f9;
    color: #6b7b85;
    margin-top: 90px;
    font-size: 14.5px;
    padding: 30px 0 10px 0;
    border-radius: 4px;
    font-style: italic;
    border-top: 2.5px solid #f4e6bf;
}

@media (max-width: 768px) {
    .article-footer {
        margin-top: 60px;
        font-size: 13px;
        padding: 24px 0 8px 0;
    }
}

@media (max-width: 480px) {
.article-footer {
    margin-top: 40px;
    font-size: 12px;
    padding: 20px 0 6px 0;
    }
}

.yoga-section {
    margin: 60px 0;
    padding: 36px 28px;
    border-radius: 16px;
    border: 1.2px solid #e8e2d3;
    background: linear-gradient(135deg, #faf7f1 0%, #fefefa 100%);
    box-shadow: 0 8px 24px rgba(34, 32, 25, 0.08);
}

.yoga-section h2 {
    font-family: 'Charter', 'Georgia', serif;
    font-size: 28px;
    margin-bottom: 24px;
    color: #2b2520;
    letter-spacing: -0.25px;
    text-align: center;
}

.yoga-section__subtitle {
    margin-top: 40px;
}

.yoga-category {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}

.yoga-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5dccb;
    padding: 22px 20px;
    box-shadow: 0 10px 24px rgba(120, 96, 60, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yoga-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(120, 96, 60, 0.12);
}

.yoga-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #2d2a26;
    letter-spacing: -0.1px;
}

.yoga-card p {
    font-size: 15px;
    line-height: 1.65;
    color: #443f39;
    margin-bottom: 8px;
}

.yoga-card--challenging {
    border: 1px solid #f0d9d5;
    background: #fff8f6;
    box-shadow: 0 10px 24px rgba(165, 66, 54, 0.08);
}

.yoga-card--challenging h3 {
    color: #7a2b24;
}

.yoga-card--challenging p {
    color: #5a3834;
}

@media (max-width: 768px) {
    .yoga-section {
        padding: 28px 18px;
        margin: 40px 0;
    }

    .yoga-section h2 {
        font-size: 24px;
    }

    .yoga-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .yoga-section {
        padding: 24px 14px;
    }

    .yoga-section h2 {
        font-size: 22px;
    }

    .yoga-card h3 {
        font-size: 18px;
    }

    .yoga-card p {
        font-size: 14px;
    }
}

.chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.chatbot-toggle {
    background: linear-gradient(135deg, #2a2a2a, #4a3d2c);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.chatbot-window {
    width: 320px;
    max-height: 480px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(22, 22, 26, 0.18);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0eae0;
}

.chatbot-window.hidden {
    display: none;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f3f0ea, #fff);
    border-bottom: 1px solid #e8ded1;
    border-radius: 18px 18px 0 0;
    font-weight: 600;
    color: #2f261b;
}

.chatbot-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 20px;
    cursor: pointer;
    color: #6b6155;
    transition: color 0.18s ease;
}

.chatbot-close:hover {
    color: #2f261b;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #faf7f1;
}

.chatbot-message {
    max-width: 90%;
    padding: 10px 14px;
    border-radius: 14px;
    line-height: 1.45;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(90, 70, 45, 0.08);
}

.chatbot-message.bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #eee2cf;
    color: #3a3126;
}

.chatbot-message.user {
    align-self: flex-end;
    background: #2f261b;
    color: #fff;
}

.chatbot-form {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid #e8ded1;
    background: #fefcf8;
    border-radius: 0 0 18px 18px;
}

.chatbot-form input {
    flex: 1;
    border: 1px solid #d8cdbf;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease;
}

.chatbot-form input:focus {
    border-color: #2f261b;
}

.chatbot-form button {
    background: #2f261b;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.18s ease;
}

.chatbot-form button:hover {
    background: #42372a;
}

@media (max-width: 480px) {
    .chatbot {
        right: 12px;
        bottom: 12px;
    }

    .chatbot-window {
        width: calc(100vw - 32px);
        max-height: 60vh;
    }
}

/* Mahadasha Highlighting Styles - Wall Street Journal Style */
.dasha-highlighted {
    border-left: 4px solid #1a1a1a !important;
    background: #fafafa !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04) !important;
    position: relative;
    border-top: 1px solid #e5e5e5 !important;
    border-right: 1px solid #e5e5e5 !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

.dasha-highlighted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1a1a1a;
}

.dasha-badge {
    display: inline-block;
    background: #1a1a1a;
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
    .dasha-badge {
        font-size: 11px;
        padding: 3px 10px;
        margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .dasha-badge {
        font-size: 10px;
        padding: 2px 8px;
        margin-left: 6px;
        display: block;
        margin-top: 8px;
        width: fit-content;
    }
    
    .dasha-highlighted h2 {
        font-size: 18px;
    }
}

/* Dasha Summary Section Responsive */
.dasha-summary-section {
    margin: 30px 0;
}

@media (max-width: 768px) {
    .dasha-summary-section {
        padding: 24px 16px !important;
    }
    
    .dasha-summary-section > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .dasha-summary-section h2 {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .dasha-summary-section {
        padding: 20px 12px !important;
        margin: 20px 0 !important;
    }
    
    .dasha-summary-section h2 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    .dasha-summary-section > div[style*="padding: 20px"] {
        padding: 15px !important;
    }
    
    .dasha-summary-section p {
        font-size: 13px !important;
    }
}
