/* All selectors are scoped: the site's forms, theme and navigation keep their styles. */
#consent-gate {
  box-sizing: border-box;
  width: min(880px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  font: 15px/1.4 var(--sans);
}
#consent-gate:not([open]) { display: none; }
#consent-gate::backdrop { background: rgb(10 15 28 / 65%); }
#consent-gate * { box-sizing: border-box; }
#consent-gate .cg-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
#consent-gate .cg-content { min-width: 0; padding: 28px; }
#consent-gate p { margin: 0 0 12px; }
#consent-gate .cg-eyebrow { color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
#consent-gate #cg-title { margin: 0 0 12px; color: var(--ink); font: 600 30px/1.1 var(--serif); letter-spacing: -.02em; outline: none; }
#consent-gate .cg-note, #consent-gate .cg-fine { color: var(--ink2); }
#consent-gate .cg-documents { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; }
#consent-gate .cg-documents a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
#consent-gate .cg-functions { padding: 10px 12px; background: var(--paper2); border-radius: 8px; font-size: 13px; }
#consent-gate .cg-choice { display: flex; align-items: center; gap: 10px; min-height: 52px; margin: 0 0 12px; cursor: pointer; font-size: 14px; font-weight: 600; }
#consent-gate .cg-choice input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
#consent-gate .cg-choice small { display: block; margin-top: 3px; color: var(--ink2); font-size: 12px; font-weight: 400; }
#consent-gate .cg-actions { display: grid; gap: 8px; }
#consent-gate .cg-actions button { min-height: 44px; width: 100%; padding: 10px 12px; border: 1px solid var(--blue); border-radius: 9px; font: 600 14px/1.25 var(--sans); cursor: pointer; }
#consent-gate #cg-continue { background: var(--blue); color: #fff; }
#consent-gate #cg-continue:hover { background: var(--blue-deep, #174ca8); border-color: var(--blue-deep, #174ca8); }
#consent-gate #cg-without { background: transparent; color: var(--blue); }
#consent-gate #cg-without:hover { background: var(--bluewash); border-color: var(--blue); }
[data-theme="dark"] #consent-gate #cg-continue { color: #10131a; }
#consent-gate .cg-fine { margin: 10px 0 0; font-size: 11px; line-height: 1.4; }
#consent-gate :is(a, button, input):focus-visible, .cg-settings:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
#consent-gate .cg-visual { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; overflow: hidden; isolation: isolate; background: var(--paper2); border-right: 1px solid var(--rule); }
#consent-gate .cg-mark { z-index: 1; width: 112px; height: 112px; color: var(--red); background-color: currentColor; -webkit-mask: url("brand-mark.svg") center / contain no-repeat; mask: url("brand-mark.svg") center / contain no-repeat; animation: cg-glow 4s ease-in-out 1; }
#consent-gate .cg-wordmark { z-index: 1; color: var(--red); font: 700 18px var(--sans); letter-spacing: .2em; }
#consent-gate .cg-orbit { position: absolute; width: 195px; height: 195px; top: calc(50% - 125px); border: 1px solid var(--blue); border-radius: 50%; opacity: .3; animation: cg-orbit 4s ease-out 1; }
#consent-gate .cg-orbit::after { content: ''; position: absolute; width: 7px; height: 7px; top: 25px; left: 25px; border-radius: 50%; background: var(--red); }
#consent-gate .cg-orbit-two { width: 165px; height: 165px; top: calc(50% - 110px); border-color: var(--red); animation-direction: reverse; }
.cg-settings { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; color: var(--blue); text-decoration: underline; }
.cg-status { margin: 0 auto; max-width: 1200px; padding: 12px 24px; color: var(--ink2); font: 13px/1.4 var(--sans); }
.cg-status:empty { display: none; }
@keyframes cg-orbit { from { transform: rotate(-45deg); } to { transform: rotate(0); } }
@keyframes cg-glow { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .72; transform: scale(1.045); } }
@media (max-width: 600px) {
  #consent-gate { width: calc(100% - 20px); border-radius: 14px; font-size: 14px; line-height: 1.35; }
  #consent-gate .cg-layout { grid-template-columns: minmax(0, 1fr); }
  #consent-gate .cg-content { padding: 16px; }
  #consent-gate .cg-visual { height: 64px; flex-direction: row; gap: 16px; border-right: 0; border-bottom: 1px solid var(--rule); }
  #consent-gate .cg-mark { width: 42px; height: 42px; }
  #consent-gate .cg-wordmark { font-size: 15px; }
  #consent-gate .cg-orbit { width: 150px; height: 150px; top: -45px; }
  #consent-gate .cg-orbit-two { width: 115px; height: 115px; top: -28px; }
  #consent-gate #cg-title { font-size: 25px; margin-bottom: 10px; }
  #consent-gate p { margin-bottom: 10px; }
  #consent-gate .cg-documents { gap: 0 12px; margin-bottom: 6px; }
  #consent-gate .cg-documents a { font-size: 12px; }
  #consent-gate .cg-choice { font-size: 13px; }
  #consent-gate .cg-actions button { font-size: 13px; }
  #consent-gate .cg-fine { margin-bottom: 0; }
}
@media (max-height: 679px), (max-width: 359px) {
  #consent-gate { overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  #consent-gate *, #consent-gate *::before, #consent-gate *::after { animation: none !important; transition: none !important; }
}

