/* =========================================================
   TRADINGPEDIA — Design System
   Inspired by NerdWallet / Money.com editorial aesthetic
   ========================================================= */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-900); text-decoration: underline; }

/* ---------- Design tokens ---------- */
:root {
  /* Brand: trust green, with neutral surface */
  --brand-50:  #ECFDF5;
  --brand-100: #D1FAE5;
  --brand-300: #6EE7B7;
  --brand-500: #10B981;
  --brand-700: #047857;
  --brand-900: #064E3B;

  /* Neutrals */
  --bg:        #FAFAF7;
  --surface:   #FFFFFF;
  --ink:       #18181B;
  --ink-2:     #3F3F46;
  --ink-3:     #71717A;
  --ink-4:     #A1A1AA;
  --line:      #E4E4E7;
  --line-2:    #F4F4F5;

  /* Category accent colors (NerdWallet style) */
  --cat-credit-cards:        #DC2626;
  --cat-credit-cards-bg:     #FEF2F2;
  --cat-banking:             #047857;
  --cat-banking-bg:          #ECFDF5;
  --cat-trading-investing:   #1D4ED8;
  --cat-trading-investing-bg:#EFF6FF;
  --cat-loans:               #B45309;
  --cat-loans-bg:            #FEF3C7;
  --cat-insurance:           #7C3AED;
  --cat-insurance-bg:        #F5F3FF;
  --cat-advisors:            #BE185D;
  --cat-advisors-bg:         #FDF2F8;

  /* Typography */
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans:  'Inter', sans-serif;

  /* Layout */
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --container: 1200px;
}

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.section-head h2 { font-family: var(--font-serif); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.view-all { font-size: 14px; font-weight: 500; color: var(--brand-700); }

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--brand-700);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; gap: 32px;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--brand-700);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.primary-nav { flex: 1; }
.primary-nav > ul { list-style: none; display: flex; gap: 4px; align-items: center; }
.nav-item { position: relative; }
.nav-item > a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 6px;
  transition: background .15s;
}
.nav-item > a:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }

.dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 240px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all .2s;
  z-index: 10;
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown ul { list-style: none; }
.dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: 6px;
}
.dropdown a:hover { background: var(--line-2); text-decoration: none; }

.search-mini {
  display: flex; align-items: center;
  background: var(--line-2);
  border-radius: 100px;
  padding: 6px 6px 6px 16px;
  transition: background .15s;
}
.search-mini:focus-within { background: var(--surface); box-shadow: 0 0 0 2px var(--brand-300); }
.search-mini input {
  border: 0; background: transparent; font-size: 14px; width: 180px; outline: none;
}
.search-mini button {
  border: 0; background: var(--brand-700); color: white;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--bg) 100%);
  padding: 80px 0 64px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 760px;
  margin: 0 auto 20px;
  color: var(--ink);
}
.hero-sub {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.5;
}
.hero-search {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 6px 6px 24px;
  box-shadow: var(--shadow);
  max-width: 540px;
  width: 100%;
}
.hero-search input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 16px; padding: 12px 0;
}
.hero-search button {
  border: 0; background: var(--brand-700); color: white;
  padding: 12px 28px; border-radius: 100px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background .15s;
}
.hero-search button:hover { background: var(--brand-900); }

.hero-pills {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 32px;
}
.hero-pills a {
  display: inline-block;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .15s;
}
.hero-pills a:hover {
  border-color: var(--brand-500);
  color: var(--brand-700);
  text-decoration: none;
}

/* ---------- Cards ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.featured-side {
  display: flex; flex-direction: column; gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .2s;
}
.card:hover { border-color: var(--ink-4); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-link { display: block; padding: 24px; color: inherit; height: 100%; }
.card-link:hover { text-decoration: none; }

.card h3, .card h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 12px 0 8px;
}
.card h3 { font-size: 20px; line-height: 1.3; }
.card h4 { font-size: 16px; line-height: 1.35; }

.card-hero { background: var(--ink); color: white; }
.card-hero .card-link { padding: 40px; min-height: 320px; display: flex; flex-direction: column; justify-content: flex-end; }
.card-hero h3 { font-size: 32px; color: white; line-height: 1.15; margin-bottom: 12px; }
.card-hero .card-excerpt { color: rgba(255,255,255,0.75); font-size: 15px; }
.card-hero .card-meta { color: rgba(255,255,255,0.5); }
.card-hero .cat-pill { background: rgba(255,255,255,0.15); color: white; }

.card-compact .card-link { padding: 16px 20px; }
.card-compact h4 { font-size: 15px; margin: 8px 0 4px; }

.card-excerpt {
  font-size: 14px; color: var(--ink-3); line-height: 1.5;
  margin-bottom: 16px;
}
.card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-4);
  font-weight: 500;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ---------- Category pill ---------- */
.cat-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--line-2);
  color: var(--ink-2);
}
.cat-pill[data-cat="credit-cards"]        { background: var(--cat-credit-cards-bg);        color: var(--cat-credit-cards); }
.cat-pill[data-cat="banking"]             { background: var(--cat-banking-bg);             color: var(--cat-banking); }
.cat-pill[data-cat="trading-investing"]   { background: var(--cat-trading-investing-bg);   color: var(--cat-trading-investing); }
.cat-pill[data-cat="loans"]               { background: var(--cat-loans-bg);               color: var(--cat-loans); }
.cat-pill[data-cat="insurance"]           { background: var(--cat-insurance-bg);           color: var(--cat-insurance); }
.cat-pill[data-cat="advisors"], .cat-pill[data-cat="financial-advisors"] { background: var(--cat-advisors-bg); color: var(--cat-advisors); }

