/* Lucid Phase 1. Observed primitives: source Home 4:1144 and mobile PDF.
   Onboarding role mappings are inferred; existing geometry and flows are retained. */
:root, [data-palette="bone"] {
  color-scheme: light;
  --f-display: var(--ld-font); --f-body: var(--ld-font);
  --f-editorial: var(--ld-font); --f-mono: var(--ld-font);
  --bg: var(--ld-white); --bg-2: var(--ld-neutral-25); --bg-card: var(--ld-white);
  --bg-sky: var(--ld-sky-100); --bg-olive: var(--ld-lime-100);
  --bg-clay: var(--ld-rose-300); --bg-sand: var(--ld-neutral-50);
  --ink: var(--ld-black); --ink-2: var(--ld-black-64); --ink-3: var(--ld-black-50);
  --rule: var(--ld-black-6); --rule-2: var(--ld-black-16);
  --accent: var(--ld-black); --accent-ink: var(--ld-white);
  --accent-2: var(--ld-lime-950); --accent-3: var(--ld-red-900); --accent-4: var(--ld-sky-300);
  --accent-pos: var(--ld-lime-950); --signal-neg: var(--ld-red-900); --signal-danger: var(--ld-red-900);
  --signal-warn: var(--ld-red-900); --signal-data: var(--ld-black); --hold-accent: var(--ld-black);
  --chart-line: var(--ld-lime-950); --chart-fill: var(--ld-lime-950);
  --terminal-fill: var(--ld-black); --terminal-ink: var(--ld-white);
  --alloc-cash: var(--ld-sky-300); --alloc-invest: var(--ld-lime-300); --alloc-crypto: var(--ld-rose-300);
}
body, .screen { font-family: var(--ld-font); font-size: 16px; font-weight: 400; }
.screen { font-synthesis: none; }
.screen, .screen * { font-feature-settings: normal; font-variant-numeric: normal; }
/* The source provides Book and Medium; map legacy bold emphasis to Medium.
   No global font-size or number bucket override. */
.screen [style*="font-weight: 600"], .screen [style*="font-weight: 650"],
.screen [style*="font-weight: 700"], .screen [style*="font-weight: 800"] { font-weight: 500 !important; }
.ld-heading { letter-spacing: -.02em !important; line-height: 1.1 !important; }
.ld-money { white-space: nowrap; letter-spacing: normal !important; }
.ld-money > span { color: inherit !important; }
.screen .ld-button, .screen .ld-provider {
  border-radius: 24px !important; font-size: 16px !important; font-weight: 500 !important;
  min-height: 48px; letter-spacing: normal !important;
}
.screen .ld-button[data-kind="ghost"], .screen .ld-button[data-kind="quiet"] {
  background: var(--ld-black-4) !important; border-color: transparent !important;
}
.screen .ld-button:disabled { background: var(--ld-neutral-50) !important; color: var(--ld-black-32) !important; opacity: 1 !important; }
.screen .ld-button:disabled svg { color: inherit; stroke: currentColor; }
.screen .ld-field > div:last-child, .screen .ld-select {
  background: var(--ld-neutral-25) !important; border-radius: 16px !important; border-color: var(--ld-border) !important;
}
.screen input:not([type="range"]), .screen textarea, .screen select {
  font-family: var(--ld-font); font-size: 16px; color-scheme: light;
  border-radius: 12px; border-color: var(--ld-border);
}
.screen input::placeholder, .screen textarea::placeholder { color: var(--ld-muted); opacity: 1; }
.screen .ld-field:focus-within > div:last-child { box-shadow: inset 0 0 0 1px var(--ld-black-32); }
.screen button:focus-visible, .screen input:focus-visible, .screen select:focus-visible { outline: 2px solid var(--ld-black-64) !important; outline-offset: 2px; }
.screen .ld-choice { border-radius: 24px !important; background: var(--ld-white-50) !important; box-shadow: var(--ld-shadow-card); }
.screen .ld-choice[data-selected="true"] { background: var(--ld-neutral-25) !important; }
.screen .ld-segmented { border-radius: 24px !important; background: var(--ld-neutral-25); }
.screen .ld-segmented button { border-radius: 20px; border-left: none !important; }
.screen [role="dialog"], .screen .acct-card { border-radius: 24px !important; box-shadow: var(--ld-shadow-card); }
.screen [style*="border-radius: 16px 16px 0px 0px"],
.screen [style*="border-radius: 18px 18px 0px 0px"] { border-radius: 32px 32px 0 0 !important; }
.screen svg [stroke-linecap="square"] { stroke-linecap: round; stroke-linejoin: round; }
/* Keep the existing navigation's geometry and all five destinations. */
.screen .tabbar { background: var(--ld-white-64); border-color: var(--ld-border); }
.screen .tab .tlabel { font-size: 12px; text-transform: none; letter-spacing: normal; }
/* Comparison chrome belongs to the reviewer, not a second product palette. */
.cv-wrap, .cv-btn, .cv-select select { font-family: var(--ld-font); }

/* Existing first-run cards, retaining every row and action. */
.screen [data-get-started-card], .screen .ld-proposal-card {
  border-color: var(--ld-border) !important; border-radius: 24px !important;
  background: var(--ld-white-50) !important; box-shadow: var(--ld-shadow-card);
}
/* Preserve the imported glyph geometry contract while adapting its ink to light. */
.screen [data-get-started-action] img { filter: brightness(0) !important; }

