/* Paint-job price guide by house size ([data-guide]). Lifts out with guide.js.
   The answer is shown as a paint chip: the colour field is the house, abstracted to blocks of the
   trade's surfaces, and a fresh coat rolls across it whenever the answer changes. */
.guide__grid { display: grid; gap: 22px; }
@media (min-width: 960px) { .guide__grid { grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; } .guide__out { position: sticky; top: calc(var(--hdr) + 24px); order: 2; } }

/* options as small paint chips */
.guide__form { display: grid; gap: 12px; margin: 0; }
.opts { min-width: 0; margin: 0; padding: 0; border: 0; }
.opts[hidden] { display: none; }
.opts legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: .95rem; }
.opts__row { display: flex; gap: 8px; margin: 0 calc(var(--gut) * -1); padding: 2px var(--gut) 4px; overflow-x: auto; scrollbar-width: none; }
.opts__row::-webkit-scrollbar { display: none; }
.opts--wrap .opts__row { flex-wrap: wrap; overflow: visible; }
@media (min-width: 960px) { .opts__row { flex-wrap: wrap; margin: 0; padding: 2px 0; overflow: visible; } }
.opt { position: relative; flex: none; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { display: inline-flex; align-items: center; gap: .55em; min-height: 46px; padding: .55em 1em .55em .8em; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); font-weight: 600; font-size: .98rem; white-space: nowrap; cursor: pointer; transition: background-color .2s, box-shadow .2s, color .2s, transform .15s; }
.opt span::before { content: ""; width: 11px; height: 15px; border-radius: 2px; background: linear-gradient(#c9c4b8 0 62%, #fff 62%); box-shadow: 0 0 0 1px rgba(11, 20, 51, .18); transition: background .2s; }
.opt:hover span { box-shadow: 0 0 0 1.5px var(--pb); }
.opt input:checked + span { background: var(--pb); color: #fff; box-shadow: 0 0 0 1.5px var(--pb), 0 6px 14px -8px rgba(0, 68, 242, .9); }
.opt input:checked + span::before { background: linear-gradient(var(--yel) 0 62%, #fff 62%); box-shadow: none; }
.opt input:focus-visible + span { outline: 3px solid var(--yel); outline-offset: 2px; }
.opt input:active + span { transform: scale(.97); }

/* the answer: a big paint chip */
.pchip { border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: 0 2px 4px rgba(4, 17, 61, .08), 0 24px 48px -20px rgba(4, 17, 61, .45); }
.pchip__field { position: relative; height: 168px; overflow: hidden; background-color: #dbe5fb; background-image: linear-gradient(rgba(219, 229, 251, .6), rgba(219, 229, 251, .6)), url(/img/tex-roller.webp); background-size: auto, 300px; background-blend-mode: normal, soft-light; }
@media (min-width: 760px) { .pchip__field { height: 270px; } }
.pchip__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: #c3ccdc; }
.pchip__house { position: absolute; left: 50%; bottom: 14px; width: var(--w, 60%); height: var(--h, 40%); transform: translateX(-50%); transition: width .6s var(--ease), height .6s var(--ease); }
.pchip__roof { position: absolute; left: -5%; right: -5%; bottom: 100%; height: 34%; min-height: 34px; clip-path: polygon(0 100%, 50% 0, 100% 100%); background-color: #6f7a90; background-image: url(/img/tex-tiles.svg); background-size: 40px 24px; }
.pchip__walls { position: absolute; inset: 0; overflow: hidden; }
.pchip__old, .pchip__new { position: absolute; inset: 0; }
/* the house before: tired paint, and how tired depends on the answer */
.pchip__old { background-color: #b9bcc2; background-image: url(/img/tex-weatherboard.svg); background-size: 120px 18px; }
.pchip__old::after { content: ""; position: absolute; inset: 0; background-image: url(/img/tex-peel.svg); background-size: 120px 78px; opacity: 0; transition: opacity .3s; }
.pchip[data-cond="repairs"] .pchip__old::after { opacity: .45; }
.pchip[data-cond="weathered"] .pchip__old { background-color: #d5d3cc; }
.pchip[data-cond="weathered"] .pchip__old::after { opacity: 1; }
/* the fresh coat */
.pchip__new { background-color: var(--pb); background-image: url(/img/tex-weatherboard.svg), url(/img/tex-roller.webp); background-size: 120px 18px, 160px; background-blend-mode: normal, soft-light; clip-path: inset(0 0 0 0); }
.pchip[data-job="inside"] .pchip__old { background-image: none; background-color: #cbbfa6; }
.pchip[data-job="inside"] .pchip__new { background-color: #f3f0e8; background-image: linear-gradient(transparent calc(100% - 7px), #d8d2c4 calc(100% - 7px)), url(/img/tex-roller.webp); background-size: 100% var(--floor, 100%), 160px; }
.pchip[data-job="inside"] .pchip__walls { box-shadow: inset 0 0 0 3px #3c4b6e; }
.pchip[data-job="inside"] .pchip__walls::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(var(--room, 33.3%) - 3px), #3c4b6e calc(var(--room, 33.3%) - 3px) var(--room, 33.3%)), repeating-linear-gradient(180deg, transparent 0 calc(var(--floor, 100%) - 3px), #3c4b6e calc(var(--floor, 100%) - 3px) var(--floor, 100%)); pointer-events: none; }
.pchip[data-job="both"] .pchip__walls::after { content: ""; position: absolute; inset: 22% 12% 0; background: #f3f0e8; box-shadow: inset 0 0 0 3px #3c4b6e; opacity: .92; clip-path: inset(0 0 0 0); }
.pchip[data-job="roof"] .pchip__new { background-color: #c7ccd6; background-image: url(/img/tex-weatherboard.svg); background-size: 120px 18px; }
.pchip[data-job="roof"] .pchip__old { background-color: #c7ccd6; }
.pchip[data-job="roof"] .pchip__roof { background-color: var(--pb); background-image: url(/img/tex-tiles.svg), url(/img/tex-roller.webp); background-size: 40px 24px, 160px; background-blend-mode: normal, soft-light; }
.pchip.roll .pchip__new, .pchip.roll[data-job="roof"] .pchip__roof { animation: coat .95s var(--ease) both; }
.pchip.roll[data-job="roof"] .pchip__new { animation: none; }
@keyframes coat { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.pchip__roller { position: absolute; top: 0; bottom: 14px; left: 0; width: 10px; margin-left: -5px; border-radius: 6px; background: linear-gradient(90deg, #e7ecf8, #fff 40%, #b8c3dd); box-shadow: 0 0 10px rgba(4, 17, 61, .3); opacity: 0; pointer-events: none; }
.pchip.roll .pchip__roller { animation: roller .95s var(--ease) both; }
@keyframes roller { 0% { opacity: 0; left: var(--x0, 20%); } 8% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; left: var(--x1, 80%); } }
@media (prefers-reduced-motion: reduce) { .pchip.roll .pchip__new, .pchip.roll .pchip__roof, .pchip.roll .pchip__roller { animation: none !important; } .pchip__house { transition: none; } }

/* small jobs: no house, the jobs themselves in big painted letters */
.pchip__words { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; padding: 16px 20px; font: 600 clamp(1.6rem, 7vw, 2.4rem)/1 var(--display); text-transform: uppercase; color: var(--pb); }
.pchip__words span { display: block; }
.pchip[data-job="small"] .pchip__house, .pchip[data-job="small"] .pchip__ground { display: none; }
.pchip[data-job="small"] .pchip__words { display: flex; }

.pchip__label { padding: 16px 18px 18px; }
.pchip__name { margin: 0 0 6px; font-size: .95rem; font-weight: 700; color: var(--muted); }
.pchip__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .3em; margin: 0 0 4px; font: 600 clamp(2.1rem, 9.6vw, 3.4rem)/1 var(--display); letter-spacing: .005em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pchip__price .to { font: 500 1.1rem var(--text); color: var(--muted); }
.pchip__price.is-quote { font-size: clamp(2rem, 9vw, 2.8rem); }
.pchip__note { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.pchip__label .btn { width: 100%; }
.guide__demo { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.guide__demo::before { content: "Demo"; display: inline-block; margin-right: .5em; padding: .15em .45em; border-radius: 4px; background: #ffe9a8; color: #5a4300; font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