/* ---------- Category tiles ---------- */
.section-cats h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.cat-tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: left;
  color: inherit;
  transition: all .2s;
}
.cat-tile:hover { border-color: var(--brand-500); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.cat-icon { font-size: 32px; margin-bottom: 12px; }
.cat-tile h3 {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  margin-bottom: 6px; color: var(--ink);
}
.cat-tile p { font-size: 13px; color: var(--ink-3); }

/* ---------- Newsletter CTA ---------- */
.newsletter-cta {
  background: var(--ink);
  color: white;
  padding: 56px 0;
  margin-top: 64px;
}
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.newsletter-cta h2 {
  font-family: var(--font-serif); font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.newsletter-cta p { color: rgba(255,255,255,0.7); }
.newsletter-form {
  display: flex;
  background: white;
  border-radius: 8px;
  padding: 4px;
  width: 100%;
  max-width: 420px;
  min-width: 0;          /* prevents flex blow-out */
  box-sizing: border-box;
}
.newsletter-form input {
  flex: 1 1 auto;
  min-width: 0;          /* lets input shrink instead of overflowing */
  border: 0;
  outline: none;
  padding: 10px 14px;
  font-size: 14px;
  background: transparent;
}
.newsletter-form button {
  flex: 0 0 auto;
  border: 0;
  background: var(--brand-700);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--brand-900); }

/* Stacked variant (sidebar / mobile) */
.newsletter-form-stacked {
  flex-direction: column;
  background: transparent;
  padding: 0;
  gap: 8px;
  max-width: 100%;
}
.newsletter-form-stacked input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
}
.newsletter-form-stacked button { padding: 10px; }

/* Narrow screens: stack horizontally smaller, tighter padding */
@media (max-width: 480px) {
  .newsletter-form { padding: 3px; }
  .newsletter-form input  { padding: 8px 10px; font-size: 13px; }
  .newsletter-form button { padding: 7px 12px; font-size: 12px; }
}

/* ---------- Article page ---------- */
.article-page { padding: 32px 0 80px; }

.breadcrumb { margin-bottom: 32px; }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--ink-3);
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb span[aria-current] { color: var(--ink); font-weight: 500; }

.article-header { max-width: 760px; margin: 0 auto 48px; text-align: left; }
.article-header .cat-pill { margin-bottom: 16px; }
.article-header h1 {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--ink);
}
.article-lede {
  font-size: 20px; line-height: 1.55; color: var(--ink-2);
  margin-bottom: 32px;
  font-family: var(--font-serif);
}

.article-byline {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 16px;
}
.byline-author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-700); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  text-transform: uppercase;
}
.byline-by { font-size: 13px; color: var(--ink-3); }
.byline-author strong { display: block; font-size: 14px; color: var(--ink); }
.byline-meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  max-width: 1100px;
  margin: 0 auto;
}
.article-body { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.article-body > * { margin-bottom: 20px; max-width: 720px; }
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 48px 0 16px;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 32px 0 12px;
}
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }

/* TOC */
.toc {
  background: var(--brand-50);
  border-left: 4px solid var(--brand-500);
  border-radius: 4px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.toc strong { display: block; margin-bottom: 12px; color: var(--brand-900); font-size: 14px; }
.toc ol { padding-left: 20px; margin: 0; }
.toc li { font-size: 14px; margin-bottom: 6px; line-height: 1.5; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand-700); text-decoration: underline; }

/* Comparison table */
.table-wrapper { overflow-x: auto; margin: 24px 0; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.comparison-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.comparison-table thead { background: var(--line-2); }
.comparison-table th {
  text-align: left; padding: 14px 16px;
  font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.comparison-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: var(--line-2); }

/* FAQ */
.faq-block { margin: 32px 0; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--surface);
}
.faq-item summary {
  padding: 18px 20px;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--ink-3);
  transition: transform .2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item p { padding: 16px 20px; color: var(--ink-2); }

.checklist { list-style: none !important; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  color: var(--brand-700); font-weight: 700;
}

/* Tags */
.article-tags {
  margin: 40px 0 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--line-2);
  color: var(--ink-2);
  border-radius: 100px;
  font-size: 12px;
  margin: 0 4px;
}
.tag:hover { background: var(--brand-100); color: var(--brand-700); text-decoration: none; }

.article-disclaimer {
  margin-top: 48px;
  padding: 20px 24px;
  background: var(--line-2);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* Sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 88px; align-self: start; }
.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-box h4 { font-family: var(--font-serif); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.sidebar-box p { font-size: 14px; color: var(--ink-3); line-height: 1.5; margin-bottom: 16px; }
.sidebar-newsletter { background: var(--brand-50); border-color: var(--brand-100); }

.related-articles { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--line); }
.related-articles h2 { font-family: var(--font-serif); font-size: 28px; font-weight: 700; margin-bottom: 24px; }

/* ---------- Category page ---------- */
.category-page { padding: 48px 0 80px; }
.category-header { max-width: 760px; margin-bottom: 32px; }
.category-header h1 {
  font-family: var(--font-serif); font-size: 44px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.category-desc { font-size: 18px; color: var(--ink-2); line-height: 1.5; }

.subcategory-nav { margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.subcategory-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.subcategory-nav a {
  display: block; padding: 12px 16px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-3); border-bottom: 2px solid transparent;
}
.subcategory-nav a:hover { color: var(--brand-700); border-color: var(--brand-500); text-decoration: none; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line);
}
.pagination a {
  padding: 10px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 500; color: var(--ink-2);
}
.pagination a:hover { background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-700); text-decoration: none; }
.page-current { font-size: 14px; color: var(--ink-3); }

