/* ============================================================
   FinRatePro — Premium Design System
   Deep, organic color palette. NO transparent washes.
   Built for trust, readability and financial authority.
   ============================================================ */

:root {
  /* Core palette — deep and rich */
  --navy-900: #0B1F3B;   /* primary deep navy */
  --navy-800: #0F2A4F;
  --navy-700: #123A63;   /* steel blue */
  --navy-600: #1B4A7A;
  --navy-500: #2D6398;

  --emerald-900: #053B2E;
  --emerald-800: #075E45;
  --emerald-700: #1F6F54;  /* primary emerald */
  --emerald-600: #2D8A6B;
  --emerald-500: #3CA882;

  --gold-900: #8B6F3D;
  --gold-800: #A8854A;
  --gold-700: #C9A86A;  /* champagne gold */
  --gold-600: #D4B87A;
  --gold-500: #E0C78C;

  --cream-100: #FFFDF9;
  --cream-200: #FBF4EE;
  --cream-300: #F4E9DE;
  --cream-400: #E8D9C8;

  --charcoal-900: #1A1816;
  --charcoal-800: #2C2A28;
  --charcoal-700: #3D3A36;
  --charcoal-600: #5A5550;
  --charcoal-500: #7A746E;

  --white: #FFFFFF;
  --line: rgba(11, 31, 59, 0.10);
  --line-dark: rgba(255, 253, 249, 0.12);
}

/* ---------------------------------------------------------- */
/* Base                                                       */
/* ---------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--cream-100);
  color: var(--charcoal-800);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.75rem); }

p { margin-bottom: 1.1rem; color: var(--charcoal-700); }
a { color: var(--emerald-700); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--emerald-600); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------------------------------------------------------- */
/* Utility colors                                             */
/* ---------------------------------------------------------- */
.text-navy { color: var(--navy-900); }
.text-navy-700 { color: var(--navy-700); }
.text-emerald { color: var(--emerald-700); }
.text-gold { color: var(--gold-700); }
.text-cream { color: var(--cream-200); }
.text-charcoal { color: var(--charcoal-800); }
.text-muted { color: var(--charcoal-500); }
.text-white { color: var(--white); }

.bg-navy { background: var(--navy-900); }
.bg-navy-700 { background: var(--navy-700); }
.bg-emerald { background: var(--emerald-700); }
.bg-gold { background: var(--gold-700); }
.bg-cream { background: var(--cream-200); }
.bg-cream-100 { background: var(--cream-100); }
.bg-white { background: var(--white); }

