/* Cash For Cars Buffalo — online offer flow */
.ew-main { padding: 34px 0 72px; min-height: 70vh; }
.ew-stage { width: 100%; max-width: 688px; margin: 0 auto; padding: 0 24px; }
.ew-on-offer .ew-stage { max-width: 1120px; }
.ew-on-offer [data-bw-call], .ew-on-offer .bw-band { display: none; }
.ew-screen { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: 30px 36px 34px; box-shadow: 8px 8px 0 var(--paper-deep); }
.ew-on-offer .ew-screen { background: transparent; border: 0; box-shadow: none; padding: 0; }
.ew-in-fwd { animation: ew-fwd .22s ease-out; }
.ew-in-back { animation: ew-bk .22s ease-out; }
@keyframes ew-fwd { from { opacity: 0; transform: translateX(28px); } }
@keyframes ew-bk { from { opacity: 0; transform: translateX(-28px); } }
.ew-boot { display: flex; gap: 8px; justify-content: center; padding: 80px 0; }
.ew-boot__dot, .ew-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rust); animation: ew-pulse 1s infinite ease-in-out; display: inline-block; }
.ew-boot__dot:nth-child(2), .ew-dots i:nth-child(2) { animation-delay: .15s; }
.ew-boot__dot:nth-child(3), .ew-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ew-pulse { 50% { opacity: .25; transform: scale(.7); } }