/* ---------- Search page ---------- */
.search-page { padding: 48px 0 80px; max-width: 800px; margin: 0 auto; }
.search-header h1 { font-family: var(--font-serif); font-size: 36px; font-weight: 700; margin-bottom: 24px; }
.search-form { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: 4px 4px 4px 20px; }
.search-form input { flex: 1; border: 0; outline: none; font-size: 16px; padding: 12px 0; background: transparent; }
.search-form button { border: 0; background: var(--brand-700); color: white; padding: 12px 28px; border-radius: 100px; font-weight: 600; cursor: pointer; }
.search-form button:hover { background: var(--brand-900); }
.search-meta { color: var(--ink-3); margin: 24px 0; }
.search-result { padding: 24px 0; border-bottom: 1px solid var(--line); }
.search-result .cat-pill { margin-bottom: 8px; }
.search-result h2 { font-family: var(--font-serif); font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.search-result h2 a { color: var(--ink); }
.search-result h2 a:hover { color: var(--brand-700); }
.search-result p { color: var(--ink-3); margin-bottom: 8px; }

.empty-state { text-align: center; padding: 64px 24px; color: var(--ink-3); }
.search-hint { color: var(--ink-3); margin-top: 24px; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 120px 0; }
.error-page h1 { font-family: var(--font-serif); font-size: 44px; font-weight: 700; margin-bottom: 16px; }
.error-page p { font-size: 18px; color: var(--ink-3); margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }
.error-actions { display: flex; gap: 12px; justify-content: center; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: all .15s;
}
.btn-primary { background: var(--brand-700); color: white; }
.btn-primary:hover { background: var(--brand-900); text-decoration: none; }
.btn-secondary { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-secondary:hover { background: var(--line-2); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
}
.footer-brand .logo-text { color: white; }
.footer-brand .logo-mark { background: var(--brand-500); }
.footer-tagline { margin-top: 16px; font-size: 14px; line-height: 1.5; max-width: 280px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-cols h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
  font-weight: 600; color: white; margin-bottom: 16px;
}
.footer-cols ul { list-style: none; }
.footer-cols li { margin-bottom: 8px; }
.footer-cols a { font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-cols a:hover { color: white; text-decoration: none; }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}
.footer-bottom .disclaimer { margin-top: 12px; font-size: 12px; color: rgba(255,255,255,0.4); max-width: 800px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-sidebar { position: static; }
  .featured-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .primary-nav, .search-mini { display: none; }
  .nav-toggle { display: flex; flex-direction: column; gap: 4px; background: transparent; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 1px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 17px; }
  .article-header h1 { font-size: 32px; }
  .newsletter-inner { flex-direction: column; align-items: stretch; gap: 24px; }
  .newsletter-form { min-width: 0; width: 100%; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 28px; }
  .section { padding: 40px 0; }
}

/* ============================================================
   NEW: Card thumbnails (text-based since no images)
   ============================================================ */

.card-thumb { padding: 0; overflow: hidden; }
.card-thumb .card-link { padding: 0; display: flex; flex-direction: column; height: 100%; }
.card-thumb .card-body { padding: 20px 24px 24px; }

.card-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-900) 100%);
  color: white;
  overflow: hidden;
}
.card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08), transparent 40%);
}
.card-visual-init {
  font-family: var(--font-serif);
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative;
  z-index: 2;
  opacity: 0.95;
}
.card-visual-cat {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  z-index: 2;
}

