/* RPKreative real estate intake. The look is carried over from the earlier form:
   ink, paper and orange, Inter, square-ish corners, chips and package cards. */
:root {
  --ink: #0b0b0b;
  --paper: #f7f6f2;
  --card: #fff;
  --orange: #f15a24;
  --rust: #b6380f;
  --muted: #595952;
  --fine: #626159;
  --line: #d8d3cb;
  --line-soft: #e1ddd6;
  --field-line: #c9c5bd;
  --chip-line: #d5d1c9;
  --tint: #fff4ec;
  --tint-chip: #fff2e9;
  --panel-ink: #262626;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 Inter, Arial, sans-serif; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:is(input, select, textarea, button, a, summary, [tabindex]):focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
:is(input, select, textarea):focus { outline: 3px solid var(--orange); outline-offset: 3px; }
h2[tabindex="-1"]:focus { outline: none; }

/* Header */
.topbar { background: var(--ink); color: var(--paper); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 5%; }
.topbar > span { letter-spacing: .12em; font-size: 12px; }
.logo { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.logo img { display: block; width: auto; max-width: 180px; height: 30px; object-fit: contain; }

main { max-width: 1320px; margin: auto; padding: 38px 5%; }
.heading { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { letter-spacing: .13em; color: var(--rust); font-size: 12px; font-weight: 700; }
h1, h2, h3 { font-family: Inter, Arial, sans-serif; font-weight: 600; line-height: 1.2; }
h1 { letter-spacing: -.04em; margin: 9px 0 12px; font-size: clamp(30px, 4vw, 48px); }
h2 { letter-spacing: -.025em; margin: 10px 0 25px; font-size: 26px; }
h3 { font-size: 18px; }
.heading p { color: var(--muted); max-width: 590px; margin: 0; }
.time { text-align: right; white-space: nowrap; padding-top: 24px; font-size: 14px; }
.localnote { background: var(--tint); border: 1px solid var(--orange); border-radius: 4px; padding: 10px 14px; font-size: 14px; }

/* Step header */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.steps button { color: #63625c; text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 13px 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.steps .step-number { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 7px; border: 1px solid; border-radius: 50%; font-variant-numeric: tabular-nums; line-height: 1; }
.steps .active { color: #fff; background: var(--ink); border-color: var(--ink); }
.steps button:disabled { opacity: .65; cursor: default; }
.steps .step-short { display: none; }

/* Layout */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 24px; }
.formpanel, .success { min-width: 0; background: var(--card); border: 1px solid var(--line-soft); border-radius: 4px; padding: 28px; }

/* Fields */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { min-width: 0; font-size: 14px; font-weight: 600; }
.field label { display: block; }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 48px; margin-top: 7px; padding: 12px; color: var(--ink); background: #fff; border: 1px solid var(--field-line); border-radius: 6px; font-size: 16px; font-weight: 400; }
.field textarea { height: 120px; resize: vertical; }
.field input[aria-invalid="true"] { border-color: #8b2c14; border-width: 2px; padding: 11px; }
.notes-field { margin: 22px 0 18px; }
.req { color: var(--rust); }
.field-error { color: #8b2c14; font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.fine { color: var(--fine); font-size: 13px; line-height: 1.6; }
.fine.lead { margin: -4px 0 12px; }

fieldset { border: 0; margin: 24px 0; padding: 0; min-inline-size: 0; }
legend { margin-bottom: 12px; padding: 0; font-size: 16px; font-weight: 700; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { display: flex; align-items: center; gap: 7px; padding: 10px; font-size: 14px; cursor: pointer; border: 1px solid var(--chip-line); border-radius: 4px; }
.chip.chosen, .interest.chosen { background: var(--tint-chip); border-color: var(--orange); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--orange); flex-shrink: 0; width: 18px; height: 18px; margin: 0; }

/* Package cards */
.packages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.package { display: block; cursor: pointer; border: 1px solid var(--chip-line); border-radius: 4px; padding: 16px; }
.package.selected { background: var(--tint); border: 2px solid var(--orange); padding: 15px; }
.packtop { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.packtop strong { overflow-wrap: anywhere; }
.tagline { color: var(--fine); font-size: 13px; margin-top: 2px; }
.price { margin-top: 10px; font-size: 24px; font-weight: 700; }
.price small { margin-left: 5px; font-size: 14px; font-weight: 400; }
.package p { color: #5c5b53; margin: 7px 0 0; font-size: 14px; line-height: 1.5; }
.package p.plus { color: var(--ink); font-weight: 600; font-size: 13px; }
.package p.term { color: var(--rust); font-size: 13px; font-weight: 600; }

/* Front desk and texting, under monthly support */
.included { margin-top: 14px; padding: 16px 18px; background: var(--paper); border-left: 3px solid var(--orange); border-radius: 4px; font-size: 14px; }
.included-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.included ul { margin: 10px 0; padding-left: 20px; }
.included li { margin: 6px 0; }
.included .fine { margin: 8px 0; }
.crm-line { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.texting { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--chip-line); border-radius: 4px; font-size: 14px; }
.texting.chosen { background: var(--tint-chip); border-color: var(--orange); }
.texting.off { background: #faf9f6; }
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check-row input { margin-top: 3px; }
.sub { display: block; color: var(--fine); font-size: 13px; margin-top: 4px; }
.reason { color: var(--rust); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.off .check-row, .addon.off { cursor: not-allowed; }
.off strong { color: #63625c; }

/* Status labels */
.badge { display: inline-block; vertical-align: middle; white-space: nowrap; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6; }
.badge.live { background: var(--ink); color: #fff; }
.badge.setup { background: var(--orange); color: var(--ink); }
.badge.coming { background: transparent; color: var(--fine); border: 1px solid #8a8a86; }
.badge.ask { background: transparent; color: var(--ink); border: 1px solid var(--ink); }

/* Add-ons */
.addon-group { margin: 6px 0 14px; }
.addon-group legend { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rust); margin-bottom: 4px; }
.addon { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 10px; border-top: 1px solid #e6e2db; font-size: 14px; }
.addon.check { cursor: pointer; }
.addon.chosen { background: var(--tint-chip); }
.addon-text { min-width: 0; }
.addon-text p { color: var(--fine); margin: 4px 0; font-size: 13px; }
.addon-text p.reason { color: var(--rust); }
.addon-check { display: flex; align-items: center; justify-content: center; width: 65px; flex: 0 0 65px; }
.qty { flex: 0 0 76px; text-align: center; font-size: 12px; font-weight: 600; color: var(--fine); }
.qty label { display: block; margin-bottom: 4px; }
.qty input { width: 72px; min-height: 44px; padding: 9px; border: 1px solid var(--field-line); border-radius: 5px; font-size: 16px; text-align: center; }
.qty input:disabled { background: #f1efea; }

/* Interests */
.interests { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.interest { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--chip-line); border-radius: 4px; font-size: 14px; cursor: pointer; }
.interest input { margin-top: 3px; }

/* Actions and messages */
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.actions button { min-height: 48px; }
button { cursor: pointer; color: var(--ink); background: var(--orange); border: 1px solid var(--orange); border-radius: 4px; padding: 12px 19px; font-weight: 600; }
button:hover { filter: brightness(.94); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { color: #35352f; background: #fff; border-color: #d0cbc1; }
.error { color: #8b2c14; background: #fff0e9; border-radius: 4px; margin-top: 20px; padding: 14px; overflow-wrap: anywhere; }
.status { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.status:empty { display: none; }
.trap { position: absolute; left: -9999px; }

/* Review */
.review { background: var(--paper); border-radius: 4px; padding: 18px; overflow-wrap: anywhere; }
.review h3 { margin: 16px 0 6px; }
.review h3:first-of-type { margin-top: 6px; }
.review p { margin: 0 0 8px; }
.review .ref { font-size: 14px; }
.review .notes { white-space: pre-line; }
.plainlist { padding-left: 20px; font-size: 14px; }
.plainlist li { margin: 10px 0; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; font-size: 14px; }
.consent input { margin-top: 3px; }

/* Estimate panel */
.estimate { color: #fff; background: var(--ink); border-radius: 4px; padding: 25px; position: sticky; top: 24px; }
.estimate h2 { font-size: 23px; }
.estimate .eyebrow { color: #ff916a; }
.amount { border-bottom: 1px solid #4b4c45; padding: 13px 0; }
.amount > span { display: block; color: #cccac1; font-size: 14px; }
.amount strong { display: block; letter-spacing: -.03em; font-size: 30px; overflow-wrap: anywhere; }
.amount small { letter-spacing: 0; margin-left: 5px; font-size: 14px; font-weight: 400; }
.est-note { color: #f7f6f2; font-size: 13px; line-height: 1.55; margin: 12px 0 4px; }
.lineitems { padding: 0; font-size: 14px; list-style: none; }
.lineitems li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #2d2d2a; }
.lineitems b { white-space: nowrap; }
.lineitems.light li { border-bottom-color: var(--line-soft); }
.terms, .flags, .noted { background: var(--panel-ink); border-radius: 4px; margin-top: 14px; padding: 14px; font-size: 14px; }
.terms ul, .flags ul, .noted ul { margin: 8px 0 0; padding-left: 18px; }
.terms li, .flags li, .noted li { margin: 4px 0; }
.estimate .fine { color: #cbc9c0; }
.estimate-toggle { display: none; }

/* Referral partners and footer */
.partner { border: 1px solid var(--chip-line); border-radius: 4px; margin-top: 28px; padding: 18px; font-size: 14px; }
.partner summary { cursor: pointer; font-weight: 600; }
.partnerrow { display: flex; align-items: end; gap: 14px; }
.partnerrow .field { flex: 1; }
.partnerrow button { min-height: 48px; }
.partner-link { display: block; width: 100%; margin-top: 12px; padding: 10px; border: 1px solid var(--field-line); border-radius: 6px; font-size: 14px; }
footer { color: var(--fine); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px; padding: 30px 0 10px; font-size: 13px; }

/* Local summary */
.success { max-width: 850px; margin: auto; }
.success h2 { font-size: 32px; }
.totals { display: flex; flex-wrap: wrap; gap: 40px; margin: 25px 0 10px; }
.totals b { display: block; font-size: 26px; }
.success details { margin-top: 18px; }
.success summary { cursor: pointer; font-weight: 600; }
.success pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); padding: 14px; border-radius: 4px; font-size: 13px; }

/* Tablet and phone */
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .heading .time { display: none; }
  .estimate { order: -1; position: static; padding: 0; }
  .estimate-toggle { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; width: 100%; min-height: 52px; padding: 16px; color: #f7f6f2; background: var(--ink); border: 0; text-align: left; font-size: 14px; }
  .estimate-toggle #toggle-amount { margin-left: auto; white-space: nowrap; }
  .estimate:not(.expanded) .estimate-body { display: none; }
  .estimate.expanded .estimate-body { padding: 0 18px 18px; }
  .estimate.expanded h2 { margin: 12px 0; }
  .steps { gap: 6px; }
  .steps button { display: grid; grid-template-rows: 26px auto; justify-items: center; align-content: start; gap: 5px; min-height: 64px; padding: 9px 2px; font-size: 12px; line-height: 1.25; text-align: center; }
  .steps .step-number { display: grid; width: 26px; height: 26px; margin: 0; font-size: 13px; }
  .steps button:disabled { opacity: 1; color: #63625c; }
  .steps .step-label { display: none; }
  .steps .step-short { display: block; }
  .actions button { flex: 1; }
  #back-spacer { display: none; }
  .chip { min-height: 46px; }
}
@media (max-width: 560px) {
  main { padding: 26px 16px; }
  .topbar { padding: 18px 16px; }
  .topbar > span { text-align: right; max-width: 125px; font-size: 9px; }
  .logo img { max-width: 145px; height: 24px; }
  .heading { margin-bottom: 22px; }
  .heading h1 { font-size: 34px; }
  .heading p { font-size: 15px; }
  .formpanel, .success { padding: 22px 18px; }
  .fields, .packages, .interests { grid-template-columns: minmax(0, 1fr); }
  .fields { gap: 20px; }
  .package { padding: 18px; }
  .package.selected { padding: 17px; }
  .packtop { align-items: flex-start; gap: 10px; }
  .packtop input { margin-top: 2px; }
  .price { font-size: 26px; }
  .chips { gap: 8px; }
  .chip { width: 100%; padding: 12px; }
  .addon { align-items: flex-start; padding: 14px 4px; }
  .steps button { padding: 10px 2px; font-size: 11px; line-height: 1.35; }
  .estimate-toggle { font-size: 13px; }
  .partner { padding: 16px; }
  .partnerrow { display: block; }
  .partnerrow button { margin-top: 12px; width: 100%; }
  .partner summary, footer a { min-height: 44px; display: flex; align-items: center; }
  .partner summary { display: list-item; padding-top: 10px; }
  .totals { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .topbar, .steps, .partner, footer, button, .localnote { display: none; }
  main { padding: 0; }
  body { background: #fff; }
  .success { border: 0; }
  .success details > * { display: block; }
  .estimate { position: static; }
}