/* ---------------------------------------------------------- */
/* Header / Navigation                                        */
/* ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 31, 59, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 168, 106, 0.2);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo .logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold-700), var(--gold-500));
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(201,168,106,0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links > li > a {
  color: var(--cream-200);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 500;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-links > li > a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.nav-links > li > a.active {
  color: var(--gold-600);
}

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--navy-800);
  border: 1px solid rgba(201,168,106,0.15);
  border-radius: 12px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .25s ease;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  margin-top: 8px;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--cream-200);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all .15s ease;
}
.dropdown a:hover {
  background: rgba(201,168,106,0.12);
  color: var(--gold-600);
  transform: translateX(3px);
}

.nav-cta {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: var(--white) !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(31,111,84,0.3);
  transition: all .2s ease;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31,111,84,0.4);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream-200);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--navy-800);
    padding: 1rem;
    border-top: 1px solid rgba(201,168,106,0.15);
  }
  .nav-links.open .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    padding-left: 1rem;
  }
}

/* ---------------------------------------------------------- */
/* Hero                                                       */
/* ---------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 20% 50%, rgba(31,111,84,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(201,168,106,0.12) 0%, transparent 50%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--cream-200);
  padding: 5.5rem 0 5rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,106,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,106,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201,168,106,0.12);
  border: 1px solid rgba(201,168,106,0.3);
  color: var(--gold-600);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fadeInUp .6s ease;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  margin-bottom: 1.2rem;
  animation: fadeInUp .7s ease .1s both;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(251,244,238,0.82);
  margin-bottom: 2rem;
  max-width: 620px;
  animation: fadeInUp .8s ease .2s both;
}

.hero-search {
  display: flex;
  max-width: 560px;
  background: var(--white);
  border-radius: 14px;
  padding: 0.45rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  animation: fadeInUp .9s ease .3s both;
}
.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  background: transparent;
  color: var(--charcoal-800);
  font-family: inherit;
}
.hero-search button {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: var(--white);
  border: none;
  padding: 0 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.hero-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31,111,84,0.4);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease .4s both;
}
.hero-stat .num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-600);
  line-height: 1;
}
.hero-stat .label {
  font-size: 0.85rem;
  color: rgba(251,244,238,0.6);
  margin-top: 0.3rem;
}

/* Floating coins / decorative */
.hero-deco {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-deco .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(201,168,106,0.2);
  animation: rotateRing 30s linear infinite;
}
.hero-deco .ring:nth-child(1) { inset: 0; }
.hero-deco .ring:nth-child(2) { inset: 40px; animation-duration: 25s; animation-direction: reverse; }
.hero-deco .ring:nth-child(3) { inset: 80px; animation-duration: 20s; }
.hero-deco .ring:nth-child(4) { inset: 120px; animation-duration: 15s; animation-direction: reverse; }
.hero-deco .dot {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--gold-700);
  border-radius: 50%;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(201,168,106,0.6);
}

@media (max-width: 900px) {
  .hero-deco { display: none; }
}

/* ---------------------------------------------------------- */
/* Section spacing                                            */
/* ---------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-dark {
  background: var(--navy-900);
  color: var(--cream-200);
}
.section-dark h2, .section-dark h3 { color: var(--white); }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}
.section-header .eyebrow {
  display: inline-block;
  color: var(--emerald-700);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.section-dark .section-header .eyebrow { color: var(--gold-600); }
.section-header p {
  font-size: 1.1rem;
  color: var(--charcoal-600);
  margin-top: 0.5rem;
}
.section-dark .section-header p { color: rgba(251,244,238,0.7); }

/* ---------------------------------------------------------- */
/* Calculator category cards                                  */
/* ---------------------------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.cat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  transition: all .35s cubic-bezier(.2,.8,.2,1);
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
}
.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--emerald-700), var(--gold-700));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(11,31,59,0.12);
  border-color: rgba(201,168,106,0.3);
}
.cat-card:hover::before { transform: scaleX(1); }

.cat-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gold-600);
  margin-bottom: 1.25rem;
  transition: transform .35s ease;
}
.cat-card:hover .icon {
  transform: scale(1.08) rotate(-5deg);
}
.cat-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.cat-card p {
  font-size: 0.95rem;
  color: var(--charcoal-600);
  margin-bottom: 1rem;
}
.cat-card .count {
  font-size: 0.82rem;
  color: var(--emerald-700);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---------------------------------------------------------- */
/* Calculator list (per category page)                        */
/* ---------------------------------------------------------- */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.calc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  transition: all .25s ease;
  display: block;
  color: inherit;
  position: relative;
}
.calc-card:hover {
  border-color: var(--emerald-600);
  box-shadow: 0 8px 28px rgba(11,31,59,0.08);
  transform: translateY(-3px);
}
.calc-card .calc-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.calc-card .calc-desc {
  font-size: 0.88rem;
  color: var(--charcoal-600);
  line-height: 1.55;
}
.calc-card .arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  color: var(--emerald-700);
  opacity: 0;
  transition: all .25s ease;
}
.calc-card:hover .arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ---------------------------------------------------------- */
/* Calculator tool UI                                         */
/* ---------------------------------------------------------- */
.calc-tool {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(11,31,59,0.08);
  border: 1px solid var(--line);
}
@media (max-width: 600px) {
  .calc-tool { padding: 1.25rem; }
}

