/* Project Builder preview. Tokens, type and buttons come from ../style.css */
.pb { min-height: 100svh; display: flex; flex-direction: column; background: var(--white); padding-bottom: 0; }

.pb-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px var(--pad); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); border-bottom: 1px solid #e9ebee; }
.pb-brand img { width: 150px; }
.pb-close { justify-self: end; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--mist); font-size: 24px; line-height: 1; transition: transform .35s var(--spring), background .2s; }
.pb-close:hover { transform: rotate(90deg); background: var(--hot); }

.pb-steps { list-style: none; display: flex; gap: 6px; padding: 5px; margin: 0; background: var(--mist); border-radius: 999px; }
.pb-steps button { appearance: none; border: 0; background: none; cursor: pointer; padding: 9px 18px; border-radius: 999px; font-family: var(--display); font-stretch: 80%; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); transition: background .35s, color .35s; }
.pb-steps button:disabled { cursor: default; opacity: .55; }
.pb-steps li.done button { color: var(--navy); }
.pb-steps li.on button { background: var(--navy); color: #fff; opacity: 1; }

.pb-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(24px, 5vh, 64px) var(--pad) 48px; }
.pane { display: grid; gap: clamp(20px, 3.4vh, 36px); animation: paneIn .7s var(--out) both; }
.pane[hidden] { display: none; }
@keyframes paneIn { from { opacity: 0; transform: translateY(34px); } }
.pane .big { font-size: clamp(40px, 6vw, 92px); }
.pane-sub { margin-top: 12px; font-size: clamp(17px, 1.5vw, 21px); color: var(--dim); max-width: 48ch; }
.pane-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pb-link { appearance: none; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 16px; padding: 10px 0; border-bottom: 2px solid var(--hot); transition: color .2s; }
.pb-link:hover { color: var(--hot-ink); }
.btn:disabled { opacity: .35; pointer-events: none; }
.pane .btn { border: 0; cursor: pointer; }

/* 1 photo */
.drop { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; min-height: min(46vh, 440px); border-radius: 28px; background: var(--mist); cursor: pointer; overflow: hidden; text-align: center; outline: 2px dashed #c4cbd3; outline-offset: -14px; transition: background .3s, outline-color .3s, transform .5s var(--spring); }
.drop:hover, .drop.over { background: #e9eef2; outline-color: var(--hot-ink); }
.drop.over { transform: scale(1.015); }
.drop-disc { width: 86px; margin-bottom: 14px; animation: turn 14s linear infinite; }
.drop b { font-family: var(--display); font-stretch: 78%; font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 3vw, 40px); line-height: 1; }
.drop span { color: var(--dim); }
.drop-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: thumbIn .8s var(--out); }
@keyframes thumbIn { from { clip-path: inset(48% 48% 48% 48% round 30px); } to { clip-path: inset(0); } }
.drop.has { outline: none; }
.drop.has::after { content: "Change photo"; position: absolute; right: 16px; bottom: 16px; padding: 9px 16px; border-radius: 999px; background: rgba(255,255,255,.9); font-weight: 600; font-size: 14px; }

