:root {
  --bg: #0b0e14;
  --bg-2: #0f131b;
  --panel: #111827;
  --panel-2: #0d1320;
  --border: #1f2937;
  --border-soft: #172033;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-dim: #064e3b;
  --danger: #f87171;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; color: #f3f4f6; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header + nav */
header.site {
  border-bottom: 1px solid var(--border);
  background: #07090d;
  position: sticky; top: 0; z-index: 50;
}
.navbar { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.brand { font-weight: 900; letter-spacing: 1px; font-size: 20px; color: var(--accent-2); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand span { color: #fff; font-weight: 300; }
.nav-links a { color: var(--muted); font-size: 14px; margin-left: 20px; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: var(--accent-2); }
.badge { font-size: 12px; color: var(--muted); background: var(--panel-2); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); }
@media (max-width: 600px) { .nav-links a { margin-left: 12px; font-size: 13px; } .brand { font-size: 17px; } }

/* Ad slots */
.ad {
  border: 1px dashed var(--border); background: rgba(13,19,32,0.4);
  border-radius: 12px; text-align: center; color: var(--muted-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 24px 0;
}
.ad .label { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #4b5563; margin-bottom: 4px; }
.ad .body { font-size: 12px; font-style: italic; }
.ad-leaderboard { min-height: 90px; }
.ad-inline { min-height: 120px; }
.ad-sidebar { min-height: 600px; position: sticky; top: 80px; margin: 0; }

/* Hero */
.hero { padding: 48px 0 8px; text-align: center; }
.hero h1 { font-size: 40px; margin: 0 0 12px; letter-spacing: -0.5px; }
.hero h1 .accent { color: var(--accent-2); }
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto; }
@media (max-width: 560px) { .hero h1 { font-size: 30px; } .hero p.sub { font-size: 16px; } }

/* Layout grid */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; padding: 24px 0 48px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .ad-sidebar { position: static; min-height: 250px; } }

/* Calculator card */
.calc { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } }
.calc h2 { font-size: 16px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%; background: #0a0f18; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; color: #fff; font-size: 15px; font-family: var(--font);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }

/* Result cards */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 520px) { .results { grid-template-columns: 1fr; } }
.stat { background: #090d15; border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.stat.primary { border-color: rgba(16,185,129,0.35); box-shadow: inset 0 0 0 1px rgba(16,185,129,0.08); }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat.primary .k { color: var(--accent-2); font-weight: 600; }
.stat .v { font-size: 26px; font-weight: 900; color: #fff; margin: 4px 0 2px; }
.stat.primary .v { font-size: 34px; color: var(--accent-2); }
.stat .s { font-size: 10px; color: var(--muted-2); }
.chart-box { background: #090d15; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-head h3 { font-size: 13px; margin: 0; color: #d1d5db; }
.chart-head .tag { font-size: 11px; color: var(--accent-2); background: #05231a; border: 1px solid #0c3a2c; padding: 2px 8px; border-radius: 6px; }
.chart-wrap { position: relative; width: 100%; height: 240px; }
canvas { width: 100%; height: 100%; }

/* Article content */
article.content { max-width: 760px; }
article.content section { margin: 40px 0; }
article.content h2 { font-size: 26px; margin: 0 0 14px; }
article.content h3 { font-size: 18px; margin: 24px 0 8px; }
article.content p { color: #cbd5e1; margin: 0 0 14px; }
article.content ul { color: #cbd5e1; padding-left: 20px; }
article.content li { margin-bottom: 8px; }
.callout { background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px 18px; margin: 20px 0; }
.callout strong { color: var(--accent-2); }

/* FIRE types grid */
.types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
@media (max-width: 560px) { .types { grid-template-columns: 1fr; } }
.type-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.type-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--accent-2); }
.type-card p { font-size: 14px; margin: 0 0 8px; color: var(--muted); }
.type-card a.more { font-size: 13px; font-weight: 600; }

/* FAQ */
details.faq { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; padding: 4px 16px; }
details.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: #e5e7eb; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--accent-2); font-size: 20px; line-height: 1; }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { color: var(--muted); padding-bottom: 12px; margin: 0; }

/* Disclaimer + footer */
.disclaimer { font-size: 12px; color: var(--muted-2); border-top: 1px solid var(--border); padding-top: 20px; margin-top: 40px; }
footer.site { border-top: 1px solid var(--border); background: #07090d; padding: 28px 0; margin-top: 40px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); margin-right: 16px; }
