:root {
  --bg: #f3f1eb;
  --card: #fffdf8;
  --ink: #1c2430;
  --muted: #5b6573;
  --line: #e4ddd0;
  --accent: #0f6e56;
  --accent-dark: #0b5744;
  --danger: #b42318;
  --ok: #157347;
  --warn: #b54708;
  --shadow: 0 18px 40px rgba(28, 36, 48, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(15, 110, 86, 0.12), transparent 28%),
    var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.site-header, .site-footer {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 18px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-size: 1.15rem;
}

.brand:hover { text-decoration: none; }

.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero h1, h1, h2 { margin-top: 0; }
.muted { color: var(--muted); }

.exam-grid {
  display: grid;
  gap: 16px;
}

.exam-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.secondary { background: #445066; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

.question {
  margin: 18px 0 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.choices { display: grid; gap: 8px; }

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.choice.correct { border-color: var(--ok); background: #edf8f1; }
.choice.wrong { border-color: var(--danger); background: #fdecec; }

.timer {
  position: sticky;
  top: 12px;
  z-index: 2;
  background: #12231e;
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.score {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

.form-row { display: grid; gap: 6px; margin-bottom: 14px; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 4px 0 0; font-size: 0.92rem; }
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.messages { list-style: none; padding: 0; }
.messages li { padding: 10px 12px; border-radius: 10px; background: #fff4e5; }

.site-footer {
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .exam-item { flex-direction: column; align-items: flex-start; }
}
