:root { --bg: #f3f6f7; --card: #fff; --ink: #16282d; --muted: #5d7177; --line: #dbe4e6; --accent: #0f8a8a; --accent-ink: #fff; --danger: #b3261e; --ok: #1b7a43; --radius: 14px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.top { background: var(--accent); color: var(--accent-ink); display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 18px; }
.top .link { color: var(--accent-ink); }
.shell { max-width: 560px; margin: 0 auto; padding: 16px 12px 48px; display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
h1 { font-size: 22px; margin: 0 0 6px; overflow-wrap: anywhere; }
h2 { font-size: 17px; margin: 0 0 8px; }
h3 { font-size: 15px; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tabs button { background: transparent; color: var(--ink); border: 0; min-height: 44px; border-radius: 9px; font: inherit; font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); color: var(--accent); }
.block { margin-top: 14px; }
.block + .block, fieldset + .block { border-top: 1px solid var(--line); padding-top: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 4px; }
legend { font-weight: 600; font-size: 17px; padding: 0; margin-bottom: 8px; }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field label { display: grid; gap: 4px; }
.field span { font-size: 14px; font-weight: 600; }
.field em { font-weight: 400; font-style: normal; color: var(--muted); }
.field small { color: var(--muted); font-size: 13px; }
input[type="text"], input[type="email"], input[type="password"] { width: 100%; min-height: 46px; border: 1px solid #b9c8cb; border-radius: 10px; padding: 8px 12px; font: inherit; background: #fff; color: var(--ink); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #7fd0d0; outline-offset: 2px; }
button, .button { min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:disabled { opacity: .6; cursor: default; }
.secondary { background: #fff; color: var(--accent); min-height: 40px; padding: 0 14px; }
.telegram { width: 100%; background: #229ed9; border-color: #229ed9; }
.link { background: none; border: 0; color: var(--accent); min-height: 0; padding: 4px; font-weight: 600; text-decoration: underline; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.error { color: var(--danger); font-size: 14px; }
.ok { color: var(--ok); font-size: 14px; }
.banner { background: #e4f4f4; border: 1px solid #b6dede; border-radius: 12px; padding: 10px 14px; margin: 0; }
.methods, .mail { list-style: none; padding: 0; margin: 0; }
.methods li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.methods li > div { display: grid; min-width: 0; }
.methods b { overflow-wrap: anywhere; }
.methods span { color: var(--muted); font-size: 14px; }
.methods .panel { display: block; background: var(--bg); border-radius: 12px; padding: 14px; border-top: 0; }
.mail li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.check input { width: 20px; height: 20px; }
code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: 13px; overflow-wrap: anywhere; }
@media (min-width: 900px) { .shell { max-width: 640px; padding-top: 28px; } }
@media (prefers-reduced-motion: no-preference) { button, .button { transition: opacity .15s; } }

/* Этап 2: школы */
.brand { background: none; border: 0; color: var(--accent-ink); font-size: 18px; font-weight: 700; min-height: 0; padding: 0; }
.shell { padding-bottom: 96px; }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); }
.bottom button { background: none; border: 0; color: var(--muted); min-height: 48px; border-radius: 10px; }
.bottom button[aria-current="page"] { color: var(--accent); background: #e4f4f4; }
select, textarea, input[type="number"] { width: 100%; min-height: 46px; border: 1px solid #b9c8cb; border-radius: 10px; padding: 8px 12px; font: inherit; background: #fff; color: var(--ink); }
textarea { resize: vertical; line-height: 1.4; }
.rows { list-style: none; padding: 0; margin: 0 0 10px; }
.rows > li { border-top: 1px solid var(--line); padding: 10px 0; }
.rows > li:first-child { border-top: 0; }
.rowlink { display: grid; gap: 2px; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); padding: 4px 0; min-height: 48px; font-weight: 400; justify-content: stretch; }
.rowlink b, .split b { overflow-wrap: anywhere; }
.rowlink > span, .split > div > span, .pick > span > span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.split > div, .pick > span { display: grid; min-width: 0; }
.split select { width: auto; max-width: 55%; min-height: 40px; font-size: 14px; }
.pick { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1; }
.pick input { width: 22px; height: 22px; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.tags i { font-style: normal; font-size: 13px; background: #e4f4f4; color: #0b5c5c; border-radius: 999px; padding: 3px 10px; }
.tabs.wrap { grid-template-columns: repeat(3, 1fr); margin: 12px 0 0; }
.tabs.wrap button { font-size: 14px; min-height: 42px; padding: 0 6px; }
.panel { background: var(--bg); border-radius: 12px; padding: 14px; margin: 10px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.course { border-top: 1px solid var(--line); padding: 12px 0 4px; margin-top: 12px; }
.cohorts { list-style: none; padding: 0 0 0 12px; margin: 8px 0; border-left: 3px solid var(--line); }
.cohorts li { padding: 5px 0; display: grid; gap: 2px; }
.peers { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--muted); font-size: 14px; }
.check.small { min-height: 32px; font-size: 14px; }
.format { border-top: 1px solid var(--line); padding: 4px 0; }
.format:first-child { border-top: 0; }
.inline { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 0 0 8px 30px; font-size: 14px; }
.inline input[type="number"] { width: 76px; min-height: 40px; }
.mail li.bad { color: var(--danger); }
.mail li.warn { color: #8a5a00; }
h3 { margin-top: 0; }
@media (min-width: 900px) {
  .shell { max-width: 760px; }
  .tabs.wrap { grid-template-columns: repeat(6, 1fr); }
  .bottom { position: static; max-width: 760px; margin: 0 auto 24px; border: 1px solid var(--line); border-radius: var(--radius); }
}
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; gap: 0; } .split select { max-width: 60%; } }