.card-visual[data-cat="credit-cards"]      { background: linear-gradient(135deg, #DC2626 0%, #7F1D1D 100%); }
.card-visual[data-cat="banking"]           { background: linear-gradient(135deg, #047857 0%, #064E3B 100%); }
.card-visual[data-cat="trading-investing"] { background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%); }
.card-visual[data-cat="loans"]             { background: linear-gradient(135deg, #B45309 0%, #78350F 100%); }
.card-visual[data-cat="insurance"]         { background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%); }
.card-visual[data-cat="financial-advisors"]{ background: linear-gradient(135deg, #BE185D 0%, #831843 100%); }
.card-visual[data-cat="advisors"]          { background: linear-gradient(135deg, #BE185D 0%, #831843 100%); }

/* ============================================================
   NEW: "Latest by category" section
   ============================================================ */

.section-by-cat .section-head {
  display: block;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 40px;
}
.section-by-cat .section-head h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-sub {
  font-size: 16px;
  color: var(--ink-3);
}

.by-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.by-cat-column {
  display: flex;
  flex-direction: column;
}

.by-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 3px solid var(--brand-700);
}
.by-cat-header h3 { margin: 0; font-family: var(--font-serif); font-size: 18px; font-weight: 700; }
.by-cat-header h3 a { color: var(--ink); }
.by-cat-header h3 a:hover { color: var(--brand-700); text-decoration: none; }
.by-cat-more { font-size: 12px; font-weight: 600; color: var(--brand-700); text-transform: uppercase; letter-spacing: 0.5px; }

.by-cat-header[data-cat="credit-cards"]      { border-bottom-color: var(--cat-credit-cards); }
.by-cat-header[data-cat="banking"]           { border-bottom-color: var(--cat-banking); }
.by-cat-header[data-cat="trading-investing"] { border-bottom-color: var(--cat-trading-investing); }
.by-cat-header[data-cat="loans"]             { border-bottom-color: var(--cat-loans); }
.by-cat-header[data-cat="insurance"]         { border-bottom-color: var(--cat-insurance); }
.by-cat-header[data-cat="financial-advisors"]{ border-bottom-color: var(--cat-advisors); }

.by-cat-list { list-style: none; padding: 0; margin: 0; }
.by-cat-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.by-cat-list li:last-child { border-bottom: none; }
.by-cat-item { display: block; color: inherit; }
.by-cat-item:hover { text-decoration: none; }
.by-cat-item:hover h4 { color: var(--brand-700); }
.by-cat-item h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 6px;
  transition: color .15s;
}
.by-cat-meta { font-size: 12px; color: var(--ink-4); display: flex; gap: 6px; }

@media (max-width: 480px) {
  .card-visual-init { font-size: 64px; }
}

/* ============================================================
   NEW v4: Additional category colors
   ============================================================ */
:root {
  --cat-mortgages-home:       #0E7490;
  --cat-mortgages-home-bg:    #ECFEFF;
  --cat-personal-finance:     #475569;
  --cat-personal-finance-bg:  #F8FAFC;
  --cat-investing:            #1D4ED8;
  --cat-investing-bg:         #EFF6FF;
}

.cat-pill[data-cat="mortgages-home"]   { background: var(--cat-mortgages-home-bg);   color: var(--cat-mortgages-home); }
.cat-pill[data-cat="personal-finance"] { background: var(--cat-personal-finance-bg); color: var(--cat-personal-finance); }
.cat-pill[data-cat="investing"]        { background: var(--cat-investing-bg);        color: var(--cat-investing); }

.card-visual[data-cat="mortgages-home"]   { background: linear-gradient(135deg, #0E7490 0%, #164E63 100%); }
.card-visual[data-cat="personal-finance"] { background: linear-gradient(135deg, #475569 0%, #1E293B 100%); }
.card-visual[data-cat="investing"]        { background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%); }

.by-cat-header[data-cat="mortgages-home"]   { border-bottom-color: var(--cat-mortgages-home); }
.by-cat-header[data-cat="personal-finance"] { border-bottom-color: var(--cat-personal-finance); }
.by-cat-header[data-cat="investing"]        { border-bottom-color: var(--cat-investing); }

/* ============================================================
   v4.1: Rich article sidebar
   ============================================================ */

/* Sidebar nav (subcategories of current parent) */
.sidebar-nav {
  border-left: 4px solid var(--brand-700);
  padding-left: 20px;
}
.sidebar-nav[data-cat="credit-cards"]      { border-left-color: var(--cat-credit-cards); }
.sidebar-nav[data-cat="banking"]           { border-left-color: var(--cat-banking); }
.sidebar-nav[data-cat="investing"]         { border-left-color: var(--cat-investing); }
.sidebar-nav[data-cat="loans"]             { border-left-color: var(--cat-loans); }
.sidebar-nav[data-cat="mortgages-home"]    { border-left-color: var(--cat-mortgages-home); }
.sidebar-nav[data-cat="insurance"]         { border-left-color: var(--cat-insurance); }
.sidebar-nav[data-cat="personal-finance"]  { border-left-color: var(--cat-personal-finance); }
.sidebar-nav[data-cat="financial-advisors"]{ border-left-color: var(--cat-advisors); }

.sidebar-nav ul { list-style: none; padding: 0; margin: 0 0 14px; }
.sidebar-nav li { margin: 0; }
.sidebar-nav li a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  transition: color .15s;
  text-decoration: none;
}
.sidebar-nav li:last-child a { border-bottom: none; }
.sidebar-nav li a:hover { color: var(--brand-700); }
.sidebar-nav li.is-active a {
  font-weight: 600;
  color: var(--brand-700);
}
.sidebar-more {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-700);
  margin-top: 6px;
}

/* Sidebar list (top guides, more from Tradingpedia) */
.sidebar-list h4 { margin-bottom: 14px; }
.sidebar-list ol,
.sidebar-list ul {
  list-style: none;
  counter-reset: sidelist;
  padding: 0;
  margin: 0;
}
.sidebar-list ol li {
  position: relative;
  padding: 14px 0 14px 38px;
  border-bottom: 1px solid var(--line-2);
  counter-increment: sidelist;
}
.sidebar-list ol li::before {
  content: counter(sidelist);
  position: absolute;
  left: 0;
  top: 14px;
  width: 26px; height: 26px;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-list ol li:last-child,
.sidebar-list ul li:last-child { border-bottom: none; }
.sidebar-list ol li a,
.sidebar-list ul li a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
  text-decoration: none;
}
.sidebar-list ol li a:hover,
.sidebar-list ul li a:hover { color: var(--brand-700); }
.sidebar-meta {
  display: block;
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 4px;
}

/* "More from Tradingpedia" feed style */
.sidebar-feed li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
}
.sidebar-feed li:last-child { border-bottom: none; }
.sidebar-feed li a { display: block; }
.sidebar-feed-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 6px 0 4px;
}

/* Compact category pill for sidebar */
.cat-pill-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Popular categories list with colored dots */
.sidebar-cats ul { list-style: none; padding: 0; margin: 0; }
.sidebar-cats li {
  border-bottom: 1px solid var(--line-2);
}
.sidebar-cats li:last-child { border-bottom: none; }
.sidebar-cats li a {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s;
}
.sidebar-cats li a:hover { color: var(--brand-700); }
.cat-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 12px;
  background: var(--ink-4);
  flex-shrink: 0;
}
.cat-dot[data-cat="credit-cards"]      { background: var(--cat-credit-cards); }
.cat-dot[data-cat="banking"]           { background: var(--cat-banking); }
.cat-dot[data-cat="investing"]         { background: var(--cat-investing); }
.cat-dot[data-cat="loans"]             { background: var(--cat-loans); }
.cat-dot[data-cat="mortgages-home"]    { background: var(--cat-mortgages-home); }
.cat-dot[data-cat="insurance"]         { background: var(--cat-insurance); }
.cat-dot[data-cat="personal-finance"]  { background: var(--cat-personal-finance); }
.cat-dot[data-cat="financial-advisors"]{ background: var(--cat-advisors); }

/* Tighten sidebar boxes spacing */
.article-sidebar .sidebar-box { padding: 22px 22px 20px; }
.article-sidebar .sidebar-box h4 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--ink);
}

/* On mobile, sidebar comes after content (existing rule) but tighten gaps */
@media (max-width: 980px) {
  .article-sidebar { gap: 16px; }
  .article-sidebar .sidebar-box { padding: 18px; }
}

/* ============================================================
   v4.2: Mobile sidebar (off-canvas) + responsive header
   ============================================================ */

/* Burger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Search toggle for mobile (hidden on desktop) */
.search-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

/* Mobile search bar (collapsible) */
.mobile-search {
  display: none;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line-2);
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.mobile-search.is-open {
  max-height: 80px;
  padding: 12px 0;
}
.mobile-search form { display: flex; gap: 8px; }
.mobile-search input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.mobile-search button {
  padding: 10px 16px;
  background: var(--brand-700);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   Off-canvas sidebar
   ============================================================ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 998;
  opacity: 0;
  transition: opacity .2s ease;
}
.mobile-overlay.is-visible { opacity: 1; }

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 84%;
  max-width: 360px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-card);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 24px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
}
.mobile-sidebar.is-open { transform: translateX(0); }

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}
.mobile-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
}
.mobile-sidebar-logo .logo-mark {
  width: 32px;
  height: 32px;
  background: var(--brand-700);
  color: white;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.mobile-sidebar-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background .15s;
}
.mobile-sidebar-close:hover { background: var(--line-2); }

