:root {
  --plum: #681d55;
  --pink: #de7292;
  --ink: #222;
  --muted: #6b6b6b;
  --line: #2b2b2b;
  --soft: #c9c2c7;
  --error: #b3261e;
  --page: #f6f1ee;
  --card: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "David Libre", David, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
}
.sheet {
  max-width: 820px;
  margin: 24px auto;
  background: var(--card);
  box-shadow: 0 2px 18px rgba(60, 20, 50, .08);
  padding: 28px 20px 0;
}
header.top { display: flex; justify-content: flex-start; }
header.top img { width: min(320px, 78%); height: auto; display: block; }
.title { text-align: center; color: var(--plum); font-size: 28px; font-weight: 700; margin: 18px 0 0; }
.intro { margin: 14px 0 6px; color: var(--muted); font-size: 17px; }

.date-row { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin: 22px 0 18px; font-size: 20px; }
.date-row output { min-width: 150px; border-bottom: 1px solid var(--line); text-align: center; padding: 0 6px; }

/* tables (desktop look of the printed form) */
.grid { width: 100%; border: 1px solid var(--line); margin-top: 14px; }
.grid .row { display: grid; border-top: 1px solid var(--line); }
.grid .row:first-child { border-top: 0; }
.grid .row[hidden] { display: none; }
.grid .cell { border-inline-start: 1px solid var(--line); padding: 6px 8px; min-width: 0; }
.grid .cell:first-of-type { border-inline-start: 0; }
.grid .head .cell { font-size: 17px; }
.cell .lbl { display: none; }
.row-title { display: none; }

input, select, textarea {
  font: inherit; font-size: 17px; color: var(--ink);
  width: 100%; border: 0; background: transparent; padding: 4px 2px;
  border-radius: 4px; min-height: 44px;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pink); outline-offset: 1px; background: #fdf6f8; }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: 12px 52%, 7px 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 20px; }
select.empty { color: var(--muted); }

.section-title { text-align: center; font-size: 22px; margin: 40px 0 0; }
.section-title.start { text-align: start; }
.q { margin: 30px 0 0; }
.q .qt { display: block; text-align: center; font-size: 21px; margin-bottom: 8px; }
.q .hint { display: block; text-align: center; color: var(--muted); font-size: 16px; margin: -6px 0 8px; }
.q textarea { border: 1px solid var(--soft); border-radius: 10px; padding: 10px 12px; min-height: 150px; line-height: 32px; background:
  repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #eee6ea 31px, #eee6ea 32px); background-attachment: local; }
.q input, .q select { border-bottom: 1px solid var(--soft); border-radius: 0; }
.q .choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.q .choices label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.q .choices input { width: 20px; height: 20px; min-height: 0; accent-color: var(--plum); }

.add-row { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font: inherit; font-size: 17px; color: var(--plum); background: none; border: 1px dashed var(--plum); border-radius: 22px; padding: 4px 16px; cursor: pointer; }
.add-row[hidden] { display: none; }

.req { color: var(--pink); }
.invalid { background: #fdecec !important; }
.page-break { border: 0; height: 0; margin: 46px 0 0; }

.actions { text-align: center; margin: 40px 0 10px; }
.actions[hidden] { display: none; }
.submit { font: inherit; font-size: 21px; color: #fff; background: var(--plum); border: 0; border-radius: 30px;
  padding: 10px 46px; min-height: 52px; cursor: pointer; box-shadow: 0 3px 10px rgba(104,29,85,.25); }
.submit:hover { filter: brightness(1.1); }
.submit[disabled] { opacity: .6; cursor: default; }
.form-error { color: var(--error); margin-top: 12px; }
.privacy { color: var(--muted); font-size: 14px; text-align: center; margin: 14px auto 0; max-width: 520px; }

footer.bottom { margin: 34px -20px 0; }
footer.bottom img { width: 100%; height: auto; display: block; }

.thanks { text-align: center; padding: 40px 10px 10px; }
.thanks[hidden] { display: none; }
.thanks h2 { color: var(--plum); font-size: 30px; margin: 0 0 8px; }
.thanks p { margin: 6px 0; }
.print-btn { margin-top: 18px; font: inherit; font-size: 18px; color: var(--plum); background: #fff; border: 1px solid var(--plum); border-radius: 26px; padding: 6px 26px; min-height: 44px; cursor: pointer; }
input:disabled, select:disabled, textarea:disabled { color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }

/* phones: tables turn into cards */
@media (max-width: 639px) {
  body { font-size: 17px; }
  .sheet { margin: 0; box-shadow: none; padding: 20px 16px 0; }
  footer.bottom { margin: 30px -16px 0; }
  .grid { border: 0; margin-top: 0; }
  .grid .row.head { display: none; }
  .grid .row { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; margin-top: 14px; }
  .grid .row:first-child { border-top: 1px solid var(--line); }
  .grid .cell { border: 0; padding: 4px 0; }
  .cell .lbl { display: block; font-size: 15px; color: var(--muted); }
  .cell input, .cell select, .cell textarea { border-bottom: 1px solid var(--soft); border-radius: 0; }
  .row-title { display: block; font-weight: 700; color: var(--plum); }
  .q .qt { font-size: 19px; }
}

@media print {
  body { background: #fff; }
  .sheet { box-shadow: none; margin: 0; max-width: none; }
  .actions, .add-row, .privacy, .print-btn, .intro, .thanks { display: none !important; }
  .row[hidden] { display: none !important; }
  .q textarea { border-color: #999; }
}
