/* ==========================================================================
   The diagnostic: the visitor draws how enquiries move through their business,
   then receives a short consultation before sharing any details.
   ========================================================================== */

/* Compatibility with the site tokens (site.css) */
.mapper { --acc-solid: var(--blue); --ease-out: var(--ease-lock); --f-sans: var(--sans); --sa-t: env(safe-area-inset-top, 0px); }
.mapper__head .h2 { max-width: 16ch; }
.mapper .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mapper .next-link { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; font-weight: 600; min-height: var(--tap); display: inline-flex; align-items: center; }
.mapper .next-link:hover { text-decoration-thickness: 2px; }
.top__call--on { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 700px) { .top__call--on { display: inline-flex; } .top__call--on + *, .top__act:has(.top__call--on) .top__book { display: none; } }

.mapper__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: start; }

.mform { position: relative; min-width: 0; }
.mform__progress { height: 2px; background: var(--line); margin-bottom: 14px; }
.mform__progress span { display: block; height: 100%; background: var(--acc-solid); transform-origin: left; transform: scaleX(.11); transition: transform .5s var(--ease-out); }
.mform__count { color: var(--fg-3); margin-bottom: 24px; }

.q { border: 0; margin: 0 0 44px; padding: 0; min-width: 0; }
.q:focus { outline: none; }
.q legend, .diag__title {
  padding: 0; margin-bottom: 22px;
  font-weight: 700; font-stretch: 104%; font-size: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); letter-spacing: -.03em; line-height: 1.08; text-wrap: balance;
}
.q__hint { display: block; margin-top: 8px; font-weight: 500; font-stretch: 90%; font-size: .9rem; letter-spacing: 0; color: var(--fg-3); }
.q__intro { color: var(--fg-2); margin: -8px 0 22px; max-width: 48ch; }
.q__fine { margin-top: 14px; font-size: .85rem; color: var(--fg-3); }

.js .mform.is-stepper .q { display: none; margin: 0; }
.js .mform.is-stepper .q.is-active { display: block; animation: qIn .4s var(--ease-out); }
@keyframes qIn { from { opacity: 0; transform: translateX(12px); } }
@media (prefers-reduced-motion: reduce) { .js .mform.is-stepper .q.is-active { animation: none; } }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips--stack { display: grid; gap: 10px; max-width: 520px; }
.chips label { position: relative; display: block; cursor: pointer; }
.chips input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chips span {
  --cl: 0px; --cw: 2px; --cc: var(--acc-solid);
  display: flex; align-items: center; min-height: 52px; padding: 12px 18px; font-size: 1.02rem; line-height: 1.3;
  box-shadow: inset 0 0 0 1px var(--line-2); background-color: transparent;
  transition: --cl .3s var(--ease-out), color .2s, box-shadow .2s, background-color .2s;
}
.chips label:hover span { box-shadow: inset 0 0 0 1px var(--fg-3); }
.chips input:checked + span { --cl: 10px; color: var(--acc); box-shadow: inset 0 0 0 1.5px var(--acc-solid); background-color: rgba(51, 102, 255, .06); font-weight: 600; }
.chips input[type="checkbox"]:checked + span::after { content: "✓"; margin-left: 10px; font-weight: 700; }
.chips input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 3px; }

.field { display: grid; gap: 6px; }
.field .sys { color: var(--fg-3); line-height: 1.4; }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--fg-2); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; background: #fff; border: 0; border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--line-2); font-size: 1.02rem; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--acc-solid); }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--missed); }
.field__err { min-height: 1.2em; font-size: .86rem; color: var(--missed); }
.field__err:not(:empty)::before { content: "! "; font-weight: 700; }
.field--inline { margin-top: 18px; max-width: 520px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; align-items: start; }
.field--wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }

