/* === DESIGN SYSTEM — auto.ru / shadcn style === */
:root {
  /* Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f4f5f7;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-hover: #d1d5db;

  /* Accents */
  --accent: #ef3124;
  --accent-hover: #d62b1f;
  --accent-light: #fff1f0;

  /* Tiers */
  --tier-s: #f59e0b;
  --tier-s-bg: #fffbeb;
  --tier-a: #10b981;
  --tier-a-bg: #ecfdf5;
  --tier-b: #3b82f6;
  --tier-b-bg: #eff6ff;
  --tier-c: #8b5cf6;
  --tier-c-bg: #f5f3ff;

  /* Cost categories */
  --cost-to: #3b82f6;
  --cost-kasko: #f59e0b;
  --cost-tax: #6b7280;
  --cost-fuel: #10b981;

  /* Legacy aliases (used in inline styles / JS) */
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-blue: #3b82f6;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

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

/* === NAVIGATION === */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0 2rem;
  transition: box-shadow 0.3s;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  position: relative;
  transition: color 0.2s;
  border-radius: var(--radius-sm);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === SECTIONS === */
section {
  padding: 4rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* === HERO === */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 6rem 2rem 4rem;
  max-width: 100%;
  overflow: hidden;
  background: var(--bg-primary);
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(239, 49, 36, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
  z-index: 0;
}

#hero > * {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 700px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.hero-title .gold {
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.hero-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 49, 36, 0.25);
  color: #fff;
}

/* === CARD STYLES === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

/* === CURRENT SECTION === */
#current {
  background: var(--bg-primary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#current > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#current .current-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.current-car-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-row .label {
  color: var(--text-secondary);
}

.spec-row .value {
  font-weight: 600;
  color: var(--text-primary);
}

.budget-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.budget-bar {
  margin-bottom: 1rem;
}

.budget-bar .bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.budget-bar .bar-label span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.budget-bar .bar-track {
  height: 10px;
  background: var(--bg-secondary);
  border-radius: 5px;
  overflow: hidden;
}

.budget-bar .bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease-out;
}

.budget-bar .bar-fill.sale {
  background: var(--accent-green);
}

.budget-bar .bar-fill.credit {
  background: var(--accent-blue);
}

.budget-total {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
}

/* === COMPARISON TABLE === */
#comparison {
  background: var(--bg-primary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#comparison > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#comparison .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

#comparison table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

#comparison th,
#comparison td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

#comparison th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#comparison th:first-child {
  color: var(--text-primary);
}

#comparison td:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

#comparison tr:hover {
  background: var(--bg-secondary);
}

#comparison tr:last-child td {
  border-bottom: none;
  font-weight: 700;
}

#comparison .best-value {
  color: var(--accent-green);
  font-weight: 700;
}

/* === TOP-3 === */
#top-3 {
  background: var(--bg-primary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#top-3 > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#top-3 .top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.top3-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.top3-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.top3-card.gold {
  border: 2px solid var(--tier-s);
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.top3-card.gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tier-s), #fbbf24);
}

.top3-card.silver {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.top3-card.bronze {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.top3-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gold .top3-badge {
  background: var(--tier-s-bg);
  color: var(--tier-s);
}

.silver .top3-badge {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.bronze .top3-badge {
  background: var(--bg-secondary);
  color: #92400e;
}

.top3-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.top3-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.top3-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg-secondary);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 500;
}

.top3-pros {
  list-style: none;
  margin-bottom: 1.25rem;
}

.top3-pros li {
  font-size: 0.9rem;
  padding: 0.3rem 0;
  padding-left: 1.4rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.5;
}

.top3-pros li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
}

.top3-btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  transition: all 0.15s;
}

.top3-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
  color: var(--accent);
}

.radar-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* === TIERLIST === */
#tierlist {
  background: var(--bg-secondary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#tierlist > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#tierlist .tier-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.filter-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.filter-btn.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
  font-weight: 600;
}

