/* The paint-job price guide by house size (lifts out with guide.js and the [data-pg] block). Uses the site's tokens:
   --indigo, --blue, --ink, --muted, --card, --line, --paper-2, --r, --head-h, --ease. */
.pg { display: grid; gap: .9rem; }
.pg-top, .pg-more { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.pg-top { position: relative; overflow: hidden; display: grid; grid-template-columns: 46% 1fr; align-items: center; }
.pg-pic { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.pg-pic img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.pg-pic img.pg-swap { opacity: .35; }
[data-job="small"] .pg-pic img, [data-job="inside"] .pg-pic img { object-fit: contain; }
.pg-figure { padding: .75rem .9rem; }
.pg-label { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin: 0 0 .25rem; }
.pg-range { font-size: clamp(1.25rem, .9rem + 2.4vw, 2.5rem); font-weight: 500; color: var(--indigo); line-height: 1.12; margin: 0; font-variant-numeric: tabular-nums; }
.pg-tag { position: absolute; top: 6px; left: 6px; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; background: rgb(255 255 255 / .85); color: var(--muted); padding: .25em .5em; border-radius: 2px; }
.pg-more { padding: .8rem .9rem 1rem; }
.pg-lines { list-style: none; margin: 0 0 .8rem; padding: 0; }
.pg-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; color: var(--muted); animation: pg-in .4s var(--ease, ease) both; }
.pg-lines b { font-weight: 500; color: var(--ink); white-space: nowrap; }
@keyframes pg-in { from { opacity: 0; transform: translateY(4px); } }
.pg-demo { font-size: .78rem; color: #6a4d1f; background: #f5ecd9; border-radius: 2px; padding: .4rem .6rem; margin: 0 0 .8rem; }
.pg-fine { font-size: .78rem; color: var(--muted); margin: .6rem 0 0; }
.pg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pg-actions .btn { padding-inline: .5em; }

.pg-q { display: grid; gap: .7rem; margin: 0; }
.pg-q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pg-q legend { font-weight: 500; font-size: .92rem; margin-bottom: .3rem; padding: 0; display: flex; gap: .55em; align-items: baseline; }
.pg-q legend i { font-style: normal; color: var(--blue); font-size: .8rem; letter-spacing: .1em; }
.pg-chips { display: flex; gap: .45rem; overflow-x: auto; padding: 3px; margin: -3px; scrollbar-width: none; }
.pg-chips::-webkit-scrollbar { display: none; }
.pg-chips > span { display: contents; }
.pg-chip { position: relative; flex: none; }
.pg-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pg-chip span { display: flex; align-items: center; min-height: 44px; padding: .4em .9em; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); font-size: .94rem; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.pg-chip input:checked + span { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.pg-chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.pg-chip input[type="checkbox"]:checked + span::before { content: "✓"; margin-right: .4em; }
.pg-chip:hover span { border-color: var(--indigo); }
.pg-nojs { font-size: .95rem; color: var(--muted); }
.pg-ready .pg-nojs { display: none; }
.pg:not(.pg-ready) .pg-top, .pg:not(.pg-ready) .pg-more { display: none; }

/* only the questions for the chosen job */
[data-job="small"] .pg-house { display: none; }
.pg:not([data-job="small"]) .pg-smallq { display: none; }
[data-job="outside"] .x-in, [data-job="inside"] .x-out, [data-job="small"] .pg-extras { display: none; }

/* on a phone the range stays in sight while the questions are answered */
@media (max-width: 959px) {
  .pg-top { position: sticky; top: 8px; z-index: 5; box-shadow: 0 10px 24px -18px rgb(23 24 61 / .5); }
}
@media (min-width: 720px) {
  .pg-top { grid-template-columns: 1fr; }
  .pg-pic { aspect-ratio: 3 / 2; }
  .pg-figure { padding: 1rem 1.2rem .25rem; }
  .pg-tag { top: 10px; left: 10px; font-size: .66rem; }
}
@media (min-width: 960px) {
  .pg { grid-template-columns: 1fr 1.05fr; grid-template-areas: "q top" "q more"; column-gap: 2.5rem; row-gap: 0; align-items: start; }
  .pg-top { grid-area: top; border-bottom: 0; border-radius: var(--r) var(--r) 0 0; position: static; }
  .pg-more { grid-area: more; border-top: 0; border-radius: 0 0 var(--r) var(--r); padding: .75rem 1.2rem 1.2rem; }
  .pg-q { grid-area: q; gap: 1.35rem; padding-top: .25rem; }
  .pg-chips { flex-wrap: wrap; overflow: visible; }
  .pg-range { margin-bottom: .2rem; }
}
@media (prefers-reduced-motion: reduce) { .pg-lines li { animation: none; } .pg-pic img { transition: none; } }
