/* ========================================
   Умные Деньги — дизайн-система 2026
   ======================================== */

:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #EEF2FF;
  --primary-mid: #C7D2FE;
  --accent: #7C3AED;
  --accent-dark: #6D28D9;
  --accent-light: #F5F3FF;
  --success: #22C55E;
  --success-light: #F0FDF4;
  --warn: #F59E0B;
  --warn-light: #FFFBEB;
  --danger: #EF4444;
  --bg: #F8FAFC;
  --bg-soft: #F1F5F9;
  --surface: #FFFFFF;
  --text: #0F172A;
  --text-soft: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-soft: #EEF2F7;
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.05);
  --shadow: 0 8px 24px rgba(15,23,42,0.06);
  --shadow-md: 0 16px 40px rgba(15,23,42,0.08);
  --shadow-lg: 0 30px 60px rgba(15,23,42,0.10);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
::selection { background: #C7D2FE; color: #312E81; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Сетка во всю ширину экрана. Колонка чтения статей остаётся узкой (длина строки). */
.container { max-width: none; margin: 0 auto; padding: 0 clamp(16px, 2.5vw, 40px); }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 clamp(16px, 2.5vw, 40px); }

/* === MARKET TICKER === */
.market-ticker {
  background: #050C1A;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  height: 36px;
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 101;
}
.ticker-wrap {
  display: flex; align-items: center; height: 36px;
  max-width: none; margin: 0; padding: 0 clamp(16px, 2.5vw, 40px);
}
.ticker-pin {
  display: flex; align-items: center; gap: 6px;
  padding-right: 14px; border-right: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0; margin-right: 12px;
}
.tp-label {
  font-size: 10px; color: rgba(255,255,255,0.7);
  text-transform: uppercase; letter-spacing: 0.9px; font-weight: 700;
}
.tp-val {
  font-size: 13px; font-weight: 700; color: #60A5FA;
  font-variant-numeric: tabular-nums;
}
.ticker-marquee {
  flex: 1; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, transparent, black 32px, black calc(100% - 32px), transparent);
}
.ticker-strip {
  display: flex; gap: 0; white-space: nowrap;
  animation: ticker-scroll 55s linear infinite;
  width: max-content; will-change: transform;
}
.ta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 11px; margin: 0 4px;
  height: 24px; cursor: default;
  background: rgba(79,70,229,0.28);
  border: 1px solid rgba(79,70,229,0.5);
  border-radius: 6px;
  flex-shrink: 0;
}
.ta-n { font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 500; }
.ta-p { font-size: 12px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.tu { font-size: 11px; font-weight: 600; color: #4ADE80; }
.td { font-size: 11px; font-weight: 600; color: #F87171; }
.tn { font-size: 11px; color: rgba(255,255,255,0.28); }
.ticker-time {
  font-size: 11px; color: rgba(255,255,255,0.62); flex-shrink: 0;
  padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.14);
  margin-left: 12px; font-variant-numeric: tabular-nums; font-weight: 600;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* === HEADER & NAV === */
.site-header {
  position: sticky; top: 36px; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,0.8);
  box-shadow: 0 1px 0 rgba(15,23,42,0.04);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #4F46E5, #818CF8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 4px 12px rgba(79,70,229,0.35);
}
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin-right: auto; }
.nav-links a {
  display: inline-block; padding: 8px 13px;
  text-decoration: none; color: var(--text-soft);
  font-size: 14px; font-weight: 500; border-radius: 8px;
  transition: all var(--transition); letter-spacing: -0.01em;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.nav-toggle { display: none; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: all var(--transition);
  letter-spacing: -0.01em; white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79,70,229,0.35); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(124,58,237,0.35); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #1E293B; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* === HERO === */
.hero {
  background: linear-gradient(145deg, #0B1220 0%, #0F172A 55%, #312E81 100%);
  color: #fff; padding: 88px 0 108px; overflow: hidden; position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute;
  bottom: -200px; right: -80px;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(79,70,229,0.45) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge { animation: fadeUp 0.5s ease both; }
.hero h1 { animation: fadeUp 0.5s ease 0.08s both; }
.hero .lead { animation: fadeUp 0.5s ease 0.16s both; }
.hero-actions { animation: fadeUp 0.5s ease 0.24s both; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); padding: 6px 16px;
  border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
  margin-bottom: 24px; border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px); letter-spacing: 0.01em;
}
.hero h1 {
  font-size: 52px; font-weight: 800; line-height: 1.06;
  margin-bottom: 20px; letter-spacing: -0.03em;
}
.hero .lead {
  font-size: 18px; line-height: 1.65; opacity: 0.82;
  margin-bottom: 36px; max-width: 560px; font-weight: 400;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-primary { background: #fff; color: var(--primary); font-weight: 700; }
.hero-actions .btn-primary:hover { background: #F0F7FF; box-shadow: 0 4px 20px rgba(255,255,255,0.25); }
.hero-actions .btn-ghost {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.22);
}
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.38); }

/* === SECTION === */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-head { margin-bottom: 48px; }
.section-head .eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.9px; margin-bottom: 14px;
  padding: 5px 14px; border-radius: var(--radius-full);
}
.section-head h2 {
  font-size: 34px; font-weight: 800; letter-spacing: -0.025em;
  margin-bottom: 12px; line-height: 1.15;
}
.section-head p { color: var(--text-soft); font-size: 17px; max-width: 600px; line-height: 1.65; }

/* === STAT BAR === */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 8px; margin-top: -52px; position: relative; z-index: 2;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft);
  animation: fadeUp 0.6s ease 0.2s both;
}
.stats-bar .stat {
  text-align: center; padding: 22px 12px;
  border-right: 1px solid var(--border-soft);
}
.stats-bar .stat:last-child { border-right: none; }
.stats-bar .stat-val {
  font-size: 30px; font-weight: 800; color: var(--primary);
  letter-spacing: -0.025em; line-height: 1;
}
.stats-bar .stat-lbl {
  font-size: 11px; color: var(--text-muted); margin-top: 6px;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}

