:root {
  --bg: #f4eee5;
  --ink: #1f2933;
  --muted: #52606d;
  --card: rgba(255, 252, 248, 0.96);
  --accent: #b96a35;
  --accent-dark: #8a4f28;
  --line: rgba(82, 96, 109, 0.18);
  --success: #1f7a4c;
  --error: #b83232;
  --shadow: 0 24px 80px rgba(31, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(185, 106, 53, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(64, 145, 108, 0.12), transparent 28%),
    linear-gradient(160deg, #f7f2ea 0%, #eee3d2 55%, #eef4f6 100%);
}

.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 0.95;
}

.hero p {
  margin-top: 14px;
  color: var(--muted);
  max-width: 72ch;
  font-size: 1rem;
}

.layout {
  display: grid;
  gap: 24px;
  grid-template-columns: 300px minmax(0, 1fr);
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 26px;
  backdrop-filter: blur(10px);
}

.intro-card {
  margin-top: 24px;
}

.intro-text {
  margin: 0;
  line-height: 1.65;
}

.summary-grid {
  display: grid;
  gap: 14px;
}

.summary-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.summary-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.summary-value {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}

.section-block {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.section-block:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(185, 106, 53, 0.2);
  display: grid;
  place-items: center;
  background: rgba(185, 106, 53, 0.08);
  color: var(--accent-dark);
  font-size: 1.3rem;
}

.section-heading {
  margin: 0;
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-wide {
  grid-column: 1 / -1;
}

.question-grid {
  display: grid;
  gap: 18px;
}

label,
.rating-question {
  display: block;
}

label span,
.rating-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.rating-question {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.rating-title {
  margin: 0;
  line-height: 1.5;
}

input[type="date"],
input[type="text"],
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.star-row {
  display: inline-flex;
  gap: 6px;
  flex-direction: row-reverse;
}

.star-row input {
  display: none;
}

.star-row label {
  cursor: pointer;
  font-size: 1.8rem;
  color: #d2d8dd;
  transition: color 0.2s ease, transform 0.2s ease;
}

.star-row label:hover,
.star-row label:hover ~ label,
.star-row input:checked ~ label {
  color: #f4b83f;
}

.star-row label:hover {
  transform: translateY(-1px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}

button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #d38945 100%);
  color: white;
  font: inherit;
  font-weight: 700;
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(185, 106, 53, 0.24);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

#form-status {
  margin: 0;
  color: var(--muted);
}

#form-status.success {
  color: var(--success);
}

#form-status.error {
  color: var(--error);
}

.completion-state {
  text-align: center;
  padding: 36px 28px;
  border: 1px solid rgba(31, 122, 76, 0.18);
  border-radius: 24px;
  background: rgba(31, 122, 76, 0.08);
}

.completion-state h2 {
  margin: 0 0 10px;
}

.completion-state p {
  margin: 0;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 51, 0.55);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 10;
}

.modal-card {
  width: min(460px, 100%);
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.modal-card h2 {
  margin-top: 0;
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}
