:root {
  --bg: #f6f1e8;
  --ink: #1f2933;
  --muted: #657283;
  --card: #fffdf8;
  --accent: #b91c1c;
  --accent-dark: #7f1d1d;
  --line: #e5dccb;
  --good: #166534;
  --warn: #92400e;
  --bad: #991b1b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
  border-bottom: 1px solid var(--line);
}
.eyebrow { text-transform: uppercase; letter-spacing: .08em; color: var(--accent-dark); font-weight: 700; font-size: .82rem; }
h1 { margin: .2rem 0; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; }
.lead { max-width: 62rem; font-size: 1.1rem; color: #3f4b5a; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem) 2rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(31, 41, 51, .06);
}
section + section { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); }
h2 { margin: 0 0 .8rem; font-size: 1.15rem; }
.grid { display: grid; gap: .9rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label, legend { font-weight: 700; color: #2c3846; }
input, textarea {
  width: 100%;
  margin-top: .35rem;
  border: 1px solid #d5cbb9;
  border-radius: 12px;
  padding: .75rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 105px; resize: vertical; }
.hint { color: var(--muted); font-size: .92rem; margin-bottom: 0; }
.checks { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; display: grid; gap: .55rem; margin-bottom: .9rem; }
.checks label, .radioRow label { font-weight: 600; }
.checks input, .radioRow input { width: auto; margin-right: .45rem; }
.radioRow { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.buttons { display: flex; gap: .7rem; flex-wrap: wrap; }
button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: .8rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--accent-dark); }
button.secondary { background: #6b7280; }
.outputPanel { position: sticky; top: 1rem; align-self: start; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #f9fafb;
  border-radius: 14px;
  padding: 1rem;
  min-height: 70vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
footer { padding: 0 clamp(1rem, 4vw, 3rem) 2rem; color: var(--muted); }
@media (max-width: 900px) {
  .hero, .layout { grid-template-columns: 1fr; display: block; }
  .hero { display: block; }
  .hero button { margin-top: 1rem; }
  .grid.two { grid-template-columns: 1fr; }
  .outputPanel { position: static; margin-top: 1rem; }
}
@media print {
  body { background: #fff; }
  .hero, form, footer { display: none; }
  .layout { display: block; padding: 0; }
  .card { border: 0; box-shadow: none; }
  pre { color: #111; background: #fff; min-height: auto; font-size: 11pt; }
}
