/*
 * Elena Doroshenko 3.1 Final
 * Final visual system: visible editorial underlays, strict contrast, cache-proof form fixes.
 * Loaded last. All rules are scoped to .ed-signature-v310.
 */

:root {
  --ed-v3-navy: #0a315b;
  --ed-v3-navy-deep: #061f39;
  --ed-v3-ink: #263845;
  --ed-v3-muted: #61717d;
  --ed-v3-paper: #fffaf2;
  --ed-v3-paper-2: #f8f1e6;
  --ed-v3-blue: #86a9c2;
  --ed-v3-blue-soft: #d9e7ef;
  --ed-v3-blue-pale: #edf4f7;
  --ed-v3-gold: #b88439;
  --ed-v3-gold-soft: #e8c982;
  --ed-v3-gold-pale: #f6e8ca;
  --ed-v3-teal: #2f6f70;
  --ed-v3-line: rgba(10,49,91,.14);
  --ed-v3-shadow: 0 24px 64px rgba(7,31,60,.12);
  --ed-v3-shadow-soft: 0 14px 38px rgba(7,31,60,.08);
}

body.ed-signature-v310 {
  color: var(--ed-v3-ink);
  background: var(--ed-v3-paper);
}

body.ed-signature-v310 .ed-main,
body.ed-signature-v310 .ed-inner-main { overflow: clip; }

/* =============================
   HEADER
   ============================= */
body.ed-signature-v310 .ed-header {
  background: rgba(255,250,242,.92);
  border-bottom-color: rgba(10,49,91,.10);
  box-shadow: 0 8px 28px rgba(7,31,60,.035);
}
body.ed-signature-v310 .ed-nav__link { color: #20394e; }
body.ed-signature-v310 .ed-header .ed-button--small {
  border-radius: 999px;
  padding-inline: 20px;
  box-shadow: 0 11px 26px rgba(10,49,91,.16);
}

/* =============================
   INNER HERO — visible geometric composition, no smoke
   ============================= */
body.ed-signature-v310 .ed-inner-hero {
  position: relative;
  isolation: isolate;
  min-height: 650px;
  overflow: hidden;
  padding: 22px 0 82px;
  color: var(--ed-v3-ink);
  background:
    linear-gradient(100deg, rgba(255,250,242,.995) 0 50%, rgba(239,246,249,.985) 50% 100%),
    url("../decor/paper-grain.svg");
  background-size: auto, 240px 240px;
}

/* Main blue architectural slab: positive z-index = actually visible. */
body.ed-signature-v310 .ed-inner-hero::before {
  position: absolute;
  z-index: 0;
  top: -11%;
  right: -8%;
  width: min(61vw, 920px);
  height: 126%;
  content: "";
  background:
    linear-gradient(145deg, rgba(139,177,201,.74), rgba(215,231,239,.88));
  border-radius: 54% 0 0 42% / 44% 0 0 56%;
  transform: rotate(-4deg);
  box-shadow: inset 1px 0 rgba(255,255,255,.58);
  pointer-events: none;
}

/* Gold orbit. */
body.ed-signature-v310 .ed-inner-hero::after {
  position: absolute;
  z-index: 1;
  top: 12%;
  right: -5%;
  width: min(47vw, 720px);
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(184,132,57,.34);
  border-radius: 50%;
  box-shadow:
    0 0 0 74px rgba(255,255,255,.08),
    0 0 0 148px rgba(10,49,91,.035);
  pointer-events: none;
}

body.ed-signature-v310 .ed-inner-hero__wash {
  position: absolute;
  z-index: 1;
  bottom: -280px;
  left: -220px;
  width: 610px;
  height: 610px;
  background: rgba(232,201,130,.16);
  border: 1px solid rgba(184,132,57,.19);
  border-radius: 50%;
  box-shadow: inset 0 0 0 112px rgba(255,255,255,.20);
  filter: none;
  opacity: 1;
  pointer-events: none;
}
body.ed-signature-v310 .ed-inner-hero > .ed-shell { position: relative; z-index: 3; }
body.ed-signature-v310 .ed-breadcrumbs {
  position: relative;
  z-index: 4;
  padding: 16px 0 42px;
  color: #6d7a84;
}
body.ed-signature-v310 .ed-inner-hero__grid {
  position: relative;
  z-index: 4;
  grid-template-columns: minmax(0,1.08fr) minmax(330px,.72fr);
  gap: clamp(52px, 7vw, 110px);
}
body.ed-signature-v310 .ed-inner-hero__copy {
  max-width: 800px;
  padding: 14px 0 26px;
}
body.ed-signature-v310 .ed-inner-hero__copy .ed-overline { color: #8a612a; }
body.ed-signature-v310 .ed-inner-hero__copy h1 {
  max-width: 900px;
  margin-bottom: 28px;
  color: var(--ed-v3-navy);
  font-size: clamp(3.65rem,6vw,6.25rem);
  line-height: .92;
  text-wrap: balance;
}
body.ed-signature-v310 .ed-inner-hero__copy > p {
  max-width: 700px;
  margin: 0;
  color: #526675;
  font-size: clamp(1.05rem,1.45vw,1.25rem);
  line-height: 1.62;
}
body.ed-signature-v310 .ed-inner-hero__photo {
  position: relative;
  z-index: 4;
  width: min(100%, 410px);
  height: 495px;
  overflow: visible;
  border: 7px solid rgba(255,253,249,.96);
  border-radius: 48% 48% 22px 22px / 28% 28% 22px 22px;
  box-shadow: 0 30px 78px rgba(7,31,60,.21);
}
body.ed-signature-v310 .ed-inner-hero__photo img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: inherit;
}
body.ed-signature-v310 .ed-inner-hero__photo::before {
  inset: 12px;
  border-color: rgba(255,255,255,.36);
  border-radius: inherit;
}
body.ed-signature-v310 .ed-inner-hero__photo::after {
  position: absolute;
  z-index: -1;
  right: -34px;
  bottom: -34px;
  width: 68%;
  height: 44%;
  content: "";
  background: linear-gradient(145deg, rgba(237,207,145,.78), rgba(184,132,57,.42));
  border-radius: 55% 18% 38% 22%;
  transform: rotate(4deg);
}

/* Page-specific hero accents without changing the brand system. */
body.ed-signature-v310.ed-page-finansovaya-terapiya .ed-inner-hero::before {
  background: linear-gradient(145deg, rgba(77,124,151,.86), rgba(188,215,226,.78));
}
body.ed-signature-v310.ed-page-obrazovanie .ed-inner-hero::before,
body.ed-signature-v310.ed-page-publikatsii .ed-inner-hero::before,
body.ed-signature-v310.ed-page-kursy .ed-inner-hero::before {
  background: linear-gradient(145deg, rgba(219,198,159,.82), rgba(230,239,242,.88));
}
body.ed-signature-v310.ed-page-o-mne .ed-inner-hero::before {
  background: linear-gradient(145deg, rgba(179,205,219,.90), rgba(239,229,211,.84));
}

/* =============================
   INNER SECTIONS — underlays are layers above background, not behind it
   ============================= */
body.ed-signature-v310 .ed-inner-main > .ed-page-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(82px, 8vw, 118px) 0;
  color: var(--ed-v3-ink);
  background:
    linear-gradient(rgba(255,250,242,.97), rgba(255,250,242,.97)),
    url("../decor/paper-grain.svg");
  background-size: auto, 240px 240px;
  border-top: 1px solid rgba(10,49,91,.055);
}
body.ed-signature-v310 .ed-inner-main > .ed-page-section > .ed-shell {
  position: relative;
  z-index: 4;
}

