:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1c2330;
  --muted: #677082;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --danger: #dc2626;
  --ok: #16a34a;
  --border: #d7dce5;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 10px 12px 32px; }
h1 { font-size: 19px; margin: 8px 0 4px; }
.intro { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; line-height: 1.45; }
.req { color: var(--danger); }

fieldset {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px 10px;
  margin: 0 0 10px;
}
legend { font-weight: 600; font-size: 13.5px; padding: 0 5px; }
.hint { color: var(--muted); font-size: 11.5px; margin: 2px 0 8px; }

.choice {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 2px; font-size: 15px; cursor: pointer;
  border-bottom: 1px solid #eef1f5;
}
.choice:last-of-type { border-bottom: none; }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }

textarea, input[type="text"] {
  width: 100%; font: inherit; font-size: 16px; /* 16px — iOS не зумит при фокусе */
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; margin-top: 5px; background: #fff; color: var(--text);
}
textarea:focus, input[type="text"]:focus { outline: 2px solid var(--accent); border-color: transparent; }

.filebtn {
  display: block; text-align: center;
  background: #eef3fe; color: var(--accent-dark);
  border: 1px dashed var(--accent); border-radius: 8px;
  padding: 9px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.filebtn input { display: none; }

.filelist { list-style: none; margin: 8px 0 0; padding: 0; }
.filelist li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 5px 2px; border-bottom: 1px solid #eef1f5;
  word-break: break-all;
}
.filelist li:last-child { border-bottom: none; }
.filelist .size { color: var(--muted); flex: none; }
.filelist .rm {
  flex: none; margin-left: auto;
  background: none; border: none; color: var(--danger);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 3px 7px;
}
.filelist .bad { color: var(--danger); }

.totals { font-size: 12px; color: var(--muted); margin: -4px 0 8px; min-height: 14px; }
.totals.over { color: var(--danger); font-weight: 600; }

.error {
  background: #fef2f2; color: var(--danger);
  border: 1px solid #fecaca; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; margin-bottom: 10px;
}

.progress { margin-bottom: 10px; }
.progress-bar {
  height: 8px; background: #e3e8f0; border-radius: 5px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--accent);
  transition: width .2s ease;
}
.progress-text { font-size: 12px; color: var(--muted); margin-top: 5px; text-align: center; }

.submit {
  display: block; width: 100%;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 12px; font-size: 15.5px; font-weight: 600; cursor: pointer;
}
.submit:active { background: var(--accent-dark); }
.submit:disabled { opacity: .6; cursor: default; }
.submit.secondary { background: #e3e8f0; color: var(--text); margin-top: 16px; }

.success { text-align: center; padding: 36px 0; }
.success-icon {
  width: 58px; height: 58px; margin: 0 auto 12px;
  border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 34px; line-height: 58px;
}
.success h2 { font-size: 17px; margin: 0 0 6px; }
.report-no { font-size: 15px; }
