/* ==========================================================================
   tnmsolutions.co.uk — build.css: the free site builder (/build, D90)
   Two columns from 1020 px (the steps on the left, the live preview on the
   right, sticky); below that the preview sits above the steps, phone-sized.
   ========================================================================== */

.bhead { position: relative; overflow: hidden; padding: clamp(36px, 5vw, 64px) 0 clamp(24px, 3vw, 36px); }
.bhead__bg { position: absolute; inset: 0; z-index: -1; }
.bhead h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); max-width: 15em; }

.builder { padding: 0 0 clamp(64px, 8vw, 112px); }
.builder__grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1020px) { .builder__grid { grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 40px; } }

.builder__panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow);
}
.builder__preview { order: -1; }
@media (min-width: 1020px) {
  .builder__preview { order: 0; position: sticky; top: 92px; }
}
.frame__view--build { height: min(56vh, 440px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.frame__view--build[data-device="phone"] { background: var(--surface-2); }
@media (min-width: 1020px) { .frame__view--build { height: calc(100vh - 200px); max-height: 820px; min-height: 520px; } }
.builder__note { margin: 12px 4px 0; font-size: .86rem; color: var(--muted); }

.bdevice { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: #fff; border: 1px solid var(--line); flex: none; }
.bdevice button { width: 34px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.bdevice button svg { width: 17px; height: 17px; }
.bdevice button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* progress */
.bprog { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.bprog button {
  width: 100%; display: grid; gap: 4px; justify-items: start; padding: 8px 6px 9px; border: 0; background: none; cursor: pointer;
  border-top: 3px solid var(--line); text-align: left;
  font: 650 .78rem/1.1 var(--font); color: var(--muted);
}
.bprog button span { font: 700 .66rem/1 var(--font-mono); letter-spacing: .06em; }
.bprog li.is-done button { border-top-color: var(--accent); color: var(--body); }
.bprog button[aria-current="step"] { border-top-color: var(--ink); color: var(--ink); }
.bprog button:disabled { cursor: default; opacity: .7; }
@media (max-width: 420px) { .bprog button { font-size: 0; } .bprog button span { font-size: .66rem; } }

.bstep h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: .3em; outline: none; }
.bstep__hint { color: var(--muted); margin-bottom: 20px; font-size: .97rem; }
.bstep .field + .field { margin-top: 16px; }

/* 1 · trade cards */
.bsectors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bgroups:empty { min-height: 412px; }   /* the seven group cards, before build.js draws them */
@media (min-width: 560px) and (max-width: 1019px) { .bsectors { grid-template-columns: repeat(3, 1fr); } }
.bcard {
  position: relative; display: grid; gap: 10px; align-content: start; min-height: 96px; padding: 14px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .15s var(--ease);
}
.bcard:hover { border-color: var(--ink); }
.bcard input { position: absolute; opacity: 0; pointer-events: none; }
.bcard:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.bcard:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }
.bcard__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.bcard:has(input:checked) .bcard__icon { background: var(--accent); color: #fff; }
.bcard__icon svg { width: 20px; height: 20px; }
.bcard__t { font-weight: 650; font-size: .93rem; line-height: 1.25; color: var(--ink); }
.bsectors[hidden], .btrades[hidden], [data-what-field][hidden] { display: none; }
button.bcard { font: inherit; text-align: left; width: 100%; color: inherit; }
button.bcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bcard__n { font: 600 .7rem/1 var(--font-mono); letter-spacing: .04em; color: var(--muted); margin-top: -4px; }
.btrades__back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 6px 0; border: 0; background: none; cursor: pointer; font: 650 .9rem/1.2 var(--font); color: var(--accent-ink, var(--accent)); }
.btrades__back:hover { text-decoration: underline; }

/* "Recommended for …" on a look and a feature (D93) */
.brec { justify-self: start; display: inline-block; margin: 6px 4px 0; padding: 5px 8px; border-radius: 6px; background: #E6F4EC; color: #145C34; font: 700 .64rem/1.2 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.brec[hidden] { display: none; }
.bwhy { margin: -6px 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; line-height: 1.5; color: var(--body); }
.bwhy:empty { display: none; }
.bwhy b { color: var(--ink); }

/* 3 · looks */
.blooks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.blook {
  position: relative; display: grid; gap: 4px; align-content: start; padding: 8px 8px 12px; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--surface); cursor: pointer; transition: border-color .15s;
}
.blook:hover { border-color: var(--ink); }
.blook input { position: absolute; opacity: 0; pointer-events: none; }
.blook:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.blook:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.blook__view { position: relative; display: block; aspect-ratio: 16 / 11; border-radius: 8px; overflow: hidden; background: var(--surface-2); margin-bottom: 6px; border: 1px solid var(--line); }
.blook__t { font-weight: 700; color: var(--ink); padding: 0 4px; }
.blook__n { font-size: .84rem; color: var(--muted); padding: 0 4px; line-height: 1.35; }

/* 4 · colour */
.bswatches { display: flex; flex-wrap: wrap; gap: 10px; }
.bswatch { position: relative; cursor: pointer; }
.bswatch input { position: absolute; opacity: 0; pointer-events: none; }
.bswatch__c { display: block; width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(14,26,48,.15) inset; transition: transform .15s var(--ease); }
.bswatch:hover .bswatch__c { transform: scale(1.06); }
.bswatch:has(input:checked) .bswatch__c { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.bswatch:has(input:focus-visible) .bswatch__c { outline: 3px solid var(--accent); outline-offset: 4px; }
.bswatch:first-child::after { content: "Suggested"; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 6px; font: 600 .62rem/1 var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.bcustom { display: flex; align-items: center; gap: 12px; margin-top: 30px; font-weight: 650; color: var(--ink); }
.bcustom input[type="color"] { width: 56px; height: 44px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
.bcontrast { margin: 16px 0 0; font: 500 .84rem/1.55 var(--font-mono); color: var(--body); background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.bcontrast:empty { display: none; }
.bcontrast b { color: var(--ink); }
.bcontrast .ok { color: var(--good); font-weight: 700; }
.bcontrast .warn { color: #8A5A00; font-weight: 700; }

/* 5 · features */
.bfeatures { display: grid; gap: 8px; }
.bfeat {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.bfeat:hover { border-color: var(--ink); }
.bfeat input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--accent); }
.bfeat:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.bfeat:has(input:disabled) { cursor: default; opacity: .8; }
.bfeat__body { flex: 1; display: grid; gap: 2px; }
.bfeat__t { font-weight: 600; font-size: .95rem; color: var(--ink); line-height: 1.3; }
.bfeat__why { font-size: .82rem; line-height: 1.4; color: var(--muted); }
.bfeat .brec { flex: none; align-self: flex-start; margin: 2px 0 0; }

/* 6 · yours */
.bsummary { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .95rem; }
.bsummary dt { font: 600 .72rem/1.9 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bsummary dd { margin: 0; color: var(--ink); }
.bdot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(14,26,48,.2) inset; }
.blink { margin: 20px 0 0; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.blink__t { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.blink__row { display: flex; gap: 8px; margin-bottom: 8px; }
.blink__row input { flex: 1; min-width: 0; min-height: 44px; font: 500 .8rem/1 var(--font-mono); color: var(--body); }
.blink__row .btn { min-height: 44px; padding: 0 14px; flex: none; }
.bvision { margin: 20px 0 0; font-size: .95rem; }
.bform { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); gap: 16px; }
.bform__t { font-size: 1.3rem; margin: 0; }
.bform__sub { margin: -6px 0 0; color: var(--muted); font-size: .95rem; }
.bform__two { display: grid; gap: 16px; }
@media (min-width: 560px) { .bform__two { grid-template-columns: 1fr 1fr; } }
.bstep .bform__two > .field + .field { margin-top: 0; }

.bnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.bnav [data-next] { margin-left: auto; }
.bnav [hidden] { display: none; }
.is-final .bnav { border-top: 0; padding-top: 0; }
