/* Alder & Pine Home — shopper screens. Tokens from design's V1 (Pegasus Components). */
:root {
  --ink: #1C1A17; --muted: #5E594F; --faint: #6B655A;
  --paper: #F4F1EA; --page: #EAE6DD; --card: #FFFDF8; --line: #DDD7CB; --line-2: #EAE5DA; --field: #BDB6A7;
  --green: #2E5B45; --green-soft: #E4ECE5; --on-green: #FFFDF8;
  --warn-bg: #F7EBD2; --warn: #7A5200; --warn-ink: #5C3E00;
  --bad-bg: #F6E1DC; --bad: #9A3324; --bad-ink: #5A1F16;
  --note: #EDE8DE;
  --serif: 'Source Serif 4', Georgia, serif; --sans: 'Instrument Sans', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--sans); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--green); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 2; height: 56px; display: flex; align-items: center; padding: 0 6px; border-bottom: 1px solid var(--line); background: var(--paper); }
.top .back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 28px; line-height: 1; text-decoration: none; color: var(--ink); }
.top .back[hidden] { visibility: hidden; display: flex; }
.top .brand { flex: 1; text-align: center; font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.top .spacer { width: 44px; }

main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; background: var(--paper); }
@media (min-width: 560px) { main { margin: 24px auto; border-radius: 18px; border: 1px solid var(--line); flex: none; } }
.pad { padding: 24px 20px 28px; display: flex; flex-direction: column; gap: 20px; }
.foot { padding: 18px 20px 28px; text-align: center; font-size: 12px; color: var(--faint); }

h1 { margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.15; font-weight: 500; text-wrap: pretty; }
h1.sm { font-size: 28px; }
.lead { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 14px; color: var(--muted); }
.input { height: 50px; width: 100%; border: 1px solid var(--field); border-radius: 10px; background: var(--card); padding: 0 14px; font-size: 16px; }
.input.big { height: 56px; font-size: 22px; font-weight: 600; }
.input[aria-invalid="true"] { border: 2px solid var(--bad); padding: 0 13px; }
.err { font-size: 14px; font-weight: 600; color: var(--bad); }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 600; }
.money .input { padding-left: 32px; }

.btn { height: 52px; border: none; border-radius: 10px; background: var(--green); color: var(--on-green); font-size: 16px; font-weight: 600; cursor: pointer; padding: 0 18px; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--field); }
.btn.danger { background: transparent; color: var(--bad); border: 1.5px solid var(--bad); }
.btn.sm { height: 44px; font-size: 15px; }
.link { border: none; background: transparent; color: var(--green); font-size: 15px; font-weight: 600; cursor: pointer; padding: 10px 4px; text-decoration: underline; }
.link.plain { text-decoration: none; }
.link.bad { color: var(--bad); }

.card { border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.card.tap { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; cursor: pointer; text-decoration: none; color: var(--ink); }
.card.tap:hover { border-color: var(--field); }
.card .kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line-2); }
.card .kv:last-child { border-bottom: none; }
.card.agent { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.empty { padding: 18px 16px; border: 1px dashed var(--field); border-radius: 14px; font-size: 15px; line-height: 1.45; color: var(--muted); display: flex; flex-direction: column; gap: 12px; }

.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.dark { background: var(--ink); color: var(--paper); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.outline { border: 1px solid var(--ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; display: flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1px solid var(--field); background: transparent; font-size: 15px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }

.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; border: none; background: transparent; padding: 0; cursor: pointer; text-align: left; width: 100%; }
.toggle .sw { width: 50px; height: 30px; border-radius: 999px; background: #CFC8BA; display: flex; align-items: center; padding: 3px; flex-shrink: 0; }
.toggle .sw i { width: 24px; height: 24px; border-radius: 50%; background: var(--card); }
.toggle[aria-checked="true"] .sw { background: var(--green); justify-content: flex-end; }

.note { padding: 16px; border-radius: 14px; background: var(--note); font-size: 15px; line-height: 1.5; }
.alert { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.alert strong { font-size: 16px; }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); } .alert.warn strong { color: var(--warn); }
.alert.bad { background: var(--bad-bg); color: var(--bad-ink); } .alert.bad strong { color: var(--bad); }
.alert.good { background: var(--green-soft); color: var(--ink); } .alert.good strong { color: var(--green); }

.keybox { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--green); background: var(--green-soft); }
.keybox code { font-family: var(--mono); font-size: 14px; word-break: break-all; background: var(--card); padding: 12px; border-radius: 8px; border: 1px solid var(--line); }

.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); }
.meter.full i { background: var(--warn); }

.log { display: flex; flex-direction: column; }
.log .item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #E4DFD4; }
.log .item > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.log .what { font-size: 15px; font-weight: 600; }
.log .detail { font-size: 14px; color: var(--muted); }
.log .when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.log .item.stop .what { color: var(--bad); }