/* Bold powder-blue geometric underlay. */
body.ed-signature-v310 .ed-inner-main > .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote)::before {
  position: absolute;
  z-index: 1;
  top: -18%;
  right: -13%;
  width: min(47vw, 740px);
  height: 142%;
  content: "";
  background: linear-gradient(145deg, rgba(213,229,237,.82), rgba(236,244,247,.60));
  border-radius: 56% 0 0 48% / 44% 0 0 56%;
  transform: rotate(-5deg);
  pointer-events: none;
}
/* Gold contour ring that makes the backdrop intentional. */
body.ed-signature-v310 .ed-inner-main > .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote)::after {
  position: absolute;
  z-index: 2;
  right: 5%;
  bottom: -260px;
  width: 520px;
  height: 520px;
  content: "";
  border: 1px solid rgba(184,132,57,.24);
  border-radius: 50%;
  box-shadow: inset 0 0 0 82px rgba(232,201,130,.04);
  pointer-events: none;
}

/* Alternate generic sections so a long page does not look copied-and-pasted. */
body.ed-signature-v310 .ed-inner-main > .ed-page-section:nth-of-type(4n):not(.ed-page-section--financial):not(.ed-page-section--quote)::before {
  right: auto;
  left: -16%;
  background: linear-gradient(145deg, rgba(244,229,197,.72), rgba(231,239,243,.64));
  border-radius: 0 56% 48% 0 / 0 44% 56% 0;
  transform: rotate(4deg);
}
body.ed-signature-v310 .ed-inner-main > .ed-page-section:nth-of-type(4n):not(.ed-page-section--financial):not(.ed-page-section--quote)::after {
  right: auto;
  left: 7%;
  bottom: -295px;
}

