:root {
  --ink: #10231f;
  --paper: #f4f7f6;
  --card: #ffffff;
  --line: #dbe4e1;
  --teal: #0f5f57;
  --teal-dark: #0a453f;
  --accent: #d97b3f;
  --muted: #5c6b67;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-header {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #eaf3f1;
  padding: 3rem 0 2.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #b7d9d3;
  margin: 0 0 0.5rem;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.9rem;
}

.subtitle {
  margin: 0 0 1rem;
  color: #cfe6e2;
  font-weight: 500;
}

.intro {
  color: #dcece9;
  max-width: 62ch;
  font-size: 0.95rem;
}

.intro-small {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: -0.5rem;
}

main.wrap {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--teal-dark);
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.6rem;
}

.scale-legend {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: -0.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  gap: 0.35rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"], input[type="date"], textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfc;
  color: var(--ink);
}

textarea { resize: vertical; }

.block-label {
  margin-top: 1.25rem;
}

/* Rating rows (agree/disagree style) */
.rating-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 0.75rem; }

.rating-row {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.rating-text {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.rating-option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
  flex-direction: row;
}

.rating-option input { accent-color: var(--teal); }

/* Matrix rows (Content / Delivery / Faculty / Usefulness) */
.matrix-list { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 0.75rem; }

.matrix-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: #fbfdfc;
}

.matrix-title {
  margin: 0 0 0.6rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--teal-dark);
}

.matrix-dims {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 1.5rem;
}

.matrix-dim-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.matrix-dim-options { display: flex; gap: 0.5rem; }

.matrix-radio {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  flex-direction: row;
}

.matrix-radio input { accent-color: var(--accent); }

/* Pill-style choices for single/multi select */
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pill-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink);
  background: #fbfdfc;
}

.pill-option input { accent-color: var(--teal); }

fieldset {
  border: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

legend {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
}

.submit-row {
  text-align: center;
  padding: 1rem 0 2rem;
}

#submit-btn {
  background: var(--teal);
  color: white;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

#submit-btn:hover { background: var(--teal-dark); }
#submit-btn:disabled { opacity: 0.6; cursor: default; }

.submit-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.submit-status.success { color: var(--teal-dark); font-weight: 600; }
.submit-status.error { color: #b3261e; font-weight: 600; }

.page-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding-bottom: 2.5rem;
}

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .matrix-dims { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.5rem; }
}