.tier-group {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.tier-label {
  font-size: 1.5rem;
  font-weight: 800;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.tier-group.s .tier-label { color: var(--tier-s); background: var(--tier-s-bg); }
.tier-group.a .tier-label { color: var(--tier-a); background: var(--tier-a-bg); }
.tier-group.b .tier-label { color: var(--tier-b); background: var(--tier-b-bg); }
.tier-group.c .tier-label { color: var(--tier-c); background: var(--tier-c-bg); }

.tier-group.s { border-left: 4px solid var(--tier-s); }
.tier-group.a { border-left: 4px solid var(--tier-a); }
.tier-group.b { border-left: 4px solid var(--tier-b); }
.tier-group.c { border-left: 4px solid var(--tier-c); }

.tier-header-text h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tier-header-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.tier-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tier-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.tier-group.s .tier-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

.tier-group.a .tier-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.tier-group.b .tier-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.tier-group.c .tier-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.tier-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.tier-card .tier-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.tier-card .tier-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.tier-card .reliability {
  font-size: 0.9rem;
  color: var(--tier-s);
  letter-spacing: 2px;
}

/* Expanded tier card */
.tier-card .expanded-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.3s;
  opacity: 0;
}

.tier-card.expanded .expanded-content {
  max-height: 800px;
  opacity: 1;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tier-card.expanded {
  grid-column: 1 / -1;
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.tier-card .verdict {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.tier-card .pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tier-card .pros-list,
.tier-card .cons-list {
  list-style: none;
  font-size: 0.85rem;
}

.tier-card .pros-list li {
  padding: 0.25rem 0;
  color: var(--accent-green);
}

.tier-card .cons-list li {
  padding: 0.25rem 0;
  color: var(--accent-red);
}

.tier-card .modification {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.tier-card .modification strong {
  color: var(--text-primary);
}

.card-preview-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.4;
}

.card-preview-photo {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 0.75rem 0 0.5rem;
  cursor: pointer;
}

.car-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.car-images img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: opacity 0.2s;
}

.car-images img:hover {
  opacity: 0.85;
}

.car-images img:not([src]),
.car-images img[src=""] {
  display: none;
}

.tier-card.hidden {
  display: none;
}

/* === OWNERSHIP === */
#ownership {
  background: var(--bg-primary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#ownership > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#ownership .ownership-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  align-items: start;
}

.ownership-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.doughnut-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.doughnut-wrap h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.doughnut-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === DEPRECIATION === */
#depreciation {
  background: var(--bg-secondary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#depreciation > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#depreciation .depreciation-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.depreciation-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.dep-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.dep-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.dep-card .dep-percent {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.dep-card .dep-percent.good {
  color: var(--accent-green);
}

.dep-card .dep-percent.bad {
  color: var(--accent-red);
}

.dep-card .dep-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dep-card .dep-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* === AVOID === */
#avoid {
  background: var(--bg-primary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#avoid > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#avoid .avoid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.avoid-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-red);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.avoid-card:hover {
  box-shadow: var(--shadow);
}

.avoid-card .avoid-icon {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.avoid-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--accent-red);
}

.avoid-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === CHECKLIST === */
#checklist {
  background: var(--bg-secondary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#checklist > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#checklist .progress-bar {
  background: var(--border);
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

#checklist .progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-green);
  border-radius: 50px;
  transition: width 0.4s ease-out;
}

#checklist .progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 2rem;
}

.checklist-section {
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.checklist-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.checklist-section label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
  border-radius: var(--radius-sm);
}

.checklist-section label:hover {
  color: var(--text-primary);
}

.checklist-item {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  margin-top: 2px;
  transition: all 0.2s;
  background: var(--bg-primary);
}

.checklist-item:hover {
  border-color: var(--accent-green);
}

.checklist-item:checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.checklist-item:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checklist-section label.checked {
  text-decoration: line-through;
  opacity: 0.5;
}

/* === NEXT STEPS === */
#next-steps {
  background: var(--bg-primary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#next-steps > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

#next-steps .steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.step-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.step-card ul {
  list-style: none;
}

.step-card li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.step-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.back-to-top {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  margin: 2rem auto;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-card);
}