.ew-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0 6px -4px; padding: 0 6px; border: 0; background: none; color: var(--ink-soft); font: 600 15px/1 var(--display); cursor: pointer; border-radius: 8px; }
.ew-back:hover { color: var(--ink); background: var(--paper); }
.ew-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ew-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--lake-tint); color: var(--lake); font-weight: 700; font-size: 14.5px; }
.ew-chip svg { width: 26px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ew-q { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 10px; }
.ew-q:focus { outline: none; }
.ew-help { color: var(--ink-soft); margin: 0 0 22px; font-size: 16.5px; }
.ew-actions { margin-top: 24px; display: flex; justify-content: flex-end; }
.ew-actions .bw-cta { width: auto; min-width: 220px; }
.ew-short { max-width: 260px; }
.ew-flag { background: var(--rust-tint); border-left: 4px solid var(--rust); padding: 12px 14px; border-radius: 8px; margin: 0 0 18px; font-size: 15.5px; }
.ew-labelrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ew-help.bw-textlink, .ew-labelrow .bw-textlink { font-size: 14.5px; padding: 0; min-height: 0; }
.ew-vin { text-transform: uppercase; letter-spacing: .08em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.ew-count { margin: 4px 0 0; font-size: 13px; color: var(--pencil); text-align: right; }
.ew-found { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--lake-tint); color: var(--ink); }
.ew-found svg, .ew-who svg, .ew-picked svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* segmented YMM / VIN */
.ew-seg { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: 4px 0 22px; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; }
.ew-seg__b { min-height: 44px; padding: 8px 18px; border: 0; border-radius: 9px; background: transparent; font: 700 15.5px/1 var(--display); color: var(--ink-soft); cursor: pointer; }
.ew-seg__b[aria-checked="true"] { background: var(--ink); color: var(--paper); }

/* tap answers */
.ew-opts { display: grid; gap: 10px; }
.ew-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 14px 16px; text-align: left;
  background: #fff; border: 1.5px solid #c6bba6; border-radius: 12px; font: 600 17px/1.3 var(--display); color: var(--ink); cursor: pointer;
  transition: border-color .12s, background .12s, transform .12s;
}
.ew-opt:hover:not([disabled]) { border-color: var(--ink); }
.ew-opt__mark { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid #a59a86; position: relative; }
.ew-opt[aria-checked="true"], .ew-win[aria-pressed="true"] { border-color: var(--rust); background: #fff6f1; box-shadow: inset 0 0 0 1px var(--rust); }
.ew-opt[aria-checked="true"] .ew-opt__mark, .ew-win[aria-pressed="true"] .ew-opt__mark { border-color: var(--rust); background: var(--rust); }
.ew-opt[aria-checked="true"] .ew-opt__mark::after, .ew-win[aria-pressed="true"] .ew-opt__mark::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ew-opt.is-picked { transform: scale(.99); }
.ew-opt[disabled] { cursor: not-allowed; background: transparent; border-style: dashed; color: #8d8475; }
.ew-opt__t { flex: 1; }
.ew-opt__off { font-size: 13px; font-weight: 600; color: var(--pencil); }
.ew-info { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; background: var(--lake-tint); border-radius: 10px; font-size: 15.5px; color: var(--ink); }
.ew-info svg { width: 20px; height: 20px; flex: none; margin-top: 1px; fill: none; stroke: var(--lake); stroke-width: 2.2; stroke-linecap: round; }
.ew-next { min-width: 160px; }
.ew-check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 6px; font-weight: 600; cursor: pointer; }
.ew-check input { width: 22px; height: 22px; accent-color: var(--rust); }

/* four-corner areas */
.ew-areas { margin: 4px 0 6px; padding: 18px 16px 14px; border: 1.5px dashed #b9ad97; border-radius: 12px; background: var(--paper); }
.ew-areas legend { padding: 0 6px; font-weight: 800; font-size: 16.5px; }
.ew-areas legend span { display: block; font-weight: 500; font-size: 14px; color: var(--ink-soft); }
.ew-areas__grid { display: grid; grid-template-columns: 1fr 90px 1fr; grid-template-areas: ". f ." "a car b" "c car d" ". r ."; gap: 10px 14px; align-items: center; margin-top: 6px; }
.ew-areas__end { text-align: center; font: 600 22px/1 var(--hand); color: var(--pencil); }
.ew-areas__end--f { grid-area: f; } .ew-areas__end--r { grid-area: r; }
.ew-car { grid-area: car; width: 70px; height: 132px; justify-self: center; color: var(--ink-soft); }
.ew-car path { stroke-width: 1.8; }
.ew-tile { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; background: #fff; border: 1.5px solid #c6bba6; border-radius: 10px; font-weight: 600; font-size: 15.5px; cursor: pointer; }
.ew-tile input { width: 20px; height: 20px; accent-color: var(--rust); flex: none; }
.ew-tile:has(input:checked) { border-color: var(--rust); background: #fff6f1; }
.ew-tile--drv-f { grid-area: a; } .ew-tile--pas-f { grid-area: b; } .ew-tile--drv-r { grid-area: c; } .ew-tile--pas-r { grid-area: d; }

/* loading */
.ew-loading, .ew-end { text-align: center; padding: 18px 0 6px; }
.ew-loading__badge { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--rust-tint); border-top-color: var(--rust); animation: bw-spin 1s linear infinite; }
.ew-tick { list-style: none; padding: 0; margin: 22px auto 0; max-width: 330px; text-align: left; }
.ew-tick li { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--pencil); font-weight: 600; }
.ew-tick li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c6bba6; flex: none; }
.ew-tick li.is-done { color: var(--ink); }
.ew-tick li.is-done::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat; border-color: var(--ok); }
.ew-slow { margin-top: 16px; color: var(--ink-soft); }
.ew-end p { max-width: 520px; margin-left: auto; margin-right: auto; color: var(--ink-soft); }
.ew-end__acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; margin-top: 22px; }