/* Tint sections: intentionally visible split backdrop. */
body.ed-signature-v310 .ed-inner-main > .ed-page-section--tint {
  background:
    linear-gradient(112deg, #edf4f7 0 47%, #fbf4e8 47% 100%),
    url("../decor/paper-grain.svg");
}
body.ed-signature-v310 .ed-inner-main > .ed-page-section--tint::before {
  top: -34%;
  right: auto;
  left: -10%;
  width: min(52vw, 820px);
  height: 172%;
  background: linear-gradient(145deg, rgba(92,139,171,.18), rgba(255,255,255,.10));
  border: 1px solid rgba(10,49,91,.07);
  border-radius: 0 56% 48% 0 / 0 42% 58% 0;
  transform: rotate(3deg);
}
body.ed-signature-v310 .ed-inner-main > .ed-page-section--tint::after {
  right: 6%;
  bottom: -235px;
  width: 480px;
  height: 480px;
  border-color: rgba(184,132,57,.27);
  box-shadow:
    0 0 0 58px rgba(255,255,255,.11),
    inset 0 0 0 96px rgba(232,201,130,.035);
}

/* Dark editorial financial bands. */
body.ed-signature-v310 .ed-inner-main > .ed-page-section--financial,
body.ed-signature-v310 .ed-inner-main > .ed-page-section--quote {
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(70,133,137,.42), transparent 30%),
    linear-gradient(122deg, #061f39 0%, #0a315b 56%, #1f6672 100%);
  border-top: 0;
}
body.ed-signature-v310 .ed-inner-main > .ed-page-section--financial::before,
body.ed-signature-v310 .ed-inner-main > .ed-page-section--quote::before {
  position: absolute;
  z-index: 1;
  top: -290px;
  right: -140px;
  width: 690px;
  height: 690px;
  content: "";
  border: 1px solid rgba(232,201,130,.26);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 94px rgba(255,255,255,.018),
    inset 0 0 0 188px rgba(255,255,255,.014);
  pointer-events: none;
}
body.ed-signature-v310 .ed-inner-main > .ed-page-section--financial::after,
body.ed-signature-v310 .ed-inner-main > .ed-page-section--quote::after {
  position: absolute;
  z-index: 1;
  bottom: -28%;
  left: -10%;
  width: 42%;
  height: 68%;
  content: "";
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(232,201,130,.035));
  border-radius: 54% 46% 36% 64%;
  transform: rotate(-7deg);
  pointer-events: none;
}
body.ed-signature-v310 .ed-page-section--financial,
body.ed-signature-v310 .ed-page-section--financial h1,
body.ed-signature-v310 .ed-page-section--financial h2,
body.ed-signature-v310 .ed-page-section--financial h3,
body.ed-signature-v310 .ed-page-section--financial h4,
body.ed-signature-v310 .ed-page-section--quote,
body.ed-signature-v310 .ed-page-section--quote h1,
body.ed-signature-v310 .ed-page-section--quote h2,
body.ed-signature-v310 .ed-page-section--quote h3 { color: #fff; }
body.ed-signature-v310 .ed-page-section--financial p,
body.ed-signature-v310 .ed-page-section--financial li,
body.ed-signature-v310 .ed-page-section--quote p,
body.ed-signature-v310 .ed-page-section--quote li { color: rgba(255,255,255,.84); }
body.ed-signature-v310 .ed-page-section--financial .ed-overline,
body.ed-signature-v310 .ed-page-section--quote .ed-overline { color: #f0d29a; }

/* Strict contrast on every light surface. */
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote),
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) p,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) li,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) label,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) small {
  color: var(--ed-v3-ink);
}
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) h1,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) h2,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) h3,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) h4 { color: var(--ed-v3-navy); }
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) .ed-overline,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) .ed-page-question { color: #8a612a; }
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) .ed-section-heading p,
body.ed-signature-v310 .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote) .ed-prose > p:not(.ed-copy-hook):not(.ed-page-question) { color: var(--ed-v3-muted); }

/* =============================
   CARD SYSTEM
   ============================= */
body.ed-signature-v310 .ed-fact-panel,
body.ed-signature-v310 .ed-principles-grid article,
body.ed-signature-v310 .ed-topic-grid article,
body.ed-signature-v310 .ed-compare-grid article,
body.ed-signature-v310 .ed-proof-bar > div,
body.ed-signature-v310 .ed-link-deck a,
body.ed-signature-v310 .ed-document-card,
body.ed-signature-v310 .ed-course-archive__item,
body.ed-signature-v310 .ed-publication-row,
body.ed-signature-v310 .ed-objection-box,
body.ed-signature-v310 .ed-boundary-wide,
body.ed-signature-v310 .ed-contact-page__note {
  background: rgba(255,253,249,.93);
  border: 1px solid rgba(10,49,91,.11);
  box-shadow: var(--ed-v3-shadow-soft);
}
body.ed-signature-v310 .ed-principles-grid article,
body.ed-signature-v310 .ed-topic-grid article,
body.ed-signature-v310 .ed-compare-grid article,
body.ed-signature-v310 .ed-proof-bar > div,
body.ed-signature-v310 .ed-link-deck a,
body.ed-signature-v310 .ed-document-card,
body.ed-signature-v310 .ed-course-archive__item,
body.ed-signature-v310 .ed-publication-row {
  border-radius: 20px;
}
body.ed-signature-v310 .ed-compare-grid article:last-child {
  background: linear-gradient(145deg, rgba(225,237,243,.96), rgba(255,250,242,.96));
}
body.ed-signature-v310 .ed-service-detail-grid {
  overflow: hidden;
  background: rgba(10,49,91,.11);
  border: 1px solid rgba(10,49,91,.12);
  border-radius: 28px;
  box-shadow: var(--ed-v3-shadow);
}
body.ed-signature-v310 .ed-service-detail-grid article {
  color: var(--ed-v3-ink);
  background:
    radial-gradient(circle at 100% 0, rgba(132,171,196,.15), transparent 30%),
    rgba(255,253,249,.98);
}
body.ed-signature-v310 .ed-service-detail-grid article h2 { color: var(--ed-v3-navy); }
body.ed-signature-v310 .ed-service-detail-grid article p { color: var(--ed-v3-muted); }

