/* Двор школы №7 — опрос. Solarpunk-lite, mobile-first. Без внешних CDN. */

:root {
  --sand: #F0ECDA;
  --sand-2: #E7E1C9;
  --paper: #FBFAF3;
  --ink: #1E2A22;
  --ink-soft: #4A5A4E;
  --green: #2F6B4F;
  --green-deep: #1B3D2C;
  --leaf: #7FA86A;
  --sun: #E5A93B;
  --clay: #C4643C;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(27, 61, 44, .18), 0 10px 24px rgba(27, 61, 44, .08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(229, 169, 59, .18), transparent 42%),
    radial-gradient(circle at 88% 2%, rgba(127, 168, 106, .20), transparent 40%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 56px; }

/* ── Шапка ───────────────────────────────────────────── */

.top {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 0 6px;
  font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-soft);
}
.top .mark {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}
.top .mark::after {
  content: ""; position: absolute; inset: 7px 5px 9px 12px;
  background: var(--sand); border-radius: 60% 10% 60% 10%;
  transform: rotate(-18deg);
}

/* ── Обложка ─────────────────────────────────────────── */

.hero { padding: 10px 0 4px; }
.hero h1 {
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.14;
  margin: 0 0 12px;
  letter-spacing: -.02em;
  color: var(--green-deep);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, rgba(229, 169, 59, .55) 62%);
}
.hero p { margin: 0 0 10px; color: var(--ink-soft); max-width: 46ch; }
.hero .anon {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px; padding: 7px 12px;
  background: var(--paper); border: 1px solid var(--sand-2);
  border-radius: 999px; font-size: 14px; color: var(--green-deep);
}

/* ── Карточки выбора ─────────────────────────────────── */

.cards { display: grid; gap: 14px; margin: 22px 0 8px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--paper);
  border: 1px solid var(--sand-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  transition: transform .12s ease, border-color .12s ease;
  position: relative;
  overflow: hidden;
}
.card:active { transform: translateY(1px); }
.card:hover { border-color: var(--leaf); }
.card .ico { font-size: 28px; line-height: 1; display: block; margin-bottom: 10px; }
.card h3 { margin: 0 0 4px; font-size: 19px; color: var(--green-deep); }
.card p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.card .meta { margin-top: 12px; font-size: 13px; color: var(--ink-soft); display: flex; gap: 10px; flex-wrap: wrap; }
.card .meta b { font-weight: 600; color: var(--green); }
.card--kids { grid-column: 1 / -1; }

/* ── Анкета ──────────────────────────────────────────── */

.form-head { padding: 6px 0 0; }
.form-head h2 { margin: 4px 0 6px; font-size: clamp(24px, 6vw, 32px); color: var(--green-deep); letter-spacing: -.01em; }
.form-head .lead { color: var(--ink-soft); font-size: 16px; margin: 0 0 14px; }

.note {
  background: var(--paper); border: 1px solid var(--sand-2);
  border-left: 4px solid var(--sun);
  border-radius: 12px; padding: 12px 14px; font-size: 15px; color: var(--ink-soft);
  margin: 0 0 18px;
}

.progress { position: sticky; top: 0; z-index: 5; padding: 10px 0 12px; background: var(--sand); }
.progress .bar { height: 6px; background: var(--sand-2); border-radius: 999px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--leaf), var(--green)); transition: width .25s ease; }
.progress .step { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

.q { margin: 0 0 22px; padding: 0; border: 0; }
.q > legend { padding: 0; margin: 0 0 10px; font-weight: 600; font-size: 18px; color: var(--green-deep); line-height: 1.35; }
.q .hint { margin: -4px 0 10px; font-size: 14px; color: var(--ink-soft); }
.q .req { color: var(--clay); font-weight: 700; }

.opts { display: grid; gap: 8px; }
@media (min-width: 560px) { .opts.two { grid-template-columns: 1fr 1fr; } }

.opt {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--paper); border: 1px solid var(--sand-2);
  border-radius: 14px; padding: 13px 14px;
  cursor: pointer; min-height: 48px;
  transition: border-color .12s ease, background .12s ease;
  font-size: 16px;
}
.opt:active { background: #f6f3e6; }
.opt input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); }
.opt .rank {
  display: none; flex: 0 0 24px; height: 24px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 13px; font-weight: 700;
  align-items: center; justify-content: center; margin-top: -1px;
}
.opt.is-checked { border-color: var(--green); background: #f2f5ec; }
.opt.is-ranked .rank { display: flex; }
.opt.is-locked { opacity: .45; }

input[type="text"], textarea {
  width: 100%; font: inherit; color: inherit;
  background: var(--paper); border: 1px solid var(--sand-2);
  border-radius: 14px; padding: 13px 14px; min-height: 48px;
}
textarea { min-height: 96px; resize: vertical; }
input[type="text"]:focus, textarea:focus, .opt input:focus-visible {
  outline: 2px solid var(--leaf); outline-offset: 2px;
}
.other-input { margin-top: 8px; }

.scale { display: grid; gap: 10px; }
.scale-row {
  background: var(--paper); border: 1px solid var(--sand-2); border-radius: 14px;
  padding: 12px 14px; display: grid; gap: 8px;
}
.scale-row .name { font-size: 15px; }
.scale-row .pips { display: flex; gap: 8px; }
.pip {
  flex: 1 1 0; min-height: 44px; border-radius: 10px; border: 1px solid var(--sand-2);
  background: #fff; font: inherit; font-weight: 600; color: var(--ink-soft);
  cursor: pointer;
}
.pip.on { background: var(--green); border-color: var(--green); color: #fff; }

/* ── Навигация ───────────────────────────────────────── */

.nav { display: flex; gap: 10px; margin-top: 24px; }
.btn {
  font: inherit; font-weight: 600; border-radius: 14px; border: 1px solid transparent;
  padding: 15px 20px; cursor: pointer; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn--main { background: var(--green); color: #fff; flex: 1 1 auto; box-shadow: var(--shadow); }
.btn--main:disabled { background: #9bb3a3; cursor: not-allowed; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--green-deep); border-color: var(--sand-2); }
.btn--ghost:disabled { opacity: .4; }

.status { margin-top: 14px; font-size: 15px; }
.status.err { color: var(--clay); }

/* ── Экран «спасибо» ─────────────────────────────────── */

.done { text-align: center; padding: 40px 0 10px; }
.done .big { font-size: 52px; line-height: 1; }
.done h2 { color: var(--green-deep); margin: 14px 0 8px; font-size: 26px; }
.done p { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 12px; }
.done .extra {
  text-align: left; background: var(--paper); border: 1px dashed var(--leaf);
  border-radius: 14px; padding: 14px 16px; margin: 20px auto 0; max-width: 48ch; font-size: 15px;
}

.foot { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--sand-2); font-size: 13.5px; color: var(--ink-soft); }
.foot a { color: var(--green); }

.hidden { display: none !important; }
.sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); }