.samples p { font-weight: 600; margin-bottom: 12px; }
.samples-row { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 12px; }
.sample { appearance: none; border: 0; padding: 8px 8px 12px; border-radius: 18px; background: var(--mist); cursor: pointer; text-align: left; transition: transform .4s var(--spring), background .25s, box-shadow .25s; }
.sample img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.sample b { display: block; font-weight: 700; font-size: 16px; padding: 0 6px; }
.sample i { font-style: normal; color: var(--dim); font-size: 14px; padding: 0 6px; }
.sample:hover { transform: translateY(-4px); background: #e9eef2; }
.sample.on { background: #fff; box-shadow: inset 0 0 0 2px var(--navy), 0 18px 34px -22px rgba(23,28,40,.5); }
.drop { min-height: min(38vh, 380px); }

/* 2 details */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 56px); }
.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 12px; font-family: var(--display); font-stretch: 80%; font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .03em; }
.choices { display: grid; gap: 10px; }
.choices-2 { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--mist); cursor: pointer; transition: background .25s, box-shadow .25s, transform .4s var(--spring); }
.choice input { position: absolute; opacity: 0; }
.choice b { display: block; font-weight: 700; font-size: 17px; line-height: 1.2; }
.choice i { font-style: normal; color: var(--dim); font-size: 14.5px; }
.choice:hover { transform: translateY(-2px); }
.choice:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 2px var(--navy), 0 18px 34px -22px rgba(23,28,40,.5); }
.choice:has(input:focus-visible) { box-shadow: inset 0 0 0 3px var(--hot-ink); }
.choice-img { flex-direction: column; align-items: flex-start; }
.choice-img img { width: 62%; margin: -4px auto 0; transition: transform .6s var(--spring); }
.choice-img:has(input:checked) img { transform: scale(1.1) rotate(-3deg); }
.size-num { display: block; font-size: 20px; color: var(--dim); }
.size-num b { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: clamp(56px, 7vw, 104px); line-height: .9; color: var(--ink); margin-right: 6px; }
#area { width: 100%; margin: 16px 0 6px; accent-color: var(--navy); height: 28px; }
.size-marks { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--dim); }
.pb .switch { display: inline-grid; }
.pb .switch button[aria-selected="true"] + button + .switch-thumb, .pb .switch-thumb { transition: transform .55s var(--spring); }
.pb[data-who="pro"] .switch-thumb { transform: translateX(100%); }

