/*
Theme Name:  MoneyDo Blog
Theme URI:   https://blog.moneydo.ru
Author:      MoneyDo
Author URI:  https://moneydo.ru
Description: Тема для блога MoneyDo — точный стиль основного сайта: тёмная тема в духе Linear.app, фиолетовый акцент, Inter, glassmorphism.
Version:     2.0.0
License:     GNU General Public License v2 or later
Text Domain: moneydo-blog
Tags:        blog, dark, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS — точно как на moneydo.ru
═══════════════════════════════════════════════════════════════ */
:root {
  --dark-bg:           #0D0D0F;
  --dark-bg-secondary: #1a1a1a;
  --dark-bg-tertiary:  #111111;
  --dark-bg-card:      rgba(255,255,255,.03);
  --dark-bg-card-hover:rgba(255,255,255,.05);

  --purple:       #8B5CF6;
  --purple-dark:  #7C3AED;
  --purple-light: #A78BFA;
  --glow-purple:  rgba(139,92,246,.4);
  --glow-subtle:  rgba(139,92,246,.15);

  --white:    #ffffff;
  --gray-100: rgba(255,255,255,.9);
  --gray-200: rgba(255,255,255,.7);
  --gray-300: rgba(255,255,255,.5);
  --gray-400: rgba(255,255,255,.3);
  --gray-500: rgba(255,255,255,.15);
  --border:   rgba(255,255,255,.1);
  --border-purple: rgba(139,92,246,.3);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --r-sm:   8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full:9999px;

  --transition: all .3s ease;
  --transition-fast: all .15s ease;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-100);
  background: var(--dark-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--purple-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--purple-light); opacity: .85; }

ul, ol { padding-left: 1.5rem; }
button { cursor: pointer; font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════ */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}
.container--narrow { max-width: 880px; }
.container--content { max-width: 740px; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--white);
  padding: 12px 28px;
  border-radius: var(--r-lg);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--purple-light), var(--purple-dark));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--glow-purple), 0 0 48px rgba(139,92,246,.2);
  color: var(--white);
  opacity: 1;
}

.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--gray-200);
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-ghost:hover {
  border-color: var(--border-purple);
  color: var(--purple-light);
  background: rgba(139,92,246,.06);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,15,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(13,13,15,.97);
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 32px;
}

/* Logo */
.site-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(135deg, var(--white) 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.site-logo:hover { opacity: .9; }

/* Primary nav */
.primary-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.primary-navigation a {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-200);
  padding: 6px 14px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item a {
  color: var(--purple-light);
}

/* Header CTA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--white);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   HERO — HOME PAGE
═══════════════════════════════════════════════════════════════ */
.blog-hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top, rgba(139,92,246,.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(124,58,237,.1) 0%, transparent 50%),
    var(--dark-bg);
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  filter: blur(80px);
  pointer-events: none;
}

.blog-hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.blog-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 24px;
  background: rgba(139,92,246,.1);
  border: 1px solid var(--border-purple);
  padding: 6px 16px;
  border-radius: var(--r-full);
}

.blog-hero__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero__title .accent {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero__subtitle {
  font-size: 20px;
  line-height: 1.55;
  color: var(--gray-200);
  font-weight: 500;
  max-width: 680px;
  margin: 0 auto 48px;
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORY PILLS NAV
═══════════════════════════════════════════════════════════════ */
.category-nav {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(13,13,15,.92);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 61px;
  z-index: 90;
}

.category-nav .container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-nav .container::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-300);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 8px 18px;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
}

.cat-pill:hover {
  border-color: var(--border-purple);
  color: var(--purple-light);
  background: rgba(139,92,246,.06);
  opacity: 1;
}

.cat-pill.active {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 16px var(--glow-subtle);
}

.cat-pill .count {
  font-size: 12px;
  opacity: .6;
}

/* ═══════════════════════════════════════════════════════════════
   POST GRID — home/archive
═══════════════════════════════════════════════════════════════ */
.posts-section { padding: 64px 0 80px; }

