:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #222222;
  --muted: #666666;
  --line: #dddddd;
  --primary: #1f5faa;
  --primary-dark: #17477f;
  --accent: #eef5ff;
  --danger: #b00020;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.site-header {
  background: linear-gradient(135deg, #1f5faa, #3f7fc4);
  color: #ffffff;
  padding: 32px 0;
  margin-bottom: 28px;
}

.site-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.site-header p {
  margin: 0;
  opacity: 0.95;
}

.container {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.wide-container {
  width: min(1280px, calc(100% - 32px));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.card h2 {
  margin-top: 0;
  font-size: 22px;
}

.step-card {
  border-left: 8px solid var(--primary);
}

.step-label {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
}

.steps-list li {
  margin-bottom: 6px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.task-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.task-card h3 {
  margin: 0 0 6px;
  color: var(--primary);
}

.task-title {
  font-weight: 700;
}

.form-row {
  margin-bottom: 18px;
}

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

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid #cccccc;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #ffffff;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(31, 95, 170, 0.2);
  border-color: var(--primary);
}

.keyword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.template-box {
  background: #f4f8ff;
  border: 1px solid #cfe1fb;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.template-box pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 8px 0 0;
}

.button-row,
.submit-area,
.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  background: #e9eef7;
  color: #163b63;
}

.secondary-button:hover {
  background: #d8e2f0;
}

.link-button {
  text-align: center;
}

.checklist label {
  display: block;
  font-weight: 500;
  margin: 10px 0;
  padding: 10px;
  background: #fafafa;
  border: 1px solid #eeeeee;
  border-radius: 8px;
}

.checklist input {
  margin-right: 8px;
}

.scale-row {
  margin-bottom: 22px;
}

.scale-row input[type="range"] {
  width: min(480px, 100%);
  display: inline-block;
  vertical-align: middle;
}

.scale-row span {
  display: inline-block;
  min-width: 32px;
  font-weight: 700;
  color: var(--primary);
}

.small-note {
  font-size: 14px;
  color: var(--muted);
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border: 1px solid #dddddd;
  padding: 8px;
  vertical-align: top;
}

th {
  background: #eef3fa;
  white-space: nowrap;
}

.paragraph-cell {
  min-width: 320px;
}

@media (max-width: 640px) {
  .site-header {
    padding: 24px 0;
  }

  .site-header h1 {
    font-size: 24px;
  }

  .card {
    padding: 18px;
  }
}
