/* Puentiva forms — request intake, contact and client-support forms.
   Ported from the approved design; native controls are styled to match its inputs, selects, checkboxes, radios and progress bar. */

fieldset { border: 0; min-width: 0; margin: 0; padding: 0; }

/* ---------- Fields ---------- */
.input-grid { grid-template-columns: 1fr 1fr; gap: 23px 20px; display: grid; }
.field, .input-grid .field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field-label { margin-bottom: 9px; font-size: .875rem; font-weight: 600; display: block; }
.required-star { color: #8a4c31; margin-left: 3px; }
.optional-label { color: #63766a; font-size: .75rem; font-weight: 400; }
.field input, .field textarea, .field select { border: 1px solid var(--input); width: 100%; min-height: 48px; color: var(--ink); box-shadow: none; background: #fff; border-radius: 5px; padding: 11px 13px; font-size: 1rem; line-height: 1.45; outline: none; transition: color .15s, box-shadow .15s; }
.field input { height: 47px; }
.field input[type="date"] { appearance: none; -webkit-appearance: none; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 1lh; }
.field input::placeholder, .field textarea::placeholder { color: #87938b; }
.field textarea { display: block; resize: vertical; min-height: 120px; field-sizing: content; }
.field select { appearance: none; -webkit-appearance: none; height: auto; min-height: 47px; white-space: normal; text-align: left; cursor: pointer; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23556966' stroke-opacity='.5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 16px 16px; }
.field select::-ms-expand { display: none; }
.field-error { color: #a32932; margin-top: 5px; font-size: .8125rem; display: block; }
.field-hint { color: #65796e; margin-top: 6px; font-size: .8125rem; display: block; }
.field [aria-invalid="true"] { border-color: #b44a3c; }
.field-note { color: #4b6457; background: #eff4ec; border-radius: 5px; margin-top: 18px; padding: 16px 19px; font-size: .875rem; line-height: 1.7; }
.form-error { color: #8f362b; background: #fff1ed; border: 1px solid #e5b6a9; border-radius: 6px; margin-block: 20px; padding: 15px 18px; }
.form-error a { text-decoration: underline; }
.honeypot { width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; overflow: hidden !important; }

/* Radios: bordered option boxes */
.radio-options { flex-wrap: wrap; gap: 13px; display: flex; }
.radio-option, .field label.radio-option { border: 1px solid #cbd8cd; border-radius: 5px; align-items: center; gap: 10px; min-width: 100px; margin: 0; padding: 12px 17px; font-size: .9375rem; font-weight: 400; display: flex; cursor: pointer; }
.radio-option span { font-size: .875rem; font-weight: 400; }
.radio-option:has(input:checked), .field label.radio-option:has(input:checked) { background: #f0f5ec; border-color: #456d5d; }
.radio-option input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; min-height: 0; flex-shrink: 0; margin: 0; padding: 0; border: 1px solid var(--input); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); cursor: pointer; display: grid; place-content: center; }
.radio-option input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); transform: scale(0); transition: transform .12s; }
.radio-option input:checked::after { transform: scale(1); }
.field .radio-option input { width: 16px; height: 16px; min-height: 0; padding: 0; }

/* Checkbox consent rows */
.consent-row { align-items: flex-start !important; gap: 12px; margin-top: 25px; display: flex; cursor: pointer; }
.consent-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 19px; height: 19px; margin: 5px 0 0; border: 1px solid var(--input); border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); cursor: pointer; display: grid; place-content: center; transition: box-shadow .15s; }
.consent-row input[type="checkbox"]:checked { background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--primary); }
.consent-row input[type="checkbox"][aria-invalid="true"] { border-color: #b44a3c; }
.consent-row a { text-decoration: underline; border-bottom: 1px solid #7d9c86; }
.consent-row + .field-error { margin-left: 31px; }

/* Actions */
.form-actions { border-top: 1px solid var(--border); justify-content: space-between; align-items: center; gap: 20px; margin-top: 32px; padding-top: 28px; display: flex; }
.privacy-choice { color: #65796e; margin-top: 18px; font-size: .8125rem; }
.form-lede { margin-bottom: 30px; font-size: .9375rem; }
.label-chip { color: #4a6a55; background: #e9f0e7; border-radius: 3px; margin-bottom: 16px; padding: 5px 11px; font-size: .75rem; font-weight: 600; display: inline-block; }
.button .pv-spin { animation: pv-spin 1s linear infinite; }
@keyframes pv-spin { to { transform: rotate(360deg); } }

/* ---------- Success ---------- */
.success-panel { background: #edf3ec; border: 1px solid #c9dbc9; border-radius: 8px; padding: 42px; flex-direction: column; align-items: flex-start; gap: 15px; max-width: 760px; margin: auto; display: flex; }
.success-panel > svg { color: #567d59; margin-bottom: 20px; }
.success-panel h1, .success-panel h2 { font-size: 2rem; margin-bottom: 0; }
.success-panel .eyebrow { margin-bottom: 0; }
.success-panel p { margin-bottom: 0; }
.success-reference { color: var(--ink); background: rgba(255, 255, 255, .69); margin: 10px 0 24px; padding: 12px 16px; font-family: monospace; font-size: 1.05rem; display: inline-block; letter-spacing: .07em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.success-panel .success-reference { margin: 0; }
.success-panel .steps-list { width: 100%; margin-top: 10px; }
.success-panel .process-row { padding: 20px 0; }

/* ---------- Request page ---------- */
.request-background { background: #f2f4ee; min-height: 650px; padding-block: 55px 85px; }
.request-container { width: min(1120px, 100% - 64px); max-width: 1130px; margin: auto; }
.request-heading { text-align: center; max-width: 740px; margin: 0 auto 40px; }
.request-heading .eyebrow { justify-content: center; margin-bottom: 18px; }
.request-heading h1 { margin-bottom: 17px; font-size: 3.25rem; }
.request-heading p { margin: 0; font-size: 1rem; }
.role-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; display: grid; }
.role-card { text-align: left; color: var(--ink); background: #fff; border: 1px solid #cbd8cd; border-radius: 8px; flex-direction: column; min-height: 260px; padding: 32px; transition: box-shadow .2s, border-color .2s; display: flex; }
.role-card:hover { border-color: #456d5d; box-shadow: 0 12px 30px rgba(32, 62, 48, .063); }
.role-card > svg { color: #568269; margin-bottom: 30px; }
.role-card h2 { letter-spacing: -.02em; margin-bottom: 12px; font-family: inherit; font-size: 1.3rem; font-weight: 600; }
.role-card p { flex: 1; font-size: .9375rem; }
.role-card > span { justify-content: space-between; align-items: center; font-size: .875rem; font-weight: 600; display: flex; }
.request-help { color: #546d5f; justify-content: center; align-items: center; gap: 10px; margin-top: 32px; font-size: .875rem; display: flex; flex-wrap: wrap; }

/* ---------- Intake ---------- */
.intake-layout { grid-template-columns: 245px 1fr; gap: 32px; display: grid; }
.intake-sidebar { padding-top: 10px; }
.intake-sidebar h2 { margin-bottom: 27px; font-size: 1.5rem; }
.intake-step { color: #6c7c72; align-items: center; gap: 12px; margin-bottom: 22px; font-size: .875rem; display: flex; }
.intake-step > span { border: 1px solid #bfcec2; border-radius: 50%; flex-shrink: 0; justify-content: center; align-items: center; width: 30px; height: 30px; font-size: .75rem; display: flex; }
.intake-step.active { color: #173b3e; font-weight: 600; }
.intake-step.active > span, .intake-step.complete > span { color: #fff; background: #173f3b; border-color: #173f3b; }
.intake-step button { text-align: left; background: 0 0; border: 0; padding: 0; color: inherit; font-weight: inherit; }
.intake-step button:disabled { opacity: .8; cursor: default; }
.intake-sidebar .support-card { border-top: 1px solid #cedbcd; margin-top: 31px; padding-top: 23px; font-size: .8125rem; }
.support-card p { margin-bottom: 10px; font-size: .875rem; }
.support-card a { font-weight: 600; display: block; }
.intake-panel { background: #fff; border: 1px solid #d7e1d5; border-radius: 8px; padding: 40px; }
.intake-panel h2 { margin-bottom: 13px; font-size: 2.1rem; }
.intake-panel .eyebrow { margin-bottom: 16px; }
.form-step-title { scroll-margin-top: 130px; }
.form-step-title:focus { outline: none; }
.mobile-progress { display: none; }
.mobile-progress button { background: 0 0; border: 0; font-size: .8125rem; text-decoration: underline; color: inherit; }
.pv-progress { position: relative; width: 100%; height: 8px; overflow: hidden; border-radius: 9999px; background: rgba(18, 62, 67, .2); }
.pv-progress-indicator { height: 100%; width: 100%; background: var(--primary); transition: transform .3s; }

/* Review */
.review-group { border-bottom: 1px solid var(--border); padding: 23px 0; }
.review-group:first-child { padding-top: 0; }
.review-group-title { justify-content: space-between; gap: 20px; margin-bottom: 17px; display: flex; }
.review-group h3 { margin: 0; font-size: 1rem; }
.review-group button { color: var(--ink); background: 0 0; border: 0; border-bottom: 1px solid #9cb19f; padding: 0; font-size: .875rem; }
.review-data { grid-template-columns: 1fr 1fr; gap: 15px 24px; display: grid; margin: 0; }
.review-data dt { color: #68806f; font-size: .75rem; }
.review-data dd { color: #244d41; overflow-wrap: anywhere; margin: 0; font-size: .875rem; white-space: pre-wrap; }
.review-data .wide { grid-column: 1 / -1; }
.notice-box { background: #f0f4ed; border-left: 3px solid #64836b; margin-block: 30px; padding: 24px 27px; }
.notice-box p { margin: 0; font-size: .9375rem; }

/* ---------- Contact / client-support form ---------- */
.support-form-card { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 35px; }
.support-form-card h2 { font-size: 2rem; margin-bottom: 0; }
.support-form-card .form-lede { margin-top: 0; }
.support-form-card .success-panel { margin: 0; }

@media (max-width: 1020px) {
  .intake-layout { grid-template-columns: 190px 1fr; gap: 25px; }
  .intake-panel { padding: 30px; }
  .role-card { padding: 25px; }
}
@media (max-width: 760px) {
  .request-background { padding-block: 38px 55px; }
  .request-container { width: calc(100% - 32px); }
  .request-heading { margin-bottom: 30px; }
  .request-heading h1 { font-size: 2.5rem; }
  .request-heading .eyebrow { font-size: .6875rem; }
  .role-grid { grid-template-columns: 1fr; }
  .role-card { grid-template-columns: 40px 1fr; gap: 4px 15px; min-height: 0; padding: 25px; display: grid; }
  .role-card > svg { grid-row: 1 / 4; margin-top: 3px; margin-bottom: 0; }
  .role-card h2, .role-card p, .role-card > span { grid-column: 2; }
  .role-card h2 { margin-bottom: 5px; font-size: 1.2rem; }
  .role-card p { margin-bottom: 12px; }
  .role-card > span { justify-content: flex-start; gap: 15px; }
  .intake-layout { grid-template-columns: 1fr; gap: 0; }
  .intake-sidebar { display: none; }
  .mobile-progress { color: #58735f; margin-bottom: 22px; font-size: .8125rem; display: block; }
  .mobile-progress > div:first-child { justify-content: space-between; margin-bottom: 10px; display: flex; }
  .mobile-progress .pv-progress { height: 5px; }
  .intake-panel { padding: 27px 21px; }
  .intake-panel h2 { font-size: 1.8rem; }
  .input-grid { gap: 22px 16px; }
  .form-actions { gap: 15px; }
  .request-help { font-size: .8125rem; }
  .support-form-card { padding: 26px; }
  .support-form-card h2 { font-size: 1.8rem; }
  .success-panel { padding: 29px; gap: 17px; }
  .success-panel h1, .success-panel h2 { font-size: 1.85rem; }
  .form-step-title { scroll-margin-top: 100px; }
}
@media (max-width: 440px) {
  .input-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: 1; }
  .review-data { grid-template-columns: 1fr; }
  .review-data .wide { grid-column: 1; }
  .form-actions .button { padding-inline: 16px; }
}