.back-to-top:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
  color: var(--accent);
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

footer .disclaimer {
  max-width: 700px;
  margin: 0.5rem auto 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === OTHER CARS (Также рассмотрены) === */
#other-cars {
  background: var(--bg-secondary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#other-cars > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.other-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.sort-select {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
}

.sort-select:focus {
  border-color: var(--accent);
}

.other-group {
  margin-bottom: 1.5rem;
}

.other-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.other-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.75rem;
}

.other-car-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  overflow: hidden;
}

.other-car-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.other-card-collapsed {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  align-items: center;
}

.other-card-collapsed img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.other-card-summary {
  flex: 1;
  min-width: 0;
}

.other-card-summary h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.other-car-specs {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.other-car-meta {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.other-card-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.other-car-card.expanded .other-card-chevron {
  transform: rotate(180deg);
}

.other-card-expanded {
  display: none;
  padding: 0 0.75rem 0.75rem;
}

.other-car-card.expanded .other-card-expanded {
  display: block;
}

.other-car-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.4;
}

.other-expanded-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.other-expanded-photos img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-secondary);
}

.other-comparison {
  margin: 0.75rem 0;
}

.other-comparison h5 {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.other-compare-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.other-compare-table th,
.other-compare-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.other-compare-table th {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.other-car-card.expanded {
  grid-column: 1 / -1;
}

/* === COMPARE SECTION === */
#compare {
  background: var(--bg-secondary);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#compare > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.compare-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.compare-card.current {
  border-color: var(--accent);
  border-width: 2px;
}

.compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-muted);
  padding-top: 2rem;
}

.compare-card select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.compare-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
}

.compare-detail-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
}

.compare-detail-table th,
.compare-detail-table td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.compare-detail-table th {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.compare-detail-table h4 {
  margin-bottom: 0.5rem;
}

/* === SCROLL ANIMATION === */
/* Ensure tier-groups are always visible */
.tier-group.animate-on-scroll {
  opacity: 1 !important;
  transform: none !important;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    padding: 0.75rem 1.5rem 1.5rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    transition: transform 0.3s;
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
  }

  .nav-links a::after {
    display: none;
  }

  .burger {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  section {
    padding: 3rem 1.25rem;
  }

  .other-group-cards {
    grid-template-columns: 1fr;
  }

  .other-card-collapsed img {
    width: 100px;
    height: 70px;
  }

  .other-expanded-photos {
    grid-template-columns: 1fr 1fr;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .compare-vs {
    padding: 0;
    font-size: 1.25rem;
  }

  /* Reset full-width section padding for mobile */
  #current > *,
  #comparison > *,
  #top-3 > *,
  #tierlist > *,
  #ownership > *,
  #depreciation > *,
  #avoid > *,
  #other-cars > *,
  #compare > *,
  #checklist > *,
  #next-steps > * {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  #current .current-grid {
    grid-template-columns: 1fr;
  }

  #top-3 .top3-grid {
    grid-template-columns: 1fr;
  }

  .tier-cards {
    grid-template-columns: 1fr;
  }

  .tier-card .pros-cons {
    grid-template-columns: 1fr;
  }

  #ownership .ownership-grid {
    grid-template-columns: 1fr;
  }

  #avoid .avoid-grid {
    grid-template-columns: 1fr;
  }

  #next-steps .steps-grid {
    grid-template-columns: 1fr;
  }

  #comparison .table-wrapper {
    margin: 0 -1.25rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .filter-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .nav-logo {
    font-size: 1rem;
  }

  .car-images {
    grid-template-columns: 1fr;
  }

  .depreciation-examples {
    grid-template-columns: 1fr;
  }

  .top3-card {
    padding: 1.25rem;
  }

  .checklist-section {
    padding: 1rem;
  }
}
