:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1d2330;
  --muted: #6b7280;
  --line: #d9dde3;
  --accent: #1f4e8c;
  --accent-text: #ffffff;
  --error: #b42318;
  --warn: #9a5b00;
  --notice: #fff7e6;
  --notice-line: #f0c36d;
  --ok: #e8f5ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --card: #1d2128; --text: #e7e9ee; --muted: #9aa3b2; --line: #343a45;
    --accent: #5b8fd6; --accent-text: #0f1217; --error: #f97066; --warn: #f5b754;
    --notice: #2a2416; --notice-line: #7a5d1f; --ok: #16291d;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--accent); color: var(--accent-text); font-weight: 600; padding: 14px 0; margin-bottom: 24px; }
h1 { font-size: 1.6rem; margin: 0 0 12px; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.card.narrow { max-width: 440px; margin: 40px auto; }
.center { text-align: center; }
.notice { background: var(--notice); border-color: var(--notice-line); }
.notice ul { padding-left: 20px; margin: 0 0 16px; }
.success { background: var(--ok); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.alert { background: var(--notice); border: 1px solid var(--notice-line); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid .wide, .grid .field:has(textarea), .grid .field:has(.choices) { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span, .field .label { font-weight: 500; }
.field small { color: var(--muted); font-size: .8rem; }
.field small.err { color: var(--error); }
.field small.warn { color: var(--warn); }
.field small:empty { display: none; }
input, select, textarea { font: inherit; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[data-latin] { text-transform: uppercase; letter-spacing: .02em; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.req { color: var(--error); }
.choices { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.choice { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.choice input { width: auto; }
.agree { font-weight: 600; }
.agree.has-error { color: var(--error); }
.btn { font: inherit; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px;
  padding: 10px 18px; cursor: pointer; margin-top: 12px; }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); margin-top: 0; }
.copy { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.copy .btn { margin-top: 0; white-space: nowrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.link-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-top: 1px solid var(--line); }
.link-row > div { min-width: 0; flex: 1; }
.link-row.off { opacity: .55; }
[hidden] { display: none !important; }

/* ---- добавлено 23.10.2026: пачка ссылок, выдача готовых анкет ---- */
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.field.check { flex-direction: row; align-items: center; gap: 10px; }
.field.check input { width: auto; margin: 0; }
.field.check span { font-weight: 400; }
.card.success .copy { margin-bottom: 8px; }
a.btn { display: inline-block; text-decoration: none; line-height: 1.2; }
@media (max-width: 640px) {
  .link-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .row-actions { width: 100%; }
  .row-actions .btn, .row-actions form { flex: 1; }
}

/* ---- выбор папки на компьютере (23.10.2026) ---- */
.hint-box { font-size: 13px; color: #5a6475; background: #f3f6fb;
  border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }
.hint-box.warn { background: #fff6e8; color: #8a5a00; }
#folder-name { font-size: 14px; }
#folder-name.ok { color: #0f7a35; font-weight: 600; }
#folder-card .row-actions { align-items: center; }