.mform__errors:empty { display: none; }
.mform__errors { margin-bottom: 16px; padding: 12px 14px; font-size: .95rem; color: var(--ink); box-shadow: inset 3px 0 0 var(--missed), inset 0 0 0 1px var(--line-2); background: #fff; }
.mform__errors:focus { outline: 2px solid var(--missed); outline-offset: 2px; }

/* navigation */
.mform__nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.mform__submit { display: none; }
.mform.is-last .mform__next { display: none; }
.mform.is-last .mform__submit { display: inline-flex; }
.mform.is-first .mform__back { display: none; }
.mform.is-result .mform__next { display: none; }
.mform:not(.is-stepper) .mform__back, .mform:not(.is-stepper) .mform__next { display: none; }
.mform:not(.is-stepper) .mform__submit { display: inline-flex; }
.mform__submit[aria-busy="true"] { cursor: progress; }
.mform__submit[aria-busy="true"] .mform__submit-label::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 12px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; animation: turn 1s var(--ease-io) infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (max-width: 560px) { .mform__nav .btn { flex: 1 1 auto; } }

.mform__done { margin-top: 24px; padding: 22px 24px; background: #fff; box-shadow: inset 3px 0 0 var(--acc-solid), inset 0 0 0 1px var(--line-2); }
.mform__done.is-error { box-shadow: inset 3px 0 0 var(--missed), inset 0 0 0 1px var(--line-2); }
.mform__done h3 { font-weight: 700; font-stretch: 104%; font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: 8px; }
.mform__done p { color: var(--fg-2); }
.mform__done p + p { margin-top: 10px; }
.mform__done .done__actions { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; align-items: center; }
.mform__done:focus { outline: none; }

/* ---------- the consultation ---------- */
.diag__kicker { color: var(--acc); margin-bottom: 10px; }
.diag { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.diag__block { display: grid; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.diag__block > .sys { color: var(--fg-3); }
.diag__block--gap > .sys { color: var(--missed); }
.diag__block--start > .sys { color: var(--acc); }
.diag__list { display: grid; gap: 6px; }
.diag__list li { position: relative; padding-left: 20px; color: var(--fg-2); }
.diag__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-left: 1.5px solid var(--fg-3); border-bottom: 1.5px solid var(--fg-3); }
.diag__gaps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 24px; }
.diag__gaps dt { font-stretch: 84%; font-weight: 600; font-size: var(--t-sys); letter-spacing: .01em; text-transform: none; color: var(--fg-3); margin-bottom: 4px; }
.diag__gaps dd { font-weight: 650; font-size: 1.12rem; line-height: 1.25; letter-spacing: -.01em; color: var(--missed); }
.diag__gaps dd::before { content: "Gap · "; font-weight: 500; font-size: .8em; color: var(--fg-3); }
.diag__layer { font-weight: 720; font-stretch: 106%; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); letter-spacing: -.03em; line-height: 1.1; color: var(--acc); }
.diag__why { color: var(--fg-2); max-width: 52ch; }
.diag__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 24px; }
.diag__actions .linkbtn { min-height: var(--tap); display: inline-flex; align-items: center; }
@media (max-width: 560px) {
  .diag__gaps { grid-template-columns: 1fr; }
  .diag__actions .btn { width: 100%; white-space: normal; text-align: center; padding-block: 12px; }
}