.posts-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.section-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--purple-light);
}

/* Featured post */
.post-card--featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--dark-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 32px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
}

.post-card--featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-light), transparent);
  opacity: 0;
  transition: opacity .4s;
}

.post-card--featured:hover {
  background: var(--dark-bg-card-hover);
  border-color: var(--border-purple);
  box-shadow: 0 8px 40px rgba(139,92,246,.15);
  transform: translateY(-3px);
  opacity: 1;
}

.post-card--featured:hover::before { opacity: 1; }

.post-card--featured .post-card__img-wrap {
  min-height: 320px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(139,92,246,.12) 0%, var(--dark-bg-secondary) 100%);
}

.post-card--featured .post-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  opacity: .85;
}

.post-card--featured:hover .post-card__img-wrap img { transform: scale(1.04); }

.post-card--featured .post-card__body {
  padding: 48px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Regular card */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--dark-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-light), transparent);
  opacity: 0;
  transition: opacity .4s;
}

.post-card:hover {
  background: var(--dark-bg-card-hover);
  border-color: var(--border-purple);
  box-shadow: 0 8px 32px rgba(139,92,246,.15), 0 0 0 1px rgba(139,92,246,.1) inset;
  transform: translateY(-4px);
  opacity: 1;
}

.post-card:hover::before { opacity: 1; }

.post-card__img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(139,92,246,.1) 0%, var(--dark-bg-secondary) 100%);
  position: relative;
}

.post-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .8;
  transition: transform .5s ease, opacity .3s;
}

.post-card:hover .post-card__img-wrap img { transform: scale(1.04); opacity: .9; }

.post-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__cat {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
  text-decoration: none;
  opacity: 1;
}

.post-card__cat:hover { color: var(--purple-light); opacity: .8; }

.post-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  flex: 1;
}

.post-card--featured .post-card__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.post-card__excerpt {
  font-size: 15px;
  color: var(--gray-200);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-300);
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.post-card__meta-read {
  margin-left: auto;
  font-weight: 600;
  color: var(--purple-light);
}

/* ═══════════════════════════════════════════════════════════════
   SINGLE ARTICLE
═══════════════════════════════════════════════════════════════ */
.single-post { padding: 64px 0 100px; }

/* Reading progress */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  z-index: 200;
  transition: width 80ms linear;
}

/* Post header */
.post-header {
  max-width: 740px;
  margin: 0 auto 48px;
  padding: 0 60px;
}

.post-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 24px;
}

.post-header__breadcrumb a { color: var(--gray-400); }
.post-header__breadcrumb a:hover { color: var(--purple-light); opacity: 1; }
.post-header__breadcrumb .sep { opacity: .4; }

.post-header__category {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
  text-decoration: none;
}

.post-header__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--gray-300);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.post-header__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Featured image */
.post-featured-image {
  max-width: 900px;
  margin: 0 auto 56px;
  padding: 0 60px;
}

.post-featured-image img {
  width: 100%;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  opacity: .9;
}

/* Content + Sidebar */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 60px;
  align-items: start;
}

/* ── Article typography ── */
.post-content {
  min-width: 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 48px;
  margin-bottom: 16px;
}

.post-content h1 { font-size: 36px; margin-top: 0; }
.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 22px; font-weight: 700; }
.post-content h4 { font-size: 18px; font-weight: 700; }

.post-content h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), transparent);
  border-radius: 2px;
  margin-top: 10px;
}

.post-content p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--gray-200);
  margin-bottom: 20px;
}

.post-content > p:first-of-type {
  font-size: 19px;
  color: var(--gray-100);
  font-weight: 500;
  line-height: 1.7;
}

.post-content strong { font-weight: 700; color: var(--white); }
.post-content em { font-style: italic; color: var(--gray-100); }

.post-content a {
  color: var(--purple-light);
  border-bottom: 1px solid rgba(167,139,250,.3);
  transition: border-color .2s;
  text-decoration: none;
}

