/* Powder blue floor, two oaks, tape-measure yellow, painter's-tape blue. */
:root {
  --paper: #fff;
  --ink: #1d2b4a;
  --track: #dde6f1;
  --soft: #eaf1f9;
  --soft-2: #dbe7f4;
  --wall: #4f70a3;
  --skirt-edge: #b4c4da;
  --off-fill: #f6f9fd;
  --off-edge: #8fa2bf;
  --shade: rgba(29, 43, 74, .6);
  --ink-2: #4d5a76;
  --underlay: #dbe8f6;
  --grid: #c8daee;
  --left: #efc98a;
  --right: #c68a4c;
  --seam: #6f4a22;
  --yellow: #ffc83d;
  --yellow-down: #f0b41c;
  --tape: #1769c2;
  --link: #0f4c90;
  --rule: #d9e2ee;
  --pad: clamp(16px, 4vw, 40px);
  --bar: 104px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.2rem/1.45 Lexend, Verdana, sans-serif;
}
h1, h2, p, ol, ul { margin: 0; }
h1, h2 { font-weight: 700; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.6vw, 4.2rem); }
[hidden] { display: none !important; }
a { color: var(--link); }
:focus-visible { outline: 4px solid var(--tape); outline-offset: 3px; }

/* ---------- top ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--pad); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.logo svg { width: 36px; height: 30px; }
.right-top { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.units { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.units select { font: inherit; font-weight: 600; color: var(--ink); background: var(--soft); border: 0; border-radius: 10px; min-height: 44px; padding: 4px 10px; cursor: pointer; }
.units select:hover { background: var(--soft-2); }
.count { font-size: 1.1rem; font-weight: 600; white-space: nowrap; }

/* ---------- progress ---------- */
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px var(--pad) 22px; }
.progress a { color: var(--ink-2); text-decoration: none; font-size: 1rem; line-height: 1.2; }
.progress a[aria-current] { color: var(--ink); font-weight: 700; }
.track { display: block; height: 12px; margin-bottom: 10px; border-radius: 6px; background: var(--track); overflow: hidden; }
.track i { display: block; height: 100%; background: var(--tape); transition: width .3s; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 700; color: var(--ink); text-decoration: none; text-align: center; cursor: pointer;
  border: 0; border-radius: 14px; min-height: 72px; padding: 12px 28px; font-size: 1.6rem; line-height: 1.15;
  display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation;
}
.btn.next { background: var(--yellow); }
.btn.next:hover { background: var(--yellow-down); }
.btn.next:active { transform: translateY(2px); }
.btn.back { background: #fff; box-shadow: inset 0 0 0 3px var(--ink); }
.btn.back:hover { background: var(--soft); }
.btn.soft { min-height: 56px; font-size: 1.15rem; font-weight: 600; background: #e8f0fa; color: var(--link); padding: 10px 20px; }
.btn.soft:hover { background: #d8e6f7; }

.bar {
  position: fixed; inset: auto 0 0 0; z-index: 5; display: flex; gap: 12px; background: var(--paper);
  padding: 12px var(--pad) max(12px, env(safe-area-inset-bottom)); border-top: 2px solid var(--rule);
}
.bar .btn { min-height: 78px; }
.bar .back { flex: 1; padding-inline: 8px; }
.bar .next { flex: 2; padding-inline: 8px; }

/* ---------- picture ---------- */
.stage {
  position: relative; overflow: hidden; border-radius: 18px; background-color: var(--underlay);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px; background-position: center;
}
.stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.stage text { font-family: inherit; font-weight: 700; fill: var(--ink); }
.pa { fill: var(--right); }
.pb { fill: var(--left); }
.pk { stroke: var(--seam); stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: 1.5px; }
.grain { stroke: var(--seam); opacity: .16; vector-effect: non-scaling-stroke; stroke-width: 1.2px; fill: none; }
.fresh { stroke: var(--tape); stroke-width: 3px; }
.fresh-line { fill: none; stroke: var(--tape); stroke-width: 3px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.off .pk { fill: var(--off-fill); stroke: var(--off-edge); stroke-dasharray: 5 4; }
.badge { fill: #fff; }
.stage text.onwall, .stage text.onblue { fill: #fff; }
.pencil { stroke: var(--tape); stroke-width: 4px; vector-effect: non-scaling-stroke; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pencil.dash { stroke-dasharray: 9 9; }
.roomline { stroke: var(--ink); stroke-width: 2.5px; vector-effect: non-scaling-stroke; stroke-dasharray: 12 7 2 7; fill: none; }
.dim { stroke: var(--ink); stroke-width: 2.5px; vector-effect: non-scaling-stroke; fill: none; }
.dot { fill: var(--tape); stroke: #fff; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.ring { fill: none; stroke: var(--tape); stroke-width: 4px; vector-effect: non-scaling-stroke; }
.wall { fill: var(--wall); }
.guide-tri { fill: #fff6df; }
.skirting { fill: #fff; stroke: var(--skirt-edge); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.pill { fill: #fff; }
.pill.blue { fill: var(--tape); }
.maskt { fill: #fff3c4; stroke: #cdb767; stroke-width: 1px; vector-effect: non-scaling-stroke; }

@media (prefers-reduced-motion: no-preference) {
  .slide { animation: slide .55s cubic-bezier(.2, .8, .3, 1) both; }
  @keyframes slide { from { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
  .pop { animation: pop .3s ease-out .15s both; transform-box: fill-box; transform-origin: center; }
  @keyframes pop { from { transform: scale(0); } }
  .still .slide, .still .pop { animation: none; }
}

/* ---------- landing ---------- */
.landing { display: grid; gap: 24px; padding: 8px var(--pad) 56px; max-width: 1360px; margin: 0 auto; }
.landing-copy { display: grid; gap: 18px; align-content: center; }
.landing-copy p { font-size: 1.35rem; max-width: 24em; }
.landing .go { margin-top: 6px; max-width: none; }
.landing .go .btn { width: 100%; min-height: 84px; font-size: clamp(1.4rem, 5.6vw, 1.9rem); }
.landing .again { font-size: 1.1rem; }
.landing .stage { min-height: 240px; }
@media (min-width: 860px) {
  .landing { grid-template-columns: 1fr 1.1fr; gap: 56px; padding-top: 24px; padding-bottom: 88px; }
  .landing .stage { min-height: min(600px, 70vh); }
  .landing .go .btn { width: auto; min-width: 300px; }
}
.js .guide { display: none; }
.js.guiding .guide { display: block; }
.js.guiding .landing, .js.guiding .read { display: none; }

/* ---------- a step ---------- */
.js .step { display: none; }
.js .step.on { display: flex; flex-direction: column; }
.step { gap: 14px; padding: 0 var(--pad) 16px; scroll-margin-top: 2000px; } /* stops the browser jumping past the header to #step */
.js.guiding main { padding-bottom: var(--bar); }
/* on a phone the picture takes whatever room the words leave */
.js .step.on { min-height: calc(100vh - 144px - var(--bar)); min-height: calc(100dvh - 144px - var(--bar)); }
.step .stage { height: 300px; }
.js .pic { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; }
.js .step .stage { flex: 1 1 auto; height: auto; min-height: 160px; max-height: 420px; }
@media (max-width: 859px) { .js.turned .step .stage { min-height: 250px; } }
.flips { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.flips button { font: inherit; font-size: .84rem; white-space: nowrap; font-weight: 600; line-height: 1.15; color: var(--ink); background: var(--soft); border: 0; border-radius: 12px; min-height: 52px; padding: 5px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; touch-action: manipulation; }
.flips button:hover { background: var(--soft-2); }
.flips svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.step .copy { display: grid; gap: 10px; align-content: start; max-width: 34em; }
.step h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.step h2:focus-visible { outline: 0; }
.step p { font-size: 1.15rem; }
.copy details { font-size: 1.1rem; }
.copy details p { font-size: 1.1rem; padding-top: 4px; color: var(--ink-2); }
summary { cursor: pointer; color: var(--link); font-weight: 600; padding: 8px 0; }
.step .size { font-size: 1.05rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; }
.size button { font: inherit; border: 0; background: none; padding: 10px 0; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* desktop: picture on the left, words with the buttons right under them on the right */
@media (min-width: 860px) {
  .step, .js .step.on {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: 1fr minmax(320px, auto) auto 1fr;
    column-gap: clamp(32px, 4vw, 64px); row-gap: 0; max-width: 1360px; margin: 0 auto; min-height: 0; padding-bottom: 40px;
  }
  .js .step:not(.on) { display: none; }
  .step > .pic, .step > .stage { grid-column: 1; grid-row: 1 / -1; }
  .step > .copy { grid-column: 2; grid-row: 2; }
  .step > .bar { grid-column: 2; grid-row: 3; }
  .step .stage, .js .step .stage { flex: none; height: calc(100vh - 290px); min-height: 320px; max-height: 600px; }
  .step .copy { gap: 18px; padding-bottom: 32px; align-content: end; } /* words sit right on top of the buttons, and the buttons stay put */
  .js .step#piles .stage { height: calc(100vh - 222px); min-height: 388px; max-height: 668px; }
  .step p { font-size: 1.3rem; }
  .bar { position: static; padding: 0; border: 0; background: none; }
  .js.guiding main { padding-bottom: 0; }
  .flips button { font-size: 1.1rem; min-height: 58px; flex-direction: row; gap: 10px; }
  .top { padding-block: 18px; }
  .progress { padding: 10px var(--pad) 32px; }
  .guiding .top, .guiding .progress { max-width: 1360px; margin-inline: auto; width: 100%; }
}
@media (max-width: 480px) {
  .guiding .units span, .units span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .guiding .logo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 859px) { .guiding .top { padding-block: 9px; } .guiding .units select { min-height: 42px; } }
@media (max-width: 859px) and (max-height: 720px) {
  :root { --bar: 92px; }
  .bar { padding-top: 8px; }
  .bar .btn { min-height: 70px; }
  .top, .guiding .top { padding-block: 7px; }
  .guiding .units select { min-height: 38px; }
  .progress { padding-bottom: 16px; }
  .js .step .stage { min-height: 150px; }
  .flips button { min-height: 50px; }
  .flips svg { width: 20px; height: 20px; }
  .step, .step .copy, .js .pic { gap: 8px; }
  .js .step.on { min-height: calc(100dvh - 118px - var(--bar)); }
}

/* ---------- fields ---------- */
.field { display: grid; grid-template-columns: 1fr 200px; gap: 12px; align-items: center; }
.field label, .own label { font-weight: 600; font-size: 1.15rem; }
.inp { display: flex; align-items: center; border: 3px solid var(--ink); border-radius: 12px; background: #fff; padding-right: 14px; max-width: 260px; }
.inp:focus-within { border-color: var(--tape); box-shadow: 0 0 0 3px #cfe1f6; }
.inp input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; font: inherit; font-size: 1.35rem; font-weight: 600; color: inherit; padding: 8px 10px 8px 14px; outline: 0; }
.inp:has(select) { padding-right: 4px; }
.inp:has(select) input { padding-right: 2px; padding-left: 12px; }
.inp select { font: inherit; font-size: 1.1rem; font-weight: 600; color: var(--ink); background: var(--soft); border: 0; border-radius: 8px; min-height: 44px; padding: 4px 6px; cursor: pointer; }
.inp select:hover { background: var(--soft-2); }
.inp i { font-style: normal; font-weight: 400; color: var(--ink-2); }
output { display: block; font-size: 1.2rem; min-height: 1.45em; }
output b { font-size: 1.35rem; }

/* ---------- size dialog ---------- */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); color: var(--ink); overflow: auto; }
dialog::backdrop { background: var(--shade); }
dialog form { padding: 20px 20px 0; display: grid; gap: 10px; }
dialog h2 { font-size: 1.5rem; }
.unit { display: flex; gap: 8px; }
.unit button { font: inherit; font-weight: 600; min-height: 48px; padding: 4px 20px; border-radius: 10px; border: 3px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; }
.unit button[aria-pressed=true] { border-color: var(--ink); }
.presets { display: grid; gap: 6px; }
.presets button { font: inherit; font-size: 1.2rem; font-weight: 600; line-height: 1.25; text-align: left; min-height: 54px; padding: 4px 14px; border: 3px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); display: grid; grid-template-columns: 1fr 84px; align-items: center; gap: 12px; cursor: pointer; }
.presets button[aria-pressed=true] { border-color: var(--tape); background: #eef5fd; }
.presets small { display: block; white-space: nowrap; font-size: .95rem; font-weight: 400; color: var(--ink-2); }
.presets i { display: block; height: calc(84px * var(--h)); width: calc(84px * var(--w)); justify-self: end; background: var(--left); border: 1.5px solid var(--seam); }
.own { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.own-h { font-weight: 600; }
.err { color: #a3261b; font-weight: 600; font-size: 1.1rem; }
.err:empty { display: none; }
.dlg-btns { display: flex; gap: 10px; position: sticky; bottom: 0; background: #fff; padding: 8px 0 16px; }
.dlg-btns .btn { font-size: 1.25rem; min-height: 64px; padding: 8px 14px; }
.dlg-btns .back { flex: 1; }
.dlg-btns .next { flex: 2; }

/* ---------- reading ---------- */
.read { border-top: 2px solid var(--rule); padding: 48px var(--pad) 72px; max-width: 48rem; margin: 0 auto; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.read h2 { font-size: 1.8rem; margin-top: 32px; }
.read h2:first-child { margin-top: 0; }
.read ol, .read ul { padding-left: 1.3em; display: grid; gap: 10px; }
.read li::marker { font-weight: 700; }
.read details { border-bottom: 2px solid var(--rule); padding: 4px 0; }
.read summary { color: var(--ink); font-weight: 600; padding: 12px 0; }
.read details p { padding-bottom: 14px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1.1rem; }
th, td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 2px solid var(--rule); font-variant-numeric: tabular-nums; vertical-align: bottom; }
thead th { font-weight: 600; color: var(--ink-2); line-height: 1.2; }
tbody th { white-space: nowrap; }
.fine { font-size: 1.05rem; color: var(--ink-2); margin-top: 28px; }
@media (max-width: 480px) {
  table { font-size: .95rem; }
  th, td { padding-right: 8px; }
  tbody td { white-space: nowrap; }
}

/* ---------- business enquiries ---------- */
.foot { border-top: 2px solid var(--rule); padding-top: 20px; margin-top: 12px; font-size: 1.1rem; }
.foot a { display: inline-block; padding: 8px 0; text-underline-offset: 3px; }
.contact { max-width: 40rem; margin: 0 auto; padding: 16px var(--pad) 72px; display: grid; gap: 18px; }
.contact h1 { font-size: clamp(2rem, 5vw, 3rem); }
.contact form { display: grid; gap: 20px; margin-top: 8px; }
.cf { display: grid; gap: 6px; }
.cf label { font-weight: 600; }
.cf input, .cf textarea { font: inherit; color: inherit; width: 100%; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 12px; background: #fff; }
.cf textarea { resize: vertical; min-height: 160px; }
.cf input:focus, .cf textarea:focus { outline: 0; border-color: var(--tape); box-shadow: 0 0 0 3px #cfe1f6; }
.cf [aria-invalid] { border-color: #a3261b; }
.contact .btn { width: 100%; min-height: 78px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.linky { font: inherit; border: 0; background: none; padding: 0; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- landing: no flooring yet ---------- */
.landing .before { font-size: 1.1rem; color: var(--ink-2); }
.landing .before b { color: var(--ink); }
figure { margin: 4px 0 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 14px; }
figcaption { font-size: 1.05rem; color: var(--ink-2); padding-top: 8px; }
@media (max-width: 480px) { .inp:has(select) input { font-size: 1.2rem; } }
@media (max-width: 350px) { .field { grid-template-columns: 1fr; gap: 6px; } }
