/* Вход и знакомство. Подключают сами страницы: accounts/login.html, accounts/welcome.html,
   account/login.html. Макет — design/prototype/src/open.html (страницы login и hello). */

/* ===== Вход по почте — только стенд (templates/account/login.html): одна карточка по центру ===== */
.auth { max-width: 480px; margin: 24px auto 0; }
.auth .card { padding: 32px; }
.auth h1 { font: 700 26px/1.2 var(--f-disp); letter-spacing: -0.02em; margin: 0 0 6px; }
.auth .lead { color: var(--muted); margin: 0 0 20px; }
.auth form { display: grid; gap: 16px; }
.auth-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.auth-row label { font-weight: 700; font-size: 14px; }
.auth-row a { font-size: 14px; font-weight: 600; color: var(--pri-ink); }
.auth-error { background: var(--surf2); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 16px; color: var(--ink); }
.auth-error b { color: var(--bad-ink); }

/* ===== Вход через VK ID (templates/accounts/login.html) ===== */
.auth-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; min-height: calc(100vh - 340px); }
.auth-wrap > * { min-width: 0; }
.kicker { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; color: var(--pri-ink); background: var(--tint); padding: 6px 14px; border-radius: 99px; margin-bottom: 18px; }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--pri); }
.pitch h1 { font: 800 46px/1.08 var(--f-disp); letter-spacing: -0.035em; margin: 0 0 16px; max-width: 13ch; }
.pitch h1 mark { background: none; color: inherit; position: relative; white-space: nowrap; z-index: 0; }
.pitch h1 mark::before { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0.06em; height: 0.46em; background: var(--cta); border-radius: 8px; z-index: -1; transform: rotate(-1.5deg); }
.pitch > p { color: var(--muted); font-size: 18px; margin: 0 0 18px; max-width: 46ch; }
.olymp { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 28px; }
.olymp span { padding: 6px 12px; border-radius: 10px; background: var(--surf); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; }
.pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.pitch li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; }
.pitch li .subj { width: 44px; height: 44px; }
.pitch li .subj.ok { background: var(--ok); color: var(--on-ok); }
.pitch li .subj.warn { background: var(--warn); color: var(--surf); }
.pitch li b { display: block; }
.pitch li div span { color: var(--muted); font-size: 14px; }
.auth-box { background: var(--surf); border-radius: var(--r); padding: 36px 34px 30px; box-shadow: var(--shadow-up); max-width: 460px; justify-self: end; width: 100%; }
.auth-box h2 { font: 700 26px/1.2 var(--f-disp); letter-spacing: -0.02em; margin: 0 0 6px; }
.auth-box > p { color: var(--muted); margin: 0 0 22px; }
.auth-box form { margin: 0; }
/* Цвета кнопки — фирменные VK ID (токены --vk…), а не синий школы */
.btn-vk { background: var(--vk); color: var(--on-vk); box-shadow: 0 4px 0 var(--vk-edge); height: 56px; font-size: 17px; border-radius: 16px; }
.btn-vk:hover { background: var(--vk-h); }
.btn-vk:active { transform: translateY(4px); box-shadow: 0 0 0 var(--vk-edge); }
.vkid { display: inline-grid; place-items: center; height: 28px; padding: 0 8px; border-radius: 8px; background: var(--on-vk); color: var(--vk); font: 800 14px var(--f-ui); letter-spacing: 0.01em; }
.agree { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin: 18px 0 0; font-size: 15px; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pri); cursor: pointer; }
.agree a, .fine a { color: var(--pri-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* Галочка и строка о документах — один блок: текст обеих строк стоит на одной вертикали
   (22 px галочка + 12 px отступ), а перенос делит фразу на ровные строки, без слова-сироты */
.agree span { text-wrap: balance; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 10px 0 0; padding-left: 34px; text-wrap: pretty; }
.auth-box .btn-ghost { margin-top: 14px; }
/* .auth-box в селекторе — чтобы отступ не перебило правило «.auth-box > p» выше */

/* ===== Знакомство после входа (templates/accounts/welcome.html) =====
   Варианты — настоящие radio и checkbox, спрятанные внутри подписи: вид задаёт :has(:checked). */
.onb { max-width: 620px; margin: 0 auto; }
.onb-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-bottom: 28px; }
.onb-steps i { height: 8px; border-radius: 99px; background: var(--track); }
.onb-steps i.done { background: var(--pri); }
.onb h1 { font: 700 30px/1.15 var(--f-disp); letter-spacing: -0.02em; margin: 0 0 8px; text-wrap: balance; }
.onb .lead { color: var(--muted); margin: 0 0 24px; font-size: 17px; }
.onb .two { gap: 14px; }
.onb .field input { background-color: var(--surf); height: 50px; }
.onb-card { background: var(--surf); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.onb-card .agree { margin-top: 0; }
.onb-set { border: 0; padding: 0; margin: 0; min-width: 0; }
.onb .errorlist { margin-top: 12px; }
.big-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.big-chip { cursor: pointer; text-align: center; background: var(--surf); box-shadow: inset 0 0 0 2px var(--line); border-radius: var(--r-md); padding: 22px 12px; font: 700 30px var(--f-disp); letter-spacing: -0.02em; transition: box-shadow var(--t-fast), background-color var(--t-fast), transform var(--t-press) var(--out); }
.big-chip small { display: block; font: 600 13px var(--f-ui); color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.big-chip:hover { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--pri) 45%, var(--line)); }
.big-chip:active { transform: scale(0.97); }
.big-chip:has(input:checked) { box-shadow: inset 0 0 0 2px var(--pri); background: var(--tint); color: var(--pri-ink); }
.grade-more { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.grade-more-t { font-weight: 600; color: var(--muted); margin-right: 2px; }
.grade-more .chip:has(input:checked) { background: var(--tint); color: var(--pri-ink); box-shadow: inset 0 0 0 2px var(--pri); }
.subj-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sp { display: grid; grid-template-columns: 44px 1fr 26px; gap: 14px; align-items: center; cursor: pointer; background: var(--surf); box-shadow: inset 0 0 0 2px var(--line); border-radius: var(--r-md); padding: 12px 14px; font-weight: 700; transition: box-shadow var(--t-fast), background-color var(--t-fast), transform var(--t-press) var(--out); }
.sp .subj { width: 44px; height: 44px; }
.sp small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.sp:active { transform: scale(0.98); }
.sp .tick { width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; color: var(--on-pri); }
.sp .tick .i { width: 15px; height: 15px; opacity: 0; transform: scale(0.5); transition: opacity var(--t-fast), transform var(--t-base) var(--out); }
.sp:has(input:checked) { box-shadow: inset 0 0 0 2px var(--pri); background: var(--tint); }
.sp:has(input:checked) .tick { background: var(--pri); box-shadow: none; }
.sp:has(input:checked) .tick .i { opacity: 1; transform: none; }
.big-chip:has(input:focus-visible), .grade-more .chip:has(input:focus-visible), .sp:has(input:focus-visible) { outline: 2px solid var(--pri); outline-offset: 2px; }
.onb-acts { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }

@media (max-width: 980px) {
  /* Телефон: заголовок, затем сразу кнопка входа, преимущества — ниже. Иначе кнопка
     оказывается под целым экраном текста. */
  .auth-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 0; }
  .pitch { display: contents; }
  .pitch > .kicker { order: 1; align-self: flex-start; }
  .pitch > h1, .pitch > p { order: 1; }
  .auth-box { order: 2; max-width: none; margin: 6px 0 28px; }
  .pitch > .olymp, .pitch > ul { order: 3; }
}
@media (max-width: 640px) {
  .pitch h1 { font-size: 30px; }
  .auth-box { padding: 26px 20px; }
  .onb h1 { font-size: 22px; }
  .onb .two, .subj-pick { grid-template-columns: 1fr; }
  .big-chip { font-size: 24px; padding: 16px 8px; }
  .grade-more .chip { min-width: 48px; justify-content: center; }
  /* Длинная подпись («Принять и войти через VK ID») не помещается в строку — переносится,
     строки выравниваются по длине, чтобы «ID» не осталось на второй строке одно */
  .btn-vk { height: auto; min-height: 56px; padding: 8px 14px; font-size: 16px; line-height: 1.25; white-space: normal; text-align: left; text-wrap: balance; }
  .vkid { flex: none; }
}
