/* Лендинг самозаписи (/zapis). Цвета — из логотипа «Страны Детства»: солнце и разноцветные буквы.
   --accent (кнопка), --ink (заголовки), --glow (свечение сверху) меняет /zapis/theme.css по цвету центра (SIGNUP_COLOR). */
:root {
  --navy: #2e2878;
  --red: #e2382f;
  --green: #17944a;
  --magenta: #cf1f7a;
  --orange: #e57f0c;
  --blue: #2f84cc;
  --sun: #ffd21f;
  --text: #24213f;
  --text-2: #615d7a;
  --line: #e4e1ef;
  --bg: #fffaf0;
  --card: #ffffff;
  --ink: var(--navy);
  --ink-rgb: 46, 40, 120;
  --accent: var(--magenta);
  --accent-hover: #b81a6b;
  --accent-rgb: 207, 31, 122;
  --glow: #fff1b8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  background-image: radial-gradient(ellipse 120% 340px at 50% -60px, var(--glow) 0%, transparent 70%);
  background-repeat: no-repeat;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap {
  max-width: 560px; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left));
}

.hero { text-align: center; padding: 8px 0 18px; }
.logo { display: block; width: 150px; height: 150px; margin: 0 auto 4px; border-radius: 50%; object-fit: cover; }
.logo.wide { width: auto; height: auto; max-width: min(240px, 70vw); max-height: 220px; border-radius: 0; object-fit: contain; margin-bottom: 12px; }
.name { font-size: 26px; font-weight: 800; color: var(--ink); margin: 16px 0 4px; }
h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.lead { margin: 0 auto; max-width: 420px; color: var(--text-2); font-size: 15px; text-wrap: balance; }
.lead:empty { display: none; }

.card {
  background: var(--card); border-radius: 22px; padding: 20px;
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06), 0 12px 32px rgba(var(--ink-rgb), .09);
}

fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 17px; color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.d1 { background: var(--magenta); }
.d2 { background: var(--green); }
.d3 { background: var(--orange); }

.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin: 0 0 4px 2px; }
.field > span i { font-style: normal; color: #8e8aa6; }
.field > span i::before { content: "· "; }
input[type="text"], input:not([type]), input[type="tel"], input[type="email"], textarea {
  width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px;
  font: inherit; font-size: 17px; color: var(--text); background: #fdfcff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.4; resize: vertical; display: block; }
input::placeholder, textarea::placeholder { color: #aaa6bf; }
input:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(var(--ink-rgb), .12); background: #fff; }
input.bad, textarea.bad { border-color: var(--red); box-shadow: 0 0 0 4px rgba(226, 56, 47, .12); }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { position: relative; display: block; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: flex; align-items: center; gap: 8px; min-height: 54px; height: 100%; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fdfcff;
  font-weight: 600; font-size: 15px; line-height: 1.25; transition: background .15s, border-color .15s, color .15s;
}
.chip span::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #cbc7dc; background: #fff;
}
/* Выбранное направление — белый текст: цвета темнее логотипных, чтобы контраст был не ниже 4.5:1. */
.chip { --c: var(--magenta); }
.chip:nth-child(4n+2) { --c: #12803f; }
.chip:nth-child(4n+3) { --c: #b35c00; }
.chip:nth-child(4n+4) { --c: #2370b0; }
.chip:hover span { border-color: var(--c); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(var(--ink-rgb), .15); }
.chip input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.chip input:checked + span::before {
  border-color: #fff; background: #fff center / 14px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324213f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.chips.bad .chip span { border-color: var(--red); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin: 4px 0 14px; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.consent a { color: var(--ink); }
.consent.bad { color: var(--red); }

.err { color: var(--red); font-size: 14px; font-weight: 600; min-height: 0; margin-bottom: 10px; }
.err:empty { display: none; }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 20px;
  border: 0; border-radius: 16px; background: var(--accent); color: #fff; font: inherit; font-size: 18px; font-weight: 700;
  text-decoration: none; cursor: pointer; box-shadow: 0 6px 16px rgba(var(--accent-rgb), .28); transition: transform .1s, background .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn[disabled] { opacity: .65; cursor: default; }
.hint { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--text-2); }

.done { text-align: center; padding: 28px 20px; }
.done h2 { margin: 6px 0 8px; font-size: 24px; color: var(--ink); }
.done p { margin: 0 0 18px; color: var(--text-2); }
.done p.also { margin: 4px 0 12px; font-size: 15px; }
.done .hint { margin-top: 14px; }
.ok {
  width: 68px; height: 68px; margin: 0 auto 6px; border-radius: 50%; background: var(--green) center / 36px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

@media (max-width: 360px) {
  .chips { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
@media (min-width: 600px) {
  .wrap { padding-top: 32px; }
  .card { padding: 28px; }
}