/* offer page */
.ew-offer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
.ew-offer__main { min-width: 0; background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: 30px 36px 34px; box-shadow: 8px 8px 0 var(--paper-deep); }
.ew-offer__h { font-size: clamp(28px, 3.8vw, 40px); }
.ew-amt { color: var(--rust); white-space: nowrap; position: relative; }
.ew-amt::after { content: ""; position: absolute; left: -2px; right: -4px; bottom: -4px; height: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6c20-5 40-4 58-1s40 3 58-2' fill='none' stroke='%23b23a12' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.ew-sec { padding: 22px 0 6px; border-top: 1px solid var(--rule); margin-top: 8px; }
.ew-sec:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }
.ew-sec__h { font-size: 20px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.ew-opt-tag { font: 600 13px/1 var(--display); padding: 4px 8px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); }
.ew-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ew-fhelp { margin: 5px 0 0; font-size: 14px; color: var(--pencil); }
.ew-who { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--paper); border-radius: 12px; }
.ew-who p { margin: 0; flex: 1; font-size: 15.5px; }
.ew-who { flex-wrap: wrap; }
.ew-who__lock { white-space: nowrap; font-size: 13px; color: var(--pencil); font-weight: 600; }
.ew-legal { font-size: 14px; color: var(--ink-soft); margin: 14px 0 0; }
.ew-legal .bw-textlink { font-size: 14px; padding: 0; }
.ew-legal--consent { margin: 4px 0 18px; padding: 12px 14px; border-radius: 10px; background: var(--paper); }
.ew-opmsg { color: var(--alert); font-weight: 600; margin: 0 0 12px; }
.ew-opmsg:empty { display: none; }
.ew-later { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.ew-later li { padding: 12px 14px; border: 1.5px dashed var(--rule); border-radius: 10px; color: var(--pencil); font-weight: 600; font-size: 15px; }
.ew-sum { margin: 16px 0 12px; padding: 12px 14px; border-radius: 10px; background: var(--alert-tint); color: var(--alert); font-size: 15.5px; }
.ew-sum:empty { display: none; }
.ew-sum .bw-textlink { color: var(--alert); padding: 0; font-size: 15px; }
.ew-accept { margin-top: 18px; min-height: 64px; font-size: 20px; }
.ew-note { font-size: 14.5px; color: var(--ink-soft); margin: 10px 0 0; text-align: center; }

/* rail */
.ew-rail { position: sticky; top: 24px; display: grid; gap: 18px; }
.ew-rail__card { background: var(--ink); color: var(--paper); border-radius: 16px; padding: 22px 24px; }
.ew-rail__k { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #cfc4af; font-weight: 700; }
.ew-rail__amt { margin: 4px 0 0; font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ew-rail__car { margin: 8px 0 0; color: #e7dccb; font-weight: 600; }
.ew-rail__speed { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); font: 600 22px/1.1 var(--hand); color: #f2a77f; }
.ew-rail__how { padding: 4px 6px; position: relative; }
.ew-rail__how h2 { font-size: 18px; font-weight: 800; }
.ew-rail__doodle { width: 120px; height: 40px; color: var(--pencil); margin-top: 6px; }
.ew-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ew-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.ew-steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* pickup */
.ew-pick__loading { display: flex; gap: 12px; align-items: center; color: var(--ink-soft); font-weight: 600; }
.ew-dots { display: inline-flex; gap: 5px; }
.ew-dots i { width: 7px; height: 7px; }
.ew-speed { font: 600 23px/1.1 var(--hand); color: var(--rust-deep); margin: -6px 0 6px; }
.ew-win { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 14px; margin: 0 0 8px; text-align: left; background: #fff; border: 1.5px solid #c6bba6; border-radius: 12px; font: 500 16px/1.3 var(--display); color: var(--ink); cursor: pointer; }
.ew-win strong { margin-right: 6px; }
.ew-moredays { font-size: 15.5px; }
.ew-days { margin-top: 8px; }
.ew-days__pager { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ew-days__k { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.ew-days__nav { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--ink); background: #fff; font-size: 22px; cursor: pointer; }
.ew-days__nav[disabled] { opacity: .35; cursor: default; }
.ew-days__strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ew-day { min-height: 60px; padding: 6px 2px; border: 1.5px solid #c6bba6; border-radius: 10px; background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 500 13px/1.1 var(--display); color: var(--ink-soft); }
.ew-day strong { font-size: 14.5px; color: var(--ink); }
.ew-day.is-weekend { background: var(--paper); }
.ew-day.is-offpage { display: none; }
.ew-day[aria-pressed="true"] { border-color: var(--lake); box-shadow: inset 0 0 0 1px var(--lake); background: var(--lake-tint); }
.ew-wins { margin-top: 12px; }
.ew-wins__k { font-weight: 700; margin: 0 0 8px; }
.ew-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: #edf5ee; font-size: 15.5px; }
.ew-picked .bw-textlink { padding: 0; margin-left: auto; }

/* dialogs */
.ew-dialog { border: 0; padding: 0; background: transparent; max-width: 520px; width: calc(100% - 32px); }
.ew-dialog::backdrop { background: rgba(29,27,23,.55); }
.ew-dialog__in { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: 28px 28px 24px; box-shadow: 8px 8px 0 rgba(0,0,0,.18); }
.ew-dialog h2 { font-size: 25px; font-weight: 800; margin-bottom: 10px; padding-right: 30px; }
.ew-dialog p { color: var(--ink-soft); }
.ew-dialog__acts { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; }
.ew-dialog__x { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--ink-soft); border-radius: 10px; }
.ew-chg { text-align: center; padding: 16px; border-radius: 12px; background: var(--paper); }
.ew-chg p { margin: 0; }
.ew-chg__k { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft) !important; }
.ew-chg__amt { font-size: 46px; font-weight: 800; color: var(--ink) !important; letter-spacing: -.03em; }
.ew-chg__car { font-weight: 600; }
.ew-chg__prev { margin-top: 6px !important; font-size: 14px; color: var(--pencil) !important; }
.ew-chg__up { margin-top: 6px !important; font-weight: 700; color: var(--ok) !important; }
.ew-vinex { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; background: var(--paper); border-radius: 10px; }
.ew-vinex code { font: 700 20px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .08em; color: var(--ink); }
.ew-vinex span { font-size: 13.5px; }
.ew-vincols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ew-vincols h3 { font-size: 15px; font-weight: 800; margin: 6px 0 6px; }
.ew-vincols ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 15px; }

/* done */
.ew-done { text-align: center; }
.ew-done__check { width: 76px; height: 76px; color: var(--ok); margin-bottom: 8px; }
.ew-done__check path { stroke-width: 3.2; }
.ew-done__pickup { text-align: left; margin: 22px auto 0; max-width: 460px; padding: 16px 18px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); }
.ew-done__pickup h2 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.ew-done__pickup p { margin: 0 0 6px; }
.ew-done__pickup .ew-note { text-align: left; }
.ew-done__h { font-size: 20px; font-weight: 800; margin: 28px 0 12px; }
.ew-done .ew-steps { max-width: 460px; margin: 0 auto; text-align: left; }
.ew-ref { margin-top: 22px; color: var(--ink-soft); }

@media (max-width: 960px) {
  .ew-offer { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ew-rail { position: static; }
  .ew-rail__card { display: none; }
}
@media (max-width: 767px) {
  .ew-main { padding: 14px 0 48px; }
  .ew-stage { padding: 0 16px; }
  .ew-screen, .ew-offer__main { border: 0; box-shadow: none; background: transparent; padding: 4px 0 0; border-radius: 0; }
  .ew-actions .bw-cta { width: 100%; }
  .ew-row { grid-template-columns: 1fr; }
  .ew-areas { padding: 14px 10px 12px; }
  .ew-areas__grid { grid-template-columns: 1fr 58px 1fr; gap: 8px; }
  .ew-car { width: 52px; height: 104px; }
  .ew-tile { font-size: 14px; padding: 8px 9px; gap: 7px; }
  .ew-days__pager { display: none; }
  .ew-days__strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .ew-day { flex: 0 0 64px; scroll-snap-align: start; }
  .ew-day.is-offpage { display: flex; }
  .ew-dialog { margin: auto auto 0; width: 100%; max-width: none; }
  .ew-dialog__in { border-radius: 18px 18px 0 0; border-bottom: 0; padding: 24px 18px 22px; box-shadow: none; }
  .ew-vincols { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .ew-in-fwd, .ew-in-back { animation: none; } }