.calc-tool h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.calc-tool h3 .ico {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.95rem;
}

.form-row {
  margin-bottom: 1.1rem;
}
.form-row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal-800);
  margin-bottom: 0.4rem;
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix, .input-suffix {
  position: absolute;
  font-weight: 600;
  color: var(--charcoal-500);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 2;
}
.input-prefix { left: 1rem; }
.input-suffix { right: 1rem; }

.form-input, .form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--cream-300);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--cream-100);
  color: var(--charcoal-800);
  transition: all .2s ease;
  outline: none;
}
.form-input.has-prefix { padding-left: 2.2rem; }
.form-input.has-suffix { padding-right: 3rem; }
.form-input:focus, .form-select:focus {
  border-color: var(--emerald-600);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(31,111,84,0.1);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 500px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

.calc-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s ease;
  font-family: inherit;
  margin-top: 0.5rem;
  box-shadow: 0 4px 14px rgba(31,111,84,0.25);
}
.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31,111,84,0.35);
}
.calc-btn:active { transform: translateY(0); }

.calc-btn-secondary {
  background: var(--navy-700);
  box-shadow: 0 4px 14px rgba(18,58,99,0.25);
}

/* Result panel */
.result-panel {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  border-radius: 16px;
  padding: 2rem;
  color: var(--cream-200);
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}
.result-panel::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(201,168,106,0.12), transparent 60%);
  pointer-events: none;
}
.result-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(251,244,238,0.6);
  margin-bottom: 0.4rem;
}
.result-big {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold-600);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,253,249,0.1);
}
.result-item .label {
  font-size: 0.78rem;
  color: rgba(251,244,238,0.55);
  margin-bottom: 0.2rem;
}
.result-item .value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Amortization / breakdown table */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.breakdown-table th {
  text-align: left;
  padding: 0.7rem 0.8rem;
  background: var(--navy-900);
  color: var(--gold-600);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.breakdown-table th:first-child { border-top-left-radius: 10px; }
.breakdown-table th:last-child { border-top-right-radius: 10px; }
.breakdown-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--charcoal-700);
}
.breakdown-table tr:nth-child(even) td { background: var(--cream-100); }
.breakdown-table tr:hover td { background: rgba(31,111,84,0.04); }

/* ---------------------------------------------------------- */
/* Content article styling                                    */
/* ---------------------------------------------------------- */
.article-body {
  font-size: 1.075rem;
  line-height: 1.85;
  color: var(--charcoal-800);
}
.article-body h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.7rem;
  color: var(--navy-900);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-700);
  display: inline-block;
}
.article-body h3 {
  margin: 2rem 0 0.8rem;
  font-size: 1.3rem;
  color: var(--navy-700);
}
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol {
  margin: 0 0 1.2rem 1.5rem;
}
.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.article-body blockquote {
  border-left: 4px solid var(--emerald-700);
  background: var(--cream-200);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--charcoal-700);
}
.article-body strong { color: var(--navy-900); font-weight: 700; }

.callout {
  background: linear-gradient(135deg, rgba(31,111,84,0.06), rgba(201,168,106,0.06));
  border: 1px solid rgba(31,111,84,0.15);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.callout .callout-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--emerald-700);
  margin-bottom: 0.5rem;
}

.disclaimer-box {
  background: rgba(139, 111, 61, 0.06);
  border-left: 4px solid var(--gold-800);
  border-radius: 0 12px 12px 0;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.92rem;
  color: var(--charcoal-700);
}
.disclaimer-box strong { color: var(--gold-900); }

