/* Mobile-first: крупные поля и кнопки под палец, одна колонка. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #6b7385;
  --accent: #2f6fed;
  --error: #c62828;
  --border: #dde1e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181f;
    --card: #1d2433;
    --text: #e8ebf1;
    --muted: #9aa3b5;
    --accent: #5b8ff9;
    --error: #ef6b6b;
    --border: #2c3445;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.2rem; margin: 0 0 8px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

label { display: block; margin-bottom: 6px; }

input, textarea {
  width: 100%;
  font: inherit;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}

button {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
button:disabled { opacity: .45; cursor: default; }

button.link {
  width: auto;
  margin: 0;
  padding: 8px 0;
  font-weight: 400;
  color: var(--accent);
  background: none;
}

.muted { color: var(--muted); }
.error { color: var(--error); margin: 10px 0 0; }

label:not(:first-of-type) { margin-top: 14px; }
.hint { font-size: .85rem; color: var(--muted); margin: 4px 0 0; }
.center { text-align: center; }
.ok { color: #2e9e5b; }
a { color: var(--accent); }

a.nav {
  display: block;
  text-decoration: none;
  font-weight: 600;
}

.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.list li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  word-break: break-word;
}

code {
  font: 600 1rem ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .05em;
}

input.copy {
  margin-top: 8px;
  padding: 10px;
  font-size: .85rem;
}

/* --- Фаза 2: тренировка (временно, до дизайн-системы) --- */
.label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; }
a.button {
  display: block; text-align: center; margin-top: 12px; padding: 14px;
  font-weight: 600; color: #fff; background: var(--accent); border-radius: 10px; text-decoration: none;
}
button.secondary { color: var(--accent); background: transparent; border: 1px solid var(--accent); }
textarea, select { width: 100%; font: inherit; padding: 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); }
textarea { font-size: 18px; resize: vertical; }
.exercise-ru { font-size: 1.3rem; line-height: 1.4; margin: 4px 0 16px; }
.feedback-status { font-weight: 700; font-size: 1.1rem; margin: 0 0 6px; }
.feedback--correct .feedback-status, .feedback--claimed .feedback-status { color: #2e9e5b; }
.feedback--wrong .feedback-status { color: var(--error); }
.feedback--unconfirmed .feedback-status { color: #b7791f; }
.answer-given { font-size: 1.05rem; margin: 0 0 14px; }
.answer-correct { font-size: 1.05rem; margin: 0 0 14px; font-weight: 600; }
.diff { font-size: 1.05rem; line-height: 1.8; margin: 0 0 14px; }
.diff-del { color: var(--error); text-decoration: line-through; }
.diff-ins { color: #2e9e5b; text-decoration: underline; }
.rule { border-left: 3px solid var(--border); padding: 4px 0 4px 12px; margin: 12px 0; }
.rule p { margin: 4px 0; }
.mistake-form { margin-top: 16px; }
.stat { font-size: 2.2rem; font-weight: 700; margin: 0; }
.topics form { display: inline; }
.grammar table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.grammar th, .grammar td { border: 1px solid var(--border); padding: 6px; text-align: left; vertical-align: top; }
.grammar { overflow-x: auto; }
