:root {
  --cv-green: #00a83b;
  --cv-green-strong: #008f32;
  --cv-orange: #f47920;
  --cv-bg: #f4f7f5;
  --cv-surface: #ffffff;
  --cv-ink: #10231b;
  --cv-muted: #52635b;
  --cv-line: #d8e2dc;
  --cv-hero: #0b2118;
  --cv-hero-ink: #ffffff;
  --cv-soft: #e8f5ed;
  color-scheme: light;
}

html[data-theme="dark"] {
  --cv-bg: #07140f;
  --cv-surface: #10251c;
  --cv-ink: #f5faf7;
  --cv-muted: #b9c8c0;
  --cv-line: #294238;
  --cv-hero: #061b12;
  --cv-soft: #163829;
  color-scheme: dark;
}

body { background: var(--cv-bg) !important; color: var(--cv-ink) !important; }
section[aria-label="Главный экран"]:not(.cv-hero),
#legacy-hero { display: none !important; }

.cv-hero {
  position: relative;
  overflow: hidden;
  background: var(--cv-hero);
  color: var(--cv-hero-ink);
  padding: clamp(3rem, 7vw, 6.5rem) 1rem 3.5rem;
}
.cv-hero::after {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  right: -13rem;
  top: -17rem;
  border: 6rem solid rgba(0, 168, 59, .13);
  border-radius: 50%;
  pointer-events: none;
}
.cv-wrap { width: min(1180px, 100%); margin-inline: auto; position: relative; z-index: 1; }
.cv-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: clamp(2rem, 5vw, 5.5rem); align-items: center; }
.cv-status { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem; font-weight: 750; font-size: .9rem; color: #d8f7e3; }
.cv-status::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: #28d866; box-shadow: 0 0 0 .35rem rgba(40,216,102,.13); }
.cv-hero h1 { max-width: 14ch; margin: 0 0 1.25rem; font-size: clamp(2.4rem, 5.3vw, 5rem); line-height: .99; letter-spacing: -.035em; text-wrap: balance; }
.cv-lead { max-width: 58ch; margin: 0; color: #c8d7d0; font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.65; text-wrap: pretty; }
.cv-benefits { display: flex; flex-wrap: wrap; gap: .65rem 1.2rem; padding: 0; margin: 1.8rem 0 0; list-style: none; color: #edf7f1; font-size: .92rem; }
.cv-benefits li::before { content: "✓"; color: #46df79; font-weight: 900; margin-right: .45rem; }

.cv-panel { background: var(--cv-surface); color: var(--cv-ink); border-radius: 1.5rem; padding: clamp(1.35rem, 3vw, 2rem); box-shadow: 0 28px 70px rgba(0,0,0,.28); }
.cv-panel h2 { margin: 0 0 .45rem; font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -.02em; }
.cv-panel > p { color: var(--cv-muted); margin: 0 0 1.25rem; line-height: 1.5; }
.cv-field { display: grid; gap: .45rem; margin-bottom: .9rem; }
.cv-field label { font-size: .88rem; font-weight: 750; }
.cv-field input, .cv-field select {
  width: 100%; min-height: 3.25rem; padding: .75rem .9rem; border: 1px solid var(--cv-line);
  border-radius: .75rem; background: var(--cv-surface); color: var(--cv-ink); font: inherit;
}
.cv-field input::placeholder { color: color-mix(in srgb, var(--cv-muted) 82%, transparent); opacity: 1; }
.cv-field input:focus, .cv-field select:focus { outline: 3px solid rgba(0,168,59,.2); border-color: var(--cv-green); }
.cv-consent { display: flex; gap: .65rem; align-items: flex-start; color: var(--cv-muted); font-size: .78rem; line-height: 1.45; margin: .85rem 0 1rem; }
.cv-consent input { margin-top: .18rem; accent-color: var(--cv-green); }
.cv-consent a { color: var(--cv-green-strong); text-underline-offset: 2px; }
.cv-button { width: 100%; min-height: 3.35rem; border: 0; border-radius: .8rem; padding: .75rem 1rem; background: var(--cv-green); color: #fff; font: 800 1rem/1.2 inherit; cursor: pointer; transition: transform .2s cubic-bezier(.22,1,.36,1), background .2s; }
.cv-button:hover { background: var(--cv-green-strong); transform: translateY(-2px); }
.cv-button:focus-visible, .cv-theme:focus-visible, .cv-link:focus-visible { outline: 3px solid var(--cv-orange); outline-offset: 3px; }
.cv-reassurance { margin: .8rem 0 0 !important; text-align: center; font-size: .76rem; }
.cv-contact-hours {
  margin: .75rem 0 0;
  padding: .7rem .8rem;
  border: 1px solid var(--cv-line);
  border-radius: .7rem;
  background: var(--cv-soft);
  color: var(--cv-muted);
  font-size: .78rem;
  line-height: 1.45;
}
.cv-contact-hours strong { color: var(--cv-ink); }
.cv-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.cv-error { min-height: 1.25rem; color: #c92a2a; font-size: .78rem; margin: -.25rem 0 .35rem; }

.cv-trust {
  width: min(1180px, calc(100% - 2rem)); margin: -1.2rem auto 0; position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; background: var(--cv-surface); border: 1px solid var(--cv-line); border-radius: 1.2rem;
}
.cv-trust > div { padding: 1.25rem 1.4rem; }
.cv-trust > div + div { border-left: 1px solid var(--cv-line); }
.cv-trust strong { display: block; font-size: .86rem; margin-bottom: .3rem; }
.cv-trust span, .cv-trust a { color: var(--cv-muted); font-size: .82rem; line-height: 1.45; }
.cv-trust a { text-decoration-color: var(--cv-green); text-underline-offset: 3px; }
.cv-trust-reviews { display: grid; align-content: center; }
.cv-rating-row { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.cv-rating-row iframe { display: block; flex: 0 0 150px; width: 150px; height: 50px; border: 0; color-scheme: light; }
.cv-rating-row a { max-width: 9.5rem; font-weight: 720; text-wrap: balance; }
.cv-trust-contacts { display: grid; align-content: center; gap: .15rem; }
.cv-trust-contacts .cv-trust-contact {
  color: var(--cv-ink); font-size: .93rem; font-weight: 760; text-decoration: none;
}
.cv-trust-contacts .cv-trust-contact:hover { color: var(--cv-green-strong); }
.cv-trust-contacts .cv-trust-details { margin-top: .3rem; font-size: .78rem; }

.cv-calc { padding: clamp(4rem, 7vw, 6rem) 1rem; background: var(--cv-bg); color: var(--cv-ink); }
.cv-calc-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.cv-calc h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 1rem; max-width: 12ch; }
.cv-calc-copy { color: var(--cv-muted); max-width: 48ch; line-height: 1.65; }
.cv-calculator { background: var(--cv-surface); border: 1px solid var(--cv-line); border-radius: 1.3rem; padding: clamp(1.2rem, 3vw, 2rem); }
.cv-calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.cv-result { margin-top: 1rem; padding: 1rem; background: var(--cv-soft); border-radius: .8rem; color: var(--cv-ink); font-size: .9rem; line-height: 1.5; }

.cv-theme {
  position: fixed; z-index: 55; right: 1rem; top: 5rem; display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.7rem; padding: .55rem .8rem; border: 1px solid var(--cv-line); border-radius: 999px;
  background: var(--cv-surface); color: var(--cv-ink); box-shadow: 0 8px 24px rgba(0,0,0,.14); font: 750 .82rem/1 inherit; cursor: pointer;
}

.cv-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(540px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: 0;
  border: 0;
  border-radius: 1.25rem;
  padding: 0;
  overflow-y: auto;
  transform: translate(-50%, -50%);
  background: var(--cv-surface);
  color: var(--cv-ink);
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
}
.cv-dialog::backdrop { background: rgba(3,15,10,.72); backdrop-filter: blur(5px); }
.cv-dialog-inner { padding: 1.5rem; }
.cv-dialog-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cv-dialog h2 { margin: 0; font-size: 1.55rem; }
.cv-close { border: 0; background: transparent; color: var(--cv-muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.cv-progress { color: var(--cv-green-strong); font-size: .8rem; font-weight: 800; margin-bottom: .4rem; }
.cv-success { text-align: center; padding: 2rem 0; }
.cv-success-mark { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; margin: 0 auto 1rem; border-radius: 50%; background: var(--cv-soft); color: var(--cv-green); font-size: 1.8rem; font-weight: 900; }

html[data-theme="light"] section.bg-\[\#0A1929\],
html[data-theme="light"] section.bg-\[\#0D1F2D\],
html[data-theme="light"] #lead-form {
  background: #f4f7f5 !important;
  background-image: none !important;
  color: #10231b !important;
}
html[data-theme="light"] section.bg-\[\#0A1929\] .text-white,
html[data-theme="light"] section.bg-\[\#0D1F2D\] .text-white,
html[data-theme="light"] #lead-form .text-white { color: #10231b !important; }
html[data-theme="light"] section.bg-\[\#0A1929\] [class*="text-white/"],
html[data-theme="light"] section.bg-\[\#0D1F2D\] [class*="text-white/"],
html[data-theme="light"] #lead-form [class*="text-white/"] { color: #52635b !important; }
html[data-theme="light"] section.bg-\[\#0A1929\] .bg-white\/5,
html[data-theme="light"] section.bg-\[\#0D1F2D\] .bg-white\/5 {
  background: #ffffff !important;
  border-color: #d8e2dc !important;
}
html[data-theme="light"] section.bg-\[\#0A1929\] [class*="border-white"],
html[data-theme="light"] section.bg-\[\#0D1F2D\] [class*="border-white"],
html[data-theme="light"] #lead-form [class*="border-white"] { border-color: #d8e2dc !important; }
html[data-theme="dark"] section.bg-white,
html[data-theme="dark"] section.bg-\[\#F5F7F6\] { background: var(--cv-bg) !important; color: var(--cv-ink) !important; }

@media (max-width: 800px) {
  .cv-hero-grid, .cv-calc-grid { grid-template-columns: 1fr; }
  .cv-hero h1 { max-width: 15ch; }
  .cv-trust { grid-template-columns: 1fr; }
  .cv-trust > div + div { border-left: 0; border-top: 1px solid var(--cv-line); }
  .cv-rating-row { justify-content: space-between; }
  .cv-calc-fields { grid-template-columns: 1fr; }
  .cv-time-grid { grid-template-columns: 1fr; }
  .cv-theme { top: auto; bottom: 5.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-button { transition: none; }
  .cv-dialog::backdrop { backdrop-filter: none; }
}

.cv-guides {
  padding: clamp(4rem, 7vw, 6rem) 1rem;
  background: var(--cv-surface);
  color: var(--cv-ink);
}
.cv-guides-head {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: 2.5rem;
}
.cv-guides h2 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.cv-guides-head p { max-width: 64ch; margin: 0; color: var(--cv-muted); line-height: 1.65; }
.cv-guide-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--cv-line); }
.cv-guide-list a {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--cv-ink);
  border-bottom: 1px solid var(--cv-line);
  text-decoration: none;
  font-weight: 760;
}
.cv-guide-list a:nth-child(odd) { padding-right: 1.5rem; }
.cv-guide-list a:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--cv-line); }
.cv-guide-list a::after { content: "→"; color: var(--cv-green-strong); font-size: 1.25rem; }
.cv-guide-list a:hover, .cv-guide-list a:focus-visible { color: var(--cv-green-strong); }
.cv-guide-list a:focus-visible { outline: 3px solid #F47920; outline-offset: 3px; }
@media (max-width: 800px) {
  .cv-guides-head, .cv-guide-list { grid-template-columns: 1fr; }
  .cv-guide-list a:nth-child(odd), .cv-guide-list a:nth-child(even) { padding-inline: 0; border-left: 0; }
}
