/* Loanistry application page (apply.html) in the Homepage Concept style. Loaded after home.css on apply.html only.
   An app-style page like apply.trulli.ai: slim bar, stages on the left, one question per screen (apply-flow.js).
   The form's field names and data attributes are the ones apply.js reads; these rules only style them. */

.lo-apply { color: #151514; }
.la-wrap { max-width: 1440px; margin: 0 auto; padding: 0 clamp(20px, 6.67vw, 96px); }

/* ---------- app bar ---------- */
.la-app-body { background: #FAF8EF; min-height: 100vh; display: flex; flex-direction: column; }
.la-appbar { position: sticky; top: 0; z-index: 20; background: #FFFFFF; box-shadow: 0 1px 0 rgba(1,46,29,.08); }
.la-appbar-in { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.la-cobrand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.la-cobrand img { height: 22px; width: auto; }
.la-with { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #5C605A; }
.la-cobrand img.la-trulli-logo { height: 24px; width: auto; }
.la-appbar-r { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); flex: none; }
.la-exit { font-size: 15px; color: #1C1E1B; text-decoration: none; }
.la-exit:hover { color: #01673E; text-decoration: underline; text-underline-offset: 3px; }
.la-secure { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: #E6F6E9; color: #012E1D; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- shell: stages on the left, one question on the right ---------- */
.la-app { flex: 1; width: 100%; }
.la-shell { max-width: 1240px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px) clamp(48px, 6vw, 80px); display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 3.4vw, 48px); align-items: start; }
.la-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.la-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.la-stages li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; font-size: 16px; color: #5C605A; transition: background-color .2s ease, color .2s ease; }
.la-sn { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px #C9CCC4; font-size: 13px; }
.la-sn b { font-weight: 500; }
.la-sn svg { display: none; }
.la-stages li.is-on { background: #FFFFFF; color: #012E1D; font-weight: 500; box-shadow: 0 1px 2px rgba(1,46,29,.06), inset 0 0 0 1px rgba(1,46,29,.08); }
.la-stages li.is-on .la-sn { background: #012E1D; color: #FFFFFF; box-shadow: none; }
.la-stages li.is-done { color: #012E1D; }
.la-stages li.is-done .la-sn { background: #92FBA6; color: #012E1D; box-shadow: none; }
.la-stages li.is-done .la-sn b { display: none; }
.la-stages li.is-done .la-sn svg { display: block; }
.la-proof.la-trust { padding: 22px 24px; border-radius: 18px; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(1,46,29,.08); gap: 14px; }
.la-proof.la-trust li { font-size: 14px; gap: 14px; }
.la-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; max-width: 760px; }

.la-proof { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.la-proof li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; color: #1C1E1B; }
.la-proof b { font-weight: 600; color: #012E1D; }
.la-tick { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: #92FBA6; display: grid; place-items: center; }

/* ---------- Funding Match summary above the form ---------- */
.la-match { border-radius: 24px; background: #012E1D; color: #FFFFFF; padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; }
.la-match[hidden], .la-match [hidden] { display: none; }
.la-match-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.la-match-k { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #92FBA6; }
.la-match-pos { font-family: var(--hf); font-size: 22px; letter-spacing: -0.02em; }
.la-match-fit { font-size: 16px; font-weight: 500; }
.la-match-note { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.74); }

/* ---------- the application form, restyled ---------- */
.lo-apply .qualify.apply { max-width: none; margin: 0; padding: clamp(22px, 2.8vw, 40px); gap: 26px; border-radius: 28px; background: #FFFFFF; color: #151514; box-shadow: 0 0 0 1px rgba(1,46,29,.06), 0 40px 80px -48px rgba(1,46,29,.45); }
.lo-apply .qualify .h3 { font-family: var(--hf); font-size: clamp(24px, 2vw, 30px); line-height: 1.15; letter-spacing: -0.02em; color: #012E1D; }
.lo-apply .qualify .sm { font-size: 14px; }
.lo-apply .qualify .muted { color: #5C605A; }
.lo-apply .qualify .steps { gap: 8px; }
.lo-apply .qualify .steps span { height: 6px; border-radius: 99px; background: #EEEBDD; transition: background-color .3s ease; }
.lo-apply .qualify .steps span.is-done { background: #01673E; }
.lo-apply .qualify fieldset { gap: 20px; }
.lo-apply .qualify legend { font-family: var(--hf); font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; color: #012E1D; margin-bottom: 6px; }
.lo-apply .q { font-size: 15px; font-weight: 500; color: #151514; }
.lo-apply .q small { font-size: 13px; color: #5C605A; }
.lo-apply .apply-grid { gap: 18px 14px; }
.lo-apply .field-label { left: 14px; padding: 0 6px; font-size: 13px; color: #5C605A; background: #FFFFFF; }
.lo-apply .field-box { border-radius: 14px; padding: 15px 18px; background: #FFFFFF; box-shadow: inset 0 0 0 1px #DADCD6; transition: box-shadow .15s ease; }
.lo-apply .field-box:hover { box-shadow: inset 0 0 0 1px #A9ADA4; }
.lo-apply .field-box:focus-within { box-shadow: inset 0 0 0 1.5px #151514; }
/* the box itself shows focus, so the input inside it gets no second (green) outline */
.lo-apply .field-box .field-input:focus, .lo-apply .field-box .field-input:focus-visible { outline: none; }
.lo-apply .field-input { font-size: 16px; color: #151514; }
.lo-apply .field-input::placeholder { color: #8A8E86; }
.lo-apply .radio-cards { gap: 10px; }
.lo-apply .radio-card span { padding: 13px 16px; border-radius: 14px; background: #FAF8EF; font-size: 15px; font-weight: 500; color: #151514; box-shadow: inset 0 0 0 1px rgba(1,46,29,.06); transition: background-color .15s ease, box-shadow .15s ease; }
.lo-apply .radio-card:hover span { background: #F1EEE0; }
.lo-apply .radio-card input:checked + span, .lo-apply .radio-card input:checked:hover + span { background: #E6F6E9; color: #012E1D; box-shadow: inset 0 0 0 2px #01673E; }
.lo-apply .radio-card input:focus-visible + span { outline: 2px solid #151514; outline-offset: 2px; }
.lo-apply .check { font-size: 14px; line-height: 1.55; color: #1C1E1B; }
.lo-apply .check input { accent-color: #01673E; }
.lo-apply .check a, .lo-apply .hint a { color: #01673E; }
.lo-apply .qualify .hint { font-size: 13px; line-height: 1.5; color: #5C605A; }
.lo-apply .qualify .soft { color: #1C1E1B; }
.lo-apply .qualify .soft.sm.stack { padding: 16px 18px; border-radius: 16px; background: #FAF8EF; font-size: 14px; line-height: 1.55; }
.lo-apply .qualify .nav-row { align-items: center; padding-top: 20px; box-shadow: inset 0 1px 0 #EEEBDD; }
.lo-apply .btn { height: 48px; padding: 0 24px; border-radius: 999px; font-size: 16px; font-weight: 400; letter-spacing: -0.01em; transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.lo-apply .btn::after { display: none; }
.lo-apply .btn:hover { transform: translateY(-1px); }
.lo-apply .btn--primary { background: #01673E; color: #FFFFFF; }
.lo-apply .btn--primary:hover { background: #012E1D; }
.lo-apply .btn--primary[disabled] { opacity: .7; transform: none; }
.lo-apply .btn--ghost { background: transparent; color: #151514; box-shadow: inset 0 0 0 1px #DADCD6; }
.lo-apply .btn--ghost:hover { box-shadow: inset 0 0 0 1px #012E1D; color: #012E1D; }
.lo-apply .btn--sm { height: 40px; padding: 0 18px; font-size: 15px; }
.lo-apply .form-error { font-size: 14px; border-radius: 14px; padding: 12px 14px; }
.lo-apply .apply-result { display: flex; flex-direction: column; gap: 10px; }
.lo-apply .apply-result[hidden] { display: none; }
.lo-apply .eyebrow { font-size: 13px; letter-spacing: .06em; color: #01673E; }
.lo-apply .est-head { font-family: var(--hf); font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; color: #012E1D; }
.lo-apply .portal-return { max-width: none; margin: 0; padding: 16px 20px; border-radius: 20px; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(1,46,29,.1); font-size: 15px; }

/* ---------- one question per screen ---------- */
.la-cardhead { display: flex; flex-direction: column; gap: 14px; }
.la-stage-m { display: none; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #01673E; }
.la-h1 { font-family: var(--hf); font-size: clamp(30px, 3vw, 42px); line-height: 1.1; letter-spacing: -0.025em; color: #012E1D; }
.lo-apply .qualify .steps { gap: 4px; }
.lo-apply .qualify .steps span { height: 5px; }
.lo-apply .qualify legend.la-q { padding: 0; margin: 0 0 4px; font-family: inherit; font-size: clamp(19px, 1.6vw, 22px); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; color: #151514; }
.la-help { margin-top: -10px; font-size: 15px; line-height: 1.5; color: #5C605A; }
.la-js .la-native { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.la-taps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.la-tap { position: relative; display: block; width: 100%; padding: 17px 48px 17px 18px; border: 0; border-radius: 14px; background: #FAF8EF; color: #151514; font: inherit; font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(1,46,29,.06); transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.la-tap::after { content: ''; position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #A9ADA4; transition: box-shadow .15s ease, background-color .15s ease; }
.la-tap:hover { background: #F1EEE0; }
.la-tap:active { transform: scale(.99); }
.la-tap:focus-visible { outline: 2px solid #151514; outline-offset: 2px; }
.la-tap[aria-checked="true"] { background: #E6F6E9; color: #012E1D; box-shadow: inset 0 0 0 2px #01673E; }
.la-tap[aria-checked="true"]::after { background: #01673E; box-shadow: inset 0 0 0 5px #01673E, inset 0 0 0 9px #FFFFFF; }
.lo-apply .radio-card span { position: relative; padding: 17px 48px 17px 18px; font-size: 16px; }
.lo-apply .radio-card span::after { content: ''; position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px #A9ADA4; }
.lo-apply .radio-card input[type="radio"] + span::after { border-radius: 50%; }
.lo-apply .radio-card input:checked + span::after { background: #01673E; box-shadow: inset 0 0 0 5px #01673E, inset 0 0 0 9px #FFFFFF; }
.lo-apply .radio-card input[type="checkbox"]:checked + span::after { box-shadow: none; background: #01673E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.lo-apply .qualify .nav-row [hidden] { display: none; }
.lo-apply .qualify > .form-error { margin: 0; }

/* review: the answers read back */
.la-review { display: flex; flex-direction: column; gap: 12px; }
.la-rv { padding: 16px 18px; border-radius: 16px; box-shadow: inset 0 0 0 1px #E4E2D6; }
.la-rv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.la-rv h3 { font-family: var(--hf); font-size: 19px; letter-spacing: -0.01em; color: #012E1D; }
.la-rv-edit { border: 0; background: none; padding: 4px 2px; font: inherit; font-size: 14px; color: #01673E; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.la-rv dl { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px 16px; margin: 0; font-size: 14px; line-height: 1.45; }
.la-rv dt { color: #5C605A; }
.la-rv dd { margin: 0; color: #151514; overflow-wrap: anywhere; }

.la-fine { font-size: 13px; line-height: 1.55; color: #5C605A; max-width: 720px; }
.la-fine a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- slim footer ---------- */
.la-appfoot { background: #FFFFFF; box-shadow: 0 -1px 0 rgba(1,46,29,.08); }
.la-appfoot-in { max-width: 1240px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 48px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: #5C605A; }
.la-appfoot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.la-appfoot a { color: #1C1E1B; text-decoration: none; }
.la-appfoot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- smaller screens: the stage moves above the question, the sidebar goes under it ---------- */
@media (max-width: 900px) {
  .la-shell { grid-template-columns: minmax(0, 1fr); }
  .la-side { position: static; order: 2; }
  .la-stages { display: none; }
  .la-stage-m { display: block; }
  .la-main { max-width: none; }
}
@media (max-width: 600px) {
  .la-appbar-in { height: 60px; }
  .la-cobrand img { height: 18px; }
  .la-cobrand img.la-trulli-logo { height: 20px; }
  .la-with { font-size: 11px; }
  .la-exit { font-size: 14px; }
  .la-secure { display: none; }
  .lo-apply .apply-grid, .lo-apply .apply-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .lo-apply .radio-cards, .la-taps { grid-template-columns: minmax(0, 1fr); }
  .lo-apply .qualify .nav-row .btn { flex: 1; }
  .la-rv dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .la-rv dd { margin-bottom: 8px; }
}
