/* Measure-and-quote planner. Lifts out with planner.js and the two forms (data-planner="start" and "full").
   Uses the site's colour variables, with fallbacks so it also works on its own. */
.planner { --pl-ink: var(--ink, #1b2422); --pl-line: var(--line, #dcd2c2); --pl-card: var(--card, #fffdf9); --pl-accent: var(--green, #1e3530); --pl-brass: var(--brass-text, #8a5a17); position: relative; }
.planner fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pl-step > legend { display: flex; align-items: center; gap: .7rem; padding: 0; margin: 0 0 .5rem; font: 600 clamp(1.35rem, 1.1rem + 1vw, 1.75rem)/1.15 var(--head, Georgia, serif); letter-spacing: -.02em; color: var(--pl-ink); }
.pl-step > legend [data-step-title]:focus { outline: none; }
.pl-n { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--pl-accent); color: #fff; font: 700 .95rem/1 var(--body, system-ui); letter-spacing: 0; }
.pl-help { color: var(--ink-2, #46524e); margin: 0 0 1.1rem; font-size: 1rem; }
.pl-link-note { margin: 0 0 1rem; padding: .65rem .9rem; border-radius: 10px; background: #e8efe9; color: var(--pl-accent); font-size: .95rem; font-weight: 600; }

/* Cards: rooms and shapes */
.pl-cards { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .pl-rooms { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pl-layouts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pl-card { position: relative; display: block; cursor: pointer; }
.pl-card[hidden] { display: none; }
.pl-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-box { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; height: 100%; min-height: 92px; padding: .8rem .85rem; border: 1.5px solid var(--pl-line); border-radius: 14px; background: var(--pl-card); transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s cubic-bezier(.2,.7,.2,1); }
.pl-card:hover .pl-box { border-color: var(--line-2, #c9bca8); transform: translateY(-1px); }
.pl-card input:checked + .pl-box { border-color: var(--pl-accent); background: #eef3ef; box-shadow: 0 0 0 1.5px var(--pl-accent); }
.pl-card input:focus-visible + .pl-box { outline: 3px solid var(--brass, #b07a2f); outline-offset: 2px; }
.pl-t { font-weight: 700; font-size: .97rem; line-height: 1.2; color: var(--pl-ink); }
.pl-ico { width: 34px; height: 34px; fill: none; stroke: var(--green-3, #3f6a5d); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pl-card input:checked + .pl-box .pl-ico { stroke: var(--pl-accent); }
.pl-shape { width: 56px; height: 40px; }
.pl-shape .pl-room { fill: #faf7f1; stroke: #2d3633; stroke-width: 2; }
.pl-shape .pl-run { fill: #d9d0c1; stroke: none; transition: fill .2s; }
.pl-shape .pl-fix { fill: #fff; stroke: #2d3633; stroke-width: 1.2; }
.pl-shape .pl-fix-l { stroke: #2d3633; stroke-width: 1.2; stroke-dasharray: 3 2; }
.pl-card input:checked + .pl-box .pl-run { fill: var(--sage, #a7b7a2); }

/* Switch-style checkbox */
.pl-toggle { display: inline-flex; align-items: center; gap: .7rem; margin-top: 1rem; min-height: 44px; cursor: pointer; font-weight: 600; }
.pl-toggle[hidden] { display: none; }
.pl-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: #d7cfc2; transition: background-color .2s; }
.pl-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .25s cubic-bezier(.3,.7,.2,1.3); }
.pl-toggle input:checked + .pl-switch { background: var(--pl-accent); }
.pl-toggle input:checked + .pl-switch::after { transform: translateX(18px); }
.pl-toggle input:focus-visible + .pl-switch { outline: 3px solid var(--brass, #b07a2f); outline-offset: 2px; }
.pl-toggle-sm { margin-top: .75rem; }

/* Sizes */
.pl-sizes { display: grid; gap: .8rem; }
@media (min-width: 560px) { .pl-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pl-size[hidden] { display: none; }
.pl-size label { display: flex; align-items: center; gap: .55rem; font-weight: 700; margin-bottom: .45rem; }
.pl-letter { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--brass, #b07a2f); color: var(--pl-brass); font: 700 .8rem/1 var(--mono, monospace); }
.pl-stepper { display: flex; align-items: stretch; height: 56px; border: 1.5px solid var(--line-2, #c9bca8); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.pl-stepper:focus-within { border-color: var(--green-3, #3f6a5d); box-shadow: 0 0 0 4px rgb(63 106 93 / .18); }
.pl-stepper button { flex: none; width: 56px; border: 0; background: #f3eee5; color: var(--pl-ink); font: 600 1.6rem/1 var(--body, system-ui); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: background-color .15s; }
.pl-stepper button:hover { background: #e9e2d6; }
.pl-stepper button:active { background: #ded5c6; }
.pl-stepper button:focus-visible { outline: 3px solid var(--brass, #b07a2f); outline-offset: -3px; }
.pl-stepper button:disabled { opacity: .4; cursor: default; }
.pl-stepper input { flex: 1; min-width: 0; border: 0; text-align: right; padding: 0 .2rem 0 .5rem; font: 700 1.3rem/1 var(--mono, monospace); color: var(--pl-ink); background: transparent; -moz-appearance: textfield; appearance: textfield; }
.pl-stepper input::-webkit-outer-spin-button, .pl-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pl-stepper input:focus { outline: none; }
.pl-stepper input:disabled { color: #9a958c; }
.pl-unit { display: flex; align-items: center; padding: 0 .7rem 0 .15rem; font: 600 1.05rem/1 var(--mono, monospace); color: var(--ink-3, #5e6a65); }

/* Finishes */
.pl-group { margin: 0 0 1.35rem; }
.pl-group[hidden] { display: none; }
.pl-q { font-weight: 700; margin: 0 0 .55rem; }
.planner .opt[hidden] { display: none; }
.pl-colours { display: flex; flex-wrap: wrap; gap: .45rem; }
.pl-colour { position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .3rem .85rem .3rem .35rem; border: 1.5px solid var(--line-2, #c9bca8); border-radius: 999px; background: #fff; font-weight: 600; font-size: .94rem; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.pl-colour input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-colour:has(input:checked) { border-color: var(--pl-accent); box-shadow: 0 0 0 1.5px var(--pl-accent); }
.pl-colour:has(input:focus-visible) { outline: 3px solid var(--brass, #b07a2f); outline-offset: 2px; }
.pl-dot { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); }
.pl-c-white { background: #f3f0e8; } .pl-c-grey { background: #c9c9c4; } .pl-c-sage { background: #a7b7a2; } .pl-c-blue { background: #7d98a8; } .pl-c-navy { background: #2f3f55; } .pl-c-charcoal { background: #3a3d3f; }
.pl-c-unsure { background: conic-gradient(#f3f0e8 0 17%, #a7b7a2 0 34%, #7d98a8 0 51%, #2f3f55 0 68%, #3a3d3f 0 85%, #c9c9c4 0); }

/* Summary */
.pl-summary { margin: 0 0 1.4rem; padding: 1rem 1.15rem; border-radius: 14px; background: #f3eee5; border: 1px dashed var(--line-2, #c9bca8); }
.pl-summary dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; font-size: .95rem; }
.pl-summary dt { font-weight: 700; }
.pl-summary dd { margin: 0; color: var(--ink-2, #46524e); }
@media (max-width: 480px) { .pl-summary dl { grid-template-columns: 1fr; gap: 0; } .pl-summary dd { margin-bottom: .45rem; } }

/* Progress */
.pl-progress { margin: 0 0 1.5rem; }
.no-js .pl-progress, .planner:not(.pl-on) .pl-progress { display: none; }
.pl-count { margin: 0 0 .5rem; font: 700 .78rem/1 var(--body, system-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--pl-brass); }
.pl-nav { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; margin: 0; padding: 0; }
.pl-nav button { width: 100%; min-height: 44px; padding: .35rem .2rem; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3, #5e6a65); font: 700 .88rem/1.1 var(--body, system-ui); cursor: pointer; transition: color .2s, background-color .2s; }
.pl-nav button:hover:not(:disabled) { background: rgb(0 0 0 / .04); color: var(--pl-ink); }
.pl-nav button[aria-current="step"] { color: var(--pl-ink); background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.pl-nav button.is-done { color: var(--green-3, #3f6a5d); }
.pl-nav button:disabled { cursor: default; opacity: .55; }
.pl-meter { height: 4px; margin-top: .55rem; border-radius: 4px; background: #e3dccf; overflow: hidden; }
.pl-meter::after { content: ""; display: block; height: 100%; background: linear-gradient(90deg, var(--green-3, #3f6a5d), var(--pl-accent)); transform-origin: left; transform: scaleX(var(--pl-progress, .2)); transition: transform .5s cubic-bezier(.3,.7,.2,1); }

/* Layout: the plan beside the questions */
.pl-layout { display: grid; gap: 1.5rem; }
@media (min-width: 980px) { .pl-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; } .pl-visual { position: sticky; top: calc(var(--header-h, 64px) + 1rem); } }
.no-js .pl-visual { display: none; }
.pl-plan { margin: 0; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--pl-line); box-shadow: var(--shadow, 0 8px 24px -12px rgb(0 0 0 / .2)); }
.pl-draw { aspect-ratio: 560 / 380; background: #fbf9f5; }
.pl-draw svg { display: block; width: 100%; height: 100%; }
.pl-fresh { animation: pl-fresh .45s cubic-bezier(.2,.7,.2,1); }
@keyframes pl-fresh { from { opacity: .2; transform: scale(.985); } }
.pl-plan figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; padding: .8rem 1rem; border-top: 1px solid var(--pl-line); background: var(--pl-card); }
.pl-plan figcaption strong { font-size: 1rem; }
.pl-plan figcaption span { font: 700 .95rem/1.2 var(--mono, monospace); color: var(--pl-brass); }
.pl-visual-note { margin: .6rem 0 0; font-size: .85rem; color: var(--ink-3, #5e6a65); }

/* Steps: one at a time once the script runs */
.pl-on .pl-step[hidden] { display: none; }
.no-js .pl-step + .pl-step, .planner:not(.pl-on) .pl-step + .pl-step { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--pl-line); }
.pl-enter { animation: pl-enter .45s cubic-bezier(.2,.7,.2,1); }
@keyframes pl-enter { from { opacity: 0; transform: translateX(14px); } }
.pl-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; padding-top: 1.25rem; border-top: 1px solid var(--pl-line); }
.pl-actions [data-next], .pl-actions [data-send] { margin-left: auto; }
.pl-actions [hidden] { display: none; }
.pl-actions .is-sending { opacity: .7; cursor: progress; }
@media (max-width: 520px) { .pl-actions .btn { flex: 1 1 auto; } .pl-actions [data-send] { width: 100%; } }
.pl-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; font-weight: 600; }
.pl-points li { display: flex; gap: .6rem; align-items: flex-start; }
.pl-points .i { color: var(--green-3, #3f6a5d); margin-top: .2em; }

/* The home page starter: intro, plan, questions on a phone; plan on the right on a wide screen */
.planner-start { display: grid; gap: 1.25rem; }
.pl-intro .lede { margin-bottom: 0; }
@media (min-width: 980px) {
  .planner-start { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "intro visual" "questions visual"; gap: 1.5rem 3rem; align-items: start; }
  .planner-start .pl-intro { grid-area: intro; }
  .planner-start .pl-questions { grid-area: questions; }
  .planner-start .pl-visual { grid-area: visual; align-self: center; }
}
.planner-start .pl-q { font-size: 1.02rem; }
.planner-start .pl-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .planner-start .pl-rooms { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.planner-start .pl-box { min-height: 0; flex-direction: row; align-items: center; padding: .65rem .75rem; }
.planner-start .pl-ico { width: 28px; height: 28px; }
.planner-start .pl-shape { width: 44px; height: 32px; }
.planner-start .pl-group + .pl-group { margin-top: 1.25rem; }
.planner-start .pl-go { margin-top: 1.4rem; }
/* On a phone the plan stays in view (below the header) while the choices scroll under it */
@media (max-width: 979px) {
  .pl-on .pl-visual { position: sticky; top: var(--header-h, 64px); z-index: 4; margin-inline: -4px; padding: 8px 4px 10px; background: var(--paper-2, #ede6da); }
  .pl-on.planner-full .pl-visual { background: var(--paper, #f6f2eb); }
  .pl-on .pl-visual::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(rgb(0 0 0 / .08), transparent); pointer-events: none; }
  .pl-on .pl-draw { aspect-ratio: auto; height: min(27vh, 210px); }
  .pl-on .pl-plan figcaption { padding: .5rem .8rem; }
  .pl-on .pl-visual-note { display: none; }
  .pl-on.planner-full[data-at="5"] .pl-visual { position: static; display: none; }
}

@media (prefers-reduced-motion: reduce) { .pl-fresh, .pl-enter { animation: none; } .pl-meter::after, .pl-switch::after { transition: none; } }
