/* Юрист РБ — страница входа и регистрации (/login).
   Токены и общие классы — в theme.css; здесь только раскладка страницы и детали двух дизайнов. */

/* ===================== Локальные переменные ===================== */

.login-page {
  --lg-gutter: max(16px, env(safe-area-inset-left));
  --lg-gutter-r: max(16px, env(safe-area-inset-right));
  --lg-card-pad: 22px;
  --lg-intro-bg: transparent;
  --lg-intro-text: var(--text);
  --lg-intro-muted: var(--text-muted);
  --lg-intro-accent: var(--accent);
  --lg-intro-icon-bg: var(--accent-soft);
  --lg-intro-border: transparent;
  --lg-cell-h: 56px;
}

/* ===================== Каркас ===================== */

.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Мягкое свечение за карточкой («Современный»); в «Классике» — бумажная фактура */
.lg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 22% 8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%),
    radial-gradient(36% 34% at 82% 12%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 72%),
    radial-gradient(40% 40% at 70% 92%, color-mix(in srgb, var(--accent-3) 9%, transparent), transparent 70%);
}

.lg-header,
.lg-main,
.lg-footer {
  position: relative;
  z-index: 1;
}

.lg-header {
  padding: max(10px, env(safe-area-inset-top)) var(--lg-gutter-r) 6px var(--lg-gutter);
}

.lg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  min-height: 52px;
  margin-inline: auto;
}

.lg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: var(--heading-tracking);
  text-decoration: none;
}

.lg-brand:hover {
  color: var(--text);
}

.lg-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}

.lg-mark .icon {
  width: 20px;
  height: 20px;
}

.lg-back {
  color: var(--text-muted);
}

.lg-main {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  padding: 8px var(--lg-gutter-r) 32px var(--lg-gutter);
}

.lg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  width: 100%;
  max-width: 460px;
  align-content: start;
}

@media (min-width: 960px) {
  .lg-main {
    align-items: center;
    padding-top: 24px;
    padding-bottom: 48px;
  }

  .lg-layout {
    grid-template-columns: minmax(0, 1fr) 460px;
    align-items: center;
    gap: clamp(40px, 6vw, 88px);
    max-width: 1080px;
  }

  .lg-card {
    grid-column: 2;
    grid-row: 1;
  }

  .lg-intro {
    grid-column: 1;
    grid-row: 1;
  }
}

/* ===================== Карточка ===================== */

.lg-card {
  position: relative;
  padding: var(--lg-card-pad);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  scroll-margin-top: 16px;
}

.lg-card:focus {
  outline: none;
}

@media (min-width: 480px) {
  .login-page {
    --lg-card-pad: 34px;
  }
}

.lg-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 600;
}

.lg-step-bars {
  display: inline-flex;
  gap: 4px;
}

.lg-step-bar {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  transition: background-color 0.3s var(--ease), width 0.3s var(--ease);
}

.lg-step-bar.is-on {
  width: 30px;
  background: var(--accent);
}

.lg-eyebrow {
  display: none;
}

.lg-title {
  font-size: 26px;
  line-height: 1.15;
}

.lg-lead {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.lg-form {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  animation: lg-step-in 0.28s var(--ease);
}

.lg-form > .lg-lead {
  margin-top: -8px;
}

@keyframes lg-step-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.lg-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.lg-hint {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.5;
}

.lg-hint-center {
  margin-top: -4px;
  text-align: center;
}

.lg-field {
  min-width: 0;
}

/* --- Уведомления и ошибки --- */

.lg-notice {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.lg-notice[data-kind="warning"] {
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 25%, transparent);
}

.lg-notice[data-kind="success"] {
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 25%, transparent);
}

.lg-error,
.lg-success {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
}

.lg-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.lg-success {
  background: var(--success-soft);
  color: var(--success);
}

.lg-form > .lg-error,
.lg-form > .lg-success {
  margin-top: -6px;
}

