/* dibz.ca/sell/ and /buy-with-an-agent/: the lead forms (build.mjs leadForm, assets/lead-form.js).
   On top of site.css and blog.css; follows the visitor's light / dark theme through site.css's tokens. */
.lead-page { --lf-red: #be123c; --lf-field: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lead-page { --lf-red: #fb7185; --lf-field: #0b1729; } }
:root[data-theme="dark"] .lead-page { --lf-red: #fb7185; --lf-field: #0b1729; }

.lead-page .post-head { max-width: 1080px; }
.lead-page .post-head h1, .lead-page .post-head .lede { max-width: 820px; }
.lead-wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 32px; max-width: 1080px; }
@media (max-width: 900px) { .lead-wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 24px; } }

.lead-form, .lead-done { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
@media (max-width: 600px) { .lead-form, .lead-done { padding: 20px 16px; border-radius: 18px; } }
.lf-title { font-size: 24px; margin-bottom: 18px; }
.lf-row { margin-top: 14px; }
.lf-title + .lf-row { margin-top: 0; }
.lf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .lf-two { grid-template-columns: 1fr; } }
.lf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lf-field > span, .lf-choice legend { font-size: 15px; font-weight: 650; color: var(--text); }
.lf-opt { font-weight: 500; color: var(--muted); }
.lf-field input, .lf-field select, .lf-field textarea {
  width: 100%; min-width: 0; font: 16px/1.4 var(--font); color: var(--text); background: var(--lf-field);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.lf-field input, .lf-field select { height: 50px; }
.lf-field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.lf-field textarea { resize: vertical; min-height: 96px; }
.lf-field input::placeholder, .lf-field textarea::placeholder { color: var(--muted); opacity: .8; }
.lf-field input:focus, .lf-field select:focus, .lf-field textarea:focus, .lf-seg input:focus-visible + span {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.lf-field [aria-invalid="true"] { border-color: var(--lf-red); }

.lf-choice { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.lf-choice legend { padding: 0; margin-bottom: 8px; }
.lf-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-seg label { position: relative; }
.lf-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lf-seg span { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--lf-field); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s; }
.lf-seg input:checked + span { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--navy); }

.lf-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.lf-consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: 14.5px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.lf-consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.lf-consent a { text-decoration: underline; }
.lf-consent.lf-bad .lf-consent-text { color: var(--lf-red); }

.lf-error { margin-top: 16px; color: var(--lf-red); font-weight: 600; font-size: 15px; }
.lf-send { margin-top: 18px; width: 100%; }
.lf-send[disabled] { opacity: .6; cursor: progress; }
.lf-note { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }
.lf-note strong { color: var(--text); }

.lead-done h2 { font-size: 26px; }
.lead-done p { margin-top: 12px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.lead-done:focus { outline: none; }

.lead-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.lead-side h2 { font-size: 20px; }
.lead-side ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 10px; color: var(--text); font-size: 16px; line-height: 1.5; }
.lead-call { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.lead-call a { font-weight: 700; }