/* =============================
   CONTACTS — designed as a full composition
   ============================= */
body.ed-signature-v310.ed-page-kontakty .ed-inner-main > .ed-inner-hero + .ed-page-section {
  background:
    linear-gradient(108deg, #eaf2f6 0 43%, #fff9ef 43% 100%),
    url("../decor/paper-grain.svg");
}
body.ed-signature-v310.ed-page-kontakty .ed-inner-main > .ed-inner-hero + .ed-page-section::before {
  z-index: 1;
  top: 4%;
  right: auto;
  left: -12%;
  width: 53%;
  height: 92%;
  background: linear-gradient(145deg, rgba(102,149,179,.22), rgba(255,255,255,.04));
  border: 1px solid rgba(10,49,91,.08);
  border-radius: 0 48% 52% 0 / 0 44% 56% 0;
  transform: rotate(2deg);
}
body.ed-signature-v310.ed-page-kontakty .ed-inner-main > .ed-inner-hero + .ed-page-section::after {
  z-index: 2;
  right: -170px;
  bottom: -180px;
  width: 540px;
  height: 540px;
  border-color: rgba(184,132,57,.27);
  box-shadow:
    0 0 0 66px rgba(255,255,255,.12),
    inset 0 0 0 102px rgba(232,201,130,.04);
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page-grid {
  align-items: start;
  gap: clamp(34px, 6vw, 82px);
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__methods {
  position: relative;
  padding: clamp(30px, 4vw, 48px);
  background: rgba(255,253,249,.73);
  border: 1px solid rgba(10,49,91,.10);
  border-radius: 34px 34px 88px 34px;
  box-shadow: 0 22px 58px rgba(7,31,60,.075);
  backdrop-filter: blur(6px);
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__methods::after {
  position: absolute;
  right: 28px;
  bottom: 26px;
  width: 72px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--ed-v3-gold));
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__form {
  position: relative;
  padding: clamp(30px, 4vw, 48px);
  background:
    radial-gradient(circle at 100% 0, rgba(134,169,194,.11), transparent 28%),
    rgba(255,253,249,.98);
  border: 1px solid rgba(10,49,91,.12);
  border-radius: 34px;
  box-shadow: 0 28px 76px rgba(7,31,60,.13);
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__form::before {
  position: absolute;
  top: 0;
  left: 46px;
  width: 92px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--ed-v3-gold), #e8cb91);
  border-radius: 0 0 999px 999px;
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__socials a,
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__email {
  background: rgba(255,255,255,.84);
  border-color: rgba(10,49,91,.12);
  box-shadow: 0 9px 24px rgba(7,31,60,.045);
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__socials a:hover,
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__email:hover {
  transform: translateY(-2px);
  border-color: rgba(184,132,57,.45);
  box-shadow: 0 15px 34px rgba(7,31,60,.08);
}
body.ed-signature-v310.ed-page-kontakty .ed-contact-page__note {
  color: #4d4a43;
  background: linear-gradient(145deg, rgba(255,247,232,.98), rgba(249,239,218,.96));
  border-color: rgba(184,132,57,.24);
  border-radius: 18px;
}

/* Proof row becomes a deliberate visual bridge, not a thin spreadsheet row. */
body.ed-signature-v310.ed-page-kontakty .ed-page-section--tint {
  padding: 56px 0 70px;
  background: linear-gradient(108deg, #eef4f7 0 58%, #f6ecdb 58% 100%);
}
body.ed-signature-v310.ed-page-kontakty .ed-proof-bar {
  gap: 16px;
}
body.ed-signature-v310.ed-page-kontakty .ed-proof-bar > div {
  min-height: 126px;
  padding: 24px 26px;
  background: rgba(255,253,249,.9);
  border-radius: 18px;
}
body.ed-signature-v310.ed-page-kontakty .ed-proof-bar strong {
  color: var(--ed-v3-navy);
  font-family: var(--ed-serif);
  font-size: 1.25rem;
  font-weight: 500;
}
body.ed-signature-v310.ed-page-kontakty .ed-proof-bar small {
  margin-top: 7px;
  color: #667784;
  line-height: 1.5;
}

/* =============================
   FORM / LEGAL BLOCK — hard override that wins after plugin CSS
   ============================= */
body.ed-signature-v310 .edf-form,
body.ed-signature-v310 .ed-contact-page__form form {
  color: var(--ed-v3-ink) !important;
}
body.ed-signature-v310 .edf-form label,
body.ed-signature-v310 .edf-form p,
body.ed-signature-v310 .edf-form span,
body.ed-signature-v310 .edf-form small { color: var(--ed-v3-ink); }
body.ed-signature-v310 .edf-form input:not([type="checkbox"]):not([type="radio"]),
body.ed-signature-v310 .edf-form select,
body.ed-signature-v310 .edf-form textarea {
  color: #243746 !important;
  background: #fff !important;
  border-color: rgba(10,49,91,.17) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7) !important;
}
body.ed-signature-v310 .edf-form input::placeholder,
body.ed-signature-v310 .edf-form textarea::placeholder { color: #6a7780 !important; opacity: 1 !important; }

body.ed-signature-v310 .edf-legal {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-inline-size: 0 !important;
  margin: 14px 0 0 !important;
  padding: 24px !important;
  color: #2c3e4d !important;
  background:
    radial-gradient(circle at 100% 0, rgba(134,169,194,.11), transparent 28%),
    linear-gradient(145deg, #f7f0e6, #fffdf9) !important;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow:
    inset 0 0 0 1px rgba(10,49,91,.12),
    0 15px 38px rgba(7,31,60,.055) !important;
  overflow: hidden !important;
}
/* Native legend is always semantic-only. */
body.ed-signature-v310 .edf-legal > legend,
body.ed-signature-v310 .edf-legal > .edf-legal__legend {
  position: absolute !important;
  display: block !important;
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  max-height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  font-size: 1px !important;
  line-height: 1 !important;
  opacity: 0 !important;
}
/* The PHP-injected heading is the only visible heading. */
body.ed-signature-v310 .edf-legal > .edf-legal__heading {
  display: block !important;
  width: 100% !important;
  margin: 0 0 3px !important;
  padding: 0 !important;
  color: var(--ed-v3-navy) !important;
  font-family: var(--ed-serif) !important;
  font-size: clamp(1.45rem, 2.2vw, 1.82rem) !important;
  font-weight: 500 !important;
  line-height: 1.13 !important;
  letter-spacing: -.025em !important;
}
/* Fallback when cached HTML has no injected visual heading. */
body.ed-signature-v310 .edf-legal:not(:has(> .edf-legal__heading))::before {
  display: block !important;
  content: "Подтверждения и согласия" !important;
  margin: 0 0 3px !important;
  color: var(--ed-v3-navy) !important;
  font-family: var(--ed-serif) !important;
  font-size: clamp(1.45rem, 2.2vw, 1.82rem) !important;
  font-weight: 500 !important;
  line-height: 1.13 !important;
  letter-spacing: -.025em !important;
}
body.ed-signature-v310 .edf-legal > p {
  margin: 0 0 5px !important;
  color: #61717d !important;
  font-size: .96rem !important;
  line-height: 1.55 !important;
}
body.ed-signature-v310 .edf-legal .edf-consent {
  display: grid !important;
  grid-template-columns: 22px minmax(0,1fr) !important;
  align-items: start !important;
  gap: 13px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  color: #314451 !important;
  background: rgba(255,255,255,.91) !important;
  border: 1px solid rgba(10,49,91,.09) !important;
  border-radius: 14px !important;
  box-shadow: 0 7px 20px rgba(7,31,60,.025) !important;
  font-size: .95rem !important;
  font-weight: 500 !important;
  line-height: 1.48 !important;
}
body.ed-signature-v310 .edf-legal .edf-consent--primary {
  background: linear-gradient(135deg, #eef6f8, #fff) !important;
  border-color: rgba(49,93,140,.20) !important;
}
body.ed-signature-v310 .edf-legal .edf-consent input[type="checkbox"] {
  width: 21px !important;
  min-width: 21px !important;
  height: 21px !important;
  margin: 1px 0 0 !important;
  accent-color: #0a416f !important;
}
body.ed-signature-v310 .edf-legal .edf-consent > span {
  min-width: 0 !important;
  color: #314451 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}
body.ed-signature-v310 .edf-legal .edf-consent a {
  color: #0a3a69 !important;
  font-weight: 700 !important;
}
body.ed-signature-v310 .edf-form button[type="submit"],
body.ed-signature-v310 .edf-form input[type="submit"] {
  border-radius: 999px !important;
}

/* =============================
   GENERIC / LEGAL PAGES
   ============================= */
body.ed-signature-v310 .ed-content-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 72vh;
  padding: clamp(70px, 8vw, 112px) 0;
  color: var(--ed-v3-ink);
  background:
    linear-gradient(112deg, #edf4f7 0 34%, #fffaf2 34% 100%),
    url("../decor/paper-grain.svg");
}
body.ed-signature-v310 .ed-content-page::before {
  position: absolute;
  z-index: 0;
  top: -170px;
  right: -170px;
  width: 560px;
  height: 560px;
  content: "";
  border: 1px solid rgba(184,132,57,.26);
  border-radius: 50%;
  box-shadow: 0 0 0 78px rgba(255,255,255,.10);
}
body.ed-signature-v310 .ed-content-page::after {
  position: absolute;
  z-index: 0;
  bottom: -260px;
  left: -220px;
  width: 600px;
  height: 600px;
  content: "";
  background: rgba(134,169,194,.14);
  border-radius: 50%;
}
body.ed-signature-v310 .ed-content-page__inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
  padding: clamp(34px,5vw,62px);
  background: rgba(255,253,249,.91);
  border: 1px solid rgba(10,49,91,.10);
  border-radius: 30px;
  box-shadow: var(--ed-v3-shadow);
}
body.ed-signature-v310 .ed-entry-title { color: var(--ed-v3-navy); }
body.ed-signature-v310 .ed-entry-content { color: var(--ed-v3-ink); }
body.ed-signature-v310 .ed-entry-content h2,
body.ed-signature-v310 .ed-entry-content h3 { color: var(--ed-v3-navy); }

/* =============================
   INNER CTA / FOOTER TRANSITION
   ============================= */
body.ed-signature-v310 .ed-inner-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 86% 16%, rgba(55,126,132,.42), transparent 27%),
    linear-gradient(115deg, #061f39 0%, #0a315b 58%, #165a70 100%);
}
body.ed-signature-v310 .ed-inner-cta__wash {
  z-index: 0;
  right: -7%;
  bottom: -78%;
  border-color: rgba(232,201,130,.25);
}
body.ed-signature-v310 .ed-inner-cta__grid { position: relative; z-index: 2; }
body.ed-signature-v310 .ed-inner-cta h2 { color: #fff; }
body.ed-signature-v310 .ed-inner-cta p { color: rgba(255,255,255,.78); }

/* =============================
   MOBILE / TABLET
   ============================= */
@media (max-width: 1100px) {
  body.ed-signature-v310 .ed-inner-hero { min-height: 590px; }
  body.ed-signature-v310 .ed-inner-hero__grid {
    grid-template-columns: minmax(0,1fr) 330px;
    gap: 44px;
  }
  body.ed-signature-v310 .ed-inner-hero__photo { height: 440px; }
  body.ed-signature-v310 .ed-inner-main > .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote)::before {
    width: 54vw;
  }
}

@media (max-width: 820px) {
  body.ed-signature-v310 .ed-inner-hero {
    min-height: 0;
    padding-bottom: 58px;
    background: linear-gradient(145deg, #fffaf2 0 52%, #edf4f7 52% 100%);
  }
  body.ed-signature-v310 .ed-inner-hero::before {
    top: 42%;
    right: -34%;
    width: 104vw;
    height: 70%;
    border-radius: 55% 0 0 0 / 40% 0 0 0;
    transform: rotate(-3deg);
  }
  body.ed-signature-v310 .ed-inner-hero::after {
    top: 52%;
    right: -34%;
    width: 94vw;
  }
  body.ed-signature-v310 .ed-inner-hero__grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  body.ed-signature-v310 .ed-inner-hero__copy { padding: 0; }
  body.ed-signature-v310 .ed-inner-hero__copy h1 { font-size: clamp(3rem,12.5vw,5rem); }
  body.ed-signature-v310 .ed-inner-hero__photo {
    width: min(100%, 430px);
    height: 500px;
    justify-self: start;
  }
  body.ed-signature-v310 .ed-inner-main > .ed-page-section {
    padding: 76px 0;
  }
  body.ed-signature-v310 .ed-inner-main > .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote)::before {
    top: 36%;
    right: -38%;
    width: 100vw;
    height: 72%;
    opacity: .82;
  }
  body.ed-signature-v310 .ed-inner-main > .ed-page-section:nth-of-type(4n):not(.ed-page-section--financial):not(.ed-page-section--quote)::before {
    left: -38%;
    right: auto;
  }
  body.ed-signature-v310.ed-page-kontakty .ed-inner-main > .ed-inner-hero + .ed-page-section::before {
    top: 4%;
    left: -36%;
    width: 96vw;
    height: 48%;
  }
  body.ed-signature-v310.ed-page-kontakty .ed-contact-page__methods,
  body.ed-signature-v310.ed-page-kontakty .ed-contact-page__form {
    padding: 30px;
    border-radius: 26px;
  }
}

@media (max-width: 560px) {
  body.ed-signature-v310 .ed-shell { width: min(calc(100% - 32px), var(--ed-shell)); }
  body.ed-signature-v310 .ed-inner-hero { padding: 16px 0 46px; }
  body.ed-signature-v310 .ed-breadcrumbs { padding-bottom: 30px; font-size: 12px; }
  body.ed-signature-v310 .ed-inner-hero__copy h1 {
    margin-bottom: 20px;
    font-size: clamp(2.72rem,14vw,4.15rem);
    letter-spacing: -.05em;
  }
  body.ed-signature-v310 .ed-inner-hero__copy > p { font-size: 1rem; }
  body.ed-signature-v310 .ed-inner-hero__photo {
    width: min(94%, 390px);
    height: 430px;
    border-width: 5px;
  }
  body.ed-signature-v310 .ed-inner-hero__photo::after { right: -22px; bottom: -22px; }
  body.ed-signature-v310 .ed-inner-main > .ed-page-section { padding: 62px 0; }
  body.ed-signature-v310 .ed-inner-main > .ed-page-section:not(.ed-page-section--financial):not(.ed-page-section--quote)::after { display: none; }
  body.ed-signature-v310.ed-page-kontakty .ed-contact-page__methods,
  body.ed-signature-v310.ed-page-kontakty .ed-contact-page__form {
    padding: 24px;
    border-radius: 22px;
  }
  body.ed-signature-v310 .edf-legal { padding: 20px !important; }
  body.ed-signature-v310 .edf-legal .edf-consent {
    grid-template-columns: 20px minmax(0,1fr) !important;
    gap: 11px !important;
    padding: 13px 14px !important;
    font-size: .92rem !important;
  }
  body.ed-signature-v310 .edf-legal .edf-consent input[type="checkbox"] {
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
  }
  body.ed-signature-v310 .ed-content-page__inner { padding: 28px 22px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  body.ed-signature-v310 * { scroll-behavior: auto !important; }
}

/* ==========================================================
   V3.1 FINAL QA — site-wide foreground/background state contract
   This block is intentionally last. It fixes interactive states rather than
   relying on inherited form text colours or element-level opacity.
   ========================================================== */

/* Primary form action: text must never inherit the generic .edf-form span colour. */
body.ed-signature-v310 .edf-form .edf-submit,
body.ed-signature-v310 .edf-form button.edf-submit,
body.ed-signature-v310 .edf-form input.edf-submit[type="submit"] {
  min-height: 54px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: linear-gradient(135deg, #082a50 0%, #174d7f 100%) !important;
  border: 0 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
}
body.ed-signature-v310 .edf-form .edf-submit > span,
body.ed-signature-v310 .edf-form button.edf-submit > span,
body.ed-signature-v310 .edf-form .edf-submit * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
body.ed-signature-v310 .edf-form .edf-submit:not([disabled]):not([aria-disabled="true"]):hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: linear-gradient(135deg, #061f39 0%, #145b89 100%) !important;
  opacity: 1 !important;
}
body.ed-signature-v310 .edf-form .edf-submit:focus-visible {
  outline: 3px solid #e8c982 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(10,49,91,.18) !important;
}
/* Disabled remains visibly disabled through cursor/shadow, not low contrast. */
body.ed-signature-v310 .edf-form .edf-submit[disabled],
body.ed-signature-v310 .edf-form .edf-submit[aria-disabled="true"],
body.ed-signature-v310 .edf-form button[type="submit"][disabled] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #58718a !important;
  border-color: #58718a !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}
body.ed-signature-v310 .edf-form .edf-submit[disabled] > span,
body.ed-signature-v310 .edf-form .edf-submit[aria-disabled="true"] > span,
body.ed-signature-v310 .edf-form button[type="submit"][disabled] > span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
}

/* Form feedback states keep explicit accessible foreground/background pairs. */
body.ed-signature-v310 .edf-form__status.is-success,
body.ed-signature-v310 .edf-form__notice.is-success {
  color: #164e2b !important;
  background: #eaf7ee !important;
  border-color: #a9d7b7 !important;
}
body.ed-signature-v310 .edf-form__status.is-error,
body.ed-signature-v310 .edf-form__notice.is-error {
  color: #74231f !important;
  background: #fff0ef !important;
  border-color: #e2aaa6 !important;
}
body.ed-signature-v310 .edf-sensitive-note {
  color: #5d4527 !important;
  background: #fff7e7 !important;
  border-color: #dfc38f !important;
}

/* Theme buttons: every visual variant owns its foreground together with its surface. */
body.ed-signature-v310 a.ed-button,
body.ed-signature-v310 button.ed-button {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background-color: var(--ed-v3-navy) !important;
}
body.ed-signature-v310 a.ed-button *,
body.ed-signature-v310 button.ed-button * { color: inherit !important; -webkit-text-fill-color: inherit !important; }
body.ed-signature-v310 .ed-button--gold,
body.ed-signature-v310 a.ed-button--gold,
body.ed-signature-v310 button.ed-button--gold {
  color: #082a50 !important;
  -webkit-text-fill-color: #082a50 !important;
  background: linear-gradient(135deg, #f1d59e, #d4a85f) !important;
}
body.ed-signature-v310 .ed-button--ghost,
body.ed-signature-v310 a.ed-button--ghost,
body.ed-signature-v310 button.ed-button--ghost {
  color: var(--ed-v3-navy) !important;
  -webkit-text-fill-color: var(--ed-v3-navy) !important;
  background: rgba(255,255,255,.72) !important;
  border-color: rgba(10,49,91,.30) !important;
}
body.ed-signature-v310 .ed-button--on-dark,
body.ed-signature-v310 a.ed-button--on-dark,
body.ed-signature-v310 button.ed-button--on-dark,
body.ed-signature-v310 .ed-inner-cta .ed-button--ghost,
body.ed-signature-v310 .ed-page-section--financial .ed-button--ghost,
body.ed-signature-v310 .ed-page-section--quote .ed-button--ghost,
body.ed-signature-v310 .ed-approach--conversion .ed-button--ghost {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.50) !important;
}

/* Light cards own dark text; this prevents legacy white typography from leaking in. */
body.ed-signature-v310 .ed-fact-panel,
body.ed-signature-v310 .ed-principles-grid article,
body.ed-signature-v310 .ed-topic-grid article,
body.ed-signature-v310 .ed-compare-grid article,
body.ed-signature-v310 .ed-proof-bar > div,
body.ed-signature-v310 .ed-link-deck a,
body.ed-signature-v310 .ed-document-card,
body.ed-signature-v310 .ed-course-archive__item,
body.ed-signature-v310 .ed-publication-row,
body.ed-signature-v310 .ed-objection-box,
body.ed-signature-v310 .ed-boundary-wide,
body.ed-signature-v310 .ed-contact-page__methods,
body.ed-signature-v310 .ed-contact-page__form,
body.ed-signature-v310 .ed-contact-page__note {
  color: var(--ed-v3-ink) !important;
}
body.ed-signature-v310 .ed-fact-panel h2,
body.ed-signature-v310 .ed-fact-panel h3,
body.ed-signature-v310 .ed-principles-grid h2,
body.ed-signature-v310 .ed-principles-grid h3,
body.ed-signature-v310 .ed-topic-grid h2,
body.ed-signature-v310 .ed-topic-grid h3,
body.ed-signature-v310 .ed-compare-grid h2,
body.ed-signature-v310 .ed-compare-grid h3,
body.ed-signature-v310 .ed-proof-bar strong,
body.ed-signature-v310 .ed-link-deck strong,
body.ed-signature-v310 .ed-document-card h2,
body.ed-signature-v310 .ed-document-card h3,
body.ed-signature-v310 .ed-course-archive__item h2,
body.ed-signature-v310 .ed-course-archive__item h3,
body.ed-signature-v310 .ed-publication-row h2,
body.ed-signature-v310 .ed-publication-row h3,
body.ed-signature-v310 .ed-objection-box h2,
body.ed-signature-v310 .ed-boundary-wide h2,
body.ed-signature-v310 .ed-contact-page__methods h2,
body.ed-signature-v310 .ed-contact-page__form h2 {
  color: var(--ed-v3-navy) !important;
}
body.ed-signature-v310 .ed-contact-page__socials a,
body.ed-signature-v310 .ed-contact-page__email,
body.ed-signature-v310 .ed-contact-page__socials a strong,
body.ed-signature-v310 .ed-contact-page__email strong {
  color: var(--ed-v3-navy) !important;
}
body.ed-signature-v310 .ed-contact-page__socials a small,
body.ed-signature-v310 .ed-contact-page__email small,
body.ed-signature-v310 .ed-proof-bar small {
  color: #5f707d !important;
}

/* Dark editorial surfaces own all descendants, including links introduced by editors. */
body.ed-signature-v310 .ed-page-section--financial a:not(.ed-button--gold),
body.ed-signature-v310 .ed-page-section--quote a:not(.ed-button--gold),
body.ed-signature-v310 .ed-inner-cta a:not(.ed-button--gold),
body.ed-signature-v310 .ed-footer a {
  color: #fff !important;
}
body.ed-signature-v310 .ed-footer,
body.ed-signature-v310 .ed-footer p,
body.ed-signature-v310 .ed-footer li,
body.ed-signature-v310 .ed-footer small { color: rgba(255,255,255,.78) !important; }
body.ed-signature-v310 .ed-footer h2,
body.ed-signature-v310 .ed-footer h3,
body.ed-signature-v310 .ed-footer strong { color: #fff !important; }

/* Inputs and selects always expose their actual value; autofill included. */
body.ed-signature-v310 .edf-form input:not([type="checkbox"]):not([type="radio"]),
body.ed-signature-v310 .edf-form select,
body.ed-signature-v310 .edf-form textarea {
  color: #243746 !important;
  -webkit-text-fill-color: #243746 !important;
  caret-color: #0a315b !important;
}
body.ed-signature-v310 .edf-form input:-webkit-autofill,
body.ed-signature-v310 .edf-form select:-webkit-autofill,
body.ed-signature-v310 .edf-form textarea:-webkit-autofill {
  -webkit-text-fill-color: #243746 !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
}

/* Small-screen guard: no CTA or legal line can overflow its card. */
@media (max-width: 560px) {
  body.ed-signature-v310 .edf-form .edf-submit,
  body.ed-signature-v310 .ed-contact-page__form .edf-submit { width: 100% !important; }
  body.ed-signature-v310 .edf-form .edf-submit > span { white-space: normal !important; text-align: center !important; }
}

/* One visual legal heading only. Legacy v2.1 used ::before as a cache fallback;
   v3.1 injects a real normal-flow heading server-side and JS also repairs it. */
body.ed-signature-v310 .edf-legal::before {
  display: none !important;
  content: none !important;
}
body.ed-signature-v310 .edf-form .edf-legal::before,
body.ed-signature-v310 .ed-contact-page__form .edf-legal::before,
body.ed-signature-v310 .ed-modal__dialog .edf-legal::before {
  display: none !important;
  content: none !important;
}
