/* ═══════════════════════════════════════
   byily.com — Personal Finance Guide
   ═══════════════════════════════════════ */

/* ───── Reset & Variables ───── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #0A2540;
  --navy-light: #1A3A5C;
  --gold: #D4A843;
  --gold-light: #F5E6C8;
  --green: #10B981;
  --green-light: #D1FAE5;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.07);
  --shadow-hover: 0 10px 30px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .25s ease;
  --header-h: 64px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ───── Utility ───── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: .9rem;
  padding: 10px 24px; border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  transition: all var(--transition);
}
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--outline { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn--outline:hover { background: var(--bg); border-color: var(--navy); }
.btn--gold { background: var(--gold); color: var(--white); }
.btn--gold:hover { background: #c49a35; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--sm { padding: 6px 16px; font-size: .82rem; }

/* ───── Header ───── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { display: block; height: 36px; width: auto; }
@media (max-width: 640px) { .logo img { height: 30px; } }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  transition: color var(--transition); position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--gold);
  transition: width var(--transition);
}
.nav a:hover, .nav a.active { color: var(--navy); }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: .3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ───── Hero ───── */
.hero {
  text-align: center; padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  color: var(--navy); line-height: 1.2; max-width: 680px; margin: 0 auto 16px;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 1.15rem; color: var(--text-muted); max-width: 520px; margin: 0 auto 48px;
}

/* ───── Trust Badges ───── */
.trust-badges {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 880px; margin: 0 auto;
}
.trust-badge {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 12px;
  text-align: center; transition: transform var(--transition), box-shadow var(--transition);
  cursor: default;
}
.trust-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.trust-badge .number { font-size: 1.35rem; font-weight: 800; color: var(--navy); display: block; }
.trust-badge .label { font-size: .75rem; color: var(--text-muted); margin-top: 4px; display: block; }
.trust-badge--verified .number { color: var(--green); }

/* ───── Page Intro ───── */
.page-intro { text-align: center; padding: 48px 0 40px; }
.page-intro h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.page-intro p { font-size: 1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ───── Sections ───── */
.section { padding: 64px 0; }
.section--alt { background: var(--white); }
.section-title {
  font-size: 1.65rem; font-weight: 700; color: var(--navy);
  text-align: center; margin-bottom: 40px; line-height: 1.3;
}
.section-subtitle { text-align: center; color: var(--text-muted); font-size: .95rem; margin-top: -28px; margin-bottom: 40px; }

/* ───── Article Cards ───── */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.article-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.article-meta { display: flex; align-items: center; gap: 12px; font-size: .78rem; color: var(--text-muted); margin-bottom: 10px; }
.article-category {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  background: var(--gold-light); color: #8B6F2C; font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .03em;
}
.article-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.4; }
.article-card h3 a { transition: color var(--transition); }
.article-card h3 a:hover { color: var(--gold); }
.article-card .excerpt { font-size: .9rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.article-ad {
  margin: 0 12px 12px; padding: 8px;
  background: repeating-linear-gradient(45deg, transparent, transparent 6px, #F1F5F9 6px, #F1F5F9 12px);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  text-align: center; font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
  user-select: none;
}

/* ───── Why Trust ───── */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trust-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px; text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.trust-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.trust-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-size: 1.5rem;
}
.trust-icon--navy { background: var(--navy); color: var(--white); }
.trust-icon--gold { background: var(--gold-light); color: #8B6F2C; }
.trust-icon--green { background: var(--green-light); color: #065F46; }
.trust-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.trust-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* ───── Newsletter ───── */
.newsletter {
  background: var(--navy); color: var(--white); text-align: center;
  padding: 56px 24px; border-radius: var(--radius);
  margin: 0 auto; max-width: 640px;
}
.newsletter h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.newsletter p { font-size: .92rem; opacity: .8; margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 12px; max-width: 440px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-sm);
  border: none; font-family: inherit; font-size: .9rem;
  outline: 2px solid transparent; transition: outline var(--transition);
}
.newsletter-form input:focus { outline-color: var(--gold); }
.newsletter-form .btn { flex-shrink: 0; }

/* ───── Breadcrumbs ───── */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--text-muted); padding: 20px 0 0;
}
.breadcrumbs a { transition: color var(--transition); }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs span { color: var(--text-muted); }