.mobile-sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}
.mobile-sidebar-search svg { color: var(--ink-4); flex-shrink: 0; }
.mobile-sidebar-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 6px 0;
  color: var(--ink);
}

.mobile-sidebar-nav {
  flex: 1;
  padding: 8px 0 0;
  overflow-y: auto;
}
.mobile-sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-sidebar-nav > ul > li { border-bottom: 1px solid var(--line-2); }

.mobile-nav-link,
.mobile-nav-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.mobile-nav-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 14px;
  flex-shrink: 0;
  background: var(--ink-4);
}
.mobile-nav-dot[data-cat="credit-cards"]       { background: var(--cat-credit-cards); }
.mobile-nav-dot[data-cat="banking"]            { background: var(--cat-banking); }
.mobile-nav-dot[data-cat="investing"]          { background: var(--cat-investing); }
.mobile-nav-dot[data-cat="loans"]              { background: var(--cat-loans); }
.mobile-nav-dot[data-cat="mortgages-home"]     { background: var(--cat-mortgages-home); }
.mobile-nav-dot[data-cat="insurance"]          { background: var(--cat-insurance); }
.mobile-nav-dot[data-cat="personal-finance"]   { background: var(--cat-personal-finance); }
.mobile-nav-dot[data-cat="financial-advisors"] { background: var(--cat-advisors); }

.mobile-nav-label { flex: 1; }
.mobile-nav-chevron {
  color: var(--ink-4);
  transition: transform .2s;
}
.mobile-nav-item.is-expanded .mobile-nav-chevron { transform: rotate(180deg); }
.mobile-nav-link:hover,
.mobile-nav-toggle:hover { background: var(--bg); }

.mobile-sub {
  background: var(--bg);
  padding: 4px 0;
}
.mobile-sub li a {
  display: block;
  padding: 10px 20px 10px 44px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s;
}
.mobile-sub li a:hover { color: var(--brand-700); }
.mobile-sub-all {
  font-weight: 600;
  color: var(--brand-700) !important;
}

.mobile-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--line-2);
  flex-shrink: 0;
}
.mobile-footer-link {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
}
.mobile-footer-link:hover { color: var(--brand-700); }
.mobile-sidebar-copyright {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-4);
}

body.no-scroll { overflow: hidden; }

/* ============================================================
   Responsive breakpoints
   ============================================================ */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .search-toggle { display: flex; }
  .mobile-search { display: block; }
  .primary-nav { display: none; }
  .search-mini { display: none; }

  .header-inner {
    gap: 8px;
  }
  .logo-text { font-size: 17px; }
}

@media (min-width: 981px) {
  .mobile-sidebar,
  .mobile-overlay { display: none !important; }
}

/* ============================================================
   Static pages (contact, privacy, terms, about, disclaimer)
   ============================================================ */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.static-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.static-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin: 12px 0 16px;
  color: var(--ink);
}
.static-lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.static-body { font-size: 16px; line-height: 1.7; color: var(--ink); }
.static-body h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 14px;
  color: var(--ink);
}
.static-body p { margin: 0 0 14px; }
.static-body a { color: var(--brand-700); }
.static-body a:hover { text-decoration: underline; }

.static-prose .checklist li {
  margin-bottom: 6px;
}

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 8px 0 40px;
}
.contact-card {
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  transition: border-color .2s, transform .2s;
}
.contact-card:hover {
  border-color: var(--brand-700);
  transform: translateY(-2px);
}
.contact-icon {
  font-size: 24px;
  margin-bottom: 10px;
}
.contact-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.contact-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
}
.contact-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-700);
  word-break: break-all;
}

.contact-faq, .contact-response {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line-2);
}

/* ============================================================
   Tag page
   ============================================================ */
.tag-header { padding: 32px 0 24px; }
.tag-hero {
  text-align: center;
  padding: 28px 0;
  margin-bottom: 32px;
}
.tag-label {
  display: inline-block;
  padding: 4px 12px;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.tag-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 8px;
  color: var(--ink);
}
.tag-count {
  font-size: 15px;
  color: var(--ink-3);
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--line-2);
}
.empty-state h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 0 0 10px;
  color: var(--ink);
}
.empty-state p {
  color: var(--ink-3);
  margin: 0 0 24px;
}

/* ============================================================
   404 error page
   ============================================================ */
