/* CashCrafty — cashcrafty.com | Personal finance for India
   Design system v2: editorial fintech. Pure static CSS, no frameworks. */

:root {
  --emerald-900: #06402c;
  --emerald-700: #0b7a55;
  --emerald-600: #0e9268;
  --emerald-100: #e3f3ec;
  --emerald-50: #f2faf6;
  --amber-500: #f59e0b;
  --amber-100: #fdf0d7;
  --slate-900: #1e293b;
  --slate-600: #475569;
  --slate-500: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --red: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 60, 40, 0.08);
  --shadow-lg: 0 18px 44px rgba(15, 60, 40, 0.13);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate-900);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--emerald-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 60;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 16px;
}
.logo { display: inline-flex; align-items: center; font-family: var(--font-head); font-size: 1.45rem; font-weight: 800; color: var(--slate-900); letter-spacing: -0.5px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: #fff; font-size: 1.5rem; font-weight: 700; line-height: 1; margin-right: 9px;
  font-family: var(--font-body);
}
.logo-accent { color: var(--emerald-700); }
.main-nav { display: flex; gap: 6px; align-items: center; }
.main-nav a {
  color: var(--slate-900); font-weight: 600; font-size: 0.98rem;
  padding: 9px 15px; border-radius: 999px; white-space: nowrap;
}
.main-nav a:hover { color: var(--emerald-700); background: var(--emerald-50); text-decoration: none; }
.main-nav a.active { color: #fff; background: var(--emerald-700); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; font-size: 1.3rem; padding: 4px 12px; cursor: pointer; color: var(--slate-900);
}

