/* Оформление страниц демо-стенда.
 *
 * Токены взяты из витрины (public/site_static/styles.css): клиент приходит
 * сюда прямо с кейс-сайта, и смена палитры на полпути читается как «меня
 * куда-то увели». Градиент шапки тот же, поэтому переход выглядит цельным.
 *
 * Шрифт IBM Plex Sans: подбор по базе дал для «education» детскую пару
 * Baloo 2 / Comic Neue — для системы, где считают деньги учебного центра,
 * это подрывает доверие. Plex создавался для финансовых интерфейсов и имеет
 * полную кириллицу.
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
    color-scheme: light;
    --primary: #0088cc;
    --primary-dark: #006699;
    --accent: #7c3aed;
    /* Зелёный витрины (#16a34a) даёт с белым текстом всего 3.3:1 при норме
       4.5 — на кнопке призыва это плохо читается. Берём на два шага темнее:
       5.02:1, оттенок тот же. */
    --success: #15803d;
    --success-dark: #126e35;
    --bg: #eef2ff;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #55637a;   /* темнее исходного #64748b: на белом даёт 4.5:1 */
    --border: #d7dfea;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --ok: #065f46;
    --ok-bg: #ecfdf5;
    --radius: 12px;
    --header-bg: linear-gradient(135deg, #0088cc 0%, #7c3aed 100%);
    --shadow: 0 10px 40px rgba(0, 102, 153, .12);
    --focus: #0088cc;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: 16px;          /* меньше 16px iOS зумит страницу при фокусе */
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--header-bg);
    color: #fff;
    padding: 18px 20px;
}

.topbar-inner {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}

.topbar img { display: block; }

.wrap {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 16px 56px;
}

.card {
    width: 100%;
    max-width: 560px;
    background: var(--surface);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow);
}

h1 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 600;
}

.lead {
    margin: 0 0 24px;
    color: var(--text-muted);
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.field .hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

input[type="email"],
input[type="text"] {
    width: 100%;
    min-height: 48px;         /* палец попадает без прицеливания */
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

input::placeholder { color: #94a3b8; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 13px 22px;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    border: 0;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}

.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }

.btn-secondary {
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.btn + .btn { margin-top: 12px; }

/* Кольцо фокуса обязательно: без него клавиатурная навигация вслепую. */
:where(a, button, input, .btn):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.alert {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 15px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-ok {
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid #a7f3d0;
}

.note {
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

.meta {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.creds {
    margin: 16px 0 0;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

.creds dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.creds dt { color: var(--text-muted); }
.creds dd { margin: 0; font-weight: 600; }

.steps {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding-left: 34px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e0f2fe;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .card { padding: 22px 18px; border-radius: 14px; }
    h1 { font-size: 23px; }
    .wrap { padding: 18px 12px 40px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Пароль выдаётся один раз и его переписывают руками — моноширинный, крупнее
   обычного текста и с запасом межбуквенного, чтобы «l» и «I» не сливались. */
.creds-pass {
    font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 16px;
    letter-spacing: .04em;
    user-select: all;
}

.creds-note {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Выбор типа стенда: две карточки с radio. */
.choice { border: 0; padding: 0; min-width: 0; }
.choice legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.choice-item { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 10px; padding: 12px 14px; cursor: pointer;
               background: #fff; border: 1px solid var(--border); border-radius: var(--radius); font-weight: 400; }
.choice-item:has(input:checked) { border-color: var(--accent, #5b3df5); box-shadow: 0 0 0 1px var(--accent, #5b3df5); }
.choice-item input { margin-top: 4px; flex: none; }
.choice-item b { display: block; margin-bottom: 2px; font-weight: 600; }
.choice-item span { font-size: 14px; color: var(--text-muted); }
.choice-item span b { color: var(--text); font-size: 15px; }
