/* Lead capture and thank-you pages — settledivorce.co.uk */

/* The site is a light-themed brand. Pin the scheme so form controls and the page
   ground stay legible when the visitor's OS is set to dark. Safe to drop once the
   scaffold (#1) sets these globally. Token names deliberately match the ones the
   fair-split calculator (#3) is using, so the two merge without a repaint. */
:root { color-scheme: light; }
html, body {
  background: #ffffff;
  color: #1c2523;
  margin: 0;
}

:root {
  --sd-brand: #2f6f5e;
  --sd-brand-dark: #235345;
  --sd-brand-light: #e8f1ee;
  --sd-brand-mid: #b7d3c9;
  --sd-accent: #b4562f;
  --sd-ink: #1c2523;
  --sd-ink-soft: #4d5a56;
  --sd-line: #d5ded9;
  --sd-bg: #ffffff;
  --sd-bg-soft: #f6f9f7;
  --sd-error: #a32c1c;
  --sd-radius: 10px;
}

.sd {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem var(--page-gutter, 1rem) 3rem;
  color: var(--sd-ink);
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.sd h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 .5rem; }
.sd h2 { font-size: 1.25rem; line-height: 1.3; margin: 2.25rem 0 .75rem; }
.sd p { margin: 0 0 1rem; }
.sd__lede { font-size: 1.075rem; color: var(--sd-ink-soft); }
.sd a { color: var(--sd-brand-dark); }
.sd :focus-visible {
  outline: 3px solid var(--sd-brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.sd__what {
  margin: 0 0 1.75rem;
  padding-left: 1.15rem;
}
.sd__what li { margin: 0 0 .4rem; }

/* Disclaimer ---------------------------------------------------------- */
.sd-disclaimer {
  border: 2px solid var(--sd-brand);
  border-left-width: 6px;
  background: var(--sd-brand-light);
  border-radius: var(--sd-radius);
  padding: .9rem 1rem;
  margin: 2.5rem 0 0;
}
.sd-disclaimer p { margin: 0; font-size: .95rem; }
.sd-disclaimer strong { display: block; margin-bottom: .2rem; }

/* Form ---------------------------------------------------------------- */
.sd-lead {
  border: 1px solid var(--sd-line);
  border-radius: var(--sd-radius);
  background: var(--sd-bg-soft);
  padding: 1.25rem 1rem 1.35rem;
  margin: 0 0 1.5rem;
}
.sd-lead__legend {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0;
  margin: 0 0 .9rem;
}
.sd-lead__field { margin: 0 0 .9rem; }
.sd-lead__field label {
  display: block;
  font-weight: 600;
  font-size: .95rem;
  margin: 0 0 .3rem;
}
.sd-lead__field input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--sd-ink);
  background: var(--sd-bg);
  border: 1px solid var(--sd-line);
  border-radius: 8px;
  padding: .6rem .7rem;
  min-height: 44px;
}
.sd-lead__field input:focus { border-color: var(--sd-brand); }
.sd-lead__field input[aria-invalid="true"] { border-color: var(--sd-error); }

.sd-lead__consent {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .92rem;
  color: var(--sd-ink-soft);
  margin: 0 0 1.1rem;
  cursor: pointer;
}
.sd-lead__consent input {
  margin: .2rem 0 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--sd-brand);
  flex: 0 0 auto;
}

.sd-lead__button {
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--sd-brand);
  border: 0;
  border-radius: 8px;
  padding: .7rem 1.2rem;
  min-height: 44px;
  cursor: pointer;
}
.sd-lead__button:hover { background: var(--sd-brand-dark); }
.sd-lead__button[disabled] { opacity: .65; cursor: progress; }

.sd-lead__status { margin: .8rem 0 0; font-size: .95rem; min-height: 1.5rem; }
.sd-lead__status--error { color: var(--sd-error); font-weight: 600; }

.sd-lead__privacy { margin: .9rem 0 0; font-size: .85rem; color: var(--sd-ink-soft); }

/* Honeypot. Off-screen rather than display:none, because some bots skip fields
   that are display:none but still fill fields they can find in the DOM. */
.sd-lead__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Thank-you page ------------------------------------------------------ */
.sd-confirm {
  border: 2px solid var(--sd-brand);
  border-radius: var(--sd-radius);
  background: var(--sd-brand-light);
  padding: 1.25rem 1.15rem;
  margin: 0 0 1.75rem;
}
.sd-confirm h1 { margin-bottom: .35rem; }
.sd-confirm p:last-child { margin-bottom: 0; }

/* Qualified with `.sd` so it beats the `.sd a` link colour above, which would
   otherwise paint dark green text onto the dark green button. */
.sd a.sd-download {
  display: inline-block;
  font-weight: 600;
  color: #ffffff;
  background: var(--sd-brand);
  border-radius: 8px;
  padding: .8rem 1.3rem;
  min-height: 44px;
  text-decoration: none;
  margin: .25rem 0 .75rem;
}
.sd a.sd-download:hover { background: var(--sd-brand-dark); color: #ffffff; }
.sd-download__meta { font-size: .85rem; color: var(--sd-ink-soft); margin: 0 0 1.75rem; }

.sd-next { padding-left: 1.15rem; }
.sd-next li { margin: 0 0 .5rem; }
