:root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --primary-blue-light: #60a5fa;
    --sky-blue: #0ea5e9;
    --sky-blue-light: #e0f2fe;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-red: #ef4444;
    --india-orange: #f97316;
    --india-green: #16a34a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--sky-blue-light) 0%, #ffffff 100%);
    color: var(--gray-800);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}
.calculator-container { max-width: 1200px; margin: 0 auto; background: white; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); overflow: hidden; }

/* ── HEADER ── */
.calculator-header { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--sky-blue) 100%); color: white; padding: 36px 30px 28px; text-align: center; }
.calculator-header h1 { font-size: 2.2rem; margin-bottom: 8px; font-weight: 700; }
.calculator-header p { font-size: 1rem; opacity: 0.9; margin-bottom: 24px; }

/* ── COUNTRY SWITCHER ── */
.country-switcher { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.3); border-radius: 40px; padding: 6px 8px 6px 16px; backdrop-filter: blur(8px); }
.country-switcher label { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.85); letter-spacing: 0.3px; white-space: nowrap; }
.country-select-wrap { position: relative; }
.country-select { appearance: none; background: white; color: var(--gray-900); border: none; border-radius: 24px; padding: 8px 36px 8px 14px; font-size: 0.9rem; font-weight: 700; cursor: pointer; outline: none; min-width: 160px; font-family: inherit; }
.country-select-wrap::after { content: '▾'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.8rem; color: var(--gray-500); pointer-events: none; }

/* ── COUNTRY BANNER ── */
.country-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 20px; font-size: 0.82rem; font-weight: 600; border-bottom: 1px solid var(--gray-200); }
.country-banner.us { background: #eff6ff; color: #1d4ed8; }
.country-banner.india { background: #fff7ed; color: #c2410c; }

/* ── TABS ── */
.tabs { display: flex; background: var(--gray-100); border-bottom: 2px solid var(--gray-200); }
.tab-button { flex: 1; padding: 16px 18px; background: none; border: none; cursor: pointer; font-size: 0.95rem; font-weight: 600; color: var(--gray-700); transition: all 0.2s; white-space: nowrap; position: relative; min-width: 160px; font-family: inherit; }
.tab-button:hover { background: var(--gray-200); }
.tab-button.active { color: var(--primary-blue); background: white; }
.tab-button.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--primary-blue); }
.tab-button.india-active { color: var(--india-orange) !important; }
.tab-button.india-active::after { background: var(--india-orange) !important; }

/* ── TAB CONTENT ── */
.tab-content { display: none; padding: 36px 30px; animation: fadeIn 0.25s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── MAIN LAYOUT ── */
.calc-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }

