:root {
  --bg: #f4f1ea;
  --ink: #1f2933;
  --muted: #5b6472;
  --card: #ffffff;
  --accent: #b8323a;
  --accent-dark: #8d2229;
  --line: #ded8cd;
  --good: #1f7a5c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.hero {
  padding: 48px min(6vw, 72px) 32px;
  background: linear-gradient(135deg, #fff 0%, #f7dfd2 100%);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: .78rem;
}

h1 { max-width: 980px; margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.02; }
.hero p:not(.eyebrow) { max-width: 780px; font-size: 1.12rem; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.08fr) minmax(320px, .92fr);
  gap: 24px;
  padding: 28px min(6vw, 72px);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(31, 41, 51, .07);
}

h2 { margin: 8px 0 14px; font-size: 1.22rem; }
h3 { margin-top: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid.small { grid-template-columns: 1fr; }
label { display: grid; gap: 6px; font-weight: 700; color: #29313d; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cfc8bc;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fffefa;
  color: var(--ink);
}
textarea { resize: vertical; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips label, .grid.small label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
  font-weight: 650;
}
.chips input, .grid.small input { width: auto; margin-top: 4px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  background: var(--accent);
  color: white;
}
button.secondary { background: var(--good); }
button.ghost { background: #ece6dc; color: var(--ink); }
button:hover { filter: brightness(.96); }

#resultat { min-height: 420px; background: #fffef8; }
.rubrica {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: #edf7f2;
  border: 1px solid #bee2d2;
}
.rubrica ul { margin-bottom: 0; padding-left: 20px; }
footer { padding: 8px min(6vw, 72px) 36px; color: var(--muted); }

@media (max-width: 900px) {
  .layout, .grid, .chips { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
}
