/* Measure and quote, and the finishes library's picks. Lifts out with measure.js and finishes.js. */
.mq { padding: 0 0 clamp(60px, 10vw, 120px); background: var(--paper); }
.mq-noscript { background: #fff; padding: 18px; border-radius: 12px; font-weight: 600; }
.mq-grid { display: grid; gap: 28px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.mq-grid > * { min-width: 0; }
@media (min-width: 960px) { .mq-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; } .mq-plan { position: sticky; top: calc(var(--head) + 16px); } }

.mq-plan { background: var(--char); color: var(--white); border-radius: 20px; padding: 14px 14px 18px; }
.mq-sheet { position: relative; background: #1b1b1b; border-radius: 12px; overflow: hidden;
  background-image: linear-gradient(#262626 1px, transparent 1px), linear-gradient(90deg, #262626 1px, transparent 1px); background-size: 24px 24px; }
#mq-svg { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; }
.mq-scale { position: absolute; left: 12px; bottom: 8px; margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8d8c86; }
.mq-run { display: flex; align-items: baseline; gap: 10px; margin: 16px 6px 4px; }
.mq-run .k { font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--on-char-mute); margin-right: auto; }
.mq-run b { font-size: clamp(3rem, 14vw, 5rem); font-weight: 850; letter-spacing: -.05em; line-height: .8; color: var(--green); font-variant-numeric: tabular-nums; }
.mq-run .u { font-weight: 700; }
.mq-sum { margin: 10px 6px 0; font-size: .9375rem; color: #d9d8d1; }

/* the plan drawing */
#mq-svg .wall { stroke: #f2f1ec; stroke-width: var(--wall, 60); stroke-linecap: square; fill: none; }
#mq-svg .cab { stroke: #232323; stroke-width: var(--hair, 8); }
#mq-svg .cab-line { stroke: rgba(35,35,35,.55); stroke-width: var(--hair, 8); fill: none; }
#mq-svg .dim { stroke: var(--green); stroke-width: var(--hair, 8); fill: none; }
#mq-svg .dim-t { fill: var(--green); font-family: var(--font); font-weight: 850; letter-spacing: -.02em; }
#mq-svg .lab { fill: #232323; font-family: var(--font); font-weight: 800; }
#mq-svg .walk { fill: none; stroke: #6f6e69; stroke-width: var(--hair, 8); stroke-dasharray: 40 40; }
#mq-svg .basin { fill: #f6f6f3; stroke: #232323; stroke-width: var(--hair, 8); }
#mq-svg .rail { stroke: #232323; stroke-width: calc(var(--hair, 8) * 2); stroke-linecap: round; }
#mq-svg g { transition: opacity .3s; }

.mq-controls fieldset { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.mq-controls legend { display: flex; align-items: center; gap: 10px; font-size: clamp(1.4rem, 5vw, 1.75rem); font-weight: 850; letter-spacing: -.03em; margin-bottom: 12px; padding: 0; }
.mq-controls legend .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--green); font-size: .9375rem; letter-spacing: 0; flex: none; }
.hint { font-size: .9375rem; color: var(--on-paper-mute); margin: -4px 0 12px; }
.hint a { color: var(--green-deep); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: block; padding: 11px 16px; border-radius: 999px; border: 1.5px solid #c3c2ba; background: #fff; font-weight: 700; font-size: .9375rem; transition: background-color .2s, border-color .2s, color .2s; }
.chip input:checked + span { background: var(--char); border-color: var(--char); color: var(--green); }
.chip input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
html.js .chips[data-for] { display: none; }
html.js .chips[data-for].on { display: flex; }

.lens { display: grid; gap: 10px; }
@media (min-width: 560px) { .lens { grid-template-columns: 1fr 1fr; } }
html.js .len { display: none; } html.js .len.on { display: block; }
.len label { display: block; font-weight: 700; font-size: .875rem; margin-bottom: 4px; }
.step { display: grid; grid-template-columns: 48px 1fr auto 48px; align-items: center; background: #fff; border: 1.5px solid #c3c2ba; border-radius: 14px; overflow: hidden; }
.step:focus-within { border-color: var(--char); }
.step button { height: 52px; border: 0; background: #ecebe5; font: 800 1.4rem var(--font); cursor: pointer; color: var(--char); }
.step button:active { background: var(--green); }
.step input { border: 0; width: 100%; min-width: 0; text-align: right; font: 800 1.3rem var(--font); letter-spacing: -.02em; padding: 0 4px; height: 52px; font-variant-numeric: tabular-nums; color: var(--char); background: transparent; -moz-appearance: textfield; appearance: textfield; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step input:focus { outline: none; }
.step span { font-weight: 700; color: var(--on-paper-mute); padding: 0 8px 0 4px; font-size: .875rem; }

.swl { font-weight: 800; font-size: .875rem; margin: 4px 0 8px; }
.sws { display: grid; grid-auto-flow: column; grid-auto-columns: 92px; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.sw { position: relative; cursor: pointer; text-align: center; font-size: .75rem; font-weight: 700; line-height: 1.2; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw img { width: 78px; height: 78px; margin: 0 auto 6px; border-radius: 50%; object-fit: cover; transform: scale(1); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); outline: 3px solid transparent; outline-offset: 3px; transition: outline-color .2s; }
.sw input:checked + img { outline-color: var(--char); }
.sw input:focus-visible + img { outline-color: var(--green-deep); }
.mq-send { padding-top: 6px; }
.mq-send .hint { margin-top: 12px; }

/* finishes library */
.lib { display: grid; gap: 40px 28px; }
@media (min-width: 700px) { .lib { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .lib { grid-template-columns: repeat(3, 1fr); } }
.fin { scroll-margin-top: calc(var(--head) + 90px); }
.fin .bore { margin-bottom: 18px; max-width: 420px; }
.fin h3 { margin-bottom: 6px; }
.fin p { color: var(--on-paper-mute); margin-bottom: 14px; }
.pick { font: 800 .9375rem var(--font); padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--char); background: transparent; color: var(--char); cursor: pointer; }
.pick[aria-pressed="true"] { background: var(--char); color: var(--green); }
.pick[aria-pressed="true"]::before { content: "\2713  "; }
.fin:target .bore { box-shadow: 0 0 0 4px var(--green); }
.tray { position: sticky; top: var(--head); z-index: 20; background: var(--char); color: var(--white); padding: 12px 0; box-shadow: 0 10px 30px rgba(0,0,0,.15); transition: top .45s var(--ease); }
.head.is-up ~ main .tray { top: 0; }
.tray .wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.tray p { margin: 0; font-size: .9375rem; }
.tray [data-tray] { color: var(--green); font-weight: 700; }
.tray .btn { min-height: 42px; font-size: .9375rem; padding: 0 16px; }
html:not(.js) .tray { display: none; }

/* on a phone the plan stays in view, compact, while the steps scroll under it */
@media (max-width: 959px) {
  .mq-plan { position: sticky; top: calc(var(--head) + 6px); z-index: 5; padding: 8px 8px 10px; border-radius: 16px; box-shadow: 0 14px 30px rgba(0,0,0,.25); transition: top .45s var(--ease); }
  .head.is-up ~ main .mq-plan { top: 6px; }
  #mq-svg { aspect-ratio: 16 / 9; }
  .mq-sheet { border-radius: 10px; }
  .mq-scale { display: none; }
  .mq-run { margin: 8px 4px 0; }
  .mq-run b { font-size: 2.4rem; }
  .mq-sum { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
}

/* phones: the library is a two-up sample board, and the picks bar is one slim line */
@media (max-width: 699px) {
  .lib { grid-template-columns: 1fr 1fr; gap: 30px 14px; }
  .fin .bore { margin-bottom: 12px; }
  .fin h3 { font-size: 1.125rem; }
  .fin p { font-size: .875rem; line-height: 1.45; margin-bottom: 10px; }
  .pick { padding: 9px 13px; font-size: .8125rem; }
  .tray { padding: 8px 0; }
  .tray .wrap { flex-wrap: nowrap; gap: 10px; }
  .tray p { flex: 1; min-width: 0; font-size: .8125rem; line-height: 1.3; }
  .tray p b { display: none; }
  .tray .btns { flex-wrap: nowrap; flex: none; }
  .tray .btn { min-height: 38px; padding: 0 14px; font-size: .8125rem; }
  .tray .btn-line { display: none; }
}