/* Mandatory gate V2: paper and subtle selected B damask. */
html.cg-locked, html.cg-locked body { overflow: hidden; overscroll-behavior: none; }
#consent-gate { overflow: auto; overscroll-behavior: contain; }
#consent-gate .cg-content { position: relative; isolation: isolate; background: var(--paper); }
#consent-gate .cg-content::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url('bg-variant-light.png') center top / 720px 720px repeat;
  background-image: image-set(url('bg-variant-light.webp') type('image/webp'), url('bg-variant-light.png') type('image/png'));
  opacity: .90;
}
html[data-theme="dark"] #consent-gate .cg-content::before {
  background-image: url('bg-variant-dark.png');
  background-image: image-set(url('bg-variant-dark.webp') type('image/webp'), url('bg-variant-dark.png') type('image/png'));
}
#consent-gate .cg-choice { align-items: flex-start; gap: 10px; margin: 0 0 12px; min-height: 44px; font-size: 14px; font-weight: 400; line-height: 1.45; }
#consent-gate .cg-choice input { margin-top: 2px; }
#consent-gate .cg-choice label { cursor: pointer; }
#consent-gate .cg-choice a { color: var(--blue); text-underline-offset: 3px; }
#consent-gate .cg-choice-all { min-height: 36px; font-weight: 600; }
#consent-gate #cg-continue:disabled { opacity: .5; cursor: not-allowed; }
#consent-gate #cg-refuse { background: transparent; color: var(--blue); }
#consent-gate #cg-feedback { margin: 12px 0 0; overflow-wrap: anywhere; }
#consent-gate #cg-feedback:empty { display: none; }
@media (max-width: 600px) {
  #consent-gate .cg-content::before { opacity: .54; }
  #consent-gate #cg-title { overflow-wrap: anywhere; }
}


/* 18.10: слева в окне — герб RA (выбор владельца) вместо колец и знака */
#consent-gate .cg-visual .cg-orbit,#consent-gate .cg-visual .cg-mark,#consent-gate .cg-visual .cg-wordmark{display:none!important}
#consent-gate .cg-visual{background-color:var(--paper2);background-repeat:no-repeat;background-position:center;background-size:contain;background-origin:content-box;padding:10px;background-image:url("gate-emblem-light.png?v=cecf0850");background-image:image-set(url("gate-emblem-light.webp?v=a0bb44a4") type("image/webp"),url("gate-emblem-light.png?v=cecf0850") type("image/png"));animation:cg-emblem-in .9s ease-out both}
html[data-theme="dark"] #consent-gate .cg-visual{background-image:url("gate-emblem-dark.png?v=34cf175a");background-image:image-set(url("gate-emblem-dark.webp?v=74efaf98") type("image/webp"),url("gate-emblem-dark.png?v=34cf175a") type("image/png"))}
@keyframes cg-emblem-in{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){#consent-gate .cg-visual{animation:none}}

/* 18.10 v2: пункты плотнее, жирнее; «RANLEX Регистратор» в надзаголовке */
#consent-gate .cg-choice{margin:0 0 10px!important;padding:0!important;min-height:0!important;line-height:1.35!important}
#consent-gate .cg-choice>div{line-height:1.35}
#consent-gate .cg-choice label{font-size:15px!important;font-weight:650!important;line-height:1.35!important}
#consent-gate .cg-choice-all{margin-bottom:18px!important}
#consent-gate .cg-eyebrow .cg-blue{color:var(--blue)}
#consent-gate .cg-choice{min-height:41px!important}
