:root {
  --bg: #0b1016;
  --panel: #141d28;
  --panel-2: #1b2633;
  --text: #ecf2f8;
  --muted: #9fb2c7;
  --accent: #40c4ff;
  --ok: #1ecb70;
  --warn: #ffb84d;
  --bad: #ff6f7d;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
}
body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: radial-gradient(circle at 20% 0%, #122132 0%, var(--bg) 45%);
  color: var(--text);
}
a { color: var(--accent); }
.hidden { display: none !important; }

.shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.shell.wide { max-width: 72rem; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}
.sub {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}
.top-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  background: var(--panel);
  border: 1px solid #314358;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
h2 { margin: 0 0 8px; font-size: 1.25rem; }
.lede { color: var(--muted); margin: 0 0 16px; line-height: 1.45; }

label {
  display: block;
  margin: 0 0 14px;
  font-weight: 650;
}
input[type="password"],
input[type="text"],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid #3a5068;
  background: #0e1620;
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
.optional { color: var(--muted); font-weight: 500; }

button {
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  background: var(--accent);
  color: #072033;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-quiet {
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid #3a5068;
  background: #152131;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}
.btn-quiet:hover:not(:disabled) {
  color: var(--text);
  border-color: #52708d;
}

.error { color: var(--bad); margin: 0 0 12px; }
.field-label {
  margin: 4px 0 8px;
  font-weight: 700;
}
.progress {
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.lang-grid label.check { margin: 0; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  margin: 0 0 10px;
  cursor: pointer;
}
.check input { margin-top: 3px; flex: 0 0 auto; }
.check.inline {
  align-items: center;
  margin: 0;
  white-space: nowrap;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #1b3348;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.mute { color: var(--muted); background: #1a2430; }
.badge.warn { color: #3a2a00; background: var(--warn); }

.question {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
}
.question-en, .lead-fact {
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.4;
}
.kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: #6f8499;
}
.answer-box {
  background: var(--panel-2);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.answer-box strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.lead-wrap {
  color: var(--muted);
  font-size: 0.92rem;
}
.lead-wrap p {
  white-space: pre-wrap;
  line-height: 1.45;
  margin: 8px 0 0;
}
.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.stat {
  background: var(--panel);
  border: 1px solid #314358;
  border-radius: 10px;
  padding: 10px 12px;
}
.stat .n { display: block; font-size: 1.15rem; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 0.78rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
}
.filters label { margin: 0; min-width: 9rem; flex: 1 1 9rem; }

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid #314358;
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid #243445;
}
th { color: var(--muted); font-weight: 700; }
tr.disagree td { background: #2a1d12; }
.qid { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
.pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.pill.ok { background: #123a28; color: var(--ok); }
.pill.rewrite { background: #3a2e12; color: var(--warn); }
.pill.reject { background: #3a151c; color: var(--bad); }
.checks { color: var(--muted); white-space: nowrap; }
.comment { max-width: 18rem; white-space: pre-wrap; }

@media (max-width: 700px) {
  .question { font-size: 1.1rem; }
}