/* --- Выбор аудитории --- */

.aud-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 400px) {
  .aud-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.aud-option {
  position: relative;
  min-width: 0;
}

.aud-input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.aud-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 12px;
  height: 100%;
  min-height: 64px;
  padding: 14px 40px 14px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
    transform 0.15s var(--ease);
}

@media (min-width: 400px) {
  .aud-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 14px 16px;
  }
}

.aud-card:hover {
  border-color: var(--text-faint);
}

.aud-card:active {
  transform: scale(0.99);
}

.aud-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.aud-icon .icon {
  width: 21px;
  height: 21px;
}

.aud-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.aud-title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}

.aud-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.aud-check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  color: transparent;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.aud-check .icon {
  width: 13px;
  height: 13px;
}

.aud-input:checked + .aud-card {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--accent);
}

.aud-input:checked + .aud-card .aud-icon {
  background: var(--accent);
  color: var(--accent-contrast);
}

.aud-input:checked + .aud-card .aud-check {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.aud-input:focus-visible + .aud-card {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* --- Поле почты --- */

.lg-input-wrap {
  position: relative;
}

.lg-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--text-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.lg-input {
  min-height: 52px;
  padding-left: 44px;
}

.lg-submit {
  margin-top: 2px;
}

.lg-submit .btn-arrow {
  transition: transform 0.15s var(--ease);
}

.lg-submit:hover .btn-arrow {
  transform: translateX(3px);
}

.lg-submit[aria-busy="true"] .btn-arrow {
  display: none;
}

.lg-have-code {
  margin-top: -8px;
}

/* --- Шаг 2: куда отправлен код --- */

.lg-sent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.5;
}

.lg-sent-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.lg-sent-icon .icon {
  width: 18px;
  height: 18px;
}

.lg-sent-text {
  min-width: 0;
}

.lg-sent-email {
  overflow-wrap: anywhere;
}

.lg-sent-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 6px;
}

.lg-sent-meta .link-btn {
  min-height: 32px;
  font-size: 14px;
}

.lg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.lg-chip .icon {
  width: 15px;
  height: 15px;
}

/* --- Код: одно настоящее поле поверх шести «ячеек» --- */

.otp {
  position: relative;
  cursor: text;
}

.otp-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px; /* меньше 16px — iOS увеличивает страницу при фокусе */
  letter-spacing: -0.5em;
  -webkit-text-fill-color: transparent;
  appearance: none;
}

/* выделенный текст поля тоже не показываем — цифры видны только в ячейках */
.otp-input::selection {
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* подсветка автозаполнения не должна закрывать ячейки */
.otp-input:-webkit-autofill {
  -webkit-text-fill-color: transparent;
  transition: background-color 600000s 0s, color 600000s 0s;
}

.otp-input:focus,
.otp-input:focus-visible {
  outline: none;
}

.otp-cells {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp-cell {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--lg-cell-h);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease), background-color 0.12s var(--ease);
}

.otp-cell-gap {
  margin-left: 8px;
}

.otp-cell.is-filled {
  border-color: var(--text-faint);
  animation: otp-pop 0.16s var(--ease);
}

@keyframes otp-pop {
  from {
    transform: scale(0.94);
  }
}