.post-content a:hover {
  border-color: var(--purple-light);
  opacity: 1;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 1.5rem;
  color: var(--gray-200);
}

.post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
  font-size: 17px;
}

.post-content ul li::marker { color: var(--purple-light); }
.post-content ol li::marker { color: var(--purple-light); font-weight: 700; }

/* Blockquote */
.post-content blockquote {
  border-left: 3px solid var(--purple);
  padding: 20px 28px;
  background: rgba(139,92,246,.06);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 32px 0;
  font-size: 18px;
  font-style: italic;
  color: var(--gray-100);
  line-height: 1.65;
}

/* Code */
.post-content code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: rgba(255,255,255,.07);
  color: var(--purple-light);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.post-content pre {
  background: var(--dark-bg-secondary);
  border: 1px solid var(--border);
  padding: 24px 28px;
  border-radius: var(--r-lg);
  overflow-x: auto;
  margin: 32px 0;
  font-size: 14px;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--gray-100);
}

/* Tables */
.post-content table,
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--dark-bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 32px 0;
  font-size: 15px;
}

.post-content th,
.comparison-table th {
  background: rgba(139,92,246,.1);
  padding: 18px 24px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.post-content td,
.comparison-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--gray-200);
  vertical-align: top;
  line-height: 1.6;
}

.post-content tr:last-child td,
.comparison-table tr:last-child td { border-bottom: none; }

.post-content tr:hover td,
.comparison-table tr:hover td {
  background: rgba(139,92,246,.04);
}

/* ── MoneyDo content blocks ── */

/* Direct answer — Featured Snippet target */
.direct-answer {
  background: rgba(139,92,246,.07);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 20px 28px;
  margin: 32px 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-100);
}

.direct-answer::before {
  content: 'Коротко об этом';
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}

/* Calculation example */
.calculation-example {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 15px;
  font-family: var(--font-mono);
  line-height: 1.7;
  color: var(--gray-200);
}

.calculation-example::before {
  content: 'Пример расчёта';
  display: block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple-light);
  margin-bottom: 10px;
}

/* Cite summary — AIO */
.cite-summary {
  background: var(--dark-bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 32px;
  margin: 40px 0;
  backdrop-filter: blur(20px);
}

.cite-summary h3 {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--gray-400) !important;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}

.cite-summary h3::after { display: none; }

.cite-summary p strong {
  font-size: 17px;
  color: var(--white);
  line-height: 1.65;
}

.cite-summary ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.cite-summary li { font-size: 15px; color: var(--gray-200); }

/* MoneyDo CTA block */
.moneydo-cta {
  background:
    radial-gradient(ellipse at top left, rgba(139,92,246,.2) 0%, transparent 60%),
    var(--dark-bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 36px;
  margin: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.moneydo-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-light), transparent);
}

.moneydo-cta p {
  color: var(--gray-200);
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.moneydo-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--white) !important;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: var(--r-full);
  border: none;
  text-decoration: none;
  transition: var(--transition);
  opacity: 1;
}

.moneydo-cta a:hover {
  box-shadow: 0 8px 24px var(--glow-purple);
  transform: translateY(-2px);
  opacity: 1;
}

/* Infographic / diagram figures */
.moneydo-infographic,
.moneydo-diagram {
  margin: 40px calc(-60px + -28px);
  text-align: center;
}

.moneydo-infographic > div,
.moneydo-diagram > div {
  background: var(--dark-bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 12px;
  display: inline-block;
  max-width: 100%;
}

.moneydo-infographic figcaption,
.moneydo-diagram figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--gray-400);
  font-style: italic;
}

/* FAQ block */
.faq-block { margin: 40px 0; }

.faq-block [itemtype="https://schema.org/Question"] {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  transition: var(--transition);
}

.faq-block [itemtype="https://schema.org/Question"]:hover {
  background: rgba(139,92,246,.02);
  margin: 0 -12px;
  padding: 24px 12px;
  border-radius: var(--r-md);
}