.error-page {
  padding: 60px 24px;
}
.error-hero {
  text-align: center;
  margin-bottom: 60px;
}
.error-code {
  font-family: var(--font-serif);
  font-size: clamp(80px, 18vw, 140px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-700), #10B981);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.error-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 14px;
  color: var(--ink);
}
.error-lead {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.error-path {
  font-size: 13px;
  color: var(--ink-4);
  margin: 0 0 28px;
}
.error-path code {
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
}
.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .15s;
  cursor: pointer;
}
.btn-primary { background: var(--brand-700); color: white; }
.btn-primary:hover { background: var(--brand-800); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--brand-700); color: var(--brand-700); }

.error-suggestions, .error-cats {
  margin-top: 48px;
}
.error-suggestions h2, .error-cats h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  text-align: center;
  margin: 0 0 24px;
  color: var(--ink);
}

/* ============================================================
   Breadcrumb (used in static pages, tag, errors)
   ============================================================ */
.breadcrumb {
  font-size: 13px;
  color: var(--ink-4);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--ink-3);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb .separator {
  margin: 0 6px;
  color: var(--ink-4);
}

/* ============================================================
   v4.2: Mobile sidebar (off-canvas drawer)
   Behavior:
     - Desktop (>= 980px): sidebar + hamburger + search-toggle HIDDEN.
                           primary-nav + search-mini VISIBLE.
     - Mobile  (<  980px): sidebar slides in from left when toggled.
                           hamburger + search-toggle VISIBLE.
                           primary-nav + search-mini HIDDEN.
   ============================================================ */

/* ---- DESKTOP (default): hide everything mobile ---- */
.nav-toggle,
.search-toggle,
.mobile-overlay,
.mobile-sidebar,
.mobile-search {
  display: none;
}

/* ---- MOBILE: < 980px ---- */
@media (max-width: 980px) {

  /* Hide desktop nav and inline search */
  .primary-nav,
  .search-mini {
    display: none !important;
  }

  /* Show mobile controls in the header */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
  }
  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    background: var(--surface-2);
    outline: none;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform .25s, opacity .25s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--ink);
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
  }
  .search-toggle:hover,
  .search-toggle:focus-visible {
    background: var(--surface-2);
    outline: none;
  }

  /* Header layout on mobile: hamburger | logo | search-toggle */
  .header-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
  }
  .logo {
    flex: 1;
    justify-content: flex-start;
  }
  .logo-text {
    font-size: 18px;
  }

  /* Mobile collapsible search bar (below header) */
  .mobile-search {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--line-2);
    transition: max-height .3s ease;
  }
  .mobile-search.is-open {
    max-height: 80px;
  }
  .mobile-search .container {
    padding: 12px 16px;
  }
  .mobile-search form {
    display: flex;
    gap: 8px;
  }
  .mobile-search input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 16px;
    background: var(--surface-2);
  }
  .mobile-search input[type="search"]:focus {
    border-color: var(--brand-700);
    outline: none;
  }
  .mobile-search button {
    padding: 0 16px;
    background: var(--brand-700);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
  }

  /* ===== Overlay backdrop ===== */
  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: background .25s, opacity .25s, visibility 0s linear .25s;
  }
  .mobile-overlay.is-open {
    background: rgba(15, 23, 42, 0.55);
    opacity: 1;
    visibility: visible;
    transition: background .25s, opacity .25s, visibility 0s linear 0s;
  }

  /* ===== Sidebar drawer ===== */
  .mobile-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: min(85vw, 340px);
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 40px rgba(0,0,0,.15);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-sidebar.is-open {
    transform: translateX(0);
  }

  /* Sidebar header (logo + close button) */
  .mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-2);
    flex-shrink: 0;
  }
  .mobile-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
  }
  .mobile-sidebar-logo .logo-mark {
    width: 32px;
    height: 32px;
    background: var(--brand-700);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
  }
  .mobile-sidebar-logo .logo-text {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 18px;
  }
  .mobile-sidebar-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--ink-2);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
  }
  .mobile-sidebar-close:hover,
  .mobile-sidebar-close:focus-visible {
    background: var(--surface-2);
    outline: none;
  }

  /* Sidebar search */
  .mobile-sidebar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-2);
    background: var(--surface-2);
    flex-shrink: 0;
  }
  .mobile-sidebar-search svg {
    color: var(--ink-4);
    flex-shrink: 0;
  }
  .mobile-sidebar-search input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 15px;
    color: var(--ink);
    outline: none;
  }
  .mobile-sidebar-search input::placeholder {
    color: var(--ink-4);
  }

  /* Sidebar nav (categories with accordion) */
  .mobile-sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
  }
  .mobile-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .mobile-nav-item {
    border-bottom: 1px solid var(--line-2);
  }
  .mobile-nav-item:last-child {
    border-bottom: none;
  }
  .mobile-nav-toggle,
  .mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
  }
  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus-visible,
  .mobile-nav-link:hover,
  .mobile-nav-link:focus-visible {
    background: var(--surface-2);
    outline: none;
  }
  .mobile-nav-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ink-4);
    flex-shrink: 0;
  }
  .mobile-nav-dot[data-cat="credit-cards"]       { background: var(--cat-credit-cards); }
  .mobile-nav-dot[data-cat="banking"]            { background: var(--cat-banking); }
  .mobile-nav-dot[data-cat="investing"]          { background: var(--cat-investing); }
  .mobile-nav-dot[data-cat="loans"]              { background: var(--cat-loans); }
  .mobile-nav-dot[data-cat="mortgages-home"]     { background: var(--cat-mortgages-home); }
  .mobile-nav-dot[data-cat="insurance"]          { background: var(--cat-insurance); }
  .mobile-nav-dot[data-cat="personal-finance"]   { background: var(--cat-personal-finance); }
  .mobile-nav-dot[data-cat="financial-advisors"] { background: var(--cat-advisors); }
  .mobile-nav-label {
    flex: 1;
  }
  .mobile-nav-chevron {
    color: var(--ink-4);
    transition: transform .25s;
    flex-shrink: 0;
  }
  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-chevron {
    transform: rotate(180deg);
  }

  .mobile-sub {
    background: var(--surface-2);
    padding: 4px 0 8px;
  }
  .mobile-sub[hidden] {
    display: none;
  }
  .mobile-sub li a {
    display: block;
    padding: 10px 20px 10px 44px;
    font-size: 14px;
    color: var(--ink-2);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
  }
  .mobile-sub li a:hover,
  .mobile-sub li a:focus-visible {
    background: var(--surface);
    color: var(--brand-700);
    outline: none;
  }
  .mobile-sub li a.mobile-sub-all {
    font-weight: 600;
    color: var(--brand-700);
    border-left-color: var(--brand-700);
  }

  /* Sidebar footer */
  .mobile-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--line-2);
    background: var(--surface-2);
    flex-shrink: 0;
  }
  .mobile-footer-link {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 500;
  }
  .mobile-footer-link:hover {
    color: var(--brand-700);
  }
  .mobile-sidebar-copyright {
    margin-top: 12px;
    font-size: 12px;
    color: var(--ink-4);
  }

  /* Prevent body scroll when sidebar is open */
  body.has-sidebar-open {
    overflow: hidden;
  }
}

