:root {
  color-scheme: light;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --border: #dbe3ef;
  --primary: #111827;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --ok-bg: #dcfce7;
  --ok-text: #166534;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06); padding: 22px; margin-bottom: 16px; }
.header { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
h1, h2, h3 { margin: 0 0 8px; }
p { margin: 0; line-height: 1.5; }
.muted { color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 12px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 11px 12px; font: inherit; background: #fff; outline: none; }
select { cursor: pointer; }
input:focus, select:focus, textarea:focus { border-color: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25); }
button, .button-link { border: 0; border-radius: 14px; background: var(--primary); color: white; padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.secondary, .button-link.secondary { background: #e2e8f0; color: #0f172a; }
button.danger { background: var(--danger); }
button.outline, .button-link.outline { background: white; color: var(--text); border: 1px solid var(--border); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 800; background: #e2e8f0; color: #0f172a; }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warning { background: var(--warning-bg); color: var(--warning-text); }
.alert { border-radius: 18px; padding: 14px 16px; margin-top: 12px; }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.warning { background: var(--warning-bg); color: var(--warning-text); }
.alert.ok { background: var(--ok-bg); color: var(--ok-text); }
.question { font-size: 22px; font-weight: 800; line-height: 1.35; }
.options { display: grid; gap: 10px; }
.option { width: 100%; justify-content: flex-start; text-align: left; background: #fff; color: var(--text); border: 1px solid var(--border); padding: 16px; white-space: normal; }
.progress { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: #111827; width: 0%; transition: width .25s ease; }
.stat { min-height: 108px; }
.stat-value { font-size: 34px; font-weight: 900; margin-top: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1050px; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: 14px; }
th { color: var(--muted); font-weight: 900; }
.hidden { display: none !important; }
.top-links { display: flex; gap: 8px; flex-wrap: wrap; }
.timer { font-size: 22px; font-weight: 900; }

@media (max-width: 760px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { width: min(100% - 20px, 1120px); padding: 12px 0; }
  .card { border-radius: 18px; padding: 16px; }
  .question { font-size: 18px; }
}