/* === GRID === */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === CARDS === */
.card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-xs);
  border: 1px solid var(--border); transition: all var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-mid); }

.card-bank { display: flex; flex-direction: column; height: 100%; position: relative; }
.card-bank .rank-badge {
  position: absolute; top: -12px; left: -12px;
  background: var(--accent); color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; box-shadow: 0 3px 8px rgba(124,58,237,0.4);
}
.card-bank-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.card-bank-logo {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0;
}
.card-bank-title { font-size: 16px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.card-bank-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.card-bonus {
  background: var(--accent-light); color: var(--accent-dark);
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; margin: 14px 0;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(124,58,237,0.15);
}
.card-bonus::before { content: "🎁"; }
.card-desc { color: var(--text-soft); font-size: 14px; margin-bottom: 14px; flex-grow: 1; }
.card-features { font-size: 13px; color: var(--text-soft); margin-bottom: 16px; list-style: none; }
.card-features li { padding-left: 20px; position: relative; margin-bottom: 6px; line-height: 1.5; }
.card-features li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.card-promo {
  background: var(--warn-light); border: 1px dashed rgba(217,119,6,0.4);
  padding: 10px 14px; border-radius: var(--radius); font-size: 13px;
  color: #713F12; margin-bottom: 12px;
}
.card-promo code {
  background: #FFFBEB; padding: 2px 8px; border-radius: 4px;
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-weight: 700; color: #422006; margin-left: 4px; font-size: 12px;
}

/* Brand logo colors */
.bank-psb { background: #003E7E; }
.bank-tbank { background: #FFDD2D; color: #000 !important; }
.bank-gazprom { background: #0079C1; }
.bank-vtb { background: #009FDF; }
.bank-ozon { background: #005BFF; }

/* === FEATURE === */
.feature {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px; height: 100%; border: 1px solid var(--border);
  transition: all var(--transition);
}
.feature:hover { box-shadow: var(--shadow-md); border-color: var(--primary-mid); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
}
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p { color: var(--text-soft); font-size: 14px; line-height: 1.65; }

/* === CALCULATOR === */
.calc-wrap {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 36px; box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
/* Подменю калькуляторов (вкладки-ссылки) */
.calc-tabs { display: flex; flex-wrap: wrap; gap: 8px; max-width: 720px; }
.calc-tab {
  flex: 1 1 0; min-width: 130px;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  padding: 10px 16px; white-space: nowrap;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--text-soft); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  transition: all var(--transition);
}
.calc-tab:hover { border-color: var(--primary-mid); color: var(--primary); }
.calc-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.calc-input-group { margin-bottom: 20px; }
.calc-input-group label {
  display: block; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.4px; margin-bottom: 7px; color: var(--text-soft);
}
.calc-input-group .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.calc-input {
  width: 100%; padding: 11px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: all var(--transition);
  font-family: inherit; color: var(--text); font-weight: 500;
}
.calc-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.calc-result {
  background: linear-gradient(145deg, #EFF6FF 0%, #F0F7FF 100%);
  border-radius: var(--radius-lg); padding: 24px;
  border: 1px solid var(--primary-mid);
}
.calc-result h4 {
  font-size: 11px; color: var(--text-soft); margin-bottom: 8px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px;
}
.calc-result .big {
  font-size: 40px; font-weight: 800; color: var(--primary);
  line-height: 1; letter-spacing: -0.03em;
}
.calc-result .sub { font-size: 14px; color: var(--text-soft); margin-top: 8px; }
.calc-leader {
  margin-top: 20px; padding: 16px; background: var(--surface);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.calc-leader-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.calc-leader-name { font-size: 16px; font-weight: 700; color: var(--primary); }
.calc-leader-amount { font-size: 14px; color: var(--text-soft); margin-top: 2px; }
.calc-card-list { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.calc-card-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.7); font-size: 14px;
  border: 1px solid rgba(226,232,240,0.6);
}
.calc-card-row .name { color: var(--text-soft); }
.calc-card-row .amount { font-weight: 700; color: var(--primary); }

/* === COMPARE TABLE === */
.compare-table {
  width: 100%; background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); border-collapse: collapse;
  border: 1px solid var(--border);
}
.compare-table th, .compare-table td {
  padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.compare-table th {
  background: var(--bg-soft); font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px;
}
.compare-table td.bank-name { font-weight: 600; color: var(--text); }
.compare-table .check { color: var(--success); font-weight: 700; }
.compare-table .cross { color: var(--text-muted); }

/* === GUIDE / ARTICLE === */
.guide-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-xs); transition: all var(--transition);
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--border);
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-mid); }
.guide-card .tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.guide-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.35; letter-spacing: -0.01em; }
.guide-card .meta { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }
.guide-card .arrow { color: var(--primary); font-weight: 700; margin-top: 16px; font-size: 14px; }

.article { background: var(--surface); padding: 48px 0; }
.article h1 { font-size: 38px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.03em; }
.article .article-meta { color: var(--text-muted); margin-bottom: 32px; font-size: 14px; }
.article h2 { font-size: 24px; font-weight: 700; margin: 36px 0 14px; letter-spacing: -0.01em; }
.article h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
.article p { color: var(--text); margin-bottom: 18px; font-size: 16px; line-height: 1.8; }
.article ul, .article ol { margin: 0 0 18px 24px; }
.article li { margin-bottom: 8px; line-height: 1.7; }
.article blockquote {
  border-left: 3px solid var(--accent); padding: 14px 20px;
  background: var(--accent-light); border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0; color: var(--text);
}
.article .callout {
  background: var(--primary-light); border-radius: var(--radius);
  padding: 18px 20px; margin: 24px 0; color: var(--text);
  border: 1px solid var(--primary-mid);
}
.article .callout strong { color: var(--primary-dark); }

/* === FAQ === */
.faq-list { background: var(--surface); border-radius: var(--radius-lg); padding: 8px 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border-soft); padding: 18px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; gap: 16px; }
.faq-q::after { content: "+"; font-size: 22px; color: var(--primary); transition: transform var(--transition); line-height: 1; flex-shrink: 0; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { margin-top: 12px; color: var(--text-soft); font-size: 15px; display: none; line-height: 1.75; }
.faq-item.open .faq-a { display: block; }

/* === QUIZ === */
.quiz-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px 24px; border: 1.5px solid var(--border);
  cursor: pointer; transition: all var(--transition); text-align: center;
}
.quiz-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quiz-card.active { border-color: var(--primary); background: var(--primary-light); }
.quiz-icon { font-size: 32px; margin-bottom: 14px; }
.quiz-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; line-height: 1.4; }
.quiz-card p { font-size: 13px; color: var(--text-soft); line-height: 1.55; }
.quiz-result { margin-top: 32px; }
.quiz-result-inner {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 36px; border: 1px solid var(--primary-mid);
  box-shadow: var(--shadow-md);
}
.quiz-result-title { font-size: 20px; font-weight: 800; margin-bottom: 28px; color: var(--primary); letter-spacing: -0.02em; }
.quiz-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quiz-step { background: var(--bg); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border); }
.quiz-step-label { font-weight: 700; font-size: 14px; margin-bottom: 8px; letter-spacing: -0.01em; }
.quiz-step-desc { font-size: 13px; color: var(--text-soft); line-height: 1.65; }