/* FAQ */
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--white);
}
.faq-q {
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  color: var(--navy-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  user-select: none;
  transition: background .2s ease;
}
.faq-q:hover { background: var(--cream-100); }
.faq-q .toggle {
  color: var(--emerald-700);
  transition: transform .25s ease;
  font-size: 1.2rem;
}
.faq-item.open .faq-q .toggle { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 1.4rem;
  color: var(--charcoal-700);
  font-size: 0.97rem;
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding: 0 1.4rem 1.2rem;
}

/* ---------------------------------------------------------- */
/* Article cards                                              */
/* ---------------------------------------------------------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: all .3s ease;
  display: block;
  color: inherit;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(11,31,59,0.10);
  border-color: rgba(201,168,106,0.3);
}
.article-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-card .thumb .thumb-icon {
  font-size: 2.5rem;
  color: var(--gold-700);
  opacity: 0.6;
  transition: transform .4s ease;
}
.article-card:hover .thumb .thumb-icon {
  transform: scale(1.15);
}
.article-card .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(201,168,106,0.15), transparent 60%);
}
.article-card .body {
  padding: 1.4rem;
}
.article-card .cat-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-700);
  margin-bottom: 0.6rem;
}
.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.article-card .excerpt {
  font-size: 0.9rem;
  color: var(--charcoal-600);
  margin-bottom: 0.9rem;
  line-height: 1.55;
}
.article-card .meta {
  font-size: 0.8rem;
  color: var(--charcoal-500);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------------------------------------------------------- */
/* Author box                                                 */
/* ---------------------------------------------------------- */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--cream-200);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid var(--cream-300);
}
.author-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-600);
  font-weight: 800;
  font-size: 1.4rem;
  flex-shrink: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.author-info .name {
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.2rem;
}
.author-info .title {
  font-size: 0.85rem;
  color: var(--emerald-700);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.author-info .bio {
  font-size: 0.9rem;
  color: var(--charcoal-600);
  line-height: 1.6;
}
.author-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.author-creds span {
  background: rgba(31,111,84,0.08);
  color: var(--emerald-700);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

/* ---------------------------------------------------------- */
/* Breadcrumb                                                 */
/* ---------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--charcoal-500);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--charcoal-600); }
.breadcrumb a:hover { color: var(--emerald-700); }
.breadcrumb .sep { color: var(--charcoal-500); opacity: 0.5; }
.breadcrumb .current { color: var(--navy-900); font-weight: 600; }

/* ---------------------------------------------------------- */
/* Footer                                                     */
/* ---------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(251,244,238,0.7);
  padding: 4rem 0 1.5rem;
  border-top: 3px solid var(--gold-700);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p {
  color: rgba(251,244,238,0.6);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a {
  color: rgba(251,244,238,0.65);
  font-size: 0.9rem;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--gold-600); }

.footer-bottom {
  border-top: 1px solid rgba(255,253,249,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom .legal-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-bottom .legal-links a {
  color: rgba(251,244,238,0.55);
}
.footer-bottom .legal-links a:hover { color: var(--gold-600); }

/* ---------------------------------------------------------- */
/* Buttons                                                    */
/* ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.97rem;
  transition: all .25s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(31,111,84,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31,111,84,0.4);
  color: var(--white);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-700), var(--gold-600));
  color: var(--navy-900);
  box-shadow: 0 4px 14px rgba(201,168,106,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,106,0.4);
  color: var(--navy-900);
}
.btn-outline {
  background: transparent;
  color: var(--cream-200);
  border: 2px solid rgba(201,168,106,0.4);
}
.btn-outline:hover {
  background: rgba(201,168,106,0.1);
  border-color: var(--gold-600);
  color: var(--gold-600);
}

/* ---------------------------------------------------------- */
/* Trust badges strip                                         */
/* ---------------------------------------------------------- */
.trust-strip {
  background: var(--cream-200);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.trust-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  text-align: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--charcoal-700);
  font-size: 0.9rem;
  font-weight: 500;
}
.trust-item i { color: var(--emerald-700); font-size: 1.2rem; }

/* ---------------------------------------------------------- */
/* Page hero (sub pages)                                      */
/* ---------------------------------------------------------- */
.page-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(201,168,106,0.12) 0%, transparent 50%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--cream-200);
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.8rem; }
.page-hero p {
  color: rgba(251,244,238,0.8);
  font-size: 1.1rem;
  max-width: 640px;
}