/* ---------- Latest ticker ---------- */
.ticker {
  background: var(--slate-900); color: #fff;
  display: flex; align-items: stretch; overflow: hidden;
  font-size: 0.88rem;
}
.ticker-pill {
  background: var(--red); color: #fff; font-weight: 800; letter-spacing: 1.5px;
  font-size: 0.75rem; display: flex; align-items: center; padding: 0 18px;
  flex-shrink: 0; z-index: 2; font-family: var(--font-head);
}
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-items {
  display: inline-flex; gap: 56px; white-space: nowrap; padding-left: 24px;
  animation: ticker-scroll 45s linear infinite;
}
.ticker-track:hover .ticker-items { animation-play-state: paused; }
.ticker-items a { color: #e2e8f0; }
.ticker-items a:hover { color: #fff; }
.ticker-items span.dot { color: var(--amber-500); margin-right: 10px; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Ad slots (placeholders until AdSense code is pasted) ---------- */
.ad-slot {
  border: 1.5px dashed #c9c4b2;
  background: #f4f1e8;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #a09a83; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase;
  margin: 18px auto;
}
.ad-slot span { padding: 6px 0; }
.ad-leaderboard { max-width: 970px; min-height: 100px; }
.ad-rectangle { min-height: 280px; }
.ad-incontent { max-width: 720px; min-height: 120px; margin: 28px auto; }

/* ---------- Magazine hero (homepage) ---------- */
.mag-hero { padding: 34px 0 8px; }
.mag-hero-grid {
  display: grid; grid-template-columns: 1.9fr 1fr; gap: 26px; align-items: stretch;
}
.featured-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 420px; display: flex; align-items: flex-end;
  box-shadow: var(--shadow); background: var(--emerald-900);
}
.featured-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.featured-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,40,28,0) 30%, rgba(6,40,28,0.88) 100%);
}
.featured-body { position: relative; z-index: 2; padding: 30px 32px; }
.featured-body h2 {
  color: #fff; font-size: 1.9rem; margin: 12px 0 12px; letter-spacing: -0.5px; line-height: 1.25;
}
.featured-body h2 a { color: #fff; }
.featured-body h2 a:hover { text-decoration: underline; }
.featured-meta { color: #d7e5dd; font-size: 0.88rem; }
.cat-pill {
  display: inline-block; background: var(--amber-500); color: #3a2a05;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px; font-family: var(--font-head);
}
.trending-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 14px; box-shadow: var(--shadow);
}
.trending-box h3 {
  margin: 0 0 6px; font-size: 1.05rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--emerald-700); display: flex; align-items: center; gap: 8px;
}
.trending-list { list-style: none; margin: 0; padding: 0; }
.trending-list li {
  display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.trending-list li:last-child { border-bottom: none; }
.trend-num {
  font-family: var(--font-head); font-size: 1.7rem; font-weight: 800;
  color: #cbd5e1; line-height: 1; flex-shrink: 0; min-width: 40px;
}
.trend-body a { color: var(--slate-900); font-weight: 700; font-size: 0.98rem; line-height: 1.45; }
.trend-body a:hover { color: var(--emerald-700); }
.trend-meta { font-size: 0.8rem; color: var(--slate-500); margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 46px 0 8px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px; gap: 12px;
}
.section-head h2 { font-size: 1.65rem; letter-spacing: -0.5px; margin: 0; }
.section-head h2 .bar {
  display: inline-block; width: 8px; height: 22px; border-radius: 4px;
  background: var(--emerald-600); margin-right: 10px; vertical-align: -3px;
}
.view-all { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }

/* Horizontal cards (thumb left, text right) */
.hcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hcard {
  display: flex; gap: 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.hcard:hover .hcard-title a { color: var(--emerald-700); }
.hcard-thumb {
  width: 132px; height: 96px; border-radius: var(--radius-sm); object-fit: cover;
  flex-shrink: 0; background: var(--emerald-100);
}
.hcard-tag {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--emerald-700);
}
.hcard-title { margin: 4px 0 6px; font-size: 1.05rem; line-height: 1.4; }
.hcard-title a { color: var(--slate-900); }
.hcard-meta { font-size: 0.82rem; color: var(--slate-500); }

/* Classic card grid (blog listing) */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img { width: 100%; height: 170px; object-fit: cover; background: var(--emerald-100); }
.card-body { padding: 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-tag {
  display: inline-block; align-self: flex-start;
  background: var(--emerald-100); color: var(--emerald-700);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; font-family: var(--font-head);
}
.card a.card-title { color: var(--slate-900); font-size: 1.18rem; font-weight: 700; line-height: 1.4; font-family: var(--font-head); }
.card p { color: var(--slate-600); font-size: 0.95rem; flex: 1; margin: 10px 0 14px; }
.card-meta { font-size: 0.84rem; color: var(--slate-500); }

/* Topics tiles */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.topic-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.topic-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.topic-tile .t-icon { font-size: 2rem; }
.topic-tile h3 { margin: 10px 0 6px; font-size: 1.02rem; color: var(--slate-900); }
.topic-tile p { margin: 0; font-size: 0.85rem; color: var(--slate-500); line-height: 1.5; }

/* Calculator tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--emerald-600); text-decoration: none; }
.tool-icon {
  width: 48px; height: 48px; border-radius: 14px; font-size: 1.5rem;
  background: var(--emerald-100); display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.tool-card h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--slate-900); }
.tool-card p { margin: 0; font-size: 0.9rem; color: var(--slate-600); line-height: 1.55; }

/* Newsletter band */
.newsletter-band {
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  border-radius: var(--radius); padding: 44px 40px; margin: 52px 0 10px;
  color: #fff; display: flex; gap: 30px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.newsletter-band h2 { margin: 0 0 8px; color: #fff; font-size: 1.6rem; }
.newsletter-band p { margin: 0; color: #d7e5dd; max-width: 480px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  padding: 13px 18px; border-radius: 999px; border: none; min-width: 260px;
  font-size: 1rem; font-family: inherit;
}
.newsletter-form input:focus { outline: 3px solid rgba(245, 158, 11, 0.5); }
.newsletter-note { font-size: 0.85rem; color: #bcd4c6; margin-top: 10px; width: 100%; }
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; border: 2px solid transparent; cursor: pointer;
  font-family: var(--font-head);
}
.btn:hover { text-decoration: none; }
.btn-gold { background: var(--amber-500); color: #3a2a05; }
.btn-gold:hover { background: #fbbf24; }
.btn-outline { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-green { background: var(--emerald-700); color: #fff; }
.btn-green:hover { background: var(--emerald-600); }

/* ---------- Article layout ---------- */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px;
  padding-top: 30px; padding-bottom: 40px; align-items: start;
}
.article-content { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 48px; box-shadow: var(--shadow); }
.breadcrumb { font-size: 0.85rem; color: var(--slate-500); margin-bottom: 14px; }
.article-category {
  display: inline-block; background: var(--emerald-100); color: var(--emerald-700);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin: 0 0 12px; font-family: var(--font-head);
}
.article-content h1 { font-size: 2.15rem; line-height: 1.25; letter-spacing: -0.5px; margin: 0 0 12px; }
.article-meta { color: var(--slate-500); font-size: 0.92rem; margin: 0 0 8px; }
.article-meta a { font-weight: 700; }
.freshness-note {
  font-size: 0.85rem; color: var(--slate-600); background: var(--emerald-50);
  border: 1px solid var(--emerald-100); border-radius: var(--radius-sm);
  padding: 10px 16px; margin: 14px 0 0;
}
.hero-figure { margin: 26px 0 8px; }
.hero-figure img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-figure figcaption { font-size: 0.82rem; color: var(--slate-500); margin-top: 8px; text-align: center; }
.article-content h2 { font-size: 1.5rem; margin: 40px 0 14px; letter-spacing: -0.3px; color: var(--emerald-900); scroll-margin-top: 150px; }
.article-content h3 { font-size: 1.18rem; margin: 28px 0 10px; }
.article-content p { margin: 0 0 18px; }
p.lead { font-size: 1.16rem; color: #334155; }
.article-content ul, .article-content ol { margin: 0 0 20px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content li::marker { color: var(--emerald-700); }

table.compare { width: 100%; border-collapse: collapse; margin: 22px 0 28px; font-size: 0.94rem; display: block; overflow-x: auto; }
table.compare thead th {
  background: var(--emerald-700); color: #fff; text-align: left;
  padding: 12px 14px; white-space: nowrap; font-family: var(--font-head); font-size: 0.88rem;
}
table.compare thead th:first-child { border-radius: 10px 0 0 0; }
table.compare thead th:last-child { border-radius: 0 10px 0 0; }
table.compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare tbody tr:nth-child(even) td { background: #f8fafc; }

/* Quick answer box */
.quick-answer {
  background: linear-gradient(135deg, var(--emerald-50), #fff);
  border: 1.5px solid var(--emerald-100); border-radius: var(--radius);
  padding: 20px 24px; margin: 26px 0;
}
.quick-answer strong { color: var(--emerald-900); font-family: var(--font-head); }
.quick-answer p { margin: 6px 0 0; }
.quick-answer p:first-child { margin-top: 0; }

/* TOC */
.toc {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; margin: 28px 0;
}
.toc h2 { font-size: 1.05rem; margin: 0 0 12px; color: var(--slate-900); letter-spacing: 0; }
.toc ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 30px; }
.toc li { margin-bottom: 7px; font-size: 0.93rem; break-inside: avoid; }
.toc li::marker { color: var(--emerald-600); }

/* Callout panels */
.callout {
  background: var(--amber-100); border-left: 4px solid var(--amber-500);
  border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 26px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-tip {
  background: var(--emerald-50); border: 1.5px solid var(--emerald-100);
  border-left: 4px solid var(--emerald-600);
  border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 26px 0;
}
.callout-tip p:last-child { margin-bottom: 0; }
.callout-warning {
  background: #fef2f2; border: 1.5px solid #fecaca; border-left: 4px solid var(--red);
  border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 26px 0;
}
.callout-warning p:last-child { margin-bottom: 0; }
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px;
  margin: 24px 0;
}
.stat-cell {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}
.stat-cell .stat-num { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--emerald-700); }
.stat-cell .stat-label { font-size: 0.82rem; color: var(--slate-500); margin-top: 4px; }

.faq { margin: 30px 0; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: #fff;
}
.faq summary { padding: 16px 20px; font-weight: 700; cursor: pointer; list-style: none; font-family: var(--font-head); font-size: 0.98rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--emerald-700); font-weight: 800; }
.faq details[open] summary::before { content: "− "; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--slate-600); }

.takeaways {
  background: var(--emerald-100); border-radius: var(--radius); padding: 26px 30px; margin: 30px 0;
}
.takeaways h2 { margin-top: 0; }
.takeaways ul { margin-bottom: 0; }

.disclaimer-note { font-size: 0.88rem; color: var(--slate-600); background: #f1f5f9; border-radius: var(--radius-sm); padding: 16px 20px; }
.article-footer-note { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--slate-500); }

/* Share buttons */
.share-row { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; flex-wrap: wrap; }
.share-row span { font-weight: 700; font-size: 0.92rem; color: var(--slate-600); }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--slate-900); font-weight: 700; font-size: 0.88rem;
  background: #fff; cursor: pointer;
}
.share-btn:hover { border-color: var(--emerald-600); color: var(--emerald-700); text-decoration: none; }

/* Author box */
.author-box {
  display: flex; gap: 18px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin: 30px 0 0; align-items: flex-start;
}
.author-avatar {
  width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.author-box h3 { margin: 0 0 8px; font-size: 1.05rem; }
.author-box p { margin: 0; font-size: 0.93rem; color: var(--slate-600); }

/* Continue reading */
.continue-reading { margin: 36px 0 0; }
.continue-reading h2 { font-size: 1.35rem; margin: 0 0 18px; }

.article-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 130px; }
.article-sidebar .ad-slot { margin: 0; }
.sidebar-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.sidebar-box h3 { margin: 0 0 14px; font-size: 1.02rem; color: var(--emerald-900); }
.sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.sidebar-box li { margin-bottom: 12px; font-size: 0.93rem; line-height: 1.5; }
.sidebar-box p { font-size: 0.93rem; color: var(--slate-600); }
.calc-promo {
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700));
  border-radius: var(--radius); padding: 26px; color: #fff;
}
.calc-promo h3 { color: #fff; margin: 0 0 10px; font-size: 1.05rem; }
.calc-promo p { color: #d7e5dd; font-size: 0.9rem; margin: 0 0 16px; }
.calc-promo .btn-gold { padding: 10px 22px; font-size: 0.92rem; }

/* ---------- Calculator pages ---------- */
.calc-layout {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px;
  margin: 28px 0 10px; align-items: start;
}
.calc-inputs {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 30px 12px; box-shadow: var(--shadow);
}
.calc-field { margin-bottom: 26px; }
.calc-field-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap; row-gap: 8px;
}
.calc-field-head label { font-weight: 700; font-size: 0.98rem; font-family: var(--font-head); }
.calc-value { display: flex; align-items: center; gap: 2px; }
.calc-prefix { font-weight: 700; color: var(--slate-500); }
.calc-value input {
  width: 130px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1.05rem; font-weight: 700; font-family: var(--font-head); color: var(--slate-900);
  text-align: right; background: var(--bg);
}
.calc-value input:focus { outline: none; border-color: var(--emerald-600); box-shadow: 0 0 0 3px rgba(11,122,85,0.12); }
.calc-value input::-webkit-outer-spin-button, .calc-value input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-value input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=range].calc-slider {
  width: 100%; appearance: none; -webkit-appearance: none; height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--emerald-600) 0%, var(--emerald-600) var(--fill, 50%), #e2e8f0 var(--fill, 50%), #e2e8f0 100%);
  outline: none; margin: 6px 0 4px; cursor: pointer;
}
input[type=range].calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--emerald-700);
  box-shadow: 0 2px 8px rgba(11,122,85,0.35); cursor: grab;
}
input[type=range].calc-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--emerald-700);
  box-shadow: 0 2px 8px rgba(11,122,85,0.35); cursor: grab;
}
.calc-minmax { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--slate-500); }
.calc-note { font-size: 0.85rem; color: var(--slate-500); background: var(--bg); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 22px; }