/* ---------- the live map ---------- */
.mview { position: sticky; top: calc(76px + var(--sa-t)); min-width: 0; padding: clamp(18px, 2.4vw, 28px); background: var(--navy-900); color: #EEF1F8;
  --acc: var(--blue-hi); --fg: #EEF1F8; --fg-2: var(--fog); --fg-3: var(--fog-2); --line: rgba(174,184,210,.17); --line-2: rgba(174,184,210,.32); --missed: var(--signal);
}
.mview__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.mview__head > .sys { color: var(--fg-3); }
#mview-industry { color: var(--fg); }
.mview__toggle { display: inline-flex; box-shadow: inset 0 0 0 1px var(--line-2); }
.mview__toggle button {
  --cl: 7px; --cw: 1.5px; --cc: var(--blue-hi);
  min-height: var(--tap); padding: 0 12px; font-stretch: 80%; font-weight: 600; font-size: .78rem; letter-spacing: .01em; text-transform: none; color: var(--fg-3);
}
.mview__toggle button[aria-pressed="true"] { color: #fff; }
.mview__toggle button:last-child[aria-pressed="true"] { color: var(--blue-hi); }

.mview__canvas { position: relative; aspect-ratio: 560 / 420; }
.mview__canvas svg { width: 100%; height: 100%; overflow: visible; }
.mview svg text { font-family: var(--f-sans); fill: #EEF1F8; }
.mview svg .t-sys { font-stretch: 84%; font-weight: 600; font-size: 12px; letter-spacing: .01em; text-transform: none; fill: var(--fog-2); }
.mview svg .t-src { font-weight: 600; font-size: 13px; }
.mview svg .t-miss { fill: var(--signal); font-size: 12px; font-weight: 600; }
.mview svg .t-ok { fill: #EEF1F8; font-size: 12.5px; font-weight: 500; }
.mview svg.is-compact .t-src { font-size: 15px; }
.mview svg.is-compact .t-ok, .mview svg.is-compact .t-miss { font-size: 14px; }
.mview svg.is-compact .t-sys { font-size: 13.5px; }
.mview svg .p-miss { stroke: var(--signal); stroke-width: 1.5; fill: none; stroke-dasharray: 4 5; }
.mview svg .p-flat { stroke: rgba(174,184,210,.45); stroke-width: 1.5; fill: none; }
.mview svg .p-cm { stroke: var(--blue-hi); stroke-width: 2; fill: none; }
.mview svg .n-src { fill: none; stroke: rgba(174,184,210,.45); stroke-width: 1; }
.mview svg .n-miss { fill: var(--signal); }
.mview svg .n-cm { fill: var(--blue-hi); }
.mview svg .spine-label { font-weight: 800; font-stretch: 125%; font-size: 12px; letter-spacing: .16em; fill: var(--blue-hi); }

.mview__sum { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; min-height: 108px; }
.mview__sum .big { font-weight: 700; font-stretch: 104%; font-size: clamp(1.1rem, 1.6vw, 1.4rem); letter-spacing: -.02em; line-height: 1.22; }
.mview__sum .big em { font-style: normal; color: var(--signal); }
.mview__sum .big strong { color: var(--blue-hi); font-weight: inherit; }
.mview__sum p { color: var(--fg-2); font-size: .95rem; }
.mview__mods { display: flex; flex-wrap: wrap; gap: 6px; }
.mview__mods .cap { --cc: var(--blue-hi); color: var(--blue-hi); }

@media (max-width: 960px) {
  .mapper__grid { grid-template-columns: 1fr; }
  .mview { position: relative; top: 0; }
}

/* ---------- The site's current look: dark navy, soft light, pills and round corners ---------- */
.mapper { position: relative; isolation: isolate; overflow: clip; }
.mapper::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70vmax 60vmax at 0% 0%, rgb(51 102 255 / .26), transparent 62%), radial-gradient(60vmax 60vmax at 100% 40%, rgb(110 149 255 / .14), transparent 62%); }
.mform__progress { border-radius: 2px; overflow: hidden; }
.chips span { border-radius: 999px; padding: 12px 20px; transition: transform .3s ease, color .2s, box-shadow .2s, background-color .2s; }
.chips--stack span { border-radius: 18px; }
.chips label:hover span { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--blue-hi); background-color: rgb(51 102 255 / .1); }
.chips input:checked + span { color: #fff; background-color: rgb(51 102 255 / .26); box-shadow: inset 0 0 0 1.5px var(--blue-hi); }
.field input, .field textarea { border-radius: 14px; background: rgb(6 12 29 / .6); color: var(--fg); }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--blue-hi); }
.mform__errors, .mform__done { border-radius: 16px; background: rgb(13 24 57 / .8); color: var(--fg); }
.mview { border-radius: 24px; background: rgb(13 24 57 / .78); box-shadow: inset 0 0 0 1px rgb(174 184 210 / .18); }
.mview__toggle { padding: 3px; border-radius: 999px; }
.mview__toggle button { border-radius: 999px; }
.mview__toggle button[aria-pressed="true"] { background: rgb(51 102 255 / .32); }