/* ── SECTION ── */
.section-title { font-size: 1.3rem; color: var(--gray-900); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-blue); display: flex; align-items: center; gap: 10px; }
.section-title.india-line { border-color: var(--india-orange); }
.sub-section { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.sub-section::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.sub-section:first-child { margin-top: 0; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.triple { grid-template-columns: 1fr 1fr 1fr; }
.form-row.single { grid-template-columns: 1fr; }
label { display: block; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; font-size: 0.88rem; }
.label-tip { display: flex; align-items: center; gap: 6px; }
.tip-icon { width: 16px; height: 16px; background: var(--primary-blue-light); color: white; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; cursor: help; flex-shrink: 0; }
.hint-text { font-size: 0.72rem; color: var(--gray-500); margin-top: 3px; display: block; }
input[type="number"], select { width: 100%; padding: 10px 13px; border: 2px solid var(--gray-300); border-radius: 8px; font-size: 0.92rem; background: white; color: var(--gray-900); font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
input:focus, select:focus { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.input-wrap { position: relative; }
.prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-500); font-weight: 600; font-size: 0.92rem; pointer-events: none; }
.input-wrap input { padding-left: 26px; }

/* ── REGIME TOGGLE ── */
.regime-toggle { display: flex; background: var(--gray-100); border: 1.5px solid var(--gray-300); border-radius: 8px; padding: 3px; gap: 3px; margin-bottom: 14px; }
.regime-btn { flex: 1; padding: 9px; border: none; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; background: none; color: var(--gray-600); transition: all 0.2s; font-family: inherit; }
.regime-btn.active { background: var(--gray-900); color: white; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }

/* ── CALLOUT ── */
.callout { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 0.85rem; line-height: 1.6; }
.callout.blue { background: #dbeafe; border-left: 3px solid var(--primary-blue); color: #1e40af; }
.callout.orange { background: #fff7ed; border-left: 3px solid var(--india-orange); color: #9a3412; }
.callout.green { background: #d1fae5; border-left: 3px solid var(--success-green); color: #065f46; }
.callout.yellow { background: #fef3c7; border-left: 3px solid var(--warning-yellow); color: #92400e; }
.callout strong { font-weight: 700; }

/* ── CALC BUTTON ── */
.calc-btn { width: 100%; padding: 13px 20px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.calc-btn.blue { background: var(--primary-blue); color: white; }
.calc-btn.blue:hover { background: var(--primary-blue-dark); transform: translateY(-1px); }
.calc-btn.orange { background: var(--india-orange); color: white; }
.calc-btn.orange:hover { background: #ea6c00; transform: translateY(-1px); }

/* ── RESULTS SIDEBAR ── */
.results-sidebar { position: sticky; top: 20px; }
.result-panel { background: var(--gray-900); color: white; border-radius: 14px; overflow: hidden; }
.result-panel-header { padding: 22px 22px 16px; }
.result-panel-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.result-big { font-size: 1.9rem; font-weight: 700; letter-spacing: -1px; margin-bottom: 6px; }
.result-big.blue-val { color: #60a5fa; }
.result-big.orange-val { color: #fb923c; }
.result-regime-tag { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 2px 10px; border-radius: 10px; margin-bottom: 0; }
.result-regime-tag.blue { background: rgba(96,165,250,0.15); color: #93c5fd; border: 1px solid rgba(96,165,250,0.2); }
.result-regime-tag.orange { background: rgba(251,146,60,0.15); color: #fdba74; border: 1px solid rgba(251,146,60,0.2); }

.result-rows { padding: 0 22px 16px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 12px; padding-top: 14px; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.8rem; }
.result-row:last-child { border-bottom: none; }
.result-row .rl { color: rgba(255,255,255,0.5); }
.result-row .rv { font-size: 0.83rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-row.total-row { padding-top: 12px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,0.15); }
.result-row.total-row .rl { color: white; font-weight: 700; }
.result-row.total-row .rv { font-size: 0.95rem; }

.eff-rate-block { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid rgba(255,255,255,0.08); }
.ring-svg { flex-shrink: 0; }
.eff-lbl { font-size: 0.68rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.eff-num { font-size: 1.3rem; font-weight: 700; color: #fbbf24; }
.eff-sub { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-top: 1px; }

/* Slab bars */
.slab-bars { padding: 14px 22px; border-top: 1px solid rgba(255,255,255,0.08); }
.sbar-title { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,0.3); margin-bottom: 10px; }
.sbar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 0.7rem; }
.sbar-lbl { width: 56px; color: rgba(255,255,255,0.45); flex-shrink: 0; }
.sbar-outer { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.sbar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.sbar-amt { width: 65px; text-align: right; color: rgba(255,255,255,0.5); font-size: 0.68rem; }

/* Compare panel (India) */
.compare-panel { background: white; border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; margin-top: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.compare-panel-hdr { padding: 14px 18px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); font-size: 0.85rem; font-weight: 700; color: var(--gray-800); }
.compare-row-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--gray-100); gap: 10px; }
.compare-row-item:last-of-type { border-bottom: none; }
.creg-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); }
.creg-sub { font-size: 0.72rem; color: var(--gray-500); }
.creg-amt { font-size: 0.88rem; font-weight: 700; color: var(--gray-900); }
.creg-badge { font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 8px; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
.creg-badge.better { background: #d1fae5; color: #065f46; }
.creg-badge.worse { background: #fee2e2; color: #991b1b; }
.creg-badge.same { background: var(--gray-100); color: var(--gray-500); }
.recommend-row { padding: 12px 18px; background: #f0fdf4; font-size: 0.8rem; color: #166534; font-weight: 500; line-height: 1.5; }

/* ── BREAKDOWN TAB ── */
.breakdown-tbl { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.breakdown-tbl th { background: var(--gray-100); padding: 10px 14px; text-align: left; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); }
.breakdown-tbl td { padding: 10px 14px; border-bottom: 1px solid var(--gray-200); color: var(--gray-700); }
.breakdown-tbl td.mono { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gray-900); text-align: right; }
.breakdown-tbl tr:last-child td { border-bottom: none; }
.breakdown-tbl tr:hover td { background: var(--gray-50); }
.breakdown-tbl .green-val { color: var(--india-green); }
.breakdown-tbl .total-row td { font-weight: 700; background: var(--gray-100); font-size: 0.9rem; }

/* ── SEO CONTENT ── */
.seo-section { padding: 40px 30px; background: var(--gray-50); border-top: 2px solid var(--gray-200); }
.seo-section h2 { font-size: 1.5rem; color: var(--gray-900); margin-bottom: 10px; font-weight: 700; }
.seo-section h3 { font-size: 1rem; color: var(--gray-800); margin: 22px 0 8px; font-weight: 700; }
.seo-section p { font-size: 0.88rem; color: var(--gray-600); line-height: 1.8; margin-bottom: 10px; }
.seo-section ul { padding-left: 18px; margin-bottom: 12px; }
.seo-section li { font-size: 0.88rem; color: var(--gray-600); line-height: 1.75; margin-bottom: 4px; }
.seo-section li strong { color: var(--gray-800); }
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.seo-card { background: white; border: 1px solid var(--gray-200); border-radius: 12px; padding: 22px; }
.seo-card h3 { margin-top: 0; font-size: 0.95rem; border-bottom: 1px solid var(--gray-200); padding-bottom: 10px; margin-bottom: 12px; }
.slab-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-top: 8px; }
.slab-table th { background: var(--gray-100); padding: 8px 12px; text-align: left; font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); }
.slab-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-200); color: var(--gray-700); }
.slab-table tr:last-child td { border-bottom: none; }
.slab-table .zero-row td { color: var(--india-green); font-weight: 600; }
.slab-table .mono { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gray-900); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { background: white; border: 1px solid var(--gray-300); color: var(--gray-700); font-size: 0.75rem; padding: 5px 12px; border-radius: 16px; font-weight: 500; }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-q { padding: 15px 0; font-weight: 600; font-size: 0.88rem; cursor: pointer; display: flex; justify-content: space-between; color: var(--gray-800); user-select: none; }
.faq-q .arr { color: var(--primary-blue); transition: transform 0.2s; }
.faq-item.open .arr { transform: rotate(45deg); }
.faq-a { display: none; padding-bottom: 14px; font-size: 0.85rem; color: var(--gray-600); line-height: 1.8; }
.faq-item.open .faq-a { display: block; }



/* ── UTILITY ── */
@media (max-width: 900px) {
    body { padding: 10px; }
    .calc-layout { grid-template-columns: 1fr; }
    .results-sidebar { position: static; }
    .form-row, .form-row.triple { grid-template-columns: 1fr; }
    .calculator-header h1 { font-size: 1.6rem; }
    .tabs { flex-direction: column; }
    .seo-grid { grid-template-columns: 1fr; }
    .tab-content { padding: 22px 16px; }
}