:root {
  --accent: oklch(54% 0.12 38);
  --ink: oklch(24% 0.02 55);
  --ink-soft: oklch(38% 0.02 55);
  --ink-mute: oklch(45% 0.02 55);
  --line: oklch(85% 0.015 60);
  --page-bg: #ece8dd;
  --sheet-bg: #fff;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  font-family: var(--sans);
  padding: 48px 20px;
}

a { color: var(--accent); }

.sheet {
  max-width: 820px;
  margin: 0 auto;
  background: var(--sheet-bg);
  box-shadow: 0 2px 14px rgba(20, 20, 19, 0.12);
  border-radius: 2px;
  padding: 56px;
}

h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.15;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

.divider {
  width: 56px;
  height: 2px;
  background: var(--accent);
  margin: 0 0 26px;
}

.intro-p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 12px;
}

/* Contents (table of contents) */
.toc { margin: 6px 0 56px; }

.toc-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px;
}

.toc-link {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.toc-link:hover { color: var(--accent); }

.toc-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  width: 24px;
  flex: none;
}

.toc-link span:last-child { font-size: 15px; flex: 1; }

/* Sections */
.doc-section { margin: 0 0 54px; }
.doc-section:last-child { margin-bottom: 0; }

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 22px;
}

.section-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex: none;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-note {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-mute);
  margin: -8px 0 22px;
}

/* Questions */
.question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin: 0 0 26px;
}

.question { flex: 1; min-width: 230px; }

.question-prompt {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 11px;
}

.choices-row {
  display: flex;
  flex-wrap: wrap;
  column-gap: 22px;
  row-gap: 10px;
  font-size: 14.5px;
  color: var(--ink);
}

.fields-row {
  display: flex;
  flex-wrap: wrap;
  column-gap: 30px;
  row-gap: 10px;
  font-size: 14.5px;
  color: var(--ink);
}

.fields-row.extra-fields {
  column-gap: 28px;
  margin-top: 12px;
}

.field {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.blank-line {
  display: inline-block;
  border-bottom: 1px solid var(--line);
  height: 1.2em;
}

.blank-line.full {
  width: 100%;
}

.note {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-mute);
  margin: 8px 0 0;
}

/* ---- Interactive form controls ---- */

/* Inline "answer line" inputs (text / fields / other) — look like the blank
   underlines of the print version, but are real inputs. */
.line-input {
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  padding: 1px 2px 3px;
  outline: none;
  transition: border-color 0.15s;
}
.line-input.full { width: 100%; }
.line-input:focus { border-bottom-color: var(--accent); border-bottom-width: 1.5px; }
.line-input::placeholder { color: color-mix(in srgb, var(--ink-mute) 60%, transparent); }

.suffix { font-size: 14.5px; color: var(--ink); }

/* Checkbox choices */
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  line-height: 1.35;
}
.choice input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  border: 1.5px solid var(--ink-mute);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.12s, background 0.12s;
}
.choice input[type="checkbox"]:hover { border-color: var(--accent); }
.choice input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.choice input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.choice input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.other-choice { gap: 8px; }
.other-choice > span { color: var(--ink); }

/* Contact block */
.contact-block {
  margin: 6px 0 40px;
  padding: 22px 24px;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 8px;
}
.contact-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.contact-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 220px;
}
.contact-field > span { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.contact-field > span em { font-style: normal; font-weight: 400; color: var(--ink-mute); }
.contact-field input {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet-bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.contact-field input.invalid {
  border-color: oklch(55% 0.19 25);
  box-shadow: 0 0 0 3px color-mix(in srgb, oklch(55% 0.19 25) 16%, transparent);
}
.contact-error {
  margin-top: 12px;
  font-size: 13.5px;
  color: oklch(48% 0.19 25);
}

/* Closing free-text */
.free-text {
  width: 100%;
  max-width: 680px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet-bg);
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.free-text:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Submit */
.submit-row {
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.submit-btn {
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 7px;
  padding: 13px 26px;
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}
.submit-btn:hover { filter: brightness(1.06); }
.submit-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.submit-btn:disabled { opacity: 0.6; cursor: default; }
.submit-error {
  margin-top: 14px;
  font-size: 14px;
  color: oklch(48% 0.19 25);
}

/* Download printable-PDF callout */
.download-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0 32px;
  padding: 18px 22px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.download-callout-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 240px; }
.download-callout-text strong { font-size: 14.5px; color: var(--ink); }
.download-callout-text span { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.download-callout-action { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.download-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--sheet-bg);
  border: 1.5px solid var(--accent);
  border-radius: 7px;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.download-btn:hover { background: var(--accent); color: #fff; }
.download-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.download-btn:disabled { opacity: 0.6; cursor: default; }
.download-error { font-size: 12.5px; color: oklch(48% 0.19 25); }

/* Inspiration section */
.inspiration .insp-group { margin: 0 0 26px; }
.insp-subtitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 12px;
}
.insp-hint { font-size: 13px; color: var(--ink-mute); margin: 0 0 12px; }
.insp-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.insp-link-row .insp-link-url { flex: 1; min-width: 200px; }
.insp-link-row .insp-link-note { flex: 1.3; min-width: 200px; }
.insp-link-row .line-input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet-bg);
  padding: 8px 11px;
  font-size: 14px;
}
.insp-link-row .line-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.insp-remove {
  font: inherit;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-mute);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  flex: none;
}
.insp-remove:hover { color: oklch(48% 0.19 25); background: color-mix(in srgb, oklch(55% 0.19 25) 10%, transparent); }
.insp-add {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}
.insp-add:hover { text-decoration: underline; }
.insp-drop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.insp-drop:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.insp-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.insp-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insp-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.insp-thumb .insp-caption {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet-bg);
  padding: 6px 9px;
  font-size: 13px;
}
.insp-thumb .insp-caption:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.insp-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.insp-imgerror { font-size: 13px; color: oklch(48% 0.19 25); margin-top: 12px; }

/* Thank-you panel */
.thank-you { text-align: center; padding: 40px 0 20px; }
.thank-you h1 { margin-bottom: 14px; }
.thank-you p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  body { padding: 20px 12px; }
  .sheet { padding: 28px 22px; }
  h1 { font-size: 28px; }
  .question-row { gap: 20px; }
  .contact-block { padding: 18px 16px; }
}

@media print {
  @page { size: A4; margin: 0.75in; }
  body { background: none; padding: 0; }
  .sheet { max-width: none; box-shadow: none; border-radius: 0; padding: 0; }
  .doc-section, .question, figure, table { break-inside: avoid; }
  h1, h2 { break-after: avoid; }
  .submit-row, .contact-error, .submit-error, .download-callout { display: none; }
}
