* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f4f7f5;
  color: #202421;
  line-height: 1.75;
  font-size: 18px;
}

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

.card {
  background: #fff;
  border: 1px solid #dfe8e1;
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 10px 28px rgba(31, 55, 39, 0.06);
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

h1, h2, h3 {
  margin: 0 0 12px;
  line-height: 1.35;
}

h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }

.desc, .note {
  color: #657168;
  font-size: 16px;
}

.required-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff1ee;
  color: #a33a32;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}

.inline-banner {
  background: #fff6f3;
  border: 1px solid #e2a39c;
  color: #8f2f28;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 18px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cfdacf;
  border-radius: 8px;
  font-size: 18px;
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.field-error,
.question-error {
  border-color: #c64b42 !important;
  box-shadow: 0 0 0 3px rgba(198, 75, 66, 0.12);
}

.question-error {
  background: #fffaf8;
}

.section-title {
  padding-bottom: 10px;
  border-bottom: 2px solid #edf3ee;
  margin-bottom: 16px;
}

.question {
  border: 1px solid #e1eadf;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fbfdfb;
}

.question-title {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 20px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option,
.checkbox-item {
  border: 1px solid #d6e1d5;
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 500;
  font-size: 18px;
}

.option input,
.checkbox-item input {
  margin-right: 8px;
  transform: scale(1.18);
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  background: #236d3f;
  color: white;
  padding: 13px 20px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}

.btn.secondary {
  background: #eaf2ec;
  color: #1d6338;
}

.btn.danger {
  background: #a33a32;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden { display: none !important; }

.warn {
  color: #a33a32;
  font-size: 16px;
  margin-top: 8px;
}

.success {
  color: #236d3f;
  font-size: 16px;
  margin-top: 8px;
}

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eaf2ec;
  color: #1d6338;
  margin-right: 8px;
  margin-bottom: 8px;
  font-size: 16px;
}

.highlight {
  font-size: 22px;
  font-weight: 800;
  color: #236d3f;
}

.subtle-box {
  background: #f7faf7;
  border: 1px solid #e1eadf;
  border-radius: 8px;
  padding: 14px;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e9efe8;
  font-size: 15px;
  vertical-align: top;
}

th { background: #f7faf7; }

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  border: 1px solid #e1eadf;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfb;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #236d3f;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 15px;
}

.bar {
  height: 12px;
  background: #e4ebe3;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: #236d3f;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 20, 0.42);
  padding: 24px;
  overflow: auto;
}

.modal .card {
  max-width: 980px;
  margin: 24px auto;
}

@media (max-width: 900px) {
  body { font-size: 19px; }
  h1 { font-size: 28px; }
  .grid, .grid-3, .checkbox-group, .stat-grid {
    grid-template-columns: 1fr;
  }
  .container {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }
  .card {
    padding: 16px;
  }
}