.otp.is-focused .otp-cell.is-active {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* мигающий курсор в текущей ячейке */
.otp.is-focused .otp-cell.is-active:empty::after {
  content: "";
  width: 2px;
  height: 26px;
  border-radius: 1px;
  background: var(--accent);
  animation: otp-caret 1.05s steps(1) infinite;
}

@keyframes otp-caret {
  50% {
    opacity: 0;
  }
}

.otp.is-invalid .otp-cell {
  border-color: var(--danger);
}

.otp.is-invalid {
  animation: lg-shake 0.32s var(--ease);
}

.otp.is-busy .otp-cell {
  opacity: 0.6;
}

@keyframes lg-shake {
  20% {
    transform: translateX(-5px);
  }
  45% {
    transform: translateX(4px);
  }
  70% {
    transform: translateX(-2px);
  }
}

@media (max-width: 359px) {
  .login-page {
    --lg-cell-h: 48px;
  }

  .otp-cells {
    gap: 5px;
  }

  .otp-cell {
    font-size: 21px;
  }

  .otp-cell-gap {
    margin-left: 4px;
  }
}

/* Режим высокой контрастности Windows: показываем само поле, без ячеек */
@media (forced-colors: active) {
  .otp-cells {
    visibility: hidden;
  }

  .otp-input {
    border: 1px solid CanvasText;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    text-indent: 12px;
    letter-spacing: 0.4em;
  }
}

/* --- Согласие --- */

.consent {
  position: relative;
  margin-top: -2px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s var(--ease);
}

.consent-input {
  position: absolute;
  top: 14px;
  left: 12px;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.consent-label:hover {
  border-color: var(--border-strong);
}

.consent-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  transition: background-color 0.12s var(--ease), border-color 0.12s var(--ease), color 0.12s var(--ease);
}

.consent-box .icon {
  width: 15px;
  height: 15px;
}

.consent-text a {
  font-weight: 500;
}

.consent-input:checked + .consent-label {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

.consent-input:checked + .consent-label .consent-box {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.consent-input:focus-visible + .consent-label .consent-box {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.consent.is-invalid .consent-label {
  border-color: var(--danger);
  background: var(--danger-soft);
  animation: lg-shake 0.32s var(--ease);
}

.consent.is-invalid .consent-box {
  border-color: var(--danger);
}

/* --- Ссылки под кнопкой --- */

.lg-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: -4px;
}

.lg-links .link-btn {
  min-height: 44px;
  font-size: 14px;
}

.lg-links .link-btn:disabled {
  font-variant-numeric: tabular-nums;
}

/* Кнопка в состоянии загрузки */
.btn .spinner {
  width: 18px;
  height: 18px;
}

/* ===================== Блок «что даёт вход» ===================== */

.lg-intro {
  min-width: 0;
  padding: 4px 4px 0;
  color: var(--lg-intro-text);
}

.lg-intro-eyebrow {
  color: var(--lg-intro-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lg-intro-title {
  margin-top: 8px;
  color: var(--lg-intro-text);
  font-size: 22px;
  line-height: 1.2;
}

.lg-example {
  margin-top: 18px;
}

.lg-example-label {
  margin-bottom: 8px;
  color: var(--lg-intro-muted);
  font-size: 13px;
  font-weight: 600;
}

.lg-example-text {
  position: relative;
  max-width: 440px;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 6px;
  background: var(--bubble-user-bg);
  color: var(--bubble-user-text);
  font-size: 15px;
  line-height: 1.5;
}

.lg-benefits {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  list-style: none;
}

.lg-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--lg-intro-muted);
  font-size: 15px;
  line-height: 1.5;
}

.lg-benefits b {
  color: var(--lg-intro-text);
  font-weight: 650;
}

.lg-benefit-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--lg-intro-icon-bg);
  color: var(--lg-intro-accent);
}

.lg-benefit-icon .icon {
  width: 18px;
  height: 18px;
}

.lg-intro-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 22px;
  color: var(--lg-intro-muted);
  font-size: 13px;
  line-height: 1.5;
}

.lg-intro-note .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

@media (min-width: 960px) {
  .lg-intro {
    padding: 0;
  }

  .lg-intro-title {
    font-size: clamp(30px, 3.2vw, 40px);
    line-height: 1.12;
  }

  .lg-example {
    margin-top: 28px;
  }

  .lg-benefits {
    margin-top: 32px;
    gap: 18px;
  }
}

/* ===================== Подвал ===================== */

.lg-footer {
  padding: 18px var(--lg-gutter-r) calc(72px + env(safe-area-inset-bottom)) var(--lg-gutter);
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.lg-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
}