.faq-block h3 {
  font-size: 18px !important;
  font-weight: 700;
  color: var(--white);
  margin: 0 !important;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-block h3::after { display: none; }

.faq-block h3 .faq-icon-toggle {
  color: var(--purple-light);
  font-size: 20px;
  flex-shrink: 0;
  margin-left: 20px;
  line-height: 1;
  transition: transform .3s;
}

.faq-block [data-open="true"] h3 .faq-icon-toggle { transform: rotate(45deg); }

.faq-block [itemtype="https://schema.org/Answer"] {
  padding-top: 16px;
}

.faq-block [itemtype="https://schema.org/Answer"] p {
  font-size: 16px !important;
  color: var(--gray-200);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
  position: sticky;
  top: calc(61px + 24px);
}

.sidebar-widget {
  background: var(--dark-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.sidebar-widget__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
  display: block;
}

/* Table of Contents */
.toc-list {
  list-style: none;
  padding: 0;
  counter-reset: toc;
}

.toc-list li {
  counter-increment: toc;
  margin-bottom: 6px;
}

.toc-list li a {
  font-size: 13px;
  color: var(--gray-300);
  display: flex;
  align-items: baseline;
  gap: 8px;
  transition: color .2s;
  text-decoration: none;
  line-height: 1.5;
}

.toc-list li a::before {
  content: counter(toc) '.';
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  flex-shrink: 0;
}

.toc-list li a:hover,
.toc-list li a.active {
  color: var(--purple-light);
  opacity: 1;
}

/* MoneyDo promo widget */
.app-promo-widget {
  background:
    radial-gradient(ellipse at top left, rgba(139,92,246,.2) 0%, transparent 60%),
    var(--dark-bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.app-promo-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-light), transparent);
}

.app-promo-widget__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 8px;
}

.app-promo-widget__desc {
  font-size: 13px;
  color: var(--gray-300);
  line-height: 1.6;
  margin-bottom: 16px;
}

.app-promo-widget .btn-primary {
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--r-md);
}

/* ═══════════════════════════════════════════════════════════════
   POST FOOTER
═══════════════════════════════════════════════════════════════ */
.post-footer {
  max-width: 740px;
  margin: 48px auto 0;
  padding: 40px 60px 0;
  border-top: 1px solid var(--border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.post-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-300);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--r-full);
  text-decoration: none;
  transition: var(--transition);
}

.post-tag:hover {
  border-color: var(--border-purple);
  color: var(--purple-light);
  background: rgba(139,92,246,.06);
  opacity: 1;
}

/* Share */
.post-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.post-share__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-300);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  color: var(--gray-300);
  background: transparent;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.share-btn:hover {
  border-color: var(--border-purple);
  color: var(--purple-light);
  background: rgba(139,92,246,.06);
  opacity: 1;
}

/* Author box */
.author-box {
  background: var(--dark-bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-box__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--glow-subtle);
}

.author-box__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.author-box__role {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.author-box__bio {
  font-size: 14px;
  color: var(--gray-300);
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   RELATED POSTS
═══════════════════════════════════════════════════════════════ */
.related-posts {
  max-width: 960px;
  margin: 64px auto 0;
  padding: 0 60px;
}

.related-posts__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   NEWSLETTER
═══════════════════════════════════════════════════════════════ */
.newsletter-section {
  background:
    radial-gradient(ellipse at center, rgba(139,92,246,.1) 0%, transparent 70%),
    var(--dark-bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
  margin: 80px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  bottom: -300px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.newsletter-section .container { position: relative; z-index: 1; max-width: 560px; }

.newsletter-section__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(139,92,246,.1);
  border: 1px solid var(--border-purple);
  padding: 5px 14px;
  border-radius: var(--r-full);
  margin-bottom: 20px;
}

.newsletter-section__title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.newsletter-section__desc {
  font-size: 17px;
  color: var(--gray-200);
  font-weight: 500;
  margin-bottom: 32px;
  line-height: 1.55;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.05);
  color: var(--white);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
}

.newsletter-form input[type="email"]::placeholder { color: var(--gray-400); }
.newsletter-form input[type="email"]:focus { border-color: var(--border-purple); }

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 0;
}

.pagination a,
.pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.pagination a {
  color: var(--gray-300);
  border: 1px solid var(--border);
  background: transparent;
}

.pagination a:hover {
  border-color: var(--border-purple);
  color: var(--purple-light);
  background: rgba(139,92,246,.06);
  opacity: 1;
}

.pagination .current {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
  border: none;
  box-shadow: 0 4px 16px var(--glow-subtle);
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 16px;
}

/* ═══════════════════════════════════════════════════════════════
   COMMENTS
═══════════════════════════════════════════════════════════════ */
.comments-area {
  max-width: 740px;
  margin: 48px auto 0;
  padding: 0 60px;
}

.comments-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 28px;
}