.sheet { position: fixed; inset: 0; background: rgba(28,26,23,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 5; }
.sheet > div { width: 100%; max-width: 520px; background: var(--card); border-radius: 22px 22px 0 0; padding: 26px 20px 38px; display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { margin: 0; font-size: 22px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1:focus { outline: none; }
.card .kv > span:last-child { min-width: 0; overflow-wrap: anywhere; text-align: right; }

/* Step 4: approvals and payment */
.center { text-align: center; }
.stack.tight { gap: 3px; }
.grow { flex: 1; min-width: 0; }
.go { font-size: 14px; font-weight: 700; color: var(--green); white-space: nowrap; }
.label.green { color: var(--green); }
.card.waiting { border: 1.5px solid var(--green); background: var(--green-soft); }
.card.tap.static { cursor: default; }
.card .kv.col { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 12px 16px; }
.row-link { text-decoration: none; color: var(--ink); }
.status { font-size: 13px; font-weight: 700; white-space: nowrap; }
.status.ok { color: var(--green); } .status.muted { color: var(--muted); }
.line-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.line-item:last-child { border-bottom: none; }
.thumb { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; background: repeating-linear-gradient(135deg, #E9E4D9 0 6px, #F1EDE4 6px 12px); }
.warn-text { color: var(--warn); font-weight: 700; }
.totals { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.between.total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 700; }
.option { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.option:has(input:checked) { border: 2px solid var(--green); padding: 11px 13px; }
.option input { width: 22px; height: 22px; accent-color: var(--green); flex-shrink: 0; margin: 0; }
.option.off { opacity: .55; cursor: default; }
.opt-name { font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; border: 1px solid #8C8578; color: var(--muted); }
.tag.dashed { align-self: flex-start; border-style: dashed; }
.btn.dark { background: var(--ink); }
.input.area { height: 96px; padding: 12px 14px; resize: vertical; }
fieldset.plain { border: none; padding: 0; margin: 0; }
.stripe-box { min-height: 120px; padding: 4px 0; }
.check { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: var(--on-green); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.record-link { background: var(--note); border: none; }
.alert:not(.good):not(.bad):not(.warn) { background: var(--note); }
.card .kv.col > span:last-child { text-align: left; }

/* Step 5: Silver Lake (lender) */
:root { --navy: #2F4E78; --navy-soft: #E3E9F2; --navy-ink: #1D324F; --navy-line: #C9D1DD; }
body.lender .top { background: var(--navy); border-bottom-color: var(--navy); }
body.lender .top .back, body.lender .top .brand { color: #fff; }
.top .brand .sl-brand { display: block; font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: .02em; line-height: 1.1; }
.top .brand .sl-sub { display: block; font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
body.lender main { background: #F7F9FC; }
.lender-body .input { border-color: #9AA6B8; background: #fff; }
.sl-note { padding: 12px 20px; background: var(--navy-soft); font-size: 14px; line-height: 1.45; color: var(--navy-ink); }
.sl-h { font-family: var(--sans); font-size: 26px; font-weight: 700; }
.sl-info { padding: 12px 16px; border-radius: 12px; background: var(--navy-soft); font-size: 14px; line-height: 1.45; color: var(--navy-ink); }
.sl-card { border-color: var(--navy-line); background: #fff; }
.btn.navy { background: var(--navy); color: #fff; }
.link.navy-text { color: var(--navy); }
.link.inline { padding: 0; font-size: inherit; }
.input.narrow { max-width: 160px; letter-spacing: .3em; }
.input.code { font-size: 24px; letter-spacing: .5em; text-align: center; }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); flex-shrink: 0; }
.check-row:has(input[aria-invalid="true"]) { color: var(--bad); }
.reveal { display: flex; gap: 6px; align-items: center; }
.reveal .input { flex: 1; }
.test-ids { font-size: 14px; color: var(--muted); border: 1px dashed var(--field); border-radius: 10px; padding: 10px 14px; }
.test-ids summary { cursor: pointer; font-weight: 600; }
.offer { border: 1.5px solid var(--navy); border-radius: 16px; background: #fff; overflow: hidden; }
.offer-top { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--navy-soft); color: var(--navy-ink); font-size: 14px; }
.offer-top strong { font-size: 34px; color: var(--ink); letter-spacing: -.01em; }
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; }
.offer-grid > div { padding: 12px 18px; border-top: 1px solid #E6EAF0; display: flex; flex-direction: column; gap: 2px; }
.offer-grid > div:nth-child(odd):not(.wide) { border-right: 1px solid #E6EAF0; }
.offer-grid > div span { font-size: 13px; color: var(--muted); }
.offer-grid > div strong { font-size: 17px; }
.offer-grid .wide { grid-column: 1 / 3; flex-direction: row; justify-content: space-between; }
.disclosure { border: 1px solid var(--navy-line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.disclosure summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: 15px; }
.disclosure > div { margin-top: 10px; line-height: 1.5; }
.steps .step { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #E6EAF0; font-size: 15px; line-height: 1.45; }
.steps .step:last-child { border-bottom: none; }
.steps .num { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--navy); color: var(--navy); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps .num.on { background: var(--navy); color: #fff; }
.split { padding-top: 4px; }