/* Welcome shares web v1's agency motion and intelligence assets. */
.lucid-motion-logo { position: relative; display: block; overflow: hidden; flex: none; mix-blend-mode: multiply; }
.lucid-motion-logo-still { position: absolute; inset: 0; display: grid; place-items: center; }
/* Crop the original 1200 × 1016 render to the 230px symbol at (285, 393). */
.lucid-motion-logo-video { position: absolute; width: 521.73913%; height: 441.73913%; max-width: none; left: -123.91304%; top: -170.86957%; filter: invert(1); pointer-events: none; }
.ld-welcome-logo { mix-blend-mode: multiply; }
.ld-welcome-wash { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ld-welcome-wash::before, .ld-welcome-wash::after { content: ''; position: absolute; pointer-events: none; }
.ld-welcome-wash::before { inset: -140px -200px auto; height: 600px; background: url('intelligence/mesh-wash.svg') center / 760px 488px no-repeat; opacity: .4; }
.ld-welcome-wash::after { inset: 80px -160px -160px; background: url('intelligence/pink.png') calc(50% - 120px) bottom / 600px 540px no-repeat, url('intelligence/orange.png') calc(50% + 170px) bottom / 520px 630px no-repeat; opacity: .38; mask-image: linear-gradient(transparent, #000 35%); animation: ld-welcome-drift 12s ease-in-out infinite alternate; }
@keyframes ld-welcome-drift { from { transform: translate3d(-10px, 16px, 0); } to { transform: translate3d(14px, -18px, 0); } }
/* Web v1's white controls and numbered process, adapted to the mobile sheet. */
.screen .ld-provider { background: var(--ld-white-64) !important; color: var(--ink); border: 0 !important; box-shadow: 0 4px 16px rgb(0 0 0 / 12%), inset 0 0 0 1px var(--ld-white-64); }
.screen .ld-field > div:last-child, .screen .ld-select, .screen .ld-phone-field { background: var(--ld-white) !important; border: 1px solid var(--ld-border) !important; border-radius: 24px !important; box-shadow: var(--ld-shadow-card); }
.screen .ld-field:focus-within > div:last-child, .screen .ld-phone-field:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.screen .ld-field input:focus-visible, .screen .ld-phone-field input:focus-visible { outline: none !important; }
.screen .ld-phone-field input { border-radius: inherit; }
.ld-verification-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 24px; }
.ld-verification-steps li { display: flex; align-items: center; gap: 16px; min-height: 37px; }
.ld-step-number { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 40px; background: rgb(0 0 0 / 8%); font-size: 16px; font-weight: 500; }
.ld-verification-steps h3 { font-size: 16px; line-height: 19px; font-weight: 500; margin: 0 0 4px; }
.ld-verification-steps p { font-size: 12px; line-height: 14px; color: var(--ink-3); margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .lucid-motion-logo-video { display: none; }
  .ld-welcome-wash::after { animation: none; }
}

/* Income and amount selectors share web v1's neutral selection treatment. */
.screen .ld-pill { min-height: 44px; padding: 8px 12px !important; font-size: 14px !important; font-weight: 500 !important; border-radius: 24px !important; background: #fff !important; color: var(--ink) !important; border: 0 !important; box-shadow: none; }
.screen .ld-pill[aria-pressed="true"] { background: var(--ld-neutral-50) !important; }
.ld-wait-wash::after { animation: none; opacity: .42; }
.ld-agreement-card { margin-top: 20px; padding: 4px 16px 6px; border: 1px solid var(--ld-border); border-radius: 24px; background: #fff; box-shadow: var(--ld-shadow-card); overflow: hidden; }
.ld-agreement-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 8px; }
.ld-agreement-row + .ld-agreement-row { border-top: 1px solid var(--ld-border); }
.ld-agreement-check { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 0; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.ld-agreement-title { display: block; font-size: 16px; font-weight: 500; line-height: 1.25; }
.ld-agreement-description { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.4; margin-top: 4px; }
.ld-agreement-row > :last-child { min-height: 44px; justify-content: center; align-items: center; }
.ld-funding-tile { width: 100%; min-height: 88px; padding: 16px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 12px; align-items: center; text-align: left; color: var(--ink); font-family: var(--f-display); cursor: pointer; background: var(--ld-white-50); border: 1px solid var(--ld-border); border-radius: 24px; box-shadow: var(--ld-shadow-card); }
.ld-funding-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--ld-neutral-25); display: grid; place-items: center; }
.ld-funding-icon img { display: block; width: 28px; height: 28px; object-fit: contain; }
.ld-funding-copy { display: grid; gap: 4px; min-width: 0; }
.ld-funding-copy strong { font-size: 16px; font-weight: 500; line-height: 20px; }
.ld-funding-copy small { font-size: 12px; font-weight: 400; line-height: 16px; color: var(--ink-3); }
.ld-funding-chevron { width: 20px; height: 20px; opacity: .5; transform: rotate(-90deg); }

/* Gray amount options with the requested black selected state. */
.screen .ld-amount-pill { background: var(--ld-neutral-50) !important; }
.screen .ld-amount-pill[aria-pressed="true"] { background: var(--ld-black) !important; color: var(--ld-white) !important; box-shadow: none; }

.ld-funding-icon svg { opacity: .64; }
.ld-connected-account { grid-template-columns: 48px minmax(0, 1fr) auto; }
.ld-connected-account .ld-funding-copy strong, .ld-connected-account .ld-funding-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-account-balance { font-size: 16px; font-weight: 500; line-height: 20px; color: var(--ink); white-space: nowrap; text-align: right; }

.ld-funding-options { display: grid; gap: 8px; margin-top: 8px; }