.comment {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.comment-meta { font-size: 13px; color: var(--gray-400); }

.comment-content p {
  font-size: 16px;
  color: var(--gray-200);
  line-height: 1.7;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 15px;
  color: var(--white);
  background: rgba(255,255,255,.04);
  outline: none;
  transition: border-color .2s;
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--border-purple); }
.comment-form textarea { min-height: 120px; resize: vertical; }

.comment-form .submit {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.comment-form .submit:hover {
  box-shadow: 0 8px 24px var(--glow-purple);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--dark-bg-tertiary);
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand__logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--white) 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-bottom: 14px;
}

.footer-brand__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-300);
  max-width: 260px;
  margin-bottom: 20px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-light);
  background: rgba(139,92,246,.1);
  border: 1px solid var(--border-purple);
  padding: 5px 12px;
  border-radius: var(--r-full);
}

.footer-col__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 10px; }

.footer-col a {
  font-size: 14px;
  color: var(--gray-300);
  text-decoration: none;
  transition: color .2s;
  line-height: 1.5;
}

.footer-col a:hover { color: var(--purple-light); opacity: 1; }

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray-400);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: var(--gray-400); text-decoration: none; }
.footer-bottom a:hover { color: var(--purple-light); opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   SEARCH
═══════════════════════════════════════════════════════════════ */
.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 14px;
  color: var(--white);
  background: rgba(255,255,255,.05);
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
}

.search-form input:focus { border-color: var(--border-purple); }
.search-form input::placeholder { color: var(--gray-400); }

/* ═══════════════════════════════════════════════════════════════
   GRADIENT TEXT utility
═══════════════════════════════════════════════════════════════ */
.gradient-text {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  transform: translateY(20px);
}

.animate-in.visible {
  animation: fadeInUp .6s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .container { padding: 0 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .posts-grid { grid-template-columns: repeat(2,1fr); }
  .related-grid { grid-template-columns: repeat(2,1fr); }
  .content-with-sidebar { grid-template-columns: 1fr; padding: 0 40px; }
  .sidebar { position: static; }
  .post-header { padding: 0 40px; }
  .post-featured-image { padding: 0 40px; }
  .post-footer { padding: 40px 40px 0; }
  .related-posts { padding: 0 40px; }
  .comments-area { padding: 0 40px; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .primary-navigation { display: none; }
  .menu-toggle { display: flex; }
  .blog-hero { padding: 72px 0 56px; }
  .blog-hero__subtitle { font-size: 17px; }
  .post-card--featured { grid-template-columns: 1fr; }
  .post-card--featured .post-card__img-wrap { min-height: 200px; }
  .post-card--featured .post-card__body { padding: 28px; }
  .post-card--featured .post-card__title { font-size: 22px; }
  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .newsletter-form { flex-direction: column; }
  .content-with-sidebar { padding: 0 24px; }
  .post-header { padding: 0 24px; }
  .post-featured-image { padding: 0 24px; }
  .post-footer { padding: 32px 24px 0; }
  .related-posts { padding: 0 24px; }
  .comments-area { padding: 0 24px; }
  .moneydo-infographic,
  .moneydo-diagram { margin: 28px 0; }
}