/* 3 preview */
.viewer { position: relative; border-radius: 28px; overflow: hidden; background: var(--navy); aspect-ratio: 16 / 9; max-height: 58vh; width: 100%; margin: 0 auto; user-select: none; touch-action: pan-y; }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.after-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--cut, 100%)); }
.scan { position: absolute; top: 0; bottom: 0; left: var(--scan, 0%); width: 3px; background: #fff; box-shadow: 0 0 40px 14px rgba(162,182,195,.75); opacity: 0; }
.scan img { position: absolute; top: 50%; left: 50%; width: 74px; margin: -37px 0 0 -37px; animation: turn 1.1s linear infinite; filter: drop-shadow(0 6px 16px rgba(0,0,0,.5)); }
.viewer.working .scan { opacity: 1; }
.handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 44px; margin-left: -22px; cursor: ew-resize; display: none; outline: none; }
.handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(23,28,40,.15); }
.handle span { position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: #fff url(../img/disc-navy.svg) center / 30px no-repeat; box-shadow: 0 10px 30px -8px rgba(23,28,40,.6); transition: transform .35s var(--spring); }
.handle:hover span, .handle:focus-visible span { transform: scale(1.14); }
.viewer.ready .handle { display: block; }
.tagl, .tagr { position: absolute; bottom: 16px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.92); font-family: var(--display); font-stretch: 80%; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; opacity: 0; transition: opacity .4s; }
.tagl { left: 16px; } .tagr { right: 16px; }
.viewer.ready .tagl, .viewer.ready .tagr { opacity: 1; }
.nophoto { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #fff; font-size: 18px; }
.nophoto[hidden] { display: none; }
.pv-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.pv-bar[hidden] { display: none; }
.pv-bar-track { height: 10px; border-radius: 10px; background: var(--mist); overflow: hidden; }
.pv-bar-track i { display: block; height: 100%; width: 100%; border-radius: 10px; background: var(--navy); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .4s linear; }
.pv-bar span { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 16ch; text-align: right; }
.pv-note { font-size: 14px; color: var(--dim); max-width: 70ch; }

/* 4 quote */
.quote { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px clamp(24px, 4vw, 56px); align-items: start; }
.q-lines { display: grid; gap: 10px; grid-column: 1; grid-row: 1 / span 4; }
.q-line { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 14px; padding: 12px 20px 12px 12px; border-radius: 18px; background: var(--mist); animation: paneIn .6s var(--out) both; animation-delay: calc(var(--i) * 90ms); }
.q-line img { width: 84px; height: 62px; object-fit: contain; mix-blend-mode: multiply; }
.q-line b { display: block; font-weight: 700; font-size: 17px; line-height: 1.2; }
.q-line i { font-style: normal; color: var(--dim); font-size: 14.5px; }
.q-line strong small { font-size: .55em; font-weight: 700; color: var(--dim); }
.q-line strong { font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: 24px; white-space: nowrap; }
.q-total { grid-column: 2; padding: 26px 28px; border-radius: 24px; background: var(--navy); color: #fff; }
.q-total span { font-family: var(--display); font-stretch: 80%; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--hot); }
.q-total b { display: block; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: clamp(56px, 6.4vw, 96px); line-height: 1; margin: 6px 0; font-variant-numeric: tabular-nums; }
.q-total i { font-style: normal; font-size: 14px; color: rgba(255,255,255,.7); }
.q-cta { grid-column: 2; display: grid; gap: 10px; }
.btn-ghost { background: #fff; box-shadow: inset 0 0 0 2px var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--mist); }
.q-form { grid-column: 2; display: flex; gap: 8px; }
.q-form[hidden], .q-sent[hidden] { display: none; }
.q-form input { flex: 1; min-width: 0; height: 56px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--mist); font: inherit; outline: none; }
.q-form input:focus { box-shadow: inset 0 0 0 2px var(--hot-ink); }
.q-sent { grid-column: 2; padding: 14px 18px; border-radius: 16px; background: var(--mist); font-size: 14.5px; }
.q-note { grid-column: 1 / -1; font-size: 13.5px; color: var(--dim); max-width: 90ch; }

.who-line { margin-top: 12px; color: var(--dim); font-size: 15.5px; max-width: 44ch; min-height: 3em; }
.howto { border-top: 1px solid #e6e8ec; padding-top: clamp(24px, 4vh, 44px); }
.howto h2 { font-family: var(--display); font-stretch: 70%; font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 4vw, 58px); line-height: .95; }
.howto .lead { margin: 10px 0 22px; color: var(--dim); font-size: clamp(16px, 1.4vw, 20px); max-width: 60ch; }
.ht-steps { list-style: none; margin: 0; padding: 0; counter-reset: ht; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ht-steps li { counter-increment: ht; position: relative; padding: 18px 18px 20px; border-radius: 18px; background: var(--mist); animation: paneIn .6s var(--out) both; animation-delay: calc(var(--i) * 70ms); }
.ht-steps li::before { content: counter(ht); display: block; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 34px; line-height: 1; color: var(--hot-ink); margin-bottom: 8px; }
.ht-steps b { display: block; font-weight: 700; font-size: 17px; line-height: 1.2; margin-bottom: 4px; }
.ht-steps span { color: var(--dim); font-size: 14.5px; line-height: 1.4; display: block; }
.ht-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px; }
.ht-foot p { color: var(--dim); font-size: 14.5px; max-width: 60ch; }
.howto.pro .ht-steps { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 860px) {
  .pb-top { grid-template-columns: auto 1fr auto; padding: 10px 14px; gap: 10px; }
  .pb-brand img { width: 44px; height: 44px; object-fit: cover; object-position: left; }
  .pb-steps { justify-self: center; gap: 0; padding: 4px; }
  .pb-steps button { padding: 8px 10px; font-size: 12px; }
  .pb-main { padding: 22px 16px 32px; }
  .fields, .quote { grid-template-columns: 1fr; }
  .ht-steps, .howto.pro .ht-steps { grid-template-columns: 1fr 1fr; }
  .q-lines, .q-total, .q-cta, .q-form, .q-sent { grid-column: 1; grid-row: auto; }
  .viewer { aspect-ratio: 4 / 3; border-radius: 22px; }
  .drop { min-height: 40vh; border-radius: 22px; }
  .q-line { grid-template-columns: 60px 1fr auto; padding: 10px 14px 10px 8px; }
  .q-line img { width: 60px; height: 48px; }
  .q-line strong { font-size: 20px; }
  .pane-nav .btn { padding: 0 20px; }
}