/* === DIRECTION CARDS === */
.direction-card {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 28px; border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: all var(--transition); box-shadow: var(--shadow-xs);
}
.direction-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-mid); }
.direction-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.direction-body h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.direction-body p { font-size: 14px; color: var(--text-soft); line-height: 1.65; margin-bottom: 14px; }
.direction-list { list-style: none; margin-bottom: 18px; }
.direction-list li { font-size: 13px; color: var(--text-soft); padding: 4px 0; }
.direction-list li::before { content: "✓ "; color: var(--success); font-weight: 700; }
.direction-link { font-size: 14px; font-weight: 700; color: var(--primary); }

/* Цветные акценты карточек направлений — для контраста на светлом фоне */
.direction-card.dir-blue  { background: #eff6ff; border-color: #bfdbfe; }
.direction-card.dir-green { background: #ecfdf5; border-color: #a7f3d0; }
.direction-card.dir-amber { background: #fffbeb; border-color: #fde68a; }
.direction-card.dir-red   { background: #fef2f2; border-color: #fecaca; }
.direction-card.dir-blue:hover  { border-color: #3b82f6; }
.direction-card.dir-green:hover { border-color: #10b981; }
.direction-card.dir-amber:hover { border-color: #f59e0b; }
.direction-card.dir-red:hover   { border-color: #ef4444; }

/* Тинты приведены к чистым карточкам (минимум цвета) */
.tint-blue, .tint-green, .tint-amber, .tint-red {
  background: var(--surface) !important; border-color: var(--border-soft) !important;
}
.tint-blue:hover, .tint-green:hover, .tint-amber:hover, .tint-red:hover {
  border-color: var(--primary-mid) !important;
}

/* Чистые карточки (Soft Minimal) — без пёстрых тинтов */
.feature, .tool-card, .guide-card, .quiz-card {
  background: var(--surface); border-color: var(--border-soft);
}
.feature:hover, .tool-card:hover, .guide-card:hover, .quiz-card:hover {
  border-color: var(--primary-mid);
}

/* Выбранная карточка квиза остаётся выделенной поверх тинта */
.quiz-card.active { background: var(--primary-light); border-color: var(--primary); }

/* === TOOL CARDS === */
.tool-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 28px 24px; border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: all var(--transition); display: block;
  box-shadow: var(--shadow-xs);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-mid); }
.tool-icon { font-size: 32px; margin-bottom: 16px; }
.tool-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.tool-card p { font-size: 14px; color: var(--text-soft); line-height: 1.65; margin-bottom: 18px; }
.tool-link { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; }

/* === TAG COLORS === */
.tag-blue { background: #DBEAFE; color: #1D4ED8; }
.tag-green { background: #DCFCE7; color: #15803D; }
.tag-yellow { background: #FEF9C3; color: #A16207; }
.tag-red { background: #FEE2E2; color: #B91C1C; }

/* === AD LABEL (ФЗ-38) === */
.ad-label {
  display: block; font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 4px; font-weight: 500;
}

/* === INVEST DISCLAIMER === */
.invest-disclaimer {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 20px;
  font-size: 13px; color: var(--text-muted); line-height: 1.65;
  margin-bottom: 36px;
}
.invest-disclaimer strong { color: var(--text-soft); }

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: #0F172A; color: #CBD5E1;
  padding: 16px 24px; display: flex; align-items: center;
  gap: 16px; flex-wrap: wrap; justify-content: space-between;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cookie-banner p { font-size: 14px; margin: 0; flex: 1; min-width: 200px; line-height: 1.55; }
.cookie-banner a { color: #93C5FD; text-decoration: underline; }
.cookie-banner .cookie-btn {
  background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 9px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background var(--transition);
}
.cookie-banner .cookie-btn:hover { background: var(--primary-dark); }

/* === URGENCY BANNER === */
.urgency-banner {
  background: var(--accent-light); border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  display: flex; gap: 14px; align-items: flex-start;
  margin: 24px auto; max-width: 1100px;
}
.urgency-banner .icon { font-size: 22px; flex-shrink: 0; }
.urgency-banner .text { font-size: 14px; color: #7C2D12; }
.urgency-banner .text strong { color: #9A3412; }

/* === FOOTER === */
.site-footer { background: #080F1E; color: #64748B; padding: 56px 0 28px; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 10px; letter-spacing: -0.01em; }
.footer-tag { font-size: 14px; line-height: 1.65; }
.site-footer h5 {
  color: #94A3B8; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.9px; margin-bottom: 14px; font-weight: 600;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #64748B; text-decoration: none; font-size: 14px; transition: color var(--transition); }
.site-footer a:hover { color: #E2E8F0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 24px; font-size: 13px; color: #334155;
}
/* Кнопка канала в Дзене. Цвета зашиты: подвал всегда тёмный, переменные темы
   здесь не работают. Селектор скоупим подвалом — иначе `.site-footer a` (0,2,0)
   перебивает цвет и размер шрифта по специфичности. */
.site-footer .dzen-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #E2E8F0; transition: all var(--transition);
}
.site-footer .dzen-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.26); color: #fff; transform: translateY(-1px); }
.site-footer .dzen-btn svg { width: 15px; height: 15px; flex: none; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero { padding: 64px 0 88px; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 16px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .calc-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); margin-top: -36px; }
  .stats-bar .stat { border-right: none; border-bottom: 1px solid var(--border-soft); }
  .stats-bar .stat:nth-child(1),
  .stats-bar .stat:nth-child(3) { border-right: 1px solid var(--border-soft); }
  .stats-bar .stat:nth-child(3),
  .stats-bar .stat:nth-child(4) { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 36px; }
}
@media (max-width: 640px) {
  .market-ticker { height: 30px; }
  .ticker-strip { animation-duration: 38s; }
  .ticker-time { display: none; }
  .ta { padding: 0 14px; height: 30px; }
  .ta-p { font-size: 11px; }
  .hero { padding: 52px 0 76px; }
  .hero h1 { font-size: 30px; letter-spacing: -0.02em; }
  .hero .lead { font-size: 15px; }
  .section { padding: 44px 0; }
  .section-head h2 { font-size: 26px; }
  .section-head p { font-size: 15px; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column; padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid var(--border);
    border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 16px;
    transition: all var(--transition);
  }
  .nav-toggle:hover { background: var(--bg-soft); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article h1 { font-size: 28px; }
  .quiz-steps { grid-template-columns: 1fr; }
  .direction-card { flex-direction: column; gap: 16px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); margin-top: -32px; }
}

/* ===================== ТЁМНАЯ ТЕМА ===================== */
html[data-theme="dark"]{
  --bg:#0B1220; --bg-soft:#121C2E; --surface:#111A2B; --border:#22304A; --border-soft:#1A2742;
  --text:#E5EAF2; --text-soft:#9AA7BD; --text-muted:#6B7A93;
  --primary-light:#0C2A22; --accent-light:#171A3A;
  --shadow-xs:0 1px 2px rgba(0,0,0,.4); --shadow-sm:0 2px 10px rgba(0,0,0,.45);
  --shadow:0 10px 28px rgba(0,0,0,.5); --shadow-md:0 18px 44px rgba(0,0,0,.55); --shadow-lg:0 34px 64px rgba(0,0,0,.6);
}
html[data-theme="dark"] body{ background:var(--bg); color:var(--text); }
html[data-theme="dark"] .site-header{ background:rgba(11,18,32,.85); border-color:#1A2742; }
html[data-theme="dark"] .calc-result{ background:linear-gradient(145deg,#0C2A22,#0E1F33); border-color:#1F6F53; }
html[data-theme="dark"] .calc-card-row{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .field-group input, html[data-theme="dark"] .field-group select,
html[data-theme="dark"] .calc-input{ background:#0B1220; color:var(--text); }

/* Мини-кнопка темы (вставляется ticker.js на внутренних страницах) */
.theme-mini{ width:38px; height:38px; border-radius:var(--radius-sm); border:1px solid var(--border);
  background:var(--surface); color:var(--text-soft); display:grid; place-items:center; cursor:pointer;
  margin-left:6px; flex-shrink:0; transition:var(--transition); }
.theme-mini:hover{ color:var(--text); border-color:var(--text-muted); }
.theme-mini svg{ width:18px; height:18px; }

/* Тёмная тема: гасим жёстко прописанные светлые плашки в инлайн-стилях */
html[data-theme="dark"] [style*="#fff3cd"],
html[data-theme="dark"] [style*="#f0fdf4"],
html[data-theme="dark"] [style*="#dcfce7"],
html[data-theme="dark"] [style*="#FEF2F2"],
html[data-theme="dark"] [style*="#fef2f2"],
html[data-theme="dark"] [style*="#ecfdf5"],
html[data-theme="dark"] [style*="#fffbeb"],
html[data-theme="dark"] [style*="#eff6ff"]{
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Логотип сайта вместо буквы «У» */
.brand-mark{ background:#fff url('logo-mark.webp') center/cover no-repeat !important; color:transparent !important; border:1px solid var(--border-soft); box-shadow: var(--shadow-sm); overflow:hidden; }

/* ===================== АДАПТИВНОСТЬ / ТАЧ-ДОСТУПНОСТЬ ===================== */
/* Гамбургер-меню уже для больших смартфонов и планшетов-портрет (≤820px),
   чтобы 6-пунктовое меню не теснилось. */
@media (max-width: 820px){
  .nav-links{
    display:none; position:absolute; top:64px; left:0; right:0;
    background:rgba(255,255,255,0.97); backdrop-filter:blur(20px);
    flex-direction:column; padding:10px 20px 14px;
    border-bottom:1px solid var(--border); box-shadow:var(--shadow-md);
  }
  html[data-theme="dark"] .nav-links{ background:rgba(11,18,32,0.97); }
  .nav-links.open{ display:flex; }
  .nav-links a{ display:flex; align-items:center; min-height:48px; font-size:16px; }
  .nav-toggle{
    display:flex; align-items:center; justify-content:center;
    width:44px; height:44px; border:1px solid var(--border);
    border-radius:10px; background:var(--surface); cursor:pointer;
    transition:all var(--transition);
  }
  .nav-toggle:hover{ background:var(--bg-soft); }
}
/* Тач-зоны ≥44px, крупные поля, 16px против iOS-зума, тактильный отклик */
@media (max-width: 768px){
  .btn{ min-height:48px; padding:13px 22px; }
  .btn-sm{ min-height:44px; }
  .nav-toggle, .theme-mini, .sx-open-btn, .icon-btn{ width:44px !important; height:44px !important; }
  .calc-input, .pf-field input, .field-group input, .field-group select,
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], input[type="tel"], input[type="search"], select, textarea{
    font-size:16px !important; min-height:48px;
  }
  .calc-input{ padding:13px 14px; }
  .btn:active{ transform:scale(.98); }
}

/* Длинные подписи кнопок на телефоне.
   У .btn стоит white-space: nowrap — на широком экране это правильно (кнопка не
   разваливается на две строки). Но подписи вида «Челлендж 10% — следить за
   привычками» на 360–420px уезжали за правый край и обрезались секцией с
   overflow: hidden: человек видел обрубок и не понимал, куда ведёт кнопка.
   Разрешаем перенос и не даём кнопке стать шире экрана. */
@media (max-width: 640px) {
  .btn { white-space: normal; overflow-wrap: break-word; max-width: 100%; text-align: center; }
  .btn-lg { padding-left: 18px; padding-right: 18px; }
}