/* ---- TINY MOBILE (< 380px): smaller fonts ---- */
@media (max-width: 380px) {
  .logo-text {
    font-size: 16px;
  }
  .mobile-sidebar {
    width: 90vw;
  }
}

/* ============================================================
   v4.3: Static pages (About, Privacy, Terms, Contact)
   ============================================================ */
.page-content {
  max-width: 760px;
  padding: 40px 20px 60px;
}
.static-page {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}
.static-page .page-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.static-page h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}
.static-page .page-lead {
  font-size: 18px;
  color: var(--ink-3);
  margin: 0;
}
.static-page section {
  margin-bottom: 32px;
}
.static-page h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 14px;
  letter-spacing: -0.01em;
}
.static-page h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 10px;
}
.static-page p {
  margin: 0 0 14px;
}
.static-page ul, .static-page ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.static-page li {
  margin-bottom: 6px;
}
.static-page a {
  color: var(--brand-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.static-page a:hover { color: var(--brand-900); }
.page-updated {
  margin-top: 40px;
  font-size: 13px;
  color: var(--ink-4);
  font-style: italic;
}

/* Disclaimer box (for /terms financial disclaimer) */
.disclaimer-box {
  background: #FEF3C7;
  border-left: 4px solid #D97706;
  padding: 18px 22px;
  border-radius: 4px;
  margin: 16px 0;
}
.disclaimer-box p { margin: 0 0 10px; }
.disclaimer-box p:last-child { margin: 0; }
.disclaimer-box strong { color: #92400E; }

/* Contact page grid of email cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 30px;
}
.contact-card {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 18px 20px;
}
.contact-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-weight: 600;
}
.contact-card p {
  margin: 4px 0;
  font-size: 14px;
}
.contact-card p:first-of-type { font-weight: 500; }
.contact-card p:last-of-type { font-size: 13px; color: var(--ink-3); }

/* Contact form */
.contact-form {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 24px;
  margin-top: 20px;
}
.form-row {
  margin-bottom: 18px;
}
.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-row label span {
  color: #DC2626;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
}
.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--brand-700);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}
.form-row textarea {
  resize: vertical;
  min-height: 100px;
}
.form-row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-4);
}
.btn-primary {
  background: var(--brand-700);
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--brand-900); }
.form-disclaimer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-4);
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 14px;
}
.alert ul { margin: 6px 0 0 22px; }
.alert-success {
  background: #DCFCE7;
  color: #166534;
  border-left: 4px solid #16A34A;
}
.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border-left: 4px solid #DC2626;
}

@media (max-width: 600px) {
  .contact-grid { grid-template-columns: 1fr; }
  .static-page h1 { font-size: 28px; }
  .static-page h2 { font-size: 19px; }
}

/* ============================================================
   v4.4: AdSense ad slots — clean, labeled, responsive
   ============================================================ */

.ad-wrapper {
  position: relative;
  margin: 24px 0;
  padding: 24px 16px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  text-align: center;
  min-height: 100px;
  overflow: hidden;
}

.ad-wrapper .ad-label {
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-4);
  opacity: 0.7;
}

/* AdSense <ins> reset — let Google's script do its thing */
.ad-wrapper ins.adsbygoogle {
  display: block !important;
  margin: 0 auto;
  background: transparent;
}

/* Top banner ad (above header content on home/category/tag/search) */
.container-ad-top {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 12px 20px 0;
}
.ad-top {
  min-height: 90px;
  margin: 0 0 8px;
}

/* In-article ad — clearly separated from content */
.ad-in-article {
  margin: 32px 0;
  background: #FAFBFC;
  border: 1px dashed var(--line);
  min-height: 250px;
}

/* Square ad — used in sidebar and between sections */
.ad-square {
  min-height: 250px;
}

/* Inline horizontal ad section (homepage + category) */
.container-ad-inline {
  max-width: var(--container-max, 1200px);
  margin: 32px auto;
  padding: 0 20px;
}