.lg-footer-links a {
  color: var(--text-muted);
}

.lg-footer-note {
  max-width: 560px;
  margin: 6px auto 0;
}

@media (min-width: 960px) {
  .lg-footer {
    padding-bottom: 24px;
  }
}

/* ===================== Окно с документами ===================== */

.lg-legal-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 22px 0;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.lg-legal-tab {
  flex: 1 1 0;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: calc(var(--radius-md) - 3px);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.lg-legal-tab:hover {
  color: var(--text);
}

.lg-legal-tab[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.lg-legal-body {
  font-size: 15px;
  line-height: 1.6;
}

.lg-legal-body:focus-visible {
  outline-offset: -2px;
}

.lg-legal-muted {
  color: var(--text-muted);
}

.lg-legal-error {
  display: grid;
  justify-items: start;
  gap: 12px;
  white-space: normal;
}

.lg-legal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 599px) {
  .lg-legal-foot .btn {
    flex: 1 1 0;
  }
}

/* ===================== «Классика» ===================== */

:root[data-design="classic"] .login-page {
  --lg-intro-bg: #1c355e;
  --lg-intro-text: #fbf6ea;
  --lg-intro-muted: #c9cfdb;
  --lg-intro-accent: #d6b46a;
  --lg-intro-icon-bg: rgba(214, 180, 106, 0.14);
  --lg-intro-border: #1c355e;
}

@media (prefers-color-scheme: dark) {
  :root[data-design="classic"] .login-page {
    --lg-intro-bg: var(--surface);
    --lg-intro-text: var(--text);
    --lg-intro-muted: var(--text-muted);
    --lg-intro-accent: var(--accent);
    --lg-intro-icon-bg: var(--accent-soft);
    --lg-intro-border: var(--border);
  }
}

/* бумага: тёплый отсвет сверху и едва заметная виньетка вместо цветного свечения */
:root[data-design="classic"] .lg-glow {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 320px),
    radial-gradient(120% 80% at 50% 0%, transparent 60%, color-mix(in srgb, var(--accent) 5%, transparent));
}

:root[data-design="classic"] .lg-header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}

:root[data-design="classic"] .lg-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: color-mix(in srgb, var(--accent-2) 55%, transparent);
}

:root[data-design="classic"] .lg-brand {
  font-size: 20px;
  font-weight: 600;
}

:root[data-design="classic"] .lg-mark {
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-2) 55%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root[data-design="classic"] .lg-mark {
    background: transparent;
    color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
  }
}

:root[data-design="classic"] .lg-main {
  padding-top: 28px;
}