.calc-results {
  background: linear-gradient(160deg, var(--emerald-900), #0a5c40);
  border-radius: var(--radius); padding: 32px 30px; color: #fff;
  position: sticky; top: 130px; box-shadow: var(--shadow-lg);
}
.calc-results h3 { color: #fff; margin: 0 0 18px; font-size: 1.1rem; letter-spacing: 0.5px; }
.donut-wrap { position: relative; width: 210px; height: 210px; margin: 0 auto 18px; }
.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.donut-center .donut-total { font-family: var(--font-head); font-size: 1.45rem; font-weight: 800; color: #fff; }
.donut-center .donut-label { font-size: 0.78rem; color: #bcd4c6; margin-top: 2px; }
.calc-legend { display: flex; justify-content: center; gap: 22px; margin-bottom: 20px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: #d7e5dd; }
.legend-dot { width: 13px; height: 13px; border-radius: 4px; }
.result-rows { border-top: 1px solid rgba(255,255,255,0.18); }
.result-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.result-row:last-child { border-bottom: none; }
.result-row .rr-label { color: #bcd4c6; font-size: 0.93rem; }
.result-row .rr-value { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: #fff; text-align: right; }
.result-row.highlight .rr-value { color: var(--amber-500); font-size: 1.3rem; font-weight: 800; }
.result-row.highlight .rr-label { color: #fff; font-weight: 700; }
.calc-updated { font-size: 0.78rem; color: #8fae9d; margin-top: 14px; text-align: center; }

.formula-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 32px; margin: 30px 0; box-shadow: var(--shadow);
}
.formula-box h2 { margin-top: 0; }
.formula {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background: var(--slate-900); color: #a7f3d0; border-radius: var(--radius-sm);
  padding: 18px 22px; font-size: 0.98rem; overflow-x: auto; margin: 16px 0;
}
.formula-source { font-size: 0.88rem; color: var(--slate-500); }
.year-table-wrap { margin: 10px 0 30px; }
.year-table-wrap h2 { margin-bottom: 6px; }

/* ---------- Static pages ---------- */
.page-wrap { max-width: 860px; margin: 0 auto; padding: 48px 20px 64px; }
.page-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 48px; box-shadow: var(--shadow); }
.page-card h1 { font-size: 2rem; letter-spacing: -0.5px; margin: 0 0 8px; color: var(--emerald-900); }
.page-card .updated { color: var(--slate-500); font-size: 0.9rem; margin-bottom: 26px; }
.page-card h2 { font-size: 1.35rem; color: var(--emerald-900); margin: 34px 0 12px; }
.page-card p, .page-card li { color: #334155; }
.page-card ul, .page-card ol { padding-left: 24px; }
.page-card li { margin-bottom: 8px; }
.policy-meta { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.policy-badge {
  display: inline-block; background: var(--emerald-100); color: var(--emerald-700);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; font-family: var(--font-head);
}

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.95rem; font-family: var(--font-head); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; background: #fff;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--emerald-600); box-shadow: 0 0 0 3px rgba(11,122,85,0.12);
}
.form-group textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.9rem; color: var(--slate-500); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--emerald-900); color: #dce8de; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 34px;
  padding: 54px 22px 38px;
}
.site-footer .logo { color: #fff; }
.site-footer p { font-size: 0.93rem; color: #b9c9bd; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 0.95rem; letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-head); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; font-size: 0.93rem; }
.site-footer a { color: #b9c9bd; }
.site-footer a:hover { color: #fff; }
.footer-newsletter { margin-top: 18px; }
.footer-newsletter p { font-size: 0.85rem; margin: 0 0 10px; }
.footer-newsletter .newsletter-form input { min-width: 0; width: 100%; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); }
.footer-bottom .container { padding-top: 20px; padding-bottom: 20px; }
.footer-bottom p { margin: 0 0 8px; font-size: 0.85rem; }
.footer-risk { color: #8fae9d; font-size: 0.78rem !important; line-height: 1.6; }

/* ---------- Blog filter ---------- */
.filter-note {
  background: var(--emerald-50); border: 1px solid var(--emerald-100); border-radius: var(--radius-sm);
  padding: 12px 20px; margin-bottom: 24px; font-size: 0.93rem; color: var(--slate-600);
  display: none;
}
.filter-note.show { display: block; }
.filter-note a { font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .mag-hero-grid { grid-template-columns: 1fr; }
  .featured-card { min-height: 340px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-results { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .main-nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0; align-items: stretch;
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    padding: 8px 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 24px; border-radius: 0; }
  .nav-toggle { display: block; }
  .hcard-grid { grid-template-columns: 1fr; }
  .article-content { padding: 28px 22px; }
  .article-content h1 { font-size: 1.7rem; }
  .page-card { padding: 28px 22px; }
  .contact-grid { grid-template-columns: 1fr; }
  .toc ul { columns: 1; }
  .featured-body h2 { font-size: 1.45rem; }
  .newsletter-band { padding: 34px 26px; }
  .newsletter-form input { min-width: 0; width: 100%; }
  .ticker-pill { padding: 0 12px; }
  .calc-inputs { padding: 22px 20px 8px; }
  .calc-results { padding: 26px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .calc-value input { width: 110px; }
  body { font-size: 16px; }
}


/* ---------- Calculator additions: select, XIRR, how-to ---------- */
.calc-select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-head); font-size: 1rem; font-weight: 600; color: var(--slate-900);
  background: var(--bg); cursor: pointer;
}
.calc-select:focus { outline: none; border-color: var(--emerald-600); box-shadow: 0 0 0 3px rgba(11,122,85,0.12); }
.xirr-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.xirr-row { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 10px; }
.xirr-row input {
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.98rem; background: var(--bg); width: 100%;
}
.xirr-row input:focus { outline: none; border-color: var(--emerald-600); }
.xirr-del {
  border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--red); font-size: 1rem; line-height: 1;
}
.xirr-del:hover { border-color: var(--red); }
.xirr-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }

.howto { margin: 34px 0; }
.howto h2 { margin-bottom: 6px; }
.howto-sub { color: var(--slate-500); margin: 0 0 20px; }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.howto-steps li {
  display: flex; gap: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; align-items: flex-start; box-shadow: var(--shadow);
}
.howto-num {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--emerald-700); color: #fff; font-family: var(--font-head);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.howto-steps p { margin: 4px 0 0; }
.howto-steps strong { font-family: var(--font-head); }

/* ---------- Calculators hub ---------- */
.hub-hero {
  background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-700) 70%, var(--emerald-600) 100%);
  border-radius: var(--radius); color: #fff; padding: 46px 44px; margin: 30px 0 8px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
  position: relative; overflow: hidden;
}
.hub-hero::after {
  content: "₹"; position: absolute; right: 2%; top: -40px;
  font-size: 13rem; opacity: 0.07; font-weight: 800; line-height: 1; font-family: var(--font-head);
}
.hub-hero h1 { color: #fff; font-size: 2.1rem; margin: 0 0 12px; letter-spacing: -0.5px; position: relative; z-index: 1; }
.hub-hero p { color: #d7e5dd; margin: 0 0 22px; position: relative; z-index: 1; }
.hub-search { position: relative; z-index: 1; max-width: 440px; }
.hub-search input {
  width: 100%; padding: 15px 20px 15px 48px; border-radius: 999px; border: none;
  font-size: 1rem; font-family: inherit;
  background: #fff url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") no-repeat 18px center / 20px;
}
.hub-search input:focus { outline: 3px solid rgba(245, 158, 11, 0.55); }
.mini-sip {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius); padding: 26px; position: relative; z-index: 1;
  backdrop-filter: blur(4px);
}
.mini-sip h3 { color: #fff; margin: 0 0 4px; font-size: 1.05rem; }
.mini-sip .msip-sub { color: #bcd4c6; font-size: 0.86rem; margin: 0 0 16px; }
.msip-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.msip-btns button {
  border: 1.5px solid rgba(255,255,255,0.35); background: transparent; color: #fff;
  border-radius: 999px; padding: 8px 16px; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  font-family: var(--font-head);
}
.msip-btns button.active, .msip-btns button:hover { background: var(--amber-500); border-color: var(--amber-500); color: #3a2a05; }
.msip-out { font-size: 0.92rem; color: #d7e5dd; }
.msip-out strong { display: block; font-size: 1.9rem; color: #fff; font-family: var(--font-head); letter-spacing: -0.5px; }
.msip-out span { display: block; margin-top: 4px; }
.msip-link { display: inline-block; margin-top: 12px; color: var(--amber-500); font-weight: 700; font-size: 0.9rem; }

.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0;
}
.stat-band-cell {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow);
}
.stat-band-cell .n { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--emerald-700); }
.stat-band-cell .l { font-size: 0.85rem; color: var(--slate-500); margin-top: 4px; }

.lanes { margin: 40px 0 10px; }
.lane {
  display: grid; grid-template-columns: 64px 1fr; gap: 20px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px;
  margin-bottom: 16px; box-shadow: var(--shadow); align-items: start;
}
.lane-num {
  width: 56px; height: 56px; border-radius: 18px; background: var(--emerald-100);
  color: var(--emerald-700); font-family: var(--font-head); font-weight: 800; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.lane h3 { margin: 2px 0 8px; font-size: 1.2rem; }
.lane .hook { color: var(--slate-600); margin: 0 0 12px; }
.lane .hook strong { color: var(--emerald-900); }
.lane-links { display: flex; gap: 8px; flex-wrap: wrap; }
.lane-links a {
  background: var(--emerald-50); border: 1px solid var(--emerald-100); color: var(--emerald-700);
  border-radius: 999px; padding: 7px 16px; font-size: 0.88rem; font-weight: 600;
}
.lane-links a:hover { background: var(--emerald-700); color: #fff; text-decoration: none; }

.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--slate-600);
  border-radius: 999px; padding: 9px 20px; font-size: 0.92rem; font-weight: 700; cursor: pointer;
  font-family: var(--font-head);
}
.chip:hover { border-color: var(--emerald-600); color: var(--emerald-700); }
.chip.active { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }
.hub-group { margin: 30px 0; }
.hub-group h2 { font-size: 1.35rem; margin: 0 0 4px; }
.hub-group .g-sub { color: var(--slate-500); margin: 0 0 18px; font-size: 0.95rem; }
.hub-empty {
  text-align: center; padding: 40px; color: var(--slate-500); background: #fff;
  border: 1px dashed var(--line); border-radius: var(--radius); margin: 20px 0;
}
.method-note {
  background: var(--amber-100); border: 1px solid #f5d78e; border-radius: var(--radius);
  padding: 24px 30px; margin: 36px 0;
}
.method-note h2 { margin: 0 0 10px; font-size: 1.2rem; }
.method-note p { margin: 0 0 10px; font-size: 0.95rem; color: var(--slate-600); }
.method-note p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .hub-hero { grid-template-columns: 1fr; padding: 36px 28px; }
  .stats-band { grid-template-columns: 1fr 1fr; }
  .lane { grid-template-columns: 1fr; }
  .lane-num { width: 48px; height: 48px; }
  .xirr-row { grid-template-columns: 1fr 1fr 40px; }
}

/* Honeypot (anti-spam): real users never see this */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* Form status messages */
.form-ok, .form-err {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.93rem;
  font-weight: 600;
}
.form-ok, .form-note.form-ok, .newsletter-note.form-ok {
  color: #065f46;
  background: #e3f3ec;
  border: 1px solid #bfe3d2;
}
.form-err, .form-note.form-err, .newsletter-note.form-err {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

/* Country tags & filter chips (India / USA guides) */
.country-tag {
  display: inline-block;
  background: #f1f5f9; color: var(--slate-600);
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; font-family: var(--font-head);
  white-space: nowrap;
}
.article-category .country-tag { margin-bottom: 0; }
.country-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 22px; }
.cchip {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--slate-600);
  font-weight: 700; font-size: 0.9rem; font-family: var(--font-head); text-decoration: none;
}
.cchip:hover { border-color: var(--emerald-600); color: var(--emerald-700); }
.cchip.active { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }

/* TEMPORARY (until AdSense approval): hide empty ad placeholder boxes so the
   site looks clean for reviewers. Remove this rule after pasting ad code. */
.ad-slot { display: none !important; }
