/* Sorted Studio — the check-up and start forms, and the sample check-up report.
   Loaded on check-up.html and start.html only, after site.css. */

/* Text swap on the form buttons (transitions.dev "text states swap"): the labels sit on top of each
   other; the old one lifts 4px and blurs out, the new one rises 4px into place. 150 ms, no layout shift. */
.swap { display: inline-grid; justify-items: center; }
.swap > span { grid-area: 1 / 1; transition: opacity 150ms ease-in-out, transform 150ms ease-in-out, filter 150ms ease-in-out; }
.swap > span:not(.is-on) { opacity: 0; transform: translateY(4px); filter: blur(2px); }
.swap > span:not(.is-on):has(~ .is-on) { transform: translateY(-4px); }

/* Fields */
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field select { width: 100%; min-height: 54px; padding: var(--space-4) var(--space-7) var(--space-4) var(--space-4); border: 1.5px solid var(--ink); border-radius: var(--r-input); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 20px; color: var(--ink); font: 500 var(--step-0)/1.4 var(--font-text); appearance: none; -webkit-appearance: none; cursor: pointer; }
.field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 7px var(--lime); }
.field textarea.short { min-height: 76px; }
.pick-total { display: block; margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: var(--r-input); background: var(--tone); border: 1px solid var(--ash); font-size: var(--fs-small); font-weight: 500; }
.pick-total:empty { display: none; }
/* Start page: "Your choice", the choice that arrived from the Prices page (filled by js/forms.js) */
.choice { padding: var(--space-4) var(--space-4) var(--space-4); border: 1.5px solid var(--ink); border-radius: var(--r-input); background: var(--card); }
.choice__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.choice__title { font: 600 var(--fs-h3)/1.12 var(--font-display); letter-spacing: -0.008em; }
.choice__change { margin-block: calc(-1 * var(--space-2)); }
.choice__care { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--r-input); background: var(--tone); font-size: var(--fs-small); }
.choice__list { margin: var(--space-3) 0 0; border-top: 1.5px solid var(--ink); }
.choice__list > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-4); padding-block: var(--space-2); border-bottom: 1px solid var(--ash); }
.choice__list dt { color: var(--ink-soft); }
.choice__list dd { margin: 0; font-weight: 600; text-align: right; }
.choice__list .choice__sum dt { color: var(--ink); font-weight: 600; }
.choice__list .choice__sum dd { font: 600 var(--step-1)/1.15 var(--font-display); letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.choice__later { margin-top: var(--space-3); font-size: var(--fs-small); color: var(--ink-soft); }

.form .actions .btn { min-width: 0; }
@media (max-width: 600px) { .form .actions .btn[type="submit"] { width: 100%; } }

/* Start page: a tighter top so the button sits on the first phone screen */
.page-hero--tight { padding-block: clamp(var(--space-6), 3.4vw, var(--space-7)) clamp(var(--space-5), 2.6vw, var(--space-6)); }
.page-hero--tight .lead { margin-top: var(--space-4); }

/* The sample report */
.report__for { padding-block: var(--space-4); border-bottom: 1px solid var(--ash); font-size: var(--fs-small); color: var(--ink-soft); }
.report__short { padding-block: var(--space-4); border-bottom: 1.5px solid var(--ink); }
.report__short strong, .report__cost h3 { display: block; font: 600 var(--step-1)/1.2 var(--font-display); letter-spacing: -0.005em; margin-bottom: var(--space-1); }
.report__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.report li .report__head strong { display: inline; }
.report__v { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-3); border-radius: var(--r-pill); font-size: var(--fs-label); font-weight: 600; line-height: 1; }
.report__v--yes { background: var(--lime); }
.report__v--half { box-shadow: inset 0 0 0 1.5px var(--ink); }
.report__v--no { background: var(--ink); color: var(--paper); }
.report li .do { display: block; margin-top: var(--space-2); font-size: var(--fs-small); }
.report li .do b { font-weight: 600; }
.verdict--half { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.report__cost { margin-top: var(--space-5); }
.report__cost dl { margin: var(--space-2) 0 0; border-top: 1.5px solid var(--ink); }
.report__cost dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-4); padding-block: var(--space-3); border-bottom: 1px solid var(--ash); }
.report__cost dt { font-weight: 500; }
.report__cost dd { margin: 0; font: 600 var(--step-1)/1.2 var(--font-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.report__cost p { margin-top: var(--space-3); }
.report__end { margin-top: var(--space-4); font-size: var(--fs-small); color: var(--ink-soft); }

/* ---------- Instant check-up (check-up.html, js/instant-check.js), 13 Oct 2026 ---------- */
.ic-about__list li { grid-template-columns: 30px minmax(0, 1fr); }
.ic-about__n { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--tone); font: 600 var(--fs-label)/1 var(--font-text); }
.ic__wait { display: grid; gap: var(--space-4); }
.ic__status { font: 600 var(--step-1)/1.25 var(--font-display); max-width: 34ch; }
.ic__bar { height: 6px; border-radius: 99px; background: var(--ash); overflow: hidden; }
.ic__bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ink); }
.ic__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); color: var(--ink-soft); font-size: var(--fs-small); }
.report .ic__steps li { display: flex; align-items: center; gap: var(--space-3); padding: 0; border: 0; transition: color 0.3s ease; }
.ic__steps li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line); transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.ic__steps li.is-now { color: var(--ink); font-weight: 600; }
.ic__steps li.is-now::before { box-shadow: inset 0 0 0 1.5px var(--ink); animation: ic-pulse 1.1s ease-in-out infinite alternate; }
.ic__steps li.is-done { color: var(--ink); }
.ic__steps li.is-done::before { background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: none; }
@keyframes ic-pulse { to { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 4px color-mix(in srgb, var(--ink) 10%, transparent); } }
.ic__error { display: grid; gap: var(--space-3); }
.ic__err-title { font: 600 var(--step-1)/1.25 var(--font-display); }
.ic__result:focus { outline: none; }
.ic__result .report__for { padding-block: var(--space-4) 0; color: var(--ink-soft); }
.ic__result .report__for strong { color: var(--ink); overflow-wrap: anywhere; }
.ic__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; padding-block: var(--space-5); }
@media (min-width: 600px) { .ic__grid { grid-template-columns: 150px minmax(0, 1fr); } }
.ic__shot { margin: 0; justify-self: center; width: min(170px, 100%); }
.ic__phone { padding: 6px; border-radius: 22px; background: var(--ink); box-shadow: var(--shadow-hint); }
.ic__phone img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--card); }
.ic__shot figcaption { margin-top: var(--space-2); text-align: center; }
.ic__scores { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); }
.report .ic__scores li { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "num num" "label label" "chip chip" "meter meter"; align-content: start; gap: var(--space-1); padding: var(--space-4); border: 1px solid var(--ash); border-radius: 16px; }
.ic__num { grid-area: num; font: 500 var(--step-5)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ic__label { grid-area: label; font-weight: 600; line-height: 1.25; }
.ic__scores .report__v { grid-area: chip; justify-self: start; margin-top: var(--space-1); }
.ic__meter { grid-area: meter; height: 4px; margin-top: var(--space-2); border-radius: 99px; background: var(--ash); overflow: hidden; }
.ic__meter span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--ink); transform-origin: left center; transform: scaleX(var(--s, 0)); }
.ic__h { margin-top: var(--space-6); font: 600 var(--step-1)/1.2 var(--font-display); }
.report__fix .actions { margin-top: var(--space-4); }
.ic__note { margin-top: var(--space-5); }
.ic__partial { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: 12px; background: var(--ash); font-size: var(--fs-small); }
.ic__partial strong { display: block; }
/* 5th score (Local business) takes the full row, so the 2 x 2 tiles stay even */
.report .ic__scores li:nth-child(5) { grid-column: 1 / -1; }
/* Google search preview: Google's own colours and font, so it reads as "this is what people see" */
.serp { display: grid; gap: 2px; margin-top: var(--space-3); padding: var(--space-4); border: 1px solid var(--ash); border-radius: 16px; background: #fff; font-family: Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
.serp__site { color: #202124; font-size: 14px; line-height: 1.4; }
.serp__title { color: #1a0dab; font-size: 20px; line-height: 1.3; }
.serp__desc { color: #4d5156; font-size: 14px; line-height: 1.58; }
.serp .is-missing { color: #70757a; font-style: italic; }
.ic__serp-wrap > .small, .ic__local-wrap > .small { margin-top: var(--space-2); }
.report .ic__local li { padding-block: var(--space-3); }
.ic__again { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
/* the scores count in: the bars fill and the numbers rise once the report shows */
.js .ic__result .ic__scores li { opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .ic__result .ic__meter span { transform: scaleX(0); transition: transform 0.3s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 200ms); }
.js .ic__result.is-in .ic__scores li { opacity: 1; transform: none; }
.js .ic__result.is-in .ic__meter span { transform: scaleX(var(--s, 0)); }
@media (prefers-reduced-motion: reduce) {
  .js .ic__result .ic__scores li, .js .ic__result .ic__meter span { transition: none; opacity: 1; transform: none; }
  .js .ic__result .ic__meter span { transform: scaleX(var(--s, 0)); }
  .ic__steps li.is-now::before { animation: none; }
}
