:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7f;
  --primary: #1f5c99;
  --primary-dark: #164673;
  --accent: #2d8f6f;
  --border: #d8e1ec;
  --error: #b42318;
  --success: #067647;
  --shadow: 0 10px 30px rgba(26, 35, 50, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #eef4fb 0%, var(--bg) 220px);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand strong {
  font-size: 1.15rem;
}

.brand span {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.lang-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.lang-link:hover,
.lang-link.active {
  color: var(--primary);
  text-decoration: none;
}

.lang-sep {
  color: var(--border);
  font-size: 0.85rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h1,
.card h2,
.card h3 {
  margin-top: 0;
}

.intro-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.intro-list li + li {
  margin-top: 0.35rem;
}

.badge {
  display: inline-block;
  background: #e8f3ee;
  color: var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.domain-card {
  border-left: 4px solid var(--primary);
}

.domain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.domain-header h3 {
  margin: 0;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field small {
  display: block;
  color: var(--muted);
  margin-top: 0.25rem;
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fbfcfe;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.importance-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.importance-value {
  min-width: 2.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #edf2f8;
  color: var(--text);
}

.btn-danger {
  background: #fdecec;
  color: var(--error);
}

.flash {
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.flash-success {
  background: #ecfdf3;
  color: var(--success);
  border: 1px solid #abefc6;
}

.flash-error {
  background: #fef3f2;
  color: var(--error);
  border: 1px solid #fecdca;
}

.anon-note {
  background: #f8fbff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  color: var(--muted);
}

.response-item + .response-item {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.response-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.admin-grid {
  display: grid;
  gap: 1rem;
}

.submission {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: #fbfcfe;
}

.submission pre {
  white-space: pre-wrap;
  margin: 0.35rem 0 0;
  font-family: inherit;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 2rem;
}

@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .importance-row {
    grid-template-columns: 1fr;
  }
}