/* On mobile, reduce padding and margins */
@media (max-width: 600px) {
  .ad-wrapper {
    padding: 22px 8px 12px;
    margin: 16px 0;
  }
  .ad-top {
    min-height: 60px;
  }
  .ad-in-article {
    margin: 24px 0;
    min-height: 200px;
  }
  .container-ad-top {
    padding: 8px 10px 0;
  }
  .container-ad-inline {
    margin: 24px auto;
    padding: 0 10px;
  }
}

/* Sidebar-specific square ad: full width of sidebar */
.article-sidebar .ad-square {
  margin: 0 0 16px;
  border-radius: 8px;
}

/* ============================================================
   v6: Mega-footer (categories + tags + legal)
   ============================================================ */

.site-footer {
  margin-top: 60px;
  background: var(--ink, #0F172A);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color .15s;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Top section ===== */
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
  padding: 48px 20px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  max-width: 320px;
}
.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.footer-brand .logo-mark {
  width: 36px;
  height: 36px;
  background: var(--brand-700, #1D4ED8);
  color: #FFFFFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.footer-brand .logo-text {
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 700;
  font-size: 22px;
  color: #FFFFFF;
}
.footer-tagline {
  margin: 4px 0;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.footer-tagline-secondary {
  margin: 4px 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* Newsletter form in footer */
.footer-newsletter {
  margin-top: 16px;
}
.footer-newsletter label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}
.footer-newsletter-input {
  display: flex;
  gap: 4px;
}
.footer-newsletter-input input[type="email"] {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 13px;
}
.footer-newsletter-input input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.footer-newsletter-input button {
  padding: 8px 14px;
  background: var(--brand-700, #1D4ED8);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.footer-newsletter-input button:hover {
  filter: brightness(1.15);
}
.footer-newsletter small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

/* Footer columns */
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li {
  margin-bottom: 6px;
  font-size: 13.5px;
}

/* Categories with subcats */
.footer-col-cats ul ul.footer-subcats {
  margin-top: 4px;
  margin-left: 0;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}
.footer-col-cats ul ul.footer-subcats li {
  margin-bottom: 3px;
}
.footer-col-cats ul ul.footer-subcats a {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}
.footer-col-cats ul ul.footer-subcats a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Popular tags row ===== */
.footer-tags {
  padding: 28px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-tags h4 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.footer-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: background .15s, border-color .15s;
}
.footer-tag-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF !important;
  text-decoration: none !important;
}
.footer-tag-count {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Bottom bar ===== */
.footer-bottom {
  padding: 24px 20px 32px;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-copyright {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom-links {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
}
.footer-sep {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.25);
}
.disclaimer {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
  max-width: 880px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
  }
  .footer-top .footer-col:nth-child(5) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 820px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 36px 16px 24px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }
  .footer-tags {
    padding: 24px 16px;
  }
  .footer-tag-cloud {
    gap: 6px;
  }
  .footer-bottom {
    padding: 20px 16px 28px;
  }
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-col-cats ul ul.footer-subcats {
    display: none;  /* hide subcategories on mobile to save space */
  }
}

/* ============================================================
   v6: Non-clickable obfuscated emails + plain footer items
   ============================================================ */

/* Obfuscated email — looks like text, not a link */
.email-obf {
  color: inherit;
  font-family: inherit;
  white-space: nowrap;
  cursor: text;
  user-select: all;        /* lets user select the whole thing in one click */
}

/* In legal pages, emails sit in prose — keep them subtly distinct */
.static-page .email-obf {
  font-weight: 600;
  color: var(--ink, #0F172A);
}

/* Footer plain (non-link) items — match the muted link color but no hover */
.site-footer .footer-email,
.site-footer .footer-plain {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13.5px;
}
.site-footer .footer-email .email-obf,
.site-footer .footer-plain {
  color: rgba(255, 255, 255, 0.6);
  cursor: text;
}

/* ============================================================
   v6: Authors — byline and /author/{slug} pages
   ============================================================ */

/* Article byline — author role */
.article-byline .byline-name-link {
  color: var(--ink, #0F172A);
  text-decoration: none;
  border-bottom: 1px dotted rgba(0,0,0,0.2);
}
.article-byline .byline-name-link:hover {
  color: var(--brand-700, #1D4ED8);
  border-bottom-color: var(--brand-700, #1D4ED8);
}
.article-byline .byline-role {
  display: block;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  margin-top: 1px;
  font-weight: 400;
}

/* /author/{slug} page */
.author-page { padding: 32px 0 60px; max-width: 920px; }

.author-header {
  padding: 32px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.05) 0%, rgba(29, 78, 216, 0.02) 100%);
  border: 1px solid var(--line, #E5E7EB);
  border-radius: 12px;
  margin-bottom: 36px;
}
.author-header-inner {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.author-avatar-lg {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  background: var(--brand-700, #1D4ED8);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.author-info { flex: 1; min-width: 0; }
.author-info h1 {
  margin: 0 0 4px;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.author-role {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-700, #1D4ED8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.author-bio {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(15, 23, 42, 0.78);
}
.author-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.author-topics-label {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.6);
}
.author-topic-pill {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--brand-700, #1D4ED8);
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 500;
}

.author-articles { margin-bottom: 40px; }
.author-articles h2 {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
}

.author-disclosure {
  padding: 20px 24px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.65);
}
.author-disclosure strong { color: rgba(15, 23, 42, 0.85); }

.empty-state {
  padding: 24px;
  text-align: center;
  color: rgba(15, 23, 42, 0.55);
  background: rgba(15, 23, 42, 0.02);
  border-radius: 8px;
}

/* Mobile */
@media (max-width: 640px) {
  .author-header { padding: 24px 20px; }
  .author-header-inner { flex-direction: column; gap: 16px; align-items: flex-start; }
  .author-avatar-lg { width: 64px; height: 64px; font-size: 22px; }
  .author-info h1 { font-size: 24px; }
}
