/* Paint-job price guide by house size. Lift out: remove this file, price-guide.js and the
   {{part:price-guide}} markup. Uses the site's tokens (--ink, --yolk, --card …) from styles.css. */
.pg { display: grid; gap: 22px; align-items: start; }
@media (min-width: 960px) { .pg { grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 36px; } }

/* Questions */
.pg-form { min-width: 0; }
.pg-q { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.pg-q[hidden] { display: none; }
.pg-q legend { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 0; font: 700 1.2rem/1.25 var(--head); letter-spacing: -.01em; }
.pg-n { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--yolk); font: 800 .9rem/1 var(--head); }
.pg-hint { margin: -4px 0 12px; font-size: .93rem; color: var(--muted); }
.pg-opts { display: grid; gap: 8px; }
.pg-jobs { grid-template-columns: 1fr 1fr; }
.pg-jobs .pg-opt:last-child { grid-column: 1 / -1; }
@media (min-width: 640px) { .pg-jobs { grid-template-columns: repeat(5, 1fr); } .pg-jobs .pg-opt:last-child { grid-column: auto; } }
.pg-row { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); }
.pg-checks { grid-template-columns: 1fr; }
@media (min-width: 520px) { .pg-checks { grid-template-columns: 1fr 1fr; } }
.pg-opt { position: relative; display: flex; }
.pg-opt[hidden] { display: none; }
.pg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pg-opt > span { flex: 1; display: grid; align-content: center; gap: 3px; min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 700; line-height: 1.2; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s, transform .15s; }
.pg-opt small { font-weight: 500; font-size: .82rem; color: var(--muted); }
.pg-opt:hover > span { border-color: #a89f8f; }
.pg-opt input:checked + span { border-color: var(--ink); background: var(--yolk-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.pg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.pg-opt input:active + span { transform: scale(.98); }
.pg-jobs .pg-opt > span { justify-items: start; padding: 14px; }
.pg-jobs svg { width: 28px; height: 28px; margin-bottom: 6px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-jobs input:checked + span svg { stroke: var(--clay); }
.pg-sm > span { text-align: center; justify-items: center; font-size: 1.1rem; }
.pg-chk > span { grid-template-columns: 22px 1fr; align-items: center; gap: 10px; font-weight: 600; }
.pg-chk > span::before { content: ""; width: 22px; height: 22px; border: 2px solid #8f877a; border-radius: 6px; background: #fff center / 75% no-repeat; transition: background-color .15s, border-color .15s; }
.pg-chk input:checked + span::before { border-color: var(--ink); background-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2b33d' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4 9-9.5'/%3E%3C/svg%3E"); }
.pg-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; }
.pg-step { width: 56px; height: 56px; border: 0; background: transparent; color: var(--ink); font: 600 1.7rem/1 var(--head); cursor: pointer; }
.pg-step:hover { background: var(--sage); }
.pg-step:focus-visible { outline-offset: -4px; }
.pg-stepper input { width: 64px; height: 56px; border: 0; border-inline: 1.5px solid var(--line); background: transparent; text-align: center; font: 700 1.5rem/1 var(--head); color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.pg-stepper input::-webkit-inner-spin-button, .pg-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* The live range, pinned under the header while a phone visitor works through the questions. */
.pg-peek { display: none; }
@media (max-width: 959px) {
  .pg-on .pg-peek { position: sticky; top: calc(var(--head-h) + 6px); z-index: 5; display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 8px 10px 8px 8px; border-radius: 16px; background: var(--ink); color: var(--paper); box-shadow: 0 10px 24px -12px rgb(19 32 29 / .6); }
  .pg-peek .pg-house { flex: none; width: 60px; height: auto; margin: 0; padding: 4px; border-radius: 10px; background: #e4eadf; }
  .pg-peek-txt { display: grid; flex: 1; min-width: 0; }
  .pg-peek-lbl { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--yolk-2); }
  .pg-peek-num { font: 800 1.3rem/1.15 var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .pg-peek-go { flex: none; padding: 9px 12px; border-radius: 999px; background: rgb(255 255 255 / .12); color: var(--paper); font-size: .85rem; font-weight: 700; text-decoration: none; }
}

/* The result */
.pg-result { padding: 22px; border-radius: 22px; background: var(--ink); color: var(--on-dark); box-shadow: var(--shadow-l); scroll-margin-top: calc(var(--head-h) + 70px); }
@media (min-width: 960px) { .pg-result { position: sticky; top: calc(var(--head-h) + 16px); padding: 28px; } .pg-result .pg-house { max-width: 250px; } }
.pg-top { display: grid; justify-items: start; }
.pg-result .pg-house { width: 100%; max-width: 190px; height: auto; margin: 0 0 12px; padding: 10px 12px 0; border-radius: 16px; background: #e4eadf; }
.pg-label { margin: 0 0 4px; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--yolk-2); }
.pg-range { margin: 0 0 4px; font: 800 clamp(1.9rem, 7vw, 2.5rem)/1.1 var(--head); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pg-for { margin: 0 0 16px; color: var(--on-dark-2); font-size: .95rem; }
.pg-lines { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid rgb(255 255 255 / .12); }
.pg-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgb(255 255 255 / .12); font-size: .95rem; }
.pg-lines li span:last-child { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-lines li span:last-child::before { content: "from "; font-weight: 400; color: var(--on-dark-2); }
@media (prefers-reduced-motion: no-preference) { .pg-lines li { animation: pg-line .35s var(--ease) both; } .pg-lines li:nth-child(2) { animation-delay: .04s; } .pg-lines li:nth-child(3) { animation-delay: .08s; } .pg-lines li:nth-child(4) { animation-delay: .12s; } .pg-lines li:nth-child(n+5) { animation-delay: .16s; } }
@keyframes pg-line { from { opacity: 0; transform: translateX(-6px); } }
.pg-demo { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: rgb(242 179 61 / .14); color: var(--yolk-2); font-size: .88rem; }
.pg-demo strong { color: #fff; }
.pg-btns { display: grid; gap: 10px; }
.pg-btns .btn { width: 100%; }
.pg-result .btn-line { border-color: rgb(246 242 234 / .7); color: var(--on-dark); }
.pg-result .btn-line:hover { background: var(--on-dark); color: var(--ink); }
.pg-result :focus-visible { outline-color: var(--yolk); }
.pg-fine { margin: 14px 0 0; font-size: .85rem; color: var(--on-dark-2); }
.no-js .pg-lines, .no-js .pg-range, .no-js .pg-for, .no-js .pg-demo { display: none; }

/* The little house answers the choices: it widens with bedrooms, gains a storey or stumps, and the parts
   being painted turn fresh. Only transforms, opacity and fills change. */
.pg-house .pg-ground { fill: #b9c7b2; }
.pg-house .pg-wall { fill: #d5cdbb; transition: fill .45s; }
.pg-house .pg-trim { fill: #b9b09c; transition: fill .45s; }
.pg-house .pg-win { fill: #8fa9b4; transition: fill .45s; }
.pg-house .pg-door { fill: #8a7d68; transition: fill .45s; }
.pg-house .pg-roof { fill: #5b605f; transition: transform .5s var(--ease); }
.pg-house .pg-stilts { fill: #6f675a; stroke: #6f675a; stroke-width: 4; opacity: 0; transition: opacity .35s; }
.pg-house .pg-upper { opacity: 0; transform: translateY(46px); transition: opacity .35s, transform .5s var(--ease); }
.pg-house .pg-bld { transition: transform .5s var(--ease); }
.pg-house .pg-body { transform-box: view-box; transform-origin: 120px 156px; transition: transform .5s var(--ease); }
.pg[data-beds="2"] .pg-body { transform: scaleX(.82); }
.pg[data-beds="4"] .pg-body { transform: scaleX(1.12); }
.pg[data-beds="5"] .pg-body { transform: scaleX(1.24); }
.pg[data-job="rooms"] .pg-body, .pg[data-job="small"] .pg-body { transform: none; }
.pg[data-storeys="2"]:is([data-job="outside"], [data-job="both"]) .pg-upper { opacity: 1; transform: none; }
.pg[data-storeys="2"]:is([data-job="outside"], [data-job="both"]) .pg-roof { transform: translateY(-46px); }
.pg[data-storeys="high"]:is([data-job="outside"], [data-job="both"]) .pg-bld { transform: translateY(-28px); }
.pg[data-storeys="high"]:is([data-job="outside"], [data-job="both"]) .pg-stilts { opacity: 1; }
.pg:is([data-job="outside"], [data-job="both"]) .pg-wall { fill: #f4f1ea; }
.pg:is([data-job="outside"], [data-job="both"]) .pg-trim { fill: #2f4036; }
.pg:is([data-job="outside"], [data-job="both"]) .pg-door { fill: #c99a3e; }
.pg:is([data-job="inside"], [data-job="both"]) .pg-win { fill: #f7cf7a; }
.pg[data-job="rooms"] .pg-win.w1 { fill: #f7cf7a; }
.pg[data-job="small"] .pg-door { fill: #f2b33d; }
@media (prefers-reduced-motion: reduce) { .pg-house *, .pg-opt > span, .pg-chk > span::before { transition: none !important; } }