/* ───── Article Full ───── */
.article-full { padding: 32px 0 64px; }
.article-full header { margin-bottom: 32px; }
.article-full h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800;
  color: var(--navy); line-height: 1.25; margin: 12px 0 16px;
}
.article-full .meta { display: flex; gap: 16px; font-size: .85rem; color: var(--text-muted); flex-wrap: wrap; }
.article-full .meta .tag {
  background: var(--gold-light); color: #8B6F2C; padding: 2px 10px;
  border-radius: 20px; font-weight: 600; font-size: .72rem; text-transform: uppercase;
}
.article-body { font-size: 1rem; line-height: 1.8; color: var(--text); }
.article-body h2 {
  font-size: 1.3rem; font-weight: 700; color: var(--navy);
  margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.article-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin: 28px 0 8px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--navy); }
.article-body .highlight-box {
  background: var(--gold-light); border-left: 4px solid var(--gold);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0; font-size: .92rem;
}
.article-body .highlight-box strong { color: #8B6F2C; }
.article-ad--full {
  margin: 32px 0; padding: 16px;
  background: repeating-linear-gradient(45deg, transparent, transparent 6px, #F1F5F9 6px, #F1F5F9 12px);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  text-align: center; font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
  user-select: none;
}
.article-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
}
.article-nav a {
  display: flex; flex-direction: column; gap: 4px;
  font-size: .85rem; color: var(--text-muted); transition: color var(--transition);
  max-width: 45%;
}
.article-nav a:last-child { text-align: right; align-items: flex-end; }
.article-nav a:hover { color: var(--navy); }
.article-nav a strong { font-size: .95rem; color: var(--navy); }

/* ───── Related Articles ───── */
.related-section { padding: 48px 0 64px; background: var(--white); }

/* ───── Tools Page ───── */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.tool-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tool-card .tool-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 16px;
}
.tool-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.tool-card p { font-size: .88rem; color: var(--text-muted); flex: 1; margin-bottom: 16px; }

/* ───── Reviews Page ───── */
.reviews-list { display: flex; flex-direction: column; gap: 20px; }
.review-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; align-items: flex-start; gap: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.review-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.review-item .rv-score {
  flex-shrink: 0; width: 60px; height: 60px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
}
.review-item .rv-body { flex: 1; }
.review-item .rv-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.review-item .rv-body .rv-meta { font-size: .82rem; color: var(--text-muted); margin-bottom: 8px; }
.review-item .rv-body p { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }
.rv-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-weight: 600; font-size: .7rem; text-transform: uppercase;
  margin-right: 6px;
}
.rv-badge--best { background: var(--green-light); color: #065F46; }
.rv-badge--good { background: var(--gold-light); color: #8B6F2C; }

/* ───── Footer ───── */
.footer {
  border-top: 1px solid var(--border); background: var(--white);
  padding: 36px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px; margin-bottom: 24px;
}
.footer-brand .logo { font-size: 1.2rem; }
.footer-brand p { font-size: .85rem; color: var(--text-muted); margin-top: 8px; max-width: 260px; }
.footer-col h4 { font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.footer-col a {
  display: block; font-size: .85rem; color: var(--text-muted);
  padding: 4px 0; transition: color var(--transition);
}
.footer-col a:hover { color: var(--navy); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--text-muted);
}

/* ───── Responsive ───── */
@media (max-width: 900px) {
  .trust-badges { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
  .trust-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .tools-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .review-item { flex-direction: column; align-items: center; text-align: center; }
  .article-nav { flex-direction: column; }
  .article-nav a { max-width: 100%; text-align: left !important; align-items: flex-start !important; }
}
@media (max-width: 640px) {
  .nav {
    display: none; flex-direction: column; position: absolute; top: var(--header-h);
    left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 16px;
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .hamburger { display: flex; }
  .hero { padding: 48px 0 40px; }
  .hero p { margin-bottom: 32px; }
  .section { padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .newsletter-form { flex-direction: column; }
  .trust-badges { gap: 10px; }
  .trust-badge { padding: 14px 8px; }
  .trust-badge .number { font-size: 1.1rem; }
}