/* ---------------------------------------------------------- */
/* Animations                                                 */
/* ---------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes countUp {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  animation: fadeInUp .6s ease forwards;
}
.stagger > *:nth-child(1) { animation-delay: .1s; }
.stagger > *:nth-child(2) { animation-delay: .2s; }
.stagger > *:nth-child(3) { animation-delay: .3s; }
.stagger > *:nth-child(4) { animation-delay: .4s; }
.stagger > *:nth-child(5) { animation-delay: .5s; }
.stagger > *:nth-child(6) { animation-delay: .6s; }

/* Number counter animation */
.count-anim {
  display: inline-block;
  animation: countUp .4s ease;
}

/* Floating label effect */
.float-label {
  position: relative;
}
.float-label input {
  width: 100%;
  padding: 1.3rem 1rem 0.5rem;
  border: 2px solid var(--cream-300);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--cream-100);
  outline: none;
  transition: all .2s ease;
}
.float-label input:focus {
  border-color: var(--emerald-600);
  background: var(--white);
}
.float-label label {
  position: absolute;
  left: 1rem;
  top: 0.95rem;
  color: var(--charcoal-500);
  font-size: 1rem;
  pointer-events: none;
  transition: all .2s ease;
}
.float-label input:focus + label,
.float-label input:not(:placeholder-shown) + label {
  top: 0.35rem;
  font-size: 0.72rem;
  color: var(--emerald-700);
  font-weight: 600;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald-700), var(--gold-700));
  z-index: 200;
  width: 0%;
  transition: width .1s ease;
}

/* Newsletter */
.newsletter-box {
  background:
    radial-gradient(circle at 90% 10%, rgba(201,168,106,0.15), transparent 50%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  color: var(--cream-200);
  position: relative;
  overflow: hidden;
}
.newsletter-box h2 { color: var(--white); margin-bottom: 0.8rem; }
.newsletter-box p {
  color: rgba(251,244,238,0.7);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0.5rem;
}
.newsletter-form input {
  flex: 1;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
}

/* Cookie notice */
.cookie-notice {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy-900);
  color: var(--cream-200);
  padding: 1rem 1.5rem;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 2px solid var(--gold-700);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform .4s ease;
}
.cookie-notice.show { transform: translateY(0); }
.cookie-notice p { margin: 0; font-size: 0.9rem; color: rgba(251,244,238,0.8); }
.cookie-notice .actions { display: flex; gap: 0.75rem; }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px; height: 48px;
  background: var(--emerald-700);
  color: var(--white);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  z-index: 90;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(31,111,84,0.3);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--emerald-600);
  transform: translateY(-3px);
}

/* Tabs (for multi-mode calculators) */
.calc-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--cream-200);
  padding: 0.4rem;
  border-radius: 12px;
}
.calc-tab {
  flex: 1;
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all .25s ease;
  color: var(--charcoal-600);
  font-family: inherit;
}
.calc-tab.active {
  background: var(--white);
  color: var(--navy-900);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Chart placeholder */
.chart-wrap {
  background: var(--cream-100);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 200px;
  padding-top: 1rem;
}
.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--emerald-600), var(--emerald-700));
  border-radius: 6px 6px 0 0;
  position: relative;
  min-height: 4px;
  transition: all .5s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.4rem;
}
.chart-bar .bar-val {
  font-size: 0.72rem;
  color: var(--white);
  font-weight: 700;
}
.chart-bar.alt {
  background: linear-gradient(180deg, var(--gold-600), var(--gold-700));
}
.chart-labels {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.chart-labels span {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--charcoal-500);
}

/* Misc */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }
.hidden { display: none; }
