/* Основное оформление (бывший вариант A) — «тёмный технологичный»: глубокий графит, стеклянные карточки,
   один холодный акцент (бирюза → индиго), заголовок Unbounded, текст Manrope. */

:root {
  color-scheme: dark;
  --bg: #0a0d14;
  --bg-2: #0f1421;
  --card: rgba(255, 255, 255, 0.035);
  --card-solid: #131a28;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #eef2f8;
  --ink-2: #a9b3c6;
  --ink-3: #7c879c;
  --accent: #35d6c3;
  --accent-2: #6b7cff;
  --accent-soft: rgba(53, 214, 195, 0.12);
  --warn: #ff7a6b;
  --warn-soft: rgba(255, 122, 107, 0.12);
  --r: 14px;
  --r-sm: 10px;
  --head: "Unbounded", "Segoe UI", Arial, sans-serif;
  --text: "Manrope", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(107, 124, 255, 0.22), transparent 60%),
    radial-gradient(700px 480px at -10% 30%, rgba(53, 214, 195, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--accent); color: #0a0d14; border-radius: 8px; z-index: 10; }
.skip:focus { top: 16px; }

.page { max-width: 860px; margin: 0 auto; padding: 72px 24px 96px; }

/* шапка */
.hero { margin: 0 0 28px; }
.hero-kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.title {
  margin: 0 0 16px;
  font-family: var(--head);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 760px;
}
.sub { margin: 0 0 28px; max-width: 560px; color: var(--ink-2); font-size: 17px; }

.progress-card {
  display: grid;
  gap: 10px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  backdrop-filter: blur(10px);
}
.counter { font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.progress-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 240ms ease; }

.notice { margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--accent-soft); font-size: 15px; }

.draft-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 20px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink-2);
  font-size: 15px;
}
.btn.link {
  min-height: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn.link:hover { color: var(--ink); }

/* карточки */
.form { margin: 0; }
.block, .card, .submit-card {
  margin: 0 0 20px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  backdrop-filter: blur(10px);
}
.block-title, .card-title {
  margin: 0 0 24px;
  font-family: var(--head);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
}

.q { margin: 0 0 30px; padding: 0; border: 0; min-width: 0; }
.q:last-of-type { margin-bottom: 0; }
.q-label { display: grid; grid-template-columns: 34px minmax(0, 1fr); margin: 0 0 12px; padding: 0; font-size: 17px; font-weight: 700; line-height: 1.4; }
.q-num { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.q-required .q-num::after { content: "*"; margin-left: 1px; }
.q-hint { margin: -4px 0 12px 34px; color: var(--ink-3); font-size: 14.5px; }
.q-body { margin-left: 34px; }
.q-error { margin: 8px 0 0 34px; color: var(--warn); font-size: 14.5px; font-weight: 600; }
.q-error:empty { display: none; }
.q.invalid .q-body > input[type="text"], .q.invalid .q-body > textarea { border-color: var(--warn); }

input[type="text"], textarea {
  display: block; width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.25); color: var(--ink); font: inherit; font-size: 16.5px;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* варианты */
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opts.single-col { grid-template-columns: minmax(0, 1fr); }
.opt {
  position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; min-height: 50px;
  padding: 13px 16px 13px 48px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.2); cursor: pointer; transition: border-color 120ms, background-color 120ms;
}
.opt:hover { border-color: var(--accent); }
.opt > input[type="radio"], .opt > input[type="checkbox"] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt > span { min-width: 0; line-height: 1.45; }
.opt::before { content: ""; position: absolute; left: 15px; top: 15px; width: 20px; height: 20px; border: 1.5px solid var(--line-strong); background: transparent; }
.opt:has(> input[type="radio"])::before { border-radius: 50%; }
.opt:has(> input[type="checkbox"])::before { border-radius: 5px; }
.opt:has(> input[type="radio"])::after { content: ""; position: absolute; left: 21px; top: 21px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform 120ms; }
.opt:has(> input[type="checkbox"])::after { content: ""; position: absolute; left: 22px; top: 18px; width: 6px; height: 11px; border: solid #0a0d14; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 120ms; }
.opt:has(> input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt:has(> input[type="radio"]:checked)::before { border-color: var(--accent); }
.opt:has(> input[type="radio"]:checked)::after { transform: scale(1); }
.opt:has(> input[type="checkbox"]:checked)::before { border-color: var(--accent); background: var(--accent); }
.opt:has(> input[type="checkbox"]:checked)::after { transform: rotate(45deg) scale(1); }
.opt:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt.other { grid-column: 1 / -1; flex-wrap: wrap; }
.opt.other .other-input { position: relative; z-index: 1; display: block; opacity: 1; flex: 1 1 100%; margin: 10px 0 2px; width: 100%; min-height: 44px; padding: 9px 12px; font-size: 15.5px; }
.opt.other .other-input[hidden] { display: none; }

/* список задач */
.list { display: grid; gap: 10px; }
.list-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 0; }
.list-num { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }

/* матрица */
.matrix { display: grid; gap: 0; border-top: 1px solid var(--line); }
.matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.row-label { font-size: 16.5px; font-weight: 700; line-height: 1.35; }
.row-desc { display: block; margin-top: 4px; color: var(--ink-3); font-size: 14px; font-weight: 400; line-height: 1.45; }
.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.cell { position: relative; display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 10px; border-radius: 999px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-align: center; cursor: pointer; transition: background-color 120ms, color 120ms; }
.cell input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cell:hover { color: var(--ink); }
.cell:has(input:checked) { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0d14; }
.cell:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

/* отправка */
.btn { display: inline-block; min-height: 52px; padding: 13px 28px; border: 1px solid transparent; border-radius: var(--r-sm); font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer; }
.btn.primary { width: 100%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0a0d14; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { opacity: 0.6; cursor: progress; }
.btn.secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.secondary:hover { border-color: var(--accent); }
.submit-hint { margin: 12px 0 0; color: var(--ink-3); font-size: 14px; text-align: center; }

.panel { margin: 18px 0 0; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--card-solid); }
.panel p { margin: 0 0 10px; } .panel p:last-child { margin: 0; }
.panel-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.panel.error { border-color: var(--warn); background: var(--warn-soft); }
.panel .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.panel .manual-copy { margin-top: 12px; } .panel .manual-copy textarea { font-size: 14px; }
.card.success { border-color: var(--accent); } .card.success p { margin: 0; color: var(--ink-2); }
.form.sending fieldset.q { opacity: 0.6; }

@media (max-width: 900px) { .matrix-row { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
@media (max-width: 680px) {
  .page { padding: 40px 14px 64px; }
  .title { font-size: 28px; }
  .block, .card, .submit-card { padding: 22px 16px; }
  .q-body, .q-hint, .q-error { margin-left: 0; }
  .opts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) { .cells { grid-template-columns: minmax(0, 1fr); border-radius: 12px; } .cell { border-radius: 8px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
