/* Hallmark · shape: Form on the desk · genre: modern-minimal · theme: Coral (by request, the home page's system: home.css tokens) · job: sign in, the form beside the head on the first screen · redesign: full
 * hero: Split (head left, form card right) · nav: edge-aligned (as home) · footer: letter close (as home) · imagery: none, the form is the page · signature: the sign-in form as a cotton card on the home page's desk
 * axes: light/grotesk-sans/warm · posture: restrained · brand: OHS (project tokens: graphite ink, green signal, Golos Text, Source Serif 4) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, the page shares nav, desk, buttons and footer with the home page on purpose (one site, one system); only the card is its own */
/* Hallmark · finish-review: in-thread · 2 findings · 2 resolved (the card off the nav action's edge, the consent link wrapping at 320px) · gap: none */
/* Hallmark · waive 77 · the page is one form and the site footer · a sign-in page: sections would be words the visitor did not come for */
/* Hallmark · waive 85 · the close is the site's letter footer with the support mailto, not a sign-up · the job (sign in) is the form on the first screen, the footer is the home page's */
/* Hallmark · waive 44c · the card ends on the container edge, under the nav's action · the home hero's screen sits on the same edge, one system */
/* Hallmark · dropped logo-mark.svg · the nav is the home page's own, its logo.svg carries the mark */

/* Вход и регистрация стоят на системе главной (home.css): токены, шапка, стол героя, кнопки и подвал общие. Здесь только форма. */
:root {
  /* Кромка поля: на хлопке нужна контрастность не меньше 3:1, иначе поле теряется (гейт 40). */
  --color-field-edge: oklch(60% 0.022 268);
  --color-field: oklch(99.4% 0.003 80);
  --color-error-wash: oklch(95.5% 0.03 27);
  --color-ok-wash: oklch(95.5% 0.03 150);
}

/* Стол героя главной на всю первую страницу: слева заголовок, справа карточка формы. */
.auth__in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: var(--space-2xl); align-items: center; min-height: min(calc(100dvh - var(--nav-h)), 51rem); padding-block: var(--space-xl) var(--space-3xl); }
.auth__text { display: grid; gap: var(--space-lg); justify-items: start; }
.auth__text h1 { text-wrap: balance; }
.auth__text .lead { max-width: 46ch; }
.auth__switch { font-size: var(--text-md); color: var(--color-ink-2); }

/* Карточка формы — хлопковый лист, как лист инструкции на главной, но ровно: в поля вводят текст. */
.auth__card { display: grid; gap: var(--space-lg); justify-self: end; width: 100%; max-width: 30rem; padding: var(--space-xl); background-color: var(--color-cotton); background-image: var(--tex-cotton); color: var(--color-print); border-radius: var(--radius-card); box-shadow: var(--edge-stock), var(--cast-stock-lift); }
.auth__card form { display: grid; gap: var(--space-md); }
.auth__card p { max-width: none; }
.auth__card label { display: grid; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); }
.auth__card input:not([type="checkbox"]) { width: 100%; min-height: 48px; padding: 0 var(--space-sm); border: 1px solid var(--color-field-edge); border-radius: var(--radius-input); background: var(--color-field); color: var(--color-ink); font-size: var(--text-md); font-weight: 400; transition: border-color var(--dur-micro) var(--ease-out); }
.auth__card input:not([type="checkbox"]):hover { border-color: var(--color-ink-2); }
.auth__card input:not([type="checkbox"]):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; border-color: var(--color-ink); }
.auth__card input:user-invalid { border-color: var(--color-error); }
.auth__card input:disabled { opacity: 0.55; cursor: not-allowed; }

/* Согласие с политикой: галочка у начала строки, подпись переносится под себя. */
.auth__card label.check { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: var(--space-sm); font-weight: 400; font-size: var(--text-sm); }
.auth__card label.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--color-ink); cursor: pointer; }
.auth__card label.check .link { white-space: nowrap; }
.auth__card label.check input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* Главная кнопка — графитовая доска главной на всю ширину карточки; пока идёт запрос, нажать её нельзя. */
.auth__card .btn--ink { width: 100%; margin-top: var(--space-xs); }
.auth__card .btn:active:not(:disabled) { transform: translateY(1px); }
.auth__card .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.auth__card .link { font-weight: 500; }

/* Выбор устройства: строки, кнопка «Отключить» — хлопковая карточка (класс btn ставит скрипт). */
.auth__card .device { display: flex; align-items: center; gap: var(--space-sm); padding-block: var(--space-sm); border-top: 1px solid var(--color-rule); }
.auth__card .device .btn { margin-left: auto; min-height: 44px; background-color: var(--color-cotton); background-image: var(--tex-cotton); color: var(--color-print); box-shadow: var(--edge-stock), var(--cast-stock); }

/* Ошибка и итог действия — плашка на карточке, у формы, а не внизу страницы. */
.auth__card .error, .auth__card .ok { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-input); font-size: var(--text-sm); }
.auth__card .error { background: var(--color-error-wash); color: var(--color-error); }
.auth__card .ok { background: var(--color-ok-wash); color: var(--color-success); }

/* Подвал сразу за столом: зазор главной между разделами тут лишний. */
.auth__close { margin-top: 0; }

/* Сообщение без скрипта — в общей системе. */
body > noscript .error { margin: 0; padding: var(--space-md) var(--gutter); background: var(--color-error-wash); color: var(--color-error); }

@media (max-width: 60rem) {
  .auth__in { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xl); min-height: 0; padding-block: var(--space-xl) var(--space-2xl); }
  .auth__card { justify-self: start; max-width: 34rem; }
}
@media (max-width: 40rem) {
  .auth__text h1 { font-size: var(--text-display-s); }
  .auth__card { padding: var(--space-lg) var(--space-md); }
}
@media (prefers-reduced-motion: reduce) {
  .auth__card input { transition: none; }
}
