:root {
  --bg: #f6f3ed;
  --panel: #fffdf8;
  --ink: #202124;
  --muted: #5c6470;
  --brand: #b82032;
  --brand-dark: #7d1422;
  --accent: #0f766e;
  --line: #e4ded2;
  --shadow: 0 18px 45px rgba(48, 36, 16, .10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff 0, var(--bg) 38rem);
  line-height: 1.5;
}
header {
  padding: 3rem 1rem 2rem;
  background: linear-gradient(135deg, #821525, #c53142 60%, #e7ad52);
  color: white;
}
header > div, main { max-width: 1100px; margin: 0 auto; }
h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1; margin: .2rem 0 1rem; }
h2 { margin-top: 0; font-size: 1.2rem; }
.lead { max-width: 760px; font-size: 1.15rem; opacity: .95; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .82rem; opacity: .9; }
main { padding: 1.2rem; }
.panel, .note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.35rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: .35rem; font-weight: 700; color: #2b2f33; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d6cfc1;
  border-radius: 13px;
  padding: .8rem .9rem;
  font: inherit;
  color: var(--ink);
  background: white;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15, 118, 110, .22); border-color: var(--accent); }
.full { margin-top: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.chips button, .actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .7rem 1rem;
  background: white;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.chips button.active { background: #e7f7f4; border-color: var(--accent); color: #075e57; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.actions button.primary { background: var(--brand); color: white; border-color: var(--brand); }
.actions button.primary:hover { background: var(--brand-dark); }
.actions button.ghost { color: var(--muted); }
.output-panel textarea { min-height: 19rem; background: #fff; }
#status { min-height: 1.5rem; color: var(--accent); font-weight: 700; }
.note { border-left: 8px solid var(--accent); }
footer { text-align: center; padding: 2rem 1rem 3rem; color: var(--muted); }
@media (max-width: 850px) {
  .grid, .grid.two { grid-template-columns: 1fr; }
  header { padding-top: 2rem; }
}
@media print {
  body { background: white; }
  header, .actions, footer { display: none; }
  .panel, .note { box-shadow: none; border: 1px solid #bbb; }
}
