/* Публичные страницы в тёмной теме v2: вход (login-v2.css) и юридические документы (legal-v2.css).
   Токены из v2/tokens.css, кнопки из v2/components.css. Общее: страница, шапка, подвал, «пропустить к содержанию». */

*, *::before, *::after { box-sizing: border-box; }

.pub-v2 {
  --pad: clamp(16px, 6vw, 88px);
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.pub-v2 h1, .pub-v2 h2, .pub-v2 p { margin: 0; }
.pub-v2 h1, .pub-v2 h2 { font-weight: 400; letter-spacing: -0.03em; text-wrap: balance; }
:where(.pub-v2 a) { color: inherit; }   /* нулевая специфичность: цвет ui-button не перебивается */
.pub-v2 :focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.pub-v2 .hidden { display: none !important; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--accent-ink);
  font-weight: var(--weight-medium);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.lg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(20px, calc(env(safe-area-inset-top, 0px) + 8px)) max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
}
.lg-logo img { display: block; height: 48px; width: auto; }

.lg-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding: 24px max(var(--pad), env(safe-area-inset-right, 0px)) max(28px, calc(env(safe-area-inset-bottom, 0px) + 12px)) max(var(--pad), env(safe-area-inset-left, 0px));
  font-size: var(--font-small);
  color: var(--text-muted);
}
.lg-footer a { color: var(--text-secondary); text-decoration: none; }
.lg-footer a:hover { color: var(--text-primary); }
.lg-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.lg-footer small { font-size: var(--font-meta); }

/* Формы публичных страниц: вход и оформление тарифа */
.lg-inset { background: var(--surface-2); border-radius: var(--radius-inset); padding: 12px 16px; font-size: var(--font-body); line-height: 1.4; }

.lg-form { display: flex; flex-direction: column; gap: 14px; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-field label { font-size: var(--font-small); color: var(--text-secondary); }
.lg-field input, .lg-password input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-inset);
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  font-size: 17px;
}
.lg-field input:focus, .lg-password input:focus { outline: 2px solid var(--lime); outline-offset: 0; }
/* автозаполнение браузера не должно красить поля в светлый цвет */
.lg-field input, .lg-password input { color-scheme: dark; }
.lg-field input:-webkit-autofill, .lg-password input:-webkit-autofill { -webkit-text-fill-color: var(--text-primary); caret-color: var(--text-primary); box-shadow: 0 0 0 100px var(--surface-2) inset; transition: background-color 9999s ease-out; }
.lg-consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--font-small); line-height: 1.4; cursor: pointer; }
.lg-consent input {
  flex: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 7px;
  background: var(--bg);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lg-consent input:checked { background: var(--lime); }
.lg-consent input:checked::after { content: ""; width: 10px; height: 6px; border: solid var(--accent-ink); border-width: 0 0 2.4px 2.4px; transform: translateY(-1px) rotate(-45deg); }
.lg-consent a { color: var(--text-primary); text-underline-offset: 3px; }

.lg-error { color: var(--danger); font-size: var(--font-small); }
.lg-submit { width: 100%; }
.lg-submit:disabled { opacity: var(--opacity-off); cursor: default; }
.lg-hint { font-size: var(--font-meta); color: var(--text-muted); }
