/* Debt Payoff Hub - Stylesheet */
:root {
  --primary: #2563EB;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.logo {
  font-size: 1.35rem; font-weight: 800; color: var(--primary);
  letter-spacing: -.01em;
}
.logo span { color: var(--text); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--text); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  padding: 60px 0 50px;
  text-align: center;
}
.hero h1 {
  font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 16px; color: var(--text);
}
.hero p {
  font-size: 1.15rem; color: var(--text-light);
  max-width: 680px; margin: 0 auto 24px;
}
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px;
  background: var(--primary); color: #fff !important; font-weight: 600;
  border: 0; border-radius: var(--radius); cursor: pointer;
  font-size: 1rem; transition: background .15s;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline {
  background: #fff; color: var(--primary) !important;
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

/* Tool grid */
.tools-section { padding: 60px 0; }
.section-title {
  font-size: 1.8rem; font-weight: 700; text-align: center;
  margin-bottom: 12px; letter-spacing: -.01em;
}
.section-sub {
  text-align: center; color: var(--text-light);
  max-width: 600px; margin: 0 auto 36px;
}
.tools-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.tool-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.tool-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.tool-icon {
  width: 44px; height: 44px; background: var(--primary-light);
  color: var(--primary); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 14px;
}
.tool-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.tool-card p { color: var(--text-light); font-size: .95rem; margin-bottom: 16px; flex-grow: 1; }
.tool-card a.btn { align-self: flex-start; padding: 8px 16px; font-size: .9rem; }

/* Calculator */
.calc-page { padding: 40px 0 60px; }
.breadcrumb {
  font-size: .88rem; color: var(--text-light); margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-light); }
.calc-title { font-size: 2rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -.01em; }
.calc-intro { color: var(--text-light); margin-bottom: 28px; font-size: 1.05rem; }

.calc-box {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px; margin-bottom: 32px;
}
.calc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-weight: 600; font-size: .92rem;
  margin-bottom: 6px; color: var(--text);
}
.form-group input, .form-group select {
  width: 100%; padding: 10px 12px; font-size: 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: #fff; transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--primary);
}
.form-group .hint { font-size: .82rem; color: var(--text-light); margin-top: 4px; }

.calc-results {
  background: #fff; border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--border);
}
.result-empty { color: var(--text-light); text-align: center; padding: 32px 0; }
.result-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: 0; }
.result-label { color: var(--text-light); font-size: .92rem; }
.result-value { font-weight: 700; font-size: 1.05rem; }

.big-number {
  font-size: 2.4rem; font-weight: 800; color: var(--primary);
  text-align: center; margin: 14px 0 6px; letter-spacing: -.02em;
}
.big-number.danger { color: var(--danger); }
.big-number.success { color: var(--success); }
.big-number-label { text-align: center; color: var(--text-light); font-size: .92rem; }

/* Comparison cards (Snowball vs Avalanche) */
.compare-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px;
}
@media (max-width: 640px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card {
  background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.compare-card.winner { border-color: var(--success); background: #f0fdf4; }
.compare-card h4 { font-size: 1.05rem; margin-bottom: 12px; }
.compare-card .stat { margin-bottom: 8px; font-size: .92rem; }
.compare-card .stat strong { font-size: 1.1rem; color: var(--text); }

/* Progress bars */
.progress-section { margin-top: 24px; }
.progress-bar-wrap {
  background: #e5e7eb; border-radius: 999px; overflow: hidden;
  height: 22px; margin: 6px 0 14px;
}
.progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--primary), #60a5fa);
  display: flex; align-items: center; justify-content: flex-end;
  color: #fff; font-size: .78rem; font-weight: 600; padding-right: 8px;
  min-width: 30px;
}
.progress-bar.avalanche { background: linear-gradient(90deg, var(--success), #34d399); }

/* DTI rating badge */
.rating-badge {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; margin: 8px 0;
}
.rating-excellent { background: #d1fae5; color: #065f46; }
.rating-good { background: #dbeafe; color: #1e40af; }
.rating-warning { background: #fef3c7; color: #92400e; }
.rating-danger { background: #fee2e2; color: #991b1b; }

/* Sections */
.content-section { padding: 30px 0; }
.content-section h2 {
  font-size: 1.5rem; margin: 28px 0 14px;
  letter-spacing: -.01em; font-weight: 700;
}
.content-section h3 { font-size: 1.2rem; margin: 22px 0 10px; font-weight: 700; }
.content-section p { margin-bottom: 14px; }
.content-section ul, .content-section ol { margin: 10px 0 16px 22px; }
.content-section li { margin-bottom: 6px; }

/* FAQ */
.faq-section { margin-top: 36px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  padding: 16px 18px; cursor: pointer; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between;
  align-items: center; background: #fff;
}
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-answer { padding: 0 18px 16px; color: var(--text-light); }

/* Article */
.article-page { padding: 30px 0 60px; }
.article-meta { color: var(--text-light); font-size: .9rem; margin-bottom: 20px; }
.article-body h1 {
  font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 14px; line-height: 1.25;
}
.article-body h2 { font-size: 1.5rem; margin: 30px 0 12px; font-weight: 700; }
.article-body h3 { font-size: 1.2rem; margin: 22px 0 10px; font-weight: 700; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 12px 0 18px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--primary); background: var(--primary-light);
  padding: 14px 18px; margin: 18px 0; font-style: italic;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: .95rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--border); padding: 10px 12px; text-align: left;
}
.article-body th { background: var(--bg-soft); font-weight: 700; }

.cta-box {
  background: var(--primary-light); border-left: 4px solid var(--primary);
  padding: 18px 22px; border-radius: var(--radius); margin: 22px 0;
}
.cta-box strong { color: var(--primary-dark); }

/* Article list (articles index) */
.article-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px; margin-top: 28px;
}
.article-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: transform .15s, box-shadow .15s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.article-card h3 a { color: var(--text); }
.article-card p { color: var(--text-light); font-size: .92rem; }
.article-card .read-more { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .9rem; }

/* Ad placeholders */
.ad-slot {
  background: #f3f4f6; border: 1px dashed #d1d5db;
  border-radius: var(--radius); padding: 20px; text-align: center;
  color: #9ca3af; font-size: .85rem; margin: 24px 0;
  min-height: 90px; display: flex; align-items: center; justify-content: center;
}

/* Footer */
.site-footer {
  background: #111827; color: #d1d5db; padding: 40px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px;
  margin-bottom: 30px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #9ca3af; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { color: #9ca3af; font-size: .92rem; margin-top: 10px; }
.footer-bottom {
  border-top: 1px solid #374151; padding-top: 20px;
  text-align: center; color: #9ca3af; font-size: .88rem;
}

/* Mobile menu */
@media (max-width: 720px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; right: 0; left: 0;
    background: #fff; padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 14px; align-items: flex-start;
  }
  .menu-toggle { display: block; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .section-title { font-size: 1.45rem; }
  .calc-title { font-size: 1.55rem; }
  .article-body h1 { font-size: 1.65rem; }
  .big-number { font-size: 1.9rem; }
}