:root[data-design="classic"] .lg-card {
  border-top: 3px solid var(--accent-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

:root[data-design="classic"] .lg-steps {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

:root[data-design="classic"] .lg-step-bar {
  height: 2px;
  border-radius: 0;
}

:root[data-design="classic"] .lg-step-bar.is-on {
  background: var(--accent-2);
}

:root[data-design="classic"] .lg-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

:root[data-design="classic"] .lg-title {
  font-size: 30px;
}

:root[data-design="classic"] .aud-card {
  border-color: var(--border-strong);
  background: var(--bg-elev);
}

:root[data-design="classic"] .aud-icon {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
}

:root[data-design="classic"] .aud-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

:root[data-design="classic"] .aud-check {
  border-radius: 2px;
}

:root[data-design="classic"] .aud-input:checked + .aud-card {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--accent), 0 6px 16px -10px rgba(24, 33, 47, 0.45);
}

:root[data-design="classic"] .aud-input:checked + .aud-card .aud-icon {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-2);
}

:root[data-design="classic"] .aud-input:checked + .aud-card .aud-check {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  :root[data-design="classic"] .aud-input:checked + .aud-card .aud-icon {
    color: var(--accent-contrast);
  }

  :root[data-design="classic"] .aud-input:checked + .aud-card .aud-check {
    color: var(--accent-contrast);
  }
}

/* код — как графы бланка: подчёркнутые клетки */
:root[data-design="classic"] .otp-cell {
  border-width: 0 0 2px;
  border-radius: 2px 2px 0 0;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 26px;
  font-variant-numeric: lining-nums tabular-nums;
}

:root[data-design="classic"] .otp-cell.is-filled {
  border-color: var(--accent);
}

:root[data-design="classic"] .otp.is-focused .otp-cell.is-active {
  border-color: var(--accent-2);
  box-shadow: 0 2px 0 0 var(--accent-2);
  background: var(--accent-soft);
}

:root[data-design="classic"] .otp.is-focused .otp-cell.is-active:empty::after {
  background: var(--accent-2);
}

:root[data-design="classic"] .otp.is-invalid .otp-cell {
  border-color: var(--danger);
}

:root[data-design="classic"] .consent-box {
  border-radius: 2px;
}

:root[data-design="classic"] .lg-sent {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}

:root[data-design="classic"] .lg-sent-icon {
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-3);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

:root[data-design="classic"] .lg-chip {
  border-radius: var(--radius-sm);
}

:root[data-design="classic"] .lg-legal-tabs {
  padding: 0;
  gap: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

:root[data-design="classic"] .lg-legal-tab {
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
}

:root[data-design="classic"] .lg-legal-tab[aria-pressed="true"] {
  border-bottom-color: var(--accent-2);
  background: transparent;
  box-shadow: none;
  font-family: var(--font-display);
}

/* «Классика»: блок слева — тёмно-синяя «папка дела» с золотыми линиями */
:root[data-design="classic"] .lg-intro {
  position: relative;
  padding: 24px 22px 22px;
  border: 1px solid var(--lg-intro-border);
  border-radius: var(--radius-lg);
  background: var(--lg-intro-bg);
}

:root[data-design="classic"] .lg-intro::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid color-mix(in srgb, var(--lg-intro-accent) 30%, transparent);
  border-radius: 4px;
  pointer-events: none;
}

:root[data-design="classic"] .lg-intro-eyebrow {
  letter-spacing: 0.16em;
  font-size: 12px;
}

:root[data-design="classic"] .lg-intro-title {
  font-weight: 600;
}

:root[data-design="classic"] .lg-example-text {
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--lg-intro-accent);
  border-radius: 0;
  background: transparent;
  color: var(--lg-intro-text);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
}

:root[data-design="classic"] .lg-benefit-icon {
  border: 1px solid color-mix(in srgb, var(--lg-intro-accent) 45%, transparent);
  border-radius: 50%;
}

:root[data-design="classic"] .lg-intro-note {
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--lg-intro-accent) 30%, transparent);
}

@media (min-width: 960px) {
  :root[data-design="classic"] .lg-intro {
    padding: 44px 40px 36px;
  }

  :root[data-design="classic"] .lg-intro::before {
    inset: 10px;
  }
}

/* ===================== «Современный»: детали ===================== */

:root:not([data-design="classic"]) .lg-card {
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

:root:not([data-design="classic"]) .lg-title {
  font-size: 28px;
}

:root:not([data-design="classic"]) .lg-intro-eyebrow {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-transform: none;
}

:root:not([data-design="classic"]) .lg-intro-title {
  letter-spacing: -0.028em;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-design="classic"]) .lg-intro-eyebrow {
    color: var(--link);
  }

  :root:not([data-design="classic"]) .lg-benefit-icon,
  :root:not([data-design="classic"]) .lg-sent-icon {
    color: var(--link);
  }

  :root:not([data-design="classic"]) .lg-card {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
  }
}

@media (min-width: 960px) {
  :root:not([data-design="classic"]) .lg-intro-title {
    background: linear-gradient(120deg, var(--text) 30%, color-mix(in srgb, var(--accent) 75%, var(--text)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

@media (forced-colors: active) {
  .lg-intro-title {
    color: CanvasText !important;
    background: none !important;
  }
}
