:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d8e0ea;
  --accent: #095c8f;
  --accent-dark: #07466d;
  --danger-bg: #fff2f0;
  --danger: #9f1d18;
  --warning-bg: #fff7df;
  --warning: #855c00;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}
.hero, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.05);
}
.hero {
  padding: 34px;
  margin-bottom: 22px;
}
.hero h1 { margin: 0 0 12px; line-height: 1.15; font-size: clamp(1.7rem, 3vw, 2.6rem); }
.hero p { max-width: 850px; }
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .06em;
  font-size: .82rem;
  margin: 0 0 10px;
}
.card {
  padding: 26px;
  margin: 20px 0;
}
.card h2 { margin-top: 0; }
.section-description, .hint, .small, .muted { color: var(--muted); }
.question {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0;
  background: #fbfdff;
}
.question legend {
  font-weight: 750;
  padding: 0 8px;
}
.q-number { color: var(--accent); }
.required { color: #c0352b; }
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  cursor: pointer;
}
.choice input { margin-top: 4px; }
.choice.strong { font-weight: 700; }
textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.button.primary {
  background: var(--accent);
  color: #fff;
}
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--line); color: var(--muted); }
.submit-bar {
  position: sticky;
  bottom: 0;
  background: rgba(244, 247, 251, .95);
  border-top: 1px solid var(--line);
  padding: 16px 0;
  backdrop-filter: blur(8px);
}
.alert {
  border-radius: 14px;
  padding: 14px 18px;
  margin: 18px 0;
}
.alert p { margin: 0; }
.alert.error { background: var(--danger-bg); color: var(--danger); border: 1px solid #ffd1cc; }
.alert.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #f6d58b; }
.hp-field {
  position: absolute;
  left: -10000px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.matrix-wrap { overflow-x: auto; }
table.matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
}
.matrix th, .matrix td {
  border: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
  background: #fff;
}
.matrix th { background: #f2f6fb; text-align: left; }
.matrix select { min-width: 72px; max-width: 90px; }
.login-card { max-width: 540px; margin: 40px auto; }
.field-label { display: block; font-weight: 700; margin-bottom: 8px; }
.login-card .button { margin-top: 14px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-card {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.stat-card h3 { margin: 0 0 14px; font-size: 1.05rem; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 2fr minmax(110px, .6fr);
  gap: 12px;
  align-items: center;
  margin: 9px 0;
}
.bar-label { font-size: .95rem; }
.bar-track {
  height: 12px;
  background: #e6edf5;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.bar-count { color: var(--muted); font-size: .92rem; text-align: right; }
.text-answers li {
  margin: 10px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
code { background: #eef3f8; padding: 2px 6px; border-radius: 6px; }
@media (max-width: 760px) {
  .container { width: min(100% - 20px, 1120px); padding-top: 14px; }
  .hero, .card { padding: 20px; border-radius: 14px; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .bar-count { text-align: left; }
}
